prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>shrunk_covariance_.py<|end_file_name|><|fim▁begin|>"""<|fim▁hole|> """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Virgile Fritsch <virgile.fritsch@inria.fr> # # License: BSD Style. # avoid division truncation from __future...
Covariance estimators using shrinkage. Shrinkage corresponds to regularising `cov` using a convex combination: shrunk_cov = (1-shrinkage)*cov + shrinkage*structured_estimate.
<|file_name|>DevProjects.js<|end_file_name|><|fim▁begin|>import React, {Component} from "react"; import { addAnimationId } from './modules/animationFunctions.js' import '../scss/dev-projects.css'; import close from "../assets/close.png"; export default class DevProjects extends Component { componentDidMount() { add...
} };
<|file_name|>TestComponent.spec.js<|end_file_name|><|fim▁begin|>'use strict'; describe('TestComponent', function () { var componentController; beforeEach(module('APPLICATION')); beforeEach(inject(function ($componentController) { componentController = $componentController('testComponent', null, {...
describe('when called', function () {
<|file_name|>translation-map.js<|end_file_name|><|fim▁begin|>import Ember from 'ember'; <|fim▁hole|><|fim▁end|>
let __TRANSLATION_MAP__ = {}; export default Ember.Service.extend({ map: __TRANSLATION_MAP__ });
<|file_name|>pair_lj_smooth_omp.cpp<|end_file_name|><|fim▁begin|>/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov This softwa...
else eval<1,0,0>(ifrom, ito, thr);
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>/* Aurélien DESBRIÈRES aurelien(at)hackers(dot)camp License GNU GPL latest */ // Rust experimentations<|fim▁hole|> // A public struct with a public field of generic type `T` pub struct WhiteBox<T> { pub contents: T, } // A public struct with a p...
// Modules Struct Visibility in Rust mod my {
<|file_name|>TabularDataCollection.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Caleydo - Visualization for Molecular Biology - http://caleydo.org * Copyright (c) The Caleydo Team. All rights reserved. * Licensed under the new BSD license, avail...
<|file_name|>htmlframesetelement.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::HTMLFrameSe...
#[allow(unrooted_must_root)]
<|file_name|>vj_serial.py<|end_file_name|><|fim▁begin|>import logging import struct import threading import serial import serial.tools.list_ports COMMAND_TO_CHANNEL = { 'F': 0x00, 'W': 0x01, 'H': 0x02, 'C': 0x03 } class SerialPort(object): def __init__(self, port_name): self.port_name = port_name self.seri...
from vjdummyserial import VjDummySerial self.serial_port = VjDummySerial(port_device) logging.error("Running on dummy serial")
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>extern crate symbiosis; use std::path::Path; use std::fs::{File, create_dir_all}; use std::io::Read; use std::default::Default; use symbiosis::TemplateGroup; use symbiosis::rust::{self, Rust}; use symbiosis::javascript::{self, JavaScript}; fn main() { let out_di...
panic!("failed to read templates/Document.html: {}", e); }
<|file_name|>fedjax_test.py<|end_file_name|><|fim▁begin|># Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
<|file_name|>test_002_board_class.py<|end_file_name|><|fim▁begin|>import code import unittest import os import pcbnew import pdb import tempfile from pcbnew import * class TestBoardClass(unittest.TestCase): def setUp(self): self.pcb = LoadBoard("data/complex_hierarchy.kicad_pcb") self.TITLE="Tes...
pad.SetPosition(wxPointMM(0,0))
<|file_name|>sourceMapValidationVariables.js<|end_file_name|><|fim▁begin|>var a = 10; var b; var c = 10, d, e; var c2, d2 = 10; <|fim▁hole|><|fim▁end|>
//# sourceMappingURL=sourceMapValidationVariables.js.map
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from . import test_product_margin_classification<|fim▁end|>
# -*- coding: utf-8 -*-
<|file_name|>arrayConfigurationTools.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python """ S. Leon @ ALMA Classes, functions to be used for the array configuration evaluation with CASA HISTORY: 2011.11.06: - class to create the Casas pads file from a configuration file 2011.11.09: - ...
<|file_name|>CreateJobPlaylistJsonUnmarshaller.java<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in ...
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights * Reserved. *
<|file_name|>common.js<|end_file_name|><|fim▁begin|>/* This file is a part of libertysoil.org website Copyright (C) 2016 Loki Education (Social Enterprise) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Sof...
}
<|file_name|>AndroidRenderer.cpp<|end_file_name|><|fim▁begin|>// // Created by chan on 2017/9/19. // #include "AndroidRenderer.h" #include "../misc/RawString2JavaStringHolder.h" void AndroidRenderer::begin() { mJNIEnv->CallVoidMethod(mJavaRenderer, mBeginId); } void AndroidRenderer::end() { mJNIEnv->CallVoid...
void AndroidRenderer::renderTexture(const Text &content) {
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import cgitb import fnmatch import io import logging import click import pyjsdoc import pyjsparser import sys from .parser.parser import ModuleMatcher from .parser.visitor import Visitor, SKIP from . import jsdoc class Printer(Visitor): ...
print(ctx.get_help())
<|file_name|>resultset.py<|end_file_name|><|fim▁begin|># Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, inclu...
elif name == 'KeyMarker': self.key_marker = value elif name == 'NextMarker': self.next_marker = value
<|file_name|>borg_config.py<|end_file_name|><|fim▁begin|>import os from django.conf import settings class BorgConfiguration():<|fim▁hole|> def initialize(): setattr(BorgConfiguration,"DEBUG",getattr(settings,"DEBUG",False)) config = getattr(settings,"HARVEST_CONFIG") if not config: ...
@staticmethod
<|file_name|>number.js<|end_file_name|><|fim▁begin|><|fim▁hole|> 'group':".", 'list':";", 'percentSign':"%", 'nativeZeroDigit':"0", 'patternDigit':"#", 'plusSign':"+", 'minusSign':"-", 'exponential':"E", 'perMille':"‰", 'infinity':"∞", 'nan':"NaN", 'decimalFormat':"#,##0.###", 'scientificFormat':"#E0", 'pe...
// generated from ldml/main/*.xml, xpath: ldml/numbers ({ 'decimal':",",
<|file_name|>PrepareForApis.py<|end_file_name|><|fim▁begin|>def main(): info('Evacuate Microbone') close(description='Jan Inlet') open(description='Jan Ion Pump') #close(description='Minibone to Bone') open(description='Minibone to Bone') #close(description='Microbone to Minibone') open...
#info('evacuate apis') open(description='Microbone to Getter NP-10H')
<|file_name|>i18n_plural_pipe.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved.<|fim▁hole|> * * 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 {Pipe, PipeTransform} from '@angular...
<|file_name|>pytest_check_test.py<|end_file_name|><|fim▁begin|>import allure from allure_commons_test.report import has_test_case from allure_commons_test.result import with_status, with_message_contains, has_status_details from hamcrest import assert_that @allure.issue("376") @allure.feature("Integration") def test_...
assert_that(allured_testdir.allure_report, has_test_case("test_pytest_check_example",
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2017 Chef Software Inc. and/or applicable contributors // // 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:/...
<|file_name|>on-exit.ts<|end_file_name|><|fim▁begin|>'use strict'; //dts<|fim▁hole|> //polyfills const process = require('suman-browser-polyfills/modules/process'); const global = require('suman-browser-polyfills/modules/global'); //core import fs = require('fs'); import path = require('path'); import EE = require('e...
import {IGlobalSumanObj} from "../../../suman-types/dts/global";
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>use std::error::Error as StdError; use std::fmt; use std::io::Error as IoError; use std::num::ParseIntError; use std::result::Result as StdResult; use std::str::Utf8Error; /// A specialized Result type for metadata operations. pub type Result<T> = StdResult<T, Error>;...
fn description(&self) -> &str { match *self {
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>extern crate pkg_config; use pkg_config::find_library; <|fim▁hole|>fn main() { if find_library("liblzma").is_ok() { return } else { panic!("Could not find liblzma using pkg-config") } }<|fim▁end|>
<|file_name|>3_nested_for_loop_with_connector_in_pattern.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> for variable_in_y /* ... */ in 0..1 {} } }<|fim▁end|>
fn main() { for variable_in_x /* ... */ in 0..1 {
<|file_name|>footerController.js<|end_file_name|><|fim▁begin|>'use strict'; <|fim▁hole|> $('#footer').hide(); $(function () { $(window).scroll(function () { // set distance user needs to scroll before we start fadeIn if ($(this).scrollTop() > 500) { $('.navbar...
angular.module('sportzCast') .controller('FooterCtrl', function ($scope) {
<|file_name|>sort.py<|end_file_name|><|fim▁begin|>""" Sorted input and output. """ from collections import deque from operator import itemgetter from .buffer import _ReaderBuffer from .buffer import _WriterBuffer __all__ = "SortReader", "SortWriter" class _Sorter(object): """ Abstract base class for SortReade...
return def _flush(self): """ Send sorted records to the output queue.
<|file_name|>WorkerCallable.java<|end_file_name|><|fim▁begin|>/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package sw13.executorNegative; import java.util.concurrent.Callable; /...
<|file_name|>stdafx.cpp<|end_file_name|><|fim▁begin|>// stdafx.cpp : Ö»°üÀ¨±ê×¼°üº¬ÎļþµÄÔ´Îļþ // testsocket.pch ½«×÷ΪԤ±àÒëÍ· // stdafx.obj ½«°üº¬Ô¤±àÒëÀàÐÍÐÅÏ¢<|fim▁hole|><|fim▁end|>
#include "stdafx.h"
<|file_name|>user_update_eligibility.py<|end_file_name|><|fim▁begin|>from datetime import timedelta import logging from django.utils.timezone import now from django.core.management.base import BaseCommand from TWLight.users.models import Editor from TWLight.users.helpers.editor_data import ( editor_global_userinfo...
logger = logging.getLogger(__name__) class Command(BaseCommand):
<|file_name|>color-field-adv-init.es5.js<|end_file_name|><|fim▁begin|>/** * @copyright (C) 2016 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ !(function(document, $) { "use strict"; function initMinicolorsField (event) { $(...
format: $(this).attr('data-validate') === 'color' ? 'hex' : ($(this).attr('data-format') === 'rgba'
<|file_name|>preprocess_bert.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 """Creates training data for the BERT network training (noisified + masked gold predictions) using the input corpus. <|fim▁hole|>We only leave `coverage` percent of symbols for classification. These symbols are left unchanged on input w...
The masked Gold predictions use Neural Monkey's PAD_TOKEN to indicate tokens that should not be classified during training.
<|file_name|>example_5.py<|end_file_name|><|fim▁begin|>"Run the keyword-names example pipeline, which has keyword-style inputs." import kiveapi import example_tools # Use HTTPS on a real server, so your password is encrypted. # Don't put your real password in source code, store it in a text file # that is only readabl...
}, { "argument": inputargs["salutations"],
<|file_name|>ceres.py<|end_file_name|><|fim▁begin|># Copyright 2011 Chris Davis # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
self.node.clearSliceCache() with open(self.fsPath, 'r+b') as fileHandle:
<|file_name|>sync.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # sync.py # Copyright (C) 2017 LEAP # # 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, o...
SyncStatus.PENDING_UPLOAD, namespace=namespace)
<|file_name|>widgets2.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' from calibre.gui2.compl...
def save_history(self): ct = unicode(self.text()) if len(ct) > 2:
<|file_name|>UserRecyclerViewAdapter.java<|end_file_name|><|fim▁begin|>package me.vadik.instaclimb.view.adapter; import android.content.Context; import android.databinding.ViewDataBinding; import android.view.LayoutInflater; import android.view.ViewGroup; import me.vadik.instaclimb.databinding.RowLayoutRouteBinding; ...
protected void onBindItem(ViewDataBinding binding, Route route) {
<|file_name|>error-pages.js<|end_file_name|><|fim▁begin|>module.exports = handler var debug = require('../debug').server var fs = require('fs') function handler (err, req, res, next) { debug('Error page because of ' + err.message) var ldp = req.app.locals.ldp // If the user specifies this function // then, ...
.status(err.status) .send(err.message || '')
<|file_name|>Widget.cpp<|end_file_name|><|fim▁begin|>#include "sp/sp.h" #include "Widget.h" namespace sp { namespace graphics { namespace ui { Widget::Widget(const maths::Rectangle& bounds) : m_Bounds(bounds), m_Active(true), m_Focused(false) { } <|fim▁hole|> { return false; } bool Widget::OnMouseReleased(e...
bool Widget::OnMousePressed(events::MousePressedEvent& e)
<|file_name|>consts.rs<|end_file_name|><|fim▁begin|>use crate::mir::interpret::ConstValue; use crate::mir::interpret::{LitToConstInput, Scalar}; use crate::ty::{ self, InlineConstSubsts, InlineConstSubstsParts, InternalSubsts, ParamEnv, ParamEnvAnd, Ty, TyCtxt, TypeFoldable, }; use rustc_errors::ErrorReported; ...
Ok(val) => Const::from_value(tcx, val, self.ty), Err(ErrorReported) => tcx.const_error(self.ty), } } else {
<|file_name|>Roche.py<|end_file_name|><|fim▁begin|># We calculate the flatness with the Roche model # calculate omk knowing omc and vice-versa from numpy import *<|fim▁hole|># we have to solve a cubic equation a-J2*a**3=1+J2+0.5*omk**2 def eps(omk): return omk**2/(2+omk**2) def om_k(omc): khi=arcsin(omc) return s...
from scipy.optimize import root
<|file_name|>build.js<|end_file_name|><|fim▁begin|>function load(/*String*/fileName){ //summary: opens the file at fileName and evals the contents as JavaScript. //Read the file var fileContents = readFile(fileName); //Eval the contents. var Context = Packages.org.mozilla.javascript.Context; var context = Cont...
var xdDojoPath = "http://ajax.googleapis.com/ajax/libs/dojo/"; if(cdnType == "aol"){ xdDojoPath = "http://o.aolcdn.com/dojo/"; }
<|file_name|>pyplot03.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import numpy as np import matplotlib.pyplot as plt import re rootPath = "/Users/jeff/work/debug/20181216_hard_fe2k_15fps/" finalLogFile = "rosout.log.2" def appendTimestamps(arr, start, stop, flag): #flag = True d = stop - start ...
ret = re.findall(r'\"camera_output_ts\":(\d+),.*\"flink_output_ts\":(\d+),.*\"fusion_output_ts\":(\d+),.*\"oa_output_ts\":\[([\d,]+)\],.*\"v2xnode_input_ts\":(\d+)', line) if len(ret) > 0 and len(ret[0]) == 5: if i < 2:
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import string import sys from collections import deque import numpy as np from sklearn.base import BaseEstimator from sklearn.utils import check_array, check_random_state from sklearn.utils.validation import check_is_fitted from ...
"viterbi": self._decode_viterbi, "map": self._decode_map }[algorithm]
<|file_name|>common.py<|end_file_name|><|fim▁begin|># Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache L...
<|file_name|>etl_voter_north_carolina.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 # # Copyright (C) 2019 by Compassion International. All rights reserved. # License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. # This is free software: you are free to change and redistribute it. # Ther...
<|file_name|>KafkaIOTest.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 * to you und...
<|file_name|>test_physical_host_plugin.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 Bull. # # 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|>__init__.py<|end_file_name|><|fim▁begin|>#### PATTERN ####################################################################################### # Authors: Tom De Smedt <tom@organisms.be>, Walter Daelemans <walter.daelemans@ua.ac.be> # License: BSD License, see LICENSE.txt # Copyright (c) 2010 University of ...
# # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright
<|file_name|>test_utf8.py<|end_file_name|><|fim▁begin|>import unittest from pystan import stanc, StanModel from pystan._compat import PY2 class TestUTF8(unittest.TestCase): desired = sorted({"status", "model_cppname", "cppcode", "model_name", "model_code", "include_paths"}) def test_utf8(self): mode...
result = stanc(model_code=model_code)
<|file_name|>runescapecompare.py<|end_file_name|><|fim▁begin|>import discord import asyncio import datetime import time import aiohttp import threading import glob import re import json import os import urllib.request from discord.ext import commands from random import randint from random import choice as randchoice fr...
stat2= stats2[0].split(",")
<|file_name|>FlowableFlatMapCompletable.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2016-present, RxJava Contributors. * * 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:/...
implements FlowableSubscriber<T> {
<|file_name|>GtkFixed.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved. * The contents of this file are made available under the terms * of the GNU Lesser General Public Licens...
* this distribution shall govern. * * Contributors:
<|file_name|>MultipartPostHandler.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python #### # 06/2010 Nic Wolfe <nic@wolfeden.ca> # 02/2006 Will Holcomb <wholcomb@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as...
import urllib2 import mimetools, mimetypes import os, sys
<|file_name|>controller.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use std::rc::Rc; use rustc_serialize::{Decodable, Decoder}; use animation::AnimationClip; use transform::{Transform, FromTransform}; use blend_tree::{BlendTreeNode, BlendTreeNodeDef, ClipId}; use skeleton::Skeleton; const MAX_JOIN...
<|file_name|>ResponderEventPlugin.js<|end_file_name|><|fim▁begin|>/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be fo...
* "accumulation" of deferred dispatches.
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># ============================================================================= # 2013+ Copyright (c) Alexey Ivanov <rbtz@ph34r.me> # All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Genera...
# ============================================================================= from __future__ import absolute_import
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """urls.py: messages extends""" from django.conf.urls import url from messages_extends.views import message_mark_all_read, message_mark_read urlpatterns = [ url(r'^mark_read/(?P<message_id>\d+)/$', message_mark_read, name='message_mark_read'...
]
<|file_name|>tags.js<|end_file_name|><|fim▁begin|>import { CONSTANT_TAG, DirtyableTag } from 'glimmer-reference'; import { meta as metaFor } from './meta'; import require from 'require'; import { isProxy } from './is_proxy'; <|fim▁hole|>let hasViews = () => false; export function setHasViews(fn) { hasViews = fn; } ...
<|file_name|>test_soft_conf.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 require...
def _deployment_delete(self, deploy_id): self.client.delete_software_deploy(deploy_id) # Testing that it is really gone
<|file_name|>eagle.py<|end_file_name|><|fim▁begin|>#=========================================================================== # # Port to use for the web server. Configure the Eagle to use this # port as it's 'cloud provider' using http://host:PORT # #=================================================================...
# Meter reading topic (reports current meter reading in kWh)
<|file_name|>stacktrace.cc<|end_file_name|><|fim▁begin|>// -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- // Copyright (c) 2005, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions...
#if defined(__ppc__) || defined(__PPC__) #if defined(__linux__) #define STACKTRACE_INL_HEADER "stacktrace_powerpc-linux-inl.h" #else
<|file_name|>session.rs<|end_file_name|><|fim▁begin|>/* Copyright (C) 2018 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free * Software Foundation. * * This program is distributed in the...
} impl SMBState { pub fn new_sessionsetup_tx(&mut self, hdr: SMBCommonHdr)
<|file_name|>takeSnapshot.js<|end_file_name|><|fim▁begin|><|fim▁hole|> * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule takeSnapshot * @flow */ 'use strict'; const UIManager = require('UIManager'); const findNumeric...
/** * Copyright (c) 2015-present, Facebook, Inc.
<|file_name|>ApplicationServiceController.java<|end_file_name|><|fim▁begin|>/* * matrix-appservice-email - Matrix Bridge to E-mail * Copyright (C) 2017 Kamax Sarl * * https://www.kamax.io/ * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Publ...
@RequestParam(name = "access_token", required = false) String accessToken, @PathVariable String txnId) throws IOException { log.info("Processing {}", request.getServletPath());
<|file_name|>olt_los_alarm.py<|end_file_name|><|fim▁begin|># Copyright 2017-present Adtran, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
# Added port type to indicate if alarm was on NNI or PON self._intf_id = intf_id self._port_type_name = port_type_name
<|file_name|>ControllableSlimeHandle.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) EntityAPI Team * * This file is part of EntityAPI. * * EntityAPI 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,...
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Imports for Python API. This file is MACHINE GENERATED! Do not edit. Generated by: tensorflow/tools/api/generator/create_python_api.py script. """ from tensorflow.python.keras import Input from tensorflow.python.keras import Model from tensorflow.python.keras im...
from tensorflow.tools.api.generator.api.keras import wrappers
<|file_name|>validators.py<|end_file_name|><|fim▁begin|>from rest_framework.serializers import ValidationError from six import string_types def has_id_field(value): if value is None: raise ValidationError('Nested object must contain an `id` attribute.') if isinstance(value, string_types):<|fim▁hole|><|...
raise ValidationError(value)
<|file_name|>wireshark_gen.py<|end_file_name|><|fim▁begin|># -*- python -*- # # wireshark_gen.py (part of idl2wrs) # # Author : Frank Singleton (frank.singleton@ericsson.com) # # Copyright (C) 2001 Frank Singleton, Ericsson Inc. # # This file is a backend to "omniidl", used to generate "Wireshark" # dissectors fro...
else:
<|file_name|>resource_loader.py<|end_file_name|><|fim▁begin|># Copyright (c) 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. """ResourceFinder is a helper class for finding resources given their name.""" import codec...
if not resource: raise module.DepsException( 'Could not find a file for raw script %s in %s' % (relative_raw_script_path, self.source_paths))
<|file_name|>YAHOO.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2006 Yahoo! Inc. All rights reserved. */ /** * @class The Yahoo global namespace */ var YAHOO = function() { return { /** * Yahoo presentation platform utils namespace */ util: {}, /** * Yaho...
/** * Yahoo presentation platform examples namespace
<|file_name|>gandi_iface.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Copyright 2013 Gandi SAS # # 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 License as published by # the Free Software Foundation, either version...
- private vlan name the interface belongs to (str)
<|file_name|>main.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2011-2013 Lp digital system * * This file is part of BackBee. * * BackBee 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 vers...
<|file_name|>node2d.js<|end_file_name|><|fim▁begin|>/** * Created with JetBrains WebStorm. * User: gbox3d * Date: 13. 3. 30. * Time: 오후 3:35 * version : 0.8 * it is parts of pig2d engine * this engine is base on html5 css3 최종수정 2015.11.5 - 배경적용안되는 버그 수정, 2015.11.5 */ Pig2d = { version : '1.0.0' }; ///...
<|file_name|>generate_pie_charts.py<|end_file_name|><|fim▁begin|>""" Author: Sam Ginzburg Description: This script reads in a blast2go sequence table output of GO Term mappings, and calculates frequencies of GO Terms at specific GO Levels Example run: python generate_pie_charts.py [blast2go_file.txt] [GO Level] """ i...
<|file_name|>jspack.js<|end_file_name|><|fim▁begin|>/*! * Copyright © 2008 Fair Oaks Labs, Inc. * All rights reserved. */ // Utility object: Encode/Decode C-style binary primitives to/from octet arrays function JSPack() { // Module-level (private) variables var el, bBE = false, m = this; // Raw byte arrays...
switch (m[2]) { case 'A': case 's': if ((i + 1) > values.length) { return false; }
<|file_name|>main.ts<|end_file_name|><|fim▁begin|>import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app'; <|fim▁hole|>platformBrowserDynamic().bootstrapModule(AppModule).catch((error) => console.log("An error occured in bootsrap :", error));<|fim▁end|>
<|file_name|>test_spin.py<|end_file_name|><|fim▁begin|># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. import pytest import math as m import numpy as np from sisl imp...
<|file_name|>location.go<|end_file_name|><|fim▁begin|>package reflectwalk //go:generate stringer -type=Location location.go type Location uint const ( None Location = iota Map MapKey MapValue<|fim▁hole|> Slice SliceElem Struct StructField WalkLoc )<|fim▁end|>
<|file_name|>conf.go<|end_file_name|><|fim▁begin|>package conf import ( "errors" "flag" "time" "go-common/library/cache/redis" "go-common/library/conf" ecode "go-common/library/ecode/tip" "go-common/library/log" bm "go-common/library/net/http/blademaster" "go-common/library/net/http/blademaster/middleware/au...
<|file_name|>openshift_controller.go<|end_file_name|><|fim▁begin|>package kubeapiserver import ( "io/ioutil" "path" "k8s.io/apimachinery/pkg/runtime" "github.com/golang/glog" configapi "github.com/openshift/origin/pkg/cmd/server/apis/config" configapilatest "github.com/openshift/origin/pkg/cmd/server/apis/con...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, url urlpatterns = patterns('',<|fim▁hole|><|fim▁end|>
url(r'^img1x1$', 'ses_analytics.views.img1x1', name='img1x1'), # used to trace email opening # TODO: unsubscription and SNS feedback notifications )
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// @adjivas - github.com/adjivas. See the LICENSE // file at the top-level directory of this distribution and at // https://github.com/adjivas/manlist/LICENCE. // // This file may not be copied, modified, or distributed // except according to those terms. pub mod mans {...
buff: &mut BufReader<&File>, line: &mut String
<|file_name|>NavBar.js<|end_file_name|><|fim▁begin|>'use strict'; import React from 'react-native' import { AppRegistry, Component, Navigator, ToolbarAndroid, View, } from 'react-native'; import globalStyle, { colors } from './globalStyle'; class NavBar extends Component { onClickBackToHome() { this...
return (
<|file_name|>palindrome.py<|end_file_name|><|fim▁begin|><|fim▁hole|># https://www.reddit.com/r/learnpython/comments/82ucgu/calling_an_input_inside_a_def_function/ def main(): while True: word = raw_input('Enter a word: ') if word == '-1': break not_ = '' if word[:] == word[::-1]...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import Globals from Products.ZenModel.ZenPack import ZenPack as ZenPackBase from Products.ZenUtils.Utils import unused, zenPath import os unused(Globals) _plugins = [ 'rig_host_app_transform1.py', 'copy_server_config_file.sh', ] class ZenPack(ZenPac...
super(ZenPack, self).install(app) self.symlink_plugins() def symlink_plugins(self):
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. /* The present file format Present files have the following format. The first non-blank non-comment line is t...
http://url/ @twitter_name
<|file_name|>recent.js<|end_file_name|><|fim▁begin|>/** * Created by raj on 19/8/14. */ var fs = require('fs'); var content = fs.read ('animeEpisode.json'); console.log(JSON.stringify(JSON.parse(content)[1][0].title)); videolinks=JSON.parse(content); links=[]; function pages(k) { var page = new WebPage(); ...
var tempdata=[];
<|file_name|>BackBeanProvider.java<|end_file_name|><|fim▁begin|>package com.aw.swing.mvp.action; import com.aw.swing.mvp.Presenter; import com.aw.swing.mvp.navigation.Flow; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.BeanWrapper; import org.spr...
String flowAttributeName = (String) iterator.next();
<|file_name|>mssip.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015-2017 winapi-rs developers // Licensed under the Apache License, Version 2.0 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // All files in ...
dwFlags dwFlags_mut: DWORD, dwReserved dwReserved_mut: DWORD, }}
<|file_name|>test_unit_outdated.py<|end_file_name|><|fim▁begin|>import datetime import os import sys from contextlib import contextmanager import freezegun import pretend import pytest from pip._vendor import lockfile from pip._internal.index import InstallationCandidate from pip._internal.utils import outdated cla...
save=pretend.call_recorder(lambda v, t: None),
<|file_name|>JSExceptionArgNoBool.cpp<|end_file_name|><|fim▁begin|>/* * JSExceptionArgNoBool.cpp * * Created on: 15/gen/2015 * Author: Paolo Achdjian */ #include <sstream> #include "JSExceptionArgNoBool.h" namespace zigbee { JSExceptionArgNoBool::JSExceptionArgNoBool() { std::stringstream stream; strea...
} JSExceptionArgNoBool::~JSExceptionArgNoBool() {
<|file_name|>csnStandardModuleProject.py<|end_file_name|><|fim▁begin|>## @package csnStandardModuleProject # Definition of the methods used for project configuration. # This should be the only CSnake import in a project configuration. import csnUtility import csnProject import csnBuild import os.path import inspect fr...
def __AddApplications(self, _holderProject, _applicationDependenciesList, _modules, _modulesFolder, _pch = "", _holderName=None, _properties = []): """ Creates application projects and adds them to _holderProject (using _holderProject.AddProject). The holder
<|file_name|>macro-input-future-proofing.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or ...