prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>AccountName.spec.tsx<|end_file_name|><|fim▁begin|>import React from 'react'; import { mount } from 'enzyme'; import { AccountName } from './AccountName'; import { MockedProvider } from '@apollo/react-testing'; import { PublicAccount, AccountType } from '../../../common/types/graphql'; import { AccountQuery...
return new Promise(resolve => setTimeout(resolve, ms)); } const account: PublicAccount & { __typename: string } = {
<|file_name|>val.py<|end_file_name|><|fim▁begin|># val for type checking (literal or ENUM style) from pyrser import fmt from pyrser.type_system.signature import * from pyrser.type_system.type_name import * class Val(Signature): """ Describe a value signature for the language """ nvalues = 0 valuni...
def __init__(self, value, tret: str): if not isinstance(value, str): value = str(value) self.value = value
<|file_name|>utils_test.go<|end_file_name|><|fim▁begin|>package utils import ( "testing" ) func TestIsStarlarkFile(t *testing.T) { tests := []struct { filename string ok bool }{ { filename: "BUILD", ok: true, }, { filename: "BUILD.bazel", ok: true, }, { filename: "BUI...
<|file_name|>projecteuler6.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*- #The sum of the squares of the first ten natural numbers is, #1² + 2² + ... + 10² = 385 #The square of the sum of the first ten natural numbers is, #(1 + 2 + ... + 10)² = 552 = 3025 #Hence the difference between the sum of the squares...
sumsquare = 0
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .image import Image from .product_category import ProductCategory from .supplier import Supplier, PaymentMethod from .product import Product from .product import ProductImage from .enum_values import EnumValues from .related_values import RelatedValues from .cu...
from .receiving import Receiving, ReceivingLine from .inventory_transaction import InventoryTransaction, InventoryTransactionLine from .purchase_order import PurchaseOrder, PurchaseOrderLine
<|file_name|>object.js<|end_file_name|><|fim▁begin|>/** * This file is part of the Unit.js testing framework. * * (c) Nicolas Tallefourtane <dev@nicolab.net> * * For the full copyright and license information, please view * the LICENSE file that was distributed with this source code * or visit {@link http://u...
}) ; });
<|file_name|>exportneuroml.py<|end_file_name|><|fim▁begin|># A file to contain exclusively dependencies of the NeuroML package. # See: # https://github.com/NeuralEnsemble/libNeuroML # http://neuroml.org from __future__ import print_function from collections import defaultdict try: from neuroml import Cell,...
<|file_name|>version.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The etcd 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....
) func init() {
<|file_name|>unix.rs<|end_file_name|><|fim▁begin|>use libc::funcs::posix88::unistd; use utsname::uname; pub fn getpid() -> u32 { unsafe { unistd::getpid() as u32 } } pub fn getos() -> (String, String, String) { let name = uname(); (name.sysname().to_owned(), name.release().to_owned(), name.machine().to_ow...
}
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.contrib.auth.models import User class IntegerRangeField(models.IntegerField): def __init__(self, verbose_name=None, name=None, min_value=None, max_value=None, **kwargs): self.min_value, self.max_value = min_value, ...
access = models.CharField(max_length=300, null=True) image = models.URLField(null=True)
<|file_name|>map.js<|end_file_name|><|fim▁begin|>import * as THREE from 'three'; import STORE from 'store'; import { MAP_WS } from 'store/websocket'; import _ from 'lodash'; import { drawSegmentsFromPoints, drawDashedLineFromPoints, drawShapeFromPoints, } from 'utils/draw'; import Text3D, { TEXT_ALIGN } from 're...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of bd808's stashbot application # Copyright (C) 2015 Bryan Davis and contributors # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as publish...
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
<|file_name|>libvirt_lxc_backend.go<|end_file_name|><|fim▁begin|>package main import ( "encoding/json" "encoding/xml" "errors" "fmt" "io" "io/ioutil" "net" "os" "path" "path/filepath" "strconv" "strings" "sync" "syscall" "time" "github.com/flynn/flynn/Godeps/_workspace/src/github.com/alexzorin/libvirt...
return err } domain = &lt.Domain{}
<|file_name|>thermo.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*- # thermo.py # Created by Francesco Porcari on 2010-09-03. # Copyright (c) 2010 Softwell. All rights reserved. # # import os from gnr.core.gnrbag import Bag import random import time cli_max = 12 invoice_max = 20 row_max = 100 sleep_time = 0...
<|file_name|>raw-stream-count.py<|end_file_name|><|fim▁begin|>import streamcorpus as sc import cuttsum.events import cuttsum.corpora from cuttsum.trecdata import SCChunkResource from cuttsum.pipeline import ArticlesResource, DedupedArticlesResource import os import pandas as pd from datetime import datetime from collec...
# dt = datetime.utcfromtimestamp(row["hour"])
<|file_name|>add.rs<|end_file_name|><|fim▁begin|>#![feature(core)] extern crate core; #[cfg(test)] mod tests { use core::num::Wrapping; use core::ops::Add; // macro_rules! wrapping_impl { // ($($t:ty)*) => ($( // #[stable(feature = "rust1", since = "1.0.0")] // impl Add fo...
<|file_name|>token_utils.py<|end_file_name|><|fim▁begin|>"""Utilities for working with ID tokens.""" import json from time import time from django.conf import settings from django.utils.functional import cached_property from jwkest import jwk from jwkest.jws import JWS from student.models import UserProfile, anonymou...
additional_claims (dict): Additional claims to include in the token.
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2019 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // U...
} }
<|file_name|>article-list-item-separator.js<|end_file_name|><|fim▁begin|>import React from "react"; import { View } from "react-native"; import styles from "./styles"; import { ListItemSeparator } from "./styles/responsive"; const ArticleListItemSeparator = () => ( <ListItemSeparator> <View style={styles.listIte...
export default ArticleListItemSeparator;
<|file_name|>CoinPackedMatrix.hpp<|end_file_name|><|fim▁begin|>/* $Id: CoinPackedMatrix.hpp 2083 2019-01-06 19:38:09Z unxusr $ */ // Copyright (C) 2000, International Business Machines // Corporation and others. All Rights Reserved. // This code is licensed under the terms of the Eclipse Public License (EPL). #ifndef...
same. */ void minorAppendSameOrdered(const CoinPackedMatrix &matrix); /** Append the rows of the argument to the right end of this matrix.
<|file_name|>events.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The GLFW-RS Developers. For a full listing of the authors, // refer to the AUTHORS file at the top-level directory of this distribution. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in comp...
time, character, mods
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>extern crate serde; extern crate serde_json; use std::error::Error; use std::fs::File; use std::io::prelude::*; use std::path::Path; use self::serde::de::DeserializeOwned; #[allow(dead_code)] pub fn load_doc<T>(path: &str) -> T where T: DeserializeOwned, { let...
let display = path.display();
<|file_name|>resource.py<|end_file_name|><|fim▁begin|># encoding: utf-8 # Copyright 2011 Tree.io Limited # This file is part of Treeio. # License www.tree.io/license #-*- coding: utf-8 -*- import sys import utils sys.modules['piston.utils'] = utils from piston.resource import Resource class CsrfExemptResource(Reso...
return res
<|file_name|>SHelper.hpp<|end_file_name|><|fim▁begin|>#include <iostream> #include "SParser.hpp" #pragma once namespace Silent { /*static class SymTablePrinter { public: static void Out(std::string str, uint64_t currentTab) { std::string tabs = ""; for (uint64_t ...
for(TableNode node : p->table->GetItems()) PrintNode(node, currentTab); currentTab--; }
<|file_name|>data.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Provide ways to loading molecules for the test instances. """ import os import re __license__ = 'X11' __DATA_DIRECTORY = os.path.dirname(os.path.realpath(__file__)) + '/../../data/' __DATASET_DIRECTORY = __DATA_DIRECT...
<|file_name|>test_seed.py<|end_file_name|><|fim▁begin|>from nose.tools import (assert_is_none, assert_is_instance, assert_in, assert_is_not_none, assert_true, assert_false, assert_equal) from datetime import datetime from mongoengine import connect from qirest_client.mode...
<|file_name|>scrapingUtils.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import regexUtils import re import urllib import urlparse def findJS(data): idName = '(?:f*id|ch)' jsName = '([^\"\']+?\.js[^\"\']*?)' regex = "(?:java)?scr(?:'\+')?ipt.*?" + idName + "\s*=\s*[\"']([^\"']+)[\"'][^<]*</scr...
def findEmbedPHPLink(data): regex = '<script type="text/javascript" src="((?![^"]+localtimes)(?![^"]+adcash)[^"]+\.php\?[^"]+)"\s*>\s*</script>' links = regexUtils.findall(data, regex)
<|file_name|>1073-2.cpp<|end_file_name|><|fim▁begin|>#include<bits/stdc++.h> using namespace std; namespace p1073_2{ int f[20001],n,m,p; int g(int x){ if(f[x]!=x)f[x]=g(f[x]); return f[x]; } inline void u(int a,int b){ if(g(a)!=g(b))f[g(b)]=g(a); } int main(){ scanf("%d%d%d",&n,&m,&p); for(int i=1;i<=n;i++){<|fim▁...
f[i]=i; } int a,b;
<|file_name|>workspace.rs<|end_file_name|><|fim▁begin|>// // Copyright:: Copyright (c) 2015 Chef Software, Inc. // License:: Apache License, Version 2.0 // // 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 t...
} fn reset_repo(&self, git_ref: &str) -> Result<(), DeliveryError> { try!(git::git_command(&["reset", "--hard", git_ref], &self.repo));
<|file_name|>GetMediaCapturePipelineRequestProtocolMarshaller.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017-2022 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 ...
import com.amazonaws.protocol.Protocol; import com.amazonaws.annotation.SdkInternalApi; /**
<|file_name|>popupWindow.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for ag-grid-community v20.2.0 // Project: http://www.ag-grid.com/ // Definitions by: Niall Crosby <https://github.com/ag-grid/> import { Component } from "./component"; export declare class PopupWindow extends Component { private static ...
private onBtClose; destroy(): void;
<|file_name|>home.interfaces.ts<|end_file_name|><|fim▁begin|>/** * Created by Khagesh.Sharma on 4/28/2015. */ module HomeInterface { export interface Stories { name:string; status: string } export interface HomeController { speech: string; stories: Array<Stories>; ...
} }
<|file_name|>Position.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2013-2016 Cinchapi 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/licenses/...
<|file_name|>unpack_empty.py<|end_file_name|><|fim▁begin|>[] = c y = []<|fim▁hole|>[] = []<|fim▁end|>
for [] in x: BLOCK
<|file_name|>contract.rs<|end_file_name|><|fim▁begin|>// PactHash // Written in 2015 by // Andrew Poelstra <apoelstra@wpsoftware.net> // // To the extent possible under law, the author(s) have dedicated all // copyright and related and neighboring rights to this software to // the public domain worldwide. This softwa...
// If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. //
<|file_name|>regexp-presets.js<|end_file_name|><|fim▁begin|>/** * Presets of sentenceSeparator, clauseRegExp, wordRegExp, wordBoundaryRegExp, abbrRegExp * for each languages.<|fim▁hole|> en: { sentenceSeparator: /\n/g, clauseRegExp: /[^,:"?!.]+/g, wordRegExp: /[\w'\-.]+(?!\s*\.\s*$)/g, wordBoundaryRe...
*/ export default {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.<|fim▁hole|># # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
# You may obtain a copy of the License at
<|file_name|>test_shell.py<|end_file_name|><|fim▁begin|># This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information...
shell._echo_command('ls', mock_stream, prefix='$ ') mock_stream.write.assert_called_with('$ ls\n') assert(mock_stream.flush.called)
<|file_name|>coverage.rs<|end_file_name|><|fim▁begin|>// Copyright 2020, The Gtk-rs Project Developers. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or <https://opensource.org/licenses/MIT> use glib::translate::*; use pango_sys; use ...
} pub fn copy(&self) -> Option<Coverage> {
<|file_name|>iostore.py<|end_file_name|><|fim▁begin|>""" IOStore class originated here https://github.com/BD2KGenomics/hgvm-graph-bakeoff-evaluations/blob/master/scripts/toillib.py and was then here: https://github.com/cmarkello/toil-lib/blob/master/src/toil_lib/toillib.py In a perfect world, this would be depreca...
If tee is passed, a tar.gz of the directory contents will be written to that filename. The file thus created must not be modified after this function is called.
<|file_name|>test_rotate_winds.py<|end_file_name|><|fim▁begin|># (C) British Crown Copyright 2015 - 2016, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundatio...
<|file_name|>astconv-cycle-between-trait-and-type.rs<|end_file_name|><|fim▁begin|>// Copyright 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 // ...
<|file_name|>DeviceManager.py<|end_file_name|><|fim▁begin|># author: brian dillmann<|fim▁hole|>from Devices.Output import Output class DeviceManager: def __init__(self): self.inputs = {} self.outputs = {} def addSimpleInput(self, name, location, invert = False): if name in self.inputs: raise KeyError('Cann...
# for rscs from Devices.Input import Input from Devices.Timer import Timer from Devices.AnalogInput import AnalogInput
<|file_name|>rpc.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 https://mozilla.org/MPL/2.0/. */ <|fim▁hole|>use servo_arc::Arc; use style::properties::style_stru...
use app_units::Au; use euclid::default::Rect; use euclid::Size2D; use script_traits::UntrustedNodeAddress;
<|file_name|>circuit-VRLC2-vr.py<|end_file_name|><|fim▁begin|>from lcapy import Circuit cct = Circuit(""" V 1 0 step 10; down L 1 2 1e-3; right, size=1.2 C 2 3 1e-4; right, size=1.2 R 3 0_1 1; down W 0 0_1; right """) import numpy as np t = np.linspace(0, 0.01, 1000) vr = cct.R.v.evaluate(t) from matplotlib.pyplot im...
<|file_name|>htmlcollection.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::codegen::Bindings::HTMLCollectionBi...
} }
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>export { default } from './Popper'; export * from './Popper';<|fim▁hole|><|fim▁end|>
export { PopperPlacementType } from '@mui/base/PopperUnstyled';
<|file_name|>process_builder.rs<|end_file_name|><|fim▁begin|>use std::fmt::{mod, Show, Formatter}; use std::os; use std::c_str::CString; use std::io::process::{Command, ProcessOutput, InheritFd}; use std::collections::HashMap; use util::{ProcessError, process_error}; #[deriving(Clone,PartialEq)] pub struct ProcessBui...
self.debug_string()), None, Some(&exit), None))
<|file_name|>sw2account.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python __version__='0.2.1' import argparse import logging import os import os.path import sys import requests import getpass import ConfigParser def _persist( export, rcfile ): f = open( rcfile, 'w' ) logging.debug( "writing to {}".format( rc...
export.append( "export ST_AUTH='{}'".format( v1AuthUrl ) )
<|file_name|>kinds.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/licenses/...
/// originally started with (e.g., you could convert `'static` to
<|file_name|>hello.ts<|end_file_name|><|fim▁begin|>/// <reference path="../typings/tsd.d.ts" /> import * as _ from 'lodash'; function hello(s: string) { console.log(`hello, ${s}`); } hello('typescript'); <|fim▁hole|>_.each([12, "123"], (e) => console.log(e));<|fim▁end|>
function foo() { }
<|file_name|>code_collector.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import logging import os import urllib.parse import urllib.request import tarfile from tooldog import TMP_DIR<|fim▁hole|> class CodeCollector(object): """ Class to download source code from a https://bio.tools entry """ ...
from .utils import * LOGGER = logging.getLogger(__name__)
<|file_name|>cli.py<|end_file_name|><|fim▁begin|>import argparse import os.path import config import definitions import sa_util import csv_util def import_module(args): from dependencies import dependencies_manager tables = [] for module in args.module: if not args.updateonly: definit...
if update in existing_views: continue needed.append(update) needed.reverse()
<|file_name|>filtering.go<|end_file_name|><|fim▁begin|>/* Copyright 2019 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 Unle...
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Whitespace Evaluation SofTware documentation build configuration file, created by # sphinx-quickstart on Wed Jul 9 13:12:12 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all poss...
# There are two options for replacing |today|: either, you set today to some
<|file_name|>issue-3026.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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...
}
<|file_name|>path_rotate_root_creds.go<|end_file_name|><|fim▁begin|>package plugin import ( "context" "errors" "fmt" "math" "sync/atomic" "time" "github.com/hashicorp/vault/sdk/framework" "github.com/hashicorp/vault/sdk/logical" ) func (b *backend) pathRotateCredentials() *framework.Path { return &framework...
if err != nil { return nil, err }
<|file_name|>ReactViewInitializer.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react' import { render } from 'react-dom' import { compose, createStore, applyMiddleware } from 'redux' import { Provider,ElementClass } from 'react-redux' import App from '../containers/TodoApp' import { devTools, persistState }...
// // Enables your middleware: // applyMiddleware(), // any Redux middleware, e.g. redux-thunk
<|file_name|>0007_auto_20170211_0802.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-02-11 08:02 from __future__ import unicode_literals <|fim▁hole|> class Migration(migrations.Migration): dependencies = [ ('multiexplorer', '0006_pullhistory'), ] opera...
from django.db import migrations, models import django.utils.timezone
<|file_name|>UsersRegistry.js<|end_file_name|><|fim▁begin|>/** * New node file */ var log4js = require('log4js'); var UserSession = require('./UserSession'); /* Room corresponds to each conference room*/ function UsersRegistry() { "use strict"; /* If this constructor is called without the "new" operator, "this"...
if (false === (this instanceof UsersRegistry)) { console.log('Warning: UsersRegistry constructor called without "new" operator');
<|file_name|>test_sets.py<|end_file_name|><|fim▁begin|># coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, print_function, unicode_literals, \ absolute_import import os import unittest from pymatgen.io.lammps.sets import La...
<|file_name|>covtype-2.py<|end_file_name|><|fim▁begin|>import optunity import numpy as np import hpolib_generator as hpo import cloudpickle as pickle import sklearn.datasets import random positive_digit = 2 name='covtype-%d' % positive_digit num_folds=5 budget = 150 npos = 500 nneg = 1000 search={'logC': [-8, 1], 'l...
<|file_name|>ReferenceExpressionProxy.js<|end_file_name|><|fim▁begin|>import { fireShuffleTasks } from 'src/model/ModelBase'; import { REFERENCE } from 'config/types'; import { rebindMatch } from 'shared/rebind'; import { isArray, isString } from 'utils/is'; import { escapeKey } from 'shared/keypaths'; import Expressio...
this.rebound(); }
<|file_name|>distloader.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Copyright (c) 2016 Red Hat # # 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/LI...
with distro specific blocks maintained as part of renderspec. '.spec' returns the spec template (which you need to supply during init)
<|file_name|>AllDataPeriodStatus.java<|end_file_name|><|fim▁begin|>/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ch.quantasy.iot.mqtt.tinkerforge.device.deviceHandler.IMU.st...
public AllDataPeriodStatus(AHandler deviceHandler, String statusTopic, MqttAsyncClient mqttClient) { super(deviceHandler, statusTopic, "allData", mqttClient);
<|file_name|>target.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The Vanadium Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package profiles import ( "fmt" "os" "runtime" "sort" "strconv" "strings" "time" "v.io/x/lib...
} parts := strings.Split(val, "-") if len(parts) != 2 || (len(parts[0]) == 0 || len(parts[1]) == 0) {
<|file_name|>airport-list-page.component.ts<|end_file_name|><|fim▁begin|>import {Component, OnDestroy} from "@angular/core"; import {Router} from "@angular/router"; import {Store} from "@ngrx/store"; import {State} from "../../../app.reducers"; import {InitializeAirportListAction, RequestAirportsAction} from "../../fli...
public ngOnDestroy() { this._store.dispatch(new InitializeAirportListAction()); }
<|file_name|>export.py<|end_file_name|><|fim▁begin|>def dummy_export_progress_cb(*args, **kwargs): pass class Exporter(object): def __init__(self, obj, export_format): self.obj = obj self.export_format = str(export_format) self.can_change_quality = False def set_quality(quality_po...
def set_postprocess_func(self, postprocess_func): raise NotImplementedError()
<|file_name|>SystemMemberRegionJmxImpl.java<|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 Y...
public void cleanupResource() {}
<|file_name|>constants.py<|end_file_name|><|fim▁begin|># Copyright 2015 6WIND S.A. # 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...
# base timestamp BASE_TIMESTAMP = '1970-01-01 00:00:00'
<|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 https://mozilla.org/MPL/2.0/. */ #![allow(unsafe_code)] // This is needed for the constants in a...
/// Get the atom as a slice of utf-16 chars. #[inline]
<|file_name|>validate_account.py<|end_file_name|><|fim▁begin|>""" This module contains the 'validate_account' menu node. """<|fim▁hole|> from menu.character import _options_choose_characters def validate_account(caller, input): """Prompt the user to enter the received validation code.""" text = "" option...
from textwrap import dedent
<|file_name|>app.bundle.js<|end_file_name|><|fim▁begin|>/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /*...
return event.charCode != null ? event.charCode : event.keyCode; } // Add which for click: 1 === left; 2 === middle; 3 === right
<|file_name|>MissingPrimaryColumnError.ts<|end_file_name|><|fim▁begin|>import {EntityMetadata} from "../metadata/EntityMetadata";<|fim▁hole|> /** */ export class MissingPrimaryColumnError extends Error { name = "MissingPrimaryColumnError"; constructor(entityMetadata: EntityMetadata) { super(); ...
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>export {Emitter} from './emitter';<|fim▁hole|><|fim▁end|>
export {Bound} from './bound'; export {Cached} from './cached'; export {Objects} from './objects'; export {Types} from './types';
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>try: from setuptools import setup, Extension except ImportError: from distutils.core import setup, Extension setup(name='peloton_bloomfilters', author = 'Adam DePrince', author_email = 'adam@pelotoncycle.com', url = 'https://github.com/peloto...
ext_modules=( [
<|file_name|>MavenRepository.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2020 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Publi...
return this.repositoryUrl; }
<|file_name|>bibrankgkb.py<|end_file_name|><|fim▁begin|>## -*- mode: python; coding: utf-8; -*- ## ## This file is part of Invenio. ## Copyright (C) 2007, 2008, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published ...
<|file_name|>_jb_pytest_runner.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. import pytest from distutils import version import sys from _pytest.config import...
<|file_name|>IdTable.java<|end_file_name|><|fim▁begin|>package trasm; /** * Таблица идентификаторов */ class IdTable extends AbstractTable { /** * Типы идентификаторов */ static enum IdType { DB(1), DW(2), DD(4), LABEL(0); private int size; priv...
} }
<|file_name|>hooks.py<|end_file_name|><|fim▁begin|>from rsqueakvm.util.cells import QuasiConstant from rsqueakvm.plugins.vmdebugging.model import wrap_oplist, wrap_greenkey, wrap_debug_info from rpython.rlib.jit import JitHookInterface, Counters jit_iface_recursion = QuasiConstant(False) def make_hook(args, func): ...
<|file_name|>admission_test.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 ...
informerFactory := informers.NewSharedInformerFactory(kubeClient, controller.NoResyncPeriodFunc()) quotaAccessor, _ := newQuotaAccessor()
<|file_name|>JavaCharacterData.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU Gen...
, jstring data) { WebCore::JSMainThreadNullState state; raiseOnDOMError(env, IMPL->insertData(offset
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>""" Forms for the bug tracker app.<|fim▁hole|> from apps.txtrender.forms import MarkupCharField from apps.contentreport.forms import ContentReportCreationForm from apps.tools.http_utils import get_client_ip_address from .models import (IssueTicket, ...
""" from django import forms from django.utils.translation import ugettext_lazy as _
<|file_name|>_config.js<|end_file_name|><|fim▁begin|>module.exports = { description: 'does not include called-in-unused-code import'<|fim▁hole|><|fim▁end|>
};
<|file_name|>provider.py<|end_file_name|><|fim▁begin|>""" API for initiating and tracking requests for credit from a provider. """ from __future__ import absolute_import import datetime import logging import uuid import pytz import six from django.db import transaction from edx_proctoring.api import get_last_exam_co...
<|file_name|>binary.cc<|end_file_name|><|fim▁begin|>// binary.cc -- binary input files for gold // Copyright (C) 2008-2016 Free Software Foundation, Inc. // Written by Ian Lance Taylor <iant@google.com>. // This file is part of gold. // This program is free software; you can redistribute it and/or modify // it under...
0, shstrtab_offset, shstrtab.get_strtab_size(),
<|file_name|>app_settings.py<|end_file_name|><|fim▁begin|>"""Copyright 2008 Orbitz WorldWide 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...
<|file_name|>vec-dst.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/license...
// except according to those terms. // run-pass
<|file_name|>lpushx.spec.ts<|end_file_name|><|fim▁begin|>import Store from '../../Store'; import Expires from '../../Expires'; import { lpush } from '../lpush'; import { lpushx } from '../lpushx'; describe('Test lpushx command', () => { it('should prepend values to list', () => { const redis = new MockRedis(); ...
});
<|file_name|>test_png_plte.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (c) 2016 - 2022 -- Lars Heuer # All rights reserved. # # License: BSD License # """\ Tests if the PNG serializer does not add more colors than needed. See also issue <https://github.com/heuer/segno/issues/62> """ from __fu...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from argparse import ArgumentParser from .core import Core def getopt(argv): parser = ArgumentParser(description='Another webui for youtube-dl') parser.add_argument('-c...
return vars(parser.parse_args()) def main(argv=None):
<|file_name|>home.client.controller.js<|end_file_name|><|fim▁begin|>'use strict';<|fim▁hole|> function($scope, $http, $location, Authentication) { // ===================================================================== // Non $scope member // ===================================================================== ...
angular.module('core').controller('HomeController', ['$scope', '$http', '$location', 'Authentication',
<|file_name|>time_series2.d.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../../public/app/headers/common.d.ts" /> export default class TimeSeries { datapoints: any; id: string; label: string; alias: string; color: string; valueFormater: any; stats: any;<|fim▁hole|> allIsZero: b...
legend: boolean; allIsNull: boolean;
<|file_name|>plugin-args-1.rs<|end_file_name|><|fim▁begin|>// Copyright 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/l...
<|file_name|>test_term.py<|end_file_name|><|fim▁begin|># The MIT License (MIT) # # Copyright (c) 2016 Sean Quinn # # 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, includi...
# IN THE SOFTWARE. from dice.tokens import Term
<|file_name|>main.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from openerp import SUPERUSER_ID from openerp.addons.web import http from openerp.addons.web.http import request from openerp.addons.website.models.website import unslug from openerp.tools import DEFAULT_SERVER_DATE_FORMAT from openerp.tools.tran...
countries.append({ 'country_id_count': 0,
<|file_name|>releaseModule.js<|end_file_name|><|fim▁begin|>/* global bowlineApp */ function releaseModule($rootScope,$http,$timeout,login,ENV) { console.log("!trace releaseModule instantiated, login status: ",login.status); this.validator = {}; // This just gets all releases. this.getReleases = function(mine,use...
<|file_name|>legalize_to_standard.cc<|end_file_name|><|fim▁begin|>/* Copyright 2019 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.apach...
auto lhs = op.lhs(); auto rhs = op.rhs(); auto lhs_type = lhs.getType().cast<TensorType>();
<|file_name|>read.rs<|end_file_name|><|fim▁begin|>use std::ptr; use std::fmt; use std::error::Error; use crate::pixel_buffer::PixelBuffer; use crate::texture::ClientFormat; use crate::texture::PixelValue; use crate::image_format::{TextureFormatRequest, TextureFormat}; use crate::fbo; use crate::fbo::FramebuffersConta...
pub fn read<'a, S, D, T>(mut ctxt: &mut CommandContext<'_>, source: S, rect: &Rect, dest: D,