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, "binary")
np_ascii = conv.apply_lut_numpy(img, "binary")
assert(pil_ascii == np_ascii) | 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),
("simple", "binary"),
(None, conv.apply_lut_pil)))
def test_pil_to_ascii(invert, equalize, lut, lookup_func):
img = np.random.randint(0, 255, (480, 640), dtype=np.uint8)
h, w = img.shape
expected_len = int(h*0.5*conv.ASPECTCORRECTIONFACTOR)*(int(w*0.5)+1)+1
img = conv.numpy_to_pil(img)
text = conv.pil_to_ascii(img, 0.5, invert, equalize, lut, lookup_func)
assert(len(text) == expected_len)
@pytest.mark.parametrize("invert,equalize,lut",
itertools.product((True, False),
(True, False),
("simple", "binary")))
def test_numpy_to_ascii(invert, equalize, lut):
img = np.random.randint(0, 255, (480, 640), dtype=np.uint8)
h, w = img.shape
expected_len = int(h*0.5*conv.ASPECTCORRECTIONFACTOR)*(int(w*0.5)+1)+1
text = conv.numpy_to_ascii(img, 0.5, invert, equalize, lut)
assert(len(text) == expected_len)
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, "binary")
np_ascii = conv.apply_lut_numpy(img, "binary")
assert(pil_ascii == np_ascii)
| 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.apply_lut_pil(img, "binary")
np_ascii = conv.apply_lut_numpy(img, "binary")
assert(pil_ascii == np_ascii)
## Instruction:
Add tests to minimally exercise basic conversion functionality
## Code After:
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),
("simple", "binary"),
(None, conv.apply_lut_pil)))
def test_pil_to_ascii(invert, equalize, lut, lookup_func):
img = np.random.randint(0, 255, (480, 640), dtype=np.uint8)
h, w = img.shape
expected_len = int(h*0.5*conv.ASPECTCORRECTIONFACTOR)*(int(w*0.5)+1)+1
img = conv.numpy_to_pil(img)
text = conv.pil_to_ascii(img, 0.5, invert, equalize, lut, lookup_func)
assert(len(text) == expected_len)
@pytest.mark.parametrize("invert,equalize,lut",
itertools.product((True, False),
(True, False),
("simple", "binary")))
def test_numpy_to_ascii(invert, equalize, lut):
img = np.random.randint(0, 255, (480, 640), dtype=np.uint8)
h, w = img.shape
expected_len = int(h*0.5*conv.ASPECTCORRECTIONFACTOR)*(int(w*0.5)+1)+1
text = conv.numpy_to_ascii(img, 0.5, invert, equalize, lut)
assert(len(text) == expected_len)
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, "binary")
np_ascii = conv.apply_lut_numpy(img, "binary")
assert(pil_ascii == np_ascii)
|
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 continuous trait
## Code After:
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
|
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, " ".join(SCOPES))
# Step 1: get user code and verification URL
# https://developers.google.com/accounts/docs/OAuth2ForDevices#obtainingacode
flow_info = flow.step1_get_device_and_user_codes()
print "Enter the following code at %s: %s" % (flow_info.verification_url,
flow_info.user_code)
print "Then press Enter."
input()
# Step 2: get credentials
# https://developers.google.com/accounts/docs/OAuth2ForDevices#obtainingatoken
credentials = flow.step2_exchange(device_flow_info=flow_info)
print "Access token:", credentials.access_token
print "Refresh token:", credentials.refresh_token
# Get YouTube service
# https://developers.google.com/accounts/docs/OAuth2ForDevices#callinganapi
youtube = build("youtube", "v3", http=credentials.authorize(httplib2.Http()))
|
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, " ".join(SCOPES))
# Step 1: get user code and verification URL
# https://developers.google.com/accounts/docs/OAuth2ForDevices#obtainingacode
flow_info = flow.step1_get_device_and_user_codes()
print("Enter the following code at {0}: {1}".format(flow_info.verification_url,
flow_info.user_code))
print("Then press Enter.")
input()
# Step 2: get credentials
# https://developers.google.com/accounts/docs/OAuth2ForDevices#obtainingatoken
credentials = flow.step2_exchange(device_flow_info=flow_info)
print("Access token: {0}".format(credentials.access_token))
print("Refresh token: {0}".format(credentials.refresh_token))
# Get YouTube service
# https://developers.google.com/accounts/docs/OAuth2ForDevices#callinganapi
youtube = build("youtube", "v3", http=credentials.authorize(httplib2.Http()))
| 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 examples as well, or is piece meal all right? | 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, CLIENT_SECRET, " ".join(SCOPES))
# Step 1: get user code and verification URL
# https://developers.google.com/accounts/docs/OAuth2ForDevices#obtainingacode
flow_info = flow.step1_get_device_and_user_codes()
print "Enter the following code at %s: %s" % (flow_info.verification_url,
flow_info.user_code)
print "Then press Enter."
input()
# Step 2: get credentials
# https://developers.google.com/accounts/docs/OAuth2ForDevices#obtainingatoken
credentials = flow.step2_exchange(device_flow_info=flow_info)
print "Access token:", credentials.access_token
print "Refresh token:", credentials.refresh_token
# Get YouTube service
# https://developers.google.com/accounts/docs/OAuth2ForDevices#callinganapi
youtube = build("youtube", "v3", http=credentials.authorize(httplib2.Http()))
## Instruction:
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 examples as well, or is piece meal all right?
## Code After:
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, " ".join(SCOPES))
# Step 1: get user code and verification URL
# https://developers.google.com/accounts/docs/OAuth2ForDevices#obtainingacode
flow_info = flow.step1_get_device_and_user_codes()
print("Enter the following code at {0}: {1}".format(flow_info.verification_url,
flow_info.user_code))
print("Then press Enter.")
input()
# Step 2: get credentials
# https://developers.google.com/accounts/docs/OAuth2ForDevices#obtainingatoken
credentials = flow.step2_exchange(device_flow_info=flow_info)
print("Access token: {0}".format(credentials.access_token))
print("Refresh token: {0}".format(credentials.refresh_token))
# Get YouTube service
# https://developers.google.com/accounts/docs/OAuth2ForDevices#callinganapi
youtube = build("youtube", "v3", http=credentials.authorize(httplib2.Http()))
|
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.''',
url = 'http://github.com/seomoz/qless-py',
author = 'Dan Lecocq',
author_email = 'dan@seomoz.org',
license = "MIT License",
keywords = 'redis, qless, job',
packages = ['qless', 'qless.workers'],
package_dir = {
'qless': 'qless',
'qless.workers': 'qless/workers'},
package_data = {'qless': ['qless-core/*.lua']},
include_package_data = True,
scripts = ['bin/qless-py-worker'],
extras_require = {
'ps': ['setproctitle']
},
install_requires = [
'argparse', 'hiredis', 'redis', 'psutil', 'simplejson'],
classifiers = [
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Intended Audience :: Developers',
'Operating System :: OS Independent'
]
)
|
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.''',
url = 'http://github.com/seomoz/qless-py',
author = 'Dan Lecocq',
author_email = 'dan@seomoz.org',
license = "MIT License",
keywords = 'redis, qless, job',
packages = ['qless', 'qless.workers'],
package_dir = {
'qless': 'qless',
'qless.workers': 'qless/workers'},
package_data = {'qless': ['qless-core/*.lua']},
include_package_data = True,
scripts = ['bin/qless-py-worker'],
extras_require = {
'ps': ['setproctitle']
},
install_requires = [
'argparse', 'decorator', 'hiredis', 'redis', 'psutil', 'simplejson'],
classifiers = [
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Intended Audience :: Developers',
'Operating System :: OS Independent'
]
)
| 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 lot more.''',
url = 'http://github.com/seomoz/qless-py',
author = 'Dan Lecocq',
author_email = 'dan@seomoz.org',
license = "MIT License",
keywords = 'redis, qless, job',
packages = ['qless', 'qless.workers'],
package_dir = {
'qless': 'qless',
'qless.workers': 'qless/workers'},
package_data = {'qless': ['qless-core/*.lua']},
include_package_data = True,
scripts = ['bin/qless-py-worker'],
extras_require = {
'ps': ['setproctitle']
},
install_requires = [
'argparse', 'hiredis', 'redis', 'psutil', 'simplejson'],
classifiers = [
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Intended Audience :: Developers',
'Operating System :: OS Independent'
]
)
## Instruction:
Fix for "No module named decorator" on fresh environment installs.
Fixes regression from 4b26b5837ced0c2f76495b05b87e63e05f81c2af.
## Code After:
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.''',
url = 'http://github.com/seomoz/qless-py',
author = 'Dan Lecocq',
author_email = 'dan@seomoz.org',
license = "MIT License",
keywords = 'redis, qless, job',
packages = ['qless', 'qless.workers'],
package_dir = {
'qless': 'qless',
'qless.workers': 'qless/workers'},
package_data = {'qless': ['qless-core/*.lua']},
include_package_data = True,
scripts = ['bin/qless-py-worker'],
extras_require = {
'ps': ['setproctitle']
},
install_requires = [
'argparse', 'decorator', 'hiredis', 'redis', 'psutil', 'simplejson'],
classifiers = [
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Intended Audience :: Developers',
'Operating System :: OS Independent'
]
)
|
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 version);
void checkedOutAlready(String version);
void versionUnknown(String version);
void noPatchPath(String version);
void beginApplyPatch(String fromVersion, String toVersion);
void finishApplyPatch(String fromVersion, String toVersion);
void beginDownloadPatch(URL url);
void finishDownloadPatch(URL url);
void beginPatchingDirectory(Path path);
void finishPatchingDirectory(Path path);
void beginPatchingFile(Path path);
void finishPatchingFile(Path path);
void foundPatchPath(GraphPath<String, DefaultEdge> patchPath);
void crcMismatch(Path patchPath);
}
| 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 void finishCheckoutVersion(String version) {
}
default void checkedOutAlready(String version) {
}
default void versionUnknown(String version) {
}
default void noPatchPath(String version) {
}
default void beginApplyPatch(String fromVersion, String toVersion) {
}
default void finishApplyPatch(String fromVersion, String toVersion) {
}
default void beginDownloadPatch(URL url) {
}
default void finishDownloadPatch(URL url) {
}
default void beginPatchingDirectory(Path path) {
}
default void finishPatchingDirectory(Path path) {
}
default void beginPatchingFile(Path path) {
}
default void finishPatchingFile(Path path) {
}
default void foundPatchPath(GraphPath<String, DefaultEdge> patchPath) {
}
default void crcMismatch(Path patchPath) {
}
}
| 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 finishCheckoutVersion(String version);
void checkedOutAlready(String version);
void versionUnknown(String version);
void noPatchPath(String version);
void beginApplyPatch(String fromVersion, String toVersion);
void finishApplyPatch(String fromVersion, String toVersion);
void beginDownloadPatch(URL url);
void finishDownloadPatch(URL url);
void beginPatchingDirectory(Path path);
void finishPatchingDirectory(Path path);
void beginPatchingFile(Path path);
void finishPatchingFile(Path path);
void foundPatchPath(GraphPath<String, DefaultEdge> patchPath);
void crcMismatch(Path patchPath);
}
## Instruction:
Add empty default implementations for notification service
## Code After:
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 void finishCheckoutVersion(String version) {
}
default void checkedOutAlready(String version) {
}
default void versionUnknown(String version) {
}
default void noPatchPath(String version) {
}
default void beginApplyPatch(String fromVersion, String toVersion) {
}
default void finishApplyPatch(String fromVersion, String toVersion) {
}
default void beginDownloadPatch(URL url) {
}
default void finishDownloadPatch(URL url) {
}
default void beginPatchingDirectory(Path path) {
}
default void finishPatchingDirectory(Path path) {
}
default void beginPatchingFile(Path path) {
}
default void finishPatchingFile(Path path) {
}
default void foundPatchPath(GraphPath<String, DefaultEdge> patchPath) {
}
default void crcMismatch(Path patchPath) {
}
}
|
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 +resource+, or nil the Class is not found
# @param [Fog::Model] resource the resource for which to generate a bill
# @param [Hash] options optional additional parameters:
# - :logger - a Ruby Logger-compatible object
# @return [ResourceBillingPolicy] a billing policy object for resource
def self.create_billing_agent(resource, options = {})
agent = nil
billing_class_name = "CloudCostTracker::Billing::Resources"
if matches = resource.class.name.match(%r{^Fog::(\w+)::(\w+)::(\w+)})
fog_svc, provider, policy_name =
matches[1], matches[2], "#{matches[3]}BillingPolicy"
billing_class_name += "::#{fog_svc}::#{provider}::#{policy_name}"
service_module =
CloudCostTracker::Billing::Resources::const_get fog_svc
provider_module = service_module.send(:const_get, provider)
if provider_module.send(:const_defined?, policy_name)
policy_class = provider_module.send(:const_get, policy_name)
agent = policy_class.send(:new, resource, {:logger => options[:logger]})
end
end
agent
end
end
| 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:
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 +resource+, or nil the Class is not found
# @param [Fog::Model] resource the resource for which to generate a bill
# @param [Hash] options optional additional parameters:
# - :logger - a Ruby Logger-compatible object
# @return [ResourceBillingPolicy] a billing policy object for resource
def self.create_billing_agent(resource, options = {})
agent = nil
billing_class_name = "CloudCostTracker::Billing::Resources"
if matches = resource.class.name.match(%r{^Fog::(\w+)::(\w+)::(\w+)})
fog_svc, provider, policy_name =
matches[1], matches[2], "#{matches[3]}BillingPolicy"
billing_class_name += "::#{fog_svc}::#{provider}::#{policy_name}"
service_module =
CloudCostTracker::Billing::Resources::const_get fog_svc
provider_module = service_module.send(:const_get, provider)
if provider_module.send(:const_defined?, policy_name)
policy_class = provider_module.send(:const_get, policy_name)
agent = policy_class.send(:new, resource, {:logger => options[:logger]})
end
end
agent
end
end
|
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: { disable_with: "#{submit_name.eql?('Delete') ? 'Deleting...' : 'Accepting...'}" } %>
<% end %>
| <%= 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: { disable_with: "#{submit_name.eql?('Accept') ? 'Accepting...' : 'Cancelling...'}" } %>
<% end %>
| 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-default", data: { disable_with: "#{submit_name.eql?('Delete') ? 'Deleting...' : 'Accepting...'}" } %>
<% end %>
## Instruction:
Fix disable messages after name changes
## Code After:
<%= 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: { disable_with: "#{submit_name.eql?('Accept') ? 'Accepting...' : 'Cancelling...'}" } %>
<% end %>
|
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 ros-qi docker container with
docker run -it --name ros --rm -p 8888:8888 -p9090:9090 -p11311:11311 magiclab/ros-qi
- Navigate to [http://localhost:8888/](http://localhost:8888/) and use the password `ros`
- Run some python code, with `import qi` and `import rospy`. Open a `qi` session with the URI of a pepper or choreographe simulation.
|
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 the ros-qi directory manually):
git clone https://github.com/uts-magic-lab/ros-docker.git
cd ros-docker/ros-qi
Download [`pynaoqi-python2.7-2.5.5.5-linux64.tar.gz`](https://developer.softbankrobotics.com/Software/Python/2.5.5/Linux/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 ros-qi docker container with
docker run -it --name ros --rm -p 8888:8888 -p9090:9090 -p11311:11311 magiclab/ros-qi
- Navigate to [http://localhost:8888/](http://localhost:8888/) and use the password `ros`
- Run some python code, with `import qi` and `import rospy`. Open a `qi` session with the URI of a pepper or choreographe simulation.
| 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
### Usage
- Run ros-qi docker container with
docker run -it --name ros --rm -p 8888:8888 -p9090:9090 -p11311:11311 magiclab/ros-qi
- Navigate to [http://localhost:8888/](http://localhost:8888/) and use the password `ros`
- Run some python code, with `import qi` and `import rospy`. Open a `qi` session with the URI of a pepper or choreographe simulation.
## Instruction:
Make the installation steps easier for beginners
## Code After:
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 the ros-qi directory manually):
git clone https://github.com/uts-magic-lab/ros-docker.git
cd ros-docker/ros-qi
Download [`pynaoqi-python2.7-2.5.5.5-linux64.tar.gz`](https://developer.softbankrobotics.com/Software/Python/2.5.5/Linux/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 ros-qi docker container with
docker run -it --name ros --rm -p 8888:8888 -p9090:9090 -p11311:11311 magiclab/ros-qi
- Navigate to [http://localhost:8888/](http://localhost:8888/) and use the password `ros`
- Run some python code, with `import qi` and `import rospy`. Open a `qi` session with the URI of a pepper or choreographe simulation.
|
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" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev install
- php app/console doctrine:database:create
- php app/console doctrine:schema:create
- php app/console doctrine:mongodb:create
script:
- phpunit
- echo "Running tests requiring tty"; phpunit --group tty
notifications:
email:
- johann_27@hotmail.fr | 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" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev install
script:
- phpunit
- echo "Running tests requiring tty"; phpunit --group tty
notifications:
email:
- johann_27@hotmail.fr | 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-platform,Flagbit/certificationy-web-platform,Flagbit/certificationy-web-platform,ProPheT777/certificationy-web-platform,ProPheT777/certificationy-web-platform,Flagbit/certificationy-web-platform | 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.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev install
- php app/console doctrine:database:create
- php app/console doctrine:schema:create
- php app/console doctrine:mongodb:create
script:
- phpunit
- echo "Running tests requiring tty"; phpunit --group tty
notifications:
email:
- johann_27@hotmail.fr
## Instruction:
Remove not used instruction for now
## Code After:
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" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev install
script:
- phpunit
- echo "Running tests requiring tty"; phpunit --group tty
notifications:
email:
- johann_27@hotmail.fr |
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.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
implementation("com.google.code.gson:gson:2.8.5")
testImplementation(project(":testApi"))
testImplementation("junit:junit:4.13")
}
val sourceJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
}
publishing {
publications {
register<MavenPublication>("dokkaCore") {
artifactId = "dokka-core"
from(components["java"])
artifact(sourceJar.get())
}
}
}
configureBintrayPublication("dokkaCore")
| 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.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
implementation("com.google.code.gson:gson:2.8.5")
implementation("org.jsoup:jsoup:1.12.1")
testImplementation(project(":testApi"))
testImplementation("junit:junit:4.13")
}
val sourceJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
}
publishing {
publications {
register<MavenPublication>("dokkaCore") {
artifactId = "dokka-core"
from(components["java"])
artifact(sourceJar.get())
}
}
}
configureBintrayPublication("dokkaCore")
| 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")
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
implementation("com.google.code.gson:gson:2.8.5")
testImplementation(project(":testApi"))
testImplementation("junit:junit:4.13")
}
val sourceJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
}
publishing {
publications {
register<MavenPublication>("dokkaCore") {
artifactId = "dokka-core"
from(components["java"])
artifact(sourceJar.get())
}
}
}
configureBintrayPublication("dokkaCore")
## Instruction:
Fix building, we still need jsoup in the core for HtmlParser
## Code After:
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.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlin_version")
implementation("com.google.code.gson:gson:2.8.5")
implementation("org.jsoup:jsoup:1.12.1")
testImplementation(project(":testApi"))
testImplementation("junit:junit:4.13")
}
val sourceJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
}
publishing {
publications {
register<MavenPublication>("dokkaCore") {
artifactId = "dokka-core"
from(components["java"])
artifact(sourceJar.get())
}
}
}
configureBintrayPublication("dokkaCore")
|
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
import com.canoo.dolphin.core.server.action.SwitchPmAction
import com.canoo.dolphin.core.client.comm.ClientConnector
import javafx.application.Platform
import com.canoo.dolphin.core.client.comm.UiThreadHandler
class InMemoryConfig {
Receiver receiver = new Receiver()
InMemoryConfig() {
LogConfig.logCommunication()
connector.sleepMillis = 100
connector.receiver = receiver
connector.uiThreadHandler = { Platform.runLater it } as UiThreadHandler
}
ClientConnector getConnector() { InMemoryClientConnector.instance }
void withActions() {
[
new StoreValueChangeAction(),
StoreAttributeAction.instance,
new SwitchPmAction(),
new CustomAction(), // just to have also some application-specific action
].each { register it }
}
void register(action) {
action.registerIn receiver.registry
}
}
| 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
import com.canoo.dolphin.core.server.action.SwitchPmAction
import com.canoo.dolphin.core.client.comm.ClientConnector
import com.canoo.dolphin.core.client.comm.JavaFXUiThreadHandler
class InMemoryConfig {
Receiver receiver = new Receiver()
InMemoryConfig() {
LogConfig.logCommunication()
connector.sleepMillis = 100
connector.receiver = receiver
connector.uiThreadHandler = new JavaFXUiThreadHandler()
}
ClientConnector getConnector() { InMemoryClientConnector.instance }
void withActions() {
[
new StoreValueChangeAction(),
StoreAttributeAction.instance,
new SwitchPmAction(),
new CustomAction(), // just to have also some application-specific action
].each { register it }
}
void register(action) {
action.registerIn receiver.registry
}
}
| 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/open-dolphin,gemaSantiago/open-dolphin,nagyistoce/open-dolphin,DaveKriewall/open-dolphin,gemaSantiago/open-dolphin,canoo/open-dolphin,canoo/open-dolphin,DaveKriewall/open-dolphin,janih/open-dolphin,nagyistoce/open-dolphin | 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.StoreValueChangeAction
import com.canoo.dolphin.core.server.action.SwitchPmAction
import com.canoo.dolphin.core.client.comm.ClientConnector
import javafx.application.Platform
import com.canoo.dolphin.core.client.comm.UiThreadHandler
class InMemoryConfig {
Receiver receiver = new Receiver()
InMemoryConfig() {
LogConfig.logCommunication()
connector.sleepMillis = 100
connector.receiver = receiver
connector.uiThreadHandler = { Platform.runLater it } as UiThreadHandler
}
ClientConnector getConnector() { InMemoryClientConnector.instance }
void withActions() {
[
new StoreValueChangeAction(),
StoreAttributeAction.instance,
new SwitchPmAction(),
new CustomAction(), // just to have also some application-specific action
].each { register it }
}
void register(action) {
action.registerIn receiver.registry
}
}
## Instruction:
Use JavaFXUiThreadHandler instead of ad-hoc proxied closure
## Code After:
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
import com.canoo.dolphin.core.server.action.SwitchPmAction
import com.canoo.dolphin.core.client.comm.ClientConnector
import com.canoo.dolphin.core.client.comm.JavaFXUiThreadHandler
class InMemoryConfig {
Receiver receiver = new Receiver()
InMemoryConfig() {
LogConfig.logCommunication()
connector.sleepMillis = 100
connector.receiver = receiver
connector.uiThreadHandler = new JavaFXUiThreadHandler()
}
ClientConnector getConnector() { InMemoryClientConnector.instance }
void withActions() {
[
new StoreValueChangeAction(),
StoreAttributeAction.instance,
new SwitchPmAction(),
new CustomAction(), // just to have also some application-specific action
].each { register it }
}
void register(action) {
action.registerIn receiver.registry
}
}
|
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': exc_value,
'traceback': exc_tb},
'traceback': traceback.format_exception(*exc_info)}
class EventLoop(object, metaclass=Singleton):
"""A generic event loop object."""
def __init__(self):
self.queue = queue.Queue()
def schedule(self, event):
"""Schedule an event.
The events have the form::
(event, error)
where `event` is a thunk and `error` is called with an
exception message (output of `_format_exception`) if there is
an error when executing `event`.
"""
self.queue.put(event)
def stop(self):
"""Stop the loop."""
pass
def run_step(self, block=True):
"""Process one event."""
ev, error = self.queue.get(block=block)
try:
ev()
except Exception as exc:
error(_format_exception(sys.exc_info()))
def run(self):
"""Process all events in the queue."""
try:
while True:
self.run_step(block=False)
except queue.Empty:
return
|
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,
'value': exc_value,
'traceback': exc_tb},
'traceback': traceback.format_exception(*exc_info)}
class EventLoop(object, metaclass=Singleton):
"""A generic event loop object."""
def __init__(self):
self.queue = queue.Queue()
def schedule(self, event):
"""Schedule an event.
The events have the form::
(event, error)
where `event` is a thunk and `error` is called with an
exception message (output of `exception_message`) if there is
an error when executing `event`.
"""
self.queue.put(event)
def stop(self):
"""Stop the loop."""
pass
def run_step(self, block=True):
"""Process one event."""
ev, error = self.queue.get(block=block)
try:
ev()
except Exception as exc:
error(exception_message())
def run(self):
"""Process all events in the queue."""
try:
while True:
self.run_step(block=False)
except queue.Empty:
return
| 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,
'value': exc_value,
'traceback': exc_tb},
'traceback': traceback.format_exception(*exc_info)}
class EventLoop(object, metaclass=Singleton):
"""A generic event loop object."""
def __init__(self):
self.queue = queue.Queue()
def schedule(self, event):
"""Schedule an event.
The events have the form::
(event, error)
where `event` is a thunk and `error` is called with an
exception message (output of `_format_exception`) if there is
an error when executing `event`.
"""
self.queue.put(event)
def stop(self):
"""Stop the loop."""
pass
def run_step(self, block=True):
"""Process one event."""
ev, error = self.queue.get(block=block)
try:
ev()
except Exception as exc:
error(_format_exception(sys.exc_info()))
def run(self):
"""Process all events in the queue."""
try:
while True:
self.run_step(block=False)
except queue.Empty:
return
## Instruction:
Make exception message builder a nicer function
It is used by clients in other modules.
## Code After:
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,
'value': exc_value,
'traceback': exc_tb},
'traceback': traceback.format_exception(*exc_info)}
class EventLoop(object, metaclass=Singleton):
"""A generic event loop object."""
def __init__(self):
self.queue = queue.Queue()
def schedule(self, event):
"""Schedule an event.
The events have the form::
(event, error)
where `event` is a thunk and `error` is called with an
exception message (output of `exception_message`) if there is
an error when executing `event`.
"""
self.queue.put(event)
def stop(self):
"""Stop the loop."""
pass
def run_step(self, block=True):
"""Process one event."""
ev, error = self.queue.get(block=block)
try:
ev()
except Exception as exc:
error(exception_message())
def run(self):
"""Process all events in the queue."""
try:
while True:
self.run_step(block=False)
except queue.Empty:
return
|
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 following Docker command. If
it produces the welcome message, you're ready to move on to the next lab.
```
$ docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://cloud.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
```
| ---
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-ce/ubuntu/) by
following the official installation instructions for your platform.
## Test Your Installation
To make sure that the installation worked, run the following Docker command. If
it produces the welcome message, you're ready to move on to the next lab.
```
$ docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://cloud.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
```
| 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 worked, run the following Docker command. If
it produces the welcome message, you're ready to move on to the next lab.
```
$ docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://cloud.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
```
## Instruction:
Update Docker CE Download Links
## Code After:
---
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-ce/ubuntu/) by
following the official installation instructions for your platform.
## Test Your Installation
To make sure that the installation worked, run the following Docker command. If
it produces the welcome message, you're ready to move on to the next lab.
```
$ docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://cloud.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
```
|
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] || "#general"
raise ArgumentError, "Subdomain required" if @team.nil?
raise ArgumentError, "Token required" if @token.nil?
end
def test
notify("This is a test message!")
end
def notify(text, channel=nil)
send_payload(
text: text,
channel: channel || @channel,
username: @username
)
end
private
def send_payload(payload)
response = Faraday.post(hook_url) do |req|
req.body = JSON.dump(payload)
end
if response.success?
true
else
if response.body.include?("\n")
raise SlackNotify::Error
else
raise SlackNotify::Error.new(response.body)
end
end
end
def hook_url
"https://#{@team}.slack.com/services/hooks/incoming-webhook?token=#{@token}"
end
end
end | 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] || "#general"
raise ArgumentError, "Subdomain required" if @team.nil?
raise ArgumentError, "Token required" if @token.nil?
end
def test
notify("This is a test message!")
end
def notify(text, channel=nil)
channels = [channel || @channel].flatten.compact.uniq
channels.each do |chan|
send_payload(text: text, username: @username, channel: chan)
end
end
private
def send_payload(payload)
response = Faraday.post(hook_url) do |req|
req.body = JSON.dump(payload)
end
if response.success?
true
else
if response.body.include?("\n")
raise SlackNotify::Error
else
raise SlackNotify::Error.new(response.body)
end
end
end
def hook_url
"https://#{@team}.slack.com/services/hooks/incoming-webhook?token=#{@token}"
end
end
end | 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[:channel] || "#general"
raise ArgumentError, "Subdomain required" if @team.nil?
raise ArgumentError, "Token required" if @token.nil?
end
def test
notify("This is a test message!")
end
def notify(text, channel=nil)
send_payload(
text: text,
channel: channel || @channel,
username: @username
)
end
private
def send_payload(payload)
response = Faraday.post(hook_url) do |req|
req.body = JSON.dump(payload)
end
if response.success?
true
else
if response.body.include?("\n")
raise SlackNotify::Error
else
raise SlackNotify::Error.new(response.body)
end
end
end
def hook_url
"https://#{@team}.slack.com/services/hooks/incoming-webhook?token=#{@token}"
end
end
end
## Instruction:
Allow to send to multiple channels
## Code After:
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] || "#general"
raise ArgumentError, "Subdomain required" if @team.nil?
raise ArgumentError, "Token required" if @token.nil?
end
def test
notify("This is a test message!")
end
def notify(text, channel=nil)
channels = [channel || @channel].flatten.compact.uniq
channels.each do |chan|
send_payload(text: text, username: @username, channel: chan)
end
end
private
def send_payload(payload)
response = Faraday.post(hook_url) do |req|
req.body = JSON.dump(payload)
end
if response.success?
true
else
if response.body.include?("\n")
raise SlackNotify::Error
else
raise SlackNotify::Error.new(response.body)
end
end
end
def hook_url
"https://#{@team}.slack.com/services/hooks/incoming-webhook?token=#{@token}"
end
end
end |
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+https://github.com/yourcelf/django-urlcrypt.git#egg=django_urlcrypt
South
pyyaml
reportlab
selenium
pytz
django-localflavor
| 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+https://github.com/yourcelf/django-urlcrypt.git#egg=django_urlcrypt
South
pyyaml
reportlab
selenium
pytz
django-localflavor
| 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 support
on-the-web messages.
| 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-pagination
-e git+https://github.com/yourcelf/django-urlcrypt.git#egg=django_urlcrypt
South
pyyaml
reportlab
selenium
pytz
django-localflavor
## Instruction:
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 support
on-the-web messages.
## Code After:
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+https://github.com/yourcelf/django-urlcrypt.git#egg=django_urlcrypt
South
pyyaml
reportlab
selenium
pytz
django-localflavor
|
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)[4:]
for version in obsolete_versions:
yield '{}:{}'.format(image_name, version)
def parse_images(lines):
images = defaultdict(list)
for line in lines:
try:
image_name, version = line.split(' ')
version_num = float(version.replace('v', ''))
images[image_name].append(version_num)
except ValueError:
pass
return images
def remove_image(image_name):
# subprocess.call(['docker', 'rm', image_name])
print('docker rm ' + image_name)
def all_images():
output = subprocess \
.check_output(['./docker_image_versions.sh'], shell=True) \
.decode('utf-8')
lines = output.split('\n')
return parse_images(lines)
if __name__ == '__main__':
images = all_images()
for image_name in find_obsolete_images(images):
remove_image(image_name)
| 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)[4:]
for version in obsolete_versions:
yield '{}:{}'.format(image_name, version)
def parse_images(lines):
images = defaultdict(list)
for line in lines:
try:
image_name, version = line.split(' ')
version_num = int(version.replace('v', ''))
images[image_name].append(version_num)
except ValueError:
pass
return images
def remove_image(image_name):
subprocess.check_call(['docker', 'rm', image_name])
def all_images():
output = subprocess \
.check_output(['./docker_image_versions.sh'], shell=True) \
.decode('utf-8')
lines = output.split('\n')
return parse_images(lines)
if __name__ == '__main__':
images = all_images()
for image_name in find_obsolete_images(images):
remove_image(image_name)
| 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, reverse=True)[4:]
for version in obsolete_versions:
yield '{}:{}'.format(image_name, version)
def parse_images(lines):
images = defaultdict(list)
for line in lines:
try:
image_name, version = line.split(' ')
version_num = float(version.replace('v', ''))
images[image_name].append(version_num)
except ValueError:
pass
return images
def remove_image(image_name):
# subprocess.call(['docker', 'rm', image_name])
print('docker rm ' + image_name)
def all_images():
output = subprocess \
.check_output(['./docker_image_versions.sh'], shell=True) \
.decode('utf-8')
lines = output.split('\n')
return parse_images(lines)
if __name__ == '__main__':
images = all_images()
for image_name in find_obsolete_images(images):
remove_image(image_name)
## Instruction:
Delete images instead of printing
## Code After:
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)[4:]
for version in obsolete_versions:
yield '{}:{}'.format(image_name, version)
def parse_images(lines):
images = defaultdict(list)
for line in lines:
try:
image_name, version = line.split(' ')
version_num = int(version.replace('v', ''))
images[image_name].append(version_num)
except ValueError:
pass
return images
def remove_image(image_name):
subprocess.check_call(['docker', 'rm', image_name])
def all_images():
output = subprocess \
.check_output(['./docker_image_versions.sh'], shell=True) \
.decode('utf-8')
lines = output.split('\n')
return parse_images(lines)
if __name__ == '__main__':
images = all_images()
for image_name in find_obsolete_images(images):
remove_image(image_name)
|
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
- sudo pip install docker-compose
# build miniworld container
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
- export REPO=miniworldproject/miniworld_core
- pushd ~/build/miniworld-project/miniworld_core
- BRANCH=$TRAVIS_BRANCH ci/build_container.sh
# clone miniworld_playground
- git clone https://github.com/miniworld-project/miniworld_playground.git
- pushd miniworld_playground
- (cd examples && ./get_images.sh)
script:
- uname -a
# run tests
- MW_CONFIG=tests/config.json BRANCH=$TRAVIS_BRANCH docker-compose up -d
- docker-compose exec core pytest -x -v tests
after_success:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
# push docker image
- docker push $REPO:$TAG
after_failure:
- docker-compose logs
| 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
- sudo pip install docker-compose
# build miniworld container
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
- export REPO=miniworldproject/miniworld_core
- pushd ~/build/miniworld-project/miniworld_core
- BRANCH=$TRAVIS_BRANCH ci/build_container.sh
# clone miniworld_playground
- git clone https://github.com/miniworld-project/miniworld_playground.git
- pushd miniworld_playground
script:
- uname -a
# run tests
- MW_CONFIG=tests/config.json BRANCH=$TRAVIS_BRANCH docker-compose up -d
- if $SHOW_OUTPUT; then docker-compose exec core pytest -x -v -s tests; else docker-compose exec core pytest -x -v -s tests ; fi
after_success:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
# push docker image
- docker push $REPO:$TAG
after_failure:
- docker-compose logs
| 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/docker-compose
- sudo pip install docker-compose
# build miniworld container
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
- export REPO=miniworldproject/miniworld_core
- pushd ~/build/miniworld-project/miniworld_core
- BRANCH=$TRAVIS_BRANCH ci/build_container.sh
# clone miniworld_playground
- git clone https://github.com/miniworld-project/miniworld_playground.git
- pushd miniworld_playground
- (cd examples && ./get_images.sh)
script:
- uname -a
# run tests
- MW_CONFIG=tests/config.json BRANCH=$TRAVIS_BRANCH docker-compose up -d
- docker-compose exec core pytest -x -v tests
after_success:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
# push docker image
- docker push $REPO:$TAG
after_failure:
- docker-compose logs
## Instruction:
Add show output switch to CI
## Code After:
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
- sudo pip install docker-compose
# build miniworld container
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
- export REPO=miniworldproject/miniworld_core
- pushd ~/build/miniworld-project/miniworld_core
- BRANCH=$TRAVIS_BRANCH ci/build_container.sh
# clone miniworld_playground
- git clone https://github.com/miniworld-project/miniworld_playground.git
- pushd miniworld_playground
script:
- uname -a
# run tests
- MW_CONFIG=tests/config.json BRANCH=$TRAVIS_BRANCH docker-compose up -d
- if $SHOW_OUTPUT; then docker-compose exec core pytest -x -v -s tests; else docker-compose exec core pytest -x -v -s tests ; fi
after_success:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
# push docker image
- docker push $REPO:$TAG
after_failure:
- docker-compose logs
|
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 = document.querySelectorAll(".js-language-select");
if (!selectEls) return;
toArray(selectEls).forEach(select => {
select.addEventListener("change", e => {
this.tracking.sendWithCallback("language", "language_dropdown", e.target.value, () => {
this.handleSelectChange(e);
});
});
});
},
handleSelectChange(e) {
let redirectUrl = this.isThingDetailsPageWithLanguageParam ? `${this.redirectUrl}/${e.target.value}` : this.redirectUrl;
location.href =
`/set-locale?locale=${e.target.value}` +
`&redirectTo=${redirectUrl}`;
},
generateRedirectPath() {
this.redirectUrl = window.location.pathname;
let urlPathMeta = window.location.pathname.split('/');
if (urlPathMeta[1] && things.indexOf(urlPathMeta[1]) >= 0 && urlPathMeta[3]) {
this.redirectUrl = `/${urlPathMeta[1]}/${urlPathMeta[2]}`;
this.isThingDetailsPageWithLanguageParam = true;
}
}
};
export default languageSelect;
| 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 = document.querySelectorAll(".js-language-select");
if (!selectEls) return;
toArray(selectEls).forEach(select => {
select.addEventListener("change", e => {
this.tracking.sendWithCallback("language", "language_dropdown", e.target.value, () => {
this.handleSelectChange(e);
});
});
});
},
handleSelectChange(e) {
let redirectUrl = this.isThingDetailsPageWithLanguageParam ? `${this.redirectUrl}/${e.target.value}` : this.redirectUrl;
location.href =
`/set-locale?locale=${e.target.value}` +
`&redirectTo=${redirectUrl}`;
},
generateRedirectPath() {
this.redirectUrl = window.location.pathname;
let urlPathMeta = window.location.pathname.split('/');
if (urlPathMeta[1] && things.indexOf(urlPathMeta[1]) >= 0 && urlPathMeta[3] && urlPathMeta[3] !== 'edit') {
this.redirectUrl = `/${urlPathMeta[1]}/${urlPathMeta[2]}`;
this.isThingDetailsPageWithLanguageParam = true;
}
}
};
export default languageSelect;
| 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 selectEls = document.querySelectorAll(".js-language-select");
if (!selectEls) return;
toArray(selectEls).forEach(select => {
select.addEventListener("change", e => {
this.tracking.sendWithCallback("language", "language_dropdown", e.target.value, () => {
this.handleSelectChange(e);
});
});
});
},
handleSelectChange(e) {
let redirectUrl = this.isThingDetailsPageWithLanguageParam ? `${this.redirectUrl}/${e.target.value}` : this.redirectUrl;
location.href =
`/set-locale?locale=${e.target.value}` +
`&redirectTo=${redirectUrl}`;
},
generateRedirectPath() {
this.redirectUrl = window.location.pathname;
let urlPathMeta = window.location.pathname.split('/');
if (urlPathMeta[1] && things.indexOf(urlPathMeta[1]) >= 0 && urlPathMeta[3]) {
this.redirectUrl = `/${urlPathMeta[1]}/${urlPathMeta[2]}`;
this.isThingDetailsPageWithLanguageParam = true;
}
}
};
export default languageSelect;
## Instruction:
Refactor redirectUrl logic of page language selector
## Code After:
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 = document.querySelectorAll(".js-language-select");
if (!selectEls) return;
toArray(selectEls).forEach(select => {
select.addEventListener("change", e => {
this.tracking.sendWithCallback("language", "language_dropdown", e.target.value, () => {
this.handleSelectChange(e);
});
});
});
},
handleSelectChange(e) {
let redirectUrl = this.isThingDetailsPageWithLanguageParam ? `${this.redirectUrl}/${e.target.value}` : this.redirectUrl;
location.href =
`/set-locale?locale=${e.target.value}` +
`&redirectTo=${redirectUrl}`;
},
generateRedirectPath() {
this.redirectUrl = window.location.pathname;
let urlPathMeta = window.location.pathname.split('/');
if (urlPathMeta[1] && things.indexOf(urlPathMeta[1]) >= 0 && urlPathMeta[3] && urlPathMeta[3] !== 'edit') {
this.redirectUrl = `/${urlPathMeta[1]}/${urlPathMeta[2]}`;
this.isThingDetailsPageWithLanguageParam = true;
}
}
};
export default languageSelect;
|
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 below for notifications by e-mail
#email:
# recipients:
# - howard@hobu.co
| 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#pdal"
# Uncomment and edit below for notifications by e-mail
#email:
# recipients:
# - howard@hobu.co
| 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"
# Uncomment and edit below for notifications by e-mail
#email:
# recipients:
# - howard@hobu.co
## Instruction:
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.
## Code After:
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#pdal"
# Uncomment and edit below for notifications by e-mail
#email:
# recipients:
# - howard@hobu.co
|
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
# copy home page
cp docs/src/templates/home.html app/
cd app
cat > "main.js" << EOF
var express = require('express');
var connect = require('connect');
var app = express();
app.use(connect.compress());
console.log(__dirname);
app.get('^(/|home\.html )$', function(req, res) {
res.sendfile('home.html');
});
app.use(express.static(__dirname + '/'));
// HTML5 URL Support
app.get('^\/?(guide|api|cookbook|misc|tutorial|ui)(/)?*$', function(req, res) {
res.sendfile('index.html');
});
var port = process.env.PORT || 8000;
console.log('SERVER RUN ON PORT: ', port);
app.listen(port);
EOF
END_SERVER_TEIM=$(date +%s)
# @log startup time
echo "SERVER START TIME: $((END_SERVER_TEIM - START_SERVER_TEIM))"
node main.js
| 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 page
cp -r home app/home
# copy home page
cp docs/src/templates/home.html app/
cd app
cat > "main.js" << EOF
var express = require('express');
var connect = require('connect');
var app = express();
app.use(connect.compress());
console.log(__dirname);
app.get('^(/|home\.html )$', function(req, res) {
res.sendfile('home.html');
});
app.use(express.static(__dirname + '/'));
// HTML5 URL Support
app.get('^\/?(guide|api|cookbook|misc|tutorial|ui)(/)?*$', function(req, res) {
res.sendfile('index.html');
});
var port = process.env.PORT || 8000;
console.log('SERVER RUN ON PORT: ', port);
app.listen(port);
EOF
END_SERVER_TEIM=$(date +%s)
# @log startup time
echo "SERVER START TIME: $((END_SERVER_TEIM - START_SERVER_TEIM))"
node main.js
| 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/angular-doc,Stopy/angular-doc,AlexeyMez/angular-doc,locky-yotun/angular-doc,AngularjsRUS/angular-doc,Stopy/angular-doc,AlexeyMez/angular-doc,AngularjsRUS/angular-doc,AlexeyMez/angular-doc,locky-yotun/angular-doc,Nightquester/angular-doc,vovka/angular-doc,vovka/angular-doc,AlexeyMez/angular-doc,AngularjsRUS/angular-doc,Nightquester/angular-doc,Nightquester/angular-doc,Nightquester/angular-doc,locky-yotun/angular-doc,Stopy/angular-doc,vovka/angular-doc,AlexeyMez/angular-doc | 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 home app/home
# copy home page
cp docs/src/templates/home.html app/
cd app
cat > "main.js" << EOF
var express = require('express');
var connect = require('connect');
var app = express();
app.use(connect.compress());
console.log(__dirname);
app.get('^(/|home\.html )$', function(req, res) {
res.sendfile('home.html');
});
app.use(express.static(__dirname + '/'));
// HTML5 URL Support
app.get('^\/?(guide|api|cookbook|misc|tutorial|ui)(/)?*$', function(req, res) {
res.sendfile('index.html');
});
var port = process.env.PORT || 8000;
console.log('SERVER RUN ON PORT: ', port);
app.listen(port);
EOF
END_SERVER_TEIM=$(date +%s)
# @log startup time
echo "SERVER START TIME: $((END_SERVER_TEIM - START_SERVER_TEIM))"
node main.js
## Instruction:
Exit immediately if a command exits with a non-zero status
## Code After:
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 page
cp -r home app/home
# copy home page
cp docs/src/templates/home.html app/
cd app
cat > "main.js" << EOF
var express = require('express');
var connect = require('connect');
var app = express();
app.use(connect.compress());
console.log(__dirname);
app.get('^(/|home\.html )$', function(req, res) {
res.sendfile('home.html');
});
app.use(express.static(__dirname + '/'));
// HTML5 URL Support
app.get('^\/?(guide|api|cookbook|misc|tutorial|ui)(/)?*$', function(req, res) {
res.sendfile('index.html');
});
var port = process.env.PORT || 8000;
console.log('SERVER RUN ON PORT: ', port);
app.listen(port);
EOF
END_SERVER_TEIM=$(date +%s)
# @log startup time
echo "SERVER START TIME: $((END_SERVER_TEIM - START_SERVER_TEIM))"
node main.js
|
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;
}
static factory() {
return ($http, $window) => new AuthService($http, $window);
}
} | 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 = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
this.url = 'http://localhost:8080/api'
}
isLoggedIn() {
return this.$window.localStorage.getItem('token') !== null;
}
login(user) {
return this.$http.post(
this.url + '/login',
this.$httpParamSerializerJQLike(user),
this.config
)
.then(response => response.data);
}
static factory() {
return (
$http, $window, $httpParamSerializerJQLike
) => new AuthService($http, $window, $httpParamSerializerJQLike);
}
} | 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') !== null;
}
static factory() {
return ($http, $window) => new AuthService($http, $window);
}
}
## Instruction:
Add user login method to AuthService
## Code After:
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 = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
this.url = 'http://localhost:8080/api'
}
isLoggedIn() {
return this.$window.localStorage.getItem('token') !== null;
}
login(user) {
return this.$http.post(
this.url + '/login',
this.$httpParamSerializerJQLike(user),
this.config
)
.then(response => response.data);
}
static factory() {
return (
$http, $window, $httpParamSerializerJQLike
) => new AuthService($http, $window, $httpParamSerializerJQLike);
}
} |
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/bookyt | 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_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
|
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: set mailname
template: src=mailname.j2 dest="/etc/mailname" owner=root mode=644
notify: restart postfix
| ---
- 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 dest="/etc/mailname" owner=root mode=644
- name: run newalias
shell: newaliases
notify: restart postfix
| 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: newaliases
- name: set mailname
template: src=mailname.j2 dest="/etc/mailname" owner=root mode=644
notify: restart postfix
## Instruction:
Fix order of postfix job, resolve raise condition
## Code After:
---
- 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 dest="/etc/mailname" owner=root mode=644
- name: run newalias
shell: newaliases
notify: restart postfix
|
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 PDF Viewer",
"version": "1",
"description": "Chrome PDF Viewer",
"offline_enabled": true,
"permissions": [
"file://*/",
"ftp://*/",
"http://*/",
"https://*/",
"chrome://*/",
"streamsPrivate"
],
"background": {
"scripts": ["background.js"],
"transient": true,
"persistent": false
},
"mime_types": [
"application/pdf"
],
"web_accessible_resources": [
"index.html"
]
}
| {
// chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai
"manifest_version": 2,
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDN6hM0rsDYGbzQPQfOygqlRtQgKUXMfnSjhIBL7LnReAVBEd7ZmKtyN2qmSasMl4HZpMhVe2rPWVVwBDl6iyNE/Kok6E6v6V3vCLGsOpQAuuNVye/3QxzIldzG/jQAdWZiyXReRVapOhZtLjGfywCvlWq7Sl/e3sbc0vWybSDI2QIDAQAB",
"name": "Chrome PDF Viewer",
"version": "1",
"description": "Chrome PDF Viewer",
"offline_enabled": true,
"incognito": "split",
"permissions": [
"file://*/",
"ftp://*/",
"http://*/",
"https://*/",
"chrome://*/",
"streamsPrivate"
],
"background": {
"scripts": ["background.js"],
"transient": true,
"persistent": false
},
"mime_types": [
"application/pdf"
],
"web_accessible_resources": [
"index.html"
]
}
| 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 https://code.google.com/p/chromium/codesearch#chromium/src/extensions/browser/extension_protocols.cc&rcl=1399166280&l=287
BUG=303491
Review URL: https://codereview.chromium.org/268963002
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@268308 0039d316-1c4b-4281-b951-d872f2087c98
| 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/chromium.src,ondra-novak/chromium.src,ltilve/chromium,TheTypoMaster/chromium-crosswalk,ltilve/chromium,bright-sparks/chromium-spacewalk,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,hgl888/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,ondra-novak/chromium.src,dushu1203/chromium.src,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,ltilve/chromium,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,M4sse/chromium.src,Jonekee/chromium.src,M4sse/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk,M4sse/chromium.src,chuan9/chromium-crosswalk,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,markYoungH/chromium.src,ltilve/chromium,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,dednal/chromium.src,bright-sparks/chromium-spacewalk,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,Just-D/chromium-1,dushu1203/chromium.src,littlstar/chromium.src,ltilve/chromium,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,dednal/chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,chuan9/chromium-crosswalk,dednal/chromium.src,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,dushu1203/chromium.src,jaruba/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,jaruba/chromium.src,M4sse/chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,dednal/chromium.src,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,littlstar/chromium.src,ltilve/chromium,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,M4sse/chromium.src,littlstar/chromium.src,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ltilve/chromium,bright-sparks/chromium-spacewalk,Jonekee/chromium.src,markYoungH/chromium.src,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,Chilledheart/chromium,jaruba/chromium.src,littlstar/chromium.src,fujunwei/chromium-crosswalk,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,ondra-novak/chromium.src,hgl888/chromium-crosswalk,M4sse/chromium.src,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,Just-D/chromium-1,Fireblend/chromium-crosswalk,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,jaruba/chromium.src,Jonekee/chromium.src,Chilledheart/chromium,dednal/chromium.src,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,littlstar/chromium.src,jaruba/chromium.src,Just-D/chromium-1,Chilledheart/chromium,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,Just-D/chromium-1,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,Jonekee/chromium.src,Just-D/chromium-1,Chilledheart/chromium,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,dushu1203/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,fujunwei/chromium-crosswalk,markYoungH/chromium.src,Chilledheart/chromium,Just-D/chromium-1,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,dednal/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk | json | ## Code Before:
{
// chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai
"manifest_version": 2,
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDN6hM0rsDYGbzQPQfOygqlRtQgKUXMfnSjhIBL7LnReAVBEd7ZmKtyN2qmSasMl4HZpMhVe2rPWVVwBDl6iyNE/Kok6E6v6V3vCLGsOpQAuuNVye/3QxzIldzG/jQAdWZiyXReRVapOhZtLjGfywCvlWq7Sl/e3sbc0vWybSDI2QIDAQAB",
"name": "Chrome PDF Viewer",
"version": "1",
"description": "Chrome PDF Viewer",
"offline_enabled": true,
"permissions": [
"file://*/",
"ftp://*/",
"http://*/",
"https://*/",
"chrome://*/",
"streamsPrivate"
],
"background": {
"scripts": ["background.js"],
"transient": true,
"persistent": false
},
"mime_types": [
"application/pdf"
],
"web_accessible_resources": [
"index.html"
]
}
## Instruction:
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 https://code.google.com/p/chromium/codesearch#chromium/src/extensions/browser/extension_protocols.cc&rcl=1399166280&l=287
BUG=303491
Review URL: https://codereview.chromium.org/268963002
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@268308 0039d316-1c4b-4281-b951-d872f2087c98
## Code After:
{
// chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai
"manifest_version": 2,
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDN6hM0rsDYGbzQPQfOygqlRtQgKUXMfnSjhIBL7LnReAVBEd7ZmKtyN2qmSasMl4HZpMhVe2rPWVVwBDl6iyNE/Kok6E6v6V3vCLGsOpQAuuNVye/3QxzIldzG/jQAdWZiyXReRVapOhZtLjGfywCvlWq7Sl/e3sbc0vWybSDI2QIDAQAB",
"name": "Chrome PDF Viewer",
"version": "1",
"description": "Chrome PDF Viewer",
"offline_enabled": true,
"incognito": "split",
"permissions": [
"file://*/",
"ftp://*/",
"http://*/",
"https://*/",
"chrome://*/",
"streamsPrivate"
],
"background": {
"scripts": ["background.js"],
"transient": true,
"persistent": false
},
"mime_types": [
"application/pdf"
],
"web_accessible_resources": [
"index.html"
]
}
|
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"`
ScheduleExpression string `yaml:"schedule_expression"`
State string `yaml:"state"`
LambdaFunctions []LambdaFunction `yaml:"lambda_functions"`
ActualRule cloudwatchevents.Rule
NeedUpdate bool
}
type LambdaFunction struct {
Name string `yaml:"name"`
Input string `yaml:"input"`
InputPath string `yaml:"input_path"`
}
| 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"`
ScheduleExpression string `yaml:"schedule_expression"`
State string `yaml:"state"`
LambdaFunctions []LambdaFunction `yaml:"lambda_functions"`
ActualRule cloudwatchevents.Rule
ActualTargets []cloudwatchevents.Target
NeedUpdate bool
}
type LambdaFunction struct {
Name string `yaml:"name"`
Input string `yaml:"input"`
InputPath string `yaml:"input_path"`
}
| 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"`
ScheduleExpression string `yaml:"schedule_expression"`
State string `yaml:"state"`
LambdaFunctions []LambdaFunction `yaml:"lambda_functions"`
ActualRule cloudwatchevents.Rule
NeedUpdate bool
}
type LambdaFunction struct {
Name string `yaml:"name"`
Input string `yaml:"input"`
InputPath string `yaml:"input_path"`
}
## Instruction:
Store actual target for actual rule in rule struct
## Code After:
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"`
ScheduleExpression string `yaml:"schedule_expression"`
State string `yaml:"state"`
LambdaFunctions []LambdaFunction `yaml:"lambda_functions"`
ActualRule cloudwatchevents.Rule
ActualTargets []cloudwatchevents.Target
NeedUpdate bool
}
type LambdaFunction struct {
Name string `yaml:"name"`
Input string `yaml:"input"`
InputPath string `yaml:"input_path"`
}
|
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: { optimizationLevel: 3 },
pngquant: { quality: '65-90', speed: 4 },
svgo: { removeUnknownsAndDefaults: false, cleanupIDs: false },
plugins: [imageminMozjpeg({ quality: 75 })],
disable: (config.enabled.watcher),
}),
],
};
| '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: { optimizationLevel: 3 },
pngquant: { quality: '65-90', speed: 4 },
svgo: {
plugins: [{ removeUnknownsAndDefaults: false }, { cleanupIDs: false }],
},
plugins: [imageminMozjpeg({ quality: 75 })],
disable: (config.enabled.watcher),
}),
],
};
| 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 },
gifsicle: { optimizationLevel: 3 },
pngquant: { quality: '65-90', speed: 4 },
svgo: { removeUnknownsAndDefaults: false, cleanupIDs: false },
plugins: [imageminMozjpeg({ quality: 75 })],
disable: (config.enabled.watcher),
}),
],
};
## Instruction:
Fix default SVG optimisation configuration
## Code After:
'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: { optimizationLevel: 3 },
pngquant: { quality: '65-90', speed: 4 },
svgo: {
plugins: [{ removeUnknownsAndDefaults: false }, { cleanupIDs: false }],
},
plugins: [imageminMozjpeg({ quality: 75 })],
disable: (config.enabled.watcher),
}),
],
};
|
df82b0202f05dcf5d27433e53cdfe7196308c7d7 | README.md | README.md | [](https://github.com/ember-insights/ember-insights/blob/master/LICENSE.md) [](https://travis-ci.org/ember-insights/ember-insights) [](http://emberobserver.com/addons/ember-insights)
This is AMD package of the https://github.com/ember-insights/ember-insights
## Installation
`bower install ember-insights`
| [](https://github.com/ember-insights/ember-insights/blob/master/LICENSE.md) [](https://travis-ci.org/ember-insights/ember-insights) [](http://emberobserver.com/addons/ember-insights)
This is AMD package of the https://github.com/ember-insights/ember-insights
## Installation
`bower install ember-insights`
## Acknowledgement
Product of Roundscope Ukraine LLC. HEAD is https://github.com/ember-insights/ember-insights. Based on https://github.com/roundscope/web-engineering mastery.
[](https://github.com/igrigorik/ga-beacon)
| Add Acknowledgment section and GA tracking badge | Add Acknowledgment section and GA tracking badge | Markdown | mit | ember-insights/ember-insights.amd.js | markdown | ## Code Before:
[](https://github.com/ember-insights/ember-insights/blob/master/LICENSE.md) [](https://travis-ci.org/ember-insights/ember-insights) [](http://emberobserver.com/addons/ember-insights)
This is AMD package of the https://github.com/ember-insights/ember-insights
## Installation
`bower install ember-insights`
## Instruction:
Add Acknowledgment section and GA tracking badge
## Code After:
[](https://github.com/ember-insights/ember-insights/blob/master/LICENSE.md) [](https://travis-ci.org/ember-insights/ember-insights) [](http://emberobserver.com/addons/ember-insights)
This is AMD package of the https://github.com/ember-insights/ember-insights
## Installation
`bower install ember-insights`
## Acknowledgement
Product of Roundscope Ukraine LLC. HEAD is https://github.com/ember-insights/ember-insights. Based on https://github.com/roundscope/web-engineering mastery.
[](https://github.com/igrigorik/ga-beacon)
|
d02ef235fb382ff749a41561518c18c7ebd81f2f | src/JokeMeUpBoy.js | src/JokeMeUpBoy.js | /**
* 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 to add a new joke each day.
* @private
*/
function getListOfJokes() {
var arr = [];
arr.push('Q: How do you tell an introverted computer scientist from an extroverted computer scientist?\nA: An extroverted computer scientist looks at your shoes when he talks to you.');
return arr;
}
anything.prototype.JokeMeUpBoy = jokeMeUpBoy;
| /**
* 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 to add a new joke each day.
* @private
*/
function getListOfJokes() {
var arr = [];
arr.push('Q: How do you tell an introverted computer scientist from an extroverted computer scientist?\nA: An extroverted computer scientist looks at your shoes when he talks to you.');
arr.push('Q: Why do programmers always mix up Halloween and Christmas?\nA: Because Oct 31 == Dec 25!');
return arr;
}
anything.prototype.JokeMeUpBoy = jokeMeUpBoy;
| 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 jokes.
* Feel free to add a new joke each day.
* @private
*/
function getListOfJokes() {
var arr = [];
arr.push('Q: How do you tell an introverted computer scientist from an extroverted computer scientist?\nA: An extroverted computer scientist looks at your shoes when he talks to you.');
return arr;
}
anything.prototype.JokeMeUpBoy = jokeMeUpBoy;
## Instruction:
Add a new dank joke
Dem jokes
## Code After:
/**
* 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 to add a new joke each day.
* @private
*/
function getListOfJokes() {
var arr = [];
arr.push('Q: How do you tell an introverted computer scientist from an extroverted computer scientist?\nA: An extroverted computer scientist looks at your shoes when he talks to you.');
arr.push('Q: Why do programmers always mix up Halloween and Christmas?\nA: Because Oct 31 == Dec 25!');
return arr;
}
anything.prototype.JokeMeUpBoy = jokeMeUpBoy;
|
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-circular', 'featured'], $scope.size)
$scope.size = 'small'
_2x = -> $window.devicePixelRatio >= 2
$scope.gravatarSize = ->
size = switch $scope.size
when 'small' then 30
when 'medium', 'medium-circular' then 50
when 'large', 'large-circular' then 80
when 'featured' then 175
if _2x() then 2*size else size
$scope.uploadedAvatarUrl = ->
return unless $scope.user.avatarKind == 'uploaded'
size = switch $scope.size
when 'small'
if _2x() then 'medium' else 'small'
when 'medium', 'medium-circular'
if _2x() then 'large' else 'medium'
when 'large', 'large-circular'
'large'
when 'featured'
'original'
$scope.user.avatarUrl[size]
return
| 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-circular', 'featured'], $scope.size)
$scope.size = 'small'
_2x = -> $window.devicePixelRatio >= 2
$scope.gravatarSize = ->
size = switch $scope.size
when 'small' then 30
when 'medium', 'medium-circular' then 50
when 'large', 'large-circular' then 80
when 'featured' then 175
if _2x() then 2*size else size
$scope.uploadedAvatarUrl = ->
return unless $scope.user.avatarKind == 'uploaded'
return $scope.user.avatarUrl if typeof $scope.user.avatarUrl is 'string'
size = switch $scope.size
when 'small'
if _2x() then 'medium' else 'small'
when 'medium', 'medium-circular'
if _2x() then 'large' else 'medium'
when 'large', 'large-circular'
'large'
when 'featured'
'original'
$scope.user.avatarUrl[size]
return
| 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', 'large', 'large-circular', 'featured'], $scope.size)
$scope.size = 'small'
_2x = -> $window.devicePixelRatio >= 2
$scope.gravatarSize = ->
size = switch $scope.size
when 'small' then 30
when 'medium', 'medium-circular' then 50
when 'large', 'large-circular' then 80
when 'featured' then 175
if _2x() then 2*size else size
$scope.uploadedAvatarUrl = ->
return unless $scope.user.avatarKind == 'uploaded'
size = switch $scope.size
when 'small'
if _2x() then 'medium' else 'small'
when 'medium', 'medium-circular'
if _2x() then 'large' else 'medium'
when 'large', 'large-circular'
'large'
when 'featured'
'original'
$scope.user.avatarUrl[size]
return
## Instruction:
Return avatarUrl directly if it's a string
## Code After:
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-circular', 'featured'], $scope.size)
$scope.size = 'small'
_2x = -> $window.devicePixelRatio >= 2
$scope.gravatarSize = ->
size = switch $scope.size
when 'small' then 30
when 'medium', 'medium-circular' then 50
when 'large', 'large-circular' then 80
when 'featured' then 175
if _2x() then 2*size else size
$scope.uploadedAvatarUrl = ->
return unless $scope.user.avatarKind == 'uploaded'
return $scope.user.avatarUrl if typeof $scope.user.avatarUrl is 'string'
size = switch $scope.size
when 'small'
if _2x() then 'medium' else 'small'
when 'medium', 'medium-circular'
if _2x() then 'large' else 'medium'
when 'large', 'large-circular'
'large'
when 'featured'
'original'
$scope.user.avatarUrl[size]
return
|
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
## Instruction:
Fix the version of pytest-cov and pytest to avoid conflicting version in Travis.
## Code After:
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
|
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: string) => {
// tslint:disable-next-line:no-console
// tslint:disable-next-line:strict-type-predicates
if (console && typeof console.warn === 'function') {
// tslint:disable-next-line:no-console
console.warn(`Canvasimo: ${message}`);
}
},
};
export default logger;
| 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 default logger;
| 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}`);
}
},
warn: (message: string) => {
// tslint:disable-next-line:no-console
// tslint:disable-next-line:strict-type-predicates
if (console && typeof console.warn === 'function') {
// tslint:disable-next-line:no-console
console.warn(`Canvasimo: ${message}`);
}
},
};
export default logger;
## Instruction:
Check for window.console and use this for logs
## Code After:
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 default logger;
|
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):
raise unittest.SkipTest
@attr('qa', 'risk', 'classical_risk')
def test_case_2(self):
raise unittest.SkipTest
@attr('qa', 'risk', 'classical_risk')
def test_case_3(self):
out = self.run_calc(case_3.__file__, 'job_haz.ini,job_risk.ini',
exports='csv')
[fname] = out['avg_losses-rlzs', 'csv']
self.assertEqualFiles('expected/rlz-000-avg_loss.csv', fname)
@attr('qa', 'risk', 'classical_risk')
def test_case_4(self):
out = self.run_calc(case_4.__file__, 'job_haz.ini,job_risk.ini',
exports='csv')
fnames = out['avg_losses-rlzs', 'csv']
self.assertEqualFiles('expected/rlz-000-avg_loss.csv', fnames[0])
self.assertEqualFiles('expected/rlz-001-avg_loss.csv', fnames[1])
| 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):
out = self.run_calc(case_1.__file__, 'job_risk.ini', exports='xml')
@attr('qa', 'risk', 'classical_risk')
def test_case_2(self):
raise unittest.SkipTest
@attr('qa', 'risk', 'classical_risk')
def test_case_3(self):
out = self.run_calc(case_3.__file__, 'job_haz.ini,job_risk.ini',
exports='csv')
[fname] = out['avg_losses-rlzs', 'csv']
self.assertEqualFiles('expected/rlz-000-avg_loss.csv', fname)
@attr('qa', 'risk', 'classical_risk')
def test_case_4(self):
out = self.run_calc(case_4.__file__, 'job_haz.ini,job_risk.ini',
exports='csv')
fnames = out['avg_losses-rlzs', 'csv']
self.assertEqualFiles('expected/rlz-000-avg_loss.csv', fnames[0])
self.assertEqualFiles('expected/rlz-001-avg_loss.csv', fnames[1])
| 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 test_case_1(self):
raise unittest.SkipTest
@attr('qa', 'risk', 'classical_risk')
def test_case_2(self):
raise unittest.SkipTest
@attr('qa', 'risk', 'classical_risk')
def test_case_3(self):
out = self.run_calc(case_3.__file__, 'job_haz.ini,job_risk.ini',
exports='csv')
[fname] = out['avg_losses-rlzs', 'csv']
self.assertEqualFiles('expected/rlz-000-avg_loss.csv', fname)
@attr('qa', 'risk', 'classical_risk')
def test_case_4(self):
out = self.run_calc(case_4.__file__, 'job_haz.ini,job_risk.ini',
exports='csv')
fnames = out['avg_losses-rlzs', 'csv']
self.assertEqualFiles('expected/rlz-000-avg_loss.csv', fnames[0])
self.assertEqualFiles('expected/rlz-001-avg_loss.csv', fnames[1])
## Instruction:
Work on classical_risk test_case_1 and test_case_2
## Code After:
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):
out = self.run_calc(case_1.__file__, 'job_risk.ini', exports='xml')
@attr('qa', 'risk', 'classical_risk')
def test_case_2(self):
raise unittest.SkipTest
@attr('qa', 'risk', 'classical_risk')
def test_case_3(self):
out = self.run_calc(case_3.__file__, 'job_haz.ini,job_risk.ini',
exports='csv')
[fname] = out['avg_losses-rlzs', 'csv']
self.assertEqualFiles('expected/rlz-000-avg_loss.csv', fname)
@attr('qa', 'risk', 'classical_risk')
def test_case_4(self):
out = self.run_calc(case_4.__file__, 'job_haz.ini,job_risk.ini',
exports='csv')
fnames = out['avg_losses-rlzs', 'csv']
self.assertEqualFiles('expected/rlz-000-avg_loss.csv', fnames[0])
self.assertEqualFiles('expected/rlz-001-avg_loss.csv', fnames[1])
|
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
commit: 1.4.2
subdir: android/app
gradle:
- yes
prebuild: sed -i -e "s/ndkVersion '20.0.5594570'/ndkVersion '20.1.5948944'/" build.gradle
ndk: r20b
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
UpdateCheckData: android/app/build.gradle|versionCode (0x[0-9a-fA-F]+)|.|versionName
"(.*)"
CurrentVersion: 1.4.2
CurrentVersionCode: 1026
| 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
commit: 1.4.2
subdir: android/app
gradle:
- yes
prebuild: sed -i -e "s/ndkVersion '20.0.5594570'/ndkVersion '20.1.5948944'/" build.gradle
ndk: r20b
- versionName: 1.4.3
versionCode: 1027
commit: c8ea766eabdcc7e72696f5902dad789943a65e60
subdir: android/app
gradle:
- yes
prebuild: sed -i -e "s/ndkVersion '20.0.5594570'/ndkVersion '20.1.5948944'/" build.gradle
ndk: r20b
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
UpdateCheckData: android/app/build.gradle|versionCode (0x[0-9a-fA-F]+)|.|versionName
"(.*)"
CurrentVersion: 1.4.3
CurrentVersionCode: 1027
| 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
versionCode: 1026
commit: 1.4.2
subdir: android/app
gradle:
- yes
prebuild: sed -i -e "s/ndkVersion '20.0.5594570'/ndkVersion '20.1.5948944'/" build.gradle
ndk: r20b
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
UpdateCheckData: android/app/build.gradle|versionCode (0x[0-9a-fA-F]+)|.|versionName
"(.*)"
CurrentVersion: 1.4.2
CurrentVersionCode: 1026
## Instruction:
Update Pekka Kana 2 to 1.4.3 (1027)
## Code After:
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
commit: 1.4.2
subdir: android/app
gradle:
- yes
prebuild: sed -i -e "s/ndkVersion '20.0.5594570'/ndkVersion '20.1.5948944'/" build.gradle
ndk: r20b
- versionName: 1.4.3
versionCode: 1027
commit: c8ea766eabdcc7e72696f5902dad789943a65e60
subdir: android/app
gradle:
- yes
prebuild: sed -i -e "s/ndkVersion '20.0.5594570'/ndkVersion '20.1.5948944'/" build.gradle
ndk: r20b
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
UpdateCheckData: android/app/build.gradle|versionCode (0x[0-9a-fA-F]+)|.|versionName
"(.*)"
CurrentVersion: 1.4.3
CurrentVersionCode: 1027
|
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 -Path "$($PSScriptRoot)\..\TestData\" -Filter '*.psm1').FullName
$FunctionDefinitions = Get-FunctionDefinition -Path $Files
Context 'When the function contains no best practices violation' {
Mock Invoke-ScriptAnalyzer { }
It 'Should return 0' {
Get-FunctionScriptAnalyzerViolation -FunctionDefinition $FunctionDefinitions[0] |
Should Be 0
}
}
Context 'When the function contains 1 best practices violation' {
Mock Invoke-ScriptAnalyzer { $Mocks.'Invoke-ScriptAnalyzer'.'1ScriptAnalyzerViolation' | Where-Object { $_ } }
It 'Should return 1' {
Get-FunctionScriptAnalyzerViolation -FunctionDefinition $FunctionDefinitions[0] |
Should Be 1
}
}
Context 'When the function contains 3 best practices violations' {
Mock Invoke-ScriptAnalyzer { $Mocks.'Invoke-ScriptAnalyzer'.'3ScriptAnalyzerViolations' | Where-Object { $_ } }
It 'Should return 3' {
Get-FunctionScriptAnalyzerViolation -FunctionDefinition $FunctionDefinitions[0] |
Should Be 3
}
}
}
} | $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.'Invoke-ScriptAnalyzer' ) { Write-Host "Mock : $($Mock | Out-String)" }
Describe 'Get-FunctionScriptAnalyzerViolation' {
InModuleScope $ModuleName {
$Files = (Get-ChildItem -Path "$($PSScriptRoot)\..\TestData\" -Filter '*.psm1').FullName
$FunctionDefinitions = Get-FunctionDefinition -Path $Files
Context 'When the function contains no best practices violation' {
Mock Invoke-ScriptAnalyzer { }
It 'Should return 0' {
Get-FunctionScriptAnalyzerViolation -FunctionDefinition $FunctionDefinitions[0] |
Should Be 0
}
}
Context 'When the function contains 1 best practices violation' {
Mock Invoke-ScriptAnalyzer { $Mocks.'Invoke-ScriptAnalyzer'.'1ScriptAnalyzerViolation' | Where-Object { $_ } }
It 'Should return 1' {
Get-FunctionScriptAnalyzerViolation -FunctionDefinition $FunctionDefinitions[0] |
Should Be 1
}
}
Context 'When the function contains 3 best practices violations' {
Mock Invoke-ScriptAnalyzer { $Mocks.'Invoke-ScriptAnalyzer'.'3ScriptAnalyzerViolations' | Where-Object { $_ } }
It 'Should return 3' {
Get-FunctionScriptAnalyzerViolation -FunctionDefinition $FunctionDefinitions[0] |
Should Be 3
}
}
}
} | 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 = (Get-ChildItem -Path "$($PSScriptRoot)\..\TestData\" -Filter '*.psm1').FullName
$FunctionDefinitions = Get-FunctionDefinition -Path $Files
Context 'When the function contains no best practices violation' {
Mock Invoke-ScriptAnalyzer { }
It 'Should return 0' {
Get-FunctionScriptAnalyzerViolation -FunctionDefinition $FunctionDefinitions[0] |
Should Be 0
}
}
Context 'When the function contains 1 best practices violation' {
Mock Invoke-ScriptAnalyzer { $Mocks.'Invoke-ScriptAnalyzer'.'1ScriptAnalyzerViolation' | Where-Object { $_ } }
It 'Should return 1' {
Get-FunctionScriptAnalyzerViolation -FunctionDefinition $FunctionDefinitions[0] |
Should Be 1
}
}
Context 'When the function contains 3 best practices violations' {
Mock Invoke-ScriptAnalyzer { $Mocks.'Invoke-ScriptAnalyzer'.'3ScriptAnalyzerViolations' | Where-Object { $_ } }
It 'Should return 3' {
Get-FunctionScriptAnalyzerViolation -FunctionDefinition $FunctionDefinitions[0] |
Should Be 3
}
}
}
}
## Instruction:
Debug tests failures in Appveyor
## Code After:
$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.'Invoke-ScriptAnalyzer' ) { Write-Host "Mock : $($Mock | Out-String)" }
Describe 'Get-FunctionScriptAnalyzerViolation' {
InModuleScope $ModuleName {
$Files = (Get-ChildItem -Path "$($PSScriptRoot)\..\TestData\" -Filter '*.psm1').FullName
$FunctionDefinitions = Get-FunctionDefinition -Path $Files
Context 'When the function contains no best practices violation' {
Mock Invoke-ScriptAnalyzer { }
It 'Should return 0' {
Get-FunctionScriptAnalyzerViolation -FunctionDefinition $FunctionDefinitions[0] |
Should Be 0
}
}
Context 'When the function contains 1 best practices violation' {
Mock Invoke-ScriptAnalyzer { $Mocks.'Invoke-ScriptAnalyzer'.'1ScriptAnalyzerViolation' | Where-Object { $_ } }
It 'Should return 1' {
Get-FunctionScriptAnalyzerViolation -FunctionDefinition $FunctionDefinitions[0] |
Should Be 1
}
}
Context 'When the function contains 3 best practices violations' {
Mock Invoke-ScriptAnalyzer { $Mocks.'Invoke-ScriptAnalyzer'.'3ScriptAnalyzerViolations' | Where-Object { $_ } }
It 'Should return 3' {
Get-FunctionScriptAnalyzerViolation -FunctionDefinition $FunctionDefinitions[0] |
Should Be 3
}
}
}
} |
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('/')
ssh_host, _, ssh_port = ssh_host.partition(':')
ssh_port = int(ssh_port) if ssh_port.isdigit() else 22
ssh_fs = SSHFS(
ssh_host,
port=ssh_port,
user=parse_result.username,
passwd=parse_result.password,
)
return ssh_fs.opendir(dir_path) if dir_path else ssh_fs
| 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.resource.partition('/')
ssh_host, _, ssh_port = ssh_host.partition(':')
ssh_port = int(ssh_port) if ssh_port.isdigit() else 22
ssh_fs = SSHFS(
ssh_host,
port=ssh_port,
user=parse_result.username,
passwd=parse_result.password,
)
if dir_path:
return ssh_fs.opendir(dir_path, factory=ClosingSubFS)
else:
return ssh_fs
| 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.partition('/')
ssh_host, _, ssh_port = ssh_host.partition(':')
ssh_port = int(ssh_port) if ssh_port.isdigit() else 22
ssh_fs = SSHFS(
ssh_host,
port=ssh_port,
user=parse_result.username,
passwd=parse_result.password,
)
return ssh_fs.opendir(dir_path) if dir_path else ssh_fs
## Instruction:
Fix SSHOpener to use the new ClosingSubFS
## Code After:
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.resource.partition('/')
ssh_host, _, ssh_port = ssh_host.partition(':')
ssh_port = int(ssh_port) if ssh_port.isdigit() else 22
ssh_fs = SSHFS(
ssh_host,
port=ssh_port,
user=parse_result.username,
passwd=parse_result.password,
)
if dir_path:
return ssh_fs.opendir(dir_path, factory=ClosingSubFS)
else:
return ssh_fs
|
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)
* [Asynchronous programming](async.md)
|
* [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
* [Type detection](type-detection.md)
* [Declarative programming](declarative.md)
* [Asynchronous programming](async.md)
| 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](declarative.md)
* [Asynchronous programming](async.md)
## Instruction:
Fix sections broken by Gitbook online editor
## Code After:
* [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
* [Type detection](type-detection.md)
* [Declarative programming](declarative.md)
* [Asynchronous programming](async.md)
|
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 .miscplot import *
from .axisgrid import *
from .widgets import *
from .colors import xkcd_rgb, crayons
from . import cm
__version__ = "0.9.1.dev0"
| 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 .axisgrid import *
from .widgets import *
from .colors import xkcd_rgb, crayons
from . import cm
__version__ = "0.9.1.dev0"
| 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 import *
from .miscplot import *
from .axisgrid import *
from .widgets import *
from .colors import xkcd_rgb, crayons
from . import cm
__version__ = "0.9.1.dev0"
## Instruction:
Remove top-level import of timeseries module
## Code After:
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 .axisgrid import *
from .widgets import *
from .colors import xkcd_rgb, crayons
from . import cm
__version__ = "0.9.1.dev0"
|
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
- nightly
target:
- node
- php
steps:
- uses: actions/checkout@v2
- uses: lix-pm/setup-lix@master
- uses: actions/setup-node@v1
- run: npm i
- run: lix install haxe ${{ matrix.haxe-version }}
- run: lix download
- run: lix run travix ${{ matrix.target }} | 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 --health-timeout=5s --health-retries=3
strategy:
matrix:
haxe-version:
- stable
- nightly
target:
- node
- php
steps:
- uses: actions/checkout@v2
- uses: lix-pm/setup-lix@master
- uses: actions/setup-node@v1
- run: npm i
- run: lix install haxe ${{ matrix.haxe-version }}
- run: lix download
- run: lix run travix ${{ matrix.target }} | 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:
- stable
- nightly
target:
- node
- php
steps:
- uses: actions/checkout@v2
- uses: lix-pm/setup-lix@master
- uses: actions/setup-node@v1
- run: npm i
- run: lix install haxe ${{ matrix.haxe-version }}
- run: lix download
- run: lix run travix ${{ matrix.target }}
## Instruction:
Copy stuff from the internet
## Code After:
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 --health-timeout=5s --health-retries=3
strategy:
matrix:
haxe-version:
- stable
- nightly
target:
- node
- php
steps:
- uses: actions/checkout@v2
- uses: lix-pm/setup-lix@master
- uses: actions/setup-node@v1
- run: npm i
- run: lix install haxe ${{ matrix.haxe-version }}
- run: lix download
- run: lix run travix ${{ matrix.target }} |
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 === ".md") {
const mdxTransform = localRequire("@mdx-js/mdx").sync;
code = mdxTransform(code);
}
if (extname === ".ts" || extname === ".tsx") {
const ts = localRequire("typescript");
var result = ts.transpileModule(code, {
compilerOptions: {
module: ts.ModuleKind.CommonJS,
jsx: ts.JsxEmit.Preserve
}
});
code = result.outputText;
}
if (extname === ".vue") {
const vue = localRequire("@vue/component-compiler-utils");
const vueTemplateCompiler = localRequire("vue-template-compiler");
var p = vue.parse({
source: code,
needMap: false,
compiler: vueTemplateCompiler
});
code = p && p.script ? p.script.content : "";
}
return konan(code);
};
| 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 === ".md") {
const mdxTransform = localRequire("@mdx-js/mdx").sync;
code = mdxTransform(code);
}
if (extname === ".ts" || extname === ".tsx") {
const ts = localRequire("typescript");
const config = {
compilerOptions: {
module: ts.ModuleKind.CommonJS
}
};
if (extname === ".tsx") {
config.compilerOptions.jsx = ts.JsxEmit.Preserve;
}
const result = ts.transpileModule(code, config);
code = result.outputText;
}
if (extname === ".vue") {
const vue = localRequire("@vue/component-compiler-utils");
const vueTemplateCompiler = localRequire("vue-template-compiler");
const p = vue.parse({
source: code,
needMap: false,
compiler: vueTemplateCompiler
});
code = p && p.script ? p.script.content : "";
}
return konan(code);
};
| 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 === ".mdx" || extname === ".md") {
const mdxTransform = localRequire("@mdx-js/mdx").sync;
code = mdxTransform(code);
}
if (extname === ".ts" || extname === ".tsx") {
const ts = localRequire("typescript");
var result = ts.transpileModule(code, {
compilerOptions: {
module: ts.ModuleKind.CommonJS,
jsx: ts.JsxEmit.Preserve
}
});
code = result.outputText;
}
if (extname === ".vue") {
const vue = localRequire("@vue/component-compiler-utils");
const vueTemplateCompiler = localRequire("vue-template-compiler");
var p = vue.parse({
source: code,
needMap: false,
compiler: vueTemplateCompiler
});
code = p && p.script ? p.script.content : "";
}
return konan(code);
};
## Instruction:
Fix TS to not be parsed as TSX
## Code After:
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 === ".md") {
const mdxTransform = localRequire("@mdx-js/mdx").sync;
code = mdxTransform(code);
}
if (extname === ".ts" || extname === ".tsx") {
const ts = localRequire("typescript");
const config = {
compilerOptions: {
module: ts.ModuleKind.CommonJS
}
};
if (extname === ".tsx") {
config.compilerOptions.jsx = ts.JsxEmit.Preserve;
}
const result = ts.transpileModule(code, config);
code = result.outputText;
}
if (extname === ".vue") {
const vue = localRequire("@vue/component-compiler-utils");
const vueTemplateCompiler = localRequire("vue-template-compiler");
const p = vue.parse({
source: code,
needMap: false,
compiler: vueTemplateCompiler
});
code = p && p.script ? p.script.content : "";
}
return konan(code);
};
|
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() ];
return function lerp( t ) {
geometryA.vertices[ indexA ].lerp( geometryB.vertices[ indexB ], t );
return geometryA;
};
};
};
}());
| /* 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() ];
geometryA.vertices[ indexA ].lerp( geometryB.vertices[ indexB ], t );
return geometryA;
};
};
}());
| 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.toUpperCase() ];
return function lerp( t ) {
geometryA.vertices[ indexA ].lerp( geometryB.vertices[ indexB ], t );
return geometryA;
};
};
};
}());
## Instruction:
lathe[cuboid]: Change argument order of BoxGeometry lerp().
## Code After:
/* 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() ];
geometryA.vertices[ indexA ].lerp( geometryB.vertices[ indexB ], t );
return geometryA;
};
};
}());
|
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(load_path) { |f| require f if f.match(/\.rb$/) }
end
class MiniTest::Spec
include Rack::Test::Methods
end
| 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 (initializers and lib)
## Code After:
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(load_path) { |f| require f if f.match(/\.rb$/) }
end
class MiniTest::Spec
include Rack::Test::Methods
end
|
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 count: 22
# Configuration parameters: Exclude.
Style/Documentation:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowAsExpressionSeparator.
Style/Semicolon:
Exclude:
- 'lib/mako/article.rb'
| 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: 1
Style/AccessorMethodName:
Exclude:
- 'lib/mako/core.rb'
# Offense count: 25
Style/Documentation:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowAsExpressionSeparator.
Style/Semicolon:
Exclude:
- 'lib/mako/article.rb'
| 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'
# Offense count: 22
# Configuration parameters: Exclude.
Style/Documentation:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowAsExpressionSeparator.
Style/Semicolon:
Exclude:
- 'lib/mako/article.rb'
## Instruction:
Add additional exceptions to rubocop todo
## Code After:
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: 1
Style/AccessorMethodName:
Exclude:
- 'lib/mako/core.rb'
# Offense count: 25
Style/Documentation:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowAsExpressionSeparator.
Style/Semicolon:
Exclude:
- 'lib/mako/article.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_0811'),
]
operations = [
migrations.CreateModel(
name='SearchBookmark',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('low_is_good', models.NullBooleanField()),
('url', models.CharField(max_length=200)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
]
)
]
| 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_fields'),
]
operations = [
migrations.CreateModel(
name='SearchBookmark',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('low_is_good', models.NullBooleanField()),
('url', models.CharField(max_length=200)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
]
)
]
| 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_auto_20160908_0811'),
]
operations = [
migrations.CreateModel(
name='SearchBookmark',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('low_is_good', models.NullBooleanField()),
('url', models.CharField(max_length=200)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
]
)
]
## Instruction:
Fix multiple leaf nodes in migrations
## Code After:
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_fields'),
]
operations = [
migrations.CreateModel(
name='SearchBookmark',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('low_is_good', models.NullBooleanField()),
('url', models.CharField(max_length=200)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
]
)
]
|
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
${PUBLIC_HEADERS_DIR}/blob.h
${PUBLIC_HEADERS_DIR}/connection.h
${PUBLIC_HEADERS_DIR}/exceptions.h
${PUBLIC_HEADERS_DIR}/extractor.h
${PUBLIC_HEADERS_DIR}/logging.h
${PUBLIC_HEADERS_DIR}/nullable.h
${PUBLIC_HEADERS_DIR}/row.h
${PUBLIC_HEADERS_DIR}/scopedtransaction.h
${PUBLIC_HEADERS_DIR}/sqlite3.h
${PUBLIC_HEADERS_DIR}/statement.h
${PUBLIC_HEADERS_DIR}/util.h
${PUBLIC_HEADERS_DIR}/version.h
)
set(PRIVATE_HEADERS
result_names.h
)
add_library(smartsqlite
${PUBLIC_HEADERS}
${PRIVATE_HEADERS}
sqlite3.c
binder.cpp
blob.cpp
connection.cpp
exceptions.cpp
extractor.cpp
logging.cpp
row.cpp
util.cpp
scopedtransaction.cpp
statement.cpp
version.cpp
)
if(UNIX)
target_link_libraries(smartsqlite INTERFACE dl)
endif()
| 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
${PUBLIC_HEADERS_DIR}/connection.h
${PUBLIC_HEADERS_DIR}/exceptions.h
${PUBLIC_HEADERS_DIR}/extractor.h
${PUBLIC_HEADERS_DIR}/logging.h
${PUBLIC_HEADERS_DIR}/nullable.h
${PUBLIC_HEADERS_DIR}/row.h
${PUBLIC_HEADERS_DIR}/scopedtransaction.h
${PUBLIC_HEADERS_DIR}/sqlite3.h
${PUBLIC_HEADERS_DIR}/statement.h
${PUBLIC_HEADERS_DIR}/util.h
${PUBLIC_HEADERS_DIR}/version.h
)
set(PRIVATE_HEADERS
result_names.h
)
add_library(smartsqlite
${PUBLIC_HEADERS}
${PRIVATE_HEADERS}
sqlite3.c
binder.cpp
blob.cpp
connection.cpp
exceptions.cpp
extractor.cpp
logging.cpp
row.cpp
util.cpp
scopedtransaction.cpp
statement.cpp
version.cpp
)
target_include_directories(smartsqlite PUBLIC ${INCLUDE_DIR})
if(UNIX)
target_link_libraries(smartsqlite INTERFACE dl)
endif()
| 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}/binder.h
${PUBLIC_HEADERS_DIR}/blob.h
${PUBLIC_HEADERS_DIR}/connection.h
${PUBLIC_HEADERS_DIR}/exceptions.h
${PUBLIC_HEADERS_DIR}/extractor.h
${PUBLIC_HEADERS_DIR}/logging.h
${PUBLIC_HEADERS_DIR}/nullable.h
${PUBLIC_HEADERS_DIR}/row.h
${PUBLIC_HEADERS_DIR}/scopedtransaction.h
${PUBLIC_HEADERS_DIR}/sqlite3.h
${PUBLIC_HEADERS_DIR}/statement.h
${PUBLIC_HEADERS_DIR}/util.h
${PUBLIC_HEADERS_DIR}/version.h
)
set(PRIVATE_HEADERS
result_names.h
)
add_library(smartsqlite
${PUBLIC_HEADERS}
${PRIVATE_HEADERS}
sqlite3.c
binder.cpp
blob.cpp
connection.cpp
exceptions.cpp
extractor.cpp
logging.cpp
row.cpp
util.cpp
scopedtransaction.cpp
statement.cpp
version.cpp
)
if(UNIX)
target_link_libraries(smartsqlite INTERFACE dl)
endif()
## Instruction:
Make the include directory part of the public CMake interface
## Code After:
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
${PUBLIC_HEADERS_DIR}/connection.h
${PUBLIC_HEADERS_DIR}/exceptions.h
${PUBLIC_HEADERS_DIR}/extractor.h
${PUBLIC_HEADERS_DIR}/logging.h
${PUBLIC_HEADERS_DIR}/nullable.h
${PUBLIC_HEADERS_DIR}/row.h
${PUBLIC_HEADERS_DIR}/scopedtransaction.h
${PUBLIC_HEADERS_DIR}/sqlite3.h
${PUBLIC_HEADERS_DIR}/statement.h
${PUBLIC_HEADERS_DIR}/util.h
${PUBLIC_HEADERS_DIR}/version.h
)
set(PRIVATE_HEADERS
result_names.h
)
add_library(smartsqlite
${PUBLIC_HEADERS}
${PRIVATE_HEADERS}
sqlite3.c
binder.cpp
blob.cpp
connection.cpp
exceptions.cpp
extractor.cpp
logging.cpp
row.cpp
util.cpp
scopedtransaction.cpp
statement.cpp
version.cpp
)
target_include_directories(smartsqlite PUBLIC ${INCLUDE_DIR})
if(UNIX)
target_link_libraries(smartsqlite INTERFACE dl)
endif()
|
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 "password";
```
- Setup node environment and start server
```sh
# Few node globals
npm install -g coffee-script
npm install -g diorama
npm install -g supervisor
# Setup dependencies
npm install
# start server
supervisor app.coffee
```
## Application structure
#### app.coffee
Application entry point. Includes required modules and starts the server
#### route_bindings.coffee
Binds the server paths (e.g. '/indicators/') to the routes in the route folder
#### routes/
Contains the 'actions' in the application, grouped into modules by their
responsibility. These are mapped to paths by route_bindings.coffee
#### models/
mysql ORM initialization
#### public/clientApp
A [BackboneDiorama](https://github.com/th3james/BackboneDiorama/) application
## Tests
Tests go in the test/ folder (unsurprisingly). We're using mocha with the qunit
interface and using the chai assertion syntax.
Run them with
`npm test`
|
- 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
`node app.coffee'
##### Compile diorama applications
`cd public/clientApp && diorama compile watch
## Application structure
#### app.coffee
Application entry point. Includes required modules and starts the server
#### route_bindings.coffee
Binds the server paths (e.g. '/indicators/') to the routes in the route folder
#### routes/
Contains the 'actions' in the application, grouped into modules by their
responsibility. These are mapped to paths by route_bindings.coffee
#### models/
mysql ORM initialization
#### public/clientApp
A [BackboneDiorama](https://github.com/th3james/BackboneDiorama/) application
## Tests
Tests go in the test/ folder (unsurprisingly). We're using mocha with the qunit
interface and using the chai assertion syntax.
Run them with
`npm test`
| 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 identified by "password";
```
- Setup node environment and start server
```sh
# Few node globals
npm install -g coffee-script
npm install -g diorama
npm install -g supervisor
# Setup dependencies
npm install
# start server
supervisor app.coffee
```
## Application structure
#### app.coffee
Application entry point. Includes required modules and starts the server
#### route_bindings.coffee
Binds the server paths (e.g. '/indicators/') to the routes in the route folder
#### routes/
Contains the 'actions' in the application, grouped into modules by their
responsibility. These are mapped to paths by route_bindings.coffee
#### models/
mysql ORM initialization
#### public/clientApp
A [BackboneDiorama](https://github.com/th3james/BackboneDiorama/) application
## Tests
Tests go in the test/ folder (unsurprisingly). We're using mocha with the qunit
interface and using the chai assertion syntax.
Run them with
`npm test`
## Instruction:
Add more info about running the app and compiling
## Code After:
- 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
`node app.coffee'
##### Compile diorama applications
`cd public/clientApp && diorama compile watch
## Application structure
#### app.coffee
Application entry point. Includes required modules and starts the server
#### route_bindings.coffee
Binds the server paths (e.g. '/indicators/') to the routes in the route folder
#### routes/
Contains the 'actions' in the application, grouped into modules by their
responsibility. These are mapped to paths by route_bindings.coffee
#### models/
mysql ORM initialization
#### public/clientApp
A [BackboneDiorama](https://github.com/th3james/BackboneDiorama/) application
## Tests
Tests go in the test/ folder (unsurprisingly). We're using mocha with the qunit
interface and using the chai assertion syntax.
Run them with
`npm test`
|
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 you want to delete <b>{{ object }}</b>?
{% endblocktranslate %}
</p>
{% comment %}Translators: This is the button coordinators click to confirm deletion of a suggestion. {% endcomment %}
<input type="submit" value="{% trans 'Confirm' %}" class="btn btn-danger"/>
</form>
{% endblock content %}
| {% 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 coordinators can request the deletion of a suggestion. {% endcomment %}
{% blocktranslate trimmed %}
Are you sure you want to delete <b>{{ object }}</b>?
{% endblocktranslate %}
</p>
{% comment %}Translators: This is the button coordinators click to confirm deletion of a suggestion. {% endcomment %}
<input type="submit" value="{% trans 'Confirm' %}" class="btn btn-danger"/>
</form>
</div>
{% endblock content %}
| 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 %}
Are you sure you want to delete <b>{{ object }}</b>?
{% endblocktranslate %}
</p>
{% comment %}Translators: This is the button coordinators click to confirm deletion of a suggestion. {% endcomment %}
<input type="submit" value="{% trans 'Confirm' %}" class="btn btn-danger"/>
</form>
{% endblock content %}
## Instruction:
Migrate /suggest/[Number]/delete/ to Bootstrap 4
## Code After:
{% 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 coordinators can request the deletion of a suggestion. {% endcomment %}
{% blocktranslate trimmed %}
Are you sure you want to delete <b>{{ object }}</b>?
{% endblocktranslate %}
</p>
{% comment %}Translators: This is the button coordinators click to confirm deletion of a suggestion. {% endcomment %}
<input type="submit" value="{% trans 'Confirm' %}" class="btn btn-danger"/>
</form>
</div>
{% endblock content %}
|
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.sampleRate, this);
},
tick: function() {
AudioletNode.prototype.tick.apply(this, [this.bufferSize]);
this.writePosition += this.bufferSize;
},
getPlaybackTime: function() {
return this.writePosition - this.bufferSize;
},
getWriteTime: function() {
return this.writePosition;
}
});
| /**
* @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.sampleRate, this);
},
tick: function() {
AudioletNode.prototype.tick.apply(this, [this.bufferSize,
this.writePosition]);
this.writePosition += this.bufferSize;
},
getPlaybackTime: function() {
return this.writePosition - this.bufferSize;
},
getWriteTime: function() {
return this.writePosition;
}
});
| 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.bufferSize / this.sampleRate, this);
},
tick: function() {
AudioletNode.prototype.tick.apply(this, [this.bufferSize]);
this.writePosition += this.bufferSize;
},
getPlaybackTime: function() {
return this.writePosition - this.bufferSize;
},
getWriteTime: function() {
return this.writePosition;
}
});
## Instruction:
Make dummy device pass timestamp, so it actually generates audio
## Code After:
/**
* @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.sampleRate, this);
},
tick: function() {
AudioletNode.prototype.tick.apply(this, [this.bufferSize,
this.writePosition]);
this.writePosition += this.bufferSize;
},
getPlaybackTime: function() {
return this.writePosition - this.bufferSize;
},
getWriteTime: function() {
return this.writePosition;
}
});
|
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 'fail' in selenium.page_source
def test_authenticated_user_can_access_blank_login_page(selenium, live_server):
User = get_user_model()
user = User.objects.create_user(username='selenium', password='password')
force_login(user, selenium, live_server.url)
selenium.get('{}/test/login_required/'.format(live_server.url))
assert 'success' in selenium.page_source
| 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 'fail' in selenium.page_source
def test_authenticated_user_can_access_test_page(selenium, live_server):
User = get_user_model()
user = User.objects.create_user(username='selenium', password='password')
force_login(user, selenium, live_server.url)
selenium.get('{}/test/login_required/'.format(live_server.url))
assert 'success' in selenium.page_source
| 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))
assert 'fail' in selenium.page_source
def test_authenticated_user_can_access_blank_login_page(selenium, live_server):
User = get_user_model()
user = User.objects.create_user(username='selenium', password='password')
force_login(user, selenium, live_server.url)
selenium.get('{}/test/login_required/'.format(live_server.url))
assert 'success' in selenium.page_source
## Instruction:
Rename test. The test tries to access a test page, not a blank page
## Code After:
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 'fail' in selenium.page_source
def test_authenticated_user_can_access_test_page(selenium, live_server):
User = get_user_model()
user = User.objects.create_user(username='selenium', password='password')
force_login(user, selenium, live_server.url)
selenium.get('{}/test/login_required/'.format(live_server.url))
assert 'success' in selenium.page_source
|
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.GetString("apikey")
mcurl := mcstore.MCUrl()
mclogging := config.GetString("mclogging")
fmt.Println("apikey:", apikey)
fmt.Println("mcurl:", mcurl)
fmt.Println("mclogging:", mclogging)
}
| 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,
},
}
var showConfigCommand = cli.Command{
Name: "config",
Aliases: []string{"conf", "c"},
Usage: "Show configuration",
Action: showConfigCLI,
}
func showConfigCLI(c *cli.Context) {
apikey := config.GetString("apikey")
mcurl := mcstore.MCUrl()
mclogging := config.GetString("mclogging")
fmt.Println("apikey:", apikey)
fmt.Println("mcurl:", mcurl)
fmt.Println("mclogging:", mclogging)
}
| 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 := config.GetString("apikey")
mcurl := mcstore.MCUrl()
mclogging := config.GetString("mclogging")
fmt.Println("apikey:", apikey)
fmt.Println("mcurl:", mcurl)
fmt.Println("mclogging:", mclogging)
}
## Instruction:
Make show a command with sub commands. Add a config command (so: show config) to show the client configuration.
## Code After:
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,
},
}
var showConfigCommand = cli.Command{
Name: "config",
Aliases: []string{"conf", "c"},
Usage: "Show configuration",
Action: showConfigCLI,
}
func showConfigCLI(c *cli.Context) {
apikey := config.GetString("apikey")
mcurl := mcstore.MCUrl()
mclogging := config.GetString("mclogging")
fmt.Println("apikey:", apikey)
fmt.Println("mcurl:", mcurl)
fmt.Println("mclogging:", mclogging)
}
|
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: "${customMessage}${actual} expected not to be function",
expectation: "toBeFunction",
values: function(actual, message) {
return {
actual: String(actual).replace("\n", ""),
actualType: typeof actual,
customMessage: message
};
}
});
};
| "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: "${customMessage}${actual} expected not to be function",
expectation: "toBeFunction",
values: function(actual, message) {
return {
actual: String(actual)
.replace("function(", "function (")
.replace("\n", ""),
actualType: typeof actual,
customMessage: message
};
}
});
};
| 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: "${customMessage}${actual} expected not to be function",
expectation: "toBeFunction",
values: function(actual, message) {
return {
actual: String(actual).replace("\n", ""),
actualType: typeof actual,
customMessage: message
};
}
});
};
## Instruction:
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.
## Code After:
"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: "${customMessage}${actual} expected not to be function",
expectation: "toBeFunction",
values: function(actual, message) {
return {
actual: String(actual)
.replace("function(", "function (")
.replace("\n", ""),
actualType: typeof actual,
customMessage: message
};
}
});
};
|
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=d5d95d7486a4d98c999675c23196b25a"
SRCNAME = "RPIO"
SRC_URI = "http://pypi.python.org/packages/source/R/RPIO/${SRCNAME}-${PV}.tar.gz \
file://0001-include-sys-types.h-explicitly-for-getting-caddr_t-d.patch \
"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
COMPATIBLE_MACHINE = "raspberrypi"
SRC_URI[md5sum] = "cefc45422833dcafcd59b78dffc540f4"
SRC_URI[sha256sum] = "b89f75dec9de354681209ebfaedfe22b7c178aacd91a604a7bd6d92024e4cf7e"
| 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=d5d95d7486a4d98c999675c23196b25a"
SRCNAME = "RPIO"
SRC_URI = "http://pypi.python.org/packages/source/R/RPIO/${SRCNAME}-${PV}.tar.gz \
file://0001-include-sys-types.h-explicitly-for-getting-caddr_t-d.patch \
"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
COMPATIBLE_MACHINE = "raspberrypi"
RDEPENDS_${PN} = "\
python-logging \
python-threading \
"
SRC_URI[md5sum] = "cefc45422833dcafcd59b78dffc540f4"
SRC_URI[sha256sum] = "b89f75dec9de354681209ebfaedfe22b7c178aacd91a604a7bd6d92024e4cf7e"
| 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
doing a rpi-basci-image. This change updates the recipe so that all the
required dependencies of the prio script are identified by the recipie.
Fixes #98
Signed-off-by: Thomas A F Thorne <3857bccc88203a3a5096056ecf8a6f860bf50edf@GoogleMail.com>
| 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/meta-raspberrypi,schnitzeltony/meta-raspberrypi,agherzan/meta-raspberrypi,leon-anavi/meta-raspberrypi,d21d3q/meta-raspberrypi,agherzan/meta-raspberrypi,agherzan/meta-raspberrypi | 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;md5=d5d95d7486a4d98c999675c23196b25a"
SRCNAME = "RPIO"
SRC_URI = "http://pypi.python.org/packages/source/R/RPIO/${SRCNAME}-${PV}.tar.gz \
file://0001-include-sys-types.h-explicitly-for-getting-caddr_t-d.patch \
"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
COMPATIBLE_MACHINE = "raspberrypi"
SRC_URI[md5sum] = "cefc45422833dcafcd59b78dffc540f4"
SRC_URI[sha256sum] = "b89f75dec9de354681209ebfaedfe22b7c178aacd91a604a7bd6d92024e4cf7e"
## Instruction:
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
doing a rpi-basci-image. This change updates the recipe so that all the
required dependencies of the prio script are identified by the recipie.
Fixes #98
Signed-off-by: Thomas A F Thorne <3857bccc88203a3a5096056ecf8a6f860bf50edf@GoogleMail.com>
## Code After:
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=d5d95d7486a4d98c999675c23196b25a"
SRCNAME = "RPIO"
SRC_URI = "http://pypi.python.org/packages/source/R/RPIO/${SRCNAME}-${PV}.tar.gz \
file://0001-include-sys-types.h-explicitly-for-getting-caddr_t-d.patch \
"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit setuptools
COMPATIBLE_MACHINE = "raspberrypi"
RDEPENDS_${PN} = "\
python-logging \
python-threading \
"
SRC_URI[md5sum] = "cefc45422833dcafcd59b78dffc540f4"
SRC_URI[sha256sum] = "b89f75dec9de354681209ebfaedfe22b7c178aacd91a604a7bd6d92024e4cf7e"
|
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='r-fing-index l-fing-index r-heel r-knee'):
with plots.space() as ax:
for t in source.Experiment(root).trials_matching(pattern):
t.realign()
t.interpolate()
for i, marker in enumerate(markers.split()):
df = t.trajectory(marker)
ax.plot(np.asarray(df.x),
np.asarray(df.z),
zs=np.asarray(df.y),
color=lmj.plot.COLOR11[i],
alpha=0.7)
if __name__ == '__main__':
climate.call(main)
| 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 spline of this order', 'option', None, int),
accuracy=('fit spline with this accuracy', 'option', None, float),
)
def main(root,
pattern='*/*block00/*circuit00.csv.gz',
markers='r-fing-index l-fing-index r-heel r-knee',
spline=1,
accuracy=1):
with plots.space() as ax:
for t in source.Experiment(root).trials_matching(pattern):
t.normalize(order=spline, accuracy=accuracy)
for i, marker in enumerate(markers.split()):
df = t.trajectory(marker)
ax.plot(np.asarray(df.x),
np.asarray(df.z),
zs=np.asarray(df.y),
color=lmj.plot.COLOR11[i],
alpha=0.7)
if __name__ == '__main__':
climate.call(main)
| 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.csv.gz', markers='r-fing-index l-fing-index r-heel r-knee'):
with plots.space() as ax:
for t in source.Experiment(root).trials_matching(pattern):
t.realign()
t.interpolate()
for i, marker in enumerate(markers.split()):
df = t.trajectory(marker)
ax.plot(np.asarray(df.x),
np.asarray(df.z),
zs=np.asarray(df.y),
color=lmj.plot.COLOR11[i],
alpha=0.7)
if __name__ == '__main__':
climate.call(main)
## Instruction:
Add command-line flags for spline order and accuracy.
## Code After:
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 spline of this order', 'option', None, int),
accuracy=('fit spline with this accuracy', 'option', None, float),
)
def main(root,
pattern='*/*block00/*circuit00.csv.gz',
markers='r-fing-index l-fing-index r-heel r-knee',
spline=1,
accuracy=1):
with plots.space() as ax:
for t in source.Experiment(root).trials_matching(pattern):
t.normalize(order=spline, accuracy=accuracy)
for i, marker in enumerate(markers.split()):
df = t.trajectory(marker)
ax.plot(np.asarray(df.x),
np.asarray(df.z),
zs=np.asarray(df.y),
color=lmj.plot.COLOR11[i],
alpha=0.7)
if __name__ == '__main__':
climate.call(main)
|
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 = new resourceful.Cache();
}
Riak.prototype.protocol = 'riak';
Riak.prototype.save = function (key, val, callback) {
this.db.save(this.bucket, key, val, {}, callback);
};
Riak.prototype.get = function (key, callback) {
this.db.get(this.bucket, key, {}, function(e, value, meta) {
value._id = meta.key;
callback(e, value);
});
}
Riak.prototype.update = function(key, val, callback) {
var that = this;
that.get(key, function(err, old) {
that.save(key, resourceful.mixin(old, val), callback);
});
}
Riak.prototype.all = function(callback) {
this.db.getAll(this.bucket, callback);
}
Riak.prototype.destroy = function(key, callback) {
this.db.remove(this.bucket, key, callback);
}
| 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 = new resourceful.Cache();
}
Riak.prototype.protocol = 'riak';
Riak.prototype.save = function (key, val, callback) {
this.db.save(this.bucket, key, val, {}, callback);
};
Riak.prototype.get = function (key, callback) {
this.db.get(this.bucket, key, {}, function(e, value, meta) {
value._id = meta.key;
callback(e, value);
});
}
Riak.prototype.update = function(key, val, callback) {
var that = this;
that.get(key, function(err, old) {
that.save(key, resourceful.mixin(old, val), callback);
});
}
Riak.prototype.all = function(callback) {
this.db.getAll(this.bucket, function(e, all) {
if(e) {
callback(e);
} else {
var models = all.map(function(obj) {
return obj.data;
});
callback(null, models);
}
});
}
Riak.prototype.destroy = function(key, callback) {
this.db.remove(this.bucket, key, callback);
}
| 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);
this.cache = new resourceful.Cache();
}
Riak.prototype.protocol = 'riak';
Riak.prototype.save = function (key, val, callback) {
this.db.save(this.bucket, key, val, {}, callback);
};
Riak.prototype.get = function (key, callback) {
this.db.get(this.bucket, key, {}, function(e, value, meta) {
value._id = meta.key;
callback(e, value);
});
}
Riak.prototype.update = function(key, val, callback) {
var that = this;
that.get(key, function(err, old) {
that.save(key, resourceful.mixin(old, val), callback);
});
}
Riak.prototype.all = function(callback) {
this.db.getAll(this.bucket, callback);
}
Riak.prototype.destroy = function(key, callback) {
this.db.remove(this.bucket, key, callback);
}
## Instruction:
Make Model.all work as expected.
## Code After:
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 = new resourceful.Cache();
}
Riak.prototype.protocol = 'riak';
Riak.prototype.save = function (key, val, callback) {
this.db.save(this.bucket, key, val, {}, callback);
};
Riak.prototype.get = function (key, callback) {
this.db.get(this.bucket, key, {}, function(e, value, meta) {
value._id = meta.key;
callback(e, value);
});
}
Riak.prototype.update = function(key, val, callback) {
var that = this;
that.get(key, function(err, old) {
that.save(key, resourceful.mixin(old, val), callback);
});
}
Riak.prototype.all = function(callback) {
this.db.getAll(this.bucket, function(e, all) {
if(e) {
callback(e);
} else {
var models = all.map(function(obj) {
return obj.data;
});
callback(null, models);
}
});
}
Riak.prototype.destroy = function(key, callback) {
this.db.remove(this.bucket, key, callback);
}
|
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 wait for fd)
## Code After:
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')
|
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 a visit link to go to the Session Detail page. You can filter
data in the charts below by clicking and dragging over one or more patient
visits in the grid.
Use the dropdown menus to choose which data are plotted along the X
(horizontal) and Y (vertical) axes in the charts.
Filter data by clicking and dragging over one or more plotted data points in
any chart. They will be encapsulated by a grey box. Only the corresponding
subject and visit data will be visible in the other charts, and the rest
hidden. Click anywhere on the chart outside of the grey box to cancel the
selection and make all data visible.
| 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 MR sessions for the given imaging collection are initially represented.
Filter data by clicking and dragging over one or more plotted data points in
any chart. The selection will be indicated by a box, while the unselected
data points will shrink. Only the corresponding subject and visit data will be
visible in the other charts. Click anywhere on the chart outside of the selection
box to cancel the selection and make all data visible.
The patients and MR sessions are shown in the two topmost panels. The top left
panel contains a list of patient and visit links. The top right panel displays
the same patients and visits as a grid. Click on a patient link in the list to
open the Patient Profile page. Click on a visit link to open the Session Detail
page.
| 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
Profile page or a visit link to go to the Session Detail page. You can filter
data in the charts below by clicking and dragging over one or more patient
visits in the grid.
Use the dropdown menus to choose which data are plotted along the X
(horizontal) and Y (vertical) axes in the charts.
Filter data by clicking and dragging over one or more plotted data points in
any chart. They will be encapsulated by a grey box. Only the corresponding
subject and visit data will be visible in the other charts, and the rest
hidden. Click anywhere on the chart outside of the grey box to cancel the
selection and make all data visible.
## Instruction:
Clarify the Collection Detail help.
## Code After:
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 MR sessions for the given imaging collection are initially represented.
Filter data by clicking and dragging over one or more plotted data points in
any chart. The selection will be indicated by a box, while the unselected
data points will shrink. Only the corresponding subject and visit data will be
visible in the other charts. Click anywhere on the chart outside of the selection
box to cancel the selection and make all data visible.
The patients and MR sessions are shown in the two topmost panels. The top left
panel contains a list of patient and visit links. The top right panel displays
the same patients and visits as a grid. Click on a patient link in the list to
open the Patient Profile page. Click on a visit link to open the Session Detail
page.
|
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)
provider_klass = Object.module_eval("MessageHub::Providers::#{name.capitalize}")
provider_klass.new
end
end
| $:.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:
#
# gmail = MessageHub.provider(:gmail)
# gmail.login(:username => "login", :password => "your password")
# gmail.fetch_messages(:since => Time.now) do |message|
# puts "Received: #{message.inspect}"
# end
#
def self.provider(name)
provider_klass = Object.module_eval("MessageHub::Providers::#{name.capitalize}")
provider_klass.new
end
end
| 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 self.provider(name)
provider_klass = Object.module_eval("MessageHub::Providers::#{name.capitalize}")
provider_klass.new
end
end
## Instruction:
Add a little note explaining how to use it.
## Code After:
$:.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:
#
# gmail = MessageHub.provider(:gmail)
# gmail.login(:username => "login", :password => "your password")
# gmail.fetch_messages(:since => Time.now) do |message|
# puts "Received: #{message.inspect}"
# end
#
def self.provider(name)
provider_klass = Object.module_eval("MessageHub::Providers::#{name.capitalize}")
provider_klass.new
end
end
|
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 [latest release][] on GitHub.
[latest release]: https://github.com/paritytrading/parity/releases/latest
## License
Released under the Apache License, Version 2.0.
|
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>parity-match</artifactId>
<version><!-- latest release --></version>
</dependency>
```
See the [latest release][] on GitHub.
[latest release]: https://github.com/paritytrading/parity/releases/latest
## License
Released under the Apache License, Version 2.0.
| 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>
```
See the [latest release][] on GitHub.
[latest release]: https://github.com/paritytrading/parity/releases/latest
## License
Released under the Apache License, Version 2.0.
## Instruction:
Add dependencies to matching engine documentation
## Code After:
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>parity-match</artifactId>
<version><!-- latest release --></version>
</dependency>
```
See the [latest release][] on GitHub.
[latest release]: https://github.com/paritytrading/parity/releases/latest
## License
Released under the Apache License, Version 2.0.
|
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();
push();
translate(100, 300);
rotate(45);
rect(-50, -25, 100, 50);
pop();
push();
translate(300, 100);
rotate(45);
rect(-50, -25, 100, 50);
pop();
}
| 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);
}
## Instruction:
Use push and pop for different rectangles
## Code After:
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();
push();
translate(100, 300);
rotate(45);
rect(-50, -25, 100, 50);
pop();
push();
translate(300, 100);
rotate(45);
rect(-50, -25, 100, 50);
pop();
}
|
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';
export default (label, source) => {
if (typeof label !== 'undefined') return label;
if (typeof source !== 'undefined') return inflection.humanize(source);
return '';
};
|
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
$ virtualenv --prompt="(fibber) " .venv
$ source .venv/bin/activate
Download and install the application dependencies.
$ pip install -r requirements.txt
Once the dependencies have been installed, start the development server.
$ cd fibber
$ gunicorn fibber:app
This will start the development server on the local machine, listening on port 8000. You should be able to access the application at [http://localhost:8000/](http://localhost:8000).
## Testing
Run the application tests.
$ nosetests -v --with-coverage --cover-package=fibber --cover-erase --cover-branches --cover-html tests.py
## Deployment
Deploy on Heroku...
| 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/jmckind/fibber.git
$ cd fibber
Next, set up and activate a virtual environment.
$ pip install virtualenv
$ mkdir .venv
$ virtualenv --prompt="(fibber) " .venv
$ source .venv/bin/activate
Download and install the application dependencies.
$ pip install -r requirements.txt
Once the dependencies have been installed, start the development server.
$ cd fibber
$ gunicorn fibber:app
This will start the development server on the local machine, listening on port 8000. You should be able to access the application at [http://localhost:8000/](http://localhost:8000).
## Testing
Run the application tests.
$ nosetests -v --with-coverage --cover-package=fibber --cover-erase --cover-branches --cover-html tests.py
## Deployment
Deploy on Heroku...
|
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(
receive(:send_message).with( expected_arguments )
)
ChampaignQueue::Clients::Sqs.push({foo: :bar})
end
end
context "without SQS_QUEUE_URL" do
before do
allow(ENV).to receive(:[]).with("SQS_QUEUE_URL"){ nil }
end
it "does not deliver payload to AWS SQS Queue" do
expect_any_instance_of(Aws::SQS::Client).to_not receive(:send_message)
ChampaignQueue::Clients::Sqs.push({foo: :bar})
end
end
end
| 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(
receive(:send_message).with( expected_arguments )
)
ChampaignQueue::Clients::Sqs.push({foo: :bar})
end
end
context "without SQS_QUEUE_URL" do
before do
allow(ENV).to receive(:[]).with("SQS_QUEUE_URL"){ nil }
end
it "does not deliver payload to AWS SQS Queue" do
expect_any_instance_of(Aws::SQS::Client).to_not receive(:send_message)
ChampaignQueue::Clients::Sqs.push({foo: :bar})
end
end
end
| 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::SQS::Client).to(
receive(:send_message).with( expected_arguments )
)
ChampaignQueue::Clients::Sqs.push({foo: :bar})
end
end
context "without SQS_QUEUE_URL" do
before do
allow(ENV).to receive(:[]).with("SQS_QUEUE_URL"){ nil }
end
it "does not deliver payload to AWS SQS Queue" do
expect_any_instance_of(Aws::SQS::Client).to_not receive(:send_message)
ChampaignQueue::Clients::Sqs.push({foo: :bar})
end
end
end
## Instruction:
Fix broken spec - push to test CircleCI autodeploy
## Code After:
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(
receive(:send_message).with( expected_arguments )
)
ChampaignQueue::Clients::Sqs.push({foo: :bar})
end
end
context "without SQS_QUEUE_URL" do
before do
allow(ENV).to receive(:[]).with("SQS_QUEUE_URL"){ nil }
end
it "does not deliver payload to AWS SQS Queue" do
expect_any_instance_of(Aws::SQS::Client).to_not receive(:send_message)
ChampaignQueue::Clients::Sqs.push({foo: :bar})
end
end
end
|
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
current_application_settings.performance_bar_allowed_group_id
end
def self.allowed_user_ids
Rails.cache.fetch(ALLOWED_USER_IDS_KEY) do
group = Group.find_by_id(allowed_group_id)
if group
GroupMembersFinder.new(group).execute.pluck(:user_id)
else
[]
end
end
end
def self.expire_allowed_user_ids_cache
Rails.cache.delete(ALLOWED_USER_IDS_KEY)
end
end
end
| 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 self.allowed_group_id
current_application_settings.performance_bar_allowed_group_id
end
def self.allowed_user_ids
Rails.cache.fetch(ALLOWED_USER_IDS_KEY, expires_in: EXPIRY_TIME) do
group = Group.find_by_id(allowed_group_id)
if group
GroupMembersFinder.new(group).execute.pluck(:user_id)
else
[]
end
end
end
def self.expire_allowed_user_ids_cache
Rails.cache.delete(ALLOWED_USER_IDS_KEY)
end
end
end
| 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/gitlab,axilleas/gitlabhq,mmkassem/gitlabhq,axilleas/gitlabhq,dplarson/gitlabhq,t-zuehlsdorff/gitlabhq,dreampet/gitlab,mmkassem/gitlabhq,jirutka/gitlabhq,dplarson/gitlabhq,dreampet/gitlab,t-zuehlsdorff/gitlabhq,dreampet/gitlab,stoplightio/gitlabhq,axilleas/gitlabhq | 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_group_id
current_application_settings.performance_bar_allowed_group_id
end
def self.allowed_user_ids
Rails.cache.fetch(ALLOWED_USER_IDS_KEY) do
group = Group.find_by_id(allowed_group_id)
if group
GroupMembersFinder.new(group).execute.pluck(:user_id)
else
[]
end
end
end
def self.expire_allowed_user_ids_cache
Rails.cache.delete(ALLOWED_USER_IDS_KEY)
end
end
end
## Instruction:
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>
## Code After:
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 self.allowed_group_id
current_application_settings.performance_bar_allowed_group_id
end
def self.allowed_user_ids
Rails.cache.fetch(ALLOWED_USER_IDS_KEY, expires_in: EXPIRY_TIME) do
group = Group.find_by_id(allowed_group_id)
if group
GroupMembersFinder.new(group).execute.pluck(:user_id)
else
[]
end
end
end
def self.expire_allowed_user_ids_cache
Rails.cache.delete(ALLOWED_USER_IDS_KEY)
end
end
end
|
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 update
- sudo apt-get install libicu-dev libmozjs-dev
before_script: ./bootstrap && ./configure
script: make check
language: erlang
otp_release:
- R15B01
- R15B
- R14B04
- R14B03
|
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.id.value.should == "13"
invoice.line_items.count.should == 1
invoice.line_items.first.unit_price.should == 225
end
end
| 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.id.value.should == "13"
invoice.line_items.count.should == 1
invoice.line_items.first.unit_price.should == 225
end
it "does not set id if it is not present" do
xml = <<EOT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Invoice xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:qbp="http://www.intuit.com/sb/cdm/qbopayroll/v1" xmlns:qbo="http://www.intuit.com/sb/cdm/qbo">
<Header>
</Header>
</Invoice>
EOT
invoice = Quickeebooks::Windows::Model::Invoice.from_xml(xml)
invoice.id.should eq nil
end
it "does not set header.sales_term_id if it is not present" do
xml = <<EOT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Invoice xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:qbp="http://www.intuit.com/sb/cdm/qbopayroll/v1" xmlns:qbo="http://www.intuit.com/sb/cdm/qbo">
<Header>
</Header>
</Invoice>
EOT
invoice = Quickeebooks::Windows::Model::Invoice.from_xml(xml)
invoice.header.sales_term_id.should eq nil
end
end
| 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 == "3"
invoice.id.value.should == "13"
invoice.line_items.count.should == 1
invoice.line_items.first.unit_price.should == 225
end
end
## Instruction:
Windows::Invoice: Test that id and sales_term_id are nil if not present
## Code After:
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.id.value.should == "13"
invoice.line_items.count.should == 1
invoice.line_items.first.unit_price.should == 225
end
it "does not set id if it is not present" do
xml = <<EOT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Invoice xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:qbp="http://www.intuit.com/sb/cdm/qbopayroll/v1" xmlns:qbo="http://www.intuit.com/sb/cdm/qbo">
<Header>
</Header>
</Invoice>
EOT
invoice = Quickeebooks::Windows::Model::Invoice.from_xml(xml)
invoice.id.should eq nil
end
it "does not set header.sales_term_id if it is not present" do
xml = <<EOT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Invoice xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:qbp="http://www.intuit.com/sb/cdm/qbopayroll/v1" xmlns:qbo="http://www.intuit.com/sb/cdm/qbo">
<Header>
</Header>
</Invoice>
EOT
invoice = Quickeebooks::Windows::Model::Invoice.from_xml(xml)
invoice.header.sales_term_id.should eq nil
end
end
|
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 false;
} );
require_once __DIR__ . '/../lib/vendor/Buzz/lib/Buzz/ClassLoader.php';
Buzz\ClassLoader::register(); | <?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');
$loader->register();
$loader = new ClassLoader('Doctrine\\Search', __DIR__ . '/../lib');
$loader->register();
Buzz\ClassLoader::register(); | 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 $filename;
}
return false;
} );
require_once __DIR__ . '/../lib/vendor/Buzz/lib/Buzz/ClassLoader.php';
Buzz\ClassLoader::register();
## Instruction:
Use doctrine classloader instead of closure
## Code After:
<?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');
$loader->register();
$loader = new ClassLoader('Doctrine\\Search', __DIR__ . '/../lib');
$loader->register();
Buzz\ClassLoader::register(); |
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 After:
require "hyperloop/application"
require "hyperloop/response"
require "hyperloop/version"
require "hyperloop/view"
require "hyperloop/view/registry"
require "hyperloop/view/scope"
module Hyperloop
end
|
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-php5`` PHP 5.6
``alpine-3`` *deprecated* PHP 5.6
``alpine-3-php7`` *deprecated* PHP 7.x
``ubuntu-12.04`` precise PHP 5.3
``ubuntu-14.04`` trusty (LTS) PHP 5.5
``ubuntu-15.04`` vivid PHP 5.6
``ubuntu-15.10`` wily PHP 5.6
``ubuntu-16.04`` xenial (LTS) PHP 7.0
``debian-7`` wheezy PHP 5.4
``debian-8`` jessie PHP 5.6
``debian-8-php7`` jessie with dotdeb PHP 7.x (via sury)
``debian-9`` stretch PHP 7.0
``centos-7`` PHP 5.4
``centos-7-php56`` PHP 5.6
====================== ========================== ===============
| ====================== =================================== ===============
Tag Distribution name PHP Version
====================== =================================== ===============
``5.6`` *customized official php image* PHP 5.6
``7.0`` *customized official php image* PHP 7.0
``7.1`` *customized official php image* PHP 7.1
``alpine`` *link to alpine-php7* PHP 7.x
``alpine-php7`` PHP 7.x
``alpine-php5`` PHP 5.6
``alpine-3`` *deprecated* PHP 5.6
``alpine-3-php7`` *deprecated* PHP 7.x
``ubuntu-12.04`` precise PHP 5.3
``ubuntu-14.04`` trusty (LTS) PHP 5.5
``ubuntu-15.04`` vivid PHP 5.6
``ubuntu-15.10`` wily PHP 5.6
``ubuntu-16.04`` xenial (LTS) PHP 7.0
``debian-7`` wheezy PHP 5.4
``debian-8`` jessie PHP 5.6
``debian-8-php7`` jessie with dotdeb PHP 7.x (via sury)
``debian-9`` stretch PHP 7.0
``centos-7`` PHP 5.4
``centos-7-php56`` PHP 5.6
====================== =================================== ===============
| 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`` PHP 7.x
``alpine-php5`` PHP 5.6
``alpine-3`` *deprecated* PHP 5.6
``alpine-3-php7`` *deprecated* PHP 7.x
``ubuntu-12.04`` precise PHP 5.3
``ubuntu-14.04`` trusty (LTS) PHP 5.5
``ubuntu-15.04`` vivid PHP 5.6
``ubuntu-15.10`` wily PHP 5.6
``ubuntu-16.04`` xenial (LTS) PHP 7.0
``debian-7`` wheezy PHP 5.4
``debian-8`` jessie PHP 5.6
``debian-8-php7`` jessie with dotdeb PHP 7.x (via sury)
``debian-9`` stretch PHP 7.0
``centos-7`` PHP 5.4
``centos-7-php56`` PHP 5.6
====================== ========================== ===============
## Instruction:
Add official php images to tag list
## Code After:
====================== =================================== ===============
Tag Distribution name PHP Version
====================== =================================== ===============
``5.6`` *customized official php image* PHP 5.6
``7.0`` *customized official php image* PHP 7.0
``7.1`` *customized official php image* PHP 7.1
``alpine`` *link to alpine-php7* PHP 7.x
``alpine-php7`` PHP 7.x
``alpine-php5`` PHP 5.6
``alpine-3`` *deprecated* PHP 5.6
``alpine-3-php7`` *deprecated* PHP 7.x
``ubuntu-12.04`` precise PHP 5.3
``ubuntu-14.04`` trusty (LTS) PHP 5.5
``ubuntu-15.04`` vivid PHP 5.6
``ubuntu-15.10`` wily PHP 5.6
``ubuntu-16.04`` xenial (LTS) PHP 7.0
``debian-7`` wheezy PHP 5.4
``debian-8`` jessie PHP 5.6
``debian-8-php7`` jessie with dotdeb PHP 7.x (via sury)
``debian-9`` stretch PHP 7.0
``centos-7`` PHP 5.4
``centos-7-php56`` PHP 5.6
====================== =================================== ===============
|
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.name }}
install_options={{ item.install_options | default("") }}
with_items: brew_base_packages
tags:
- base
- brew
- name: Install brew cask applications
homebrew_cask:
name={{ item.name }}
state={{ item.state | default("present") }}
with_items: brew_cask_applications
tags:
- base
- brew
- brew-cask
- name: Cleanup cask
command: brew-cask cleanup
tags:
- base
- brew
- brew-cask
- name: Link homebrew apps
command: brew linkapps
tags:
- base
- brew
- brew-cask
- name: ssh dir
file:
path={{ home_dir }}/.ssh
state=directory
tags:
- base
- name: Project workspace
file:
path={{ workspace_dir }}
state=directory
tags:
- base
- name: User tmp dir
file:
path="{{ home_dir }}/tmp"
state=directory
tags:
- base
| ---
- 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={{ item.name }}
install_options={{ item.install_options | default("") }}
with_items: brew_base_packages
tags:
- base
- brew
- name: Install brew cask applications
homebrew_cask:
name={{ item.name }}
state={{ item.state | default("present") }}
with_items: brew_cask_applications
tags:
- base
- brew
- brew-cask
- name: Cleanup cask
command: brew-cask cleanup
tags:
- base
- brew
- brew-cask
- name: Link homebrew apps
command: brew linkapps
tags:
- base
- brew
- brew-cask
- name: ssh dir
file:
path={{ home_dir }}/.ssh
state=directory
tags:
- base
- name: Project workspace
file:
path={{ workspace_dir }}
state=directory
tags:
- base
- name: User tmp dir
file:
path="{{ home_dir }}/tmp"
state=directory
tags:
- base
| 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:
name={{ item.name }}
install_options={{ item.install_options | default("") }}
with_items: brew_base_packages
tags:
- base
- brew
- name: Install brew cask applications
homebrew_cask:
name={{ item.name }}
state={{ item.state | default("present") }}
with_items: brew_cask_applications
tags:
- base
- brew
- brew-cask
- name: Cleanup cask
command: brew-cask cleanup
tags:
- base
- brew
- brew-cask
- name: Link homebrew apps
command: brew linkapps
tags:
- base
- brew
- brew-cask
- name: ssh dir
file:
path={{ home_dir }}/.ssh
state=directory
tags:
- base
- name: Project workspace
file:
path={{ workspace_dir }}
state=directory
tags:
- base
- name: User tmp dir
file:
path="{{ home_dir }}/tmp"
state=directory
tags:
- base
## Instruction:
Use homebrew module update command
## Code After:
---
- 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={{ item.name }}
install_options={{ item.install_options | default("") }}
with_items: brew_base_packages
tags:
- base
- brew
- name: Install brew cask applications
homebrew_cask:
name={{ item.name }}
state={{ item.state | default("present") }}
with_items: brew_cask_applications
tags:
- base
- brew
- brew-cask
- name: Cleanup cask
command: brew-cask cleanup
tags:
- base
- brew
- brew-cask
- name: Link homebrew apps
command: brew linkapps
tags:
- base
- brew
- brew-cask
- name: ssh dir
file:
path={{ home_dir }}/.ssh
state=directory
tags:
- base
- name: Project workspace
file:
path={{ workspace_dir }}
state=directory
tags:
- base
- name: User tmp dir
file:
path="{{ home_dir }}/tmp"
state=directory
tags:
- base
|
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::
:maxdepth: 2
:caption: Contents:
queue-pinservice
quick-start
configuration
snapshots
indices/README
|
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+Se6V83wA43MylimzrgngO6t3c/lXa/aMnrRzSpSfK5QznEMP2zcSU1ReD+2dNr7ATKajbGqTzrCFk/hQPMZ0=
on:
tags: true
| 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/aMnrRzSpSfK5QznEMP2zcSU1ReD+2dNr7ATKajbGqTzrCFk/hQPMZ0=
on:
tags: true
| 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+Se6V83wA43MylimzrgngO6t3c/lXa/aMnrRzSpSfK5QznEMP2zcSU1ReD+2dNr7ATKajbGqTzrCFk/hQPMZ0=
on:
tags: true
## Instruction:
Remove support for old Python 3.x versions
## Code After:
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/aMnrRzSpSfK5QznEMP2zcSU1ReD+2dNr7ATKajbGqTzrCFk/hQPMZ0=
on:
tags: true
|
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.com/tristen/tablesort.git#v4.0.1",
"roboto-slab-fontface": "*",
"es6-shim": "~0.35.1",
"almond": "~0.3.2",
"d3": "~3.5.17",
"roboto-fontface": "~0.4.5",
"virtual-dom": "~2.1.1",
"rbush": "https://github.com/mourner/rbush.git#~1.4.3"
},
"authors": [
"Milan Pässler <me@petabyteboy.de>",
"Nils Schneider <nils@nilsschneider.net>"
],
"license": "AGPL3",
"private": true
}
| {
"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": "~2.2.0",
"tablesort": "https://github.com/tristen/tablesort.git#v4.0.1",
"roboto-slab-fontface": "*",
"es6-shim": "~0.35.1",
"almond": "~0.3.2",
"d3": "~3.5.17",
"roboto-fontface": "~0.4.5",
"virtual-dom": "~2.1.1",
"rbush": "https://github.com/mourner/rbush.git#~1.4.3"
},
"authors": [
"Milan Pässler <me@petabyteboy.de>",
"Nils Schneider <nils@nilsschneider.net>"
],
"license": "AGPL3",
"private": true
}
| 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/Meshviewer,hopglass/ffrgb-meshviewer,Freifunk-Rhein-Neckar/meshviewer,Freifunk-Rhein-Neckar/meshviewer,Freifunk-Rhein-Neckar/meshviewer,freifunkMUC/meshviewer | 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": "https://github.com/tristen/tablesort.git#v4.0.1",
"roboto-slab-fontface": "*",
"es6-shim": "~0.35.1",
"almond": "~0.3.2",
"d3": "~3.5.17",
"roboto-fontface": "~0.4.5",
"virtual-dom": "~2.1.1",
"rbush": "https://github.com/mourner/rbush.git#~1.4.3"
},
"authors": [
"Milan Pässler <me@petabyteboy.de>",
"Nils Schneider <nils@nilsschneider.net>"
],
"license": "AGPL3",
"private": true
}
## Instruction:
[TASK] Use leaflet v0.7.7.1 to avoid freeze in IE
## Code After:
{
"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": "~2.2.0",
"tablesort": "https://github.com/tristen/tablesort.git#v4.0.1",
"roboto-slab-fontface": "*",
"es6-shim": "~0.35.1",
"almond": "~0.3.2",
"d3": "~3.5.17",
"roboto-fontface": "~0.4.5",
"virtual-dom": "~2.1.1",
"rbush": "https://github.com/mourner/rbush.git#~1.4.3"
},
"authors": [
"Milan Pässler <me@petabyteboy.de>",
"Nils Schneider <nils@nilsschneider.net>"
],
"license": "AGPL3",
"private": true
}
|
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 to json
func Render(w http.ResponseWriter, data interface{}) {
js, err := RenderToString(data, true)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
w.Header().Set("Content-Type", "application/hal+json; charset=utf-8")
w.Write(js)
}
| 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 to json
func Render(w http.ResponseWriter, data interface{}) {
js, err := RenderToString(data, true)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
w.Header().Set("Content-Disposition", "inline")
w.Header().Set("Content-Type", "application/hal+json; charset=utf-8")
w.Write(js)
}
| 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, after marshalling to json
func Render(w http.ResponseWriter, data interface{}) {
js, err := RenderToString(data, true)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
w.Header().Set("Content-Type", "application/hal+json; charset=utf-8")
w.Write(js)
}
## Instruction:
Add Content-Disposition header for hal responses
## Code After:
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 to json
func Render(w http.ResponseWriter, data interface{}) {
js, err := RenderToString(data, true)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
w.Header().Set("Content-Disposition", "inline")
w.Header().Set("Content-Type", "application/hal+json; charset=utf-8")
w.Write(js)
}
|
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: {{prefix}}/glance/glance-registry.conf
- user: glance
- group: glance
- source: salt://openstack/glance/conf/glance-registry.conf
- template: jinja
| {% 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-registry-conf:
file.managed:
- name: {{prefix}}/glance/glance-registry.conf
- user: glance
- group: glance
- source: salt://openstack/glance/conf/glance-registry.conf
- template: jinja
- require:
- user: glance-user
| 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.managed:
- name: {{prefix}}/glance/glance-registry.conf
- user: glance
- group: glance
- source: salt://openstack/glance/conf/glance-registry.conf
- template: jinja
## Instruction:
Add requirement for the glance user
## Code After:
{% 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-registry-conf:
file.managed:
- name: {{prefix}}/glance/glance-registry.conf
- user: glance
- group: glance
- source: salt://openstack/glance/conf/glance-registry.conf
- template: jinja
- require:
- user: glance-user
|
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.Args[2])
if err != nil {
log.Fatalf("Cannot create new file %q", os.Args[2])
}
defer o.Close()
}
| 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()
r := bufio.NewReader(i)
o, err := os.Create(os.Args[2])
if err != nil {
log.Fatalf("Cannot create new file %q: %v", os.Args[2], err)
}
defer o.Close()
w := bufio.NewWriter(o)
for {
line, err := r.ReadString('\n')
if len(line) > 0 {
if _, werr := w.WriteString(line); werr != nil {
log.Fatalf("Error writing to file: %v", werr)
}
}
if err == io.EOF {
break
}
if err != nil {
log.Fatalf("Error whilst reading file: %v", err)
}
}
}
| 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 := os.Create(os.Args[2])
if err != nil {
log.Fatalf("Cannot create new file %q", os.Args[2])
}
defer o.Close()
}
## Instruction:
Add reading/writing logic (but at the moment just echo--no processing logic).
## Code After:
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()
r := bufio.NewReader(i)
o, err := os.Create(os.Args[2])
if err != nil {
log.Fatalf("Cannot create new file %q: %v", os.Args[2], err)
}
defer o.Close()
w := bufio.NewWriter(o)
for {
line, err := r.ReadString('\n')
if len(line) > 0 {
if _, werr := w.WriteString(line); werr != nil {
log.Fatalf("Error writing to file: %v", werr)
}
}
if err == io.EOF {
break
}
if err != nil {
log.Fatalf("Error whilst reading file: %v", 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 # Generating main.hex
@echo #----------------------------------------------------------------------------#
avr-objcopy -O ihex bin\main.elf bin\main.hex
@echo #----------------------------------------------------------------------------#
@echo # File size main.hex
@echo #----------------------------------------------------------------------------#
avr-size --target=ihex bin\main.hex
@echo #----------------------------------------------------------------------------#
@echo # Burning main.hex in ATMega328p with COM7
@echo #----------------------------------------------------------------------------#
c:\arduino\WinAVR-20100110\bin\avrdude.exe -v -pm2560 -cstk500v2 -PCOM4 -b115200 -e -U flash:w:"bin\main.hex"
@echo # Done | @echo #----------------------------------------------------------------------------#
@echo # Generating main.lss
@echo #----------------------------------------------------------------------------#
avr-objdump -h -S bin\main.elf > bin\main.lss
@echo #----------------------------------------------------------------------------#
@echo # Generating main.hex
@echo #----------------------------------------------------------------------------#
avr-objcopy -O ihex bin\main.elf bin\main.hex
@echo #----------------------------------------------------------------------------#
@echo # File size main.hex
@echo #----------------------------------------------------------------------------#
avr-size --target=ihex bin\main.hex
@echo #----------------------------------------------------------------------------#
@echo # Burning main.hex in ATMega328p with COM5
@echo #----------------------------------------------------------------------------#
avrdude.exe -v -pm2560 -cstk500v2 -PCOM5 -b115200 -e -U flash:w:"bin\main.hex"
@echo # Done | 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 #----------------------------------------------------------------------------#
@echo # Generating main.hex
@echo #----------------------------------------------------------------------------#
avr-objcopy -O ihex bin\main.elf bin\main.hex
@echo #----------------------------------------------------------------------------#
@echo # File size main.hex
@echo #----------------------------------------------------------------------------#
avr-size --target=ihex bin\main.hex
@echo #----------------------------------------------------------------------------#
@echo # Burning main.hex in ATMega328p with COM7
@echo #----------------------------------------------------------------------------#
c:\arduino\WinAVR-20100110\bin\avrdude.exe -v -pm2560 -cstk500v2 -PCOM4 -b115200 -e -U flash:w:"bin\main.hex"
@echo # Done
## Instruction:
Update comport and avrdude path.
## Code After:
@echo #----------------------------------------------------------------------------#
@echo # Generating main.lss
@echo #----------------------------------------------------------------------------#
avr-objdump -h -S bin\main.elf > bin\main.lss
@echo #----------------------------------------------------------------------------#
@echo # Generating main.hex
@echo #----------------------------------------------------------------------------#
avr-objcopy -O ihex bin\main.elf bin\main.hex
@echo #----------------------------------------------------------------------------#
@echo # File size main.hex
@echo #----------------------------------------------------------------------------#
avr-size --target=ihex bin\main.hex
@echo #----------------------------------------------------------------------------#
@echo # Burning main.hex in ATMega328p with COM5
@echo #----------------------------------------------------------------------------#
avrdude.exe -v -pm2560 -cstk500v2 -PCOM5 -b115200 -e -U flash:w:"bin\main.hex"
@echo # Done |
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_ADMIN = false;
if(~ userCtx.roles.indexOf('_admin'))
IS_DB_ADMIN = true;
if(~ secObj.admins.names.indexOf(userCtx.name))
IS_DB_ADMIN = true;
for(var i = 0; i < userCtx.roles; i++)
if(~ secObj.admins.roles.indexOf(userCtx.roles[i]))
IS_DB_ADMIN = true;
// check access.json's write_roles collection
for(var i = 0; i < userCtx.roles; i++)
if(~ ddoc.write_roles.indexOf(userCtx.roles[i]))
IS_DB_ADMIN = true;
if(ddoc.access && ddoc.access.read_only)
if(IS_DB_ADMIN)
log('Admin change on read-only db: ' + newDoc._id);
else
throw {'forbidden':'This database is read-only'};
}
| /**
* 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_ADMIN = false;
if(~ userCtx.roles.indexOf('_admin'))
IS_DB_ADMIN = true;
if(~ secObj.admins.names.indexOf(userCtx.name))
IS_DB_ADMIN = true;
for(var i = 0; i < userCtx.roles; i++)
if(~ secObj.admins.roles.indexOf(userCtx.roles[i]))
IS_DB_ADMIN = true;
// check access.json's write_roles collection
for(var i = 0; i < userCtx.roles.length; i++)
if(~ ddoc.access.write_roles.indexOf(userCtx.roles[i]))
IS_DB_ADMIN = true;
if(ddoc.access && ddoc.access.read_only)
if(IS_DB_ADMIN)
log('Admin change on read-only db: ' + newDoc._id);
else
throw {'forbidden':'This database is read-only'};
}
| 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 || [];
var IS_DB_ADMIN = false;
if(~ userCtx.roles.indexOf('_admin'))
IS_DB_ADMIN = true;
if(~ secObj.admins.names.indexOf(userCtx.name))
IS_DB_ADMIN = true;
for(var i = 0; i < userCtx.roles; i++)
if(~ secObj.admins.roles.indexOf(userCtx.roles[i]))
IS_DB_ADMIN = true;
// check access.json's write_roles collection
for(var i = 0; i < userCtx.roles; i++)
if(~ ddoc.write_roles.indexOf(userCtx.roles[i]))
IS_DB_ADMIN = true;
if(ddoc.access && ddoc.access.read_only)
if(IS_DB_ADMIN)
log('Admin change on read-only db: ' + newDoc._id);
else
throw {'forbidden':'This database is read-only'};
}
## Instruction:
Make perms write_roles actually work
## Code After:
/**
* 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_ADMIN = false;
if(~ userCtx.roles.indexOf('_admin'))
IS_DB_ADMIN = true;
if(~ secObj.admins.names.indexOf(userCtx.name))
IS_DB_ADMIN = true;
for(var i = 0; i < userCtx.roles; i++)
if(~ secObj.admins.roles.indexOf(userCtx.roles[i]))
IS_DB_ADMIN = true;
// check access.json's write_roles collection
for(var i = 0; i < userCtx.roles.length; i++)
if(~ ddoc.access.write_roles.indexOf(userCtx.roles[i]))
IS_DB_ADMIN = true;
if(ddoc.access && ddoc.access.read_only)
if(IS_DB_ADMIN)
log('Admin change on read-only db: ' + newDoc._id);
else
throw {'forbidden':'This database is read-only'};
}
|
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]]
[prone.middleware :refer [wrap-exceptions]]
[ring.middleware.reload :refer [wrap-reload]]
[environ.core :refer [env]]))
(def mount-target
[:div#app
[:h3 "ClojureScript has not been compiled!"]
[:p "please run "
[:b "lein figwheel"]
" in order to start the compiler"]])
(def loading-page
(html
[:html
[:head
[:meta {:charset "utf-8"}]
[:meta {:name "viewport"
:content "width=device-width, initial-scale=1"}]
(include-css (if (env :dev) "css/site.css" "css/site.min.css"))]
[:body
mount-target
(include-js "js/app.js")]]))
(defroutes routes
(GET "/" [] loading-page)
(GET "/about" [] loading-page)
(resources "/")
(not-found "Not Found"))
(def app
(let [handler (wrap-defaults #'routes site-defaults)]
(if (env :dev) (-> handler wrap-exceptions wrap-reload) handler)))
| (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]]
[prone.middleware :refer [wrap-exceptions]]
[ring.middleware.reload :refer [wrap-reload]]
[environ.core :refer [env]]))
(def mount-target
[:div#app
[:h3 "ClojureScript has not been compiled!"]
[:p "please run "
[:b "lein figwheel"]
" in order to start the compiler"]])
(def loading-page
(html
[:html
[:head
[:meta {:charset "utf-8"}]
[:meta {:name "viewport"
:content "width=device-width, initial-scale=1"}]
(include-css (if (env :dev) "css/site.css" "css/site.min.css"))]
[:body
mount-target
(include-js "//www.parsecdn.com/js/parse-1.6.7.min.js")
(include-js "js/app.js")]]))
(defroutes routes
(GET "/" [] loading-page)
(GET "/about" [] loading-page)
(resources "/")
(not-found "Not Found"))
(def app
(let [handler (wrap-defaults #'routes site-defaults)]
(if (env :dev) (-> handler wrap-exceptions wrap-reload) handler)))
| 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-css]]
[prone.middleware :refer [wrap-exceptions]]
[ring.middleware.reload :refer [wrap-reload]]
[environ.core :refer [env]]))
(def mount-target
[:div#app
[:h3 "ClojureScript has not been compiled!"]
[:p "please run "
[:b "lein figwheel"]
" in order to start the compiler"]])
(def loading-page
(html
[:html
[:head
[:meta {:charset "utf-8"}]
[:meta {:name "viewport"
:content "width=device-width, initial-scale=1"}]
(include-css (if (env :dev) "css/site.css" "css/site.min.css"))]
[:body
mount-target
(include-js "js/app.js")]]))
(defroutes routes
(GET "/" [] loading-page)
(GET "/about" [] loading-page)
(resources "/")
(not-found "Not Found"))
(def app
(let [handler (wrap-defaults #'routes site-defaults)]
(if (env :dev) (-> handler wrap-exceptions wrap-reload) handler)))
## Instruction:
Include parse library on page
## Code After:
(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]]
[prone.middleware :refer [wrap-exceptions]]
[ring.middleware.reload :refer [wrap-reload]]
[environ.core :refer [env]]))
(def mount-target
[:div#app
[:h3 "ClojureScript has not been compiled!"]
[:p "please run "
[:b "lein figwheel"]
" in order to start the compiler"]])
(def loading-page
(html
[:html
[:head
[:meta {:charset "utf-8"}]
[:meta {:name "viewport"
:content "width=device-width, initial-scale=1"}]
(include-css (if (env :dev) "css/site.css" "css/site.min.css"))]
[:body
mount-target
(include-js "//www.parsecdn.com/js/parse-1.6.7.min.js")
(include-js "js/app.js")]]))
(defroutes routes
(GET "/" [] loading-page)
(GET "/about" [] loading-page)
(resources "/")
(not-found "Not Found"))
(def app
(let [handler (wrap-defaults #'routes site-defaults)]
(if (env :dev) (-> handler wrap-exceptions wrap-reload) handler)))
|
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 enthusiast studying Microengineering in Lausanne, Switzerland
logo: false
# Exclude our ruby stuff
exclude: [README.md .bundle, bin, vendor, Gemfile, Gemfile.lock, Rakefile, s3_website.yml, .last_optimized]
# Details for the RSS feed generator
url: 'http://antoinealb.net'
baseurl: '/'
gems:
- jekyll-feed
- jekyll-sitemap
- jekyll-paginate
|
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: antoinealb
bio: Robotics enthusiast studying Microengineering in Lausanne, Switzerland
logo: false
# Exclude our ruby stuff
exclude: [README.md .bundle, bin, vendor, Gemfile, Gemfile.lock, Rakefile, s3_website.yml, .last_optimized]
# Details for the RSS feed generator
url: 'http://antoinealb.net'
baseurl: '/'
gems:
- jekyll-feed
- jekyll-sitemap
- jekyll-paginate
| 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: Robotics enthusiast studying Microengineering in Lausanne, Switzerland
logo: false
# Exclude our ruby stuff
exclude: [README.md .bundle, bin, vendor, Gemfile, Gemfile.lock, Rakefile, s3_website.yml, .last_optimized]
# Details for the RSS feed generator
url: 'http://antoinealb.net'
baseurl: '/'
gems:
- jekyll-feed
- jekyll-sitemap
- jekyll-paginate
## Instruction:
Add a note that this website also serves as my wiki
## Code After:
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: antoinealb
bio: Robotics enthusiast studying Microengineering in Lausanne, Switzerland
logo: false
# Exclude our ruby stuff
exclude: [README.md .bundle, bin, vendor, Gemfile, Gemfile.lock, Rakefile, s3_website.yml, .last_optimized]
# Details for the RSS feed generator
url: 'http://antoinealb.net'
baseurl: '/'
gems:
- jekyll-feed
- jekyll-sitemap
- jekyll-paginate
|
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 values on Sauce
@skip_safari
Scenario: User can modify Video display name
Given I have created a Video component
And I edit the component
Then I can modify the display name
And my video display name change is persisted on save
# Sauce Labs cannot delete cookies
@skip_sauce
Scenario: Captions are hidden when "show captions" is false
Given I have created a Video component with subtitles
And I have set "show captions" to False
Then when I view the video it does not show the captions
# Sauce Labs cannot delete cookies
@skip_sauce
Scenario: Captions are shown when "show captions" is true
Given I have created a Video component with subtitles
And I have set "show captions" to True
Then when I view the video it does show the captions
| @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 values on Sauce
@skip_safari
Scenario: User can modify Video display name
Given I have created a Video component
And I edit the component
Then I can modify the display name
And my video display name change is persisted on save
# Disabling this 10/7/13 due to nondeterministic behavior
# in master. The failure seems to occur when YouTube does
# not respond quickly enough, so that the video player
# doesn't load.
#
# Sauce Labs cannot delete cookies
# @skip_sauce
#Scenario: Captions are hidden when "show captions" is false
# Given I have created a Video component with subtitles
# And I have set "show captions" to False
# Then when I view the video it does not show the captions
# Sauce Labs cannot delete cookies
@skip_sauce
Scenario: Captions are shown when "show captions" is true
Given I have created a Video component with subtitles
And I have set "show captions" to True
Then when I view the video it does show the captions
| 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-platform,shashank971/edx-platform,procangroup/edx-platform,dkarakats/edx-platform,kxliugang/edx-platform,edry/edx-platform,TeachAtTUM/edx-platform,hastexo/edx-platform,dsajkl/123,fly19890211/edx-platform,Softmotions/edx-platform,olexiim/edx-platform,mjirayu/sit_academy,kxliugang/edx-platform,zadgroup/edx-platform,CourseTalk/edx-platform,xinjiguaike/edx-platform,cselis86/edx-platform,philanthropy-u/edx-platform,EDUlib/edx-platform,angelapper/edx-platform,cpennington/edx-platform,motion2015/edx-platform,atsolakid/edx-platform,zerobatu/edx-platform,IndonesiaX/edx-platform,fly19890211/edx-platform,nanolearningllc/edx-platform-cypress,y12uc231/edx-platform,motion2015/edx-platform,nikolas/edx-platform,CourseTalk/edx-platform,hmcmooc/muddx-platform,zofuthan/edx-platform,CredoReference/edx-platform,jamesblunt/edx-platform,jamiefolsom/edx-platform,chand3040/cloud_that,Endika/edx-platform,apigee/edx-platform,deepsrijit1105/edx-platform,shurihell/testasia,hastexo/edx-platform,eestay/edx-platform,ovnicraft/edx-platform,shurihell/testasia,J861449197/edx-platform,bdero/edx-platform,alu042/edx-platform,chand3040/cloud_that,arifsetiawan/edx-platform,jruiperezv/ANALYSE,Lektorium-LLC/edx-platform,eestay/edx-platform,procangroup/edx-platform,nttks/jenkins-test,inares/edx-platform,dkarakats/edx-platform,jruiperezv/ANALYSE,LearnEra/LearnEraPlaftform,benpatterson/edx-platform,ahmadio/edx-platform,deepsrijit1105/edx-platform,shashank971/edx-platform,stvstnfrd/edx-platform,jolyonb/edx-platform,Semi-global/edx-platform,MSOpenTech/edx-platform,pabloborrego93/edx-platform,etzhou/edx-platform,cyanna/edx-platform,cselis86/edx-platform,jelugbo/tundex,mtlchun/edx,teltek/edx-platform,RPI-OPENEDX/edx-platform,louyihua/edx-platform,mushtaqak/edx-platform,zofuthan/edx-platform,devs1991/test_edx_docmode,sudheerchintala/LearnEraPlatForm,edry/edx-platform,doganov/edx-platform,analyseuc3m/ANALYSE-v1,DefyVentures/edx-platform,MSOpenTech/edx-platform,vasyarv/edx-platform,zubair-arbi/edx-platform,zubair-arbi/edx-platform,ZLLab-Mooc/edx-platform,jonathan-beard/edx-platform,beni55/edx-platform,tiagochiavericosta/edx-platform,nagyistoce/edx-platform,beacloudgenius/edx-platform,Kalyzee/edx-platform,mcgachey/edx-platform,itsjeyd/edx-platform,Endika/edx-platform,ampax/edx-platform-backup,rismalrv/edx-platform,rhndg/openedx,cognitiveclass/edx-platform,zofuthan/edx-platform,jelugbo/tundex,mbareta/edx-platform-ft,tiagochiavericosta/edx-platform,amir-qayyum-khan/edx-platform,knehez/edx-platform,martynovp/edx-platform,wwj718/edx-platform,jamiefolsom/edx-platform,defance/edx-platform,fintech-circle/edx-platform,cecep-edu/edx-platform,mbareta/edx-platform-ft,tanmaykm/edx-platform,synergeticsedx/deployment-wipro,stvstnfrd/edx-platform,jazkarta/edx-platform,doganov/edx-platform,jruiperezv/ANALYSE,ak2703/edx-platform,philanthropy-u/edx-platform,jazkarta/edx-platform-for-isc,JioEducation/edx-platform,halvertoluke/edx-platform,edx/edx-platform,bitifirefly/edx-platform,mushtaqak/edx-platform,kamalx/edx-platform,shubhdev/edx-platform,doismellburning/edx-platform,bigdatauniversity/edx-platform,vikas1885/test1,ESOedX/edx-platform,proversity-org/edx-platform,UOMx/edx-platform,jazztpt/edx-platform,shabab12/edx-platform,carsongee/edx-platform,hastexo/edx-platform,AkA84/edx-platform,antonve/s4-project-mooc,jbzdak/edx-platform,yokose-ks/edx-platform,edx-solutions/edx-platform,xuxiao19910803/edx-platform,pomegranited/edx-platform,ovnicraft/edx-platform,J861449197/edx-platform,rismalrv/edx-platform,sameetb-cuelogic/edx-platform-test,alu042/edx-platform,alu042/edx-platform,zhenzhai/edx-platform,andyzsf/edx,raccoongang/edx-platform,carsongee/edx-platform,ovnicraft/edx-platform,Ayub-Khan/edx-platform,sameetb-cuelogic/edx-platform-test,10clouds/edx-platform,hamzehd/edx-platform,Livit/Livit.Learn.EdX,wwj718/edx-platform,rue89-tech/edx-platform,sudheerchintala/LearnEraPlatForm,raccoongang/edx-platform,ZLLab-Mooc/edx-platform,cecep-edu/edx-platform,cselis86/edx-platform,halvertoluke/edx-platform,Edraak/edx-platform,shurihell/testasia,antoviaque/edx-platform,alexthered/kienhoc-platform,Softmotions/edx-platform,ahmadiga/min_edx,procangroup/edx-platform,AkA84/edx-platform,zhenzhai/edx-platform,utecuy/edx-platform,jbzdak/edx-platform,beni55/edx-platform,chudaol/edx-platform,don-github/edx-platform,cselis86/edx-platform,kmoocdev2/edx-platform,ampax/edx-platform,playm2mboy/edx-platform,don-github/edx-platform,fintech-circle/edx-platform,procangroup/edx-platform,Shrhawk/edx-platform,valtech-mooc/edx-platform,yokose-ks/edx-platform,DNFcode/edx-platform,Kalyzee/edx-platform,ahmedaljazzar/edx-platform,Edraak/edraak-platform,ampax/edx-platform-backup,xingyepei/edx-platform,morenopc/edx-platform,jazkarta/edx-platform,edry/edx-platform,miptliot/edx-platform,4eek/edx-platform,mitocw/edx-platform,eduNEXT/edunext-platform,polimediaupv/edx-platform,benpatterson/edx-platform,inares/edx-platform,unicri/edx-platform,chauhanhardik/populo,eestay/edx-platform,LearnEra/LearnEraPlaftform,zerobatu/edx-platform,gymnasium/edx-platform,vasyarv/edx-platform,nttks/edx-platform,iivic/BoiseStateX,SivilTaram/edx-platform,Softmotions/edx-platform,iivic/BoiseStateX,ampax/edx-platform-backup,xuxiao19910803/edx,DNFcode/edx-platform,antonve/s4-project-mooc,chand3040/cloud_that,DNFcode/edx-platform,mahendra-r/edx-platform,jzoldak/edx-platform,motion2015/edx-platform,bdero/edx-platform,Ayub-Khan/edx-platform,chand3040/cloud_that,romain-li/edx-platform,don-github/edx-platform,prarthitm/edxplatform,doismellburning/edx-platform,pomegranited/edx-platform,appliedx/edx-platform,torchingloom/edx-platform,morenopc/edx-platform,UXE/local-edx,fly19890211/edx-platform,wwj718/ANALYSE,appliedx/edx-platform,naresh21/synergetics-edx-platform,ferabra/edx-platform,motion2015/edx-platform,doismellburning/edx-platform,zadgroup/edx-platform,nanolearning/edx-platform,nanolearningllc/edx-platform-cypress,Livit/Livit.Learn.EdX,bitifirefly/edx-platform,zerobatu/edx-platform,hmcmooc/muddx-platform,nttks/edx-platform,mahendra-r/edx-platform,carsongee/edx-platform,longmen21/edx-platform,Kalyzee/edx-platform,motion2015/a3,hkawasaki/kawasaki-aio8-1,CourseTalk/edx-platform,eemirtekin/edx-platform,wwj718/ANALYSE,bigdatauniversity/edx-platform,JioEducation/edx-platform,hkawasaki/kawasaki-aio8-0,motion2015/edx-platform,louyihua/edx-platform,rue89-tech/edx-platform,devs1991/test_edx_docmode,etzhou/edx-platform,ferabra/edx-platform,kxliugang/edx-platform,kamalx/edx-platform,tanmaykm/edx-platform,shubhdev/edxOnBaadal,rhndg/openedx,dkarakats/edx-platform,rhndg/openedx,halvertoluke/edx-platform,kursitet/edx-platform,devs1991/test_edx_docmode,dsajkl/reqiop,SravanthiSinha/edx-platform,B-MOOC/edx-platform,nanolearning/edx-platform,arbrandes/edx-platform,inares/edx-platform,Lektorium-LLC/edx-platform,beacloudgenius/edx-platform,jzoldak/edx-platform,mitocw/edx-platform,jamesblunt/edx-platform,zofuthan/edx-platform,a-parhom/edx-platform,benpatterson/edx-platform,valtech-mooc/edx-platform,wwj718/ANALYSE,abdoosh00/edraak,WatanabeYasumasa/edx-platform,naresh21/synergetics-edx-platform,SravanthiSinha/edx-platform,pelikanchik/edx-platform,prarthitm/edxplatform,nttks/edx-platform,devs1991/test_edx_docmode,rue89-tech/edx-platform,tanmaykm/edx-platform,kursitet/edx-platform,hkawasaki/kawasaki-aio8-0,hamzehd/edx-platform,DefyVentures/edx-platform,Semi-global/edx-platform,miptliot/edx-platform,abdoosh00/edx-rtl-final,vismartltd/edx-platform,pelikanchik/edx-platform,chauhanhardik/populo_2,shubhdev/edxOnBaadal,eemirtekin/edx-platform,JCBarahona/edX,appsembler/edx-platform,hkawasaki/kawasaki-aio8-1,msegado/edx-platform,Edraak/edraak-platform,shashank971/edx-platform,eduNEXT/edunext-platform,Semi-global/edx-platform,torchingloom/edx-platform,shabab12/edx-platform,B-MOOC/edx-platform,sudheerchintala/LearnEraPlatForm,alexthered/kienhoc-platform,xinjiguaike/edx-platform,xuxiao19910803/edx,TeachAtTUM/edx-platform,devs1991/test_edx_docmode,jswope00/griffinx,auferack08/edx-platform,longmen21/edx-platform,dsajkl/123,xuxiao19910803/edx,iivic/BoiseStateX,hkawasaki/kawasaki-aio8-2,arifsetiawan/edx-platform,UXE/local-edx,mjirayu/sit_academy,peterm-itr/edx-platform,LICEF/edx-platform,itsjeyd/edx-platform,AkA84/edx-platform,tiagochiavericosta/edx-platform,franosincic/edx-platform,xuxiao19910803/edx,jzoldak/edx-platform,ovnicraft/edx-platform,vismartltd/edx-platform,cyanna/edx-platform,Edraak/circleci-edx-platform,jbassen/edx-platform,knehez/edx-platform,Edraak/circleci-edx-platform,MakeHer/edx-platform,franosincic/edx-platform,JCBarahona/edX,kursitet/edx-platform,SravanthiSinha/edx-platform,wwj718/ANALYSE,nttks/edx-platform,antonve/s4-project-mooc,kmoocdev/edx-platform,jonathan-beard/edx-platform,AkA84/edx-platform,wwj718/edx-platform,nanolearningllc/edx-platform-cypress-2,jazkarta/edx-platform,morenopc/edx-platform,Unow/edx-platform,devs1991/test_edx_docmode,gymnasium/edx-platform,shubhdev/openedx,mahendra-r/edx-platform,abdoosh00/edraak,nikolas/edx-platform,torchingloom/edx-platform,mitocw/edx-platform,etzhou/edx-platform,Lektorium-LLC/edx-platform,caesar2164/edx-platform,peterm-itr/edx-platform,eduNEXT/edx-platform,cecep-edu/edx-platform,nanolearningllc/edx-platform-cypress-2,appsembler/edx-platform,zubair-arbi/edx-platform,DefyVentures/edx-platform,prarthitm/edxplatform,eemirtekin/edx-platform,olexiim/edx-platform,openfun/edx-platform,nanolearningllc/edx-platform-cypress-2,mbareta/edx-platform-ft,rismalrv/edx-platform,caesar2164/edx-platform,don-github/edx-platform,jswope00/GAI,caesar2164/edx-platform,teltek/edx-platform,JCBarahona/edX,philanthropy-u/edx-platform,naresh21/synergetics-edx-platform,amir-qayyum-khan/edx-platform,hmcmooc/muddx-platform,ampax/edx-platform-backup,simbs/edx-platform,chudaol/edx-platform,TeachAtTUM/edx-platform,proversity-org/edx-platform,DNFcode/edx-platform,proversity-org/edx-platform,antonve/s4-project-mooc,edx-solutions/edx-platform,bitifirefly/edx-platform,mcgachey/edx-platform,J861449197/edx-platform,zadgroup/edx-platform,SravanthiSinha/edx-platform,jamesblunt/edx-platform,jswope00/GAI,zubair-arbi/edx-platform,nanolearningllc/edx-platform-cypress,Stanford-Online/edx-platform,RPI-OPENEDX/edx-platform,synergeticsedx/deployment-wipro,AkA84/edx-platform,pelikanchik/edx-platform,Edraak/edx-platform,fly19890211/edx-platform,kmoocdev2/edx-platform,jonathan-beard/edx-platform,ubc/edx-platform,shurihell/testasia,chrisndodge/edx-platform,rhndg/openedx,hkawasaki/kawasaki-aio8-2,doismellburning/edx-platform,dcosentino/edx-platform,mjg2203/edx-platform-seas,longmen21/edx-platform,arifsetiawan/edx-platform,mtlchun/edx,hamzehd/edx-platform,TsinghuaX/edx-platform,Lektorium-LLC/edx-platform,a-parhom/edx-platform,nttks/edx-platform,kmoocdev2/edx-platform,ferabra/edx-platform,adoosii/edx-platform,zadgroup/edx-platform,zadgroup/edx-platform,utecuy/edx-platform,jamiefolsom/edx-platform,4eek/edx-platform,mtlchun/edx,fintech-circle/edx-platform,LearnEra/LearnEraPlaftform,longmen21/edx-platform,hmcmooc/muddx-platform,antoviaque/edx-platform,WatanabeYasumasa/edx-platform,Ayub-Khan/edx-platform,Kalyzee/edx-platform,ZLLab-Mooc/edx-platform,arifsetiawan/edx-platform,MakeHer/edx-platform,wwj718/edx-platform,leansoft/edx-platform,IndonesiaX/edx-platform,shubhdev/openedx,eduNEXT/edx-platform,martynovp/edx-platform,shabab12/edx-platform,mushtaqak/edx-platform,analyseuc3m/ANALYSE-v1,jswope00/griffinx,alexthered/kienhoc-platform,OmarIthawi/edx-platform,openfun/edx-platform,shubhdev/edxOnBaadal,kmoocdev/edx-platform,jbassen/edx-platform,ubc/edx-platform,stvstnfrd/edx-platform,bigdatauniversity/edx-platform,xuxiao19910803/edx-platform,nanolearningllc/edx-platform-cypress,antonve/s4-project-mooc,IONISx/edx-platform,Shrhawk/edx-platform,TeachAtTUM/edx-platform,jbassen/edx-platform,beni55/edx-platform,xingyepei/edx-platform,jjmiranda/edx-platform,polimediaupv/edx-platform,waheedahmed/edx-platform,zubair-arbi/edx-platform,pepeportela/edx-platform,chand3040/cloud_that,dsajkl/123,nagyistoce/edx-platform,prarthitm/edxplatform,andyzsf/edx,SivilTaram/edx-platform,nanolearningllc/edx-platform-cypress-2,OmarIthawi/edx-platform,arbrandes/edx-platform,stvstnfrd/edx-platform,openfun/edx-platform,benpatterson/edx-platform,jolyonb/edx-platform,cecep-edu/edx-platform,mtlchun/edx,miptliot/edx-platform,mcgachey/edx-platform,chrisndodge/edx-platform,nagyistoce/edx-platform,nanolearningllc/edx-platform-cypress-2,MSOpenTech/edx-platform,kmoocdev/edx-platform,rhndg/openedx,nanolearning/edx-platform,iivic/BoiseStateX,arifsetiawan/edx-platform,xuxiao19910803/edx-platform,tanmaykm/edx-platform,morenopc/edx-platform,zhenzhai/edx-platform,kmoocdev2/edx-platform,edx-solutions/edx-platform,Shrhawk/edx-platform,jbassen/edx-platform,ubc/edx-platform,iivic/BoiseStateX,eestay/edx-platform,polimediaupv/edx-platform,atsolakid/edx-platform,waheedahmed/edx-platform,pku9104038/edx-platform,ahmadiga/min_edx,solashirai/edx-platform,cyanna/edx-platform,UOMx/edx-platform,ampax/edx-platform,yokose-ks/edx-platform,jazkarta/edx-platform-for-isc,chauhanhardik/populo_2,nanolearning/edx-platform,alu042/edx-platform,kxliugang/edx-platform,mjirayu/sit_academy,jazkarta/edx-platform,eduNEXT/edx-platform,DefyVentures/edx-platform,kmoocdev/edx-platform,inares/edx-platform,yokose-ks/edx-platform,cpennington/edx-platform,dkarakats/edx-platform,atsolakid/edx-platform,kamalx/edx-platform,sameetb-cuelogic/edx-platform-test,xuxiao19910803/edx-platform,jolyonb/edx-platform,a-parhom/edx-platform,xinjiguaike/edx-platform,LearnEra/LearnEraPlaftform,WatanabeYasumasa/edx-platform,synergeticsedx/deployment-wipro,Edraak/edx-platform,jswope00/griffinx,romain-li/edx-platform,EDUlib/edx-platform,dcosentino/edx-platform,nttks/jenkins-test,xingyepei/edx-platform,ahmedaljazzar/edx-platform,ahmadio/edx-platform,marcore/edx-platform,mbareta/edx-platform-ft,pelikanchik/edx-platform,knehez/edx-platform,kxliugang/edx-platform,rue89-tech/edx-platform,Edraak/edraak-platform,BehavioralInsightsTeam/edx-platform,hamzehd/edx-platform,zhenzhai/edx-platform,cselis86/edx-platform,edry/edx-platform,JCBarahona/edX,hkawasaki/kawasaki-aio8-2,solashirai/edx-platform,motion2015/a3,lduarte1991/edx-platform,chudaol/edx-platform,jonathan-beard/edx-platform,Shrhawk/edx-platform,jonathan-beard/edx-platform,amir-qayyum-khan/edx-platform,cognitiveclass/edx-platform,jjmiranda/edx-platform,MakeHer/edx-platform,Edraak/edraak-platform,jelugbo/tundex,jazkarta/edx-platform-for-isc,gsehub/edx-platform,cognitiveclass/edx-platform,playm2mboy/edx-platform,OmarIthawi/edx-platform,eestay/edx-platform,DefyVentures/edx-platform,doganov/edx-platform,vismartltd/edx-platform,mjg2203/edx-platform-seas,CourseTalk/edx-platform,leansoft/edx-platform,nikolas/edx-platform,utecuy/edx-platform,ubc/edx-platform,B-MOOC/edx-platform,Softmotions/edx-platform,Unow/edx-platform,shurihell/testasia,shubhdev/openedx,pepeportela/edx-platform,MakeHer/edx-platform,y12uc231/edx-platform,SivilTaram/edx-platform,RPI-OPENEDX/edx-platform,MakeHer/edx-platform,hkawasaki/kawasaki-aio8-0,zofuthan/edx-platform,benpatterson/edx-platform,appsembler/edx-platform,BehavioralInsightsTeam/edx-platform,openfun/edx-platform,bdero/edx-platform,hkawasaki/kawasaki-aio8-1,ahmedaljazzar/edx-platform,pku9104038/edx-platform,openfun/edx-platform,miptliot/edx-platform,itsjeyd/edx-platform,doismellburning/edx-platform,andyzsf/edx,angelapper/edx-platform,jswope00/GAI,analyseuc3m/ANALYSE-v1,defance/edx-platform,bitifirefly/edx-platform,gymnasium/edx-platform,LICEF/edx-platform,4eek/edx-platform,Edraak/edx-platform,cyanna/edx-platform,marcore/edx-platform,fly19890211/edx-platform,eduNEXT/edunext-platform,doganov/edx-platform,chrisndodge/edx-platform,kmoocdev2/edx-platform,gsehub/edx-platform,Edraak/edx-platform,SivilTaram/edx-platform,J861449197/edx-platform,wwj718/ANALYSE,martynovp/edx-platform,antoviaque/edx-platform,a-parhom/edx-platform,bitifirefly/edx-platform,longmen21/edx-platform,angelapper/edx-platform,chrisndodge/edx-platform,SivilTaram/edx-platform,tiagochiavericosta/edx-platform,appsembler/edx-platform,dsajkl/reqiop,jazztpt/edx-platform,mushtaqak/edx-platform,ahmadio/edx-platform,Unow/edx-platform,jazztpt/edx-platform,RPI-OPENEDX/edx-platform,wwj718/edx-platform,simbs/edx-platform,pabloborrego93/edx-platform,abdoosh00/edx-rtl-final,jamiefolsom/edx-platform,gsehub/edx-platform,bigdatauniversity/edx-platform,halvertoluke/edx-platform,dsajkl/123,ahmedaljazzar/edx-platform,peterm-itr/edx-platform,devs1991/test_edx_docmode,ubc/edx-platform,ak2703/edx-platform,beacloudgenius/edx-platform,tiagochiavericosta/edx-platform,beni55/edx-platform,chauhanhardik/populo,abdoosh00/edx-rtl-final,yokose-ks/edx-platform,dsajkl/123,shashank971/edx-platform,rismalrv/edx-platform,vasyarv/edx-platform,kamalx/edx-platform,IndonesiaX/edx-platform,dsajkl/reqiop,BehavioralInsightsTeam/edx-platform,IONISx/edx-platform,eemirtekin/edx-platform,hkawasaki/kawasaki-aio8-0,LICEF/edx-platform,ESOedX/edx-platform,sameetb-cuelogic/edx-platform-test,sudheerchintala/LearnEraPlatForm,olexiim/edx-platform,utecuy/edx-platform,chauhanhardik/populo,analyseuc3m/ANALYSE-v1,chauhanhardik/populo_2,martynovp/edx-platform,4eek/edx-platform,bdero/edx-platform,waheedahmed/edx-platform,romain-li/edx-platform,Ayub-Khan/edx-platform,knehez/edx-platform,chauhanhardik/populo_2,andyzsf/edx,y12uc231/edx-platform,Livit/Livit.Learn.EdX,arbrandes/edx-platform,jazkarta/edx-platform-for-isc,shashank971/edx-platform,10clouds/edx-platform,jelugbo/tundex,UOMx/edx-platform,nanolearningllc/edx-platform-cypress,nttks/jenkins-test,vismartltd/edx-platform,bigdatauniversity/edx-platform,franosincic/edx-platform,fintech-circle/edx-platform,jruiperezv/ANALYSE,dcosentino/edx-platform,deepsrijit1105/edx-platform,gymnasium/edx-platform,adoosii/edx-platform,Semi-global/edx-platform,mcgachey/edx-platform,ahmadio/edx-platform,raccoongang/edx-platform,ampax/edx-platform-backup,devs1991/test_edx_docmode,pabloborrego93/edx-platform,chauhanhardik/populo,chauhanhardik/populo_2,UOMx/edx-platform,BehavioralInsightsTeam/edx-platform,B-MOOC/edx-platform,abdoosh00/edx-rtl-final,edx/edx-platform,franosincic/edx-platform,OmarIthawi/edx-platform,pomegranited/edx-platform,beacloudgenius/edx-platform,pomegranited/edx-platform,peterm-itr/edx-platform,alexthered/kienhoc-platform,xuxiao19910803/edx,unicri/edx-platform,hastexo/edx-platform,jbzdak/edx-platform,IndonesiaX/edx-platform,sameetb-cuelogic/edx-platform-test,utecuy/edx-platform,UXE/local-edx,ahmadio/edx-platform,xuxiao19910803/edx-platform,chudaol/edx-platform,deepsrijit1105/edx-platform,jbzdak/edx-platform,jjmiranda/edx-platform,nanolearning/edx-platform,IONISx/edx-platform,nikolas/edx-platform,RPI-OPENEDX/edx-platform,pepeportela/edx-platform,angelapper/edx-platform,valtech-mooc/edx-platform,vikas1885/test1,jjmiranda/edx-platform,ak2703/edx-platform,CredoReference/edx-platform,4eek/edx-platform,teltek/edx-platform,dcosentino/edx-platform,xingyepei/edx-platform,UXE/local-edx,ahmadiga/min_edx,simbs/edx-platform,motion2015/a3,defance/edx-platform,kursitet/edx-platform,naresh21/synergetics-edx-platform,zerobatu/edx-platform,mjg2203/edx-platform-seas,dcosentino/edx-platform,itsjeyd/edx-platform,martynovp/edx-platform,mjirayu/sit_academy,Edraak/circleci-edx-platform,doganov/edx-platform,valtech-mooc/edx-platform,unicri/edx-platform,ampax/edx-platform,EDUlib/edx-platform,dkarakats/edx-platform,arbrandes/edx-platform,carsongee/edx-platform,xingyepei/edx-platform,pomegranited/edx-platform,JioEducation/edx-platform,jbzdak/edx-platform,zhenzhai/edx-platform,Semi-global/edx-platform,kamalx/edx-platform,hkawasaki/kawasaki-aio8-1,valtech-mooc/edx-platform,lduarte1991/edx-platform,Unow/edx-platform,Softmotions/edx-platform,mahendra-r/edx-platform,nagyistoce/edx-platform,unicri/edx-platform,atsolakid/edx-platform,10clouds/edx-platform,apigee/edx-platform,jswope00/GAI,Endika/edx-platform,ak2703/edx-platform,marcore/edx-platform,jazkarta/edx-platform,IndonesiaX/edx-platform,shubhdev/edx-platform,torchingloom/edx-platform,Ayub-Khan/edx-platform,TsinghuaX/edx-platform,jswope00/griffinx,Stanford-Online/edx-platform,waheedahmed/edx-platform,cyanna/edx-platform,nttks/jenkins-test,MSOpenTech/edx-platform,adoosii/edx-platform,edx/edx-platform,alexthered/kienhoc-platform,TsinghuaX/edx-platform,ahmadiga/min_edx,solashirai/edx-platform,adoosii/edx-platform,jazkarta/edx-platform-for-isc,halvertoluke/edx-platform,10clouds/edx-platform,polimediaupv/edx-platform,appliedx/edx-platform,Shrhawk/edx-platform,synergeticsedx/deployment-wipro,kursitet/edx-platform,ovnicraft/edx-platform,gsehub/edx-platform,EDUlib/edx-platform,mjg2203/edx-platform-seas,playm2mboy/edx-platform,apigee/edx-platform,olexiim/edx-platform,JioEducation/edx-platform,Kalyzee/edx-platform,ferabra/edx-platform,knehez/edx-platform,mjirayu/sit_academy,solashirai/edx-platform,hamzehd/edx-platform,eduNEXT/edunext-platform,nttks/jenkins-test,eduNEXT/edx-platform,jamesblunt/edx-platform,vikas1885/test1,nikolas/edx-platform,motion2015/a3,lduarte1991/edx-platform,antoviaque/edx-platform,abdoosh00/edraak,LICEF/edx-platform,jamiefolsom/edx-platform,kmoocdev/edx-platform,jelugbo/tundex,caesar2164/edx-platform,msegado/edx-platform,shubhdev/edxOnBaadal,edry/edx-platform,shubhdev/edx-platform,JCBarahona/edX,pabloborrego93/edx-platform,motion2015/a3,marcore/edx-platform,mushtaqak/edx-platform,Stanford-Online/edx-platform,eemirtekin/edx-platform,romain-li/edx-platform,zerobatu/edx-platform,DNFcode/edx-platform,appliedx/edx-platform,dsajkl/reqiop,olexiim/edx-platform,atsolakid/edx-platform,jzoldak/edx-platform,simbs/edx-platform,vikas1885/test1,jswope00/griffinx,Livit/Livit.Learn.EdX,simbs/edx-platform,philanthropy-u/edx-platform,ESOedX/edx-platform,mtlchun/edx,auferack08/edx-platform,beni55/edx-platform,ESOedX/edx-platform,jazztpt/edx-platform,hkawasaki/kawasaki-aio8-2,msegado/edx-platform,defance/edx-platform,jbassen/edx-platform,teltek/edx-platform,apigee/edx-platform,vikas1885/test1,shabab12/edx-platform,edx/edx-platform,msegado/edx-platform,adoosii/edx-platform,mitocw/edx-platform,pku9104038/edx-platform,louyihua/edx-platform,ampax/edx-platform,abdoosh00/edraak,unicri/edx-platform,msegado/edx-platform,beacloudgenius/edx-platform,leansoft/edx-platform,cecep-edu/edx-platform,Edraak/circleci-edx-platform,appliedx/edx-platform,MSOpenTech/edx-platform,rue89-tech/edx-platform,vasyarv/edx-platform,WatanabeYasumasa/edx-platform,TsinghuaX/edx-platform,edx-solutions/edx-platform,LICEF/edx-platform,J861449197/edx-platform,y12uc231/edx-platform,IONISx/edx-platform,vasyarv/edx-platform,y12uc231/edx-platform,Stanford-Online/edx-platform,shubhdev/openedx,leansoft/edx-platform,nagyistoce/edx-platform,ak2703/edx-platform,louyihua/edx-platform,CredoReference/edx-platform,morenopc/edx-platform,ZLLab-Mooc/edx-platform,ahmadiga/min_edx,ferabra/edx-platform,chudaol/edx-platform,waheedahmed/edx-platform,jamesblunt/edx-platform,jazztpt/edx-platform,CredoReference/edx-platform,pepeportela/edx-platform,pku9104038/edx-platform,polimediaupv/edx-platform,proversity-org/edx-platform,Endika/edx-platform,Edraak/circleci-edx-platform,mahendra-r/edx-platform,etzhou/edx-platform,SravanthiSinha/edx-platform,etzhou/edx-platform,lduarte1991/edx-platform,leansoft/edx-platform,amir-qayyum-khan/edx-platform,shubhdev/openedx,xinjiguaike/edx-platform,cognitiveclass/edx-platform,cpennington/edx-platform,don-github/edx-platform,shubhdev/edxOnBaadal,jruiperezv/ANALYSE,playm2mboy/edx-platform,xinjiguaike/edx-platform,auferack08/edx-platform,torchingloom/edx-platform,IONISx/edx-platform,inares/edx-platform,playm2mboy/edx-platform,cpennington/edx-platform,mcgachey/edx-platform | 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 trouble saving values on Sauce
@skip_safari
Scenario: User can modify Video display name
Given I have created a Video component
And I edit the component
Then I can modify the display name
And my video display name change is persisted on save
# Sauce Labs cannot delete cookies
@skip_sauce
Scenario: Captions are hidden when "show captions" is false
Given I have created a Video component with subtitles
And I have set "show captions" to False
Then when I view the video it does not show the captions
# Sauce Labs cannot delete cookies
@skip_sauce
Scenario: Captions are shown when "show captions" is true
Given I have created a Video component with subtitles
And I have set "show captions" to True
Then when I view the video it does show the captions
## Instruction:
Disable non-deterministic video caption test to get stability on master
## Code After:
@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 values on Sauce
@skip_safari
Scenario: User can modify Video display name
Given I have created a Video component
And I edit the component
Then I can modify the display name
And my video display name change is persisted on save
# Disabling this 10/7/13 due to nondeterministic behavior
# in master. The failure seems to occur when YouTube does
# not respond quickly enough, so that the video player
# doesn't load.
#
# Sauce Labs cannot delete cookies
# @skip_sauce
#Scenario: Captions are hidden when "show captions" is false
# Given I have created a Video component with subtitles
# And I have set "show captions" to False
# Then when I view the video it does not show the captions
# Sauce Labs cannot delete cookies
@skip_sauce
Scenario: Captions are shown when "show captions" is true
Given I have created a Video component with subtitles
And I have set "show captions" to True
Then when I view the video it does show the captions
|
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.__version__), StrictVersion("1.2.1"))
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])
| 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[0:70])
## Instruction:
Add xgboost version regression test.
BUG=175051617
## Code After:
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.__version__), StrictVersion("1.2.1"))
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])
|
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-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE
//
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary" "--cuda" "-64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le--linux-gnu"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ld" {{.*}}"-m" "elf64lppc"
| // 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: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE
//
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary" "--cuda" "-64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le--linux-gnu"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ld" {{.*}}"-m" "elf64lppc"
| 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-clang,llvm-mirror/clang,apple/swift-clang | 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: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE
//
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary" "--cuda" "-64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le--linux-gnu"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ld" {{.*}}"-m" "elf64lppc"
## Instruction:
Add missing '-no-canonical-prefixes' in test.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@277141 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
// 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: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE
//
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary" "--cuda" "-64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le--linux-gnu"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ld" {{.*}}"-m" "elf64lppc"
|
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)
}
try {
localStorage.setItem('state', JSON.stringify(state))
} catch (error) {
}
}
| 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
}
return undefined
} catch (error) {
return undefined
}
}
export const saveState = (state) => {
if (!state) {
localStorage.setItem('state', undefined)
}
try {
state.version = cacheBreakerVersion
localStorage.setItem('state', JSON.stringify(state))
} catch (error) {
}
}
| 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', undefined)
}
try {
localStorage.setItem('state', JSON.stringify(state))
} catch (error) {
}
}
## Instruction:
:sparkles: Add cache breaker localstorage data
## Code After:
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
}
return undefined
} catch (error) {
return undefined
}
}
export const saveState = (state) => {
if (!state) {
localStorage.setItem('state', undefined)
}
try {
state.version = cacheBreakerVersion
localStorage.setItem('state', JSON.stringify(state))
} catch (error) {
}
}
|
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 After:
jobs:
- job: copr_build
trigger: pull_request
metadata:
targets:
- epel-8-x86_64
- fedora-all
|
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.AlterModelOptions(
name='book',
options={'ordering': ['title']},
),
migrations.AddField(
model_name='book',
name='digital_edition',
field=models.ForeignKey(blank=True, null=True, default=None, help_text='Digitized edition of this book, if available', on_delete=django.db.models.deletion.CASCADE, to='djiffy.Manifest'),
preserve_default=False,
),
]
| 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(
name='book',
options={'ordering': ['title']},
),
migrations.AddField(
model_name='book',
name='digital_edition',
field=models.ForeignKey(blank=True, help_text='Digitized edition of this book, if available', null=True, on_delete=django.db.models.deletion.CASCADE, to='djiffy.Manifest'),
),
]
| 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 = [
migrations.AlterModelOptions(
name='book',
options={'ordering': ['title']},
),
migrations.AddField(
model_name='book',
name='digital_edition',
field=models.ForeignKey(blank=True, null=True, default=None, help_text='Digitized edition of this book, if available', on_delete=django.db.models.deletion.CASCADE, to='djiffy.Manifest'),
preserve_default=False,
),
]
## Instruction:
Fix migration so it works with actual existing djiffy migrations
## Code After:
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(
name='book',
options={'ordering': ['title']},
),
migrations.AddField(
model_name='book',
name='digital_edition',
field=models.ForeignKey(blank=True, help_text='Digitized edition of this book, if available', null=True, on_delete=django.db.models.deletion.CASCADE, to='djiffy.Manifest'),
),
]
|
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 AbstractArezIntegrationTest
{
@Test
public void arezManagedArezId()
{
final Model1 model = new IdentifiableIntegrationTest_Arez_Model1();
assertFalse( model instanceof Identifiable );
}
@Test
public void componentManagedArezId()
{
final Model2 model = new IdentifiableIntegrationTest_Arez_Model2( 33 );
assertTrue( model instanceof Identifiable );
assertEquals( Identifiable.getArezId( model ), (Integer) 33 );
assertEquals( Identifiable.asIdentifiable( model ), model );
}
@ArezComponent( allowEmpty = true )
static abstract class Model1
{
}
@ArezComponent( allowEmpty = true )
static abstract class Model2
{
private final int id;
Model2( final int id )
{
this.id = id;
}
@ComponentId
int getId()
{
return id;
}
}
}
| 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 IdentifiableIntegrationTest
extends AbstractArezIntegrationTest
{
@Test
public void requireId_DISABLE()
{
final Model1 model = new IdentifiableIntegrationTest_Arez_Model1();
assertFalse( model instanceof Identifiable );
}
@Test
public void requireId_ENABLE()
{
final Model2 model = new IdentifiableIntegrationTest_Arez_Model2( 33 );
assertTrue( model instanceof Identifiable );
assertEquals( Identifiable.getArezId( model ), (Integer) 33 );
assertEquals( Identifiable.asIdentifiable( model ), model );
}
@Test
public void requireId_DEFAULT()
{
final Model3 model = new IdentifiableIntegrationTest_Arez_Model3();
assertTrue( model instanceof Identifiable );
assertEquals( Identifiable.getArezId( model ), (Integer) 1 );
assertEquals( Identifiable.asIdentifiable( model ), model );
}
@ArezComponent( allowEmpty = true, requireId = Feature.DISABLE )
static abstract class Model1
{
}
@ArezComponent( allowEmpty = true, requireId = Feature.ENABLE )
static abstract class Model2
{
private final int id;
Model2( final int id )
{
this.id = id;
}
@ComponentId
int getId()
{
return id;
}
}
@ArezComponent( allowEmpty = true, requireId = Feature.AUTODETECT )
static abstract class Model3
{
}
}
| 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
extends AbstractArezIntegrationTest
{
@Test
public void arezManagedArezId()
{
final Model1 model = new IdentifiableIntegrationTest_Arez_Model1();
assertFalse( model instanceof Identifiable );
}
@Test
public void componentManagedArezId()
{
final Model2 model = new IdentifiableIntegrationTest_Arez_Model2( 33 );
assertTrue( model instanceof Identifiable );
assertEquals( Identifiable.getArezId( model ), (Integer) 33 );
assertEquals( Identifiable.asIdentifiable( model ), model );
}
@ArezComponent( allowEmpty = true )
static abstract class Model1
{
}
@ArezComponent( allowEmpty = true )
static abstract class Model2
{
private final int id;
Model2( final int id )
{
this.id = id;
}
@ComponentId
int getId()
{
return id;
}
}
}
## Instruction:
Fix test to reflect current defaults
## Code After:
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 IdentifiableIntegrationTest
extends AbstractArezIntegrationTest
{
@Test
public void requireId_DISABLE()
{
final Model1 model = new IdentifiableIntegrationTest_Arez_Model1();
assertFalse( model instanceof Identifiable );
}
@Test
public void requireId_ENABLE()
{
final Model2 model = new IdentifiableIntegrationTest_Arez_Model2( 33 );
assertTrue( model instanceof Identifiable );
assertEquals( Identifiable.getArezId( model ), (Integer) 33 );
assertEquals( Identifiable.asIdentifiable( model ), model );
}
@Test
public void requireId_DEFAULT()
{
final Model3 model = new IdentifiableIntegrationTest_Arez_Model3();
assertTrue( model instanceof Identifiable );
assertEquals( Identifiable.getArezId( model ), (Integer) 1 );
assertEquals( Identifiable.asIdentifiable( model ), model );
}
@ArezComponent( allowEmpty = true, requireId = Feature.DISABLE )
static abstract class Model1
{
}
@ArezComponent( allowEmpty = true, requireId = Feature.ENABLE )
static abstract class Model2
{
private final int id;
Model2( final int id )
{
this.id = id;
}
@ComponentId
int getId()
{
return id;
}
}
@ArezComponent( allowEmpty = true, requireId = Feature.AUTODETECT )
static abstract class Model3
{
}
}
|
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(),
bytes: conversion::hex_string_to_bytes(hash)
}
}
pub fn from_bytes(bytes: &[u8]) -> ObjectId {
ObjectId {
hash: conversion::bytes_to_hex_string(bytes),
bytes: bytes.into_vec()
}
}
}
| 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 version
## Code After:
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(),
bytes: conversion::hex_string_to_bytes(hash)
}
}
pub fn from_bytes(bytes: &[u8]) -> ObjectId {
ObjectId {
hash: conversion::bytes_to_hex_string(bytes),
bytes: bytes.into_vec()
}
}
}
|
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:
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'
|
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/issues/1001
"""
g1 = Graph()
q_str = ("""
PREFIX : <urn:ns1:>
CONSTRUCT {
?uri :prop1 ?val1;
:prop2 ?c .
}
WHERE {
bind(uri(concat("urn:ns1:", ?a)) as ?uri)
bind(?b as ?val1)
}
""")
q_prepared = prepareQuery(q_str)
expected = [
(URIRef('urn:ns1:A'),URIRef('urn:ns1:prop1'), Literal('B')),
(URIRef('urn:ns1:A'),URIRef('urn:ns1:prop2'), Literal('C'))
]
results = g1.query(q_prepared, initBindings={
'a': Literal('A'),
'b': Literal('B'),
'c': Literal('C')
})
self.assertCountEqual(list(results), expected)
| 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://github.com/RDFLib/rdflib/issues/1001
"""
g1 = Graph()
q_str = ("""
PREFIX : <urn:ns1:>
CONSTRUCT {
?uri :prop1 ?val1;
:prop2 ?c .
}
WHERE {
bind(uri(concat("urn:ns1:", ?a)) as ?uri)
bind(?b as ?val1)
}
""")
q_prepared = prepareQuery(q_str)
expected = [
(URIRef('urn:ns1:A'),URIRef('urn:ns1:prop1'), Literal('B')),
(URIRef('urn:ns1:A'),URIRef('urn:ns1:prop2'), Literal('C'))
]
results = g1.query(q_prepared, initBindings={
'a': Literal('A'),
'b': Literal('B'),
'c': Literal('C')
})
eq_(sorted(results, key=lambda x: str(x[1])), expected)
| 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/RDFLib/rdflib/issues/1001
"""
g1 = Graph()
q_str = ("""
PREFIX : <urn:ns1:>
CONSTRUCT {
?uri :prop1 ?val1;
:prop2 ?c .
}
WHERE {
bind(uri(concat("urn:ns1:", ?a)) as ?uri)
bind(?b as ?val1)
}
""")
q_prepared = prepareQuery(q_str)
expected = [
(URIRef('urn:ns1:A'),URIRef('urn:ns1:prop1'), Literal('B')),
(URIRef('urn:ns1:A'),URIRef('urn:ns1:prop2'), Literal('C'))
]
results = g1.query(q_prepared, initBindings={
'a': Literal('A'),
'b': Literal('B'),
'c': Literal('C')
})
self.assertCountEqual(list(results), expected)
## Instruction:
Fix unit tests for python2
## Code After:
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://github.com/RDFLib/rdflib/issues/1001
"""
g1 = Graph()
q_str = ("""
PREFIX : <urn:ns1:>
CONSTRUCT {
?uri :prop1 ?val1;
:prop2 ?c .
}
WHERE {
bind(uri(concat("urn:ns1:", ?a)) as ?uri)
bind(?b as ?val1)
}
""")
q_prepared = prepareQuery(q_str)
expected = [
(URIRef('urn:ns1:A'),URIRef('urn:ns1:prop1'), Literal('B')),
(URIRef('urn:ns1:A'),URIRef('urn:ns1:prop2'), Literal('C'))
]
results = g1.query(q_prepared, initBindings={
'a': Literal('A'),
'b': Literal('B'),
'c': Literal('C')
})
eq_(sorted(results, key=lambda x: str(x[1])), expected)
|
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'])}</div>
</div>
<div class="upstream-block">
<h3>Upstream Summary</h3>
<div class="homepage-block">
<h4>Project Homepage</h4>
<%
homepage = w.package_info.get('upstream_url', 'Unknown')
%>
<a href="${homepage}">${homepage}</a>
</div>
</div>
</div>
| <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'])}</div>
</div>
<%
homepage = w.package_info.get('upstream_url', 'Unknown')
%>
% if homepage:
<div class="upstream-block">
<h3>Upstream Summary</h3>
<div class="homepage-block">
<h4>Project Homepage</h4>
<a href="${homepage}">${homepage}</a>
</div>
</div>
% endif
</div>
| 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_info['name'])}</div>
</div>
<div class="upstream-block">
<h3>Upstream Summary</h3>
<div class="homepage-block">
<h4>Project Homepage</h4>
<%
homepage = w.package_info.get('upstream_url', 'Unknown')
%>
<a href="${homepage}">${homepage}</a>
</div>
</div>
</div>
## Instruction:
Work with packages that don't have a URL in their spec (like autofs).
## Code After:
<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'])}</div>
</div>
<%
homepage = w.package_info.get('upstream_url', 'Unknown')
%>
% if homepage:
<div class="upstream-block">
<h3>Upstream Summary</h3>
<div class="homepage-block">
<h4>Project Homepage</h4>
<a href="${homepage}">${homepage}</a>
</div>
</div>
% endif
</div>
|
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/alexcristea/brick-validator |
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/alexcristea/brick-validator
[carthage-compatible]: https://img.shields.io/badge/carthage-compatible-4BC51D.svg?style=flat
[carthage-overview]: https://github.com/Carthage/Carthage | 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://travis-ci.org/alexcristea/brick-validator
## Instruction:
Update readme info with Carthage support
## Code After:
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/alexcristea/brick-validator
[carthage-compatible]: https://img.shields.io/badge/carthage-compatible-4BC51D.svg?style=flat
[carthage-overview]: https://github.com/Carthage/Carthage |
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) {
throw err;
}
}
function Hub() {
AsyncEmitter.call(this);
Filter.call(this, { reverse : true });
}
inherits(Hub, AsyncEmitter);
Object.keys(Filter.prototype).forEach(function (key) {
if (key !== 'emit') {
Hub.prototype[key] = Filter.prototype[key];
}
});
var emit = Filter.prototype.emit;
var invoke = AsyncEmitter.prototype.invoke;
Hub.prototype.invoke = function (iterator, scope, callback) {
emit.call(this, scope, function (cb) {
invoke.call(this, iterator, scope, cb);
}, callback || defaultCallback);
};
Hub.prototype.removeAll = function (event) {
this.removeAllFilters(event);
this.removeAllListeners(event);
};
exports.Hub = Hub;
| /*
* 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) {
throw err;
}
}
function Hub() {
AsyncEmitter.call(this);
Filter.call(this, { reverse : true });
}
inherits(Hub, AsyncEmitter);
Object.keys(Filter.prototype).forEach(function (key) {
if (key !== 'emit') {
Hub.prototype[key] = Filter.prototype[key];
}
});
var filter = Filter.prototype.emit;
var invoke = AsyncEmitter.prototype.invoke;
Hub.prototype.invoke = function (iterator, scope, callback) {
filter.call(this, scope, function (cb) {
invoke.call(this, iterator, scope, cb);
}, callback || defaultCallback);
};
Hub.prototype.removeAll = function (event) {
this.removeAllFilters(event);
this.removeAllListeners(event);
};
exports.Hub = Hub;
| 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) {
if (err) {
throw err;
}
}
function Hub() {
AsyncEmitter.call(this);
Filter.call(this, { reverse : true });
}
inherits(Hub, AsyncEmitter);
Object.keys(Filter.prototype).forEach(function (key) {
if (key !== 'emit') {
Hub.prototype[key] = Filter.prototype[key];
}
});
var emit = Filter.prototype.emit;
var invoke = AsyncEmitter.prototype.invoke;
Hub.prototype.invoke = function (iterator, scope, callback) {
emit.call(this, scope, function (cb) {
invoke.call(this, iterator, scope, cb);
}, callback || defaultCallback);
};
Hub.prototype.removeAll = function (event) {
this.removeAllFilters(event);
this.removeAllListeners(event);
};
exports.Hub = Hub;
## Instruction:
Rename local variable `emit` to `filter`
## Code After:
/*
* 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) {
throw err;
}
}
function Hub() {
AsyncEmitter.call(this);
Filter.call(this, { reverse : true });
}
inherits(Hub, AsyncEmitter);
Object.keys(Filter.prototype).forEach(function (key) {
if (key !== 'emit') {
Hub.prototype[key] = Filter.prototype[key];
}
});
var filter = Filter.prototype.emit;
var invoke = AsyncEmitter.prototype.invoke;
Hub.prototype.invoke = function (iterator, scope, callback) {
filter.call(this, scope, function (cb) {
invoke.call(this, iterator, scope, cb);
}, callback || defaultCallback);
};
Hub.prototype.removeAll = function (event) {
this.removeAllFilters(event);
this.removeAllListeners(event);
};
exports.Hub = Hub;
|
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 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.
|
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/Events/San-Diego-2018/Home.aspx",
"startDate": "2018-10-07",
"endDate": "2018-10-11",
"city": "San Diego, CA",
"country": "U.S.A.",
"twitter": "@vslive"
}
]
| [
{
"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://vslive.com/Events/San-Diego-2018/Home.aspx",
"startDate": "2018-10-07",
"endDate": "2018-10-11",
"city": "San Diego, CA",
"country": "U.S.A.",
"twitter": "@vslive"
},
{
"name": "Visual Studio Live! Chicago",
"url": "https://vslive.com/events/chicago-2018/home.aspx",
"startDate": "2018-09-17",
"endDate": "2018-09-20",
"city": "Chicago, IL",
"country": "U.S.A.",
"twitter": "@vslive"
}
]
| 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://vslive.com/Events/San-Diego-2018/Home.aspx",
"startDate": "2018-10-07",
"endDate": "2018-10-11",
"city": "San Diego, CA",
"country": "U.S.A.",
"twitter": "@vslive"
}
]
## Instruction:
Add Visual Studio Live! Chicago
## Code After:
[
{
"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://vslive.com/Events/San-Diego-2018/Home.aspx",
"startDate": "2018-10-07",
"endDate": "2018-10-11",
"city": "San Diego, CA",
"country": "U.S.A.",
"twitter": "@vslive"
},
{
"name": "Visual Studio Live! Chicago",
"url": "https://vslive.com/events/chicago-2018/home.aspx",
"startDate": "2018-09-17",
"endDate": "2018-09-20",
"city": "Chicago, IL",
"country": "U.S.A.",
"twitter": "@vslive"
}
]
|
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 0x25
# CHECK-BE: dci 14
0x7d 0xc0 0x03 0x8c
# CHECK-BE: ici 14
0x7d 0xc0 0x07 0x8c
| 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 0x25
# CHECK: dccci 5, 6
0x7c 0x05 0x33 0x8c
# CHECK: iccci 5, 6
0x7c 0x05 0x37 0x8c
| 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/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap | 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
0x7c 0x43 0x0f 0x25
# CHECK-BE: dci 14
0x7d 0xc0 0x03 0x8c
# CHECK-BE: ici 14
0x7d 0xc0 0x07 0x8c
## Instruction:
Update disassembler test to check the full dccci/iccci form.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@215283 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
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 0x25
# CHECK: dccci 5, 6
0x7c 0x05 0x33 0x8c
# CHECK: iccci 5, 6
0x7c 0x05 0x37 0x8c
|
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) && Ember.lookup[key]) {
return [getGlobal(key)];
} else if (scope.locals[key]) {
return [scope.locals[key]];
} else {
return [getKey(scope, key)];
}
}
function getKey(scope, key) {
if (key === 'attrs' && scope.attrs) {
return scope.attrs;
}
var self = scope.self || scope.locals.view;
if (scope.attrs && key in scope.attrs) {
Ember.deprecate("You accessed the `" + key + "` attribute directly. Please use `attrs." + key + "` instead.");
return scope.attrs[key];
} else if (self) {
return self.getKey(key);
}
}
var globalStreams = {};
function getGlobal(name) {
Ember.deprecate("Global lookup of " + name + " from a Handlebars template is deprecated")
var globalStream = globalStreams[name];
if (globalStream === undefined) {
var global = Ember.lookup[name];
globalStream = new SimpleStream(global, name);
globalStreams[name] = globalStream;
}
return globalStream;
}
| /**
@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) && Ember.lookup[key]) {
return [getGlobal(key)];
} else if (scope.locals[key]) {
return [scope.locals[key]];
} else {
return [getKey(scope, key)];
}
}
function getKey(scope, key) {
if (key === 'attrs' && scope.attrs) {
return scope.attrs;
}
var self = scope.self || scope.locals.view;
if (scope.attrs && key in scope.attrs) {
Ember.deprecate("You accessed the `" + key + "` attribute directly. Please use `attrs." + key + "` instead.");
return scope.attrs[key];
} else if (self) {
return self.getKey(key);
}
}
function getGlobal(name) {
Ember.deprecate("Global lookup of " + name + " from a Handlebars template is deprecated")
// This stream should be memoized, but this path is deprecated and
// will be removed soon so it's not worth the trouble.
return new SimpleStream(Ember.lookup[name], name);
}
| 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 upgrade path.
| 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.js,knownasilya/ember.js,martndemus/ember.js,martndemus/ember.js,cyjia/ember.js,max-konin/ember.js,rodrigo-morais/ember.js,visualjeff/ember.js,lan0/ember.js,njagadeesh/ember.js,VictorChaun/ember.js,simudream/ember.js,amk221/ember.js,cowboyd/ember.js,howmuchcomputer/ember.js,howmuchcomputer/ember.js,williamsbdev/ember.js,tianxiangbing/ember.js,ubuntuvim/ember.js,Leooo/ember.js,Zagorakiss/ember.js,anilmaurya/ember.js,ridixcr/ember.js,Leooo/ember.js,swarmbox/ember.js,amk221/ember.js,seanpdoyle/ember.js,tildeio/ember.js,thoov/ember.js,green-arrow/ember.js,cyjia/ember.js,sandstrom/ember.js,HeroicEric/ember.js,amk221/ember.js,kennethdavidbuck/ember.js,twokul/ember.js,TriumphantAkash/ember.js,BrianSipple/ember.js,olivierchatry/ember.js,jasonmit/ember.js,yaymukund/ember.js,asakusuma/ember.js,kidaa/ember.js,claimsmall/ember.js,mdehoog/ember.js,Vassi/ember.js,nicklv/ember.js,max-konin/ember.js,sivakumar-kailasam/ember.js,twokul/ember.js,tofanelli/ember.js,Turbo87/ember.js,toddjordan/ember.js,mfeckie/ember.js,Patsy-issa/ember.js,artfuldodger/ember.js,topaxi/ember.js,pangratz/ember.js,tiegz/ember.js,Serabe/ember.js,tricknotes/ember.js,elwayman02/ember.js,nathanhammond/ember.js,mike-north/ember.js,pangratz/ember.js,kaeufl/ember.js,rlugojr/ember.js,HipsterBrown/ember.js,danielgynn/ember.js,delftswa2016/ember.js,HeroicEric/ember.js,runspired/ember.js,szines/ember.js,kidaa/ember.js,jcope2013/ember.js,artfuldodger/ember.js,yuhualingfeng/ember.js,skeate/ember.js,code0100fun/ember.js,udhayam/ember.js,ThiagoGarciaAlves/ember.js,workmanw/ember.js,loadimpact/ember.js,raytiley/ember.js,rodrigo-morais/ember.js,jaswilli/ember.js,kellyselden/ember.js,visualjeff/ember.js,antigremlin/ember.js,xcskier56/ember.js,szines/ember.js,artfuldodger/ember.js,cowboyd/ember.js,jamesarosen/ember.js,bmac/ember.js,skeate/ember.js,mitchlloyd/ember.js,ef4/ember.js,thoov/ember.js,stefanpenner/ember.js,rlugojr/ember.js,pixelhandler/ember.js,yonjah/ember.js,GavinJoyce/ember.js,adatapost/ember.js,chadhietala/ember.js,jaswilli/ember.js,Gaurav0/ember.js,alexdiliberto/ember.js,jaswilli/ember.js,koriroys/ember.js,gfvcastro/ember.js,blimmer/ember.js,cgvarela/ember.js,lazybensch/ember.js,topaxi/ember.js,delftswa2016/ember.js,koriroys/ember.js,seanjohnson08/ember.js,mitchlloyd/ember.js,joeruello/ember.js,rodrigo-morais/ember.js,practicefusion/ember.js,qaiken/ember.js,cjc343/ember.js,HeroicEric/ember.js,seanjohnson08/ember.js,cbou/ember.js,ubuntuvim/ember.js,duggiefresh/ember.js,sandstrom/ember.js,vikram7/ember.js,swarmbox/ember.js,quaertym/ember.js,mfeckie/ember.js,twokul/ember.js,nickiaconis/ember.js,kennethdavidbuck/ember.js,swarmbox/ember.js,claimsmall/ember.js,marcioj/ember.js,benstoltz/ember.js,practicefusion/ember.js,tsing80/ember.js,cgvarela/ember.js,fxkr/ember.js,jerel/ember.js,csantero/ember.js,tricknotes/ember.js,jherdman/ember.js,ridixcr/ember.js,yaymukund/ember.js,cibernox/ember.js,cyberkoi/ember.js,soulcutter/ember.js,kmiyashiro/ember.js,wecc/ember.js,mdehoog/ember.js,NLincoln/ember.js,givanse/ember.js,Patsy-issa/ember.js,soulcutter/ember.js,mike-north/ember.js,patricksrobertson/ember.js,Kuzirashi/ember.js,GavinJoyce/ember.js,nickiaconis/ember.js,seanjohnson08/ember.js,marcioj/ember.js,elwayman02/ember.js,thejameskyle/ember.js,Kuzirashi/ember.js,trentmwillis/ember.js,JesseQin/ember.js,fouzelddin/ember.js,Gaurav0/ember.js,miguelcobain/ember.js,jamesarosen/ember.js,acburdine/ember.js,MatrixZ/ember.js,claimsmall/ember.js,ianstarz/ember.js,howmuchcomputer/ember.js,mixonic/ember.js,zenefits/ember.js,opichals/ember.js,cdl/ember.js,jcope2013/ember.js,runspired/ember.js,marijaselakovic/ember.js,Zagorakiss/ember.js,jish/ember.js,kanongil/ember.js,workmanw/ember.js,kaeufl/ember.js,tricknotes/ember.js,rwjblue/ember.js,lsthornt/ember.js,ryanlabouve/ember.js,davidpett/ember.js,mitchlloyd/ember.js,kublaj/ember.js,seanjohnson08/ember.js,Leooo/ember.js,lsthornt/ember.js,jamesarosen/ember.js,ThiagoGarciaAlves/ember.js,swarmbox/ember.js,alexdiliberto/ember.js,nruth/ember.js,kwight/ember.js,TriumphantAkash/ember.js,EricSchank/ember.js,elwayman02/ember.js,fxkr/ember.js,boztek/ember.js,KevinTCoughlin/ember.js,TriumphantAkash/ember.js,pixelhandler/ember.js,trentmwillis/ember.js,soulcutter/ember.js,code0100fun/ember.js,ryanlabouve/ember.js,nipunas/ember.js,kaeufl/ember.js,davidpett/ember.js,udhayam/ember.js,tofanelli/ember.js,HipsterBrown/ember.js,mallikarjunayaddala/ember.js,toddjordan/ember.js,szines/ember.js,sly7-7/ember.js,martndemus/ember.js,Trendy/ember.js,olivierchatry/ember.js,Gaurav0/ember.js,nathanhammond/ember.js,bmac/ember.js,cyjia/ember.js,adatapost/ember.js,xcskier56/ember.js,nightire/ember.js,MatrixZ/ember.js,jayphelps/ember.js,Turbo87/ember.js,lazybensch/ember.js,Kuzirashi/ember.js,simudream/ember.js,xtian/ember.js,GavinJoyce/ember.js,stefanpenner/ember.js,BrianSipple/ember.js,jackiewung/ember.js,Patsy-issa/ember.js,Turbo87/ember.js,max-konin/ember.js,jayphelps/ember.js,jayphelps/ember.js,femi-saliu/ember.js,artfuldodger/ember.js,xiujunma/ember.js,szines/ember.js,kigsmtua/ember.js,bmac/ember.js,Robdel12/ember.js,aihua/ember.js,nightire/ember.js,omurbilgili/ember.js,tiegz/ember.js,fouzelddin/ember.js,qaiken/ember.js,yuhualingfeng/ember.js,nruth/ember.js,femi-saliu/ember.js,karthiick/ember.js,trentmwillis/ember.js,miguelcobain/ember.js,nruth/ember.js,benstoltz/ember.js,olivierchatry/ember.js,sharma1nitish/ember.js,jplwood/ember.js,tsing80/ember.js,SaladFork/ember.js,schreiaj/ember.js,ryanlabouve/ember.js,jaswilli/ember.js,howmuchcomputer/ember.js,cowboyd/ember.js,bekzod/ember.js,udhayam/ember.js,VictorChaun/ember.js,Zagorakiss/ember.js,JKGisMe/ember.js,mrjavascript/ember.js,kwight/ember.js,rodrigo-morais/ember.js,Serabe/ember.js,kwight/ember.js,cesarizu/ember.js,toddjordan/ember.js,joeruello/ember.js,green-arrow/ember.js,seanpdoyle/ember.js,chadhietala/ember.js,claimsmall/ember.js,johnnyshields/ember.js,csantero/ember.js,fpauser/ember.js,Vassi/ember.js,kublaj/ember.js,thejameskyle/ember.js,seanpdoyle/ember.js,yonjah/ember.js,fpauser/ember.js,raytiley/ember.js,fpauser/ember.js,quaertym/ember.js,furkanayhan/ember.js,mixonic/ember.js,kmiyashiro/ember.js,workmanw/ember.js,fxkr/ember.js,Turbo87/ember.js,njagadeesh/ember.js,tsing80/ember.js,ThiagoGarciaAlves/ember.js,tofanelli/ember.js,johanneswuerbach/ember.js,intercom/ember.js,rot26/ember.js,howtolearntocode/ember.js,givanse/ember.js,Robdel12/ember.js,nathanhammond/ember.js,JKGisMe/ember.js,selvagsz/ember.js,johanneswuerbach/ember.js,code0100fun/ember.js,williamsbdev/ember.js,selvagsz/ember.js,kanongil/ember.js,cbou/ember.js,kigsmtua/ember.js,marijaselakovic/ember.js,blimmer/ember.js,qaiken/ember.js,yonjah/ember.js,cesarizu/ember.js,ef4/ember.js,nicklv/ember.js,xiujunma/ember.js,asakusuma/ember.js,omurbilgili/ember.js,faizaanshamsi/ember.js,kublaj/ember.js,joeruello/ember.js,amk221/ember.js,JesseQin/ember.js,tofanelli/ember.js,lan0/ember.js,xtian/ember.js,emberjs/ember.js,schreiaj/ember.js,karthiick/ember.js,xiujunma/ember.js,intercom/ember.js,xtian/ember.js,faizaanshamsi/ember.js,koriroys/ember.js,mixonic/ember.js,emberjs/ember.js,tianxiangbing/ember.js,chadhietala/ember.js,ubuntuvim/ember.js,jerel/ember.js,BrianSipple/ember.js,miguelcobain/ember.js,HipsterBrown/ember.js,pixelhandler/ember.js,bantic/ember.js,jish/ember.js,karthiick/ember.js,faizaanshamsi/ember.js,trentmwillis/ember.js,XrXr/ember.js,raytiley/ember.js,kigsmtua/ember.js,vikram7/ember.js,intercom/ember.js,tianxiangbing/ember.js,nickiaconis/ember.js,asakusuma/ember.js,xcskier56/ember.js,sharma1nitish/ember.js,antigremlin/ember.js,tianxiangbing/ember.js,karthiick/ember.js,rwjblue/ember.js,wecc/ember.js,kidaa/ember.js,rot26/ember.js,udhayam/ember.js,jackiewung/ember.js,tricknotes/ember.js,trek/ember.js,soulcutter/ember.js,sharma1nitish/ember.js,chadhietala/ember.js,sly7-7/ember.js,mdehoog/ember.js,mrjavascript/ember.js,fpauser/ember.js,quaertym/ember.js,acburdine/ember.js,lazybensch/ember.js,marcioj/ember.js,jerel/ember.js,howtolearntocode/ember.js,joeruello/ember.js,XrXr/ember.js,rot26/ember.js,vikram7/ember.js,miguelcobain/ember.js,xtian/ember.js,kidaa/ember.js,Vassi/ember.js,kellyselden/ember.js,Serabe/ember.js,loadimpact/ember.js,asakusuma/ember.js,KevinTCoughlin/ember.js,ridixcr/ember.js,aihua/ember.js,rlugojr/ember.js,adatapost/ember.js,visualjeff/ember.js,wecc/ember.js,toddjordan/ember.js,greyhwndz/ember.js,anilmaurya/ember.js,Eric-Guo/ember.js,furkanayhan/ember.js,mdehoog/ember.js,Kuzirashi/ember.js,topaxi/ember.js,jcope2013/ember.js,yuhualingfeng/ember.js,runspired/ember.js,mitchlloyd/ember.js,Trendy/ember.js,SaladFork/ember.js,xiujunma/ember.js,lsthornt/ember.js,adatapost/ember.js,lan0/ember.js,kublaj/ember.js,JKGisMe/ember.js,TriumphantAkash/ember.js,ianstarz/ember.js,practicefusion/ember.js,gfvcastro/ember.js,kellyselden/ember.js,trek/ember.js,danielgynn/ember.js,bekzod/ember.js,johanneswuerbach/ember.js,greyhwndz/ember.js,yaymukund/ember.js,eliotsykes/ember.js,simudream/ember.js,VictorChaun/ember.js,Serabe/ember.js,howtolearntocode/ember.js,omurbilgili/ember.js,rfsv/ember.js,patricksrobertson/ember.js,ianstarz/ember.js,twokul/ember.js,jasonmit/ember.js,jasonmit/ember.js,opichals/ember.js,rubenrp81/ember.js,rlugojr/ember.js,sivakumar-kailasam/ember.js,lan0/ember.js,rubenrp81/ember.js,marijaselakovic/ember.js,fouzelddin/ember.js,ef4/ember.js,mallikarjunayaddala/ember.js,KevinTCoughlin/ember.js,sivakumar-kailasam/ember.js,XrXr/ember.js,jplwood/ember.js,EricSchank/ember.js,njagadeesh/ember.js,sivakumar-kailasam/ember.js,green-arrow/ember.js,kennethdavidbuck/ember.js,jish/ember.js,boztek/ember.js,knownasilya/ember.js,skeate/ember.js,duggiefresh/ember.js,zenefits/ember.js,intercom/ember.js,sivakumar-kailasam/ember.js,Robdel12/ember.js,Krasnyanskiy/ember.js,zenefits/ember.js,cesarizu/ember.js,marcioj/ember.js,ridixcr/ember.js,thejameskyle/ember.js,rwjblue/ember.js,blimmer/ember.js,olivierchatry/ember.js,givanse/ember.js,cjc343/ember.js,jplwood/ember.js,HeroicEric/ember.js,anilmaurya/ember.js,martndemus/ember.js,Eric-Guo/ember.js,vikram7/ember.js,alexdiliberto/ember.js,seanpdoyle/ember.js,nightire/ember.js,acburdine/ember.js,code0100fun/ember.js,aihua/ember.js,nipunas/ember.js,MatrixZ/ember.js,gfvcastro/ember.js,jerel/ember.js,acburdine/ember.js,HipsterBrown/ember.js,loadimpact/ember.js,knownasilya/ember.js,Patsy-issa/ember.js,EricSchank/ember.js,qaiken/ember.js,greyhwndz/ember.js,davidpett/ember.js,mfeckie/ember.js,johnnyshields/ember.js,marijaselakovic/ember.js,bantic/ember.js,duggiefresh/ember.js,cjc343/ember.js,Krasnyanskiy/ember.js,nipunas/ember.js,ryanlabouve/ember.js,delftswa2016/ember.js,elwayman02/ember.js,rubenrp81/ember.js,schreiaj/ember.js,kanongil/ember.js,JesseQin/ember.js,loadimpact/ember.js,yonjah/ember.js,practicefusion/ember.js,eliotsykes/ember.js,nightire/ember.js,tsing80/ember.js,ThiagoGarciaAlves/ember.js,boztek/ember.js,koriroys/ember.js,JesseQin/ember.js,thejameskyle/ember.js,Gaurav0/ember.js,boztek/ember.js,cyberkoi/ember.js,EricSchank/ember.js,csantero/ember.js,williamsbdev/ember.js,Eric-Guo/ember.js,kaeufl/ember.js,benstoltz/ember.js,mike-north/ember.js,Trendy/ember.js,zenefits/ember.js,jackiewung/ember.js,femi-saliu/ember.js,eliotsykes/ember.js,williamsbdev/ember.js,sly7-7/ember.js,cdl/ember.js,rfsv/ember.js,cgvarela/ember.js,eliotsykes/ember.js,stefanpenner/ember.js,NLincoln/ember.js,njagadeesh/ember.js,bantic/ember.js,xcskier56/ember.js,BrianSipple/ember.js,danielgynn/ember.js,cdl/ember.js,johnnyshields/ember.js,nicklv/ember.js,cdl/ember.js,opichals/ember.js,mike-north/ember.js,davidpett/ember.js,howtolearntocode/ember.js,NLincoln/ember.js,alexdiliberto/ember.js,nruth/ember.js,nathanhammond/ember.js,tiegz/ember.js,mrjavascript/ember.js,jcope2013/ember.js,sharma1nitish/ember.js,SaladFork/ember.js,Eric-Guo/ember.js,cbou/ember.js,mfeckie/ember.js,johanneswuerbach/ember.js,selvagsz/ember.js,aihua/ember.js,mrjavascript/ember.js,MatrixZ/ember.js,wecc/ember.js,kigsmtua/ember.js,nickiaconis/ember.js,csantero/ember.js,JKGisMe/ember.js,mallikarjunayaddala/ember.js,kwight/ember.js,KevinTCoughlin/ember.js,VictorChaun/ember.js,emberjs/ember.js,bekzod/ember.js,Zagorakiss/ember.js,topaxi/ember.js,Leooo/ember.js,tildeio/ember.js,bekzod/ember.js,antigremlin/ember.js,rwjblue/ember.js,SaladFork/ember.js,max-konin/ember.js,rot26/ember.js,NLincoln/ember.js,anilmaurya/ember.js,sandstrom/ember.js,delftswa2016/ember.js,pangratz/ember.js,cibernox/ember.js,omurbilgili/ember.js,bantic/ember.js,yaymukund/ember.js,gfvcastro/ember.js,mallikarjunayaddala/ember.js,bmac/ember.js,kanongil/ember.js,fxkr/ember.js,ianstarz/ember.js,cibernox/ember.js,jherdman/ember.js,rubenrp81/ember.js,simudream/ember.js,quaertym/ember.js,furkanayhan/ember.js,blimmer/ember.js,opichals/ember.js,GavinJoyce/ember.js,jish/ember.js,cyberkoi/ember.js,cesarizu/ember.js,antigremlin/ember.js,selvagsz/ember.js,greyhwndz/ember.js,ef4/ember.js,jasonmit/ember.js,patricksrobertson/ember.js,cyjia/ember.js,benstoltz/ember.js,kellyselden/ember.js,lsthornt/ember.js,cibernox/ember.js,duggiefresh/ember.js,jackiewung/ember.js,cgvarela/ember.js,skeate/ember.js,jplwood/ember.js,Robdel12/ember.js,faizaanshamsi/ember.js,furkanayhan/ember.js,patricksrobertson/ember.js,cyberkoi/ember.js,rfsv/ember.js,Vassi/ember.js,visualjeff/ember.js,kmiyashiro/ember.js,givanse/ember.js,cowboyd/ember.js,Krasnyanskiy/ember.js,Krasnyanskiy/ember.js,jasonmit/ember.js,pangratz/ember.js,jherdman/ember.js,thoov/ember.js,danielgynn/ember.js,yuhualingfeng/ember.js,thoov/ember.js,cjc343/ember.js,cbou/ember.js,workmanw/ember.js,raytiley/ember.js,nicklv/ember.js,ubuntuvim/ember.js,kennethdavidbuck/ember.js,fouzelddin/ember.js,runspired/ember.js | 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 if (isGlobal(key) && Ember.lookup[key]) {
return [getGlobal(key)];
} else if (scope.locals[key]) {
return [scope.locals[key]];
} else {
return [getKey(scope, key)];
}
}
function getKey(scope, key) {
if (key === 'attrs' && scope.attrs) {
return scope.attrs;
}
var self = scope.self || scope.locals.view;
if (scope.attrs && key in scope.attrs) {
Ember.deprecate("You accessed the `" + key + "` attribute directly. Please use `attrs." + key + "` instead.");
return scope.attrs[key];
} else if (self) {
return self.getKey(key);
}
}
var globalStreams = {};
function getGlobal(name) {
Ember.deprecate("Global lookup of " + name + " from a Handlebars template is deprecated")
var globalStream = globalStreams[name];
if (globalStream === undefined) {
var global = Ember.lookup[name];
globalStream = new SimpleStream(global, name);
globalStreams[name] = globalStream;
}
return globalStream;
}
## Instruction:
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 upgrade path.
## Code After:
/**
@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) && Ember.lookup[key]) {
return [getGlobal(key)];
} else if (scope.locals[key]) {
return [scope.locals[key]];
} else {
return [getKey(scope, key)];
}
}
function getKey(scope, key) {
if (key === 'attrs' && scope.attrs) {
return scope.attrs;
}
var self = scope.self || scope.locals.view;
if (scope.attrs && key in scope.attrs) {
Ember.deprecate("You accessed the `" + key + "` attribute directly. Please use `attrs." + key + "` instead.");
return scope.attrs[key];
} else if (self) {
return self.getKey(key);
}
}
function getGlobal(name) {
Ember.deprecate("Global lookup of " + name + " from a Handlebars template is deprecated")
// This stream should be memoized, but this path is deprecated and
// will be removed soon so it's not worth the trouble.
return new SimpleStream(Ember.lookup[name], name);
}
|
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-my-zsh, if:"[[ $(uname) =~ ^Darwin ]]"
zplug "plugins/docker", from:oh-my-zsh
zplug "plugins/git", from:oh-my-zsh, if:"(( $+commands[git] ))", nice:10
zplug "plugins/git-extras", from:oh-my-zsh
zplug "plugins/tmuxinator", from:oh-my-zsh
zplug "plugins/vagrant", from:oh-my-zsh
zplug "zsh-users/zsh-history-substring-search"
zplug "lib/theme-and-appearance", from:oh-my-zsh
# zplug "$ZSH/zsh/custom/vonder.zsh-theme", from:local, nice:10
zplug "zsh-users/zsh-syntax-highlighting", nice:10
zplug check || zplug install
zplug load
if zplug check "creationix/nvm" && [[ $(nvm current) == "none" ]]; then
nvm install 4
nvm alias default 4
fi
| 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-my-zsh, if:"[[ $(uname) =~ ^Darwin ]]"
zplug "plugins/docker", from:oh-my-zsh
zplug "plugins/git", from:oh-my-zsh, if:"(( $+commands[git] ))", nice:10
zplug "plugins/git-extras", from:oh-my-zsh
zplug "plugins/tmuxinator", from:oh-my-zsh
zplug "plugins/vagrant", from:oh-my-zsh
zplug "zsh-users/zsh-history-substring-search"
zplug "lib/theme-and-appearance", from:oh-my-zsh
# zplug "$ZSH/zsh/custom/vonder.zsh-theme", from:local, nice:10
zplug "zsh-users/zsh-syntax-highlighting", nice:10
zplug check || zplug install
zplug load
if zplug check "creationix/nvm" && [[ $(nvm current) == "none" ]]; then
nvm install stable
nvm alias default stable
fi
| 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/brew", from:oh-my-zsh, if:"[[ $(uname) =~ ^Darwin ]]"
zplug "plugins/docker", from:oh-my-zsh
zplug "plugins/git", from:oh-my-zsh, if:"(( $+commands[git] ))", nice:10
zplug "plugins/git-extras", from:oh-my-zsh
zplug "plugins/tmuxinator", from:oh-my-zsh
zplug "plugins/vagrant", from:oh-my-zsh
zplug "zsh-users/zsh-history-substring-search"
zplug "lib/theme-and-appearance", from:oh-my-zsh
# zplug "$ZSH/zsh/custom/vonder.zsh-theme", from:local, nice:10
zplug "zsh-users/zsh-syntax-highlighting", nice:10
zplug check || zplug install
zplug load
if zplug check "creationix/nvm" && [[ $(nvm current) == "none" ]]; then
nvm install 4
nvm alias default 4
fi
## Instruction:
Change nvm version to stable.
## Code After:
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-my-zsh, if:"[[ $(uname) =~ ^Darwin ]]"
zplug "plugins/docker", from:oh-my-zsh
zplug "plugins/git", from:oh-my-zsh, if:"(( $+commands[git] ))", nice:10
zplug "plugins/git-extras", from:oh-my-zsh
zplug "plugins/tmuxinator", from:oh-my-zsh
zplug "plugins/vagrant", from:oh-my-zsh
zplug "zsh-users/zsh-history-substring-search"
zplug "lib/theme-and-appearance", from:oh-my-zsh
# zplug "$ZSH/zsh/custom/vonder.zsh-theme", from:local, nice:10
zplug "zsh-users/zsh-syntax-highlighting", nice:10
zplug check || zplug install
zplug load
if zplug check "creationix/nvm" && [[ $(nvm current) == "none" ]]; then
nvm install stable
nvm alias default stable
fi
|
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 audit iwyu
- brew install -v iwyu
- brew test iwyu
| 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 --config=$(brew --repo)/Library/.rubocop.yml iwyu.rb
- brew audit iwyu
- brew install -v iwyu
- brew test iwyu
| 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 iwyu.rb
- brew audit iwyu
- brew install -v iwyu
- brew test iwyu
## Instruction:
Add matrix build for multiple Xcode versions
Also turn off ri/rdoc generation for speed.
## Code After:
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 --config=$(brew --repo)/Library/.rubocop.yml iwyu.rb
- brew audit iwyu
- brew install -v iwyu
- brew test iwyu
|
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 available on pip as of today.
ORIENTATIONS = [
'Horizontal (normal)',
'Mirrored horizontal',
'Rotated 180',
'Mirrored vertical',
'Mirrored horizontal then rotated 90 CCW',
'Rotated 90 CCW',
'Mirrored horizontal then rotated 90 CW',
'Rotated 90 CW',
]
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_width(tags):
tag = tags.get(TAG_WIDTH, None)
if not tag:
raise KeyError(TAG_WIDTH)
return int(str(tag), 10)
def parse_height(tags):
tag = tags.get(TAG_HEIGHT, None)
if not tag:
raise KeyError(TAG_HEIGHT)
return int(str(tag), 10)
def parse_orientation(tags):
tag = tags.get(TAG_ORIENTATION, None)
if not tag:
raise KeyError(TAG_ORIENTATION)
return ORIENTATIONS.index(str(tag)) + 1 # XXX: convert back to original EXIF orientation
|
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_width(tags):
tag = tags.get(TAG_WIDTH, None)
if not tag:
raise KeyError(TAG_WIDTH)
return int(str(tag), 10)
def parse_height(tags):
tag = tags.get(TAG_HEIGHT, None)
if not tag:
raise KeyError(TAG_HEIGHT)
return int(str(tag), 10)
| 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 other library is available on pip as of today.
ORIENTATIONS = [
'Horizontal (normal)',
'Mirrored horizontal',
'Rotated 180',
'Mirrored vertical',
'Mirrored horizontal then rotated 90 CCW',
'Rotated 90 CCW',
'Mirrored horizontal then rotated 90 CW',
'Rotated 90 CW',
]
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_width(tags):
tag = tags.get(TAG_WIDTH, None)
if not tag:
raise KeyError(TAG_WIDTH)
return int(str(tag), 10)
def parse_height(tags):
tag = tags.get(TAG_HEIGHT, None)
if not tag:
raise KeyError(TAG_HEIGHT)
return int(str(tag), 10)
def parse_orientation(tags):
tag = tags.get(TAG_ORIENTATION, None)
if not tag:
raise KeyError(TAG_ORIENTATION)
return ORIENTATIONS.index(str(tag)) + 1 # XXX: convert back to original EXIF orientation
## Instruction:
Remove orientation tag parsing, not needed.
## Code After:
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_width(tags):
tag = tags.get(TAG_WIDTH, None)
if not tag:
raise KeyError(TAG_WIDTH)
return int(str(tag), 10)
def parse_height(tags):
tag = tags.get(TAG_HEIGHT, None)
if not tag:
raise KeyError(TAG_HEIGHT)
return int(str(tag), 10)
|
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: background-color 1s ease-out;
background-color: var(--jp-info-color0);
}
.jp-LogConsoleStatusItem.hilited {
background-color: var(--jp-info-color0);
}
.jp-LogConsole .clear-icon {
transform: rotate(90deg);
margin-top: -1px;
}
| :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: background-color 1s ease-out;
color: var(--jp-info-color0);
background-color: var(--jp-info-color3);
border-color: var(--jp-info-color2);
}
.jp-LogConsoleStatusItem.hilited {
color: var(--jp-info-color0);
background-color: var(--jp-info-color3);
border-color: var(--jp-info-color2);
}
.jp-LogConsole .clear-icon {
transform: rotate(90deg);
margin-top: -1px;
}
| 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 {
transition: background-color 1s ease-out;
background-color: var(--jp-info-color0);
}
.jp-LogConsoleStatusItem.hilited {
background-color: var(--jp-info-color0);
}
.jp-LogConsole .clear-icon {
transform: rotate(90deg);
margin-top: -1px;
}
## Instruction:
Make the info colors consistent with usage elsewhere in JLab.
## Code After:
: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: background-color 1s ease-out;
color: var(--jp-info-color0);
background-color: var(--jp-info-color3);
border-color: var(--jp-info-color2);
}
.jp-LogConsoleStatusItem.hilited {
color: var(--jp-info-color0);
background-color: var(--jp-info-color3);
border-color: var(--jp-info-color2);
}
.jp-LogConsole .clear-icon {
transform: rotate(90deg);
margin-top: -1px;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.