prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>api.py<|end_file_name|><|fim▁begin|>"""Translate cli commands to non-cli code.""" import logging from urllib.error import HTTPError, URLError import requests from kytos.utils.config import KytosConfig LOG = logging.getLogger(__name__) class WebAPI: # pylint: disable=too-few-public-methods<|fim▁hole|>...
"""An API for the command-line interface.""" @classmethod def update(cls, args):
<|file_name|>wikipedia_test.go<|end_file_name|><|fim▁begin|>package wikipedia import ( "log" "testing" "github.com/stretchr/testify/assert" ) func TestQueryRU(t *testing.T) { api := NewApi() query := "лопата" res, err := api.Query(RU, query) if !assert.NoError(t, err) { return } assert.Equal(t, query, res...
<|file_name|>run.py<|end_file_name|><|fim▁begin|>from tornado.wsgi import WSGIContainer from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop<|fim▁hole|>http_server = HTTPServer(WSGIContainer(app)) http_server.listen(5000) IOLoop.instance().start()<|fim▁end|>
from game import app
<|file_name|>layer.py<|end_file_name|><|fim▁begin|>"""This module provides REST services for Layers""" import cherrypy from LmCommon.common.lmconstants import HTTPStatus from LmWebServer.common.lmconstants import HTTPMethod from LmWebServer.services.api.v2.base import LmService from LmWebServer.services.common.access_...
# ................................ def _count_env_layers(self, user_id, after_time=None, alt_pred_code=None, before_time=None, date_code=None, env_code=None, env_type_id=None, epsg_code=None, gcm_code=None,
<|file_name|>overlay.js<|end_file_name|><|fim▁begin|>if(!org) var org={}; if(!org.judison) org.judison={}; if(!org.judison.bmsp) org.judison.bmsp={}; with(org.judison.bmsp){ init = function(){ document.getElementById("bookmarks-view").place = "place:queryType=1&folder=" + window.top.PlacesUtils.bookmarks...
}
<|file_name|>MyJobTi.java<|end_file_name|><|fim▁begin|>package com.vsked.timer; import java.util.Date; import java.util.TimerTask; public class MyJobTi extends TimerTask { <|fim▁hole|> private String jobName="defaultJob"; private int jobCount=0; public int getJobCount() { return jobCount; } publi...
<|file_name|>Bonus.hpp<|end_file_name|><|fim▁begin|>/* * Fiahil * 12.05.2012 */ #if !defined(__Bomberman_Bonus_h) #define __Bomberman_Bonus_h #include <Model.hpp> #include "enum.hpp" #include "AObj.hpp" class Bonus : public AObj { public: Bonus(BonusType::eBonus t, Point const&, gdl::Model&);<|fim▁hole|> Bonus...
virtual ~Bonus(); private:
<|file_name|>extractData.py<|end_file_name|><|fim▁begin|>import numpy as np<|fim▁hole|>import scipy.io as io dataStructure = io.loadmat('starfish.mat') receiverPoints = dataStructure['receivers'] sourcePoints = dataStructure['receivers'] scattererPoints = dataStructure['scatterer'] scatteredData = dataStructure['scat...
<|file_name|>Constants.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2016. Xiaomu Tech.(Beijing) LLC. All rights reserved. */ package de.mpg.mpdl.labcam.code.common.widget; /** * Created by yingli on 10/19/15. */ public class Constants { public static final String STATUS_SUCCESS = "SUCCESS"; publ...
public static final String EMAIL = "email"; public static final String SERVER_NAME = "serverName"; public static final String OTHER_SERVER = "otherServer";
<|file_name|>TicketGrid.js<|end_file_name|><|fim▁begin|>/** * @class NetProfile.tickets.controller.TicketGrid * @extends Ext.app.Controller */ Ext.define('NetProfile.tickets.controller.TicketGrid', { extend: 'Ext.app.Controller', requires: [ 'Ext.menu.Menu' ], fromTemplateText: 'From Template', fromTemplateT...
}, 'npwizard button#btn_sched' : { click: {
<|file_name|>NextRTCEventBus.java<|end_file_name|><|fim▁begin|>package org.nextrtc.signalingserver.api; import lombok.extern.log4j.Log4j; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; import com.google.common.eventbus.EventBus; @Log4j @Service("nextRTCEventBus")...
<|file_name|>fibonacci_nth.rs<|end_file_name|><|fim▁begin|>fn main() { println!("{}",fibo(10)); println!("{}",fibo(8)); println!("{}",fibo(5)); println!("{}",fibo(2)); } // Rerturns the nth element of the fibonacci sequence fn fibo(n :i64) -> i64 { match n { 0 => 0, 1 => 1,<|f...
_ => (fibo(n-1) + fibo(n-2))
<|file_name|>arguments.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|>print(CurrentScript().arguments)<|fim▁end|>
<|file_name|>windows2003ServerMemory.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from memory.mem import _Memory class Windows2003ServerMemory(_Memory): def __init__(self, params): super(Windows2003ServerMemory, self).__init__(params) def csv_all_modules_dll(self): ...
super(Windows2003ServerMemory, self)._csv_all_modules_opened_files()
<|file_name|>add-edit-course.module.ts<|end_file_name|><|fim▁begin|>import { NgModule, } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { CommonModule } from '@angular/common'; import { routes } from './add-edit-course.routes'; import { NewCourseComponent } from './add-edit-course.compone...
FormsModule ], providers: [authorsService]
<|file_name|>masternode.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2014-2017 The Innova Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "activemasternode.h" #include "consensus/validation.h" #...
<|file_name|>until.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 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 r...
for _, condition := range conditions { // check the next condition against the previous event and short circuit waiting for the next watch if lastEvent != nil {
<|file_name|>app.tests.ts<|end_file_name|><|fim▁begin|>import * as submodule from '../src/app';<|fim▁hole|>describe("app", () => { it("thisShouldNotError returns something", () => { expect(submodule.thisShouldNotError()).not.toBe(undefined as any); }); });<|fim▁end|>
<|file_name|>dashboard.js<|end_file_name|><|fim▁begin|>'use strict'; var Ose = require('ose'); var M = Ose.class(module, './index'); /** Docs {{{1 * @submodule bb.pagelet */ /** * @caption Dashboard pagelet *<|fim▁hole|> * Pagelet for creating dashboard content. * * @class bb.lib.pagelet.dashboard * @type cla...
* @readme
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>var module = module; //this keeps the module file from doing anything inside the jasmine tests. //We could avoid this by making all the source be in a specific directory, but that would break backwards compatibility. if (module) { module.exports = function (gru...
<|file_name|>specials.py<|end_file_name|><|fim▁begin|>from djpcms import sites from djpcms.http import get_http from djpcms.template import RequestContext, loader from djpcms.views.baseview import djpcmsview class badview(djpcmsview): def __init__(self, template, httphandler): self.template = templat...
def http404view(request, *args, **kwargs):
<|file_name|>nTEC_Sres.java<|end_file_name|><|fim▁begin|>/** */ package sc.ndt.editor.fast.fastfst; import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>nTEC Sres</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * ...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import os import sys import yaml from etllib.conf import Conf from etllib.yaml_helper import YAMLHelper from plugins import PluginEngine class RulesEngine(list): def __init__(self): self.rules_path = os.path.dirname(os.path.realpath(__file__))<|fim▁ho...
self.conf = Conf() self.load() self.filter_recursion()
<|file_name|>image.py<|end_file_name|><|fim▁begin|>from .attribute import html_attribute from .element import VoidElement class Image(VoidElement): """An HTML image (<img>) element. Images must have an alternate text description that describes the contents of the image, if the image can not be displayed....
<|file_name|>test_verify.py<|end_file_name|><|fim▁begin|>############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A...
<|file_name|>types.rs<|end_file_name|><|fim▁begin|>extern crate serde_json; use services::anoncreds::types::{PublicKey, RevocationPublicKey}; use utils::json::{JsonEncodable, JsonDecodable}; use services::ledger::constants::{ NODE, NYM, ATTRIB, SCHEMA, GET_ATTR, GET_DDO, GET_NYM, GET_SC...
<|file_name|>EcologicalIndexEuclideanCommand.java<|end_file_name|><|fim▁begin|>/* * EcologicalIndexEuclideanCommand.java Copyright (C) 2021. Daniel H. Huson * * (Some files contain contributions from other authors, who are then mentioned separately.) * * This program is free software: you can redistribute it and...
<|file_name|>frame.py<|end_file_name|><|fim▁begin|>from collections import deque from lcdui import common from lcdui.ui import widget import array import time class Frame(object): def __init__(self, ui): self._ui = ui<|fim▁hole|> self._screen_buffer = ScreenBuffer(self.rows(), self.cols()) self.onInitia...
self._widgets = {} self._position = {} self._span = {}
<|file_name|>clientversion.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2012-2014 The Moneta developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "clientversion.h" #include "tinyformat.h" #include <string> ...
#else #define BUILD_DESC BUILD_DESC_FROM_UNKNOWN(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD) #endif #endif
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>########################################################################## # # Copyright (c) 2015, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the...
# disclaimer in the documentation and/or other materials provided with
<|file_name|>apply_schema_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 Google 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 Unless r...
<|file_name|>Print_Success_SRV.py<|end_file_name|><|fim▁begin|># This file is part of Invenio. # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2017 CERN. # # Invenio 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 Softwa...
## This function displays a message telling the user the ## revised files have been correctly received ## Author: T.Baron ## PARAMETERS: -
<|file_name|>fields.py<|end_file_name|><|fim▁begin|>from django.db import models # Django doesn't support big auto fields out of the box, see # https://code.djangoproject.com/ticket/14286. # This is a stripped down version of the BoundedBigAutoField from Sentry. class BigAutoField(models.AutoField): description =...
<|file_name|>dmx_color_variable_controller_test.go<|end_file_name|><|fim▁begin|>package datastore import ( "testing" "github.com/StageAutoControl/controller/pkg/api" "github.com/StageAutoControl/controller/pkg/cntl" internalTesting "github.com/StageAutoControl/controller/pkg/internal/testing" "github.com/jinzhu/...
<|file_name|>keypool.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2017-2018 The LitecoinZ developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exer...
addr = set() addr.add(nodes[0].getrawchangeaddress())
<|file_name|>sql.py<|end_file_name|><|fim▁begin|>import os from dataclasses import dataclass from typing import Iterable from dbt.contracts.graph.manifest import SourceFile from dbt.contracts.graph.parsed import ParsedSqlNode, ParsedMacro from dbt.contracts.graph.unparsed import UnparsedMacro from dbt.exceptions impor...
<|file_name|>kcoin_es_CL.ts<|end_file_name|><|fim▁begin|><TS language="es_CL" version="2.1"> <context> <name>AddressBookPage</name> <message> <source>Right-click to edit address or label</source> <translation>Haga clic para editar la dirección o etiqueta</translation> </message> <message...
</context> <context>
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>""" Django settings for keyman project. Generated by 'django-admin startproject' using Django 1.11.7. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.d...
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } }
<|file_name|>postTodo.js<|end_file_name|><|fim▁begin|>function postTodo ({input, state, output, services}) { const todo = state.get(`app.todos.${input.ref}`) services.http.post('/api/todos', todo) .then(output.success) .catch(output.error) }<|fim▁hole|>postTodo.outputs = ['success', 'error'] export defaul...
postTodo.async = true
<|file_name|>mainwin.py<|end_file_name|><|fim▁begin|># vim: set fileencoding=utf-8 : # GNU Solfege - free ear training software # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011 Tom Cato Amundsen # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
<|file_name|>document_options.py<|end_file_name|><|fim▁begin|>import sys import warnings from django.db.models.fields import FieldDoesNotExist from django.utils.text import capfirst from django.utils.encoding import smart_text try: from django.db.models.options import get_verbose_name except ImportError: from...
self._meta[key] = value def __contains__(self, key):
<|file_name|>kosovo_importer.py<|end_file_name|><|fim▁begin|>from abstract_importer import AbstractImporter from slugify import slugify class KosovoImporter(AbstractImporter): <|fim▁hole|> pass def get_csv_filename(self): return "importer/data/kosovo/kosovo-budget-expenditures-2014.csv" def ge...
def __init__(self):
<|file_name|>ascii.py<|end_file_name|><|fim▁begin|>"""Module to read/write ascii catalog files (CSV and DS9)""" ##@package catalogs ##@file ascii_data<|fim▁hole|>The following functions are meant to help in reading and writing text CSV catalogs as well as DS9 region files. Main structure used is dictionaries do deal w...
"""
<|file_name|>less.py<|end_file_name|><|fim▁begin|>import os.path from pipeline.conf import settings from pipeline.compilers import SubProcessCompiler class LessCompiler(SubProcessCompiler): output_extension = 'css' def match_file(self, filename): return filename.endswith('.less') <|fim▁hole|> ...
def compile_file(self, content, path):
<|file_name|>app.js<|end_file_name|><|fim▁begin|>'use strict'; /** * @ngdoc object * @name activityApp * @requires $routeProvider * @requires activityControllers * @requires ui.bootstrap * * @description * Root app, which routes and specifies the partial html and controller depending on the url requested. * ...
* */ app.constant('HTTP_ERRORS', {
<|file_name|>TooManyRequestException.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../../node.d.ts" /> export = TooManyRequestException; import HttpServiceUnavailableException = require('../../errors/HttpServiceUnavailableException'); 'use strict'; /** * 要求を受け付けできません。リクエストの密度が高すぎます。 */ class TooManyRequ...
<|file_name|>account.routing.ts<|end_file_name|><|fim▁begin|>import {Routes, RouterModule} from '@angular/router'; import {LoginPageComponent} from './components/login-page/login-page.component'; import {RegisterPageComponent} from './components/register-page/register-page.component'; const accountRoutes:Routes = [{...
component: RegisterPageComponent }]; export const accountRouting = RouterModule.forChild(accountRoutes);
<|file_name|>hipDeviceGetAttribute.cpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2015 - 2021 Advanced Micro Devices, Inc. All rights reserved. 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 wi...
<|file_name|>mainwindow_ui.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'src/ui/mainwindow.ui' # # Created: Fri Feb 15 16:08:54 2013 # by: PyQt4 UI code generator 4.9.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCor...
icon4 = QtGui.QIcon()
<|file_name|>winsetup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup import py2exe opts = { "py2exe": { "compressed": 1, "optimize": 2, "ascii": 1, "bundle_files": 1, "packages": ["encodings"], "dist_dir": "dist" } } setup (name = "Gomoz", fullname = "Gomoz w...
author = "Handrix", author_email = "securfox@gmail.com", url = "http://www.sourceforge.net/projects/gomoz/",
<|file_name|>ScheduleCreateInput.java<|end_file_name|><|fim▁begin|>/* * Copyright 2015-2018 the original author or 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 * * htt...
*/ public final class ScheduleCreateInput {
<|file_name|>alias.py<|end_file_name|><|fim▁begin|>import numpy as np from scipy.sparse import csr_matrix class AliasArray(np.ndarray): """An ndarray with a mapping of values to user-friendly names -- see example This ndarray subclass enables comparing sub_id and hop_id arrays directly with their friendl...
def __array__(self):
<|file_name|>PersBug_src.cpp<|end_file_name|><|fim▁begin|>#include "Ht.h" #include "PersBug.h" void CPersBug::PersBug() { if (PR_htValid) { switch (PR_htInst) { case BUG_RTN: { if (SendReturnBusy_htmain()) { HtRetry(); break; } SendReturn_htmain(); } break; default:<|fim▁hole|>}<|fim▁end|>
assert(0); } }
<|file_name|>test_filter_totals_from_share_results.py<|end_file_name|><|fim▁begin|>from datetime import timedelta from unittest import TestCase import pandas as pd import pandas.testing from fireant.dataset.modifiers import Rollup from fireant.dataset.totals import scrub_totals_from_share_results from fireant.tests.d...
pandas.testing.assert_frame_equal(result, expected)
<|file_name|>test_binary_search_trees.py<|end_file_name|><|fim▁begin|># import data_structures.binary_search_trees.rope as rope import data_structures.binary_search_trees.set_range_sum as set_range_sum import data_structures.binary_search_trees.tree_orders as tree_orders import pytest import os import sys import resou...
def has_any_children(self):
<|file_name|>managed.rs<|end_file_name|><|fim▁begin|>use gfx::{Encoder, Resources, CommandBuffer, Slice, IndexBuffer}; use gfx::memory::{Usage, TRANSFER_DST}; use gfx::handle::Buffer; use gfx::traits::{Factory, FactoryExt}; use gfx::buffer::Role; use ui::render::Vertex; // step: 128 vertices (4096 bytes, 42 triangles ...
pub fn replace_zone(&mut self, buffer: &[Vertex], zone: usize) { let (ref mut zone, ref mut dirty) = self.zones[zone];
<|file_name|>CoAPEndpointUriFactory.java<|end_file_name|><|fim▁begin|>/* Generated by camel build tools - do NOT edit this file! */ package org.apache.camel.coap; import java.net.URISyntaxException; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.apache.camel...
set.add("coapMethodRestrict");
<|file_name|>plot_chances.py<|end_file_name|><|fim▁begin|>import numpy as np import matplotlib.pyplot as plt import sys fname = sys.argv[1] exes = [0] * 101 wise = [0] * 101 f = open(fname, 'r') for i in range(101): split = f.readline().split(" ") exes[i] = split[0] wise[i] = split[1] x = np.asarray(exes) y = n...
fig, ax = plt.subplots()
<|file_name|>busy_times.py<|end_file_name|><|fim▁begin|>import arrow from dateutil import tz import flask import CONFIG START_TIME = CONFIG.START_TIME END_TIME = CONFIG.END_TIME def get_busy_times(events): """ Gets a list of busy times calculated from the list of events. :param events: a list of calenda...
hours=+START_TIME) end_date = arrow.get(flask.session['end_date']).replace(hours=+END_TIME)
<|file_name|>index.js<|end_file_name|><|fim▁begin|>Ext.namespace("Ext.haode"); Ext.haode.Control = function(args){ Ext.apply(this, args); this.init(); }; Ext.haode.Control.prototype = { userName : '', version : '', app_name : '', copyright : '', viewport : null, cn : 1, i...
waitMsg : '正在提交数据请稍后...',
<|file_name|>unsized4.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/licens...
}
<|file_name|>common.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2007-2011 Tualatrix Chou <tualatrix@gmail.com> # # 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 So...
return self._configparser.options(section)
<|file_name|>virtual_interface.py<|end_file_name|><|fim▁begin|># Copyright (C) 2014, Red Hat, 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/l...
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
<|file_name|>core.py<|end_file_name|><|fim▁begin|># Copyright 2012 OpenStack Foundation # # 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 # #...
decorators. Experience has shown it's very easy to apply
<|file_name|>groupthink.go<|end_file_name|><|fim▁begin|>package main import ( "log" "os" "path/filepath" "github.com/aodin/volta/config" "github.com/codegangsta/cli" "github.com/codegangsta/envy/lib" "github.com/aodin/groupthink/server" ) func main() { // Bootstrap the environment envy.Bootstrap() app :=...
} app.Run(os.Args) }
<|file_name|>basic.rs<|end_file_name|><|fim▁begin|>#![feature(phase)] #[phase(plugin)] extern crate compile_msg;<|fim▁hole|>fn main() { compile_note!("useful information: ", 1, " instance"); compile_warning!("x"); compile_error!("y"); // compilation stops here compile_fatal!("z"); compile_n...
#[cfg(rare)] compile_note!("only emitted with --cfg rate")
<|file_name|>tournament_matches.rs<|end_file_name|><|fim▁begin|>use crate::*; use iter::games::GamesIter; /// A tournament matches iterator pub struct TournamentMatchesIter<'a> { client: &'a Toornament, /// Fetch matches of tournament tournament_id: TournamentId, /// Fetch games with the match wit...
} }
<|file_name|>checkers.py<|end_file_name|><|fim▁begin|># -*- test-case-name: twisted.test.test_newcred -*- from twisted.internet import defer from twisted.python import components, failure from twisted.cred import error, credentials class ICredentialsChecker(components.Interface): """I check sub-interfaces of ICre...
create potential problems with persistence. """
<|file_name|>rgb_test.go<|end_file_name|><|fim▁begin|>package clr import ( "testing" ) func TestHSL(t *testing.T) { tables := []struct { rgb RGB h uint16 s uint8<|fim▁hole|> {RGB{R: 165, G: 23, B: 139}, 310, 75, 36}, {RGB{R: 221, G: 132, B: 90}, 19, 65, 60}, {RGB{R: 89, G: 1, B: 55}, 323, 97, 17}, ...
l uint8 }{ {RGB{R: 78, G: 91, B: 112}, 217, 17, 37},
<|file_name|>poodle.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Poodle implementation with a client <--> proxy <--> server ''' import argparse import random import re import select import socket import SocketServer import ssl import string import sys import struct import thre...
if content_type == 23: poodle.set_decipherable(True) data_altered = False # we send data to the client
<|file_name|>layout.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 super::geom::{ FlexAxis, FlexRelativeRect, FlexRelati...
// FIXME: implement cases B, C, D. // Case E: everything else
<|file_name|>cenzor_tr_TR.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="tr_TR" version="2.1"> <context> <name>@default</name> <message> <source>Chat</source> <translation type="unfinished"/> </message> <message> <source>Cenzor</source> <...
<|file_name|>_adapters.py<|end_file_name|><|fim▁begin|># -*- coding: ascii -*- r""" :Copyright: Copyright 2007 - 2015 Andr\xe9 Malo or his licensors, as applicable :License: 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|>01_inventory_not_connected.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2.7 # Copyright 2015 Cisco Systems, 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...
from __future__ import print_function as _print_function from basics.inventory import inventory_not_connected from basics.render import print_table
<|file_name|>da.js<|end_file_name|><|fim▁begin|><|fim▁hole|> * any HTML markup tags in the messages must not be converted or translated. * * @see http://github.com/kartik-v/bootstrap-fileinput * * NOTE: this file must be saved in UTF-8 encoding. */ (function ($) { "use strict"; $.fn.fileinput...
/*! * FileInput Danish Translations * * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or
<|file_name|>tests.rs<|end_file_name|><|fim▁begin|>extern crate word2vec; use word2vec::wordvectors::WordVector; const PATH: &'static str = "vectors.bin"; #[test] fn test_word_cosine() { let model = WordVector::load_from_binary(PATH).unwrap(); let res = model.cosine("winter", 10).expect("word not found in v...
match result { Some(_) => assert!(false), None => assert!(true),
<|file_name|>step6_file.rs<|end_file_name|><|fim▁begin|>#![feature(exit_status)] extern crate mal; use std::collections::HashMap; use std::env as stdenv; use mal::types::{MalVal, MalRet, MalError, err_str}; use mal::types::{symbol, _nil, string, list, vector, hash_map, malfunc}; use mal::types::MalError::{ErrString,...
let a1 = (*args)[1].clone(); let a2 = (*args)[2].clone();
<|file_name|>calculate.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <vector> using namespace std; const int MOD = 10007; class SegmentTree { struct STNode { int sum; int prefix; int suffix; int product; STNode() : sum(0), prefix(0), suffix(0), product(0) {...
int main(void)
<|file_name|>configs-multiline_match_arm_forces_block-false.rs<|end_file_name|><|fim▁begin|>// rustfmt-multiline_match_arm_forces_block: false // Option forces multiline match arm bodies to be wrapped in a block fn main() { match lorem { Lorem::Ipsum => if ipsum {<|fim▁hole|> println!("dolor"); ...
<|file_name|>test-branches.py<|end_file_name|><|fim▁begin|>from . import common import hglib class test_branches(common.basetest): def test_empty(self): self.assertEquals(self.client.branches(), []) def test_basic(self): self.append('a', 'a') rev0 = self.client.commit('first', addremov...
expected.append((r.branch, int(r.rev), r.node[:12]))
<|file_name|>testUrl.py<|end_file_name|><|fim▁begin|>import urllib2 url = "http://ifolderlinks.ru/404" req = urllib2.Request(url)<|fim▁hole|>response = urllib2.urlopen(req,timeout=3) #except urllib2.HTTPError as e: # print 'The server couldn\'t fulfill the request.' # print 'Error code: ', e.code print response...
#try:
<|file_name|>niche-filling.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/l...
<|file_name|>ConnectionListResult.java<|end_file_name|><|fim▁begin|>// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.automation.models; import com.azure.core.annotation.Fluent; ...
return this.value; }
<|file_name|>dataSourceListResult.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorre...
*/ 'use strict';
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>__doc__ = """Random number array generators for numarray. This package was ported to numarray from Numeric's RandomArray and provides functions to generate numarray of random numbers. """<|fim▁hole|> from RandomArray2 import *<|fim▁end|>
<|file_name|>test_compile.py<|end_file_name|><|fim▁begin|>from test_support import verbose, TestFailed if verbose: print "Testing whether compiler catches assignment to __debug__" try: compile('__debug__ = 1', '?', 'single') except SyntaxError: pass import __builtin__ prev = __builtin__.__debu...
if got != expected: raise TestFailed("eval(%r) gave %r, but expected %r" %
<|file_name|>cookies.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright(C) 2014 Laurent Bachelier # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify<|fim▁hole|># it under the terms of the GNU Affero General Public License as published by # the Free Softw...
<|file_name|>boss_ouro.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Gene...
Enrage = false; Submerged = false;
<|file_name|>MoleculeTypeAndSourceQualifierCheckTest.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright 2012 EMBL-EBI, Hinxton outstation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file excep...
<|file_name|>concatReads.py<|end_file_name|><|fim▁begin|>""" Author: Junhong Chen """ from Bio import SeqIO import gzip import sys import os pe1 = [] pe2 = [] pname = [] for dirName, subdirList, fileList in os.walk(sys.argv[1]): for fname in fileList: tmp = fname.split(".")[0] tmp = tmp[:l...
<|file_name|>issue-43927-non-ADT-derive.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...
#![allow(dead_code)]
<|file_name|>test_parallel_executor_seresnext_with_reduce_cpu.py<|end_file_name|><|fim▁begin|># Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of ...
iter=seresnext_net.iter(use_device), batch_size=seresnext_net.batch_size(use_device), use_device=use_device, use_reduce=True,
<|file_name|>SWIGOUTDIR.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # 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 rest...
# SCons should realize it needs to rebuild the removed .java files. test.not_up_to_date(arguments = '.') test.must_exist('java/build dir/foopackJNI.java')
<|file_name|>core.py<|end_file_name|><|fim▁begin|>import os from angular_flask import app from flask.ext.restless import APIManager from flask.ext.mongoengine import MongoEngine app.config["MONGODB_SETTINGS"] = {'DB':os.environ.get('MONGODB_DB'),"host":os.environ.get('MONGODB_URI')} mongo_db = MongoEngine(app)<|fi...
api_manager = APIManager(app)
<|file_name|>mqtt.cpp<|end_file_name|><|fim▁begin|>#include <ESP8266WiFi.h> #include <PubSubClient.h> #include "mqtt.h" // Connect to MQTT and set up subscriptions based on configuration void MQTT::connect() { // Connect to broker this->mqttClient.setServer(this->host, this->port); mqttClient.connect(thi...
char payload[50];
<|file_name|>Object3D.js<|end_file_name|><|fim▁begin|>import { Quaternion } from '../math/Quaternion'; import { Vector3 } from '../math/Vector3'; import { Matrix4 } from '../math/Matrix4'; import { EventDispatcher } from './EventDispatcher'; import { Euler } from '../math/Euler'; import { Layers } from './Layers'; impo...
if ( this.geometry !== undefined ) {
<|file_name|>weatherpublisher.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import time import json import requests from datetime import datetime import paho.mqtt.client as mqtt from sense_hat import SenseHat BROKER_URL = '192.168.24.25' CYCLE_TIME = 10 # initialisiere SenseHat-Erweiterung sense = SenseH...
try: r = requests.get(IP_LOCKUP_URL) except: print("error while querying info...")
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Misc support code. Copyright (c) 2015 Civic Knowledge. This file is licensed under the terms of the Revised BSD License, included in this distribution as LICENSE.txt """ from collections import OrderedDict, defaultdict, Mapping, deque, MutableMapping, Callable...
<|file_name|>Dao.java<|end_file_name|><|fim▁begin|>package de.klickreform.dropkit.dao; import de.klickreform.dropkit.exception.DuplicateEntryException; import de.klickreform.dropkit.exception.NotFoundException; import de.klickreform.dropkit.models.DomainModel; import java.io.Serializable; import java.util.Collection;...
}
<|file_name|>peas.js<|end_file_name|><|fim▁begin|>// // peas.js // // tree data structure in javascript // ////////////////////////// var peas = function() { // "sub" here is used as an object container for // operations related to sub nodes. // Each pea node will have a "sub" property // with an instance of "s...