prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>fixedheader.html.py<|end_file_name|><|fim▁begin|>XXXXXXXXX XXXXX XXXXXX XXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXX X XXXXXXXXXXX X...
XXXXXXXXXXXXXXXX
<|file_name|>feature_stream.go<|end_file_name|><|fim▁begin|>package jsoniter import ( "io" ) // Stream is a io.Writer like object, with JSON specific write functions. // Error is not returned as return value, but stored as Error member on this stream instance. type Stream struct { cfg *frozenConfig out ...
if stream.Error != nil { return } if stream.Available() < 1 {
<|file_name|>TaskLogo.js<|end_file_name|><|fim▁begin|>/* ************************************************************************ Copyright: 2009 OETIKER+PARTNER AG License: GPLv3 or later Authors: Tobi Oetiker <tobi@oetiker.ch> Utf8Check: äöü ************************************************************...
<|file_name|>imagemagnifieridevice.py<|end_file_name|><|fim▁begin|># =========================================================================== # eXe # Copyright 2004-2006, University of Auckland # Copyright 2004-2008 eXe Project, http://eXeLearning.org/ # # This program is free software; you can redistribute it and/...
self._glassSizeInstruc = x_(u"""Select the size of the magnifying glass""") self.systemResources += ['mojomagnify.js'] # Properties
<|file_name|>stars.rs<|end_file_name|><|fim▁begin|>// +--------------------------------------------------------------------------+ // | Copyright 2016 Matthew D. Steele <mdsteele@alum.mit.edu> | // | | // | This file is part of Sys...
yoff += spacing as i32;
<|file_name|>event_ring.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use data_model::DataInit; use remain::sorted; use std::mem::size_of; use std::sync::atomic::{fe...
segment_table_base_address: GuestAddress, current_segment_index: u16, trb_count: u16,
<|file_name|>core_connector.ts<|end_file_name|><|fim▁begin|>/** * core_connector.ts * * Handles all connection and communication with the uProxy core. */ /// <reference path='../../../../third_party/typings/es6-promise/es6-promise.d.ts' /> import uproxy_core_api = require('../../interfaces/uproxy_core_api'); impor...
// Also we may want to reject promises after some timeout. this.mapPromiseIdToFulfillAndReject_[promiseId] = { fulfill: fulfillFunc, reject: rejectFunc
<|file_name|>styles.ts<|end_file_name|><|fim▁begin|>/* eslint-disable import/named */ import styled, {DefaultTheme, StyledComponent} from 'styled-components' import {Card} from '@sanity/ui' import {fileTarget} from '../../common/fileTarget' import {withFocusRing} from '../../../components/withFocusRing' export type {...
<|file_name|>gae_sample.py<|end_file_name|><|fim▁begin|># Copyright 2020 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
# distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
<|file_name|>loader.py<|end_file_name|><|fim▁begin|># vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2018-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU...
"""
<|file_name|>bitcoin_hr.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="hr" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About YardSaleCoin</source...
<message> <location line="+5"/>
<|file_name|>network.py<|end_file_name|><|fim▁begin|>import matplotlib.pyplot as plt import numpy as np import os import time import yaml from sklearn.learning_curve import learning_curve from keras.layers.core import Dense, Activation, Dropout from keras.layers.recurrent import LSTM from keras.models import Sequentia...
:param model: the model to be used for prediction
<|file_name|>BFTMapList.java<|end_file_name|><|fim▁begin|>/** Copyright (c) 2007-2013 Alysson Bessani, Eduardo Alchieri, Paulo Sousa, and the authors indicated in the @author tags Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may ob...
public boolean addData(String tableName, String value) { List <String> list = tableList.get(tableName); return list.add(value);
<|file_name|>ui.py<|end_file_name|><|fim▁begin|>from enigma import ePicLoad, eTimer, getDesktop, gMainDC, eSize from Screens.Screen import Screen from Tools.Directories import resolveFilename, pathExists, SCOPE_MEDIA, SCOPE_CURRENT_SKIN from Components.Pixmap import Pixmap, MovingPixmap from Components.ActionMap impo...
"left": self.prevPic,
<|file_name|>ptr_offset.rs<|end_file_name|><|fim▁begin|>extern crate crucible; use std::ptr; use crucible::*;<|fim▁hole|>use crucible::method_spec::{MethodSpec, MethodSpecBuilder, clobber_globals}; fn f(ptr: *mut u8) { unsafe { ptr::swap(ptr, ptr.add(1)) }; } #[crux_test] fn f_test() { clobber_globals(); ...
<|file_name|>previewAdapterSpec.js<|end_file_name|><|fim▁begin|>/* jshint unused: false */ /* global beforeEach, afterEach */ /* global describe, it, expect, jasmine */ /* global runs, spyOn, waitsFor, waits */ /* global window, eb, loadFixtures, document */ /* global $, _, d3*/ /* global describeInterface, describeInt...
var toPatch = {_id: 1},
<|file_name|>send_second_level_links.js<|end_file_name|><|fim▁begin|>// Copyright OpenLogic, Inc. // See LICENSE file for license information. // var totalRequests = 0; // First check the MIME type of the URL. If it is the desired type, then make // the AJAX request to get the content (DOM) and extract the relevant ...
function follow_html_mime_type(url) { var xhr = new XMLHttpRequest(); xhr.open('HEAD', url);
<|file_name|>selecting_stuff.py<|end_file_name|><|fim▁begin|># Copyright 2009-2014 Ram Rachum. # This program is distributed under the MIT license. ''' This module defines scripts for selecting stuff. See their documentation for more information. ''' from __future__ import with_statement import bisect import re imp...
def _is_whitespaceless_name(string): '''Is `string` a whitespace-less name?''' assert isinstance(string, str)
<|file_name|>file_tests.py<|end_file_name|><|fim▁begin|>""" SoftLayer.tests.CLI.modules.file_tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :license: MIT, see LICENSE for more details. """ from SoftLayer import exceptions from SoftLayer import testing import json import mock class FileTests(testing.TestC...
self.assertEqual('Error occurred while creating snapshot.\n' 'Ensure volume is not failed over or in another '
<|file_name|>ReplayFileConfigDlg.cpp<|end_file_name|><|fim▁begin|>/* * This program 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 Foundation, either version 3 of the License, or * (at your option) any lat...
} else
<|file_name|>al_VideoCapture.cpp<|end_file_name|><|fim▁begin|>#include "allocv/al_VideoCapture.hpp" /* From opencv2/highgui/highgui.hpp: class CV_EXPORTS_W VideoCapture { public: CV_WRAP VideoCapture(); CV_WRAP VideoCapture(const string& filename); CV_WRAP VideoCapture(int device); virtual ~VideoCapt...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" PHCpy --- a package for Polynomial Homotopy Continuation ======================================================== PHCpy is a collection of Python modules to compute solutions of polynomial systems using PHCpack. A homotopy defines the deformation of a start sy...
Available modules
<|file_name|>dynamic_factor.py<|end_file_name|><|fim▁begin|>""" Dynamic factor model Author: Chad Fulton License: Simplified-BSD """ from __future__ import division, absolute_import, print_function from warnings import warn from statsmodels.compat.collections import OrderedDict import numpy as np import pandas as pd...
if exog is None: raise ValueError('Out-of-sample forecasting in a model' ' with a regression component requires' ' additional exogenous values via the'
<|file_name|>jhelum.py<|end_file_name|><|fim▁begin|># Third-party import numpy as np import astropy.units as u import astropy.coordinates as coord from astropy.coordinates import frame_transform_graph from astropy.coordinates.matrix_utilities import matrix_transpose __all__ = ["JhelumBonaca19"] class JhelumBonaca19...
""" Compute the transformation from heliocentric Jhelum coordinates to spherical ICRS. """
<|file_name|>xrtest.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/. */ /* This Source Code Form is subject to the terms of the Mozil...
return p; },
<|file_name|>server.js<|end_file_name|><|fim▁begin|>// Init ES2015 + .jsx environments for .require()<|fim▁hole|>require('babel-register'); var express = require('express'); var fluxexapp = require('./fluxexapp'); var serverAction = require('./actions/server'); var fluxexServerExtra = require('fluxex/extra/server'); v...
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># e Django settings for dss project. import os import mimetypes from django.core.urlresolvers import reverse_lazy import djcelery from django.conf import global_settings from dss import logsettings from utils import here from localsettings import * from...
<|file_name|>ramp.py<|end_file_name|><|fim▁begin|># Copyright 2015 TellApart, 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 # # Unles...
def linear(start_time, end_time, as_of): if start_time >= as_of:
<|file_name|>test_runner.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Run fuzz test targets. """ from concurrent.fu...
os.path.join(build_dir, 'src', 'test', 'fuzz', 'fuzz'), '-runs=1', corpus_path,
<|file_name|>problem_9.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,<|fim▁hole|># There exists exactly one Pythagorean triplet for which a + b + c = 1000. # Find the product abc. def resolve(n): for a in range(1, n / 2 - 2)...
# # a² + b² = c² # For example, 3² + 4² = 9 + 16 = 25 = 52. #
<|file_name|>svn_utils.py<|end_file_name|><|fim▁begin|>import os import re import sys from distutils import log import xml.dom.pulldom import shlex import locale import codecs import unicodedata import warnings from setuptools.compat import unicode from setuptools.py31compat import TemporaryDirectory from x...
if sys.version_info < (3, 0): #shlex handles NULLs just fine and shlex in 2.7 tries to encode #as ascii automatiically line = line.encode('utf-8')
<|file_name|>collections.py<|end_file_name|><|fim▁begin|>import logging from datetime import datetime from collections import defaultdict from servicelayer.jobs import Job from aleph.core import db, cache from aleph.authz import Authz from aleph.queues import cancel_queue, ingest_entity, get_status from aleph.model im...
def aggregate_model(collection, aggregator):
<|file_name|>hello.py<|end_file_name|><|fim▁begin|>from helper import greeting<|fim▁hole|><|fim▁end|>
if "__name__" == "__main__": greeting('hello')
<|file_name|>DistrhoPluginLV2export.cpp<|end_file_name|><|fim▁begin|>/* * DISTRHO Plugin Framework (DPF) * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above ...
#endif
<|file_name|>daterangepicker.js<|end_file_name|><|fim▁begin|>/** * @version: 1.0.1 * @author: Dan Grossman http://www.dangrossman.info/ * @date: 2012-08-20 * @copyright: Copyright (c) 2012 Dan Grossman. All rights reserved. * @license: Licensed under Apache License v2.0. See http://www.apache.org/licenses/LICENSE-...
<|file_name|>babylon.geometryBufferRenderer.ts<|end_file_name|><|fim▁begin|>module BABYLON { export class GeometryBufferRenderer { private _scene: Scene; private _multiRenderTarget: MultiRenderTarget; private _effect: Effect; private _ratio: number; private _cachedDef...
attribs.push(VertexBuffer.MatricesIndicesKind);
<|file_name|>premium.js<|end_file_name|><|fim▁begin|>jQuery( document ).ready( function() { jQuery( '#lightslider' ).lightSlider({ item: 1, autoWidth: false, slideMove: 1, // slidemove will be 1 if loop is true slideMargin: 10, addClass: '', mode: "slide", useCSS: true, cssEasing: 'ease', //'cubic-bez...
vertical:false, verticalHeight:500,
<|file_name|>vote_genesis.rs<|end_file_name|><|fim▁begin|>//this module spits out a structured vote as json data //save the vote to a file use safex::genesis::key_generation::KeyPair; use utils::get_address_methods::OmniList; use utils::dirs::{make_app_root_dir, touch}; use voting::poll_genesis::PollRound; use voti...
impl VotePersona {
<|file_name|>test_warnings.rs<|end_file_name|><|fim▁begin|>use robotparser::parser::{parse_robots_txt, WarningReason}; use std::convert::From; use url::{Host, Origin}; #[derive(PartialEq, Eq, Debug, Clone)] enum WarningReasonKind { InvalidDirectiveFormat, DirectiveKeyIsEmpty, UnsupportedDirectiveKey, U...
validate_warnings(input, &[WarningReasonKind::UserAgentCannotBeEmpty]); let input = "\t User-Agent\t :\t ";
<|file_name|>test_vec.py<|end_file_name|><|fim▁begin|>import moose foo = moose.Pool('/foo1', 500)<|fim▁hole|><|fim▁end|>
bar = moose.vec('/foo1') assert len(bar) == 500
<|file_name|>test_refcounts.py<|end_file_name|><|fim▁begin|>import unittest import ctypes import gc MyCallback = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int) OtherCallback = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_ulonglong) import _ctypes_test dll = ctypes.CDLL(_ctypes_test.__file__) class RefcountTes...
self.assertEqual(sys.getrefcount(ctypes.c_int), a)
<|file_name|>article_reducer.tsx<|end_file_name|><|fim▁begin|>import { combineReducers } from 'redux'; import { RECEIVED_ARTICLE, RECEIVED_ARTICLE_COMMENTS, CLEAN_DATA, ListAction } from '../actions/news_action'; <|fim▁hole|>function article(state: object={},action: ListAction<object[]|string>){ switch(action.type){ ...
<|file_name|>enum-alignment.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT.<|fim▁hole|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apa...
//
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import eachWeekendOfInterval from '../eachWeekendOfInterval/index.js'; import startOfMonth from '../startOfMonth/index.js'; import endOfMonth from '../endOfMonth/index.js'; import requiredArgs from '../_lib/requiredArgs/index.js'; /** * @name eachWeekendOfMonth * @ca...
var endDate = endOfMonth(dirtyDate); return eachWeekendOfInterval({
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># Copyright The IETF Trust 2007, All Rights Reserved # Django settings for ietf project. # BASE_DIR and "settings_local" are from # http://code.djangoproject.com/wiki/SplitSettings import os try: import syslog syslog.openlog("datatracker", syslog.LOG_PID, ...
('Robert Sparks', 'rjsparks@nostrum.com'), ('Ole Laursen', 'olau@iola.dk'),
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # from django.urls import path <|fim▁hole|> path('login/complete/', views.OpenIDLoginCompleteView.as_view(), name='openid-login-complete'), ]<|fim▁end|>
from . import views urlpatterns = [ path('login/', views.OpenIDLoginView.as_view(), name='openid-login'),
<|file_name|>mkart.rs<|end_file_name|><|fim▁begin|>extern crate jiyunet_core as core; extern crate jiyunet_dag as dag; #[macro_use] extern crate clap; use std::fs; use std::io::Read; use core::io::BinaryComponent; use core::sig::Signed; use dag::artifact; use dag::segment; mod util; fn main() { let matches = ...
<|file_name|>expression.rs<|end_file_name|><|fim▁begin|>use token::Token; use token_offset::TokenOffset; use operator::Operator; use operator_offset::OperatorOffset;<|fim▁hole|> use std::fmt; #[derive(Debug, Clone, PartialEq)] pub enum Expression { List(Vec<Expression>), Value(OperatorOrToken), } impl fmt::Di...
use operator_or_token::OperatorOrToken; use context::Context; use error::{Result, SassError, ErrorKind}; use expression_evaluator::ExpressionEvaluator;
<|file_name|>unify.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/lice...
None => None,
<|file_name|>language.ts<|end_file_name|><|fim▁begin|><!DOCTYPE TS><TS> <context> <name>LanguageSettings</name> <message> <source>English</source> <translation>Angļu</translation> </message> <message> <source>default</source> <translation>noklusētā</translation> </mes...
without saving the Data.&lt;br&gt;&lt;br&gt;Go on?&lt;/qt&gt;</source> <translation>&lt;qt&gt;Uzmanību, mainot valodu visi logi tiks aizvērti nesaglabājot datus.&lt;br&gt;&lt;br&gt;Turpināt?&lt;/qt&gt;</translation> </message>
<|file_name|>0004_auto_20160905_0938.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def port_models(apps, schema_editor): Proposal = apps.get_model('core', 'Proposal') Notice = apps.get_model('core', 'Notice') n = N...
('core', '0003_proposaldate'),
<|file_name|>byext.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python """Show file statistics by extension.""" import os import sys class Stats: def __init__(self): self.stats = {} def statargs(self, args): for arg in args: if os.path.isdir(arg):<|fim▁hole|> s...
self.statdir(arg) elif os.path.isfile(arg):
<|file_name|>MeteorIndexResponseWrapper.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright 2002 National Student Clearinghouse * * This code is part of the Meteor system as defined and specified * by the National Student Clearinghouse and...
<|file_name|>EPGMEdge.java<|end_file_name|><|fim▁begin|>/* * This file is part of Gradoop. * * Gradoop 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 optio...
* but WITHOUT ANY WARRANTY; without even the implied warranty of
<|file_name|>Build.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from precious import db from datetime import datetime class Build(db.Model): __tablename__ = 'builds' id = db.Column(db.Integer, primary_key=True, unique=True) project_id = db.Column(db.Integer, db.ForeignKey('projects.id'))<|fim...
<|file_name|>pipeobject.py<|end_file_name|><|fim▁begin|># This file is a part of pysnapshotd, a program for automated backups # Copyright (C) 2015-2016 Jonas Thiem # # 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...
self.access_mutex.release()
<|file_name|>verify-mksnapshot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from __future__ import print_function import argparse import glob import os import platform import shutil import subprocess import sys from lib.util import get_electron_branding, rm_rf, scoped_cwd PROJECT_NAME = get_electron_branding...
context_snapshot = 'v8_context_snapshot.bin' if platform.system() == 'Darwin':
<|file_name|>LayerObjectFieldTemplate.js<|end_file_name|><|fim▁begin|>import React from "react"; import PropTypes from "prop-types"; import Box from "grommet/components/Box"; import Paragraph from "grommet/components/Paragraph"; import Label from "grommet/components/Label"; import FormLayer from "../components/FormLa...
{this.props.description ? (
<|file_name|>edit-rule.component.ts<|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 require...
<|file_name|>test_cluster_runner_config.py<|end_file_name|><|fim▁begin|>from genty import genty, genty_dataset import sys from app.master.atomizer import Atomizer from app.master.job_config import ConfigValidationError from app.master.cluster_runner_config import ClusterRunnerConfig, ConfigParseError from test.framewo...
- - # some YAML comment -
<|file_name|>edicao-novo.resolver.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { of } from 'rxjs'; import { Resolve, ActivatedRouteSnapshot } from '@angular/router'; import { catchError } from 'rxjs/operators';<|fim▁hole|> @Injectable() export class EdicaoNovoResolverServi...
import { CatalogoService } from './catalogo.service';
<|file_name|>audio_settings_page.py<|end_file_name|><|fim▁begin|>import fsui<|fim▁hole|>from launcher.settings.settings_page import SettingsPage from system.prefs.components.notworking import PrefsNotWorkingWarningPanel class AudioSettingsPage(SettingsPage): def __init__(self, parent: Widget) -> None: sup...
from fswidgets.widget import Widget from launcher.i18n import gettext from launcher.option import Option
<|file_name|>data.js<|end_file_name|><|fim▁begin|>// Get User's Coordinate from their Browser window.onload = function() { // HTML5/W3C Geolocation if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(UserLocation); } // Default to Washington, DC else NearestCity(38.8951, -77.0367); }...
["2319","Holzkirchen","47.882278","11.69615","685","Bayern"], ["2324","Holzminden-Silberborn","51.765853","9.544662","440","Niedersachsen"], ["2480","Kahl/Main","50.064313","8993","107","Bayern"],
<|file_name|>binary_frame.go<|end_file_name|><|fim▁begin|>// binary_frame.go /* Binary Frame Tool. Version: 0.1.1. Date of Creation: 2018-01-28. Author: McArcher. This is a simple Tool which draws a binary Frame around the Content. A Frame consists of logical Ones (1) and has a Spacer of Zeroes (0). So, --...
} i++
<|file_name|>take.ts<|end_file_name|><|fim▁begin|>import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError'; import { empty } from '../observable/empty'; import { Observable } from '../Observable'; import { MonoTypeOpera...
<|file_name|>display-main-image.pipe.ts<|end_file_name|><|fim▁begin|>import {Pipe, PipeTransform} from '@angular/core';<|fim▁hole|>import { Images } from '../../../../both/collections/images.collection'; import { Track } from '../../../../both/models/track.model'; @Pipe({ name: 'displayMainImage' }) export class Dis...
<|file_name|>variant.rs<|end_file_name|><|fim▁begin|>use vtable::VTable; use variant_ref::VariantRef; use variant_ref_mut::VariantRefMut; use std::any::{Any, TypeId}; use std::fmt::{Debug, Display, Error as FmtError, Formatter}; use std::ops::Deref; pub struct Variant<'a> { pub data: *mut (), pub vtable: &'a V...
<|file_name|>sqlite_filesystem.cpp<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2014-present, The osquery authors * * This source code is licensed as defined by the LICENSE file found in the * root directory of this source tree. * * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only) */ #include <string> ...
if (argc > 2) { const char* escape_symbol_string = reinterpret_cast<const char*>(sqlite3_value_text(argv[2])); if (escape_symbol_string == NULL ||
<|file_name|>models.py<|end_file_name|><|fim▁begin|># quick_info/models.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- # Diagrams here: https://docs.google.com/drawings/d/1fEs_f2-4Du9knJ8FXn6PQ2BcmXL4zSkMYh-cp75EeLE/edit from ballot.models import OFFICE, CANDIDATE, POLITICIAN, MEASURE, KIND_OF_BALLOT...
handle_record_found_more_than_one_exception(e, logger=logger) error_result = True
<|file_name|>convertTupleWithoutParenthesesToList.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
xs = 1<caret>, 2
<|file_name|>platform.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------...
while (this.toBeInstantiated.length > 0) {
<|file_name|>configurationGui.py<|end_file_name|><|fim▁begin|>''' ' configurationGui.py ' Author: Iker Pedrosa ' ' License: ' This file is part of orderedFileCopy. ' ' orderedFileCopy is free software: you can redistribute it and/or modify ' it under the terms of the GNU General Public License as published by...
if self.localUsbState.get() == 1:
<|file_name|>test.js<|end_file_name|><|fim▁begin|><|fim▁hole|>var assert = require('assert') var d = new Deferred() var t = require('tap') t.match(d, { resolve: Function, reject: Function, promise: Object })<|fim▁end|>
var Deferred = require('./')
<|file_name|>ghdata-api-client.js<|end_file_name|><|fim▁begin|>/* SPDX-License-Identifier: MIT */ /** * Handles interaction with a GHData server. * @constructor */ function GHDataAPIClient (apiUrl, owner, repo, apiVersion) { this.owner = owner || ''; this.repo = repo || ''; this.url = apiUrl; this.apiversio...
return this.get('timeseries/contributions', params); }; /**
<|file_name|>step_interact.js<|end_file_name|><|fim▁begin|>function OpenReportOperations() { $("#report-operations-div").show(); $("#page-operations-div").hide(); $("#events-operations-div").hide(); $("#editandsave-operations-div").hide(); $("#report-operations-li").addClass('active'); $('#page...
$("#selected-catogory-button").html("Page operations"); }
<|file_name|>test_checkout.py<|end_file_name|><|fim▁begin|>import pytest from django.conf import settings from django.contrib.auth.models import AnonymousUser from mock import MagicMock, Mock from prices import Price from saleor.checkout import views from saleor.checkout.core import STORAGE_SESSION_KEY, Checkout from ...
assert response.status_code == status_code assert response.url == url
<|file_name|>service.rs<|end_file_name|><|fim▁begin|>// TODO (CM): Take another look at the public exports of this module // (specifically, `pub mod spec`, and the various `pub use` // statements. Playing fast-and-loose with our imports has led to code // that's more confusing that it probably needs to be. // TODO (CM...
gateway_state, health_check_handle: None, post_run_handle: None,
<|file_name|>expressions.py<|end_file_name|><|fim▁begin|>""" Contains all elements of this package. They act as the formal elements of the law. """ import json import sys def from_json(data): """ Reconstructs any `BaseElement` from its own `.as_json()`. Returns the element. """ def _decode(data_dict):...
@property def title(self):
<|file_name|>GetAllUsersDatabaseAction.java<|end_file_name|><|fim▁begin|>package org.bimserver.database.actions; /****************************************************************************** * Copyright (C) 2009-2019 BIMserver.org * * This program is free software: you can redistribute it and/or modify * it un...
}
<|file_name|>MethodMissingClass.js<|end_file_name|><|fim▁begin|>export default class MethodMissingClass { constructor() { const handler = { get: this._handleMethodMissing }; return new Proxy(this, handler); } _handleMethodMissing(target, name, receiver) { const origMethod = target[name]; ...
if (Reflect.has(target, name) || name === "methodMissing") { return Reflect.get(target, name, receiver); }
<|file_name|>test.py<|end_file_name|><|fim▁begin|>import numpy as np mecanum_matrix = np.matrix([ [+1, +1, +1, +1], # Unitless! Shooting for rad/s [+1, -1, +1, -1], # Unitless! Shooting for rad/s [+1, +1, -1, -1], # Unitless! Shooting for rad/s # [+1, -1, -1, +1], # This is the error row (May not b...
print np.linalg.lstsq(mecanum_matrix, v_target)[0]
<|file_name|>particle.rs<|end_file_name|><|fim▁begin|>use crate::numeric::StateVector; use crate::typenum::consts::{U1, U2, U3}; use crate::typenum::{Exp, Pow, Prod, Same, Unsigned}; use diffgeom::coordinates::{ConversionTo, CoordinateSystem, Point}; use diffgeom::inner; use diffgeom::metric::MetricSystem; use diffgeom...
<|file_name|>code.py<|end_file_name|><|fim▁begin|># All-Terrain-Life-Vest All Terrain Life Vest- IEA Raspverry Pi Competition Entry # Description import RPi.GPIO as GPIO import time import os GPIO.setmode (GPIO.BCM) GPIO.cleanup() GPIO.setwarnings(False) GPIO.setup(17,GPIO.OUT) GPIO.setup(04,GPIO.OUT) GPIO.setup(2...
print("air bag NOT activated") time.sleep(1)
<|file_name|>resources.index.js<|end_file_name|><|fim▁begin|>jQuery(document).ready(function ($) { const $resourcesTable = $('#resources-table'); $resourcesTable.find('tbody tr:not(.sub-table-header)').hide(); $resourcesTable.find('.sub-table-header').click(function () { $(this).nextUntil('tr.sub-t...
allVisibleChecked = visibleLength > 0 && visibleLength === $resourcesTable.find('tbody tr.selected:visible').length;
<|file_name|>supertest-as-promised.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for SuperTest as Promised v2.0.2 // Project: https://github.com/WhoopInc/supertest-as-promised // Definitions by: Tanguy Krotoff <https://github.com/tkrotoff> // Definitions: https://github.com/borisyankov/DefinitelyTyped /// <ref...
import * as superagent from 'superagent'; import * as PromiseBluebird from 'bluebird';
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>pub trait Summary { fn summarize(&self) -> String; } pub struct NewsArticle { pub headline: String, pub location: String, pub author: String, pub content: String, } impl Summary for NewsArticle { fn summarize(&self) -> String { format!("...
<|file_name|>client.py<|end_file_name|><|fim▁begin|>############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation fi...
###############################################################################
<|file_name|>lines.rs<|end_file_name|><|fim▁begin|>use super::{HorizontalAlign, SectionGlyph, SectionText, VerticalAlign}; use crate::{linebreak::LineBreaker, words::*}; use ab_glyph::*; use std::iter::{FusedIterator, Iterator, Peekable}; /// A line of `Word`s limited to a max width bound. #[derive(Default)] pub(crate...
// implement v-aligns when they're are supported let screen_left = match h_align { HorizontalAlign::Left => point(screen_position.0, screen_position.1), // - Right alignment attained from left by shifting the line
<|file_name|>lng.js<|end_file_name|><|fim▁begin|>// languages index var localeIndex = { "en" : 0, "ja" : 1, "es" : 2, "hu" : 3, "lt" : 4, "ru" : 5, "it" : 6, "pt" : 7, "sp_ch" : 8, "fr" : 9, "ge" : 10, "ua" : 11, "lv" : 12, "no" : 13, "pt_br" : 14<|fim▁hole|><|fim▁end|>
};
<|file_name|>findOverlapGene.py<|end_file_name|><|fim▁begin|>import subprocess import os.path import re import argparse import sys from pybedtools import BedTool<|fim▁hole|> parser = argparse.ArgumentParser(description="find overlap gene.", formatter_class=argparse.ArgumentDefaultsHelpF...
DEBUG = False
<|file_name|>issue-33185.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
<|file_name|>upconvertCoordinates.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from argparse import ArgumentParser from collections import defaultdict import sys import os from sonLib.bioio import cigarRead, cigarWrite, getTempFile, system def getSequenceRanges(fa): """Get dict of (untrimmed header) -> [(...
assert start >= range2[1] if i + 1 < len(ranges): range2 = ranges[i + 1]
<|file_name|>mock_encrypter.cc<|end_file_name|><|fim▁begin|>// Copyright 2017 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/quic/mock_encrypter.h" #include "net/third_party/quic/core/quic_data_writer.h" ...
<|file_name|>extern.rs<|end_file_name|><|fim▁begin|>extern "C" { fn c_func(x: *mut *mut libc::c_void); fn c_func(x: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, y: YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY); #[test123] fn foo() -> uint64_t; pub fn bar(); } extern "C" { fn DMR_GetDe...
<|file_name|>test_upload_crash_report_json_schema.py<|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/. import mock from nose.tools import ok...
<|file_name|>mxconfig_nl.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0"> <context> <name>MConfig</name> <message> <location filename="mconfig.cpp" line="440"/> <source>Copying X config appears to have failed. There may be something wrong w...
<location filename="meconfig.ui" line="643"/> <location filename="meconfig.ui" line="1731"/> <source>Daytek</source> <translation type="unfinished"></translation>
<|file_name|>ClickActivity.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2013-2015 by appPlant UG. All rights reserved. * * @APPPLANT_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apache License * Version 2.0 (t...
package de.appplant.cordova.plugin.localnotification; import de.appplant.cordova.plugin.notification.Builder; import de.appplant.cordova.plugin.notification.Notification;
<|file_name|>main.cc<|end_file_name|><|fim▁begin|>#include "log/logger.h" #include "log/stdoutlog.h" //#include <windows.h> //void SetColor(unsigned short forecolor = 4, unsigned short backgroudcolor = 0) //{ // HANDLE hCon = GetStdHandle(STD_OUTPUT_HANDLE); //»ñÈ¡»º³åÇø¾ä±ú // SetConsoleTextAttribute(hCon, forec...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo Addon, Open Source Management Solution # Copyright (C) 2014-now Equitania Software GmbH(<http://www.equitania.de>). # # This program is free soft...
# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Iwyu(CMakePackage): """include-what-y...
depends_on('llvm+all_targets', when='target=arm:') depends_on('llvm+all_targets', when='target=ppc:')