text stringlengths 17 1.47k | positive stringlengths 673 4.43k | negative stringlengths 677 2.81k |
|---|---|---|
Remove unused traits in Article Get Most Recent Integration Test | <?php
namespace RCatlin\Blog\Test\Integration\Controller\Api;
use League\FactoryMuffin\Facade as FactoryMuffin;
use RCatlin\Blog\Entity;
use RCatlin\Blog\Test\Integration\AbstractIntegrationTest;
use RCatlin\Blog\Test\LoadsFactoryMuffinFactories;
use RCatlin\Blog\Test\ReadsResponseContent;
class ArticleControllerGet... | <?php
namespace RCatlin\Blog\Test\Integration\Controller\Api;
use League\FactoryMuffin\Facade as FactoryMuffin;
use RCatlin\Blog\Entity;
use RCatlin\Blog\Test\CreatesGuzzleStream;
use RCatlin\Blog\Test\HasFaker;
use RCatlin\Blog\Test\Integration\AbstractIntegrationTest;
use RCatlin\Blog\Test\LoadsFactoryMuffinFactori... |
application: Add error() function to Output class | <?php
/**
* Output library
* @author M2Mobi, Heinz Wiesinger
*/
class Output
{
/**
* Constructor
*/
public function __construct()
{
}
/**
* Destructor
*/
public function __destruct()
{
}
/**
* Print given message immediatly
* @param String $msg ... | <?php
/**
* Output library
* @author M2Mobi, Heinz Wiesinger
*/
class Output
{
/**
* Constructor
*/
public function __construct()
{
}
/**
* Destructor
*/
public function __destruct()
{
}
/**
* Print given message immediatly
* @param String $msg ... |
Use Force Segment write key | import React from 'react'
import ReactDOM from 'react-dom/server'
import request from 'superagent'
import { DisplayPanel } from '@artsy/reaction-force/dist/Components/Publishing/Display/DisplayPanel'
import { ServerStyleSheet } from 'styled-components'
import { DisplayQuery } from 'client/apps/display/query'
const {
... | import React from 'react'
import ReactDOM from 'react-dom/server'
import request from 'superagent'
import { DisplayPanel } from '@artsy/reaction-force/dist/Components/Publishing/Display/DisplayPanel'
import { ServerStyleSheet } from 'styled-components'
import { DisplayQuery } from 'client/apps/display/query'
const {
... |
Support configuring SOCKS proxy in the example | #!/usr/bin/env python3
import traceback
from telethon_examples.interactive_telegram_client \
import InteractiveTelegramClient
def load_settings(path='api/settings'):
"""Loads the user settings located under `api/`"""
result = {}
with open(path, 'r', encoding='utf-8') as file:
for line in file... | #!/usr/bin/env python3
import traceback
from telethon_examples.interactive_telegram_client \
import InteractiveTelegramClient
def load_settings(path='api/settings'):
"""Loads the user settings located under `api/`"""
result = {}
with open(path, 'r', encoding='utf-8') as file:
for line in file... |
Fix quoting for MANIFEST.MF Import-Package | import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
/**
* Used by re-version.sh. Not included in normal compile so it doesn't accidentally end up in artifacts.
* Need it to be a java ... | import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
/**
* Used by re-version.sh. Not included in normal compile so it doesn't accidentally end up in artifacts.
* Need it to be a java ... |
Add IPv6 to trusted proxies list | <?php namespace Strimoid\Providers;
use Carbon\Carbon;
use GuzzleHttp\Client;
use Illuminate\Pagination\Paginator;
use Illuminate\Support\ServiceProvider;
use Pdp\Parser;
use Pdp\PublicSuffixListManager;
use Strimoid\Helpers\OEmbed;
class AppServiceProvider extends ServiceProvider
{
public function boot()
{
... | <?php namespace Strimoid\Providers;
use Carbon\Carbon;
use GuzzleHttp\Client;
use Illuminate\Pagination\Paginator;
use Illuminate\Support\ServiceProvider;
use Pdp\Parser;
use Pdp\PublicSuffixListManager;
use Strimoid\Helpers\OEmbed;
class AppServiceProvider extends ServiceProvider
{
public function boot()
{
... |
Fix issue with deletewatcher causing application crash | import BaseWatcher from './BaseWatcher';
class DeleteWatcher extends BaseWatcher {
constructor(bot) {
super(bot);
}
/**
* The method this watcher should listen on.
*
* @type {string[]}
*/
method = [
'messageDelete',
'messageDeleteBulk'
];
shouldRun(... | import BaseWatcher from './BaseWatcher';
class DeleteWatcher extends BaseWatcher {
constructor(bot) {
super(bot);
}
/**
* The method this watcher should listen on.
*
* @type {string[]}
*/
method = [
'messageDelete',
'messageDeleteBulk'
];
shouldRun(... |
Allow to configure user class | <?php
namespace Bundle\DoctrineUserBundle\DependencyInjection;
use Symfony\Components\DependencyInjection\Extension\Extension;
use Symfony\Components\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Components\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Components\DependencyInjection\ContainerBuilder;... | <?php
namespace Bundle\DoctrineUserBundle\DependencyInjection;
use Symfony\Components\DependencyInjection\Extension\Extension;
use Symfony\Components\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Components\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Components\DependencyInjection\ContainerBuilder;... |
Throw exception if class is not found rather than returning null | <?php
namespace AppBundle\API;
use Symfony\Component\Config\Definition\Exception\Exception;
use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
class Webservice
{
const ERROR_NOT_LOGGED_IN = "Error. Not logged in.";
private $DB;
public funct... | <?php
namespace AppBundle\API;
use Symfony\Component\Config\Definition\Exception\Exception;
use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
class Webservice
{
const ERROR_NOT_LOGGED_IN = "Error. Not logged in.";
private $DB;
public funct... |
Fix comment incorrectly indicating an unexpected method parameter. | <?php
abstract class SQLayerTable
{
/** @property *str* table name **/
protected $tableName;
/** @property *obj* SQLayerDbo **/
protected $dbo;
/** @method get record from key
* @param *int* integer key
* @return *arr* assoc (or false) **/
public function recFromKey(... | <?php
abstract class SQLayerTable
{
/** @property *str* table name **/
protected $tableName;
/** @property *obj* SQLayerDbo **/
protected $dbo;
/** @method get record from key
* @param *int* integer key
* @return *arr* assoc (or false) **/
public function recFromKey(... |
Change the id strategy, using random strings instead of counters | <?php
namespace Goetas\Twital\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Goetas\Twital\EventDispatcher\TemplateEvent;
use Goetas\Twital\Twital;
/**
*
* @author Asmir Mustafic <goetas@gmail.com>
*
*/
class IDNodeSubscriber implements EventSubscriberInterface
{
public s... | <?php
namespace Goetas\Twital\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Goetas\Twital\EventDispatcher\TemplateEvent;
use Goetas\Twital\Twital;
/**
*
* @author Asmir Mustafic <goetas@gmail.com>
*
*/
class IDNodeSubscriber implements EventSubscriberInterface
{
public s... |
Add email to send objects during registration | 'use strict';
export default class UserService {
static get $inject(){
return ['$http', '$window','API_URL'];
}
constructor($http,$window,API_URL) {
this.$http = $http;
this.$window = $window;
this.API_URL = API_URL;
}
static get name(){
return 'UserServ... | 'use strict';
export default class UserService {
static get $inject(){
return ['$http', '$window','API_URL'];
}
constructor($http,$window,API_URL) {
this.$http = $http;
this.$window = $window;
this.API_URL = API_URL;
}
static get name(){
return 'UserServ... |
Set hmm detail state to null on GET_HMM.REQUESTED | /**
*
*
* @copyright 2017 Government of Canada
* @license MIT
* @author igboyes
*
*/
import { WS_UPDATE_STATUS, FIND_HMMS, GET_HMM } from "../actionTypes";
const initialState = {
list: null,
detail: null,
process: null
};
const hmmsReducer = (state = initialState, action) => {
switch (action.... | /**
*
*
* @copyright 2017 Government of Canada
* @license MIT
* @author igboyes
*
*/
import { WS_UPDATE_STATUS, FIND_HMMS, GET_HMM } from "../actionTypes";
const initialState = {
list: null,
detail: null,
process: null
};
const hmmsReducer = (state = initialState, action) => {
switch (action.... |
Set default fetch mode to fetch_obj | <?php
/*
* This file is a part of the ChZ-PHP package.
*
* (c) François LASSERRE <choiz@me.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Engine;
use \PDO as PDO;
use \PDOException as PDOException;
class Db exte... | <?php
/*
* This file is a part of the ChZ-PHP package.
*
* (c) François LASSERRE <choiz@me.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Engine;
use \PDO as PDO;
use \PDOException as PDOException;
class Db exte... |
Set dev port back to 3000 | module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bower: {
install: {
options: {
targetDir: './lib/ui',
layout: 'byComponent',
install: true,
verbose: false,
cleanTargetDir: true,
cleanBow... | module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bower: {
install: {
options: {
targetDir: './lib/ui',
layout: 'byComponent',
install: true,
verbose: false,
cleanTargetDir: true,
cleanBow... |
Drop username as it will be used/available in meta | <?php
namespace Bolt\Extension\Bolt\Members\Storage\Schema\Table;
use Bolt\Storage\Database\Schema\Table\BaseTable;
/**
* Account table.
*
* @author Gawain Lynch <gawain.lynch@gmail.com>
*/
class Account extends BaseTable
{
/**
* @inheritDoc
*/
protected function addColumns()
{
$thi... | <?php
namespace Bolt\Extension\Bolt\Members\Storage\Schema\Table;
use Bolt\Storage\Database\Schema\Table\BaseTable;
/**
* Account table.
*
* @author Gawain Lynch <gawain.lynch@gmail.com>
*/
class Account extends BaseTable
{
/**
* @inheritDoc
*/
protected function addColumns()
{
$thi... |
Adjust permission check order logic | <?php
namespace LaravelDoctrine\ACL\Permissions;
use LaravelDoctrine\ACL\Contracts\HasPermissions as HasPermissionsContract;
use LaravelDoctrine\ACL\Contracts\HasRoles as HasRolesHasRoles;
use LaravelDoctrine\ACL\Contracts\Permission as PermissionContract;
trait HasPermissions
{
/**
* @param PermissionContr... | <?php
namespace LaravelDoctrine\ACL\Permissions;
use LaravelDoctrine\ACL\Contracts\HasPermissions as HasPermissionsContract;
use LaravelDoctrine\ACL\Contracts\HasRoles as HasRolesHasRoles;
use LaravelDoctrine\ACL\Contracts\Permission as PermissionContract;
trait HasPermissions
{
/**
* @param PermissionContr... |
Allow main handlers to be called without callbacks | var Observable = require('../utils').Observable,
errors = require('../errors');
module.exports = Observable.extend({
constructor: function MailHandler(transport, render) {
this.transport = transport;
this.render = render;
},
isEnabled: function () {
return !!this.transport;
},
forgotPassword:... | var Observable = require('../utils').Observable,
errors = require('../errors');
module.exports = Observable.extend({
constructor: function MailHandler(transport, render) {
this.transport = transport;
this.render = render;
},
isEnabled: function () {
return !!this.transport;
},
forgotPassword:... |
Fix stop stream even if there is no more positions in the stream
Add a control stream to signal when to stop taking values from the position stream.
This change is due takeWhile evaluates the condition after receiving the next value
and in this case there is not guarantee of receiving an extra position. | 'use strict';
/* global cordova */
define(function(require, exports) {
var Bacon = require('./ext/Bacon');
var location = require('./location');
var positionStream = location.streamMultiplePositions();
var PositionRecorder = function() {
var recordingFlag = false;
var positions = [];
... | 'use strict';
/* global cordova */
define(function(require, exports) {
var Bacon = require('./ext/Bacon');
var location = require('./location');
var positionStream = location.streamMultiplePositions();
var PositionRecorder = function() {
var recordingFlag = false;
var positions = [];
... |
TEST reduce number of iterations for stopwatch test | # -*- encoding: utf-8 -*-
"""Created on Dec 16, 2014.
@author: Katharina Eggensperger
@projekt: AutoML2015
"""
from __future__ import print_function
import time
import unittest
from autosklearn.util import StopWatch
class Test(unittest.TestCase):
_multiprocess_can_split_ = True
def test_stopwatch_overhea... | # -*- encoding: utf-8 -*-
"""Created on Dec 16, 2014.
@author: Katharina Eggensperger
@projekt: AutoML2015
"""
from __future__ import print_function
import time
import unittest
from autosklearn.util import StopWatch
class Test(unittest.TestCase):
_multiprocess_can_split_ = True
def test_stopwatch_overhea... |
Make it so that Struct Pointer return values work. | var FFI = require("./ffi"),
util = require("util");
// CIF proves a JS interface for the libffi "callback info" (CIF) structure
var CIF = module.exports = function(rtype, types) {
this._returnType = rtype;
this._types = types;
if (!FFI.isValidReturnType(this._returnType)) {
... | var FFI = require("./ffi"),
util = require("util");
// CIF proves a JS interface for the libffi "callback info" (CIF) structure
var CIF = module.exports = function(rtype, types) {
this._returnType = rtype;
this._types = types;
if (!FFI.isValidReturnType(this._returnType)) {
... |
GEN-63: Use pandoc's multiline_tables extension to build table | /*
* Created brightSPARK Labs
* www.brightsparklabs.com
*/
'use strict';
// -----------------------------------------------------------------------------
// MODULES
// -----------------------------------------------------------------------------
var es = require('event-stream');
var execSync = require('exec... | /*
* Created brightSPARK Labs
* www.brightsparklabs.com
*/
'use strict';
// -----------------------------------------------------------------------------
// MODULES
// -----------------------------------------------------------------------------
var es = require('event-stream');
var execSync = require('exec... |
Remove PHP template engine from 'modules' project. | <?php
namespace @@namespace@@\Modules\Frontend;
use Phalcon\DiInterface;
use Phalcon\Loader;
use Phalcon\Mvc\View;
use Phalcon\Mvc\ModuleDefinitionInterface;
class Module implements ModuleDefinitionInterface
{
/**
* Registers an autoloader related to the module
*
* @param DiInterface $di
*/
... | <?php
namespace @@namespace@@\Modules\Frontend;
use Phalcon\DiInterface;
use Phalcon\Loader;
use Phalcon\Mvc\View;
use Phalcon\Mvc\ModuleDefinitionInterface;
class Module implements ModuleDefinitionInterface
{
/**
* Registers an autoloader related to the module
*
* @param DiInterface $di
*/
... |
Revert "Resolve src/ folder too"
This reverts commit 39cd9a4eecb0e1eaef08127551d752963f345a0b. | const fs = require('fs');
const path = require('path');
// eslint-disable-next-line import/no-extraneous-dependencies
const webpack = require('webpack');
const nodeModules = {};
// This is to filter out node_modules as we don't want them
// to be made part of any bundles.
fs.readdirSync('node_modules')
.filter((x)... | const fs = require('fs');
const path = require('path');
// eslint-disable-next-line import/no-extraneous-dependencies
const webpack = require('webpack');
const nodeModules = {};
// This is to filter out node_modules as we don't want them
// to be made part of any bundles.
fs.readdirSync('node_modules')
.filter((x)... |
Add attrs and typing to deps | import re
from setuptools import find_packages, setup
with open('netsgiro/__init__.py') as fh:
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", fh.read()))
with open('README.rst') as fh:
long_description = fh.read()
setup(
name='netsgiro',
version=metadata['version'],
description='File ... | import re
from setuptools import find_packages, setup
with open('netsgiro/__init__.py') as fh:
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", fh.read()))
with open('README.rst') as fh:
long_description = fh.read()
setup(
name='netsgiro',
version=metadata['version'],
description='File ... |
Improve geo ip string decoding | <?php
// JUser/View/Helper/UserWithIp.php
namespace JUser\View\Helper;
use Zend\View\Helper\AbstractHelper;
class UserWithIp extends AbstractHelper
{
public function __invoke($username, $ipAddress)
{
$geo = $this->view->geoip($ipAddress);
$place = '';
if ($geo&&$geo->getCity()) {
... | <?php
// JUser/View/Helper/UserWithIp.php
namespace JUser\View\Helper;
use Zend\View\Helper\AbstractHelper;
class UserWithIp extends AbstractHelper
{
public function __invoke($username, $ipAddress)
{
$geo = $this->view->geoip($ipAddress);
$place = '';
if ($geo&&$geo->getCity()) {
... |
Add tra and some rewording for plugin info for plugin edit window
git-svn-id: 9bac41f8ebc9458fc3e28d41abfab39641e8bd1c@30965 b456876b-0849-0410-b77d-98878d47e9d5 | <?php
// (c) Copyright 2002-2010 by authors of the Tiki Wiki/CMS/Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
// this script may only be included - so it's better... | <?php
// (c) Copyright 2002-2010 by authors of the Tiki Wiki/CMS/Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
// this script may only be included - so it's better... |
Revert "missing formatExport and ClearFilters formatters" | /**
* Bootstrap Table Portuguese Portugal Translation
* Author: Burnspirit<burnspirit@gmail.com>
*/
(function ($) {
'use strict';
$.fn.bootstrapTable.locales['pt-PT'] = {
formatLoadingMessage: function () {
return 'A carregar, por favor aguarde...';
},
formatRecordsPerPag... | /**
* Bootstrap Table Portuguese Portugal Translation
* Author: Burnspirit<burnspirit@gmail.com>
*/
(function ($) {
'use strict';
$.fn.bootstrapTable.locales['pt-PT'] = {
formatLoadingMessage: function () {
return 'A carregar, por favor aguarde...';
},
formatRecordsPerPag... |
Allow user selection at section level | //----------------------------------------------------------------------------//
// //
// V e r t e x V i e w //
// ... | //----------------------------------------------------------------------------//
// //
// V e r t e x V i e w //
// ... |
Use tagged service IDs sorter to sort tagged services. | <?php
/**
* @author Igor Nikolaev <igor.sv.n@gmail.com>
* @copyright Copyright (c) 2015, Darvin Studio
* @link https://www.darvin-studio.ru
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Darvin\AdminBundle\Depen... | <?php
/**
* @author Igor Nikolaev <igor.sv.n@gmail.com>
* @copyright Copyright (c) 2015, Darvin Studio
* @link https://www.darvin-studio.ru
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Darvin\AdminBundle\Depen... |
Use zoom-in cursor in digital browser | <?php use_helper('Javascript') ?>
<div class="row">
<div class="span6">
<h1><?php echo __('Media') ?></h1>
</div>
<?php if (null !== $facet = $pager->getFacet('mediaTypeId')): ?>
<div class="span6">
<div class="btn-group top-options">
<?php foreach ($facet['terms'] as $item): ?>
<... | <?php use_helper('Javascript') ?>
<div class="row">
<div class="span6">
<h1><?php echo __('Media') ?></h1>
</div>
<?php if (null !== $facet = $pager->getFacet('mediaTypeId')): ?>
<div class="span6">
<div class="btn-group top-options">
<?php foreach ($facet['terms'] as $item): ?>
<... |
Fix error in console need to check type before call hasOwnProperty
Look at this https://i.imgur.com/v2lpTuk.png | /* eslint-env browser */
;(function() {
try {
const onMessage = ({ data }) => {
if (!data.wappalyzer) {
return
}
const { technologies } = data.wappalyzer || {}
removeEventListener('message', onMessage)
postMessage({
wappalyzer: {
js: technologies.reduce(... | /* eslint-env browser */
;(function() {
try {
const onMessage = ({ data }) => {
if (!data.wappalyzer) {
return
}
const { technologies } = data.wappalyzer || {}
removeEventListener('message', onMessage)
postMessage({
wappalyzer: {
js: technologies.reduce(... |
Remove urbansimd from excluded packages. | from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(
name='urbansim',
version='0.2dev',
description='Tool for modeling metropolitan real estate markets',
author='Synthicity',
author_email='ffoti@berkeley.edu',
license='AGPL',
u... | from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
setup(
name='urbansim',
version='0.2dev',
description='Tool for modeling metropolitan real estate markets',
author='Synthicity',
author_email='ffoti@berkeley.edu',
license='AGPL',
u... |
Add key prop to card. | import React, { Component } from 'react';
import Registry from '../utils/Registry';
import BaseComponent from './BaseComponent';
import {omit, pick} from 'lodash';
const CARD_REGIONS = ['header', 'subheader', 'topmatter', 'subheader2', 'topmatter2', 'footer', 'footerHeader', 'footerSubheader', 'bottommatter', 'footerS... | import React, { Component } from 'react';
import Registry from '../utils/Registry';
import BaseComponent from './BaseComponent';
import {omit, pick} from 'lodash';
const CARD_REGIONS = ['header', 'subheader', 'topmatter', 'subheader2', 'topmatter2', 'footer', 'footerHeader', 'footerSubheader', 'bottommatter', 'footerS... |
Remove persistence type from fixtures. | package com.novoda.downloadmanager;
import android.content.Context;
class FilePersistenceFixtures {
private FilePersistenceResult filePersistenceResult = FilePersistenceResult.SUCCESS;
private boolean writeResult = true;
private long currentSize = 100;
static FilePersistenceFixtures aFilePersistence... | package com.novoda.downloadmanager;
import android.content.Context;
class FilePersistenceFixtures {
private FilePersistenceResult filePersistenceResult = FilePersistenceResult.SUCCESS;
private boolean writeResult = true;
private long currentSize = 100;
private FilePersistenceType filePersistenceType ... |
Remove placeholder from initial state | export default {
creatorIsOpen: false,
title: '',
description: '',
creationStatus: {
failed: false,
fields: []
},
datasets: {
name: 'datasets',
selected: null,
data: [],
loading: false,
loaded: false,
child: {
name: 'visualisations',
selected: null,
data: []... | export default {
creatorIsOpen: false,
title: '',
description: '',
placeholder: '',
creationStatus: {
failed: false,
fields: []
},
datasets: {
name: 'datasets',
selected: null,
data: [],
loading: false,
loaded: false,
child: {
name: 'visualisations',
selected: n... |
Support for extra parameters in extractors | # -*- coding: utf-8 -*-
from __future__ import (
print_function, unicode_literals, division, absolute_import)
from six.moves import range
from monkeylearn.utils import SleepRequestsMixin, MonkeyLearnResponse, HandleErrorsMixin
from monkeylearn.settings import DEFAULT_BASE_ENDPOINT, DEFAULT_BATCH_SIZE
class Extra... | # -*- coding: utf-8 -*-
from __future__ import (
print_function, unicode_literals, division, absolute_import)
from six.moves import range
from monkeylearn.utils import SleepRequestsMixin, MonkeyLearnResponse, HandleErrorsMixin
from monkeylearn.settings import DEFAULT_BASE_ENDPOINT, DEFAULT_BATCH_SIZE
class Extra... |
Add minimal shutdown signal handling | <?php
declare(ticks = 1);
namespace Aerys\Watch;
use Aerys\Server,
Aerys\BinOptions,
Aerys\Bootstrapper;
class DebugWatcher {
public function watch(BinOptions $binOptions) {
list($reactor, $server, $hosts) = (new Bootstrapper)->boot($binOptions);
register_shutdown_function... | <?php
namespace Aerys\Watch;
use Aerys\Server,
Aerys\BinOptions,
Aerys\Bootstrapper;
class DebugWatcher {
public function watch(BinOptions $binOptions) {
list($reactor, $server, $hosts) = (new Bootstrapper)->boot($binOptions);
register_shutdown_function(function() use ($serve... |
Fix error when loading without auth config | var _ = require('lodash');
var crc = require('crc');
// Base structure for a configuration
module.exports = function(options) {
options = _.defaults(options, {
// Port for running the webserver
'port': 3000,
// Root folder
'root': process.cwd(),
// Workspace id
'id... | var _ = require('lodash');
var crc = require('crc');
// Base structure for a configuration
module.exports = function(options) {
options = _.defaults(options, {
// Port for running the webserver
'port': 3000,
// Root folder
'root': process.cwd(),
// Workspace id
'id... |
Set name as mandatory element for reset form creation | <?php
namespace GoalioForgotPassword\Form;
use Laminas\Form\Form;
use Laminas\Form\Element;
use GoalioForgotPassword\Options\ForgotOptionsInterface;
class Reset extends Form
{
/**
* @var ForgotOptionsInterface
*/
protected $forgotOptions;
public function __construct($name, ForgotOptionsInterfa... | <?php
namespace GoalioForgotPassword\Form;
use Laminas\Form\Form;
use Laminas\Form\Element;
use GoalioForgotPassword\Options\ForgotOptionsInterface;
class Reset extends Form
{
/**
* @var ForgotOptionsInterface
*/
protected $forgotOptions;
public function __construct($name = null, ForgotOptions... |
Fix: Reset GIDs works even if user has no pub_key | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import types
from sfa.storage.model import *
from sfa.storage.alchemy import *
from sfa.trust.gid import create_uuid
from sfa.trust.hierarchy import Hierarchy
from sfa.util.xrn import Xrn
from sfa.trust.certificate import Certificate, Keypair, convert_public_key
def fix_u... | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import types
from sfa.storage.model import *
from sfa.storage.alchemy import *
from sfa.trust.gid import create_uuid
from sfa.trust.hierarchy import Hierarchy
from sfa.util.xrn import Xrn
from sfa.trust.certificate import Certificate, Keypair, convert_public_key
def fix_u... |
Add 2 form configuration (coosos_tag_auto_complete, coosos_tag_persist_new) | <?php
namespace Coosos\TagBundle\Form\Type;
use Coosos\TagBundle\Form\DataTransformer\TagsTransformer;
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\T... | <?php
namespace Coosos\TagBundle\Form\Type;
use Coosos\TagBundle\Form\DataTransformer\TagsTransformer;
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\T... |
Add method to get lists vendors | <?php
/**
* Vendor Class
*
* Manage vendor and can automatically detect vendor.
*
* @package Core
*/
class Vendor
{
private $vendors = array();
public function __construct()
{
if (ENVIRONMENT == 'testing' || ENVIRONMENT == 'development')
... | <?php
/**
* Vendor Class
*
* Manage vendor and can automatically detect vendor.
*
* @package Core
*/
class Vendor
{
public function __construct()
{
if (ENVIRONMENT == 'testing' || ENVIRONMENT == 'development')
{
$dirs = s... |
Change the types according to the names in the README | var replaceAll = function( occurrences ) {
var configs = this;
return {
from: function( target ) {
return {
to: function( replacement ) {
var template;
var index = -1;
if ( configs.ignoringCase ) {
template = occurrences.toLowerCase();
while((
... | var replaceAll = function( oldToken ) {
var configs = this;
return {
from: function( string ) {
return {
to: function( newToken ) {
var template;
var index = -1;
if ( configs.ignoringCase ) {
template = oldToken.toLowerCase();
while((
... |
Add 'ujson' requirement for tests & aiohttp | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import codecs
from setuptools import setup, find_packages
setup(
name='venom',
version='1.0.0a1',
packages=find_packages(exclude=['*tests*']),
url='https://github.com/biosustain/venom',
license='MIT',
author='Lars Schöning',
au... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import codecs
from setuptools import setup, find_packages
setup(
name='Venom',
version='1.0.0a1',
packages=find_packages(exclude=['*tests*']),
url='https://github.com/biosustain/venom',
license='MIT',
author='Lars Schöning',
au... |
Use hot loading for css | 'use-strict';
var path = require('path');
var webpack = require('webpack');
module.exports = {
context: __dirname,
entry: {
app: [
'webpack-hot-middleware/client',
'babel-polyfill',
'./js/index'
],
style: [
'webpack-hot-middleware/client',
'./css/index.scss'
]
},
... | 'use-strict';
var path = require('path');
var webpack = require('webpack');
module.exports = {
context: __dirname,
entry: {
app: [
'webpack-hot-middleware/client',
'babel-polyfill',
'./js/index'
],
style: './css/index.scss'
},
output: {
path: path.join(__dirname, 'assets', ... |
Fix typos in `Krang.deepExtend` function. | Krang.deepExtend = function(destination, source) {
for (var property in source) {
var type = typeof source[property], deep = true;
if (source[property] === null || type !== 'object')
deep = false;
if (Object.isElement(source[property]))
deep = false;
if (source[property]... | Krang.deepExtend = function(destination, source) {
for (var property in source) {
var type = typeof source[property], deep = true;
if (source[property] === null || type !== 'object')
deep = false;
if (Object.isElement(source[propety]))
deep = false;
if (source[property] ... |
Fix check for valid date to avoid displaying invalid dates | //noinspection JSUnusedAssignment
dashlight.widgets = (function (module) {
module.build_status = (function () {
var build = function (content) {
var text;
var textDuration;
var minutes;
text = content.branch + " build"
+ " is " + content.stat... | //noinspection JSUnusedAssignment
dashlight.widgets = (function (module) {
module.build_status = (function () {
var build = function (content) {
var text;
var textDuration;
var minutes;
text = content.branch + " build"
+ " is " + content.stat... |
Change round:start to +5 days | <?php
namespace OpenDominion\Console\Commands;
use Carbon\Carbon;
use Illuminate\Console\Command;
use OpenDominion\Models\Round;
use OpenDominion\Models\RoundLeague;
class RoundStartCommand extends Command
{
protected $signature = 'round:start';
protected $description = 'Starts a new round (dev only)';
... | <?php
namespace OpenDominion\Console\Commands;
use Carbon\Carbon;
use Illuminate\Console\Command;
use OpenDominion\Models\Round;
use OpenDominion\Models\RoundLeague;
class RoundStartCommand extends Command
{
protected $signature = 'round:start';
protected $description = 'Starts a new round (dev only)';
... |
Set default creation date for new episode | <?php
/**
* episode actions.
*
* @package sflimetracker
* @subpackage episode
*/
class episodeActions extends sfActions
{
public function executeAdd($request)
{
$this->form=new EpisodeForm();
if ($request->isMethod('post'))
{
$this->form->bind($request->getPostParameters());
if... | <?php
/**
* episode actions.
*
* @package sflimetracker
* @subpackage episode
*/
class episodeActions extends sfActions
{
public function executeAdd($request)
{
$this->form=new EpisodeForm();
if ($request->isMethod('post'))
{
$this->form->bind($request->getPostParameters());
if... |
Add logic check to only throw DelayException if required | <?php
namespace Smartbox\Integration\FrameworkBundle\Core\Processors\ControlFlow;
use Smartbox\CoreBundle\Type\SerializableArray;
use Smartbox\Integration\FrameworkBundle\Core\Exchange;
use Smartbox\Integration\FrameworkBundle\Core\Processors\Exceptions\DelayException;
use Smartbox\Integration\FrameworkBundle\Core\Pr... | <?php
namespace Smartbox\Integration\FrameworkBundle\Core\Processors\ControlFlow;
use Smartbox\CoreBundle\Type\SerializableArray;
use Smartbox\Integration\FrameworkBundle\Core\Exchange;
use Smartbox\Integration\FrameworkBundle\Core\Processors\Exceptions\DelayException;
use Smartbox\Integration\FrameworkBundle\Core\Pr... |
Set default duration for events to 1 hour.
Signed-off-by: François de Metz <5187da0b934cc25eb2201a3ec9206c24b13cb23b@stormz.me> | var icalendar = require('icalendar');
var _ = require('underscore');
exports.generateIcal = function(currentUser, boards, params) {
var ical = new icalendar.iCalendar();
boards.each(function(board) {
board.cards().each(function(card) {
// no arm, no chocolate
if (!card.get('badg... | var icalendar = require('icalendar');
var _ = require('underscore');
exports.generateIcal = function(currentUser, boards, params) {
var ical = new icalendar.iCalendar();
boards.each(function(board) {
board.cards().each(function(card) {
// no arm, no chocolate
if (!card.get('badg... |
Fix indeterminate ordering issue for extensions
The original code used set() to dedupe enabled extensions. This resulted
in an arbitrary ordering of the values. The expected result was a
deterministic ordering of loaded extensions that matches the order given
by the whitelist. This removes the set() usage to preserve ... | """Tools for loading and validating extensions."""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import pkg_resources
import semver
class MissingDependency(Exception):
"""No dependency found."""
class Inval... | """Tools for loading and validating extensions."""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import pkg_resources
import semver
class MissingDependency(Exception):
"""No dependency found."""
class Inval... |
Resolve linting errors after upgrades | module.exports = {
extends: ["matrix-org"],
plugins: [
"babel",
],
env: {
browser: true,
node: true,
},
rules: {
"no-var": ["warn"],
"prefer-rest-params": ["warn"],
"prefer-spread": ["warn"],
"one-var": ["warn"],
"padded-blocks": [... | module.exports = {
extends: ["matrix-org"],
plugins: [
"babel",
],
env: {
browser: true,
node: true,
},
rules: {
"no-var": ["warn"],
"prefer-rest-params": ["warn"],
"prefer-spread": ["warn"],
"one-var": ["warn"],
"padded-blocks": [... |
Fix typo, add beacon service bean | package com.aemreunal.config.controller;
/*
***************************
* Copyright (c) 2014 *
* *
* This code belongs to: *
* *
* @author Ahmet Emre Ünal *
* S001974 *
* *
* aemreunal@gmail.com *
* emre.unal@o... | package com.aemreunal.config.controller;
/*
***************************
* Copyright (c) 2014 *
* *
* This code belongs to: *
* *
* @author Ahmet Emre Ünal *
* S001974 *
* *
* aemreunal@gmail.com *
* emre.unal@o... |
Fix the make_fragments_QB3_cluster.pl install path. | #!/usr/bin/env python2
from setuptools import setup, find_packages
# Uploading to PyPI
# =================
# The first time only:
# $ python setup.py register -r pypi
#
# Every version bump:
# $ git tag <version>; git push --tags
# $ python setup.py sdist upload -r pypi
version = '0.4.0'
setup(
name='klab',
... | #!/usr/bin/env python2
from setuptools import setup, find_packages
# Uploading to PyPI
# =================
# The first time only:
# $ python setup.py register -r pypi
#
# Every version bump:
# $ git tag <version>; git push --tags
# $ python setup.py sdist upload -r pypi
version = '0.4.0'
setup(
name='klab',
... |
Fix zoom interpretation in helper | var path = require('path'),
assert = require('assert'),
fs = require('fs');
var carto = require('../lib/carto');
var tree = require('../lib/carto').tree;
var helper = require('./support/helper');
function cleanupItem(key, value) {
if (key === 'rules') return;
else if (key === 'ruleIndex') return;
... | var path = require('path'),
assert = require('assert'),
fs = require('fs');
var carto = require('../lib/carto');
var tree = require('../lib/carto').tree;
var helper = require('./support/helper');
function cleanupItem(key, value) {
if (key === 'rules') return;
else if (key === 'ruleIndex') return;
... |
Use the new PingPongModule Repository class | <?php namespace Modules\Media\Image;
use Illuminate\Contracts\Config\Repository;
use Pingpong\Modules\Repository as Module;
class ThumbnailsManager
{
/**
* @var Module
*/
private $module;
/**
* @var Repository
*/
private $config;
/**
* @param Repository $config
* @pa... | <?php namespace Modules\Media\Image;
use Illuminate\Contracts\Config\Repository;
use Pingpong\Modules\Module;
class ThumbnailsManager
{
/**
* @var Module
*/
private $module;
/**
* @var Repository
*/
private $config;
/**
* @param Repository $config
* @param Module $mo... |
Add explicit dependency on Mercurial. | # coding=utf-8
# pylint: disable=missing-docstring
#
# 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 https://mozilla.org/MPL/2.0/.
from setuptools import setup
if __name__ == "__main__":
setup... | # coding=utf-8
# pylint: disable=missing-docstring
#
# 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 https://mozilla.org/MPL/2.0/.
from setuptools import setup
if __name__ == "__main__":
setup... |
Update playground sizes to be more representitive of real-world usage | 'use strict';
import React, { Component } from 'react';
import Pic from '../lib/index.js';
export default class Playground extends Component {
render() {
return (
<html>
<head>
<meta charSet='UTF-8' />
<title>react-pic</title>
</head>
<body>
<div id="r... | 'use strict';
import React, { Component } from 'react';
import Pic from '../lib/index.js';
export default class Playground extends Component {
render() {
return (
<html>
<head>
<meta charSet='UTF-8' />
<title>react-pic</title>
</head>
<body>
<div id="r... |
Concatenate all subdirs, not just mixins | module.exports = function(grunt) {
grunt.initConfig({
concat: {
dist: {
src: ['lib/osteo.js', 'lib/*.js', 'lib/**/*.js'],
dest: 'osteo.js'
}
},
jshint: {
options: {
jshintrc: true
},
beforeconcat: ['lib/**/*.js'],
afterconcat: ['osteo.js']
... | module.exports = function(grunt) {
grunt.initConfig({
concat: {
dist: {
src: ['lib/osteo.js', 'lib/*.js', 'lib/mixins/*.js'],
dest: 'osteo.js'
}
},
jshint: {
options: {
jshintrc: true
},
beforeconcat: ['lib/**/*.js'],
afterconcat: ['osteo.js']
... |
Fix history file parser to allow nonexistent file. |
/*
* Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
*/
package org.jsimpledb.cli.cmd;
import java.io.File;
import java.util.EnumSet;
import java.util.Map;
import org.jsimpledb.SessionMode;
import org.jsimpledb.cli.CliSession;
import org.jsimpledb.parse.Parser;
import org.jsimpledb.util.ParseContext;
pu... |
/*
* Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
*/
package org.jsimpledb.cli.cmd;
import java.io.File;
import java.util.EnumSet;
import java.util.Map;
import org.jsimpledb.SessionMode;
import org.jsimpledb.cli.CliSession;
import org.jsimpledb.parse.Parser;
import org.jsimpledb.util.ParseContext;
pu... |
Fix in app initialization for generators | from __future__ import unicode_literals
import importlib
from goerr import err
from django.apps import AppConfig
from chartflo.engine import ChartFlo
GENERATORS = {}
cf = ChartFlo()
def load_generator(modname, subgenerator=None):
try:
path = modname + ".chartflo"
if subgenerator is not None:
... | from __future__ import unicode_literals
import importlib
from goerr import err
from django.apps import AppConfig
GENERATORS = {}
cf = None
def load_generator(modname, subgenerator=None):
try:
path = modname + ".chartflo"
if subgenerator is not None:
path = path + "." + subgenerator
... |
Add environment variable for ability to set the output directory | #!/usr/bin/env python3
import configargparse
from goodline_iptv.importer import do_import
if __name__ == '__main__':
parser = configargparse.ArgParser()
parser.add_argument('-o', '--out-dir',
required=True,
env_var='OUTDIR',
help='Outpu... | #!/usr/bin/env python3
import configargparse
from goodline_iptv.importer import do_import
if __name__ == '__main__':
parser = configargparse.ArgParser()
parser.add_argument('-o', '--out-dir', required=True, help='Output directory')
parser.add_argument('-e', '--encoding',
default... |
Save note on Enter key press, autofocus the input field | // @flow
import type { TodoItem } from "./model/TodoItem";
import React from "react";
import ContentAdd from "material-ui/svg-icons/content/add";
import TextField from "material-ui/TextField";
import Paper from "material-ui/Paper";
import FloatingActionButton from "material-ui/FloatingActionButton";
import logo from ... | // @flow
import type { TodoItem } from "./model/TodoItem";
import React from "react";
import ContentAdd from "material-ui/svg-icons/content/add";
import TextField from "material-ui/TextField";
import Paper from "material-ui/Paper";
import FloatingActionButton from "material-ui/FloatingActionButton";
import logo from ... |
Fix CLI project name s/node-push-to-deploy/push-to-deploy | var fs = require("fs");
var http = require("http");
var nopt = require("nopt");
var main = require("./main");
var yaml = require("js-yaml");
var configs, options;
function help() {
var out = [
"Usage: push-to-deploy [-p port] config-file1 [config-file2 ...]",
"",
"General options:",
" -h, --help ... | var fs = require("fs");
var http = require("http");
var nopt = require("nopt");
var main = require("./main");
var yaml = require("js-yaml");
var configs, options;
function help() {
var out = [
"Usage: node-push-to-deploy [-p port] config-file1 [config-file2 ...]",
"",
"General options:",
" -h, --he... |
Fix plot title not showing up | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from copy import deepcopy
from ..utils.exceptions import GgplotError
class labs(object):
"""
General class for all label adding classes
"""
labels = {}
def __init__(self, *args, **kwargs)... | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from copy import deepcopy
from ..utils.exceptions import GgplotError
class labs(object):
"""
General class for all label adding classes
"""
labels = {}
def __init__(self, *args, **kwargs)... |
Fix warning for foreign key detection | <?php
/**
* PHP version 7.1
*
* This source file is subject to the license that is bundled with this package in the file LICENSE.
*/
namespace ComPHPPuebla\Fixtures\Processors;
class ForeignKeyProcessor implements Processor
{
/** @var array */
protected $references;
public function __construct()
{... | <?php
/**
* PHP version 7.1
*
* This source file is subject to the license that is bundled with this package in the file LICENSE.
*/
namespace ComPHPPuebla\Fixtures\Processors;
class ForeignKeyProcessor implements Processor
{
/** @var array */
protected $references;
public function __construct()
{... |
:bug: Remove parameter left over from version of common terms search | function build(searchTerm) {
return {
index: 'profiles',
type: 'gps',
body: {
size: 30,
query: {
bool: {
should: [
{
match_phrase: {
name: {
query: searchTerm,
boost: 2,
slop: 1
... | function build(searchTerm) {
return {
index: 'profiles',
type: 'gps',
body: {
size: 30,
query: {
bool: {
should: [
{
match_phrase: {
name: {
query: searchTerm,
boost: 2,
slop: 1
... |
Add 'smif version' to label | import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { Link, Router } from 'react-router-dom'
import { fetchSmifDetails } from '../actions/actions.js'
class Footer extends Component {
constructor(props) {
super(props)
}
compon... | import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { Link, Router } from 'react-router-dom'
import { fetchSmifDetails } from '../actions/actions.js'
class Footer extends Component {
constructor(props) {
super(props)
}
co... |
Switch from watch to watchCollection for bodyclass directive | define([
'angular',
'app',
'lodash'
],
function (angular, app, _) {
'use strict';
angular
.module('grafana.directives')
.directive('bodyClass', function() {
return {
link: function($scope, elem) {
var lastPulldownVal;
var lastHideControlsVal;
$scope.$watc... | define([
'angular',
'app',
'lodash'
],
function (angular, app, _) {
'use strict';
angular
.module('grafana.directives')
.directive('bodyClass', function() {
return {
link: function($scope, elem) {
var lastPulldownVal;
var lastHideControlsVal;
$scope.$watc... |
Package settings now read from package file in parent folder | var through = require('through2')
var gutil = require('gulp-util')
var superagent = require('superagent')
var extend = require('extend')
var pkg = require('../package.json')
var PluginError = gutil.PluginError
var defaultConfig = extend({
port: 23956
}, pkg.notifyDte || {});
function gulpVSDTE(config) {
... | var through = require('through2')
var gutil = require('gulp-util')
var superagent = require('superagent')
var extend = require('extend')
var PluginError = gutil.PluginError
var defaultConfig = {
port: 23956
}
function gulpVSDTE(config) {
var options = extend({}, defaultConfig, config || {});
var fi... |
Remove unused import and fix typo | from django.core.exceptions import ObjectDoesNotExist
from django.core.management.base import BaseCommand
from subscriptions.models import Subscription
class Command(BaseCommand):
help = ("Active subscription holders need to be informed via audio file "
"about the new missed call service.")
def ... | from django.core.exceptions import ObjectDoesNotExist
from django.core.management.base import BaseCommand, CommandError
from subscriptions.models import Subscription
class Command(BaseCommand):
help = ("Active subscription holders need to be informed via audio file "
"about the new missed call servic... |
Make sure karma can access jquery-ui | var webpack = require('webpack');
// TODO: use BowerWebpackPlugin
// var BowerWebpackPlugin = require('bower-webpack-plugin');
var webpackCommon = require('./webpack.common.config.js');
// Put in separate file?
var webpackTestConfig = {
devtool: 'inline-source-map',
plugins: [
new webpack.ResolverPlugin... | var webpack = require('webpack');
// TODO: use BowerWebpackPlugin
// var BowerWebpackPlugin = require('bower-webpack-plugin');
var webpackCommon = require('./webpack.common.config.js');
// Put in separate file?
var webpackTestConfig = {
devtool: 'inline-source-map',
plugins: [
new webpack.ResolverPlugin... |
Add AuthenticationMiddleware to tests (for 1.7) | #!/usr/bin/env python
import sys
from os.path import abspath, dirname
from django.conf import settings
import django
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'django.contrib.ses... | #!/usr/bin/env python
import sys
from os.path import abspath, dirname
from django.conf import settings
import django
sys.path.insert(0, abspath(dirname(__file__)))
if not settings.configured:
settings.configure(
INSTALLED_APPS=(
'django.contrib.contenttypes',
'django.contrib.ses... |
Delete init vertices from the polygon entity. | define(
[
'polygonjs/Entity',
'polygonjs/geom/Vector3'
],
function (Entity, Vector3) {
"use strict";
var Polygon = function (opts) {
opts = opts || {};
Entity.call(this, opts);
this.type = 'polygon';
this.vertices = opts.vert... | define(
[
'polygonjs/Entity',
'polygonjs/geom/Vector3'
],
function (Entity, Vector3) {
"use strict";
var Polygon = function (opts) {
opts = opts || {};
Entity.call(this, opts);
this.type = 'polygon';
this.vertices = opts.vert... |
Make the suggestion colorbox a square (increased the height) | /*
* Author: Pierre-Henry Soria <hello@ph7cms.com>
* Copyright: (c) 2015-2020, Pierre-Henry Soria. All Rights Reserved.
* License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
*/
var $suggestionBox = (function () {
$.get(pH7Url.base + 'ph7cms-hel... | /*
* Author: Pierre-Henry Soria <hello@ph7cms.com>
* Copyright: (c) 2015-2019, Pierre-Henry Soria. All Rights Reserved.
* License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
*/
var $suggestionBox = (function () {
$.get(pH7Url.base + 'ph7cms-hel... |
Add trim and emptytonull middleware to global. | <?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array
*/
protected $middleware =... | <?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array
*/
protected $middleware =... |
Add integrator property for Operations | import hoomd.integrate
class Operations:
def __init__(self, simulation=None):
self.simulation = simulation
self._compute = list()
self._auto_schedule = False
self._scheduled = False
def add(self, op):
if isinstance(op, hoomd.integrate._integrator):
self._in... | import hoomd.integrate
class Operations:
def __init__(self, simulation=None):
self.simulation = simulation
self._compute = list()
self._auto_schedule = False
self._scheduled = False
def add(self, op):
if isinstance(op, hoomd.integrate._integrator):
self._in... |
Fix for ignoring BPMN validation - JBPM-4000 | package org.jbpm.migration;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
/** Convenience class for making the error handling within the parsing and validation processes a little more verbose. */
abstract class ErrorCollector<T extends Exception> {
private final List... | package org.jbpm.migration;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
/** Convenience class for making the error handling within the parsing and validation processes a little more verbose. */
abstract class ErrorCollector<T extends Exception> {
private final List... |
Add is_done=True to get_all_expired filter. | from django.db import models
from celery.registry import tasks
from datetime import datetime, timedelta
__all__ = ["TaskManager", "PeriodicTaskManager"]
class TaskManager(models.Manager):
def get_task(self, task_id):
task, created = self.get_or_create(task_id=task_id)
return task
def is... | from django.db import models
from celery.registry import tasks
from datetime import datetime, timedelta
__all__ = ["TaskManager", "PeriodicTaskManager"]
class TaskManager(models.Manager):
def get_task(self, task_id):
task, created = self.get_or_create(task_id=task_id)
return task
def is... |
Fix open in new window URL | import React from 'react'
import { NavLink } from 'react-router-dom'
import EditTools from './EditTools'
import PreviewTools from './PreviewTools'
import styles from './Toolbar.styl'
export default ({ params, project, layout, theme, onLayoutChanged, onThemeChanged }) => {
const { username, owner, project: projectNa... | import React from 'react'
import { NavLink } from 'react-router-dom'
import EditTools from './EditTools'
import PreviewTools from './PreviewTools'
import styles from './Toolbar.styl'
export default ({ params, project, layout, theme, onLayoutChanged, onThemeChanged }) => {
const { username, owner, project: projectNa... |
Move blanket into bower's devDependencies. | /* globals module */
var EOL = require('os').EOL;
module.exports = {
normalizeEntityName: function() {},
afterInstall: function() {
return this.addBowerPackageToProject('blanket', '~1.1.5', {saveDev: true})
// Modify tests/index.html to include the blanket options after the application
.then... | /* globals module */
var EOL = require('os').EOL;
module.exports = {
normalizeEntityName: function() {},
afterInstall: function() {
return this.addBowerPackageToProject('blanket', '~1.1.5')
// Modify tests/index.html to include the blanket options after the application
.then(function() {
... |
Use 'number' input to use the width: 80px CSS rule
Auditors: eater, cbhl | (function(Perseus) {
var InputInteger = Perseus.Widget.extend({
initialize: function() {
this.$input = $("<input type='number'>");
},
render: function() {
this.$el.empty();
this.$el.append(this.$input);
return $.when(this);
},
focus: function() {
this.$inpu... | (function(Perseus) {
var InputInteger = Perseus.Widget.extend({
initialize: function() {
this.$input = $("<input>");
},
render: function() {
this.$el.empty();
this.$el.append(this.$input);
return $.when(this);
},
focus: function() {
this.$input.focus();
... |
Fix bug in service insights | /* eslint-disable class-methods-use-this */
/*
* Copyright 2019 Expedia Group
*
* 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.... | /* eslint-disable class-methods-use-this */
/*
* Copyright 2019 Expedia Group
*
* 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.... |
Add 'cache' & ''thumbs' file system management | <?php
namespace Bolt\Provider;
use Bolt\Filesystem\Adapter\Local;
use Bolt\Filesystem\Filesystem;
use Bolt\Filesystem\Manager;
use Bolt\Filesystem\Plugin;
use Silex\Application;
use Silex\ServiceProviderInterface;
/**
* @author Carson Full <carsonfull@gmail.com>
*/
class FilesystemServiceProvider implements Servic... | <?php
namespace Bolt\Provider;
use Bolt\Filesystem\Adapter\Local;
use Bolt\Filesystem\Filesystem;
use Bolt\Filesystem\Manager;
use Bolt\Filesystem\Plugin;
use Silex\Application;
use Silex\ServiceProviderInterface;
/**
* @author Carson Full <carsonfull@gmail.com>
*/
class FilesystemServiceProvider implements Servic... |
Change test name to be more descriptive
Also better conforms to the naming conventions for other tests in this module. | from web_test_base import *
class TestIATIStandard(WebTestBase):
"""
TODO: Add tests to assert that:
- the number of activities and publishers roughly matches those displayed on the Registry
- a key string appears on the homepage
"""
requests_to_load = {
'IATI Standard Homepage - no www... | from web_test_base import *
class TestIATIStandard(WebTestBase):
"""
TODO: Add tests to assert that:
- the number of activities and publishers roughly matches those displayed on the Registry
- a key string appears on the homepage
"""
requests_to_load = {
'IATI Standard Homepage - no www... |
Update websocket url to use dynamic host rather than fixed | import { browserHistory } from 'react-router';
const instanceID = Math.floor(Math.random() * 10000) + 1;
export const eventTypes = {
shownNotification: "SHOWN_NOTIFICATION",
shownWarning: "SHOWN_WARNING",
changedRoute: "CHANGED_ROUTE",
appInitialised: "APP_INITIALISED",
requestSent: "REQUEST_SENT"... | import { browserHistory } from 'react-router';
const instanceID = Math.floor(Math.random() * 10000) + 1;
export const eventTypes = {
shownNotification: "SHOWN_NOTIFICATION",
shownWarning: "SHOWN_WARNING",
changedRoute: "CHANGED_ROUTE",
appInitialised: "APP_INITIALISED",
requestSent: "REQUEST_SENT"... |
Fix exception caused by calling validateLayoutProperty without passing a style | 'use strict';
var validate = require('./validate');
var ValidationError = require('../error/validation_error');
module.exports = function validateLayoutProperty(options) {
var key = options.key;
var style = options.style;
var styleSpec = options.styleSpec;
var value = options.value;
var propertyKe... | 'use strict';
var validate = require('./validate');
var ValidationError = require('../error/validation_error');
module.exports = function validateLayoutProperty(options) {
var key = options.key;
var style = options.style;
var styleSpec = options.styleSpec;
var value = options.value;
var propertyKe... |
Raise version for release due to font licensing issues resolution | from setuptools import setup, find_packages
import sys, os
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
except IOError:
README = ''
version = "0.0.2"
setup(name='backlash',
version=version,
description="Standalone WebOb port of the ... | from setuptools import setup, find_packages
import sys, os
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
except IOError:
README = ''
version = "0.0.1a2"
setup(name='backlash',
version=version,
description="Standalone WebOb port of th... |
Add stubs for handling requests to server. | import json
import threading
import socket
import SocketServer
from orderbook import asks, bids
class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):
def handle(self):
try:
while True:
data = self.request.recv(1024)
if data:
res... | import json
import threading
import socket
import SocketServer
from orderbook import match_bid, offers, asks
messages = []
class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):
def handle(self):
try:
while True:
data = self.request.recv(1024)
if d... |
Fix KoboS3Storage deprecated bucket and acl arguments | # coding: utf-8
from django.conf import settings as django_settings
from django.core.files.storage import FileSystemStorage
from storages.backends.s3boto3 import S3Boto3Storage
def get_kobocat_storage():
"""
Return an instance of a storage object depending on the setting
`KOBOCAT_DEFAULT_FILE_STORAGE` val... | # coding: utf-8
from django.conf import settings as django_settings
from django.core.files.storage import FileSystemStorage
from storages.backends.s3boto3 import S3Boto3Storage
def get_kobocat_storage():
"""
Return an instance of a storage object depending on the setting
`KOBOCAT_DEFAULT_FILE_STORAGE` val... |
Fix wrong varname in provider class. | <?php
namespace Rych\Silex\Provider;
use Silex\Application;
use Silex\ServiceProviderInterface;
use Rych\Plates\Extension\RoutingExtension;
use Rych\Plates\Extension\SecurityExtension;
class PlatesServiceProvider implements ServiceProviderInterface
{
public function register(Application $app)
{
$app... | <?php
namespace Rych\Silex\Provider;
use Silex\Application;
use Silex\ServiceProviderInterface;
use Rych\Plates\Extension\RoutingExtension;
use Rych\Plates\Extension\SecurityExtension;
class PlatesServiceProvider implements ServiceProviderInterface
{
public function register(Application $app)
{
$app... |
BAP-11412: Implement enable/disable operations
- CS Fix | <?php
namespace Oro\Bundle\TranslationBundle\Helper;
use Oro\Bundle\ConfigBundle\Config\ConfigManager;
use Oro\Bundle\LocaleBundle\DependencyInjection\Configuration;
use Oro\Bundle\TranslationBundle\Entity\Language;
class LanguageHelper
{
/** @var ConfigManager */
protected $configManager;
/**
* @p... | <?php
namespace Oro\Bundle\TranslationBundle\Helper;
use Oro\Bundle\ConfigBundle\Config\ConfigManager;
use Oro\Bundle\LocaleBundle\DependencyInjection\Configuration;
use Oro\Bundle\TranslationBundle\Entity\Language;
class LanguageHelper
{
/** @var ConfigManager */
protected $configManager;
/**
* @p... |
Change mapping to avoid warning | from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
class UserMetadata(models.Model):
user = models.OneToOneField(
User, related_name="metadata", on_delete=models.CASCADE
)
tos_version = models.IntegerField(default=0)
tos_accepted = models.... | from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
class UserMetadata(models.Model):
user = models.ForeignKey(
User, related_name="metadata", unique=True, on_delete=models.CASCADE
)
tos_version = models.IntegerField(default=0)
tos_accepted... |
Validate that score doesn't already exist for a round when submitting the form | from flask.ext.wtf import Form
from wtforms import SelectField, BooleanField, IntegerField, TextField, \
validators
from models import RobotScore
class TeamForm(Form):
number = IntegerField("Number", [validators.Required(),
validators.NumberRange(min=1, max=99999)])
na... | from flask.ext.wtf import Form
from wtforms import SelectField, BooleanField, IntegerField, TextField, \
validators
class TeamForm(Form):
number = IntegerField("Number", [validators.Required(),
validators.NumberRange(min=1, max=99999)])
name = TextField("Name", [valida... |
Add conf file to installation script | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
from setuptools import setup
from dlstats import version
import os
setup(name='dlstats',
version=version.version,
description='A python module that provides an interface between statistics providers and pandas.',
author='Widukind team',
author_email='dev@mic... | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
from setuptools import setup
from dlstats import version
import os
setup(name='dlstats',
version=version.version,
description='A python module that provides an interface between statistics providers and pandas.',
author='Widukind team',
author_email='dev@mic... |
Add a note on env configuration | module.exports = function(scope, argv) {
return {
install: function (done) {
scope.applyConfig({
create: {
Image: "niallo/strider:latest",
Env: {
/* https://github.com/Strider-CD/strider#configuring */
}
},
start: {
PublishAllPorts:... | module.exports = function(scope, argv) {
return {
install: function (done) {
scope.applyConfig({
create: {
Image: "niallo/strider:latest",
},
start: {
PublishAllPorts: !!argv.publish
}
}, function (err) {
if (err) throw err;
scope.ins... |
Fix for incoming PM matches always being null. | package mnm.mods.tabbychat.filters;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import mnm.mods.tabbychat.TabbyChat;
import mnm.mods.tabbychat.api.Channel;
import mnm.mods.tabbychat.api.TabbyAPI;
import mnm.mods.tabbychat.api.filters.Filter;
import mnm.mods.tabbychat.api.filters.Fil... | package mnm.mods.tabbychat.filters;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import mnm.mods.tabbychat.TabbyChat;
import mnm.mods.tabbychat.api.Channel;
import mnm.mods.tabbychat.api.TabbyAPI;
import mnm.mods.tabbychat.api.filters.Filter;
import mnm.mods.tabbychat.api.filters.Fil... |
Make 'Router created' message translatable
Change-Id: If0e246157a72fd1cabdbbde77e0c057d9d611eaa | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012, Nachi Ueno, NTT MCL, Inc.
# All rights reserved.
"""
Views for managing Quantum Routers.
"""
import logging
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import forms
from horizon imp... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012, Nachi Ueno, NTT MCL, Inc.
# All rights reserved.
"""
Views for managing Quantum Routers.
"""
import logging
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from horizon import forms
from horizon imp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.