prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>sph_sha.rs<|end_file_name|><|fim▁begin|>#![allow(non_camel_case_types)] extern crate libc; use libc::{uint32_t, uint64_t, c_uchar, size_t, c_void, c_uint}; use std::mem::{zeroed}; use utils::{to_void_raw_ctx, to_void_raw_data, to_void_raw_dest}; #[repr(C)] #[allow(non_snake_case)] pub struct ShaSmallCont...
<|file_name|>coincontroldialog.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2011-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "coincontroldialog.h" #include "ui_coincontroldialog...
QAction *clipboardLowOutputAction = new QAction(tr("Copy dust"), this);
<|file_name|>test_localimport.py<|end_file_name|><|fim▁begin|>from nose.tools import * from localimport import localimport import os import sys modules_dir = os.path.join(os.path.dirname(__file__), 'modules') def test_localimport_with_autodisable(): sys.path.append(modules_dir) import another_module as mod_a t...
assert 'some_module' not in sys.modules
<|file_name|>call_manager.py<|end_file_name|><|fim▁begin|><|fim▁hole|>../../../../../share/pyshared/papyon/sip/call_manager.py<|fim▁end|>
<|file_name|>1572705844584-RemoveOldColumns.ts<|end_file_name|><|fim▁begin|>import {MigrationInterface, QueryRunner} from "typeorm";<|fim▁hole|>export class RemoveOldColumns1572705844584 implements MigrationInterface { name = 'RemoveOldColumns1572705844584' public async up(queryRunner: QueryRunner): Promise<an...
<|file_name|>test_140_lcmaps.py<|end_file_name|><|fim▁begin|>import osgtest.library.core as core import osgtest.library.files as files import osgtest.library.osgunittest as osgunittest class TestLcMaps(osgunittest.OSGTestCase): required_rpms = ['lcmaps', 'lcmaps-db-templates', 'vo-client', 'vo-client-lcmaps-voms'...
<|file_name|>pd.py<|end_file_name|><|fim▁begin|>## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2018 Max Weller ## Copyright (C) 2019 DreamSourceLab <support@dreamsourcelab.com> ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU Genera...
desc = 'Serial nonvolatile 1-Kbit EEPROM.' license = 'gplv2+' inputs = ['logic']
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- __all__ = [<|fim▁hole|> "test_svn", ] if __name__ == "__main__" : import doctest for i in __all__ : print ("%%-%ds: %%s" % (max(map(len, __all__)) + 1)) % ( i, doctest.testmod(__import__(i, None, ...
"test_config_db", "test_grid", "test_shell",
<|file_name|>0009_auto_20151128_1236.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0008_auto_20151124_1135'), ] operations = [ mig...
name='supplier', field=models.ForeignKey(related_name='supplier_services', to='core.Supplier'), ),
<|file_name|>UserType.py<|end_file_name|><|fim▁begin|>from sqlalchemy import Column, String, Integer from BusTrack.repository import Base, session from BusTrack.repository.models import STRING_LEN_SMALL class UserType(Base): __tablename__ = 'user_type' id = Column(Integer, primary_key=True) role_name = C...
session.add(parent) session.add(admin)
<|file_name|>script.py<|end_file_name|><|fim▁begin|># coding=utf8 <|fim▁hole|>import time from httplib2 import Http from logging import handlers LOG_FILE = '../logs/WSCN_client.log' handler = logging.handlers.RotatingFileHandler(LOG_FILE, maxBytes=1024 * 1024, backupCount=5) # 实例化handler handler.setFormatter(logging...
import random import logging import json
<|file_name|>exampleSelector.js<|end_file_name|><|fim▁begin|>const createImmutableEqualsSelector = require('./customSelectorCreator'); const compare = require('../util/compare'); const exampleReducers = require('../reducers/exampleReducers'); /** * Get state function */ const getSortingState = exampleReducers.getSor...
* @param {string} orderByCondition 'asc' or 'desc' * @return {List} immutable testing data source with sorting
<|file_name|>gae_settings.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2012 Adriano Monteiro Marques # # Author: Piotrek Wasilewski <wasilewski.piotrek@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Af...
<|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 /******/ if(inst...
var buffer = new Array(nBytes); var eLen = nBytes * 8 - mLen - 1; var eMax = (1 << eLen) - 1; var eBias = eMax >> 1;
<|file_name|>test_query.py<|end_file_name|><|fim▁begin|># Copyright 2014 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.org/licenses/LICENSE-2.0 # # Unl...
def test_fetch_defaults_w_client_attr(self): from google.cloud.datastore.query import Iterator
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>/* * @license Apache-2.0 * * Copyright (c) 2021 The Stdlib 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.apac...
* var len = list.length; * // returns 3 * * // Get the second node:
<|file_name|>request.go<|end_file_name|><|fim▁begin|>// Copyright 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.org/licenses/LICENSE-2.0 // // Unless...
<|file_name|>StatementExprList.java<|end_file_name|><|fim▁begin|>package org.aikodi.chameleon.support.statement; import org.aikodi.chameleon.core.declaration.Declaration; import org.aikodi.chameleon.core.element.ElementImpl; import org.aikodi.chameleon.core.lookup.DeclarationSelector; import org.aikodi.chameleon.core....
<|file_name|>atomic_template.hpp<|end_file_name|><|fim▁begin|>/* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2011 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2014 An...
<|file_name|>pasta_check_mbox.py<|end_file_name|><|fim▁begin|>""" PaStA - Patch Stack Analysis Copyright (c) OTH Regensburg, 2019 Author: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de> This work is licensed under the terms of the GNU GPL, version 2. See the COPYING file in the top-level directory. """ import os...
log.info('Processing %s' % args.range[0]) date_selector = get_date_selector(repo, None, 'AD')
<|file_name|>plot_cluster.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # spikeplot - plot_cluster.py # # Philipp Meier <pmeier82 at googlemail dot com> # 2011-09-29 # """scatter plot for clustering data""" __docformat__ = 'restructuredtext' __all__ = ['cluster'] ##---IMPORTS from .common import COLOURS...
colours=None, title=None, xlabel=None, ylabel=None, filename=None, show=True): """plot a set of clusters with different colors each
<|file_name|>socket_command.cpp<|end_file_name|><|fim▁begin|>// // The MIT License(MIT) // // Copyright(c) 2014 Demonsaw LLC // // 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 rest...
} // Tunnel const auto tunnel_list = client->get<tunnel_list_component>();
<|file_name|>drives.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2002-2015 The DOSBox Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or ...
<|file_name|>highlight.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/licen...
token::BinOp(token::And) if lexer.peek().sp.lo == next.sp.hi => "kw-2", token::At | token::Tilde => "kw-2", // consider this as part of a macro invocation if there was a
<|file_name|>tiny-slider.js<|end_file_name|><|fim▁begin|>var tns = (function (){ // keys if (!Object.keys) { Object.keys = function (object) { var keys = []; for (var name in object) { if (Object.prototype.hasOwnProperty.call(object, name)) { keys.push(name); ...
<|file_name|>issue-25145.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/lic...
// run-pass
<|file_name|>variantproperty.cpp<|end_file_name|><|fim▁begin|>/************************************************************************** ** ** This file is part of Qt Creator **<|fim▁hole|>** ** GNU Lesser General Public License Usage ** ** This file may be used under the terms of the GNU Lesser General Public ** Lice...
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Nokia Corporation (qt-info@nokia.com) **
<|file_name|>match-bot-fail.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<|fim▁hole|>// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or dist...
// 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
<|file_name|>element.ts<|end_file_name|><|fim▁begin|>import { propValues, isConstructor, initializeProps, parseAttributeValue, ICustomElement, ConstructableComponent, FunctionComponent, PropsDefinition, } from "./utils"; let currentElement: HTMLElement & ICustomElement; export function getCurrentElemen...
) as string | undefined; }
<|file_name|>pat-ref-enum.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<|fim▁hole|>// // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or t...
// http://rust-lang.org/COPYRIGHT.
<|file_name|>helpers.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity 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 ve...
use Server; use hash_fetch::urlhint::ContractClient;
<|file_name|>array.js<|end_file_name|><|fim▁begin|>module.exports.sum = function (arr, prop, exp) { var total = 0 for (var i = 0, _len = arr.length; i < _len; i++) { var value = arr[i][prop]; <|fim▁hole|> } else { total += value * 1; } } return total };<|fim▁en...
if (exp) { if (arr[i][exp.field] == exp.value) { total += value * 1; }
<|file_name|>test_cutlass.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 Ap...
if use_vm: rt_mod, dev, num_partition = profile_and_build_vm(mod, {}, sm) rt_mod_ref, dev = get_ref_vm(mod, {}, target=ref_target)
<|file_name|>send_message.rs<|end_file_name|><|fim▁begin|>use std::borrow::Cow; use std::ops::Not; use crate::requests::*; use crate::types::*; /// Use this method to send text messages.<|fim▁hole|>#[derive(Debug, Clone, PartialEq, PartialOrd, Serialize)] #[must_use = "requests do nothing unless sent"] pub struct Sen...
<|file_name|>generate_new_native_tests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 from shutil import copyfile import glob import os sql = './sql' expected = './expected' NEW_FILES = ['native_features'] for file in NEW_FILES: filelist = glob.glob(f"{sql}/*{file}.sql") for path in filelist: ...
BEGIN IF current_setting('server_version_num')::INT >= 100000 THEN SET session_replication_role TO replica;
<|file_name|>floating_k_statisctic.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <vector> #include <iterator> #include <queue> #include <functional> #include <algorithm> using std::cin; using std::cout; using std::vector; using std::swap; using std::less; using std::endl; using std::cerr; struct TNode...
<|file_name|>type.js<|end_file_name|><|fim▁begin|>declare var a: number; var b: typeof a = "...";<|fim▁hole|> type T = number; var x:T = "..."; // what about recursive unions?<|fim▁end|>
var c: typeof a = "...";
<|file_name|>Quiz.py<|end_file_name|><|fim▁begin|>print("In Python, what do you call a 'box' used to store data?") answer = input() if answer == "variable": print(" :) ") else: print(" :( ") print("Thank you for playing!") <|fim▁hole|>a - text b - variable c - a shoe box ''') answer = input().lower(...
print(''' Q1 - In Python, what do you call a 'box' used to store data?
<|file_name|>module_class.ts<|end_file_name|><|fim▁begin|>export class Klass { static x: number = 4; constructor(public n: number) {} <|fim▁hole|> return false; } }<|fim▁end|>
foo(): boolean {
<|file_name|>GetRenderedTaskFormCmd.java<|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 req...
public Object execute(CommandContext commandContext) { if (taskId == null) {
<|file_name|>SampleWSBareSEI.java<|end_file_name|><|fim▁begin|>/* * JBoss, Home of Professional Open Source. * Copyright 2006, Red Hat Middleware LLC, and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * *...
* published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. *
<|file_name|>consv.rs<|end_file_name|><|fim▁begin|>/// This module contains the following sub-modules: /// k /// ks /// ksl /// This module contains functions that work under the assumption that lattice /// momentum is conserved. pub mod k { use fnv::FnvHashMap; use num_complex::Complex; use b...
// correspond to Bloch function constituent configurations which // are mapped to single decimals that represent the leading states. let mut decs: FnvHashMap<BinaryBasis, Complex<f64>> =
<|file_name|>TableCellClassListTest.ts<|end_file_name|><|fim▁begin|>import { Assertions, Chain, GeneralSteps, Logger, Pipeline } from '@ephox/agar';<|fim▁hole|>import ModernTheme from 'tinymce/themes/modern/Theme'; UnitTest.asynctest('browser.tinymce.plugins.table.TableCellClassListTest', function () { const success...
import { UnitTest } from '@ephox/bedrock'; import { TinyApis, TinyLoader, TinyUi } from '@ephox/mcagar'; import TablePlugin from 'tinymce/plugins/table/Plugin';
<|file_name|>teamqueue.py<|end_file_name|><|fim▁begin|>################################################################ # LiveQ - An interactive volunteering computing batch system # Copyright (C) 2013 Ioannis Charalampidis # # This program is free software; you can redistribute it and/or # modify it under the terms o...
def processTeamQueue(): """ This should be called periodically to check and schedule jobs pending for the
<|file_name|>align.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright © 2010 University of Zürich # Author: Rico Sennrich <sennrich@cl.uzh.ch> # For licensing information, see LICENSE from __future__ import division,print_function,unicode_literals import sys import time import math f...
self.log(self.sources_out[i],3) self.log(self.targets_out[i],3)
<|file_name|>test_views.py<|end_file_name|><|fim▁begin|>import copy import csv import datetime import json import mock import os import re import shutil import tempfile import urllib import pyquery from cStringIO import StringIO from nose.tools import eq_, ok_, assert_raises from nose.plugins.skip import SkipTest fro...
def mocked_get(url, params, **options):
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md> //! FFI bindings to searchsdk.<|fim▁hole|>#![experimental] extern crate winapi; use winapi::*; extern "system" { }<|fim▁end|>
#![no_std]
<|file_name|>index.py<|end_file_name|><|fim▁begin|># # AFLTV XBMC Plugin # Copyright (C) 2013 Kagenoshin # # AFLTV 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...
ok = fill_media_list(items) except: # oops print error message print "ERROR: %s (%d) - %s" % (sys.exc_info()[2].tb_frame.f_code.co_name, sys.exc_info()[2].tb_lineno, sys.exc_info()[1])
<|file_name|>serializer.py<|end_file_name|><|fim▁begin|># Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
<|file_name|>operation.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python #-*- coding: utf-8 -*- ########################################################### # © 2011 Daniel 'grindhold' Brendle and Team # # This file is part of Skarphed. # # Skarphed is free software: you can redistribute it and/or # modify it under th...
@classmethod def retry_operation(cls,operation_id):
<|file_name|>socket_bio_adapter.cc<|end_file_name|><|fim▁begin|>// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "net/socket/socket_bio_adapter.h" #include <string.h> #include <algorithm> #in...
<|file_name|>contents.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python import logging, logtool from .page import Page from .xlate_frame import XlateFrame LOG = logging.getLogger (__name__) class Contents: @logtool.log_call def __init__ (self, canvas, objects): self.canvas = canvas self.objects = o...
def render (self): with Page (self.canvas) as pg:
<|file_name|>merge-funtoo-staging.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 import os import sys from merge_utils import * xml_out = etree.Element("packages") funtoo_staging_w = GitTree("funtoo-staging", "master", "repos@localhost:ports/funtoo-staging.git", root="/var/git/dest-trees/funtoo-staging", pull=Fal...
eclass_steps = [ SyncDir(funtoo_overlays["deadbeef_overlay"].root,"eclass"),
<|file_name|>test_contacts_data_compliance.py<|end_file_name|><|fim▁begin|>import re from models.contact import Contact def test_all_contacts_on_homepage(app, db): if app.contact.count() == 0: app.contact.add(Contact(first_name="Mister", last_name="Muster", mobile_phone="123", email_1="test@test.com")) ...
map(lambda x: clear(x), filter(lambda x: x is not None, [contact.home_phone, contact.mobile_phone, contact.work_phone]))))
<|file_name|>isprime.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # isprime.py # # Author: Billy Wilson Arante # Created: 2016/06/16 PHT # Modified: 2016/10/01 EDT (America/New York) from sys import argv def isprime(x):<|fim▁hole|> """ if x <= 1: return False for n i...
"""Checks if x is prime number Returns true if x is a prime number, otherwise false.
<|file_name|>test_weekday.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 ...
# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
<|file_name|>types.ts<|end_file_name|><|fim▁begin|>import { InjectionToken, TemplateRef } from '@angular/core'; import { Observable } from 'rxjs'; import { Portal } from '@angular/cdk/portal'; <|fim▁hole|>export type TooltipPosition = 'left' | 'right' | 'top' | 'bottom'; export type TooltipPositions = TooltipPosition...
<|file_name|>anoncoin_pt_PT.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="pt_PT" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Anoncoin Core</source> <translation>Sobr...
<|file_name|>canvas_ext.rs<|end_file_name|><|fim▁begin|>use crate::cache;<|fim▁hole|>use euclid::default::Point2D; use euclid::vec2; use vitral::Canvas; use vitral::{color, Align}; use world::Icon; /// Magog-specific extensions to Canvas API. pub trait CanvasExt { fn draw_entity(&mut self, pos: Point2D<i32>, icon:...
use crate::view::ScreenVector;
<|file_name|>Immediate.hh<|end_file_name|><|fim▁begin|>/* * emucpu -- Emulates processors * Copyright (C) 2009 Joseph Freeman (jfree143dev AT gmail DOT 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 ...
std::cerr << "Debug: class Immediate is read-only" << std::endl; return *this;
<|file_name|>XExpressionImpl.java<|end_file_name|><|fim▁begin|>/* * Copyright 2000-2014 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/licen...
<|file_name|>clients.js<|end_file_name|><|fim▁begin|>// Reset $('.touch .client-wrap').click(function(event){ var target = $( event.target ); if ( target.hasClass( "client-close" ) ) { $('.client-wrap div.client').addClass('reset'); } else{ $('.client-wrap div.client').removeClass('reset'); } })...
<|file_name|>model.py<|end_file_name|><|fim▁begin|># Copyright 2017 SAS Project 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...
return ehata_loss return itm_loss
<|file_name|>example-nrf24-recv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Example program to receive packets from the radio link # import virtGPIO as GPIO from lib_nrf24 import NRF24 import time pipes = [[0xe7, 0xe7, 0xe7, 0xe7, 0xe7], [0xc2, 0xc2, 0xc2, 0xc2, 0xc2]] radio2 = NR...
radio2.writeAckPayload(1, akpl_buf, len(akpl_buf))
<|file_name|>recording-job-created-event.js<|end_file_name|><|fim▁begin|>/** * Copyright 2016 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.org/...
* job recording. * @constructor * @extends {audioCat.utility.Event}
<|file_name|>util.js<|end_file_name|><|fim▁begin|>import { IS_DART, StringWrapper, isBlank, isPresent, isString, isArray } from 'angular2/src/facade/lang'; var CAMEL_CASE_REGEXP = /([A-Z])/g; var DASH_CASE_REGEXP = /-([a-z])/g; var SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g; var DOUBLE_QUOTE_ESCAPE_STRING_RE ...
if (isBlank(input)) { return null; }
<|file_name|>categories.ts<|end_file_name|><|fim▁begin|>import { CategoriesActions, CategoriesActionTypes } from '../actions'; export interface State { data: string[]; } const initialState: State = { data: [] }; export function reducer(state = initialState, action: CategoriesActions): State { switch (action.t...
}
<|file_name|>canvas.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::RGBA; use euclid::{Transform2D, Point2D, Vector...
pub x0: f64, pub y0: f64, pub x1: f64, pub y1: f64,
<|file_name|>toc_tree.go<|end_file_name|><|fim▁begin|>// This is free and unencumbered software released into the public // domain. For more information, see <http://unlicense.org> or the // accompanying UNLICENSE file. package navigator import ( "fmt" "go/ast" "go/parser" "go/token" "io/ioutil" "log" "os" "...
<|file_name|>searx.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- import unicodedata from urlparse import urlparse from threading import Thread import httplib, sys from Queue import Queue import itertools import codecs import csv import sys import ssl import re if len(sys.argv) < 3: pri...
def doQueries(): base = getNextBaseURL() while True:
<|file_name|>game.rs<|end_file_name|><|fim▁begin|>use rand::{thread_rng, Rng}; use sdl2::render; use sdl2::rect::Rect; use sdl2::keyboard::Keycode; use sdl2::pixels::Color; use basic2d::Vec2; use snake::{Snake, Move}; // Game structure pub struct Game { pub snakes: Vec<Snake>, fruit: Vec2<i32>, width: u...
/// Randomizes the position of the fruit pub fn new_fruit(&mut self) {
<|file_name|>domcrypt_worker.js<|end_file_name|><|fim▁begin|>/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtai...
} catch (ex) { log(ex);
<|file_name|>BookCaseViewService.java<|end_file_name|><|fim▁begin|>/** * (c) raptor_MVK, 2015. All rights reserved. */ package ru.mvk.biblioGuide.service; import org.jetbrains.annotations.NotNull; import ru.mvk.biblioGuide.dao.BookCaseDao; import ru.mvk.biblioGuide.model.BookCase; import ru.mvk.iluvatar.descriptor.L...
}
<|file_name|>mochaTest.js<|end_file_name|><|fim▁begin|>module.exports = { test: { src: [ 'test/vendor/assert.js', 'test/test-adapter.js', 'transpiled/tests.cjs.js' ],<|fim▁hole|> reporter: 'spec' } } };<|fim▁end|>
options: {
<|file_name|>etcd.go<|end_file_name|><|fim▁begin|>// Copyright 2018 PingCAP, 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/LICENSE-2.0 // /...
func (e *Client) Close() error { if err := e.client.Close(); err != nil { return errors.Trace(err) }
<|file_name|>p77_combinations.py<|end_file_name|><|fim▁begin|># author: Fei Gao # # Combinations # # Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. # For example, # If n = 4 and k = 2, a solution is: # [<|fim▁hole|># [1,3], # [1,4], # ] import itertools class Solution: ...
# [2,4], # [3,4], # [2,3], # [1,2],
<|file_name|>interfacewebservice.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from tg.configuration import AppConfig, config from tg import request from pollandsurvey import model from tgext.pyutilservice import Utility import logging log = logging.getLogger(__name__) from tgext.pylogservice import LogDBHan...
self.memberUser.id_voter = voter.id_voter self.memberUser.save() del user
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT)<|fim▁hole|> class PyEpydoc(PythonPackage): """Epydoc is a tool fo...
from spack import *
<|file_name|>BitWiseTrie2.hpp<|end_file_name|><|fim▁begin|>// // BitWiseTrie.hpp // Scissum // // Created by Marten van de Sanden on 12/1/15. // Copyright © 2015 MVDS. All rights reserved. // #ifndef BitWiseTrie_hpp #define BitWiseTrie_hpp #include <vector> //#include <iostream> #include <cstring> #define __SCIS...
<|file_name|>test_unsubscribe_from_list.py<|end_file_name|><|fim▁begin|># Copyright 2022 Camptocamp SA (https://www.camptocamp.com). # @author Iván Todorovich <ivan.todorovich@camptocamp.com> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from lxml import etree from odoo.tests import HttpCase, tagge...
def test_subscription_email_unsubscribe_from_list(self):
<|file_name|>MavenArtifactExclusion.java<|end_file_name|><|fim▁begin|>/* * 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 option) any la...
public boolean isValid(String value) {
<|file_name|>LoginInfoReqParam.java<|end_file_name|><|fim▁begin|>package com.vk.libs.appcommontest.gankio.mvp.data.requestbody; /** * Created by VK on 2017/2/8.<br/> * - 登录 */ public class LoginInfoReqParam { /* URL: /user/login.action param: { account: ‘admin’, password: ‘admin123’ ...
public void setJ_os_version(String j_os_version) { this.j_os_version = j_os_version; }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2022 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.apache.o...
"""Keras models API.""" # pylint: disable=g-bad-import-order
<|file_name|>str-idx.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/license...
let s = "hello".to_owned();
<|file_name|>IsSubsequence.py<|end_file_name|><|fim▁begin|>__source__ = 'https://leetcode.com/problems/is-subsequence/description/' # https://github.com/kamyu104/LeetCode/blob/master/Python/is-subsequence.py # Time: O(n) # Space: O(1) # # Description: Leetcode # 392. Is Subsequence # # Given a string s and a string t,...
class Solution {
<|file_name|>issue_2316_b.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.o...
use issue_2316_a::*;
<|file_name|>ifThereIsALotOfLight.js<|end_file_name|><|fim▁begin|>/*global require */ 'use strict'; var _ = require('lodash'), utils = require('./../build-utils'), StatementInputBloq = require('./../statementInputBloq'); /** * Bloq name: mbot-ifthereisalotoflight * * Bloq type: Statement-Input * * Descri...
utils.preprocessBloq(bloqMBotIfThereIsALotOfLight);
<|file_name|>transport.js<|end_file_name|><|fim▁begin|>/*! * socket.io-node * Copyright(c) 2011 LearnBoost <dev@learnboost.com> * MIT Licensed */ /** * Module dependencies. */ var parser = require('./parser'); /** * Expose the constructor. */ exports = module.exports = Transport; /** * Transport construct...
<|file_name|>two_sum.py<|end_file_name|><|fim▁begin|>class Solution(object): def twoSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ inspected_dict = {} for i, num in enumerate(nums): try: ...
return j+1, i+1 except KeyError:
<|file_name|>bitcoin_fr_CA.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="fr_CA" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About LogiCoin</source> <translation>Au sujet d...
<location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation>Formulaire</translation>
<|file_name|>Item.java<|end_file_name|><|fim▁begin|>package com.github.messenger4j.send.message.template.receipt; import static java.util.Optional.empty; import java.net.URL; import java.util.Optional; import lombok.EqualsAndHashCode; import lombok.NonNull; import lombok.ToString; /** * @author Max Grabenhorst * @...
@ToString @EqualsAndHashCode public final class Item {
<|file_name|>set.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LI...
#[stable(feature = "rust1", since = "1.0.0")] pub fn difference<'a>(&'a self, other: &'a BTreeSet<T>) -> Difference<'a, T> { Difference{a: self.iter().peekable(), b: other.iter().peekable()}
<|file_name|>path.py<|end_file_name|><|fim▁begin|>"""A zigzag path, a sequence of points.""" import collections from .defuzz import Defuzzer from .euclid import collinear, Point, Line, Segment, Bounds, EmptyBounds from .postulates import adjacent_pairs, triples class Path: def __init__(self, points): se...
seg = Segment(*points[[None, -2][end]:[2, None][end]]) cuts = [pt for t in trimmers for pt in seg_path_intersections(seg, t)] if cuts: cuts = seg.sort_along(cuts)
<|file_name|>routes.js<|end_file_name|><|fim▁begin|><|fim▁hole|>routes.$inject = ['$stateProvider', '$urlRouterProvider']; export default function routes($stateProvider, $urlRouterProvider){ $stateProvider.state('main.item', { url: '/:id/item', template: template, controllerAs: 'ctrl', controller: controlle...
import controller from './controller'; import template from './template.pug';
<|file_name|>abstractMethodDocStringIndentationPreserved.py<|end_file_name|><|fim▁begin|>class A: pass class B(A):<|fim▁hole|> """ Parameters: x (int): number """ return x<|fim▁end|>
def m(self, x):
<|file_name|>ccloud_lib.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2020 Confluent 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/licen...
<|file_name|>SMPPSessionState.java<|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 b...
* @param sessionContext the session context. * @param pduHeader is the PDU header. * @param pdu is the complete PDU.
<|file_name|>GhostGlassPane.java<|end_file_name|><|fim▁begin|>package helper; import java.awt.AlphaComposite; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import java.awt.image.BufferedImage; import javax.swing.JPanel; public class GhostGlassPane extends JPanel { private ...
<|file_name|>test_run.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from preggy import expect import click from click.testing import CliRunner from terrible.run import compile_template from tests.base import TestCase import os class CompileTemplateTestCase(TestCase): def test_com...
result = runner.invoke(compile_template, [ '--template', template,
<|file_name|>server-selector.service.ts<|end_file_name|><|fim▁begin|>import { injectable, inject } from "inversify"; import { TYPES } from "../ioc/types"; const cacheKey = "AleksaDiscordServerSelection"; @injectable() export class ServerSelectorService { constructor( @inject(TYPES.IConfig) private _config: ICon...
export interface IServer {