prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>modify_vpc_attribute.go<|end_file_name|><|fim▁begin|>package vpc //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 requir...
// CreateModifyVpcAttributeResponse creates a response to parse from ModifyVpcAttribute response
<|file_name|>categories.js<|end_file_name|><|fim▁begin|>import React from 'react'; import Link from 'gatsby-link'; import { BlogPostContent, BlogPostContainer, TagList } from '../utils/styles'; import { arrayReducer } from '../utils/helpers.js'; export default function TagsPage({ data<|fim▁hole|> const categoryLi...
}) { const { edges: posts } = data.allMarkdownRemark; const categoryArray = arrayReducer(posts, 'category');
<|file_name|>advisories.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python import json import os import re import datetime class Advisories(object): today = datetime.datetime.now().strftime("%Y-%m-%d") def __init__(self, initial_advisories_path=None, format="txt"): self.advisories = [] self....
l = l.replace(".tar.gz", "").strip() matches = re.match(l, r"([a-z-]+)(-[0-9.]+)") if matches is not None:
<|file_name|>queue_redis.go<|end_file_name|><|fim▁begin|>// Copyright 2019 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package queue import ( "errors" "strings" "code.gitea.io/gitea/modules/log" "github.com/go-re...
return nil, err } queue := &RedisQueue{
<|file_name|>take.js<|end_file_name|><|fim▁begin|>'use strict'; // // Data-forge enumerator for iterating a standard JavaScript array. // var TakeIterator = function (iterator, takeAmount) { var self = this; self._iterator = iterator; self._takeAmount = takeAmount; }; module.exports = TakeIterator;<|fim▁hole|> va...
TakeIterator.prototype.moveNext = function () {
<|file_name|>password.module.js<|end_file_name|><|fim▁begin|>(function () { 'use strict'; angular .module('password', [<|fim▁hole|> /*@@DIST-TEMPLATE-CACHE*/ 'ngRoute', 'password.analytics', 'password.title', 'password.nav', 'password.welcome', ...
'ngMaterial',
<|file_name|>macros.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/licenses...
);
<|file_name|>interface.go<|end_file_name|><|fim▁begin|>package parser import ( "io" "time" "github.com/lestrrat/go-lex" "github.com/lestrrat/go-xslate/internal/frame" "github.com/lestrrat/go-xslate/node" ) const ( ItemError lex.ItemType = lex.ItemDefaultMax + 1 + iota ItemEOF ItemRawString ItemComment Item...
// respective location in the framestack LvarNames map[string]int }
<|file_name|>ganalytics.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the Google Analytics cookie event formatters.""" import unittest from plaso.formatters import ganalytics from tests.formatters import test_lib class AnalyticsUtmaCookieFormatterTest(test_lib.EventFormatte...
# TODO: add test for GetSources.
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from ._stub import * from ._fluent import * from ._matchers import *
<|file_name|>image.py<|end_file_name|><|fim▁begin|>'''Fairly basic set of tools for real-time data augmentation on image data. Can easily be extended to include new transformations, new preprocessing methods, etc... ''' from __future__ import absolute_import from __future__ import print_function import numpy as np imp...
<|file_name|>ws_iris_RidgeClassifier_oracle_code_gen.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from sklearn2sql_heroku.tests.classification import generic as class_gen class_gen.test_model("RidgeClassifier" , "iris" , "oracle")<|fim▁end|>
<|file_name|>app.component.spec.ts<|end_file_name|><|fim▁begin|>import { LayoutModule } from '@angular/cdk/layout'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { MatButtonModule } from '@angular/material/bu...
<|file_name|>spps_conversion_resultats.py<|end_file_name|><|fim▁begin|>#---------------------------------------------------------------------- # I-SIMPA (http://i-simpa.ifsttar.fr). This file is part of I-SIMPA. # # I-SIMPA is a GUI for 3D numerical sound propagation modelling dedicated # to scientific acoustic sim...
# it under the terms of the GNU General Public License as published by
<|file_name|>Range.js<|end_file_name|><|fim▁begin|>/* @flow */ import { InputTypeComposer, type ObjectTypeComposerFieldConfigAsObjectDefinition, } from 'graphql-compose'; import { getTypeName, type CommonOpts, desc } from '../../../utils'; import { getAllAsFieldConfigMap } from '../../Commons/FieldNames'; export ...
const name = getTypeName('QueryRange', opts); const description = desc(
<|file_name|>0005_auto_20170808_1832.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-08 18:32 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [<|fim▁hole|> ('content', '0...
<|file_name|>background.js<|end_file_name|><|fim▁begin|>/** * No Coin - Stop coin miners in your browser ** * @author Rafael Keramidas <ker.af> * @license MIT * @source https://github.com/keraf/NoCoin */ // Config const defaultConfig = { toggle: true, whitelist: [{ domain: 'cnhv.co'...
<|file_name|>test_worker_comm.py<|end_file_name|><|fim▁begin|># This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope t...
<|file_name|>method.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses...
<|file_name|>asteroids.py<|end_file_name|><|fim▁begin|># program template for Spaceship import simplegui import math import random # globals for user interface WIDTH = 800 HEIGHT = 600 score = 0 lives = 3 time = 0 game_mode = 0 # 0 = splash screen, 1 = game mode, 2 = game over ANGULAR_ACCEL_SCALAR = math.pi / 800.0 A...
for respawnY in range( int(HEIGHT / 10), int(HEIGHT * .9), 10): closestRock = WIDTH * HEIGHT potentialLocation = [respawnX, respawnY]
<|file_name|>htlc.py<|end_file_name|><|fim▁begin|>import click from bitshares.amount import Amount from .decorators import online, unlock from .main import main, config from .ui import print_tx @main.group() def htlc(): pass @htlc.command() @click.argument("to") @click.argument("amount") @click.argument("symbol...
if length != 0 and length != len(secret):
<|file_name|>direct_kinematics.py<|end_file_name|><|fim▁begin|>from math import * from Vertex import * #Length of the three subparts of the robot leg L1 = 51.0 L2 = 63.7 L3 = 93.0 Alpha = 20.69 #Mecanic constraint on Theta 2 Beta = 5.06 #Mecanic constraint on Theta 3 # Check if the given float match with radian (be...
<|file_name|>mqtt.go<|end_file_name|><|fim▁begin|>// Package mqtt provides an mqtt broker package mqtt /* MQTT is a go-micro Broker for the MQTT protocol. This can be integrated with any broker that supports MQTT, including Mosquito and AWS IoT. Note: Because of the way the MQTT library works, when you unsubscri...
case "ssl": port = 8883 case "ws":
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>""" Django settings for blog project. Generated by 'django-admin startproject' using Django 1.9. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangop...
'DIRS': [os.path.join(BASE_DIR, 'templates')],
<|file_name|>hash.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/L...
} } }
<|file_name|>FWebFormPdfServlet.java<|end_file_name|><|fim▁begin|>package org.mo.game.editor.face.apl.logic.form; import com.lowagie.text.Document; import com.lowagie.text.DocumentException; import com.lowagie.text.Element; import com.lowagie.text.Font; import com.lowagie.text.HeaderFooter; import com.lowagie.text.Pag...
datatable.addCell(new Phrase(formNode.children().get(i).innerGet("label"), fontChinese)); } datatable.setHeaderRows(1); // 结束表格的头部
<|file_name|>info_model.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- <|fim▁hole|>Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@gmail.com ***************************************************************************/ /*************...
""" /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS
<|file_name|>apm_process_paraview_data.py<|end_file_name|><|fim▁begin|>r""" Description: Generates 2-D data maps from OpenFoam data saved by paraview as a CSV file. The data has to be saved as point data and the following fields are expected p, points:0->2, u:0->2. An aperture map is the second main input and is used t...
logger = _get_logger('apmapflow.scripts') # setting a few convenience globals avg_fact = None
<|file_name|>treemap.src.js<|end_file_name|><|fim▁begin|>/** * @license Highcharts JS v7.1.1 (2019-04-09) * * (c) 2014-2019 Highsoft AS * Authors: Jon Arild Nygard / Oystein Moseng * * License: www.highcharts.com/license */ 'use strict'; (function (factory) { if (typeof module === 'object' && module.exports)...
/** * Decides which level takes effect from the options set in the levels
<|file_name|>bigint.go<|end_file_name|><|fim▁begin|>package main import ( "math/big"<|fim▁hole|>) func main() { i := big.NewInt(2) j := big.NewInt(2) k := big.NewInt(8) m := i.Exp(i, j, k) fmt.Printf("%+v,%+v,%+v,%+v\n", i, j, k, m) // println(i, j, k, m) fmt.Printf("%v\n", i.Add(i, j)) }<|fim▁end|>
"fmt"
<|file_name|>nsiqcppstyle_rulemanager.py<|end_file_name|><|fim▁begin|># Copyright (c) 2009 NHN 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...
self.preprocessRules = []
<|file_name|>list_store.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2016, The Gtk-rs 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 ffi; use glib::translate::*; use ...
let n_columns = ffi::gtk_tree_model_get_n_columns(self.to_glib_none().0) as u32; assert!(columns.len() <= n_columns as usize); for (&column, value) in columns.iter().zip(values.iter()) { assert!(column < n_columns);
<|file_name|>main.py<|end_file_name|><|fim▁begin|># HRGRN WebServices # Copyright (C) 2016 Xinbin Dai, Irina Belyaeva # This file is part of HRGRN WebServices API. # # HRGRN API 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...
error_msg = "ValueError Exception:" + e.message
<|file_name|>test_memoize_1.py<|end_file_name|><|fim▁begin|>import argparse import parsl from parsl.app.app import python_app from parsl.tests.configs.local_threads import config @python_app(cache=True) def random_uuid(x, cache=True): import uuid return str(uuid.uuid4()) def test_python_memoization(n=2): ...
assert foo.result() == x.result(), "Memoized results were not used"
<|file_name|>test_output.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import pytest # pylint: disable=attribute-defined-outside-init class TestOutput(object): @pytest.fixture(autouse=True) def init(self, ssh_audit): self.Output = ssh_audit.Out...
out.info('info color')
<|file_name|>312_test_fractions.py<|end_file_name|><|fim▁begin|>"""Tests for Lib/fractions.py.""" from decimal import Decimal from test.support import run_unittest import math import numbers import operator import fractions import unittest from copy import copy, deepcopy from pickle import dumps, loads F = fractions.F...
F, "3/7.2")
<|file_name|>main.go<|end_file_name|><|fim▁begin|>/* Copyright 2020 The Knative 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 requir...
ctx = adapter.WithController(ctx, mtping.NewController) ctx = adapter.WithHAEnabled(ctx) adapter.MainWithContext(ctx, component, mtping.NewEnvConfig, mtping.NewAdapter) }
<|file_name|>Decorations (32x32).tsx<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="UTF-8"?> <tileset version="1.5" tiledversion="1.7.1" name="Decorations (32x32)" tilewidth="32" tileheight="32" tilecount="42" columns="7"> <image source="Decorations (32x32).png" width="224" height="192"/> <tile id="9"> ...
</tile> <tile id="18">
<|file_name|>FlankTest.py<|end_file_name|><|fim▁begin|>import unittest import numpy as np from collections import OrderedDict from gtrackcore.metadata import GenomeInfo from gtrackcore.track.core.GenomeRegion import GenomeRegion from gtrackcore.track.format.TrackFormat import TrackFormat from gtrackcore.track_operati...
d = OrderedDict()
<|file_name|>crf.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016-present, Facebook, 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....
) prev_tiled = step_model.net.Tile( prev_transpose,
<|file_name|>route.js<|end_file_name|><|fim▁begin|><|fim▁hole|>import resetScroll from 'radio4000/mixins/reset-scroll' export default Route.extend(resetScroll, {})<|fim▁end|>
import Route from '@ember/routing/route'
<|file_name|>ClientAutoDetectionDiscoveryTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2008-2020, Hazelcast, 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 Li...
}
<|file_name|>ag-grid-demo.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit,ViewChild } from '@angular/core'; import { AppService } from '../../app.service'; import {SimpleDataHttpPageComponent} from '../../shared/simple-data-table/simple-data-http-page.component'; @Component({<|fim▁hole|> rowDa...
selector: 'c-ag-grid-demo', templateUrl: './ag-grid-demo.component.html' }) export class AgGridDemoComponent {
<|file_name|>RDKitSVPanel.cc<|end_file_name|><|fim▁begin|>// // file RDKitSVPanel.cc // David Cosgrove // AstraZeneca // 20th June 2014 // #include "RDKitSVPanel.H" #include "MolDisplay2DWidget.H"<|fim▁hole|>#include <QLayout> #include <QSlider> using namespace std; namespace RDKitSV { // **************************...
#include <QLabel>
<|file_name|>grpc_asyncio.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
<|file_name|>_ResourceManager.js<|end_file_name|><|fim▁begin|>/////////////////////////////////////////////////////////////////////////// // Copyright © 2015 Esri. 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 //
<|file_name|>bindings-app.js<|end_file_name|><|fim▁begin|>br.test.GwtTestRunner.initialize(); describe("Dashboard App", function() { fixtures("brjs.dashboard.app.testing.DashboardFixtureFactory"); it("displays the screens that are visible", function() { given("dash.loaded = true"); and("dash.model.appsScreen....
and("dash.model.releaseNoteScreen.visible = true"); then("dash.view.(#appsScreen).isVisible = true");
<|file_name|>pause.go<|end_file_name|><|fim▁begin|>// +build linux package main import "github.com/urfave/cli" var pauseCommand = cli.Command{ Name: "pause", Usage: "pause suspends all processes inside the container", ArgsUsage: `<container-id> Where "<container-id>" is the name for the instance of the containe...
} return nil
<|file_name|>background_ee_qcd_170-250.py<|end_file_name|><|fim▁begin|>import ArtusConfigBase as base def config(): conf = base.BaseConfig('mc', '2012', analysis='ee') conf["InputFiles"] = base.setInputFiles(<|fim▁hole|> ekppath="", nafpath="/pnfs/desy.de/cms/tier2/store/user/dhaitz/2014_08_08_...
<|file_name|>ExponentialDemo.java<|end_file_name|><|fim▁begin|>package ru.sigma.test.learning.data; /**<|fim▁hole|> * To change this template use File | Settings | File Templates. */ public class ExponentialDemo { public static void main(String[] args) { double x = 11.635; double y = 2.76; ...
* Created with IntelliJ IDEA. * User: emaltsev * Date: 22.11.13 * Time: 10:37
<|file_name|>editorParamsViewWidget.js<|end_file_name|><|fim▁begin|>/*global define*/ /*jslint white:true,browser:true*/ define([ 'bluebird', // CDN 'kb_common/html', // LOCAL 'common/ui', 'common/runtime', 'common/events', 'common/props', // Wrapper for inputs './inputWrapperWi...
ParamResolver ) { 'use strict';
<|file_name|>instrument.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from devito.passes.iet.engine import iet_pass from devito.passes.iet.orchestration import BusyWait from devito.types import Timer __all__ = ['instrument'] def instrument(graph, **kwargs): track_subsections(graph, **kwargs) # Construct a fre...
from devito.ir.iet import MapNodes, Section, TimedList, Transformer from devito.mpi.routines import (HaloUpdateCall, HaloWaitCall, MPICall, MPIList, HaloUpdateList, HaloWaitList, RemainderCall)
<|file_name|>os_flavor_facts.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Copyright (c) 2015 IBM # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_ver...
)
<|file_name|>reporter.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 cssparser::SourceLocation; use ipc_channel::ipc::IpcSend...
impl ParseErrorReporter for CSSErrorReporter { fn report_error(&self, url: &ServoUrl,
<|file_name|>filter-stack.ts<|end_file_name|><|fim▁begin|>/* * Copyright 2019 gRPC 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/LICEN...
let result: Metadata = metadata; for (let i = this.filters.length - 1; i >= 0; i--) {
<|file_name|>ConsumerIdsChangeListener.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2010-2013 Alibaba Group Holding Limited * * 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 ...
public void consumerIdsChanged(final String group, final List<Channel> channels); }
<|file_name|>mainSocket.js<|end_file_name|><|fim▁begin|>$(function() { var FADE_TIME = 150; // ms var TYPING_TIMER_LENGTH = 400; // ms var COLORS = [ '#e21400', '#91580f', '#f8a700', '#f78b00', '#58dc00', '#287b00', '#a8f07a', '#4ae8c4', '#3b88eb', '#3824aa', '#a700ff', '#d300e7' ]; // Initialize...
// options.prepend - If the element should prepend // all other messages (default = false)
<|file_name|>xml_parser.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import xml.sax import glob from xml.etree import ElementTree import os debug = 0 currentPath = os.path.dirname(os.path.abspath(__file__)) def printl(string): if debug: print "[xml_parser:Debug] "+ str(string) def main (): p = ...
<|file_name|>float.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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/lice...
match exp_format {
<|file_name|>VPFHeaderFormatException.java<|end_file_name|><|fim▁begin|><|fim▁hole|>/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2003-2008, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it unde...
<|file_name|>views.py<|end_file_name|><|fim▁begin|># coding:utf-8 # Create your views here. from django.shortcuts import render from django.http import HttpResponse from arrow_time import today_date_for_influxd_sql from arrow_time import ten_day_ago_for_influxd_sql from influxdb_function import influxDB_interface from ...
def guide(request):
<|file_name|>test-socks5-muc.py<|end_file_name|><|fim▁begin|>"""Check if SOCKS5 relays are disabled in muc""" import os if os.name != 'posix': # skipped on non-Unix for now, because it uses a Unix socket raise SystemExit(77) import dbus from servicetest import call_async, EventPattern, EventProtocolClientFa...
stream.send(presence) def new_chan_predicate(e): path, props = e.args[0][0]
<|file_name|>hooks.go<|end_file_name|><|fim▁begin|>// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package git import ( "errors" "io/ioutil" "os" "path" "strings" "github.com/Unknwon/com" ) // hook...
<|file_name|>package-info.java<|end_file_name|><|fim▁begin|>/** * Java Beans.<|fim▁hole|> * @author Archimedes Trajano */ package net.trajano.ms.vertx.beans;<|fim▁end|>
*
<|file_name|>base_error.py<|end_file_name|><|fim▁begin|># Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class BaseError(Exception): """Base error for all test runner errors.""" def __init__(self, mes...
super(BaseError, self).__init__(message)
<|file_name|>macros.rs<|end_file_name|><|fim▁begin|>/// Add line of assembly to output, with indentation and newline, using /// format! syntax. macro_rules! push_asm { ($state:expr, $fmt:expr) => { (writeln!(&mut $state.output, concat!("{}", $fmt), " ".repeat($state.level * 4))).unwrap() ...
(writeln!(&mut $state.output, concat!("{}", $fmt),
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(rustc_private, plugin_registrar)] #![warn(missing_docs)] //! rebind_plugins //! ============== //! //! A compiler plugin which complements the `rebind` crate by providing the //! `#[derive(Action)]` //! annotation. //! //! Example //! ------- //! //! ``` //! ...
use derive_action::expand_derive_action_annotation; #[plugin_registrar] #[doc(hidden)]
<|file_name|>ipc_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- '''<|fim▁hole|>''' # Import python libs from __future__ import absolute_import import os import logging import tornado.gen import tornado.ioloop import tornado.testing import salt.utils import salt.config import salt.exceptions import salt...
:codeauthor: :email:`Mike Place <mp@saltstack.com>`
<|file_name|>05_trunBasedRpg.py<|end_file_name|><|fim▁begin|>#trun based rpg import random import time class role: name="" lv=1 exp=0 nextLv=1000 hp=100 mp=30 stra=5 inte=5 spd=5 defe=5 rest=5 void=5 dropItems=[None] dropPrecent=[100] command=['attack','void',...
if emeny.hp<=0: player.addExp(int((emeny.lv+emeny.inte+emeny.stra)*500*random.random())) break
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|>export const CREATE_MESSAGE_SUCCESS = 'CREATE_MESSAGE_SUCCESS'; export const CREATE_MESSAGE_ERROR = 'CREATE_MESSAGE_ERROR'; export const UPDATE_MESSAGE_REQUEST = 'UPDATE_MESSAGE_REQUEST'; export const UPDATE_MESSAGE_SUCCESS = 'UPDATE_MESSAGE_SUCCESS';...
export const FETCH_MESSAGES_REQUEST = 'FETCH_MESSAGES_REQUEST'; export const FETCH_MESSAGES_SUCCESS = 'FETCH_MESSAGES_SUCCESS'; export const FETCH_MESSAGES_ERROR = 'FETCH_MESSAGES_ERROR'; export const CREATE_MESSAGE_REQUEST = 'CREATE_MESSAGE_REQUEST';
<|file_name|>HasCases.relay.js<|end_file_name|><|fim▁begin|>import React from 'react'; import { graphql } from 'react-relay'; import { makeFilter } from '@ncigdc/utils/filters'; import { compose, withPropsOnChange } from 'recompose'; import { BaseQuery } from '@ncigdc/modern_components/Query'; export default (Componen...
withPropsOnChange(['projectId', 'mutated'], ({ projectId, mutated }) => { return {
<|file_name|>xcode_emulation.py<|end_file_name|><|fim▁begin|># 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. """ This module contains classes that help to emulate xcodebuild behavior on top of other build system...
* |info_plist| is the source plist path, relative to the build directory, * |dest_plist| is the destination plist path, relative to the
<|file_name|>c4fb5a76b195_add_switchport_mapping.py<|end_file_name|><|fim▁begin|># Copyright 2016 Nokia. # # 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...
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations
<|file_name|>glyph_item_iter.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 glib::translate::*; use pango_sys; use GlyphItem; glib_wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord...
self.to_glib_none_mut().0, )) } }
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>enum FetcherError { // TODO: Add more Errors<|fim▁hole|><|fim▁end|>
IOError(String), }
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.core.files.storage import FileSystemStorage import os from datetime import datetime from django.db import models from django.contrib.contenttypes.models import ContentType from django.utils.timezone import utc from autofixture.comp...
<|file_name|>news-story.ts<|end_file_name|><|fim▁begin|>export /** * NewsStory */ class NewsStory { nsid:number; <|fim▁hole|> title:string; description:string; story:string; image:string; thumb:string; constructor(nsid:number,category:string,title:string,description:string,st...
category:string;
<|file_name|>keyproperty_models.py<|end_file_name|><|fim▁begin|># Copyright 2014 Google 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 # # http://www.apache.or...
# PhoneNumber model. With ndb, there is no ReferenceProperty any more, # so here we use KeyProperty first. However this pattern has a # consistency issue, shown in the test_fails function in # test/test_keyproperty_models.py.
<|file_name|>jquery.fancybox.pack.min.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:2d79d4ce9f72e0b9db16aee949410ecd30bfcfb5205af39053f05ac39083e151<|fim▁hole|><|fim▁end|>
size 22425
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # makeenv documentation build configuration file, created by # sphinx-quickstart on Tue Nov 27 21:24:26 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values...
# If extensions (or modules to document with autodoc) are in another directory,
<|file_name|>test_producer.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import collections import logging import time from mock import MagicMock, patch from . import unittest from kafka import KafkaClient, SimpleProducer from kafka.common import ( AsyncProducerQueueFull, FailedPayloadsError, NotLeader...
# Mock offsets counter for closure offsets = collections.defaultdict(lambda: collections.defaultdict(lambda: 0)) self.client.is_first_time = True
<|file_name|>setup_py2exe.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (C) 2006-2010, University of Maryland # # 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 re...
if len(sys.argv) == 1: sys.argv.append('py2exe')
<|file_name|>symlink-posix.cpp<|end_file_name|><|fim▁begin|>/* $Id: symlink-posix.cpp $ */ /** @file * IPRT - Symbolic Links, POSIX. */ /* * Copyright (C) 2010-2015 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free s...
if (RT_SUCCESS(rc)) { struct stat s; if (!lstat(pszNativeSymlink, &s))
<|file_name|>edit.js<|end_file_name|><|fim▁begin|>/************************************************************************ * This file is part of EspoCRM. * * EspoCRM - Open Source CRM application. * Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko * Website: http://www.espocrm.com * * Esp...
return Dep.extend({ afterRender: function () {
<|file_name|>test_xpi_import.py<|end_file_name|><|fim▁begin|># Copyright 2009-2010 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Functional tests for XPI file format""" __metaclass__ = type import re import unittest from zope.component im...
(u'foozilla.clashing.key', u'unix/extra.dtd',
<|file_name|>test_auth.py<|end_file_name|><|fim▁begin|># project/tests/test_auth.py import time import json import unittest from project.server import db from project.server.models import User, BlacklistToken from project.tests.base import BaseTestCase def register_user(self, email, password): return self.clie...
data = json.loads(response.data.decode()) self.assertTrue(data['status'] == 'success')
<|file_name|>generic-unique.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/...
<|file_name|>scripting.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 import os, shutil, glob from functools import wraps def print_warning(message, *args, **kwargs): from . import colortext if args or kwargs: message = message.format(*args, **kwargs) colortext.write(message + '\n', color='red') ...
def use_path_completion(): import readline readline.set_completer_delims(' \t\n;')
<|file_name|>karma.conf.js<|end_file_name|><|fim▁begin|>// Karma configuration file, see link for more information<|fim▁hole|>module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmin...
// https://karma-runner.github.io/1.0/config/configuration-file.html
<|file_name|>map.js<|end_file_name|><|fim▁begin|>function(doc) { if(doc.tags.length > 0) { for(var idx in doc.tags) { emit(doc.tags[idx], null); }<|fim▁hole|> } }<|fim▁end|>
<|file_name|>cities.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python <|fim▁hole|> result_count = None cities = None<|fim▁end|>
from iris_sdk.models.maps.base_map import BaseMap class CitiesMap(BaseMap):
<|file_name|>scanwidget.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # This file is part of the xc2424scan package # Copyright (C) 2005 Mathieu Bouchard <mbouchar@bioinfo.ulaval.ca> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General P...
format = str(format).lower()
<|file_name|>unboxed-closures-by-ref.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.ap...
f()
<|file_name|>teste.py<|end_file_name|><|fim▁begin|>from appkit.api.v0_2_8 import App<|fim▁hole|> app = App(__name__) @app.route("/") def home(): return '<a href="#" target="_blank">Clique</a>' app.run()<|fim▁end|>
<|file_name|>ps_dispatcher.py<|end_file_name|><|fim▁begin|># Copyright (c) 2018 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 the License at # # http://www...
""" def __init__(self, pserver_endpoints):
<|file_name|>test_crypto.py<|end_file_name|><|fim▁begin|>__author__ = 'hkar' import Vault.Crypto import Vault.Key from test_helpers import * import os def test_aes(tmpdir): # make tmp text files f = create_test_file(tmpdir) text = str(f.read()) # define file names file_in = str(f) file_out ...
<|file_name|>AbstractJavaBlock.java<|end_file_name|><|fim▁begin|>/* * Copyright 2000-2014 JetBrains s.r.o. * * 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/lic...
<|file_name|>backend.py<|end_file_name|><|fim▁begin|># # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apach...
# under the License. #
<|file_name|>test_get_data.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from unittest import TestCase from plotly.graph_objs import (Data, Figure, Layout, Line, Margin, Marker, Scatter, XAxis, YAxis) class TestGetData(TestCase): fig = None def setUp...
super(TestGetData, self).setUp() self.fig = Figure( data=Data([
<|file_name|>generate_logo.py<|end_file_name|><|fim▁begin|>import matplotlib import matplotlib.pyplot as plt import numpy as np from matplotlib.patches import PathPatch from matplotlib.path import Path from matplotlib.transforms import Bbox from scipy import stats x = np.linspace(0, 1, 200) pdfx = stats.beta(2, 5).pdf...