prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>connection.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
var s = "Connected";
<|file_name|>abdt_rbranchnaming__t.py<|end_file_name|><|fim▁begin|>"""Test suite for abdt_rbranchnaming.""" # ============================================================================= # TEST PLAN # ----------------------------------------------------------------------------- # Here...
names_to_properties = {}
<|file_name|>cli.py<|end_file_name|><|fim▁begin|>import os import sys import yaml import argparse from code import interact def parse_options(argv): parser = argparse.ArgumentParser(description='Macumba Shell', prog='macumba-shell') parser.add_argument('--v1', action='stor...
url = os.path.join('wss://', server, 'model', uuid, 'api') else:
<|file_name|>SelectScriptPanel.java<|end_file_name|><|fim▁begin|>package whelk.gui; import whelk.PortableScript; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import jav...
<|file_name|>MainFrame.java<|end_file_name|><|fim▁begin|>package net.robobalasko.dfa.gui; import net.robobalasko.dfa.core.Automaton; import net.robobalasko.dfa.core.exceptions.NodeConnectionMissingException; import net.robobalasko.dfa.core.exceptions.StartNodeMissingException; import javax.swing.*; import javax.swing...
JPanel checkInputPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); containerPanel.add(checkInputPanel);
<|file_name|>theme.rs<|end_file_name|><|fim▁begin|>use handlebars::{Context, Handlebars, Helper, Output, RenderContext, RenderError}; pub fn theme_option( h: &Helper<'_, '_>, _r: &Handlebars<'_>, ctx: &Context, rc: &mut RenderContext<'_, '_>, out: &mut dyn Output, ) -> Result<(), RenderError> { ...
out.write(param)?; if param.to_lowercase() == default_theme_name.to_lowercase() {
<|file_name|>backup.py<|end_file_name|><|fim▁begin|>import os import shutil import boto from boto.s3.key import Key import subprocess from io import StringIO from django.core.management.base import BaseCommand from django.core.management import call_command from django.conf import settings from django.utils import tim...
if os.path.isfile(full_file_name): shutil.copy(full_file_name, dest_path) else: dir_dest = os.path.join(dest_path, file_name)
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # RBFOpt documentation build configuration file, created by # sphinx-quickstart on Thu Jun 11 00:01:21 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration value...
# This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = 'en'
<|file_name|>aql_deftool_cc.py<|end_file_name|><|fim▁begin|>import os.path import SCons.Tool import aql #//---------------------------------------------------------------------------//<|fim▁hole|> _Warning = aql.Warning _Tool = SCons.Tool.Tool #//----------------------------------------------------------------------...
<|file_name|>version_base.go<|end_file_name|><|fim▁begin|>package version func init() { // The main version number that is being run at the moment. Version = "0.10.3" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final release. Otherwise, this is a pre-release...
}
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" rohmu Copyright (c) 2016 Ohmu Ltd See LICENSE for details """ from . errors import InvalidConfigurationError IO_BLOCK_SIZE = 2 ** 20 # 1 MiB <|fim▁hole|>def get_class_for_transfer(storage_type): if storage_type == "azure": from .object_storage.a...
<|file_name|>AccessOverview.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2014-2016 Leosac This file is part of Leosac. Leosac 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 Software Foundation, eithe...
unique_user_ids.insert(user_ptr->id()); } }
<|file_name|>test_genus.py<|end_file_name|><|fim▁begin|>import pytest import bauble.db as db from bauble.model.family import Family from bauble.model.genus import Genus, GenusSynonym, GenusNote import test.api as api<|fim▁hole|>def setup(organization, session): setup.organization = session.merge(organization) ...
@pytest.fixture
<|file_name|>constructorTypeNodeTests.ts<|end_file_name|><|fim▁begin|>import { SyntaxKind } from "@ts-morph/common"; import { expect } from "chai"; import { ConstructorTypeNode } from "../../../../compiler"; import { getInfoFromTextWithDescendant } from "../../testHelpers"; describe(nameof(ConstructorTypeNode), () => ...
<|file_name|>core.py<|end_file_name|><|fim▁begin|># This Python file uses the following encoding: utf-8 # This file is part of InputShare # # Copyright © 2015 Patrick VanDusen # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publi...
# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*-<|fim▁hole|> from __future__ import unicode_literals default_app_config = 'yepes.contrib.slugs.apps.SlugsConfig'<|fim▁end|>
<|file_name|>flanking_features.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #By: Guruprasad Ananda """ Fetch closest up/downstream interval from features corresponding to every interval in primary usage: %prog primary_file features_file out_file direction -1, --cols1=N,N,N,N: Columns for start, end, stran...
if result_up:
<|file_name|>peers_api.rs<|end_file_name|><|fim▁begin|>// Copyright 2021 The Grin Developers // // 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/LICEN...
pub peers: Weak<p2p::Peers>, }
<|file_name|>FindIndexIntro.java<|end_file_name|><|fim▁begin|>package algorithms.sorting; import java.util.Scanner; /* * Sample Challenge * This is a simple challenge to get things started. Given a sorted array (ar) * and a number (V), can you print the index location of V in the array? * * Input Forma...
<|file_name|>datetime-field-response.js<|end_file_name|><|fim▁begin|>/** @jsx jsx */ import React from "react"; import PropTypes from "prop-types";<|fim▁hole|> import constants from "../../../constants"; import { RegularText } from "../../atoms/typography"; const DatetimeFieldResponse = props => { return ( <Reg...
import moment from "moment"; import { css, jsx } from "@emotion/core"; import { withTheme } from "emotion-theming";
<|file_name|>block.py<|end_file_name|><|fim▁begin|>from __future__ import with_statement from xdrdef.pnfs_block_pack import PNFS_BLOCKPacker as Packer from xdrdef.pnfs_block_pack import PNFS_BLOCKUnpacker as Unpacker from xdrdef.pnfs_block_type import * from xdrdef.pnfs_block_const import * import fs_base from threadi...
def close(self): # XXX Careful here - what if errors on a close, or previously on open?
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate rusoto_core; extern crate rusoto_ec2; use std::env; use rusoto_core::default_tls_client; use rusoto_core::{ProfileProvider, Region}; use rusoto_ec2::{Ec2, Ec2Client, DescribeInstancesRequest}; fn region_selector(acc: &str) -> Region { match acc { ...
<|file_name|>issue-46604.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 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/lic...
<|file_name|>Code.js<|end_file_name|><|fim▁begin|>var CLIENT_ID = ''; var CLIENT_SECRET = ''; var OWNER = ""; var REPO = ""; /** * Manage Form Answer * Create a trigger by going to Resources > Current projet's triggers * Select function manageAnswer() and create a trigger at form submission */ function manageAnsw...
/** * Function to send issue to GitHub */
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|># # Module loader file for /ciscripts/check/python. # # See /LICENCE.md for Copyright information """Module loader file for /ciscripts/check/python."""<|fim▁end|>
# /ciscripts/check/python/__init__.py
<|file_name|>single_task_evaluator_test.py<|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. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
# Copyright 2021, Google LLC. #
<|file_name|>default.py<|end_file_name|><|fim▁begin|>import xbmc, xbmcgui, xbmcaddon, xbmcplugin, re import urllib, urllib2 import re, string import threading import os import base64 #from t0mm0.common.addon import Addon #from t0mm0.common.net import Net import urlparse import xbmcplugin import cookielib __addon__ ...
<|file_name|>test_models.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014, Salesforce.com, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # - Redistributions of source code must retai...
neg_values = [(v, -1) for v in values]
<|file_name|>baMenuItem.component.ts<|end_file_name|><|fim▁begin|>import {Component, Input, Output, EventEmitter} from '@angular/core'; @Component({ selector: 'ba-menu-item', templateUrl: 'baMenuItem.html', styleUrls: ['./baMenuItem.scss'], }) export class BaMenuItem { @Input() menuItem:any; @Input() chil...
$event.item = item; this.toggleSubMenu.emit($event); return false;
<|file_name|>work_mode.rs<|end_file_name|><|fim▁begin|>use std::str::FromStr; #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enum WorkMode { Normal, // generate widgets etc. Sys, // generate -sys with FFI Doc, // generate documentation file DisplayNotBound, // Show no...
"not_bound" => Ok(WorkMode::DisplayNotBound), _ => Err(format!("Wrong work mode '{}'", s)), }
<|file_name|>fileinfo.py<|end_file_name|><|fim▁begin|># This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as publis...
"""Contains a document and related items.""" filename = None document = None variables = None
<|file_name|>CharCounterMain.java<|end_file_name|><|fim▁begin|>import java.io.BufferedReader; import java.io.IOException; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; public class CharCounterMain{ ...
CharCounter cc = new CharCounter(c,line2); int freq = cc.getFrequency(); System.out.println(String.format("Frequency of character %c was %d", c,freq));
<|file_name|>WindowProcessorExtensionHolder.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) 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 ...
* distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .. util import deprecated if deprecated.allowed():<|fim▁hole|> from . channel_order import ChannelOrder<|fim▁end|>
<|file_name|>uploadfiles.client.controller.js<|end_file_name|><|fim▁begin|>(function () {<|fim▁hole|> .module('uploadfiles') .controller('UploadfilesController', UploadfilesController); UploadfilesController.$inject = ['$scope', '$state', '$window', 'Authentication', 'uploadfileResolve']; function Uploadfi...
'use strict'; // Uploadfiles controller angular
<|file_name|>project.py<|end_file_name|><|fim▁begin|>""" virtstrap.project ----------------- This module contains all the abstractions for dealing with a Project. Using this object simplifies creating commands that are used to manage the project. """ import os import sys from virtstrap import constants from virtstrap...
def __call__(self, project_name): return project_name or os.path.basename(self._project_dir)
<|file_name|>mac_tool.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility functions to perform Xcode-style build steps. These functions are executed ...
# TODO(thakis): This copies file attributes like mtime, while the
<|file_name|>frame.go<|end_file_name|><|fim▁begin|>package hashgraph import ( "bytes" "sort" "github.com/mosaicnetworks/babble/src/crypto" "github.com/mosaicnetworks/babble/src/peers" "github.com/ugorji/go/codec" ) // Frame represents a section of the hashgraph. type Frame struct { Round int ...
hashBytes, err := f.Marshal()
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>fn main() { println!("Hello Rust!");<|fim▁hole|><|fim▁end|>
}
<|file_name|>test_empty_dataset.py<|end_file_name|><|fim▁begin|>import unittest import numpy as np from chainermn.datasets import create_empty_dataset import chainerx as chx class TestEmptyDataset(unittest.TestCase): def setUp(self): pass def check_create_empty_dataset(self, original_dataset): ...
<|file_name|>poplog.py<|end_file_name|><|fim▁begin|>import sys, datetime, os, time from mcstatus import MinecraftServer # GLOBALS # List containing all the mcstatus server objects serverList = [] # appendLog() polls the server for population data and appends it to the log # In: The hostname and population of a server...
# Run the main. main()
<|file_name|>numeric-method-autoexport.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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:/...
assert_eq!(15_i16.add(6i16), 21_i16); assert_eq!(15_i32.add(6i32), 21_i32); assert_eq!(15_i64.add(6i64), 21_i64);
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|>const Twitter = require('twitter') const twitterOpts = require('./auth.json') const client = new Twitter(twitterOpts) const twttr = require('./twttr/') twttr.getTrendingTopics(client).then((tt) => { tt.forEach((topic, idx) => { twttr.searchTopic(clie...
'use strict'
<|file_name|>generate_api_rst.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Read doxygen xml files to find all members of the dolfin # name space and generate API doc files per subdirectory of # dolfin # # Written by Tormod Landet, 2017 # from __future__ import print_function import sys, os import parse_dox...
out.write(member.to_swig()) out.write('\n')
<|file_name|>css_provider.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2015, The Rust-GNOME Project Developers. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT> use std::fmt::{self, Display, F...
pub fn new() -> Self {
<|file_name|>Node.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2012-2014 The Khronos Group Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and/or associated documentation files (the * "Materials"), to deal in the Materials without restriction, includi...
return jniRegisterNativeMethods(env, NodeClass, method_table, NELEM(method_table)); } };
<|file_name|>resources.rs<|end_file_name|><|fim▁begin|>use derivative::Derivative; use eyre::Result; use hash_utils::{file_sha256, str_sha256}; use path_slash::PathExt; use schemars::JsonSchema; use serde::Serialize; use serde_with::skip_serializing_none; use std::{ fmt::Display, path::{Path, PathBuf}, }; use s...
}
<|file_name|>chevron-circle-right.d.ts<|end_file_name|><|fim▁begin|>import * as React from 'react'; import { IconBaseProps } from 'react-icon-base';<|fim▁hole|><|fim▁end|>
export default class FaChevronCircleRight extends React.Component<IconBaseProps, any> { }
<|file_name|>_private_link_resources_operations.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license inform...
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
<|file_name|>lru-cache.js<|end_file_name|><|fim▁begin|>/** * Copyright 2018 The AMP HTML Authors. All Rights Reserved.<|fim▁hole|> * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS-IS"...
* * 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
<|file_name|>NonlinearRZ.C<|end_file_name|><|fim▁begin|>/****************************************************************/ /* MOOSE - Multiphysics Object Oriented Simulation Environment */ /* */ /* All contents are licensed under LGPL V2.1 ...
Real volume(0); _Fbar.resize(_solid_model.qrule()->n_points());
<|file_name|>environmental_probe.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2014 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may o...
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for bluebird 3.5 // Project: https://github.com/petkaantonov/bluebird // Definitions by: Leonard Hecker <https://github.com/lhecker> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 /*! * The code fol...
<|file_name|>PlusCircle.ts<|end_file_name|><|fim▁begin|><|fim▁hole|> <circle stroke="currentColor" cx="14" cy="14" r="13"/> <path d="M14 8v12" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </g> </svg>`;<|fim▁end|>
export const PlusCircle = ` <svg viewBox="0 0 28 28"> <g fill="none" fill-rule="evenodd"> <path d="M8 14h12" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
<|file_name|>rabbitMQ_rpc_serverl.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|> host='localhost')) channel = connection.channel() channel.queue_declare(queue='rpc_queue') def fib(n): if n == 0: return 0 elif n == 1: return 1 else: return fib(n-1) + fib(n-2...
# -*- coding:utf-8 -*- import pika import time connection = pika.BlockingConnection(pika.ConnectionParameters(
<|file_name|>EvenPowersOf2.java<|end_file_name|><|fim▁begin|>package com.company; import java.util.Scanner; public class EvenPowersOf2 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = Integer.parseInt(scanner.nextLine()); int num = 1; f...
}
<|file_name|>blast2dem.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ *************************************************************************** blast2dem.py --------------------- Date : September 2013 Copyright : (C) 2013 by Martin Isenburg Email ...
self.tr("Use tile bounding box (after tiling with buffer)"), False)) self.addParametersRasterOutputGUI() self.addParametersAdditionalGUI()
<|file_name|>cmn.rs<|end_file_name|><|fim▁begin|>// COPY OF 'src/rust/api/cmn.rs' // DO NOT EDIT use std::io::{self, Read, Seek, Cursor, Write, SeekFrom}; use std; use std::fmt::{self, Display}; use std::str::FromStr; use std::error; use std::thread::sleep_ms; use mime::{Mime, TopLevel, SubLevel, Attr, Value}; use oau...
total_length: self.content_length
<|file_name|>coming_episodes_tests.py<|end_file_name|><|fim▁begin|># coding=utf-8 # This file is part of SickChill. # # URL: https://sickchill.github.io # Git: https://github.com/SickChill/SickChill.git # # SickChill is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public ...
""" Test coming episodes
<|file_name|>issue-3314.rs<|end_file_name|><|fim▁begin|>/*code /*code*/ if true { println!("1");<|fim▁hole|><|fim▁end|>
}*/
<|file_name|>pane.test.js<|end_file_name|><|fim▁begin|>var expect = require('chai').expect describe('Pane', function () { describe('# Show pane', function () { it('should show a lateral pane when requested (click on data feature)', function () { const pane = require('../src/pane') expect(pane.show).to...
<|file_name|>Index.js<|end_file_name|><|fim▁begin|>(function () { $(function () { var _userService = abp.services.app.user; var _$modal = $('#UserCreateModal'); var _$form = _$modal.find('form'); _$form.validate({ rules: { Password: "required", ...
abp.message.confirm( "Delete user '" + userName + "'?",
<|file_name|>main.js<|end_file_name|><|fim▁begin|>import Model from 'flarum/Model'; import Discussion from 'flarum/models/Discussion'; import IndexPage from 'flarum/components/IndexPage'; import Tag from 'tags/models/Tag';<|fim▁hole|> import addTagList from 'tags/addTagList'; import addTagFilter from 'tags/addTagFilte...
import TagsPage from 'tags/components/TagsPage'; import DiscussionTaggedPost from 'tags/components/DiscussionTaggedPost';
<|file_name|>wav2png.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Freesound is (c) MUSIC TECHNOLOGY GROUP, UNIVERSITAT POMPEU FABRA # # Freesound 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 Software Founda...
parser = optparse.OptionParser("usage: %prog [options] input-filename", conflict_handler="resolve") parser.add_option("-a", "--waveout", action="store", dest="output_filename_w", type="string", help="output waveform image (default input filename + _w.png)") parser.add_option("-s", "--specout", action="store", dest="out...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #![crate_name = "canvas_traits"] #![crate_type = "rlib"] #![featu...
Luminosity,
<|file_name|>naturesbest.py<|end_file_name|><|fim▁begin|>import re import os from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc from urllib import urlenc...
<|file_name|>waf_config.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 ############################################################################ # Copyright 2017 RIFT.IO Inc # # # # License...
<|file_name|>mongodb_replication_status.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # mongodb_replicaset_status.py # Author: Tyler Stroud <ststroud@gmail.com> # Date: 2012-11-06 """ This script monitors replication status of a replicaset """ from daemon import runner import logging from pymongo import Conne...
except AutoReconnect: self.logger.warning( 'WARNING: Failed to connect to hostname "%s". Trying again in 5 seconds. (%s tries left).'
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for ssh2-streams v0.1.9 // Project: https://github.com/mscdex/ssh2-streams // Definitions by: Ron Buckton <https://github.com/rbuckton> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// <reference types="node" /> import * as...
export interface ForwardedX11 { originAddr: string; originPort: number;
<|file_name|>ingress.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless...
jig.CreateIngress(filepath.Join(framework.IngressManifestPath, "static-ip"), ns.Name, map[string]string{ "kubernetes.io/ingress.global-static-ip-name": t.ipName,
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.contrib.auth.models import User from django.urls import reverse class Category(models.Model): """ Django 要求模型必须继承 models.Model 类。 Category 只需要一个简单的分类名 name 就可以了。 CharField 指定了分类名 name 的数据类型,CharField 是字符型, ...
# 存储比较短的字符串可以使用 CharField,但对于文章的正文来说可能会是一大段文本,因此使用 TextField 来存储大段文本。
<|file_name|>ObjectFactory.java<|end_file_name|><|fim▁begin|>package org.hyperimage.connector.fedora3.ws; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlElementDecl; import javax.xml.bind.annotation.XmlRegistry; import javax.xml.namespace.QName; /** * This object contains factory methods for...
return new GetMetadataRecord(); }
<|file_name|>1127.js<|end_file_name|><|fim▁begin|>var __v=[ { "Id": 2257, "Panel": 1127, "Name": "刪除 舊 kernel", "Sort": 0, "Str": "" }<|fim▁hole|><|fim▁end|>
]
<|file_name|>resources.js<|end_file_name|><|fim▁begin|>define( ({ map: { error: "Karte kann nicht erstellt werden", mouseToolTip: "Klicken Sie auf die Karte, um den Service zu überprüfen" }, geocoder: {<|fim▁hole|> layerNotFound: "Layer ist nicht in der W...
defaultText: "Geben Sie eine Adresse oder einen Point of Interest ein" }, error: {
<|file_name|>test_dominating_set.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from nose.tools import ok_ from nose.tools import eq_ import networkx as nx from networkx.algorithms.approximation import min_weighted_dominating_set from networkx.algorithms.approximation import min_edge_dominating_set class TestM...
ok_(found, "Non adjacent edge found!")
<|file_name|>highlight.js<|end_file_name|><|fim▁begin|>var Highlight = function() { /* Utility functions */ function escape(value) { return value.replace(/&/gm, '&amp;').replace(/</gm, '&lt;').replace(/>/gm, '&gt;'); } function tag(node) { return node.nodeName.toLowerCase(); } function testRe(re...
node: child
<|file_name|>blob.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::BlobBinding; use dom::bind...
fn Size(&self) -> u64 {
<|file_name|>config.js<|end_file_name|><|fim▁begin|>module.exports = function(grunt){ var config = { docs: { dir: "./test", target: "./doc/TestPlan.md"<|fim▁hole|>};<|fim▁end|>
} }; return config;
<|file_name|>auth.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('cheeperApp') .controller('AuthCtrl', function ($scope, $http) { $scope.signin = function() { $http .post('http://127.0.0.1:8000/auth-token/', $scope.credentials) .success(function(data, status, headers, config) ...
}) .error(function(data, status, headers, config) { console.log(data); });
<|file_name|>Telecom.unit.js<|end_file_name|><|fim▁begin|>let EventEmitter = require('events').EventEmitter;<|fim▁hole|>describe("Interface Unit Tests", function () { it('should create a new interface', function () { telecom = new Telecom(); expect(telecom).to.be.an.instanceOf(EventEmitter); expect(telec...
let telecom;
<|file_name|>countries.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # TGiT, Music Tagger for Professionals # Copyright (C) 2013 Iconoclaste Musique 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 t...
<|file_name|>product_product.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import time from odoo import api, fields, models class ProductProduct(models.Model): _inherit = "product.product" date_from = fields.Date(compute='...
result = self.env.cr.fetchall()[0] res[val.id]['purchase_avg_price'] = result[0] and result[0] or 0.0 res[val.id]['purchase_num_invoiced'] = result[1] and result[1] or 0.0 res[val.id]['total_cost'] = result[2] and result[2] or 0.0
<|file_name|>hash.rs<|end_file_name|><|fim▁begin|>#![feature(core)] extern crate core; #[cfg(test)] mod tests { use core::hash::Hash; use core::hash::Hasher; use core::hash::SipHasher; // pub struct SipHasher { // k0: u64, // k1: u64, // length: usize, // how many bytes we've p...
// v0 ^= b; // // v2 ^= 0xff; // compress!(v0, v1, v2, v3);
<|file_name|>StandardCountCalculatingTransformer.java<|end_file_name|><|fim▁begin|>package org.seasar.doma.internal.jdbc.dialect; import org.seasar.doma.internal.jdbc.sql.SimpleSqlNodeVisitor; import org.seasar.doma.internal.jdbc.sql.node.AnonymousNode; import org.seasar.doma.jdbc.SqlNode; public class StandardCountC...
protected SqlNode defaultAction(SqlNode node, Void p) {
<|file_name|>labels.py<|end_file_name|><|fim▁begin|>import hashlib import requests import threading import json import sys import traceback import base64 import electrum_vtc as electrum from electrum_vtc.plugins import BasePlugin, hook from electrum_vtc.i18n import _ class LabelsPlugin(BasePlugin): def __ini...
decoded = base64.b64decode(message) decrypted = electrum.bitcoin.aes_decrypt_with_iv(password, iv, decoded) return decrypted.decode('utf8')
<|file_name|>device-information-service.js<|end_file_name|><|fim▁begin|>var util = require('util'); var bleno = require('bleno'); var BlenoPrimaryService = bleno.PrimaryService; <|fim▁hole|>var ParkCharacteristic = require('./parkCharacteristic'); function DeviceInformationService() { DeviceInformationService.super...
<|file_name|>performance_test.py<|end_file_name|><|fim▁begin|>import copy from nive.utils.dataPool2.mysql.tests import test_MySql try: from nive.utils.dataPool2.mysql.mySqlPool import * except: pass from . import test_db from nive.utils.dataPool2.sqlite.sqlite3Pool import * mode = "mysql" printed = [""] de...
def createentries2(n):
<|file_name|>bs_set.hpp<|end_file_name|><|fim▁begin|>///////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2013-2013 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www....
<|file_name|>RenderPassManager.js<|end_file_name|><|fim▁begin|>function RenderPassManager(renderer) { // not implemented yet throw "Not implemented"; var mRenderPasses = []; return this; } <|fim▁hole|> mRenderPasses.push(renderPass); }; RenderPassManager.prototype.render = function() { for(var render...
RenderPassManager.prototype.addRenderPass = function(renderPass) {
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate time; extern crate gl; extern crate glfw; // include the OpenGL type aliases use gl::types::*; use glfw::{Action, Context, Key}; use state::State; use renderer::Renderer; mod renderer; mod state; fn main() { let glfw = glfw::init(glfw::FAIL_ON_ERRORS...
<|file_name|>movie.component.ts<|end_file_name|><|fim▁begin|>import {Component} from 'angular2/core'; import {RouteConfig, RouterOutlet} from 'angular2/router'; import {MovieList} from './movie-list.component'; import {MovieDetail} from './movie-detail.component'; import {MovieService} from './movie.service'; @Comp...
<|file_name|>projections.py<|end_file_name|><|fim▁begin|># -*-coding:Utf-8 -* from abcmodels import AModel from mplotlab.utils.abctypes import FLOAT,LIST,STRING,BOOL,RegisterType class AProjection(AModel): <|fim▁hole|> ("title", STRING,lambda:"title","axes title"), ("xlabel", STRING,lambda:"","ax...
parametersInfo = list(AModel.parametersInfo) parametersInfo.extend([ ("plotmodels",LIST,lambda:[],"plotModels"),
<|file_name|>en-ie.js<|end_file_name|><|fim▁begin|>//! moment.js locale configuration<|fim▁hole|> typeof exports === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['moment'], factory) : fact...
//! locale : Irish english (en-ie) //! author : Chris Cartlidge : https://github.com/chriscartlidge ;(function (global, factory) {
<|file_name|>quiver.py<|end_file_name|><|fim▁begin|>""" Support for plotting vector fields. Presently this contains Quiver and Barb. Quiver plots an arrow in the direction of the vector, with the size of the arrow related to the magnitude of the vector. Barbs are like quiver in that they point along a vector, but the...
XY = np.concatenate((xy.real, xy.imag), axis=2)
<|file_name|>script.js<|end_file_name|><|fim▁begin|>require([ "gaslib/Node" ], function(Node){ QUnit.test( "Node - initialize", function( assert ) { var node = new Node(); <|fim▁hole|><|fim▁end|>
assert.equal( node.getCaption(), "Node", "Nieprawidłowa nazwa węzła" ); }); });
<|file_name|>exceptions.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # This file is part of translate. # # translate 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,...
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2011-2013 The PPCoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/...
<|file_name|>bitcoin_fr.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="fr" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About tumincoin</source> ...
<source>Balance:</source> <translation>Solde :</translation> </message>
<|file_name|>leafmt.rs<|end_file_name|><|fim▁begin|>//! Lea code formatter. // FIXME This requires the parser to preserve comments to work properly // This is blocked on an upstream issue: https://github.com/kevinmehall/rust-peg/issues/84 <|fim▁hole|>#[macro_use] extern crate clap; extern crate term; extern crate rust...
<|file_name|>CWE78_OS_Command_Injection__char_console_w32_spawnvp_82_goodG2B.cpp<|end_file_name|><|fim▁begin|>/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE78_OS_Command_Injection__char_console_w32_spawnvp_82_goodG2B.cpp Label Definition File: CWE78_OS_Command_Injection.strings.label.xml Template File: sources-si...
* Sinks: w32_spawnvp * BadSink : execute command with spawnvp