prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>chan8.go<|end_file_name|><|fim▁begin|>package main func main() { messages := make(chan bool) go func() { messages <- true }() println(<-messages && true) } // Output:<|fim▁hole|><|fim▁end|>
// true
<|file_name|>bitv-perf-test.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT<|fim▁hole|>// http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LI...
// file at the top-level directory of this distribution and at
<|file_name|>lint-unnecessary-parens.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.ap...
}
<|file_name|>S11.4.5_A2.2_T1.js<|end_file_name|><|fim▁begin|>// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /** * Operator --x uses [[Default Value]] * * @path ch11/11.4/11.4.5/S11.4.5_A2.2_T1.js * @description If Type(value) is O...
//CHECK#2
<|file_name|>PDroneCreator.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, absolute_import import weakref class PDroneCreator(object): def __init__(self, mainwindow, clipboard, title="drones"): self._mainwindow = mainwindow self._clipboard = clipboard self._subwin =...
self._tree.append(key)
<|file_name|>MatrixFactory.java<|end_file_name|><|fim▁begin|>package com.odcgroup.page.model.widgets.matrix.impl; import com.odcgroup.page.metamodel.MetaModel; import com.odcgroup.page.metamodel.WidgetLibrary; import com.odcgroup.page.metamodel.WidgetTemplate; import com.odcgroup.page.metamodel.util.MetaModelRegistry;...
@Override public IMatrixContentCellItem adaptMatrixContentCellItemWidget(Widget widget) { if (!WIDGETTYPE_MATRIXCONTENTCELLITEM.equalsIgnoreCase(widget.getTypeName())) {
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration val...
# Custom sidebar templates, maps document names to template names. #html_sidebars = {}
<|file_name|>wrapper.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/. */ use dom::bindings::reflector::DomObject; use dom::bindings::r...
use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec}; /// Trait used internally by WebGLExtensions to store and
<|file_name|>deployed_stateful_service_replica_info.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 ...
self.replica_role = replica_role self.ServiceKind = 'Stateful'
<|file_name|>after.rs<|end_file_name|><|fim▁begin|>use wtest_basic::dependencies::*; #[cfg( feature = "in_wtools" )] use wtools::former::Former; #[cfg( not( feature = "in_wtools" ) )] use former::Former; #[ derive( Debug, PartialEq, Former ) ] #[ form_after( fn after1< 'a >() -> Option< &'a str > ) ] pub struct Struc...
{ fn after1< 'a >( &self ) -> Option< &'a str >
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup setup( name = 'srht', packages = ['srht'], version = '1.0.0',<|fim▁hole|> author = 'Drew DeVault', author_email = 'sir@cmpwn.com', url = 'https://github.com/SirCmpwn/sr.ht', download_url = '', keywords = [], classifiers...
description = 'sr.ht services',
<|file_name|>tinkerpop.py<|end_file_name|><|fim▁begin|>import asyncio import unittest import random from gremlinpy import Gremlin from . import ConnectionTestCases, EntityTestCases, MapperTestCases from gizmo import Mapper, Request, Collection, Vertex, Edge from gizmo.mapper import EntityMapper class BaseTests(unit...
return res
<|file_name|>dm_eval.py<|end_file_name|><|fim▁begin|>import os import aiohttp import random import string import asyncio import shutil import re from threading import Thread from io import BytesIO from zipfile import ZipFile from discord.ext import commands from core import BotError DEFAULT_MAJOR = "512" DEFAULT_MIN...
if fname.endswith(".rsc"): raise BotError("Resource file detected. Execution aborted.", "validate_compile") elif fname.endswith(".dmb"):
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md> //! FFI bindings to mfplat. #![no_std] #![experimental] extern crate winapi;<|fim▁hole|>extern "system" { }<|fim▁end|>
use winapi::*;
<|file_name|>lexer.py<|end_file_name|><|fim▁begin|>try: from pygments.lexer import bygroups, include, using from pygments.lexers.agile import PythonLexer, PythonTracebackLexer from pygments.token import Text, Name, Number, Generic, String, Operator except ImportError: # pragma: no cover # this is for n...
"frame"), ], "exception": [ (r"^(AssertionError: )(.+\n)", bygroups(Generic.Error,
<|file_name|>TranslatedInstanceStatus.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react' import { Link, RouteComponentProps } from 'react-router-dom' import { Dic, classes } from '@framework/Globals' import { JavascriptMessage } from '@framework/Signum.Entities' import { API, TranslatedTypeSummary } fr...
</div> <small>Select a .xlsx file with the translations</small> </div>
<|file_name|>util.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 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-2.0 Unless re...
if err != nil { Logf("Failed to list nodes: %v", err)
<|file_name|>ListBootstrapActionsRequestMarshaller.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...
public static ListBootstrapActionsRequestMarshaller getInstance() { return instance;
<|file_name|>factories.py<|end_file_name|><|fim▁begin|>''' Created on 22/02/2015 @author: Ismail Faizi ''' import models class ModelFactory(object): """ Factory for creating entities of models """ @classmethod def create_user(cls, name, email, training_journal): """ Factory meth...
@classmethod
<|file_name|>mod.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/. */ //! Adapter for `WebPush`. //! //! Implemented as described in th...
<|file_name|>login_enforcement.py<|end_file_name|><|fim▁begin|># coding=utf-8 # # Copyright 2017 F5 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 # # http://www.apache.org/...
from f5.sdk_exception import UnsupportedOperation
<|file_name|>server.js<|end_file_name|><|fim▁begin|>import Express from 'express'; import compression from 'compression'; import mongoose from 'mongoose'; import bodyParser from 'body-parser'; import path from 'path'; import morgan from 'morgan'; //import jwt from 'jsonwebtoken'; import IntlWrapper from '../client/mod...
${head.script.toString()}
<|file_name|>movemant.rs<|end_file_name|><|fim▁begin|>extern crate ggez; extern crate rand; use rand::Rng; use ggez::graphics::{Point}; use ::MainState; #[derive(Clone)] pub struct Rabbit{ pub x:i32,<|fim▁hole|>pub fn rabbits_run (tself:&mut MainState){ let mut next_rabbits = Vec::new(); for obj in tself.rabbits_ha...
pub y:i32, pub point:Point, }
<|file_name|>test.py<|end_file_name|><|fim▁begin|>############################################################################ # # Copyright (C) 2016 The Qt Company Ltd. # Contact: https://www.qt.io/licensing/ # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt lice...
# information use the contact form at https://www.qt.io/contact-us. #
<|file_name|>datastore_loader.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """Process that loads the datastore""" __author__ = 'Michael Meisinger, Thomas Lennan' """ Possible Features - load objects into different datastores - load from a directory of YML files in ion-definitions - load from a ZIP of YMLs -...
<|file_name|>base.py<|end_file_name|><|fim▁begin|>"""Base test class for nbconvert""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import io import os import glob import shlex import shutil import sys import unittest import nbconvert from subprocess import Popen...
<|file_name|>p074.rs<|end_file_name|><|fim▁begin|>//! [Problem 74](https://projecteuler.net/problem=74) solver. #![warn( bad_style, unused, unused_extern_crates, unused_import_braces, unused_qualifications, unused_results )] use std::collections::HashMap; #[derive(Clone)] enum Length { Lo...
<|file_name|>rabbitmq.go<|end_file_name|><|fim▁begin|>package collectors import ( "encoding/json" "fmt" "net/http" "net/url" "strings" "bosun.org/metadata" "bosun.org/opentsdb" ) var ( rmqQueueStatusMap = map[string]int{ "running": 0, "syncing": 1, "flow": 2, "idle": 3, "down": 4, } ) co...
<|file_name|>TransformationService.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2013-2019 52°North Initiative for Geospatial Open Source * Software GmbH * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published * ...
<|file_name|>wrapper.rs<|end_file_name|><|fim▁begin|>use std::fmt; pub struct Wrapper(pub Vec<String>); impl fmt::Display for Wrapper {<|fim▁hole|> write!(f, "[{}]", self.0.join(", ")) } }<|fim▁end|>
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<|file_name|>HistoryItem.java<|end_file_name|><|fim▁begin|>package cz.vutbr.fit.xfekia00; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.LinkedList; /** * jedno vykonanie skriptu sa uklada ako polozka historie * @author Filip Fekiac */ public class HistoryItem { private final St...
} public void addResultItem(int pos, String[][] _item) {
<|file_name|>initialization.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 Google LLC // // 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-...
document_symbol_provider: None,
<|file_name|>test_smartos.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013 Canonical Ltd. # Copyright 2019 Joyent, Inc. # # Author: Ben Howard <ben.howard@canonical.com> # # This file is part of cloud-init. See LICENSE file for license information. '''This is a testcase for the SmartOS datasource. It replicates a...
<|file_name|>AuthRoutes.ts<|end_file_name|><|fim▁begin|>import express = require("express"); import passport = require('passport'); import jwt = require('express-jwt'); import AuthController = require("../../controllers/AuthController"); import IUser = require('../../app/model/interfaces/IUser'); import User = require...
constructor() {
<|file_name|>askpassphrasedialog.cpp<|end_file_name|><|fim▁begin|>#include "askpassphrasedialog.h" #include "ui_askpassphrasedialog.h" #include "guiconstants.h" #include "walletmodel.h" #include <QMessageBox> #include <QPushButton> #include <QKeyEvent> AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *par...
tr("The supplied passphrases do not match.")); }
<|file_name|>V8File.cpp<|end_file_name|><|fim▁begin|>/* This file is part of the WebKit open source project. This file has been generated by generate-bindings.pl. DO NOT MODIFY! This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public ...
<|file_name|>karaoke.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: iso-8859-15 -*- from xml.sax import make_parser from xml.sax.handler import ContentHandler import smallsmilhandler import sys import os class KaraokeLocal(smallsmilhandler.SmallSMILHandler): def __init__(self, fich): pa...
if clave == "src": recurso = diccionarios[clave] os.system("wget -q " + recurso) list_recurso = recurso.split("/")
<|file_name|>0050_auto_20160710_0431.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-07-10 07:31 from __future__ import unicode_literals<|fim▁hole|> class Migration(migrations.Migration): dependencies = [ ('person', '0049_patient_photo'), ] operations = ...
from django.db import migrations
<|file_name|>ImageSizes.java<|end_file_name|><|fim▁begin|>/* * The MIT License<|fim▁hole|> * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and...
* * Copyright 2016 Matthias. * * Permission is hereby granted, free of charge, to any person obtaining a copy
<|file_name|>cache-backer-test.ts<|end_file_name|><|fim▁begin|>// MIT © 2016 azu "use strict"; import assert from "assert"; import path from "path"; import os from "os"; import sh from "shelljs"; import fs from "fs"; import { CacheBacker } from "../../src/engine/execute-file-backers/cache-backer";<|fim▁hole|>import { T...
import { Config } from "../../src/config/config";
<|file_name|>formatDate.test.ts<|end_file_name|><|fim▁begin|>import { formatDistance, formatToLocaleString, defaultEnvironment, Environment } from './formatDate' import { subDays } from 'date-fns' import { ja, enUS } from 'date-fns/locale' // memo(otofune): This requires that process.env.TZ equals to 'UTC'. (;;) cons...
languageSpy = jest.spyOn(window.navigator, 'language', 'get') })
<|file_name|>XmlParser.java<|end_file_name|><|fim▁begin|>/* * NOTE: This copyright does *not* cover user programs that use HQ * program services by normal system calls through the application * program interfaces provided as part of the Hyperic Plug-in Development * Kit or the Hyperic Client Development Kit - this ...
} }
<|file_name|>som.py<|end_file_name|><|fim▁begin|>""" SOM-based learning functions for CFProjections. """ from math import ceil import param from imagen import PatternGenerator, Gaussian from holoviews import BoundingBox from topo.base.arrayutil import L2norm, array_argmax from topo.base.cf import CFPLearningFn ###...
<|file_name|>writer.rs<|end_file_name|><|fim▁begin|>//! Writer traits. pub use genet_abi::writer::{Metadata, Worker, Writer}; #[doc(hidden)] pub use genet_abi::writer::WriterBox; /// Registers writer entries. #[macro_export] macro_rules! genet_writers { ( $( $x:expr ), * ) => { thread_local! { ...
)*
<|file_name|>client_test.go<|end_file_name|><|fim▁begin|>package task import ( "context" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" ) type fakeClient struct {<|fim▁hole|> client.APIClient nodeInspectWithRaw func(ref string) (swarm.Node, [...
<|file_name|>script.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 Museum Victoria # This software is released under the MIT license (see license.txt for details) from Queue import * import threading import atexit remote_action_PowerOn = RemoteAction() remote_action_PowerOff = RemoteAction() remote_action_SetIn...
<|file_name|>msvc.py<|end_file_name|><|fim▁begin|>"""engine.SCons.Tool.msvc Tool-specific initialization for Microsoft Visual C/C++. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # __COPYRIGHT__ # # Perm...
def static_object_emitter(target, source, env):
<|file_name|>H5Group.cpp<|end_file_name|><|fim▁begin|>/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. ...
* This file is part of HDF5. The full HDF5 copyright notice, including *
<|file_name|>test_array.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Test fff_array wrapping # from numpy.testing import assert_almost_equal, assert_equal import numpy as np import nipy.neurospin.bindings as fb MAX_TEST_SIZE = 30 def random_shape(size): """<|fim▁hole|> return aux else: ...
Output random dimensions in the range (2, MAX_TEST_SIZE) """ aux = np.random.randint(MAX_TEST_SIZE-1, size=size) + 2 if size==1:
<|file_name|>style.tsx<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2021 Charles University in Prague, Faculty of Arts, * Institute of the Czech National Corpus * Copyright (c) 2021 Martin Zimandl <martin.zimandl@gmail.com> * * This program is free software; you can redistribute it and/or * ...
import styled from 'styled-components';
<|file_name|>intrinsics.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 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/lice...
/// Drop glue is not run on the destination.
<|file_name|>Message.js<|end_file_name|><|fim▁begin|>var mongoose = require('mongoose'), _ = require('underscore'), roomTokenizer = function(msg) { var tokens = []; tokens = tokens.concat(msg.content.split(' ')); tokens.push(msg.author); return tokens; }; exports.init = func...
avatar: String },
<|file_name|>attrs-with-no-formal-in-generics-3.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 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 // ht...
// This test checks variations on `<#[attr] 'a, #[oops]>`, where // `#[oops]` is left dangling (that is, it is unattached, with no // formal binding following it).
<|file_name|>ru_RU.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS><TS version="2.0" language="ru_RU" sourcelanguage=""> <context> <name>Form</name> <message> <location filename="loop.ui" line="14"/> <source>Form</source> <translation type="unfinished"...
<message> <location filename="general_widget.ui" line="331"/>
<|file_name|>calendar-pt_BR.utf8.js<|end_file_name|><|fim▁begin|>// ** I18N <|fim▁hole|>// Calendar pt-BR language // Author: Fernando Dourado, <fernando.dourado@ig.com.br> // Encoding: any // Distributed under the same terms as the calendar itself. // For translators: please use UTF-8 if possible. We strongly belie...
<|file_name|>event-attendance.ts<|end_file_name|><|fim▁begin|>import {<|fim▁hole|>import { DatabaseField } from "../../../core/entity/database-field.decorator"; /** * Simple relationship object to represent an individual child's status at an event including context information. */ export class EventAttendance { pr...
ATTENDANCE_STATUS_CONFIG_ID, AttendanceStatusType, NullAttendanceStatusType, } from "./attendance-status";
<|file_name|>array.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export { default } from 'ember-transformer/transforms/array';
<|file_name|>filter_scheduler.py<|end_file_name|><|fim▁begin|># Copyright (c) 2011 Intel Corporation # Copyright (c) 2011 OpenStack, LLC. # 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 # ...
request_spec,
<|file_name|>QtApplication.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. import sys import os import signal import platform from PyQt5.QtCore import Qt, QObject, QCoreApplication, QEvent, pyqtSlot, QLocale, QTranslator, QLibraryInfo,...
engineCreatedSignal = Signal() def isShuttingDown(self):
<|file_name|>index_test.js<|end_file_name|><|fim▁begin|>/* eslint-disable func-names */ const { sampleUrls, shortSampleUrls, E2E_WAIT_TIME: WAIT_TIME, E2E_PRESENT_WAIT_TIME: PRESENT_WAIT_TIME } = require('../e2e_helper'); module.exports = { after(browser) { browser.end(); }, 'Go to top page': brows...
.index() .click('@nextButton') .waitForElementNotPresent('a.playlist-content:nth-child(5)', PRESENT_WAIT_TIME) // dequeue .assert.elementPresent('@pauseButton')
<|file_name|>types.rs<|end_file_name|><|fim▁begin|>#[derive(Clone, Serialize)] pub struct ClanStats { pub tag: String, pub name: String, pub color: String, pub members: usize, pub description: String, pub motto: String, pub id: String, pub emblems: ClanStatsEmblems, pub blocked: bool, pub stats: HistoryClanSt...
pub gm_elo8: u32, pub gm_elo10: u32, pub fb_elo: u32, pub fb_elo6: u32,
<|file_name|>bf.rs<|end_file_name|><|fim▁begin|>use std::io::{self, Stdout, StdoutLock, Write}; use std::net::TcpStream; use std::{env, fs, process}; enum Op { Dec, Inc, Prev, Next, Loop(Box<[Op]>), Print, } struct Tape { pos: usize, tape: Vec<i32>, } impl Tape { fn new() -> Self ...
if p.quiet {
<|file_name|>application-manager-base.ts<|end_file_name|><|fim▁begin|>import { EventEmitter } from "events"; import { TARGET_FRAMEWORK_IDENTIFIERS } from "../constants"; export abstract class ApplicationManagerBase extends EventEmitter implements Mobile.IDeviceApplicationManager { private lastInstalledAppIdentifiers:...
public async restartApplication(appData: Mobile.IApplicationData): Promise<void> { await this.stopApplication(appData);
<|file_name|>index.test.js<|end_file_name|><|fim▁begin|>import SuccessPage from '../index'; import expect from 'expect'; import { shallow } from 'enzyme'; import React from 'react'; describe('<SuccessPage />', () => {<|fim▁hole|><|fim▁end|>
});
<|file_name|>time-value-maximum-range.js<|end_file_name|><|fim▁begin|>// Copyright (C) 2018 Andrew Paprocki. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- esid: sec-date.parse es6id: 20.3.3.2 description: > Date.parse return value is limited to specified time value...
within a millisecond. Such a Number is called a time value. The actual range of times supported by ECMAScript Date objects is slightly smaller: exactly -100,000,000 days to 100,000,000 days measured relative to
<|file_name|>datcomEventManager.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # 正处于设计开发阶段 from PyQt5 import QtCore class datcomEvent(QtCore.QEvent): """ 自定义的Datcom事件系统 """ dtTypeID = QtCore.QEvent.registerEventType() def __init__(self, type = dtTypeID): """ 构造函数 ...
""" 注册中心的模型
<|file_name|>package.js<|end_file_name|><|fim▁begin|>// package metadata file for Meteor.js 'use strict'; var packageName = 'gromo:jquery.scrollbar'; // https://atmospherejs.com/mediatainment/switchery var where = 'client'; // where to install: 'client' or 'server'. For both, pass nothing. Package.describe({ name...
Package.onTest(function (api) {
<|file_name|>clock_6_clock_stopped.py<|end_file_name|><|fim▁begin|>clock.addListener("clockStopped", "python", "clock_stopped")<|fim▁hole|> def clock_stopped(): print("The clock has been stopped")<|fim▁end|>
<|file_name|>spelling.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2007 Zuza Software Foundation # 2013 F Wolff # # This file is part of translate. # # translate is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
<|file_name|>package_graph.rs<|end_file_name|><|fim▁begin|>use crate::{error::Result, hcore::{fs as hfs, package::{self, ident::PackageIdent, PackageInstall}}}; use bimap::BiMap; use petgraph::{self, graph::NodeIn...
package_deps(c.clone(), &[b.clone()]),
<|file_name|>init.js<|end_file_name|><|fim▁begin|>/* *name:dtt *time:2014.12.01 *content:注册页 */ seajs.config({ // 别名配置 alias: { 'head':'../../../../module/head/js/init.js', 'service':'../../../../module/service/js/init.js', 'rightTips':'../../../../module/rightTips/js/init.js', 'dialog':'../.....
case "10": fnbreak($form.find("input[name='password']"),"密码格式错误"); break; case "5":
<|file_name|>vi_insert.rs<|end_file_name|><|fim▁begin|>//! Vi insert mode specific key bindings<|fim▁hole|> #[test] fn insert_mode_by_default() { assert_cursor(EditMode::Vi, ("", ""), &[E::from('a'), E::ENTER], ("a", "")); } #[test] fn ctrl_h() { assert_cursor( EditMode::Vi, ("Hi", ""), ...
use super::assert_cursor; use crate::config::EditMode; use crate::keys::KeyEvent as E;
<|file_name|>common.js<|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 ...
} /** * function used for opening Data View
<|file_name|>datastore_errors.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2007 Google 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 # # http://www.apache.or...
class BadArgumentError(Error): """Raised by Query.Order(), Iterator.Next(), and others when they're
<|file_name|>coercion.rs<|end_file_name|><|fim▁begin|>// run-pass #![allow(dead_code)] #![allow(unused_mut)] #![allow(unused_variables)] use std::io::{self, Write}; trait Trait { fn f(&self); } #[derive(Copy, Clone)] struct Struct { x: isize, y: isize, } impl Trait for Struct { fn f(&self) { ...
<|file_name|>token.rs<|end_file_name|><|fim▁begin|>#[derive(PartialEq, Eq, Copy, Debug, Clone, Hash)] pub enum StringLiteralKind { Normal, Raw, } #[derive(PartialEq, Eq, Copy, Debug, Clone, Hash)] pub enum BinOpKind { Plus, Minus, Star, Slash, Percent, Caret, And, Or, Shl, ...
// reserved Alignof,
<|file_name|>replicate_test.go<|end_file_name|><|fim▁begin|>// Copyright 2016 The Cockroach 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/licens...
// path that occurs after splits. store.SetReplicaScannerActive(false) // Enable the split queue and force a scan and process. store.SetSplitQueueActive(true)
<|file_name|>thread.rs<|end_file_name|><|fim▁begin|>// Testing the the display of JoinHandle and Thread in cdb. // cdb-only // min-cdb-version: 10.0.18317.1001 // compile-flags:-g // === CDB TESTS ================================================================================== // // cdb-command:g // // cdb-command:...
// cdb-command:dx t,d // cdb-check:t,d : [...] [Type: std::thread::Thread *] // cdb-check: [...] inner : {...} [Type: alloc::sync::Arc<std::thread::Inner>]
<|file_name|>SOCKS5.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
../../../../../../share/pyshared/papyon/gnet/proxy/SOCKS5.py
<|file_name|>retext.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # ReText # Copyright 2011-2012 Dmitry Shachnev # 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 th...
<|file_name|>pubsub.py<|end_file_name|><|fim▁begin|>""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2011 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ import logging from sleekxmpp.xmlstream import JID from sleekxmpp.xmlstream.handler import ...
block -- Specify if the send call will block until a response
<|file_name|>thumb-down.js<|end_file_name|><|fim▁begin|>import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionThumbDown = (props) => ( <SvgIcon {...props}> <path d="M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v1.91l.01.01L1 14c0 1.1.9 2 2...
</SvgIcon> ); ActionThumbDown = pure(ActionThumbDown);
<|file_name|>bankaccess.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- class BankAccess(object): def __init__(self): self.pendingUids = {} pass<|fim▁hole|><|fim▁end|>
def get(self, uid):
<|file_name|>MLCRMSPropOptimizer.java<|end_file_name|><|fim▁begin|>package apple.mlcompute; import apple.NSObject; import apple.foundation.NSArray; import apple.foundation.NSMethodSignature; import apple.foundation.NSSet; import apple.foundation.protocol.NSCopying; import org.moe.natj.c.ann.FunctionPtr; import org.moe...
@Generated
<|file_name|>webhcat_server.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 Apache...
<|file_name|>viewEvents.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *-------...
ViewTokensChanged = 15, ViewTokensColorsChanged = 16,
<|file_name|>skeinlayer.py<|end_file_name|><|fim▁begin|>""" This page is in the table of contents. Skeinlayer is an analyze viewer to display each layer of a gcode file. The skeinlayer manual page is at: http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Skeinlayer Skeinlayer is derived from Nophead's preview sc...
def getDrawnSelectedColoredLine(self, coloredLine): "Get the drawn selected colored line." return self.getDrawnColoredLine(coloredLine, 'selection_line', self.repository.widthOfSelectionThread.value)
<|file_name|>006_dns_records.py<|end_file_name|><|fim▁begin|># Copyright 2011 OpenStack Foundation # 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 # # ...
<|file_name|>manipulators.py<|end_file_name|><|fim▁begin|>class Manipulator(object):<|fim▁hole|> SEPERATOR="$" def __call__(self, txt, **kwargs): data = {} splitted = txt.split("$") for kind, part in zip(self.KINDS, splitted): data[kind]=part for info, new_value ...
KINDS=()
<|file_name|>security.py<|end_file_name|><|fim▁begin|>import re from django.conf import settings from django.http import HttpResponsePermanentRedirect class SecurityMiddleware(object): def __init__(self): self.sts_seconds = settings.SECURE_HSTS_SECONDS self.sts_include_subdomains = settings.SECUR...
response["strict-transport-security"] = sts_header
<|file_name|>match-pattern-lit.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.o...
<|file_name|>test_select.rs<|end_file_name|><|fim▁begin|>use nix::sys::select::*; use nix::unistd::{pipe, write}; use nix::sys::signal::SigSet; use nix::sys::time::{TimeSpec, TimeValLike}; #[test] pub fn test_pselect() { let _mtx = ::SIGNAL_MTX .lock() .expect("Mutex got poisoned by another test");...
<|file_name|>MarkerService.test.ts<|end_file_name|><|fim▁begin|>const mockMark = jest.fn();<|fim▁hole|> unmark: mockUnmark, })); import { MarkerService } from '../MarkerService'; describe('Marker service', () => { let marker: MarkerService; const element = document.createElement('span'); beforeEach(() => { ...
const mockUnmark = jest.fn(); jest.mock('mark.js', () => () => ({ mark: mockMark,
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>from django.contrib.auth import get_user_model User = get_user_model() from rest_framework import serializers from nodeshot.core.base.serializers import ModelValidationSerializer from nodeshot.community.profiles.serializers import ProfileRelationSerializer fro...
read_only_fields = ('added',) class ParticipationSerializer(serializers.ModelSerializer):
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os<|fim▁hole|>if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "quickly.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys...
import sys
<|file_name|>build.js<|end_file_name|><|fim▁begin|>import ApplicationSerializer from './application'; export default ApplicationSerializer.extend({ normalize: function(type, hash) { delete hash['author_email']; delete hash['author_name']; delete hash['branch']; delete hash['committed_at']; delete...
});
<|file_name|>app.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('showcase', [ 'showcase.angularWay', 'showcase.angularWay.withOptions', 'showcase.withAjax', 'showcase.withOptions', 'showcase.withPromise', 'showcase.angularWay.dataChange', 'showcase.bindAngularDirective', '...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use std::sync::mpsc::{channel, TryRecvError}; use *; mod support; use self::support::*; fn unselect<T, U, E>(r: Result<(T, U), (E, U)>) -> Result<T, E> { match r { Ok((t, _)) => Ok(t), Err((e, _)) => Err(e), } } #[test] fn result_smoke() { ...
assert_done(|| f_ok(1).map(|a| a + 2), ok(3)); assert_done(|| f_err(1).map(|a| a + 2), err(1));
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2008-2014 Jaap Karssenberg <jaap.karssenberg@gmail.com> # 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...
__version__ = '0.62' __url__='http://www.zim-wiki.org' __author__ = 'Jaap Karssenberg <jaap.karssenberg@gmail.com>' __copyright__ = 'Copyright 2008 - 2014 Jaap Karssenberg <jaap.karssenberg@gmail.com>'
<|file_name|>SubscriptionMovedEvent.java<|end_file_name|><|fim▁begin|>/* * Jitsi, the OpenSource Java VoIP and Instant Messaging client. * * Distributable under LGPL license. * See terms of license at gnu.org. */ package net.java.sip.communicator.service.protocol.event; import java.util.*; import net.java.sip.co...
* @return a reference to the current <tt>ContactGroup</tt> parent of * the source <tt>Contact</tt>. */ public ContactGroup getNewParentGroup()