prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>window.py<|end_file_name|><|fim▁begin|># -*- mode: python; tab-width: 4; indent-tabs-mode: nil -*- from gi.repository import Gtk import os import shutil import gettext from cloudsn.core import config, provider, account, indicator, keyring from cloudsn import logger import cloudsn.core.utils as coreutils S...
<|file_name|>CheckForNewVersionAction.java<|end_file_name|><|fim▁begin|>/** * This program and the accompanying materials * are made available under the terms of the License * which accompanies this distribution in the file LICENSE.txt */ package com.archimatetool.editor.actions; import java.io.IOException;...
URL url2 = new URL(downloadURL); browser.openURL(url2); }
<|file_name|>apollo.js<|end_file_name|><|fim▁begin|>import React from "react"; import { Link } from "@curi/react-dom"; import { TitledPlainSection, HashSection, Paragraph, CodeBlock, Note, IJS } from "../../components/guide/common"; let meta = { title: "Apollo Integration" }; let setupMeta = { title:...
for accessing your Apollo client throughout the application. The{" "} <IJS>Router</IJS> (or whatever you name the root Curi component)
<|file_name|>strings.js<|end_file_name|><|fim▁begin|>define( ({ "sourceSetting": "搜索源设置", "instruction": "添加并配置地理编码服务或要素图层为搜索源。这些指定的源决定了搜索框中的可搜索内容。", "add": "添加搜索源", "addGeocoder": "添加地理编码器", "geocoder": "地理编码器", "setLayerSource": "设置图层源", "setGeocoderURL": "设置地理编码器 URL", "s...
"searchFields": "搜索字段", "displayField": "显示字段", "exactMatch": "完全匹配", "maxSuggestions": "最大建议数",
<|file_name|>test_tap.py<|end_file_name|><|fim▁begin|># Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.names.tap}. """ from twisted.trial.unittest import TestCase from twisted.python.usage import UsageError from twisted.names.tap import Options, _buildResolvers ...
""" options = Options()
<|file_name|>ber.py<|end_file_name|><|fim▁begin|>def bits_set(x): bits = 0 for i in range(0,8): if (x & (1<<i))>0: bits += 1 return bits def find_ber(sent, received): assert(len(received)<=len(sent)) if len(received) < len(sent)/2: print "frame detection error, more than half of the frames were lost!" re...
for i in range(0,len(received)): errors += bits_set(sent[i] ^ received[i]) # ^ is xor return float(errors)/float(8*len(received))
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import create from './create.js'; import {InstanceDefaults} from './types.js'; import Options from './core/options.js'; const defaults: InstanceDefaults = { options: new Options(), handlers: [], mutableDefaults: false, }; const got = create(defaults); export defa...
export * from './as-promise/types.js';
<|file_name|>LiloConf.py<|end_file_name|><|fim▁begin|># #LiloConf.py # import sys, re, os import logging import GrubConf class LiloImage(object): def __init__(self, lines, path): self.reset(lines, path) def __repr__(self): return ("title: %s\n" " root: %s\n" "...
"relocatable": None,
<|file_name|>radialActuationDiskSource.C<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C...
U
<|file_name|>kvmexit.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # kvmexit.py # # Display the exit_reason and its statistics of each vm exit # for all vcpus of all virtual machines. For example: # $./kvmexit.py # PID TID KVM_EXIT_REASON COUNT # 1273551 1273568 EXIT_REASON_M...
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>var path = require('path'); module.exports = { // entry: ['babel-polyfill', './src/main.js'], entry: './src/main.js', target: 'node', output: { filename: 'main.js',<|fim▁hole|> module: { rules: [ { test: /\.js$/, exclude: /node_...
path: path.resolve(__dirname, 'build') },
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![allow(unused_variables)] fn main() { // Rust let bindings are immutable by default. let z = 3; // This will raise a compiler error: // z += 2; //~ ERROR cannot assign twice to immutable variable `z` // You must declare a variable mutable explici...
<|file_name|>logger.js<|end_file_name|><|fim▁begin|>QUnit.module('pages > strategy > tabs > logger', function () { const logger = KC3StrategyTabs.logger.definition; QUnit.module('filters > logTypes', { beforeEach() { this.subject = logger.filterFuncs.logTypes; }, }, function () { QUnit.test('check type i...
const result = this.subject(stack); assert.deepEqual(result, {
<|file_name|>compute_group_group.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 Copyright ...
scalar -= e_self;
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict' var PassThrough = require('stream').PassThrough var statistics = require('vfile-statistics') var fileSetPipeline = require('./file-set-pipeline') module.exports = run // Run the file set pipeline once. // `callback` is invoked with a fatal error, or wit...
settings.silent = options.silent || false settings.quiet = options.quiet || false settings.frail = options.frail || false
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Functionality to query and extract information from aligned BAM files. """ import collections import contextlib import os import itertools import signal import subprocess import numpy import pysam import toolz as tz from bcbio import utils from bcbio.bam import...
with open_samfile(bam_file) as bam_handle: reads = tz.itertoolz.take(nreads, bam_handle) lengths = [len(x.seq) for x in reads]
<|file_name|>special.py<|end_file_name|><|fim▁begin|>SIMPLE_SETTINGS = { 'OVERRIDE_BY_ENV': True }<|fim▁hole|><|fim▁end|>
MY_VAR = u'Some Value'
<|file_name|>account_setup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Post-installation configuration helpers # Copyright (C) 2015 OpusVL (<http://opusvl.com/>) # # This program is free software: you can redistribute it and...
today = date.today() fy_name = today.strftime('%Y') fy_code = 'FY' + fy_name
<|file_name|>RandomNameColors.java<|end_file_name|><|fim▁begin|>package net.blay09.mods.bmc.chat; import com.google.common.collect.Maps; import net.minecraft.util.text.TextFormatting; import java.util.Map; import java.util.Random; public class RandomNameColors { private static final Random random = new Random(); ...
TextFormatting.DARK_RED, TextFormatting.DARK_PURPLE,
<|file_name|>eye.d.ts<|end_file_name|><|fim▁begin|>import * as React from 'react'; import { IconBaseProps } from 'react-icon-base';<|fim▁hole|><|fim▁end|>
declare class GoEye extends React.Component<IconBaseProps> { } export = GoEye;
<|file_name|>generics.rs<|end_file_name|><|fim▁begin|>#![recursion_limit = "128"] #[macro_use] extern crate generic_array; use generic_array::typenum::consts::U4; use std::fmt::Debug; use std::ops::Add; use generic_array::{GenericArray, ArrayLength}; use generic_array::sequence::*; use generic_array::functional::*;...
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>// Package flagnet provides helpers for the standard package 'flag' for parsing<|fim▁hole|>package flagnet<|fim▁end|>
// host:port and host flags
<|file_name|>lease.go<|end_file_name|><|fim▁begin|>// This is lease support for nclient4 package nclient4 import ( "fmt" "net" "time" "github.com/insomniacslk/dhcp/dhcpv4" )<|fim▁hole|> Offer *dhcpv4.DHCPv4 ACK *dhcpv4.DHCPv4 CreationTime time.Time } // Release send DHCPv4 release messsage to ...
// Lease contains a DHCPv4 lease after DORA. // note: Lease doesn't include binding interface name type Lease struct {
<|file_name|>axfs.py<|end_file_name|><|fim▁begin|>"""A parser for axfs file system images""" from stat import * import zlib from . import * from ..io import * from ..util import * AxfsHeader = Struct('AxfsHeader', [ ('magic', Struct.STR % 4), ('signature', Struct.STR % 16), ('digest', Struct.STR % 40), ('blockSi...
yield contents read += len(contents)
<|file_name|>sampleWithBeforeAndAfter.js<|end_file_name|><|fim▁begin|>describe('Demo test with Mocha', function() { describe('for testing purposes', function() { before(function(client, done) { client.globals.test_calls++; done(); }); after(function(client, done) { setTimeout(function...
<|file_name|>Meta_temporary_type.cpp<|end_file_name|><|fim▁begin|>#include "Meta_temporary_type.hpp" #include "../colors.h" #if COMPILER #include "../compiler/Compiler.hpp" #endif namespace ls { bool Meta_temporary_type::operator == (const Type* type) const { return false; } int Meta_temporary_type::distance(const T...
<|file_name|>shootout-nbody.rs<|end_file_name|><|fim▁begin|>// Copyright 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/...
<|file_name|>FTS3Placement.py<|end_file_name|><|fim▁begin|>from DIRAC import S_ERROR, S_OK, gLogger from DIRAC.DataManagementSystem.private.FTSAbstractPlacement import FTSAbstractPlacement, FTSRoute from DIRAC.ConfigurationSystem.Client.Helpers.Resources import getFTS3Servers from DIRAC.ResourceStatusSystem.Client.Res...
<|file_name|>test_load_user.py<|end_file_name|><|fim▁begin|>from unittest import TestCase class TestLoadUser(TestCase): def test_find_user(self):<|fim▁hole|> user = load_user('Neill', 'password') self.assertIsNotNone(user) self.assertEqual(user.password, "Password") user = load_use...
from backend import load_user
<|file_name|>cluster_health.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/LIC...
fmt.Printf("failed to check the health of member %s on %s: %v\n", m.ID, url, err) continue }
<|file_name|>ChoQueListFragment.java<|end_file_name|><|fim▁begin|>package cn.honjow.leanc.ui.Fragment; import cn.honjow.leanc.adapter.QuestionListAdapter; import cn.honjow.leanc.ui.Activice.ChoQueActivity; import cn.droidlover.xdroidmvp.base.SimpleRecAdapter; import cn.honjow.leanc.model.QuestionItem; import cn.honjow...
<|file_name|>ExampleCommands.java<|end_file_name|><|fim▁begin|>/* * This file is part of Zinc, licensed under the MIT License (MIT). * * Copyright (c) 2015-2016, Jamie Mansfield <https://github.com/jamierocks> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and ...
} }
<|file_name|>allocator.py<|end_file_name|><|fim▁begin|>__author__ = "Jon Dawson" __copyright__ = "Copyright (C) 2012, Jonathan P Dawson" __version__ = "0.1" class Allocator: """Maintain a pool of registers, variables and arrays. Keep track of what they are used for.""" def __init__(self, reuse): self...
self.registers.append(reg) self.all_registers[reg] = (name, size)
<|file_name|>tag_follow_disagreement.py<|end_file_name|><|fim▁begin|>import sys tagging_filepath = sys.argv[1] following_filepath = sys.argv[2] delim = '\t' if len(sys.argv) > 3: delim = sys.argv[3] graph = {} for line in open(tagging_filepath): entry = line.rstrip().split('\t') src = entry[0] dst = ...
count = 0.0
<|file_name|>TextTest.java<|end_file_name|><|fim▁begin|>/* * See LICENSE file in distribution for copyright and licensing information. */ package seph.lang; <|fim▁hole|> /** * @author <a href="mailto:ola.bini@gmail.com">Ola Bini</a> */ public class TextTest { @Test public void is_a_seph_object() { a...
import org.junit.Test; import static org.junit.Assert.*;
<|file_name|>ScheduleRuleMinutely.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react' import { ValueLine } from '@framework/Lines' import { TypeContext } from '@framework/TypeContext' import { ScheduleRuleMinutelyEntity } from '../Signum.Entities.Scheduler' export default function ScheduleRuleMinutely...
return (
<|file_name|>test_casda.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -* # Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import requests import os from astropy.coordinates import SkyCoord import astropy.units as u from astropy.table import Table, Column from astropy.io.votable im...
assert isinstance(responses, Table) assert len(responses) == 3
<|file_name|>negative_sampling.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import numpy import six from chainer import cuda from chainer import function from chainer.utils import type_check class NegativeSamplingFunction(function.Function): def __init__(self, sampler, sample_size): self.sampler = sample...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict'; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descrip...
<|file_name|>siphash.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016 Andreas Auernhammer. All rights reserved. // Use of this source code is governed by a license that can be // found in the LICENSE file. // Package siphash implements the SipHash-64 and SipHash-128 // pseudo-random-functions - with the recommend...
// or other key-value data structures. // SipHash-128 can be used to compute a 128 bit authentication // tag for messages. package siphash // import "github.com/aead/siphash"
<|file_name|>MasterStateType.java<|end_file_name|><|fim▁begin|>/* * Copyright 2012 Adam Roughton. * * This file is part of CrowdHammer. * * CrowdHammer 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 Found...
* but WITHOUT ANY WARRANTY; without even the implied warranty of
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![warn(rust_2018_idioms)] #[macro_use] extern crate tracing; use std::collections::hash_map::{Entry, HashMap}; use conduit::{box_error, Handler, HandlerResult, Method, RequestExt}; use route_recognizer::{Match, Params, Router}; #[derive(Default)] pub struct RouteBui...
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # GromacsWrapper documentation build configuration file, created by # sphinx-quickstart on Tue Jun 23 19:38:56 2009. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, s...
<|file_name|>poll.rs<|end_file_name|><|fim▁begin|>use crate::future::FutureExt; use core::pin::Pin; use futures_core::future::Future; use futures_core::task::{Context, Poll}; /// A macro which returns the result of polling a future once within the<|fim▁hole|>/// It is also gated behind the `async-await` feature of thi...
/// current `async` context. /// /// This macro is only usable inside of `async` functions, closures, and blocks.
<|file_name|>subscribe.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Simple script to test sending UTF8 text with the GrowlNotifier class import logging logging.basicConfig(level=logging.DEBUG) from gntp.notifier import GrowlNotifier import platform<|fim▁hole|><|fim▁end|>
growl = GrowlNotifier(notifications=['Testing'],password='password',hostname='ayu') growl.subscribe(platform.node(),platform.node(),12345)
<|file_name|>pouchdb.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for Pouch 0.1 // Project: http://pouchdb.com // Definitions by: Bill Sears <https://github.com/MrBigDog2U/> // Definitions: https://github.com/borisyankov/DefinitelyTyped // // interface IPouchDocument { _id?:string; _rev?:string; _d...
interface PouchBulkDocsRequest {
<|file_name|>execute.py<|end_file_name|><|fim▁begin|># coding=utf-8 """ Program start here. To python soon. """ # @Author: Zackary BEAUGELIN <gysco> # @Date: 2017-04-10T15:43:09+02:00<|fim▁hole|># @Email: zackary.beaugelin@epitech.eu # @Project: SSWD # @Filename: execute.py # @Last modified by: gysco # @Last mod...
<|file_name|>netutil.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2011 Facebook # # 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|>perf_monitor.cc<|end_file_name|><|fim▁begin|>//-------------------------------------------------------------------------- // Copyright (C) 2014-2016 Cisco and/or its affiliates. All rights reserved. // Copyright (C) 2002-2013 Sourcefire, Inc. // // This program is free software; you can redistribute it and...
// // This program is distributed in the hope that it will be useful, but
<|file_name|>runtests.py<|end_file_name|><|fim▁begin|>import unittest import os from ui import main print os.getcwd() class TestMain(unittest.TestCase): def setUp(self): self.m = main.MainWindow() def test_mainWindow(self): assert(self.m) def test_dataframe(self): import ...
<|file_name|>pyunit_iris_nfoldsRF.py<|end_file_name|><|fim▁begin|>import sys sys.path.insert(1, "../../../") import h2o def iris_nfolds(ip,port): iris = h2o.import_file(path=h2o.locate("smalldata/iris/iris.csv")) <|fim▁hole|> try: h2o.random_forest(y=iris[4], x=iris[0:4], validation_y=iris[4]...
model = h2o.random_forest(y=iris[4], x=iris[0:4], ntrees=50, nfolds=5) model.show() # Can specify both nfolds >= 2 and validation = H2OParsedData at once
<|file_name|>struct_h5_t_l_1_1adapt_3_01_t[_n]_4.js<|end_file_name|><|fim▁begin|>var struct_h5_t_l_1_1adapt_3_01_t[_n]_4 = [ [ "allocate_return", "struct_h5_t_l_1_1adapt_3_01_t[_n]_4.html#a0b70e9265935053f7cd15dd9ae47b5e9", null ], [ "const_data_return", "struct_h5_t_l_1_1adapt_3_01_t[_n]_4.html#aa26ab555a2c6ae...
];
<|file_name|>drop.js<|end_file_name|><|fim▁begin|>import { Observable } from './observable'<|fim▁hole|> return Observable(add => { let dropped = 0 return source.subscribe((val, name) => { if (dropped++ >= count) add(val, name) }) }) }<|fim▁end|>
export default function drop(count, source) {
<|file_name|>plot_from_stats.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python from __future__ import division import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec #from matplotlib.backends.backend_pdf import PdfPages import sys def stats_file_as_matrix(file_name): with open(f...
ax.append(fig.add_subplot(gs[row, col])) ax[-1].set_title(titles[i])
<|file_name|>primitive_implementation_formatter.hpp<|end_file_name|><|fim▁begin|>/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * Copyright (C) 2012-2015 Marco Craveiro <marco.craveiro@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the...
boost::filesystem::path full_path( const formattables::locator& l,
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>''' Rigidity is a simple wrapper to the built-in csv module that allows for validation and correction of data being read/written from/to CSV files. This module allows you to easily construct validation and correction rulesets to be applied automatically while prese...
return next(self)
<|file_name|>moviescanner.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # === This file is part of RateItSeven === # # Copyright 2015, Paolo de Vathaire <paolo.devathaire@gmail.com> # # RateItSeven is free software: you can redistribute it and/or modify # it under the terms of t...
# # You should have received a copy of the GNU General Public License # along with RateItSeven. If not, see <http://www.gnu.org/licenses/>.
<|file_name|>test_recognize_digits_conv.py<|end_file_name|><|fim▁begin|>import paddle.v2 as paddle import paddle.v2.framework.layers as layers import paddle.v2.framework.nets as nets import paddle.v2.framework.core as core import paddle.v2.framework.optimizer as optimizer from paddle.v2.framework.framework import Prog...
outs = exe.run(program,
<|file_name|>range.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::CharacterDataBind...
}
<|file_name|>inject-5.py<|end_file_name|><|fim▁begin|>from gwpy.plot import Plot plot = Plot(noise, signal, data, separate=True, sharex=True, sharey=True)<|fim▁hole|><|fim▁end|>
plot.gca().set_epoch(0) plot.show()
<|file_name|>loginTests.js<|end_file_name|><|fim▁begin|>// ---------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // ---------------------------------------------------------------------------- /// <reference path="../../../ZumoE2ETest...
<|file_name|>test_defaultdict.py<|end_file_name|><|fim▁begin|>"""Unit tests for collections.defaultdict.""" import os import copy import pickle import tempfile import unittest from collections import defaultdict def foobar(): return list class TestDefaultDict(unittest.TestCase): def test_basic(self): ...
def test_callable_arg(self): self.assertRaises(TypeError, defaultdict, {})
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!env/python3 # coding: utf-8 from core.managers.containers import * from core.managers.imports import * from core.managers.analysis_manager import AnalysisManager from core.managers.annotation_manager import AnnotationManager from core.managers.file_manager...
from core.managers.phenotype_manager import PhenotypeManager from core.managers.panel_manager import PanelManager
<|file_name|>anyword-hint.js<|end_file_name|><|fim▁begin|>(function() { "use strict"; var WORD = /[\w$]+/, RANGE = 500; CodeMirror.registerHelper("hint", "anyword", function(editor, options) { var word = options && options.word || WORD; var range = options && options.range || RANGE; var cur = editor...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Purpose: dxf engine for R2007/AC1021 # Created: 12.03.2011 # Copyright (C) , Manfred Moitzi # License: MIT License from __future__ import unicode_literals __author__ = "mozman <mozman@gmx.at>"<|fim▁hole|>from .headervars import VARMAP from ..ac1018 import AC1018Fa...
<|file_name|>plot.py<|end_file_name|><|fim▁begin|>"""Plotting module for Sympy. A plot is represented by the ``Plot`` class that contains a reference to the backend and a list of the data series to be plotted. The data series are instances of classes meant to simplify getting points and meshes from sympy expressions. ...
plots.show() return plots
<|file_name|>lazy.js<|end_file_name|><|fim▁begin|><|fim▁hole|> export { view }<|fim▁end|>
import view from './views/home'
<|file_name|>helpers_tests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2.7 # coding=utf-8 # Author: Dustyn Gibson <miigotu@gmail.com> # URL: http://github.com/SickRage/SickRage # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GN...
@unittest.skip('Not yet implemented') def test_set_up_session(self): """
<|file_name|>_cell.py<|end_file_name|><|fim▁begin|>from .variables import * <|fim▁hole|> # cells must stand on own line if node.parent.cls not in ("Assign", "Assigns"): node.auxiliary("cell") return "{", ",", "}" def Assign(node): if node.name == 'varargin': out = "%(0)s = va_arg(varar...
def Cell(node):
<|file_name|>SHA256DigestTest.java<|end_file_name|><|fim▁begin|>package org.spongycastle.crypto.test; import org.spongycastle.crypto.Digest; import org.spongycastle.crypto.digests.SHA256Digest; /** * standard vector test for SHA-256 from FIPS Draft 180-2. * * Note, the first two vectors are _not_ from the draft, t...
"", "a", "abc",
<|file_name|>error.go<|end_file_name|><|fim▁begin|>package libnetwork import ( "fmt" ) // ErrNoSuchNetwork is returned when a network query finds no result<|fim▁hole|> return fmt.Sprintf("network %s not found", string(nsn)) } // BadRequest denotes the type of this error func (nsn ErrNoSuchNetwork) BadRequest() {} ...
type ErrNoSuchNetwork string func (nsn ErrNoSuchNetwork) Error() string {
<|file_name|>big.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
// TODO: make it big enough to slow down tsc export const a: number = 2350;
<|file_name|>select_feature.py<|end_file_name|><|fim▁begin|>__author__ = 'LiGe' #encoding:utf-8 import networkx as nx import matplotlib.pyplot as plot from file_to_graph import file_to_mat def build_graph(mat): G=nx.DiGraph()#创建空图 for i in range(0,mat.shape[0]): G.add_node(i)#创造节点 for i i...
file='benapi_renew/mmc.exe.txt'
<|file_name|>gridSearch.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "Ponzoni, Nelson" __copyright__ = "Copyright 2015" __credits__ = ["Ponzoni Nelson"] __maintainer__ = "Ponzoni Nelson" __contact__ = "npcuadra@gmail.com" __email__ = "npcuadra@gmail....
... {'kernel': 'rbf', 'gamma': 1}, ... {'kernel': 'rbf', 'gamma': 10}]
<|file_name|>audio-encoders.hpp<|end_file_name|><|fim▁begin|>#pragma once #include <obs.hpp> #include <map> <|fim▁hole|>int FindClosestAvailableAACBitrate(int bitrate);<|fim▁end|>
const std::map<int, const char*> &GetAACEncoderBitrateMap(); const char *GetAACEncoderForBitrate(int bitrate);
<|file_name|>alternating_color_fades.py<|end_file_name|><|fim▁begin|>import time, logging from artnet import dmx, fixtures, rig from artnet.dmx import fades log = logging.getLogger(__name__) # set up test fixtures r = rig.get_default_rig() g = r.groups['all'] def all_red(): """ Create an all-red frame. """ g.se...
all_red(), all_blue(),
<|file_name|>Blocker.java<|end_file_name|><|fim▁begin|>/** * Bukkit plugin which moves the mobs closer to the players. * Copyright (C) 2016 Jakub "Co0sh" Sapalski * * 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 ...
return; } if (!set.getEntities().contains(e.getType())) {
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 Dmytro Milinevskyi <dmilinevskyi@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.apache.org/lice...
<|file_name|>FirePeer.js<|end_file_name|><|fim▁begin|>import 'webrtc-adapter/out/adapter.js'; import EventEmitter from 'events'; var configuration = { iceServers: [ {urls: "stun:stun.l.google.com:19302"}, {urls: "turn:numb.viagenie.ca", credential: "w0kkaw0kka", username: "paul.sachs%40influitive.com"} ] }...
}; handleAnswer = (peerId, answer) => { const remote_descr = new RTCSessionDescription();
<|file_name|>CompanyType.java<|end_file_name|><|fim▁begin|>// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilati...
<|file_name|>HgCopyDialog.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2010 - 2015 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog to enter the data for a copy or rename operation. """ from __future__ import unicode_literals import os.path from PyQt5.QtCore...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use redox::get_slice::GetSlice; use redox::ops::DerefMut; use redox::string::*; use redox::vec::Vec; use redox::boxed::Box; use redox::fs::*; use redox::io::*; use redox::env::*; use redox::time::Duration; use redox::to_num::*; /* Magic Macros { */ static mut applicati...
let mut line = "HEX:".to_string(); for byte in vec.iter() { line = line + " " + &format!("{:X}", *byte); }
<|file_name|>health.py<|end_file_name|><|fim▁begin|>import gc import os import signal from datetime import datetime from errbot import BotPlugin, botcmd, arg_botcmd from errbot.plugin_manager import global_restart from errbot.utils import format_timedelta class Health(BotPlugin): @botcmd(template='status') d...
plugins_statuses.append(('C', name))
<|file_name|>623 - 500!.cpp<|end_file_name|><|fim▁begin|>#include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<vector> #include<algorithm> #define REP(i,a,b) for(int i=a;i<=b;++i) #define FOR(i,a,b) for(int i=a;i<b;++i) #define uREP(i,a,b) for(int i=a;i>=b;--i) #define ECH(i,x) for(__typeof(x....
bign(){len=0,CLR(v,0);} void print(){uREP(i,len,1)pf("%d",v[i]);} bign operator*(int b){
<|file_name|>Util.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 under the ...
m.appendTail(out); text.setValue(new String(out.toString().getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8)); }
<|file_name|>table.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/. */ //! CSS table formatting contexts. #![deny(unsafe_code)] use ...
self.next()
<|file_name|>JSDistance.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # ''' # Author: Eachen Kuang # Date: 2017.10.20 # Goal: 将文件转化为字典 # Other: # ''' import string from math import log import numpy as np def KLD(p,q): p,q=zip(*filter(lambda (x,y): x!=0 or y!=0, zip(p,q))) #去掉二者都是0的概率值 p=p+np.spaci...
M = M + np.spacing(1) # print p,q,M return 0.5 * KLD(p, M) + 0.5 * KLD(q, M)
<|file_name|>costFunctionChecker.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ @file costFunctionChecker.py @author Michael Behrisch @author Daniel Krajzewicz @author Jakob Erdmann @date 2009-08-31 @version $Id: costFunctionChecker.py 13811 2013-05-01 20:31:43Z behrisch $ Run duarouter repeatedly ...
if not isinstance(args, types.StringTypes): command = [str(c) for c in command] print >> log, "-" * 79 print >> log, command
<|file_name|>x86.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LI...
abi::OsFreebsd => { "e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32".to_strbuf()
<|file_name|>FlumeAvroManager.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...
props.put("hosts." + hostName, agent.getHost() + ":" + agent.getPort());
<|file_name|>_gdb.py<|end_file_name|><|fim▁begin|>################################################################################ # Name : GDB Wrapper # Author : Jesse Schwartzentruber & Tyson Smith # # Copyright 2014 BlackBerry Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may no...
elif m.group("mapstart"): maps[(int(m.group("mapstart"), 16), int(m.group("mapend"), 16))] = m.group("mapimage")
<|file_name|>event-target.js<|end_file_name|><|fim▁begin|>'use strict'; /** * Class representing an event. * * @private */ class Event { /** * Create a new `Event`. * * @param {String} type The name of the event * @param {Object} target A reference to the target to which the event was dispatched *...
}, /**
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use blog::Post;<|fim▁hole|> post.add_text("I ate a salad for lunch today"); assert_eq!("", post.content()); post.request_review(); assert_eq!("", post.content()); post.approve(); assert_eq!("I ate a salad for lunch today", post.content()); }<|f...
fn main() { let mut post = Post::new();
<|file_name|>router.ts<|end_file_name|><|fim▁begin|>import * as Router from "universal-router"; import routes from "~/routes"; export default new Router(routes, { resolveRoute(context, params) { let { route } = context; // if (typeof route.load === 'function') { // return route.load().then(action => ac...
//return new Promise((resolve, reject) => {
<|file_name|>example_automl_nl_text_sentiment.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...
user_defined_macros={"extract_object_id": extract_object_id}, tags=['example'], ) as example_dag: create_dataset_task = AutoMLCreateDatasetOperator(
<|file_name|>powersource.py<|end_file_name|><|fim▁begin|>from BinPy.Gates import * class PowerSource: """ Models a Power Source from which various connectors can tap by connecting to it. taps: The list of all connectors connected to this power source. connect(): Takes in one or more connectors as i...
def __init__(self):
<|file_name|>wifi.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from datetime import datetime, date from optionaldict import optionaldict from wechatpy.client.api.base import BaseWeChatAPI class WeChatWiFi(BaseWeChatAPI): API_BASE_URL = 'https:/...
:param shop_id: 门店 ID :return: 返回的 JSON 数据包
<|file_name|>angular-multi-select-tree-0.0.1.min.js<|end_file_name|><|fim▁begin|>! function() { "use strict"; angular.module("multiselect-searchtree", []) } (), function() { "use strict"; var a = angular.module("multiselect-searchtree"); a.controller("multiSelectTreeCtrl", ["$scope", "$document", ...
templateUrl: "src/multiselect-searchtree.tpl.html", scope: {
<|file_name|>blockRenderMap.js<|end_file_name|><|fim▁begin|>import { Map } from 'immutable'; const BLOCK_MAP = Map({ 'header-one': { element: 'h1', }, 'header-two': { element: 'h2', }, 'header-three': { element: 'h3', }, 'header-four': { element: 'h4', }, 'header-five': { element:...
unstyled: { element: 'div', }, });
<|file_name|>htmlmapelement.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::HTMLMapE...
local_name: LocalName, prefix: Option<Prefix>, document: &Document,