prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>Test730.java<|end_file_name|><|fim▁begin|>package org.gradle.test.performance.mediummonolithicjavaproject.p36; import org.junit.Test; import static org.junit.Assert.*; public class Test730 { Production730 objectUnderTest = new Production730(); @Test public void testProperty0() { ...
assertEquals(value, objectUnderTest.getProperty1()); }
<|file_name|>MulticastDatagramHeaderMarshaller.java<|end_file_name|><|fim▁begin|>/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses t...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).<|fim▁hole|><|fim▁end|>
from . import models from . import wizard
<|file_name|>response_types.go<|end_file_name|><|fim▁begin|>package calendar import ( "time" SDK "google.golang.org/api/calendar/v3" ) type EventListResponse struct { *SDK.Events } // EventList contains multiple calendar events. type EventList struct { List []Event } // Event contains event information on Goog...
AllowedConferenceSolutionTypes []string }
<|file_name|>jsonb.py<|end_file_name|><|fim▁begin|>import json from psycopg2.extras import Json from django.contrib.postgres import forms, lookups from django.core import exceptions from django.db.models import Field, Transform from django.utils.translation import ugettext_lazy as _ __all__ = ['JSONField'] ...
description = _('A JSON object') default_error_messages = { 'invalid': _("Value must be valid JSON."),
<|file_name|>PortalManager.java<|end_file_name|><|fim▁begin|>/* * The Fascinator - Portal * Copyright (C) 2008-2011 University of Southern Queensland * * 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 Softwar...
public void reharvest(Set<String> objectIds);
<|file_name|>iterators.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ sphinx.ext.napoleon.iterators ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A collection of helpful iterators. :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import c...
<|file_name|>fallback.cpp<|end_file_name|><|fim▁begin|>#include <stddef.h> #include "logger/logger.h" #include "wrappers.h" using namespace drivers::i2c; I2CResult I2CFallbackBus::Write(const I2CAddress address, gsl::span<const uint8_t> inData) { const I2CResult systemBusResult = this->_innerBuses.Bus.Wri...
{ const I2CResult systemBusResult = this->_innerBuses.Bus.Read(address, outData);
<|file_name|>answer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 #------------------------------------------------------------------------------- # Solution # Find critical points, store in a max heap using min heap properties (-height) #-----------------------------------------------------------------------...
# pick the highest existing building at this moment
<|file_name|>_computed.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class ComputedValidator(_plotly_utils.basevalidators.AnyValidator):<|fim▁hole|> parent_name=parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs )<|fim▁end|>
def __init__(self, plotly_name="computed", parent_name="layout", **kwargs): super(ComputedValidator, self).__init__( plotly_name=plotly_name,
<|file_name|>managers.py<|end_file_name|><|fim▁begin|>import collections from .settings import preferences_settings from .exceptions import CachedValueNotFound, DoesNotExist class PreferencesManager(collections.Mapping): """Handle retrieving / caching of preferences""" def __init__(self, model, registry, *...
def __repr__(self): return repr(self.all())
<|file_name|>fuppes-log.js<|end_file_name|><|fim▁begin|>var FuppesLog = new Class({ initialize: function(options) { this.worker = null; this.scroll = new Fx.Scroll($('log-output').getParent()); }, start: function() { if(this.worker != null) { delete this.worker; this.worker = null; ...
xml.documentElement.getChildren().each(function(item, index) {
<|file_name|>map_execute_on_all_keys_codec.py<|end_file_name|><|fim▁begin|>from hazelcast.serialization.bits import * from hazelcast.protocol.client_message import ClientMessage<|fim▁hole|> REQUEST_TYPE = MAP_EXECUTEONALLKEYS RESPONSE_TYPE = 117 RETRYABLE = False def calculate_size(name, entry_processor): """ Cal...
from hazelcast.protocol.custom_codec import * from hazelcast.util import ImmutableLazyDataList from hazelcast.protocol.codec.map_message_type import *
<|file_name|>platform_thread_freebsd.cc<|end_file_name|><|fim▁begin|>// Copyright 2014 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 "base/threading/platform_thread.h" #include <errno.h> #include <sched.h> #i...
return 0; #else // ThreadSanitizer bloats the stack heavily. Evidence has been that the // default stack size isn't enough for some browser tests.
<|file_name|>overlap_align.cpp<|end_file_name|><|fim▁begin|>// Copyright 2017 Ryan Wick (rrwick@gmail.com) // https://github.com/rrwick/Unicycler // This file is part of Unicycler. Unicycler is free software: you can redistribute it and/or // modify it under the terms of the GNU General Public License as published by ...
<|file_name|>liveupdate-uac.js<|end_file_name|><|fim▁begin|>(function ($) { $(document).ready(function () { var config = window._lbconfig || {}, $uacLiveBlog = $('#uacLiveBlog') .width(Math.max(100, config.width)) .liveUpdateUi({ postId: config.postId, url: config.updateUrl, tool...
<|file_name|>media_player.py<|end_file_name|><|fim▁begin|>"""This library brings support for forked_daapd to Home Assistant.""" import asyncio from collections import defaultdict import logging from pyforked_daapd import ForkedDaapdAPI from pylibrespot_java import LibrespotJavaAPI from homeassistant.components.media_...
for track in self._queue["items"] if track["id"] == self._player["item_id"] ) except (StopIteration, TypeError, KeyError):
<|file_name|>NowServer.java<|end_file_name|><|fim▁begin|>package railo.runtime.functions.dateTime; <|fim▁hole|> import railo.runtime.PageContext; import railo.runtime.exp.ExpressionException; import railo.runtime.ext.function.Function; import railo.runtime.tag.util.DeprecatedUtil; import railo.runtime.type.dt.DateTime;...
import java.util.TimeZone;
<|file_name|>app.js<|end_file_name|><|fim▁begin|>var express = require('express'); var path = require('path'); var tilestrata = require('tilestrata'); var disk = require('tilestrata-disk'); var mapnik = require('tilestrata-mapnik'); var dependency = require('tilestrata-dependency'); var strata = tilestrata(); var app ...
.route('dem.png') .use(disk.cache({dir: './tiles/dem/'}))
<|file_name|>parsley.js<|end_file_name|><|fim▁begin|>// Parsley.js @@version // http://parsleyjs.org // (c) 20012-2014 Guillaume Potier, Wisembly // Parsley may be freely distributed under the MIT license. define([ // ### Requirements // Handy third party functions 'parsley/utils', ...
<|file_name|>linecache_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import os import linecache import tempfile<|fim▁hole|>risus. Mauris id quam posuere lectus sollicitudin varius. Praesent at mi. Nunc eu velit. Sed augue massa, fermentum id, nonummy a, nonummy sit amet, ligula. Curabitur eros pede, eges...
lorem = '''Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus eget elit. In posuere mi non
<|file_name|>requestHandler.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2.7 import hashlib import httplib import os import socket import sys import time import urllib import mechanize import xbmcgui from resources.lib import common from resources.lib import logger, cookie_helper from resources.lib.cBFScrape ...
h = hashlib.md5(url).hexdigest() cacheFile = os.path.join(self.__cachePath, h) fileAge = self.getFileAge(cacheFile)
<|file_name|>FAT.H<|end_file_name|><|fim▁begin|><|fim▁hole|>/* * * * * * * * * * * * * * * * * * * * * * * * * * * * SYSTEM/FS/FAT.H * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef FAT_H_INCLUDED #define FAT_H_INCLUDED #include <FORMATTING.H> typedef struct _FAT121632_BPB { uint8_t ...
<|file_name|>get_first_party_audience_segments.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Copyright 2015 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 copy of the Licen...
statement.ToStatement())
<|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.<|fim▁hole|> from spack import * class RRvcheck(RPackage): """Check latest release version of R and R package (bot...
# # SPDX-License-Identifier: (Apache-2.0 OR MIT)
<|file_name|>test_streaming.py<|end_file_name|><|fim▁begin|>from time import sleep import unittest2 as unittest from tweepy.api import API from tweepy.auth import OAuthHandler from tweepy.models import Status from tweepy.streaming import Stream, StreamListener from config import create_auth from test_utils import moc...
self.assertEqual(u'Caf\xe9'.encode('utf8'), s.parameters['track'])
<|file_name|>test_exp_survival_model.py<|end_file_name|><|fim▁begin|>import matplotlib as mpl mpl.use('Agg') import survivalstan from stancache import stancache import numpy as np from nose.tools import ok_ from functools import partial num_iter = 1000 from .test_datasets import load_test_dataset model_code = survival...
formula = '~ 1', iter = num_iter,
<|file_name|>static_transform_component.cc<|end_file_name|><|fim▁begin|>/****************************************************************************** * Copyright 2018 The Apollo Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in ...
<|file_name|>HorizontalSlider.java<|end_file_name|><|fim▁begin|>package edu.ucsd.ncmir.WIB.client.core.components; import com.google.gwt.user.client.ui.Widget; import edu.ucsd.ncmir.WIB.client.core.message.Message; import edu.ucsd.ncmir.WIB.client.core.message.MessageListener; import edu.ucsd.ncmir.WIB.client.core.mes...
private boolean _initial = true; // To prevent premature Message firing.
<|file_name|>monitor_mixin_base.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software c...
return plot
<|file_name|>fn-pattern-expected-type.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.a...
assert!(x == 1); assert!(y == 2); }; f((1, 2));
<|file_name|>talant_en.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="en"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Tal...
<source>Enter Talant signature</source> <translation>Enter Talant signature</translation> </message>
<|file_name|>host.go<|end_file_name|><|fim▁begin|>// +build !windows package network import ( "github.com/containerd/containerd/oci" specs "github.com/opencontainers/runtime-spec/specs-go" ) func NewHostProvider() Provider {<|fim▁hole|> return &host{} } type host struct { } func (h *host) New() (Namespace, error...
<|file_name|>field_bit_256.rs<|end_file_name|><|fim▁begin|>use field_bit::FieldBit; use std; use x86intrin::*; #[derive(Clone, Copy, Debug)] pub struct FieldBit256 { m: m256i, } impl FieldBit256 { pub fn new(m: m256i) -> FieldBit256 { FieldBit256 { m: m, } } pub unsafe fn ...
<|file_name|>sequences.js<|end_file_name|><|fim▁begin|>/* eslint-disable no-underscore-dangle, no-param-reassign */ import d3 from 'd3'; require('./sequences.css'); // Modified from http://bl.ocks.org/kerryrodden/7090426 function sunburstVis(slice) { const container = d3.select(slice.selector); const render = f...
// Restore everything to full opacity when moving off the visualization. function mouseleave(d) { // Hide the breadcrumb trail
<|file_name|>material.model.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export class Material { id: number; name: string; }<|fim▁end|>
<|file_name|>DbGallery.java<|end_file_name|><|fim▁begin|>package visualk.gallery.db; import java.awt.Color; import java.sql.*; import java.util.logging.Level; import java.util.logging.Logger; import visualk.db.MysqlLayer; import visualk.gallery.objects.Artist; import visualk.gallery.objects.Work; public class DbGal...
+ "', '"
<|file_name|>pfcSimpRepExamples.js<|end_file_name|><|fim▁begin|>/* HISTORY 02-Aug-10 L-05-28 $$1 pdeshmuk Created. */ function deleteItemsInSimpRep () { if (!pfcIsWindows()) netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); /*----------------------------------------...
/*--------------------------------------------------------------------*\ Get the current assembly \*--------------------------------------------------------------------*/ var session = pfcGetProESession ();
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 from __future__ import unicode_literals, absolute_import<|fim▁hole|> urlpatterns = [ url(r'^', include(unach_photo_server_urls, namespace='unach_photo_server')), ]<|fim▁end|>
from django.conf.urls import url, include from unach_photo_server.urls import urlpatterns as unach_photo_server_urls
<|file_name|>color.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/. */ //! Specified color values. use cssparser::{Color as CSSParser...
}; let total = length + unit.as_ref().map_or(0, |d| d.len()); if total > 6 {
<|file_name|>sphere_rs.py<|end_file_name|><|fim▁begin|># coding=utf-8 # main codes, call functions at stokes_flow.py # Zhang Ji, 20160410 import sys import petsc4py petsc4py.init(sys.argv) # import warnings # from memory_profiler import profile import numpy as np from src import stokes_flow as sf # import stokes_flow...
OptDB = PETSc.Options() r_factor = 3 ** (np.arange(0, 1.2, 0.2) ** 2)
<|file_name|>namespace_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.or...
def test_vanilla(self): self.assertEqual(Foo.task_namespace, None) self.assertEqual(Foo.task_family, "Foo")
<|file_name|>0028_auto_20190826_2034.py<|end_file_name|><|fim▁begin|># Generated by Django 2.2.4 on 2019-08-26 18:34 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('helpdesk', '0027_auto_...
<|file_name|>closest_match.py<|end_file_name|><|fim▁begin|>from .logic import LogicAdapter class ClosestMatchAdapter(LogicAdapter): def get(self, text, list_of_statements): """ Takes a statement string and a list of statement strings. Returns the closest matching statement from the list.<...
""" from fuzzywuzzy import process
<|file_name|>bitcoin_el_GR.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="el_GR" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About BigBang</source> <translation type="unfin...
<translation type="unfinished"/> </message> <message> <location line="-191"/>
<|file_name|>paths.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 Thorben Kroeger. // Dual-licensed MIT and Apache 2.0 (see LICENSE files for details). use std::path::{Path, PathBuf}; pub struct CommonPrefix { pub prefix: PathBuf, pub suffix1: PathBuf, pub suffix2: PathBuf } pub fn common_prefix(path1...
loop { match (a.peek(), b.peek()) { (Some(&e1), Some(&e2)) => {
<|file_name|>generate_nsis.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os from subprocess import PIPE from subprocess import Popen import jinja2 DIST_PATH = "..\\build\\exe.win32-3.6" # Get list of files and directory to install/uninstall INSTALL_FILES = [] INSTALL_DIRS = [] os.chdir(os.path.join...
<|file_name|>relativelayout.cpp<|end_file_name|><|fim▁begin|>#include "relativelayout.h" #include <QDebug> RelativeLayout::RelativeLayout(View *parent) : View(parent) { // By default, QQuickItem does not draw anything. If you subclass // QQuickItem to create a visual item, you will need to uncomment the ...
// setFlag(ItemHasContents, true); } RelativeLayout::~RelativeLayout()
<|file_name|>ufuncmethods.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import numpy as np <|fim▁hole|>print("Accumulate", np.add.accumulate(a)) print("Reduceat", np.add.reduceat(a, [0, 5, 2, 7])) print("Reduceat step I", np.add.reduce(a[0:5])) print("Reduceat step II", a[5]) print("Reduceat ste...
a = np.arange(9) print("Reduce", np.add.reduce(a))
<|file_name|>screens.js<|end_file_name|><|fim▁begin|>var _ = require("underscore"); var util = require("util"); exports.show = function (req, res) { var async = require('async'); if (!req.session.screen) { req.session.messages = { errors: ['screen not found'] }; res.redirect('/'); return; } var Ha...
}; exports.delete = function (req, res) { if (!req.session.screen) {
<|file_name|>naked-functions-ffi.rs<|end_file_name|><|fim▁begin|>// check-pass // only-x86_64 #![feature(asm)] #![feature(naked_functions)] #![crate_type = "lib"]<|fim▁hole|>#[naked] pub extern "C" fn naked(p: char) -> u128 { //~^ WARN uses type `char` //~| WARN uses type `u128` unsafe { asm!("", options(no...
<|file_name|>json.hpp<|end_file_name|><|fim▁begin|>/* __ _____ _____ _____ __| | __| | | | JSON for Modern C++ | | |__ | | | | | | version 2.1.1 |_____|_____|_____|_|___| https://github.com/nlohmann/json Modified by mwthinker, to use tabs in "dump" function and use fifo_map instead of std::map i...
@complexity Logarithmic in the size of the container. @liveexample{The example below shows how object elements can be read using the `[]` operator.,operatorarray__key_type_const}
<|file_name|>BaseContainerManagerTest.java<|end_file_name|><|fim▁begin|>/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * t...
<|file_name|>Nd.java<|end_file_name|><|fim▁begin|>// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilatio...
import javax.xml.bind.annotation.XmlType; /**
<|file_name|>debugger-step-in-ignore-injected-script.js<|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. (async function() { TestRunner.addResult(`Tests that stepInto doesn...
function testFunction() { debugger;
<|file_name|>HelpPageListener.java<|end_file_name|><|fim▁begin|>package me.F_o_F_1092.WeatherVote.PluginManager.Spigot; import java.util.ArrayList; import java.util.List; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import me.F_o_F_1092.WeatherVote.Options; import me.F_o_F_1092.WeatherVo...
p.sendMessage(""); if (getMaxPlayerPages(personalHelpMessages) != 1) {
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>import TuiGrid from '../index'; import { RowKey, CellValue, ListItem } from '../store/data'; import { ColumnInfo } from '../store/column'; import { Dictionary } from '../options'; export type CheckboxOptions = ListItemOptions & { type: 'checkbox' | 'radio'; }; ex...
}
<|file_name|>Scene.cpp<|end_file_name|><|fim▁begin|>////////////////////////////////////////////////////////////////////////// // This file is part of openPSTD. // // // // openPSTD is free software: you can redis...
BOOST_CHECK_EQUAL(num_sec_pmls, 4); } BOOST_AUTO_TEST_CASE(size_of_pml) {
<|file_name|>helper_objects.rs<|end_file_name|><|fim▁begin|>//! Defines some structs, enums, and constants mainly useful for passing information around //! over the FFI and over threads. use std::collections::HashMap; use std::sync::Mutex; use libc::{c_char, c_void, uint64_t, c_double, c_int}; use futures::sync::mpsc...
#[repr(C)] #[derive(Clone)] pub struct ServerMessage {
<|file_name|>image_util_bitmap_impl.py<|end_file_name|><|fim▁begin|># Copyright 2014 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. from __future__ import division from telemetry.core import _bitmap def Channels(bitmap...
return _bitmap.Bitmap.FromPngFile(path)
<|file_name|>gravity.py<|end_file_name|><|fim▁begin|>""" Compute the force of gravity between the Earth and Sun. Copyright 2012, Casey W. Stark. See LICENSE.txt for more information. """ # Import the gravitational constant and the Quantity class from dimensionful import G, Quantity # Supply the mass of Earth, mass...
<|file_name|>class.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
class <caret>A(B pass
<|file_name|>url.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Servo Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENS...
<|file_name|>doc.ts<|end_file_name|><|fim▁begin|>const Command = require('../ember-cli/lib/models/command'); import { DocTask } from '../tasks/doc'; const DocCommand = Command.extend({ name: 'doc', description: 'Opens the official Angular documentation for a given keyword.', works: 'everywhere', anonymousOpti...
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>/**! * * Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file. */ /* eslint-disable */ 'use strict'; <|fim▁hole|> grunt.registerTask('test', []); };<|fim▁end|>
var path = require('path'); module.exports = function configGrunt(grunt, p) {
<|file_name|>fields.py<|end_file_name|><|fim▁begin|>from django import forms from .widgets import MarkdownxWidget class MarkdownxFormField(forms.CharField): """ Used in FormFields as a Markdown enabled replacement for ``CharField``.<|fim▁hole|> Arguments are similar to Django's default ``CharField``. ...
""" def __init__(self, *args, **kwargs): """
<|file_name|>text_formatter.go<|end_file_name|><|fim▁begin|>package logrus import ( "bytes" "fmt" "sort" "strings" "sync" "time" ) const ( nocolor = 0 red = 31 green = 32<|fim▁hole|> yellow = 33 blue = 36 gray = 37 ) var ( baseTimestamp time.Time ) func init() { baseTimestamp = time.Now() ...
<|file_name|>error.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/. */ //! Utilities to throw exceptions from Rust bindings. use dom:...
}; /// Format string struct used to throw `RangeError`s. static mut RANGE_ERROR_FORMAT_STRING: JSErrorFormatString = JSErrorFormatString {
<|file_name|>test_db_api.py<|end_file_name|><|fim▁begin|># Copyright (c) 2017 Fujitsu Limited # 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:...
self._delete('ports', port_id)
<|file_name|>assoc-const-underscore-syntactic-pass.rs<|end_file_name|><|fim▁begin|>// All constant items (associated or otherwise) may syntactically use `_` as a name. // check-pass fn main() {} #[cfg(FALSE)] const _: () = { pub trait A { const _: () = (); } impl A for () { const _: () = ...
<|file_name|>producer.rs<|end_file_name|><|fim▁begin|>extern crate pcap_rs; use pcap_rs::iter::PcapIterator; use std::env; use std::fs::File; use std::io::BufReader; fn main() { let args: Vec<_> = env::args().collect(); if args.len() < 2 { println!("Usage: {} <foo.pcap> ...", args[0]); return;...
<|file_name|>peer_connection.rs<|end_file_name|><|fim▁begin|>use rand; use rand::Rng; use std::{any, convert, fmt, io, thread}; use std::collections::HashMap; use std::io::{Read, Write}; use std::net::{Shutdown, TcpStream}; use std::sync::{Arc, Mutex}; use std::sync::mpsc::{channel, Receiver, RecvError, Sender, SendErr...
InvalidInfoHash, ConnectingToSelf, DownloadError(download::Error),
<|file_name|>group_environment_details.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from rest_framework.response import Response from sentry.api.base import StatsMixin from sentry.api.bases.group import GroupEndpoint from sentry.api.exceptions import ResourceDoesNotExist from sentry.api.seri...
until=stats_args['end'], )
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var User = require('../config/Sequelize.js').import('../models/User.js'); module.exports = function(app) { function indexController(request, response) { User.findOne({ where: { 'username': 'admin' } }).then(function(userObj) { if(us...
administrator: true }).then(function() {
<|file_name|>dependency_registry_test.py<|end_file_name|><|fim▁begin|># coding: utf-8 # # Copyright 2014 The Oppia 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 a...
response.mustcontain(no=['jsrepl']) response = self.testapp.get('/about') self.assertEqual(response.status_int, 200)
<|file_name|>types.go<|end_file_name|><|fim▁begin|>// Copyright 2016 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 copy of the License at // // http://www.apache.org/licen...
<|file_name|>test_search.py<|end_file_name|><|fim▁begin|>import json from urllib.parse import urlencode from tests import TestCase from tests.fixtures.factories import ProfessorFactory, CourseFactory class SearchTestCase(TestCase):<|fim▁hole|> ProfessorFactory(first_name='Mathias') CourseFactory(title...
def setUp(self): super().setUp()
<|file_name|>快速幂快速乘.cpp<|end_file_name|><|fim▁begin|>long long MUL(long long a, long long b, long long MOD) { long long res = 1; while (b) { if (b & 1) { res = (res * a) % MOD; } a = (a * a) % MOD; b >>= 1; } return res; } <|fim▁hole|>{ long long res = 0; while (b) { if (b & 1) { res = (re...
long long MUL(long long a, long long b, long long MOD)
<|file_name|>adapters.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ requests.adapters ~~~~~~~~~~~~~~~~~ This module contains the transport adapters that Requests uses to define and maintain connections. """ import os.path import socket from urllib3.poolmanager import PoolManager, proxy_from_url from u...
"""Builds a :class:`Response <requests.Response>` object from a urllib3 response. This should not be called from user code, and is only exposed for use when subclassing the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// // SOS: the Stupid Operating System // by Eliza Weisman (eliza@elizas.website) // // Copyright (c) 2015-2017 Eliza Weisman // Released under the terms of the MIT license. See `LICENSE` in the root // directory of this repository for more information. // // Alloc...
<|file_name|>cluster_destroyed_event.py<|end_file_name|><|fim▁begin|>import logging<|fim▁hole|># Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def ClusterDestroyedEvent(vim, *args, **kwargs): '''This event records when a cluster is destroyed.''' ...
from pyvisdk.exceptions import InvalidArgumentError ########################################
<|file_name|>history.go<|end_file_name|><|fim▁begin|>package dexcom import ( "log" "time" ) // ReadHistory returns records since the specified time. func (cgm *CGM) ReadHistory(pageType PageType, since time.Time) Records { first, last := cgm.ReadPageRange(pageType) if cgm.Error() != nil { return nil }<|fim▁hol...
var results Records proc := func(r Record) error { t := r.Time()
<|file_name|>indexOf.js<|end_file_name|><|fim▁begin|>/** * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> * Build: `lodash modularize exports="amd" -o ./compat/` * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> * Copyright 20...
function indexOf(array, value, fromIndex) {
<|file_name|>AboutAction.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2001-2017 by RapidMiner and the contributors * * Complete list of developers available at our web site: * * http://rapidminer.com * * This program is free software: you can redistribute it and/or modify it under the terms of...
/** * Instantiates a new About action. * * @param mainFrame the main frame
<|file_name|>config.py<|end_file_name|><|fim▁begin|>""" config file for eth tracker feel your keys and secrets here """ """ twilio api """ account_sid = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" auth_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" my_num = "+xxxxxxxxxxx", twilio_num = "+xxxxxxxx", <|fim▁hole|>api_secret = "xxxxxxxxxx...
""" CEX.IO API is limited to 600 requests per 10 minutes """ username = "xxxxxxxxx" api_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
<|file_name|>compare_to_BKS.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import json import numpy as np import sys # Compare a set of computed solutions to best known solutions on the # same problems. # See src/vrptw_to_json.py, src/pdptw_to_json.py and # src/hvrp_to_json.py. CUSTOM_PRECISION = 1000 BENCH_...
instance = instance[instance.rfind("/") + 1 :] if instance not in BKS and instance + "_distance" not in BKS: total_files -= 1
<|file_name|>EP-167.ts<|end_file_name|><|fim▁begin|>import { FormsEpidemiologia } from '../modules/forms/forms-epidemiologia/forms-epidemiologia-schema'; async function run(done) { const fichas = FormsEpidemiologia.find({ active: { $exists: false } }).cursor();<|fim▁hole|> await FormsEpidemiologia.update({ ...
for await (const ficha of fichas) { const _id = ficha.id; const $set = { active: true };
<|file_name|>field_type.go<|end_file_name|><|fim▁begin|>package framework // FieldType is the enum of types that a field can be. type FieldType uint const ( TypeInvalid FieldType = 0 TypeString FieldType = iota TypeInt TypeBool TypeMap // TypeDurationSecond represent as seconds, this can be either an // inte...
} }
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import include, url from django.views.generic import TemplateView <|fim▁hole|> url(r"^", include("formly.urls", namespace="formly")), ]<|fim▁end|>
urlpatterns = [ url(r"^home/", TemplateView.as_view(template_name="no-ie.html"), name="home"),
<|file_name|>crm_job.py<|end_file_name|><|fim▁begin|>from odoo import fields, models class Job(models.Model): _inherit = "crm.team" survey_id = fields.Many2one( 'survey.survey', "Interview Form", help="Choose an interview form")<|fim▁hole|> def action_print_survey(self): return se...
<|file_name|>location.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::codegen::Bindings::LocationBinding; use d...
<|file_name|>elemental.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 # -*- coding: utf-8 -*- '''Pychemqt, Chemical Engineering Process simulator Copyright (C) 2009-2017, Juan José Gómez Romera <jjgomera@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU ...
if tr_name: self.name = tr_name # Isotopes
<|file_name|>registration_worker.py<|end_file_name|><|fim▁begin|>import zmq import datetime import pytz from django.core.management.base import BaseCommand, CommandError from django.conf import settings from registrations.models import Registration from registrations import handlers from registrations import tasks c...
except Exception, e: self.log("Error: %s" % e)
<|file_name|>lmconstants.py<|end_file_name|><|fim▁begin|>"""This module contains constants used by the Lifemapper web services """ import os from LmServer.base.utilities import get_mjd_time_from_iso_8601 from LmServer.common.lmconstants import SESSION_DIR from LmServer.common.localconstants import SCRATCH_PATH, APP_PA...
'firstname': { QP_NAME_KEY: 'first_name' },
<|file_name|>settings.rs<|end_file_name|><|fim▁begin|>//! The configuration settings definitions. use serde::Deserialize; /// Settings for github login. To configure a github OAuth app must have been /// provisioned. #[derive(Debug, Deserialize)] pub struct GithubSettings { /// The OAuth app "client ID" pub c...
/// Bind address for HTTP server #[serde(default = "default_bind")] pub bind: String, /// Logging config
<|file_name|>apply-server-routes.js<|end_file_name|><|fim▁begin|>/** * * <i>Copyright (c) 2017 ItsAsbreuk - http://itsasbreuk.nl</i><br> * New BSD License - http://choosealicense.com/licenses/bsd-3-clause/ * * * @since 16.2.0 */ 'use strict'; const reload = require('require-reload')(require), // see https://git...
routes.push({ method: 'GET', path: '/assets/'+appConfig.packageVersion+'/{filename*}', handler: function(request, reply) {
<|file_name|>dice-expression.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2015-2017 Steven Soloff * * This is free software: you can redistribute it and/or modify it under the * terms of the MIT License (https://opensource.org/licenses/MIT). * This software comes with ABSOLUTELY NO WARRANTY. */ 'use strict...
* * @memberOf module:dice-expression~MultiplicationExpression
<|file_name|>indenter.py<|end_file_name|><|fim▁begin|># binary tag: refers to tags that have open and close element # eg: [a]some content[/a] # standalone tag: refers to tags that are self contained<|fim▁hole|># Assuming that the text input is well formatted # open input and output file with open('textin.txt', 'r') a...
# eg: [b some content]
<|file_name|>1.py<|end_file_name|><|fim▁begin|><|fim▁hole|> """This function adds two numbers""" return x + y def subtract(x, y): """This function subtracts two numbers""" return x - y def multiply(x, y): """This function multiplies two numbers""" return x * y def divide(x, y): """This functio...
# Program make a simple calculator that can add, subtract, multiply and divide using functions # define functions def add(x, y):
<|file_name|>markingmenus.py<|end_file_name|><|fim▁begin|>""" """ import sys import re import keyword <|fim▁hole|>from functools import partial from PySide import QtCore from PySide.QtCore import QObject from maya import cmds from mampy.pyside.utils import get_qt_object from mamprefs import config fro...
import logging import traceback