prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>timer_timerfd.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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....
<|file_name|>comments.rs<|end_file_name|><|fim▁begin|>// rustfmt-emit_mode: coverage /// Here's a doc comment! fn main() {<|fim▁hole|> // foo is bar let foo = "bar"; // loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong comment!!!!! }<|fim▁end|>
<|file_name|>tokens.py<|end_file_name|><|fim▁begin|># Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program...
<|file_name|>TemplateImplUtil.java<|end_file_name|><|fim▁begin|>/* * Copyright 2000-2015 JetBrains s.r.o. * * 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/lice...
public class TemplateImplUtil { public static LinkedHashMap<String, Variable> parseVariables(CharSequence text) {
<|file_name|>cluster_provider.py<|end_file_name|><|fim▁begin|>import logging from abc import abstractmethod from string import Template from parsl.providers.error import SchedulerMissingArgs, ScriptPathError from parsl.launchers.error import BadLauncher from parsl.providers.provider_base import ExecutionProvider logg...
launcher,
<|file_name|>fo.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'flash', 'fo', { <|fim▁hole|> accessNever: 'Ongantíð', accessSameDomain: 'Sama navnaøki', alig...
access: 'Script atgongd', accessAlways: 'Altíð',
<|file_name|>getDeclarationTypeText.spec.ts<|end_file_name|><|fim▁begin|>import { __String, SignatureDeclaration } from 'typescript'; import { TsParser } from '.'; import { getDeclarationTypeText } from './getDeclarationTypeText'; const path = require('canonical-path'); describe('getDeclarationTypeText', () => { let...
it('should return a textual representation of the type the declaration', () => { const parseInfo = parser.parse(['tsParser/getDeclarationTypeText.test.ts'], basePath); const moduleExports = parseInfo.moduleSymbols[0].exportArray;
<|file_name|>route_stitching.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2020 The SymbiFlow Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-I...
def normalize_tree(self):
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- __author__ = 'ray' __date__ = '2/27/15' from flask import jsonify, abort from flask.views import MethodView from ..models import ThemeModel <|fim▁hole|>class ThemeView(MethodView): """ Theme View Retrieve description of a list of a...
<|file_name|>windowing.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/. */ //! Abstract windowing methods. The concrete implementatio...
/// Make the OpenGL context current. fn make_gl_context_current(&self);
<|file_name|>ObservationOfferingCache.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2012 52°North Initiative for Geospatial Open Source Software GmbH * * 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 cop...
} protected Collection<ObservationOffering> getCollectionFromDAO(AccessGDB geoDB) throws IOException {
<|file_name|>dojo.d.ts<|end_file_name|><|fim▁begin|>/************************************************************************/ /* Define core Dojo features */ /************************************************************************/ /// <reference path="dojo.types.d.ts"/> ...
{ var supplemental: Dojo.Cldr.Supplemental; export = supplemental;
<|file_name|>test_util.py<|end_file_name|><|fim▁begin|>import unittest import numpy as np from bayesnet.image.util import img2patch, patch2img class TestImg2Patch(unittest.TestCase): def test_img2patch(self): img = np.arange(16).reshape(1, 4, 4, 1) patch = img2patch(img, size=3, step=1) e...
if __name__ == '__main__': unittest.main()
<|file_name|>widgets.py<|end_file_name|><|fim▁begin|>from django import forms from django.core.urlresolvers import reverse from django.forms.widgets import RadioFieldRenderer from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class Boot...
if self.event_id: manage_custom_reg_link = """
<|file_name|>sv.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */<|fim▁hole|>} );<|fim▁end|>
CKEDITOR.plugins.setLang( 'preview', 'sv', { preview: 'Förhandsgranska'
<|file_name|>multi_regular.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2005-2009 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License as // published by the Fre...
} Iso_rectangle_2 bbox=
<|file_name|>list.py<|end_file_name|><|fim▁begin|><|fim▁hole|>"""List iSCSI Snapshots.""" # :license: MIT, see LICENSE for more details. import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer.CLI import helpers from SoftLayer import utils import click @click.comma...
<|file_name|>selectors.cpp<|end_file_name|><|fim▁begin|>/* * selectors.cpp * * Created on: 10/07/2015 * * ========================================================================= * Copyright (C) 2015-, Daniele De Sensi (d.desensi.software@gmail.com) * * This file is part of nornir. * * nornir is free soft...
<|file_name|>Q2.java<|end_file_name|><|fim▁begin|>package fPPPrograms; import java.util.Scanner; public class LeapYear { public static void main(String[] args) { System.out.println("Enter a year to determine whether it is a leap year or not?"); Scanner yourInput = new Scanner(System.in); int year = y...
} }
<|file_name|>readblock.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import subprocess as sp def main(args): with open(args.disk, 'rb') as f: f.seek(args.block * args.block_size) block = (f.read(args.block_size) .ljust(args.block_size, b'\xff')) # what did you expect? ...
<|file_name|>long_words.py<|end_file_name|><|fim▁begin|>#http://codeforces.com/problemset/problem/71/A T = int(raw_input()) while(not T == 0): word = str(raw_input()) if len(word)>10:<|fim▁hole|> else: print word T-=1<|fim▁end|>
print word[0]+str(len(word[1:len(word)-1]))+word[len(word)-1]
<|file_name|>fixtures.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.models import User from esus.phorum.models import Category, Table __all__ = ("user_super", "users_usual", "table_simple") def user_super(case): case.user_super = User.objects.create( username = "superuser", password = ...
def users_usual(case): case.user_tester = User.objects.create( username = "Tester",
<|file_name|>pathHelpers.ts<|end_file_name|><|fim▁begin|>export const getUrlForAbsolutePath = (path: string) => { return path.split('pages').pop().replace('.md', '') } export const getJobPath = (path: string) => { return path.split('jobs').pop().replace('.md', '') } export const getFileNameOnly = (path: string) =...
export const kebabCase = (string = '') =>
<|file_name|>p2.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1<|fim▁hole|><|fim▁end|>
oid sha256:e2a38d0984b9d8a85bbc1b3e0131e2fee2b6a6dc5f31aeb248b213f41f36038d size 575053
<|file_name|>macro-redef.rs<|end_file_name|><|fim▁begin|>#![allow( dead_code, non_snake_case,<|fim▁hole|> non_upper_case_globals )] pub const FOO: u32 = 4; pub const BAR: u32 = 5; pub const BAZ: u32 = 6;<|fim▁end|>
non_camel_case_types,
<|file_name|>client.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import json from tdclient import api, models class Client: """API Client for Treasure Data Service """ def __init__(self, *args, **kwargs): self._api = api.API(*args, **kwargs) def __enter__(self): return sel...
database=d.get("database"), num_records=d.get("num_records"),
<|file_name|>routes.js<|end_file_name|><|fim▁begin|>var _ = require('underscore') , path = require('path') , passport = require('passport') , AuthCtrl = require('./controllers/auth') , UserCtrl = require('./controllers/user') , User = require('./models/User.js') , userRole...
}); }
<|file_name|>uploader.rs<|end_file_name|><|fim▁begin|>// External Dependencies ------------------------------------------------------ use diesel; use diesel::prelude::*; // Internal Dependencies ------------------------------------------------------ use super::super::Server; use ::db::models::User; use ::db::schema::...
true
<|file_name|>deriving-via-extension-hash-struct.rs<|end_file_name|><|fim▁begin|>// ignore-fast <|fim▁hole|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. Thi...
// 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. //
<|file_name|>pyku-web.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # pyku # ==== # Python-based random haiku generator # # Chris Collins, <collins.christopher@gmail.com> # # v0.5 - 2013-11-15 # # Copyright (C) 2013 Chris Collins # # This program is free software: you can redistribute it and/or modify # it under ...
def modcount(mod):
<|file_name|>CQPlotSubwidget.cpp<|end_file_name|><|fim▁begin|>// Copyright (C) 2019 - 2021 by Pedro Mendes, Rector and Visitors of the // University of Virginia, University of Heidelberg, and University // of Connecticut School of Medicine. // All rights reserved. // Copyright (C) 2017 - 2018 by Pedro Mendes, Virginia...
if (item == NULL) return;
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from models import Event from django.views.generic import DetailView, ListView class EventListView(ListView): template_name = 'agenda/event_list.html' queryset = Event.objects.upcoming() paginate_by = 20 class EventArchiveview(EventListView):<|fim▁ho...
<|file_name|>platform_utils.py<|end_file_name|><|fim▁begin|>import ctypes from contextlib import contextmanager import errno import logging import os import platform import pwd import grp import subprocess from .exceptions import CommandFailed _logger = logging.getLogger(__name__) def get_current_user_shell(): re...
def _int_if_not_none(value): if value is not None:
<|file_name|>load_data.py<|end_file_name|><|fim▁begin|>import os import pickle import csv import pandas as pd import math from functools import lru_cache, reduce from collections import defaultdict USE_ROME_SLICING_DATASET = False # Rome slicing dataset is not ready yet if USE_ROME_SLICING_DATASET: OGR_ROME_FIL...
if f2 in d[f1]: raise ValueError("duplicate key") else:
<|file_name|>debug.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 1997, 2016, 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 General Public ...
int sfile_len; int sline; bool noisy; while ((*cp) != '\0' && is_token_break(*cp)) cp++;
<|file_name|>index.js<|end_file_name|><|fim▁begin|>exports.view = function() { this.render(); }; exports.async = function() {<|fim▁hole|><|fim▁end|>
this.render(); };
<|file_name|>inner-module.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/li...
pub fn main() { inner::hello(); inner::inner2::hello(); }
<|file_name|>DbOpenHelper.java<|end_file_name|><|fim▁begin|>package com.soulkey.calltalent.db; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import com.soulkey.calltalent.db.model.SettingModel; import com.soulkey.calltalent.db.populator...
public static final String DB_NAME = "calltalent.db"; private static final int DB_VERSION = 1; private static DbOpenHelper instance;
<|file_name|>ILogicProcessConsole.java<|end_file_name|><|fim▁begin|><|fim▁hole|>package org.mo.logic.process; import org.mo.com.xml.IXmlObject; import org.mo.eng.store.IXmlConfigConsole; public interface ILogicProcessConsole extends IXmlConfigConsole<IXmlObject> { }<|fim▁end|>
<|file_name|>portability.js<|end_file_name|><|fim▁begin|>( function( $ ) { "use strict"; // Extend etCorePortability since it is declared by localization. window.etCore.portability = $.extend( etCorePortability, { cancelled: false, boot: function( $instance ) { var $this = this; var $customizeHeader = ...
} ); }, importFB: function( file, postId ) {
<|file_name|>common_tags.py<|end_file_name|><|fim▁begin|># This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.<|fim▁hole|># from django import template register = template.Library() @register.filter def username(user): return ("%s %s" % (user.first_name, user.last_name)).lstrip() or user.u...
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
<|file_name|>Book.java<|end_file_name|><|fim▁begin|>package ch.bfh.swos.bookapp.jpa.model; import javax.persistence.*; import java.io.Serializable; import java.util.Date; import static javax.persistence.GenerationType.IDENTITY; import static javax.persistence.TemporalType.DATE; /** * Entity implementation class for...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import re import ast from setuptools import setup, find_packages _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('mycli/__init__.py', 'rb') as f: version = str(ast.literal_eval(_version_re.search( f.read().decode('utf-8')).group(1))) descri...
'Topic :: Software Development :: Libraries :: Python Modules', ], )
<|file_name|>spark_kubernetes.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 ...
# under the License. from typing import Dict, Optional
<|file_name|>fake-raf.ts<|end_file_name|><|fim▁begin|>let original: (fn: FrameRequestCallback) => number; let requesters: any[] = []; function fakeRaf(fn: FrameRequestCallback): number { requesters.push(fn); return requesters.length; } function use() { original = window.requestAnimationFrame; window.requestA...
function step() { let cur = requesters;
<|file_name|>bitcoin_ca_ES.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ca_ES" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Dogecoin</sour...
</message> <message>
<|file_name|>uritests.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2009-2014 The nealcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "uritests.h" #include "guiutil.h" #include "walletmodel.h" ...
uri.setUrl(QString("nealcoin:175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W?amount=1,000.0&label=Wikipedia Example"));
<|file_name|>NamedRange.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2009-2012, University of Manchester * * Licensed under the New BSD License. * Please see LICENSE file that is distributed with the source code ***************...
* The University of Manchester<br>
<|file_name|>ForgeryPyGenerateVirtualData.py<|end_file_name|><|fim▁begin|>from forgery_py import * for x in range(20): randPerson=name.first_name(),name.last_name(),personal.gender(),name.location(),address.phone() randCV=lorem_ipsum.title(),lorem_ipsum.sentence() randAddr=address.city(),address.state(),address.c...
randComment=basic.text(200) randDate=date.date()
<|file_name|>ad_param_service_unittest.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: UTF-8 -*- # # Copyright 2010 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
<|file_name|>user.ts<|end_file_name|><|fim▁begin|>export class User { public id: number; public username: string; public platformAdmin: boolean;<|fim▁hole|><|fim▁end|>
}
<|file_name|>0002_transcriptpage_updated_at.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-06-16 22:52 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migrati...
operations = [ migrations.AddField( model_name='transcriptpage',
<|file_name|>cmpxchg.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 cmpxchg_1() { run_test(&Instruction { mnemonic: Mnemonic::CMPXCHG,...
fn cmpxchg_6() { run_test(&Instruction { mnemonic: Mnemonic::CMPXCHG, operand1: Some(IndirectScaledDisplaced(RDI, Two, 2091377662, Some(OperandSize::Byte), None)), operand2: Some(Direct(DL)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None ...
<|file_name|>implore.es6.js<|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 applica...
implore.delete = function httpDelete(options) { options.method = 'DELETE';
<|file_name|>resource_aws_subnet.go<|end_file_name|><|fim▁begin|>package aws import ( "fmt" "log" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema...
<|file_name|>location.py<|end_file_name|><|fim▁begin|>from geopy.point import Point class Location(object): def __init__(self, name="", point=None, attributes=None, **kwargs): self.name = name if point is not None: self.point = Point(point)<|fim▁hole|> def __getitem__(self, index): ...
if attributes is None: attributes = {} self.attributes = dict(attributes, **kwargs)
<|file_name|>printf_parse.py<|end_file_name|><|fim▁begin|># ported from gnulib rev be7d73709d2b3bceb987f1be00a049bb7021bf87 # # Copyright (C) 2014, Mark Laws. # Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2014 Free Software # Foundation, Inc. # # This program is free software; you can redistribute it and/or modify ...
<|file_name|>alpineobject.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from __future__ import absolute_import import json import logging import logging.config import os class AlpineObject(object): """ Base Class of Alpine API objects """ # # alpine alpine version strin...
def _setup_logging(default_configuration_setting_file='logging.json', default_level=logging.INFO,
<|file_name|>cwr.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- import StringIO import xlsxwriter """ Web app module. """ __author__ = 'Bernardo Martínez Garrido' __license__ = 'MIT' __status__ = 'Development' def generate_cwr_report_excel(cwr): output = StringIO.StringIO() workbook = xlsxwrite...
results_sheet = workbook.add_worksheet(group.group_header.transaction_type)
<|file_name|>tax.js<|end_file_name|><|fim▁begin|>/** * Shopware 5 * Copyright (c) shopware AG * * According to our dual licensing model, this program can be used either * under the terms of the GNU Affero General Public License, version 3, * or under a proprietary license. * * The texts of the GNU Affero Genera...
<|file_name|>Avatar.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react'; import { addPropertyControls, ControlType } from 'framer'; // tslint:disable-next-line: ban-ts-ignore // @ts-ignore import MuiAvatar from '@material-ui/core/Avatar'; import { Icon } from './Icon'; interface Props { variant?: 'circle...
title: 'Image File', hidden: function hidden(props) {
<|file_name|>VectorE2.d.ts<|end_file_name|><|fim▁begin|>/** * @hidden<|fim▁hole|>export interface VectorE2 { /** * The Cartesian x-coordinate or <em>abscissa</em>. */ x: number; /** * The Cartesian y-coordinate or <em>ordinate</em>. */ y: number; }<|fim▁end|>
*/
<|file_name|>FlatSliderSimple2d.cpp<|end_file_name|><|fim▁begin|>/* ****************************************************************** ** ** OpenSees - Open System for Earthquake Engineering Simulation ** ** Pacific Earthquake Engineering Research Center ** ** ...
return; }
<|file_name|>cguitreedomdocument.cpp<|end_file_name|><|fim▁begin|>#include <stdio.h> #include <QtDebug><|fim▁hole|> QDomImplementation impl; impl.setInvalidDataPolicy(QDomImplementation::ReturnNullNode); } /** * Get first "guiObject" located in "guiRoot". * * @return Node element of first guiObject or an em...
#include "cguitreedomdocument.h" CGuiTreeDomDocument::CGuiTreeDomDocument() {
<|file_name|>EventsMap.java<|end_file_name|><|fim▁begin|>/* ********************************************************************** ** ** Copyright notice ** ** ** ** (c) 2005-2009 RSS...
<|file_name|>test_dns.py<|end_file_name|><|fim▁begin|># test-case-name: twisted.names.test.test_dns # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for twisted.names.dns. """ from __future__ import division, absolute_import from io import BytesIO import struct from zope.interface....
b'\x00\x07' # RDLEN 7 Too long - should be 6 b'\x00\x01' # OPTION-CODE
<|file_name|>array_tokenizer.hpp<|end_file_name|><|fim▁begin|>/* * arraytokenizer.hpp * * Created on: Sep 28, 2015 * Author: zmij */ #ifndef LIB_PG_ASYNC_INCLUDE_TIP_DB_PG_DETAIL_ARRAY_TOKENIZER_HPP_ #define LIB_PG_ASYNC_INCLUDE_TIP_DB_PG_DETAIL_ARRAY_TOKENIZER_HPP_ #include <tip/db/pg/detail/tokenizer_bas...
} /* namespace pg */
<|file_name|>InfinispanTicketRegistry.java<|end_file_name|><|fim▁begin|>package org.apereo.cas.ticket.registry; import org.apereo.cas.ticket.Ticket; import org.infinispan.Cache; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Collection; import java.util.concurrent.TimeUnit; /** * This is ...
this.cache.put(ticket.getId(), ticket); return ticket; }
<|file_name|>comp-1882.component.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */<|fim▁hole|> selector: 'app-comp-1882', templateUr...
import { Component, OnInit } from '@angular/core'; @Component({
<|file_name|>keychain.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use super::operations::BurnchainOpSigner; use stacks::chainstate::stacks::{StacksTransactionSigner, TransactionAuth, StacksPublicKey, StacksPrivateKey, StacksAddress}; use stacks::address::AddressHashMode; use stacks::burnchains::{Bu...
self.vrf_secret_keys.push(sk.clone()); self.vrf_map.insert(pk.clone(), sk);
<|file_name|>dynamic_component_loader_spec.js<|end_file_name|><|fim▁begin|>System.register(["angular2/test_lib", "angular2/src/test_lib/test_bed", "angular2/src/core/annotations_impl/annotations", "angular2/src/core/annotations_impl/view", "angular2/src/core/compiler/dynamic_component_loader", "angular2/src/core/compil...
expect(dynamicComponent).toBeAnInstanceOf(DynamicComp); dynamicComponent.done.then((function(_) { view.detectChanges();
<|file_name|>OptimizerRules.cpp<|end_file_name|><|fim▁begin|>//////////////////////////////////////////////////////////////////////////////// /// @brief rules for the query optimizer /// /// @file /// /// DISCLAIMER /// /// Copyright 2010-2014 triagens GmbH, Cologne, Germany /// /// Licensed under the Apache License, ...
auto expression = cn->expression(); if (expression != nullptr) { collectConstantAttributes(const_cast<AstNode*>(expression->node()));
<|file_name|>fill-triangles.go<|end_file_name|><|fim▁begin|>// http://www.sunshine2k.de/coding/java/TriangleRasterization/TriangleRasterization.html // http://blackpawn.com/texts/pointinpoly/ // https://fgiesen.wordpress.com/2013/02/10/optimizing-the-basic-rasterizer/ package main import ( "fmt" "image" "image/colo...
<|file_name|>test_printers.py<|end_file_name|><|fim▁begin|>"""Test the print-to-python-file module This just uses the simpleparsegrammar declaration, which is parsed, then linearised, then loaded as a Python module. """ import os, unittest import test_grammarparser testModuleFile = 'test_printers_garbage.py' class P...
return unittest.makeSuite(PrintersTests,'test')
<|file_name|>button.cpp<|end_file_name|><|fim▁begin|>#include "../widgetslib.h" #include "button.h" #include "Meta/math/vector4.h" #include "vertex.h" #include "Meta/keyvalue/metatable_impl.h" #include "Meta/serialize/serializetable_impl.h" #include "fontloader.h" #include "imageloader.h" METATABLE_BEGIN_BASE(En...
void Button::emitClicked()
<|file_name|>plIgnoreComponent.cpp<|end_file_name|><|fim▁begin|>/*==LICENSE==* CyanWorlds.com Engine - MMOG client, server and tools Copyright (C) 2011 Cyan Worlds, Inc. 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 ...
<|file_name|>xgboost_custom.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2015 by Contributors // This file contains the customization implementations of R module // to change behavior of libxgboost #include <xgboost/logging.h> #include "src/common/random.h" #include "./xgboost_R.h" // redirect the messages to R's...
}
<|file_name|>playground.d.ts<|end_file_name|><|fim▁begin|>/* tslint:disable */ /* eslint-disable */ /**<|fim▁hole|>* @param {string} context * @returns {string} */ export function render(template: string, context: string): string;<|fim▁end|>
* @param {string} template
<|file_name|>hr_payroll_account.py<|end_file_name|><|fim▁begin|>#-*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import time from datetime import date, datetime, timedelta from openerp.osv import fields, osv from openerp.tools import float_compare, float_is_zero from ope...
<|file_name|>domain.py<|end_file_name|><|fim▁begin|>import inspect import os from abc import ABC, ABCMeta from dataclasses import dataclass from datetime import datetime, tzinfo from types import FunctionType, WrapperDescriptorType from typing import ( Any, Callable, Dict, Generic, Iterable, Lis...
@version.setter def version(self, version: int) -> None: self._version = version
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys <|fim▁hole|> os.environ["DJANGO_SETTINGS_MODULE"] = "tests.settings" test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, test_dir) except ImportError: pass else: from d...
try:
<|file_name|>test_align.py<|end_file_name|><|fim▁begin|>import os.path import unittest from unittest.mock import patch import libpipe from libpipe.cmds.align import HisatCmd import logging log = logging.getLogger(__name__) class TestHistatCmd(unittest.TestCase): def setUp(self): # prevent error logs fr...
<|file_name|>arar_figure.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2013 Jake Ross # # 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 ...
ap.ylimits = ylimits break
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2018 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-2.0 #<|fim▁ho...
# Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS,
<|file_name|>class_demos.py<|end_file_name|><|fim▁begin|># Notes on classes class Sample(): def __init__(self, name, number): self.name = name self.number = number def print_values(self): print(f"name: {self.name}") print(f"number: {self.number}") class Samp...
''' # Demo Sample() instance = Sample("fred", 3) instance.print_values()
<|file_name|>handler_utils.go<|end_file_name|><|fim▁begin|>package monitor import ( "context" "fmt" "strings" "time" v32 "github.com/rancher/rancher/pkg/apis/management.cattle.io/v3" "github.com/rancher/norman/httperror" "github.com/rancher/norman/types" "github.com/rancher/rancher/pkg/controllers/management...
<|file_name|>Keyboard.js<|end_file_name|><|fim▁begin|>MD.Keyboard = function(){ const keys = { "v": { name: "Select tool", cb: ()=> state.set("canvasMode", "select") }, "q": { name: "Freehand tool", cb: ()=> state.set("canvasMode", "fhpath") }, "l": { name: "Line tool", cb: ()=> s...
if (key === "cmd") key = svgedit.browser.isMac() ? "⌘" : "Ctrl";
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|>@author: cheng.li """ from PyFin.Math.Distributions.NormalDistribution import NormalDistribution from PyFin.Math.Distributions.NormalDistribution import CumulativeNormalDistribution from PyFin.Math.Distributions.NormalDistribution...
u""" Created on 2015-7-23
<|file_name|>math_query_sql.rs<|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...
.unwrap() }) .collect::<Vec<_>>();
<|file_name|>AIGame.cpp<|end_file_name|><|fim▁begin|>/* Copyright(C) 2013 Danny Sok <danny.sok@outlook.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, either version 3 of the License, or (at...
int AIGame::getOriginalPlayerPos()
<|file_name|>flash.js<|end_file_name|><|fim▁begin|>import { timeout as d3_timeout } from 'd3-timer'; export function uiFlash(context) { var _flashTimer; var _duration = 2000; var _iconName = '#iD-icon-no'; var _iconClass = 'disabled'; var _text = ''; var _textClass; function flash() {...
flash.iconName = function(_) { if (!arguments.length) return _iconName;
<|file_name|>rte.controller.js<|end_file_name|><|fim▁begin|>angular.module("umbraco") .controller("Umbraco.PropertyEditors.RTEController", function ($rootScope, $scope, $q, $locale, dialogService, $log, imageHelper, assetsService, $timeout, tinyMceService, angularHelper, stylesheetResource, macroService, edit...
show: true, submit: function(model) { tinyMceService.insertLinkInEditor(editor, model.target, anchorElement); $scope.linkPickerOverlay.show = false;
<|file_name|>borrowck-mut-vec-as-imm-slice.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://...
pub fn main() { assert_eq!(has_mut_vec(vec![1, 2, 3]), 6); }
<|file_name|>parseInput.js<|end_file_name|><|fim▁begin|>/** * Takes an array of strings that represent functional dependencies and returns * them as an array of objects containing functionaldependency objects. */ var parseInput = function(lines) {<|fim▁hole|> lines = lines.split('\n'); var functionalDependencies ...
<|file_name|>delete_contents.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # a script to delete the contents of an s3 buckets # import the sys and boto3 modules import sys import boto3 # create an s3 resource s3 = boto3.resource('s3') # iterate over the script arguments as bucket names for bucket_name in sys...
<|file_name|>DimmerItem.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2014,2019 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. * * This program and the accompanying materials are made available ...
private static List<Class<? extends Command>> acceptedCommandTypes = new ArrayList<Class<? extends Command>>(); static { acceptedDataTypes.add(PercentType.class);
<|file_name|>issue-70972-dyn-trait.rs<|end_file_name|><|fim▁begin|>const F: &'static dyn Send = &7u32; fn main() { let a: &dyn Send = &7u32;<|fim▁hole|> _ => {} } }<|fim▁end|>
match a { F => panic!(), //~^ ERROR `&dyn Send` cannot be used in patterns
<|file_name|>bench.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 cssparser::{Parser, SourcePosition}; use parking_lot::RwLoc...
let rules_matched = parse_rules( ".foo { width: 200px; } \
<|file_name|>VirtualHost.cpp<|end_file_name|><|fim▁begin|>/* * * (C) 2015 - ntop.org * * * 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 3 of the License, or * (at your op...
/* ntop->getTrace()->traceEvent(TRACE_WARNING, "%s\t%u [%u][%u]", name, diff, num_requests.getNumBytes(), last_num_requests);
<|file_name|>resources.rs<|end_file_name|><|fim▁begin|>/*! Resource Directory. See [here](../../resources/index.html) for the API docs. # Examples ``` # #![allow(unused_variables)] use pelite::pe64::{Pe, PeFile}; use pelite::resources::FindError; # #[allow(dead_code)] fn example<'a>(file: PeFile<'a>) -> Result<&'a ...
let resources = file.resources()?;