prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(asm)] #![feature(box_syntax)] #![feature(test)] #![feature(async_closure)] extern crate static_assertions; #[macro_use] extern crate log; #[macro_use] extern crate lazy_static; #[macro_use] extern crate bifrost; extern crate bifrost_hasher; extern crate bifro...
<|file_name|>motors.d.ts<|end_file_name|><|fim▁begin|>import IO = require('./io'); import IndexedDevice = IO.IndexedDevice; export declare module Motor { type CommandValue = 'run-forever' | 'run-to-abs-pos' | 'run-to-rel-pos' | 'run-timed' | 'run-direct' | 'stop' | 'reset'; type EncoderPolarityValue = 'normal' ...
overloaded: Motor.StateValue; stalled: Motor.StateValue;
<|file_name|>jquery.liveFilter.js<|end_file_name|><|fim▁begin|>/* * jQuery.liveFilter * * Copyright (c) 2009 Mike Merritt * * Forked by Lim Chee Aun (cheeaun.com) * */ (function($){ $.fn.liveFilter = function(inputEl, filterEl, options){ var defaults = { filterChildSelector: null, filter...
<|file_name|>SharedPlanPriceSpec.ts<|end_file_name|><|fim▁begin|>import { CommonConstants } from '../../../../utils/CommonConstants'; import { ServerFarmSkuConstants } from '../../../../utils/scenario-checker/ServerFarmSku'; import { AppKind } from '../../../../utils/AppKind'; import { PriceSpec, PriceSpecInput, SpecCo...
id: 'pricing_includedHardware_azureComputeUnits',
<|file_name|>values.go<|end_file_name|><|fim▁begin|>package source import "fmt" func Values() { <|fim▁hole|> fmt.Println("go" + "lang") fmt.Println("1+1 =", 1+1) fmt.Println("7.0/3.0 =", 7.0/3.0) fmt.Println(true && false) fmt.Println(true || false) fmt.Println(!true) }<|fim▁end|>
<|file_name|>read_method.rs<|end_file_name|><|fim▁begin|>use super::branchify::generate_branchified_method; use super::get_writer; use std::io::IoResult; pub fn generate(output_dir: Path) -> IoResult<()> { let mut writer = get_writer(output_dir, "read_method.rs"); try!(writer.write(b"\ // This automatically ge...
"PATCH" => Patch,
<|file_name|>leap.js<|end_file_name|><|fim▁begin|>var Leap = require("leapjs"); var keyboard = require('node_keyboard'); //Each var individually declared below so they refence different objects in memory. I.e work independantly. //These vars log when a particular action / gesture last ran. var last_fav = new Da...
<|file_name|>popular.js<|end_file_name|><|fim▁begin|>import Ember from 'ember'; var PluginsPopularRoute = Ember.Route.extend({ titleToken: 'Popular'<|fim▁hole|>export default PluginsPopularRoute;<|fim▁end|>
});
<|file_name|>mergeIntervals.js<|end_file_name|><|fim▁begin|>// Given a collection of intervals, merge all overlapping intervals. // For example, // Given [1,3],[2,6],[8,10],[15,18], // return [1,6],[8,10],[15,18]. /** * Definition for an interval. * function Interval(start, end) { * this.start = start; * ...
};
<|file_name|>base.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2015 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/licen...
<|file_name|>error.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/. */ //! Utilities to throw exceptions from Rust bindings. use dom:...
/// Format string used to throw javascript errors. static ERROR_FORMAT_STRING_STRING: [libc::c_char; 4] = [ '{' as libc::c_char,
<|file_name|>prune.go<|end_file_name|><|fim▁begin|>package catalog import ( "fmt" "poule/operations" "strings" "time" "poule/configuration" "poule/gh" "poule/operations/settings" "github.com/google/go-github/github" "github.com/mitchellh/mapstructure" "github.com/pkg/errors" "github.com/urfave/cli" ) fun...
issue := item.Issue
<|file_name|>physics.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../typings/index.d.ts" /> /// <reference path="../../node_modules/excalibur/dist/excalibur.d.ts" /> import * as ex from "excalibur"; import { Actor, Engine, IEngineOptions, Sprite, Texture, Vector } from "excalibur"; import * as p2 from "p2";...
var fixedTimeStep = 1 / 60; // seconds var maxSubSteps = 10; // Max sub steps to catch up with the wall clock
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import os import sys import commentjson import time import json import datetime from parse_input import check_config_structure from build_nova import build_infrastructure, wait_for_spawn from url_requests import test_infrastructure import subprocess ...
print "File not found/permission was denied." exit(1)
<|file_name|>fields.py<|end_file_name|><|fim▁begin|>import pickle from base64 import b64encode from pulsar.utils.html import UnicodeMixin class FieldError(RuntimeError): pass def get_field_type(field): return getattr(field, 'repr_type', 'text') class Field(UnicodeMixin): '''Base class of all :mod:`.o...
class FloatField(Field):
<|file_name|>select-demo-module.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google LLC 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 */ import {CommonModule} from '@angular/common'; import ...
MatFormFieldModule, MatIconModule, MatInputModule,
<|file_name|>run_suite.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import datetime from run_utils import * class TestSuite(object): def __init__(self, options, cache): self.options = options self.cache = cache self.nameprefix = "opencv_" + self.options.mode + "_" self.tes...
<|file_name|>profile.module.ts<|end_file_name|><|fim▁begin|>import { AskUsernameComponent } from './ask-username/ask-username.component'; import { BsDropdownModule } from 'ngx-bootstrap'; import { CoreModule } from '../core/core.module'; import { EditProfileComponent } from './edit-profile/edit-profile.component'; impo...
<|file_name|>allowed_object_naming.ts<|end_file_name|><|fim▁begin|>import {Issue} from "../issue"; import {IObject} from "../objects/_iobject"; import {IRule, IRuleMetadata, RuleTag} from "./_irule"; import {BasicRuleConfig} from "./_basic_rule_config"; import {IRegistry} from "../_iregistry"; export class AllowedObje...
}
<|file_name|>test_geocoder.py<|end_file_name|><|fim▁begin|># coding=utf-8 import json import re import responses import pytest import mapbox def test_geocoder_default_name(): """Default name is set""" geocoder = mapbox.Geocoder() assert geocoder.name == 'mapbox.places' def test_geocoder_name(): ""...
# check coordinate precision for reverse geocoding coordinates
<|file_name|>speaking.py<|end_file_name|><|fim▁begin|># Copyright (C) 2015 Ross D Milligan # GNU GENERAL PUBLIC LICENSE Version 3 (full notice can be found at https://github.com/rdmilligan/SaltwashAR) class Speaking: # initialize speaking def __init__(self, text_to_speech): self.is_speaking = False ...
self.is_speaking = True self.text_to_speech.convert(text) self.is_speaking = False
<|file_name|>FilterGroup.js<|end_file_name|><|fim▁begin|>"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new _...
FilterGroup.defaultProps = { mod: "sk-filter-group", translate: function (str) { return str; } };
<|file_name|>ConvertibleStrings.cpp<|end_file_name|><|fim▁begin|>#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #i...
p2 = 3;
<|file_name|>test_copy_package.py<|end_file_name|><|fim▁begin|>""" test package copying """ import shutil import time import os.path import os from rez.system import system from rez.build_process_ import create_build_process from rez.build_system import create_build_system from rez.resolved_context import ResolvedCont...
copy_package( package=src_pkg, dest_repository=self.dest_install_root,
<|file_name|>triggers.go<|end_file_name|><|fim▁begin|>// Copyright 2015 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package meterstatus import ( "time" ) type TriggerCreator func(WorkerState, string, time.Time, Clock, time.Duration, time.Duration) (<-chan time.Time, <-chan time.Time) ...
<|file_name|>clientabc.py<|end_file_name|><|fim▁begin|>"""Abstract base class for kernel clients""" #----------------------------------------------------------------------------- # Copyright (C) 2013 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file...
@abc.abstractproperty def channels_running(self): pass
<|file_name|>parallax.js<|end_file_name|><|fim▁begin|>$(function () { var controller = new ScrollMagic.Controller({ globalSceneOptions: { triggerHook: 'onLeave', reverse: true } }); // $('.homepage .panel').each(function () { // var element = $(this); ...
// var scene = new ScrollMagic.Scene({triggerElement: element_id_with_hash}) // .setPin(element_id_with_hash)
<|file_name|>NotificationDetail.js<|end_file_name|><|fim▁begin|>import React from "react"; import { Link } from "react-router"; import Loader from "../../core/Loader"; import DataComponent from "../base/DataComponent"; import DataError from "../base/DataError"; import ResourceAction from "./../base/ResourceAction"; imp...
let oldId = this.props.params.id; let newId = next.params.id;
<|file_name|>lxqt-panel_eu.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="eu"> <context> <name>AddPluginDialog</name> <message> <location filename="../../../config/addplugindialog.ui" line="14"/> <source>Add Plugins</source> ...
<source>Panel</source> <translation type="unfinished">Panela</translation>
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.db import models<|fim▁hole|>class Post(models.Model): title = models.TextField(null=True, blank=True) #Título content = models.TextField(null=True, blank=True) #Contenido de la entrada url = models.URLField(max_length=20...
from django.contrib.auth.models import User from users.models import Hijo
<|file_name|>x2search4porn.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from Plugins.Extensions.MediaPortal.plugin import _ from Plugins.Extensions.MediaPortal.resources.imports import * from Plugins.Extensions.MediaPortal.resources.keyboardext import VirtualKeyBoardExt CONFIG = "/usr/lib/enigma2/python/Pl...
self.genreliste = [] self['liste'] = self.ml if not fileExists(config.mediaportal.watchlistpath.value+"mp_2s4p"): open(config.mediaportal.watchlistpath.value+"mp_2s4p","w").close()
<|file_name|>category.rs<|end_file_name|><|fim▁begin|>use std::collections::HashSet; use time::Timespec; use conduit::{Request, Response}; use conduit_router::RequestParams; use pg::GenericConnection; use pg::rows::Row; use {Model, Crate}; use db::RequestTransaction; use util::{RequestUtils, CargoResult, ChainError};...
<|file_name|>simple-model-test.js<|end_file_name|><|fim▁begin|>import { moduleForModel, test } from 'ember-qunit'; moduleForModel('simple-model', 'SimpleModel', { // Specify the other units that are required for this test. needs: [] }); test('it exists', function() { var model = this.subject();<|fim▁hole|>}...
// var store = this.store(); ok(!!model);
<|file_name|>service_v4.py<|end_file_name|><|fim▁begin|>import shelve import os import re from resource_api.interfaces import Resource as BaseResource, Link as BaseLink, AbstractUriPolicy from resource_api.schema import StringField, DateTimeField, IntegerField from resource_api.service import Service from resource_api...
self._storage = context["storage"] def exists(self, user, pk, rel_pk): return rel_pk in self._storage.get((pk, self.get_name()), {})
<|file_name|>setuphandlers.py<|end_file_name|><|fim▁begin|>from plone import api from plone.app.controlpanel.security import ISecuritySchema def setup_workspaces(portal): mp = api.portal.get_tool(name='portal_membership') # set type to custom member type mp.setMemberAreaType('wigo.workspaces.workspace')<|...
# set member folder name mp.setMembersFolderById('sqa')
<|file_name|>sensorCount.py<|end_file_name|><|fim▁begin|>from .AlFeatureTemplate import AlFeatureTemplate from .sensorCountRoutine import AlFeatureSensorCountRoutine import numpy as np class AlFeatureSensorCount(AlFeatureTemplate): def __init__(self, normalize=False): """ Initialization of Templa...
:param window_size: window size :param sensor_name: name of sensor :return: a double value """
<|file_name|>RestApplication.java<|end_file_name|><|fim▁begin|>package org.marsik.bugautomation.rest; import javax.ws.rs.ApplicationPath; import javax.ws.rs.core.Application; import java.util.Collections; import java.util.HashSet; import java.util.Set; @ApplicationPath("/") public class RestApplication extends Applic...
return classes; } }
<|file_name|>model.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/. */ //! Borders, padding, and margins. #![deny(unsafe_code)] use ...
/// Intrinsic sizes for the content only (not counting borders, padding, or margins). pub content_intrinsic_sizes: IntrinsicISizes, /// The inline size of borders and padding, as well as margins if appropriate. pub surrounding_size: Au,
<|file_name|>resource_aws_servicecatalog_portfolio_test.go<|end_file_name|><|fim▁begin|>package aws import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/servicecatalog" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hash...
<|file_name|>ecommerce.go<|end_file_name|><|fim▁begin|>package ecommerce import ( "net/http" "github.com/arvindkandhare/goamz/aws" ) // ProductAdvertising provides methods for querying the product advertising API type ProductAdvertising struct { service aws.Service associateTag string } // New creates a ne...
return p.service.Query("GET", "/onca/xml", params)
<|file_name|>record.cpp<|end_file_name|><|fim▁begin|>#include "stdafx.h" #include "record.hpp" namespace tc { namespace log { const char* record::type_acronym( void ) const { switch( type ) { case log::trace: return "T"; case log::debug: return "D"; case log::info: return "I"; case log::warn: return "W"; case l...
} return "?"; }
<|file_name|>bird.cpp<|end_file_name|><|fim▁begin|>/* * bird.cpp * * Created on: Apr 7, 2015 * Author: torch2424 */ <|fim▁hole|> bird::bird() { //animalType = &type; } bird::~bird() { // TODO Auto-generated destructor stub }<|fim▁end|>
#include "bird.h" using namespace std;
<|file_name|>latlng.js<|end_file_name|><|fim▁begin|>import util from './util' import LatLngBounds from './latlngbounds' const {abs, max, min, PI, sin, cos, acos} = Math const rad = PI / 180 // distance between two geographical points using spherical law of cosines approximation function distance (latlng1, latlng2) { ...
} // @method toBounds(sizeInMeters: Number): LatLngBounds // Returns a new `LatLngBounds` object in which each boundary is `sizeInMeters` meters apart from the `LatLng`.
<|file_name|>journey-of-h5.js<|end_file_name|><|fim▁begin|>function drawCanvas() { var canvas = document.getElementById('canvas-container'); var context = canvas.getContext("2d"); var grd = context.createLinearGradient(0,0,170,0); grd.addColorStop(0,"red"); grd.addColorStop(0.5,"blue"); grd.addC...
drawCanvas(); });
<|file_name|>test_getter.py<|end_file_name|><|fim▁begin|>from uber.tests import * @pytest.fixture def attendee_id(): with Session() as session: return session.query(Attendee).filter_by(first_name='Regular', last_name='Attendee').one().id @pytest.fixture(autouse=True) def mock_apply(monkeypatch): monke...
pytest.raises(Exception, session.attendee, None) pytest.raises(Exception, session.attendee, str(uuid4())) pytest.raises(Exception, session.attendee, {'id': str(uuid4())})
<|file_name|>DatabasePersistenceProvider.java<|end_file_name|><|fim▁begin|>package br.com.trustsystems.demo.provider; import br.com.trustsystems.persistence.Persistent; import br.com.trustsystems.persistence.dao.IUnitOfWork; import br.com.trustsystems.persistence.provider.jpa.JpaPersistenceProvider; import org.springf...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var htmlparser = require('htmlparser2'); var _ = require('lodash'); var ent = require('ent'); module.exports = sanitizeHtml; function sanitizeHtml(html, options) { var result = ''; if (!options) { options = sanitizeHtml.defaults; } else { _.defaults(opt...
// Defaults are accessible to you so that you can use them as a starting point // programmatically if you wish
<|file_name|>cythonize.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ cythonize.py Cythonize pyx files into C++ files as needed. Usage: cythonize.py [root] Checks pyx files to see if they have been changed relative to their corresponding C++ files. If they have, then runs cython on these files to recreate...
except OSError:
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(if_let)] use std::os; use std::io::Command; use std::io::process::InheritFd; use std::default::Default; /// Extra configuration to pass to gcc. pub struct Config { /// Directories where gcc will look for header files. pub include_directories: Vec<Pat...
<|file_name|>flow.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/. */ //! Servo's experimental layout system builds a tree of `Flow` a...
impl fmt::Debug for BaseFlow { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<|file_name|>example.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import time from flask import Flask, session, url_for from flask_debugtoolbar import DebugToolbarExtension from weblablib import WebLab, requires_active, weblab_user, poll app = Flask(__name__) # XXX: IMPORTANT SETTINGS TO CHA...
print(" (optionally) $ export FLASK_DEBUG=1") print(" $ export FLASK_APP={}".format(__file__))
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.contrib.auth.models import User class OrganisationType(models.Model): type_desc = models.CharField(max_length=200) def __unicode__(self): return self.type_desc class Address(models.Model): street_address...
user = models.OneToOneField(User) address = models.ForeignKey(Address) telephone = models.CharField(max_length=500) date_joined = models.DateTimeField(auto_now_add=True)
<|file_name|>frontEndRoute.js<|end_file_name|><|fim▁begin|>var express = require('express'); var soapSave = require('../utils/soa_save_esig')('http://192.168.0.6:8001/soa-infra/services/default/SignatureService/SignatureService_ep?WSDL'); var router = express.Router(); /* GET users listing. */ router.get('/', function...
} else{ var buf = new Buffer(b64string, 'base64');
<|file_name|>extension_uninstall_dialog_gtk.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 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. // // Currently this file is only used for the uninstall prompt. The instal...
<|file_name|>world.rs<|end_file_name|><|fim▁begin|>use crate::{ ai, animations, components, desc, flags::Flags, item, spatial::Spatial, spec::EntitySpawn,<|fim▁hole|>use std::collections::HashSet; pub const GAME_VERSION: &str = "0.1.0"; calx_ecs::build_ecs! { anim: animations::Anim, brain: ai::Brain, ...
stats, world_cache::WorldCache, Distribution, ExternalEntity, Location, Rng, WorldSkeleton, }; use calx::seeded_rng; use serde::{Deserialize, Serialize};
<|file_name|>knowledged.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8-*- import random import re import wolframalpha import time import sys from sys import maxint from client import jarvispath WORDS = ["WHO", "WHAT", "WHERE", "HOW MUCH"] def handle(text, mic, profile): app_id=profile['keys']['WOLFRAMALPHA'...
mic.say(texts.replace("|","")) else: mic.say("Sorry, Could you be more specific?.")
<|file_name|>time.rs<|end_file_name|><|fim▁begin|>//! Utilities for mapping between human-usable time units and BAPS3's //! preferred time units. /// Enum of available time units. /// /// This does not contain every possible time unit anyone may want to use with /// a BAPS3 client, but covers the main possibilities. /...
///
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>//! # Beamium. //! //! Beamium scrap Prometheus endpoint and forward metrics to Warp10. extern crate backoff; extern crate bytes; extern crate cast; extern crate clap; extern crate core; extern crate ctrlc; extern crate flate2; extern crate futures; extern crate humanti...
"Fail to create source directory {}: {}", &config.parameters.source_dir, err );
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2019 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class StockPicking(models.Model): _inherit = 'stock.picking' default_tracking_url = fields.Char( ...
readonly=True,
<|file_name|>polynomials.rs<|end_file_name|><|fim▁begin|>use std::cmp::{max, min}; use super::range::*; /** A polynomial pseudo-solver, using Range. Returns a collection of ranges that include the exact roots. False-positives are possible. TODO: instead of Vec<Range>, these should return a stack-allocated type. *...
<|file_name|>SelectByAttribute.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ *************************************************************************** SelectByAttribute.py --------------------- Date : May 2010 Copyright : (C) 2010 by Michael Minn Email ...
def displayName(self): return self.tr('Select by attribute')
<|file_name|>FiledropperCom.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import re import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FiledropperCom(SimpleHoster): __name__ = "FiledropperCom" __type__ = "hoster" __version__ = "0.01" ...
def handleFree(self, pyfile):
<|file_name|>ImageViewHolder.java<|end_file_name|><|fim▁begin|>package com.lzy.imagepicker.adapter; import android.support.annotation.IdRes; import android.support.v7.widget.RecyclerView; import android.view.View; /** * Copyright (C) 2016,深圳市红鸟网络科技股份有限公司 All rights reserved. * 项目名称: * 类的描述: * 创建人员:Robi * 创建时间:20...
} }
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models class RiverOutfall(models.Model): name = models.TextField() lat = models.FloatField(null=True) lon = models.FloatField(null=True) class RiverCso(models.Model): river_outfall = models.ForeignKey("RiverOutfall") open_...
class LakeReversal(models.Model): lake_outfall = models.ForeignKey("LakeOutfall")
<|file_name|>tokens.py<|end_file_name|><|fim▁begin|>""" Based on :mod:`django.contrib.auth.tokens`. Supports the following settings: :setting:`WALDO_REGISTRATION_TIMEOUT_DAYS` The number of days a registration link will be valid before expiring. Default: 1. :setting:`WALDO_EMAIL_TIMEOUT_DAYS` The number of days an ...
<|file_name|>uievent.py<|end_file_name|><|fim▁begin|># # Copyright (C) 2006 - 2007 Michael 'Mickey' Lauer # Copyright (C) 2006 - 2007 Richard Purdie # # SPDX-License-Identifier: GPL-2.0-only # """ Use this class to fork off a thread to recieve event callbacks from the bitbake server and queue them for the UI to proc...
self.server.timeout = 1
<|file_name|>ScanResults.java<|end_file_name|><|fim▁begin|>/** * Copyright 2017 LinkedIn Corp. 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.apach...
logSegmentLastBucketTimeMs = logSegmentBuckets.lastKey(); logSegmentForecastEndTimeMs = logSegmentLastBucketTimeMs + bucketSpanInMs; }
<|file_name|>extract.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel....
... ('**.py', 'python') ... ]
<|file_name|>FirstPersonControls.js<|end_file_name|><|fim▁begin|>/** * @author mrdoob / http://mrdoob.com/ * @author alteredq / http://alteredqualia.com/ * @author paulirish / http://paulirish.com/ */ THREE.FirstPersonControls = function ( object, domElement ) { if ( domElement === undefined ) { console.warn(...
this.heightMax = 1.0; this.constrainVertical = false;
<|file_name|>xccdf2csv_stig_module.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import sys import csv import lxml.etree as ET # This script creates a CSV file from an XCCDF file formatted in the # structure of a STIG. This should enable its ingestion into VMS, # as well as its comparison with VMS output. xccdf...
<|file_name|>css_types.py<|end_file_name|><|fim▁begin|>"""CSS selector structure items.""" import copyreg from collections.abc import Hashable, Mapping __all__ = ( 'Selector', 'SelectorNull', 'SelectorTag', 'SelectorAttribute', 'SelectorContains', 'SelectorNth', 'SelectorLang', ...
super(SelectorLang, self).__init__( languages=tuple(languages)
<|file_name|>generated_expansion.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE...
package v1alpha1 type APIServiceExpansion interface{}
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>use rustc_serialize::json::DecoderError; use rustc_serialize::base64::FromBase64Error; use self::VaultError::*; /// Various errors for vault operations #[derive(Debug)] pub enum VaultError { /// If the vault is corrupted, we may not be able to read the base64 enco...
Base64Error(FromBase64Error), /// This happens when the data in the vault is valid, but does not match the vault type VaultEntrySchemaError(DecoderError), /// When the decrypted data is not valid JSON
<|file_name|>webXRInputSource.ts<|end_file_name|><|fim▁begin|>import { Observable } from "../Misc/observable"; import { AbstractMesh } from "../Meshes/abstractMesh"; import { Quaternion, Vector3 } from "../Maths/math.vector"; import { Ray } from "../Culling/ray"; import { Scene } from "../scene"; import { WebXRAbs...
if (pose) {
<|file_name|>ImmuLoaderOfMemberLogin.java<|end_file_name|><|fim▁begin|>/* * Copyright 2004-2013 the Seasar Foundation and the Others. * * 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...
<|file_name|>contrib-sass.js<|end_file_name|><|fim▁begin|>module.exports = function(grunt) { grunt.config.set('sass', { options: { loadPath: 'src/styles'<|fim▁hole|> dev: { files: { 'build/dist/styles.css': 'build/tmp/styles.scss' } }, ...
},
<|file_name|>test_exceptions.py<|end_file_name|><|fim▁begin|>from django.template import TemplateDoesNotExist, TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup from .test_extends import inheritance_templates class ExceptionsTests(SimpleTestCase): @setup({'exception01...
"{% block first %}2{% endblock %}{% extends 'inheritance16' %}"}, inheritance_templates, ) def test_exception03(self):
<|file_name|>33.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Title:大幂次运算 # 给你两个正整数a(0 < a < 100000)和n(0 <= n <=100000000000),计算(a^n) % 20132013并输出结果 import math<|fim▁hole|>a,n =10000,10000000 # Answer ret = 1 #余数 def PowerMod(a, n, ret): if n == 0: return ret if n % 2: # n为奇数...
# Test
<|file_name|>react-apollo.js<|end_file_name|><|fim▁begin|>declare module "react-apollo" { declare function graphql(query: Object, options: Object): Function;<|fim▁hole|><|fim▁end|>
}
<|file_name|>tree_generator.py<|end_file_name|><|fim▁begin|># tree_generator was written with Python 2.7.4. # The pickle files it produces should not be read with a version of # Python less than 2.7.4, as they are not forwards compatible. from piece_definitions import PIECES import numpy as np import sys import collect...
# vars = globals().copy() # vars.update(locals()) # shell = code.InteractiveConsole(vars) # shell.interact()
<|file_name|>DeinterlacerMode.java<|end_file_name|><|fim▁begin|>/* * Copyright 2014-2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located a...
*/ package com.amazonaws.services.mediaconvert.model;
<|file_name|>config.py<|end_file_name|><|fim▁begin|><|fim▁hole|>## ## This file is part of wfrog ## ## wfrog is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## (at yo...
## Copyright 2009 Laurent Bovet <laurent.bovet@windmaster.ch> ## Jordi Puigsegur <jordi.puigsegur@gmail.com>
<|file_name|>storage_profile_py3.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Co...
disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). :type data_disks: list[~azure....
<|file_name|>test_merge.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 TiKV Project Authors. Licensed under Apache-2.0. use std::iter::*; use std::sync::atomic::Ordering; use std::sync::*; use std::thread; use std::time::*; use kvproto::kvrpcpb::Context; use kvproto::raft_cmdpb::CmdType; use kvproto::raft_serverpb...
// make the source peer's commit index can't be updated by MsgHeartbeat.
<|file_name|>crc32.rs<|end_file_name|><|fim▁begin|>//! Helper module to compute a CRC32 checksum use std::io; use std::io::prelude::*; static CRC32_TABLE : [u32; 256] = [ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, ...
impl<R: Read> Read for Crc32Reader<R>
<|file_name|>MessengerProtocol.java<|end_file_name|><|fim▁begin|>/* * MessengerProtocol.java * * Herald, An Instant Messenging Application * * Copyright © 2000 Chad Gibbons * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as publi...
public final static String ERR_SERVER_BUSY = "600"; public final static String ERR_SERVER_UNAVAILABLE = "601"; public final static String ERR_PERR_NS_DOWN = "601"; public final static String ERR_DB_CONNECT = "603";
<|file_name|>aliveim_test.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" "io" "net/http" "net/http/httptest" "net/url" "strings" "testing" "time" "github.com/stretchr/testify/assert" ) type nopCloser struct { io.Reader } func (nopCloser) Close() error { return nil } var ( server *htt...
<|file_name|>signer.go<|end_file_name|><|fim▁begin|>package goverify import ( "crypto/rsa" "fmt" ) // A Signer is can create signatures that verify against a public key. type Signer interface { // Sign returns raw signature for the given data. This method // will apply the hash specified for the keytype to the da...
var sshKey Signer
<|file_name|>mayaxes.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Tue May 28 12:20:59 2013 === MAYAXES (v1.1) === Generates a set of MayaVI axes using the mayavi.mlab.axes() object with a white background, small black text and a centred title. Designed to better mimic MATLAB style plots. ...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, Extension #from distutils.core import setup, Extension module1 = Extension('giscup15', sources = ['giscup15.cpp'], extra_compile_args=['-std=c++11'],<|fim▁hole|> setup (name = 'giscup15', ver...
libraries=['shp'])
<|file_name|>test_data_source.py<|end_file_name|><|fim▁begin|># # 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...
<|file_name|>sigopt_example.py<|end_file_name|><|fim▁begin|>"""This example demonstrates the usage of SigOpt with Ray Tune. It also checks that it is usable with a separate scheduler. """ import sys import time from ray import tune from ray.tune.schedulers import AsyncHyperBandScheduler from ray.tune.suggest.sigopt i...
def evaluate(step, width, height): return (0.1 + width * step / 100) ** (-1) + height * 0.01
<|file_name|>api.py<|end_file_name|><|fim▁begin|># The MIT License # # Copyright (c) 2008 William T. Katz # # 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 without restriction, including with...
# Why not JSON? self.success(event.rest(self.base_url(version)))
<|file_name|>psllq.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode}; use ::RegType::*; use ::instruction_def::*; use ::Operand::*; use ::Reg::*; use ::RegScale::*; fn psllq_1() { run_test(&Instruction { mnemonic: Mnemonic::PSLLQ, opera...
fn psllq_5() { run_test(&Instruction { mnemonic: Mnemonic::PSLLQ, operand1: Some(Direct(MM3)), operand2: Some(Direct(MM7)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[15, 243, 223], OperandSize::Dword)
<|file_name|>partnerclient-plan-test.js<|end_file_name|><|fim▁begin|>import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; module('Unit | Model | partner partnerclient plan', function(hooks) {<|fim▁hole|> test('it exists', function(assert) { let store = this.owner.lookup('service:store');...
setupTest(hooks); // Replace this with your real tests.
<|file_name|>create_mapping_on_deploy.py<|end_file_name|><|fim▁begin|>import argparse import structlog import logging from pyramid.paster import get_app from snovault.elasticsearch.create_mapping import run as run_create_mapping from dcicutils.log_utils import set_logging from dcicutils.deployment_utils import CreateM...
'WorkflowMapping',
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PerlSubIdentify(PerlPackage): """Retr...
url = "http://search.cpan.org/CPAN/authors/id/R/RG/RGARCIA/Sub-Identify-0.14.tar.gz"
<|file_name|>NetWkstaInfo1059.py<|end_file_name|><|fim▁begin|># encoding: utf-8 # module samba.dcerpc.wkssvc # from /usr/lib/python2.7/dist-packages/samba/dcerpc/wkssvc.so # by generator 1.135 """ wkssvc DCE/RPC """ # imports import dcerpc as __dcerpc import talloc as __talloc class NetWkstaInfo1059(__talloc.Object)...
<|file_name|>gpu_declarations.hpp<|end_file_name|><|fim▁begin|>#pragma once #include <Poco/Types.h> namespace Burst { struct CalculatedDeadline { Poco::UInt64 deadline; Poco::UInt64 nonce; }; enum class MemoryType { Buffer, Gensig, Deadlines,<|fim▁hole|> enum class MemoryCopyDirection { ToHost, ...
Bytes };
<|file_name|>juce_win32_Midi.cpp<|end_file_name|><|fim▁begin|>/* ============================================================================== This file is part of the JUCE library. Copyright (c) 2020 - Raw Material Software Limited JUCE is an open source library subject to commercial or open-source li...
return attach (deviceSelector, DeviceInformationKind::DeviceInformationKind_DeviceInterface); }