prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>ar-DZ.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // THIS CODE IS GENERATED - DO NOT MODIFY // See angular/tools/gu...
<|file_name|>config.js<|end_file_name|><|fim▁begin|><|fim▁hole|> * openircd, a lightweight ircd written in javascript v8 with nodejs. * http://www.openbrasil.org/ - rede do conhecimento livre. * * $Id$ */ exports.listen = { port: 6667, host: '0.0.0.0' }; exports.server = { name: "experimental.openbrasil.org",...
/**
<|file_name|>test_heartrate_models.py<|end_file_name|><|fim▁begin|>import pandas as pd import pytest from athletic_pandas.algorithms import heartrate_models def test_heartrate_model(): heartrate = pd.Series(range(50)) power = pd.Series(range(0, 100, 2)) model, predictions = heartrate_models.heartrate_mo...
assert model.params['dhr'].value == 0.49914432620946803 assert model.params['tau_rise'].value == 0.98614419733274383 assert model.params['tau_fall'].value == 22.975975612579408
<|file_name|>gitignore.js<|end_file_name|><|fim▁begin|>(function(exports) {<|fim▁hole|> var content = grunt.file.read('build/.gitignore').replace(/composer.lock[\r\n]/m, ''); grunt.file.write('build/.gitignore', content); grunt.verbose.ok(); done(); }; })(typeof exports === 'object' && exports || th...
"use strict"; exports.dontIgnoreComposerLockFile = function(grunt, init, done) { grunt.verbose.write("Removing composer.lock from .gitignore.");
<|file_name|>user.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from . import app, db<|fim▁hole|>from hashlib import md5 from Lotus.lib.msg_code import Msg import json @app.route('/user/login', methods=['POST']) def user_login(): email = request.form.get('email', None) psw = request.form.get('psw', ...
from flask import request, g, session, redirect from Lotus.model.user import User
<|file_name|>GroupXmlExporterTest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2006-2011 The Kuali Foundation * * Licensed under the Educational Community 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 * ...
System.out.print(output.toString()); // now clear the tables
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from setuptools import setup try: import unittest2 # noqa except ImportError: test_loader = 'unittest:TestLoader' else: test_loader = 'unittest2:TestLoader' setup( name='mockldap', version='0.1.8', description=u"A simp...
'Topic :: Internet :: WWW/HTTP', 'Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP', 'Topic :: Software Development :: Libraries :: Python Modules',
<|file_name|>buster.js<|end_file_name|><|fim▁begin|>var config = this.window ? {} : module.exports; config.Rjs = { environment: "browser", rootPath: "../", sources: [ "build/Reality.combined.replaced.js", ], tests: [<|fim▁hole|><|fim▁end|>
"test/**/*.js" ] };
<|file_name|>asha-workers-details.service_20170223121119.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { Headers, Http } from '@angular/http'; import 'rxjs/add/operator/toPromise'; import { AshaWorkerBasicDetailsModel } from '../model/asha-worker-basic-details-model'; import { Ash...
return this.http.get(this.url) .toPromise() .then(response => response.json().awAshaDetailsModel as AshaWorkerBasicDetailsModel[])
<|file_name|>JSONUtil.java<|end_file_name|><|fim▁begin|>/* * Copyright 2016 Crown Copyright * * 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/LICEN...
} }
<|file_name|>revidx.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ use std::ops::{Add, Mul}; use std::str::FromStr; use std::u32; /// Index into a `RevLo...
<|file_name|>core.py<|end_file_name|><|fim▁begin|># Copyright 2012 OpenStack Foundation # # 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 # #...
<|file_name|>signal-exit-status.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache....
pub fn main() { let args: Vec<String> = env::args().collect(); if args.len() >= 2 && args[1] == "signal" {
<|file_name|>read_rgb.py<|end_file_name|><|fim▁begin|>import json from PIL import Image import collections with open('../config/nodes.json') as data_file: nodes = json.load(data_file) # empty fucker<|fim▁hole|>ordered_nodes = [None] * len(nodes) # populate fucker for i, pos in nodes.items(): ordered_nodes[int(...
<|file_name|>DoiClientTest.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Australian National University Data Commons * Copyright (C) 2013 The Australian National University * * This file is part of Australian National University Data Commons. ...
{ failOnException(e); }
<|file_name|>tests.rs<|end_file_name|><|fim▁begin|>use super::{Tok, ErrorCode, Error, Tokenizer, CaseInsensitiveUserStr, UserStr}; use super::Tok::*; enum Expectation<'a> { ExpectTok(Tok<'a>), ExpectErr(ErrorCode), } use self::Expectation::*; fn gen_test(input: &str, expected: Vec<(&str, Expectation)>) { ...
<|file_name|>xparser.py<|end_file_name|><|fim▁begin|># # This is a parser that generates the document tree for you. # # To use this parser, create an instance of XElementParser: # parser = saxexts.make_parser() # xp = XElementParser(parser) # # If you have defined classes in the current environment, you might wan...
<|file_name|>clean.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys import shutil import glob<|fim▁hole|>import fnmatch mydir = os.path.dirname(os.path.realpath(__file__)) projectdir = os.path.realpath(mydir + "/../") dirs = ['dist','deb_dist','build','.tox','.eggs','.cache','psicrawler.egg-...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # coding: utf-8 import os import sys from setuptools.command.test import test as TestCommand from jsonmodels import __version__, __author__, __email__ from setuptools import setup PROJECT_NAME = 'jsonmodels' if sys.argv[-1] == 'publish': ...
def finalize_options(self): TestCommand.finalize_options(self) self.test_args = []
<|file_name|>product-detail-content.component.ts<|end_file_name|><|fim▁begin|>import { Component} from '@angular/core'; import {RenderingUIAbstractComponent} from "../../../main/components/rendering-iu/rendering-ui.abstract.component"; @Component({ selector:'gota-home-content', moduleId : module.id || __modul...
templateUrl: './product-detail-content.component.html', styleUrls: ['./product-detail-content.component.css']
<|file_name|>1315-Sum of Nodes with Even-Valued Grandparent.py<|end_file_name|><|fim▁begin|># Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None<|fim▁hole|> def sumEvenGrandparent(self, root: TreeNode) -> int: ...
class Solution:
<|file_name|>private-method.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/...
impl cat { pub fn play(&mut self) { self.meows += 1u;
<|file_name|>test_merge.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 TiKV Project Authors. Licensed under Apache-2.0. use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::*; use std::thread; use std::time::Duration; use grpcio::{ChannelBuilder, Environment}; use kvproto::kvrpcpb::*; use kvproto::raft_se...
<|file_name|>tlsutility.hpp<|end_file_name|><|fim▁begin|>/****************************************************************************** * Icinga 2 * * Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org/) * * ...
#ifndef TLSUTILITY_H
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LI...
let s = match expr.node {
<|file_name|>test_broker.py<|end_file_name|><|fim▁begin|># # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the A...
class BrokerTests(TestBase): """Tests for basic Broker functionality"""
<|file_name|>method-self-arg-aux1.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apach...
Foo::baz(x);
<|file_name|>graph.rs<|end_file_name|><|fim▁begin|>//! A container for audio devices in an acyclic graph. //! //! A graph can be used when many audio devices need to connect in complex //! topologies. It can connect each output channel of a device to any input //! channel, provided that connection does not create a cyc...
ins.swap_remove(k); if ins.len() == 0 {
<|file_name|>foundation.d.ts<|end_file_name|><|fim▁begin|>/** * Copyright 2017 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apac...
export default MDCDialogFoundation;
<|file_name|>helpers.go<|end_file_name|><|fim▁begin|>package travel import ( "os" "github.com/akerl/speculate/v2/creds" ) func clearEnvironment() error { for varName := range creds.Translations["envvar"] { logger.InfoMsgf("Unsetting env var: %s", varName) err := os.Unsetenv(varName) if err != nil { retur...
<|file_name|>datasetsCtrl.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('hopsWorksApp') .controller('DatasetsCtrl', ['$scope', '$q', '$mdSidenav', '$mdUtil', '$log', 'DataSetService', 'JupyterService', '$routeParams', '$route', 'ModalService', 'growl', '$location', 'MetadataH...
self.menustyle.opacity = 0.2;
<|file_name|>SqlStepper.amd.js<|end_file_name|><|fim▁begin|>;modjewel.define("weinre/target/SqlStepper", function(require, exports, module) { // Generated by CoffeeScript 1.3.3 var Binding, SqlStepper, executeSql, ourErrorCallback, runStep; Binding = require('../common/Binding'); module.exports = SqlStepper = (functi...
} context.tx = tx; context.currentStep = context.nextStep; context.nextStep++;
<|file_name|>job_queue.rs<|end_file_name|><|fim▁begin|>use std::collections::HashSet; use std::collections::hash_map::HashMap; use std::collections::hash_map::Entry::{Occupied, Vacant}; use std::sync::TaskPool; use std::sync::mpsc::{channel, Sender, Receiver}; use term::color::YELLOW; use core::{Package, PackageId, Re...
<|file_name|>neutralField1D.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Tweak of profile plots as a function of nn. """ import pickle import matplotlib.pylab as plt import matplotlib.lines as mlines import numpy as np from subprocess import Popen import os, sys # If we add to sys.path, then it must be ...
<|file_name|>test_branches.py<|end_file_name|><|fim▁begin|>import pytest from gitlabform.gitlab import AccessLevel from tests.acceptance import ( run_gitlabform, DEFAULT_README, get_gitlab, ) gl = get_gitlab() @pytest.fixture(scope="function") def branches(request, gitlab, group_and_project): branc...
branch = gitlab.get_branch(group_and_project, "protect_branch") assert branch["protected"] is True
<|file_name|>_random_over_sampler.py<|end_file_name|><|fim▁begin|>"""Class to perform random over-sampling.""" # Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com> # Christos Aridas # License: MIT from collections.abc import Mapping from numbers import Real import numpy as np from scipy import sparse fro...
f"classes are: {repr(missing_shrinkage_keys)}" )
<|file_name|>traces.py<|end_file_name|><|fim▁begin|># Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ht...
exclude_attributes=None, include_attributes=None,
<|file_name|>pio_uart_tx.py<|end_file_name|><|fim▁begin|># Example using PIO to create a UART TX interface from machine import Pin from rp2 import PIO, StateMachine, asm_pio UART_BAUD = 115200 PIN_BASE = 10 NUM_UARTS = 8 @asm_pio(sideset_init=PIO.OUT_HIGH, out_init=PIO.OUT_HIGH, out_shiftdir=PIO.SHIFT_RIGHT) def ua...
for c in s: sm.put(ord(c))
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use std::fmt::Debug; use std::fmt::Binary; pub fn println<T>(a: T) where<|fim▁hole|> T: Debug, { print!("{:?}\n", a); } pub fn println_binary<T>(a: T) where T: Binary, { print!("{:#b}\n", a); }<|fim▁end|>
<|file_name|>maven_artifact.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2014, Chris Schmidt <chris.schmidt () contrastsecurity.com> # # Built using https://github.com/hamnis/useful-scripts/blob/master/python/download-maven-artifact # as a reference and starting point. # # ...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Plugin: Slideshow ***************** This plugin allows you to put a slideshow on a page, automatically displaying the selected image files with customizable transitions and intervals. Installation<|fim▁hole|>To use this plugin, put ``media_tree.contrib.cms_pl...
============
<|file_name|>test_marshal.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, absolute_import import random import unittest from pysmoke import marshal from pysmoke.smoke import ffi, Type, TypedValue, pystring, smokec, not_implemented, charp, dbg from pysmoke import QtCore, QtGui qtcore = QtCore._...
pass def tearDown(self):
<|file_name|>SimpleGameLogic.cpp<|end_file_name|><|fim▁begin|>#include "SimpleGameLogic.h" #include "GameWorld.h" #include "MonstersPlace.h" void SimpleGameLogic::worldLoaded() { _physicsWorld = _world->getGameContent()->getPhysicsWorld(); _physicsWorld->setCollisionCallback(this); _tank = static_cast<Tank*>(_worl...
<|file_name|>unboxed-closures-direct-sugary-call.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT.<|fim▁hole|>// option. This file may not be copied, modified, or distributed ...
// // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
<|file_name|>eventon_gen_maps.js<|end_file_name|><|fim▁begin|>/* EventON Generate Google maps function */ (function($){ $.fn.evoGenmaps = function(opt){ var defaults = { delay: 0, fnt: 1, cal: '', mapSpotId: '', _action:'' }; var options = $.extend({}, defaults, opt); ...
}
<|file_name|>dromaeo.py<|end_file_name|><|fim▁begin|><|fim▁hole|> from benchmarks import press from telemetry import benchmark from page_sets import dromaeo_pages @benchmark.Info(component='Blink>Bindings', emails=['jbroman@chromium.org', 'yukishiino@chromium.org', ...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file.
<|file_name|>ColorPanel.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Note: this module is not a demo per se, but is used by many of # the demo modules for various purposes. import wx #--------------------------------------------------------------------------- class ColoredPanel(wx.Window): def __in...
<|file_name|>branchrevision.py<|end_file_name|><|fim▁begin|># Copyright 2009-2010 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). __metaclass__ = type __all__ = [ 'BranchRevision', ] from storm.locals import ( Int, Reference, ...
implements(IBranchRevision) branch_id = Int(name='branch', allow_none=False)
<|file_name|>mode_tag.py<|end_file_name|><|fim▁begin|>CAMERA_MODE_PHOTO2 = 100 CAMERA_MODE_PHOTO = 0 CAMERA_MODE_FACE_BEAUTY = 1 CAMERA_MODE_PANORAMA = 2 CAMERA_MODE_SELF_WIDEVIEW = 3 CAMERA_MODE_SCENE_FRAME = 4 CAMERA_MODE_GESTURE_SHOT = 5 CAMERA_MODE_LIVE_PHOTO = 6 CAMERA_MODE_VIDEO = 7 CAMERA_MODE_PROFESSIONAL = 8 C...
CAMERA_MODE_CHROMAFLASH = 15
<|file_name|>button-bar.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react' import Box from './box' import {globalStyles, isMobile, collapseStyles, isTablet} from '../styles' type Props = { direction: 'row' | 'column' align?: 'flex-start' | 'flex-end' | 'center' // ignored by column,,, children: Reac...
...(isTablet ? {maxWidth: 460} : {}), ...(this.props.direction === 'column' ? {...globalStyles.flexBoxColumn}
<|file_name|>graphqlOptions.d.ts<|end_file_name|><|fim▁begin|>import { GraphQLSchema, ValidationContext, GraphQLFieldResolver } from 'graphql'; import { LogFunction } from './runQuery'; import { CacheControlExtensionOptions } from 'apollo-cache-control'; export interface GraphQLServerOptions<TContext = any> { schem...
} export default GraphQLServerOptions;
<|file_name|>classify.py<|end_file_name|><|fim▁begin|># Load pickled data import pickle import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import ImageGrid import numpy as np import tensorflow as tf from tensorflow.contrib.layers import flatten from sklearn.utils import shuffle class Data: def __init_...
# Convolutional Layer 2: Input = 14x14x6 Output: 10x10x16 conv2_W = tf.Variable(tf.truncated_normal(shape=(5, 5, 6, 16), mean=mu, stddev=sigma), name="v3") conv2_b = tf.Variable(tf.zeros(16), name="v4")
<|file_name|>parity.cc<|end_file_name|><|fim▁begin|>// -*- coding: utf-8 -*- // Copyright (C) 2016 Laboratoire de Recherche et Développement // de l'Epita (LRDE). // // This file is part of Spot, a model checking library. // // Spot is free software; you can redistribute it and/or modify it // under the terms of the GN...
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
module.exports = require('./lib/dustjs-browserify');
<|file_name|>vfs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Adrian Sampson. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software with...
<|file_name|>ldparser.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licens...
<|file_name|>pages_tags.py<|end_file_name|><|fim▁begin|>from django import template from django.template.loader_tags import BaseIncludeNode from django.template import Template from django.conf import settings from pages.plugins import html_to_template_text, SearchBoxNode from pages.plugins import LinkNode, EmbedCodeN...
<|file_name|>plugin.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.plugins.add('resize', { init:function (editor) { var config = editor.config; // Resize in th...
editor.document.removeListener('mousemove', dragHandler); editor.document.removeListener('mouseup', dragEndHandler); }
<|file_name|>random_distributed_scalar_test.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for thi...
RandomDistributedScalarEncoder(name="mv", resolution=1.0, n=5.9*21) # w can't be negative
<|file_name|>main.py<|end_file_name|><|fim▁begin|>from kivy.lib import osc from time import sleep import pocketclient from kivy.utils import platform as kivy_platform SERVICE_PORT = 4000 def platform(): p = kivy_platform() if p.lower() in ('linux', 'waindows', 'osx'): return 'desktop' else: ...
else:
<|file_name|>yaml_load.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ A basic example of loading YAML Make sure you use the "safe_load" method and not the "load" method that will give you warnings. References: - https://stackoverflow.com/questions/1773805/how-can-i-parse-a-yaml-file-in-python """ import y...
except yaml.YAMLError as exc:
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Serkr - An automated theorem prover. Copyright (C) 2015-2016 Mikko Aarnos. // // Serkr is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of ...
#[cfg_attr(rustfmt, rustfmt_skip)]
<|file_name|>bfloat16_test.py<|end_file_name|><|fim▁begin|># Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
if dtype != bfloat16:
<|file_name|>Asset.py<|end_file_name|><|fim▁begin|>''' Created on 11May,2016 @author: linyufeng ''' from utils.TimeZoneConverter import TimeZoneConverter class Asset(object): ''' contain the values will be insert into table Asset ''' convert = TimeZoneConverter(); def __init__(self, startTim...
if self.fileType == other.fileType: return True return False
<|file_name|>development.js<|end_file_name|><|fim▁begin|>import browserSync from 'browser-sync'; import config from '../../config'; import middlewaresStack from '../middlewares_stack'; import apiMiddleware from '../middlewares/api'; import mockMiddleware from '../middlewares/mock'; export default () => { const port ...
`!${config.distDir}/**/*.map` ] }); };
<|file_name|>PlusInfinity.java<|end_file_name|><|fim▁begin|>/* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory This file is part of HermiT. HermiT is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by ...
throw new UnsupportedOperationException(); } public float floatValue() {
<|file_name|>command_line.py<|end_file_name|><|fim▁begin|>''' command_line.py Utility functions for reading command line arguments. Author: Martin Norbury Novemeber 2013 ''' import inspect import argparse def command_line(fn): ''' A decorator for functions intented to be run from the command line. ...
# Configure optional arguments, setting defaults appropriately.
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>__all__ = ["Transition"] class Transition(object): def __init__(self, startState, nextState, word, suffix, marked): self.startState = startState self.nextState = nextState self.word = word self.suffix = suffix self.marke...
self.nextState == transition.nextState):
<|file_name|>test_skip_examples.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 ...
<|file_name|>session.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) 2004-2009 Edgewall Software # Copyright (C) 2004 Daniel Lundin <daniel@edgewall.com> # Copyright (C) 2004-2006 Christopher Lenz <cmlenz@gmx.de> # Copyright (C) 2006 Jonas Borgström <jonas@edgewall.com> # Copyright (C) 2008 Ma...
if not authenticated and refresh_cookie:
<|file_name|>smartLegend.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import markdown from markdown.treeprocessors import Treeprocessor from markdown.blockprocessors import BlockProcessor import re from markdown import util import xml.etree.Elem...
return True else: return False
<|file_name|>qa_packed_to_unpacked.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2005,2007,2010,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
<|file_name|>namespaced-enum-glob-import-no-impls.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // ...
<|file_name|>violet_hold.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2011-2012 ArkCORE2 <http://www.arkania.net/> * Copyright (C) 2010-2012 Project SkyFire <http://www.projectskyfire.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Publ...
{
<|file_name|>font.mako.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <%he...
if let Ok(value) = input.try(|input| font_weight::parse(context, input)) { weight = Some(value);
<|file_name|>clustering.cpp<|end_file_name|><|fim▁begin|>/** * The Seeks proxy and plugin framework are part of the SEEKS project. * Copyright (C) 2009 Emmanuel Benazera, juban@free.fr * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public Lic...
<|file_name|>camera.py<|end_file_name|><|fim▁begin|># ============================================================================= # Federal University of Rio Grande do Sul (UFRGS) # Connectionist Artificial Intelligence Laboratory (LIAC) # Renato de Pontes Pereira - renato.ppontes@gmail.com # ========================...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>class Provider(PhoneNumberProvider): formats = ( # Mobile # Government website: http://www.uke.gov.pl/numeracja-843 '50# ### ###', '51# ### ###', '53# ### ###', '57# ### ###', '60# ### ###', ...
from __future__ import unicode_literals from .. import Provider as PhoneNumberProvider
<|file_name|>Tx3gParser.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2014 The Android Open Source Project * * 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.ap...
<|file_name|>compressed_sparsity_pattern_05.cc<|end_file_name|><|fim▁begin|>// --------------------------------------------------------------------- // // Copyright (C) 2008 - 2014 by the deal.II authors // // This file is part of the deal.II library. // // The deal.II library is free software; you can use it, redistri...
copy_with_offdiagonals_2<CompressedSparsityPattern> (); }
<|file_name|>project.py<|end_file_name|><|fim▁begin|>from pprint import pformat from sqlalchemy import Column, ForeignKey, orm from sqlalchemy.types import String, Integer, Boolean, Text from sqlalchemy.schema import UniqueConstraint from intranet3 import memcache from intranet3.models import Base, User from intranet3...
sprints = orm.relationship('Sprint', backref='project', lazy='dynamic') google_card = Column(String, nullable=True)
<|file_name|>analytic_account_open.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2015 Eficent - Jordi Ballester Alomar # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import api, fields, models class AnalyticAccountOpen(models.TransientModel): _name = 'analyt...
acc_id = self.analytic_account_id.id acc_ids = [] if self.include_child: acc_ids = self._get_child_analytic_accounts(acc_id)
<|file_name|>sync.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/L...
pub enum Failure {
<|file_name|>api.js<|end_file_name|><|fim▁begin|>YUI.add("yuidoc-meta", function(Y) {<|fim▁hole|> ], "modules": [ "gallery-audio" ], "allModules": [ { "displayName": "gallery-audio", "name": "gallery-audio" } ] } }; });<|fim▁end|>
Y.YUIDoc = { meta: { "classes": [ "Audio"
<|file_name|>class.IContextMenuable.js<|end_file_name|><|fim▁begin|>/* * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io> * This file is part of Pydio. * * Pydio is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by...
<|file_name|>logdna.py<|end_file_name|><|fim▁begin|>import logging import requests import socket import sys import threading import time from concurrent.futures import ThreadPoolExecutor from .configs import defaults from .utils import sanitize_meta, get_ip, normalize_list_option class LogDNAHandler(logging.Handler...
self.key = key self.hostname = options.get('hostname', socket.gethostname()) self.ip = options.get('ip', get_ip())
<|file_name|>81.Search_in_Rotated_Sorted_Array_II.cpp<|end_file_name|><|fim▁begin|>class Solution { public: bool search(vector<int>& nums, int target) { int l = 0, r = nums.size() - 1; if(nums.empty()) return false; while(l != r && nums[l] == nums[r]) l++; while(l < r) { ...
<|file_name|>project-requirements-change.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # Copyright (C) 2011 OpenStack, LLC. # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright (c) 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not ...
if not _is_requirement_in_global_reqs( req, global_reqs[name]):
<|file_name|>index.js<|end_file_name|><|fim▁begin|>function HtmlElementsPlugin(locations) { this.locations = locations; } HtmlElementsPlugin.prototype.apply = function(compiler) { var self = this; compiler.plugin('compilation', function(compilation) { compilation.options.htmlElements = compilation....
<|file_name|>control-group-success.js<|end_file_name|><|fim▁begin|>import { inject as service } from '@ember/service'; import Component from '@ember/component'; import { task } from 'ember-concurrency'; export default Component.extend({ router: service(), controlGroup: service(), store: service(), // public a...
});
<|file_name|>read_only_memory.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #![cfg(any(target_arch = "x86", target_arch = "x86_64"))] use base::{MemoryMappingBuilde...
<|file_name|>bitcoin_zh.ts<|end_file_name|><|fim▁begin|><TS language="zh" version="2.1"> <context> <name>AddressBookPage</name> <message> <source>Right-click to edit address or label</source> <translation>右键单击来编辑地址或者标签</translation> </message> <message> <source>Create a new addre...
<message>
<|file_name|>xxhash64.js<|end_file_name|><|fim▁begin|>/** xxHash64 implementation in pure Javascript Copyright (C) 2016, Pierre Curto MIT license */ var UINT64 = require('cuint').UINT64 /* * Constants */ var PRIME64_1 = UINT64( '11400714785074694791' ) var PRIME64_2 = UINT64( '14029467366897019727' ) var PRIME64_3 ...
h64.xor( this.v4.multiply(PRIME64_2).rotl(31).multiply(PRIME64_1) )
<|file_name|>chardistribution.rs<|end_file_name|><|fim▁begin|>use super::big5freq::*; use super::euckrfreq::*; use super::euctwfreq::*; use super::gb2312freq::*; use super::jisfreq::*; pub trait CharDistributionAnalysis { fn reset(&mut self); fn feed(&mut self, char: &[u8], char_len: usize); fn get_confide...
fn get_order(&self, _: &[u8]) -> Option<usize> {
<|file_name|>players.js<|end_file_name|><|fim▁begin|>var playersController = exports; exports.constructor = function playersController(){}; var _ = require('lodash'); var players = require('../sonos/players'); playersController.list = function(req, res, next) { players.client.find(function(err, players) { if (...
<|file_name|>issue-21356.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
fn main() {}
<|file_name|>string.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 // protoc v3.19.1 // source: envoy/type/matcher/v3/string.proto package envoy_type_matcher_v3 import ( _ "github.com/cncf/xds/go/udpa/annotations" _ "github.com/envo...
func (m *StringMatcher) GetMatchPattern() isStringMatcher_MatchPattern {
<|file_name|>create-stats-perfs-db.py<|end_file_name|><|fim▁begin|>from collections import defaultdict from zipfile import ZipFile from datetime import datetime from itertools import izip import logging import sys import shelve from backtest import constants def main(): PRICES_DATA = constants.PRIC...
performances.close() if __name__ == '__main__':
<|file_name|>amodule.py<|end_file_name|><|fim▁begin|>from txaws.server.method import Method from txaws.server.tests.fixtures import method<|fim▁hole|> @method class TestMethod(Method): pass<|fim▁end|>
<|file_name|>debug.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2002-2011 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or ...
static Bit32u dataOfs; static bool showExtend = true;