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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
eaa4de2ecbcf29c9e56ebf2fa69099055e469fbc | tests/test_conversion.py | tests/test_conversion.py | from asciisciit import conversions as conv
import numpy as np
def test_lookup_method_equivalency():
img = np.random.randint(0, 255, (300,300), dtype=np.uint8)
pil_ascii = conv.apply_lut_pil(img)
np_ascii = conv.apply_lut_numpy(img)
assert(pil_ascii == np_ascii)
pil_ascii = conv.apply_lut_pil(img... | import itertools
from asciisciit import conversions as conv
import numpy as np
import pytest
@pytest.mark.parametrize("invert,equalize,lut,lookup_func",
itertools.product((True, False),
(True, False),
("simp... | Add tests to minimally exercise basic conversion functionality | Add tests to minimally exercise basic conversion functionality
| Python | mit | derricw/asciisciit | python | ## Code Before:
from asciisciit import conversions as conv
import numpy as np
def test_lookup_method_equivalency():
img = np.random.randint(0, 255, (300,300), dtype=np.uint8)
pil_ascii = conv.apply_lut_pil(img)
np_ascii = conv.apply_lut_numpy(img)
assert(pil_ascii == np_ascii)
pil_ascii = conv.a... |
23b8aad3bb299284ce74f328cbb013ea24e152e5 | db/migrate/20130311140347_create_continuous_trait_values.rb | db/migrate/20130311140347_create_continuous_trait_values.rb | class CreateContinuousTraitValues < ActiveRecord::Migration
def change
create_table :continuous_trait_values do |t|
t.integer :position
t.references :otu
t.references :continuous_trait
t.float
t.timestamps
end
end
end
| class CreateContinuousTraitValues < ActiveRecord::Migration
def change
create_table :continuous_trait_values do |t|
t.references :otu
t.references :continuous_trait
t.float
t.timestamps
end
end
end
| Remove position from continuous trait | Remove position from continuous trait
| Ruby | mit | NESCent/TraitDB,NESCent/TraitDB,NESCent/TraitDB | ruby | ## Code Before:
class CreateContinuousTraitValues < ActiveRecord::Migration
def change
create_table :continuous_trait_values do |t|
t.integer :position
t.references :otu
t.references :continuous_trait
t.float
t.timestamps
end
end
end
## Instruction:
Remove position from contin... |
7be606951b22d77a53274d014cd94aae30af93f5 | samples/oauth2_for_devices.py | samples/oauth2_for_devices.py |
import httplib2
from six.moves import input
from oauth2client.client import OAuth2WebServerFlow
from googleapiclient.discovery import build
CLIENT_ID = "some+client+id"
CLIENT_SECRET = "some+client+secret"
SCOPES = ("https://www.googleapis.com/auth/youtube",)
flow = OAuth2WebServerFlow(CLIENT_ID, CLIENT_SECRET, " ".... |
import httplib2
from six.moves import input
from oauth2client.client import OAuth2WebServerFlow
from googleapiclient.discovery import build
CLIENT_ID = "some+client+id"
CLIENT_SECRET = "some+client+secret"
SCOPES = ("https://www.googleapis.com/auth/youtube",)
flow = OAuth2WebServerFlow(CLIENT_ID, CLIENT_SECRET, " ".... | Fix example to be Python3 compatible, use format() | Fix example to be Python3 compatible, use format()
Both print() and format() are compatible from 2.6. Also, format() is much nicer to use for internationalization since you can define the location of your substitutions. It works similarly to Java and .net's format() as well. Great stuff!
Should I tackle the other e... | Python | apache-2.0 | googleapis/oauth2client,jonparrott/oauth2client,google/oauth2client,jonparrott/oauth2client,clancychilds/oauth2client,googleapis/oauth2client,google/oauth2client,clancychilds/oauth2client | python | ## Code Before:
import httplib2
from six.moves import input
from oauth2client.client import OAuth2WebServerFlow
from googleapiclient.discovery import build
CLIENT_ID = "some+client+id"
CLIENT_SECRET = "some+client+secret"
SCOPES = ("https://www.googleapis.com/auth/youtube",)
flow = OAuth2WebServerFlow(CLIENT_ID, CLI... |
0fa23851cbe33ba0d3bddb8367d7089545de6847 | setup.py | setup.py |
from distutils.core import setup
setup(
name = 'qless-py',
version = '0.10.0',
description = 'Redis-based Queue Management',
long_description = '''
Redis-based queue management, with heartbeating, job tracking,
stats, notifications, and a whole lot more.''',
... |
from distutils.core import setup
setup(
name = 'qless-py',
version = '0.10.0',
description = 'Redis-based Queue Management',
long_description = '''
Redis-based queue management, with heartbeating, job tracking,
stats, notifications, and a whole lot more.''',
... | Fix for "No module named decorator" on fresh environment installs. | Fix for "No module named decorator" on fresh environment installs.
Fixes regression from 4b26b5837ced0c2f76495b05b87e63e05f81c2af.
| Python | mit | seomoz/qless-py,seomoz/qless-py | python | ## Code Before:
from distutils.core import setup
setup(
name = 'qless-py',
version = '0.10.0',
description = 'Redis-based Queue Management',
long_description = '''
Redis-based queue management, with heartbeating, job tracking,
stats, notifications, and a whole... |
1ee1499dbfbb61cf6c9dc63098d1c94134936699 | src/main/java/net/brutus5000/bireus/service/NotificationService.java | src/main/java/net/brutus5000/bireus/service/NotificationService.java | package net.brutus5000.bireus.service;
import org.jgrapht.GraphPath;
import org.jgrapht.graph.DefaultEdge;
import java.net.URL;
import java.nio.file.Path;
public interface NotificationService {
void error(String message);
void beginCheckoutVersion(String version);
void finishCheckoutVersion(String vers... | package net.brutus5000.bireus.service;
import org.jgrapht.GraphPath;
import org.jgrapht.graph.DefaultEdge;
import java.net.URL;
import java.nio.file.Path;
public interface NotificationService {
default void error(String message) {
}
default void beginCheckoutVersion(String version) {
}
default ... | Add empty default implementations for notification service | Add empty default implementations for notification service
| Java | mit | Brutus5000/BiReUS-JCL | java | ## Code Before:
package net.brutus5000.bireus.service;
import org.jgrapht.GraphPath;
import org.jgrapht.graph.DefaultEdge;
import java.net.URL;
import java.nio.file.Path;
public interface NotificationService {
void error(String message);
void beginCheckoutVersion(String version);
void finishCheckoutVer... |
c7518e9d9187ba91e96fb52f8014bc8a6d08d763 | lib/cloud_cost_tracker.rb | lib/cloud_cost_tracker.rb | require 'active_record'
require 'logger'
# Load all ruby files from 'cloud_cost_tracker' directory
Dir[File.join(File.dirname(__FILE__), "cloud_cost_tracker/**/*.rb")].each {|f| require f}
| require 'active_record'
require 'logger'
# Load all ruby files from 'cloud_cost_tracker' directory
Dir[File.join(File.dirname(__FILE__), "cloud_cost_tracker/**/*.rb")].each {|f| require f}
module CloudCostTracker
# Creates and returns an appropriate instance of ResourceBillingPolicy
# for billing the given +reso... | Add static module function for mapping resources to their Billing Policy class | Add static module function for mapping resources to their Billing Policy class | Ruby | mit | benton/cloud_cost_tracker | ruby | ## Code Before:
require 'active_record'
require 'logger'
# Load all ruby files from 'cloud_cost_tracker' directory
Dir[File.join(File.dirname(__FILE__), "cloud_cost_tracker/**/*.rb")].each {|f| require f}
## Instruction:
Add static module function for mapping resources to their Billing Policy class
## Code After:
req... |
fe87adc4d4567f2c162a5bffb97f21c7d819550c | admin/app/views/transactions/forms/_delete.html.erb | admin/app/views/transactions/forms/_delete.html.erb | <%= form_tag("/generate_delete_transaction", remote: true) do %>
<%= text_field_tag 'public_key', creator_address, hidden: true %>
<%= text_field_tag 'payload', payload, hidden: true %>
<%= text_field_tag 'priv_key', private_key, hidden: true %>
<%= submit_tag submit_name, class: "btn btn-default", data: { disa... | <%= form_tag("/generate_delete_transaction", remote: true) do %>
<%= text_field_tag 'public_key', creator_address, hidden: true %>
<%= text_field_tag 'payload', payload, hidden: true %>
<%= text_field_tag 'priv_key', private_key, hidden: true %>
<%= submit_tag submit_name, class: "btn btn-default", data: { disa... | Fix disable messages after name changes | Fix disable messages after name changes
| HTML+ERB | mit | bitcoupon/bitcoupon-on-rails,bitcoupon/bitcoupon-on-rails,bitcoupon/bitcoupon-on-rails,bitcoupon/bitcoupon-on-rails | html+erb | ## Code Before:
<%= form_tag("/generate_delete_transaction", remote: true) do %>
<%= text_field_tag 'public_key', creator_address, hidden: true %>
<%= text_field_tag 'payload', payload, hidden: true %>
<%= text_field_tag 'priv_key', private_key, hidden: true %>
<%= submit_tag submit_name, class: "btn btn-defaul... |
1b6ebc4b0e547f77ee112e99679510f35a3ebaef | ros-qi/README.md | ros-qi/README.md |
Docker image with both ros and pynaoqi installed.
This is used for automatic testing and packaging.
### Development
Download `pynaoqi-python2.7-2.5.5.5-linux64.tar.gz` into this folder.
Build the image:
docker build -t magiclab/ros-qi .
Upload the image:
docker push magiclab/ros-qi
### Usage
- Run ro... |
Docker image with both ros and pynaoqi installed.
This is used for automatic testing and packaging.
### Development
Clone this repository (the git command below is easier, but if you don't have git you can also just [download](https://github.com/uts-magic-lab/ros-docker/archive/master.zip), unzip and then change to... | Make the installation steps easier for beginners | Make the installation steps easier for beginners | Markdown | mit | uts-magic-lab/ros-docker,uts-magic-lab/ros-docker | markdown | ## Code Before:
Docker image with both ros and pynaoqi installed.
This is used for automatic testing and packaging.
### Development
Download `pynaoqi-python2.7-2.5.5.5-linux64.tar.gz` into this folder.
Build the image:
docker build -t magiclab/ros-qi .
Upload the image:
docker push magiclab/ros-qi
###... |
eb6af1919567f5cbef13a1cb5ccaa642742dcb48 | .travis.yml | .travis.yml | language: php
php:
- 5.5
- 5.6
- hhvm-nightly
matrix:
allow_failures:
- php: hhvm-nightly
services:
- redis-server
- mongodb
- rabbitmq
before_install:
- sudo apt-get update
before_script:
- echo "no" | pecl install apcu-beta
- echo "extension = mongo.so" >> ~/.phpen... | language: php
php:
- 5.5
- 5.6
- hhvm-nightly
matrix:
allow_failures:
- php: hhvm-nightly
services:
- redis-server
- mongodb
- rabbitmq
before_install:
- sudo apt-get update
before_script:
- echo "no" | pecl install apcu-beta
- echo "extension = mongo.so" >> ~/.phpen... | Remove not used instruction for now | Remove not used instruction for now
| YAML | mit | mickaelandrieu/certificationy-web-platform,ProPheT777/certificationy-web-platform,ProPheT777/certificationy-web-platform,mickaelandrieu/certificationy-web-platform,Flagbit/certificationy-web-platform,mickaelandrieu/certificationy-web-platform,mickaelandrieu/certificationy-web-platform,ProPheT777/certificationy-web-plat... | yaml | ## Code Before:
language: php
php:
- 5.5
- 5.6
- hhvm-nightly
matrix:
allow_failures:
- php: hhvm-nightly
services:
- redis-server
- mongodb
- rabbitmq
before_install:
- sudo apt-get update
before_script:
- echo "no" | pecl install apcu-beta
- echo "extension = mongo... |
88e1a926a2da832f58b4d1d9e14b9ad062c9ef69 | core/build.gradle.kts | core/build.gradle.kts | import org.jetbrains.configureBintrayPublication
plugins {
`maven-publish`
id("com.jfrog.bintray")
}
dependencies {
api(project(":coreDependencies", configuration = "shadow"))
val kotlin_version: String by project
api("org.jetbrains.kotlin:kotlin-compiler:$kotlin_version")
implementation("org... | import org.jetbrains.configureBintrayPublication
plugins {
`maven-publish`
id("com.jfrog.bintray")
}
dependencies {
api(project(":coreDependencies", configuration = "shadow"))
val kotlin_version: String by project
api("org.jetbrains.kotlin:kotlin-compiler:$kotlin_version")
implementation("org... | Fix building, we still need jsoup in the core for HtmlParser | Fix building, we still need jsoup in the core for HtmlParser
| Kotlin | apache-2.0 | Kotlin/dokka,Kotlin/dokka,Kotlin/dokka,Kotlin/dokka,Kotlin/dokka,Kotlin/dokka | kotlin | ## Code Before:
import org.jetbrains.configureBintrayPublication
plugins {
`maven-publish`
id("com.jfrog.bintray")
}
dependencies {
api(project(":coreDependencies", configuration = "shadow"))
val kotlin_version: String by project
api("org.jetbrains.kotlin:kotlin-compiler:$kotlin_version")
imp... |
a88c98db78cd16a44fe6c060e1bb940f8b33a8f6 | subprojects/demo-javafx/combined/src/main/groovy/com/canoo/dolphin/demo/InMemoryConfig.groovy | subprojects/demo-javafx/combined/src/main/groovy/com/canoo/dolphin/demo/InMemoryConfig.groovy | package com.canoo.dolphin.demo
import com.canoo.dolphin.LogConfig
import com.canoo.dolphin.core.client.comm.InMemoryClientConnector
import com.canoo.dolphin.core.server.comm.Receiver
import com.canoo.dolphin.core.server.action.StoreAttributeAction
import com.canoo.dolphin.core.server.action.StoreValueChangeAction
imp... | package com.canoo.dolphin.demo
import com.canoo.dolphin.LogConfig
import com.canoo.dolphin.core.client.comm.InMemoryClientConnector
import com.canoo.dolphin.core.server.comm.Receiver
import com.canoo.dolphin.core.server.action.StoreAttributeAction
import com.canoo.dolphin.core.server.action.StoreValueChangeAction
imp... | Use JavaFXUiThreadHandler instead of ad-hoc proxied closure | Use JavaFXUiThreadHandler instead of ad-hoc proxied closure
| Groovy | apache-2.0 | canoo/open-dolphin,DaveKriewall/open-dolphin,DaveKriewall/open-dolphin,nagyistoce/open-dolphin,Poundex/open-dolphin,Poundex/open-dolphin,gemaSantiago/open-dolphin,canoo/open-dolphin,nagyistoce/open-dolphin,Poundex/open-dolphin,janih/open-dolphin,gemaSantiago/open-dolphin,janih/open-dolphin,janih/open-dolphin,Poundex/op... | groovy | ## Code Before:
package com.canoo.dolphin.demo
import com.canoo.dolphin.LogConfig
import com.canoo.dolphin.core.client.comm.InMemoryClientConnector
import com.canoo.dolphin.core.server.comm.Receiver
import com.canoo.dolphin.core.server.action.StoreAttributeAction
import com.canoo.dolphin.core.server.action.StoreValue... |
db14ed2c23b3838796e648faade2c73b786d61ff | tartpy/eventloop.py | tartpy/eventloop.py |
import queue
import sys
import threading
import time
import traceback
from .singleton import Singleton
def _format_exception(exc_info):
"""Create a message with details on the exception."""
exc_type, exc_value, exc_tb = exc_info
return {'exception': {'type': exc_type,
'value': ... |
import queue
import sys
import threading
import time
import traceback
from .singleton import Singleton
def exception_message():
"""Create a message with details on the exception."""
exc_type, exc_value, exc_tb = exc_info = sys.exc_info()
return {'exception': {'type': exc_type,
... | Make exception message builder a nicer function | Make exception message builder a nicer function
It is used by clients in other modules. | Python | mit | waltermoreira/tartpy | python | ## Code Before:
import queue
import sys
import threading
import time
import traceback
from .singleton import Singleton
def _format_exception(exc_info):
"""Create a message with details on the exception."""
exc_type, exc_value, exc_tb = exc_info
return {'exception': {'type': exc_type,
... |
0b450077fc6372acc7cfd873ba5cdf8c9dad8866 | _labs/01-setup.md | _labs/01-setup.md | ---
layout: lab
number: 1
title: "Setup"
---
### Goals
To setup Docker on your machine.
## Install Docker
[Install Docker](https://www.docker.com/products/docker) by following the
official installation instructions for your platform.
## Test Your Installation
To make sure that the installation worked, run the fol... | ---
layout: lab
number: 1
title: "Setup"
---
### Goals
To setup Docker on your machine.
## Install Docker
Install Docker CE for
[Windows](https://docs.docker.com/docker-for-windows/install/),
[Mac](https://docs.docker.com/docker-for-mac/install/), or
[Linux](https://docs.docker.com/engine/installation/linux/docker-... | Update Docker CE Download Links | Update Docker CE Download Links
| Markdown | mit | mkasberg/container-immersion,mkasberg/container-immersion | markdown | ## Code Before:
---
layout: lab
number: 1
title: "Setup"
---
### Goals
To setup Docker on your machine.
## Install Docker
[Install Docker](https://www.docker.com/products/docker) by following the
official installation instructions for your platform.
## Test Your Installation
To make sure that the installation wor... |
53b390d4938be2e2bad0c8c744645b8e575d4140 | lib/slack-notify.rb | lib/slack-notify.rb | require "slack-notify/version"
require "slack-notify/error"
require "json"
require "faraday"
module SlackNotify
class Client
def initialize(team, token, options={})
@team = team
@token = token
@username = options[:username] || "webhookbot"
@channel = options[:channel] || "#genera... | require "slack-notify/version"
require "slack-notify/error"
require "json"
require "faraday"
module SlackNotify
class Client
def initialize(team, token, options={})
@team = team
@token = token
@username = options[:username] || "webhookbot"
@channel = options[:channel] || "#genera... | Allow to send to multiple channels | Allow to send to multiple channels
| Ruby | mit | sosedoff/slack-notify | ruby | ## Code Before:
require "slack-notify/version"
require "slack-notify/error"
require "json"
require "faraday"
module SlackNotify
class Client
def initialize(team, token, options={})
@team = team
@token = token
@username = options[:username] || "webhookbot"
@channel = options[:chan... |
69c267c89deb238be0acb5db75e456b6980fc996 | scanblog/requirements.txt | scanblog/requirements.txt | django>1.5
psycopg2
django-registration
Celery
django-celery
pyPdf
pillow<2.0.0
amqplib
fabric
django-bcrypt
python-magic
django_compressor
sorl-thumbnail
python-memcached
-e git+https://github.com/yourcelf/django-notification@8bd0d787ed1842540d6152d92ca542e7ef6df661#egg=django_notification-dev
django-pagination
-e git... | django>1.5
psycopg2
django-registration
Celery
django-celery
pyPdf
pillow<2.0.0
amqplib
fabric
django-bcrypt
python-magic
django_compressor
sorl-thumbnail
python-memcached
-e git+https://github.com/yourcelf/django-notification.git@2b61f91a331eb22b8103f7a9bade00f8b117b279#egg=django_notification
django-pagination
-e git... | Increment django-notification to avoid dep-warning | Increment django-notification to avoid dep-warning
We're going to stay pinned to an old fork of django-notification
(variant of v0.2.0) because the current (v1.x) does away with the Notice
model and radically changes other things in a way that would require us
to basically rewrite django-notification's backends to sup... | Text | agpl-3.0 | flexpeace/btb,flexpeace/btb,yourcelf/btb,yourcelf/btb,yourcelf/btb,yourcelf/btb,flexpeace/btb,flexpeace/btb,flexpeace/btb,yourcelf/btb | text | ## Code Before:
django>1.5
psycopg2
django-registration
Celery
django-celery
pyPdf
pillow<2.0.0
amqplib
fabric
django-bcrypt
python-magic
django_compressor
sorl-thumbnail
python-memcached
-e git+https://github.com/yourcelf/django-notification@8bd0d787ed1842540d6152d92ca542e7ef6df661#egg=django_notification-dev
django-p... |
69ac16b1501f9affa008c68d4b8197b320ae00b8 | cleanup.py | cleanup.py | from collections import defaultdict
import subprocess
import os
KEEP_LAST_VERSIONS = os.environ.get('KEEP_LAST_VERSIONS', 4)
def find_obsolete_images(images):
for image_name, versions in images.items():
if len(versions) > KEEP_LAST_VERSIONS:
obsolete_versions = sorted(versions, reverse=True)[... | from collections import defaultdict
import subprocess
import os
KEEP_LAST_VERSIONS = os.environ.get('KEEP_LAST_VERSIONS', 4)
def find_obsolete_images(images):
for image_name, versions in images.items():
if len(versions) > KEEP_LAST_VERSIONS:
obsolete_versions = sorted(versions, reverse=True)[... | Delete images instead of printing | Delete images instead of printing
| Python | mit | dreipol/cleanup-deis-images,dreipol/cleanup-deis-images | python | ## Code Before:
from collections import defaultdict
import subprocess
import os
KEEP_LAST_VERSIONS = os.environ.get('KEEP_LAST_VERSIONS', 4)
def find_obsolete_images(images):
for image_name, versions in images.items():
if len(versions) > KEEP_LAST_VERSIONS:
obsolete_versions = sorted(versions... |
051743da88c626959f0d5d71b1fbddb594df60c3 | .travis.yml | .travis.yml | language: python
matrix:
include:
- os: linux
dist: trusty
sudo: required
python: '3.6'
install:
- sudo apt-get update
- sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y docker-engine
- docker-compose --version
- sudo rm /usr/local/bin/docker-compose
-... | language: python
matrix:
include:
- os: linux
dist: trusty
sudo: required
python: '3.6'
install:
- sudo apt-get update
- sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y docker-engine
- docker-compose --version
- sudo rm /usr/local/bin/docker-compose
-... | Add show output switch to CI | Add show output switch to CI
| YAML | mit | miniworld-project/miniworld_core,miniworld-project/miniworld_core | yaml | ## Code Before:
language: python
matrix:
include:
- os: linux
dist: trusty
sudo: required
python: '3.6'
install:
- sudo apt-get update
- sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y docker-engine
- docker-compose --version
- sudo rm /usr/local/bin/dock... |
f244ce30d81ab870cde8ed466b36bff7080e5d4a | public/js/language-select.js | public/js/language-select.js | const toArray = nodelist => Array.prototype.slice.call(nodelist);
const things = ['method', 'case', 'organization'];
const languageSelect = {
redirectUrl: null,
isThingDetailsPageWithLanguageParam: false,
init(tracking) {
this.tracking = tracking;
this.generateRedirectPath();
const selectEls = docume... | const toArray = nodelist => Array.prototype.slice.call(nodelist);
const things = ['method', 'case', 'organization'];
const languageSelect = {
redirectUrl: null,
isThingDetailsPageWithLanguageParam: false,
init(tracking) {
this.tracking = tracking;
this.generateRedirectPath();
const selectEls = docume... | Refactor redirectUrl logic of page language selector | Refactor redirectUrl logic of page language selector
| JavaScript | mit | participedia/api,participedia/api,participedia/api,participedia/api | javascript | ## Code Before:
const toArray = nodelist => Array.prototype.slice.call(nodelist);
const things = ['method', 'case', 'organization'];
const languageSelect = {
redirectUrl: null,
isThingDetailsPageWithLanguageParam: false,
init(tracking) {
this.tracking = tracking;
this.generateRedirectPath();
const se... |
17c287d8966313a3a0ce480a53dc0ece01706952 | .travis.yml | .travis.yml | language: cpp
compiler:
- g++
- clang
#before_install: ./scripts/ci/before_install.sh
script: ./scripts/ci/script.sh
notifications:
on_success: always # [always|never|change] # default: change
on_failure: always # [always|never|change] # default: always
irc: "chat.freenode.net#pdal"
# Uncomment and edit... | language: cpp
sudo: required
dist: trusty
compiler:
- g++
- clang
#before_install: ./scripts/ci/before_install.sh
script: ./scripts/ci/script.sh
notifications:
on_success: always # [always|never|change] # default: change
on_failure: always # [always|never|change] # default: always
irc: "chat.freenode.net... | Switch Travis to Trusty 14.04. | Switch Travis to Trusty 14.04.
Upgrades to Trusty 14.04 image, which has cmake 2.8.12. This is compatible with the current build system. | YAML | lgpl-2.1 | hobu/LASzip,gadomski/LASzip,gadomski/LASzip,hobu/LASzip,hobu/LASzip,gadomski/LASzip,Madrich/LASzip,LASzip/LASzip,LASzip/LASzip,Madrich/LASzip,Madrich/LASzip,LASzip/LASzip | yaml | ## Code Before:
language: cpp
compiler:
- g++
- clang
#before_install: ./scripts/ci/before_install.sh
script: ./scripts/ci/script.sh
notifications:
on_success: always # [always|never|change] # default: change
on_failure: always # [always|never|change] # default: always
irc: "chat.freenode.net#pdal"
# Un... |
dd591372351f679ba3aa96f172bd3e80414a9ba7 | init-app.sh | init-app.sh | START_SERVER_TEIM=$(date +%s)
rm -rf app
# copy doc directory
if [ "$APP_ENV" = "development" ]; then
# save symlinks
ln -s build/docs app
else
# resolve symlinks
cp -Lr build/docs app
fi
# copy javascript files
cp build/*.js app/
# copy img, javascript and other files for home page
cp -r home app/home
# c... | set -e
# @log startup time
START_SERVER_TEIM=$(date +%s)
rm -rf app
# copy doc directory
if [ "$APP_ENV" = "development" ]; then
# save symlinks
ln -s build/docs app
else
# resolve symlinks
cp -Lr build/docs app
fi
# copy javascript files
cp build/*.js app/
# copy img, javascript and other files for home p... | Exit immediately if a command exits with a non-zero status | Exit immediately if a command exits with a non-zero status
| Shell | mit | locky-yotun/angular-doc,AngularjsRUS/angular-doc,locky-yotun/angular-doc,locky-yotun/angular-doc,AngularjsRUS/angular-doc,AngularjsRUS/angular-doc,vovka/angular-doc,AlexeyMez/angular-doc,Stopy/angular-doc,Nightquester/angular-doc,Stopy/angular-doc,Nightquester/angular-doc,vovka/angular-doc,Stopy/angular-doc,vovka/angul... | shell | ## Code Before:
START_SERVER_TEIM=$(date +%s)
rm -rf app
# copy doc directory
if [ "$APP_ENV" = "development" ]; then
# save symlinks
ln -s build/docs app
else
# resolve symlinks
cp -Lr build/docs app
fi
# copy javascript files
cp build/*.js app/
# copy img, javascript and other files for home page
cp -r ho... |
5a7bb894e1a132e01ce63f75d7f6ac04eb46c2d1 | resources/app/auth/services/auth.service.ts | resources/app/auth/services/auth.service.ts | export interface IAuthService {
isLoggedIn();
}
export class AuthService {
static NAME = 'AuthService';
constructor(
private $http: ng.IHttpService,
private $window: ng.IWindowService
) {
'ngInject';
}
isLoggedIn() {
return this.$window.localStorage.getItem('token') !== null;
}
stati... | export interface IAuthService {
isLoggedIn();
}
export class AuthService {
static NAME = 'AuthService';
config;
url;
constructor(
private $http: ng.IHttpService,
private $window: ng.IWindowService,
private $httpParamSerializerJQLike: ng.IHttpParamSerializer
) {
'ngInject';
this.config... | Add user login method to AuthService | Add user login method to AuthService
| TypeScript | mit | ibnumalik/ibnumalik.github.io,ibnumalik/ibnumalik.github.io,ibnumalik/ibnumalik.github.io | typescript | ## Code Before:
export interface IAuthService {
isLoggedIn();
}
export class AuthService {
static NAME = 'AuthService';
constructor(
private $http: ng.IHttpService,
private $window: ng.IWindowService
) {
'ngInject';
}
isLoggedIn() {
return this.$window.localStorage.getItem('token') !== nu... |
80b3e1f8e949d9180f631a04e98462212e10cb58 | app/views/accounts/_form.html.haml | app/views/accounts/_form.html.haml | = semantic_form_for @account do |f|
= f.semantic_errors
= f.inputs do
= f.input :code, :input_html => {:size => 6}
= f.input :title
= f.input :account_type
= f.buttons do
= f.commit_button
| = semantic_form_for @account do |f|
= f.semantic_errors
= f.inputs do
= f.input :code, :input_html => {:size => 6}
= f.input :title
= f.input :account_type, :input_html => {:class => 'combobox'}
= f.buttons do
= f.commit_button
| Use nicer dropdown field for account type | Use nicer dropdown field for account type
| Haml | agpl-3.0 | gaapt/bookyt,gaapt/bookyt,silvermind/bookyt,xuewenfei/bookyt,silvermind/bookyt,wtag/bookyt,xuewenfei/bookyt,hauledev/bookyt,silvermind/bookyt,gaapt/bookyt,silvermind/bookyt,wtag/bookyt,xuewenfei/bookyt,hauledev/bookyt,hauledev/bookyt,huerlisi/bookyt,huerlisi/bookyt,gaapt/bookyt,huerlisi/bookyt,wtag/bookyt,hauledev/book... | haml | ## Code Before:
= semantic_form_for @account do |f|
= f.semantic_errors
= f.inputs do
= f.input :code, :input_html => {:size => 6}
= f.input :title
= f.input :account_type
= f.buttons do
= f.commit_button
## Instruction:
Use nicer dropdown field for account type
## Code After:
= semantic_form_fo... |
715ef04c6ec512715565a1282a9c814f8af64624 | roles/postfix/tasks/mail.yml | roles/postfix/tasks/mail.yml | ---
- name: root alias to kradalby
action: lineinfile dest=/etc/aliases regexp='^root:' line='root:kradalby' state=present
- name: add mail alias to kradalby
action: lineinfile dest=/etc/aliases regexp="^kradalby:" line="kradalby:kradalby@kradalby.no" state=present
- name: run newalias
shell: newaliases
- name... | ---
- name: root alias to kradalby
action: lineinfile dest=/etc/aliases regexp='^root:' line='root:kradalby' state=present
- name: add mail alias to kradalby
action: lineinfile dest=/etc/aliases regexp="^kradalby:" line="kradalby:kradalby@kradalby.no" state=present
- name: set mailname
template: src=mailname.j2... | Fix order of postfix job, resolve raise condition | Fix order of postfix job, resolve raise condition
| YAML | mit | kradalby/plays,kradalby/plays | yaml | ## Code Before:
---
- name: root alias to kradalby
action: lineinfile dest=/etc/aliases regexp='^root:' line='root:kradalby' state=present
- name: add mail alias to kradalby
action: lineinfile dest=/etc/aliases regexp="^kradalby:" line="kradalby:kradalby@kradalby.no" state=present
- name: run newalias
shell: ne... |
115fcc308f0c1b70e691974f92c39935c4ec0956 | chrome/browser/resources/pdf/manifest.json | chrome/browser/resources/pdf/manifest.json | {
// chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai
"manifest_version": 2,
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDN6hM0rsDYGbzQPQfOygqlRtQgKUXMfnSjhIBL7LnReAVBEd7ZmKtyN2qmSasMl4HZpMhVe2rPWVVwBDl6iyNE/Kok6E6v6V3vCLGsOpQAuuNVye/3QxzIldzG/jQAdWZiyXReRVapOhZtLjGfywCvlWq7Sl/e3sbc0vWybSDI2QIDAQAB",
"name... | {
// chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai
"manifest_version": 2,
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDN6hM0rsDYGbzQPQfOygqlRtQgKUXMfnSjhIBL7LnReAVBEd7ZmKtyN2qmSasMl4HZpMhVe2rPWVVwBDl6iyNE/Kok6E6v6V3vCLGsOpQAuuNVye/3QxzIldzG/jQAdWZiyXReRVapOhZtLjGfywCvlWq7Sl/e3sbc0vWybSDI2QIDAQAB",
"name... | Allow the PDF extension to be run in incognito mode. | Allow the PDF extension to be run in incognito mode.
This allows PDF to be run in incognito mode but changing the incognito manifest key to "split". This causes a new process to be loaded for the extension in incognito. This is a requirement for doing top level navigations to an extension in incognito mode as per http... | JSON | bsd-3-clause | markYoungH/chromium.src,dushu1203/chromium.src,ltilve/chromium,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,M4sse/chromium.src,jaruba/chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,dushu1203/chromium.src,littlstar/c... | json | ## Code Before:
{
// chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai
"manifest_version": 2,
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDN6hM0rsDYGbzQPQfOygqlRtQgKUXMfnSjhIBL7LnReAVBEd7ZmKtyN2qmSasMl4HZpMhVe2rPWVVwBDl6iyNE/Kok6E6v6V3vCLGsOpQAuuNVye/3QxzIldzG/jQAdWZiyXReRVapOhZtLjGfywCvlWq7Sl/e3sbc0vWybSDI2Q... |
c0ab8fc353a472d23b7cb98366ef9d16e593725f | structs.go | structs.go | package main
import (
"github.com/aws/aws-sdk-go/service/cloudwatchevents"
)
type Rules struct {
Rules []Rule
}
type Rule struct {
Description string `yaml:"description"`
EventPattern string `yaml:"event_pattern"`
Name string `yaml:"name"`
ScheduleExpres... | package main
import (
"github.com/aws/aws-sdk-go/service/cloudwatchevents"
)
type Rules struct {
Rules []Rule
}
type Rule struct {
Description string `yaml:"description"`
EventPattern string `yaml:"event_pattern"`
Name string `yaml:"name"`
ScheduleExpres... | Store actual target for actual rule in rule struct | Store actual target for actual rule in rule struct
| Go | mit | unasuke/maekawa | go | ## Code Before:
package main
import (
"github.com/aws/aws-sdk-go/service/cloudwatchevents"
)
type Rules struct {
Rules []Rule
}
type Rule struct {
Description string `yaml:"description"`
EventPattern string `yaml:"event_pattern"`
Name string `yaml:"name"`... |
0c1197485962afbe326064653035e04e62e2054a | resources/assets/build/webpack.config.optimize.js | resources/assets/build/webpack.config.optimize.js | 'use strict'; // eslint-disable-line
const { default: ImageminPlugin } = require('imagemin-webpack-plugin');
const imageminMozjpeg = require('imagemin-mozjpeg');
const config = require('./config');
module.exports = {
plugins: [
new ImageminPlugin({
optipng: { optimizationLevel: 7 },
gifsicle: { opt... | 'use strict'; // eslint-disable-line
const { default: ImageminPlugin } = require('imagemin-webpack-plugin');
const imageminMozjpeg = require('imagemin-mozjpeg');
const config = require('./config');
module.exports = {
plugins: [
new ImageminPlugin({
optipng: { optimizationLevel: 7 },
gifsicle: { opt... | Fix default SVG optimisation configuration | Fix default SVG optimisation configuration
| JavaScript | mit | NicBeltramelli/sage,roots/sage,mckelvey/sage,ChrisLTD/sage,ptrckvzn/sage,generoi/sage,mckelvey/sage,roots/sage,generoi/sage,ChrisLTD/sage,generoi/sage,c50/c50_roots,ChrisLTD/sage,NicBeltramelli/sage,mckelvey/sage,c50/c50_roots,ChrisLTD/sage,ptrckvzn/sage,c50/c50_roots,ptrckvzn/sage,NicBeltramelli/sage | javascript | ## Code Before:
'use strict'; // eslint-disable-line
const { default: ImageminPlugin } = require('imagemin-webpack-plugin');
const imageminMozjpeg = require('imagemin-mozjpeg');
const config = require('./config');
module.exports = {
plugins: [
new ImageminPlugin({
optipng: { optimizationLevel: 7 },
... |
df82b0202f05dcf5d27433e53cdfe7196308c7d7 | README.md | README.md | [](https://github.com/ember-insights/ember-insights/blob/master/LICENSE.md) [](https://travis-ci.org/ember-insights/ember-insights) [](https://github.com/ember-insights/ember-insights/blob/master/LICENSE.md) [](https://travis-ci.org/ember-insights/ember-insights) [](https://github.com/ember-insights/ember-insights/blob/master/LICENSE.md) [](https://travis-ci.org/ember-insights/ember-insights) [ {
const jokes = getListOfJokes();
let rand = Math.floor(Math.random() * jokes.length);
console.log(jokes[rand]);
};
/**
* Holds a list of classic programmer jokes.
* Feel free ... | /**
* Prints a random programmer joke.
* @author Vitor Cortez <vitoracortez+github@gmail.com>
*/
var jokeMeUpBoy = function() {
const jokes = getListOfJokes();
let rand = Math.floor(Math.random() * jokes.length);
console.log(jokes[rand]);
};
/**
* Holds a list of classic programmer jokes.
* Feel free ... | Add a new dank joke | Add a new dank joke
Dem jokes | JavaScript | mit | Rabrennie/anything.js,Sha-Grisha/anything.js,Rabrennie/anything.js,Rabrennie/anything.js,Rabrennie/anything.js,Sha-Grisha/anything.js,Sha-Grisha/anything.js,Sha-Grisha/anything.js | javascript | ## Code Before:
/**
* Prints a random programmer joke.
* @author Vitor Cortez <vitoracortez+github@gmail.com>
*/
var jokeMeUpBoy = function() {
const jokes = getListOfJokes();
let rand = Math.floor(Math.random() * jokes.length);
console.log(jokes[rand]);
};
/**
* Holds a list of classic programmer joke... |
83f1e862db00bccbba11020ce3a83a17c64085a0 | angular/core/components/user_avatar/user_avatar.coffee | angular/core/components/user_avatar/user_avatar.coffee | angular.module('loomioApp').directive 'userAvatar', ($window) ->
scope: {user: '=', coordinator: '=?', size: '@?'}
restrict: 'E'
templateUrl: 'generated/components/user_avatar/user_avatar.html'
replace: true
controller: ($scope) ->
unless _.contains(['small', 'medium', 'medium-circular', 'large', 'large-c... | angular.module('loomioApp').directive 'userAvatar', ($window) ->
scope: {user: '=', coordinator: '=?', size: '@?'}
restrict: 'E'
templateUrl: 'generated/components/user_avatar/user_avatar.html'
replace: true
controller: ($scope) ->
unless _.contains(['small', 'medium', 'medium-circular', 'large', 'large-c... | Return avatarUrl directly if it's a string | Return avatarUrl directly if it's a string
| CoffeeScript | agpl-3.0 | loomio/loomio,loomio/loomio,piratas-ar/loomio,loomio/loomio,loomio/loomio,piratas-ar/loomio,piratas-ar/loomio,piratas-ar/loomio | coffeescript | ## Code Before:
angular.module('loomioApp').directive 'userAvatar', ($window) ->
scope: {user: '=', coordinator: '=?', size: '@?'}
restrict: 'E'
templateUrl: 'generated/components/user_avatar/user_avatar.html'
replace: true
controller: ($scope) ->
unless _.contains(['small', 'medium', 'medium-circular', '... |
a0a8cce2a97aca0dae5fe7081963200b5a2e9b03 | .travis.yml | .travis.yml | language: python
os:
- linux
python:
- '3.6'
install:
- pip install pytest-pep8 pytest-cov
- pip install codecov
- pip install netaddr
- pip install -e .[tests]
script:
- pytest --pep8 -m pep8 cuckoo/
- PYTHONPATH=$PWD:$PYTHONPATH pytest --cov=./ tests/
after_success:
- codecov
| language: python
os:
- linux
python:
- '3.6'
install:
- pip install pytest-pep8 pytest-cov==2.6.1 pytest==3.3.0
- pip install codecov
- pip install netaddr
- pip install -e .[tests]
script:
- pytest --pep8 -m pep8 cuckoo/
- PYTHONPATH=$PWD:$PYTHONPATH pytest --cov=./ tests/
after_success:
- codecov
| Fix the version of pytest-cov and pytest to avoid conflicting version in Travis. | Fix the version of pytest-cov and pytest to avoid conflicting version in Travis.
| YAML | mit | huydhn/cuckoo-filter,huydhn/cuckoo-filter | yaml | ## Code Before:
language: python
os:
- linux
python:
- '3.6'
install:
- pip install pytest-pep8 pytest-cov
- pip install codecov
- pip install netaddr
- pip install -e .[tests]
script:
- pytest --pep8 -m pep8 cuckoo/
- PYTHONPATH=$PWD:$PYTHONPATH pytest --cov=./ tests/
after_success:
- codecov
## Ins... |
e8515f5835909162a34cfbb9bc59ea9baedaf74d | src/logger.ts | src/logger.ts | const logger = {
info: (message: string) => {
// tslint:disable-next-line:no-console
// tslint:disable-next-line:strict-type-predicates
if (console && typeof console.info === 'function') {
// tslint:disable-next-line:no-console
console.info(`Canvasimo: ${message}`);
}
},
warn: (message... | const consoleExists = Boolean(window.console);
const logger = {
info: (message: string) => {
if (consoleExists) {
window.console.info(`Canvasimo: ${message}`);
}
},
warn: (message: string) => {
if (consoleExists) {
window.console.warn(`Canvasimo: ${message}`);
}
},
};
export defaul... | Check for window.console and use this for logs | Check for window.console and use this for logs
| TypeScript | mit | JakeSidSmith/canvasimo,JakeSidSmith/canvasimo,JakeSidSmith/sensible-canvas-interface | typescript | ## Code Before:
const logger = {
info: (message: string) => {
// tslint:disable-next-line:no-console
// tslint:disable-next-line:strict-type-predicates
if (console && typeof console.info === 'function') {
// tslint:disable-next-line:no-console
console.info(`Canvasimo: ${message}`);
}
},
... |
ac850c8f9284fbe6fd8e6318431d5e4856f26c7c | openquake/calculators/tests/classical_risk_test.py | openquake/calculators/tests/classical_risk_test.py | import unittest
from nose.plugins.attrib import attr
from openquake.qa_tests_data.classical_risk import (
case_1, case_2, case_3, case_4)
from openquake.calculators.tests import CalculatorTestCase
class ClassicalRiskTestCase(CalculatorTestCase):
@attr('qa', 'risk', 'classical_risk')
def test_case_1(self... | import unittest
from nose.plugins.attrib import attr
from openquake.qa_tests_data.classical_risk import (
case_1, case_2, case_3, case_4)
from openquake.calculators.tests import CalculatorTestCase
class ClassicalRiskTestCase(CalculatorTestCase):
@attr('qa', 'risk', 'classical_risk')
def test_case_1(self... | Work on classical_risk test_case_1 and test_case_2 | Work on classical_risk test_case_1 and test_case_2
| Python | agpl-3.0 | gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine | python | ## Code Before:
import unittest
from nose.plugins.attrib import attr
from openquake.qa_tests_data.classical_risk import (
case_1, case_2, case_3, case_4)
from openquake.calculators.tests import CalculatorTestCase
class ClassicalRiskTestCase(CalculatorTestCase):
@attr('qa', 'risk', 'classical_risk')
def ... |
391af79fb060f150ba2748fc37872f245a692c19 | metadata/org.pgnapps.pk2.yml | metadata/org.pgnapps.pk2.yml | Categories:
- Games
License: MIT
SourceCode: https://github.com/danilolc/pk2
IssueTracker: https://github.com/danilolc/pk2/issues
Changelog: https://github.com/danilolc/pk2/tags
AutoName: Pekka Kana 2
RepoType: git
Repo: https://github.com/danilolc/pk2.git
Builds:
- versionName: 1.4.2
versionCode: 1026
c... | Categories:
- Games
License: MIT
SourceCode: https://github.com/danilolc/pk2
IssueTracker: https://github.com/danilolc/pk2/issues
Changelog: https://github.com/danilolc/pk2/tags
AutoName: Pekka Kana 2
RepoType: git
Repo: https://github.com/danilolc/pk2.git
Builds:
- versionName: 1.4.2
versionCode: 1026
c... | Update Pekka Kana 2 to 1.4.3 (1027) | Update Pekka Kana 2 to 1.4.3 (1027)
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroiddata | yaml | ## Code Before:
Categories:
- Games
License: MIT
SourceCode: https://github.com/danilolc/pk2
IssueTracker: https://github.com/danilolc/pk2/issues
Changelog: https://github.com/danilolc/pk2/tags
AutoName: Pekka Kana 2
RepoType: git
Repo: https://github.com/danilolc/pk2.git
Builds:
- versionName: 1.4.2
version... |
4bf732a2a866536f434e8fb29da82e28abe8e328 | Tests/Unit/Private/Get-FunctionScriptAnalyzerViolation.Tests.ps1 | Tests/Unit/Private/Get-FunctionScriptAnalyzerViolation.Tests.ps1 | $ModuleName = 'PSCodeHealthMetrics'
Import-Module "$($PSScriptRoot)\..\..\..\$($ModuleName).psd1" -Force
$Mocks = ConvertFrom-Json (Get-Content -Path "$($PSScriptRoot)\..\TestData\MockObjects.json" -Raw )
Describe 'Get-FunctionScriptAnalyzerViolation' {
InModuleScope $ModuleName {
$Files = (Get-ChildItem... | $ModuleName = 'PSCodeHealthMetrics'
Import-Module "$($PSScriptRoot)\..\..\..\$($ModuleName).psd1" -Force
Write-Host "PSScriptRoot : $($PSScriptRoot)"
$Mocks = ConvertFrom-Json (Get-Content -Path "$($PSScriptRoot)\..\TestData\MockObjects.json" -Raw )
Write-Host "Mocks $($Mocks | Out-String)"
Foreach ( $Mock in $Mocks.... | Debug tests failures in Appveyor | Debug tests failures in Appveyor
| PowerShell | mit | MathieuBuisson/PSCodeHealth,MathieuBuisson/PSCodeHealth | powershell | ## Code Before:
$ModuleName = 'PSCodeHealthMetrics'
Import-Module "$($PSScriptRoot)\..\..\..\$($ModuleName).psd1" -Force
$Mocks = ConvertFrom-Json (Get-Content -Path "$($PSScriptRoot)\..\TestData\MockObjects.json" -Raw )
Describe 'Get-FunctionScriptAnalyzerViolation' {
InModuleScope $ModuleName {
$Files ... |
b474c7368f3a8152296acf9cad7459510b71ada5 | fs/opener/sshfs.py | fs/opener/sshfs.py | from ._base import Opener
from ._registry import registry
@registry.install
class SSHOpener(Opener):
protocols = ['ssh']
@staticmethod
def open_fs(fs_url, parse_result, writeable, create, cwd):
from ..sshfs import SSHFS
ssh_host, _, dir_path = parse_result.resource.partition('/')
... | from ._base import Opener
from ._registry import registry
from ..subfs import ClosingSubFS
@registry.install
class SSHOpener(Opener):
protocols = ['ssh']
@staticmethod
def open_fs(fs_url, parse_result, writeable, create, cwd):
from ..sshfs import SSHFS
ssh_host, _, dir_path = parse_result.... | Fix SSHOpener to use the new ClosingSubFS | Fix SSHOpener to use the new ClosingSubFS
| Python | lgpl-2.1 | althonos/fs.sshfs | python | ## Code Before:
from ._base import Opener
from ._registry import registry
@registry.install
class SSHOpener(Opener):
protocols = ['ssh']
@staticmethod
def open_fs(fs_url, parse_result, writeable, create, cwd):
from ..sshfs import SSHFS
ssh_host, _, dir_path = parse_result.resource.partiti... |
1c59c421b8f018dca63afa749a0c2dc12e5b0dad | SUMMARY.md | SUMMARY.md |
* [Introduction](README.md)
* [About functions in JavaScript](func.md)
* [About `this` and function invocation context](this.md)
* [What is prototypal inheritance in JavaScript?](proto.md)
* [How the `new` keyword works](not-new.md)
* [Type detection](type-detection.md)
* [Declarative programming](declarative.md)
* [A... |
* [Introduction](README.md)
## Part 1: JavaScript fundamental
* [About functions in JavaScript](func.md)
* [About `this` and function invocation context](this.md)
* [What is prototypal inheritance in JavaScript?](proto.md)
* [How the `new` keyword works](not-new.md)
## Part 2: Programming techniques
* [Ty... | Fix sections broken by Gitbook online editor | Fix sections broken by Gitbook online editor
| Markdown | mit | foxbunny/javascript-by-example | markdown | ## Code Before:
* [Introduction](README.md)
* [About functions in JavaScript](func.md)
* [About `this` and function invocation context](this.md)
* [What is prototypal inheritance in JavaScript?](proto.md)
* [How the `new` keyword works](not-new.md)
* [Type detection](type-detection.md)
* [Declarative programming](decl... |
6a3fbb7280c1078b574736eae3c6a3e4e42d3f46 | seaborn/__init__.py | seaborn/__init__.py | import matplotlib as mpl
_orig_rc_params = mpl.rcParams.copy()
# Import seaborn objects
from .rcmod import *
from .utils import *
from .palettes import *
from .relational import *
from .regression import *
from .categorical import *
from .distributions import *
from .timeseries import *
from .matrix import *
from .mis... | import matplotlib as mpl
_orig_rc_params = mpl.rcParams.copy()
# Import seaborn objects
from .rcmod import *
from .utils import *
from .palettes import *
from .relational import *
from .regression import *
from .categorical import *
from .distributions import *
from .matrix import *
from .miscplot import *
from .axisg... | Remove top-level import of timeseries module | Remove top-level import of timeseries module
| Python | bsd-3-clause | arokem/seaborn,mwaskom/seaborn,mwaskom/seaborn,arokem/seaborn,anntzer/seaborn,anntzer/seaborn | python | ## Code Before:
import matplotlib as mpl
_orig_rc_params = mpl.rcParams.copy()
# Import seaborn objects
from .rcmod import *
from .utils import *
from .palettes import *
from .relational import *
from .regression import *
from .categorical import *
from .distributions import *
from .timeseries import *
from .matrix im... |
4c1811c174a30df6ed6cee599c6e711d46ee0950 | .github/workflows/main.yml | .github/workflows/main.yml | name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
ports:
- 3306
env:
MYSQL_DATABASE: test
MYSQL_ALLOW_EMPTY_PASSWORD: yes
strategy:
matrix:
haxe-version:
- stable
... | name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
ports:
- 3306
env:
MYSQL_DATABASE: test
MYSQL_ALLOW_EMPTY_PASSWORD: yes
options: --health-cmd="mysqladmin ping" --health-interval=10s --... | Copy stuff from the internet | Copy stuff from the internet
| YAML | mit | haxetink/tink_sql | yaml | ## Code Before:
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
ports:
- 3306
env:
MYSQL_DATABASE: test
MYSQL_ALLOW_EMPTY_PASSWORD: yes
strategy:
matrix:
haxe-version:
... |
452588fe29d97d89079ad2e1afc3ec5296691ad0 | .travis.yml | .travis.yml | language: haskell
ghc:
- "7.8"
- "7.10"
| language: haskell
ghc:
- "7.10"
script:
- cabal configure -fpiglet -freservations -fwebforms -fborrowit -fimporter && cabal build | Add Travis cabal flags and remove ghc-7.8 | Add Travis cabal flags and remove ghc-7.8
| YAML | mit | Oblosys/webviews,Oblosys/webviews | yaml | ## Code Before:
language: haskell
ghc:
- "7.8"
- "7.10"
## Instruction:
Add Travis cabal flags and remove ghc-7.8
## Code After:
language: haskell
ghc:
- "7.10"
script:
- cabal configure -fpiglet -freservations -fwebforms -fborrowit -fimporter && cabal build |
06ea926c9918559fa4a6b1078d1dfde3c3405418 | packages/dep-tree-js/getImports.js | packages/dep-tree-js/getImports.js | const konan = require("konan");
const path = require("path");
const localRequire = lib => {
return require(require("path").join(
process.env.PROJECTPATH,
"node_modules",
lib
));
};
module.exports = (file, code) => {
var extname = path.extname(file).toLowerCase();
if (extname === ".mdx" || extname =... | const konan = require("konan");
const path = require("path");
const localRequire = lib => {
return require(require("path").join(
process.env.PROJECTPATH,
"node_modules",
lib
));
};
module.exports = (file, code) => {
const extname = path.extname(file).toLowerCase();
if (extname === ".mdx" || extname... | Fix TS to not be parsed as TSX | Fix TS to not be parsed as TSX
| JavaScript | apache-2.0 | remoteinterview/zero,remoteinterview/zero,remoteinterview/zero,remoteinterview/zero | javascript | ## Code Before:
const konan = require("konan");
const path = require("path");
const localRequire = lib => {
return require(require("path").join(
process.env.PROJECTPATH,
"node_modules",
lib
));
};
module.exports = (file, code) => {
var extname = path.extname(file).toLowerCase();
if (extname === ".m... |
d160e966f04341383de930c0447dac6e92909c80 | lathe/js/box-lerp.js | lathe/js/box-lerp.js | /* eslint-env es6 */
/* global VertexIndices */
window.lerpBoxVertex = (function() {
'use strict';
return function lerpA( geometryA, vertexA ) {
const indexA = VertexIndices[ vertexA.toUpperCase() ];
return function lerpB( geometryB, vertexB ) {
const indexB = VertexIndices[ vertexB.toUpperCase() ];... | /* eslint-env es6 */
/* global VertexIndices */
window.lerpBoxVertex = (function() {
'use strict';
return function lerpA( vertexA, t ) {
const indexA = VertexIndices[ vertexA.toUpperCase() ];
return function lerpB( geometryA, geometryB, vertexB ) {
const indexB = VertexIndices[ vertexB.toUpperCase()... | Change argument order of BoxGeometry lerp(). | lathe[cuboid]: Change argument order of BoxGeometry lerp().
| JavaScript | mit | razh/experiments-three.js,razh/experiments-three.js | javascript | ## Code Before:
/* eslint-env es6 */
/* global VertexIndices */
window.lerpBoxVertex = (function() {
'use strict';
return function lerpA( geometryA, vertexA ) {
const indexA = VertexIndices[ vertexA.toUpperCase() ];
return function lerpB( geometryB, vertexB ) {
const indexB = VertexIndices[ vertexB.... |
b6ab7a5715ae099b6063ecfde80c35e6be70748e | lib/templates/spec/spec_helper.rb | lib/templates/spec/spec_helper.rb |
require 'bundler'
Bundler.setup
Bundler.require
require 'minitest/pride'
require 'minitest/autorun'
require 'minitest/spec'
require 'rack/test'
class MiniTest::Spec
include Rack::Test::Methods
end
|
require 'bundler'
Bundler.setup
Bundler.require
ENV["RACK_ENV"] = "test"
require 'minitest/pride'
require 'minitest/autorun'
require 'minitest/spec'
require 'rack/test'
<% if @redis %>
require 'fakeredis'
REDIS = Redis.new
<% end %>
require "find"
%w{./config/initializers ./lib}.each do |load_path|
Find.find(loa... | Add fakeredis if Redis is enabled, force RACK_ENV=test, load the environment (initializers and lib) | Add fakeredis if Redis is enabled, force RACK_ENV=test, load the environment (initializers and lib) | Ruby | mit | c7/hazel,c7/hazel | ruby | ## Code Before:
require 'bundler'
Bundler.setup
Bundler.require
require 'minitest/pride'
require 'minitest/autorun'
require 'minitest/spec'
require 'rack/test'
class MiniTest::Spec
include Rack::Test::Methods
end
## Instruction:
Add fakeredis if Redis is enabled, force RACK_ENV=test, load the environment (initia... |
bcb2db95336ebc6acd08ae9e2ea516e59553fad1 | .rubocop_todo.yml | .rubocop_todo.yml | Metrics/AbcSize:
Max: 26
# Offense count: 37
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 629
# Offense count: 5
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 25
# Offense count: 1
Style/AccessorMethodName:
Exclude:
- 'lib/mako/core.rb'
# Offense cou... | Metrics/AbcSize:
Max: 28
# Offense count: 40
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 629
# Offense count: 8
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 25
# Offense count: ... | Add additional exceptions to rubocop todo | Add additional exceptions to rubocop todo
| YAML | mit | jonathanpike/mako,jonathanpike/mako | yaml | ## Code Before:
Metrics/AbcSize:
Max: 26
# Offense count: 37
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 629
# Offense count: 5
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 25
# Offense count: 1
Style/AccessorMethodName:
Exclude:
- 'lib/mako/core.rb... |
320214ca1636415bc4d677ba9e3b40f0bf24c8f9 | openprescribing/frontend/migrations/0008_create_searchbookmark.py | openprescribing/frontend/migrations/0008_create_searchbookmark.py | from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('frontend', '0007_auto_20160908_0... | from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('frontend', '0007_add_cost_per_fi... | Fix multiple leaf nodes in migrations | Fix multiple leaf nodes in migrations
| Python | mit | ebmdatalab/openprescribing,ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc | python | ## Code Before:
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('frontend', '0007... |
d700d2d8016124b772bbcca191bc26e6806cee53 | src/CMakeLists.txt | src/CMakeLists.txt | set(INCLUDE_DIR "../include")
include_directories(${INCLUDE_DIR})
set_source_files_properties(sqlite3.c
PROPERTIES
COMPILE_FLAGS
"-DHAVE_USLEEP=1 -DSQLITE_USE_URI=1 -DSQLITE_ENABLE_API_ARMOR")
set(PUBLIC_HEADERS_DIR "${INCLUDE_DIR}/smartsqlite")
set(PUBLIC_HEADERS
${PUBLIC_HEADERS_DIR}/binder.h
${... | set(INCLUDE_DIR "../include")
set_source_files_properties(sqlite3.c
PROPERTIES
COMPILE_FLAGS
"-DHAVE_USLEEP=1 -DSQLITE_USE_URI=1 -DSQLITE_ENABLE_API_ARMOR")
set(PUBLIC_HEADERS_DIR "${INCLUDE_DIR}/smartsqlite")
set(PUBLIC_HEADERS
${PUBLIC_HEADERS_DIR}/binder.h
${PUBLIC_HEADERS_DIR}/blob.h
${PUB... | Make the include directory part of the public CMake interface | Make the include directory part of the public CMake interface
| Text | bsd-3-clause | kullo/smartsqlite,kullo/smartsqlite,kullo/smartsqlite | text | ## Code Before:
set(INCLUDE_DIR "../include")
include_directories(${INCLUDE_DIR})
set_source_files_properties(sqlite3.c
PROPERTIES
COMPILE_FLAGS
"-DHAVE_USLEEP=1 -DSQLITE_USE_URI=1 -DSQLITE_ENABLE_API_ARMOR")
set(PUBLIC_HEADERS_DIR "${INCLUDE_DIR}/smartsqlite")
set(PUBLIC_HEADERS
${PUBLIC_HEADERS_DIR}... |
55fc4f3edc7ca9c16bcbc6dc5849e350ff0f8457 | README.md | README.md |
- Install and setup [NVM](https://github.com/creationix/nvm), we're targeting
the newest stable node, which at the time of writing is v0.10.13
- Setup mysql database
```sql
create database nrt_development;
CREATE USER 'nrt'@'localhost' IDENTIFIED BY 'password';
grant usage on *.* to nrt@localhost identified by "passw... |
- Install and setup [NVM](https://github.com/creationix/nvm), we're targeting
the newest stable node, which at the time of writing is v0.10.13
- `npm install` in the project dir to get the libs
- `npm install -g backbone-diorama` to compile the client application
## Running the application
##### Start the server
`n... | Add more info about running the app and compiling | Add more info about running the app and compiling
| Markdown | bsd-3-clause | unepwcmc/NRT,unepwcmc/NRT | markdown | ## Code Before:
- Install and setup [NVM](https://github.com/creationix/nvm), we're targeting
the newest stable node, which at the time of writing is v0.10.13
- Setup mysql database
```sql
create database nrt_development;
CREATE USER 'nrt'@'localhost' IDENTIFIED BY 'password';
grant usage on *.* to nrt@localhost iden... |
7027f18d8d0ed4b4df74f89e1d28b366ea949d2e | TWLight/resources/templates/resources/suggestion_confirm_delete.html | TWLight/resources/templates/resources/suggestion_confirm_delete.html | {% extends "base.html" %}
{% load i18n %}
{% block content %}
<form method="post">
{% csrf_token %}
<p>
{% comment %}Translators: This message is displayed on the page where coordinators can request the deletion of a suggestion. {% endcomment %}
{% blocktranslate trimmed %}
Are you sure y... | {% extends "new_base.html" %}
{% load i18n %}
{% block content %}
{% include "header_partial_b4.html" %}
{% include "message_partial.html" %}
<div id="main-content">
<form method="post">
{% csrf_token %}
<p>
{% comment %}Translators: This message is displayed on the page where coordinator... | Migrate /suggest/[Number]/delete/ to Bootstrap 4 | Migrate /suggest/[Number]/delete/ to Bootstrap 4
| HTML | mit | WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight,WikipediaLibrary/TWLight | html | ## Code Before:
{% extends "base.html" %}
{% load i18n %}
{% block content %}
<form method="post">
{% csrf_token %}
<p>
{% comment %}Translators: This message is displayed on the page where coordinators can request the deletion of a suggestion. {% endcomment %}
{% blocktranslate trimmed %}
... |
dfb1060d2fd0ef6e726d71fa1e57209d4f016d1f | src/core/DummyDevice.js | src/core/DummyDevice.js | /**
* @depends AbstractAudioletDevice.js
*/
var DummyDevice = new Class({
Extends: AbstractAudioletDevice,
initialize: function(audiolet) {
AbstractAudioletDevice.prototype.initialize.apply(this, [audiolet]);
this.writePosition = 0;
this.tick.periodical(1000 * this.bufferSize / this.... | /**
* @depends AbstractAudioletDevice.js
*/
var DummyDevice = new Class({
Extends: AbstractAudioletDevice,
initialize: function(audiolet) {
AbstractAudioletDevice.prototype.initialize.apply(this, [audiolet]);
this.writePosition = 0;
this.tick.periodical(1000 * this.bufferSize / this.... | Make dummy device pass timestamp, so it actually generates audio | Make dummy device pass timestamp, so it actually generates audio
| JavaScript | apache-2.0 | bobby-brennan/Audiolet,kn0ll/Audiolet,Kosar79/Audiolet,kn0ll/Audiolet,Kosar79/Audiolet,bobby-brennan/Audiolet,oampo/Audiolet,oampo/Audiolet,mcanthony/Audiolet,mcanthony/Audiolet,Kosar79/Audiolet | javascript | ## Code Before:
/**
* @depends AbstractAudioletDevice.js
*/
var DummyDevice = new Class({
Extends: AbstractAudioletDevice,
initialize: function(audiolet) {
AbstractAudioletDevice.prototype.initialize.apply(this, [audiolet]);
this.writePosition = 0;
this.tick.periodical(1000 * this.bu... |
1e327401d9c020bb7941b20ff51890ad1729973d | tests.py | tests.py | import pytest
from django.contrib.auth import get_user_model
from seleniumlogin import force_login
pytestmark = [pytest.mark.django_db(transaction=True)]
def test_non_authenticated_user_cannot_access_test_page(selenium, live_server):
selenium.get('{}/test/login_required/'.format(live_server.url))
assert 'fa... | import pytest
from django.contrib.auth import get_user_model
from seleniumlogin import force_login
pytestmark = [pytest.mark.django_db(transaction=True)]
def test_non_authenticated_user_cannot_access_test_page(selenium, live_server):
selenium.get('{}/test/login_required/'.format(live_server.url))
assert 'fa... | Rename test. The test tries to access a test page, not a blank page | Rename test. The test tries to access a test page, not a blank page
| Python | mit | feffe/django-selenium-login,feffe/django-selenium-login | python | ## Code Before:
import pytest
from django.contrib.auth import get_user_model
from seleniumlogin import force_login
pytestmark = [pytest.mark.django_db(transaction=True)]
def test_non_authenticated_user_cannot_access_test_page(selenium, live_server):
selenium.get('{}/test/login_required/'.format(live_server.url)... |
d53db16e9d0e06d14912fec669c0be142744b2f7 | cmd/mccli/show_cmd.go | cmd/mccli/show_cmd.go | package mccli
import (
"fmt"
"github.com/codegangsta/cli"
"github.com/materials-commons/config"
"github.com/materials-commons/mcstore/server/mcstore"
)
var ShowCommand = cli.Command{
Name: "show",
Usage: "Show the configuration",
Action: showCLI,
}
func showCLI(c *cli.Context) {
apikey := config.GetStrin... | package mccli
import (
"fmt"
"github.com/codegangsta/cli"
"github.com/materials-commons/config"
"github.com/materials-commons/mcstore/server/mcstore"
)
var ShowCommand = cli.Command{
Name: "show",
Aliases: []string{"sh"},
Usage: "Show commands",
Subcommands: []cli.Command{
showConfigCommand,
},
}
va... | Make show a command with sub commands. Add a config command (so: show config) to show the client configuration. | Make show a command with sub commands. Add a config command (so: show config) to show the client configuration.
| Go | mit | materials-commons/mcstore,materials-commons/mcstore,materials-commons/mcstore | go | ## Code Before:
package mccli
import (
"fmt"
"github.com/codegangsta/cli"
"github.com/materials-commons/config"
"github.com/materials-commons/mcstore/server/mcstore"
)
var ShowCommand = cli.Command{
Name: "show",
Usage: "Show the configuration",
Action: showCLI,
}
func showCLI(c *cli.Context) {
apikey :=... |
f463241de0330a16d6943153c9a622031e2cb32a | lib/assertions/is-function.js | lib/assertions/is-function.js | "use strict";
module.exports = function(referee) {
referee.add("isFunction", {
assert: function(actual) {
return typeof actual === "function";
},
assertMessage:
"${customMessage}${actual} (${actualType}) expected to be function",
refuteMessage: "${customMessa... | "use strict";
module.exports = function(referee) {
referee.add("isFunction", {
assert: function(actual) {
return typeof actual === "function";
},
assertMessage:
"${customMessage}${actual} (${actualType}) expected to be function",
refuteMessage: "${customMessa... | Fix isFunction failure message differences | Fix isFunction failure message differences
The toString representation of functions has changed slightly between
Node 8 and Node 10. Node 10 retains the original whitespace between
the function keyword and the opening braces while Node 8 always inserts
a blank.
| JavaScript | bsd-3-clause | busterjs/referee | javascript | ## Code Before:
"use strict";
module.exports = function(referee) {
referee.add("isFunction", {
assert: function(actual) {
return typeof actual === "function";
},
assertMessage:
"${customMessage}${actual} (${actualType}) expected to be function",
refuteMessage... |
f6a2ca21c72b8d97cd0f89a0a436bf90b431698b | recipes-devtools/python/rpio_0.10.0.bb | recipes-devtools/python/rpio_0.10.0.bb | DESCRIPTION = "Advanced GPIO for the Raspberry Pi. Extends RPi.GPIO with PWM, \
GPIO interrups, TCP socket interrupts, command line tools and more"
HOMEPAGE = "https://github.com/metachris/RPIO"
SECTION = "devel/python"
LICENSE = "LGPLv3+"
LIC_FILES_CHKSUM = "file://README.rst;beginline=41;endline=53;md5=d5d95d7486a4d9... | DESCRIPTION = "Advanced GPIO for the Raspberry Pi. Extends RPi.GPIO with PWM, \
GPIO interrups, TCP socket interrupts, command line tools and more"
HOMEPAGE = "https://github.com/metachris/RPIO"
SECTION = "devel/python"
LICENSE = "LGPLv3+"
LIC_FILES_CHKSUM = "file://README.rst;beginline=41;endline=53;md5=d5d95d7486a4d9... | Add RDEPENDS For python-logging & python-threading | rpio: Add RDEPENDS For python-logging & python-threading
[GitHub Ticket #98 - rpio requires the logging and threading Python
packages but does not RDEPENDS them in recipie]
The rpio tool needs the Python logging and threading pacakges installed
on the target system for it to work. The pacakges are not included when
... | BitBake | mit | schnitzeltony/meta-raspberrypi,leon-anavi/meta-raspberrypi,agherzan/meta-raspberrypi,d21d3q/meta-raspberrypi,leon-anavi/meta-raspberrypi,d21d3q/meta-raspberrypi,d21d3q/meta-raspberrypi,agherzan/meta-raspberrypi,kraj/meta-raspberrypi,kraj/meta-raspberrypi,agherzan/meta-raspberrypi,kraj/meta-raspberrypi,schnitzeltony/met... | bitbake | ## Code Before:
DESCRIPTION = "Advanced GPIO for the Raspberry Pi. Extends RPi.GPIO with PWM, \
GPIO interrups, TCP socket interrupts, command line tools and more"
HOMEPAGE = "https://github.com/metachris/RPIO"
SECTION = "devel/python"
LICENSE = "LGPLv3+"
LIC_FILES_CHKSUM = "file://README.rst;beginline=41;endline=53;md... |
72865598fbe8658ade68f67da4e2a244a13713b9 | analysis/plot-marker-trajectories.py | analysis/plot-marker-trajectories.py | import climate
import lmj.plot
import numpy as np
import source
import plots
@climate.annotate(
root='load experiment data from this directory',
pattern='plot data from files matching this pattern',
markers='plot traces of these markers',
)
def main(root, pattern='*5/*block00/*circuit00.csv.gz', markers=... | import climate
import lmj.plot
import numpy as np
import source
import plots
@climate.annotate(
root='load experiment data from this directory',
pattern=('plot data from files matching this pattern', 'option'),
markers=('plot traces of these markers', 'option'),
spline=('interpolate data with a splin... | Add command-line flags for spline order and accuracy. | Add command-line flags for spline order and accuracy.
| Python | mit | lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment | python | ## Code Before:
import climate
import lmj.plot
import numpy as np
import source
import plots
@climate.annotate(
root='load experiment data from this directory',
pattern='plot data from files matching this pattern',
markers='plot traces of these markers',
)
def main(root, pattern='*5/*block00/*circuit00.c... |
c2a4e9464cc1c21e7a3ceb74647df07bf7b26865 | index.js | index.js | var resourceful = require('resourceful');
var Riak = resourceful.engines.Riak = function(config) {
if(config && config.bucket) {
this.bucket = config.bucket;
} else {
throw new Error('bucket must be set in the config for each model.')
}
this.db = require('riak-js').getClient(config);
this.cache =... | var resourceful = require('resourceful');
var Riak = resourceful.engines.Riak = function(config) {
if(config && config.bucket) {
this.bucket = config.bucket;
} else {
throw new Error('bucket must be set in the config for each model.')
}
this.db = require('riak-js').getClient(config);
this.cache =... | Make Model.all work as expected. | Make Model.all work as expected. | JavaScript | apache-2.0 | admazely/resourceful-riak | javascript | ## Code Before:
var resourceful = require('resourceful');
var Riak = resourceful.engines.Riak = function(config) {
if(config && config.bucket) {
this.bucket = config.bucket;
} else {
throw new Error('bucket must be set in the config for each model.')
}
this.db = require('riak-js').getClient(config);
... |
d30aeb96483c043e6d168041db536c008ccf1d6c | test/fixtures/events/no-event-loop.js | test/fixtures/events/no-event-loop.js | global.process = { __proto__: process, pid: 123456 }
Date.now = function () { return 1459875739796 }
require('os').hostname = function () { return 'abcdefghijklmnopqr' }
var pino = require(require.resolve('./../../../'))
var log = pino()
log.info('h')
| global.process = { __proto__: process, pid: 123456 }
Date.now = function () { return 1459875739796 }
require('os').hostname = function () { return 'abcdefghijklmnopqr' }
var pino = require(require.resolve('./../../../'))
var log = pino({extreme: true})
log.info('h')
| Fix no event loop test (need to wait for fd) | Fix no event loop test (need to wait for fd)
| JavaScript | mit | mcollina/pino | javascript | ## Code Before:
global.process = { __proto__: process, pid: 123456 }
Date.now = function () { return 1459875739796 }
require('os').hostname = function () { return 'abcdefghijklmnopqr' }
var pino = require(require.resolve('./../../../'))
var log = pino()
log.info('h')
## Instruction:
Fix no event loop test (need to wai... |
a0457c12b5ea76004b5f827e550b927a5e679ad8 | app/partials/help/collection-detail.md | app/partials/help/collection-detail.md | This section displays interactive scattercharts displaying pharmokinetic
modeling results and clinical data for all subjects of the imaging collection.
The topmost panels contain a list of patient and visit links (on left) and a
corresponding grid (on right). Click on a patient link to open the Imaging
Profile page or... | This page shows the correlation between pharmokinetic modeling results and
clinical data. Each of the four interactive scatter charts has a different
pair of imaging and clinical parameter axes. Use the drop-down menus to
choose which data are plotted along the X (horizontal) and Y (vertical) axes
in the charts.
All M... | Clarify the Collection Detail help. | Clarify the Collection Detail help.
| Markdown | bsd-2-clause | ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile | markdown | ## Code Before:
This section displays interactive scattercharts displaying pharmokinetic
modeling results and clinical data for all subjects of the imaging collection.
The topmost panels contain a list of patient and visit links (on left) and a
corresponding grid (on right). Click on a patient link to open the Imaging... |
abed199f2725542f88e585c2194185341113b463 | lib/message_hub.rb | lib/message_hub.rb | $:.unshift File.expand_path("..", __FILE__)
require 'bundler/setup'
Bundler.require(:default)
require 'message_hub/provider'
require 'message_hub/message'
require 'message_hub/providers/gmail'
require 'message_hub/providers/twitter'
require 'message_hub/providers/facebook'
module MessageHub
def self.provider(name... | $:.unshift File.expand_path("..", __FILE__)
require 'bundler/setup'
Bundler.require(:default)
require 'message_hub/provider'
require 'message_hub/message'
require 'message_hub/providers/gmail'
require 'message_hub/providers/twitter'
require 'message_hub/providers/facebook'
module MessageHub
#####
# Usage:
#
... | Add a little note explaining how to use it. | Add a little note explaining how to use it.
| Ruby | mit | dcu/message_hub | ruby | ## Code Before:
$:.unshift File.expand_path("..", __FILE__)
require 'bundler/setup'
Bundler.require(:default)
require 'message_hub/provider'
require 'message_hub/message'
require 'message_hub/providers/gmail'
require 'message_hub/providers/twitter'
require 'message_hub/providers/facebook'
module MessageHub
def se... |
ab4d0afdc79a36328d9907f887c15651216c9593 | libraries/match/README.md | libraries/match/README.md |
Parity Matching Engine is the matching engine used by the trading system.
## Download
Add a Maven dependency to Parity Matching Engine:
```xml
<dependency>
<groupId>com.paritytrading.parity</groupId>
<artifactId>parity-match</artifactId>
<version><!-- latest release --></version>
</dependency>
```
See the [l... |
Parity Matching Engine is the matching engine used by the trading system.
## Dependencies
Parity Matching Engine depends on the following libraries:
- fastutil 8.1.0
## Download
Add a Maven dependency to Parity Matching Engine:
```xml
<dependency>
<groupId>com.paritytrading.parity</groupId>
<artifactId>parit... | Add dependencies to matching engine documentation | Add dependencies to matching engine documentation
| Markdown | apache-2.0 | pmcs/parity,pmcs/parity,paritytrading/parity,paritytrading/parity | markdown | ## Code Before:
Parity Matching Engine is the matching engine used by the trading system.
## Download
Add a Maven dependency to Parity Matching Engine:
```xml
<dependency>
<groupId>com.paritytrading.parity</groupId>
<artifactId>parity-match</artifactId>
<version><!-- latest release --></version>
</dependency>... |
7c867bc44d695ab15ecf63bdcf71db4088893551 | sketch.js | sketch.js | const WIDTH = 800;
const HEIGHT = 600;
var setup = function() {
createCanvas(WIDTH, HEIGHT);
background(0);
fill(255);
angleMode(DEGREES);
stroke(255);
strokeWeight(1);
strokeCap(SQUARE);
}
var draw = function() {
translate(200, 200);
rotate(45);
rect(-50, -25, 100, 50);
}
| const WIDTH = 800;
const HEIGHT = 600;
var setup = function() {
createCanvas(WIDTH, HEIGHT);
background(0);
fill(255);
angleMode(DEGREES);
stroke(255);
strokeWeight(1);
strokeCap(SQUARE);
}
var draw = function() {
push();
translate(200, 200);
rotate(45);
rect(-50, -25, 100, 50);
pop();
pu... | Use push and pop for different rectangles | Use push and pop for different rectangles
| JavaScript | mit | SimonHFrost/my-p5,SimonHFrost/my-p5 | javascript | ## Code Before:
const WIDTH = 800;
const HEIGHT = 600;
var setup = function() {
createCanvas(WIDTH, HEIGHT);
background(0);
fill(255);
angleMode(DEGREES);
stroke(255);
strokeWeight(1);
strokeCap(SQUARE);
}
var draw = function() {
translate(200, 200);
rotate(45);
rect(-50, -25, 100, 50);
}
## In... |
eaa1c54b119cfc2ff65df53a9ebe94ff424f5dff | src/util/title.js | src/util/title.js | import inflection from 'inflection';
export default (label, source) => typeof label !== 'undefined' ? label : inflection.humanize(source); // eslint-disable-line no-confusing-arrow
| import inflection from 'inflection';
export default (label, source) => {
if (typeof label !== 'undefined') return label;
if (typeof source !== 'undefined') return inflection.humanize(source);
return '';
};
| Fix warning for fields with no source and no label | Fix warning for fields with no source and no label
| JavaScript | mit | matteolc/admin-on-rest,marmelab/admin-on-rest,matteolc/admin-on-rest,marmelab/admin-on-rest | javascript | ## Code Before:
import inflection from 'inflection';
export default (label, source) => typeof label !== 'undefined' ? label : inflection.humanize(source); // eslint-disable-line no-confusing-arrow
## Instruction:
Fix warning for fields with no source and no label
## Code After:
import inflection from 'inflection';
... |
cadf16abb3bbf840efd7aa67201d4b8d91f60271 | README.md | README.md |
A RESTful web service for generating Fibonacci numbers.
|
A RESTful web service for generating Fibonacci numbers.
## Development
Check out the source code to a directory on your local machine.
$ git clone https://github.com/jmckind/fibber.git
$ cd fibber
Next, set up and activate a virtual environment.
$ pip install virtualenv
$ mkdir .venv
$ virtual... | Add development and testing instructions | Add development and testing instructions
| Markdown | mit | jmckind/fibber | markdown | ## Code Before:
A RESTful web service for generating Fibonacci numbers.
## Instruction:
Add development and testing instructions
## Code After:
A RESTful web service for generating Fibonacci numbers.
## Development
Check out the source code to a directory on your local machine.
$ git clone https://github.com... |
375ee0d3990bbe635523dae4493bdaaf90d3875b | spec/lib/champaign_queue/clients/sqs_spec.rb | spec/lib/champaign_queue/clients/sqs_spec.rb | require 'rails_helper'
describe ChampaignQueue::Clients::Sqs do
context "with SQS_QUEUE_URL" do
xit "delivers payload to AWS SQS Queue" do
expected_arguments = {
queue_url: "http://example.com",
message_body: {foo: :bar}.to_json
}
expect_any_instance_of(Aws::SQS::Client).to(
... | require 'rails_helper'
describe ChampaignQueue::Clients::Sqs do
context "with SQS_QUEUE_URL" do
it "delivers payload to AWS SQS Queue" do
expected_arguments = {
queue_url: ENV['SQS_QUEUE_URL'],
message_body: {foo: :bar}.to_json
}
expect_any_instance_of(Aws::SQS::Client).to(
... | Fix broken spec - push to test CircleCI autodeploy | Fix broken spec - push to test CircleCI autodeploy
| Ruby | mit | SumOfUs/Champaign,SumOfUs/Champaign,SumOfUs/Champaign,SumOfUs/Champaign,SumOfUs/Champaign | ruby | ## Code Before:
require 'rails_helper'
describe ChampaignQueue::Clients::Sqs do
context "with SQS_QUEUE_URL" do
xit "delivers payload to AWS SQS Queue" do
expected_arguments = {
queue_url: "http://example.com",
message_body: {foo: :bar}.to_json
}
expect_any_instance_of(Aws::SQ... |
7cbdaef4526ae9586123eee1afdbc64bc733244d | lib/gitlab/performance_bar.rb | lib/gitlab/performance_bar.rb | module Gitlab
module PerformanceBar
include Gitlab::CurrentSettings
ALLOWED_USER_IDS_KEY = 'performance_bar_allowed_user_ids'.freeze
def self.enabled?(user = nil)
return false unless user && allowed_group_id
allowed_user_ids.include?(user.id)
end
def self.allowed_group_id
cur... | module Gitlab
module PerformanceBar
include Gitlab::CurrentSettings
ALLOWED_USER_IDS_KEY = 'performance_bar_allowed_user_ids:v2'.freeze
EXPIRY_TIME = 5.minutes
def self.enabled?(user = nil)
return false unless user && allowed_group_id
allowed_user_ids.include?(user.id)
end
def ... | Expire cached user IDs that can see the performance after 5 minutes | Expire cached user IDs that can see the performance after 5 minutes
If we don't expire the cached user IDs, the list of IDs would become
outdated when a new member is added, or when a member ios removed from
the allowed group.
Signed-off-by: Rémy Coutable <4ea0184b9df19e0786dd00b28e6daa4d26baeb3e@rymai.me>
| Ruby | mit | t-zuehlsdorff/gitlabhq,mmkassem/gitlabhq,stoplightio/gitlabhq,axilleas/gitlabhq,stoplightio/gitlabhq,t-zuehlsdorff/gitlabhq,stoplightio/gitlabhq,dplarson/gitlabhq,dplarson/gitlabhq,iiet/iiet-git,jirutka/gitlabhq,jirutka/gitlabhq,iiet/iiet-git,mmkassem/gitlabhq,iiet/iiet-git,iiet/iiet-git,jirutka/gitlabhq,dreampet/gitla... | ruby | ## Code Before:
module Gitlab
module PerformanceBar
include Gitlab::CurrentSettings
ALLOWED_USER_IDS_KEY = 'performance_bar_allowed_user_ids'.freeze
def self.enabled?(user = nil)
return false unless user && allowed_group_id
allowed_user_ids.include?(user.id)
end
def self.allowed_gr... |
29af20374cee5f7c75efc22b8e653febd78670a9 | .travis.yml | .travis.yml | before_install:
- sudo apt-get update
- sudo apt-get install libicu-dev libmozjs-dev
before_script: ./bootstrap && ./configure
script: make check
language: erlang
otp_release:
- R14B04
| before_install:
- sudo apt-get update
- sudo apt-get install libicu-dev libmozjs-dev
before_script: ./bootstrap && ./configure
script: make check
language: erlang
otp_release:
- R15B01
- R15B
- R14B04
- R14B03
| Expand erlang releases tested by Travis | Expand erlang releases tested by Travis
| YAML | apache-2.0 | fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb,fkaempfer/couchdb | yaml | ## Code Before:
before_install:
- sudo apt-get update
- sudo apt-get install libicu-dev libmozjs-dev
before_script: ./bootstrap && ./configure
script: make check
language: erlang
otp_release:
- R14B04
## Instruction:
Expand erlang releases tested by Travis
## Code After:
before_install:
- sudo apt-get upd... |
bfaa606c7d570e990670f7da49c09de6e75b5139 | spec/quickeebooks/windows/invoice_spec.rb | spec/quickeebooks/windows/invoice_spec.rb | require 'spec_helper'
describe "Quickeebooks::Windows::Model::Invoice" do
it "can parse invoice from XML" do
xml = onlineFixture("invoice.xml")
invoice = Quickeebooks::Windows::Model::Invoice.from_xml(xml)
invoice.header.balance.should == 0
invoice.header.sales_term_id.value.should == "3"
invoice... | require 'spec_helper'
describe "Quickeebooks::Windows::Model::Invoice" do
it "can parse invoice from XML" do
xml = onlineFixture("invoice.xml")
invoice = Quickeebooks::Windows::Model::Invoice.from_xml(xml)
invoice.header.balance.should == 0
invoice.header.sales_term_id.value.should == "3"
invoice... | Test that id and sales_term_id are nil if not present | Windows::Invoice: Test that id and sales_term_id are nil if not present
| Ruby | mit | FundingGates/quickeebooks,FundingGates/quickeebooks | ruby | ## Code Before:
require 'spec_helper'
describe "Quickeebooks::Windows::Model::Invoice" do
it "can parse invoice from XML" do
xml = onlineFixture("invoice.xml")
invoice = Quickeebooks::Windows::Model::Invoice.from_xml(xml)
invoice.header.balance.should == 0
invoice.header.sales_term_id.value.should ==... |
8feca6da7046d6db445a6731924bf61f06dc79a4 | tests/bootstrap.php | tests/bootstrap.php | <?php
spl_autoload_register(function ($class) {
if ( 0 !== strpos($class, 'Doctrine\\Search')) {
return false;
}
$path = __DIR__ . '/../lib';
$file = strtr($class, '\\', '/') . '.php';
$filename = $path . '/' . $file;
if ( file_exists($filename) ) {
return (Boolean) require_once $filename;
}
return... | <?php
require_once __DIR__ . '/../lib/vendor/Buzz/lib/Buzz/ClassLoader.php';
require_once __DIR__ . '/../lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';
// use statements
use Doctrine\Common\ClassLoader;
$loader = new ClassLoader('Doctrine\\Common', __DIR__ . '/../lib/vendor/doctrine-common');
$loade... | Use doctrine classloader instead of closure | Use doctrine classloader instead of closure
| PHP | mit | revinate/search,doctrine/search,fprochazka/doctrine-search | php | ## Code Before:
<?php
spl_autoload_register(function ($class) {
if ( 0 !== strpos($class, 'Doctrine\\Search')) {
return false;
}
$path = __DIR__ . '/../lib';
$file = strtr($class, '\\', '/') . '.php';
$filename = $path . '/' . $file;
if ( file_exists($filename) ) {
return (Boolean) require_once $filena... |
31a685a5385e6e1b9a958a3ebf2eeac525c25e99 | lib/hyperloop.rb | lib/hyperloop.rb | require "hyperloop/application"
require "hyperloop/response"
require "hyperloop/version"
require "hyperloop/view"
require "hyperloop/view/registry"
require "hyperloop/view/scope"
module Hyperloop
# Your code goes here...
end
| require "hyperloop/application"
require "hyperloop/response"
require "hyperloop/version"
require "hyperloop/view"
require "hyperloop/view/registry"
require "hyperloop/view/scope"
module Hyperloop
end
| Remove Bundler-generated comment from root module | Remove Bundler-generated comment from root module
| Ruby | mit | jakeboxer/hyperloop,jakeboxer/hyperloop | ruby | ## Code Before:
require "hyperloop/application"
require "hyperloop/response"
require "hyperloop/version"
require "hyperloop/view"
require "hyperloop/view/registry"
require "hyperloop/view/scope"
module Hyperloop
# Your code goes here...
end
## Instruction:
Remove Bundler-generated comment from root module
## Code ... |
85fd3bc6872a71a1cd16f66cd72ca87c97437e60 | documentation/docs/content/DockerImages/dockerfiles/include/image-tag-php.rst | documentation/docs/content/DockerImages/dockerfiles/include/image-tag-php.rst | ====================== ========================== ===============
Tag Distribution name PHP Version
====================== ========================== ===============
``alpine`` *link to alpine-php7* PHP 7.x
``alpine-php7`` PHP 7.x
``alpine-p... | ====================== =================================== ===============
Tag Distribution name PHP Version
====================== =================================== ===============
``5.6`` *customized official php image* PHP 5.6
``7.0`` *customiz... | Add official php images to tag list | Add official php images to tag list
| reStructuredText | mit | webdevops/Dockerfile,webdevops/Dockerfile,webdevops/Dockerfile,webdevops/Dockerfile,webdevops/Dockerfile,webdevops/Dockerfile | restructuredtext | ## Code Before:
====================== ========================== ===============
Tag Distribution name PHP Version
====================== ========================== ===============
``alpine`` *link to alpine-php7* PHP 7.x
``alpine-php7`` PH... |
92b4abad8cee036ef68215ae8d8c8cbd44a60595 | roles/base/tasks/main.yml | roles/base/tasks/main.yml | ---
- name: Update homebrew
command: brew update
tags:
- base
- brew
- update
- name: Install brew-cask
command: "{{ brew_cask_install }}"
args:
creates: "{{ brew_cask_bin }}"
tags:
- base
- brew
- brew-cask
- name: Install base homebrew packages
homebrew:
name={{ item.nam... | ---
- name: Update homebrew
homebrew: update_homebrew=yes
tags:
- base
- brew
- update
- name: Install brew-cask
command: "{{ brew_cask_install }}"
args:
creates: "{{ brew_cask_bin }}"
tags:
- base
- brew
- brew-cask
- name: Install base homebrew packages
homebrew:
name={{... | Use homebrew module update command | Use homebrew module update command
| YAML | mit | mtchavez/mac-ansible | yaml | ## Code Before:
---
- name: Update homebrew
command: brew update
tags:
- base
- brew
- update
- name: Install brew-cask
command: "{{ brew_cask_install }}"
args:
creates: "{{ brew_cask_bin }}"
tags:
- base
- brew
- brew-cask
- name: Install base homebrew packages
homebrew:
... |
3e4aed3f499af8692e589e9aa96da65300e2bc72 | docs/guides.rst | docs/guides.rst | Guides
===========================================
.. toctree::
:maxdepth: 2
:caption: Contents:
quick-start
configuration
snapshots
indices/README
| Guides
===========================================
.. toctree::
:maxdepth: 2
:caption: Contents:
queue-pinservice
quick-start
configuration
snapshots
indices/README
| Add pinservice as guide to docs. | Add pinservice as guide to docs.
| reStructuredText | agpl-3.0 | ipfs-search/ipfs-search,ipfs-search/ipfs-search | restructuredtext | ## Code Before:
Guides
===========================================
.. toctree::
:maxdepth: 2
:caption: Contents:
quick-start
configuration
snapshots
indices/README
## Instruction:
Add pinservice as guide to docs.
## Code After:
Guides
===========================================
.. toctree::
... |
da99adb84e4a0bac28c3ba9da56081c97fc072b3 | .travis.yml | .travis.yml | language: python
python:
- '2.7'
- '3.3'
- '3.4'
- '3.5'
install: pip install .
script: python -m phabricator.tests.test_phabricator
deploy:
provider: pypi
user: disqus
password:
secure: AJ7zSLd6BgI4W8Kp3KEx5O40bUJA91PkgLTZb5MnCx4/8nUPlkk+LqvodaiiJQEGzpP8COPvRlzJ/swd8d0P38+Se6V83wA43MylimzrgngO6t3... | language: python
python:
- '2.7'
- '3.5'
install: pip install .
script: python -m phabricator.tests.test_phabricator
deploy:
provider: pypi
user: disqus
password:
secure: AJ7zSLd6BgI4W8Kp3KEx5O40bUJA91PkgLTZb5MnCx4/8nUPlkk+LqvodaiiJQEGzpP8COPvRlzJ/swd8d0P38+Se6V83wA43MylimzrgngO6t3c/lXa/aMnrRzSpSfK5... | Remove support for old Python 3.x versions | Remove support for old Python 3.x versions
| YAML | apache-2.0 | disqus/python-phabricator,disqus/python-phabricator | yaml | ## Code Before:
language: python
python:
- '2.7'
- '3.3'
- '3.4'
- '3.5'
install: pip install .
script: python -m phabricator.tests.test_phabricator
deploy:
provider: pypi
user: disqus
password:
secure: AJ7zSLd6BgI4W8Kp3KEx5O40bUJA91PkgLTZb5MnCx4/8nUPlkk+LqvodaiiJQEGzpP8COPvRlzJ/swd8d0P38+Se6V83wA43Mylimzrgng... |
35811e8824c4aee0dd533871defa2c8652887ac8 | bower.json | bower.json | {
"name": "ffrgb-meshviewer",
"ignore": [
"node_modules",
"bower_components",
"**/.*",
"test",
"tests"
],
"dependencies": {
"Leaflet.label": "~0.2.1",
"chroma-js": "~1.1.1",
"leaflet": "~0.7.7",
"moment": "~2.13.0",
"requirejs": "~2.2.0",
"tablesort": "https://github.... | {
"name": "ffrgb-meshviewer",
"ignore": [
"node_modules",
"bower_components",
"**/.*",
"test",
"tests"
],
"dependencies": {
"Leaflet.label": "~0.2.1",
"chroma-js": "~1.1.1",
"leaflet": "https://github.com/davojta/Leaflet.git#v0.7.7.1",
"moment": "~2.13.0",
"requirejs": "~... | Use leaflet v0.7.7.1 to avoid freeze in IE | [TASK] Use leaflet v0.7.7.1 to avoid freeze in IE
| JSON | agpl-3.0 | rubo77/meshviewer-1,Freifunk-Troisdorf/meshviewer,Freifunk-Troisdorf/meshviewer,FreifunkMD/Meshviewer,freifunkMUC/meshviewer,ffrgb/meshviewer,hopglass/ffrgb-meshviewer,xf-/meshviewer-1,xf-/meshviewer-1,ffrgb/meshviewer,rubo77/meshviewer-1,FreifunkBremen/meshviewer-ffrgb,FreifunkBremen/meshviewer-ffrgb,FreifunkMD/Meshvi... | json | ## Code Before:
{
"name": "ffrgb-meshviewer",
"ignore": [
"node_modules",
"bower_components",
"**/.*",
"test",
"tests"
],
"dependencies": {
"Leaflet.label": "~0.2.1",
"chroma-js": "~1.1.1",
"leaflet": "~0.7.7",
"moment": "~2.13.0",
"requirejs": "~2.2.0",
"tablesort": ... |
23cd2122fd484005167117888c1c5b9247efcc40 | src/github.com/stellar/horizon/render/hal/main.go | src/github.com/stellar/horizon/render/hal/main.go | package hal
import (
"encoding/json"
"net/http"
)
// RenderToString renders the provided data as a json string
func RenderToString(data interface{}, pretty bool) ([]byte, error) {
if pretty {
return json.MarshalIndent(data, "", " ")
}
return json.Marshal(data)
}
// Render write data to w, after marshalling ... | package hal
import (
"encoding/json"
"net/http"
)
// RenderToString renders the provided data as a json string
func RenderToString(data interface{}, pretty bool) ([]byte, error) {
if pretty {
return json.MarshalIndent(data, "", " ")
}
return json.Marshal(data)
}
// Render write data to w, after marshalling ... | Add Content-Disposition header for hal responses | Add Content-Disposition header for hal responses
| Go | apache-2.0 | stellar/horizon,stellar/horizon,stellar/horizon | go | ## Code Before:
package hal
import (
"encoding/json"
"net/http"
)
// RenderToString renders the provided data as a json string
func RenderToString(data interface{}, pretty bool) ([]byte, error) {
if pretty {
return json.MarshalIndent(data, "", " ")
}
return json.Marshal(data)
}
// Render write data to w, af... |
262e450989671f65a0bef9c3295c582bca2e55c5 | glance/carrier/shipment.sls | glance/carrier/shipment.sls | {% set prefix = "/srv/container" %}
include:
- openstack.glance.user
glance-api-conf:
file.managed:
- name: {{prefix}}/glance/glance-api.conf
- user: glance
- group: glance
- source: salt://openstack/glance/conf/glance-api.conf
- template: jinja
glance-registry-conf:
file.managed:
- name... | {% set prefix = "/srv/container" %}
include:
- openstack.glance.user
glance-api-conf:
file.managed:
- name: {{prefix}}/glance/glance-api.conf
- user: glance
- group: glance
- source: salt://openstack/glance/conf/glance-api.conf
- template: jinja
- require:
- user: glance-user
glance-... | Add requirement for the glance user | Add requirement for the glance user
| SaltStack | bsd-2-clause | jahkeup/salt-openstack,jahkeup/salt-openstack | saltstack | ## Code Before:
{% set prefix = "/srv/container" %}
include:
- openstack.glance.user
glance-api-conf:
file.managed:
- name: {{prefix}}/glance/glance-api.conf
- user: glance
- group: glance
- source: salt://openstack/glance/conf/glance-api.conf
- template: jinja
glance-registry-conf:
file.man... |
41bed60213c81ccb550342a1efc24fc48d3587dc | go/gedcom/hidify/hidify.go | go/gedcom/hidify/hidify.go | package main
import (
"log"
"os"
"path"
)
func main() {
if len(os.Args) != 3 {
log.Fatalf("Usage: %s input-file output-file", path.Base(os.Args[0]))
}
i, err := os.Open(os.Args[1])
if err != nil {
log.Fatalf("Cannot open %q for reading", os.Args[1])
}
defer i.Close()
o, err := os.Create(os... | package main
import (
"bufio"
"io"
"log"
"os"
"path"
)
func main() {
if len(os.Args) != 3 {
log.Fatalf("Usage: %s input-file output-file", path.Base(os.Args[0]))
}
i, err := os.Open(os.Args[1])
if err != nil {
log.Fatalf("Cannot open %q for reading: %v", os.Args[1], err)
}
defer i.Close... | Add reading/writing logic (but at the moment just echo--no processing logic). | Add reading/writing logic (but at the moment just echo--no processing logic).
| Go | apache-2.0 | pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff,pdbartlett/misc-stuff | go | ## Code Before:
package main
import (
"log"
"os"
"path"
)
func main() {
if len(os.Args) != 3 {
log.Fatalf("Usage: %s input-file output-file", path.Base(os.Args[0]))
}
i, err := os.Open(os.Args[1])
if err != nil {
log.Fatalf("Cannot open %q for reading", os.Args[1])
}
defer i.Close()
o, err... |
8c843fae703df2398967c25008d32a20db22e86a | project/hexitandburn_mega.bat | project/hexitandburn_mega.bat | @echo #----------------------------------------------------------------------------#
@echo # Generating main.lss
@echo #----------------------------------------------------------------------------#
avr-objdump -h -S bin\main.elf > bin\main.lss
@echo #--------------------------------------------------------------------... | @echo #----------------------------------------------------------------------------#
@echo # Generating main.lss
@echo #----------------------------------------------------------------------------#
avr-objdump -h -S bin\main.elf > bin\main.lss
@echo #--------------------------------------------------------------------... | Update comport and avrdude path. | Update comport and avrdude path.
| Batchfile | mit | pvrego/adaino,pvrego/adaino | batchfile | ## Code Before:
@echo #----------------------------------------------------------------------------#
@echo # Generating main.lss
@echo #----------------------------------------------------------------------------#
avr-objdump -h -S bin\main.elf > bin\main.lss
@echo #----------------------------------------------------... |
34f55889d63aff827bd1d2660dd48fa9c1b344b0 | _design/perms/validate_doc_update.js | _design/perms/validate_doc_update.js | /**
* Based on: https://github.com/iriscouch/manage_couchdb/
* License: Apache License 2.0
**/
function(newDoc, oldDoc, userCtx, secObj) {
var ddoc = this;
secObj.admins = secObj.admins || {};
secObj.admins.names = secObj.admins.names || [];
secObj.admins.roles = secObj.admins.roles || [];
var IS_DB_ADMI... | /**
* Based on: https://github.com/iriscouch/manage_couchdb/
* License: Apache License 2.0
**/
function(newDoc, oldDoc, userCtx, secObj) {
var ddoc = this;
secObj.admins = secObj.admins || {};
secObj.admins.names = secObj.admins.names || [];
secObj.admins.roles = secObj.admins.roles || [];
var IS_DB_ADMI... | Make perms write_roles actually work | Make perms write_roles actually work
| JavaScript | apache-2.0 | BigBlueHat/BlueInk,BigBlueHat/BlueInk | javascript | ## Code Before:
/**
* Based on: https://github.com/iriscouch/manage_couchdb/
* License: Apache License 2.0
**/
function(newDoc, oldDoc, userCtx, secObj) {
var ddoc = this;
secObj.admins = secObj.admins || {};
secObj.admins.names = secObj.admins.names || [];
secObj.admins.roles = secObj.admins.roles || [];
... |
d6a9b8f6af4cd6498bdd4d7a0921b6db3ab12f8c | src/clj/whatishistory/handler.clj | src/clj/whatishistory/handler.clj | (ns whatishistory.handler
(:require [compojure.core :refer [GET defroutes]]
[compojure.route :refer [not-found resources]]
[ring.middleware.defaults :refer [site-defaults wrap-defaults]]
[hiccup.core :refer [html]]
[hiccup.page :refer [include-js include-css]]
... | (ns whatishistory.handler
(:require [compojure.core :refer [GET defroutes]]
[compojure.route :refer [not-found resources]]
[ring.middleware.defaults :refer [site-defaults wrap-defaults]]
[hiccup.core :refer [html]]
[hiccup.page :refer [include-js include-css]]
... | Include parse library on page | Include parse library on page
| Clojure | epl-1.0 | ezmiller/whatishistory | clojure | ## Code Before:
(ns whatishistory.handler
(:require [compojure.core :refer [GET defroutes]]
[compojure.route :refer [not-found resources]]
[ring.middleware.defaults :refer [site-defaults wrap-defaults]]
[hiccup.core :refer [html]]
[hiccup.page :refer [include-js include... |
a7711f6e2d1595d5e427aa80f1ca9ba87a698f48 | _config.yml | _config.yml |
paginate: 10 # pagination based on number of posts
paginate_path: "page:num"
highlighter: rouge
name: "[ antoinealb.net ]"
description: A blog about robotics, embedded software and Linux
author:
name: Antoine Albertelli
email: antoinea101@gmail.com
github: antoinealb
twitter: antoinealb
bio: Robotics enthu... |
paginate: 10 # pagination based on number of posts
paginate_path: "page:num"
highlighter: rouge
name: "[ antoinealb.net ]"
description: A blog about robotics, embedded software and Linux. Also doubles as my personal wiki
author:
name: Antoine Albertelli
email: antoinea101@gmail.com
github: antoinealb
twitter... | Add a note that this website also serves as my wiki | Add a note that this website also serves as my wiki
| YAML | mit | antoinealb/antoinealb.github.io,antoinealb/antoinealb.github.io,antoinealb/antoinealb.github.io | yaml | ## Code Before:
paginate: 10 # pagination based on number of posts
paginate_path: "page:num"
highlighter: rouge
name: "[ antoinealb.net ]"
description: A blog about robotics, embedded software and Linux
author:
name: Antoine Albertelli
email: antoinea101@gmail.com
github: antoinealb
twitter: antoinealb
bio... |
9a6f976d6914ad90e99ba74f35bbeacbe55b0db7 | cms/djangoapps/contentstore/features/video-editor.feature | cms/djangoapps/contentstore/features/video-editor.feature | @shard_3
Feature: CMS.Video Component Editor
As a course author, I want to be able to create video components.
Scenario: User can view Video metadata
Given I have created a Video component
And I edit the component
Then I see the correct video settings and default values
# Safari has trouble saving v... | @shard_3
Feature: CMS.Video Component Editor
As a course author, I want to be able to create video components.
Scenario: User can view Video metadata
Given I have created a Video component
And I edit the component
Then I see the correct video settings and default values
# Safari has trouble saving v... | Disable non-deterministic video caption test to get stability on master | Disable non-deterministic video caption test to get stability on master
| Cucumber | agpl-3.0 | vismartltd/edx-platform,shubhdev/edx-platform,auferack08/edx-platform,franosincic/edx-platform,rismalrv/edx-platform,B-MOOC/edx-platform,chauhanhardik/populo,jolyonb/edx-platform,cognitiveclass/edx-platform,romain-li/edx-platform,raccoongang/edx-platform,shubhdev/edx-platform,ZLLab-Mooc/edx-platform,solashirai/edx-plat... | cucumber | ## Code Before:
@shard_3
Feature: CMS.Video Component Editor
As a course author, I want to be able to create video components.
Scenario: User can view Video metadata
Given I have created a Video component
And I edit the component
Then I see the correct video settings and default values
# Safari has ... |
d60116aecbb6935fae508c94905a335fdb0603bb | tests/test_xgboost.py | tests/test_xgboost.py | import unittest
from sklearn import datasets
from xgboost import XGBClassifier
class TestXGBoost(unittest.TestCase):
def test_classifier(self):
boston = datasets.load_boston()
X, y = boston.data, boston.target
xgb1 = XGBClassifier(n_estimators=3)
xgb1.fit(X[0:70],y[0:70])
| import unittest
import xgboost
from distutils.version import StrictVersion
from sklearn import datasets
from xgboost import XGBClassifier
class TestXGBoost(unittest.TestCase):
def test_version(self):
# b/175051617 prevent xgboost version downgrade.
self.assertGreaterEqual(StrictVersion(xgboost.__... | Add xgboost version regression test. | Add xgboost version regression test.
BUG=175051617
| Python | apache-2.0 | Kaggle/docker-python,Kaggle/docker-python | python | ## Code Before:
import unittest
from sklearn import datasets
from xgboost import XGBClassifier
class TestXGBoost(unittest.TestCase):
def test_classifier(self):
boston = datasets.load_boston()
X, y = boston.data, boston.target
xgb1 = XGBClassifier(n_estimators=3)
xgb1.fit(X[0:70],y... |
003e6f400e495cbbae7ecf4aa908c37c78c7e15a | test/Driver/offloading-interoperability.c | test/Driver/offloading-interoperability.c | // REQUIRES: clang-driver
// REQUIRES: powerpc-registered-target
// REQUIRES: nvptx-registered-target
//
// Verify that CUDA device commands do not get OpenMP flags.
//
// RUN: %clang -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \
// RUN: | FileCheck %s --check-pr... | // REQUIRES: clang-driver
// REQUIRES: powerpc-registered-target
// REQUIRES: nvptx-registered-target
//
// Verify that CUDA device commands do not get OpenMP flags.
//
// RUN: %clang -no-canonical-prefixes -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \
// RUN: | ... | Add missing '-no-canonical-prefixes' in test. | Add missing '-no-canonical-prefixes' in test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@277141 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl... | c | ## Code Before:
// REQUIRES: clang-driver
// REQUIRES: powerpc-registered-target
// REQUIRES: nvptx-registered-target
//
// Verify that CUDA device commands do not get OpenMP flags.
//
// RUN: %clang -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \
// RUN: | FileChe... |
e44c80fc6b122382551f625e7b7d8fac9e71dfce | src/localStorage.js | src/localStorage.js | export const loadState = () => {
try {
const state = localStorage.getItem('state')
if (state) {
return JSON.parse(state)
}
return undefined
} catch (error) {
return undefined
}
}
export const saveState = (state) => {
if (!state) {
localStorage.setItem('state', undefined)
}
t... | const cacheBreakerVersion = process.env.VERSION || 2
export const loadState = () => {
try {
const jsonState = localStorage.getItem('state')
if (jsonState) {
const state = JSON.parse(jsonState)
if (state.version !== cacheBreakerVersion) {
return undefined
}
return state
}
... | Add cache breaker localstorage data | :sparkles: Add cache breaker localstorage data
| JavaScript | mit | nathejk/status-app,nathejk/status-app | javascript | ## Code Before:
export const loadState = () => {
try {
const state = localStorage.getItem('state')
if (state) {
return JSON.parse(state)
}
return undefined
} catch (error) {
return undefined
}
}
export const saveState = (state) => {
if (!state) {
localStorage.setItem('state', und... |
a1c7fab1ac050df253909a5d63ba093cf060633a | .packit.yaml | .packit.yaml |
jobs:
- job: copr_build
trigger: pull_request
metadata:
targets:
- epel-7-x86_64
- epel-8-x86_64
- fedora-all
|
jobs:
- job: copr_build
trigger: pull_request
metadata:
targets:
- epel-8-x86_64
- fedora-all
| Remove EPEL 7 from Packit config | Remove EPEL 7 from Packit config
We don't care about it anymore.
Signed-off-by: Adam Cmiel <1217f9865bd733d1bcad0d0d64be310272c5592c@redhat.com>
| YAML | bsd-3-clause | fr34k8/atomic-reactor,fr34k8/atomic-reactor,projectatomic/atomic-reactor,projectatomic/atomic-reactor | yaml | ## Code Before:
jobs:
- job: copr_build
trigger: pull_request
metadata:
targets:
- epel-7-x86_64
- epel-8-x86_64
- fedora-all
## Instruction:
Remove EPEL 7 from Packit config
We don't care about it anymore.
Signed-off-by: Adam Cmiel <1217f9865bd733d1bcad0d0d64be310272c5592c@redhat.com>
## Code ... |
221d672368f8989508aaf5b36f6a4f9f5bd5425a | winthrop/books/migrations/0008_add-digital-edition.py | winthrop/books/migrations/0008_add-digital-edition.py | from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('djiffy', '0002_add-digital-edition'),
('books', '0007_title-length'),
]
operations = [
migrations.AlterMode... | from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('djiffy', '0001_initial'),
('books', '0007_title-length'),
]
operations = [
migrations.AlterModelOptions(
... | Fix migration so it works with actual existing djiffy migrations | Fix migration so it works with actual existing djiffy migrations
| Python | apache-2.0 | Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django | python | ## Code Before:
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('djiffy', '0002_add-digital-edition'),
('books', '0007_title-length'),
]
operations = [
migr... |
368808eee4701f78d2931970d28674c4db0428dc | integration-tests/src/test/java/arez/integration/IdentifiableIntegrationTest.java | integration-tests/src/test/java/arez/integration/IdentifiableIntegrationTest.java | package arez.integration;
import arez.annotations.ArezComponent;
import arez.annotations.ComponentId;
import arez.component.Identifiable;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
@SuppressWarnings( "ConstantConditions" )
public final class IdentifiableIntegrationTest
extends AbstractAr... | package arez.integration;
import arez.annotations.ArezComponent;
import arez.annotations.ComponentId;
import arez.annotations.Feature;
import arez.component.Identifiable;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
@SuppressWarnings( "ConstantConditions" )
public final class IdentifiableInt... | Fix test to reflect current defaults | Fix test to reflect current defaults
| Java | apache-2.0 | realityforge/arez,realityforge/arez,realityforge/arez | java | ## Code Before:
package arez.integration;
import arez.annotations.ArezComponent;
import arez.annotations.ComponentId;
import arez.component.Identifiable;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
@SuppressWarnings( "ConstantConditions" )
public final class IdentifiableIntegrationTest
ex... |
7f5b5fdb1ba8339aac46144c782bf6848a7815b6 | src/object_id.rs | src/object_id.rs | pub struct ObjectId {
pub hash: &'static str,
bytes: Vec<u8>
}
impl ObjectId {
pub fn new(hash: &'static str) -> ObjectId {
ObjectId {
hash: hash,
bytes: Vec::new()
}
}
}
| use conversion;
pub static RAW_SIZE: uint = 20;
pub static HEX_SIZE: uint = 40;
#[deriving(PartialEq, Show)]
pub struct ObjectId {
pub hash: String,
bytes: Vec<u8>
}
impl ObjectId {
pub fn from_string(hash: &str) -> ObjectId {
ObjectId {
hash: hash.to_string(),
... | Make sure ObjectId always has the hash version and the raw version | Make sure ObjectId always has the hash version and the raw version
| Rust | mit | kaisellgren/rust_git | rust | ## Code Before:
pub struct ObjectId {
pub hash: &'static str,
bytes: Vec<u8>
}
impl ObjectId {
pub fn new(hash: &'static str) -> ObjectId {
ObjectId {
hash: hash,
bytes: Vec::new()
}
}
}
## Instruction:
Make sure ObjectId always has the hash version and the raw ... |
d1010ab952181ba172e2997e25aefe3e4fed10b6 | scripts/ttstest.yaml | scripts/ttstest.yaml | ttstest:
alias: Test the TTS
sequence:
- service: script.sonos_say
data_template:
sonos_say_volume: '0.4'
sonos_say_message: 'Hallo, das ist ein Test.'
sonos_say_delay: '00:00:03'
| ttstest:
alias: Test the TTS
sequence:
- service: script.sonos_say
data_template:
sonos_say_volume: '0.4'
sonos_say_message: 'Hallo, das ist ein Test.'
sonos_say_delay: '00:00:03'
| Fix YAML syntax in TTS test script | Fix YAML syntax in TTS test script
| YAML | mit | davidorlea/homeassistant-config,davidorlea/homeassistant-config,davidorlea/homeassistant-config | yaml | ## Code Before:
ttstest:
alias: Test the TTS
sequence:
- service: script.sonos_say
data_template:
sonos_say_volume: '0.4'
sonos_say_message: 'Hallo, das ist ein Test.'
sonos_say_delay: '00:00:03'
## Instruction:
Fix YAML syntax in TTS test script
## Code After:
ttst... |
1dbe7acc945a545d3b18ec5025c19b26d1ed110f | test/test_sparql_construct_bindings.py | test/test_sparql_construct_bindings.py | from rdflib import Graph, URIRef, Literal, BNode
from rdflib.plugins.sparql import prepareQuery
from rdflib.compare import isomorphic
import unittest
class TestConstructInitBindings(unittest.TestCase):
def test_construct_init_bindings(self):
"""
This is issue https://github.com/RDFLib/rdflib/issu... | from rdflib import Graph, URIRef, Literal, BNode
from rdflib.plugins.sparql import prepareQuery
from rdflib.compare import isomorphic
import unittest
from nose.tools import eq_
class TestConstructInitBindings(unittest.TestCase):
def test_construct_init_bindings(self):
"""
This is issue https://gi... | Fix unit tests for python2 | Fix unit tests for python2
| Python | bsd-3-clause | RDFLib/rdflib,RDFLib/rdflib,RDFLib/rdflib,RDFLib/rdflib | python | ## Code Before:
from rdflib import Graph, URIRef, Literal, BNode
from rdflib.plugins.sparql import prepareQuery
from rdflib.compare import isomorphic
import unittest
class TestConstructInitBindings(unittest.TestCase):
def test_construct_init_bindings(self):
"""
This is issue https://github.com/RD... |
9145a67c7427b41cef8f0c4518d2f39fc91d08b3 | fedoracommunity/widgets/package/templates/details.mak | fedoracommunity/widgets/package/templates/details.mak | <div id="package-overview">
<div class="description-block">
<h3>Description</h3>
<p class="package-description">${w.description}</p>
</div>
<div class="active-release-block">
<h3>Active Releases Overview</h3>
<div>${w.children[0].display(package_name=w.package_info['name'])}</d... | <div id="package-overview">
<div class="description-block">
<h3>Description</h3>
<p class="package-description">${w.description}</p>
</div>
<div class="active-release-block">
<h3>Active Releases Overview</h3>
<div>${w.children[0].display(package_name=w.package_info['name'])}</d... | Work with packages that don't have a URL in their spec (like autofs). | Work with packages that don't have a URL in their spec (like autofs).
| Makefile | agpl-3.0 | Fale/fedora-packages,fedora-infra/fedora-packages,fedora-infra/fedora-packages,fedora-infra/fedora-packages,fedora-infra/fedora-packages,Fale/fedora-packages,Fale/fedora-packages | makefile | ## Code Before:
<div id="package-overview">
<div class="description-block">
<h3>Description</h3>
<p class="package-description">${w.description}</p>
</div>
<div class="active-release-block">
<h3>Active Releases Overview</h3>
<div>${w.children[0].display(package_name=w.package_i... |
1af47e4f89c0ccaeadc3134d48e7a18ca987a335 | README.md | README.md |
Light framework for input validation.
[license]: https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat
[license-overview]: http://choosealicense.com/licenses/apache-2.0/
[ci-status]: https://travis-ci.org/alexcristea/brick-validator.svg?branch=develop
[ci-overview]: https://travis-ci.org/al... |
Light framework for input validation.
[license]: https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat
[license-overview]: http://choosealicense.com/licenses/apache-2.0/
[ci-status]: https://travis-ci.org/alexcristea/brick-validator.svg?branch=develop
[ci-overview]: https://travis-ci.org/al... | Update readme info with Carthage support | Update readme info with Carthage support
| Markdown | mit | nsagora/validation-toolkit,nsagora/validation-kit,nsagora/validation-toolkit,nsagora/validation-kit | markdown | ## Code Before:
Light framework for input validation.
[license]: https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat
[license-overview]: http://choosealicense.com/licenses/apache-2.0/
[ci-status]: https://travis-ci.org/alexcristea/brick-validator.svg?branch=develop
[ci-overview]: https://... |
7d1641249eb73fdce05a8cb3825210fcbb22a1de | lib/hub.js | lib/hub.js | /*
* hub.js
*
* Copyright (c) 2012-2014 Maximilian Antoni <mail@maxantoni.de>
*
* @license MIT
*/
'use strict';
var inherits = require('inherits');
var Filter = require('glob-filter').Filter;
var AsyncEmitter = require('async-glob-events').AsyncEmitter;
function defaultCallback(err) {
if (err) {
... | /*
* hub.js
*
* Copyright (c) 2012-2014 Maximilian Antoni <mail@maxantoni.de>
*
* @license MIT
*/
'use strict';
var inherits = require('inherits');
var Filter = require('glob-filter').Filter;
var AsyncEmitter = require('async-glob-events').AsyncEmitter;
function defaultCallback(err) {
if (err) {
... | Rename local variable `emit` to `filter` | Rename local variable `emit` to `filter`
| JavaScript | mit | mantoni/hub.js | javascript | ## Code Before:
/*
* hub.js
*
* Copyright (c) 2012-2014 Maximilian Antoni <mail@maxantoni.de>
*
* @license MIT
*/
'use strict';
var inherits = require('inherits');
var Filter = require('glob-filter').Filter;
var AsyncEmitter = require('async-glob-events').AsyncEmitter;
function defaultCallback(err) {... |
afbd45fd5a55f3e865baf45dd9d17eff23a5b892 | CHANGELOG.md | CHANGELOG.md |
* Fix: add an overflox hidden to html element when modal is opened
* Added : `cc-responsive` for tables
## 3.0.0
* Changed: breakpoints, mobile-first. v3.0.0 is not compatible with lower versions.
|
* Fix: add 'cc-X-xs' class for tiny screens in grids container
## 3.0.1
* Fix: add an overflox hidden to html element when modal is opened
* Added : `cc-responsive` for tables
## 3.0.0
* Changed: breakpoints, mobile-first. v3.0.0 is not compatible with lower versions.
| Debug cc-X-xs class for tiny screens | Debug cc-X-xs class for tiny screens
| Markdown | mit | alpixel/ChuckCSS | markdown | ## Code Before:
* Fix: add an overflox hidden to html element when modal is opened
* Added : `cc-responsive` for tables
## 3.0.0
* Changed: breakpoints, mobile-first. v3.0.0 is not compatible with lower versions.
## Instruction:
Debug cc-X-xs class for tiny screens
## Code After:
* Fix: add 'cc-X-xs' class for t... |
4e172e3e01a9741b6548b188d9cd757ddccd0e20 | conferences/2018/dotnet.json | conferences/2018/dotnet.json | [
{
"name": "Visual Studio Live!",
"url": "https://vslive.com/Events/Redmond-2018/Home.aspx",
"startDate": "2018-08-13",
"endDate": "2018-08-17",
"city": "Redmond, WA",
"country": "U.S.A.",
"twitter": "@vslive"
},
{
"name": "Visual Studio Live!",
"url": "https://vslive.com/Even... | [
{
"name": "Visual Studio Live! Redmond",
"url": "https://vslive.com/Events/Redmond-2018/Home.aspx",
"startDate": "2018-08-13",
"endDate": "2018-08-17",
"city": "Redmond, WA",
"country": "U.S.A.",
"twitter": "@vslive"
},
{
"name": "Visual Studio Live! San Diego",
"url": "https... | Add Visual Studio Live! Chicago | Add Visual Studio Live! Chicago
| JSON | mit | tech-conferences/confs.tech,tech-conferences/confs.tech,tech-conferences/confs.tech | json | ## Code Before:
[
{
"name": "Visual Studio Live!",
"url": "https://vslive.com/Events/Redmond-2018/Home.aspx",
"startDate": "2018-08-13",
"endDate": "2018-08-17",
"city": "Redmond, WA",
"country": "U.S.A.",
"twitter": "@vslive"
},
{
"name": "Visual Studio Live!",
"url": "https:/... |
0c5a408cf6ca7605aa549e95ca05f4506d533f83 | test/MC/Disassembler/PowerPC/ppc64-encoding-4xx.txt | test/MC/Disassembler/PowerPC/ppc64-encoding-4xx.txt | 0x7c 0x72 0x2a 0x86
# CHECK: mtdcr 178, 3
0x7c 0x72 0x2b 0x86
# CHECK: tlbre 2, 3, 0
0x7c 0x43 0x07 0x64
# CHECK: tlbre 2, 3, 1
0x7c 0x43 0x0f 0x64
# CHECK: tlbwe 2, 3, 0
0x7c 0x43 0x07 0xa4
# CHECK: tlbwe 2, 3, 1
0x7c 0x43 0x0f 0xa4
# CHECK: tlbsx 2, 3, 1
0x7c 0x43 0x0f 0x24
# CHECK: tlbsx. 2, 3, 1
0x7c 0x43 0x0f 0... | 0x7c 0x72 0x2a 0x86
# CHECK: mtdcr 178, 3
0x7c 0x72 0x2b 0x86
# CHECK: tlbre 2, 3, 0
0x7c 0x43 0x07 0x64
# CHECK: tlbre 2, 3, 1
0x7c 0x43 0x0f 0x64
# CHECK: tlbwe 2, 3, 0
0x7c 0x43 0x07 0xa4
# CHECK: tlbwe 2, 3, 1
0x7c 0x43 0x0f 0xa4
# CHECK: tlbsx 2, 3, 1
0x7c 0x43 0x0f 0x24
# CHECK: tlbsx. 2, 3, 1
0x7c 0x43 0x0f 0... | Update disassembler test to check the full dccci/iccci form. | Update disassembler test to check the full dccci/iccci form.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@215283 91177308-0d34-0410-b5e6-96231b3b80d8
| Text | apache-2.0 | llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llv... | text | ## Code Before:
0x7c 0x72 0x2a 0x86
# CHECK: mtdcr 178, 3
0x7c 0x72 0x2b 0x86
# CHECK: tlbre 2, 3, 0
0x7c 0x43 0x07 0x64
# CHECK: tlbre 2, 3, 1
0x7c 0x43 0x0f 0x64
# CHECK: tlbwe 2, 3, 0
0x7c 0x43 0x07 0xa4
# CHECK: tlbwe 2, 3, 1
0x7c 0x43 0x0f 0xa4
# CHECK: tlbsx 2, 3, 1
0x7c 0x43 0x0f 0x24
# CHECK: tlbsx. 2, 3, 1
... |
0d0c17d669983fb14f67de1af551d434b698f4ca | packages/ember-htmlbars/lib/hooks/get-root.js | packages/ember-htmlbars/lib/hooks/get-root.js | /**
@module ember
@submodule ember-htmlbars
*/
import Ember from "ember-metal/core";
import { isGlobal } from "ember-metal/path_cache";
import SimpleStream from "ember-metal/streams/simple-stream";
export default function getRoot(scope, key) {
if (key === 'this') {
return [scope.self];
} else if (isGlobal(key... | /**
@module ember
@submodule ember-htmlbars
*/
import Ember from "ember-metal/core";
import { isGlobal } from "ember-metal/path_cache";
import SimpleStream from "ember-metal/streams/simple-stream";
export default function getRoot(scope, key) {
if (key === 'this') {
return [scope.self];
} else if (isGlobal(key... | Remove global stream memoization to fix more tests | Remove global stream memoization to fix more tests
Memoizing into a local variable doesn't work well the tests since
the tests mutate the value of the global. In theory we could
define a test helper to work around this, but it doesn't seem
like its worth the effort since this path is deprecated and
has a simple upgrad... | JavaScript | mit | jherdman/ember.js,schreiaj/ember.js,XrXr/ember.js,trek/ember.js,pixelhandler/ember.js,nipunas/ember.js,johnnyshields/ember.js,lazybensch/ember.js,tiegz/ember.js,green-arrow/ember.js,jayphelps/ember.js,femi-saliu/ember.js,tildeio/ember.js,trek/ember.js,rfsv/ember.js,jamesarosen/ember.js,Trendy/ember.js,kmiyashiro/ember.... | javascript | ## Code Before:
/**
@module ember
@submodule ember-htmlbars
*/
import Ember from "ember-metal/core";
import { isGlobal } from "ember-metal/path_cache";
import SimpleStream from "ember-metal/streams/simple-stream";
export default function getRoot(scope, key) {
if (key === 'this') {
return [scope.self];
} else ... |
4c8733c96eea8bec387f3b1b49dc12b8a84d4169 | zplug/zplug.zsh | zplug/zplug.zsh | export ZPLUG_HOME="$HOME/.zplug"
source "$ZPLUG_HOME/zplug"
zplug "zplug/zplug"
# Don't forget to run `nvm install node && nvm alias default node`
zplug "creationix/nvm", from:github, as:plugin, use:nvm.sh
zplug "lib/directories", from:oh-my-zsh
zplug "lib/key-bindings", from:oh-my-zsh
zplug "plugins/brew", from:oh-m... | export ZPLUG_HOME="$HOME/.zplug"
source "$ZPLUG_HOME/zplug"
zplug "zplug/zplug"
# Don't forget to run `nvm install node && nvm alias default node`
zplug "creationix/nvm", from:github, as:plugin, use:nvm.sh
zplug "lib/directories", from:oh-my-zsh
zplug "lib/key-bindings", from:oh-my-zsh
zplug "plugins/brew", from:oh-m... | Change nvm version to stable. | Change nvm version to stable. | Shell | mit | adamcolejenkins/stackbox-dotfiles,adamcolejenkins/stackbox-dotfiles | shell | ## Code Before:
export ZPLUG_HOME="$HOME/.zplug"
source "$ZPLUG_HOME/zplug"
zplug "zplug/zplug"
# Don't forget to run `nvm install node && nvm alias default node`
zplug "creationix/nvm", from:github, as:plugin, use:nvm.sh
zplug "lib/directories", from:oh-my-zsh
zplug "lib/key-bindings", from:oh-my-zsh
zplug "plugins/... |
1296f7e01f3851cfc9f2395f3c7c6c102f1d0ac9 | .travis.yml | .travis.yml | sudo: false
language: objective-c
before_install:
- brew update
install:
- mkdir -p $(brew --repo)/Library/Taps/travis
- ln -s $PWD $(brew --repo)/Library/Taps/travis/homebrew-testtap
- brew tap --repair
- gem install rubocop
script:
- rubocop --config=$(brew --repo)/Library/.rubocop.yml iwyu.rb
- brew au... | sudo: false
language: objective-c
osx_image:
- beta-xcode6.3
- xcode6.4
- xcode7
before_install:
- brew update
install:
- mkdir -p $(brew --repo)/Library/Taps/travis
- ln -s $PWD $(brew --repo)/Library/Taps/travis/homebrew-testtap
- brew tap --repair
- gem install rubocop --no-document
script:
- rubocop ... | Add matrix build for multiple Xcode versions | Add matrix build for multiple Xcode versions
Also turn off ri/rdoc generation for speed.
| YAML | mit | jasonmp85/homebrew-iwyu | yaml | ## Code Before:
sudo: false
language: objective-c
before_install:
- brew update
install:
- mkdir -p $(brew --repo)/Library/Taps/travis
- ln -s $PWD $(brew --repo)/Library/Taps/travis/homebrew-testtap
- brew tap --repair
- gem install rubocop
script:
- rubocop --config=$(brew --repo)/Library/.rubocop.yml iwy... |
66b20aa7fbd322a051ab7ae26ecd8c46f7605763 | ptoolbox/tags.py | ptoolbox/tags.py |
from datetime import datetime
TAG_WIDTH = 'EXIF ExifImageWidth'
TAG_HEIGHT = 'EXIF ExifImageLength'
TAG_DATETIME = 'Image DateTime'
TAG_ORIENTATION = 'Image Orientation'
# XXX: this is a terrible way to retrieve the orientations. Exifread regretfully does not
# get back raw EXIF orientations, and no other library is... |
from datetime import datetime
TAG_WIDTH = 'EXIF ExifImageWidth'
TAG_HEIGHT = 'EXIF ExifImageLength'
TAG_DATETIME = 'Image DateTime'
def parse_time(tags):
tag = tags.get(TAG_DATETIME, None)
if not tag:
raise KeyError(TAG_DATETIME)
return datetime.strptime(str(tag), "%Y:%m:%d %H:%M:%S")
def parse... | Remove orientation tag parsing, not needed. | Remove orientation tag parsing, not needed.
| Python | mit | vperron/picasa-toolbox | python | ## Code Before:
from datetime import datetime
TAG_WIDTH = 'EXIF ExifImageWidth'
TAG_HEIGHT = 'EXIF ExifImageLength'
TAG_DATETIME = 'Image DateTime'
TAG_ORIENTATION = 'Image Orientation'
# XXX: this is a terrible way to retrieve the orientations. Exifread regretfully does not
# get back raw EXIF orientations, and no ... |
d6e9e791771416a896751a67a779896a95241b3c | packages/logconsole-extension/style/base.css | packages/logconsole-extension/style/base.css | :root [data-jp-theme-light='true'] {
--jp-icon-output-console: url('./list-icon-light.svg');
}
:root [data-jp-theme-light='false'] {
--jp-icon-output-console: url('./list-icon-dark.svg');
}
.jp-LogConsoleIcon {
background-image: var(--jp-icon-output-console);
}
.jp-LogConsoleStatusItem.hilite {
transition: b... | :root [data-jp-theme-light='true'] {
--jp-icon-output-console: url('./list-icon-light.svg');
}
:root [data-jp-theme-light='false'] {
--jp-icon-output-console: url('./list-icon-dark.svg');
}
.jp-LogConsoleIcon {
background-image: var(--jp-icon-output-console);
}
.jp-LogConsoleStatusItem.hilite {
transition: b... | Make the info colors consistent with usage elsewhere in JLab. | Make the info colors consistent with usage elsewhere in JLab. | CSS | bsd-3-clause | jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab | css | ## Code Before:
:root [data-jp-theme-light='true'] {
--jp-icon-output-console: url('./list-icon-light.svg');
}
:root [data-jp-theme-light='false'] {
--jp-icon-output-console: url('./list-icon-dark.svg');
}
.jp-LogConsoleIcon {
background-image: var(--jp-icon-output-console);
}
.jp-LogConsoleStatusItem.hilite {... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.