prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>disk.rs<|end_file_name|><|fim▁begin|>use errors::*; use plugin::*; #[derive(Debug)] struct DiskInput {} impl DiskInput { pub fn new() -> DiskInput { DiskInput {} }<|fim▁hole|> impl Input for DiskInput { fn setup(&self, _ctx: PluginContext) -> Result<Box<InputInstance>> { Ok(Bo...
}
<|file_name|>OpenIdConfig.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2016-2018 Harald Kuhn * * 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...
* @param tokenEndpointAuthMethodsSupported
<|file_name|>addons_xml_generator3.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # *<|fim▁hole|># * it under the terms of the GNU General Public License as published by # * the Free Software Foundation; either version 2, or (at your option) # * any later version. # * # * This Program is distributed in the hope ...
# * Copyright (C) 2012-2013 Garrett Brown # * Copyright (C) 2010 j48antialias # * # * This Program is free software; you can redistribute it and/or modify
<|file_name|>Settings.py<|end_file_name|><|fim▁begin|>import collections import json import os class Settings(collections.MutableMapping): def __init__(self, filename): self.filename = filename self.store = {} self.read() def read(self): if os.path.exists(self.filename): ...
def __len__(self):
<|file_name|>osc.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2016 Antony Arciuolo. See License.txt regarding use. #include <oBase/osc.h> #include <oCore/assert.h> #include <oCore/byte.h> #include <oCore/endian.h> #include <oString/string.h> #define oUNKNOWN_SIZE SIZE_MAX #define oASSERT_ALIGNED(x) oAssert(alig...
<|file_name|>bookmarks-routing.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { BookmarksComponent } from './bookmarks.component'; const bookmarkRoutes: Routes = [ { path: 'bookmarks', component: BookmarksComponent } ];...
RouterModule.forChild(bookmarkRoutes) ],
<|file_name|>file_store.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding:utf-8 -*- """ """ from exception import * class base_storage: def __init__(self, usr=None, usr_key=None): self.usr_key = None self.usr = None self.records = [] if usr is None: return self.load_info_from_file() ...
<|file_name|>_plot_complex.py<|end_file_name|><|fim▁begin|>from . import _plotting_mess<|fim▁hole|>files = _plotting_mess.complex_files function = _plotting_mess.complex_function<|fim▁end|>
data = _plotting_mess.complex_data databoxes = _plotting_mess.complex_databoxes
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst import glob import os import sys import ah_bootstrap from setuptools import setup #A dirty hack to get around some early import/configurations ambiguities if sys.version_info[0] >=...
add_command_option('install', 'with-openmp', 'compile TARDIS without OpenMP',
<|file_name|>revocation.go<|end_file_name|><|fim▁begin|>package irma import ( "context" "database/sql/driver" "encoding/json" "fmt" "math/bits" "sort" "strings" "sync" "time" "github.com/alexandrevicenzi/go-sse" "github.com/fxamacker/cbor" "github.com/getsentry/raven-go" "github.com/go-errors/errors" "g...
<|file_name|>ServerHttpClientTest.java<|end_file_name|><|fim▁begin|>/* * Sonar, open source software quality management tool. * Copyright (C) 2008-2011 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser Gener...
public void shouldFailIfCanNotConnectToServer() { ServerHttpClient serverHttpClient = new ServerHttpClient("fake") { @Override
<|file_name|>htmllielement.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::HTMLLIElementBind...
<|file_name|>config_enabled_in_region-periodic.js<|end_file_name|><|fim▁begin|>// // This file made available under CC0 1.0 Universal (https://creativecommons.org/publicdomain/zero/1.0/legalcode) // var aws = require('aws-sdk'); var s3 = new aws.S3(); var zlib = require('zlib'); <|fim▁hole|>var iam = new aws.IA...
var config = new aws.ConfigService();
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from codecs import open from os import path from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup(<|fim▁hole|> name='serpy', ...
<|file_name|>underscore.js<|end_file_name|><|fim▁begin|>// Underscore.js 1.4.3 // http://underscorejs.org // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc. // Underscore may be freely distributed under the MIT license. (function() { // Baseline setup // -------------- // Establish the ...
return -1; };
<|file_name|>GossipDef.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as ...
{ ClearMenu(); }
<|file_name|>lib.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/. */<|fim▁hole|> #![allow(missing_copy_implementations)] extern crate ...
#![feature(core)] #![feature(collections)]
<|file_name|>23.py<|end_file_name|><|fim▁begin|>import copy def execute(moves): players = [ {'name': 'Xena', 'score': 0}, {'name': 'Ophelia', 'score': 0}, ] idx = 0 first_player = 0 draw_count = 0 move_count = 0 init_map = [[False]*3, [False]*3, [False]*3] map = copy.de...
elif move_count == 9: done = True
<|file_name|>role.py<|end_file_name|><|fim▁begin|>######################################################################## # # (C) 2015, Brian Coca <bcoca@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Lice...
archive_url = 'https://github.com/%s/%s/archive/%s.tar.gz' % (role_data["github_user"], role_data["github_repo"], self.version) else:
<|file_name|>manage.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fiveLessons.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)<|fim▁end|>
#!/usr/bin/env python import os
<|file_name|>speedMultiplierSpecs.tsx<|end_file_name|><|fim▁begin|>import * as React from "react"; import { mount, ReactWrapper } from "enzyme"; import { matchers } from "@emotion/jest"; expect.extend(matchers); type ExpectFunc = (loader: ReactWrapper, multiplier: number) => void; function speedMultiplierSpecs(Loader...
loader = mount(<Loader speedMultiplier={speedMultiplier} />); expectFunction(loader, 2);
<|file_name|>time.py<|end_file_name|><|fim▁begin|>from .game import Board<|fim▁hole|> print(i)<|fim▁end|>
for i in range(10): Board.all()
<|file_name|>passeador.model.ts<|end_file_name|><|fim▁begin|>/** * Created by andypax on 15/10/16. */ export class PasseadorModel { constructor( public nome?: string, public sobreNome?: string, public endereco?: string, public numero?: string, public complemento?: string, ...
public estado?: string, public telefone?: string, public celular?: string, public foto?: string,
<|file_name|>crud.rs<|end_file_name|><|fim▁begin|>#![cfg_attr(all(feature = "unstable", test), feature(test))] #[macro_use] extern crate serde_derive;<|fim▁hole|>extern crate arthas_derive; extern crate rand; extern crate arthas; extern crate env_logger; #[path = "../tests/common/mod.rs"] pub mod common; #[path = ".....
#[macro_use]
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" The :mod:`sklearn.metrics` module includes score functions, performance metrics and pairwise metrics and distance computations. """ from . import cluster from .classification import accuracy_score from .classification import brier_score_loss from .classificatio...
<|file_name|>cordova_plugins.js<|end_file_name|><|fim▁begin|>cordova.define('cordova/plugin_list', function(require, exports, module) { module.exports = [ { "file": "plugins/cordova-plugin-device/www/device.js", "id": "cordova-plugin-device.device", "pluginId": "cordova-plugin-device", ...
<|file_name|>runasppl.py<|end_file_name|><|fim▁begin|>class CMEModule: name = 'runasppl' description = "Check if the registry value RunAsPPL is set or not" supported_protocols = ['smb'] opsec_safe = True multiple_hosts = True def options(self, context, module_options): ''' ''' ...
context.log.info('Executing command') p = connection.execute(command, True) context.log.highlight(p)
<|file_name|>renderers.py<|end_file_name|><|fim▁begin|>import json from rest_framework.renderers import JSONRenderer class CustomJSONRenderer(JSONRenderer): charset = 'utf-8' object_label = 'object' pagination_object_label = 'objects' pagination_count_label = 'count' def render(self, data, media...
# the default JSONRenderer to handle rendering errors, so we need to # check for this case.
<|file_name|>convert-images-spec.js<|end_file_name|><|fim▁begin|>var fs = require('fs'); var PNG = require('../lib/png').PNG; var test = require('tape'); var noLargeOption = process.argv.indexOf("nolarge") >= 0; fs.readdir(__dirname + '/in/', function (err, files) { if (err) throw err; files = files.filter(funct...
<|file_name|>setlog.py<|end_file_name|><|fim▁begin|># Dict'O'nator - A dictation plugin for gedit. # Copyright (C) <2016> <Abhinav Singh> # # This file is part of Dict'O'nator. # # Dict'O'nator is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published b...
logger = logging.getLogger('dictonator') GEDIT_PLUGIN_PATH = os.path.dirname(os.path.abspath(__file__))
<|file_name|>ircbot.py<|end_file_name|><|fim▁begin|>'''Todo: * Add multiple thread support for async_process functions * Potentially thread each handler function? idk ''' import sys import socket import re import threading import logging import time if sys.hexversion < 0x03000000: #Python 2 import Queue as qu...
<|file_name|>win32structures.py<|end_file_name|><|fim▁begin|># GUI Application automation and testing library # Copyright (C) 2006 Mark Mc Mahon # # This library 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...
assert sizeof(NMHDR) == 12, sizeof(NMHDR) assert alignment(NMHDR) == 4, alignment(NMHDR)
<|file_name|>domains_v1_generated_domains_delete_registration_sync.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Lic...
print("Waiting for operation to complete...")
<|file_name|>toolkit.py<|end_file_name|><|fim▁begin|>from abc import abstractmethod from threading import Timer from ctx.uncertainty.measurers import clear_dobson_paddy class Event: def __init__(self, type, **kwargs): self.type = type self.properties = kwargs class Observer: def update(self)...
def has_acceptable_certainty(self, new_property): certainty_level = self.certainty_measurer(self.relevance, new_property['accuracy']) is_acceptable = certainty_level > self.threshold
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>use std::io; use thiserror::Error; #[derive(Debug, Error)] pub enum RequestError { #[error("failed to parse request")] Parse { #[from] source: serde_json::Error, }, #[error("IO error")] IO { #[from] source: io::Erro...
#[error("Failed to get stdin")] Stdin,
<|file_name|>0019_auto_20181005_1645.py<|end_file_name|><|fim▁begin|># Generated by Django 2.0.8 on 2018-10-05 19:45 from django.db import migrations from django.core.exceptions import ObjectDoesNotExist def cria_sistema_cultura(apps, schema_editor): erros = [] SistemaCultura = apps.get_model('adesao', 'Si...
if diligencia: sistema_cultura.diligencia = DiligenciaSimples.objects.create(
<|file_name|>http.js<|end_file_name|><|fim▁begin|>'use strict'; var APPLICATION_JSON = 'application/json'; var CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'}; var JSON_START = /^\[|^\{(?!\{)/; var JSON_ENDS = { '[': /]$/, '{': /}$/ }; var JSON_PROTECTION_PREFIX = /^\)\]\}',?\...
<|file_name|>ogresrijsondriver.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************** * * Project: OpenGIS Simple Features Reference Implementation * Purpose: ESRIJSON driver * Author: Even Rouault, <even.rouault at spatialys.com> * *******************...
* copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the
<|file_name|>stops.rs<|end_file_name|><|fim▁begin|>use std::path::Path; use csv; use Result; use loader::decode_csv; #[derive(RustcDecodable)] pub struct Stop { pub id: String, pub lat: f64, pub lon: f64 }<|fim▁hole|> let cols = vec!["stop_id", "stop_lat", "stop_lon"]; let stops = try!(decode_csv::<...
pub fn get_stops<P: AsRef<Path>>(stopsfile: P) -> Result<Vec<Stop>> { let mut rdr = try!(csv::Reader::from_file(stopsfile));
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2018, OpenCensus Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
def to_iso_str(ts=None): """Get an ISO 8601 string for a UTC datetime."""
<|file_name|>calibrate_arm_a1r1.py<|end_file_name|><|fim▁begin|>#Copyright 2008, Meka Robotics #All rights reserved. #http://mekabot.com #Redistribution and use in source and binary forms, with or without #modification, are permitted. #THIS SOFTWARE IS PROVIDED BY THE Copyright HOLDERS AND CONTRIBUTORS #"AS IS" AN...
'calib':a1r1.config_arm_a1r1_actuator_j1['calib'], 'param':a1r1.config_arm_a1r1_actuator_j1['param'], 'param_internal':
<|file_name|>account_name_extended.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp....
search_domains.append({'company_ids':company_ids, 'name':piece_2})
<|file_name|>example.py<|end_file_name|><|fim▁begin|>from jira_extended import JIRA jira = JIRA( '<url>', basic_auth=( '<user>', '<password>', ), options={ 'extended_url': '<url>', } )<|fim▁hole|><|fim▁end|>
jira.search_issues('project = "PROJECT1"')[0].move('PROJECT2')
<|file_name|>config.py<|end_file_name|><|fim▁begin|>from phovea_server.ns import Namespace, abort from phovea_server.util import jsonify from phovea_server.config import get as get_config from phovea_server.plugin import list as list_plugins import logging app = Namespace(__name__) _log = logging.getLogger(__name__) ...
def _config(path): path = path.split('/') key = path[0]
<|file_name|>embed.js<|end_file_name|><|fim▁begin|>(function() { var DE = window.DiscourseEmbed || {}; var comments = document.getElementById('discourse-comments'); var iframe = document.createElement('iframe'); ['discourseUrl', 'discourseEmbedUrl', 'discourseUserName'].forEach(function(i) { if (window[i]...
}
<|file_name|>definitions.js<|end_file_name|><|fim▁begin|>define(function () { return [ { "default": { name: 'form1', label: 'Form 1', "_elements": [ { "default": { "name": "id", "type": "hidden" } }, { ...
} ]; });
<|file_name|>DNSInject.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # by Chris Truncer # Script to attempt to forge a packet that will inject a new value # for a dns record. Check nessus plugin #35372 # Some great documentation and sample code came from: # http://bb.secdev.org/scapy/src/46e0b3e619547631d704c...
<|file_name|>QueryScheduleTaskDetailResp.java<|end_file_name|><|fim▁begin|>package com.huawei.esdk.fusionmanager.local.model.system; import com.huawei.esdk.fusionmanager.local.model.FMSDKResponse; /** * 查询计划任务详情返回信息。 * <p> * @since eSDK Cloud V100R003C30 */ public class QueryScheduleTaskDetailResp extends FMSDKRe...
} }
<|file_name|>tf_record_iter.py<|end_file_name|><|fim▁begin|># Copyright 2020 The FedLearner 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.ap...
return self._record_str
<|file_name|>oldisim_benchmark.py<|end_file_name|><|fim▁begin|># Copyright 2015 PerfKitBenchmarker 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://w...
driver_vms.append(vm) elif vm_index < (NUM_DRIVERS + NUM_ROOTS): root_vms.append(vm) else:
<|file_name|>escape.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. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses...
'"' => "&quot;", _ => unreachable!() }; fmt.buf.write(s.as_bytes());
<|file_name|>test_api_validation.py<|end_file_name|><|fim▁begin|># Copyright 2013 NEC Corporation. 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 # # h...
self.post(body={'foo': '192.168.10.100'},
<|file_name|>plot_degree_assortativity.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: UTF-8 -*- ''' plot the results from the files igraph_degree_assort_study and degree_assortativity ''' from igraph import * import os import numpy as np import matplotlib.pyplot as plt<|fim▁hole|>IN_DIR = '/home/s...
#########################
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>""" Internal subroutines for e.g. aborting execution with an error message, or performing indenting on multiline output. """ import sys import textwrap def abort(msg): """ Abort execution, print ``msg`` to stderr and exit with error status (1.) This func...
sys.stdout.flush()
<|file_name|>tup.rs<|end_file_name|><|fim▁begin|>//! A tuple for pattern matching purposes, until vector pattern matching is enabled in stable. //! //! This code is not very pretty at all but it compiles without enabling any experimental features. #[derive(Debug)] pub enum Tup<A,B,C,D,E,F,G,H,I> { T0, T1(A), ...
T6(A, B, C, D, E, F), T7(A, B, C, D, E, F, G), T8(A, B, C, D, E, F, G, H),
<|file_name|>RecurringSelect.js<|end_file_name|><|fim▁begin|>var React = require('react'); var RulePicker = require('./RulePicker.js'); var TimePicker = require('react-time-picker'); var DatePicker = require('react-date-picker'); var RuleSummary = require("./RuleSummary.js"); var moment = require('moment'); var Tabs = ...
<|file_name|>misc.py<|end_file_name|><|fim▁begin|>import random import re from io import BytesIO from typing import Awaitable, List import matplotlib.pyplot as plt import seaborn as sns from curio.thread import async_thread from curious.commands import Context, Plugin from curious.commands.decorators import autoplugin...
buf = BytesIO()
<|file_name|>ModelTreeCondition.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 in...
}
<|file_name|>types.ts<|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 A...
<|file_name|>prime_test.py<|end_file_name|><|fim▁begin|>""" prime_test(n) returns a True if n is a prime number else it returns False """ import unittest def prime_test(n): if n <= 1: return False if n == 2 or n == 3: return True if n % 2 == 0 or n % 3 == 0: return False j = 5 ...
<|file_name|>SucursalesAltaRequest.java<|end_file_name|><|fim▁begin|>package mx.emite.sdk.scot.request; import java.util.List; import javax.validation.Valid; import javax.validation.constraints.NotNull; import org.hibernate.validator.constraints.NotEmpty; import lombok.Builder; import lombok.Data; import lombok.Sin...
* Token del <b>Integrador</b> obtenido con el servicio de Token * -- SETTER -- *
<|file_name|>bird_chooser_dialog.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ /*************************************************************************** BirdChooserDialog A QGIS plugin Show bird observations ------------------- beg...
<|file_name|>reversion.py<|end_file_name|><|fim▁begin|># Copyright 2017 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import argparse import base64 import fnmatch import glob import hashlib import os import re impor...
if __name__ == "__main__": main()
<|file_name|>RendererTextureDesc.cpp<|end_file_name|><|fim▁begin|>// This code contains NVIDIA Confidential Information and is disclosed to you // under a form of NVIDIA software license agreement provided separately to you. // // Notice // NVIDIA Corporation and its licensors retain all intellectual property and // pr...
addressingU = RendererTexture::ADDRESSING_WRAP; addressingV = RendererTexture::ADDRESSING_WRAP; addressingW = RendererTexture::ADDRESSING_WRAP; width = 0;
<|file_name|>UserService.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from django.contrib.auth.models import User from jba_core import exceptions def get_user_by_credentials(username: str, password: str) -> Optional[User]: try: user = User.objects.get(username=username) if not user.check_password(...
from typing import Optional
<|file_name|>test_htb_class.py<|end_file_name|><|fim▁begin|>import unittest import socket import os from shapy.framework.netlink.constants import * from shapy.framework.netlink.message import * from shapy.framework.netlink.tc import * from shapy.framework.netlink.htb import * from shapy.framework.netlink.connection imp...
tcm = tcmsg(socket.AF_UNSPEC, self.interface.if_index, handle, self.qhandle, 0, [Attr(TCA_KIND, 'htb\0'), init])
<|file_name|>FileStorageController.java<|end_file_name|><|fim▁begin|>/* * Copyright 2019 EPAM Systems * * 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...
* limitations under the License. */
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licens...
<|file_name|>get_device_configuration.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2013 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. """Gets and writes the configurations of the attached devices. ...
'Try rebooting the device to fix this warning.' % d) continue
<|file_name|>commio.go<|end_file_name|><|fim▁begin|>package ircbotint import ( "strings" "fmt" "net/http" "io/ioutil" ) var httpUrl string <|fim▁hole|>func SetHttpUrl(url string) { url = strings.Trim(url, "/") url = fmt.Sprintf("%s/", url) httpUrl = url } /** * */ func CallHttp(param1,...
/** * */
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use cpal::{EventLoop, Format, StreamData, UnknownTypeOutputBuffer}; fn main() { let event_loop = EventLoop::new(); let device = cpal::default_output_device().expect("No device available"); let format = device.default_output_format().expect("no default forma...
<|file_name|>CharacterName.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU Genera...
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>######### # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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 # # ht...
linesep = '\r\n' with open(destination_path, 'w') as f: if posix:
<|file_name|>YearMonthDurationDV.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Copyright 2004,2005 The Apache Software Foundation. * * Licensed under the Apache License...
sign = -1;
<|file_name|>grid.service.js<|end_file_name|><|fim▁begin|>(function() { 'use strict'; angular .module('app.grid') .service('GridDemoModelSerivce', GridDemoModelSerivce) .service('GridUtils',GridUtils) .factory('GridFactory',GridFactory) ; GridFactory.$inject =...
this.rows = []; this.rawData = [];
<|file_name|>config_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 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/licenses/LICENS...
<|file_name|>dragdemo.js<|end_file_name|><|fim▁begin|>//数据的视觉映射 // 数据可视化是 数据 到 视觉元素 的映射过程(这个过程也可称为视觉编码,视觉元素也可称为视觉通道)。 // data ----> graph //使用visualmap提供通用的视觉映射 visualmap 属性有 1.图形类别symbol 2.图像大小symbolSize 3.颜色color 4.透明度opacity 5.颜色透明度 colorAlpha // 6.颜色明暗度colorLightness 7.颜色饱和度colorSturaction 8.色调colorHue //数据和维度 ...
min: -100,
<|file_name|>formatting.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
../../../../../../../share/pyshared/orca/scripts/apps/evolution/formatting.py
<|file_name|>test_tcp.rs<|end_file_name|><|fim▁begin|>use std::cmp;<|fim▁hole|>use std::sync::mpsc::channel; use std::thread; use std::time::Duration; use net2::{self, TcpStreamExt}; use {TryRead, TryWrite}; use mio::{Token, Ready, PollOpt, Poll, Events}; use iovec::IoVec; use mio::net::{TcpListener, TcpStream}; #[t...
use std::io::prelude::*; use std::io; use std::net;
<|file_name|>list_ops_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 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.apa...
a = list_ops.tensor_list_push_back(a, l1) a = list_ops.tensor_list_push_back(a, l2) b = list_ops.empty_tensor_list( element_dtype=dtypes.variant, element_shape=[])
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import ButtonHolder, Div, Fieldset, HTML, Layout, Submit from django import forms from django.core.validators import EmailValidator, email_re from django....
del kwargs['domain'] super(CommtrackUserForm, self).__init__(*args, **kwargs)
<|file_name|>stream.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ use std::pin::Pin; use anyhow::Error; use async_compression::tokio::bufread::{GzipEnco...
} let ret = futures::ready!(projection.inner.poll_next_unpin(ctx)); if let Some(Ok(ref bytes)) = ret {
<|file_name|>CCArmature.js<|end_file_name|><|fim▁begin|>/**************************************************************************** Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2014 Chukong Technologies Inc. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaini...
}, /** * Sets armatureData to this Armature
<|file_name|>client.py<|end_file_name|><|fim▁begin|># # Copyright 2013 Nicolas Lamirault <nicolas.lamirault@gmail.com>. # # 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.apa...
logger.info("[FreeboxOS] Wifi configuration") wifi_config = self.app.freebox_client.get_wifi_config() logger.info("[FreeboxOS] Wifi configuration:\n %s" % wifi_config)
<|file_name|>verb.js<|end_file_name|><|fim▁begin|>define( ['helper/english', 'vendor/underscore'], function(englishHelper, _){ var persons, irregularVerbs; /** * @type {Array} */ persons = ['s1', 's2', 's3', 'p1', 'p2', 'p3']; irregularVerbs = { be...
/**
<|file_name|>db_actions.py<|end_file_name|><|fim▁begin|>from boto3.dynamodb.conditions import Attr def update_users_followers(username, follower_id, table, remove=False): ''' Find all the users that %username% follows and update their "followers" list and "followers_count" amount ''' item = table...
item['follow'].remove(user_id) table.update_item(
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>/*global module:false*/ module.exports = function(grunt) { // Load all tasks require('load-grunt-tasks')(grunt); // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), meta: { banner: '/*! <%= pkg.title || pkg...
'<%= pkg.homepage ? "* " + pkg.homepage : "" %>' + '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
<|file_name|>Sort.java<|end_file_name|><|fim▁begin|>package com.ftninformatika.bisis.opac.search; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; /** * @author badf00d21 15.8.19. */ @Getter @Setter @AllArgsConstructor @NoArgsConstructor public class So...
case "PY_sort" : this.type = SortType.SORT_YEAR; break; case "PU_sort" : this.type = SortType.SORT_PUBLISHER; break;
<|file_name|>imageCover.tsx<|end_file_name|><|fim▁begin|>import {Event, ipcRenderer} from 'electron'<|fim▁hole|>import { ISettings } from '../../settings' import { TrelloTypes } from '../../TrelloInterfaces' export default class ImageCover extends React.Component<IimageCoverProps, {}> { public render () { let exten...
import * as React from 'react' import * as ReactDOM from 'react-dom' import * as globalProperties from '../../globalProperties' import * as HelperUI from '../../HelperUI'
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from flask_wtf import Form from wtforms import TextField, DecimalField, TextAreaField, DateField, validators, PasswordField, BooleanField class CommentForm(Form):<|fim▁hole|> text = TextField('Title', [validators.Required()]) text2 = TextAreaField('Body') l...
<|file_name|>address.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2016-2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Encode and decode Bitcoin addresses. - base58 P2P...
"""Converts a base58-encoded string to its data and version. Throws if the base58 checksum is invalid."""
<|file_name|>AdapterInputConnection.java<|end_file_name|><|fim▁begin|>// Copyright 2013 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. package org.chromium.content.browser.input; import android.os.SystemClock; import a...
ImeState getImeStateForTesting() { String text = mEditable.toString();
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>'''trec_dd.* namespace package can have several subpackages, see http://github.com/trec-dd for more info .. This software is released under an MIT/X11 open source license. Copyright 2015 Diffeo, Inc. '''<|fim▁hole|><|fim▁end|>
import pkg_resources pkg_resources.declare_namespace(__name__)
<|file_name|>runner.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # daemon/runner.py # Part of python-daemon, an implementation of PEP 3143. # # Copyright © 2009–2010 Ben Finney <ben+python@benfinney.id.au> # Copyright © 2007–2008 Robert Niederreiter, Jens Klein # Copyright © 2003 Clark Evans # Copyright © 2...
<|file_name|>index.tsx<|end_file_name|><|fim▁begin|>/* * * TagsBar * */ import { FC } from 'react' import { keys, reverse } from 'ramda' import { pluggedIn } from '@/utils/mobx' import { buildLog } from '@/utils/logger' import type { TProps as TTagProps } from '../index' import GobackTag from './GobackTag' impo...
)} {groupsKeys.map((groupKey) => ( <Folder key={groupKey}
<|file_name|>models.js<|end_file_name|><|fim▁begin|>define(function(require, exports) { 'use strict'; var Backbone = require('backbone') , global = require('global'); var teamColours = [ '#FFBBBB', '#FFE1BA', '#FDFFBA', '#D6FFBA', '#BAFFCE', '#BAFFFD', '#BAE6FF', '#BAC8FF', '...
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # nukebox2000 documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all p...
# The font size ('10pt', '11pt' or '12pt').
<|file_name|>duty_notice.js<|end_file_name|><|fim▁begin|>define((require, exports, module) => { return (store) => { store.subscribe((mutation, state) => { if (mutation.type === 'duty/updateDuty') { let { finished_at, horse_id2, horse_id1, field_id1, field_id2, bout_id1, bout_id2, param} ...
<|file_name|>bulkselect-table.js<|end_file_name|><|fim▁begin|>(function($){ $.applyBulkSelectTable = function(obj, settings) {<|fim▁hole|> lastClickedChecked = false, lastClickedIndex = null; var applyClass = function(obj, className, checked) { if(checked) obj.addClass(className); else obj.re...
var lastClickedElement = null,
<|file_name|>DocumentSearchDAOJdbcImpl.java<|end_file_name|><|fim▁begin|>/** * Copyright 2005-2014 The Kuali Foundation * * Licensed under the Educational Community 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 * ...
statement.setFetchSize(maxResultCap + 1); statement.setMaxRows(fetchLimit + 1); PerformanceLogger perfLog = new PerformanceLogger();