prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>args.rs<|end_file_name|><|fim▁begin|>use super::abi::usercalls::{alloc, raw::ByteBuffer}; use crate::ffi::OsString; use crate::fmt; use crate::slice; use crate::sync::atomic::{AtomicUsize, Ordering}; use crate::sys::os_str::Buf; use crate::sys_common::FromInner; #[cfg_attr(test, linkage = "available_exter...
<|file_name|>cabi_arm.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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/l...
let mut arg_tys = Vec::new();
<|file_name|>is_empty.rs<|end_file_name|><|fim▁begin|>use malachite_base_test_util::bench::bucketers::rational_sequence_len_bucketer; use malachite_base_test_util::bench::{run_benchmark, BenchmarkType}; use malachite_base_test_util::generators::common::{GenConfig, GenMode}; use malachite_base_test_util::generators::uns...
) { run_benchmark(
<|file_name|>Formatter.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2011 ZXing 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/L...
*
<|file_name|>rmm_diis_old.py<|end_file_name|><|fim▁begin|>"""Module defining ``Eigensolver`` classes.""" import numpy as np from gpaw.utilities.blas import axpy from gpaw.eigensolvers.eigensolver import Eigensolver from gpaw import extra_parameters class RMM_DIIS(Eigensolver): """RMM-DIIS eigensolver It i...
self.timer.start('precondition') psit_xG[:] += self.preconditioner(R_xG, kpt, ekin_x)
<|file_name|>actions.js<|end_file_name|><|fim▁begin|>export const UPDATE_TREE_FILTER = 'SIMPR_UPDATE_TREE_FILTER'; export const fireUpdateTreeFilter = (filter) => ({ type: UPDATE_TREE_FILTER, payload: {<|fim▁hole|><|fim▁end|>
filter }, });
<|file_name|>issue_user_test.go<|end_file_name|><|fim▁begin|>// Copyright 2017 The Gogs Authors. All rights reserved.<|fim▁hole|>// license that can be found in the LICENSE file. package models import ( "testing" "code.gitea.io/gitea/models/db" repo_model "code.gitea.io/gitea/models/repo" "code.gitea.io/gitea/mo...
// Use of this source code is governed by a MIT-style
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#----------------------------------------------------------------------------- # Copyright (c) 2008-2012, David P. D. Moss. All rights reserved. # # Released under the BSD license. See the LICENSE file for details. #----------------------------------------------...
value, prefixlen, module = None, None, None
<|file_name|>qa_repack_bits_bb.py<|end_file_name|><|fim▁begin|><|fim▁hole|># # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import random from gnuradio import gr, gr_unittest, blocks import pmt class qa_repack_bits_bb (gr_unittest....
#!/usr/bin/env python
<|file_name|>test_installer.py<|end_file_name|><|fim▁begin|>"""Smoke tests to check installation health :Requirement: Installer :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: Installer :Assignee: desingh :TestType: Functional :CaseImportance: High :Upstream: No """ import re import pytest f...
'--reset-foreman-proxy-dns-provider', '--reset-foreman-proxy-dns-reverse', '--reset-foreman-proxy-dns-server', '--reset-foreman-proxy-dns-tsig-keytab',
<|file_name|>feature_extraction.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ''' Description: Extract the feature from the text in English. Version: python3 ''' from sklearn.feature_extraction.text import CountVectorizer<|fim▁hole|> VECTORIZER = CountVectorizer(min_df=1) # 以下代码设置了特征提取方法的参数(以1-2个单词作为...
<|file_name|>gamma.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division from future.utils import with_metaclass import numpy as np import scipy as sp from abc import ABCMeta, abstractmethod from scipy import integrate import scipy.interpolate as interp...
q = 1.0 self._param_names = ['V0', 'gamma0', 'q'] self._param_units = ['ang^3', '1', '1']
<|file_name|>persistent.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export abstract class Persistent { public id: number; }
<|file_name|>bnw_shell.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os.path as path<|fim▁hole|>sys.path.insert(0,root)<|fim▁end|>
import sys root=path.abspath(path.dirname(__file__))
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3.9 # -*- coding: utf-8 -*- """Eris Codebase Monitor Eris maintains an up-to-date set of reports for every file in a codebase. A status indicator summarises the state of each report, and a report is viewed by selecting this status indicator ...
import importlib.resources import itertools
<|file_name|>go16.go<|end_file_name|><|fim▁begin|>// +build go1.6 package gotool import ( "go/build" "path/filepath"<|fim▁hole|> "runtime" ) var gorootSrc = filepath.Join(runtime.GOROOT(), "src") func shouldIgnoreImport(p *build.Package) bool { return p == nil || len(p.InvalidGoFiles) == 0 }<|fim▁end|>
<|file_name|>writer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #coding=utf-8 # Filename: writer.py ''' 日志记录 @author: 1th @data: 2017.2.28 ''' from time import sleep import datetime from simpleat.conf import settings, globalvar from simpleat.core import exceptions from .logger import write_log _CMD_OUT = s...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![no_std] #[macro_use] extern crate std_artiq as std; extern crate board; extern crate byteorder; mod proto; #[cfg(has_drtio)] mod crc32; use std::io::{self, Read, Write}; #[cfg(has_drtio)] use core::slice; use proto::*; #[derive(Debug)] pub enum Packet { EchoRe...
} let crc = crc32::checksum_ieee(&writer.get_ref()[0..len as usize]);
<|file_name|>FileManager.cpp<|end_file_name|><|fim▁begin|>/* * This file is part of Dune Legacy. * * Dune Legacy is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * ...
if(getCaseInsensitiveFilename(externalFilename) == true) { return true;
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # Copyright (c) 2019 Red Hat, Inc. # Copyright (c) 2015-2018 Cisco Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # de...
def cfg_val_to_list(v): """Turn config val to list and filter out empty lines."""
<|file_name|>test_sns.py<|end_file_name|><|fim▁begin|># Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import json from .common import BaseTest, functional from c7n.resources.aws import shape_validate from c7n.utils import yaml_load class TestSNS(BaseTest): @functional def test...
<|file_name|>template_depexpr_field_ref.cc<|end_file_name|><|fim▁begin|><|fim▁hole|>// Checks that we don't fall over on fields that depend on expressions. //- @T defines/binding TyvarT template <typename T> struct S { T t; //- @f ref DepF //- DepF.node/kind lookup //- DepF.text f //- !{DepF param.0 Anything}...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md> //! FFI bindings to oledb. #![no_std] #![experimental]<|fim▁hole|>extern "system" { }<|fim▁end|>
extern crate winapi; use winapi::*;
<|file_name|>projects-contribution-report.js<|end_file_name|><|fim▁begin|>import m from 'mithril'; import _ from 'underscore'; import postgrest from 'mithril-postgrest'; import models from '../models'; import h from '../h'; import projectDashboardMenu from '../c/project-dashboard-menu'; import projectContributionReport...
},
<|file_name|>storage-gen.go<|end_file_name|><|fim▁begin|>// Package storage provides access to the Cloud Storage JSON API. // // See https://developers.google.com/storage/docs/json_api/ // // Usage example: // // import "google.golang.org/api/storage/v1beta1" // ... // storageService, err := storage.New(oauthHttp...
// }, // "scopes": [ // "https://www.googleapis.com/auth/devstorage.full_control" // ]
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from dogpile.cache.region import register_backend register_backend( "dogpile.cache.null", "dogpile.cache.backends.null", "NullBackend") register_backend( "dogpile.cache.dbm", "dogpile.cache.backends.file", "DBMBackend") register_backend( "dogpile.cache....
"dogpile.cache.memory", "dogpile.cache.backends.memory", "MemoryBackend") register_backend( "dogpile.cache.memory_pickle", "dogpile.cache.backends.memory",
<|file_name|>optimizer.py<|end_file_name|><|fim▁begin|>class Optimizer: def __init__(self, model, params=None): self.model = model if params: self.model.set_params(**params) self.params = self.model.get_params() self.__chain = list() def step(self, name, values, ski...
<|file_name|>calendar-coverage.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:7076c06d1c5b0c8a10633ae2837be365f999203218d8484d9c4dd3bcb53c7e95<|fim▁hole|>size 49060<|fim▁end|>
<|file_name|>v3_server.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The etcd 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-...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Dedicated single thread actor-ref implementations use std::thread; use std::sync::mpsc::{channel, Sender}; use std::sync::{Arc, Mutex}; use std::fmt::{self, Debug, Formatter}; use {Actor, ActorSpawner}; use {ActorRef, ActorRefImpl, ActorRefEnum}; use {SendError}; ...
/// which can act as ActorRef. /// /// It uses one thread per actor. pub struct ActorCell<Message: Send> {
<|file_name|>tessellation.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2019 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "gm/gm.h" #include "src/core/SkCanvasPriv.h" #include "src/gpu/GrCaps.h" #include "src/gpu/GrDirectContext...
void writeFragmentShader(GrGLSLFPFragmentBuilder* f, const char* color,
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for antibiobank project. <|fim▁hole|> For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "antibiobank.settings") from django.core.wsgi import...
It exposes the WSGI callable as a module-level variable named ``application``.
<|file_name|>replicationcontroller.go<|end_file_name|><|fim▁begin|>/* Copyright 2021 The Knative 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...
client "knative.dev/pkg/client/injection/kube/client" filtered "knative.dev/pkg/client/injection/kube/informers/factory/filtered"
<|file_name|>components.py<|end_file_name|><|fim▁begin|>#################################################################################################### # # GroupedPurchaseOrder - A Django Application. # Copyright (C) 2014 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify # ...
if size == 'xs': classes.append('btn-xs') elif size == 'sm' or size == 'small':
<|file_name|>span.rs<|end_file_name|><|fim▁begin|>//! Types representing positions and spans inside source file. use super::Source; use std::rc::Rc; use std::cmp; use std::usize; /// Represent a unique position within all source managed files. #[derive(Clone, Copy, PartialEq, Eq)] pub struct Pos(pub usize); impl Po...
pub start: usize,
<|file_name|>cusolverOperations.cpp<|end_file_name|><|fim▁begin|>#include <boost\math\special_functions.hpp> #include "common.h" #include "cusolverOperations.h" namespace matCUDA { template< typename TElement> cusolverStatus_t cusolverOperations<TElement>::ls( Array<TElement> *A, Array<TElement> *x, Array<TElement...
<|file_name|>dstr-array-elem-trlg-iter-list-nrml-close-skip.js<|end_file_name|><|fim▁begin|>// This file was procedurally generated from the following sources: // - src/dstr-assignment/array-elem-trlg-iter-list-nrml-close-skip.case // - src/dstr-assignment/default/for-of.template /*--- description: IteratorClose is not...
iterable[Symbol.iterator] = function() {
<|file_name|>funcionJS.js<|end_file_name|><|fim▁begin|>//Funcion para insertar un trozo de codigo HTML function loadXMLDoc(url) { <|fim▁hole|> var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=ne...
<|file_name|>exercise-19.js<|end_file_name|><|fim▁begin|>// 19. Write a JavaScript function that returns array elements larger than a number. //two agrs - an array and a number to be larger than function isGreater(arr, num) {<|fim▁hole|> var resultArray = []; //iterate through based on length of the arr for(var i...
//set up an array to contain the results
<|file_name|>multifiles_local_test.go<|end_file_name|><|fim▁begin|>/* Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments Copyright (C) ITsysCOM GmbH 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 F...
} if len(mfCgrCfg.CdreProfiles[prfl].ContentFields) != 12 { t.Error("Default instance has number of content fields: ", len(mfCgrCfg.CdreProfiles[prfl].ContentFields)) }
<|file_name|>connect.py<|end_file_name|><|fim▁begin|>import requests import os def post_var(token, ubi_source, ubi_var, value, timestamp=None, context=None): ''' This function posts data to ubidots Input parameters: token: The Ubidots token ubi_source: The name of the user's Ubidots datasource ubi_var: The n...
<|file_name|>HexStats.py<|end_file_name|><|fim▁begin|><|fim▁hole|>#Based on Weechat's Weestats: https://weechat.org/scripts/source/weestats.py.html/ #By Filip H.F. 'FiXato' Slagter <fixato [at] gmail [dot] com> __module_name__ = 'HexStats' __module_version__ = '0.0.1' __module_description__ = 'Displays HexChat-wide U...
import hexchat
<|file_name|>header.component.js<|end_file_name|><|fim▁begin|>(function() { 'use strict'; /** * idHeader * * This component renders the application header. */ angular .module('app.components') .component('idHeader', header()); /** * Internal function that retur...
function onInit() { var currentUser = authService.currentUser(); if (currentUser) { vm.currentUserName = currentUser.firstName + ' ' + currentUser.lastName;
<|file_name|>trafficDownloader.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python __author__ = "Devin Kelly" import pymongo import time import json import re import os import daemon from datetime import datetime from tornado import httpclient, ioloop def parseHTML(htmlData): expr = re.compile("In current tra...
trafficData.append(tmpData)
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>/* This source file is part of KBEngine For the latest info, see http://www.kbengine.org/ Copyright (c) 2008-2012 KBEngine. KBEngine is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as publishe...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * @fileoverview Defines compressors utility methods. * * @see https://google.github.io/styleguide/javascriptguide.xml * @see https://developers.google.com/closure/compiler/docs/js-for-compiler * @module glize/compressors */ import * as lzw from 'lzw-compress...
return result; };
<|file_name|>configProject.py<|end_file_name|><|fim▁begin|>from PyQt5 import QtCore from src.business.configuration.constants import project as p from src.ui.commons.verification import cb class ConfigProject: def __init__(self): self._settings = QtCore.QSettings(p.CONFIG_FILE, QtCore.QSettings.IniFormat...
self.get_value(m, p.TEMPERATURE)
<|file_name|>test_subscription.py<|end_file_name|><|fim▁begin|>"""Test class for Subscriptions :Requirement: Subscription :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: CLI :TestType: Functional :CaseImportance: High :Upstream: No """ import tempfile import csv import os from robottelo import...
<|file_name|>test_utils.py<|end_file_name|><|fim▁begin|>import teca.utils as tecautils import teca.ConfigHandler as tecaconf import unittest class TestFileFilter(unittest.TestCase): def setUp(self): self.conf = tecaconf.ConfigHandler( "tests/test_data/configuration.json", {"starting...
tecautils.filterImages(self.files_list,
<|file_name|>Statement.after.py<|end_file_name|><|fim▁begin|>def f(): a = 1<|fim▁hole|> def foo(a_new, b_new): print(a_new + b_new * 123)<|fim▁end|>
b = 1 foo(a, b)
<|file_name|>test_models_speaker_contact.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any la...
url='http://www.davigarcia.com.br', description='Passionate software developer!' )
<|file_name|>send_event_to_device.rs<|end_file_name|><|fim▁begin|>//! `PUT /_matrix/client/*/sendToDevice/{eventType}/{txnId}` pub mod v3 { //! `/v3/` ([spec]) //! //! [spec]: https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3sendtodeviceeventtypetxnid use std::collections::BTreeMap; ...
<|file_name|>test2.js<|end_file_name|><|fim▁begin|>var objc = require('../') <|fim▁hole|>console.log(NSApplication); var sharedApplication = objc.sel_registerName('sharedApplication'); var app = objc.objc_msgSend(NSApplication, sharedApplication); console.log(app);<|fim▁end|>
objc.dlopen('/System/Library/Frameworks/AppKit.framework/AppKit'); NSApplication = objc.objc_getClass('NSApplication');
<|file_name|>glfs.rs<|end_file_name|><|fim▁begin|>#![allow(non_camel_case_types)] use libc::{c_char, c_int, c_long, c_void, dev_t, dirent, gid_t, flock, mode_t, off_t, size_t, stat, ssize_t, statvfs, timespec, uid_t}; pub enum Struct_glfs { } pub type glfs_t = Struct_glfs; pub enum Struct_glfs_fd { } pub ty...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url<|fim▁hole|>urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^post/(?P<pk>[0-9]+)/$', views.detail, name='detail'), url(r'^archive/(?P<year>[0-9]{4})/(?P<month>[0-9]{1,2})/$', views.archives, name='archive'), u...
from . import views
<|file_name|>test_query.py<|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/license...
<|file_name|>matching.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use std::cmp::Ordering; use std::cmp; use std::iter::Iterator; use fancy_regex::Regex as FancyRegex; use regex::Regex; use chrono::{NaiveDate, Datelike, Local}; use scoring; use keygraph_rs::*; include!(concat!(env!("OUT_DIR"), "/freq...
<|file_name|>app_event.test.js<|end_file_name|><|fim▁begin|>'use strict'; const path = require('path'); const request = require('supertest'); const pedding = require('pedding'); const assert = require('assert'); const sleep = require('ko-sleep'); const mm = require('..'); const fixtures = path.join(__dirname, 'fixture...
baseDir, cache: false,
<|file_name|>S15.4.4.9_A5.1.js<|end_file_name|><|fim▁begin|>// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- info: The length property of shift has the attribute DontEnum es5id: 15.4.4.9_A5.1 description: Checking use propertyIsEn...
$ERROR('#1: Array.prototype.shift.propertyIsEnumerable(\'length\') === false. Actual: ' + (Array.prototype.shift.propertyIsEnumerable('length'))); }
<|file_name|>wait_job.go<|end_file_name|><|fim▁begin|>// Copyright 2017 <chaishushan{AT}gmail.com>. All rights reserved. // Use of this source code is governed by a Apache // license that can be found in the LICENSE file. package wait import ( "fmt" "time" pb "github.com/chai2010/qingcloud-go/pkg/api" statuspkg ...
return true, nil // OK case statuspkg.JobStatus_Pending, statuspkg.JobStatus_Working: return false, nil case statuspkg.JobStatus_Failed:
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
'get_plugin_class', 'PLUGIN_NAMESPACE',
<|file_name|>circular_queue_test.cc<|end_file_name|><|fim▁begin|>/* Copyright 2017 Istio 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....
<|file_name|>AuthenticationServiceImpl.java<|end_file_name|><|fim▁begin|>package org.sagebionetworks.auth.services; import org.sagebionetworks.repo.manager.AuthenticationManager; import org.sagebionetworks.repo.manager.MessageManager; import org.sagebionetworks.repo.manager.UserManager; import org.sagebionetworks.repo...
@Autowired
<|file_name|>test_hooks.py<|end_file_name|><|fim▁begin|>"""Tests for `cookiecutter.hooks` module.""" import os import errno import stat import sys import textwrap import pytest from cookiecutter import hooks, utils, exceptions def make_test_repo(name, multiple_hooks=False): """Create test repository for test se...
<|file_name|>less.js<|end_file_name|><|fim▁begin|>if (typeof window !== 'undefined') { var less = require('npm:less/lib/less-browser/index')(window, window.less || {}) var head = document.getElementsByTagName('head')[0]; // get all injected style tags in the page var styles = document.getElementsByTagN...
request.send(); });
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod data_cache; use std::collections::HashMap; use std::option::Option; use self::data_cache::base_data::City; struct DfaState { name:String, path:HashMap<char, DfaState>, } impl DfaState { fn new(n:String) -> DfaState { DfaState{name:n, path:Ha...
<|file_name|>lex.py<|end_file_name|><|fim▁begin|>import operator import ply.lex as lex from jpp.parser.operation import Operation from jpp.parser.expression import SimpleExpression reserved = { 'extends': 'EXTENDS', 'import': 'IMPORT', 'local': 'LOCAL', 'imported': 'IMPORTED', 'user_input': 'USER...
t.type = reserved.get(t.value, NAME_TOK) # Check for reserved words return t
<|file_name|>messages.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import struct class BBType(object): command = 1 command_return = 2 consolemsg = 3 ping = 4 pong = 5 getenv = 6 getenv_retu...
self.varname = varname super(BBPacketGetenv, self).__init__(BBType.getenv, raw=raw) def __repr__(self):
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>#************************************************************************************************* # # File Name: gui.py # Project: Erebus Labs Sensor # Revision Date: 04/13/2014 # Description: This file contains the main Erebus Sensor gui class # #**********...
self.bConnectSensor.grid(row=0, column=1, padx=10, pady=10)
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># Django settings for test_remote_project project. import os.path import posixpath PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) FIXT...
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows.
<|file_name|>svgs_2_pngs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Basic exporter for svg icons from os import listdir from os.path import isfile, join, dirname, realpath import subprocess import sys import rsvg import cairo last_svg_path = None last_svg_data = None SCRIPT_FOLDER = dirname(realpath...
theme_out_icon_names = []
<|file_name|>EventListener.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is ...
public void connectionClosed(); }
<|file_name|>comp-4615.component.spec.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { async, ComponentFixture, TestBed } fr...
fixture.detectChanges(); }); it('should create', () => {
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># Django settings for babynames project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', '...
'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware',
<|file_name|>Button.js<|end_file_name|><|fim▁begin|>/* ************************************************************************ qooxdoo - the new era of web development http://qooxdoo.org Copyright: 2004-2008 1&1 Internet AG, Germany, http://www.1und1.de License: LGPL: http://www.gnu.org/licen...
appearance : { refine : true,
<|file_name|>Encoding.hpp<|end_file_name|><|fim▁begin|>// Copyright Benoit Blanchon 2014-2015 // MIT License // // Arduino JSON library // https://github.com/bblanchon/ArduinoJson #pragma once #include "../Arduino/Print.hpp" namespace ArduinoJson { namespace Internals { class Encoding { public: //...
// Optimized for code size on a 8-bit AVR static char unescapeChar(char c) {
<|file_name|>efficientnet.py<|end_file_name|><|fim▁begin|># Copyright 2019 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.apac...
from tensorflow.python.keras.applications import imagenet_utils
<|file_name|>state.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either versi...
declare_test!{GeneralStateTest_stSystemOperationsTest, "GeneralStateTests/stSystemOperationsTest/"} declare_test!{GeneralStateTest_stTransactionTest, "GeneralStateTests/stTransactionTest/"} declare_test!{GeneralStateTest_stTransitionTest, "GeneralStateTests/stTransitionTest/"}
<|file_name|>libstd-re-export.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
#![deny(broken_intra_doc_links)] #![feature(intra_doc_pointers)] pub use std::*;
<|file_name|>container.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2012 Anne Archibald <peridot.faceted@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public Licen...
self._unset_container(self[key]) try: self._set_container(value) except ContainerError:
<|file_name|>mpq.rs<|end_file_name|><|fim▁begin|>use std::fs::File; use std::io::Read; use std::ptr::copy_nonoverlapping; <|fim▁hole|>// 11011010100010101000001001101 // 1101101010001 fn sp(){ let bytes: [u8; 4] = [77, 80, 81, 27]; let buf_a: [u8; 2] = [77, 80]; let buf_b: [u8; 2] = [81, 27]; let mut ...
// Result:
<|file_name|>login_offline_test.go<|end_file_name|><|fim▁begin|>package engine import ( "os" "testing" "time" "golang.org/x/net/context" "github.com/keybase/client/go/libkb" "github.com/keybase/clockwork" "github.com/stretchr/testify/require" ) func TestLoginOffline(t *testing.T) { tc := SetupEngineTest(t, ...
// Login offline with nothing in upak cache for self user. func TestLoginOfflineNoUpak(t *testing.T) { tc := SetupEngineTest(t, "login")
<|file_name|>neato.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # ROS node for the Neato Robot Vacuum # Copyright (c) 2010 University at Albany. All right reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are m...
left_drop = self.robot.state["LeftDropInMM"] right_drop = self.robot.state["RightDropInMM"] # send updated movement commands
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>var path = require("path"); var webpack = require("webpack"); module.exports = function(entries, release) { var config = { // entry file to start from entry: entries, output: { // directory to output to path: path.resolve("./lib"), ...
"window.$": "jquery" }) ] };
<|file_name|>test_deprecations.py<|end_file_name|><|fim▁begin|>import sqlalchemy as sa from sqlalchemy import inspect from sqlalchemy.ext import declarative as legacy_decl from sqlalchemy.ext.declarative import instrument_declarative from sqlalchemy.orm import Mapper from sqlalchemy.testing import eq_ from sqlalchemy.t...
class DeprecatedImportsTest(fixtures.TestBase):
<|file_name|>serialize.py<|end_file_name|><|fim▁begin|># encoding=utf-8 from .types.compound import ( ModelType, EMPTY_LIST, EMPTY_DICT, MultiType ) import collections import itertools ### ### Field ACL's ### class Role(collections.Set): """A Role object can be used to filter specific fields against a seque...
<|file_name|>runtime.py<|end_file_name|><|fim▁begin|><|fim▁hole|># # Copyright (C) 2010 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at y...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from flask import Blueprint from flask import current_app from flask import request from flask import jsonify from flask import abort from flask import render_template from flask import redirect from flask import url_for from flask import flash from werkzeug.excepti...
@login_required def reports_new(): form = ReportForm()
<|file_name|>RequestMultipleSecurityTokens.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # papyon - a python client library for Msn # # Copyright (C) 2005-2006 Ali Sabil <ali.sabil@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Pub...
if isinstance(attr, tuple) and attr[0] == url:
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """The initialization file for the Pywikibot framework.""" # # (C) Pywikibot team, 2008-2014 # # Distributed under the terms of the MIT license. # from __future__ import unicode_literals __release__ = '2.0rc4' __version__ = '$Id: e26392a530...
(request, args, kwargs) = page_put_queue.get()
<|file_name|>connect_dots.js<|end_file_name|><|fim▁begin|>class Color { constructor () { this.r = Color.value(); this.g = Color.value(); this.b = Color.value(); this.style = "rgba(" + this.r + "," + this.g + "," + this.b + ",1)"; //this.style = "rgba(233,72,152,1)"; } static value () { return Math.floo...
<|file_name|>resource_dns_record_set_test.go<|end_file_name|><|fim▁begin|>package google import ( "fmt" "testing" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) func TestAccDnsRecordSet_basic(t *testing.T) { t.Parall...
<|file_name|>testing.py<|end_file_name|><|fim▁begin|><|fim▁hole|>skipiftravis = pytest.mark.skipif( os.environ.get('TRAVIS') == 'true', reason='skip on Travis-CI')<|fim▁end|>
import os import pytest
<|file_name|>checked_next_power_of_two.rs<|end_file_name|><|fim▁begin|>#![feature(core)] extern crate core; #[cfg(test)] mod tests { // macro_rules! uint_impl { // ($ActualT:ty, $BITS:expr, // $ctpop:path, // $ctlz:path, // $cttz:path, // $bswap:path, // $add_wi...
// /// Wrapping (modular) addition. Computes `self + other`, // /// wrapping around at the boundary of the type. // #[stable(feature = "rust1", since = "1.0.0")]
<|file_name|>Grow.js<|end_file_name|><|fim▁begin|>import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import * as React from 'react'; import PropTypes from 'prop-types'; import { Transition } from 'react-transiti...
<|file_name|>coders.go<|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 /...
func encodeExpandFloat64ValuesAccum(v expandFloat64ValuesAccum) ([]byte, error) { return encode(v) }
<|file_name|>relationships_test.go<|end_file_name|><|fim▁begin|>package bdb import ( "reflect" "testing" ) func TestToOneRelationships(t *testing.T) { t.Parallel() tables := []Table{ { Name: "pilots", Columns: []Column{{Name: "id", Unique: true}, {Name: "name", Unique: true}}}, { Name: "airpor...
Unique: false,
<|file_name|>CustomUserDetailsService.java<|end_file_name|><|fim▁begin|><|fim▁hole|>import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.spring...
package com.lyubenblagoev.postfixrest.security; import com.lyubenblagoev.postfixrest.entity.User; import com.lyubenblagoev.postfixrest.repository.UserRepository;
<|file_name|>url_fetcher_core.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 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/url_request/url_fetcher_core.h" #include <stdint.h> #include "base/bind....
<|file_name|>SharedKeyDB.py<|end_file_name|><|fim▁begin|>"""Class for storing shared keys.""" from utils.cryptomath import * from utils.compat import * from mathtls import * from Session import Session from BaseDB import BaseDB class SharedKeyDB(BaseDB):<|fim▁hole|> A SharedKeyDB can be passed to a server handshak...
"""This class represent an in-memory or on-disk database of shared keys.