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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
071c4a1fedae334ad89edda9f44b7b9247e5685a | all.lisp | all.lisp | (defun cal (file)
(handler-bind
;; automatically choose 'smash existing class' when loading
((t (lambda (c)
(let ((restart (find-restart 'continue)))
(when restart (invoke-restart restart))))))
(sys.int::cal file)))
(cal "home/med/package.lisp")
(cal "home/med/line.lisp")
(cal... | (defun cal (file)
(handler-bind
;; automatically choose 'smash existing class' when loading
((t (lambda (c)
(invoke-restart 'continue))))
(sys.int::cal file)))
(cal "home/med/package.lisp")
(cal "home/med/line.lisp")
(cal "home/med/mark.lisp")
(cal "home/med/editor.lisp")
(cal "home/med/bu... | Update cal to directly invoke the continue restart. | Update cal to directly invoke the continue restart.
| Common Lisp | mit | burtonsamograd/med | common-lisp | ## Code Before:
(defun cal (file)
(handler-bind
;; automatically choose 'smash existing class' when loading
((t (lambda (c)
(let ((restart (find-restart 'continue)))
(when restart (invoke-restart restart))))))
(sys.int::cal file)))
(cal "home/med/package.lisp")
(cal "home/med/... |
b37394f318d172487826a8e9f641c81310e285db | dock/gentoobb/images/jdk-icedtea/Buildconfig.sh | dock/gentoobb/images/jdk-icedtea/Buildconfig.sh | PACKAGES="dev-java/icedtea-bin"
#
# this method runs in the bb builder container just before starting the build of the rootfs
#
configure_rootfs_build()
{
# skip python
provide_package dev-lang/python
}
#
# this method runs in the bb builder container just before tar'ing the rootfs
#
finish_rootfs_build()
{
... | PACKAGES="dev-java/icedtea-bin"
#
# this method runs in the bb builder container just before starting the build of the rootfs
#
configure_rootfs_build()
{
# skip python
provide_package dev-lang/python
}
#
# this method runs in the bb builder container just before tar'ing the rootfs
#
finish_rootfs_build()
{
... | Fix icedtea image. Requires libstdc++.so with 1.7 | Fix icedtea image. Requires libstdc++.so with 1.7
| Shell | bsd-2-clause | gdm/gentoo-bb,jonasjonas/gentoo-bb,edannenberg/gentoo-bb,edannenberg/kubler,guruvan/gentoo-bb,berney/gentoo-bb,gdm/gentoo-bb,berney/gentoo-bb,edannenberg/gentoo-bb,guruvan/gentoo-bb,jonasjonas/gentoo-bb | shell | ## Code Before:
PACKAGES="dev-java/icedtea-bin"
#
# this method runs in the bb builder container just before starting the build of the rootfs
#
configure_rootfs_build()
{
# skip python
provide_package dev-lang/python
}
#
# this method runs in the bb builder container just before tar'ing the rootfs
#
finish_ro... |
a229e1737542a5011e70c3fa63c360638e96e754 | lettuce_webdriver/css_selector_steps.py | lettuce_webdriver/css_selector_steps.py | from lettuce import step
from lettuce import world
from lettuce_webdriver.util import assert_true
from lettuce_webdriver.util import assert_false
import logging
log = logging.getLogger(__name__)
def wait_for_elem(browser, xpath, timeout=15):
start = time.time()
elems = []
while time.time() - start < time... | import time
from lettuce import step
from lettuce import world
from lettuce_webdriver.util import assert_true
from lettuce_webdriver.util import assert_false
import logging
log = logging.getLogger(__name__)
def wait_for_elem(browser, sel, timeout=15):
start = time.time()
elems = []
while time.time() - s... | Make the step actually do something. | Make the step actually do something.
| Python | mit | koterpillar/aloe_webdriver,aloetesting/aloe_webdriver,macndesign/lettuce_webdriver,ponsfrilus/lettuce_webdriver,aloetesting/aloe_webdriver,macndesign/lettuce_webdriver,infoxchange/aloe_webdriver,bbangert/lettuce_webdriver,aloetesting/aloe_webdriver,koterpillar/aloe_webdriver,infoxchange/lettuce_webdriver,infoxchange/al... | python | ## Code Before:
from lettuce import step
from lettuce import world
from lettuce_webdriver.util import assert_true
from lettuce_webdriver.util import assert_false
import logging
log = logging.getLogger(__name__)
def wait_for_elem(browser, xpath, timeout=15):
start = time.time()
elems = []
while time.time(... |
9bdcafec24a9540cb52d3c5be23f8b6d54346891 | README.md | README.md | Building a basic N-gram generator and predictive sentence generator from scratch using IPython Notebook
| Building a basic N-gram generator and predictive sentence generator from scratch using IPython Notebook.
# Viewing
Click on `NgramTutorial.ipynb` to see the most recent static results generated .
# Running live
Install [IPython Notebook](https://ipython.org/ipython-doc/3/notebook/index.html). It may be as simple as `... | Add startup instructions to readme | Add startup instructions to readme
| Markdown | mit | Elucidation/Ngram-Tutorial,Elucidation/Ngram-Tutorial | markdown | ## Code Before:
Building a basic N-gram generator and predictive sentence generator from scratch using IPython Notebook
## Instruction:
Add startup instructions to readme
## Code After:
Building a basic N-gram generator and predictive sentence generator from scratch using IPython Notebook.
# Viewing
Click on `NgramT... |
8090fa9c072656497ff383e9b76d49af2955e420 | examples/hopv/hopv_graph_conv.py | examples/hopv/hopv_graph_conv.py | from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
import numpy as np
from models import GraphConvTensorGraph
np.random.seed(123)
import tensorflow as tf
tf.set_random_seed(123)
import deepchem as dc
from deepchem.molnet import load_hopv
# Load HOPV dataset... | from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
import numpy as np
from models import GraphConvModel
np.random.seed(123)
import tensorflow as tf
tf.set_random_seed(123)
import deepchem as dc
from deepchem.molnet import load_hopv
# Load HOPV dataset
hopv_... | Fix GraphConvTensorGraph to GraphConvModel in hopv example | Fix GraphConvTensorGraph to GraphConvModel in hopv example
| Python | mit | Agent007/deepchem,lilleswing/deepchem,lilleswing/deepchem,Agent007/deepchem,peastman/deepchem,miaecle/deepchem,peastman/deepchem,ktaneishi/deepchem,miaecle/deepchem,Agent007/deepchem,deepchem/deepchem,ktaneishi/deepchem,deepchem/deepchem,ktaneishi/deepchem,miaecle/deepchem,lilleswing/deepchem | python | ## Code Before:
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
import numpy as np
from models import GraphConvTensorGraph
np.random.seed(123)
import tensorflow as tf
tf.set_random_seed(123)
import deepchem as dc
from deepchem.molnet import load_hopv
# L... |
7a64e0540b4985b5249a96e34e2239d6e731bef9 | templates/email/fixamingata/alert-update.txt | templates/email/fixamingata/alert-update.txt | Subject: Ny uppdatering - '<?=$values['title']?>'
Följande uppdatering har lämnats för rapporten
<?=$values['title']?>:
<?=$values['data']?>
<?=$values['state_message']?>
För att se eller svara på dessa uppdateringar, klicka på följande länk:
<?=$values['problem_url']?>
Du kan inte kontakta någon genom att sva... | Subject: Ny uppdatering - '<?=$values['title']?>'
OBS! Du kan inte svara på detta brev. För att se eller svara på dessa
uppdateringar, klicka på följande länk:
<?=$values['problem_url']?>
Följande uppdatering har lämnats för rapporten
<?=$values['title']?>:
<?=$values['data']?>
<?=$values['state_message']?>
<?=$v... | Put "no-reply" message in the top of the FixaMinGata alert update | Put "no-reply" message in the top of the FixaMinGata alert update
| Text | agpl-3.0 | otmezger/fixmystreet,nditech/fixmystreet,altinukshini/lokalizo,dracos/fixmystreet,mhalden/fixmystreet,nditech/fixmystreet,antoinepemeja/fixmystreet,otmezger/fixmystreet,opencorato/barriosenaccion,rbgdigital/fixmystreet,nditech/fixmystreet,otmezger/fixmystreet,altinukshini/lokalizo,otmezger/fixmystreet,ciudadanointelige... | text | ## Code Before:
Subject: Ny uppdatering - '<?=$values['title']?>'
Följande uppdatering har lämnats för rapporten
<?=$values['title']?>:
<?=$values['data']?>
<?=$values['state_message']?>
För att se eller svara på dessa uppdateringar, klicka på följande länk:
<?=$values['problem_url']?>
Du kan inte kontakta någ... |
a063543612b94fec3e679e7a6c6632f0b8cd855d | spec/classes/bitlbee_spec.rb | spec/classes/bitlbee_spec.rb | require 'spec_helper'
describe 'bitlbee' do
let(:facts) do
{
:boxen_home => '/opt/boxen',
:boxen_user => 'testuser',
}
end
it { should include_class('bitlbee::config') }
it { should contain_package('bitlbee').with_provider('homebrew') }
it { should contain_file('/Library/LaunchDaemons/bit... | require 'spec_helper'
describe 'bitlbee' do
let(:facts) do
{
:boxen_home => '/opt/boxen',
:boxen_user => 'testuser',
:luser => 'goober',
}
end
it { should include_class('bitlbee::config') }
it { should contain_package('bitlbee').with_provider('homebrew') }
it { should contain_file('... | Add spec for UserName in bitlbee.plist. | Add spec for UserName in bitlbee.plist.
| Ruby | mit | lglenn/puppet-bitlbee,lglenn/puppet-bitlbee | ruby | ## Code Before:
require 'spec_helper'
describe 'bitlbee' do
let(:facts) do
{
:boxen_home => '/opt/boxen',
:boxen_user => 'testuser',
}
end
it { should include_class('bitlbee::config') }
it { should contain_package('bitlbee').with_provider('homebrew') }
it { should contain_file('/Library/L... |
209481363c433a4b589063fbf16e50ad6721614c | .travis.yml | .travis.yml | sudo: false
language: scala
jdk:
- oraclejdk9
script:
- sbt "^^ ${SBT_VERSION}" scripted
matrix:
include:
- env: SBT_VERSION="0.13.6"
- env: SBT_VERSION="1.0.0"
| sudo: false
language: scala
script:
- sbt "^^ ${SBT_VERSION}" scripted
matrix:
include:
- env: SBT_VERSION="0.13.6"
- env: SBT_VERSION="1.0.0"
| Use the default JDK version in CI | Use the default JDK version in CI
| YAML | bsd-3-clause | earldouglas/xsbt-web-plugin,earldouglas/xsbt-web-plugin | yaml | ## Code Before:
sudo: false
language: scala
jdk:
- oraclejdk9
script:
- sbt "^^ ${SBT_VERSION}" scripted
matrix:
include:
- env: SBT_VERSION="0.13.6"
- env: SBT_VERSION="1.0.0"
## Instruction:
Use the default JDK version in CI
## Code After:
sudo: false
language: scala
script:
- sbt "^^ ${SBT_VERSION}" sc... |
0cdb07df0efbcd3c5e5646fe444adf8c45e5fb70 | terraform/provisioners.tf | terraform/provisioners.tf | resource "null_resource" "generate_pki" {
depends_on = ["aws_kms_key.pki"]
provisioner "local-exec" {
command = "kaws cluster genpki ${var.cluster} --domain ${var.domain} --kms-key ${aws_kms_key.pki.key_id} --region ${var.region}"
}
triggers {
etcd_ca = "${file("clusters/${var.cluster}/etcd-ca.pem")}"... | resource "null_resource" "generate_pki" {
depends_on = ["aws_kms_key.pki"]
provisioner "local-exec" {
command = "kaws cluster genpki ${var.cluster} --domain ${var.domain} --kms-key ${aws_kms_key.pki.key_id} --region ${var.region}"
}
}
| Remove triggers from genpki null_resource. | Remove triggers from genpki null_resource.
| HCL | mit | InQuicker/kaws | hcl | ## Code Before:
resource "null_resource" "generate_pki" {
depends_on = ["aws_kms_key.pki"]
provisioner "local-exec" {
command = "kaws cluster genpki ${var.cluster} --domain ${var.domain} --kms-key ${aws_kms_key.pki.key_id} --region ${var.region}"
}
triggers {
etcd_ca = "${file("clusters/${var.cluster}... |
17805bb87ae84224baa45e4a762cf6d5d58e512a | .travis.yml | .travis.yml | language: node_js
script:
- npm run test -- --env ci
before_install:
# fire up xvfb on port :99.0
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
# set the xvfb screen size to 1280x1024x16
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --e... | language: node_js
script:
- npm run test -- --env ci
before_install:
# fire up xvfb on port :99.0
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
# set the xvfb screen size to 1280x1024x16
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --e... | Remove items not needed in before_install | Remove items not needed in before_install
| YAML | isc | TobiasKjrsgaard/nightwatch-demo | yaml | ## Code Before:
language: node_js
script:
- npm run test -- --env ci
before_install:
# fire up xvfb on port :99.0
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
# set the xvfb screen size to 1280x1024x16
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile ... |
1fb091435e840cbed3ccb7431a34f33d123c8292 | newTruckApp/src/main/java/app/ShippingTrackerObserver.java | newTruckApp/src/main/java/app/ShippingTrackerObserver.java | package app;
import java.util.Observable;
import java.util.Observer;
/**
* Created by Benjamin on 03/02/2016.
*/
public class ShippingTrackerObserver implements Observer {
@Override
public void update(Observable o, Object arg) {
}
}
| package app;
import app.action.Action;
import app.action.ActionEvent;
import app.action.Drop;
import app.shipper.BasicShipper;
import java.util.ArrayList;
import java.util.List;
import java.util.Observable;
import java.util.Observer;
/**
* Created by Benjamin on 03/02/2016.
*/
public class ShippingTrackerObserver ... | Add basic code into new Spy | Add basic code into new Spy
| Java | mit | ttben/al-drone-delivery,ttben/al-drone-delivery | java | ## Code Before:
package app;
import java.util.Observable;
import java.util.Observer;
/**
* Created by Benjamin on 03/02/2016.
*/
public class ShippingTrackerObserver implements Observer {
@Override
public void update(Observable o, Object arg) {
}
}
## Instruction:
Add basic code into new Spy
## Code After:
pa... |
ee5ab61090cef682f37631a8c3f5764bdda63772 | xpserver_web/tests/unit/test_web.py | xpserver_web/tests/unit/test_web.py | from django.core.urlresolvers import resolve
from xpserver_web.views import main
def test_root_resolves_to_hello_world():
found = resolve('/')
assert found.func == main
| from django.core.urlresolvers import resolve
from xpserver_web.views import main, register
def test_root_resolves_to_main():
found = resolve('/')
assert found.func == main
def test_register_resolves_to_main():
found = resolve('/register/')
assert found.func == register
| Add unit test for register | Add unit test for register
| Python | mit | xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server | python | ## Code Before:
from django.core.urlresolvers import resolve
from xpserver_web.views import main
def test_root_resolves_to_hello_world():
found = resolve('/')
assert found.func == main
## Instruction:
Add unit test for register
## Code After:
from django.core.urlresolvers import resolve
from xpserver_web.v... |
c5382f650ee1dd066aff0caffd581b95519d1c81 | src/main/assembly/bin-classes.xml | src/main/assembly/bin-classes.xml | <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>aphelion.bin... | <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>aphelion.bin... | Fix missing resource files in the generated .jar | Fix missing resource files in the generated .jar
| XML | agpl-3.0 | Periapsis/aphelion,Periapsis/aphelion | xml | ## Code Before:
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
... |
3e400ab936b13dc752f25ef38d510714995e6ac6 | htdocs/system/admin/publish_settings.php | htdocs/system/admin/publish_settings.php | <div class="container">
<p class="column span-5"><?php _e('Content State'); ?></p>
<p class="column span-14 last">
<label><?php echo Utils::html_select( 'status', array_flip($statuses), $post->status == Post::status( 'scheduled' ) ? Post::status( 'published' ) : $post->status, array( 'class'=>'long... | <div class="container">
<p class="column span-5"><?php _e('Content State'); ?></p>
<p class="column span-14 last">
<label><?php echo Utils::html_select( 'status', array_flip($statuses), $post->status == Post::status( 'scheduled' ) ? Post::status( 'published' ) : $post->status, array( 'class'=>'long... | Add a note about scheduled posts to the UI. If there's a better way to insert this into the CSS, please go right ahead. | Add a note about scheduled posts to the UI. If there's a better way to insert this into the CSS, please go right ahead.
git-svn-id: d0e296eae3c99886147898d36662a67893ae90b2@1579 653ae4dd-d31e-0410-96ef-6bf7bf53c507
| PHP | apache-2.0 | dragonmantank/Habari,dragonmantank/Habari,dragonmantank/Habari | php | ## Code Before:
<div class="container">
<p class="column span-5"><?php _e('Content State'); ?></p>
<p class="column span-14 last">
<label><?php echo Utils::html_select( 'status', array_flip($statuses), $post->status == Post::status( 'scheduled' ) ? Post::status( 'published' ) : $post->status, array... |
d59f682a31bc814037d5703742b4e0acb5c85554 | lib/mongomodel/concerns/attribute_methods/dirty.rb | lib/mongomodel/concerns/attribute_methods/dirty.rb | module MongoModel
module AttributeMethods
module Dirty
extend ActiveSupport::Concern
include ActiveModel::Dirty
included do
after_save { changed_attributes.clear }
end
# Returns the attributes as they were before any changes were made to the document.
... | module MongoModel
module AttributeMethods
module Dirty
extend ActiveSupport::Concern
include ActiveModel::Dirty
included do
before_save { @previously_changed = changes }
after_save { changed_attributes.clear }
end
# Returns the attributes as they ... | Save previous changes before saving | Save previous changes before saving
| Ruby | mit | spohlenz/mongomodel | ruby | ## Code Before:
module MongoModel
module AttributeMethods
module Dirty
extend ActiveSupport::Concern
include ActiveModel::Dirty
included do
after_save { changed_attributes.clear }
end
# Returns the attributes as they were before any changes were made to t... |
5aff66da9b38b94fe0e6b453ecb2678e0f743d8a | example/i18n/fr.js | example/i18n/fr.js | export const messages = {
post: {
name: 'Article',
all: 'Articles',
list: {
search: 'Recherche',
title: 'Titre',
published_at: 'Publié le',
commentable: 'Commentable',
views: 'Vues',
},
form: {
title: 'Ti... | export const messages = {
post: {
name: 'Article',
all: 'Articles',
list: {
search: 'Recherche',
title: 'Titre',
published_at: 'Publié le',
commentable: 'Commentable',
views: 'Vues',
},
form: {
title: 'Ti... | Fix typos in French translation of the example | Fix typos in French translation of the example
| JavaScript | mit | matteolc/admin-on-rest,matteolc/admin-on-rest,marmelab/admin-on-rest,marmelab/admin-on-rest | javascript | ## Code Before:
export const messages = {
post: {
name: 'Article',
all: 'Articles',
list: {
search: 'Recherche',
title: 'Titre',
published_at: 'Publié le',
commentable: 'Commentable',
views: 'Vues',
},
form: {
... |
63018fd994e92df0f09211fa019ffe91d87fc24a | src/Nerd/Framework/Http/IO/OutputContract.php | src/Nerd/Framework/Http/IO/OutputContract.php | <?php
namespace Nerd\Framework\Http\IO;
use Nerd\Framework\Http\Response\CookieContract;
interface OutputContract
{
/**
* Send cookie to client
*
* @param CookieContract $cookie
* @return mixed
*/
public function sendCookie(CookieContract $cookie);
/**
* Send header to clie... | <?php
namespace Nerd\Framework\Http\IO;
use Nerd\Framework\Http\Response\CookieContract;
interface OutputContract
{
/**
* Send cookie to client
*
* @param CookieContract $cookie
* @return mixed
*/
public function sendCookie(CookieContract $cookie);
/**
* Send header to clie... | Add close() method to HttpOutput | Add close() method to HttpOutput
| PHP | mit | nerd-framework/nerd-contracts | php | ## Code Before:
<?php
namespace Nerd\Framework\Http\IO;
use Nerd\Framework\Http\Response\CookieContract;
interface OutputContract
{
/**
* Send cookie to client
*
* @param CookieContract $cookie
* @return mixed
*/
public function sendCookie(CookieContract $cookie);
/**
* Sen... |
3b92b81594668cdd24f24fa32a2c5d61f908d22d | setup.py | setup.py | from setuptools import setup, find_packages
from os import path
import sys
if sys.version_info < (3, 4):
sys.exit('DataJoint is only supported on Python 3.4 or higher')
here = path.abspath(path.dirname(__file__))
long_description = "A relational data framework for scientific data pipelines with MySQL backend."
... | from setuptools import setup, find_packages
from os import path
import sys
min_py_version = (3, 4)
if sys.version_info < min_py_version:
sys.exit('DataJoint is only supported on Python {}.{} or higher'.format(*min_py_version))
here = path.abspath(path.dirname(__file__))
long_description = "A relational data fr... | Update minimum python versioning checks | Update minimum python versioning checks
| Python | lgpl-2.1 | eywalker/datajoint-python,dimitri-yatsenko/datajoint-python,datajoint/datajoint-python | python | ## Code Before:
from setuptools import setup, find_packages
from os import path
import sys
if sys.version_info < (3, 4):
sys.exit('DataJoint is only supported on Python 3.4 or higher')
here = path.abspath(path.dirname(__file__))
long_description = "A relational data framework for scientific data pipelines with M... |
9139bed2d76e3b3499b172360ca54d9d8d7c86b5 | tests/runtime-tests.sh | tests/runtime-tests.sh |
set -e;
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
BPFTRACE_RUNTIME_TEST_EXECUTABLE=${BPFTRACE_RUNTIME_TEST_EXECUTABLE:-$DIR/../src/};
export BPFTRACE_RUNTIME_TEST_EXECUTABLE;
python3 main.py $@
|
set -e;
pushd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1
BPFTRACE_RUNTIME_TEST_EXECUTABLE=${BPFTRACE_RUNTIME_TEST_EXECUTABLE:-../src/};
export BPFTRACE_RUNTIME_TEST_EXECUTABLE;
python3 main.py $@
| Allow runtime tests to be ran from any directory | Allow runtime tests to be ran from any directory
When trying to run the runtime tests from any directory other than
`tests` it fails:
```
~/bpftrace$ sudo ./tests/runtime-tests.sh
python3: can't open file 'main.py': [Errno 2] No such file or directory
```
This fixes that
| Shell | apache-2.0 | iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace,iovisor/bpftrace | shell | ## Code Before:
set -e;
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
BPFTRACE_RUNTIME_TEST_EXECUTABLE=${BPFTRACE_RUNTIME_TEST_EXECUTABLE:-$DIR/../src/};
export BPFTRACE_RUNTIME_TEST_EXECUTABLE;
python3 main.py $@
## Instruction:
Allow runtime tests to be ran from any directory
When trying to... |
22b8e32cc350228b328f026ccf9e3e90ef9f2aed | manoseimas/settings/vagrant.py | manoseimas/settings/vagrant.py | from manoseimas.settings.base import * # noqa
from manoseimas.settings.development import * # noqa
INTERNAL_IPS = (
'127.0.0.1',
'10.0.2.2', # Vagrant host IP in default config
)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'OPTIONS': {
'init_command': 'S... | from manoseimas.settings.base import * # noqa
from manoseimas.settings.development import * # noqa
INTERNAL_IPS = (
'127.0.0.1',
'10.0.2.2', # Vagrant host IP in default config
)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'OPTIONS': {
'init_command': ('... | Set STRICT_ALL_TABLES on connection to prevent MySQL from silently truncating data. | Set STRICT_ALL_TABLES on connection to prevent MySQL from silently truncating data.
| Python | agpl-3.0 | ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt,ManoSeimas/manoseimas.lt | python | ## Code Before:
from manoseimas.settings.base import * # noqa
from manoseimas.settings.development import * # noqa
INTERNAL_IPS = (
'127.0.0.1',
'10.0.2.2', # Vagrant host IP in default config
)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'OPTIONS': {
'i... |
b870f8008dbc519e43026e3ff955797afdade494 | src/pl/plperl/nls.mk | src/pl/plperl/nls.mk | CATALOG_NAME := plperl
AVAIL_LANGUAGES :=
GETTEXT_FILES := plperl.c SPI.xs
GETTEXT_TRIGGERS:= _ errmsg errdetail errdetail_log errhint errcontext croak Perl_croak
| CATALOG_NAME := plperl
AVAIL_LANGUAGES :=
GETTEXT_FILES := plperl.c SPI.c
GETTEXT_TRIGGERS:= errmsg errdetail errdetail_log errhint errcontext
| Remove croak and Perl_croak from gettext triggers. While we could selectively mark up their arguments for translation, the Perl xsubpp tool generates a bunch of additional Perl_croak calls that we cannot control, so we'd be creating a confusing mix of translated and untranslated messages of a similar kind. This is some... | Remove croak and Perl_croak from gettext triggers. While we could
selectively mark up their arguments for translation, the Perl xsubpp tool
generates a bunch of additional Perl_croak calls that we cannot control,
so we'd be creating a confusing mix of translated and untranslated messages
of a similar kind. This is so... | Makefile | mpl-2.0 | postmind-net/postgres-xl,lisakowen/gpdb,xinzweb/gpdb,lisakowen/gpdb,Chibin/gpdb,tpostgres-projects/tPostgres,jmcatamney/gpdb,ashwinstar/gpdb,kmjungersen/PostgresXL,Chibin/gpdb,ashwinstar/gpdb,edespino/gpdb,Chibin/gpdb,postmind-net/postgres-xl,50wu/gpdb,yuanzhao/gpdb,snaga/postgres-xl,ashwinstar/gpdb,Chibin/gpdb,zeroae/... | makefile | ## Code Before:
CATALOG_NAME := plperl
AVAIL_LANGUAGES :=
GETTEXT_FILES := plperl.c SPI.xs
GETTEXT_TRIGGERS:= _ errmsg errdetail errdetail_log errhint errcontext croak Perl_croak
## Instruction:
Remove croak and Perl_croak from gettext triggers. While we could
selectively mark up their arguments for translation, the ... |
ef4d7cd9f615d6f95f4c43e72bd435650351f790 | appveyor.yml | appveyor.yml | cache:
- "c:\\sr" # stack root, short paths == less problems
build: off
before_test:
- curl -ostack.zip -L --insecure http://www.stackage.org/stack/windows-i386
- 7z x stack.zip stack.exe
clone_folder: "c:\\project"
environment:
global:
STACK_ROOT: "c:\\sr"
test_script:
- stack setup --verbose
- stack init --... |
build: off
before_test:
- curl -ostack.zip -L --insecure http://www.stackage.org/stack/windows-i386
- 7z x stack.zip stack.exe
clone_folder: "c:\\project"
environment:
global:
STACK_ROOT: "c:\\sr"
test_script:
- stack setup --verbose
- stack init --solver
- echo "" | stack --no-terminal build
- stack exec -- ... | Comment out the cache, in case its breaking things | Comment out the cache, in case its breaking things | YAML | bsd-3-clause | ndmitchell/hlint,ndmitchell/hlint | yaml | ## Code Before:
cache:
- "c:\\sr" # stack root, short paths == less problems
build: off
before_test:
- curl -ostack.zip -L --insecure http://www.stackage.org/stack/windows-i386
- 7z x stack.zip stack.exe
clone_folder: "c:\\project"
environment:
global:
STACK_ROOT: "c:\\sr"
test_script:
- stack setup --verbose... |
517c8978c33d7e9f0251985f2ca39b6f2514ae9e | hack/boxee/skin/boxee/720p/scripts/boxeehack_clear_cache.py | hack/boxee/skin/boxee/720p/scripts/boxeehack_clear_cache.py | import os,mc
import xbmc, xbmcgui
def fanart_function():
if mc.ShowDialogConfirm("Clear fanart cache", "Are you sure you want to clear the fanart cache?", "Cancel", "OK"):
pass
def thumbnail_function():
if mc.ShowDialogConfirm("Clear thumbnail cache", "Are you sure you want to clear the thumbnail cach... | import os,mc
import xbmc, xbmcgui
def fanart_function():
if mc.ShowDialogConfirm("Clear fanart cache", "Are you sure you want to clear the fanart cache?", "Cancel", "OK"):
pass
def thumbnail_function():
if mc.ShowDialogConfirm("Clear thumbnail cache", "Are you sure you want to clear the thumbnail cach... | Correct clearing of fanart cache | Correct clearing of fanart cache
| Python | mit | cigamit/boxeehack,cigamit/boxeehack,vLBrian/boxeehack-cigamit,vLBrian/boxeehack-cigamit | python | ## Code Before:
import os,mc
import xbmc, xbmcgui
def fanart_function():
if mc.ShowDialogConfirm("Clear fanart cache", "Are you sure you want to clear the fanart cache?", "Cancel", "OK"):
pass
def thumbnail_function():
if mc.ShowDialogConfirm("Clear thumbnail cache", "Are you sure you want to clear th... |
daed42ff845baa2abf1e0fd180d7fb0eb2a13b3d | lib/cli/file-set-pipeline/log.js | lib/cli/file-set-pipeline/log.js | /**
* @author Titus Wormer
* @copyright 2015 Titus Wormer
* @license MIT
* @module mdast:cli:log
* @fileoverview Log a file context on successful completion.
*/
'use strict';
/*
* Dependencies.
*/
var report = require('vfile-reporter');
/**
* Output diagnostics to stdout(4) or stderr(4).
*
* @param {CLI}... | /**
* @author Titus Wormer
* @copyright 2015 Titus Wormer
* @license MIT
* @module mdast:cli:log
* @fileoverview Log a file context on successful completion.
*/
'use strict';
/*
* Dependencies.
*/
var report = require('vfile-reporter');
/**
* Output diagnostics to stdout(4) or stderr(4).
*
* @param {CLI}... | Move all info output of mdast(1) to stderr(4) | Move all info output of mdast(1) to stderr(4)
This changes moves all reporting output, even when not including
failure messages, from stout(4) to stderr(4).
Thus, when piping only stdout(4) from mdast(1) into a file, only
the markdown is written.
Closes GH-47.
| JavaScript | mit | ulrikaugustsson/mdast,eush77/remark,chcokr/mdast,ulrikaugustsson/mdast,yukkurisinai/mdast,tanzania82/remarks,yukkurisinai/mdast,wooorm/remark,chcokr/mdast,eush77/remark | javascript | ## Code Before:
/**
* @author Titus Wormer
* @copyright 2015 Titus Wormer
* @license MIT
* @module mdast:cli:log
* @fileoverview Log a file context on successful completion.
*/
'use strict';
/*
* Dependencies.
*/
var report = require('vfile-reporter');
/**
* Output diagnostics to stdout(4) or stderr(4).
*... |
5d47dbf281b2666aedbdc2ad1bc93514faeb7f7f | _events/2018-04-21-bike-prom.md | _events/2018-04-21-bike-prom.md | ---
title: "Comic Bike Prom"
published: true
excerpt: "Calling all heroes, toons and loons! This year's Bike Prom is all about you."
skip-title: false
image:
feature: prom-comic-cover.jpg
skip-title: false
facebook-event: 184868962283576
plasso-event: KCD4VKGYnv
---
**Saturday April 21st** at [The Phoenix Ale Brewe... | ---
title: "Comic Bike Prom"
published: true
excerpt: "Calling all heroes, toons and loons! This year's Bike Prom is all about you."
skip-title: false
image:
feature: prom-comic-cover.jpg
skip-title: false
facebook-event: 184868962283576
plasso-event: KCD4VKGYnv
---
**Saturday April 21st** at [The Phoenix Ale Brewe... | Clarify coupon location for members | Clarify coupon location for members
| Markdown | mit | phoenixspokespeople/phoenixspokespeople.github.io,phoenixspokespeople/phoenixspokespeople.github.io,phoenixspokespeople/phoenixspokespeople.github.io | markdown | ## Code Before:
---
title: "Comic Bike Prom"
published: true
excerpt: "Calling all heroes, toons and loons! This year's Bike Prom is all about you."
skip-title: false
image:
feature: prom-comic-cover.jpg
skip-title: false
facebook-event: 184868962283576
plasso-event: KCD4VKGYnv
---
**Saturday April 21st** at [The P... |
e8034eb5a2e48453728bb1a182588a6dffa2b08a | problems/0001-0025/0001-multiples-of-3-and-5/main.c | problems/0001-0025/0001-multiples-of-3-and-5/main.c |
unsigned int count_divisibility(unsigned int divisor) {
int count = 0;
for ( int i = 1 ; i < RANGE ; i++ ) {
if ( i % divisor == 0 ) {
count++;
}
}
return count;
}
// Use the identity n(n+1)/2 to calculate the sum
unsigned int calculate_divisibility_sum(unsigned int numbe... |
unsigned short count_divisibility(unsigned short divisor) {
int count = 0;
count = (RANGE - 1) / divisor;
return count;
}
// Use the identity n(n+1)/2 to calculate the sum
unsigned int calculate_divisibility_sum(unsigned short number, unsigned short count) {
unsigned int divisibility_sum = 0;
d... | Refactor Problem 1's solution in C | Refactor Problem 1's solution in C
My logic failed me and I noticed that I just need to divide 1000 by
the number to get the amount of divisible numbers. -_- That's why I
removed the for-loop.
Changed the datatype for some of the functions and arguments,
because `short int` is sufficient enough to store the values.
| C | mit | pho1n1x/eulerian-insanity | c | ## Code Before:
unsigned int count_divisibility(unsigned int divisor) {
int count = 0;
for ( int i = 1 ; i < RANGE ; i++ ) {
if ( i % divisor == 0 ) {
count++;
}
}
return count;
}
// Use the identity n(n+1)/2 to calculate the sum
unsigned int calculate_divisibility_sum(un... |
e4b2a65cc6561da6797d26ec22326a0f301504d7 | .drone.yml | .drone.yml | pipeline:
test:
image: presslabs/silver
pull: true
environment:
- SILVER_DB_ENGINE=django.db.backends.mysql
- SILVER_DB_NAME=test_db
- SILVER_DB_HOST=127.0.0.1
- SILVER_DB_USER=silver
- SILVER_DB_PASSWORD=silver
commands:
- make dependencies
- mkdir /var/log/s... | pipeline:
test:
image: presslabs/silver
pull: true
environment:
- SILVER_DB_ENGINE=django.db.backends.mysql
- SILVER_DB_NAME=test_db
- SILVER_DB_HOST=mysql
- SILVER_DB_USER=silver
- SILVER_DB_PASSWORD=silver
commands:
- make dependencies
- mkdir /var/log/silve... | Use mysql host instead of 127.0.0.1 | Use mysql host instead of 127.0.0.1
| YAML | apache-2.0 | PressLabs/silver,PressLabs/silver,PressLabs/silver | yaml | ## Code Before:
pipeline:
test:
image: presslabs/silver
pull: true
environment:
- SILVER_DB_ENGINE=django.db.backends.mysql
- SILVER_DB_NAME=test_db
- SILVER_DB_HOST=127.0.0.1
- SILVER_DB_USER=silver
- SILVER_DB_PASSWORD=silver
commands:
- make dependencies
- ... |
0d9f44cb56afd589e19e7a6010f67ff1e32230e9 | .travis.yml | .travis.yml | language: ruby
rvm:
- 1.8.7
- 1.9.3
## Don't test 1.9.2 because people shouldn't be using it.
# - 1.9.2
## Don't test REE because it's compatible enough with 1.8.7.
# - ree
## JRuby is not compatible, see Gemfile for details.
# - jruby-18mode
# - jruby-19mode
# - jruby-head
## Rubinius is not ... | language: ruby
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
## Don't test 1.9.2 because people shouldn't be using it.
# - 1.9.2
## Don't test REE because it's compatible enough with 1.8.7.
# - ree
## JRuby is not compatible, see Gemfile for details.
# - jruby-18mode
# - jruby-19mode
# - jruby-head
## Rubini... | Add Ruby 2.0.0 to Travis config | Add Ruby 2.0.0 to Travis config | YAML | mit | kerrizor/calagator,Eugator-Wranglers/calagator,Villag/dentonator,shawnacscott/calagator,CorainChicago/ActivateHub,nblackburn87/calagator,cp/calagator-1,reidab/calagator,dudleysr/calagator-workspace,bencornelis/calagator,CorainChicago/ActivateHub,kerrizor/calagator,iamBalaji/Calagator,L2-D2/calagator,iamBalaji/Calagator... | yaml | ## Code Before:
language: ruby
rvm:
- 1.8.7
- 1.9.3
## Don't test 1.9.2 because people shouldn't be using it.
# - 1.9.2
## Don't test REE because it's compatible enough with 1.8.7.
# - ree
## JRuby is not compatible, see Gemfile for details.
# - jruby-18mode
# - jruby-19mode
# - jruby-head
## ... |
a2e3f0590d5bd25993be5291c058c722896aa773 | tests/test_utils.py | tests/test_utils.py | import sys
import unittest
import numpy as np
import torch
sys.path.append("../metal")
from metal.utils import (
rargmax,
hard_to_soft,
recursive_merge_dicts
)
class UtilsTest(unittest.TestCase):
def test_rargmax(self):
x = np.array([2, 1, 2])
self.assertEqual(sorted(list(set(rargmax(... | import sys
import unittest
import numpy as np
import torch
sys.path.append("../metal")
from metal.utils import (
rargmax,
hard_to_soft,
recursive_merge_dicts
)
class UtilsTest(unittest.TestCase):
def test_rargmax(self):
x = np.array([2, 1, 2])
np.random.seed(1)
self.assertEqua... | Fix broken utils test with seed | Fix broken utils test with seed
| Python | apache-2.0 | HazyResearch/metal,HazyResearch/metal | python | ## Code Before:
import sys
import unittest
import numpy as np
import torch
sys.path.append("../metal")
from metal.utils import (
rargmax,
hard_to_soft,
recursive_merge_dicts
)
class UtilsTest(unittest.TestCase):
def test_rargmax(self):
x = np.array([2, 1, 2])
self.assertEqual(sorted(l... |
bd4de9bf5015c5d9c3c36573213caf07570a13bb | src/reducers/authentication.js | src/reducers/authentication.js | import { REHYDRATE } from 'redux-persist/constants'
import * as ACTION_TYPES from '../constants/action_types'
const initialState = {
isLoggedIn: false,
accessToken: null,
tokenType: null,
expiresIn: null,
createdAt: null,
refreshTimeoutId: null,
}
export function authentication(state = initialState, actio... | import { REHYDRATE } from 'redux-persist/constants'
import * as ACTION_TYPES from '../constants/action_types'
const initialState = {
isLoggedIn: false,
accessToken: null,
tokenType: null,
expiresIn: null,
createdAt: null,
refreshToken: null,
refreshTimeoutId: null,
}
export function authentication(state... | Make sure refreshToken is included in initialState | Make sure refreshToken is included in initialState
| JavaScript | mit | ello/webapp,ello/webapp,ello/webapp | javascript | ## Code Before:
import { REHYDRATE } from 'redux-persist/constants'
import * as ACTION_TYPES from '../constants/action_types'
const initialState = {
isLoggedIn: false,
accessToken: null,
tokenType: null,
expiresIn: null,
createdAt: null,
refreshTimeoutId: null,
}
export function authentication(state = ini... |
a144f3558bce99f82c1ab53e09f833b505255e1b | examples/deploy.rb | examples/deploy.rb | set :application, "asb"
# create a pseudo terminal for every command, otherwise SSH/SVN breaks
#default_run_options[:pty] = true
# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
#set :deploy_to, "/pa... | set :application, "application"
# create a pseudo terminal for every command, otherwise SSH/SVN breaks
#default_run_options[:pty] = true
# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
#set :deploy_... | Update to generic application name | Update to generic application name
| Ruby | mit | auser/sprinkle,cpatil/sprinkle-cp,saimonmoore/sprinkle,sprinkle-tool/sprinkle,crafterm/sprinkle,jsierles/sprinkle,enterprisecloud/sprinkle,joerichsen/sprinkle,sprinkle-tool/sprinkle | ruby | ## Code Before:
set :application, "asb"
# create a pseudo terminal for every command, otherwise SSH/SVN breaks
#default_run_options[:pty] = true
# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
#set ... |
a74df2e0294de9f58a3632468d55277804a2cd4b | config/initializers/omniauth.rb | config/initializers/omniauth.rb | OmniAuth.config.logger = Rails.logger
Rails.application.config.middleware.use OmniAuth::Builder do
provider :google_oauth2, ENV['GOOGLE_KEY'], ENV['GOOGLE_SECRET'],
{
prompt: "select_account",
image_aspect_ratio: "square",
# we're displaying at 80 pixels, this is for high density ("Retina") displays
... | OmniAuth.config.logger = Rails.logger
Rails.application.config.middleware.use OmniAuth::Builder do
provider :google_oauth2, ENV['GOOGLE_KEY'], ENV['GOOGLE_SECRET'],
{
prompt: "select_account",
image_aspect_ratio: "square",
# we're displaying at 80 pixels, this is for high density ("Retina") displays
... | Allow restrictions to login by specific domain. | Allow restrictions to login by specific domain. | Ruby | mit | orientation/orientation,hashrocket/orientation,cmckni3/orientation,orientation/orientation,splicers/orientation,splicers/orientation,liufffan/orientation,robomc/orientation,splicers/orientation,cmckni3/orientation,twinn/orientation,robomc/orientation,liufffan/orientation,hashrocket/orientation,orientation/orientation,c... | ruby | ## Code Before:
OmniAuth.config.logger = Rails.logger
Rails.application.config.middleware.use OmniAuth::Builder do
provider :google_oauth2, ENV['GOOGLE_KEY'], ENV['GOOGLE_SECRET'],
{
prompt: "select_account",
image_aspect_ratio: "square",
# we're displaying at 80 pixels, this is for high density ("Reti... |
29cc8ee571fe200ce5c46bcbbd530a4c88e76c2c | falco.yaml | falco.yaml | rules_file: /etc/falco_rules.yaml
# Whether to output events in json or text
json_output: false
# Send information logs to stderr and/or syslog Note these are *not* security
# notification logs! These are just Falco lifecycle (and possibly error) logs.
log_stderr: true
log_syslog: true
# Where security notification... | rules_file: /etc/falco_rules.yaml
# Whether to output events in json or text
json_output: false
# Send information logs to stderr and/or syslog Note these are *not* security
# notification logs! These are just Falco lifecycle (and possibly error) logs.
log_stderr: true
log_syslog: true
# Where security notification... | Add notes on how to post to slack webhooks. | Add notes on how to post to slack webhooks.
Add comments for program_output that show how to post to a slack webhook
and an alernate logging method--came up in one of the github issues.
| YAML | apache-2.0 | draios/falco,draios/falco,draios/falco,draios/falco,draios/falco,draios/falco,draios/falco,draios/falco | yaml | ## Code Before:
rules_file: /etc/falco_rules.yaml
# Whether to output events in json or text
json_output: false
# Send information logs to stderr and/or syslog Note these are *not* security
# notification logs! These are just Falco lifecycle (and possibly error) logs.
log_stderr: true
log_syslog: true
# Where secur... |
885a88779b231c2e1ec43252120c5f9d26f9cefb | server/routes/admin.coffee | server/routes/admin.coffee | express = require 'express'
compress = require 'compression'
hbs = require 'hbs'
config = require '../config'
passport = require '../lib/auth'
User = require '../models/user'
module.exports = app = express()
hbs.registerHelper 'json', (context) ->
new hbs.handlebars.SafeString JSON.stringify(context)
app.set 'vie... | express = require 'express'
compress = require 'compression'
hbs = require 'hbs'
config = require '../config'
passport = require '../lib/auth'
User = require '../models/user'
module.exports = app = express()
hbs.registerHelper 'json', (context) ->
new hbs.handlebars.SafeString JSON.stringify(context)
app.set 'vie... | Set cache headers for statics | Set cache headers for statics
| CoffeeScript | agpl-3.0 | edolyne/buckets,dut3062796s/buckets,mamute/buckets,edolyne/buckets,asm-products/buckets,edolyne/hive,asm-products/buckets,bucketsio/buckets,dut3062796s/buckets,nishant8BITS/buckets,artelse/buckets,edolyne/hive,mikesmithmsm/buckets,artelse/buckets,bucketsio/buckets,mamute/buckets,nishant8BITS/buckets,mikesmithmsm/bucket... | coffeescript | ## Code Before:
express = require 'express'
compress = require 'compression'
hbs = require 'hbs'
config = require '../config'
passport = require '../lib/auth'
User = require '../models/user'
module.exports = app = express()
hbs.registerHelper 'json', (context) ->
new hbs.handlebars.SafeString JSON.stringify(contex... |
d6ed59d0a62813297c26c5a033aea5cbc985b0a6 | app/views/user/show.html.slim | app/views/user/show.html.slim | h1 Profile for #{@user.name}
=@user.inspect | h1 Profile for #{@user.name}
.summary-section
.grid-row
.column-one-third Name
.column-two-thirds =@user.name
.grid-row
.column-one-third Leave year starts
.column-two-thirds #{Date::MONTHNAMES[@user.start_month]} #{@user.start_day.ordinalize}
=link_to 'Edit user', edit_user_path(@user) if policy(... | Update show user to display useful data | Update show user to display useful data
| Slim | mit | CeeBeeUK/track-leave,CeeBeeUK/track-leave,CeeBeeUK/track-leave | slim | ## Code Before:
h1 Profile for #{@user.name}
=@user.inspect
## Instruction:
Update show user to display useful data
## Code After:
h1 Profile for #{@user.name}
.summary-section
.grid-row
.column-one-third Name
.column-two-thirds =@user.name
.grid-row
.column-one-third Leave year starts
.column-tw... |
b39d757ec9bad1467705900bba2f3f815f8a8d1d | test/functional/test_starscope.rb | test/functional/test_starscope.rb | require File.expand_path('../../test_helper', __FILE__)
class TestStarScope < Minitest::Test
BASE = "bundle exec bin/starscope --quiet"
EXTRACT = "#{BASE} --no-read --no-write ./test/fixtures"
def test_help
`#{BASE} -h`.each_line do |line|
assert line.length <= 80
end
end
def test_version
... | require File.expand_path('../../test_helper', __FILE__)
class TestStarScope < Minitest::Test
BASE = "bundle exec bin/starscope --quiet"
EXTRACT = "#{BASE} --no-read --no-write ./test/fixtures"
def test_help
`#{BASE} -h`.each_line do |line|
assert line.length <= 80
end
end
def test_version
... | Make test_summary actually test something | Make test_summary actually test something
Also use better assertions, generally
| Ruby | mit | melong007/starscope,guilherme/starscope,eapache/starscope | ruby | ## Code Before:
require File.expand_path('../../test_helper', __FILE__)
class TestStarScope < Minitest::Test
BASE = "bundle exec bin/starscope --quiet"
EXTRACT = "#{BASE} --no-read --no-write ./test/fixtures"
def test_help
`#{BASE} -h`.each_line do |line|
assert line.length <= 80
end
end
def... |
10bf74d885c116638631beb94c00d85dfe220e5e | build-images.sh | build-images.sh |
VERSION=0.1.0
# Build the binaries
docker run --rm -v $PWD:/go/src/github.com/Boostport/kubernetes-vault -w /go/src/github.com/Boostport/kubernetes-vault golang:1.7-alpine ./build.sh
# Build the images
docker build -t boostport/kubernetes-vault:$VERSION service/
docker build -t boostport/kubernetes-vault-init:$VERSI... |
VERSION=0.1.0
# Build the binaries
docker run --rm -v $PWD:/go/src/github.com/Boostport/kubernetes-vault -w /go/src/github.com/Boostport/kubernetes-vault golang:1.7-alpine ./build.sh
# Build the images
docker build -t boostport/kubernetes-vault:$VERSION service/
docker build -t boostport/kubernetes-vault-init:$VERSI... | Fix build script to build sample-app image. | Fix build script to build sample-app image.
| Shell | apache-2.0 | Boostport/kubernetes-vault,JulianWei/kubernetes-vault,Boostport/kubernetes-vault,JulianWei/kubernetes-vault | shell | ## Code Before:
VERSION=0.1.0
# Build the binaries
docker run --rm -v $PWD:/go/src/github.com/Boostport/kubernetes-vault -w /go/src/github.com/Boostport/kubernetes-vault golang:1.7-alpine ./build.sh
# Build the images
docker build -t boostport/kubernetes-vault:$VERSION service/
docker build -t boostport/kubernetes-v... |
469c343f6d062140047732004bd7ff45e933bea6 | lib/stoplight.rb | lib/stoplight.rb |
require 'stoplight/color'
require 'stoplight/error'
require 'stoplight/failure'
require 'stoplight/state'
require 'stoplight/data_store'
require 'stoplight/data_store/base'
require 'stoplight/data_store/memory'
require 'stoplight/data_store/redis'
require 'stoplight/notifier'
require 'stoplight/notifier/base'
requir... |
module Stoplight
end
require 'stoplight/color'
require 'stoplight/error'
require 'stoplight/failure'
require 'stoplight/state'
require 'stoplight/data_store'
require 'stoplight/data_store/base'
require 'stoplight/data_store/memory'
require 'stoplight/data_store/redis'
require 'stoplight/notifier'
require 'stoplight... | Define the module before anything else | Define the module before anything else
I think it makes more sense this way. The entry point defines the
module, then it loads all the files that populate the module.
| Ruby | mit | bolshakov/stoplight,orgsync/stoplight | ruby | ## Code Before:
require 'stoplight/color'
require 'stoplight/error'
require 'stoplight/failure'
require 'stoplight/state'
require 'stoplight/data_store'
require 'stoplight/data_store/base'
require 'stoplight/data_store/memory'
require 'stoplight/data_store/redis'
require 'stoplight/notifier'
require 'stoplight/notif... |
b364e435c3906ef0800cce92a388b6306574d7e7 | atlas-api/src/main/java/org/atlasapi/output/annotation/SeriesSummaryAnnotation.java | atlas-api/src/main/java/org/atlasapi/output/annotation/SeriesSummaryAnnotation.java | package org.atlasapi.output.annotation;
import org.atlasapi.content.Content;
import org.atlasapi.content.Episode;
import org.atlasapi.output.FieldWriter;
import org.atlasapi.output.OutputContext;
import org.atlasapi.output.writers.SeriesSummaryWriter;
import java.io.IOException;
import static com.google.common.base.... | package org.atlasapi.output.annotation;
import org.atlasapi.content.Content;
import org.atlasapi.content.Episode;
import org.atlasapi.output.FieldWriter;
import org.atlasapi.output.OutputContext;
import org.atlasapi.output.writers.SeriesSummaryWriter;
import java.io.IOException;
import static com.google.common.base.... | Write series summary in correct field. | Write series summary in correct field.
| Java | apache-2.0 | atlasapi/atlas-deer,atlasapi/atlas-deer | java | ## Code Before:
package org.atlasapi.output.annotation;
import org.atlasapi.content.Content;
import org.atlasapi.content.Episode;
import org.atlasapi.output.FieldWriter;
import org.atlasapi.output.OutputContext;
import org.atlasapi.output.writers.SeriesSummaryWriter;
import java.io.IOException;
import static com.goo... |
63bd4ffd567ed43e4449987e954d66d2ad00aaff | vlad-extras.gemspec | vlad-extras.gemspec | $:.push File.expand_path("../lib", __FILE__)
require "vlad-extras/version"
Gem::Specification.new do |s|
s.name = "vlad-extras"
s.version = VladExtras::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Dennis Reimann"]
s.email = ["mail@dennisreimann.de"]
s.homepage = "http:/... | $:.push File.expand_path("../lib", __FILE__)
require "vlad-extras/version"
Gem::Specification.new do |s|
s.name = "vlad-extras"
s.version = VladExtras::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Dennis Reimann"]
s.email = ["mail@dennisreimann.de"]
s.homepage = "http:/... | Update dependencies specs to allow the upmost versions of vlad and rake-remote_task | Update dependencies specs to allow the upmost versions of vlad and rake-remote_task
| Ruby | mit | dennisreimann/vlad-extras | ruby | ## Code Before:
$:.push File.expand_path("../lib", __FILE__)
require "vlad-extras/version"
Gem::Specification.new do |s|
s.name = "vlad-extras"
s.version = VladExtras::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Dennis Reimann"]
s.email = ["mail@dennisreimann.de"]
s.homep... |
0b82e2fcbe7882b1a75c6aa2250c51dda3963605 | app/controllers/spaces_controller.rb | app/controllers/spaces_controller.rb | class SpacesController < ApplicationController
def index
@dojo_count = Dojo.count
@regions_and_dojos = Dojo.eager_load(:prefecture).default_order.group_by { |dojo| dojo.prefecture.region }
end
end
| class SpacesController < ApplicationController
def index
@dojo_count = Dojo.count
@regions_and_dojos = Dojo.group_by_region
end
end
| Use a class method instead | Use a class method instead
| Ruby | mit | yasslab/coderdojo.jp,coderdojo-japan/coderdojo.jp,coderdojo-japan/coderdojo.jp,coderdojo-japan/coderdojo.jp,coderdojo-japan/coderdojo.jp,yasslab/coderdojo.jp,yasslab/coderdojo.jp | ruby | ## Code Before:
class SpacesController < ApplicationController
def index
@dojo_count = Dojo.count
@regions_and_dojos = Dojo.eager_load(:prefecture).default_order.group_by { |dojo| dojo.prefecture.region }
end
end
## Instruction:
Use a class method instead
## Code After:
class SpacesController < App... |
62920beb75142a65441906731b1c832545b7c408 | .github/workflows/tests-ubuntu.yml | .github/workflows/tests-ubuntu.yml | name: Ubuntu Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 9 * * 4'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: pip install -r requirements.txt ; pip freeze
- nam... | name: Ubuntu Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 9 * * 4'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: pip install --upgrade -r requirements.txt ; pip freeze... | Upgrade packages if they are already installed | Upgrade packages if they are already installed
| YAML | mit | chubin/cheat.sh,chubin/cheat.sh,chubin/cheat.sh,chubin/cheat.sh | yaml | ## Code Before:
name: Ubuntu Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 9 * * 4'
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: pip install -r requirements.txt ; pip ... |
b0fa93c14285f0f28697f408e4c3c452ee6b3a5b | src/main/java/io/javalin/DataClasses.kt | src/main/java/io/javalin/DataClasses.kt | /*
* Javalin - https://javalin.io
* Copyright 2017 David Åse
* Licensed under Apache 2.0: https://github.com/tipsy/javalin/blob/master/LICENSE
*/
package io.javalin
import java.io.InputStream
/**
* Description of a file uploaded as a multipart content
* @see Context.uploadedFile
* @see <a href="https://javali... | /*
* Javalin - https://javalin.io
* Copyright 2017 David Åse
* Licensed under Apache 2.0: https://github.com/tipsy/javalin/blob/master/LICENSE
*/
package io.javalin
import java.io.InputStream
/**
* Data class containing the content and meta-info of an uploaded file.
* [contentType]: the content-type passed by ... | Update javadoc for data classes | [javadoc] Update javadoc for data classes
| Kotlin | apache-2.0 | tipsy/javalin,tipsy/javalin,tipsy/javalin,tipsy/javalin | kotlin | ## Code Before:
/*
* Javalin - https://javalin.io
* Copyright 2017 David Åse
* Licensed under Apache 2.0: https://github.com/tipsy/javalin/blob/master/LICENSE
*/
package io.javalin
import java.io.InputStream
/**
* Description of a file uploaded as a multipart content
* @see Context.uploadedFile
* @see <a href... |
20348f96f45a91fd1324e01c36255207cb860ee6 | s2c11.pl | s2c11.pl |
use strict;
use warnings;
use MarksStuff qw( encrypt_aes_128_random_mode hamming_distance );
my @ptext = ();
for (0 .. 47) {
push @ptext, ord('a');
}
my @ctext = encrypt_aes_128_random_mode(\@ptext);
my @block1 = @ctext[16 .. 31];
my @block2 = @ctext[32 .. 47];
my $hamming_dist = hamming_distance(\@block1, \@blo... |
use strict;
use warnings;
use MarksStuff qw( encrypt_aes_128_random_mode hamming_distance );
my @ptext = map(ord('a'), 0 .. 47);
my @ctext = encrypt_aes_128_random_mode(\@ptext);
my @block1 = @ctext[16 .. 31];
my @block2 = @ctext[32 .. 47];
my $hamming_dist = hamming_distance(\@block1, \@block2);
if ($hamming_dist... | Convert a clumsy for loop to initialize a list to a simple map function. | Convert a clumsy for loop to initialize a list to a simple map function.
| Perl | apache-2.0 | markkawika/matasano-perl | perl | ## Code Before:
use strict;
use warnings;
use MarksStuff qw( encrypt_aes_128_random_mode hamming_distance );
my @ptext = ();
for (0 .. 47) {
push @ptext, ord('a');
}
my @ctext = encrypt_aes_128_random_mode(\@ptext);
my @block1 = @ctext[16 .. 31];
my @block2 = @ctext[32 .. 47];
my $hamming_dist = hamming_distance... |
a4ce147a06218afbdeaeacea84526b0dd31ff59b | towel_bootstrap/templates/modelview/object_editfields.html | towel_bootstrap/templates/modelview/object_editfields.html | {% load i18n towel_form_tags verbose_name_tags %}
<form method="post" action="{{ object.urls.editfields }}" enctype="multipart/form-data">
{% csrf_token %}
{% for field in editfields %}<input type="hidden" name="_edit" value="{{ field }}">
{% endfor %}
{% form_errors form formsets %}
{% form_warnings form %}... | {% load i18n towel_form_tags verbose_name_tags %}
<form method="post" action="{{ object.urls.editfields }}" enctype="multipart/form-data">
{% csrf_token %}
{% for field in editfields %}<input type="hidden" name="_edit" value="{{ field }}">
{% endfor %}
{% form_errors form %}
{% form_warnings form %}
{% for... | Remove the broken formsets editfields support | Remove the broken formsets editfields support
| HTML | bsd-3-clause | matthiask/towel-bootstrap,matthiask/towel-bootstrap,matthiask/towel-foundation,matthiask/towel-bootstrap,matthiask/towel-foundation,matthiask/towel-foundation | html | ## Code Before:
{% load i18n towel_form_tags verbose_name_tags %}
<form method="post" action="{{ object.urls.editfields }}" enctype="multipart/form-data">
{% csrf_token %}
{% for field in editfields %}<input type="hidden" name="_edit" value="{{ field }}">
{% endfor %}
{% form_errors form formsets %}
{% form_... |
433f5964f2d7e97bc60e85b235afb01a43cd3272 | ruby/kata/game_test.rb | ruby/kata/game_test.rb | require 'test/unit'
require_relative 'game'
class GameTest < Test::Unit::TestCase
def test_gutter_game
game = Game.new
20.times do
game.roll(0)
end
assert_equal 0, game.score
end
def test_all_ones
game = Game.new
20.times do
game.roll(1)
end
assert_equal 20, game.sc... | require 'test/unit'
require_relative 'game'
class GameTest < Test::Unit::TestCase
def setup
@game = Game.new
end
def roll_many(n, pins)
n.times do
@game.roll(pins)
end
end
def test_gutter_game
setup
roll_many(20, 0)
assert_equal 0, @game.score
end
def test_all_ones
... | Refactor test to extract duplicate code | Refactor test to extract duplicate code
| Ruby | mit | darkrodry/3languages2months,darkrodry/3languages2months,darkrodry/3languages2months,darkrodry/3languages2months | ruby | ## Code Before:
require 'test/unit'
require_relative 'game'
class GameTest < Test::Unit::TestCase
def test_gutter_game
game = Game.new
20.times do
game.roll(0)
end
assert_equal 0, game.score
end
def test_all_ones
game = Game.new
20.times do
game.roll(1)
end
assert_e... |
4df12abc2da59a1c6baee7cf79dd05a746f158a4 | v2/pubsub-binary-to-bigquery/README.md | v2/pubsub-binary-to-bigquery/README.md |
A collection of Dataflow Flex Templates to stream binary objects (Avro, Proto
etc.) from Pub/Sub to BigQuery.
* [Pub/Sub Avro to BigQuery](docs/PubSubAvroToBigQuery/README.md)
* [Pub/Sub Protobuf to BigQuery](docs/PubSubProtoToBigQuery/README.md)
(Unreleased)
Please refer to the links above for more details ... |
A collection of Dataflow Flex Templates to stream binary objects (Avro, Proto
etc.) from Pub/Sub to BigQuery.
* [Pub/Sub Avro to BigQuery](docs/PubSubAvroToBigQuery/README.md)
* [Pub/Sub Protobuf to BigQuery](docs/PubSubProtoToBigQuery/README.md)
Please refer to the links above for more details on the specific t... | Remove "unreleased" from Pub/Sub Proto to BigQuery | Remove "unreleased" from Pub/Sub Proto to BigQuery
This template is in the process of being rolled and no longer "unreleased" for some regions.
PiperOrigin-RevId: 423084579
| Markdown | apache-2.0 | GoogleCloudPlatform/DataflowTemplates,GoogleCloudPlatform/DataflowTemplates,GoogleCloudPlatform/DataflowTemplates,GoogleCloudPlatform/DataflowTemplates | markdown | ## Code Before:
A collection of Dataflow Flex Templates to stream binary objects (Avro, Proto
etc.) from Pub/Sub to BigQuery.
* [Pub/Sub Avro to BigQuery](docs/PubSubAvroToBigQuery/README.md)
* [Pub/Sub Protobuf to BigQuery](docs/PubSubProtoToBigQuery/README.md)
(Unreleased)
Please refer to the links above f... |
72a1f4c697097803ffc8ab096d0bcb879cbe0cd8 | README.md | README.md | PyScanClient
============
A collaboratively developed Python/Jython Scan Server Client.
Version Info
------------
See https://github.com/PythonScanClient/PyScanClient/blob/master/scan/version.py
Documentation
-------------
For snapshot, see http://ics-web.sns.ornl.gov/css/PyScanClient
Based on sphinx, http://sphin... | PyScanClient
============
A collaboratively developed Python/Jython Scan Server Client.
Version Info
------------
See https://github.com/PythonScanClient/PyScanClient/blob/master/scan/version.py
Documentation
-------------
For latest snapshot of documentation, see http://ics-web.sns.ornl.gov/css/PyScanClient
To bu... | Clarify that snapshot link is for _doc_ | Readme: Clarify that snapshot link is for _doc_ | Markdown | epl-1.0 | PythonScanClient/PyScanClient,PythonScanClient/PyScanClient | markdown | ## Code Before:
PyScanClient
============
A collaboratively developed Python/Jython Scan Server Client.
Version Info
------------
See https://github.com/PythonScanClient/PyScanClient/blob/master/scan/version.py
Documentation
-------------
For snapshot, see http://ics-web.sns.ornl.gov/css/PyScanClient
Based on sphi... |
6ec397b662377686a13eb5863be4561ac7d84cca | DEVELOPING.md | DEVELOPING.md | Developing
==========
Setup
-----
To build from a fresh checkout:
./autogen.sh
./configure
make
Editing
-------
Use these Vim settings for the correct indention and formatting:
```
setlocal sw=0 ts=8 noet
setlocal cinoptions=:0,t0,+4,(4
```
Release
-------
1. Update the version in `configure.ac`:
... | Developing
==========
Setup
-----
To build from a fresh checkout:
./autogen.sh
./configure
make
Editing
-------
Use these Vim settings for the correct indention and formatting:
```
setlocal sw=0 ts=8 noet
setlocal cinoptions=:0,t0,+4,(4
```
Release
-------
1. Update the version in `configure.ac`:
... | Add a list of package maintainers | Add a list of package maintainers
| Markdown | mit | prahlad37/pick,prahlad37/pick,calleerlandsson/pick,DBOTW/pick,thoughtbot/pick,thoughtbot/pick,thoughtbot/pick,DBOTW/pick,prahlad37/pick,calleerlandsson/pick,DBOTW/pick,thoughtbot/pick,calleerlandsson/pick,prahlad37/pick | markdown | ## Code Before:
Developing
==========
Setup
-----
To build from a fresh checkout:
./autogen.sh
./configure
make
Editing
-------
Use these Vim settings for the correct indention and formatting:
```
setlocal sw=0 ts=8 noet
setlocal cinoptions=:0,t0,+4,(4
```
Release
-------
1. Update the version in `c... |
b33c1b70bcb7a5303c1731cb6699466610ee54af | pyedgar/__init__.py | pyedgar/__init__.py |
__title__ = 'pyedgar'
__version__ = '0.0.3a1'
__author__ = 'Mac Gaulin'
__license__ = 'MIT'
__copyright__ = 'Copyright 2018 Mac Gaulin'
# Include top level modules
from . import filing
from . import downloader
# Include sub-modules
from . import utilities
from . import exceptions
from .exceptions import (InputTypeE... |
__title__ = 'pyedgar'
__version__ = '0.0.4a1'
__author__ = 'Mac Gaulin'
__license__ = 'MIT'
__copyright__ = 'Copyright 2018 Mac Gaulin'
# Include sub-modules
from . import utilities
from . import exceptions
from .exceptions import (InputTypeError, WrongFormType,
NoFormTypeFound, NoCIKFound)
... | Remove top level imports to avoid cyclical import | Remove top level imports to avoid cyclical import
| Python | mit | gaulinmp/pyedgar | python | ## Code Before:
__title__ = 'pyedgar'
__version__ = '0.0.3a1'
__author__ = 'Mac Gaulin'
__license__ = 'MIT'
__copyright__ = 'Copyright 2018 Mac Gaulin'
# Include top level modules
from . import filing
from . import downloader
# Include sub-modules
from . import utilities
from . import exceptions
from .exceptions im... |
13af72430a3963ae7e26f3d39d8671ee45afab51 | app/api/adminapi.js | app/api/adminapi.js | 'use strict';
const Boom = require('boom');
const User = require('../models/user');
const Tweet = require('../models/tweet');
const utils = require('./utils.js');
const _ = require('lodash');
exports.deleteMultipleTweets = {
auth: {
strategy: 'jwt',
scope: 'admin',
},
handler: function (request, reply... | 'use strict';
const Boom = require('boom');
const User = require('../models/user');
const Tweet = require('../models/tweet');
const utils = require('./utils.js');
const _ = require('lodash');
exports.deleteMultipleTweets = {
auth: {
strategy: 'jwt',
scope: 'admin',
},
handler: function (request, reply... | Implement admin bulk tweet deletion | Implement admin bulk tweet deletion
| JavaScript | mit | FritzFlorian/true-parrot,FritzFlorian/true-parrot | javascript | ## Code Before:
'use strict';
const Boom = require('boom');
const User = require('../models/user');
const Tweet = require('../models/tweet');
const utils = require('./utils.js');
const _ = require('lodash');
exports.deleteMultipleTweets = {
auth: {
strategy: 'jwt',
scope: 'admin',
},
handler: function... |
9a76f1756ff77ea9dedb0a7c9b6ba5d00f47cf64 | src/js/providers/10minutemail/content.js | src/js/providers/10minutemail/content.js | let element = document.getElementById('addyForm:addressSelect')
if (element) {
chrome.runtime.sendMessage({
type: 'found',
value: element.value
})
}
| let element = document.getElementById('addyForm:addressSelect')
if (element) {
chrome.runtime.sendMessage({
type: 'found',
value: element.value
})
}
chrome.storage.sync.get('10minutemail--auto-renew', (response) => {
if (response['10minutemail--auto-renew'] === true) {
console.log('setting timeout')
... | Add auto-renew functionality to 10minutemail | Add auto-renew functionality to 10minutemail
| JavaScript | mit | denizdogan/chrome-extension-temporary-email | javascript | ## Code Before:
let element = document.getElementById('addyForm:addressSelect')
if (element) {
chrome.runtime.sendMessage({
type: 'found',
value: element.value
})
}
## Instruction:
Add auto-renew functionality to 10minutemail
## Code After:
let element = document.getElementById('addyForm:addressSelect')
i... |
41822af0366c190d185ee7bae87990fe81f046c0 | app/models/facet.rb | app/models/facet.rb | class Facet < ActiveRecord::Base
has_many :dynamic_facets, :dependent=>:delete_all
after_save{ Maybe(dynamic_facets).each{|x| x.save}}
def self.check_active
facets_to_save = []
Facet.where(id: Session.product_type_id, feature_type: 'Binary').each do |facet|
products_counts = BinSpec.joins("INN... | class Facet < ActiveRecord::Base
has_many :dynamic_facets, :dependent=>:delete_all
after_save{ Maybe(dynamic_facets).each{|x| x.save}}
def self.check_active
facets_to_save = []
Facet.where(product_type_id: Session.product_type_id, feature_type: 'Binary').each do |facet|
products_counts = BinSp... | Check active had a bug in it | Check active had a bug in it
| Ruby | mit | optemo/firehose,optemo/firehose,optemo/firehose | ruby | ## Code Before:
class Facet < ActiveRecord::Base
has_many :dynamic_facets, :dependent=>:delete_all
after_save{ Maybe(dynamic_facets).each{|x| x.save}}
def self.check_active
facets_to_save = []
Facet.where(id: Session.product_type_id, feature_type: 'Binary').each do |facet|
products_counts = Bi... |
2b8ef62023d78f91c74ef94645d90f9425c4727d | appengine/cloudsql/create_tables.rb | appengine/cloudsql/create_tables.rb | require "sequel"
DB = Sequel.mysql2 host: ENV["MYSQL_HOST"],
user: ENV["MYSQL_USER"],
password: ENV["MYSQL_PASSWORD"],
database: ENV["MYSQL_DATABASE"]
DB.create_table :visits do
primary_key :id
String :user_ip
Time :timestamp
end
# [END all]
| require "sequel"
DB = Sequel.mysql2 host: ENV["MYSQL_HOST"],
user: ENV["MYSQL_USER"],
password: ENV["MYSQL_PASSWORD"],
database: ENV["MYSQL_DATABASE"]
DB.create_table :visits do
primary_key :id
String :user_ip
Time :timestamp
end
# [END all]
| Tweak syntax whitespace of Flex Cloud SQL migration for readability in docs | Tweak syntax whitespace of Flex Cloud SQL migration for readability in docs
| Ruby | apache-2.0 | GoogleCloudPlatform/ruby-docs-samples,remi/ruby-docs-samples,GoogleCloudPlatform/ruby-docs-samples,remi/ruby-docs-samples,GoogleCloudPlatform/ruby-docs-samples,GoogleCloudPlatform/ruby-docs-samples,remi/ruby-docs-samples | ruby | ## Code Before:
require "sequel"
DB = Sequel.mysql2 host: ENV["MYSQL_HOST"],
user: ENV["MYSQL_USER"],
password: ENV["MYSQL_PASSWORD"],
database: ENV["MYSQL_DATABASE"]
DB.create_table :visits do
primary_key :id
String :user_ip
Time :timestamp
end
# [END ... |
81325bc686351ec5df5e38bf3ad04dfc71f16712 | src/pages/home.js | src/pages/home.js | import Inferno from 'inferno'
import Component from 'inferno-component'
import styled from 'styled-components'
import { bind, debounce } from 'decko'
import { RaisedButton } from '@slup/buttons'
import { Slider } from '@slup/slider'
import { Logo } from '../components/logo'
const LogoContainer = styled.div`
display... | import Inferno from 'inferno'
import Component from 'inferno-component'
import styled from 'styled-components'
import { bind, debounce } from 'decko'
import { RaisedButton } from '@slup/buttons'
import { Slider } from '@slup/slider'
import { Logo } from '../components/logo'
const LogoContainer = styled.div`
display... | Revert ":fire: Removed useless sample code" | Revert ":fire: Removed useless sample code"
This reverts commit f3b8351c375f9b6344dd3e3c3d6484e2b671021e.
| JavaScript | mit | slupjs/slup,slupjs/slup | javascript | ## Code Before:
import Inferno from 'inferno'
import Component from 'inferno-component'
import styled from 'styled-components'
import { bind, debounce } from 'decko'
import { RaisedButton } from '@slup/buttons'
import { Slider } from '@slup/slider'
import { Logo } from '../components/logo'
const LogoContainer = style... |
d5e7a9a5b546fd67c2003e2b6fab0541d376b724 | DB/CMakeLists.txt | DB/CMakeLists.txt |
add_subdirectory( Provider )
########### install files ###############
install( FILES DESTINATION ${DATA_INSTALL_DIR}/kppp/Provider)
#original Makefile.am contents follow:
#SUBDIRS = Provider
#
#pkgdir = $(kde_datadir)/kppp/Provider
|
add_subdirectory( Provider )
| Clean up fix install icons | Clean up
fix install icons
svn path=/trunk/KDE/kdenetwork/kppp/; revision=566932
| Text | lgpl-2.1 | KDE/kppp,KDE/kppp,KDE/kppp,KDE/kppp | text | ## Code Before:
add_subdirectory( Provider )
########### install files ###############
install( FILES DESTINATION ${DATA_INSTALL_DIR}/kppp/Provider)
#original Makefile.am contents follow:
#SUBDIRS = Provider
#
#pkgdir = $(kde_datadir)/kppp/Provider
## Instruction:
Clean up
fix install icons
svn path=/t... |
d85fdc6b7d4b1632f8b9f3b1ebaf8921c1d4d2fb | README.md | README.md | Implementation of Conway's Game of Life without using any framework.
After installing the project, use dev task to start an http server and open Chrome on the main page.
This task also starts a number of watchers:
- on html and javascript files to reload the browser
- on scss files to rebuild the stylesheet
```
npm r... | Implementation of Conway's Game of Life without using any framework.
After installing the project, use dev task to start an http server and open Chrome on the main page.
This task also starts a number of watchers:
- on html and javascript files to reload the browser
- on scss files to rebuild the stylesheet
```
npm r... | Add link to git pages | Add link to git pages | Markdown | mit | deFabius/game-of-life-vanilla-js,deFabius/game-of-life-vanilla-js | markdown | ## Code Before:
Implementation of Conway's Game of Life without using any framework.
After installing the project, use dev task to start an http server and open Chrome on the main page.
This task also starts a number of watchers:
- on html and javascript files to reload the browser
- on scss files to rebuild the style... |
91e916cb67867db9ce835be28b31904e6efda832 | spacy/tests/regression/test_issue1727.py | spacy/tests/regression/test_issue1727.py | from __future__ import unicode_literals
import numpy
from ...pipeline import Tagger
from ...vectors import Vectors
from ...vocab import Vocab
from ..util import make_tempdir
def test_issue1727():
data = numpy.ones((3, 300), dtype='f')
keys = [u'I', u'am', u'Matt']
vectors = Vectors(data=data, keys=keys)
... | '''Test that models with no pretrained vectors can be deserialized correctly
after vectors are added.'''
from __future__ import unicode_literals
import numpy
from ...pipeline import Tagger
from ...vectors import Vectors
from ...vocab import Vocab
from ..util import make_tempdir
def test_issue1727():
data = numpy.... | Add comment to new test | Add comment to new test
| Python | mit | aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,recognai/spaCy,explosion/spaCy,recognai/spaCy,explosion/spaCy,recognai/spaCy,recognai/spaCy,aikramer2/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,aikramer2/spaCy,explosion/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,explosion/spaCy,honnibal/spaCy,aikramer2/s... | python | ## Code Before:
from __future__ import unicode_literals
import numpy
from ...pipeline import Tagger
from ...vectors import Vectors
from ...vocab import Vocab
from ..util import make_tempdir
def test_issue1727():
data = numpy.ones((3, 300), dtype='f')
keys = [u'I', u'am', u'Matt']
vectors = Vectors(data=da... |
6076649f1af7afe1c098d0864604ffb1e33377df | ruby-skype.gemspec | ruby-skype.gemspec |
spec = Gem::Specification.new do |s|
s.name = 'ruby-skype'
s.version = '0.0.1'
s.author = 'Matthew Scharley'
s.email = 'matt.scharley@gmail.com'
s.summary = 'Ruby binding to the Skype Public API.'
s.homepage = 'https://github.com/mscharley/ruby-skype'
s.license = 'MIT'
s.description = <<-EOF
ruby-s... |
spec = Gem::Specification.new do |s|
s.name = 'ruby-skype'
s.version = '0.0.1'
s.author = 'Matthew Scharley'
s.email = 'matt.scharley@gmail.com'
s.summary = 'Ruby binding to the Skype Public API.'
s.homepage = 'https://github.com/mscharley/ruby-skype'
s.license = 'MIT'
s.description = <<-EOF
ruby-s... | Add rake as a development dependency | Add rake as a development dependency
| Ruby | mit | mscharley/ruby-skype | ruby | ## Code Before:
spec = Gem::Specification.new do |s|
s.name = 'ruby-skype'
s.version = '0.0.1'
s.author = 'Matthew Scharley'
s.email = 'matt.scharley@gmail.com'
s.summary = 'Ruby binding to the Skype Public API.'
s.homepage = 'https://github.com/mscharley/ruby-skype'
s.license = 'MIT'
s.description = <... |
eb074fe8e4ed4489d2a5e07f3ea2f8ed655a9977 | applications/calendar/jest.config.js | applications/calendar/jest.config.js | module.exports = {
setupFilesAfterEnv: ['./rtl.setup.js'],
verbose: true,
moduleDirectories: ['<rootDir>/node_modules'],
transform: {
'^.+\\.(js|tsx?)$': '<rootDir>/jest.transform.js',
},
collectCoverage: true,
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'],
transformIgnorePat... | module.exports = {
setupFilesAfterEnv: ['./rtl.setup.js'],
verbose: true,
moduleDirectories: ['<rootDir>/node_modules', 'node_modules'],
transform: {
'^.+\\.(js|tsx?)$': '<rootDir>/jest.transform.js',
},
collectCoverage: true,
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'],
tr... | Fix test support in monorepo | Fix test support in monorepo
| JavaScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | javascript | ## Code Before:
module.exports = {
setupFilesAfterEnv: ['./rtl.setup.js'],
verbose: true,
moduleDirectories: ['<rootDir>/node_modules'],
transform: {
'^.+\\.(js|tsx?)$': '<rootDir>/jest.transform.js',
},
collectCoverage: true,
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'],
tr... |
9fd061807e65d106bac4c42618aaf177cd58855d | app/assets/javascripts/protected_branches.js.coffee | app/assets/javascripts/protected_branches.js.coffee | $ ->
$(":checkbox").change ->
id = $(this).val()
checked = $(this).is(":checked")
url = $(this).data("url")
$.ajax
type: "PUT"
url: url
dataType: "json"
data:
id: id
developers_can_push: checked
success: ->
new Flash("Branch updated.", "notice")
... | $ ->
$(":checkbox").change ->
name = $(this).attr("name")
if name == "developers_can_push"
id = $(this).val()
checked = $(this).is(":checked")
url = $(this).data("url")
$.ajax
type: "PUT"
url: url
dataType: "json"
data:
id: id
develop... | Update on the correct checkbox. | Update on the correct checkbox.
| CoffeeScript | mit | sekcheong/gitlabhq,icedwater/gitlabhq,mrb/gitlabhq,shinexiao/gitlabhq,NARKOZ/gitlabhq,kemenaran/gitlabhq,lvfeng1130/gitlabhq,MauriceMohlek/gitlabhq,tempbottle/gitlabhq,darkrasid/gitlabhq,per-garden/gitlabhq,nmav/gitlabhq,rumpelsepp/gitlabhq,ikappas/gitlabhq,theonlydoo/gitlabhq,bozaro/gitlabhq,martijnvermaat/gitlabhq,dw... | coffeescript | ## Code Before:
$ ->
$(":checkbox").change ->
id = $(this).val()
checked = $(this).is(":checked")
url = $(this).data("url")
$.ajax
type: "PUT"
url: url
dataType: "json"
data:
id: id
developers_can_push: checked
success: ->
new Flash("Branch update... |
cff2d90c27c6649955047030b4938cdee4522dc0 | .github/workflows/dkm-ci.yml | .github/workflows/dkm-ci.yml |
name: dkm-ci
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: [push]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
... |
name: dkm-ci
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: [push]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
... | Make sure source is checked out for CI build... | Make sure source is checked out for CI build... | YAML | mit | genbattle/dkm | yaml | ## Code Before:
name: dkm-ci
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: [push]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
... |
adf9a81d46fcfdb07b07f2b858741c83c95b71f7 | app/styles/ui/_commit-summary.scss | app/styles/ui/_commit-summary.scss | @import "../mixins";
/** A React component holding the selected commit's detailed information */
#commit-summary {
.files {
display: flex;
flex: 1;
.list-item {
border-bottom: 1px solid var(--box-border-color);
padding: var(--spacing);
}
.path {
text-overflow: ellipsis;
... | @import "../mixins";
/** A React component holding the selected commit's detailed information */
#commit-summary {
.files {
display: flex;
flex: 1;
.list-item {
border-bottom: 1px solid var(--box-border-color);
padding: var(--spacing);
}
.path {
text-overflow: ellipsis;
... | Break long words in commit summary | Break long words in commit summary
| SCSS | mit | kactus-io/kactus,say25/desktop,artivilla/desktop,gengjiawen/desktop,j-f1/forked-desktop,BugTesterTest/desktops,shiftkey/desktop,hjobrien/desktop,hjobrien/desktop,desktop/desktop,desktop/desktop,artivilla/desktop,gengjiawen/desktop,shiftkey/desktop,BugTesterTest/desktops,gengjiawen/desktop,desktop/desktop,kactus-io/kact... | scss | ## Code Before:
@import "../mixins";
/** A React component holding the selected commit's detailed information */
#commit-summary {
.files {
display: flex;
flex: 1;
.list-item {
border-bottom: 1px solid var(--box-border-color);
padding: var(--spacing);
}
.path {
text-overflow: ... |
27198c1fcae3cc4d180b1f36701362b60aaa6a38 | .travis.yml | .travis.yml | language: go
go:
- 1.3
- 1.4
install:
- export DOCKER_PATH="${GOPATH%%:*}/src/github.com/docker/docker"
- mkdir -pv "$DOCKER_PATH/project/make"
- ( cd "$DOCKER_PATH/project/make" && wget -c 'https://raw.githubusercontent.com/docker/docker/master/project/make/'{.validate,validate-dco,validate-gofmt} )
- se... | language: go
go:
- 1.3
- 1.4
# let us have speedy Docker-based Travis workers
sudo: false
install:
- export DOCKER_PATH="${GOPATH%%:*}/src/github.com/docker/docker"
- mkdir -pv "$DOCKER_PATH/project/make"
- ( cd "$DOCKER_PATH/project/make" && wget -c 'https://raw.githubusercontent.com/docker/docker/master/... | Add "sudo: false" so we get the faster Docker-based workers | Add "sudo: false" so we get the faster Docker-based workers
Signed-off-by: Andrew Page <4b2b69742da531f1900c4c4748d7a0ecda59626a@gmail.com>
| YAML | apache-2.0 | denverdino/docker.github.io,gradywang/swarm,cgvarela/swarm,ehazlett/swarm,CiaranCostello/swarm,denverdino/docker.github.io,affo/swarm,cgvarela/swarm,MHBauer/swarm,therealbill/swarm,adouang/swarm,shin-/docker.github.io,chanwit/swarm,LukasBacigal/swarm,rillig/docker.github.io,JimGalasyn/docker.github.io,barais/swarm,para... | yaml | ## Code Before:
language: go
go:
- 1.3
- 1.4
install:
- export DOCKER_PATH="${GOPATH%%:*}/src/github.com/docker/docker"
- mkdir -pv "$DOCKER_PATH/project/make"
- ( cd "$DOCKER_PATH/project/make" && wget -c 'https://raw.githubusercontent.com/docker/docker/master/project/make/'{.validate,validate-dco,validate... |
a1a7b7d7f85a6ee0f06637ed199c14aba5c6e37e | spec/wrap_spec.lua | spec/wrap_spec.lua | local wrap = require "wrap"
local wrapDefs = wrap.wrapMachineDefs
describe("Unit definition wrapper", function()
it("should error if no processing function is provided", function()
local noProcessingUnit = {
name = 'Bad Unit',
knobs = {}
}
assert.has_error(functi... | local wrap = require "wrap"
local wrapDefs = wrap.wrapMachineDefs
describe("Unit definition wrapper", function()
it("should error if no processing function is provided", function()
local noProcessingUnit = {
name = 'Bad Unit',
knobs = {}
}
assert.has_error(functi... | Add two more wrapper tests and placeholders | Add two more wrapper tests and placeholders
One test for wrapping a mono effect and one for a stereo effect.
| Lua | mit | graue/luasynth | lua | ## Code Before:
local wrap = require "wrap"
local wrapDefs = wrap.wrapMachineDefs
describe("Unit definition wrapper", function()
it("should error if no processing function is provided", function()
local noProcessingUnit = {
name = 'Bad Unit',
knobs = {}
}
assert.... |
ca554520a5cf7e49bc35cb72907890330b464b61 | lib/idobata/hook.rb | lib/idobata/hook.rb | require 'hashie'
require 'html/pipeline'
require 'json'
require 'mime/types'
require 'tilt'
require 'active_support/callbacks'
require 'active_support/core_ext/class/subclasses'
require 'active_support/core_ext/object/to_param'
require 'active_support/core_ext/object/to_query'
require 'active_support/core_ext/string/in... | require 'hashie'
require 'html/pipeline'
require 'json'
require 'mime/types'
require 'tilt'
require 'active_support/callbacks'
require 'active_support/core_ext/class/subclasses'
require 'active_support/core_ext/object/to_param'
require 'active_support/core_ext/object/to_query'
require 'active_support/core_ext/string/in... | Enable syntax highlighting on local environment | Enable syntax highlighting on local environment
| Ruby | mit | kirikiriyamama/idobata-hooks,kirikiriyamama/idobata-hooks,kirikiriyamama/idobata-hooks,asonas/idobata-hooks,idobata/idobata-hooks,1syo/idobata-hooks,1syo/idobata-hooks,idobata/idobata-hooks,idobata/idobata-hooks,asonas/idobata-hooks,asonas/idobata-hooks,1syo/idobata-hooks | ruby | ## Code Before:
require 'hashie'
require 'html/pipeline'
require 'json'
require 'mime/types'
require 'tilt'
require 'active_support/callbacks'
require 'active_support/core_ext/class/subclasses'
require 'active_support/core_ext/object/to_param'
require 'active_support/core_ext/object/to_query'
require 'active_support/co... |
e326cef4ae66d4d2dd500e933ff4f7c6fc619b28 | fix-perm.py | fix-perm.py |
from __future__ import print_function
import os
import stat
import sys
if __name__ == '__main__':
for line in sys.stdin:
path = line.rstrip('\n')
if path == '':
continue
if not os.path.isfile(path):
continue
st = os.stat(path)
mode = st.st_mode
... |
from __future__ import print_function
import os
import stat
import sys
if __name__ == '__main__':
for line in sys.stdin:
path = line.rstrip('\n')
if path == '':
continue
if not os.path.isfile(path):
continue
st = os.stat(path)
mode = int('644', 8... | Change permissions to either 644 or 755. | Change permissions to either 644 or 755.
| Python | isc | eliteraspberries/minipkg,eliteraspberries/minipkg | python | ## Code Before:
from __future__ import print_function
import os
import stat
import sys
if __name__ == '__main__':
for line in sys.stdin:
path = line.rstrip('\n')
if path == '':
continue
if not os.path.isfile(path):
continue
st = os.stat(path)
mod... |
d5ceccd8d737e24ff07b7a49a678c18ec3adbc46 | tasks/vendor_sqlite3.rake | tasks/vendor_sqlite3.rake | require "rake/clean"
require "rake/extensioncompiler"
require "mini_portile"
$recipes = {}
$recipes[:sqlite3] = MiniPortile.new "sqlite3", BINARY_VERSION
$recipes[:sqlite3].files << "http://sqlite.org/sqlite-autoconf-#{URL_VERSION}.tar.gz"
namespace :ports do
directory "ports"
desc "Install port sqlite3 #{$reci... | require "rake/clean"
require "rake/extensioncompiler"
require "mini_portile"
$recipes = {}
$recipes[:sqlite3] = MiniPortile.new "sqlite3", BINARY_VERSION
$recipes[:sqlite3].files << "http://sqlite.org/sqlite-autoconf-#{URL_VERSION}.tar.gz"
namespace :ports do
directory "ports"
desc "Install port sqlite3 #{$reci... | Fix mini ports compilation issue | Fix mini ports compilation issue
Host might not be set when doing native compilation.
| Ruby | bsd-3-clause | duhlin/sqlite3-ruby,AutogrowSystems/sqlite3-ruby,alexdowad/sqlite3-ruby,AutogrowSystems/sqlite3-ruby,alexdowad/sqlite3-ruby,duhlin/sqlite3-ruby | ruby | ## Code Before:
require "rake/clean"
require "rake/extensioncompiler"
require "mini_portile"
$recipes = {}
$recipes[:sqlite3] = MiniPortile.new "sqlite3", BINARY_VERSION
$recipes[:sqlite3].files << "http://sqlite.org/sqlite-autoconf-#{URL_VERSION}.tar.gz"
namespace :ports do
directory "ports"
desc "Install port... |
6cf26e2f05694f8875a562b6ffdc3e81ab0b6c81 | metadata/com.decred.decredaddressscanner.yml | metadata/com.decred.decredaddressscanner.yml | Categories:
- Money
License: ISC
AuthorName: Joe Gruffins
WebSite: https://decred.org
SourceCode: https://github.com/decred/dcraddrscanner
IssueTracker: https://github.com/decred/dcraddrscanner/issues
AutoName: Decred Address Scanner
RepoType: git
Repo: https://github.com/decred/dcraddrscanner
Builds:
- versionN... | Categories:
- Money
License: ISC
AuthorName: Joe Gruffins
WebSite: https://decred.org
SourceCode: https://github.com/decred/dcraddrscanner
IssueTracker: https://github.com/decred/dcraddrscanner/issues
AutoName: Decred Address Scanner
RepoType: git
Repo: https://github.com/decred/dcraddrscanner
Builds:
- versionN... | Update Decred Address Scanner to 1.10 (10) | Update Decred Address Scanner to 1.10 (10)
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroiddata | yaml | ## Code Before:
Categories:
- Money
License: ISC
AuthorName: Joe Gruffins
WebSite: https://decred.org
SourceCode: https://github.com/decred/dcraddrscanner
IssueTracker: https://github.com/decred/dcraddrscanner/issues
AutoName: Decred Address Scanner
RepoType: git
Repo: https://github.com/decred/dcraddrscanner
Buil... |
f412b547e6b7e422cd49f26a8ffe23756c932ecb | dynamodb/fixtures/UserWidgetsData.json | dynamodb/fixtures/UserWidgetsData.json | [
{
"userId": "45bbefbf-63d1-4d36-931e-212fbe2bc3d9",
"widgetId": "a8cfd733-639b-49d4-a822-116cc7e5c2e2",
"enabled": true,
"visible": false,
"data": {
"bookmarks": [
{
"name": "Google",
"link": "https://www.google.com/"
}
]
},
"created": "2017-07-18T20:4... | [
{
"userId": "abcdefghijklmno",
"widgetId": "a8cfd733-639b-49d4-a822-116cc7e5c2e2",
"enabled": true,
"visible": false,
"data": {
"bookmarks": [
{
"name": "Google",
"link": "https://www.google.com/"
}
]
},
"created": "2017-07-18T20:45:53Z",
"updated"... | Update fixture widget user ID. | Update fixture widget user ID.
| JSON | mpl-2.0 | gladly-team/tab,gladly-team/tab,gladly-team/tab | json | ## Code Before:
[
{
"userId": "45bbefbf-63d1-4d36-931e-212fbe2bc3d9",
"widgetId": "a8cfd733-639b-49d4-a822-116cc7e5c2e2",
"enabled": true,
"visible": false,
"data": {
"bookmarks": [
{
"name": "Google",
"link": "https://www.google.com/"
}
]
},
"created": ... |
7756a578608dd2cf13191491674b8e198cee0fed | .travis.yml | .travis.yml | language: cpp
compiler:
- gcc
script:
- mkdir build
- cd build
- cmake ..
- cmake --build . --target all --
- cmake --build . --target package --
after_script:
- ctest
- cmake --build . --target Continous
| language: cpp
compiler:
- gcc
before_script:
- sudo apt-get update -qq
- sudo apt-get install libboost-dev
script:
- mkdir build
- cd build
- cmake ..
- cmake --build . --target all --
- cmake --build . --target package --
after_script:
- ctest
- cmake --build . --target Continous
| Install boost dev packages on Travis container before building. | Install boost dev packages on Travis container before building.
Signed-off-by: Peter Hille (png!das-system) <4b8373d016f277527198385ba72fda0feb5da015@das-system-networks.de>
| YAML | bsd-3-clause | png85/dsnutil_cpp | yaml | ## Code Before:
language: cpp
compiler:
- gcc
script:
- mkdir build
- cd build
- cmake ..
- cmake --build . --target all --
- cmake --build . --target package --
after_script:
- ctest
- cmake --build . --target Continous
## Instruction:
Install boost dev packages on Travis container before building.
... |
682ad1089ff4ea80dc208d5e60b52645c4b40ed0 | jenkins/jobs/sdk.yaml | jenkins/jobs/sdk.yaml | - job-template:
name: '{pipeline}-sdk-dsvm-functional{branch-designator}'
node: '{node}'
wrappers:
- build-timeout:
timeout: 125
- timestamps
builders:
- link-logs
- net-info
- devstack-checkout
- shell: |
#!/bin/bash -xe
export PYTHONU... | - job-template:
name: '{pipeline}-sdk-dsvm-functional{branch-designator}'
node: '{node}'
wrappers:
- build-timeout:
timeout: 125
- timestamps
builders:
- link-logs
- net-info
- devstack-checkout
- shell: |
#!/bin/bash -xe
export PYTHONU... | Adjust SDK jobs to use ceilometer plugin | Adjust SDK jobs to use ceilometer plugin
This patch updates SDK jenkins jobs so that ceilometer service is
enabled.
Change-Id: I9799e03b3684a5c121261eeda1c221b781e49060
Related-Bug: #1489436
| YAML | apache-2.0 | noorul/os-project-config,dongwenjuan/project-config,dongwenjuan/project-config,Tesora/tesora-project-config,noorul/os-project-config,Tesora/tesora-project-config,openstack-infra/project-config,openstack-infra/project-config | yaml | ## Code Before:
- job-template:
name: '{pipeline}-sdk-dsvm-functional{branch-designator}'
node: '{node}'
wrappers:
- build-timeout:
timeout: 125
- timestamps
builders:
- link-logs
- net-info
- devstack-checkout
- shell: |
#!/bin/bash -xe
... |
cf5e31f4df362332e8f3da424b77d8fac7ef4829 | app/code/test/views/test.EditBookPageView.js | app/code/test/views/test.EditBookPageView.js | var expect = require('chai').expect;
var EditBookPageView = require("../../views/EditBookPageView.js");
describe('EditBookPageView', function() {
var view;
before(function() {
view = new EditBookPageView({});
});
describe('verify objects', function () {
it("should create a valid vi... | var expect = require('chai').expect;
var EditBookPageView = require("../../views/EditBookPageView.js");
describe('EditBookPageView', function() {
var view;
before(function() {
view = new EditBookPageView({});
});
describe('verify objects', function () {
it("should create a valid vi... | Add form data tests (skipped) | Add form data tests (skipped)
| JavaScript | agpl-3.0 | tephyr/simpleshelf,tephyr/simpleshelf,tephyr/simpleshelf,tephyr/simpleshelf | javascript | ## Code Before:
var expect = require('chai').expect;
var EditBookPageView = require("../../views/EditBookPageView.js");
describe('EditBookPageView', function() {
var view;
before(function() {
view = new EditBookPageView({});
});
describe('verify objects', function () {
it("should c... |
ff61ad60ec3f50de6040c4f19bfc2b6814b73bbc | src/edu/usc/glidein/service/db/SiteDAO.java | src/edu/usc/glidein/service/db/SiteDAO.java | package edu.usc.glidein.service.db;
import edu.usc.glidein.stubs.types.Site;
import edu.usc.glidein.stubs.types.SiteStatus;
public interface SiteDAO
{
public int create(Site site) throws DatabaseException;
public void store(Site site) throws DatabaseException;
public Site load(int siteId) throws DatabaseException;... | package edu.usc.glidein.service.db;
import edu.usc.glidein.stubs.types.Site;
import edu.usc.glidein.stubs.types.SiteStatus;
public interface SiteDAO
{
public int create(Site site) throws DatabaseException;
public void store(Site site) throws DatabaseException;
public Site load(int siteId) throws DatabaseException;... | Remove getStatus Modify updateStatus Add list | Remove getStatus
Modify updateStatus
Add list
git-svn-id: bdb5f82b9b83a1400e05d69d262344b821646179@1235 e217846f-e12e-0410-a4e5-89ccaea66ff7
| Java | apache-2.0 | juve/corral,juve/corral,juve/corral | java | ## Code Before:
package edu.usc.glidein.service.db;
import edu.usc.glidein.stubs.types.Site;
import edu.usc.glidein.stubs.types.SiteStatus;
public interface SiteDAO
{
public int create(Site site) throws DatabaseException;
public void store(Site site) throws DatabaseException;
public Site load(int siteId) throws Da... |
f88b18de71e89176918e5d39d0c3005890dc1501 | README.md | README.md |
[](https://packagist.org/packages/ggteam/breadcrumbbundle)
[](https://travis-ci.org/GGTeam/BreadcrumbBundle) [](https://packagist.org/packages/ggteam/breadcrumbbundle)
----
[](https://travis-ci.org/GGTeam/BreadcrumbBundle) [](https://packagist.org/packages/ggteam/breadcrumbbundle)
[](https://travis-ci.org/GGTeam/BreadcrumbBundle) [:
helper = FormHelper()
helper.form_class = 'form-horizontal'
helper.add_input(Submit('submit', 'Submit'))... | from django.contrib.auth.models import User
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
import models
class BaseModelForm(forms.ModelForm):
helper = FormHelper()
helper.form_class = 'form-horizontal'
helper.add_input(Submit('submit', 'Submit'))... | Improve the project form a bit | Improve the project form a bit
| Python | mit | praekelt/sideloader,praekelt/sideloader,praekelt/sideloader,praekelt/sideloader | python | ## Code Before:
from django.contrib.auth.models import User
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
import models
class BaseModelForm(forms.ModelForm):
helper = FormHelper()
helper.form_class = 'form-horizontal'
helper.add_input(Submit('sub... |
dbda6508aab5ff5297b32e5ea6dcec3974ad4b75 | scripts/gen_files.sh | scripts/gen_files.sh |
[ -z "$FABRIC_API_KEY" ] && echo "FABRIC_API_KEY can't be empty" && exit 1
[ -z "$FABRIC_BUILD_SECRET" ] && echo "FABRIC_BUILD_SECRET can't be empty" && exit 1
BUILD_INFO="`date +%Y%m%d.%H%M`;`hostname`;`whoami`(`id -u`)"
echo "const static char *BUILD_INFO = \"$BUILD_INFO\";"
echo "const static char *FABRIC_API_KEY... |
env_gen () {
VARNAME=$1
eval VARVAL="\$$VARNAME"
if [ -z "$VARVAL" ]; then
echo "// $VARNAME is empty!!!! Project may not work as expected" | tee .wrong_env_vars
VARVAL=""
fi
echo "const static char *$VARNAME = \"$VARVAL\";"
}
BUILD_INFO="`date +%Y%m%d.%H%M`;`hostname`;`whoami`(`id -u`)"
#env_gen TO_TEST_DO... | Make it easy to compile-test Sensorama | Make it easy to compile-test Sensorama
| Shell | bsd-2-clause | wkoszek/sensorama-ios,wkoszek/sensorama-ios,wkoszek/sensorama-ios,wkoszek/sensorama-ios | shell | ## Code Before:
[ -z "$FABRIC_API_KEY" ] && echo "FABRIC_API_KEY can't be empty" && exit 1
[ -z "$FABRIC_BUILD_SECRET" ] && echo "FABRIC_BUILD_SECRET can't be empty" && exit 1
BUILD_INFO="`date +%Y%m%d.%H%M`;`hostname`;`whoami`(`id -u`)"
echo "const static char *BUILD_INFO = \"$BUILD_INFO\";"
echo "const static char... |
6bc7ce06d154610fff9e9392ccfb00bb57fde092 | src/elements/land-registry/double-click-prevention/demos/demo.hbs | src/elements/land-registry/double-click-prevention/demos/demo.hbs | ---
title: Double click prevention
---
<h1 class="heading-xlarge">
<span class="heading-secondary">{{component.categories.primary}} / {{component.categories.secondary}}</span>
{{component.name}}
</h1>
{{#markdown}}
Prevent people double clicking on form buttons by adding a `data-double-click-prevention` attribute ... | ---
title: Double click prevention
---
<h1 class="heading-xlarge">
<span class="heading-secondary">{{component.categories.primary}} / {{component.categories.secondary}}</span>
{{component.name}}
</h1>
{{#markdown}}
Prevent people double clicking on form buttons by adding a `data-double-click-prevention` attribute ... | Add label to input element | Add label to input element
| Handlebars | mit | LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements | handlebars | ## Code Before:
---
title: Double click prevention
---
<h1 class="heading-xlarge">
<span class="heading-secondary">{{component.categories.primary}} / {{component.categories.secondary}}</span>
{{component.name}}
</h1>
{{#markdown}}
Prevent people double clicking on form buttons by adding a `data-double-click-preven... |
b14d4e40eff9caaf3e7144e4f528c70077701fac | README.md | README.md |
📅 Inline/Expanding date picker for table views.
[](https://cocoapods.org/pods/DatePickerCell)
[](https://github.com/DylanVann/DatePicker... |
📅 Inline/Expanding date picker for table views.
[](https://cocoapods.org/pods/DatePickerCell)
[](https://github.com/Carthage/Cartha... | Add installation instructions for Carthage. | Add installation instructions for Carthage. | Markdown | mit | DylanVann/DatePickerCell,DylanVann/DatePickerCell | markdown | ## Code Before:
📅 Inline/Expanding date picker for table views.
[](https://cocoapods.org/pods/DatePickerCell)
[](https://github.com/Dyla... |
465fe4a8fc62f4abd688565e2296c9e574427a21 | integration_test/main_suite_test.go | integration_test/main_suite_test.go | package main_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
"testing"
)
func TestGaragepi(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "GaragepiExecutable Suite")
}
var (
httpPort uint
httpsPort uint
garagepiBinPath string
)
var _ =... | package main_test
import (
"time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
"testing"
)
func TestGaragepi(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "GaragepiExecutable Suite")
}
var (
httpPort uint
httpsPort uint
garagepiBinPath string
)... | Increase default Eventually timeout in integration tests. | Increase default Eventually timeout in integration tests.
[#101363596]
| Go | mit | robdimsdale/garagepi,robdimsdale/garagepi,robdimsdale/garagepi | go | ## Code Before:
package main_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
"testing"
)
func TestGaragepi(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "GaragepiExecutable Suite")
}
var (
httpPort uint
httpsPort uint
garagepiBinPath s... |
7081138570f02de06810300460a192efcd8e7b9f | docs/developer.rst | docs/developer.rst | Developer Manual
################
The development of OpenSubmit is coordinated on `GitHub <https://github.com/troeger/opensubmit>`_.
We need help in everything. Feel free to join us.
The central `Makefile <https://github.com/troeger/opensubmit/blob/master/Makefile>`_ is a good starting point. It supports several targ... | Developer Manual
################
The development of OpenSubmit is coordinated on `GitHub <https://github.com/troeger/opensubmit>`_.
We need help in everything. Feel free to join us.
The central `Makefile <https://github.com/troeger/opensubmit/blob/master/Makefile>`_ is a good starting point. It supports several targ... | Add information about doc writing | Add information about doc writing
| reStructuredText | agpl-3.0 | troeger/opensubmit,troeger/opensubmit,troeger/opensubmit,troeger/opensubmit,troeger/opensubmit | restructuredtext | ## Code Before:
Developer Manual
################
The development of OpenSubmit is coordinated on `GitHub <https://github.com/troeger/opensubmit>`_.
We need help in everything. Feel free to join us.
The central `Makefile <https://github.com/troeger/opensubmit/blob/master/Makefile>`_ is a good starting point. It suppo... |
08bffa5f6df497f28fe3481fe80b517628b0f1a3 | tmdb3/cache_engine.py | tmdb3/cache_engine.py |
class Engines( object ):
def __init__(self):
self._engines = {}
def register(self, engine):
self._engines[engine.__name__] = engine
self._engines[engine.name] = engine
def __getitem__(self, key):
return self._engines[key]
Engines = Engines()
class CacheEngineType( type ):
... |
class Engines( object ):
def __init__(self):
self._engines = {}
def register(self, engine):
self._engines[engine.__name__] = engine
self._engines[engine.name] = engine
def __getitem__(self, key):
return self._engines[key]
def __contains__(self, key):
return self.... | Add __contains__ for proper lookup in cache Engines class. | Add __contains__ for proper lookup in cache Engines class.
| Python | bsd-3-clause | wagnerrp/pytmdb3,naveenvhegde/pytmdb3 | python | ## Code Before:
class Engines( object ):
def __init__(self):
self._engines = {}
def register(self, engine):
self._engines[engine.__name__] = engine
self._engines[engine.name] = engine
def __getitem__(self, key):
return self._engines[key]
Engines = Engines()
class CacheEngin... |
f858f7f3804ea20b80a38dab9b1b2d098e1df2a1 | include/llvm/Transforms/Instrumentation.h | include/llvm/Transforms/Instrumentation.h | //===- Transforms/Instrumentation.h - Instrumentation passes ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===--------... | //===- Transforms/Instrumentation.h - Instrumentation passes ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===--------... | Add accessor function prototypes for reoptimizer support passes. Make accessors return FunctionPass* as appropriate. | Add accessor function prototypes for reoptimizer support passes.
Make accessors return FunctionPass* as appropriate.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@16619 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,apple/swift-... | c | ## Code Before:
//===- Transforms/Instrumentation.h - Instrumentation passes ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
/... |
48011046ae3904c2818b311e8cd0e474505a206c | index.js | index.js | 'use strict';
const express = require('express');
const moment = require('moment');
const app = express();
const port = process.argv[2] || 3000;
app.get('/:timestamp', (request, response) => {
const timestamp = request.params.timestamp;
let result = {};
if (moment.unix(timestamp).isValid()) {
result = {
... | 'use strict';
const express = require('express');
const moment = require('moment');
const app = express();
const port = process.argv[2] || 3000;
app.get('/:timestamp', (request, response) => {
const timestamp = request.params.timestamp;
let result = {};
if (moment.unix(timestamp).isValid()) {
result = {
... | Use express' response.json() method because it sets proper header automatically | Use express' response.json() method because it sets proper header automatically
| JavaScript | mit | NicholasAsimov/timestamp-microservice | javascript | ## Code Before:
'use strict';
const express = require('express');
const moment = require('moment');
const app = express();
const port = process.argv[2] || 3000;
app.get('/:timestamp', (request, response) => {
const timestamp = request.params.timestamp;
let result = {};
if (moment.unix(timestamp).isValid()) {... |
c1a428c9b5bdc692a3c25c5ac4be719dbd1561c7 | test/Examples/MultiQuad.jl | test/Examples/MultiQuad.jl | @testset "MultiQuad" begin
include(joinpath(Hecke.pkgdir, "examples", "MultiQuad.jl"))
c = MultiQuad.multi_quad(fmpz[3,5,7], 10)
d = MultiQuad.simplify(c)
@test MultiQuad.Hecke.class_group_get_pivot_info(d) == (4, BitSet([2, 4]))
e = MultiQuad.saturate(d, 2)
@test MultiQuad.Hecke.class_group_get_pivot_inf... | @testset "MultiQuad" begin
include(joinpath(Hecke.pkgdir, "examples", "MultiQuad.jl"))
#@time c = MultiQuad.multi_quad(fmpz[3,5,7], 10)
#d = MultiQuad.simplify(c)
#@test MultiQuad.Hecke.class_group_get_pivot_info(d) == (4, BitSet([2, 4]))
#e = MultiQuad.saturate(d, 2)
#@test MultiQuad.Hecke.class_group_ge... | Disable example tests (why are they so slow)? | Disable example tests (why are they so slow)?
| Julia | bsd-2-clause | thofma/Hecke.jl | julia | ## Code Before:
@testset "MultiQuad" begin
include(joinpath(Hecke.pkgdir, "examples", "MultiQuad.jl"))
c = MultiQuad.multi_quad(fmpz[3,5,7], 10)
d = MultiQuad.simplify(c)
@test MultiQuad.Hecke.class_group_get_pivot_info(d) == (4, BitSet([2, 4]))
e = MultiQuad.saturate(d, 2)
@test MultiQuad.Hecke.class_gro... |
3616a3e02dd0caa556435a15470b869750385e41 | package.json | package.json | {
"name": "geojson-topojson",
"version": "0.0.1",
"private": true,
"dependencies": {
"express": "3.x",
"topojson": "1.2.2"
},
"engines": {
"node": "0.8.19",
"npm": "1.2.10"
}
}
| {
"name": "geojson-topojson",
"version": "0.0.1",
"private": true,
"dependencies": {
"topojson": "1.2.2",
"browserify": "2.25.0",
"brfs": "0.0.6"
}
}
| Add browserify, brfs. Remove express, node, npm. | Add browserify, brfs. Remove express, node, npm.
| JSON | mit | JeffPaine/geojson-topojson | json | ## Code Before:
{
"name": "geojson-topojson",
"version": "0.0.1",
"private": true,
"dependencies": {
"express": "3.x",
"topojson": "1.2.2"
},
"engines": {
"node": "0.8.19",
"npm": "1.2.10"
}
}
## Instruction:
Add browserify, brfs. Remove express, node, npm.
## Code After:
{
"name": "ge... |
8dddf5aae36520d0af62d504ec42d7250e2e191f | server/controllers/campaign/email/amazon-ses/amazon.js | server/controllers/campaign/email/amazon-ses/amazon.js | module.exports = (task, campaignInfo) => {
// Ref https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SES.html#sendEmail-property
const email = {
Source: `"${campaignInfo.fromName}" <${task.email}>`, // From email
Destination: { // To email
ToAddresses: [`<${task.email}>`] // Set name as follows... | module.exports = (task, campaignInfo) => {
// Ref https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SES.html#sendEmail-property
const email = {
Source: `"${campaignInfo.fromName}" <${campaignInfo.fromEmail}>`, // From email
Destination: { // To email
ToAddresses: [`<${task.email}>`] // Set nam... | Fix 'from' address SES verification bug | Fix 'from' address SES verification bug
The FROM address was being set to the TO address for each sent email.
This caused SES to reject the email because the sender was not verified.
So emails could only be sent to the owner of the SES account.
Emails sent to the test server were successful because there is
no sourc... | JavaScript | bsd-3-clause | karuppiah7890/Mail-for-Good,karuppiah7890/Mail-for-Good,karuppiah7890/Mail-for-Good,zhakkarn/Mail-for-Good,zhakkarn/Mail-for-Good,zhakkarn/Mail-for-Good | javascript | ## Code Before:
module.exports = (task, campaignInfo) => {
// Ref https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SES.html#sendEmail-property
const email = {
Source: `"${campaignInfo.fromName}" <${task.email}>`, // From email
Destination: { // To email
ToAddresses: [`<${task.email}>`] // Set... |
851edc4d042732992cad6ca1ad69d1d0139f1094 | .travis.yml | .travis.yml | language: ruby
rvm:
- 2.3.0
script: "bundle exec rake spec"
gemfile:
- gemfiles/rails4.gemfile
- gemfiles/rails5.gemfile
notifications:
email:
- support@travellink.com.au
flowdock:
secure: TZTbtSK+LDly7dRu0eYE3oro7fH0dktkyzeRo67ofPqO5Xdor6U6Eh2njeq6vqiL9tI+2V1MLv90I9tcLrbiz609sY6r+4byL8fQoDRjXMYcOr8bO... | language: ruby
rvm:
- 2.3
- 2.4
- 2.5
script: "bundle exec rake spec"
gemfile:
- gemfiles/rails4.gemfile
- gemfiles/rails5.gemfile
notifications:
email:
- support@travellink.com.au
flowdock:
secure: TZTbtSK+LDly7dRu0eYE3oro7fH0dktkyzeRo67ofPqO5Xdor6U6Eh2njeq6vqiL9tI+2V1MLv90I9tcLrbiz609sY6r+4byL8f... | Test against newer ruby versions | Test against newer ruby versions
| YAML | mit | sealink/right_on,sealink/right_on | yaml | ## Code Before:
language: ruby
rvm:
- 2.3.0
script: "bundle exec rake spec"
gemfile:
- gemfiles/rails4.gemfile
- gemfiles/rails5.gemfile
notifications:
email:
- support@travellink.com.au
flowdock:
secure: TZTbtSK+LDly7dRu0eYE3oro7fH0dktkyzeRo67ofPqO5Xdor6U6Eh2njeq6vqiL9tI+2V1MLv90I9tcLrbiz609sY6r+4byL... |
a7afe07493cebd01faa6e2498e8d0c8c238032da | lib/auth.js | lib/auth.js | var auth = require('http-auth');
var util = require('util');
var app = require('../src/app');
var ip = require('./ip');
var loginAttempts= {};
var authCallback = function(user, pass, callback) {
callback(user === app.config.admin.user && pass === app.config.admin.password);
};
var basic = auth.basic({
realm: "Ad... | var auth = require('http-auth');
var util = require('util');
var app = require('../src/app');
var ip = require('./ip');
var loginAttempts= {};
var authCallback = function(user, pass, callback) {
callback(user === app.config.admin.user && pass === app.config.admin.password);
};
var basic = auth.basic({
realm: "Ad... | Fix so you don't get banned after 5 refreshes. | Fix so you don't get banned after 5 refreshes.
| JavaScript | mit | crashndash/level-crash,crashndash/level-crash | javascript | ## Code Before:
var auth = require('http-auth');
var util = require('util');
var app = require('../src/app');
var ip = require('./ip');
var loginAttempts= {};
var authCallback = function(user, pass, callback) {
callback(user === app.config.admin.user && pass === app.config.admin.password);
};
var basic = auth.basi... |
98652f16905972e5f68d0342529ae3a26c1c80a2 | .travis.yml | .travis.yml | ---
services: docker
addons:
hosts:
- cluster.pidramble.test
- registry.pidramble.test
- kube1
install:
- docker pull geerlingguy/docker-debian10-ansible:latest
- cp example.config.yml config.yml
script:
# - "travis_wait 30 ./testing/docker/docker-playbook-test.sh"
- ./testing/docker/docker-pla... | ---
services: docker
addons:
hosts:
- cluster.pidramble.test
- registry.pidramble.test
- kube1
install:
- docker pull geerlingguy/docker-debian10-ansible:latest
- cp example.config.yml config.yml
script:
# - "travis_wait 30 ./testing/docker/docker-playbook-test.sh"
- ./testing/docker/docker-pla... | Debug kubelet in Travis CI, since everything works in Docker locally. | Debug kubelet in Travis CI, since everything works in Docker locally.
| YAML | mit | geerlingguy/raspberry-pi-dramble,geerlingguy/raspberry-pi-dramble | yaml | ## Code Before:
---
services: docker
addons:
hosts:
- cluster.pidramble.test
- registry.pidramble.test
- kube1
install:
- docker pull geerlingguy/docker-debian10-ansible:latest
- cp example.config.yml config.yml
script:
# - "travis_wait 30 ./testing/docker/docker-playbook-test.sh"
- ./testing/d... |
3af0ea079e7710f16599de9565c9c9f07f666d4c | lib/ui/views/targetSelector.js | lib/ui/views/targetSelector.js | /*
* Copyright 2014 BlackBerry Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | /*
* Copyright 2014 BlackBerry Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | Fix target selector for imported projects | Fix target selector for imported projects
| JavaScript | apache-2.0 | blackberry/webworks-gui,blackberry-webworks/webworks-gui,blackberry/webworks-gui,blackberry-webworks/webworks-gui | javascript | ## Code Before:
/*
* Copyright 2014 BlackBerry Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... |
49750a5dd59b07c38186864a0f02d86df48e942d | spec/jsonapi-params/param_spec.rb | spec/jsonapi-params/param_spec.rb | require 'spec_helper'
describe JSONAPI::Param do
it 'has a version number' do
expect(JSONAPI::Param::VERSION).not_to be nil
end
end
| require 'spec_helper'
describe JSONAPI::Param do
it 'has a version number' do
expect(JSONAPI::Param::VERSION).not_to be nil
end
describe '.param' do
class GenderParam
include JSONAPI::Param
end
class FakeParam
include JSONAPI::Param
param :name
param :full_name
b... | Add some tests for param library | Add some tests for param library
| Ruby | mit | Noverde/jsonapi-params,Noverde/jsonapi-params | ruby | ## Code Before:
require 'spec_helper'
describe JSONAPI::Param do
it 'has a version number' do
expect(JSONAPI::Param::VERSION).not_to be nil
end
end
## Instruction:
Add some tests for param library
## Code After:
require 'spec_helper'
describe JSONAPI::Param do
it 'has a version number' do
expect(JSONA... |
3be55e3e983b3fdd8b0c96b3f67e2e8aa67066e3 | demo/demo.html | demo/demo.html | <html>
<head>
<link href="https://rawgithub.com/hayageek/jquery-upload-file/master/css/uploadfile.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../js/jquery.uploadfile.js"></script>
</head>
<body>
<div id="fileuploader">Upload</div>
<script>
... | <html>
<head>
<link href="https://rawgithub.com/hayageek/jquery-upload-file/master/css/uploadfile.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="https://rawgithub.com/hayageek/jquery-upload-file/master/js/jquery.uploadfile.min.js"></script>
</... | Remove relative path, return absolute | Remove relative path, return absolute
| HTML | mit | hayageek/jquery-upload-file,hayageek/jquery-upload-file,hayageek/jquery-upload-file,hayageek/jquery-upload-file,hayageek/jquery-upload-file | html | ## Code Before:
<html>
<head>
<link href="https://rawgithub.com/hayageek/jquery-upload-file/master/css/uploadfile.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../js/jquery.uploadfile.js"></script>
</head>
<body>
<div id="fileuploader">Upload... |
73509eb4af678743208fc26ec3dd0685a6feff6e | jenkins/jobs/infra-publish-jobs.yaml | jenkins/jobs/infra-publish-jobs.yaml | - job-template:
name: '{name}-infra-docs'
node: '{node}'
builders:
- revoke-sudo
- gerrit-git-prep
- docs
publishers:
- console-log
- ftp:
site: '{doc-publisher-site}'
source: 'doc/build/html/**'
target: 'infra/{doc-publisher-... | - job-template:
name: '{name}-infra-docs'
node: '{node}'
builders:
- revoke-sudo
- gerrit-git-prep
- docs
publishers:
- console-log
- ftp:
site: '{doc-publisher-site}'
source: 'doc/build/html/**'
target: 'infra/{doc-publisher-... | Correct output path for infra-site index | Correct output path for infra-site index
Change-Id: I085842559516c53b8d6f5d9005d768055591af43
| YAML | apache-2.0 | citrix-openstack/project-config,coolsvap/project-config,dongwenjuan/project-config,Tesora/tesora-project-config,anbangr/osci-project-config,Tesora/tesora-project-config,noorul/os-project-config,noorul/os-project-config,coolsvap/project-config,openstack-infra/project-config,openstack-infra/project-config,citrix-openstac... | yaml | ## Code Before:
- job-template:
name: '{name}-infra-docs'
node: '{node}'
builders:
- revoke-sudo
- gerrit-git-prep
- docs
publishers:
- console-log
- ftp:
site: '{doc-publisher-site}'
source: 'doc/build/html/**'
target: 'infra... |
eff964de26423e9f868ed2ab709e580dd35f7d7b | lib/console_game_engine.rb | lib/console_game_engine.rb | $: << File.dirname(__FILE__)
require 'game_engine'
class ConsoleGameEngine < GameEngine
attr_reader :ui
def initialize(args)
@ttt_board = args.fetch(:ttt_board, nil)
@rules = args.fetch(:rules, nil)
@player_1 = args.fetch(:player_1, nil)
@player_2 = args.fetch(:player_2, nil)
@ui = args.fetch... | $: << File.dirname(__FILE__)
require 'game_engine'
class ConsoleGameEngine < GameEngine
attr_reader :ui
def initialize(args)
super
@ui = args.fetch(:ui, nil)
end
def alternate_move
ui.prompt_user_for_input(ttt_board)
index_position = ui.get_user_input
if @ttt_board.valid_move?(index_posi... | Refactor and removed instance variables | Refactor and removed instance variables
| Ruby | mit | portatlas/tictactoe,portatlas/tictactoe | ruby | ## Code Before:
$: << File.dirname(__FILE__)
require 'game_engine'
class ConsoleGameEngine < GameEngine
attr_reader :ui
def initialize(args)
@ttt_board = args.fetch(:ttt_board, nil)
@rules = args.fetch(:rules, nil)
@player_1 = args.fetch(:player_1, nil)
@player_2 = args.fetch(:player_2, nil)
... |
5e1012ddcc980c32be9ebbb002daad8d5c5476b7 | app/controllers/passwords_controller.rb | app/controllers/passwords_controller.rb | class PasswordsController < Devise::PasswordsController
def new
super
end
def create
if params[:user] and params[:user][:email] and User.where(:email => params[:user][:email]).first.blank?
flash[:alert] = "Email is not in the system"
else
super
end
end
protected
def after_send... | class PasswordsController < Devise::PasswordsController
def new
super
end
def create
if params[:user] and params[:user][:email] and User.where(:email => params[:user][:email]).first.blank?
flash[:alert] = "Email is not in the system"
else
super
end
flash.discard
end
protecte... | Update PasswordsController to Discard Flash | Update PasswordsController to Discard Flash
Discard the flash message in the Passwords Controller in order to ensure
that the flash alert is not displayed for follow-on modals.
| Ruby | mit | jekhokie/IfSimply,jekhokie/IfSimply,jekhokie/IfSimply | ruby | ## Code Before:
class PasswordsController < Devise::PasswordsController
def new
super
end
def create
if params[:user] and params[:user][:email] and User.where(:email => params[:user][:email]).first.blank?
flash[:alert] = "Email is not in the system"
else
super
end
end
protected
... |
ad7060b2a267237641e76a193aa4ab5810bdd9bc | .travis.yml | .travis.yml | language: elixir
elixir:
- 1.0
otp_release:
- 17.0
| language: elixir
elixir:
- 1.0.5
- 1.1.0
- 1.2.0
otp_release:
- 18.0
- 18.1
env: MIX_ENV=test
sudo: false # faster builds
notifications:
email: false
script:
- mix compile --warnings-as-errors
- mix test
| Test more thoroughly on CI | Test more thoroughly on CI
| YAML | mit | slime-lang/phoenix_slime,doomspork/phoenix_slim | yaml | ## Code Before:
language: elixir
elixir:
- 1.0
otp_release:
- 17.0
## Instruction:
Test more thoroughly on CI
## Code After:
language: elixir
elixir:
- 1.0.5
- 1.1.0
- 1.2.0
otp_release:
- 18.0
- 18.1
env: MIX_ENV=test
sudo: false # faster builds
notifications:
email: false
script:
- mix compi... |
b76051fb087ecd8276151f1e38df04484f96971a | test/models/config_test.rb | test/models/config_test.rb | require 'test_helper'
# A place to put tests related to the overall RoR configuration
class ConfigTest < UnitTestCase
# Not sure why we are testing this.
# Used to be false, but it's true with Rails 3
# But it's false again in Rails 4
def test_has_xml_parser
assert(ActionDispatch::ParamsParser::DEFAULT_PA... | require "test_helper"
# A place to put tests related to the overall RoR configuration
class ConfigTest < UnitTestCase
end
| Fix final issue for model tests delete useless test (test_has_xml_parser) | Fix final issue for model tests
delete useless test (test_has_xml_parser)
| Ruby | mit | MushroomObserver/mushroom-observer,MushroomObserver/mushroom-observer,raysuelzer/mushroom-observer,raysuelzer/mushroom-observer,pellaea/mushroom-observer,pellaea/mushroom-observer,MushroomObserver/mushroom-observer,pellaea/mushroom-observer,JoeCohen/mushroom-observer,pellaea/mushroom-observer,raysuelzer/mushroom-observ... | ruby | ## Code Before:
require 'test_helper'
# A place to put tests related to the overall RoR configuration
class ConfigTest < UnitTestCase
# Not sure why we are testing this.
# Used to be false, but it's true with Rails 3
# But it's false again in Rails 4
def test_has_xml_parser
assert(ActionDispatch::ParamsPa... |
715d64c15beeeec92fcd03f787930c295688962c | .gitlab-ci.yml | .gitlab-ci.yml | image: registry.gitlab.com/matteobachetti/heasarc_pipelines:latest
before_script: # configure a headless display to test plot generation
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
test:3.5:
stage: test
script:
- source activate py35
- conda install h... | image: registry.gitlab.com/matteobachetti/docker_image_for_tests:latest
before_script: # configure a headless display to test plot generation
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
test:3.5:
stage: test
script:
- source activate py35
- conda inst... | Use official docker image for tests | Use official docker image for tests
| YAML | bsd-3-clause | matteobachetti/srt-single-dish-tools | yaml | ## Code Before:
image: registry.gitlab.com/matteobachetti/heasarc_pipelines:latest
before_script: # configure a headless display to test plot generation
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
test:3.5:
stage: test
script:
- source activate py35
-... |
e8ba7bbfbe18dfc992d48ce5a269e4afed577152 | bower.json | bower.json | {
"name": "ember-c3",
"version": "0.1.2",
"dependencies": {
"ember": "^1.4.0",
"handlebars": "^1.3.0",
"c3": ">=0.1.43-0 < 1.0.0-0"
},
"devDependencies": {
"ember-mocha-adapter": "0.1.2",
"ember-data": "^1.0.0-beta.5",
"bootstrap": "~3.1.1",
"jsoneditor": "~2.3.6",
"ember-jsone... | {
"name": "ember-c3",
"version": "0.1.2",
"dependencies": {
"ember": "^1.4.0",
"c3": ">=0.1.43-0 < 1.0.0-0"
},
"devDependencies": {
"ember-mocha-adapter": "0.1.2",
"ember-data": "^1.0.0-beta.5",
"bootstrap": "~3.1.1",
"jsoneditor": "~2.3.6",
"ember-jsoneditor": "~0.1.0"
},
"ign... | Remove handlebars version restriction to allow upgrading ember to 1.9.0+ | Remove handlebars version restriction to allow upgrading ember to 1.9.0+ | JSON | mit | Serabe/ember-c3,Glavin001/ember-c3,SecuraSeal/ember-c3,knownasilya/ember-c3,raphaelgera/ember-c3,SecuraSeal/ember-c3,Glavin001/ember-c3,raphaelgera/ember-c3,Serabe/ember-c3,knownasilya/ember-c3 | json | ## Code Before:
{
"name": "ember-c3",
"version": "0.1.2",
"dependencies": {
"ember": "^1.4.0",
"handlebars": "^1.3.0",
"c3": ">=0.1.43-0 < 1.0.0-0"
},
"devDependencies": {
"ember-mocha-adapter": "0.1.2",
"ember-data": "^1.0.0-beta.5",
"bootstrap": "~3.1.1",
"jsoneditor": "~2.3.6",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.