text
stringlengths
17
1.47k
positive
stringlengths
673
4.43k
negative
stringlengths
677
2.81k
Disable eslint rules ember/no-legacy-test-waiters and ember/no-mixins
'use strict'; module.exports = { root: true, parser: 'babel-eslint', parserOptions: { ecmaVersion: 2018, sourceType: 'module', }, plugins: ['ember', 'prettier'], extends: [ 'eslint:recommended', 'plugin:ember/recommended', 'plugin:prettier/recommended', ], env: { browser: true, ...
'use strict'; module.exports = { root: true, parser: 'babel-eslint', parserOptions: { ecmaVersion: 2018, sourceType: 'module', }, plugins: ['ember', 'prettier'], extends: [ 'eslint:recommended', 'plugin:ember/recommended', 'plugin:prettier/recommended', ], env: { browser: true, ...
Add clasifiers for the Python implementations and versions
#!/usr/bin/env python import sys from setuptools import setup from setuptools.command.test import test as TestCommand import nacl try: import nacl.nacl except ImportError: # installing - there is no cffi yet ext_modules = [] else: # building bdist - cffi is here! ext_modules = [nacl.nacl.ffi.veri...
#!/usr/bin/env python import sys from setuptools import setup from setuptools.command.test import test as TestCommand import nacl try: import nacl.nacl except ImportError: # installing - there is no cffi yet ext_modules = [] else: # building bdist - cffi is here! ext_modules = [nacl.nacl.ffi.veri...
Test if method buildViolation exist and fallback to addViolation for symfony < 2.5
<?php /** * @author Marc Pantel <pantel.m@gmail.com> */ namespace Payum\Core\Bridge\Symfony\Validator\Constraints; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; /** * CreditCardDateValidator * * Validate if the Credit Card is not expired */ class CreditCardDate...
<?php /** * @author Marc Pantel <pantel.m@gmail.com> */ namespace Payum\Core\Bridge\Symfony\Validator\Constraints; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; /** * CreditCardDateValidator * * Validate if the Credit Card is not expired */ class CreditCardDate...
Add xlrd dependency for notebook
#! /usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='OpenFisca-Senegal', version='0.5.1', author='OpenFisca Team', author_email='contact@openfisca.fr', classifiers=[ "Development Status :: 2 - Pre-Alpha", "License :: OSI Approved...
#! /usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='OpenFisca-Senegal', version='0.5.1', author='OpenFisca Team', author_email='contact@openfisca.fr', classifiers=[ "Development Status :: 2 - Pre-Alpha", "License :: OSI Approved...
Fix missing comma in requirements
from setuptools import setup setup( name='scuevals-api', packages=['scuevals_api'], include_package_data=True, test_suite='tests', entry_points={ 'console_scripts': [ 'app=scuevals_api.cmd:cli' ] }, install_requires=[ 'alembic==0.9.7', 'beautifuls...
from setuptools import setup setup( name='scuevals-api', packages=['scuevals_api'], include_package_data=True, test_suite='tests', entry_points={ 'console_scripts': [ 'app=scuevals_api.cmd:cli' ] }, install_requires=[ 'alembic==0.9.7' 'beautifulso...
Add data fixers to reindex for search by re-saving everything
from datetime import datetime, timedelta from functools import wraps import makerbase from makerbase.models import * def for_class(*classes): def do_that(fn): @wraps(fn) def do_for_class(): for cls in classes: keys = cls.get_bucket().get_keys() for key ...
from datetime import datetime, timedelta from functools import wraps import makerbase from makerbase.models import * def for_class(*classes): def do_that(fn): @wraps(fn) def do_for_class(): for cls in classes: keys = cls.get_bucket().get_keys() for key ...
Set more reasonable SOA defaults
var validators = require('../validators'); function SOA(host, opts) { if (typeof(host) !== 'string') throw new TypeError('host (string) is required'); if (!opts) opts = {}; var defaults = { admin: 'hostmaster.' + host, serial: 0,...
var validators = require('../validators'); function SOA(host, opts) { if (typeof(host) !== 'string') throw new TypeError('host (string) is required'); if (!opts) opts = {}; var defaults = { admin: 'hostmaster.' + host, serial: 0,...
Refactor how location is shown
import React, {PureComponent} from 'react'; import classNames from 'classnames'; import {isPast, parse} from 'date-fns'; import {formatDate, generateEventJSONLD} from './utils'; import Heading from '../Heading'; import Link from '../Link'; import styles from './ConferenceItem.scss'; export default class ConferenceIte...
import React, {PureComponent} from 'react'; import classNames from 'classnames'; import {isPast, parse} from 'date-fns'; import {formatDate, generateEventJSONLD} from './utils'; import Heading from '../Heading'; import Link from '../Link'; import styles from './ConferenceItem.scss'; export default class ConferenceIte...
Enhance error messaging on exception
<?php namespace Hub\Client\Common; use Hub\Client\Exception\BadRequestException; use Hub\Client\Exception\NotFoundException; use Hub\Client\Exception\NotAuthorizedException; use RuntimeException; class ErrorResponseHandler { public static function handle($response) { if ($response->getStatusCode() ==...
<?php namespace Hub\Client\Common; use Hub\Client\Exception\BadRequestException; use Hub\Client\Exception\NotFoundException; use Hub\Client\Exception\NotAuthorizedException; use RuntimeException; class ErrorResponseHandler { public static function handle($response) { if ($response->getStatusCode() ==...
feat: Add a more button to excerpt in blog list
import React from "react"; import { rhythm } from "../utils/typography"; import Link from "gatsby-link"; export default ({ data }) => { console.log(data); return ( <div> <h4>{data.allMarkdownRemark.totalCount} Posts</h4> {data.allMarkdownRemark.edges.map(({ node }) => ( <div key={node.id}> ...
import React from "react"; import { rhythm } from "../utils/typography"; import Link from "gatsby-link"; export default ({ data }) => { console.log(data); return ( <div> <h4>{data.allMarkdownRemark.totalCount} Posts</h4> {data.allMarkdownRemark.edges.map(({ node }) => ( <div key={node.id}> ...
Add name of collection in backbone model
{% include "model.tpl.js" %} /** * File: collection.tpl * User: Martin Martimeo * Date: 29.04.13 * Time: 19:18 */ var {{ collection_name }}Collection = Backbone.Collection.extend({ model: {{ collection_name }}Model, name: '{{ collection_name }}', url: '{{ api_url }}/{{ collection_name }}', _nu...
{% include "model.tpl.js" %} /** * File: collection.tpl * User: Martin Martimeo * Date: 29.04.13 * Time: 19:18 */ var {{ collection_name }}Collection = Backbone.Collection.extend({ model: {{ collection_name }}Model, url: '{{ api_url }}/{{ collection_name }}', _numPages: undefined, _loadedPages...
Make UUIDField have a fixed max-length
from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.db import models from django.utils import six from django.utils.translation import ugettext_lazy as _ from psycopg2.extras import register_uuid register_uuid() class UUIDField(six.with_metaclass(mode...
from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.db import models from django.utils import six from django.utils.translation import ugettext_lazy as _ from psycopg2.extras import register_uuid register_uuid() class UUIDField(six.with_metaclass(mode...
BUG(1900): Allow PropDict.sources in python bindings to be any sequence.
class PropDict(dict): def __init__(self, srcs): dict.__init__(self) self._sources = srcs def set_source_preference(self, sources): """ Change list of source preference This method has been deprecated and should no longer be used. """ raise DeprecationWarn...
class PropDict(dict): def __init__(self, srcs): dict.__init__(self) self._sources = srcs def set_source_preference(self, sources): """ Change list of source preference This method has been deprecated and should no longer be used. """ raise DeprecationWarn...
Add an EntryDetailCtrl for retreiving the Entry details
var trexControllers = angular.module('trexControllers', []); trexControllers.controller('ProjectListCtrl', ['$scope', 'Project', function($scope, Project) { $scope.projects = Project.query(); $scope.order = "name"; $scope.orderreverse = false; $scope.setOrder = function(name) { ...
var trexControllers = angular.module('trexControllers', []); trexControllers.controller('ProjectListCtrl', ['$scope', 'Project', function($scope, Project) { $scope.projects = Project.query(); $scope.order = "name"; $scope.orderreverse = false; $scope.setOrder = function(name) { ...
Add support for float primitive git-svn-id: 7e8def7d4256e953abb468098d8cb9b4faff0c63@6213 12255794-1b5b-4525-b599-b0510597569d
package com.arondor.common.reflection.reflect.instantiator; import java.util.HashMap; import java.util.Map; public class FastPrimitiveConverter { private interface PrimitiveConverter { Object convert(String value); } private final Map<String, PrimitiveConverter> primitiveConverterMap = new Ha...
package com.arondor.common.reflection.reflect.instantiator; import java.util.HashMap; import java.util.Map; public class FastPrimitiveConverter { private interface PrimitiveConverter { Object convert(String value); } private final Map<String, PrimitiveConverter> primitiveConverterMap = new Ha...
Use the correct option name
from mercury.common.configuration import MercuryConfiguration DEFAULT_CONFIG_FILE = 'mercury-inventory.yaml' def parse_options(): configuration = MercuryConfiguration( 'mercury-inventory', DEFAULT_CONFIG_FILE, description='The mercury inventory service' ) configuration.add_option...
from mercury.common.configuration import MercuryConfiguration DEFAULT_CONFIG_FILE = 'mercury-inventory.yaml' def parse_options(): configuration = MercuryConfiguration( 'mercury-inventory', DEFAULT_CONFIG_FILE, description='The mercury inventory service' ) configuration.add_option...
Exclude tests package from distribution
#!/usr/bin/env python import sys, os try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup # Hack to prevent "TypeError: 'NoneType' object is not callable" error # in multiprocessing/util.py _exit_function when setup.py exits # (see http://www.eby-sarna.com/pi...
#!/usr/bin/env python import sys, os try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup # Hack to prevent "TypeError: 'NoneType' object is not callable" error # in multiprocessing/util.py _exit_function when setup.py exits # (see http://www.eby-sarna.com/pi...
Replace array with ArrayCollection in decks.
<?php namespace Mo\FlashCardsBundle\Document; use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; use Doctrine\Common\Collections\ArrayCollection; /** * @MongoDB\Document(collection="decks") */ class Deck { /** * @MongoDB\Id */ protected $id; /** * @MongoDB\St...
<?php namespace Mo\FlashCardsBundle\Document; use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; /** * @MongoDB\Document(collection="decks") */ class Deck { /** * @MongoDB\Id */ protected $id; /** * @MongoDB\String */ protected $name; /**...
CRM-2726: Add process for export job once customer was created or updated
<?php namespace Oro\Bundle\IntegrationBundle\Exception; class SoapConnectionException extends TransportException { /** * @param string $response * @param \Exception $exception * @param string $request * @param string $headers * * @return static */ public static f...
<?php namespace Oro\Bundle\IntegrationBundle\Exception; class SoapConnectionException extends TransportException { /** * @param string $response * @param \Exception $exception * @param string $request * @param string $headers * * @return static */ public static f...
Update vector-im to riot-im on Login Signed-off-by: Andrew (anoa) <1e90ef5887ac4934847b7d77145a2a1355b08439@openmailbox.org>
/* Copyright 2015, 2016 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 law or agreed to in writing, sof...
/* Copyright 2015, 2016 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 law or agreed to in writing, sof...
Use the correct path for telegram config
'use strict'; let Telegram = require( 'node-telegram-bot-api' ); let config = require( '../config.js' ); let BotPlug = require( './BotPlug.js' ); class TelegramBotPlug extends BotPlug { constructor( bot ){ super( bot ); if( config.bot.plugins.indexOf( 'Telegram' ) > -1 ){ this.telegra...
'use strict'; let Telegram = require( 'node-telegram-bot-api' ); let config = require( '../config.js' ); let BotPlug = require( './BotPlug.js' ); class TelegramBotPlug extends BotPlug { constructor( bot ){ super( bot ); if( config.bot.plugins.indexOf( 'Telegram' ) > -1 ){ this.telegra...
Use install_requires= and bump version It appears that the "requires" keyword argument to setup() doesn't do the right thing. This may be a brain-o on my part. This switches back to using "install_requires" and bumps the version for release.
#!/usr/bin/env python from setuptools import setup def readreq(filename): result = [] with open(filename) as f: for req in f: req = req.partition('#')[0].strip() if not req: continue result.append(req) return result def readfile(filename): ...
#!/usr/bin/env python from setuptools import setup def readreq(filename): result = [] with open(filename) as f: for req in f: req = req.partition('#')[0].strip() if not req: continue result.append(req) return result def readfile(filename): ...
Create a source map for minified JS code.
module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-connect'); // Project configuration. grunt.initConfig({ connect: { server: { options: { port: 8000, base: '.', keepalive: true } ...
module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-connect'); // Project configuration. grunt.initConfig({ connect: { server: { options: { port: 8000, base: '.', keepalive: true } ...
Update laravel/mvc-basics/step-by-step/23 with theme formatting
<?php // ~/Sites/presentation/mvc-basics/resources/views/event/tickets/create.blade.php // Using your text editor, create the `create.blade.php` file and paste the // following code. <html> <head> <title>Create Event Ticket</title> </head> <body> <form class="form-horizontal" method="post" action="{{ route('e...
<?php // ~/Sites/presentation/mvc-basics/resources/views/event/tickets/create.blade.php // Using your text editor, create the `create.blade.php` file and paste the // following code. <html> <head> <title>Create Event Ticket</title> </head> <body> <form method="post" action="{{ route('event.tickets.store') }}"...
Fix missing comma in `install_requires` coincidentally, I [made a video about this today](https://www.youtube.com/watch?v=5Zto6VYsNsI)
import os try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.md') as f: readme = f.read() setup( name="pykwalify", version="1.7.0", description='Python lib/cli for JSON/YAML schema validation', long_description=readme, long_descript...
import os try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.md') as f: readme = f.read() setup( name="pykwalify", version="1.7.0", description='Python lib/cli for JSON/YAML schema validation', long_description=readme, long_descript...
Handle no git user configured
from git import Repo, exc import os class GitRepo(object): def __init__(self, root=None, remote="origin", lazy=True): self.remote_name = remote self.root = root self._repo = None if not lazy: self.repo @property def repo(self): if self._repo is None: ...
from git import Repo, exc import os class GitRepo(object): def __init__(self, root=None, remote="origin", lazy=True): self.remote_name = remote self.root = root self._repo = None if not lazy: self.repo @property def repo(self): if self._repo is None: ...
Revert "remove NULL check, replace with DummyLayout" This reverts commit ce03278d842a0ff6325f6041e4c95dee0bfd74c6.
<?php namespace Teach\Adapters\Web\Lesplan; final class Fase implements \Teach\Adapters\HTML\LayoutableInterface { private $title; /** * * @var \Teach\Adapters\HTML\LayoutableInterface[] */ private $onderdelen = array(); /** * * @var \Teach\Adapters\HTML\LayoutableInter...
<?php namespace Teach\Adapters\Web\Lesplan; use Teach\Adapters\HTML\DummyLayout; final class Fase implements \Teach\Adapters\HTML\LayoutableInterface { private $title; /** * * @var \Teach\Adapters\HTML\LayoutableInterface[] */ private $onderdelen = array(); /** * * @var...
Add a proper validator for disable_builtins git-svn-id: ad91b9aa7ba7638d69f912c9f5d012e3326e9f74@2243 3942dd89-8c5d-46d7-aeed-044bccf3e60c
import logging from flexget import plugin from flexget.plugin import priority, register_plugin, plugins log = logging.getLogger('builtins') def all_builtins(): """Helper function to return an iterator over all builtin plugins.""" return (plugin for plugin in plugins.itervalues() if plugin.builtin) class Pl...
import logging from flexget import plugin from flexget.plugin import priority, register_plugin log = logging.getLogger('builtins') class PluginDisableBuiltins(object): """ Disables all builtin plugins from a feed. """ def __init__(self): self.disabled = [] def validator(self): ...
Update mozci version to 0.13.2
from setuptools import setup, find_packages deps = [ 'mozillapulse>=1.1', 'mozci>=0.13.2', 'treeherder-client>=1.5', 'ijson>=2.2', 'requests', ] setup(name='pulse-actions', version='0.1.4', description='A pulse listener that acts upon messages with mozci.', classifiers=['Intended...
from setuptools import setup, find_packages deps = [ 'mozillapulse>=1.1', 'mozci>=0.13.1', 'treeherder-client>=1.5', 'ijson>=2.2', 'requests', ] setup(name='pulse-actions', version='0.1.4', description='A pulse listener that acts upon messages with mozci.', classifiers=['Intended...
:bug: Replace deprecated node type simpleSelector with selector
'use strict'; var helpers = require('../helpers'); module.exports = { 'name': 'placeholder-in-extend', 'defaults': {}, 'detect': function (ast, parser) { var result = []; ast.traverseByType('atkeyword', function (keyword, i, parent) { keyword.forEach(function (item) { if (item.content ===...
'use strict'; var helpers = require('../helpers'); module.exports = { 'name': 'placeholder-in-extend', 'defaults': {}, 'detect': function (ast, parser) { var result = []; ast.traverseByType('atkeyword', function (keyword, i, parent) { keyword.forEach(function (item) { if (item.content ===...
[Discord] Handle bot missing permissions for app commands
from discord import app_commands from discord.ext import commands import logging import sys import traceback import sentry_sdk class CommandTree(app_commands.CommandTree): async def on_error(self, interaction, error): # Command Invoke Error if isinstance(error, app_commands.CommandInvokeError)...
from discord import app_commands from discord.ext import commands import logging import sys import traceback import sentry_sdk class CommandTree(app_commands.CommandTree): async def on_error(self, interaction, error): if ( isinstance(error, app_commands.TransformerError) and is...
Use next method of reader object
import csv from datetime import datetime from django.shortcuts import render from django.utils import timezone from django.views.generic import TemplateView from .forms import FeedbackUploadForm from .models import Feedback class FeedbackView(TemplateView): template_name = 'index.html' def get(self, reques...
import csv from datetime import datetime from django.shortcuts import render from django.utils import timezone from django.views.generic import TemplateView from .forms import FeedbackUploadForm from .models import Feedback class FeedbackView(TemplateView): template_name = 'index.html' def get(self, reques...
Add umdNamedDefine to webpack to make it easier to use in a <script> tag.
/* eslint no-var:0 */ var webpack = require('webpack'); var yargs = require('yargs'); var options = yargs .alias('p', 'optimize-minimize') .alias('d', 'debug') .argv; var config = { entry: './src/vizceral.js', output: { path: './dist', filename: options.optimizeMinimize ? 'vizceral.min.js' : 'vizcer...
/* eslint no-var:0 */ var webpack = require('webpack'); var yargs = require('yargs'); var options = yargs .alias('p', 'optimize-minimize') .alias('d', 'debug') .argv; var config = { entry: './src/vizceral.js', output: { path: './dist', filename: options.optimizeMinimize ? 'vizceral.min.js' : 'vizcer...
Simplify loop in linear gradient.
<?php namespace mcordingley\Regression\Algorithm\GradientDescent\Gradient; final class Linear implements Gradient { /** @var int */ private $power; /** * @param int $power */ public function __construct($power = 2) { $this->power = $power; } /** * @param array $coe...
<?php namespace mcordingley\Regression\Algorithm\GradientDescent\Gradient; final class Linear implements Gradient { /** @var int */ private $power; /** * @param int $power */ public function __construct($power = 2) { $this->power = $power; } /** * @param array $coe...
Update ID of device in load script
import argparse import requests import time DEFAULT_DEVICE = 0 DEFAULT_FILE = '../data/ECG_data.csv' def main(device=0, filename=DEFAULT_FILE): print("Loading firebase for device #%d" % device) with open(filename) as f: index = 0 count = 0 timestamp = int(time.time() * 1000) f...
import argparse import requests import time DEFAULT_DEVICE = 0 DEFAULT_FILE = '../data/ECG_data.csv' def main(device=0, filename=DEFAULT_FILE): print("Loading firebase for device #%d" % device) with open(filename) as f: index = 0 count = 0 timestamp = int(time.time() * 1000) f...
Use lib/ instead of src/lib.
#/usr/bin/env python2.6 # # $Id: setup.py 87 2010-07-01 18:01:03Z ver $ from distutils.core import setup description = """ The Jersey core libraries provide common abstractions used by Jersey software. """ def getVersion(): import os packageSeedFile = os.path.join("lib", "_version.py") ns = {"__name__"...
#/usr/bin/env python2.6 # # $Id: setup.py 87 2010-07-01 18:01:03Z ver $ from distutils.core import setup description = """ The Jersey core libraries provide common abstractions used by Jersey software. """ def getVersion(): import os packageSeedFile = os.path.join("src", "lib", "_version.py") ns = {"__...
Fix for Chrome filepath C:\fakepath\
/** */ (function($) { $.fn.inputFileText = function(userOptions) { var MARKER_ATTRIBUTE = 'data-inputFileText'; if(this.attr(MARKER_ATTRIBUTE) === 'true') { // Plugin has already been applied to input file element return this; } var options = $.extend({ ...
/** */ (function($) { $.fn.inputFileText = function(userOptions) { var MARKER_ATTRIBUTE = 'data-inputFileText'; if(this.attr(MARKER_ATTRIBUTE) === 'true') { // Plugin has already been applied to input file element return this; } var options = $.extend({ ...
Fix regex as the `:` after the column is optional Fixes SublimeLinter/SublimeLinter#1847 Closes #17 Output from pyflakes can be ``` <stdin>:1044:12 undefined name 'settingss' <stdin>:34:45: invalid syntax ``` t.i. the `:` after the column is optional. In the latter case `filename` overmatched ("not lazy") to "<std...
from SublimeLinter.lint import PythonLinter import re class Pyflakes(PythonLinter): cmd = 'pyflakes' regex = r'''(?x) ^(?P<filename>.+?):(?P<line>\d+):((?P<col>\d+):?)?\s # The rest of the line is the error message. # Within that, capture anything within single quotes as `near`. ...
from SublimeLinter.lint import PythonLinter import re class Pyflakes(PythonLinter): cmd = 'pyflakes' regex = r'''(?x) ^(?P<filename>.+):(?P<line>\d+):((?P<col>\d+):?)?\s # The rest of the line is the error message. # Within that, capture anything within single quotes as `near`. ...
Add __repr__ for User model
import os import hashlib import datetime import peewee database = peewee.Proxy() class BaseModel(peewee.Model): class Meta: database = database class User(BaseModel): id = peewee.IntegerField(primary_key=True) name = peewee.CharField(unique=True) password = peewee.CharField() salt = p...
import os import hashlib import datetime import peewee database = peewee.Proxy() class BaseModel(peewee.Model): class Meta: database = database class User(BaseModel): id = peewee.IntegerField(primary_key=True) name = peewee.CharField(unique=True) password = peewee.CharField() salt = p...
Remove the missing script tag resource
<?php return array( /* |-------------------------------------------------------------------------- | Service Name |-------------------------------------------------------------------------- | | Name of the API service these description configs are for. | */ "name" => "Shopify", /...
<?php return array( /* |-------------------------------------------------------------------------- | Service Name |-------------------------------------------------------------------------- | | Name of the API service these description configs are for. | */ "name" => "Shopify", ...
Fix vertical layout visibility update
// @flow import { helpers } from 'utils'; import LayoutBehavior from './behaviors/LayoutBehavior'; const classes = { CLASS_NAME: 'layout__vertical-layout', ITEM: 'layout__vertical-layout-item', HIDDEN: 'layout__hidden' }; export default Marionette.View.extend({ initialize(options) { helpers.en...
// @flow import { helpers } from 'utils'; import LayoutBehavior from './behaviors/LayoutBehavior'; const classes = { CLASS_NAME: 'layout__vertical-layout', ITEM: 'layout__vertical-layout-item', HIDDEN: 'layout__hidden' }; export default Marionette.View.extend({ initialize(options) { helpers.en...
Move CancellablePromiseInterface typehint to class property
<?php namespace React\Promise; class CancellationQueue { private $started = false; /** * @var CancellablePromiseInterface[] */ private $queue = []; public function __invoke() { if ($this->started) { return; } $this->started = true; $this->dr...
<?php namespace React\Promise; class CancellationQueue { private $started = false; private $queue = []; public function __invoke() { if ($this->started) { return; } $this->started = true; $this->drain(); } public function enqueue($promise) { ...
Fix the corporation migration to not have any unique indexes
<?php use Phinx\Db\Adapter\MysqlAdapter; use Phinx\Migration\AbstractMigration; class Corporations extends AbstractMigration { /** * Change Method. * * Write your reversible migrations using this method. * * More information on writing migrations is available here: * http://docs.phin...
<?php use Phinx\Db\Adapter\MysqlAdapter; use Phinx\Migration\AbstractMigration; class Corporations extends AbstractMigration { /** * Change Method. * * Write your reversible migrations using this method. * * More information on writing migrations is available here: * http://docs.phin...
Make sure to parse OBO documents in order
import os import fastobo from .base import BaseParser from ._fastobo import FastoboParser class OboParser(FastoboParser, BaseParser): @classmethod def can_parse(cls, path, buffer): return buffer.lstrip().startswith((b"format-version:", b"[Term", b"[Typedef")) def parse_from(self, handle): ...
import os import fastobo from .base import BaseParser from ._fastobo import FastoboParser class OboParser(FastoboParser, BaseParser): @classmethod def can_parse(cls, path, buffer): return buffer.lstrip().startswith((b"format-version:", b"[Term", b"[Typedef")) def parse_from(self, handle): ...
Store merkle roots for 10 minutes
#Copyright (C) 2011,2012 Colin Rice #This software is licensed under an included MIT license. #See the file entitled LICENSE #If you were not provided with a copy of the license please contact: # Colin Rice colin@daedrum.net import gevent, time, logging class Getwork_Store: """ Class that stores getworks so w...
#Copyright (C) 2011,2012 Colin Rice #This software is licensed under an included MIT license. #See the file entitled LICENSE #If you were not provided with a copy of the license please contact: # Colin Rice colin@daedrum.net import gevent, time, logging class Getwork_Store: """ Class that stores getworks so ...
Add bumpversion, sync package version
""" trafficserver_exporter ---------------------- An Apache Traffic Server metrics exporter for Prometheus. Uses the stats_over_http plugin to translate JSON data into Prometheus format. """ from setuptools import setup setup( name='trafficserver_exporter', version='0.0.3', author='Greg Dallavalle', ...
""" trafficserver_exporter ---------------------- An Apache Traffic Server metrics exporter for Prometheus. Uses the stats_over_http plugin to translate JSON data into Prometheus format. """ from setuptools import setup setup( name='trafficserver_exporter', version='0.0.2', author='Greg Dallavalle', ...
Tag for Python 3 support.
#!/usr/bin/env python from distribute_setup import use_setuptools use_setuptools() from setuptools import setup from pudb import VERSION try: readme = open("README.rst") long_description = str(readme.read()) finally: readme.close() setup(name='pudb', version=VERSION, description='A full-scr...
#!/usr/bin/env python from distribute_setup import use_setuptools use_setuptools() from setuptools import setup from pudb import VERSION try: readme = open("README.rst") long_description = str(readme.read()) finally: readme.close() setup(name='pudb', version=VERSION, description='A full-scr...
Move --closure and --no-unwinding-assertions to bench-defs; rewrite choices between --32 and --64
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.util as util import benchexec.tools.tem...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.util as util import benchexec.tools.tem...
Change endpoint to match spec
package uk.gov.dvla.services.enquiry; import uk.gov.dvla.domain.Driver; import uk.gov.dvla.domain.Person; import uk.gov.dvla.services.ManagedService; public interface DriverEnquiry extends ManagedService { public static final String EXTERNAL_DRIVER_URI = "/iiadd/api/v1/driver"; public static final St...
package uk.gov.dvla.services.enquiry; import uk.gov.dvla.domain.Driver; import uk.gov.dvla.domain.Person; import uk.gov.dvla.services.ManagedService; public interface DriverEnquiry extends ManagedService { public static final String EXTERNAL_DRIVER_URI = "/mib/driver"; public static final String DRIV...
Refactor encoders to have base class
import logging import datetime import decimal import elasticsearch from bson import ObjectId, DBRef from nefertari.renderers import _JSONEncoder log = logging.getLogger(__name__) class JSONEncoderMixin(object): def default(self, obj): if isinstance(obj, (ObjectId, DBRef)): return str(obj) ...
import logging import datetime import decimal import elasticsearch from bson import ObjectId, DBRef from nefertari.renderers import _JSONEncoder log = logging.getLogger(__name__) class JSONEncoder(_JSONEncoder): def default(self, obj): if isinstance(obj, (ObjectId, DBRef)): return str(obj)...
Handle Django 1.4 nuance for the empty ModelMultipleChoiceField values
from django import forms from .models import ObjectSet def objectset_form_factory(Model, queryset=None): """Takes an ObjectSet subclass and defines a base form class. In addition, an optional queryset can be supplied to limit the choices for the objects. This uses the generic `objects` field rather ...
from django import forms from .models import ObjectSet def objectset_form_factory(Model, queryset=None): """Takes an ObjectSet subclass and defines a base form class. In addition, an optional queryset can be supplied to limit the choices for the objects. This uses the generic `objects` field rather ...
Use more precise grep expression Otherwise we match wrong lines when memory stats contain PID. Change-Id: I924c1b151ddaad8209445a514bf02a7af5d2e0e0 Reviewed-on: http://review.couchbase.org/79848 Reviewed-by: Pavel Paulau <dd88eded64e90046a680e3a6c0828ceb8fe8a0e7@gmail.com> Tested-by: Pavel Paulau <dd88eded64e90046a68...
from cbagent.collectors.libstats.remotestats import RemoteStats, parallel_task class PSStats(RemoteStats): METRICS = ( ("rss", 1024), # kB -> B ("vsize", 1024), ) PS_CMD = "ps -eo pid,rss,vsize,comm | " \ "grep {} | grep -v grep | sort -n -k 2 | tail -n 1" TOP_CMD = "top ...
from cbagent.collectors.libstats.remotestats import RemoteStats, parallel_task class PSStats(RemoteStats): METRICS = ( ("rss", 1024), # kB -> B ("vsize", 1024), ) PS_CMD = "ps -eo pid,rss,vsize,comm | " \ "grep {} | grep -v grep | sort -n -k 2 | tail -n 1" TOP_CMD = "top ...
Add support for configured tagName to HTMLMessage
/* global React */ /* jslint esnext:true */ import escape from '../escape'; import IntlMixin from '../mixin'; function escapeProps(props) { return Object.keys(props).reduce(function (escapedProps, name) { var value = props[name]; // TODO: Can we force string coersion here? Or would that not be ne...
/* global React */ /* jslint esnext:true */ import escape from '../escape'; import IntlMixin from '../mixin'; function escapeProps(props) { return Object.keys(props).reduce(function (escapedProps, name) { var value = props[name]; // TODO: Can we force string coersion here? Or would that not be ne...
Fix typo bug in sap b1 http POST to sap
import _ from 'underscore'; import { HTTP } from 'meteor/http' /** * SAP B1 Integration Methods */ Meteor.methods({ 'sapB1integration/testConnectionToWindowsService': (sapServerIpAddress) => { if (!this.userId && Core.hasPayrollAccess(this.userId)) { throw new Meteor.Error(401, "Unauthorized...
import _ from 'underscore'; import { HTTP } from 'meteor/http' /** * SAP B1 Integration Methods */ Meteor.methods({ 'sapB1integration/testConnectionToWindowsService': (sapServerIpAddress) => { if (!this.userId && Core.hasPayrollAccess(this.userId)) { throw new Meteor.Error(401, "Unauthorized...
Fix TPS warning messages being sent too many times
package ee.ellytr.autoclick.tps; import ee.ellytr.autoclick.EllyCheat; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.entity.Player; public class TPSRunnable implements Runnable { @Override public void run() { for (Player player : Bukkit.getOnlinePlayers()) { dou...
package ee.ellytr.autoclick.tps; import ee.ellytr.autoclick.EllyCheat; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.entity.Player; public class TPSRunnable implements Runnable { @Override public void run() { for (Player player : Bukkit.getOnlinePlayers()) { dou...
Replace removed middleware with equivalent current middleware
<?php namespace LaravelAcl\Authentication\Tests\Unit; use Illuminate\Support\Facades\Route; use Mockery as m; class ClientLoggedFilterTest extends TestCase { protected $custom_url = '/custom'; public function setUp() { parent::setUp(); Route::get('check', ['middleware' => 'admin_logged...
<?php namespace LaravelAcl\Authentication\Tests\Unit; use Illuminate\Support\Facades\Route; use Mockery as m; class ClientLoggedFilterTest extends TestCase { protected $custom_url = '/custom'; public function setUp() { parent::setUp(); Route::get('check', ['middleware' => 'logged', 'us...
Remove import of non-existent module
import { observable, action, runInAction } from 'mobx' import axios from 'axios' class AppState { @observable authenticated = false; @observable authenticating = false; @observable items = []; @observable item = {}; // constructor() { // this.authenticated = false; // this.authenticating = false; ...
import { observable, action, runInAction } from 'mobx' import axios from 'axios' import OrderModel from '../models/OrderModel'; class AppState { @observable authenticated = false; @observable authenticating = false; @observable items = []; @observable item = {}; // constructor() { // this.authenticated ...
Fix tests for legacy phpunit versions
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; /** * A list of constraint violations. *...
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator; /** * A list of constraint violations. *...
Correct module name (ord.ode4j -> org.ode4j)
/************************************************************************* * * * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * * All rights reserved. Email: russ@q12.org Web: www.q12.org * * ...
/************************************************************************* * * * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * * All rights reserved. Email: russ@q12.org Web: www.q12.org * * ...
Enable the consul secret engine
"""Vault secrets engines endpoints""" from hvac.api.secrets_engines.aws import Aws from hvac.api.secrets_engines.azure import Azure from hvac.api.secrets_engines.gcp import Gcp from hvac.api.secrets_engines.identity import Identity from hvac.api.secrets_engines.kv import Kv from hvac.api.secrets_engines.pki import Pki ...
"""Vault secrets engines endpoints""" from hvac.api.secrets_engines.aws import Aws from hvac.api.secrets_engines.azure import Azure from hvac.api.secrets_engines.gcp import Gcp from hvac.api.secrets_engines.identity import Identity from hvac.api.secrets_engines.kv import Kv from hvac.api.secrets_engines.pki import Pki ...
Drop wrap content starting with text/html New versions of Django give HTML responses with the content type 'text/html; charset: utf-8'. We don't want to wrap that, so only check for a start of text/html.
from django.http import HttpResponse import json class NonHtmlDebugToolbarMiddleware(object): """ The Django Debug Toolbar usually only works for views that return HTML. This middleware wraps any non-HTML response in HTML if the request has a 'debug' query parameter (e.g. http://localhost/foo?debug) S...
from django.http import HttpResponse import json class NonHtmlDebugToolbarMiddleware(object): """ The Django Debug Toolbar usually only works for views that return HTML. This middleware wraps any non-HTML response in HTML if the request has a 'debug' query parameter (e.g. http://localhost/foo?debug) S...
Remove unused import, make sure balance is reflected correctly
import { roundBalance } from '../../common/tools'; import { info } from '../broadcast'; let balanceStr = ''; export default Engine => class Balance extends Engine { observeBalance() { this.listen('balance', r => { const { balance: { balance: b, currency }, ...
import { roundBalance } from '../../common/tools'; import { info } from '../broadcast'; import { doUntilDone } from '../tools'; let balanceStr = ''; export default Engine => class Balance extends Engine { observeBalance() { this.listen('balance', r => { const { ...
Rename generated specimen component to make eslint happy
// Higher-order Specimen which provides theme import React, {PropTypes} from 'react'; import Span from './Span'; import parseSpecimenOptions from '../../utils/parseSpecimenOptions'; import parseSpecimenBody from '../../utils/parseSpecimenBody'; const identity = (v) => v; export default function Specimen(mapBodyToPro...
// Higher-order Specimen which provides theme import React, {PropTypes} from 'react'; import Span from './Span'; import parseSpecimenOptions from '../../utils/parseSpecimenOptions'; import parseSpecimenBody from '../../utils/parseSpecimenBody'; const identity = (v) => v; export default function Specimen(mapBodyToPro...
FIX Format String Error in Conector Driver Comando
# -*- coding: iso-8859-1 -*- from serial import SerialException import importlib import threading import logging class ConectorError(Exception): pass class ConectorDriverComando: driver = None def __init__(self, comando, driver, *args, **kwargs): # logging.getLogger().info("inici...
# -*- coding: iso-8859-1 -*- from serial import SerialException import importlib import threading import logging class ConectorError(Exception): pass class ConectorDriverComando: driver = None def __init__(self, comando, driver, *args, **kwargs): logging.getLogger().info("inicial...
Change directory to test uninitialized project
from tests.test_actions import * from ltk import actions, exceptions import unittest class TestInitAction(unittest.TestCase): def test_uninitialized(self): # todo create dir outside so folder not initialized os.chdir('/') self.assertRaises(exceptions.UninitializedError, actions.Action, os....
from tests.test_actions import * from ltk import actions, exceptions import unittest class TestInitAction(unittest.TestCase): def test_uninitialized(self): # todo create dir outside so folder not initialized self.assertRaises(exceptions.UninitializedError, actions.Action, os.getcwd()) def tes...
Fix namespace in autoload list.
<?php namespace Studio\Parts\Composer; use League\Flysystem\Filesystem; use Studio\Parts\AbstractPart; class Part extends AbstractPart { public function setupPackage($composer, Filesystem $target) { // Ask for package name $composer->name = $this->input->ask( 'Please name this pa...
<?php namespace Studio\Parts\Composer; use League\Flysystem\Filesystem; use Studio\Parts\AbstractPart; class Part extends AbstractPart { public function setupPackage($composer, Filesystem $target) { // Ask for package name $composer->name = $this->input->ask( 'Please name this pa...
Allow to search for project tags
// -*- coding: utf-8 -*- // // (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> // // See LICENSE comming with the source of 'trex' for details. // 'use strict'; var trexServices = angular.module('trex.services', ['ngResource']); trexServices.factory('Conf', function($location) { function getRootUrl() { va...
// -*- coding: utf-8 -*- // // (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> // // See LICENSE comming with the source of 'trex' for details. // 'use strict'; var trexServices = angular.module('trex.services', ['ngResource']); trexServices.factory('Conf', function($location) { function getRootUrl() { va...
Fix versioning from git after `setup.py install` When following the `README`, __init__.py raised an "IOError: [Errno 2] No such file or directory:" about `setup.py`.
# -*- coding: utf-8 -*- # ############# version ################## from pkg_resources import get_distribution, DistributionNotFound import os.path import subprocess try: _dist = get_distribution('pyethapp') # Normalize case for Windows systems dist_loc = os.path.normcase(_dist.location) here = os.path.n...
# -*- coding: utf-8 -*- # ############# version ################## from pkg_resources import get_distribution, DistributionNotFound import os.path import subprocess try: _dist = get_distribution('pyethapp') # Normalize case for Windows systems dist_loc = os.path.normcase(_dist.location) here = os.path.n...
Add test for too short isin
package name.abuchen.portfolio.util; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Test; public class IsinTest { @Test public void testValidIsin() { String ubsIsin = "CH0244767585"; assertTrue(Isin.isValid(ubsIsin)); Strin...
package name.abuchen.portfolio.util; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Test; public class IsinTest { @Test public void testValidIsin() { String ubsIsin = "CH0244767585"; assertTrue(Isin.isValid(ubsIsin)); Strin...
Fix styled-components API for ProjectDescription
import React from 'react'; import styled from 'styled-components'; import Linkify from 'linkifyjs/react'; import { generateTimeRange } from '../../utils/date.utils'; import { Section, SectionBody, SectionTitle } from '../Section'; import { CompanyName as ProjectName, Job as ProjectContainer, JobDescription, Jo...
import React from 'react'; import styled from 'styled-components'; import Linkify from 'linkifyjs/react'; import { generateTimeRange } from '../../utils/date.utils'; import { Section, SectionBody, SectionTitle } from '../Section'; import { CompanyName as ProjectName, Job as ProjectContainer, JobDescription, Jo...
Remove invalid keyword from parameters dictionary
import os from threading import Thread from werkzeug._reloader import ReloaderLoop class Watcher(Thread, ReloaderLoop): def __init__(self, paths, static, tasks, interval=1, *args, **kwargs): self.paths = paths self.static = static self.tasks = tasks self.debug = kwargs.get('debug...
import os from threading import Thread from werkzeug._reloader import ReloaderLoop class Watcher(Thread, ReloaderLoop): def __init__(self, paths, static, tasks, interval=1, *args, **kwargs): self.paths = paths self.static = static self.tasks = tasks self.debug = kwargs.get('debug...
Update user model interface name
<?php namespace ZfcUserDoctrineORM; use Zend\Module\Manager, Zend\Module\Consumer\AutoloaderProvider, ZfcUserDoctrineORM\Event\ResolveTargetEntityListener, ZfcUser\Module as ZfcUser, Doctrine\ORM\Events, Zend\EventManager\StaticEventManager; class Module implements AutoloaderProvider { public...
<?php namespace ZfcUserDoctrineORM; use Zend\Module\Manager, Zend\Module\Consumer\AutoloaderProvider, ZfcUserDoctrineORM\Event\ResolveTargetEntityListener, ZfcUser\Module as ZfcUser, Doctrine\ORM\Events, Zend\EventManager\StaticEventManager; class Module implements AutoloaderProvider { public...
Use UTC time (we want to standardise on this)
from flask import jsonify from sqlalchemy.types import String from sqlalchemy import func import datetime from .. import main from ...models import db, Framework, DraftService, Service, User, Supplier, SelectionAnswers, AuditEvent @main.route('/frameworks', methods=['GET']) def list_frameworks(): frameworks = Fr...
from flask import jsonify from sqlalchemy.types import String from sqlalchemy import func import datetime from .. import main from ...models import db, Framework, DraftService, Service, User, Supplier, SelectionAnswers, AuditEvent @main.route('/frameworks', methods=['GET']) def list_frameworks(): frameworks = Fr...
Make unittests easier to deal with. - Test everything ./test_spec.py - Test suite ./test_spec.py inverted - Test unit ./test_spec.py inverted.test_7
#!/usr/bin/python import unittest import os import json from entei import render SPECS_PATH = os.path.join('spec', 'specs') SPECS = [path for path in os.listdir(SPECS_PATH) if path.endswith('.json')] STACHE = render def _test_case_from_path(json_path): json_path = '%s.json' % json_path class MustacheTestCa...
#!/usr/bin/python import unittest import os import json from entei import render SPECS_PATH = os.path.join('spec', 'specs') SPECS = [path for path in os.listdir(SPECS_PATH) if path.endswith('.json')] STACHE = render def _test_case_from_path(json_path): class MustacheTestCase(unittest.TestCase): """A si...
Fix template in edit test suite
define([ 'jquery', 'underscore', 'backbone', 'models/testsuite/TestSuiteModel', 'text!templates/testsuites/testSuiteTemplate.html' ], function($, _, Backbone, TestSuiteModel, testSuiteTemplate) { var TestSuiteView = Backbone.View.extend({ initialize: function() { _.bindAll(...
define([ 'jquery', 'underscore', 'backbone', 'models/testsuite/TestSuiteModel', 'text!templates/testsuites/testSuiteTemplate.html' ], function($, _, Backbone, TestSuiteModel, testSuiteTemplate) { var TestSuiteView = Backbone.View.extend({ initialize: function() { _.bindAll(...
Make vote count visible after upvoting
$(document).ready(function() { MageHero_App.bindUpvote(); $('table.listing').tablesorter({ headers: { 1: { sorter: false }, 2: { sorter: false }, 4: { sorter: false }, 8: { sorter: false } }, textExtraction: function(cell) { var...
$(document).ready(function() { MageHero_App.bindUpvote(); $('table.listing').tablesorter({ headers: { 1: { sorter: false }, 2: { sorter: false }, 4: { sorter: false }, 8: { sorter: false } }, textExtraction: function(cell) { var...
Clean up tweets hset too
<?php namespace PHPSW\Spec\Suite; describe("Task", function () { describe("meetup:import:all", function () { it("expects that the task runs", function () { $stdout = task('meetup:import:all'); expect($stdout)->toMatch(trimlns('#Group: \. Events: \.+ ...
<?php namespace PHPSW\Spec\Suite; describe("Task", function () { describe("meetup:import:all", function () { it("expects that the task runs", function () { $stdout = task('meetup:import:all'); expect($stdout)->toMatch(trimlns('#Group: \. Events: \.+ ...
Add 'comment' field to list of non-numeric fields.
<?php class JsonView extends ApiView { public function render($content) { header('Content-Type: application/json; charset=utf8'); echo $this->buildOutput($content); return true; } /** * Function to build output, can be used by JSON and JSONP */ public function buildO...
<?php class JsonView extends ApiView { public function render($content) { header('Content-Type: application/json; charset=utf8'); echo $this->buildOutput($content); return true; } /** * Function to build output, can be used by JSON and JSONP */ public function buildO...
Remove a couple useless imports
import logging import socket import traceback from threading import Thread from splunklib import client _client = None class SplunkFilter(logging.Filter): """ A logging filter for Splunk's debug logs on the root logger to avoid recursion """ def filter(self, record): return not (record.modu...
import datetime import json import logging import socket import traceback from threading import Thread from splunklib import client _client = None class SplunkFilter(logging.Filter): """ A logging filter for Splunk's debug logs on the root logger to avoid recursion """ def filter(self, record): ...
Change ring buffer default length to 3 3 is the Micrometer default, 1024 is way to big and results in excessive memory usage.
package io.quarkus.micrometer.runtime.config; import java.time.Duration; import java.util.Optional; import io.quarkus.runtime.annotations.ConfigGroup; import io.quarkus.runtime.annotations.ConfigItem; @ConfigGroup public class JsonConfigGroup implements MicrometerConfig.CapabilityEnabled { /** * Support for...
package io.quarkus.micrometer.runtime.config; import java.time.Duration; import java.util.Optional; import io.quarkus.runtime.annotations.ConfigGroup; import io.quarkus.runtime.annotations.ConfigItem; @ConfigGroup public class JsonConfigGroup implements MicrometerConfig.CapabilityEnabled { /** * Support for...
Add the ability to retrieve the sha of the content.
package org.kohsuke.github; /** * A Content of a repository. * * @author Alexandre COLLIGNON */ public final class GHContent { private GHRepository owner; private String type; private String encoding; private long size; private String sha; private String name; private String path; ...
package org.kohsuke.github; /** * A Content of a repository. * * @author Alexandre COLLIGNON */ public final class GHContent { private GHRepository owner; private String type; private String encoding; private long size; private String name; private String path; private String content; ...
Move OpenID stuff under /accounts/openid/
from django.conf.urls.defaults import * from django.contrib import admin from django.contrib.auth.decorators import login_required from django.views.generic.simple import direct_to_template import settings admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), (r'^idp/', incl...
from django.conf.urls.defaults import * from django.contrib import admin from django.contrib.auth.decorators import login_required from django.views.generic.simple import direct_to_template import settings admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), (r'^idp/', incl...
Change webpack dev server port
var webpack = require('webpack') var path = require('path') var autoprefixer = require('autoprefixer') module.exports = { entry: './index.js', output: { path: './', filename: 'bundle.js', publicPath: '' }, module: { preLoaders: [ { test: /\.html$/, loader: 'r...
var webpack = require('webpack') var path = require('path') var autoprefixer = require('autoprefixer') module.exports = { entry: './index.js', output: { path: './', filename: 'bundle.js', publicPath: '' }, module: { preLoaders: [ { test: /\.html$/, loader: 'r...
Use updated containers in main
'use strict' import 'normalize.css' import React, { Component } from 'react' import ReactCSS from 'reactcss' import '../fonts/work-sans/WorkSans.css!' import '../styles/felony.css!' import colors from '../styles/variables/colors' import Header from './header/Header' import FloatingButtonContainer from '../containe...
'use strict' import 'normalize.css' import React, { Component } from 'react' import ReactCSS from 'reactcss' import '../fonts/work-sans/WorkSans.css!' import '../styles/felony.css!' import colors from '../styles/variables/colors' import Header from './header/Header' import FloatingButtonContainer from '../containe...
Add preprints to the sidebar [#OSF-7198]
from django.conf.urls import include, url from django.contrib import admin from settings import ADMIN_BASE from . import views base_pattern = '^{}'.format(ADMIN_BASE) urlpatterns = [ ### ADMIN ### url( base_pattern, include([ url(r'^$', views.home, name='home'), url(r...
from django.conf.urls import include, url from django.contrib import admin from settings import ADMIN_BASE from . import views base_pattern = '^{}'.format(ADMIN_BASE) urlpatterns = [ ### ADMIN ### url( base_pattern, include([ url(r'^$', views.home, name='home'), url(r...
Clear all notifications when sign out.
'use strict'; angular.module('copay.header').controller('HeaderController', function($scope, $rootScope, $location, walletFactory, controllerUtils) { $scope.menu = [{ 'title': 'Copayers', 'icon': 'fi-torsos-all', 'link': '#/peer' }, { 'title': 'Addresses', 'icon': 'fi-address-bo...
'use strict'; angular.module('copay.header').controller('HeaderController', function($scope, $rootScope, $location, walletFactory, controllerUtils) { $scope.menu = [{ 'title': 'Copayers', 'icon': 'fi-torsos-all', 'link': '#/peer' }, { 'title': 'Addresses', 'icon': 'fi-address-bo...
Create index mappings independently of index, just update settings?
from django.core.management.base import NoArgsCommand from elasticutils import get_es from pyelasticsearch.exceptions import IndexAlreadyExistsError, ElasticHttpError from bulbs.indexable.conf import settings from bulbs.indexable.models import polymorphic_indexable_registry class Command(NoArgsCommand): help = ...
from django.core.management.base import NoArgsCommand from elasticutils import get_es from pyelasticsearch.exceptions import IndexAlreadyExistsError, ElasticHttpError from bulbs.indexable.conf import settings from bulbs.indexable.models import polymorphic_indexable_registry class Command(NoArgsCommand): help = ...
Remove code which blanks patch files
#! /usr/bin/python2.3 # vim:sw=8:ts=8:et:nowrap import os import shutil def ApplyPatches(filein, fileout): # Generate short name such as wrans/answers2003-03-31.html (rest, name) = os.path.split(filein) (rest, dir) = os.path.split(rest) fileshort = os.path.join(dir, name) # Lo...
#! /usr/bin/python2.3 # vim:sw=8:ts=8:et:nowrap import os import shutil def ApplyPatches(filein, fileout): # Generate short name such as wrans/answers2003-03-31.html (rest, name) = os.path.split(filein) (rest, dir) = os.path.split(rest) fileshort = os.path.join(dir, name) # Lo...
Add failing test for dynamic imports
const matchSourceExpression = require('../lib/matchSourceExpression'); const expect = require('./unexpected-with-plugins'); const parse = require('../lib/parseJavascript'); describe('parseJavascript', () => { it('should parse jsx', () => { expect(parse('<main>Hello world</main>'), 'to satisfy', { type: 'P...
const matchSourceExpression = require('../lib/matchSourceExpression'); const expect = require('./unexpected-with-plugins'); const parse = require('../lib/parseJavascript'); describe('parseJavascript', () => { it('should parse jsx', () => { expect(parse('<main>Hello world</main>'), 'to satisfy', { type: 'P...
Change about link to home
import React, { Component } from 'react'; import { Link } from 'react-router'; import styles from './Header.module.css'; class Header extends Component { render() { return ( <div className={ styles.container }> <header className={ styles.header }> <Link to='/'> <h1> ...
import React, { Component } from 'react'; import { Link } from 'react-router'; import styles from './Header.module.css'; class Header extends Component { render() { return ( <div className={ styles.container }> <header className={ styles.header }> <Link to='/'> <h1> ...
Throw error returned from DAGNode.create in access controller
'use strict' const AccessController = require('./access-controller') const { DAGNode } = require('ipld-dag-pb') class IPFSAccessController extends AccessController { constructor (ipfs) { super() this._ipfs = ipfs } async load (address) { // Transform '/ipfs/QmPFtHi3cmfZerxtH9ySLdzpg1yFhocYDZgEZywd...
'use strict' const AccessController = require('./access-controller') const { DAGNode } = require('ipld-dag-pb') class IPFSAccessController extends AccessController { constructor (ipfs) { super() this._ipfs = ipfs } async load (address) { // Transform '/ipfs/QmPFtHi3cmfZerxtH9ySLdzpg1yFhocYDZgEZywd...
Fix 'undefined index `code`' error
<?php namespace Omnipay\Square\Message; use Omnipay\Common\Message\AbstractResponse; use Omnipay\Common\Message\RedirectResponseInterface; /** * Square Purchase Response */ class ChargeResponse extends AbstractResponse implements RedirectResponseInterface { public function isSuccessful() { if ($this...
<?php namespace Omnipay\Square\Message; use Omnipay\Common\Message\AbstractResponse; use Omnipay\Common\Message\RedirectResponseInterface; /** * Square Purchase Response */ class ChargeResponse extends AbstractResponse implements RedirectResponseInterface { public function isSuccessful() { if ($this...
Use arguments instead of the spread operator
"use strict"; const P = require('bluebird'); const redis = require('redis'); const HyperSwitch = require('hyperswitch'); const Redis = superclass => class extends superclass { constructor(options) { super(options); if (!options.redis) { throw new Error('Redis options not provided to t...
"use strict"; const P = require('bluebird'); const redis = require('redis'); const HyperSwitch = require('hyperswitch'); const Redis = superclass => class extends superclass { constructor(options) { super(options); if (!options.redis) { throw new Error('Redis options not provided to t...
Set resource to public in LogicboxesComodo.
<?php namespace LaravelLb; use LaravelLb\LogicBoxes; class LogicBoxesActions extends LogicBoxes { public $resource; public function __construct() { parent::__construct(); $this->resource = "actions"; } /** * Gets the Current Actions based on the criteria specified. *...
<?php namespace LaravelLb; use LaravelLb\LogicBoxes; class LogicBoxesActions extends LogicBoxes { public function __construct() { parent::__construct(); $this->resource = "actions"; } /** * Gets the Current Actions based on the criteria specified. * http://manage.logicbox...
Fix for /whoami with a user who doesn't have a profile picture
<?php /* * This file is part of the TelegramBot package. * * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Longman\TelegramBot\Entities; use Longman\TelegramBot...
<?php /* * This file is part of the TelegramBot package. * * (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Longman\TelegramBot\Entities; use Longman\TelegramBot...
Fix missing parentheses initialization error
#!/usr/bin/env python # -*- coding: utf-8 -*- # *************************************************************************** # * * # * Copyright (c) 2016 execuc * # * ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # *************************************************************************** # * * # * Copyright (c) 2016 execuc * # * ...
Add window.angular to make it pass the basic tests
(function (angular) { 'use strict'; angular.module('angular-reverse-url', ['ngRoute']) .filter('reverseUrl', ['$route', function ($route) { var regexp = /:([A-Za-z0-9]*)\\*?\\??/g; return _.memoize(function (name, params) { var targetRoute; angul...
(function () { 'use strict'; angular.module('angular-reverse-url', ['ngRoute']) .filter('reverseUrl', ['$route', function ($route) { var regexp = /:([A-Za-z0-9]*)\\*?\\??/g; return _.memoize(function (name, params) { var targetRoute; angular.forE...
Call go build with default grunt invocation
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), // the package file to use qunit: { // internal task or name of a plugin (like "qunit") all: ['tests/*.html'] }, watch: { files: ['tests/*.js', 'tests/*.html', 'tm...
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), // the package file to use qunit: { // internal task or name of a plugin (like "qunit") all: ['tests/*.html'] }, watch: { files: ['tests/*.js', 'tests/*.html', 'tm...
Stop mail transport after sending
<?php class CM_Mail_Mailer extends Swift_Mailer implements CM_Service_ManagerAwareInterface { use CM_Service_ManagerAwareTrait; public function __construct(Swift_Transport $transport) { CM_Mail_Message::register(); parent::__construct($transport); } public function send(Swift_Mime_Me...
<?php class CM_Mail_Mailer extends Swift_Mailer implements CM_Service_ManagerAwareInterface { use CM_Service_ManagerAwareTrait; public function __construct(Swift_Transport $transport) { CM_Mail_Message::register(); parent::__construct($transport); } public function send(Swift_Mime_Me...
Update regex to cope with the request paths used in portlets
/* @VaadinApache2LicenseForJavaFiles@ */ package com.vaadin.terminal.gwt.server; import java.io.IOException; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.servlet.http.HttpServletResponse; import com.vaadin.Application; import com.vaadin.terminal.ApplicationResource; import com.vaadi...
/* @VaadinApache2LicenseForJavaFiles@ */ package com.vaadin.terminal.gwt.server; import java.io.IOException; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.servlet.http.HttpServletResponse; import com.vaadin.Application; import com.vaadin.terminal.ApplicationResource; import com.vaadi...