prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>handlers_query_params.go<|end_file_name|><|fim▁begin|>package handlers import ( "net/http" "strconv" <|fim▁hole|> log "github.com/sirupsen/logrus" "github.com/codedellemc/rexray/libstorage/api/types" ) // queryParamsHandler is an HTTP filter for injecting the store with query // parameters type query...
<|file_name|>bigdigits.py<|end_file_name|><|fim▁begin|>def bigdigits(line_splitted): line_splitted = list(line_splitted) string_row_one = '-**----*--***--***---*---****--**--****--**---**--' list_row_one = list(string_row_one) string_row_two = '*--*--**-----*----*-*--*-*----*-------*-*--*-*--*-' list_row_two =...
test_cases = open('test_cases','r')
<|file_name|>api_op_DescribeVolumeStatus.go<|end_file_name|><|fim▁begin|>// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package ec2 import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type DescribeVolumeStatusInput struct { _ struct{} `ty...
// the specified volumes: //
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub use self::types::{Expression, Clause, Term, Solution, SolutionValue, Var};<|fim▁hole|>mod brancher; mod implication_graph; //mod watchlist; pub mod solver; #[cfg(test)] mod benchmarks;<|fim▁end|>
pub use self::solver::{solve}; pub mod types;
<|file_name|>tf_pow.py<|end_file_name|><|fim▁begin|>import tensorflow as tf<|fim▁hole|> x = tf.constant([[2, 3, 5], [2, 3, 5]], tf.float64) y = tf.constant([[2, 3, 4]], tf.float64) z = tf.pow(x, y) sess = tf.Session() print(sess.run(z)) sess.close() """[[ 4. 27. 625.] [ 4. 27. 625.]]"""<|fim▁end|>
"""tf.pow(x,y,name=None) 功能:计算x各元素的y次方。 输入:x,y为张量,可以为`float32`, `float64`, `int32`, `int64`,`complex64`,`complex128`类型。"""
<|file_name|>cpattern.py<|end_file_name|><|fim▁begin|># https://graphics.stanford.edu/~seander/bithacks.html#NextBitPermutation def selector(values, setBits): maxBits = len(values) def select(v): out = [] for i in range(maxBits): if (v & (1 << i)): out.append(values...
<|file_name|>bi-rrt-planner.cc<|end_file_name|><|fim▁begin|>// // Copyright (c) 2014 CNRS // Authors: Florent Lamiraux // // This file is part of hpp-core // hpp-core is free software: you can redistribute it // and/or modify it under the terms of the GNU Lesser General Public // License as published by the Free Softwa...
// we won, a path is found roadmap()->addEdge(reachedNodeFromStart, near, validPath); return;
<|file_name|>sqlserver.js<|end_file_name|><|fim▁begin|>ace.define("ace/snippets/sqlserver", ["require", "exports", "module"], function(require, exports, module) { "use strict"; exports.snippetText = "# ISNULL\n\ snippet isnull\n\ ISNULL(${1:check_expression}, ${2:replacement_value})\n\ # FORMAT\n\ snippet format\...
<|file_name|>testing.py<|end_file_name|><|fim▁begin|>import optparse import os import shutil import sys import unittest from itertools import izip from . import util from . import stats #============================================================================= # common utility functions for testing def clean_di...
def eq_sample_pdf(samples, pdf,
<|file_name|>AltNode.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Publ...
indent(writer, depth); writer.println("}"); } super.genJavaClassSpecifics(writer, depth);
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 import os import sys from shutil import copy2 PLATFORM = sys.platform if PLATFORM == 'linux' or PLATFORM == 'linux2': <|fim▁hole|> print("This program need \'Superuser Privileges\'") exit() NAME = 'MissionText' ...
user = os.getenv("SUDO_USER") if user is None:
<|file_name|>script.py<|end_file_name|><|fim▁begin|><|fim▁hole|># Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import errno import os import sys import signal import time from subprocess import Popen, PIPE import atexit from IPython.core import magic_arguments fro...
"""Magic functions for running cells in various scripts."""
<|file_name|>StdpCtrlTemplate.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import print_function # Form implementation generated from reading ui file './acq4/analysis/old/StdpCtrlTemplate.ui' # # Created: Tue Dec 24 01:49:15 2013 # by: PyQt4 UI code generator 4.10 # # WARNING! All chang...
self.apthresholdSpin = QtGui.QDoubleSpinBox(StdpCtrlWidget) self.apthresholdSpin.setObjectName(_fromUtf8("apthresholdSpin")) self.gridLayout.addWidget(self.apthresholdSpin, 4, 2, 1, 1)
<|file_name|>history.js<|end_file_name|><|fim▁begin|>var https = require( 'https' ), zlib = require( 'zlib' ), path = require( 'path' ), fs = require( 'fs' ); var count = 0; var resolved = 0; var outputs = []; var done; function check() { if (resolved === count) { normalize(); displa...
} );
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Base version of package/tasks.py, created by version 0.3.0 of package/root/dir> dk-tasklib install (it should reside in the root directory of your package) This file defines tasks for the Invoke tool: http://www.pyinvoke.org Basic us...
from dktasklib.publish import publish #: where tasks.py is located (root of package)
<|file_name|>AttributeRepository.java<|end_file_name|><|fim▁begin|>package de.roskenet.simplecms.repository; import org.springframework.data.repository.PagingAndSortingRepository; import de.roskenet.simplecms.entity.Attribute;<|fim▁hole|> public interface AttributeRepository extends PagingAndSortingRepository<Attribu...
<|file_name|>FileUploadPage.java<|end_file_name|><|fim▁begin|>package theinternet.pages; import com.frameworkium.core.ui.annotations.Visible; import com.frameworkium.core.ui.pages.BasePage; import com.frameworkium.core.ui.pages.PageFactory; import io.qameta.allure.Step; import org.openqa.selenium.WebElement; import or...
return PageFactory.newInstance(FileUploadSuccessPage.class);
<|file_name|>fake_tool_info.ts<|end_file_name|><|fim▁begin|>import { MountedToolInfo } from "../farm_designer/interfaces"; import { ToolPulloutDirection } from "farmbot/dist/resources/api_resources"; import { ToolTransformProps } from "../tools/interfaces"; export const fakeMountedToolInfo = (): MountedToolInfo => ({ ...
quadrant: 2, });
<|file_name|>GojulPair.java<|end_file_name|><|fim▁begin|>package org.gojul.gojulutils.data; /** * Class {@code GojulPair} is a simple stupid pair class. This class is notably necessary * when emulating JOIN in database and such a class does not exist natively in the JDK. * This object is immutable as long as the ob...
/** * Constructor. Both parameters are nullable. Note that this constructor * does not perform any defensive copy as it is not possible there.
<|file_name|>get.go<|end_file_name|><|fim▁begin|>package commands import ( "compress/gzip" "errors" "fmt" "io" "os" "path/filepath" "strings" core "github.com/ipfs/go-ipfs/core" cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" e "github.com/ipfs/go-ipfs/core/commands/e" tar "gx/ipfs/QmQine7gvHncNevKt...
// so as a hack we just use a callback to measure the output, then git rid of it bar.Callback = func(line string) {
<|file_name|>windows.rs<|end_file_name|><|fim▁begin|>//! A collection of window functions. //! //! All functions take a size `n` and return vectors with `n` elements. //! //! Window calculation can be costly depending on the size and type of window, //! so it is recommended to precompute windows whenever possible. use...
}
<|file_name|>index.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react'; import { Spin } from 'antd'; const Loading = () => ( <div style={{ paddingTop: 100, textAlign: 'center' }}> <Spin size="large" /><|fim▁hole|> export default Loading;<|fim▁end|>
</div> );
<|file_name|>RDom.cpp<|end_file_name|><|fim▁begin|>#include "RDom.h" #include "Util.h" #include "IROperator.h" #include "IRPrinter.h" namespace Halide { using namespace Internal; using std::string; using std::vector; RVar::operator Expr() const { if (!min().defined() || !extent().defined()) { user_error...
<|file_name|>fabrice_clavicle.py<|end_file_name|><|fim▁begin|>from kraken.core.maths import Vec3 from kraken.core.maths.xfo import Xfo from kraken.core.objects.components.base_example_component import BaseExampleComponent from kraken.core.objects.attributes.attribute_group import AttributeGroup from kraken.core.objec...
<|file_name|>AD1-Exerc2.py<|end_file_name|><|fim▁begin|>def verificaPalindrome(frase): removeWhiteSpaces = [] ### Array util para remover os espaços em brancos removeHypen = [] ### Array util para remover os hifen palindromo = str(frase).lower().strip() ### Remove os espaços em brancos no inicio e final e ...
<|file_name|>files.js<|end_file_name|><|fim▁begin|>/* * Copyright IBM Corp. 2017 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.<|fim▁hole|> * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
* You may obtain a copy of the License at
<|file_name|>simcontrol.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python ############################################################################### # This file is part of openWNS (open Wireless Network Simulator) # _____________________________________________________________________________ # # Copyright (C...
line += str().center(17) if not sgeJobId == 0: line += str(sgeJobId).rjust(7)
<|file_name|>postprocessing.py<|end_file_name|><|fim▁begin|>#Special rules for nouns, to avoid suggesting wrong lemmas. Nothing is done for other POS. import pymorphy2 blacklist1 = ['ъб', 'ъв', 'ъг', 'ъд', 'ъж', 'ъз', 'ък', 'ъл', 'ъм', 'ън', 'ъп', 'ър', 'ъс', 'ът', 'ъф', 'ъх', 'ъц', 'ъч', 'ъш', 'ъщ', 'йй', 'ьь', 'ъъ',...
<|file_name|>SummarizedAttackVector.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 loc...
@com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.shield.model.transform.SummarizedAttackVectorMarshaller.getInstance().marshall(this, protocolMarshaller);
<|file_name|>app.ts<|end_file_name|><|fim▁begin|>import {Component, View, bootstrap} from 'angular2/angular2'; import {RouteConfig, RouterOutlet, RouterLink, routerInjectables} from 'angular2/router'; import {Home} from './components/home/home'; import {About} from './components/about/about'; import {NamesList} from '...
}) class App {}
<|file_name|>plotter.py<|end_file_name|><|fim▁begin|>__version__ = "0.1" import threading import numpy as np import pygame from expyriment.stimuli import Canvas from expyriment.stimuli._visual import Visual lock_expyriment = threading.Lock() Numpy_array_type = type(np.array([])) def inherit_docs(cls): for name,...
self.unlock_pixel_array() return Canvas.unload(self, keep_surface) def rotate(self, degree):
<|file_name|>handlers.rs<|end_file_name|><|fim▁begin|>//! Handlers for the server. use std::collections::BTreeMap; use rustc_serialize::json::{Json, ToJson}; use iron::prelude::*; use iron::{status, headers, middleware}; use iron::modifiers::Header; use router::Router; use redis::ConnectionInfo; use urlencoded; use...
impl UpdateHandler {
<|file_name|>EventsView.js<|end_file_name|><|fim▁begin|>(function() { 'use strict'; angular.module('civic.events.genes', ['ui.router']); angular.module('civic.events.assertions', ['ui.router']); angular.module('civic.events.variants', ['ui.router']); angular.module('civic.events.variantGroups', ['ui.router'])...
$deepStateRedirect.reset(); } });
<|file_name|>PrimeSieve.py<|end_file_name|><|fim▁begin|>import math def isPrime(num): if num < 2: return False # 0, 1不是质数 # num为100时, 它是不可能有因子是大于50的. 比如说60 * ? = 100, 这是不可能的, 所以这里只要比较sqrt(), 平方根 boundary = int(math.sqrt(num)) + 1 for i in range(2, boundary): if num % i == 0: ...
# num为100时, 它是不可能有因子是大于50的. 比如说60 * ? = 100, 这是不可能的, 所以这里只要比较sqrt(), 平方根 boundary = int(math.sqrt(size)) + 1
<|file_name|>index_graph_tools.hpp<|end_file_name|><|fim▁begin|>#pragma once #include "routing/edge_estimator.hpp" #include "routing/index_graph.hpp" #include "routing/index_graph_starter.hpp" #include "routing/road_point.hpp" #include "routing/segment.hpp" #include "routing/base/astar_algorithm.hpp" #include "traff...
#include "geometry/point2d.hpp"
<|file_name|>ConfigurableController.java<|end_file_name|><|fim▁begin|>package org.openbase.jul.pattern.controller; /* * #%L * JUL Pattern Controller<|fim▁hole|> * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published ...
* %% * Copyright (C) 2015 - 2021 openbase.org
<|file_name|>check_const.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.or...
// as that will end up pointing to the stack instead. if !self.qualif.intersects(ConstQualif::NON_STATIC_BORROWS) { self.qualif = self.qualif - ConstQualif::PREFER_IN_PLACE; self.add_qualif(ConstQualif::HAS_STATIC_BORROWS);
<|file_name|>dmd.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 - 2016 townhallpinball.org # # 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 restriction, including without limit...
<|file_name|>rule_engine.rs<|end_file_name|><|fim▁begin|>/* Precached - A Linux process monitor and pre-caching daemon Copyright (C) 2017-2020 the precached developers This file is part of precached. Precached is free software: you can redistribute it and/or modify it under the terms of the GNU Ge...
fn unregister(&mut self) { info!("Unregistered Plugin: 'Rule Engine'"); }
<|file_name|>nadeo.js<|end_file_name|><|fim▁begin|>var gbxremote = require('gbxremote'), async = require('async'); module.exports = require('./core').extend({ init: function() { this._super(); this.options.port = 2350; this.options.port_query = 5000; this.gbxclient = false; }, reset: function() { this._s...
<|file_name|>0020_auto_20190512_1744.py<|end_file_name|><|fim▁begin|># Generated by Django 2.0.10 on 2019-05-12 17:44 from django.db import migrations, models import django.db.models.deletion<|fim▁hole|> class Migration(migrations.Migration): dependencies = [ ('userprofile', '0020_auto_20190507_0150'), ...
<|file_name|>interfaces.py<|end_file_name|><|fim▁begin|>########################################################################## # Author: Jane Curry, jane.curry@skills-1st.co.uk # Date: April 19th, 2011 # Revised: # # interfaces.py for Predictive Threshold ZenPack # # This program can ...
# season = schema.Text(title=_t(u'Season'))
<|file_name|>configs-tab_spaces-2.rs<|end_file_name|><|fim▁begin|>// rustfmt-tab_spaces: 2 // rustfmt-max_width: 30 // rustfmt-array_layout: Block // Tab spaces <|fim▁hole|>"amet", "consectetur", "adipiscing", "elit." ]; }<|fim▁end|>
fn lorem() { let ipsum = dolor(); let sit = vec![
<|file_name|>membranePanel.js<|end_file_name|><|fim▁begin|>describe("Membrane Panel Operations with flat files:", function() { "use strict"; var window; beforeEach(async function() { await getDocumentLoadPromise("base/gui/index.html"); window = testFrame.contentWindow; window.LoadPanel.testMode = {fa...
expect(window.MembranePanel.primordialsCheckbox.disabled).toBe(true); expect(window.CodeMirrorManager.getEditorEnabled(editor)).toBe(false);
<|file_name|>CustomizeContainer.js<|end_file_name|><|fim▁begin|>import React from 'react'; import { Wrapper } from '../components';<|fim▁hole|> const Container = () => <Wrapper>Journal Container</Wrapper>; export default Container;<|fim▁end|>
<|file_name|>mails.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """OSF mailing utilities. Email templates go in website/templates/emails Templates must end in ``.txt.mako`` for plaintext emails or``.html.mako`` for html emails. You can then create a `Mail` object given the basename of the template and the ...
:param str mimetype: Either 'plain' or 'html' :param function callback: celery task to execute after send_mail completes :param **context: Context vars for the message template
<|file_name|>dense_v1.py<|end_file_name|><|fim▁begin|>""" locally connected implimentation on the lip movement data. Akm Ashiquzzaman 13101002@uap-bd.edu Fall 2016 after 1 epoch , val_acc: 0.0926 """ from __future__ import print_function, division #random seed fixing for reproducibility import numpy as np np.random...
#3rd lc layers seq.add(Dense(1024))
<|file_name|>common.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Django settings for LittleSportsBiscuit project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/s...
# See: https://docs.djangoproject.com/en/dev/ref/settings/#managers MANAGERS = ADMINS
<|file_name|>ModelPipeInventory.java<|end_file_name|><|fim▁begin|>package net.ros.client.render; import com.google.common.collect.ImmutableList; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.r...
{ return pipeModel.getParticleTexture();
<|file_name|>resource_security_association.go<|end_file_name|><|fim▁begin|>package opc import ( "fmt" "github.com/hashicorp/go-oracle-terraform/compute" "github.com/r3labs/terraform/helper/schema" ) func resourceOPCSecurityAssociation() *schema.Resource { return &schema.Resource{ Create: resourceOPCSecurityAss...
Computed: true, ForceNew: true, },
<|file_name|>auction_demo_tests.py<|end_file_name|><|fim▁begin|>from itertools import product from demos.auction_model import demo def test02(): sellers = [4] buyers = [100] results = demo(sellers, buyers, time_limit=False) expected_results = {100: 4, 4: 100} for k, v in results.items(): ...
<|file_name|>Method.java<|end_file_name|><|fim▁begin|>/** */ package com.tocea.codewatch.architecture; /** * <!-- begin-user-doc --><|fim▁hole|> * A representation of the model object '<em><b>Method</b></em>'. * <!-- end-user-doc --> * * * @see com.tocea.codewatch.architecture.ArchitecturePackage#getMethod() *...
<|file_name|>_openedge_builtins.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ pygments.lexers._openedge_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Builtin list for the OpenEdgeLexer. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for de...
'PRIMARY', 'PRINTER',
<|file_name|>RuleIterationOverDefaultListVariableTest.java<|end_file_name|><|fim▁begin|>package org.jboss.windup.config.iteration; import java.nio.file.Path; import javax.inject.Inject; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.junit.Arquillian; import org.jboss.forge.arq...
RuleSubset.create(configuration).perform(event, evaluationContext);
<|file_name|>user.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- class User(object): def __init__(self, id, email, passwd, session, session_expire_time, ctime, rtime): self.id = str(id) self.email = email self.passwd = passwd self.session = session ...
pass
<|file_name|>fn-in-pat.rs<|end_file_name|><|fim▁begin|>struct A {} impl A { fn new() {} } fn hof<F>(_: F) where F: FnMut(()) {} fn ice() { hof(|c| match c {<|fim▁hole|> _ => () }) } fn main() {}<|fim▁end|>
A::new() => (), //~ ERROR expected tuple struct or tuple variant, found associated function
<|file_name|>site_data_reader.cc<|end_file_name|><|fim▁begin|>// Copyright 2019 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. #include "components/performance_manager/persistence/site_data/site_data_reader.h" #include...
// Register a closure that is bound using a weak pointer to this instance. // In that way it won't be invoked by the underlying |impl_| after this // reader is destroyed. base::OnceClosure closure(base::BindOnce(&SiteDataReader::RunClosure,
<|file_name|>DistributedTagGame.py<|end_file_name|><|fim▁begin|>from pandac.PandaModules import * from toontown.toonbase.ToonBaseGlobal import * from DistributedMinigame import * from direct.interval.IntervalGlobal import * from direct.fsm import ClassicFSM, State from direct.fsm import State from toontown.safezone imp...
def enterPlay(self):
<|file_name|>test_edalizer.py<|end_file_name|><|fim▁begin|># Copyright FuseSoC contributors # Licensed under the 2-Clause BSD License, see LICENSE for details. # SPDX-License-Identifier: BSD-2-Clause def test_generators(): import os import tempfile from fusesoc.config import Config from fusesoc.corem...
from fusesoc.edalizer import Edalizer from fusesoc.librarymanager import Library from fusesoc.vlnv import Vlnv
<|file_name|>dispatcher.rs<|end_file_name|><|fim▁begin|>use color_printer::ColorPrinter; use command::{Command, WorkResult, WorkType}; use std::{collections::BTreeMap, sync::mpsc::Receiver}; use threadpool::ThreadPool; const THREAD_SIGNAL: &str = "Could not signal main thread with WorkType::Work"; pub struct Dispatch...
self.next_index += 1; while let Some(result) = self.queue.remove(&self.next_index) {
<|file_name|>figure_ml_vs_vf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import click import matplotlib import matplotlib.pyplot as plt from matplotlib import rc import numpy as np import pandas as pd prop1range = [0.0, 1.0] # VF prop2range = [0.0, 800.0] # ML num_ch4_a3 = 2.69015E-05 # from methane-compa...
ax.tick_params(axis='y', which='major', labelsize=fs)
<|file_name|>panic.rs<|end_file_name|><|fim▁begin|>use std::any::Any; use std::cell::RefCell; thread_local!(static LAST_ERROR: RefCell<Option<Box<Any + Send>>> = { RefCell::new(None) }); #[cfg(feature = "unstable")] pub fn wrap<T, F: FnOnce() -> T + ::std::panic::UnwindSafe>(f: F) -> Option<T> { use std::pani...
let ret = Some(f()); bomb.enabled = false; return ret; }
<|file_name|>shadows.sample.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core'; @Component({<|fim▁hole|> selector: 'app-shadows-sample', styleUrls: ['shadows.sample.css'], templateUrl: 'shadows.sample.html' }) export class ShadowsSampleComponent {}<|fim▁end|>
<|file_name|>urls.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from blog import views urlpatterns = [ url(r'^view$', views.archive), url(r'^$', views.welcome), url(r'^create', views.create_blogpost), ]<|fim▁end|>
from django.conf.urls import url
<|file_name|>pagelabelscheme.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 from collections import namedtuple<|fim▁hole|> from pdfrw import PdfName, PdfDict, PdfObject, PdfString PageLabelTuple = namedtuple("PageLabelScheme", "startpage style prefix firstpagenum") defaults = {"sty...
<|file_name|>flash_kl28z.py<|end_file_name|><|fim▁begin|>""" mbed CMSIS-DAP debugger Copyright (c) 2006-2013 ARM 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 http://www.apache....
<|file_name|>mining_test.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016 The btcsuite developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package mining import ( "container/heap" "math/rand" "testing" "github.com/btcsuite/btcd/btcutil" ) // TestTxF...
for i := 0; i < 1000; i++ { testItems = append(testItems, &txPrioItem{ feePerKB: int64(prng.Float64() * btcutil.SatoshiPerBitcoin),
<|file_name|>discussions.ts<|end_file_name|><|fim▁begin|>// (C) Copyright 2015 Martin Dougiamas // // 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/LI...
/**
<|file_name|>main.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../../typings/main/ambient/TweenLite/TweenLite.d.ts" /> /// <reference path="../../../typings/main/ambient/TimelineMax/TimelineMax.d.ts" /> /// <reference path="../../../typings/main/ambient/jquery/index.d.ts" /> import * as $ from 'jquery'; impo...
//endregion
<|file_name|>how_sexy_is_your_name.py<|end_file_name|><|fim▁begin|>SCORES = {'A': 100, 'B': 14, 'C': 9, 'D': 28, 'E': 145, 'F': 12, 'G': 3, 'H': 10, 'I': 200, 'J': 100, 'K': 114, 'L': 100, 'M': 25,<|fim▁hole|>def sexy_name(name): name_score = sum(SCORES.get(a, 0) for a in name.upper()) if name_score >...
'N': 450, 'O': 80, 'P': 2, 'Q': 12, 'R': 400, 'S': 113, 'T': 405, 'U': 11, 'V': 10, 'W': 10, 'X': 3, 'Y': 210, 'Z': 23}
<|file_name|>classification_test.py<|end_file_name|><|fim▁begin|>import numpy as np import pytoolkit as tk def test_print_classification_multi(): y_true = np.array([0, 1, 1, 1, 2]) prob_pred = np.array( [ [0.75, 0.00, 0.25], [0.25, 0.75, 0.00], [0.25, 0.75, 0.00], ...
tk.evaluations.print_classification(y_true, prob_pred)
<|file_name|>context_params.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-go. DO NOT EDIT. // source: xds/core/v3/context_params.proto package xds_core_v3 import ( fmt "fmt" _ "github.com/cncf/udpa/go/udpa/annotations" proto "github.com/golang/protobuf/proto" math "math"<|fim▁hole|>var _ = pr...
) // Reference imports to suppress errors if they are not otherwise used.
<|file_name|>buddhist.js<|end_file_name|><|fim▁begin|>define({ root: //begin v1.x content { "days-standAlone-short": [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], "months-format-narrow": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" ], "quarters-stand...
"Month6",
<|file_name|>wrap.js<|end_file_name|><|fim▁begin|>var fs = require('fs'); var dot = require('dot'); var defaults = require('defaults'); var Block = require('glint-block'); var Style = require('glint-plugin-block-style-editable'); var TextBlock = require('glint-block-text'); var MDBlock = require('glint-block-markdown')...
function editor() { return Block(CKEditorBlock()).use(Style()); }
<|file_name|>nirx.py<|end_file_name|><|fim▁begin|># Authors: Robert Luke <mail@robertluke.net> # # License: BSD (3-clause) from configparser import ConfigParser, RawConfigParser import glob as glob import re as re import os.path as op import datetime as dt import json import numpy as np from ..base import BaseRaw fr...
<|file_name|>arsinh.ts<|end_file_name|><|fim▁begin|>/** * The inverse hyperbolic sine function * */ fns.arsinh = { functn: MathLib.isNative((<any>Math).asinh) || function (x) { // Handle ±0 and ±∞ separately if (x === 0 || !MathLib.isFinite(x)) {<|fim▁hole|> }, cdgroup: 'transc1', toContentMathMLName: 'arcsi...
return x; } return Math.log(x + Math.sqrt(x * x + 1));
<|file_name|>serve.py<|end_file_name|><|fim▁begin|>import sys from CTFd import create_app app = create_app()<|fim▁hole|><|fim▁end|>
app.run(debug=True, host="0.0.0.0", port=int(sys.argv[1]))
<|file_name|>model.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2009 Prof. William H. Green (whgreen@mit.edu) and the # RMG Team (rmg_dev@mit.edu) ...
# Compute RMS error of overall transformation Tlist = numpy.array([300.0, 400.0, 500.0, 600.0, 800.0, 1000.0, 1500.0], numpy.float64)
<|file_name|>runtests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ['DJANGO_SETTINGS_MODULE'] = 'lfs_downloads.tests._settings' import django from django.conf import settings from django.test.utils import get_runner django.setup() ...
failures = test_runner.run_tests(["tests"]) sys.exit(bool(failures))
<|file_name|>ServerManagerImpl.java<|end_file_name|><|fim▁begin|>/** * (c) 2017 TIBCO Software Inc. All rights reserved. * * Except as specified below, this software is licensed pursuant to the Eclipse Public License v. 1.0. * The details can be found in the file LICENSE. * * The following proprietary files are...
logger.error("Error while stopping server: " , e); throw new ApplicationContextException(e.getMessage(), e); }
<|file_name|>main.js<|end_file_name|><|fim▁begin|>'use strict'; describe('Controller: MainCtrl', function () { <|fim▁hole|> // load the controller's module beforeEach(module('gftApp')); var MainCtrl, scope; // Initialize the controller and a mock scope beforeEach(inject(function ($controller, $rootScope...
<|file_name|>DelayCommandPlugin.java<|end_file_name|><|fim▁begin|>/* <|fim▁hole|> * @license LGPLv3 * @copyright Copyright ucchy 2014 */ package org.bitbucket.ucchy.delay; import java.util.ArrayList; import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; ...
* @author ucchy
<|file_name|>ParserContext.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU Genera...
* but to hide the details from the public API, this class in * a different package. *
<|file_name|>reader.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 Vincent Vigneron. See the COPYRIGHT // file at the top-level directory of this distribution. // // Licensed under the MIT license <LICENSE-MIT or // http://opensource.org/licenses/MIT>, at.your option. // This file may not be copied, modified, or dis...
/// /// # Description
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms import markdown<|fim▁hole|>from core.admin.fields import MarkdownAdminField from ..models import Category class CategoryModelForm(forms.ModelForm): """ Saves the field description as html version of the raw_description field. """ ...
<|file_name|>processSubjects.py<|end_file_name|><|fim▁begin|><|fim▁hole|> ## This wrapper exists to facilitate workflow level parallelization inside the LONI pipeline until ## it is properly added to the tool. It is important for this step to do workflow level parallelization ## because of the order of processing. ## ...
#!/usr/bin/python ## Wrapper For transverse synapse detector workflow##
<|file_name|>timeWindow.tsx<|end_file_name|><|fim▁begin|>import { IconButton } from "office-ui-fabric-react/lib-amd/components/Button"; import * as React from "react"; import { IUserContributions, UserContribution } from "../../data/contracts"; import { ISelectedRange } from "../../filter";<|fim▁hole|> Changesets, ...
import { isOneDayRange, toCountString, toDateString } from "../messageFormatting"; import {
<|file_name|>fixtures.ts<|end_file_name|><|fim▁begin|>import { BigIntOrderedMap, Content, GraphNode, unixToDa } from '@urbit/api'; import bigInt, { BigInteger } from 'big-integer'; export const makeComment = ( author: string, time: number, parentIndex: string, contents: Content[] ): [BigInteger, GraphNode] => ...
author, 'time-sent': time, signatures: [],
<|file_name|>eq.rs<|end_file_name|><|fim▁begin|>#![feature(core)] extern crate core; #[cfg(test)] mod tests { // pub trait FixedSizeArray<T> { // /// Converts the array to immutable slice // fn as_slice(&self) -> &[T]; // /// Converts the array to mutable slice // fn as_mut_slice(&m...
assert_eq!(array_a.eq(&*slice_b), true); assert_eq!(array_a == *slice_b, true);
<|file_name|>crypto.js<|end_file_name|><|fim▁begin|>/** * Crypto module for Geierlein. * * @author Stefan Siegl * * Copyright (c) 2012 Stefan Siegl <stesie@brokenpipe.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * ...
* License, or (at your option) any later version. *
<|file_name|>GenericList.js<|end_file_name|><|fim▁begin|>Ext.define('Category.view.GenericList', { extend: 'Ext.grid.Panel', alias: 'widget.genericlist', store: 'Generic', title: Raptor.getTag('category_header'), iconCls:'', initComponent: function() { this.columns = [{ ...
privilegeName:'delete/:id',
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Grin Developers // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0...
}
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|># Run all test suites import unittest, os from database_api_test_archive import * from database_api_test_course import * from database_api_test_exam import * from database_api_test_teacher import * from database_api_test_user import * from rest_api_test_u...
# Run each suite one by one for suite in db_suites:
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>/***************************************************************************** The following code is derived, directly or indirectly, from the SystemC source code Copyright (c) 1996-2010 by all Contributors. All Rights reserved. The contents of this fil...
<|file_name|>helper.js<|end_file_name|><|fim▁begin|>var component <|fim▁hole|><|fim▁end|>
function help() { return component = Qt.createComponent("NearbyDevices.qml"); }
<|file_name|>BaseService.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from builtins import object from .logger import create_logger from future.utils import with_metaclass <|fim▁hole|>class Meta(type): def __str__(self): return self.SERVICE_NAME class BaseService(with_metaclass(Me...
<|file_name|>1.url.js<|end_file_name|><|fim▁begin|>var url = require('url'); var urlStr = 'http://www.smartisan.com/jianguopro/?name=t2&price=1499#overview';<|fim▁hole|>var result = url.parse(urlStr, true, true); console.log(result);<|fim▁end|>
// var result = url.parse(urlStr);
<|file_name|>errors.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.org/licenses/LICE...
class Benchmarks(object): """Errors raised by individual benchmark."""
<|file_name|>cwise_ops_binary_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow 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:/...
(np.multiply, _MUL), ]
<|file_name|>makewavemovie.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # **********...
# ----------------------------------------------------------------- # Import standard modules