text
stringlengths
17
1.47k
positive
stringlengths
673
4.43k
negative
stringlengths
677
2.81k
Update test to work with new monitors.
import theanets import util class TestTrainer(util.MNIST): def setUp(self): super(TestTrainer, self).setUp() self.exp = theanets.Experiment( theanets.Autoencoder, layers=(self.DIGIT_SIZE, 10, self.DIGIT_SIZE)) def assert_progress(self, algo, **kwargs): trainer...
import theanets import util class TestTrainer(util.MNIST): def setUp(self): super(TestTrainer, self).setUp() self.exp = theanets.Experiment( theanets.Autoencoder, layers=(self.DIGIT_SIZE, 10, self.DIGIT_SIZE)) def assert_progress(self, algo, **kwargs): trainer...
Update proxima nova font locations. Summary: The locations of Proxima nova have changed since this was written, this updates it to the correct location. Test plan: - Not actually sure if this is used, but it sure looks better! Auditors: michelle
/** * Executed in the browser. * * This just ensures that the proxima nova font is loaded, which apparently * doesn't happen in the dev pages sometimes. */ module.exports = function() { var newStyle = document.createElement('style'); newStyle.appendChild(document.createTextNode( "@font-face {" + ...
/** * Executed in the browser. * * This just ensures that the proxima nova font is loaded, which apparently * doesn't happen in the dev pages sometimes. */ module.exports = function() { var newStyle = document.createElement('style'); newStyle.appendChild(document.createTextNode( "@font-face {" + ...
Write correct titles for opening plots
#!/usr/bin/python import sys def parse_opening_list(filename): with open(filename) as f: open_count = dict() openings = [] for line in (raw.strip() for raw in f): open_count.setdefault(line, 0) open_count[line] += 1 openings.append(line) top10 = lis...
#!/usr/bin/python import sys def parse_opening_list(filename): with open(filename) as f: open_count = dict() openings = [] for line in (raw.strip() for raw in f): open_count.setdefault(line, 0) open_count[line] += 1 openings.append(line) top10 = lis...
Use address when there is no location
import React, { PropTypes, Component } from 'react'; import { IMAGES_ROOT } from '../constants/Constants'; import shouldPureComponentUpdate from 'react-pure-render/function'; import selectn from 'selectn'; export default class User extends Component { static propTypes = { user: PropTypes.object.isRequired ...
import React, { PropTypes, Component } from 'react'; import { IMAGES_ROOT } from '../constants/Constants'; import shouldPureComponentUpdate from 'react-pure-render/function'; import selectn from 'selectn'; export default class User extends Component { static propTypes = { user: PropTypes.object.isRequired ...
Fix "legacy mode" trying to install scripts when there are none. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041777
from distutils.command.install_scripts import install_scripts \ as _install_scripts from easy_install import get_script_args from pkg_resources import Distribution, PathMetadata, ensure_directory import os from distutils import log class install_scripts(_install_scripts): """Do normal script install, plus any...
from distutils.command.install_scripts import install_scripts \ as _install_scripts from easy_install import get_script_args from pkg_resources import Distribution, PathMetadata, ensure_directory import os from distutils import log class install_scripts(_install_scripts): """Do normal script install, plus an...
Load the properties from via the correct Class otherwise it is not in the class loader git-svn-id: 4e353c0944fe8da334633afc35765ef362dec675@2010 b4e469a2-07ce-4b26-9273-4d7d95a670c7
package org.helioviewer.jhv.plugins.swek.sources.hek; import java.io.IOException; import java.io.InputStream; import java.util.Properties; /** * Gives access to the HEK source properties * * @author Bram Bourgoignie (Bram.Bourgoignie@oma.be) * */ public class HEKSourceProperties { private static HEKSourceP...
package org.helioviewer.jhv.plugins.swek.sources.hek; import java.io.IOException; import java.io.InputStream; import java.util.Properties; import org.helioviewer.jhv.plugins.swek.SWEKPlugin; /** * Gives access to the HEK source properties * * @author Bram Bourgoignie (Bram.Bourgoignie@oma.be) * */ public clas...
Add export log + permissions
package nuclibook.routes; import nuclibook.constants.P; import nuclibook.entity_utils.ActionLogger; import nuclibook.entity_utils.ExportUtils; import nuclibook.entity_utils.PatientUtils; import nuclibook.entity_utils.SecurityUtils; import nuclibook.models.Patient; import nuclibook.server.HtmlRenderer; import spark.Req...
package nuclibook.routes; import nuclibook.constants.P; import nuclibook.entity_utils.ExportUtils; import nuclibook.entity_utils.PatientUtils; import nuclibook.entity_utils.SecurityUtils; import nuclibook.models.Patient; import nuclibook.server.HtmlRenderer; import spark.Request; import spark.Response; import java.ut...
:construction: Load all bugs on mount We can load all bugs on mount, but this could mean unnecessary requests From a test 76 requests | ~21KB transferred | Finish: ~30s
import React, { Component } from 'react'; import FilterContainer from './Filter/FilterContainer'; import BugContainer from './Bugs/BugContainer'; import Store from '../Store'; import { FilterOptions } from '../Constants'; class App extends Component { constructor() { super() this.state = { filterOption...
import React, { Component } from 'react'; import FilterContainer from './Filter/FilterContainer'; import BugContainer from './Bugs/BugContainer'; import Store from '../Store'; class App extends Component { constructor() { super() this.state = { filterOptions: [], isLoading: false, bugs: [] ...
Check for duplicates on saving of each element, instead of entry only
<?php namespace Craft; class IncrementPlugin extends BasePlugin { public function getName() { return Craft::t('Increment'); } public function getVersion() { return '0.2'; } public function getDeveloper() { return 'Bob Olde Hampsink'; } public function...
<?php namespace Craft; class IncrementPlugin extends BasePlugin { public function getName() { return Craft::t('Increment'); } public function getVersion() { return '0.2'; } public function getDeveloper() { return 'Bob Olde Hampsink'; } public function...
Modify existing Programs migration to account for help_text change Prevents makemigrations from creating a new migration for the programs app.
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('programs', '0002_programsapiconfig_cache_ttl'), ] operations = [ migrations.AddField( model_name='programsapicon...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('programs', '0002_programsapiconfig_cache_ttl'), ] operations = [ migrations.AddField( model_name='programsapicon...
Use short format when displaying dates on user record
import React from "react"; import moment from "moment"; class Record extends React.Component { render() { const {record} = this.props; return ( <dl className="dl-horizontal"> <dt className="text-muted">Id</dt> <dd>{record.id}</dd> <dt c...
import React from "react"; import moment from "moment"; class Record extends React.Component { render() { const {record} = this.props; return ( <dl className="dl-horizontal"> <dt className="text-muted">Id</dt> <dd>{record.id}</dd> <dt c...
Make the template and env yaml parsing more consistent in the environment_format.py use the same yaml_loader Partial-bug: #1242155 Change-Id: I66b08415d450bd4758af648eaff0f20dd934a9cc
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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 applicab...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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 applicab...
Revert "Hopefully fixed the double request issues" This reverts commit 23a6d2219ac9057e87b0e4a2088d79f2d17fbbab.
Checklist.Router = Ember.Router.extend({ location: 'hash', root: Ember.Route.extend({ home: Ember.Route.extend({ route: '/', connectOutlets: function(router, event) { router.get('applicationController') .connectOutlet({ viewClass: Checklist.MainView, controller: ...
Checklist.Router = Ember.Router.extend({ location: 'hash', root: Ember.Route.extend({ home: Ember.Route.extend({ route: '/', connectOutlets: function(router, event) { router.get('applicationController') .connectOutlet({ viewClass: Checklist.MainView, controller: ...
Add regex to strip html tags from question excerpt when rendering.
package io.github.vcuswimlab.stackintheflow.view; import io.github.vcuswimlab.stackintheflow.model.Question; import javax.swing.*; import javax.swing.border.LineBorder; import javax.swing.border.TitledBorder; import java.awt.*; /** * Created by batman on 11/16/16. */ public class QuestionRenderer extends JLabel imp...
package io.github.vcuswimlab.stackintheflow.view; import io.github.vcuswimlab.stackintheflow.model.Question; import javax.swing.*; import javax.swing.border.LineBorder; import javax.swing.border.TitledBorder; import java.awt.*; /** * Created by batman on 11/16/16. */ public class QuestionRenderer extends JLabel imp...
Exclude the `flow-typed` directory by default
'use strict'; var path = require('path'); var DEFAULT_EXCLUDE_PATTERN = "^(node_modules|bower_components|\\.imdone|target|build|dist|logs|flow-typed)[\\/\\\\]?|\\.(git|svn|hg|npmignore)|\\~$|\\.(jpg|png|gif|swp|ttf|otf)$"; var CONFIG_DIR = ".imdone"; module.exports = { ASYNC_LIMIT: 512, CONFIG_DIR: CONFIG_DIR, C...
'use strict'; var path = require('path'); var DEFAULT_EXCLUDE_PATTERN = "^(node_modules|bower_components|\\.imdone|target|build|dist|logs)[\\/\\\\]?|\\.(git|svn|hg|npmignore)|\\~$|\\.(jpg|png|gif|swp|ttf|otf)$"; var CONFIG_DIR = ".imdone"; module.exports = { ASYNC_LIMIT: 512, CONFIG_DIR: CONFIG_DIR, CONFIG_FILE:...
Change raccordeon class adding behabior. Misunderstood.
(function($) { $.fn.rtabs = function(options) { var settings = $.extend({ 'threshold' : '481', 'placehold' : 'top' //top, bottom, left, right }, options); this.find('.rtabsNavItem').click(function() { $(this).siblings('.active').removeClass('active'); $(this).parent().parent().f...
(function($) { $.fn.rtabs = function(options) { var settings = $.extend({ 'threshold' : '481', 'placehold' : 'top' //top, bottom, left, right }, options); this.find('.rtabsNavItem').click(function() { $(this).siblings('.active').removeClass('active'); $(this).parent().parent().f...
Make discretionary filter hide sold discretionary teams
<?php namespace Tickets\DB; class TicketDefaultFilter extends \Data\Filter { function __construct($email, $discretionary=false) { $this->children[] = new \Data\FilterClause(); $this->children[0]->var1 = 'email'; $this->children[0]->var2 = "'$email'"; $this->children[0]->op = '='...
<?php namespace Tickets\DB; class TicketDefaultFilter extends \Data\Filter { function __construct($email, $discretionary=false) { $this->children[] = new \Data\FilterClause(); $this->children[0]->var1 = 'email'; $this->children[0]->var2 = "'$email'"; $this->children[0]->op = '='...
Fix loop limits, add per layer options in test mapconfig Factory
function getVectorMapConfig(opts) { return { buffersize: { mvt: 1 }, layers: _generateLayers(opts), }; } function _generateLayers(opts) { const numberOfLayers = opts.numberOfLayers || 1; const layers = []; for (let index = 0; index < numberOfLayers; index++) { ...
function getVectorMapConfig(opts) { return { buffersize: { mvt: 1 }, layers: _generateLayers(opts), }; } function _generateLayers(opts) { const numberOfLayers = opts.numberOfLayers || 1; const layers = []; for (let index = 0; index <= numberOfLayers; index++) { ...
Implement sluggable manager in utils bundle.
<?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\ContentBundle\Slu...
<?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\ContentBundle\Slu...
Change import so it works
"""A custom ILAMB confrontation for net ecosystem productivity (nep).""" import os import numpy as np from ILAMB.Confrontation import Confrontation from ILAMB.Variable import Variable from ILAMB.ilamblib import MakeComparable class ConfNEP(Confrontation): """Confront ``nep`` model outputs with ``nee`` observation...
"""A custom ILAMB confrontation for net ecosystem productivity (nep).""" import os import numpy as np from ILAMB.Confrontation import Confrontation from ILAMB.Variable import Variable import ilamblib as il class ConfNEP(Confrontation): """Confront ``nep`` model outputs with ``nee`` observations. Net ecosyste...
Add option for no ajax
/* FormAjaxifier @author Jeevan@blacklizard */ (function ($) { $.fn.FormAjaxifier = function (options) { var settings = $.extend({ beforeSend: function (self) {}, success: function (self, data, textStatus, jqXHR) {}, error: function (self, jqXHR, textStatus, er...
/* FormAjaxifier @author Jeevan@blacklizard */ (function ($) { $.fn.FormAjaxifier = function (options) { var settings = $.extend({ beforeSend: function (self) {}, success: function (self, data, textStatus, jqXHR) {}, error: function (self, jqXHR, textStatus, er...
Add methods to remove vertices
package io.sigpipe.sing.graph; public class GraphMetrics implements Cloneable { private long vertices; private long leaves; public GraphMetrics() { } @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } @Override public boolean equ...
package io.sigpipe.sing.graph; public class GraphMetrics implements Cloneable { private long vertices; private long leaves; public GraphMetrics() { } @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } @Override public boolean equ...
Allow to specify a database when running a query
from fabric.api import sudo, hide from braid import package from pipes import quote def install(): package.install(['postgresql-9.1', 'postgresql-server-dev-9.1']) def _runQuery(query, database=None): with hide('running', 'output'): database = '--dbname={}'.format(database) if database else '' ...
from fabric.api import sudo, hide from braid import package from pipes import quote def install(): package.install(['postgresql-9.1', 'postgresql-server-dev-9.1']) def _runQuery(query): with hide('running', 'output'): return sudo('psql --no-align --no-readline --no-password --quiet ' ...
Improve link to api docs.
import './SearchBoxHelp.css'; import React, { Component } from 'react'; import MaterialIcon from 'shared/components/icon/MaterialIcon'; import Tooltip from 'shared/components/tooltip/Tooltip'; export default class SearchBoxHelp extends Component { shouldComponentUpdate() { return false; } render()...
import './SearchBoxHelp.css'; import React, { Component } from 'react'; import MaterialIcon from 'shared/components/icon/MaterialIcon'; import Tooltip from 'shared/components/tooltip/Tooltip'; export default class SearchBoxHelp extends Component { shouldComponentUpdate() { return false; } render()...
Test fix due to interface change
<?php namespace mxdiModuleTest\Annotation; use mxdiModule\Annotation\Inject; use mxdiModuleTest\TestCase; use Zend\ServiceManager\ServiceLocatorInterface; class InjectTest extends TestCase { public function testIsNotInvokableByDefault() { $this->assertFalse((new Inject())->invokable); } publi...
<?php namespace mxdiModuleTest\Annotation; use mxdiModule\Annotation\Exception\CannotGetValue; use mxdiModule\Annotation\Inject; use mxdiModuleTest\TestCase; use Zend\ServiceManager\ServiceLocatorInterface; class InjectTest extends TestCase { public function testIsNotInvokableByDefault() { $this->asse...
Use more widely the new Check class
<?php namespace Isbn; class Validation { public static function isbn($isbn) { if (Check::is13($isbn)) return Validation::isbn13($isbn); if (Check::is10($isbn)) return Validation::isbn10($isbn); return false; } public static function isbn10($isbn) {...
<?php namespace Isbn; class Validation { public static function isbn($isbn) { if (strlen($isbn) == 13) return Validation::isbn13($isbn); if (strlen($isbn) == 10) return Validation::isbn10($isbn); return false; } public static function isbn10($isbn) ...
Revert "Trap focus to the menu when open" This reverts commit ed195f52702a7eead162d9f10e6e898de0fe9029. Trapping focus was preventing the menu from being closeable
// JavaScript Document // Scripts written by __gulp_init__author_name @ __gulp_init__author_company import SuperSlide from "superslide.js"; // get the elements const CONTENT = document.getElementById("page-container"); const SLIDER = document.getElementById("mobile-menu"); const TOGGLE = document.querySel...
// JavaScript Document // Scripts written by __gulp_init__author_name @ __gulp_init__author_company import SuperSlide from "superslide.js"; import focusTrap from "focus-trap"; // get the elements const CONTENT = document.getElementById("page-container"); const SLIDER = document.getElementById("mobile-menu"); ...
Allow the toolbox to be installed in Python 3.7
from setuptools import setup REPO_URL = 'http://github.com/okfn-brasil/serenata-toolbox' with open('README.rst') as fobj: long_description = fobj.read() setup( author='Serenata de Amor', author_email='contato@serenata.ai', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audi...
from setuptools import setup REPO_URL = 'http://github.com/okfn-brasil/serenata-toolbox' with open('README.rst') as fobj: long_description = fobj.read() setup( author='Serenata de Amor', author_email='contato@serenata.ai', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audi...
Use source maps and uglify
import webpack from "webpack"; import path from "path"; const plugins = [ new webpack.HotModuleReplacementPlugin() ]; if (process.env.NODE_ENV === "production") { plugins.push(new webpack.optimize.UglifyJsPlugin()); } export default { devtool: "source-map", entry: [ "webpack-dev-server/client...
import webpack from "webpack"; import path from "path"; export default { devtool: "eval", entry: [ "webpack-dev-server/client?http://localhost:3000", "webpack/hot/only-dev-server", "./src/index" ], output: { path: path.join(__dirname, "dist"), filename: "bundle.m...
Fix bug in DateUtilities test suite.
'use strict'; describe("Date Utilities", function() { describe("Function 'roundToFollowingHalfHour'", function() { it("Before half hours", function() { var date = new Date(); date.setMinutes(0); var hoursBefore = date.getHours(); for(var i = 0; i < 30; i++...
'use strict'; describe("Date Utilities", function() { describe("Function 'roundToFollowingHalfHour'", function() { it("Before half hours", function() { var date = new Date(); date.setMinutes(0); var hoursBefore = date.getHours(); for(var i = 0; i < 30; i++...
Split dependencies out in webpack to reduce bundle size
const path = require("path"); module.exports = { entry: path.resolve(__dirname, "./source/index.js"), externals: { argon2: "argon2", buttercup: "buttercup", kdbxweb: "kdbxweb" }, module: { rules : [ { test: /\.(js|esm)$/, use...
const path = require("path"); module.exports = { entry: path.resolve(__dirname, "./source/index.js"), externals: { buttercup: "buttercup" }, module: { rules : [ { test: /\.(js|esm)$/, use: { loader: "babel-loader", ...
Remove return statements from assert methods
import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contains is None: ...
import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contains is None: ...
Clone git repos if they do not exist.
""" Version control management tools. """ import abc import brigit from docutils import nodes from docutils.parsers.rst import directives from .tool import Tool, Directive class VCS(Tool): """Abstract class for VCS tools.""" __metaclass__ = abc.ABCMeta def __init__(self, path, branch, url=None): ...
""" Version control management tools. """ import abc import brigit from docutils import nodes from docutils.parsers.rst import directives from .tool import Tool, Directive class VCS(Tool): """Abstract class for VCS tools.""" __metaclass__ = abc.ABCMeta def __init__(self, path, branch, url=None): ...
Change match all query syntax
''' Biothings Query Component Common Tests ''' import os from nose.core import main from biothings.tests import BiothingsTestCase class QueryTests(BiothingsTestCase): ''' Test against server specified in environment variable BT_HOST and BT_API or MyGene.info production server V3 by def...
''' Biothings Query Component Common Tests ''' import os from nose.core import main from biothings.tests import BiothingsTestCase class QueryTests(BiothingsTestCase): ''' Test against server specified in environment variable BT_HOST and BT_API or MyGene.info production server V3 by def...
Change vendor script view to not be strictly couple to a user. For public views, we will not have a user.
var cdb = require('cartodb.js-v3'); module.exports = cdb.core.View.extend({ initialize: function () { this.config = this.options.config; this.assetsVersion = this.options.assetsVersion; this.user = this.options.user; this.template = cdb.templates.getTemplate('common/views/vendor_scripts'); }, re...
var cdb = require('cartodb.js-v3'); module.exports = cdb.core.View.extend({ initialize: function () { this.config = this.options.config; this.assetsVersion = this.options.assetsVersion; this.user = this.options.user; this.template = cdb.templates.getTemplate('common/views/vendor_scripts'); }, re...
Add \n\n even when only concat'ing and not compressing JS assets
"use strict"; var util = require('util'), path = require('path'), jsParser = require('uglify-js').parser, compressor = require('uglify-js').uglify, Asset = require('../Asset'), JSAsset = function(settings) { settings.compressor = settings.compressor || 'uglify'; this.init(settings...
"use strict"; var util = require('util'), path = require('path'), jsParser = require('uglify-js').parser, compressor = require('uglify-js').uglify, Asset = require('../Asset'), JSAsset = function(settings) { settings.compressor = settings.compressor || 'uglify'; this.init(settings...
Add a build task to grunt.
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jasmine: { geojson_to_gmaps: { src: 'geojson-to-gmaps.js', options: { specs: 'spec/*Spec.js', ...
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jasmine: { geojson_to_gmaps: { src: 'geojson-to-gmaps.js', options: { specs: 'spec/*Spec.js', ...
Align centrally contact avatar in chat window.
/* * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. * * Distributable under LGPL license. * See terms of license at gnu.org. */ package net.java.sip.communicator.impl.gui.customcontrols; import java.awt.*; import javax.swing.*; import net.java.sip.communicator.impl.gui.utils.*; import ...
/* * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. * * Distributable under LGPL license. * See terms of license at gnu.org. */ package net.java.sip.communicator.impl.gui.customcontrols; import java.awt.*; import javax.swing.*; import net.java.sip.communicator.impl.gui.utils.*; import ...
Fix typo in named group regex
from django.conf.urls import url from .views import Dashboard class Router(object): def __init__(self): self.registry = [] def register(self, widget, basename, **parameters): """ Register a widget, URL basename and any optional URL parameters. Parameters are passed as keyword argumen...
from django.conf.urls import url from .views import Dashboard class Router(object): def __init__(self): self.registry = [] def register(self, widget, basename, **parameters): """ Register a widget, URL basename and any optional URL parameters. Parameters are passed as keyword argumen...
Add possitive user login test
<?php require_once('Autoload.php'); class SQLAuthTest extends PHPUnit_Framework_TestCase { public function testSQLAuthenticator() { $GLOBALS['FLIPSIDE_SETTINGS_LOC'] = './tests/travis/helpers'; if(!isset(FlipsideSettings::$dataset['auth'])) { $params = array('dsn'=>'mysql:hos...
<?php require_once('Autoload.php'); class SQLAuthTest extends PHPUnit_Framework_TestCase { public function testSQLAuthenticator() { $GLOBALS['FLIPSIDE_SETTINGS_LOC'] = './tests/travis/helpers'; if(!isset(FlipsideSettings::$dataset['auth'])) { $params = array('dsn'=>'mysql:hos...
Fix home page. When there are no game, it still show a random entry.
var express = require('express'); var router = express.Router(); var GameModel = require('../models/game'); var model = require('../models'); const _ = require('underscore'); /* GET home page. */ router.get('/', function(req, res, next) { let gameParam = { order: [ ['id', 'desc'] ], include: [ ...
var express = require('express'); var router = express.Router(); var GameModel = require('../models/game'); var model = require('../models'); const _ = require('underscore'); /* GET home page. */ router.get('/', function(req, res, next) { let gameParam = { order: [ ['id', 'desc'] ], include: [ ...
Fix texture style adapter float parsing
package org.yggard.brokkgui.style.adapter; import org.yggard.brokkgui.paint.Texture; public class TextureStyleAdapter implements IStyleAdapter<Texture> { @Override public Texture decode(String style) { if (!style.startsWith("url(")) return null; String[] splitted = style.repla...
package org.yggard.brokkgui.style.adapter; import org.yggard.brokkgui.paint.Texture; public class TextureStyleAdapter implements IStyleAdapter<Texture> { @Override public Texture decode(String style) { if (!style.startsWith("url(")) return null; String[] splitted = style.repla...
Revert "Refresh all views when invoking move action" This reverts commit 76b1802295a934f3bdf20d09fea7f705b2189425.
package com.yuyakaido.android.cardstackview.internal; import android.support.annotation.Nullable; import android.support.v7.widget.RecyclerView; import com.yuyakaido.android.cardstackview.CardStackLayoutManager; public class CardStackDataObserver extends RecyclerView.AdapterDataObserver { private final Recycler...
package com.yuyakaido.android.cardstackview.internal; import android.support.annotation.Nullable; import android.support.v7.widget.RecyclerView; import com.yuyakaido.android.cardstackview.CardStackLayoutManager; public class CardStackDataObserver extends RecyclerView.AdapterDataObserver { private final Recycler...
fix: Move properties fetching before dict
"""Notify Slack channel.""" import time from ..utils import get_properties, get_template, post_slack_message class SlackNotification: """Post slack notification. Inform users about infrastructure changes to prod* accounts. """ def __init__(self, app=None, env=None, prop_path=None): timestam...
"""Notify Slack channel.""" import time from ..utils import get_properties, get_template, post_slack_message class SlackNotification: """Post slack notification. Inform users about infrastructure changes to prod* accounts. """ def __init__(self, app=None, env=None, prop_path=None): timestam...
DOC: Change rtfd -> readthedocs in package description
from setuptools import setup # "import" __version__ for line in open('nbsphinx.py'): if line.startswith('__version__'): exec(line) break setup( name='nbsphinx', version=__version__, py_modules=['nbsphinx'], install_requires=[ 'docutils', 'jinja2', 'nbconvert...
from setuptools import setup # "import" __version__ for line in open('nbsphinx.py'): if line.startswith('__version__'): exec(line) break setup( name='nbsphinx', version=__version__, py_modules=['nbsphinx'], install_requires=[ 'docutils', 'jinja2', 'nbconvert...
Update to handle in-memory filelike objects
#!/usr/bin/env python from setuptools import setup setup(name='imagesize', version='1.2.0', description='Getting image size from png/jpeg/jpeg2000/gif file', long_description=''' It parses image files' header and return image size. * PNG * JPEG * JPEG2000 * GIF * TIFF (experimental) * SVG This is ...
#!/usr/bin/env python from setuptools import setup setup(name='imagesize', version='1.2.0', description='Getting image size from png/jpeg/jpeg2000/gif file', long_description=''' It parses image files' header and return image size. * PNG * JPEG * JPEG2000 * GIF * TIFF (experimental) * SVG This is ...
Modify sms format in sms receiving event Sms regex format is changed to support all institutes names.
package in.testpress.testpress.events; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.telephony.SmsMessage; import in.testpress.testpress.authenticator.CodeVerificationActivity.Timer; public class SmsReceivingEvent ext...
package in.testpress.testpress.events; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.telephony.SmsMessage; import in.testpress.testpress.R; import in.testpress.testpress.authenticator.CodeVerificationActivity.Timer; im...
Enable markdown on message history
import React from 'react'; import { FormattedRelative } from 'react-intl'; import Body from '../Post/Body'; import Avatar from '../widgets/Avatar'; function Message(props) { const { model } = props; const sentAt = model[0].sentAt; const senderUsername = (model[0].senderUsername || model[0].sentBy); return ( ...
import React from 'react'; import { FormattedRelative } from 'react-intl'; import Avatar from '../widgets/Avatar'; function Message(props) { const { model } = props; const sentAt = model[0].sentAt; const senderUsername = (model[0].senderUsername || model[0].sentBy); return ( <li className="Message message...
Add doc link to local footer
<div class="wdn-grid-set wdn-footer-links-local"> <div class="bp960-wdn-col-two-thirds"> <div class="wdn-footer-module"> <span role="heading" class="wdn-footer-heading">About UNL Events</span> <?php if ($file = @file_get_contents(\UNL\UCBCN\Util::getWWWRoot() . '/tmp/iim-...
<div class="wdn-grid-set wdn-footer-links-local"> <div class="bp960-wdn-col-two-thirds"> <div class="wdn-footer-module"> <span role="heading" class="wdn-footer-heading">About UNL Events</span> <?php if ($file = @file_get_contents(\UNL\UCBCN\Util::getWWWRoot() . '/tmp/iim-...
Remove click dependent import from the main module. This leads to import error when textX is installed without CLI support.
# flake8: noqa from textx.metamodel import metamodel_from_file, metamodel_from_str from textx.model import get_children_of_type, get_parent_of_type, \ get_model, get_metamodel, get_children, get_location, textx_isinstance from textx.exceptions import TextXError, TextXSyntaxError, \ TextXSemanticError, TextXRegi...
# flake8: noqa from textx.metamodel import metamodel_from_file, metamodel_from_str from textx.model import get_children_of_type, get_parent_of_type, \ get_model, get_metamodel, get_children, get_location, textx_isinstance from textx.exceptions import TextXError, TextXSyntaxError, \ TextXSemanticError, TextXRegi...
Upgrade deps to latest point releases - nose 1.3.0 to 1.3.1 - Sphinx 1.2.1 to 1.2.2
from setuptools import setup setup( name='tangled', version='0.1a7.dev0', description='Tangled namespace and utilities', long_description=open('README.rst').read(), url='http://tangledframework.org/', download_url='https://github.com/TangledWeb/tangled/tags', author='Wyatt Baldwin', au...
from setuptools import setup setup( name='tangled', version='0.1a7.dev0', description='Tangled namespace and utilities', long_description=open('README.rst').read(), url='http://tangledframework.org/', download_url='https://github.com/TangledWeb/tangled/tags', author='Wyatt Baldwin', au...
Bump the number for a minor release to fix the mysql migrations issue.
VERSION = (1, 0, 'alpha', 15) def get_version(join=' ', short=False): """ Return the version of this package as a string. The version number is built from a ``VERSION`` tuple, which should consist of integers, or trailing version information (such as 'alpha', 'beta' or 'final'). For example: ...
VERSION = (1, 0, 'alpha', 14) def get_version(join=' ', short=False): """ Return the version of this package as a string. The version number is built from a ``VERSION`` tuple, which should consist of integers, or trailing version information (such as 'alpha', 'beta' or 'final'). For example: ...
Use get_db_prep_value instead of get_db_prep_save. Closes gh-42
from django.core.exceptions import ValidationError from django.db import models from django.utils import simplejson class JSONField(models.TextField): """Simple JSON field that stores python structures as JSON strings on database. """ __metaclass__ = models.SubfieldBase def to_python(self, value...
from django.core.exceptions import ValidationError from django.db import models from django.utils import simplejson class JSONField(models.TextField): """Simple JSON field that stores python structures as JSON strings on database. """ __metaclass__ = models.SubfieldBase def to_python(self, value...
Add cancel call to call buffer
from constants import * import collections import uuid class CallBuffer(): def __init__(self): self.waiter = None self.queue = collections.deque(maxlen=CALL_QUEUE_MAX) self.call_waiters = {} def wait_for_calls(self, callback): self.stop_waiter() calls = [] while...
from constants import * import collections import uuid class CallBuffer(): def __init__(self): self.waiter = None self.queue = collections.deque(maxlen=CALL_QUEUE_MAX) self.call_waiters = {} def wait_for_calls(self, callback): self.stop_waiter() calls = [] while...
feat: Add service that returns monthly limit
import Ember from 'ember'; export default Ember.Service.extend({ store: Ember.inject.service(), currencies: ['AUD', 'CAD', 'CHF', 'EUR', 'GBP', 'JPY', 'NZD', 'RUB', 'USD'], currencySymbol () { return this.get('store').findRecord('setting', 'st-setting') .then(response => response.get('currencySymbol')...
import Ember from 'ember'; export default Ember.Service.extend({ store: Ember.inject.service(), currencies: ['AUD', 'CAD', 'CHF', 'EUR', 'GBP', 'JPY', 'NZD', 'RUB', 'USD'], currencySymbol () { return this.get('store').findRecord('setting', 'st-setting') .then(response => response.get('currencySymbol')...
Use zip from future_builtins for Python 2 and 3 compatibility
"""Utils for django-sekh""" from future_builtins import zip import re def remove_duplicates(items): """ Remove duplicates elements in a list preserving the order. """ seen = {} result = [] for item in items: item = item.strip() if not item or item in seen: continue...
"""Utils for django-sekh""" import re from itertools import izip def remove_duplicates(items): """ Remove duplicates elements in a list preserving the order. """ seen = {} result = [] for item in items: item = item.strip() if not item or item in seen: continue ...
Add path to theme attributes
<?php namespace Pingpong\Themes; use Illuminate\Filesystem\Filesystem; use Pingpong\Modules\Json; use Symfony\Component\Finder\Finder as SymfonyFinder; class Finder { /** * The symfony finder instance. * * @var SymfonyFinder */ protected $finder; /** * The constructor. * ...
<?php namespace Pingpong\Themes; use Illuminate\Filesystem\Filesystem; use Pingpong\Modules\Json; use Symfony\Component\Finder\Finder as SymfonyFinder; class Finder { /** * The symfony finder instance. * * @var SymfonyFinder */ protected $finder; /** * The constructor. * ...
Add sanitation of provided name, formatting.
module.exports = function (grunt) { /* Create template pages and their associated assets Run from the command line as follows: grunt create --name=$var */ var name = grunt.option('name') || null; grunt.registerTask('create', function () { var title = name, filenam...
module.exports = function (grunt) { /* Create template pages and their associated assets Run from the command line as follows: grunt create --name=$var */ var name = grunt.option('name') || null; grunt.registerTask('create', function() { var assetsDirectory = 'app/assets/', ...
Add ship movement to the left in game loop
/** * game-loop.js * * Manages the creation and properties for our game loop object */ /** * Main game loop factory * * @returns {object} */ var createGameLoop = function() { var fps = 2; var lastCycleKeypress = ''; var update = function() { if (typeof(game.keypress.keyCode) === 'undefine...
/** * game-loop.js * * Manages the creation and properties for our game loop object */ /** * Main game loop factory * * @returns {object} */ var createGameLoop = function() { var fps = 2; var lastCycleKeypress = ''; var update = function() { if (typeof(game.keypress.keyCode) === 'undefine...
Fix para modelo de posicioanmento autal
angular.module('sislegisapp').factory('ReuniaoResource', function($resource, BACKEND) { return $resource(BACKEND + '/reuniaos/:ReuniaoId', { ReuniaoId : '@id' }, { 'queryAll' : { method : 'GET', isArray : true }, 'query' : { method : 'GET', isArray : false }, 'buscarR...
angular.module('sislegisapp').factory('ReuniaoResource', function($resource, BACKEND) { return $resource(BACKEND + '/reuniaos/:ReuniaoId', { ReuniaoId : '@id' }, { 'queryAll' : { method : 'GET', isArray : true }, 'query' : { method : 'GET', isArray : false }, 'buscarR...
Fix imports in plugin manager test to work with nosetests
import socket import time from threading import Event from unittest import TestCase from honeypot.PluginManager import PluginManager class TestPluginManager(TestCase): def test_stop(self): """Test connecting to plugin's port, stopping PluginManager.""" class Plugin: """Mock plugin, us...
import socket import time from threading import Event from unittest import TestCase from PluginManager import PluginManager class TestPluginManager(TestCase): def test_stop(self): """Test connecting to plugin's port, stopping PluginManager.""" class Plugin: """Mock plugin, uses random...
Add comment and reformat code
from django.test import TestCase from django.http import HttpResponse from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from billjobs.admin import UserAdmin class MockRequest(object): pass class EmailExportTestCase(TestCase): """ Tests for email account expor...
from django.test import TestCase from django.http import HttpResponse from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from billjobs.admin import UserAdmin class MockRequest(object): pass class EmailExportTestCase(TestCase): """ Tests for email account expor...
Add webpack hot reload patch
const path = require('path'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const FaviconsWebpackPlugin = require('favicons-webpack-plugin'); module.exports = { entry: [ process.env.NODE_ENV !== 'production' && 'react-hot-loader/patch', './client/src/index.js',...
const path = require('path'); const webpack = require('webpack'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const FaviconsWebpackPlugin = require('favicons-webpack-plugin'); module.exports = { entry: ['./client/src/index.js'], output: { path: path.join(__dirname, 'dist'), publicPath: '/', ...
Make getting mailbox case insensitive
<?php namespace Ddeboer\Imap; /** * A connection to an IMAP server that is authenticated for a user */ class Connection { protected $server; protected $resource; protected $mailboxes; public function __construct($resource, $server) { if (!is_resource($resource)) { throw new ...
<?php namespace Ddeboer\Imap; /** * A connection to an IMAP server that is authenticated for a user */ class Connection { protected $server; protected $resource; protected $mailboxes; public function __construct($resource, $server) { if (!is_resource($resource)) { throw new ...
Add docblock and if statements to growl method
<?php namespace BryanCrowe; class Growl { public function __construct() {} /** * Options: * - title The title * - subtitle The subtitle * - sticky Make it sticky. Defaults to false * */ public function growl($message = null, $options = []) { $args = $this->createCo...
<?php namespace BryanCrowe; class Growl { public function __construct() {} public function growl($message = null, $options = []) {} public function createCommand() { switch (PHP_OS) { case 'Darwin': if (exec('which growlnotify')) { return [ ...
Add log file name to command line.
#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 5: keys_file = _args[1] target_file = _args[2] result_file = _args[3] log_file = _args[4] try: with open(keys_file, 'r') as k: keys = k.readlines() ...
#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 4: keys_file = _args[1] target_file = _args[2] result_file = _args[3] try: with open(keys_file, 'r') as k: keys = k.readlines() keys = [key.s...
Fix unittest failure in python 3.x.
import json import unittest import sys if sys.version_info[0] == 2: from urllib import urlencode else: from urllib.parse import urlencode from pyunio import pyunio pyunio.use('httpbin') params_get = { 'params': { 'name': 'James Bond' } } params...
import json import unittest from pyunio import pyunio import urllib pyunio.use('httpbin') params_get = { 'params': { 'name': 'James Bond' } } params_body = { 'body': { 'name': 'James Bond' } ...
Check that coverage file exists
import os import re filename_matcher = re.compile(r'^\+\+\+ b/([\w/\._]+)\s+.+$') diff_line_matcher = re.compile(r'^@@ -\d+,\d+ \+(\d+),(\d+) @@$') def report_diffs(diff): for line in diff: name_match = filename_matcher.match(line) if name_match: filename = name_match.group(1) ...
import re filename_matcher = re.compile(r'^\+\+\+ b/([\w/\._]+)\s+.+$') diff_line_matcher = re.compile(r'^@@ -\d+,\d+ \+(\d+),(\d+) @@$') def report_diffs(diff): for line in diff: name_match = filename_matcher.match(line) if name_match: filename = name_match.group(1) conti...
Add a message that Jen is the only one to use this
@extends('layouts.master') @section('main_content') @include('layouts.header', ['header' => 'Upload a CSV for import']) <div class="container -padded"> <div class="wrapper"> <div class="container__block -narrow"> <p>For the time being, This feature should only be used by J...
@extends('layouts.master') @section('main_content') @include('layouts.header', ['header' => 'Upload a CSV for import']) <div class="container -padded"> <div class="wrapper"> <div class="container__block -narrow"> <form action={{url('/import')}} method="post" enctype="multi...
Copy indent rule to TS as well
module.exports = { extends: ["matrix-org", "matrix-org/react-legacy"], parser: "babel-eslint", env: { browser: true, node: true, }, globals: { LANGUAGES_FILE: "readonly", }, rules: { // Things we do that break the ideal style "no-constant-condition": ...
module.exports = { extends: ["matrix-org", "matrix-org/react-legacy"], parser: "babel-eslint", env: { browser: true, node: true, }, globals: { LANGUAGES_FILE: "readonly", }, rules: { // Things we do that break the ideal style "no-constant-condition": ...
Add logging to Twitch emotes module
from io import BytesIO import logging import requests from discord.ext import commands from discord.ext.commands import Bot TWITCH_EMOTES_API = 'https://twitchemotes.com/api_cache/v2/global.json' logger = logging.getLogger(__name__) class TwitchEmotes: def __init__(self, bot: Bot): self.bot = bot ...
from io import BytesIO import requests from discord.ext import commands from discord.ext.commands import Bot TWITCH_EMOTES_API = 'https://twitchemotes.com/api_cache/v2/global.json' class TwitchEmotes: def __init__(self, bot: Bot): self.bot = bot r = requests.get(TWITCH_EMOTES_API) emot...
Fix card rendering in dash
import React, { Component } from 'react'; import Registry from '../utils/Registry'; import BaseComponent from './BaseComponent'; import Card from './Card'; import { pick } from 'lodash'; /** * @@TODO Currently in practice this only handles regions * MOST OF THIS LOGIC IS REPRODUCE IN THE Region Component * We shoul...
import React, { Component } from 'react'; import Registry from '../utils/Registry'; import BaseComponent from './BaseComponent'; import Card from './Card'; import { pick } from 'lodash'; /** * @@TODO Currently in practice this only handles regions * MOST OF THIS LOGIC IS REPRODUCE IN THE Region Component * We shoul...
Add offline support for swagger generation
'use strict'; module.exports = function(grunt) { grunt.registerMultiTask('swagger', 'Generate Source from Swagger files', function(){ var fs = require('fs'); var request = require('request'); var done = this.async(); var options = this.options(); var url = this.data....
'use strict'; module.exports = function(grunt) { grunt.registerMultiTask('swagger', 'Generate Source from Swagger files', function(){ var fs = require('fs'); var request = require('request'); var done = this.async(); var options = this.options(); var url = this.data....
Use context manager for file opening/reading.
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', '') setup( name='bin...
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup readme = open('README.rst').read() history = open('HISTORY.rst').read().replace('.. :changelog:', '') setup( name='binaryornot', version='0.4.0', description=( 'Ultra-lightweight ...
Add typehints for ServiceRegistryInterface::all() calls
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sylius\Component\Shipping\Resolver; use Sylius\Component\Registry\PrioritizedServiceRegistr...
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sylius\Component\Shipping\Resolver; use Sylius\Component\Registry\PrioritizedServiceRegistr...
Prepare with vespenen gas count too
from functools import partial from .data import ActionResult class BotAI(object): def _prepare_start(self, client, game_info, game_data): self._client = client self._game_info = game_info self._game_data = game_data self.do = partial(self._client.actions, game_data=game_data) ...
from functools import partial from .data import ActionResult class BotAI(object): def _prepare_start(self, client, game_info, game_data): self._client = client self._game_info = game_info self._game_data = game_data self.do = partial(self._client.actions, game_data=game_data) ...
Return the written value of DMA register.
package eu.rekawek.coffeegb.memory; import eu.rekawek.coffeegb.AddressSpace; import eu.rekawek.coffeegb.cpu.SpeedMode; public class Dma implements AddressSpace { private final AddressSpace addressSpace; private final AddressSpace oam; private final SpeedMode speedMode; private boolean transferInPr...
package eu.rekawek.coffeegb.memory; import eu.rekawek.coffeegb.AddressSpace; import eu.rekawek.coffeegb.cpu.SpeedMode; public class Dma implements AddressSpace { private final AddressSpace addressSpace; private final AddressSpace oam; private final SpeedMode speedMode; private boolean transferInPr...
Support making available to exec cmd on sub dir
import os import sys from commands.apply_config import ApplyConfigCommand from commands.compile import CompileCommand from commands.init import InitCommand from commands.setup import SetupCommand from commands.update_deps import UpdateDepsCommand from lib.config import Config from lib.error import GoogkitError CONFIG...
import os import sys from commands.apply_config import ApplyConfigCommand from commands.compile import CompileCommand from commands.init import InitCommand from commands.setup import SetupCommand from commands.update_deps import UpdateDepsCommand from lib.config import Config from lib.error import GoogkitError CONFIG...
Add missing '&' to area query in Aliss
module.exports = { getDetails:function(id,callback){ callback({}); }, query:function(qo,callback){ var query=qo.query,area=qo.area; let path = "/api/v2/search/?q="+encodeURIComponent(query); if(area){ path += `&latitude=${area.lat}&longitude=${area.lon}&distance=...
module.exports = { getDetails:function(id,callback){ callback({}); }, query:function(qo,callback){ var query=qo.query,area=qo.area; let path = "/api/v2/search/?q="+encodeURIComponent(query); if(area){ path += `latitude=${area.lat}&longitude=${area.lon}&distance=$...
Reset search on connection error
'use strict'; angular .module('flyNg.server', ['services', 'ngCookies']) .controller('ServerController', ['$scope', '$rootScope', '$location', '$cookies', '$log', 'management', function ($scope, $rootScope, $location, $cookies, $log, management) { $scope.management = management; var KEY = 'ser...
'use strict'; angular .module('flyNg.server', ['services', 'ngCookies']) .controller('ServerController', ['$scope', '$rootScope', '$location', '$cookies', '$log', 'management', function ($scope, $rootScope, $location, $cookies, $log, management) { $scope.management = management; var KEY = 'ser...
Make image required on Job submit form.
from datetimewidget.widgets import DateTimeWidget from django.forms import ModelForm from form_utils.widgets import ImageWidget from ..models import Job job_field_labels = { 'image': 'Image (10Mb Limit)', 'url': 'URL' } job_help_texts = { 'url': 'Provide a full url, e.g., "http://www.example.com/page.htm...
from datetimewidget.widgets import DateTimeWidget from django.forms import ModelForm from form_utils.widgets import ImageWidget from ..models import Job job_field_labels = { 'image': 'Image (10Mb Limit)', 'url': 'URL' } job_help_texts = { 'url': 'Provide a full url, e.g., "http://www.example.com/page.htm...
Make sure the input value is kept up-to-date ...
(function($) { jQuery.fn.lineeditor = function (options, callback) { return this.each(function () { var el = this; var $el = $(this); if ( el.nodeName.toLowerCase() != 'textarea' ) { return; } var hidden = $('<input type="hidden"/>').attr('id', el.id); var contain...
(function($) { jQuery.fn.lineeditor = function (options, callback) { return this.each(function () { var el = this; var $el = $(this); if ( el.nodeName.toLowerCase() != 'textarea' ) { return; } var hidden = $('<input type="hidden"/>').attr('id', el.id); var contain...
Resolve an issue when null is in an array
(function (root, factory) { if (typeof define === 'function' && define.amd) { define(factory); } else if (typeof exports === 'object') { module.exports = factory(); } else { root.deepmerge = factory(); } }(this, function () { return function deepmerge(target, src) { var arra...
(function (root, factory) { if (typeof define === 'function' && define.amd) { define(factory); } else if (typeof exports === 'object') { module.exports = factory(); } else { root.deepmerge = factory(); } }(this, function () { return function deepmerge(target, src) { var arra...
Fix exception when paiement is not binded to user anymore
<?php namespace App\Classes; use App\Models\Payment; use Illuminate\Encryption\Encrypter; use Config; /** * EtuPay helper */ class EtuPay { /* * Decrypt and do action according to crypted payload content send by a callback * @param $payload crypted payload given by a callback from EtuPay * @retu...
<?php namespace App\Classes; use App\Models\Payment; use Illuminate\Encryption\Encrypter; use Config; /** * EtuPay helper */ class EtuPay { /* * Decrypt and do action according to crypted payload content send by a callback * @param $payload crypted payload given by a callback from EtuPay * @retu...
Allow for the pickers to be used in custom dashboards The current setup for nupickers does not allow it to exist outside of the current page context. All that needs to happen is a value needs to be passed for the currentId and parentId if editorstate is null.
 angular.module('umbraco.resources') .factory('nuPickers.Shared.DataSource.DataSourceResource', ['$http', 'editorState', function ($http, editorState) { return { getEditorDataItems: function (model, typeahead) { var parentId = 0; ...
 angular.module('umbraco.resources') .factory('nuPickers.Shared.DataSource.DataSourceResource', ['$http', 'editorState', function ($http, editorState) { return { getEditorDataItems: function (model, typeahead) { // returns [{"key":"","label":""},{"key"...
Add s3cmd to the list of requirements.
from setuptools import setup, find_packages version = open('VERSION').read().strip() setup( name="btw-backup", version=version, packages=find_packages(), entry_points={ 'console_scripts': [ 'btw-backup = btw_backup.__main__:main' ], }, author="Louis-Dominique Dubeau...
from setuptools import setup, find_packages version = open('VERSION').read().strip() setup( name="btw-backup", version=version, packages=find_packages(), entry_points={ 'console_scripts': [ 'btw-backup = btw_backup.__main__:main' ], }, author="Louis-Dominique Dubeau...
Fix multiple modal example not showing up
import React, { PureComponent } from 'react'; import { action } from '@storybook/addon-actions'; import Button from '@ichef/gypcrete/src/Button'; import Modal from '@ichef/gypcrete/src/Modal'; import ModalHeader from './ModalHeader'; export default class ClosableModalExample extends PureComponent { state ={ ...
import React, { PureComponent } from 'react'; import { action } from '@storybook/addon-actions'; import Button from '@ichef/gypcrete/src/Button'; import Modal from '@ichef/gypcrete/src/Modal'; import ModalHeader from './ModalHeader'; export default class ClosableModalExample extends PureComponent { state ={ ...
Drop unnecessary reference to popped elements to allow finalization through GC (XSTR-264). git-svn-id: fe6d842192ccfb78748eb71580d1ce65f168b559@649 9830eeb5-ddf4-0310-9ef7-f4b9a3e3227e
package com.thoughtworks.xstream.core.util; public final class FastStack { private Object[] stack; private int pointer; public FastStack(int initialCapacity) { stack = new Object[initialCapacity]; } public Object push(Object value) { if (pointer + 1 >= stack.length) { ...
package com.thoughtworks.xstream.core.util; public final class FastStack { private Object[] stack; private int pointer; public FastStack(int initialCapacity) { stack = new Object[initialCapacity]; } public Object push(Object value) { if (pointer + 1 >= stack.length) { ...
Fix send message delayed when the message has conflict
package info.izumin.android.bletia; import android.os.Handler; import android.os.HandlerThread; import android.os.Message; import org.jdeferred.Promise; import info.izumin.android.bletia.action.Action; import info.izumin.android.bletia.wrapper.BluetoothGattWrapper; /** * Created by izumin on 9/14/15. */ public cl...
package info.izumin.android.bletia; import android.os.Handler; import android.os.HandlerThread; import android.os.Message; import org.jdeferred.Promise; import info.izumin.android.bletia.action.Action; import info.izumin.android.bletia.wrapper.BluetoothGattWrapper; /** * Created by izumin on 9/14/15. */ public cl...
Fix JSHint error in dashboard
'use strict'; var angular = require('angular'); var directives = require('../scripts/modules').directives; angular.module(directives.name).directive('dashboardWidget', function () { return { restrict: 'E', template: '<outpatient-visualization options="options" height="height" width="width"></outpatient-visu...
'use strict'; var angular = require('angular'); var directives = require('../scripts/modules').directives; angular.module(directives.name).directive('dashboardWidget', function () { return { restrict: 'E', template: '<outpatient-visualization options="options" height="height" width="width"></outpatient-visu...
Add SITE_ID to test settings since contrib.sites is in INSTALLED_APPS.
#!/usr/bin/env python from os.path import dirname, abspath import sys from django.conf import settings if not settings.configured: from django import VERSION settings_dict = dict( INSTALLED_APPS=( 'localeurl', 'localeurl.tests', 'django.contrib.sites', # for sitema...
#!/usr/bin/env python from os.path import dirname, abspath import sys from django.conf import settings if not settings.configured: from django import VERSION settings_dict = dict( INSTALLED_APPS=( 'localeurl', 'localeurl.tests', 'django.contrib.sites', # for sitema...
Remove dependency on the future lib.
import django_rq from ievv_opensource.ievv_batchframework.models import BatchOperation from ievv_opensource.ievv_batchframework import batchregistry import logging class BatchActionGroupTask(object): abstract = True def run_actiongroup(self, actiongroup_name, batchoperation_id, **kwargs): try: ...
from __future__ import absolute_import import django_rq from ievv_opensource.ievv_batchframework.models import BatchOperation from ievv_opensource.ievv_batchframework import batchregistry import logging class BatchActionGroupTask(object): abstract = True def run_actiongroup(self, actiongroup_name, batchop...
Clean up spacing + use document ready
jQuery.fn.extend({ coverVid: function(width, height) { $(document).ready(sizeVideo); $(window).resize(sizeVideo); var $this = this; function sizeVideo() { // Get parent element height and width var parentHeight = $this.parent().height(); var parentWidth = $this.parent().width...
jQuery.fn.extend({ coverVid: function(width, height) { var $this = this; $(window).on('resize load', function(){ // Get parent element height and width var parentHeight = $this.parent().height(); var parentWidth = $this.parent().width(); // Get native video width and height v...
Remove only test from button
import {expect} from 'chai' import {describeComponent} from 'ember-mocha' import {beforeEach, afterEach, it, describe} from 'mocha' describeComponent( 'frost-button', 'FrostButtonComponent', { unit: true }, function () { let component beforeEach(function () { component = this.subject() ...
import {expect} from 'chai' import {describeComponent} from 'ember-mocha' import {beforeEach, afterEach, it, describe} from 'mocha' describeComponent.only( 'frost-button', 'FrostButtonComponent', { unit: true }, function () { let component beforeEach(function () { component = this.subject(...
Add comment about SScursor and nextset.
from pymysql.tests import base from pymysql import util try: import unittest2 as unittest except ImportError: import unittest class TestNextset(base.PyMySQLTestCase): def setUp(self): super(TestNextset, self).setUp() self.con = self.connections[0] def test_nextset(self): cur...
from pymysql.tests import base from pymysql import util try: import unittest2 as unittest except ImportError: import unittest class TestNextset(base.PyMySQLTestCase): def setUp(self): super(TestNextset, self).setUp() self.con = self.connections[0] def test_nextset(self): cur...
ZON-4007: Declare dependency (belongs to commit:6791185)
from setuptools import setup, find_packages setup( name='zeit.push', version='1.21.0.dev0', author='gocept, Zeit Online', author_email='zon-backend@zeit.de', url='http://www.zeit.de/', description="Sending push notifications through various providers", packages=find_packages('src'), pa...
from setuptools import setup, find_packages setup( name='zeit.push', version='1.21.0.dev0', author='gocept, Zeit Online', author_email='zon-backend@zeit.de', url='http://www.zeit.de/', description="Sending push notifications through various providers", packages=find_packages('src'), pa...
Update tile culling to factor in the new scale
var CullTiles = function (layer, camera, outputArray) { if (outputArray === undefined) { outputArray = []; } outputArray.length = 0; var tilemapLayer = layer.tilemapLayer; var mapData = layer.data; var mapWidth = layer.width; var mapHeight = layer.height; var left = (camera.scrollX * tilem...
var CullTiles = function (layer, camera, outputArray) { if (outputArray === undefined) { outputArray = []; } outputArray.length = 0; var tilemapLayer = layer.tilemapLayer; var mapData = layer.data; var mapWidth = layer.width; var mapHeight = layer.height; var left = (camera.scrollX * tilem...
Fix require to use new mauth package
var mAuthMint = require("mauth").mAuthMint; module.exports = function(options) { return function getMacaroonUserSecret(req, res, next) { if(typeof options.collection !== "undefined" && options.collection !== ""){ var userId = ""; if(req.method == "GET" || req.method == "DELETE"){ ...
var MacaroonAuthUtils = require("../utils/macaroon_auth.js"); module.exports = function(options) { return function getMacaroonUserSecret(req, res, next) { if(typeof options.collection !== "undefined" && options.collection !== ""){ var userId = ""; if(req.method == "GET" || req...
Remove unneeded nav checks for forward/back buttons.
browser.on("init", function () { "use strict"; // Show the refresh button this.showRefresh = () => { this.stopButton.classList.remove("stopButton"); this.stopButton.classList.add("refreshButton"); this.stopButton.title = "Refresh the page"; }; // Show the stop bu...
browser.on("init", function () { "use strict"; // Show the refresh button this.showRefresh = () => { this.stopButton.classList.remove("stopButton"); this.stopButton.classList.add("refreshButton"); this.stopButton.title = "Refresh the page"; }; // Show the stop bu...
Save creatorId as well for geometries This is to keep track of the creator, even when the provenance is not the user. Signed-off-by: Patrick Avery <743342299f279e7a8c3ff5eb40671fce3e95f13a@kitware.com>
from bson.objectid import ObjectId from girder.models.model_base import AccessControlledModel from girder.constants import AccessType from .molecule import Molecule as MoleculeModel class Geometry(AccessControlledModel): def __init__(self): super(Geometry, self).__init__() def initialize(self): ...
from bson.objectid import ObjectId from girder.models.model_base import AccessControlledModel from girder.constants import AccessType from .molecule import Molecule as MoleculeModel class Geometry(AccessControlledModel): def __init__(self): super(Geometry, self).__init__() def initialize(self): ...