prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>test_decoder.go<|end_file_name|><|fim▁begin|>package command import ( "encoding/json" "fmt" "io" "strings" "text/tabwriter" "time" "github.com/fatih/color" hclog "github.com/hashicorp/go-hclog" ) type EventDecoder struct { r io.Reader dec *json.Decoder report *TestReport } type TestRepor...
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|>import pytest <|fim▁hole|> @pytest.fixture def isfile(mocker): return mocker.patch('os.path.isfile', return_value=True) @pytest.fixture @pytest.mark.usefixtures('isfile') def history_lines(mocker): def aux(lines): mock = mocker.patch('io.open') ...
@pytest.fixture def builtins_open(mocker): return mocker.patch('six.moves.builtins.open')
<|file_name|>ParticleBasedRendererGLSL.cpp<|end_file_name|><|fim▁begin|>/*****************************************************************************/ /** * @file ParticleBasedRenderer.cpp * @author Naohisa Sakamoto */ /*****************************************************************************/ #include "Par...
}
<|file_name|>part04.rs<|end_file_name|><|fim▁begin|>// Rust-101, Part 04: Ownership, Borrowing, References // =================================================== /* void foo(std::vector<int> v) { int *first = &v[0]; v.push_back(42); *first = 1337; // This is bad! } */ // ## Ownership fn work_on_...
// * If there is an active shared reference, then every other active access to the data is also a shared reference
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate graphics; extern crate freetype as ft; extern crate sdl2_window; extern crate opengl_graphics; extern crate piston; extern crate find_folder; use sdl2_window::Sdl2Window; use opengl_graphics::{ GlGraphics, Texture, OpenGL }; use graphics::math::Matrix2d; u...
default_draw_state(),
<|file_name|>refactorConvertImport_namespaceToNamed_namespaceUsed.ts<|end_file_name|><|fim▁begin|><|fim▁hole|> /////*a*/import * as m from "m";/*b*/ ////m.a; ////m; goTo.select("a", "b"); edit.applyRefactor({ refactorName: "Convert import", actionName: "Convert namespace import to named imports", actionDes...
/// <reference path='fourslash.ts' />
<|file_name|>cluster.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ make_a_star_cluster.py creates a model star cluster, which can then be used in N-body simulations or for other purposes. It requires AMUSE, which can be downloaded from http://amusecode.org or https://github.com/amusecode/amuse. Currently ...
logger.debug(
<|file_name|>logstream_test.py<|end_file_name|><|fim▁begin|>import zerorpc import gevent.queue import logging import sys logging.basicConfig() # root logger logger = logging.getLogger() # set the mimimum level for root logger so it will be possible for a client # to subscribe and receive logs for any log level logg...
logger = logging.getLogger("service") def __init__(self): self._logging_handlers = set()
<|file_name|>number.ts<|end_file_name|><|fim▁begin|>import {Filed,Option} from './field'; import {Types} from '../utils/types';<|fim▁hole|>import { MinNumberValidator, MaxNumberValidator } from '../validators'; export class FiledNumber extends Filed{ public static uuid(){ return Math.round(Math.ran...
import {CastError} from '../errors/cast';
<|file_name|>json_error_response.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|>""" Copyright 2015 SmartBear Software 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 ...
# coding: utf-8
<|file_name|>rendezvous.go<|end_file_name|><|fim▁begin|><|fim▁hole|>// you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distribut...
// // Copyright 2014 RTMFPew // // Licensed under the Apache License, Version 2.0 (the "License");
<|file_name|>Calc.cpp<|end_file_name|><|fim▁begin|>#include "Calc.hpp" #include <cmath> #define PI 3.14159265 float Calc::radToDeg(float rad) { return rad * ( 180.f / PI); } float Calc::degToRad(float deg) { return deg * (PI / 180.f); } /* * Rotation around origin: * rotation matrix P * (...
sf::Vector2f Calc::degAngleToDirectionVector(float angle)
<|file_name|>querystring-stringify.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html version: 3.2.0 build: 2676 */ YUI.add('querystring-stringify', function(Y) { /** * Provides Y.QueryString.stringif...
if (obj.hasOwnProperty(i)) { n = begin + i + end;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """WebUI.""" from .websocket import WebsocketProxyHandler def create_webapp(naumanni, **kwargs): """App factory. :param CircleCore core: CircleCore Core :param str base_url: ベースURL<|fim▁hole|> from .app import NaumanniWebA...
:param int ws_port: Websocket Port Number :return: WebUI App :rtype: CCWebApp """
<|file_name|>population.cc<|end_file_name|><|fim▁begin|>#include"population.h" population::population() { pop.clear(); } population::population(Random *r) { pop.clear(); this->r = r; } population::population(int n_individuos, int n_gene, Random *r) { pop.clear(); for(int i = 0; i < n_individuos; i++...
if(param == ROULETTE_RANK || param == ROULETTE_MULTIPOINTER_RANK) { for(int i = 0; i < pop.size(); i++) { max += (double) pop[i].get_rank(); roulette.push_back(max);
<|file_name|>version.go<|end_file_name|><|fim▁begin|>package log // Version is the version of this package<|fim▁hole|><|fim▁end|>
const Version = "1.0.0-pre"
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use primal_estimate; use primal_bit::{BitVec}; use std::{cmp}; use hamming; use wheel; pub mod primes; mod presieve; /// A heavily optimised prime sieve. /// /// This is a streaming segmented sieve, meaning it sieves numbers in /// intervals, extracting whatever it ne...
<|file_name|>list.d.ts<|end_file_name|><|fim▁begin|>/// <reference types="react" /> import React from 'react'; import { TransferItem } from './index'; export interface TransferListProps { prefixCls: string; titleText: string; dataSource: TransferItem[]; filter: string;<|fim▁hole|> style?: React.CSSPr...
filterOption?: (filterText: any, item: any) => boolean;
<|file_name|>smap_out_parser_json.py<|end_file_name|><|fim▁begin|>""" Authors: Jeremy Haugen, UCLA, Anthony Nguyen, UCLA Created: June 2015 Copyright notice in LICENSE file This file is used to take the raw files generated by the SAM, which are in CSV format and processes it into json format. Then it will contact th...
j += 1 #if j == 10: # break
<|file_name|>gobi_runner.py<|end_file_name|><|fim▁begin|>from glob import glob import subprocess import vagrant from fabric.api import execute, env, quiet from fabric.state import connections from logger import init_logger, debug, info VM_NAME = "default" def clear_fabric_cache(): """ Fabric caches it's c...
def get_all_test_functions(): """ Get all the tests from the current directory
<|file_name|>dpi.rs<|end_file_name|><|fim▁begin|>//! UI scaling is important, so read the docs for this module if you don't want to be confused. //! //! ## Why should I care about UI scaling? //! //! Modern computer screens don't have a consistent relationship between resolution and size. //! 1920x1080 is a common reso...
<|file_name|>RTCPHeader.cpp<|end_file_name|><|fim▁begin|>// // Copyright (C) 2004-2006 SIPfoundry Inc. // Licensed by SIPfoundry under the LGPL license. // // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved. // Licensed to SIPfoundry under a Contributor Agreement. // // $$ ///////////////////////////////////...
* */ unsigned long CRTCPHeader::GetVersion(void)
<|file_name|>sto.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import re from pyquery import PyQuery from novel import serial, utils BASE_URL = 'http://www.sto.cc/{}-1/' PAGE_URL = 'http://www.sto.cc/{}-{}/' class StoTool(utils.Tool): def __init__(self): super().__init...
's思s兔s在s線s閱s讀s',
<|file_name|>socket_activation_windows.go<|end_file_name|><|fim▁begin|>// +build windows package main<|fim▁hole|>import "errors" // nfds returns 0 to indicate that systemd socket activation is unsupported on Windows. func nfds() int { return 0 } // handleSocketActivation is no-op on Windows. It returns an error to ...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # -*- coding: utf-8 -*- # vim: set et sw=4 fenc=utf-8: #<|fim▁hole|># it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version...
# Copyright 2016~2018 INVITE Communications Co., Ltd. All Rights Reserved. # # This program is free software: you can redistribute it and/or modify
<|file_name|>paneldamageskind.cpp<|end_file_name|><|fim▁begin|>/* RPG Paper Maker Copyright (C) 2017-2021 Wano RPG Paper Maker engine is under proprietary license. This source code is also copyrighted. Use Commercial edition for commercial use of your games. See RPG Paper Maker EULA here: ...
// // -------------------------------------------------------
<|file_name|>pytests.py<|end_file_name|><|fim▁begin|># Purpose: Test Script to Ensure that as the complexity of the Scripts Grows functionality can be checked # # Info: Uses py.test to test each of the track building functions are working # # Running the Test from the COMMAND LINE: py.test test.py # # Developed a...
output3[0], np.ndarray) and len(output3) == N_TRACKS_GEN, \ 'Types Not as Expected in Output3'
<|file_name|>util.rs<|end_file_name|><|fim▁begin|>use rusoto_core::signature; use rusoto_core::signature::SignedRequest; use rusoto_core::param::{Params, ServiceParams}; use rusoto_core::region::Region; use rusoto_core::credential::AwsCredentials; use generated::{GetObjectRequest, PutObjectRequest, DeleteObjectRequest}...
// AWS document has x-amz-server-side-encryption-context parameter but PutObjectRequest does'nt have it. //kms_context, "x-amz-server-side-encryption-context"; sse_customer_algorithm, "x-amz-server-side-encryption-customer-algorithm"; sse_customer_key, "x-amz-server-side-...
<|file_name|>flotation.py<|end_file_name|><|fim▁begin|># coding: utf-8 # In[1]: import matplotlib.pyplot as plt #import modules import matplotlib.patches as mpatches import numpy as np #get_ipython().magic(u'matplotlib inline') # set to inline for ipython # In[2]: water = [0,2,2,3,1.5,1.5,3,2,2,2,2,2.5,2] #arrange...
densityAlc * (1/100.0**3) *1000 ##TESTING CONVERSION OF DENSITY # In[ ]:
<|file_name|>actionmanager.py<|end_file_name|><|fim▁begin|>''' Created on 29.07.2013 @author: mhoyer ''' from mysqldb import MysqlDB from local_system import LocalSystem from remote_system import RemoteSystem from entities import Application import logging import util class Actionmanager(): ''' classdocs ...
else: self.logger.error("No application configured with name: " + app_name) raise Exception("Configuration Error")
<|file_name|>ChatRoom1.0Doser.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -.- coding: utf-8 -.-y import random import socket import os import time import threading import Queue import sys import argparse from multiprocessing import Process print """\33[91m ═══════════════════════════════════════════════════...
<|file_name|>content_server.py<|end_file_name|><|fim▁begin|>import common.config import common.messaging as messaging import common.storage import common.debug as debug from common.geo import Line, LineSet from common.concurrency import ConcurrentObject from threading import Lock, RLock import tree.pachinko.message_t...
<|file_name|>eachLimit.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = eachLimit; var _eachOfLimit = require('./internal/eachOfLimit'); var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit); var _withoutIndex = require('./internal/w...
* @method * @see [async.each]{@link module:Collections.each} * @alias forEachLimit * @category Collection
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>#![ warn( missing_docs ) ] #![ warn( missing_debug_implementations ) ] /// Alias for std::error::Error. pub use std::error::Error as ErrorAdapter; /// /// Macro to generate error. /// /// # Sample /// ``` /// # use werror::*; /// err!( "No attr" ); /// ``` /// #[ m...
pub fn new< Msg : Into< String > >( msg : Msg ) -> Error { Error { msg : msg.into() } }
<|file_name|>backend.rs<|end_file_name|><|fim▁begin|>use crate::codec::{FramedIo, Message, ZmqFramedRead, ZmqFramedWrite}; use crate::fair_queue::QueueInner; use crate::util::PeerIdentity; use crate::{ MultiPeerBackend, SocketBackend, SocketEvent, SocketOptions, SocketType, ZmqError, ZmqResult, }; use async_trait::...
<|file_name|>livereload-server-test.js<|end_file_name|><|fim▁begin|>'use strict'; const expect = require('chai').expect; const LiveReloadServer = require('../../../../lib/tasks/server/livereload-server'); const MockUI = require('console-ui/mock'); const MockExpressServer = require('../../../helpers/mock-express-server...
});
<|file_name|>sourceMap-Comment1.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
// @target: ES3 // @sourcemap: true // Comment
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod fs; use pulldown_cmark::{Parser, html, Options, OPTION_ENABLE_TABLES, OPTION_ENABLE_FOOTNOTES}; /// /// /// Wrapper around the pulldown-cmark parser and renderer to render markdown pub fn render_markdown(text: &str) -> String { let mut s = String::with_ca...
let mut opts = Options::empty(); opts.insert(OPTION_ENABLE_TABLES); opts.insert(OPTION_ENABLE_FOOTNOTES);
<|file_name|>netcmd_actions.py<|end_file_name|><|fim▁begin|>__author__ = 'ryanplyler' def sayhi(config):<|fim▁hole|> error = None try: server_output = "Executing action 'sayhi()'" response = "HI THERE!" except: error = 1 return server_output, response, error<|fim▁end|>
<|file_name|>DBFFieldDescriptor.java<|end_file_name|><|fim▁begin|>/* * Copyright 2015 ANTONIO CARLON * * 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/li...
* @return the field decimal count
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>""" Script for building the Pieman package. """ from setuptools import setup try: import pypandoc LONG_DESCRIPTION = pypandoc.convert('README.md', 'rst') except (ImportError, OSError): # OSError is raised when pandoc is not installed. LONG_DESCRIPTION...
license='https://gnu.org/licenses/gpl-3.0.txt', scripts=[ 'bin/apk_tools_version.py', 'bin/bsc.py',
<|file_name|>key_agreement.go<|end_file_name|><|fim▁begin|>// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "crypto" "crypto/ecdsa" "crypto/elliptic" "crypto/md5" "crypto/rand" "cr...
ckx.ciphertext = make([]byte, len(encrypted)+2) ckx.ciphertext[0] = byte(len(encrypted) >> 8) ckx.ciphertext[1] = byte(len(encrypted)) copy(ckx.ciphertext[2:], encrypted)
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""Support for Z-Wave sensors.""" from homeassistant.components.sensor import DEVICE_CLASS_BATTERY, DOMAIN, SensorEntity from homeassistant.const import DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS, TEMP_FAHRENHEIT from homeassistant.core import callback<|fim▁hole|> async d...
from homeassistant.helpers.dispatcher import async_dispatcher_connect from . import ZWaveDeviceEntity, const
<|file_name|>aggregates.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 Citrix Systems, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # h...
if isinstance(value, datetime.datetime): value = value.replace(tzinfo=None)
<|file_name|>prelude.rs<|end_file_name|><|fim▁begin|>//! Traits and essential types intended for blanket imports. <|fim▁hole|><|fim▁end|>
pub use { Cast, Continue, IsA, IsClassFor, ObjectExt, ObjectType, ParamSpecType, StaticType, StaticVariantType, ToSendValue, ToValue, ToVariant, };
<|file_name|>run_finetuning.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2020 The Google Research 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.apa...
import configure_finetuning from finetune import preprocessing from finetune import task_builder
<|file_name|>instr_sgdt.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode}; use ::RegType::*; use ::instruction_def::*; use ::Operand::*; use ::Reg::*; use ::RegScale::*; use ::test::run_test; #[test] fn sgdt_1() { run_test(&Instruction ...
#[test]
<|file_name|>sbrenc_freq_sca.cpp<|end_file_name|><|fim▁begin|>/* ----------------------------------------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android © Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandt...
modifications thereto to recipients of copies in binary form. The name of Fraunhofer may not be used to endorse or promote products derived from this library without
<|file_name|>pyrpo.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding: utf-8 from __future__ import print_function """Search for code repositories and generate reports""" import datetime import errno import logging import os import pprint import re import subprocess import sys from collections import deq...
'cwd': cwd, 'stderr': subprocess.STDOUT, 'stdout': subprocess.PIPE})
<|file_name|>textui_prompt_test.py<|end_file_name|><|fim▁begin|># # $Id: build_ansi.py 9736 2011-06-20 16:49:22Z ahartvigsen $ # # Proprietary and confidential. # Copyright $Date:: 2011#$ Perfect Search Corporation. # All rights reserved. # import unittest, os, sys, StringIO from textui.prompt import * from no...
self.stuff('\nFred\ny\n')
<|file_name|>CalcTangentsProcess.cpp<|end_file_name|><|fim▁begin|>/* --------------------------------------------------------------------------- Open Asset Import Library (assimp) --------------------------------------------------------------------------- Copyright (c) 2006-2012, assimp team All rights reserve...
*/ /** @file Implementation of the post processing step to calculate * tangents and bitangents for all imported meshes
<|file_name|>HomeDirectoryType.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located ...
if (enumEntry.toString().equals(value)) { return enumEntry; }
<|file_name|>issue-18119.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT.<|fim▁hole|>// option. This file may not be copied, modified, or distributed // except according to t...
// // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
<|file_name|>0027_add_indexes_on_ip_fields.py<|end_file_name|><|fim▁begin|># Generated by Django 3.0.4 on 2020-04-15 23:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [('config', '0026_hardware_id_not_unique')] <|fim▁hole|> operations = [ migrations....
<|file_name|>db.py<|end_file_name|><|fim▁begin|>import contextlib import logging import os.path import sqlalchemy from sqlalchemy import schema as sql_schema from sqlalchemy import types as sql_types from sqlalchemy.ext import declarative as sql_declarative from sqlalchemy.orm import session as sql_session from dance...
def name(self): return os.path.basename(self.path)
<|file_name|>test_affectee_dom_grp.py<|end_file_name|><|fim▁begin|># ============================================================================== # Copyright (C) 2011 Diego Duclos # Copyright (C) 2011-2018 Anton Vorobyov # # This file is part of Eos. # # Eos is free software: you can redistribute it and/or modify # i...
<|file_name|>test_nuage_vpc_internal_lb.py<|end_file_name|><|fim▁begin|># Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to yo...
<|file_name|>ModelArmorStand.java<|end_file_name|><|fim▁begin|>package net.adanicx.cyancraft.client.model; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.adanicx.cyancraft.client.OpenGLH...
standRightSide.render(p_78088_7_);
<|file_name|>config.ts<|end_file_name|><|fim▁begin|>declare const System:any; /* System.config({ defaultJSExtensions: true, packages: { app: { format: 'register', defaultExtension: 'js' }, '@ngrx/store': { main: 'dist/index.js', defaultExtension: 'js' } }, paths: { '*': '*.js', ...
'router-deprecated', 'upgrade', ];
<|file_name|>test_dns.py<|end_file_name|><|fim▁begin|><|fim▁hole|># vim: set et sw=4 sts=4 fileencoding=utf-8: # # Copyright (c) 2013-2017 Dave Jones <dave@waveform.org.uk> # Copyright (c) 2013 Mime Consulting Ltd. <info@mimeconsulting.co.uk> # All rights reserved. # # Permission is hereby granted, free of charge, to a...
<|file_name|>config.go<|end_file_name|><|fim▁begin|>// Copyright © 2016-2021 Genome Research Limited // Author: Sendu Bala <sb10@sanger.ac.uk>, Ashwini Chhipa <ac55@sanger.ac.uk> // // This file is part of wr. // // wr is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser Ge...
// ConfigSourceEnvVar is a config value source. ConfigSourceEnvVar = "env var"
<|file_name|>profileFormula.py<|end_file_name|><|fim▁begin|>''' Profile Formula Validation is an example of a plug-in to GUI menu that will profile formula execution. (c) Copyright 2012 Mark V Systems Limited, All rights reserved. ''' import os from tkinter import simpledialog, messagebox def profileFormulaMenuEntend...
title=_("arelle - Save Formula Profile Report"), initialdir=cntlr.config.setdefault("formulaProfileReportDir","."), filetypes=[(_("Profile report file .log"), "*.log")],
<|file_name|>scale.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use Adjustment; use Buildable; use Orientable; use Orientation; use PositionType; use Range; use Widget; use ffi; use glib::object:...
let f: &F = transmute(f); f(&Scale::from_glib_borrow(this).unsafe_cast())
<|file_name|>description_test.cc<|end_file_name|><|fim▁begin|>// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENS...
LazyStream<F> GStreamable(LazyStream<F> f) {
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>var path = require('path'); var webpack = require('webpack'); var WebpackCleanupPlugin = require("webpack-cleanup-plugin"); module.exports = { entry: './react/index.jsx',<|fim▁hole|> module: { loaders: [ { test: /\.scss$/, loaders...
output: { path: __dirname + '/www', filename: 'bundle.js' },
<|file_name|>parameters.py<|end_file_name|><|fim▁begin|>########## recombination.py parameters class Recombination_Parameters(object):<|fim▁hole|> # Change these two values to the folders you prefer - use an absolute path e.g. /Users/Harry/fastq-data and # /Users/Harry/csv-data or a path relative to the tools di...
<|file_name|>test_simple_paths.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import random from nose.tools import * import networkx as nx from networkx import convert_node_labels_to_integers as cnlti from networkx.algorithms.simple_paths import _bidirectional_shortest_path from networkx.algorithms.simple_paths...
assert_equal(result, solution)
<|file_name|>test_SourceClip.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import aaf import aaf.mob import aaf.define import aaf.iterator import aaf.dictionary import aaf.storage import aaf.component import aaf.util import traceback import unittest import os from aaf.util import AUID, MobID ...
def test_basic(self):
<|file_name|>SaltErrorResolver.java<|end_file_name|><|fim▁begin|>package com.sequenceiq.cloudbreak.orchestrator.salt; import java.io.IOException; import java.util.List; import java.util.Map; import java.util.Optional; import javax.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; imp...
}
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include from django.conf.urls import url from django.contrib import admin from django.views.i18n import JavaScriptCatalog from demo.apps.app ...
urlpatterns = [ url(r'^jsi18n/$', JavaScriptCatalog.as_view(), name='javascript_catalog'), # Admin
<|file_name|>applications_test.go<|end_file_name|><|fim▁begin|>package applications_test import ( "encoding/json" "fmt" "net/http" "net/http/httptest" "time" "code.cloudfoundry.org/cli/cf/api/apifakes" "code.cloudfoundry.org/cli/cf/configuration/coreconfig" "code.cloudfoundry.org/cli/cf/errors" "code.cloud...
var singleAppResponse = testnet.TestResponse{ Status: http.StatusOK,
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export * from "./slice";<|fim▁end|>
// Projection Operators. https://docs.mongodb.com/manual/reference/operator/projection/ export * from "./elemMatch";
<|file_name|>ConcludePhdProcess.java<|end_file_name|><|fim▁begin|>/** * Copyright © 2002 Instituto Superior Técnico * * This file is part of FenixEdu Academic. * * FenixEdu Academic is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published b...
* the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. *
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for comic project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discove...
from django.core.wsgi import get_wsgi_application application = get_wsgi_application()
<|file_name|>global.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.run = undefined; var _asyncToGenerator2; function _load_asyncToGenerator() { return _asyncToGenerator2 = _interopRequireDefault(require('babel-runtime/helpers/asyncToGenerator'...
function _load_fs() { return _fs = _interopRequireWildcard(require('../../util/fs.js'));
<|file_name|>jquery.gray.js<|end_file_name|><|fim▁begin|>;(function ($, window, document, undefined) { var pluginName = 'gray', defaults = {}; function Plugin (element, options) { this.element = element; this.settings = $.extend({}, defaults, options); this._defaults = defaults; this._name =...
}; }
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>const gulp = require('gulp'); const HubRegistry = require('gulp-hub'); const browserSync = require('browser-sync'); const conf = require('./conf/gulp.conf'); // Load some files into the registry const hub = new HubRegistry([conf.path.tasks('*.js')]); // Tell gulp...
gulp.watch([ <% if (css !== 'css') { -%> conf.path.src('**/*.<%- css %>'), <% } -%>
<|file_name|>inputsystem.go<|end_file_name|><|fim▁begin|>package input import ( glfw "github.com/go-gl/glfw3" "github.com/tedsta/fission/core" "github.com/tedsta/fission/core/event" ) type InputSystem struct { eventManager *event.Manager window *glfw.Window } func NewInputSystem(w *glfw.Window, e *event.M...
// Callbacks ################################################################### func (i *InputSystem) onResize(wnd *glfw.Window, w, h int) { //fmt.Printf("resized: %dx%d\n", w, h)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
""" Functions and classes dealing with commands. """
<|file_name|>chanPaper2.go<|end_file_name|><|fim▁begin|><|fim▁hole|>package main func main() { x := "Hello World" ch := make(chan string) f(ch) // @expectedflow: false sink(x) x = source() ch <- x } func f(ch chan string) { // *ssa.MakeClosure go func() { y := <-ch // @expectedflow: true sink(y) }() }...
// f is not called via a go function, instead the go function is inside the body of f.
<|file_name|>tsxRename3.ts<|end_file_name|><|fim▁begin|>/// <reference path='fourslash.ts' /> //@Filename: file.tsx //// declare module JSX { //// interface Element { } <|fim▁hole|>//// interface ElementAttributesProperty { props } //// } //// class MyClass { //// props: { //// [|[|{| "contextRan...
//// interface IntrinsicElements { //// }
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>//! This expands upon the implementation defined on [Rosetta Code][element definition] and consists //! of the relevant lines from the `LinkedList` implementation in the Rust standard library. //! //! [element definition]: http://rosettacode.org/wiki/Doubly-linked_list/...
prev: Rawlink::none(), }
<|file_name|>AsusRouterPresenceService.py<|end_file_name|><|fim▁begin|>''' @author: davandev ''' import logging import os import urllib import datetime import telnetlib import paramiko import davan.config.config_creator as configuration import davan.util.constants as constants import davan.util.helper_fu...
''' Constructor ''' ReoccuringBaseService.__init__(self, constants.DEVICE_PRESENCE_SERVICE_NAME, service_provider, config)
<|file_name|>bytes.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/...
<|file_name|>admin.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2012 OpenPlans # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publish...
class AttributeAdmin(admin.ModelAdmin):
<|file_name|>ldd.rs<|end_file_name|><|fim▁begin|>extern crate glob; extern crate clap; extern crate elfkit; use std::fs::{File}; use elfkit::Elf; use std::path::Path; use std::collections::HashSet; use std::io::{self}; use std::io::BufReader; use std::io::BufRead; use glob::glob; struct Ldd { sysroot: String, ...
if b.len() < 1 { return String::from(a); }
<|file_name|>harbour-osmscout-server-es.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="es" sourcelanguage="en"> <context> <name>AboutPage</name> <message> <location filename="../qml/pages/AboutPage.qml" line="8"/> <source>The serv...
<message> <location filename="../qml/pages/SettingsPage.qml" line="159"/> <source>Number of events shown in the main page</source> <translation>Número de eventos mostrados en la página principal</translation>
<|file_name|>ex5.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # exercise 5: more variables and printing # # string formating<|fim▁hole|>weight = 180 # lbs eyes = 'Blue' teeth = 'White' hair = 'Brown' print "Let's talk about %s." % name print "He's %d inched tall." % height print "He's %d pounds heavy." ...
name = 'Zed A. Shaw' ages = 35 # not a lie height = 74 # inched
<|file_name|>projection_parameters.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright 2019 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....
*/ invViewProjectionMat: mat4 = mat4.create(); }
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from models.settingsmodel import SettingsModel from views.clipboardview import ClipBoardView from views.downloadview import DownloadView from views.settingsview i...
def closeEvent(self, event):
<|file_name|>cache.py<|end_file_name|><|fim▁begin|># coding:utf-8 # # The MIT License (MIT) # # Copyright (c) 2016-2021 yutiansut/QUANTAXIS # # 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 w...
"""Adds a job run result to the history table. :param dict job: The job dictionary :returns: True
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md> //! FFI bindings to ncrypt. #![no_std]<|fim▁hole|>use winapi::*; extern "system" { }<|fim▁end|>
#![experimental] extern crate winapi;
<|file_name|>triggerruns.go<|end_file_name|><|fim▁begin|>package datafactory // Copyright (c) Microsoft and contributors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the Licen...
<|file_name|>EllipseTest.java<|end_file_name|><|fim▁begin|>/* Copyright 2010 - 2013 by Brian Uri! This file is part of DDMSence. This library is free software; you can redistribute it and/or modify it under the terms of version 3.0 of the GNU Lesser General Public License as published by the ...
*/ private Ellipse getInstance(Element element, String message) { boolean expectFailure = !Util.isEmpty(message); Ellipse component = null;
<|file_name|>sasreader.py<|end_file_name|><|fim▁begin|>""" Read SAS sas7bdat or xport files. """ from pandas import compat from pandas.io.common import _stringify_path<|fim▁hole|> def read_sas(filepath_or_buffer, format=None, index=None, encoding=None, chunksize=None, iterator=False): """ Read SAS ...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>mod win32_handmade; fn main() { win32_handmade::main(); }<|fim▁end|>
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>"""magulbot URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatt...
<|file_name|>a.rs<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2015 Benjamin Fry <benjaminfry@me.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 *<|fim▁hole|> * * Unless requir...
* http://www.apache.org/licenses/LICENSE-2.0
<|file_name|>query.py<|end_file_name|><|fim▁begin|>from .utils import DslBase, BoolMixin, _make_dsl_class from .function import SF, ScoreFunction __all__ = [ 'Q', 'Bool', 'Boosting', 'Common', 'ConstantScore', 'DisMax', 'Filtered', 'FunctionScore', 'Fuzzy', 'FuzzyLikeThis', 'FuzzyLikeThisField', 'GeoShape'...
('constant_score', {'query': {'type': 'query'}, 'filter': {'type': 'filter'}}), ('dis_max', {'queries': {'type': 'query', 'multi': True}}), ('filtered', {'query': {'type': 'query'}, 'filter': {'type': 'filter'}}),
<|file_name|>Cpu_usageImpl.java<|end_file_name|><|fim▁begin|>/** * <copyright> * </copyright> * * $Id$ */ package de.hub.clickwatch.specificmodels.brn.sys_info_systeminfo.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.E...
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated