text
stringlengths
16
4.96k
positive
stringlengths
321
2.24k
negative
stringlengths
310
2.21k
Update test to reflect renamed 'js' and 'css' dirs
/*global describe, beforeEach, it*/ 'use strict'; var path = require('path'); var helpers = require('yeoman-generator').test; describe('bespoke generator', function () { beforeEach(function (done) { helpers.testDirectory(path.join(__dirname, 'temp'), function (err) { if (err) { return done(err...
/*global describe, beforeEach, it*/ 'use strict'; var path = require('path'); var helpers = require('yeoman-generator').test; describe('bespoke generator', function () { beforeEach(function (done) { helpers.testDirectory(path.join(__dirname, 'temp'), function (err) { if (err) { return done(err...
Use more standard package name django-partner-feeds
try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name='django-partner-feeds', version=__import__('partner_feeds').__version__, author_email='ATMOprogrammers@theatlant...
try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name='Partner Feeds', version=__import__('partner_feeds').__version__, author_email='ATMOprogrammers@theatlantic.com'...
Allow POST on settings too
package disallow import ( "net/http" "github.com/rancher/apiserver/pkg/types" "github.com/rancher/steve/pkg/attributes" schema2 "github.com/rancher/steve/pkg/schema" steve "github.com/rancher/steve/pkg/server" ) var ( allowPost = map[string]bool{ "settings": true, } allowPut = map[string]bool{ "features"...
package disallow import ( "net/http" "github.com/rancher/apiserver/pkg/types" "github.com/rancher/steve/pkg/attributes" schema2 "github.com/rancher/steve/pkg/schema" steve "github.com/rancher/steve/pkg/server" ) var ( allowPut = map[string]bool{ "features": true, "settings": true, } ) func Register(serve...
Fix bug that prevents `yo incubator` from working
"use strict"; var yeoman = require("yeoman-generator"); var incSay = require("incubator-say"); var util = require("util"); var path = require("path"); var IncubatorGenerator = module.exports = function IncubatorGenerator () { yeoman.generators.Base.apply(this, arguments); this.argument("appname", { type : Stri...
"use strict"; var yeoman = require("yeoman-generator"); var incSay = require("incubator-say"); var util = require("util"); var path = require("path"); var IncubatorGenerator = module.exports = function IncubatorGenerator (args) { yeoman.generators.Base.apply(this, arguments); this.argument("appname", { type : ...
Sort the list of meeting series by last change descending
import { MeetingSeries } from '/imports/meetingseries' import { Minutes } from '/imports/minutes' Template.meetingSeriesList.onRendered(function () { }); Template.meetingSeriesList.onCreated(function () { }); Template.meetingSeriesList.helpers({ meetingSeriesRow: function () { return MeetingSeries.find({}...
import { MeetingSeries } from '/imports/meetingseries' import { Minutes } from '/imports/minutes' Template.meetingSeriesList.onRendered(function () { }); Template.meetingSeriesList.onCreated(function () { }); Template.meetingSeriesList.helpers({ meetingSeriesRow: function () { return MeetingSeries.find({}...
Fix add live promise problem
import { GraphQLBoolean, GraphQLString } from 'graphql'; import { createClient } from 'redis'; import { redisUrl } from '../../config'; const startLive = { type: GraphQLBoolean, args: { id: { type: GraphQLString }, }, async resolve(fieldName, { id }, context, { rootValue: request }) { const addLivePro...
import { GraphQLBoolean, GraphQLString } from 'graphql'; import { createClient } from 'redis'; import { redisUrl } from '../../config'; const startLive = { type: GraphQLBoolean, args: { id: { type: GraphQLString }, }, resolve(fieldName, { id }, context, { rootValue: request }) { return new Promise((re...
Fix not opening paths with spaces.
#!/usr/bin/env python3 import os import sys import neovim files = [os.path.abspath(arg) for arg in sys.argv[1:]] if not files: sys.exit(1) addr = os.environ.get('NVIM_LISTEN_ADDRESS', None) if not addr: os.execvp('nvim', files) nvim = neovim.attach('socket', path=addr) tbuf = nvim.current.buffer for fname ...
#!/usr/bin/env python3 import os import sys import neovim files = {os.path.abspath(arg) for arg in sys.argv[1:]} if not files: sys.exit(1) addr = os.environ.get('NVIM_LISTEN_ADDRESS', None) if not addr: os.execvp('nvim', files) nvim = neovim.attach('socket', path=addr) tbuf = nvim.current.buffer for fname ...
fabric: Use sudo() function for db migration call
from fabric.api import env, local, cd, run, settings, sudo env.use_ssh_config = True env.hosts = ['root@skylines'] def deploy(branch='master', force=False): push(branch, force) restart() def push(branch='master', force=False): cmd = 'git push %s:/opt/skylines/src/ %s:master' % (env.host_string, branch)...
from fabric.api import env, local, cd, run env.use_ssh_config = True env.hosts = ['root@skylines'] def deploy(branch='master', force=False): push(branch, force) restart() def push(branch='master', force=False): cmd = 'git push %s:/opt/skylines/src/ %s:master' % (env.host_string, branch) if force: ...
Add check for null parameter
/* * Copyright (c) 2016 EMC Corporation. All Rights Reserved. */ package com.emc.ia.sdk.support.io; import java.io.IOException; import java.io.InputStream; import java.util.Objects; import java.util.function.Supplier; import org.apache.commons.io.IOUtils; /** * Provide repeatable access to the same {@linkplain I...
/* * Copyright (c) 2016 EMC Corporation. All Rights Reserved. */ package com.emc.ia.sdk.support.io; import java.io.IOException; import java.io.InputStream; import java.util.function.Supplier; import org.apache.commons.io.IOUtils; /** * Provide repeatable access to the same {@linkplain InputStream} by caching it ...
Extend visualisation period until end of 2015
var moment = require('moment'); // NOTE: month indices are zero-based module.exports.DATA_START_YEAR = 2012; module.exports.DATA_START_MONTH = 0; module.exports.DATA_START_MOMENT = moment([ module.exports.DATA_START_YEAR, module.exports.DATA_START_MONTH]).startOf('month'); module.exports.DATA_END_YEAR = 2015; m...
var moment = require('moment'); // NOTE: month indices are zero-based module.exports.DATA_START_YEAR = 2012; module.exports.DATA_START_MONTH = 0; module.exports.DATA_START_MOMENT = moment([ module.exports.DATA_START_YEAR, module.exports.DATA_START_MONTH]).startOf('month'); module.exports.DATA_END_YEAR = 2015; m...
Resolve files from the /es folder instead of /src
import { resolve } from 'path'; import { removeStartSlash } from './common'; export const rootDirectory = resolve(__dirname, '../../..'); /** * Resolves a file in the root directory of the project using the framework. * * @param fileName - The name of the file to resolve. * @returns The path of the file. */ expo...
import { resolve } from 'path'; import { removeStartSlash } from './common'; export const rootDirectory = resolve(__dirname, '../../..'); /** * Resolves a file in the root directory of the project using the framework. * * @param fileName - The name of the file to resolve. * @returns The path of the file. */ expo...
Apply changes in FOSS because of prioprietary merges
/** * Copyright (C) 2010 Cloud.com, Inc. All rights reserved. * * This software is licensed under the GNU General Public License v3 or later. * * It is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, e...
/** * Copyright (C) 2010 Cloud.com, Inc. All rights reserved. * * This software is licensed under the GNU General Public License v3 or later. * * It is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, e...
Add `parse_value` test for AppleScript dates Added a test case to `parse_value` to parse dates returned in AppleScript responses.
""" test_itunes.py Copyright ยฉ 2015 Alex Danoff. All Rights Reserved. 2015-08-02 This file tests the functionality provided by the itunes module. """ import unittest from datetime import datetime from itunes.itunes import parse_value class ITunesTests(unittest.TestCase): """ Test cases for iTunes functiona...
""" test_itunes.py Copyright ยฉ 2015 Alex Danoff. All Rights Reserved. 2015-08-02 This file tests the functionality provided by the itunes module. """ import unittest from itunes.itunes import parse_value class ITunesTests(unittest.TestCase): """ Test cases for iTunes functionality. """ def test_pa...
fix: Remove index argument while creating order products sample
# importing modules/ libraries import pandas as pd import random import numpy as np # create a sample of prior orders orders_df = pd.read_csv("Data/orders.csv") s = round(3214874 * 0.1) i = sorted(random.sample(list(orders_df[orders_df["eval_set"]=="prior"].index), s)) orders_df.loc[i,:].to_csv("Data/orders_prior_samp...
# importing modules/ libraries import pandas as pd import random import numpy as np # create a sample of prior orders orders_df = pd.read_csv("Data/orders.csv") s = round(3214874 * 0.1) i = sorted(random.sample(list(orders_df[orders_df["eval_set"]=="prior"].index), s)) orders_df.loc[i,:].to_csv("Data/orders_prior_samp...
Cut out blank lines at the start of PyPi README
import os from setuptools import find_packages, setup with open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8') as readme: README = readme.read().split('h1>\n\n', 2)[1] setup( name='django-postgres-extra', version='1.21a4', packages=find_packages(), include_package_data=T...
import os from setuptools import find_packages, setup with open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding='utf-8') as readme: README = readme.read().split('h1>', 2)[1] setup( name='django-postgres-extra', version='1.21a3', packages=find_packages(), include_package_data=True,...
Fix from phone number for US/Canadian messages.
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; var request = require("request"); var querystring = require("querystring"); function Nexmo(options...
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; var request = require("request"); var querystring = require("querystring"); function Nexmo(options...
Fix "Too Many Connections" error during testing See laravel/framework#20340
<?php namespace Laravel\Lumen\Testing; trait DatabaseTransactions { /** * Handle database transactions on the specified connections. * * @return void */ public function beginDatabaseTransaction() { $database = $this->app->make('db'); foreach ($this->connectionsToTransa...
<?php namespace Laravel\Lumen\Testing; trait DatabaseTransactions { /** * Handle database transactions on the specified connections. * * @return void */ public function beginDatabaseTransaction() { $database = $this->app->make('db'); foreach ($this->connectionsToTransa...
Remove "clappr-zepto" external and "publlicPath" from webpack conf
var path = require('path'); var webpack = require('webpack'); var Clean = require('clean-webpack-plugin'); var plugins = [ new Clean(['dist']) ]; module.exports = { entry: path.resolve(__dirname, 'src/index.js'), plugins: plugins, externals: { clappr: 'Clappr' }, module: { loaders: [ { ...
var path = require('path'); var webpack = require('webpack'); var Clean = require('clean-webpack-plugin'); var plugins = [ new Clean(['dist']) ]; module.exports = { entry: path.resolve(__dirname, 'src/index.js'), plugins: plugins, externals: { clappr: 'Clappr', "clappr-zepto": "clappr-zepto" }, mo...
Add the PXE VendorPassthru interface to PXEDracDriver Without the PXE VendorPassthru interface to expose the "pass_deploy_info" method in the vendor_passthru endpoint of the API the DRAC it can't continue the deployment after the ramdisk is booted. Closes-Bug: #1379705 Change-Id: I21042cbb95a486742abfcb430471d01cd73b...
# # 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, software # distributed under...
# # 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, software # distributed under...
Revert previous commit as fuse-python doesn't seem to play nicely with easy_install (at least on Ubuntu). git-svn-id: fdb8975c015a424b33c0997a6b0d758f3a24819f@14 bfab2ddc-a81c-11dd-9a07-0f3041a8e97c
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2008 Jason Davies # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. try: from setuptools import setup except ImportError: from distutils.core impor...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2008 Jason Davies # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. try: from setuptools import setup except ImportError: from distutils.core impor...
Allow chargeToken to be null un paymentForm
<?php namespace PureBilling\Bundle\SDKBundle\Store\V1\Charge; use PureBilling\Bundle\SDKBundle\Store\Base\Element; use Symfony\Component\Validator\Constraints as Assert; use PureBilling\Bundle\SDKBundle\Constraints as PBAssert; use PureMachine\Bundle\SDKBundle\Store\Annotation as Store; class PaymentForm extends Ele...
<?php namespace PureBilling\Bundle\SDKBundle\Store\V1\Charge; use PureBilling\Bundle\SDKBundle\Store\Base\Element; use Symfony\Component\Validator\Constraints as Assert; use PureBilling\Bundle\SDKBundle\Constraints as PBAssert; use PureMachine\Bundle\SDKBundle\Store\Annotation as Store; class PaymentForm extends Ele...
Fix countdown time identifier mistake
module.exports = { 0: { countdown: 0, time: "ืžื™ื™ื“ื™", time_en: "Immediately" }, 15: { countdown: 15, time: "15 ืฉื ื™ื•ืช", time_en: "15 seconds" }, 30: { countdown: 30, time: "30 ืฉื ื™ื•ืช", time_en: "30 seconds" }, 45: { ...
module.exports = { 0: { countdown: 0, time: "ืžื™ื™ื“ื™", time_en: "Immediately" }, 15: { countdown: 15, time: "15 ืฉื ื™ื•ืช", time_en: "15 seconds" }, 30: { countdown: 90, time: "30 ืฉื ื™ื•ืช", time_en: "30 seconds" }, 45: { ...
Add note about sort stability
package filter // Copyright ยฉ2011 Dan Kortschak <dan.kortschak@adelaide.edu.au> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your opti...
package filter // Copyright ยฉ2011 Dan Kortschak <dan.kortschak@adelaide.edu.au> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your opti...
Set register route as public
"use strict"; module.exports = function(){ var user = new app.controllers.user(); return [ { method: 'get', url: '/users', action: user.list, cors: true }, { method: 'get', url: '/users/me', action: us...
"use strict"; module.exports = function(){ var user = new app.controllers.user(); return [ { method: 'get', url: '/users', action: user.list, cors: true }, { method: 'get', url: '/users/me', action: us...
Datalogger: Fix trivial off by 1 in the livestream datalogger example
from pymoku import Moku, MokuException, NoDataException from pymoku.instruments import * import time, logging, traceback logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s') logging.getLogger('pymoku').setLevel(logging.INFO) # Use Moku.get_by_serial() or get_by_name() if you don't know the IP...
from pymoku import Moku, MokuException, NoDataException from pymoku.instruments import * import time, logging, traceback logging.basicConfig(format='%(asctime)s:%(name)s:%(levelname)s::%(message)s') logging.getLogger('pymoku').setLevel(logging.INFO) # Use Moku.get_by_serial() or get_by_name() if you don't know the IP...
Fix JavaDoc "Cannot resolved symbol" issues.
package nerd.tuxmobil.fahrplan.congress.base; import android.support.v4.app.ListFragment; import nerd.tuxmobil.fahrplan.congress.models.Lecture; /** * A fragment representing a list of Items. * <p/> * Large screen devices (such as tablets) are supported by replacing the ListView * with a GridView. * <p/> * Ac...
package nerd.tuxmobil.fahrplan.congress.base; import android.support.v4.app.ListFragment; import nerd.tuxmobil.fahrplan.congress.models.Lecture; /** * A fragment representing a list of Items. * <p/> * Large screen devices (such as tablets) are supported by replacing the ListView * with a GridView. * <p/> * Ac...
Remove 300 ms additional delay
var NotificationController = SingleModelController.createComponent("NotificationController"); NotificationController.defineAlias("model", "notification"); NotificationController.defineMethod("initView", function initView() { if (!this.view) return; this.view.classList.add("hidden"); setElementProperty(this.v...
var NotificationController = SingleModelController.createComponent("NotificationController"); NotificationController.defineAlias("model", "notification"); NotificationController.defineMethod("initView", function initView() { if (!this.view) return; this.view.classList.add("hidden"); setElementProperty(this.v...
Add tab key to list of keycodes
// Keyboard keycodes export const keyCodes = { TAB: 9, ENTER: 13, ESCAPE: 27, SPACE: 32, LEFT_ARROW: 37, UP_ARROW: 38, RIGHT_ARROW: 39, DOWN_ARROW: 40 }; // Classnames likely to be shared across modules export const defaultClassNames = { IS_ACTIVE: 'is-active', IS_HIDDEN: 'is-h...
// Keyboard keycodes export const keyCodes = { ESCAPE: 27, ENTER: 13, SPACE: 32, LEFT_ARROW: 37, UP_ARROW: 38, RIGHT_ARROW: 39, DOWN_ARROW: 40 }; // Classnames likely to be shared across modules export const defaultClassNames = { IS_ACTIVE: 'is-active', IS_HIDDEN: 'is-hidden', ...
Cover case we have an error exception
<?php namespace PhpSpec\Wrapper\Subject\Expectation; use Exception; use PhpSpec\Exception\Example\ErrorException; use PhpSpec\Util\Instantiator; use PhpSpec\Wrapper\Subject\WrappedObject; use PhpSpec\Wrapper\Unwrapper; class ConstructorDecorator extends Decorator implements ExpectationInterface { private $unwrap...
<?php namespace PhpSpec\Wrapper\Subject\Expectation; use Exception; use PhpSpec\Util\Instantiator; use PhpSpec\Wrapper\Subject\WrappedObject; use PhpSpec\Wrapper\Unwrapper; class ConstructorDecorator extends Decorator implements ExpectationInterface { private $unwrapper; public function __construct(Expectat...
Fix bug where the included template was unattached from it's data
var angularMeteorTemplate = angular.module('angular-blaze-template', []); // blaze-template adds Blaze templates to Angular as directives angularMeteorTemplate.directive('blazeTemplate', [ '$compile', function ($compile) { return { restrict: 'AE', scope: false, link: function (scope, element,...
var angularMeteorTemplate = angular.module('angular-blaze-template', []); // blaze-template adds Blaze templates to Angular as directives angularMeteorTemplate.directive('blazeTemplate', [ '$compile', function ($compile) { return { restrict: 'AE', scope: false, link: function (scope, element,...
Check For Empty String On Page Title Update This commit fixes #8
<?php class ReeCreate_PageTitle_Model_Observer { /** * Change product or category page titles * * @pram Varien_Event_Observer $observer * @return ReeCreate_PageTitle_Model_Observer */ public function controller_action_layout_generate_blocks_after(Varien_Event_Observer $observer) { ...
<?php class ReeCreate_PageTitle_Model_Observer { /** * Change product or category page titles * * @pram Varien_Event_Observer $observer * @return ReeCreate_PageTitle_Model_Observer */ public function controller_action_layout_generate_blocks_after(Varien_Event_Observer $observer) { ...
Add additional CRUD functions to Quiz class
from database import QuizDB db = QuizDB(host=config.REDIS_HOST, port=config.REDIS_PORT) class Quiz(Base): def __init__(self, id): self.id = id QUESTION_HASH = "{0}:question".format(self.id) ANSWER_HASH = "{0}:answer".format(self.id) def new_card(self, question, answer): assert db.hl...
from database import QuizDB db = QuizDB(host=config.REDIS_HOST, port=config.REDIS_PORT) class Quiz(Base): def __init__(self, id): self.id = id QUESTION_HASH = "{0}:question".format(self.id) ANSWER_HASH = "{0}:answer".format(self.id) def new_card(self, question, answer): assert db.hl...
Upgrade tangled.web 0.1a10 => 1.0a12
from setuptools import setup setup( name='tangled.mako', version='1.0a4.dev0', description='Tangled Mako integration', long_description=open('README.rst').read(), url='http://tangledframework.org/', download_url='https://github.com/TangledWeb/tangled.mako/tags', author='Wyatt Baldwin', ...
from setuptools import setup setup( name='tangled.mako', version='1.0a4.dev0', description='Tangled Mako integration', long_description=open('README.rst').read(), url='http://tangledframework.org/', download_url='https://github.com/TangledWeb/tangled.mako/tags', author='Wyatt Baldwin', ...
Update expected icon name in tests
const assert = require('assert'); const Account = require('../Contents/Scripts/account.js').Account; const PullRequest = require('../Contents/Scripts/pull-request.js').PullRequest; const Repository = require('../Contents/Scripts/repository.js').Repository; describe('PullRequest', function() { let number = '42'...
const assert = require('assert'); const Account = require('../Contents/Scripts/account.js').Account; const PullRequest = require('../Contents/Scripts/pull-request.js').PullRequest; const Repository = require('../Contents/Scripts/repository.js').Repository; describe('PullRequest', function() { let number = '42'...
Change minimum value of minimum content width
'use babel'; import Controller from './controller.js'; export default { config: { grammars: { order : 1, type : 'array', default: ['source.gfm', 'text.md'], items : { type: 'string' } }, minimumContentWidth: { order : 2, type : 'integer', de...
'use babel'; import Controller from './controller.js'; export default { config: { grammars: { order : 1, type : 'array', default: ['source.gfm', 'text.md'], items : { type: 'string' } }, minimumContentWidth: { order : 2, type : 'integer', de...
Fix object creation 5.3 compatible
<?php /** * Class MagicTest */ class MagicTest extends PHPUnit_Framework_TestCase { /** * */ public function testAssertIsInvokable() { $this->assertInstanceOf('\Invokable', new ExampleClass()); } /** * */ public function testAssertStringifiable() { $th...
<?php /** * Class MagicTest */ class MagicTest extends PHPUnit_Framework_TestCase { /** * */ public function testAssertIsInvokable() { $this->assertInstanceOf('\Invokable', new ExampleClass()); } /** * */ public function testAssertStringifiable() { $th...
Fix logic for retrieving test suite id
define([ 'underscore', 'backbone', 'models/core/BaseModel', ], function(_, Backbone, BaseModel) { var TestSuiteModel = BaseModel.extend({ defaults: { id: null, project_id: 1, name: 'No test suite name', description: 'No description', ...
define([ 'underscore', 'backbone', 'models/core/BaseModel', ], function(_, Backbone, BaseModel) { var TestSuiteModel = BaseModel.extend({ defaults: { id: null, project_id: 1, name: 'No test suite name', description: 'No description', ...
Switch from staging to production.
(function($) { var baseUrl = 'https://api.cloudmine.me/v1/app/'; $.cm = { getJSON: function(appid, apikey, keys, callback) { var url = baseUrl + appid + '/text'; $.ajax(url, { headers: { 'X-CloudMine-ApiKey': apikey }, success: callback }); }, replaceJSON: function(...
(function($) { var baseUrl = 'https://api-staging.cloudmine.me/v1/app/'; $.cm = { getJSON: function(appid, apikey, keys, callback) { var url = baseUrl + appid + '/text'; $.ajax(url, { headers: { 'X-CloudMine-ApiKey': apikey }, success: callback }); }, replaceJSON: f...
Fix javascript bug that was causing parts to be overridden Don't use last-child to figure out what the last fieldset, instead do a general selection and use jQuery.last() to pull out the final element. The previous method was actually matching the first element
var formtastic_ids = {}; $(function () { $('.add-associated').click(function () { elem = $(this); var target_id = elem.data('target'); var target = $('#' + target_id); var template_id = elem.data('tmpl_id'); template_contents = $('#' + template_id).html(); if (typeof(formtastic_ids[template...
var formtastic_ids = {}; $(function () { $('.add-associated').click(function () { elem = $(this); var target_id = elem.data('target'); var target = $('#' + target_id); var template_id = elem.data('tmpl_id'); template_contents = $('#' + template_id).html(); if (typeof(formtastic_ids[template...
:wrench: Add loading check for Login container
import React, { Component, PropTypes } from 'react'; import { Link } from 'react-router'; import { get } from 'axios'; import FlintLogo from 'components/FlintLogo'; import './LoginContainer.scss'; import { siteName } from '../../../config'; export default class LoginContainer extends Component { static propTypes = {...
import React, { Component, PropTypes } from 'react'; import { Link } from 'react-router'; import { get } from 'axios'; import FlintLogo from 'components/FlintLogo'; import './LoginContainer.scss'; import { siteName } from '../../../config'; export default class LoginContainer extends Component { static propTypes = {...
Add parent loading of beforeFilter
<?php /** * CakeManager (http://cakemanager.org) * Copyright (c) http://cakemanager.org * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * * @copyright Copyright (c) http://cakemanag...
<?php /** * CakeManager (http://cakemanager.org) * Copyright (c) http://cakemanager.org * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * * @copyright Copyright (c) http://cakemanag...
Add minimize task to default
//Import dependencies var gulp = require('gulp'); var concat = require('gulp-concat'); var uglify = require('gulp-uglify'); var rename = require('gulp-rename'); var header = require('gulp-header'); //Import the package var pkg = require('./package.json'); //Generate the header var banner = ['/**', ' * <%= pkg.name ...
//Import dependencies var gulp = require('gulp'); var concat = require('gulp-concat'); var uglify = require('gulp-uglify'); var rename = require('gulp-rename'); var header = require('gulp-header'); //Import the package var pkg = require('./package.json'); //Generate the header var banner = ['/**', ' * <%= pkg.name ...
Make the failing test pass
defaultConf = { height: 100, width: 300, fingerprintLength: 4 }; describe("The constructor is supposed a proper Captcha object", function() { it('Constructor Captcha exists', function(){ expect(Captcha).toBeDefined(); }); var captcha = new Captcha(); it("Captcha object is not null",...
defaultConf = { height: 100, width: 300, fingerprintLength: 20 }; describe("The constructor is supposed a proper Captcha object", function() { it('Constructor Captcha exists', function(){ expect(Captcha).toBeDefined(); }); var captcha = new Captcha(); it("Captcha object is not null"...
Update for compatibility with pyes==0.19.1
from flask import g from annotator.annotation import Annotation as Annotation_ from annotator.authz import permissions_filter class Annotation(Annotation_): @classmethod def stats_for_user(cls, user): stats = {} q = {'query': {'match_all': {}}, 'filter': {'and': [permissions_fil...
from flask import g from annotator.annotation import Annotation as Annotation_ from annotator.authz import permissions_filter class Annotation(Annotation_): @classmethod def stats_for_user(cls, user): stats = {} q = {'query': {'match_all': {}}, 'filter': {'and': [permissions_fil...
Use lazy URL generator as to prevent construction race
<?php namespace Bolt\Provider; use Bolt\Routing\Canonical; use Silex\Application; use Silex\ServiceProviderInterface; /** * Canonical service provider. * * @author Carson Full <carsonfull@gmail.com> */ class CanonicalServiceProvider implements ServiceProviderInterface { public function register(Application $...
<?php namespace Bolt\Provider; use Bolt\Routing\Canonical; use Silex\Application; use Silex\ServiceProviderInterface; /** * Canonical service provider. * * @author Carson Full <carsonfull@gmail.com> */ class CanonicalServiceProvider implements ServiceProviderInterface { public function register(Application $...
[r=jtv] Switch Azure provider over to loggo logging.
// Copyright 2013 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package azure import ( "launchpad.net/juju-core/environs" "launchpad.net/juju-core/environs/config" "launchpad.net/juju-core/instance" "launchpad.net/loggo" ) // Logger for the Azure provider. var logger = loggo.GetLogge...
// Copyright 2013 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package azure import ( "launchpad.net/juju-core/environs" "launchpad.net/juju-core/environs/config" "launchpad.net/juju-core/instance" "launchpad.net/juju-core/log" ) type azureEnvironProvider struct{} // azureEnvironPr...
Fix order of components of shift FITS and bumpy have opposite conventions as to which axis is the first axis
from image import ImageWithWCS import numpy as np from os import path def shift_images(files, source_dir, output_file='_shifted'): """Align images based on astrometry.""" ref = files[0] # TODO: make reference image an input ref_im = ImageWithWCS(path.join(source_dir, ref)) ref_pix = np.int32(np.arra...
from image import ImageWithWCS import numpy as np from os import path def shift_images(files, source_dir, output_file='_shifted'): """Align images based on astrometry.""" ref = files[0] # TODO: make reference image an input ref_im = ImageWithWCS(path.join(source_dir, ref)) ref_pix = np.int32(np.arra...
Remove "Parse error, " from error messages
# -*- coding: utf-8 -*- # php.py - sublimelint package for checking php files import re from base_linter import BaseLinter CONFIG = { 'language': 'php', 'executable': 'php', 'lint_args': ('-l', '-d display_errors=On') } class Linter(BaseLinter): def parse_errors(self, view, errors, lines, errorUnde...
# -*- coding: utf-8 -*- # php.py - sublimelint package for checking php files import re from base_linter import BaseLinter CONFIG = { 'language': 'php', 'executable': 'php', 'lint_args': ('-l', '-d display_errors=On') } class Linter(BaseLinter): def parse_errors(self, view, errors, lines, errorUnde...
Remove unused method and add some javadoc.
package com.github.pedrovgs.nox.path; /** * Spiral Path implementation used to place NoxItem objects in a equiangular spiral starting from * the center of the view. NoxItem instances in this path will have the same size. This path is * based on the Archimedean Spiral. * * @author Pedro Vicente Gomez Sanchez. */ ...
package com.github.pedrovgs.nox.path; /** * Spiral Path implementation used to place NoxItem objects in a equiangular spiral starting from * the center of the view. NoxItem instances in this path will have the same size. * * @author Pedro Vicente Gomez Sanchez. */ class SpiralPath extends Path { SpiralPath(Pat...
Update 'install_requires' to right versions
from setuptools import setup, find_packages setup( name='django-facebook', version='0.1', description='Replace Django Authentication with Facebook', long_description=open('README.md').read(), author='Aidan Lister', author_email='aidan@php.net', url='http://github.com/pythonforfacebook/djang...
from setuptools import setup, find_packages setup( name='django-facebook', version='0.1', description='Replace Django Authentication with Facebook', long_description=open('README.md').read(), author='Aidan Lister', author_email='aidan@php.net', url='http://github.com/pythonforfacebook/djang...
Fix system module integration tests
/* * Copyright (C) 2018 the original author or authors. * * This file is part of jBB Application Project. * * Licensed under the Apache License, Version 2.0 (the "License"); * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 */ package org.jbb.system.impl; import o...
/* * Copyright (C) 2018 the original author or authors. * * This file is part of jBB Application Project. * * Licensed under the Apache License, Version 2.0 (the "License"); * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 */ package org.jbb.system.impl; import o...
Break chaining into different lines and change string to single quotes * Keep styling in file consistent..
var gulp = require('gulp'); var browserify = require('browserify'); var source = require('vinyl-source-stream'); var imagemin = require('gulp-imagemin'); var open = require('gulp-open'); gulp.task('scripts', function () { return browserify('./js/main.js') .bundle() .pipe(source('bundle.js')) .pipe(gulp.d...
var gulp = require('gulp'); var browserify = require('browserify'); var source = require('vinyl-source-stream'); var imagemin = require('gulp-imagemin'); var open = require('gulp-open'); gulp.task('scripts', function () { return browserify('./js/main.js') .bundle() .pipe(source('bundle.js')) .pipe(gulp.d...
Update up to changes in es5-ext
'use strict'; var Assert = require('test/assert').Assert , bindMethods = require('es5-ext/lib/Object/plain/bind-methods').call , merge = require('es5-ext/lib/Object/plain/merge').call , never, neverBind; never = function (message) { this.fail({ message: message, operator: "never" }); }; neverBind = fun...
'use strict'; var Assert = require('test/assert').Assert , bindMethods = require('es5-ext/lib/Object/bind-methods').call , merge = require('es5-ext/lib/Object/plain/merge').call , never, neverBind; never = function (message) { this.fail({ message: message, operator: "never" }); }; neverBind = function ...
Stop showing atomic block in "All" example
import React from 'react'; import ReactDOM from 'react-dom'; import DraftailEditor, { BLOCK_TYPE, INLINE_STYLE } from '../lib'; import allContentState from './utils/allContentState'; const mount = document.querySelector('[data-mount-all]'); const onSave = contentState => { sessionStorage.setItem('all:contentSta...
import React from 'react'; import ReactDOM from 'react-dom'; import DraftailEditor, { BLOCK_TYPE, INLINE_STYLE } from '../lib'; import allContentState from './utils/allContentState'; const mount = document.querySelector('[data-mount-all]'); const onSave = contentState => { sessionStorage.setItem('all:contentSta...
Fix weird character issues by hard-coding to UTF-8
package haushaltsbuch.controllers; import java.io.IOException; import java.util.Locale; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servle...
package haushaltsbuch.controllers; import java.io.IOException; import java.util.Locale; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servle...
Allow for passing in a simple string as the name of a logger
var std = require('std') // TODO Send email on error module.exports = std.Class(function() { var defaults = { name: 'Logger' } this._init = function(opts) { if (typeof opts == 'string') { opts = { name:opts } } opts = std.extend(opts, defaults) this._name = opts.name this._emailQueue = [] } this.log ...
var std = require('std') // TODO Send email on error module.exports = std.Class(function() { var defaults = { name: 'Logger' } this._init = function(opts) { opts = std.extend(opts, defaults) this._name = opts.name this._emailQueue = [] } this.log = function() { this._consoleLog(std.slice(arguments)) ...
Switch to the new github release download links
#!/usr/bin/env python from setuptools import setup def read(filename): return open(filename).read() setup(name="lzo-indexer", version="0.0.1", description="Library for indexing LZO compressed files", long_description=read("README.md"), author="Tom Arnfeld", author_email="tom@duedil.com", ...
#!/usr/bin/env python from setuptools import setup def read(filename): return open(filename).read() setup(name="lzo-indexer", version="0.0.1", description="Library for indexing LZO compressed files", long_description=read("README.md"), author="Tom Arnfeld", author_email="tom@duedil.com", ...
Use isset instead of empty
<?php defined('SYSPATH') or die('No direct script access.'); class MustacheView { protected $values; public $name; public function __construct($name) { $this->name = $name; } public function __get($key) { if (!isset($this->values[$key])) return false; return $this->values[$key]; } public function ...
<?php defined('SYSPATH') or die('No direct script access.'); class MustacheView { protected $values; public $name; public function __construct($name) { $this->name = $name; } public function __get($key) { if (empty($this->values[$key])) return false; return $this->values[$key]; } public function _...
Add a way of listing commands
from argparse import ArgumentParser import yaml from .runner import Runner def parse_variables(args): variables = {} if args is not None: for variable in args: tokens = variable.split('=') name = tokens[0] value = '='.join(tokens[1:]) variables[name] ...
from argparse import ArgumentParser import yaml from .runner import Runner def parse_variables(args): variables = {} if args is not None: for variable in args: tokens = variable.split('=') name = tokens[0] value = '='.join(tokens[1:]) variables[name] ...
Remove keyword argument and allow generic argument passing.
from django.forms.widgets import Select class LayoutSelector(Select): """ Modified `Select` class to select the original value. This was adapted from `fluent_pages/pagetypes/fluent_pages/widgets .py` in the `django-fluent-pages` app. """ def render(self, name, value, attrs=None, *args, **kwar...
from django.forms.widgets import Select class LayoutSelector(Select): """ Modified `Select` class to select the original value. This was adapted from `fluent_pages/pagetypes/fluent_pages/widgets .py` in the `django-fluent-pages` app. """ def render(self, name, value, attrs=None, choices=()): ...
Move projects dropdown to Bootstrap list-group
import React from 'react'; const Projects = props => { return ( <div className="projects list-group"> {Object.keys(props.projects).map(projectId => { const ticket = props.projects[projectId][0]; return ( <button key={projectId} type="button" cla...
import React from 'react'; const Projects = props => { return ( <ul className="projects"> {Object.keys(props.projects).map(projectId => { const ticket = props.projects[projectId][0]; return ( <li key={projectId}> {ticket.company.name} &mdash; <button ...
Add some Java 8-isms to coverage merger.
package com.squareup.spoon; import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.Set; import org.jacoco.core.tools.ExecFileLoader; import static com.google.common.collect.Collections2.transform; import static com.squareup.spoon.SpoonDeviceRunner.COVERAGE_DIR; import static co...
package com.squareup.spoon; import com.google.common.base.Function; import org.jacoco.core.tools.ExecFileLoader; import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.Set; import static com.google.common.collect.Collections2.transform; import static com.squareup.spoon.SpoonDe...
Check if the optional family field is null before attempting to insert.
/** * */ package ca.eandb.sortable; import java.util.LinkedList; import java.util.List; import ca.eandb.sortable.Product.Field; /** * @author brad * */ public final class ProductTrieBuilder implements ProductVisitor { private final TrieNode root = new TrieNode(); /*(non-Javadoc) * @see ca.eandb.sortable...
/** * */ package ca.eandb.sortable; import java.util.LinkedList; import java.util.List; import ca.eandb.sortable.Product.Field; /** * @author brad * */ public final class ProductTrieBuilder implements ProductVisitor { private final TrieNode root = new TrieNode(); /*(non-Javadoc) * @see ca.eandb.sortable...
Fix Controller class not found
<?php namespace BuzzwordCompliant\FAQs\Controllers; use Backend\Classes\Controller; use Backend\Facades\BackendMenu; use Illuminate\Http\Request; class FAQs extends Controller { public function __construct() { parent::__construct(); BackendMenu::setContext('BuzzwordCompliant.FAQs', 'faqs'); ...
<?php namespace BuzzwordCompliant\FAQs\Controllers; use Backend\Facades\BackendMenu; use Illuminate\Http\Request; class FAQs extends Controller { public function __construct() { parent::__construct(); BackendMenu::setContext('BuzzwordCompliant.FAQs', 'faqs'); } public $implement = [ ...
[connected_components/javascript] Replace fat arrow by traditional function for clarity
export class AdjacencyList { constructor(graph) { this.a = constructAdjacencyList(graph); } depthFirstSearch(start, earlyCallback) { depthFirstSearch(this.a, start, earlyCallback); } } function constructAdjacencyList(graph) { // new Array(vertexCount).fill([]) does not work because ...
export class AdjacencyList { constructor(graph) { this.a = constructAdjacencyList(graph); } depthFirstSearch(start, earlyCallback) { depthFirstSearch(this.a, start, earlyCallback); } } function constructAdjacencyList(graph) { // new Array(vertexCount).fill([]) does not work because ...
Enable dummy promise return until verifyContactExists actually works
var Q = require('q'); /** * Confirms that the supplied ID is a valid number. * @param {string} id String to confirm is a valid integer * @returns {Q.promise} containing value of the ID number as integer */ function verifyNumberIsInteger(id) { let deferred = Q.defer() if (id == "0"){ deferred.resolv...
var Q = require('q'); /** * Confirms that the supplied ID is a valid number. * @param {string} id String to confirm is a valid integer * @returns {Q.promise} containing value of the ID number as integer */ function verifyNumberIsInteger(id) { let deferred = Q.defer() if (id == "0"){ deferred.resolv...
Correct the darklang migration, since many darklang configs can exist.
# -*- coding: utf-8 -*- from __future__ import unicode_literals # Converted from the original South migration 0002_enable_on_install.py # from django.db import migrations, models def create_dark_lang_config(apps, schema_editor): """ Enable DarkLang by default when it is installed, to prevent accidental r...
# -*- coding: utf-8 -*- from __future__ import unicode_literals # Converted from the original South migration 0002_enable_on_install.py # from django.db import migrations, models def create_dark_lang_config(apps, schema_editor): """ Enable DarkLang by default when it is installed, to prevent accidental r...
Add version constraint for marshmallow
#!/usr/bin/env python import os from setuptools import setup def read(fname): with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), fname), 'r') as infile: content = infile.read() return content setup( name='marshmallow-polyfield', version=5.0, description='An unofficial ext...
#!/usr/bin/env python import os from setuptools import setup def read(fname): with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), fname), 'r') as infile: content = infile.read() return content setup( name='marshmallow-polyfield', version=5.0, description='An unofficial ext...
Load petstore if library contains no documents
<?php namespace Alt3\Swagger\Controller; use Cake\Core\Configure; use Cake\Core\Exception; use Cake\Routing\Router; /** * UiController class responsible for serving the swagger-ui template page. * * @package Alt3\Swagger\Controller */ class UiController extends AppController { /** * Index action used fo...
<?php namespace Alt3\Swagger\Controller; use Cake\Core\Configure; use Cake\Core\Exception; use Cake\Routing\Router; /** * UiController class responsible for serving the swagger-ui template page. * * @package Alt3\Swagger\Controller */ class UiController extends AppController { /** * Index action used fo...
Watermark for WRLD branding. Also fixes a bug where the micello logo is not displayed due to case sensitivity. Pair: Malc
var IndoorWatermarkController = function() { var _indoorWatermarkElement = null; var _elementId = "eegeo-indoor-map-watermark"; var _urlRoot = "https://cdn-webgl.eegeo.com/eegeojs/resources/indoor-vendors/"; var _buildUrlForVendor = function(vendorKey) { var vendorKeyLower = vendorKey.toLowerCase(); if...
var IndoorWatermarkController = function() { var _indoorWatermarkElement = null; var _elementId = "eegeo-indoor-map-watermark"; var _urlRoot = "https://cdn-webgl.eegeo.com/eegeojs/resources/indoor-vendors/"; var _buildUrlForVendor = function(vendorKey) { return _urlRoot + vendorKey + "_logo.png"; }; v...
Fix deleting old request to VK.
<?php namespace Helldar\Vk\Commands; use Carbon\Carbon; use Helldar\Vk\Models\VkRequest; use Illuminate\Console\Command; class VkRequestsClear extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'vk:queue-clear'; /** *...
<?php namespace Helldar\Vk\Commands; use Carbon\Carbon; use Helldar\Vk\Models\VkRequest; use Illuminate\Console\Command; class VkRequestsClear extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'vk:queue-clear'; /** *...
Refactor [description] property to not require
/** * Places.js * * @description :: TODO: You might write a short summary of how this model works and what it represents here. * @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models */ module.exports = { //connection: 'db_server', //configurations to disale UpdateAt and CreatedAt Wa...
/** * Places.js * * @description :: TODO: You might write a short summary of how this model works and what it represents here. * @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models */ module.exports = { //connection: 'db_server', //configurations to disale UpdateAt and CreatedAt Wa...
Fix the missing host variable
'use strict'; const Promise = require('bluebird'); const pg = require('pg'); const database = JSON.parse( process.env.PLATFORM_RELATIONSHIPS ? new Buffer(process.env.PLATFORM_RELATIONSHIPS, 'base64').toString('ascii') : // Development settings JSON.stringify({ database: [{ ...
'use strict'; const Promise = require('bluebird'); const pg = require('pg'); const database = JSON.parse( process.env.PLATFORM_RELATIONSHIPS ? new Buffer(process.env.PLATFORM_RELATIONSHIPS, 'base64').toString('ascii') : // Development settings JSON.stringify({ database: [{ ...
Use $log in error service
(function() { 'use strict'; angular.module('chaise.errors', []) // Factory for each error type .factory('ErrorService', ['$log', function ErrorService($log) { function error409(error) { // retry logic // passthrough to app for now } // Special behavior...
(function() { 'use strict'; angular.module('chaise.errors', []) // Factory for each error type .factory('ErrorService', [function ErrorService() { function error409(error) { // retry logic // passthrough to app for now } // Special behavior for handlin...
test(lorax): Add config reset for linkToIssue tests
var lorax = require('../index'); var linkToIssue = lorax.linkToIssue; exports.linkToIssueTest = { tearDown: function(callback) { lorax.config.reset(); callback(); }, basicTest: function(test) { var output = linkToIssue('123'); test.equal(output, '[#123](https://github.com/adrianlee44/lorax/i...
var lorax = require('../index'); var linkToIssue = lorax.linkToIssue; exports.linkToIssueTest = { basicTest: function(test) { var output = linkToIssue('123'); test.equal(output, '[#123](https://github.com/adrianlee44/lorax/issues/123)'); test.done(); }, noUrlTest: function(test) { lorax.conf...
Set hostname only when not already present
/* Copyright 2016 Nationale-Nederlanden 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...
/* Copyright 2016 Nationale-Nederlanden 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...
Change the redis returner to better use data structures
''' Return data to a redis server This is a VERY simple example for pushing data to a redis server and is not nessisarily intended as a usable interface. ''' import redis import json __opts__ = { 'redis.host': 'mcp', 'redis.port': 6379, 'redis.db': '0', } def returner(r...
''' Return data to a redis server This is a VERY simple example for pushing data to a redis server and is not nessisarily intended as a usable interface. ''' import redis import json __opts__ = { 'redis.host': 'mcp', 'redis.port': 6379, 'redis.db': '0', } def returner(r...
Fix problem with convention import
import {Origin} from 'aurelia-metadata'; import JadeView from './jade'; /** Retrieves a `.jade`-type view via usual convention used by `ConventionView`. @class JadeConventionView @extends JadeView @param viewModel {Object} ViewModel to determine viewUrl by convention from @param [isCompiled] {Boolean} If true, will ...
import {Origin} from 'aurelia-metadata'; import {JadeView} from './jade'; /** Retrieves a `.jade`-type view via usual convention used by `ConventionView`. @class JadeConventionView @extends JadeView @param viewModel {Object} ViewModel to determine viewUrl by convention from @param [isCompiled] {Boolean} If true, wil...
10: Test all scripts on Windows Task-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/10
###### # Class for Menus # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # class cnxMenu: def __init__( self ): self.menuitems = [] ...
###### # Class for Menus # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # class cnxMenu: def __init__( self ): self.menuitems = [] ...
Remove dependence on sgapi (since we can use shotgun_api3 as well)
from setuptools import setup, find_packages setup( name='sgevents', version='0.1-dev', description='A simplifying Shotgun event daemon', url='http://github.com/westernx/sgevents', packages=find_packages(exclude=['build*', 'tests*']), author='Mike Boers', author_email='sgevents@mi...
from setuptools import setup, find_packages setup( name='sgevents', version='0.1-dev', description='A simplifying Shotgun event daemon', url='http://github.com/westernx/sgevents', packages=find_packages(exclude=['build*', 'tests*']), author='Mike Boers', author_email='sgevents@mi...
Set timer to poll for weather data.
var http = require("http"); var log4js = require("log4js"); var logger = log4js.getLogger("OpenWeatherMapAdapter"); var Q = require("q"); var _ = require("lodash"); var request = require("request"); var WeatherInterface = require("../utils/OpenWeatherMapInterface"); function OpenWeatherMapAdapter(options) { logger.i...
var http = require("http"); var log4js = require("log4js"); var logger = log4js.getLogger("OpenWeatherMapAdapter"); var Q = require("q"); var _ = require("lodash"); var request = require("request"); var WeatherInterface = require("../utils/OpenWeatherMapInterface"); function OpenWeatherMapAdapter(options) { logger.i...
Add docstring. 4 spaces for consistency.
#!/usr/bin/env python # -*- coding: utf-8 -*- """ cookiecutter.utils ------------------ Helper functions used throughout Cookiecutter. """ import errno import os import sys import contextlib PY3 = sys.version > '3' if PY3: pass else: import codecs def make_sure_path_exists(path): """ Ensures that...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ cookiecutter.utils ------------------ Helper functions used throughout Cookiecutter. """ import errno import os import sys import contextlib PY3 = sys.version > '3' if PY3: pass else: import codecs def make_sure_path_exists(path): """ Ensures that...
[FIX] Fix test after renaming the company name
<?php namespace N98\Magento\Command; use N98\Magento\Command\PHPUnit\TestCase; use Symfony\Component\Console\Tester\CommandTester; class ListCommandTest extends TestCase { public function testExecute() { $command = $this->getApplication()->find('list'); $commandTester = new CommandTester($co...
<?php namespace N98\Magento\Command; use N98\Magento\Command\PHPUnit\TestCase; use Symfony\Component\Console\Tester\CommandTester; class ListCommandTest extends TestCase { public function testExecute() { $command = $this->getApplication()->find('list'); $commandTester = new CommandTester($co...
Use uint64 for bandwidth capability Signed-off-by: Johannes M. Scheuermann <84221072773eb526ff46440bf01afde36bd32e36@gmail.com>
/* Copyright The containerd 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 applicable law or agreed to...
/* Copyright The containerd 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 applicable law or agreed to...
Use linear models by default
import data import model import numpy as np from keras import optimizers # Localize data through file system relative indexing method path = 'hcp_olivier/102816/MNINonLinear/Results/rfMRI_REST1_LR/rfMRI_REST1_LR.npy' # Use data loading library to load data a, b, y = data.generate_learning_set(np.load(path)) # Gener...
import data import model import numpy as np from keras import optimizers # Localize data through file system relative indexing method path = 'hcp_olivier/102816/MNINonLinear/Results/rfMRI_REST1_LR/rfMRI_REST1_LR.npy' # Use data loading library to load data a, b, y = data.generate_learning_set(np.load(path)) # Gener...
Add IL relevant article body links
$(function() { // Body headings $('h1.juttuotsikko span.otsikko:last-of-type').each(function() { // Some of the center title spans on Iltalehti have manual <br /> elements // inside of them, which our satanify plugin isn't smart enough to handle // yet. Hack around it with this for now. var contents...
$(function() { // Body headings $('h1.juttuotsikko span.otsikko:last-of-type').each(function() { // Some of the center title spans on Iltalehti have manual <br /> elements // inside of them, which our satanify plugin isn't smart enough to handle // yet. Hack around it with this for now. var contents...
openstack: Disable template rendering for OpenStack
package machines import ( "bytes" "encoding/base64" "text/template" "github.com/pkg/errors" ) var userDataListTmpl = template.Must(template.New("user-data-list").Parse(` kind: List apiVersion: v1 metadata: resourceVersion: "" selfLink: "" items: {{- range $name, $content := . }} - apiVersion: v1 kind: Secr...
package machines import ( "bytes" "encoding/base64" "text/template" "github.com/pkg/errors" ) var userDataListTmpl = template.Must(template.New("user-data-list").Parse(` kind: List apiVersion: v1 metadata: resourceVersion: "" selfLink: "" items: {{- range $name, $content := . }} - apiVersion: v1 kind: Secr...
Remove dependency to jQuery library
(function(window) { "use strict"; var prev = window.oops || null, curr = function(){}; curr.prev = function(){ return prev; }; curr.typing = { isObject: function( value, strict ){ var result = ( typeof value === 'object' ); strict = strict || false; result = result || ( strict ? false : (...
(function($, window) { "use strict"; var prev = window.oops || null, curr = function(){}; curr.prev = function(){ return prev; }; curr.typing = { isObject: function( value, strict ){ var result = ( typeof value === 'object' ); strict = strict || false; result = result || ( strict ? false ...
Use implicit ordering of AsyncIndicator model
from __future__ import absolute_import from __future__ import division from datetime import datetime from django.db.models import Min from corehq.apps.userreports.models import AsyncIndicator from corehq.apps.userreports.reports.view import CustomConfigurableReport class MonitoredReport(CustomConfigurableReport): ...
from __future__ import absolute_import from __future__ import division from datetime import datetime from django.db.models import Min from corehq.apps.userreports.models import AsyncIndicator from corehq.apps.userreports.reports.view import CustomConfigurableReport class MonitoredReport(CustomConfigurableReport): ...
Unittests: Remove some more unneccesary code.
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import sys from helpers.statuspage import StatusPage from test_postgresql import MockConnect if sys.hexversion >= 0x03000000: from io import BytesIO as IO else: from StringIO import StringIO as IO class TestStatusPage(unittest.TestCase): de...
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import sys from helpers.statuspage import StatusPage from test_postgresql import MockConnect if sys.hexversion >= 0x03000000: from io import BytesIO as IO else: from StringIO import StringIO as IO class TestStatusPage(unittest.TestCase): de...
Update DiscordBot: Shorter game setting & don't respond to bots
const Discord = require('discord.js'); const client = new Discord.Client(); // https://discordapp.com/oauth2/authorize?&client_id=368144406181838861&scope=bot&permissions=3072 client.on('ready', () => { console.log(`Logged in as ${client.user.tag}!`); client.user.setGame('WoWAnalyzer.com'); }); client.on('messag...
const Discord = require('discord.js'); const client = new Discord.Client(); // https://discordapp.com/oauth2/authorize?&client_id=368144406181838861&scope=bot&permissions=3072 client.on('ready', () => { console.log(`Logged in as ${client.user.tag}!`); client.user.setPresence({ game: { name: 'WoWAnalyzer...
[desk-tool] Handle drafts/missing documents when checking for type mismatch
import React from 'react' import styles from './styles/DeskTool.css' import SchemaPaneResolver from './SchemaPaneResolver' import client from 'part:@sanity/base/client' import {withRouterHOC} from 'part:@sanity/base/router' import PropTypes from 'prop-types' export default withRouterHOC(class DeskTool extends React.Co...
import React from 'react' import styles from './styles/DeskTool.css' import SchemaPaneResolver from './SchemaPaneResolver' import client from 'part:@sanity/base/client' import {withRouterHOC} from 'part:@sanity/base/router' import PropTypes from 'prop-types' export default withRouterHOC(class DeskTool extends React.Co...
Change algorithmia-api-client dependency from a version to a version range
import os from setuptools import setup setup( name='algorithmia', version='1.1.4', description='Algorithmia Python Client', long_description='Algorithmia Python Client is a client library for accessing Algorithmia from python code. This library also gets bundled with any Python algorithms in Algorithm...
import os from setuptools import setup setup( name='algorithmia', version='1.1.4', description='Algorithmia Python Client', long_description='Algorithmia Python Client is a client library for accessing Algorithmia from python code. This library also gets bundled with any Python algorithms in Algorithm...
Trim fetch data to remove errors with extra spaces in data
import { createAction } from 'redux-actions'; import { createThunkAction } from 'utils/redux'; import qs from 'query-string'; const fetchGhgEmissionsInit = createAction('fetchGhgEmissionsInit'); const fetchGhgEmissionsFail = createAction('fetchGhgEmissionsFail'); const fetchGhgEmissionsDataReady = createAction('fetch...
import { createAction } from 'redux-actions'; import { createThunkAction } from 'utils/redux'; import qs from 'query-string'; const fetchGhgEmissionsInit = createAction('fetchGhgEmissionsInit'); const fetchGhgEmissionsFail = createAction('fetchGhgEmissionsFail'); const fetchGhgEmissionsDataReady = createAction('fetch...
Disable Sunrise/Sunset in Config option
/* Magic Mirror Test config default weather * * By fewieden https://github.com/fewieden * * MIT Licensed. */ let config = { port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], language: "en", timeFormat: 24, units: "metric", electronOptions: { webPreferences: { nodeIntegration: true }...
/* Magic Mirror Test config default weather * * By fewieden https://github.com/fewieden * * MIT Licensed. */ let config = { port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], language: "en", timeFormat: 24, units: "metric", electronOptions: { webPreferences: { nodeIntegration: true }...
Break down possible transformer errors for debugability
var _ = require('underscore'); var path = require('path'); module.exports = function (transformer) { transformer = _.clone(transformer); if (_.isString(transformer)) transformer = {name: transformer}; if (!transformer.options) transformer.options = {}; var name = transformer.name; var packageName = 'cogs-tr...
var _ = require('underscore'); var path = require('path'); module.exports = function (transformer) { transformer = _.clone(transformer); if (_.isString(transformer)) transformer = {name: transformer}; if (!transformer.options) transformer.options = {}; var name = transformer.name; var packageName = 'cogs-tra...
Update clear:archives to clear archives older than a month instead of a week
<?php namespace App\Console\Commands; use File; use Artisan; use App\Archive; use Illuminate\Console\Command; class ClearOldArchives extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'clear:archives'; /** * The conso...
<?php namespace App\Console\Commands; use File; use Artisan; use App\Archive; use Illuminate\Console\Command; class ClearOldArchives extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'clear:archives'; /** * The conso...
Handle no protocols in tests
const protocols = require("../lib") , tester = require("tester") ; tester.describe("check urls", test => { test.it("should support mutiple protocols", () => { test.expect(protocols("git+ssh://git@some-host.com/and-the-path/name")).toEqual(["git", "ssh"]); }); test.it("should detect no prot...
const protocols = require("../lib") , tester = require("tester") ; tester.describe("check urls", test => { test.it("should support mutiple protocols", () => { test.expect(protocols("git+ssh://git@some-host.com/and-the-path/name")).toEqual(["git", "ssh"]); }); test.it("should support one pr...
Delete unused import of NOT_READY_YET
# -*- coding: utf-8 -*- # Copyright 2015 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
# -*- coding: utf-8 -*- # Copyright 2015 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
Remove events_type from alert test case
import os.path import sys sys.path.append(os.path.join(os.path.dirname(__file__), "../../alerts")) from alert_test_suite import AlertTestSuite class AlertTestCase(object): def __init__(self, description, events=[], expected_alert=None): self.description = description # As a result of defining our...
import os.path import sys sys.path.append(os.path.join(os.path.dirname(__file__), "../../alerts")) from alert_test_suite import AlertTestSuite class AlertTestCase(object): def __init__(self, description, events=[], events_type='event', expected_alert=None): self.description = description # As a r...