text
stringlengths
16
4.96k
positive
stringlengths
321
2.24k
negative
stringlengths
310
2.21k
Remove commented out dev server
const webpack = require('webpack'), webpackMerge = require('webpack-merge'), ExtractTextPlugin = require('extract-text-webpack-plugin'), commonConfig = require('./webpack.common.js'), path = require('path'), rootDir = path.resolve(__dirname, '..'); const env = process.env.NODE_ENV; modul...
const webpack = require('webpack'), webpackMerge = require('webpack-merge'), ExtractTextPlugin = require('extract-text-webpack-plugin'), commonConfig = require('./webpack.common.js'), path = require('path'), rootDir = path.resolve(__dirname, '..'); const env = process.env.NODE_ENV; modul...
Use more sane global for a non-bundled environment
import rootImport from 'rollup-plugin-root-import' import nodeResolve from 'rollup-plugin-node-resolve' import commonjs from 'rollup-plugin-commonjs' import buble from 'rollup-plugin-buble' import filesize from 'rollup-plugin-filesize' module.exports = { entry : 'index.js', dest : 'mithril-...
import rootImport from 'rollup-plugin-root-import' import nodeResolve from 'rollup-plugin-node-resolve' import commonjs from 'rollup-plugin-commonjs' import buble from 'rollup-plugin-buble' import filesize from 'rollup-plugin-filesize' module.exports = { entry : 'index.js', dest : 'mithril-...
UPDATE - Took out admin pass
<?php global $project; $project = 'mysite'; global $databaseConfig; $databaseConfig = array( "type" => 'MySQLDatabase', "server" => 'localhost', "username" => 'root', "password" => 'Redrooster8', "database" => 'sitesprocket24', "path" => '', ); MySQLDatabase::set_connection_charset('utf8'); // This line se...
<?php global $project; $project = 'mysite'; global $databaseConfig; $databaseConfig = array( "type" => 'MySQLDatabase', "server" => 'localhost', "username" => 'root', "password" => 'Redrooster8', "database" => 'sitesprocket24', "path" => '', ); MySQLDatabase::set_connection_charset('utf8'); // This line se...
Exclude State component from the propTypes information table
import { configure, addDecorator } from '@storybook/react'; import { setDefaults } from '@storybook/addon-info'; import { setOptions } from '@storybook/addon-options'; import backgroundColor from 'react-storybook-decorator-background'; import { State } from '@sambego/storybook-state'; // addon-info setDefaults({ hea...
import { configure, addDecorator } from '@storybook/react'; import { setDefaults } from '@storybook/addon-info'; import { setOptions } from '@storybook/addon-options'; import backgroundColor from 'react-storybook-decorator-background'; // addon-info setDefaults({ header: true, inline: true, source: true, propT...
Fix after an API modification
<?php $vca_page_title = _('Server Virtual Control Admin'); $paquet = new Paquet(); if(!empty($_GET['server'])) { if(!empty($_POST['name'])) { $para = array('name', 'address', 'key','description'); if(!empty($_POST['name'])) { $para['name'] = $_POST['name']; } if(!empty($_POST['address'])) { $para[...
<?php $vca_page_title = _('Server Virtual Control Admin'); $paquet = new Paquet(); if(!empty($_GET['server'])) { if(!empty($_POST['name'])) { $para = array('name', 'address', 'key','description'); if(!empty($_POST['name'])) { $para['name'] = $_POST['name']; } if(!empty($_POST['address'])) { $para[...
Add correct call of taxonomy node repo
<?php namespace AppBundle\API\Listing; use AppBundle\Entity\TaxonomyNode; use AppBundle\Service\DBVersion; use \PDO as PDO; /** * Web Service. * Returns Taxonomy information for a given organism_id */ class Taxonomy { private $manager; /** * Taxonomy constructor. * @param $dbversion */ ...
<?php namespace AppBundle\API\Listing; use AppBundle\Entity\TaxonomyNode; use AppBundle\Service\DBVersion; use \PDO as PDO; /** * Web Service. * Returns Taxonomy information for a given organism_id */ class Taxonomy { private $manager; /** * Taxonomy constructor. * @param $dbversion */ ...
Make sure menu code doesn't error out on 404
// Highlight active navigation menu item (function() { var fullPath = window.location.pathname.substring(1); var parentPath = fullPath.split('/')[0]; var path = fullPath.replace(/\//g, ''); if (path) { if (/404/.test(path) || /success/.test(path)) { return; } // For blog post pages. if (...
// Highlight active navigation menu item (function() { var fullPath = window.location.pathname.substring(1); var parentPath = fullPath.split('/')[0]; var path = fullPath.replace(/\//g, ''); if (path) { // For blog post pages. if (/blog/.test(path)) { parentPath = parentPath +'/'; } ...
Add addSelect function on query builder and start to make add function
let _where, _select, _from, _orderBy, _groupBy, _limit, _skip, _join, _insert, _delete, _update, _command, _table, _option, _params module.exports = { select: function (columns) { if (Array.isArray(columns)) { _select = `SELECT ${columns.join(', ')}` } else if (columns.length > 0) { _select = `SE...
let _where, _select, _from, _orderBy, _groupBy, _limit, _skip, _join, _insert, _delete, _update, _command, _table, _option, _params module.exports = { select: function (columns) { if (Array.isArray(columns)) { _select = `SELECT ${columns.join(', ')}` } else if (columns.length > 0) { _select = `SE...
Update to include actions in Create
# Download the helper library from https://www.twilio.com/docs/python/install from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/console account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' auth_token = 'your_auth_token' client = Client(account_sid, auth_token) # Provide actions for the ne...
# Download the helper library from https://www.twilio.com/docs/python/install from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/console account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' auth_token = 'your_auth_token' client = Client(account_sid, auth_token) # Create a new task named 't...
Add direct forward to admin
# Django # Third-Party from rest_framework.documentation import include_docs_urls from rest_framework.schemas import get_schema_view # from django.views.generic import TemplateView # from api.views import variance, ann from django.conf import settings from django.conf.urls import ( include, url, ) from django.c...
# Django # Third-Party from rest_framework.documentation import include_docs_urls from rest_framework.schemas import get_schema_view # from django.views.generic import TemplateView # from api.views import variance, ann from django.conf import settings from django.conf.urls import ( include, url, ) from django.c...
Fix minor bug in docs
package io.github.lionell.lab1; import com.google.common.base.Joiner; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.Set; import io.github.lionell.lab1.io.WordReader; /** * Usage e...
package io.github.lionell.lab1; import com.google.common.base.Joiner; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.Set; import io.github.lionell.lab1.io.WordReader; /** * Usage e...
Update image filter used by integration tests Signed-off-by: Matthew Sykes <89c6e4c9c1046731a9c37abefc223a83de36a5d9@us.ibm.com>
/* Copyright IBM Corp All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package helpers import ( "encoding/base32" "fmt" "strings" docker "github.com/fsouza/go-dockerclient" "github.com/hyperledger/fabric/common/util" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) func AssertImagesExist(i...
/* Copyright IBM Corp All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package helpers import ( "encoding/base32" "fmt" "strings" docker "github.com/fsouza/go-dockerclient" "github.com/hyperledger/fabric/common/util" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) func AssertImagesExist(i...
FIX: Remove brain example [skip azp] [skip actions]
""" .. _ex-eeg-on-scalp: ================================= Plotting EEG sensors on the scalp ================================= In this example, digitized EEG sensor locations are shown on the scalp. """ # Author: Eric Larson <larson.eric.d@gmail.com> # # License: BSD-3-Clause # %% import mne from mne.viz import plo...
""" .. _ex-eeg-on-scalp: ================================= Plotting EEG sensors on the scalp ================================= In this example, digitized EEG sensor locations are shown on the scalp. """ # Author: Eric Larson <larson.eric.d@gmail.com> # # License: BSD-3-Clause # %% import mne from mne.viz import plo...
Change single job view model binding.
var app = app || {}; (function($) { 'use strict'; app.JobSingleView = app.JobAbstractView.extend({ template: _.template($('#job-template').html()), events: { 'click .kill': 'killJob' }, initialize: function() { this.listenTo(this.model, 'change:status change:output', function() { ...
var app = app || {}; (function($) { 'use strict'; app.JobSingleView = app.JobAbstractView.extend({ template: _.template($('#job-template').html()), events: { 'click .kill': 'killJob' }, initialize: function() { this.listenTo(this.model, 'change', this._modelChanged); }, _mo...
api/views: Move blueprint imports into register() function
from flask import request from werkzeug.exceptions import Forbidden from werkzeug.useragents import UserAgent def register(app): """ :param flask.Flask app: a Flask app """ from .errors import register as register_error_handlers from .airports import airports_blueprint from .airspace import a...
from flask import request from werkzeug.exceptions import Forbidden from werkzeug.useragents import UserAgent from .errors import register as register_error_handlers from .airports import airports_blueprint from .airspace import airspace_blueprint from .mapitems import mapitems_blueprint from .waves import waves_bluepr...
Remove unnecessary self parameter from static method
import requests import json from ..scraper import Scraper class LayersScraper(Scraper): """A superclass for scraping Layers of the UofT Map. Map is located at http://map.utoronto.ca """ def __init__(self, name, output_location='.'): super().__init__(name, output_location) self.host ...
import requests import json from ..scraper import Scraper class LayersScraper(Scraper): """A superclass for scraping Layers of the UofT Map. Map is located at http://map.utoronto.ca """ def __init__(self, name, output_location='.'): super().__init__(name, output_location) self.host ...
Fix for missing parenthesis causing syntax error. Reviewed by me.
/* * bootstrap.js * Objective-J * * Created by Francisco Tolmasky. * Copyright 2008, 280 North, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of th...
/* * bootstrap.js * Objective-J * * Created by Francisco Tolmasky. * Copyright 2008, 280 North, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of th...
Configure deploy to copy dist as well
//upload to s3 task module.exports = { options: { accessKeyId: '<%= AWS_ACCESS_KEY_ID %>', secretAccessKey: '<%= AWS_SECRET_KEY %>', region: '<%= AWS_REGION %>' }, staging: { options: { bucket: '<%= AWS_BUCKET %>' }, files: [{ expand: t...
//upload to s3 task module.exports = { options: { accessKeyId: '<%= AWS_ACCESS_KEY_ID %>', secretAccessKey: '<%= AWS_SECRET_KEY %>', region: '<%= AWS_REGION %>' }, staging: { options: { bucket: '<%= AWS_BUCKET %>' }, files: [{ expand: t...
Add empty onUnload to pass test
const core = require("sdk/view/core"); const hotkeys = require("sdk/hotkeys"); const tabs = require("sdk/tabs"); const windows = require("sdk/windows").browserWindows; const helpers = require("./lib/helpers"); const state = require("./lib/state"); function registerListeners(window) { let lowLevelWindow = core.vie...
const core = require("sdk/view/core"); const hotkeys = require("sdk/hotkeys"); const tabs = require("sdk/tabs"); const windows = require("sdk/windows").browserWindows; const helpers = require("./lib/helpers"); const state = require("./lib/state"); function registerListeners(window) { let lowLevelWindow = core.vie...
Remove print statements from TwistedCircuitBreaker
# Copyright 2012 Edgeware AB. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright 2012 Edgeware AB. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
Test that self-repair endpoint does not set cookies
from django.core.urlresolvers import reverse from django.db import connection from django.test.utils import CaptureQueriesContext import pytest class TestSelfRepair: def test_url_is_right(self): url = reverse('selfrepair:index', args=['en-US']) assert url == '/en-US/repair' @pytest.mark.djan...
from django.core.urlresolvers import reverse from django.db import connection from django.test.utils import CaptureQueriesContext import pytest class TestSelfRepair: def test_url_is_right(self): url = reverse('selfrepair:index', args=['en-US']) assert url == '/en-US/repair' @pytest.mark.djan...
Use the RouterState mixin in GameNav
import * as React from 'react' import {State} from 'react-router' import {Octicon as OcticonClass} from './octicon' import {Link as LinkClass} from 'react-router' let Link = React.createFactory(LinkClass); let Octicon = React.createFactory(OcticonClass); let GameNavbar = React.createClass({ mixins: [State], render(...
import * as React from 'react' import {Octicon as OcticonClass} from './octicon' import {Link} from 'react-router' let Octicon = React.createFactory(OcticonClass); let GameNavbar = React.createClass({ render() { return React.createElement('ul', {id: 'game-nav', className: 'menu'}, React.createElement('li', {key...
Revise 009, add test cases
""" Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to string, note the restriction of using extra space. You could also try reversing an integer. However, if ...
""" Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to string, note the restriction of using extra space. You could also try reversing an integer. However, if ...
Switch to use String.prototype.indexOf instead of String.prototype.includes to support IE
// Shim to avoid requiring Velocity in Node environments, since it // requires window. Note that this just no-ops the components so // that they'll render, rather than doing something clever like // statically rendering the end state of any provided animations. // // TODO(finneganh): Circle back on jsdom to see if we c...
// Shim to avoid requiring Velocity in Node environments, since it // requires window. Note that this just no-ops the components so // that they'll render, rather than doing something clever like // statically rendering the end state of any provided animations. // // TODO(finneganh): Circle back on jsdom to see if we c...
Improve Rust function parser (Use correct identifier)
var DocsParser = require("../docsparser"); var xregexp = require('../xregexp').XRegExp; function RustParser(settings) { DocsParser.call(this, settings); } RustParser.prototype = Object.create(DocsParser.prototype); RustParser.prototype.setup_settings = function() { this.settings = { 'curlyTypes': fal...
var DocsParser = require("../docsparser"); var xregexp = require('../xregexp').XRegExp; function RustParser(settings) { DocsParser.call(this, settings); } RustParser.prototype = Object.create(DocsParser.prototype); RustParser.prototype.setup_settings = function() { this.settings = { 'curlyTypes': fal...
Make sure we invoke the response processors even for app content.
from django.contrib.auth.decorators import permission_required from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from feincms.module.page.models import Page def _build_page_response(page, request): response = page.setup_request(request) if resp...
from django.contrib.auth.decorators import permission_required from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from feincms.module.page.models import Page def build_page_response(page, request): response = page.setup_request(request) if respo...
Add teardown of integration test
from kitten.server import KittenServer from gevent.pool import Group from mock import MagicMock class TestPropagation(object): def setup_method(self, method): self.servers = Group() for port in range(4): ns = MagicMock() ns.port = 9812 + port server = Kitten...
from kitten.server import KittenServer from gevent.pool import Group from mock import MagicMock class TestPropagation(object): def setup_method(self, method): self.servers = Group() for port in range(4): ns = MagicMock() ns.port = 9812 + port server = Kitten...
Remove last_page not needed anymore.
import math from django import template from ..conf import settings register = template.Library() @register.inclusion_tag('googlesearch/_pagination.html', takes_context=True) def show_pagination(context, pages_to_show=10): max_pages = int(math.ceil(context['total_results'] / setting...
import math from django import template from ..conf import settings register = template.Library() @register.inclusion_tag('googlesearch/_pagination.html', takes_context=True) def show_pagination(context, pages_to_show=10): max_pages = int(math.ceil(context['total_results'] / setting...
Add function for generating random id
''' Helper methods for tests ''' import string import random from ckan.tests import factories def create_mock_data(**kwargs): mock_data = {} mock_data['organization'] = factories.Organization() mock_data['organization_name'] = mock_data['organization']['name'] mock_data['organization_id'] = mock_da...
from ckan.tests import factories def create_mock_data(**kwargs): mock_data = {} mock_data['organization'] = factories.Organization() mock_data['organization_name'] = mock_data['organization']['name'] mock_data['organization_id'] = mock_data['organization']['id'] mock_data['dataset'] = factories....
Remove unused container in instance initializer
import ActiveModelAdapter from 'active-model-adapter'; import ActiveModelSerializer from 'active-model-adapter/active-model-serializer'; export default { name: 'active-model-adapter', initialize: function(applicationOrRegistry) { var registry; if (applicationOrRegistry.registry) { // initializeStoreS...
import ActiveModelAdapter from 'active-model-adapter'; import ActiveModelSerializer from 'active-model-adapter/active-model-serializer'; export default { name: 'active-model-adapter', initialize: function(applicationOrRegistry) { var registry, container; if (applicationOrRegistry.registry && applicationOrR...
Update Development Status from Planning to Alpha
from setuptools import find_packages, setup setup( name='incuna-pigeon', version='0.0.0', description='Notification management', url='https://github.com/incuna/incuna-pigeon', author='Incuna', author_email='admin@incuna.com', license='BSD', classifiers=[ 'Development Status :...
from setuptools import find_packages, setup setup( name='incuna-pigeon', version='0.0.0', description='Notification management', url='https://github.com/incuna/incuna-pigeon', author='Incuna', author_email='admin@incuna.com', license='BSD', classifiers=[ 'Development Status :...
8: Create documentation of DataSource Settings Task-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/8
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
Set full commit message as tooltip Resolves: #880
import React from 'react'; import Relay from 'react-relay'; import PropTypes from 'prop-types'; import Octicon from '../../views/octicon'; export class Commit extends React.Component { static propTypes = { item: PropTypes.object.isRequired, } render() { const commit = this.props.item; return ( ...
import React from 'react'; import Relay from 'react-relay'; import PropTypes from 'prop-types'; import Octicon from '../../views/octicon'; export class Commit extends React.Component { static propTypes = { item: PropTypes.object.isRequired, } render() { const commit = this.props.item; return ( ...
Use JpaRepository instead of CrudRepository.
/* * Copyright 2016 SEARCH-The National Consortium for Justice Information and Statistics * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-...
/* * Copyright 2016 SEARCH-The National Consortium for Justice Information and Statistics * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-...
Copy zlib.dll into Windows h5py installed from source
import distutils.sysconfig from glob import glob import os from os.path import join as pjoin, basename from shutil import copy from sys import platform def main(): """ Copy HDF5 DLLs into installed h5py package """ # This is the function Tox also uses to locate site-packages (Apr 2019) sitepackages...
import distutils.sysconfig from glob import glob import os from os.path import join as pjoin, basename from shutil import copy from sys import platform def main(): """ Copy HDF5 DLLs into installed h5py package """ # This is the function Tox also uses to locate site-packages (Apr 2019) sitepackages...
Apply proposals by tut2 feedback
var lastField = null; var currentFillColor = ''; // ??? var changeCounter = 0; // ??? function setField(element) { // element contains the current html element if (element.style.backgroundColor !== currentFillColor) { element.style.backgroundColor = currentFillColor; } else { elemen...
var lastField = null; var currentFillColor = ''; // ??? var changeCounter = 0; // ??? function setField(element) { // element contains the current html element if (element.style.backgroundColor !== currentFillColor) { element.style.backgroundColor = currentFillColor; } else { elemen...
Update with reference to global nav partial
var _ = require('lodash') var fs = require('fs') var gzip = require('gzip-size') var filesize = require('filesize') var cssstats = require('cssstats') var module = require('tachyons-font-family/package.json') var moduleCss = fs.readFileSync('node_modules/tachyons-font-family/tachyons-font-family.min.css', 'utf8') var ...
var _ = require('lodash') var fs = require('fs') var gzip = require('gzip-size') var filesize = require('filesize') var cssstats = require('cssstats') var module = require('tachyons-font-family/package.json') var moduleCss = fs.readFileSync('node_modules/tachyons-font-family/tachyons-font-family.min.css', 'utf8') var ...
Use regular require, when given context is same as current context
'use strict'; var Module = require('module') , wrap = Module.wrap , readFile = require('fs').readFileSync , dirname = require('path').dirname , vm = require('vm') , createContext = vm.createContext , runInContext = vm.runInContext , errorMsg = require('./is-mod...
'use strict'; var Module = require('module') , wrap = Module.wrap , readFile = require('fs').readFileSync , dirname = require('path').dirname , vm = require('vm') , createContext = vm.createContext , runInContext = vm.runInContext , errorMsg = require('./is-mod...
Make test models self contained specific defining Model classes
from pysagec import models def test_field(): f = models.Field('tag') assert f.__get__(None, None) is f assert 'Field' in repr(f) def test_model_as_dict(): class MyModel(models.Model): root_tag = 'root' prop1 = models.Field('tag1') prop2 = models.Field('tag2') model = MyM...
from pysagec import models def test_auth_info(): values = [ ('mrw:CodigoFranquicia', 'franchise_code', '123456'), ('mrw:CodigoAbonado', 'subscriber_code', 'subscriber_code'), ('mrw:CodigoDepartamento', 'departament_code', 'departament_code'), ('mrw:UserName', 'username', 'username'...
Add more logging and asserts to script
import logging import time from website.app import init_app from website.identifiers.utils import get_or_create_identifiers, get_subdomain logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) def add_identifiers_to_preprints(): from osf.models import PreprintService preprints_withou...
import logging import time from website.app import init_app from website.identifiers.utils import get_or_create_identifiers logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) def add_identifiers_to_preprints(): from osf.models import PreprintService preprints_without_identifiers =...
Make the under construction page less horrible
<?php require_once('config.php'); global $config; require_once('page_template_dash_head.php'); require_once('page_template_dash_sidebar.php'); $election_id = $_GET['id']; $election_name = get_election_name($election_id); ?> <div class="content-wrapper"> <section class="content-header"> <h1 id="el...
<?php require_once('config.php'); global $config; require_once('page_template_dash_head.php'); require_once('page_template_dash_sidebar.php'); $election_id = $_GET['id']; $election_name = get_election_name($election_id); ?> <div class="content-wrapper"> <section class="content-header"> <h1 id="el...
Add midpoint interpolation to stepped line
/** Copyright 2017 Andrea "Stock" Stocchero Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
/** Copyright 2017 Andrea "Stock" Stocchero Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
Allow non-authservice to offer anonymous
/* * Copyright 2017 Red Hat Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
/* * Copyright 2017 Red Hat Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
Fix typo is -> as
#!/usr/bin/env python import os import sys import subprocess from importlib import import_module if __name__ == '__main__': # Test using django.test.runner.DiscoverRunner os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' # We need to use subprocess.call instead of django's execute_from_command_lin...
#!/usr/bin/env python import os import sys import subprocess from importlib import import_module if __name__ == '__main__': # Test using django.test.runner.DiscoverRunner os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' # We need to use subprocess.call instead of django's execute_from_command_lin...
Add SocketIO server options to "default" nodejs environment so development mode isn't broken
var path = require('path'); // strip the last dir... essentially the same as __dirname/.. var root = path.dirname(__dirname); //.replace(/\/[^\/]+\/?$/,''), deploy_root = path.normalize(root + '/..'); module.exports = { port: 8001 , public_dir: root + '/public' , db_name: 'wompt_dev' , root: root , deploy_roo...
var path = require('path'); // strip the last dir... essentially the same as __dirname/.. var root = path.dirname(__dirname); //.replace(/\/[^\/]+\/?$/,''), deploy_root = path.normalize(root + '/..'); module.exports = { port: 8001 , public_dir: root + '/public' , db_name: 'wompt_dev' , root: root , deploy_roo...
Work on showing class in failed job listing.
<?php namespace Illuminate\Queue\Console; use Illuminate\Console\Command; class ListFailedCommand extends Command { /** * The console command name. * * @var string */ protected $name = 'queue:failed'; /** * The console command description. * * @var string */ protected $description = 'List all of...
<?php namespace Illuminate\Queue\Console; use Illuminate\Console\Command; class ListFailedCommand extends Command { /** * The console command name. * * @var string */ protected $name = 'queue:failed'; /** * The console command description. * * @var string */ protected $description = 'List all of...
Fix the publishes path for translations
<?php namespace Jorenvh\Share\Providers; use Illuminate\Support\ServiceProvider; use Jorenvh\Share\Share; class ShareServiceProvider extends ServiceProvider { /** * Bootstrap the application services. */ public function boot() { $this->loadTranslationsFrom(__DIR__ . '/../../resources/la...
<?php namespace Jorenvh\Share\Providers; use Illuminate\Support\ServiceProvider; use Jorenvh\Share\Share; class ShareServiceProvider extends ServiceProvider { /** * Bootstrap the application services. */ public function boot() { $this->publishes([ __DIR__ . '/../../config/la...
Use official URL for collector
import simplejson as json import zmq import sys import base64 import zlib from jsonsig import * fieldnames = "buyPrice,sellPrice,demand,demandLevel,stationStock,stationStockLevel,categoryName,itemName,stationName,timestamp".split(',') (pk, sk) = pysodium.crypto_sign_keypair() context = zmq.Context() socket = contex...
import simplejson as json import zmq import sys import base64 import zlib from jsonsig import * fieldnames = "buyPrice,sellPrice,demand,demandLevel,stationStock,stationStockLevel,categoryName,itemName,stationName,timestamp".split(',') (pk, sk) = pysodium.crypto_sign_keypair() context = zmq.Context() socket = contex...
Set the type of a (deletion) ValueChangedEvent to CollaborativeObject instead of null
package gx.realtime.serialize; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml...
package gx.realtime.serialize; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml...
Use opcode function in test
const test = require('tap').test; const TextToSpeech = require('../../src/extensions/scratch3_text2speech/index.js'); const fakeStage = { textToSpeechLanguage: null }; const fakeRuntime = { getTargetForStage: () => fakeStage, on: () => {} // Stub out listener methods used in constructor. }; const ext = n...
const test = require('tap').test; const TextToSpeech = require('../../src/extensions/scratch3_text2speech/index.js'); const fakeStage = { textToSpeechLanguage: null }; const fakeRuntime = { getTargetForStage: () => fakeStage, on: () => {} // Stub out listener methods used in constructor. }; const ext = n...
Add the ability to query for the replica status of a PG instance
#!/usr/bin/env python from BaseHTTPServer import BaseHTTPRequestHandler from helpers.etcd import Etcd from helpers.postgresql import Postgresql import sys, yaml, socket f = open(sys.argv[1], "r") config = yaml.load(f.read()) f.close() etcd = Etcd(config["etcd"]) postgresql = Postgresql(config["postgresql"]) class S...
#!/usr/bin/env python from BaseHTTPServer import BaseHTTPRequestHandler from helpers.etcd import Etcd from helpers.postgresql import Postgresql import sys, yaml, socket f = open(sys.argv[1], "r") config = yaml.load(f.read()) f.close() etcd = Etcd(config["etcd"]) postgresql = Postgresql(config["postgresql"]) class S...
Add documentation for goto command Change-Id: I94e280eef509abe65f552b6e78f21eabfe4192e3 Signed-off-by: Sarah Liske <e262b8a15d521183e33ead305fd79e90e1942cdd@polybeacon.com>
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2014 PolyBeacon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2014 PolyBeacon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
Revert "Making a test fail to ensure that the fix pickes up failing tests" This reverts commit 0868f63e58352ebc4f2db22564883c96664295db.
const frisby = require('frisby') const Joi = frisby.Joi const REST_URL = 'http://localhost:3000/rest' describe('/rest/track-order/:id', () => { it('GET tracking results for the order id', () => { return frisby.get(REST_URL + '/track-order/5267-f9cd5882f54c75a3') .expect('status', 200) .expect('json'...
const frisby = require('frisby') const Joi = frisby.Joi const REST_URL = 'http://localhost:3000/rest' describe('/rest/track-order/:id', () => { it('GET tracking results for the order id', () => { return frisby.get(REST_URL + '/track-order/5267-f9cd5882f54c75a3') .expect('status', 12323) .expect('jso...
Fix test for unmatched type
'use strict'; var test = require('tape'); var types = require('../src/types'); test('types', function (t) { t.equal(types.cast('foo'), 'foo', 'returns value if no type'); t.equal(types.cast('foo', 'invalidtype'), 'foo', 'returns value if no type match'); t.test('boolean', function (t) { function boolean...
'use strict'; var test = require('tape'); var types = require('../src/types'); test('types', function (t) { t.equal(types.cast('foo'), 'foo', 'returns value if no type'); var r = /foo/ t.equal(types.cast(r), r, 'returns value if no type match'); t.test('boolean', function (t) { function boolean (value...
Add reminder to myself to to importlib fallback.
from django.conf import settings from django.core.exceptions import ImproperlyConfigured # TODO: When Python 2.7 is released this becomes a try/except falling # back to Django's implementation. from django.utils.importlib import import_module def get_backend(): """ Return an instance of the registration backe...
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module def get_backend(): """ Return an instance of the registration backend for use on this site, as determined by the ``REGISTRATION_BACKEND`` setting. Raise ``django.cor...
Fix event name for bot joining a space
import 'babel-polyfill' import controller from './controller' import { handleDirectMention, handleDirectMessage, handleJoin, handleTestMessage } from './handlers' const bot = controller.spawn({}) controller.setupWebserver(process.env.PORT || 3000, function (err, webserver) { if (err) { console.log(err) th...
import 'babel-polyfill' import controller from './controller' import { handleDirectMention, handleDirectMessage, handleJoin, handleTestMessage } from './handlers' const bot = controller.spawn({}) controller.setupWebserver(process.env.PORT || 3000, function (err, webserver) { if (err) { console.log(err) th...
Fix user controller at route
<?php /* |-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond ...
<?php /* |-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond ...
Remove TidioChat from this view
@extends('app') @section('content') <div class="container"> <div class="row"> <div class="panel panel-default"> <div class="panel-heading">{{ trans('manager.businesses.create.title') }}</div> <div class="panel-body"> @include('_errors') {!! Form::mo...
@extends('app') @section('content') <div class="container"> <div class="row"> <div class="panel panel-default"> <div class="panel-heading">{{ trans('manager.businesses.create.title') }}</div> <div class="panel-body"> @include('_errors') {!! Form::mo...
Add Middleware to serve static assets
var express = require('express'), bodyParser = require('body-parser'), routes = require(__dirname + '/app/routes.js'), app = express(), port = (process.env.PORT || 3000); // Application settings app.engine('html', require(__dirname + '/lib/template-engine.js').__express); app.set('view engine', 'html')...
var express = require('express'), bodyParser = require('body-parser'), routes = require(__dirname + '/app/routes.js'), app = express(), port = (process.env.PORT || 3000); // Application settings app.engine('html', require(__dirname + '/lib/template-engine.js').__express); app.set('view engine', 'html')...
Fix views folder for L5.1
<?php namespace PragmaRX\Sdk\Services\View\Service; use PragmaRX\Support\ServiceProvider; use PragmaRX\Sdk\Services\View\Compilers\BladeCompiler; class Provider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = false; /*...
<?php namespace PragmaRX\Sdk\Services\View\Service; use PragmaRX\Support\ServiceProvider; use PragmaRX\Sdk\Services\View\Compilers\BladeCompiler; class Provider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = false; /*...
Fix highlighting of modules by László (encoding)
<?php define('CLEANHOME', '/opt/clean'); error_reporting(E_ALL); ini_set('display_errors', 1); if (!isset($_REQUEST['lib']) || !isset($_REQUEST['mod'])) { die('Add ?lib and ?mod.'); } $iclordcl = isset($_REQUEST['icl']) ? 'icl' : 'dcl'; $highlight = isset($_REQUEST['hl']) ? true : false; $lib = preg_replace('/[^\\...
<?php define('CLEANHOME', '/opt/clean'); error_reporting(E_ALL); ini_set('display_errors', 1); if (!isset($_REQUEST['lib']) || !isset($_REQUEST['mod'])) { die('Add ?lib and ?mod.'); } $iclordcl = isset($_REQUEST['icl']) ? 'icl' : 'dcl'; $highlight = isset($_REQUEST['hl']) ? true : false; $lib = preg_replace('/[^\\...
Change config uglify task grunt
module.exports = function(grunt) { grunt.initConfig({ connect: { server: { options: { port: 8000, useAvailablePort: true, hostname: '*', keepalive: true } } }, uglify: { dist: { files: { 'dist/angular-local-storag...
module.exports = function(grunt) { grunt.initConfig({ connect: { server: { options: { port: 8000, useAvailablePort: true, hostname: '*', keepalive: true } } }, uglify: { dist: { files: { 'dist/angular-local-storag...
Copy .htaccess files to dist
var gulp = require('gulp'); var clean = require('gulp-clean'); var zip = require('gulp-zip'); var bases = { root: 'dist/' }; var paths = [ 'core/actions/*', 'core/common/**', 'admin/**', '!admin/config/*', 'boxoffice/**', '!boxoffice/config/*', 'customer/**', '!customer/config/*',...
var gulp = require('gulp'); var clean = require('gulp-clean'); var zip = require('gulp-zip'); var bases = { root: 'dist/' }; var paths = [ 'core/actions/*', 'core/common/**', 'admin/**', '!admin/config/*', 'boxoffice/**', '!boxoffice/config/*', 'customer/**', '!customer/config/*',...
Add debug logging for push landing
import logging import os import json from django.http import HttpResponse, Http404 from django.views.decorators.csrf import csrf_exempt from twilio.rest import TwilioRestClient logger = logging.getLogger('django') @csrf_exempt def handle(request): if (request.method != 'POST'): raise Http404 logger.info("Rec...
import logging import os from django.http import HttpResponse, Http404 from django.views.decorators.csrf import csrf_exempt from twilio.rest import TwilioRestClient logger = logging.getLogger('django') @csrf_exempt def handle(request): if (request.method != 'POST'): raise Http404 return HttpResponse("Hello, ...
Change x-axis from time to category Equal spacing between elements on the x-axis
var svg = dimple.newSvg("#plot", 800, 600); function replot(data) { svg.selectAll('*').remove(); console.log($('#grouping').val()) console.log(data['owner']) var myChart = new dimple.chart(svg, data); var x = myChart.addCategoryAxis("x", "date"); var y = myChart.addMeasureAxis("y", "n_clashes"...
var svg = dimple.newSvg("#plot", 800, 600); function replot(data) { svg.selectAll('*').remove(); console.log($('#grouping').val()) console.log(data['owner']) var myChart = new dimple.chart(svg, data); var x = myChart.addTimeAxis("x", "date", "%Y-%m-%d", "%Y-%m-%d"); var y = myChart.addMeasureA...
Fix the frontend production build
"use strict"; module.exports = (converter) => { return (flags) => { var args = [flags]; return require('through2').obj(function(file, enc, cb) { if (file.isNull()) { this.push(file); return cb(); } if (file.isStream()) { ...
"use strict"; module.exports = (converter) => { return () => { var args = Array.from(arguments); return require('through2').obj(function(file, enc, cb) { if (file.isNull()) { this.push(file); return cb(); } if (file.isStream())...
Update announcing to have proper cross-browser sizing
import { Button } from 'rebass'; import { Shutdown } from './Widgets'; export default class Announcing extends React.Component { shutdown(activate) { ws.send({cmd: 'shutdown', activate: activate}); } render() { if (this.props.players[gs.id].shutdown) { return <Shutdown/> ...
import Button from 'rebass/dist/Button'; import { Shutdown } from './Emoji'; export default class Announcing extends React.Component { shutdown(activate) { ws.send({cmd: 'shutdown', activate: activate}); } render() { if (this.props.players[gs.id].shutdown) { return <Shutdown/> ...
Update to use OAuth, take in command line arguments and modify the imports to function from within the module.
""" Example program for the Stream API. This prints public status messages from the "sample" stream as fast as possible. USAGE stream-example -t <token> -ts <token_secret> -ck <consumer_key> -cs <consumer_secret> """ from __future__ import print_function import argparse from twitter.stream import TwitterStream ...
""" Example program for the Stream API. This prints public status messages from the "sample" stream as fast as possible. USAGE twitter-stream-example <username> <password> """ from __future__ import print_function import sys from .stream import TwitterStream from .auth import UserPassAuth from .util import prin...
Add reference tree loader to imports.
# vytree.__init__: package init file. # # Copyright (C) 2014 VyOS Development Group <maintainers@vyos.net> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # ver...
# vytree.__init__: package init file. # # Copyright (C) 2014 VyOS Development Group <maintainers@vyos.net> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # ver...
Change order of isomiR naming
"""small RNA-seq annotation""" from setuptools import setup, find_packages def readme(): with open('README.md') as f: return f.read() # with open("reqs.txt", "r") as f: # install_requires = [x.strip() for x in f.readlines() if not x.startswith("#")] setup(name='mirtop', version='0.1.3a', ...
"""small RNA-seq annotation""" from setuptools import setup, find_packages def readme(): with open('README.md') as f: return f.read() # with open("reqs.txt", "r") as f: # install_requires = [x.strip() for x in f.readlines() if not x.startswith("#")] setup(name='mirtop', version='0.1.2a', ...
Add FileListing to objects we export
import os from .core import LogFileOutput, Mapper, IniConfigFile, LegacyItemAccess # noqa: F401 from .core import FileListing # noqa: F401 from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401 from .mappers import get_active_lines # noqa: F401 from .util import defaults, parse_table ...
import os from .core import LogFileOutput, Mapper, IniConfigFile, LegacyItemAccess # noqa: F401 from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401 from .mappers import get_active_lines # noqa: F401 from .util import defaults, parse_table # noqa: F401 __here__ = os.path.dirname(os....
Determine whether coordinates are relative
import java.util.*; class PathDElement { char type; ArrayList<Float> values; PathDElement() { values = new ArrayList<Float>(); } } class PathDParser { // Split a string describing the segments of a path into void partition( String path, ArrayList<PathDElement> pathElements ) { String del...
import java.util.*; class PathDElement { char type; ArrayList<Float> values; PathDElement() { values = new ArrayList<Float>(); } } class PathDParser { // Split a string describing the segments of a path into void partition( String path, ArrayList<PathDElement> pathElements ) { String del...
Rewrite fix for fake archive
<?php namespace WordpressLib\Posts; abstract class FakeArchive extends FakePage { protected $templateName = 'archive'; public function __construct($slug, $title) { parent::__construct($slug, $title); remove_filter('the_title', [$this, 'replaceContentTitle'], 10, 2); remove_filter('the_content', [$this, 'rep...
<?php namespace WordpressLib\Posts; abstract class FakeArchive extends FakePage { protected $templateName = 'archive'; public function __construct($slug, $title) { parent::__construct($slug, $title); remove_filter('the_title', [$this, 'replaceContentTitle'], 10, 2); remove_filter('the_content', [$this, 'rep...
Fix type error in getEventType
package main import ( "github.com/howeyc/fsnotify" "path" ) type Cmd struct { Path string EventType string EventFile string } func Manage(events chan *fsnotify.FileEvent, rules []*Rule) (queue chan *Cmd) { queue = make(chan *Cmd) go func() { for ev := range events { rule := ruleForEvent(rules, ev) ...
package main import ( "github.com/howeyc/fsnotify" "path" ) type Cmd struct { Path string EventType string EventFile string } func Manage(events chan *fsnotify.FileEvent, rules []*Rule) (queue chan *Cmd) { queue = make(chan *Cmd) go func() { for ev := range events { rule := ruleForEvent(rules, ev) ...
Add option to ignore static.
from src.markdown.makrdown import jinja_aware_markdown PREFERRED_URL_SCHEME = 'http' SERVER_NAME = 'localhost:5000' FLATPAGES_EXTENSION = '.md' FLATPAGES_HTML_RENDERER = jinja_aware_markdown FREEZER_IGNORE_404_NOT_FOUND = True FLATPAGES_AUTO_RELOAD = True FREEZER_STATIC_IGNORE = ["*"] GITHUB_URL = 'https://github.com/...
from src.markdown.makrdown import jinja_aware_markdown PREFERRED_URL_SCHEME = 'http' SERVER_NAME = 'localhost:5000' FLATPAGES_EXTENSION = '.md' FLATPAGES_HTML_RENDERER = jinja_aware_markdown FREEZER_IGNORE_404_NOT_FOUND = True FLATPAGES_AUTO_RELOAD = True GITHUB_URL = 'https://github.com/JetBrains/kotlin' TWITTER_URL ...
Fix 500 error on empty passlogin values
# -*- coding: utf-8 -*- #from twisted.words.xish import domish from base import * from bnw_core.base import get_webui_base import bnw_core.bnw_objects as objs from twisted.internet import defer @require_auth def cmd_login(request): """ Логин-ссылка """ return dict( ok=True, desc='%s/login?key=...
# -*- coding: utf-8 -*- #from twisted.words.xish import domish from base import * from bnw_core.base import get_webui_base import bnw_core.bnw_objects as objs from twisted.internet import defer @require_auth def cmd_login(request): """ Логин-ссылка """ return dict( ok=True, desc='%s/login?key=...
net: Add TODO for form parsing
// Copyright 2015-2016, Cyrill @ Schumacher.fm and the CoreStore contributors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Un...
// Copyright 2015-2016, Cyrill @ Schumacher.fm and the CoreStore contributors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Un...
Revert "Hide browse menu entry" This reverts commit 864f5a136c74b98ab1943e125bbb78c79c763f86.
import React from 'react'; import './NavMenu.css'; export default function NavMenu({ currentPage, setCurrentPage }) { const chooseClasses = ['entry', 'choose']; const browseClasses = ['entry', 'browse']; if (currentPage === 'choose') { chooseClasses.push('selected'); } else { browseClasses.push('sele...
import React from 'react'; import './NavMenu.css'; export default function NavMenu({ currentPage, setCurrentPage }) { const chooseClasses = ['entry', 'choose']; const browseClasses = ['entry', 'browse']; if (currentPage === 'choose') { chooseClasses.push('selected'); } else { browseClasses.push('sele...
Revert "BAU: remove unused jQuery UJS library" This reverts commit b965059cefcca710e2fe232629f06cd9b87e7e07. We didn't realise UJS automatically adds the CSRF token into the request headers - so we started seeing Rails "missing CSRF token" errors in response to AJAX requests. Authors: 3708ce2d6828520f8dfb5991b9e0ba4...
// from govuk_frontend_toolkit //= require vendor/polyfills/bind // from govuk_elements //= require details.polyfill //= require jquery //= require jquery_ujs //= require jquery.validate //= require govuk/selection-buttons //= require_tree . //= require piwik window.GOVUK.validation.init(); window.GOVUK.selectDocume...
// from govuk_frontend_toolkit //= require vendor/polyfills/bind // from govuk_elements //= require details.polyfill //= require jquery //= require jquery.validate //= require govuk/selection-buttons //= require_tree . //= require piwik window.GOVUK.validation.init(); window.GOVUK.selectDocuments.init(); window.GOVU...
Improve CSRF missing error message Fixes gh-3738
/* * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
/* * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
Move smll and dcm to baseline devices
# vim: sw=4 ts=4 sts expandtab smarttab # HXN step-scan configuration import hxntools.scans from bluesky.global_state import get_gs gs = get_gs() hxntools.scans.setup() ct = hxntools.scans.count ascan = hxntools.scans.absolute_scan dscan = hxntools.scans.relative_scan fermat = hxntools.scans.relative_fermat spiral =...
# vim: sw=4 ts=4 sts expandtab smarttab # HXN step-scan configuration import hxntools.scans from bluesky.global_state import get_gs gs = get_gs() hxntools.scans.setup() ct = hxntools.scans.count ascan = hxntools.scans.absolute_scan dscan = hxntools.scans.relative_scan fermat = hxntools.scans.relative_fermat spiral =...
Add address group in use exception Related change: https://review.opendev.org/#/c/751110/ Change-Id: I2a9872890ca4d5e59a9e266c1dcacd3488a3265c
# All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
Fix return type in documentation
<?php namespace jvwp\common; class Ajax { const WP_AJAX_HOOK_PREFIX = 'wp_ajax_'; /** * Gets the action hook string to use, based on the action name that was provided * * @param string $action * * @return string */ public static function getHook ($action) { retu...
<?php namespace jvwp\common; class Ajax { const WP_AJAX_HOOK_PREFIX = 'wp_ajax_'; /** * Gets the action hook string to use, based on the action name that was provided * * @param string $action * * @return string */ public static function getHook ($action) { retu...
Set preload default to false
package dmillerw.lore.core.proxy; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import dmillerw.lore.LoreExpansion; import dmillerw.lore.client.handler.ClientTickHandler; import dmillerw.lore.core.handler.KeyHandler...
package dmillerw.lore.core.proxy; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import dmillerw.lore.LoreExpansion; import dmillerw.lore.client.handler.ClientTickHandler; import dmillerw.lore.core.handler.KeyHandler...
Disable the VT test, the code ain't mature enough.
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)` :copyright: © 2013 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. tests.unit.utils.vt_test ~~~~~~~~~~~~~~~~~~~~~~~~ VirtualTerminal tests ''' # Impor...
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)` :copyright: © 2013 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. tests.unit.utils.vt_test ~~~~~~~~~~~~~~~~~~~~~~~~ VirtualTerminal tests ''' # Impor...
Support for Hierarchical trees added.
package org.pentaho.ui.xul.components; import java.util.List; import org.pentaho.ui.xul.XulComponent; import org.pentaho.ui.xul.binding.InlineBindingExpression; import org.pentaho.ui.xul.util.ColumnType; public interface XulTreeCol extends XulComponent { public void setEditable(boolean edit); publi...
package org.pentaho.ui.xul.components; import java.util.List; import org.pentaho.ui.xul.XulComponent; import org.pentaho.ui.xul.binding.InlineBindingExpression; import org.pentaho.ui.xul.util.ColumnType; public interface XulTreeCol extends XulComponent { public void setEditable(boolean edit); publi...
Install c3d-metadata script as part of the package.
import os import setuptools setuptools.setup( name='c3d', version='0.2.0', py_modules=['c3d'], author='Leif Johnson', author_email='leif@leifjohnson.net', description='A library for manipulating C3D binary files', long_description=open(os.path.join(os.path.dirname(os.path.abspath(__file__))...
import os import setuptools setuptools.setup( name='c3d', version='0.2.0', py_modules=['c3d'], author='Leif Johnson', author_email='leif@leifjohnson.net', description='A library for manipulating C3D binary files', long_description=open(os.path.join(os.path.dirname(os.path.abspath(__file__))...
Use correct value for disable_escaping parameter
######################################################################## # amara/xslt/tree/text_element.py """ Implementation of the `xsl:text` element. """ from amara.xslt.tree import xslt_element, content_model, attribute_types class text_element(xslt_element): content_model = content_model.text attribute_...
######################################################################## # amara/xslt/tree/text_element.py """ Implementation of the `xsl:text` element. """ from amara.xslt.tree import xslt_element, content_model, attribute_types class text_element(xslt_element): content_model = content_model.text attribute_...
Add license to package metadata
#!/usr/bin/env python import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="autograd-gamma", version="0.4.2", description="Autograd compatible approximations to the gamma family of functions", license='MIT License', author="Cameron Davidson-...
#!/usr/bin/env python import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="autograd-gamma", version="0.4.2", description="Autograd compatible approximations to the gamma family of functions", author="Cameron Davidson-Pilon", author_email="c...
openid: Fix notice about unititialized variable.
<?php /* Find the authentication state. */ if (!array_key_exists('AuthState', $_REQUEST) || empty($_REQUEST['AuthState'])) { throw new SimpleSAML_Error_BadRequest('Missing mandatory parameter: AuthState'); } $authState = $_REQUEST['AuthState']; $state = SimpleSAML_Auth_State::loadState($authState, 'openid:init'); $s...
<?php /* Find the authentication state. */ if (!array_key_exists('AuthState', $_REQUEST) || empty($_REQUEST['AuthState'])) { throw new SimpleSAML_Error_BadRequest('Missing mandatory parameter: AuthState'); } $authState = $_REQUEST['AuthState']; $state = SimpleSAML_Auth_State::loadState($authState, 'openid:init'); $s...
Connect to sodapop.se if debug is not found in the startup arguments
package edu.chalmers.sankoss.java; import com.badlogic.gdx.backends.lwjgl.LwjglApplication; import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; /** * Class to start the application from. * Creates a application window with initial * size, title and GL20 support. * * @author Mikael Malmqvist *...
package edu.chalmers.sankoss.java; import com.badlogic.gdx.backends.lwjgl.LwjglApplication; import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration; /** * Class to start the application from. * Creates a application window with initial * size, title and GL20 support. * * @author Mikael Malmqvist *...
Change to multi-line imports in the test suite
#!/usr/bin/env python3 from libpals.util import ( xor_find_singlechar_key, hamming_distance, fixed_xor ) def test_xor_find_singlechar_key(): input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736' ciphertext = bytes.fromhex(input) result = xor_find_singlechar_key(ciphert...
#!/usr/bin/env python3 from libpals.util import xor_find_singlechar_key, hamming_distance, fixed_xor def test_xor_find_singlechar_key(): input = '1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736' ciphertext = bytes.fromhex(input) result = xor_find_singlechar_key(ciphertext) assert ...
Put routes in order of use.
'use strict'; /** * Contains all of the functions necessary to deal with user * signup and authentication. * * 1. decodeToken: decodes a token into user data using. * 2. getToken middleware that sets up req.user if a token is passed in REST. * 3. Login */ var token = require('./token'); /* * * Custom REST rout...
'use strict'; /** * Contains all of the functions necessary to deal with user * signup and authentication. * * 1. decodeToken: decodes a token into user data using. * 2. getToken middleware that sets up req.user if a token is passed in REST. * 3. Login */ var token = require('./token'); /* * * Custom REST rout...
Fix custom decoder on Python 3
# -*- coding: utf-8 -*- from datetime import datetime from time import mktime import json from doorman.compat import string_types class DJSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime): return { '__type__': '__datetime__', 'e...
# -*- coding: utf-8 -*- from datetime import datetime from time import mktime import json class DJSONEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, datetime): return { '__type__': '__datetime__', 'epoch': int(mktime(obj.timetuple())) ...
Make rooms in the example game (grammatically) "proper" (nouns)
from __future__ import unicode_literals from imaginary.world import ImaginaryWorld from imaginary.objects import Thing, Container, Exit from imaginary.garments import createShirt, createPants from imaginary.iimaginary import IClothing, IClothingWearer from examplegame.squeaky import Squeaker def world(store): ...
from __future__ import unicode_literals from imaginary.world import ImaginaryWorld from imaginary.objects import Thing, Container, Exit from imaginary.garments import createShirt, createPants from imaginary.iimaginary import IClothing, IClothingWearer from examplegame.squeaky import Squeaker def world(store): ...
Add first draft of lpa journey ordering
define([ 'extensions/collections/conversioncollection' ], function (ConversionCollection) { var ConversionSeries = ConversionCollection.extend({ serviceName:'lasting-power-of-attorney', apiName:'journey', queryId:'lpa-conversion', steps:[ 'user/register', 'user/login', 'user/das...
define([ 'extensions/collections/conversioncollection' ], function (ConversionCollection) { var ConversionSeries = ConversionCollection.extend({ serviceName:'lasting-power-of-attorney', apiName:'journey', queryId:'lpa-conversion', steps:[ 'step1', 'step2', 'step3', 'step4'...
Improve CLI test mocking using sinon
/** * Copyright 2012 Microsoft Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
/** * Copyright 2012 Microsoft Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
Add a version field into the header.
# The Header class contains the data structure of the Header class, and methods includes encapsulate, and decapsulate. import struct import random from MessageType import MessageType class Header: """docstring for Header""" def __init__(self, type = MessageType.undefined): self.version = 1 sel...
# The Header class contains the data structure of the Header class, and methods includes encapsulate, and decapsulate. import struct import random from MessageType import MessageType class Header: """docstring for Header""" def __init__(self, type = MessageType.undefined): self.type = type sel...
Fix 'ImportError: DLL load failed'
# -*- coding: utf-8 -*- import os import sys import ctypes import platform if platform.system() == 'Windows': lib32 = os.path.join(os.path.dirname(__file__), 'cppinterface', 'lib32') lib64 = os.path.join(os.path.dirname(__file__), 'cppinterface', 'lib64') from glob import glob try: if ctypes.si...
# -*- coding: utf-8 -*- import os import sys import ctypes import platform if platform.system() == 'Windows': lib32 = os.path.join(os.path.dirname(__file__), 'lib32') lib64 = os.path.join(os.path.dirname(__file__), 'lib64') from glob import glob try: if ctypes.sizeof(ctypes.c_voidp) == 4: ...
Allow almost all puppeteer pdf configurations
const puppeteer = require("puppeteer") const defaults = require("../configurations/defaults") const puppeteerArgs = [ "--no-sandbox", "--disable-setuid-sandbox", "--disable-gpu" ] const allowedOptions = [ "scale", "displayHeaderFooter", "printBackground", "format", "landscape", "pageRanges", "wid...
const puppeteer = require("puppeteer") const defaults = require("../configurations/defaults") const puppeteerArgs = [ "--no-sandbox", "--disable-setuid-sandbox", "--disable-gpu" ] const allowedOptions = [ "scale", "printBackground", "margin" ] const formatOptions = options => allowedOptions.reduce((filte...