prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from . import models<|fim▁hole|><|fim▁end|>
from .hooks import set_default_map_settings
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|> export default (store) => ({ path: 'admin/positions/add', /* Async getComponent is only invoked when route matches */ getComponent (nextState, cb) { /* Webpack - use 'require.ensure' to create a split point and embed an async module load...
import { injectReducer } from '../../../../store/reducers'
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main import ( "flag" "fmt" "net/http" . "gopkg.in/go-on/lib.v2/types" . "gopkg.in/go-on/lib.v2/html" "gopkg.in/go-on/lib.v2/internal/bootstrap/bs3" "gopkg.in/go-on/cdncache.v1" ) var ( port = flag.Int("port", 8083, "port of the http server") m...
HTML5( Lang_("en"), HEAD(
<|file_name|>GameRoom.java<|end_file_name|><|fim▁begin|>package work.notech.poker.room; import work.notech.poker.logic.Cards; import java.util.List; public class GameRoom { private Integer roomIds; private List<Integer> clientIds; private Cards cards; <|fim▁hole|> public void setRoomIds(Integer roomI...
public Integer getRoomIds() { return roomIds; }
<|file_name|>index-loader-syntax.js<|end_file_name|><|fim▁begin|>import one from './index-loader-syntax.css'; import two from 'button.modules.css!=!./index-loader-syntax-sass.css'; // Hash should be different import three from './button.module.scss!=!./base64-loader?LmZvbyB7IGNvbG9yOiByZWQ7IH0=!./simple.js?foo=bar'; im...
__export__ = [...one, ...two, ...three, ...four];
<|file_name|>issue-3477.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/lice...
<|file_name|>number_of_lines_between_tokens.py<|end_file_name|><|fim▁begin|>from vsg.rule_group import length from vsg import violation class number_of_lines_between_tokens(length.Rule): ''' Checks the number of lines between tokens do not exceed a specified number Parameters ---------- name : s...
if oToi.get_token_value() > self.length:
<|file_name|>CursusController.java<|end_file_name|><|fim▁begin|>/* * Copyright © Région Nord Pas de Calais-Picardie. * * This file is part of OPEN ENT NG. OPEN ENT NG is a versatile ENT Project based on the JVM and ENT Core Project. * * This program is free software; you can redistribute it and/or modify * it und...
<|file_name|>treeDnd.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *----------...
return this.elements; } }
<|file_name|>RequestQueueManager.js<|end_file_name|><|fim▁begin|>"use strict"; const Utils = require("../../core/Utils"); const RequestQueue = require("./RequestQueue"); const ChainedBucket = require("./ChainedBucket"); class RequestQueueGroup { constructor(bucketFactory) { this.queues = {}; this.bucketFac...
<|file_name|>KW.py<|end_file_name|><|fim▁begin|># news key word catch import os import random import time import tushare as ts import math import pandas import threading from MYSORT import * from programdiary import * import Stock_config_kit as Skit import ForgeModel COLLECTORSHOWNUM=5 fgt={'a':0.01,'a_2...
<|file_name|>gitutils.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from collections import defaultdict import subprocess import os import bisect import re from .common import log_fmt class GitProcess(): GIT_BIN = None def __init__(self, repoDir, args, text=None): startupinfo = None ...
args = ["show", "-s", "--pretty=format:%h", sha1] data = Git.checkOutput(args)
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, Extension import numpy as np import platform version = '0.1.3' <|fim▁hole|>ext_modules = [] setup (name = 'droneapi', zip_safe=True, version = version, description = 'Python language bindings for the DroneApi', ...
<|file_name|>classes_c.js<|end_file_name|><|fim▁begin|>var searchData=<|fim▁hole|>[ ['upmixtype',['UpmixType',['../struct_upmix_type.html',1,'']]] ];<|fim▁end|>
<|file_name|>is-plain-function.js<|end_file_name|><|fim▁begin|>export default function isPlainFunction(test) { return typeof test === 'function' && test.PrototypeMixin === undefined;<|fim▁hole|><|fim▁end|>
}
<|file_name|>test_gstr_3b_report.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest from frappe.utils import getdate from erpnext.accounts.doctype.sales_invo...
"cost_center": "Main - _GST", "description": "IGST @ 18.0", "rate": 18
<|file_name|>test_livemigrationops.py<|end_file_name|><|fim▁begin|># Copyright 2014 Cloudbase Solutions Srl # 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|>infohash.rs<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2014-2020 Savoir-faire Linux Inc. * Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published ...
impl InfoHash { pub fn new() -> InfoHash {
<|file_name|>dashboard.ts<|end_file_name|><|fim▁begin|>/** * Created by Derwish (derwish.pro@gmail.com) on 15.09.2017. * License: http://www.gnu.org/licenses/gpl-3.0.txt */ import { Database } from "../database/database"; import { Container } from "../nodes/container"; import { Node } from "../nodes/node"; import {...
var oldPanel = this.getUiPanel(node.settings["ui-panel"].value); if (oldPanel) {
<|file_name|>walletunlock.py<|end_file_name|><|fim▁begin|>from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:5332")<|fim▁hole|><|fim▁end|>
pwd = raw_input("Enter wallet passphrase: ") access.walletpassphrase(pwd, 60)
<|file_name|>rollback_test.rs<|end_file_name|><|fim▁begin|>extern crate clementine; use clementine::{Database, Data, Result, Error, ErrorKind, Config}; #[test] fn test_rollback_update() { let db = &Database::new(Config::default()).unwrap(); let update_ok_result = db.update(|txn| -> Result<()> { ...
let db = &Database::new(Config::default()).unwrap(); let update_result = db.update(|txn| -> Result<()> { txn.update("1", Data::Int(1));
<|file_name|>Canvas.cpp<|end_file_name|><|fim▁begin|>/*============================================================================= Copyright (c) 2012, Ludo Sapiens Inc. and contributors. See accompanying file LICENSE.txt for details. =============================================================================*...
<|file_name|>ORMAP_LayersConfig.py<|end_file_name|><|fim▁begin|># --------------------------------------------------------------------------- # OrmapLayersConfig.py # Created by: Shad Campbell # Date: 3/11/2011 # Updated by: # Description: This is a configuration file to be customized by each county. # Do not de...
ACRESANNO_QD="\"MapNumber\" = '*MapNumber*' OR \"MapNumber\" is NULL OR \"MapNumber\" = ''" ANNO10_LAYER="Anno0010scale" ANNO10_QD="\"MapNumber\" = '*MapNumber*' OR \"MapNumber\" is NULL OR \"MapNumber\" = ''"
<|file_name|>UploaderLauncher.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017-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...
<|file_name|>game-id.ts<|end_file_name|><|fim▁begin|>export class GameId {<|fim▁hole|> public game_id: string) { } }<|fim▁end|>
constructor(
<|file_name|>English.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="en" sourcelanguage="it_IT"> <context> <name>QObject</name> <message> <source>La versione del software installato è: </source> <translation>This version installed...
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Install update&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> </message> <message>
<|file_name|>rpc_misc.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2019-2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test RPC misc output.""" import xml.etree.Element...
# Returns a list of all running indices by default values = {"synced": True, "best_block_height": 200} assert_equal(
<|file_name|>displayquerygrid.js<|end_file_name|><|fim▁begin|>goog.provide('gmf.DisplayquerygridController'); goog.provide('gmf.displayquerygridDirective'); goog.require('gmf'); goog.require('ngeo.CsvDownload'); goog.require('ngeo.GridConfig'); /** @suppress {extraRequire} */ goog.require('ngeo.gridDirective'); goog.r...
/** * @type {ngeox.QueryResult}
<|file_name|>node_addressing.go<|end_file_name|><|fim▁begin|>// Copyright 2018-2020 Authors of Cilium // // 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/licen...
<|file_name|>tags.go<|end_file_name|><|fim▁begin|>package ext import opentracing "github.com/opentracing/opentracing-go" // These constants define common tag names recommended for better portability across // tracing systems and languages/platforms. // // The tag names are defined as typed strings, so that in additio...
} // ---
<|file_name|>timestamp.rs<|end_file_name|><|fim▁begin|>use std::sync::atomic::{AtomicUsize, Ordering}; /// A monotonically-increasing value used to compare when objects entered /// their current zone. pub type Timestamp = usize; lazy_static! { static ref LAST_TIMESTAMP: AtomicUsize = AtomicUsize::new(0); } /// G...
}
<|file_name|>worker.rs<|end_file_name|><|fim▁begin|>use std::borrow::Cow; use std::cmp::{max, min}; use std::io::{Error, ErrorKind}; use std::sync::Arc; use petgraph::graph::NodeIndex; use petgraph::{EdgeDirection, Graph}; use crate::compiler::{CommandInfo, CompilationTask, Compiler, OutputInfo, SharedState, Toolchai...
<|file_name|>scm.py<|end_file_name|><|fim▁begin|>import os import re import subprocess from six.moves.urllib.parse import urlparse, quote_plus from subprocess import CalledProcessError, PIPE, STDOUT from conans.client.tools.env import no_op, environment_append from conans.client.tools.files import chdir from conans.e...
def get_branch(self): self._check_git_repo() try:
<|file_name|>color.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2015-2019 William (B.J.) Snow Orvis // // 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...
/// /// let range = color_range_linear(black, white, 256);
<|file_name|>tail.rs<|end_file_name|><|fim▁begin|>#![crate_name = "tail"] #![feature(collections, core, old_io, old_path, rustc_private, std_misc)] /* * This file is part of the uutils coreutils package. * * (c) Morten Olsen Lysgaard <morten@lysgaard.no> * * For the full copyright and license information, please ...
use std::char::CharExt; use std::old_io::{stdin, stdout};
<|file_name|>queryer.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # --*-- coding:utf-8 --*-- import os import sys sys.path.append(os.path.split(os.path.split(os.path.abspath(sys.path[0]))[0])[0]) from CountMan.monitor.util import * from CountMan.monitor.setting import * class Queryer(object): def __in...
@property def set2db(self): self.getData() self.logger.info('get query data: {0} success'.format(self.dataSet))
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.utils.translation import ugettext_lazy as _ from cms.models import CMSPlugin, Page, get_plugin_media_path from os.path import basename class Picture(CMSPlugin): """ A Picture with or without a link """ CENTER ...
def __unicode__(self): if self.alt:
<|file_name|>ResourceConfig.java<|end_file_name|><|fim▁begin|>/** * @@@ START COPYRIGHT @@@ * * 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 lice...
* * @@@ END COPYRIGHT @@@
<|file_name|>2102000.js<|end_file_name|><|fim▁begin|>var status = 0; var minlvl = 100; var maxlvl = 255; var minplayers = 1; var maxplayers = 6; var time = 15; var open = true; function start() { status = -1; // and when they click lets fight make it turn to a really cool ifght song :D LOL ok like the Zak...
var bossmap = mf.getMap(240030103);
<|file_name|>OpenColorIOTest.py<|end_file_name|><|fim▁begin|>########################################################################## # # Copyright (c) 2012, John Haddon. All rights reserved. # Copyright (c) 2012, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, ...
o["inputSpace"].setValue( "linear" ) o["outputSpace"].setValue( "sRGB" )
<|file_name|>search.go<|end_file_name|><|fim▁begin|>package service import ( "context" "go-common/library/ecode" "go-common/library/xstr" "net/url" "strconv" "go-common/app/admin/main/videoup-task/model" "go-common/library/database/elastic" "go-common/library/log" ) const ( _searchBusinessQAVideo = "t...
func (s *Service) lastOutTime(c context.Context, ids []int64) (mcases map[int64][]interface{}, err error) { return s.lastTime(c, model.ActionHandsOFF, ids) }
<|file_name|>vhosts.go<|end_file_name|><|fim▁begin|>package vhosts import ( "net/http" "strings" "sync" ) type VirtualHosts struct { vhosts map[string]http.Handler mu sync.RWMutex } func NewVirtualHosts(vhosts map[string]http.Handler) *VirtualHosts { v := &VirtualHosts{} for hosts, h := range vhosts { f...
func (v *VirtualHosts) HandleHost(handler http.Handler, hosts ...string) {
<|file_name|>io.rs<|end_file_name|><|fim▁begin|>use buf::{Buf, MutBuf}; use error::MioResult; use self::NonBlock::{Ready, WouldBlock}; use error::MioErrorKind as mek; use os; pub use os::IoDesc; /// The result of a non-blocking operation. #[derive(Debug)] pub enum NonBlock<T> { Ready(T), WouldBlock } impl<T>...
fn write<B: Buf>(&self, buf: &mut B) -> MioResult<NonBlock<usize>> { write(self, buf)
<|file_name|>dead.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/L...
fn visit_fn(&mut self, fk: visit::FnKind<'v>, _: &'v ast::FnDecl, block: &'v ast::Block, span: codemap::Span, id: ast::NodeId) { // Have to warn method here because methods are not ast::Item
<|file_name|>quickcheck_prim.rs<|end_file_name|><|fim▁begin|>#![feature(plugin, float_extras)] #![plugin(quickcheck_macros)] extern crate quickcheck; extern crate float; use float::Float; use quickcheck::TestResult; use std::fmt::Display; fn assert_eq<T: Copy + PartialEq + Display + From<Float>>(a: Float, b: T) -> ...
let f = Float::from(x);
<|file_name|>app.py<|end_file_name|><|fim▁begin|>from twisted.application.service import Application from twisted.application.internet import TimerService, TCPServer from twisted.web import server from twisted.python import log from scrapy.utils.misc import load_object from .interfaces import IEggStorage, IPoller, IS...
from .poller import QueuePoller from .environ import Environment from .website import Root from .config import Config
<|file_name|>api-put-object-multipart.go<|end_file_name|><|fim▁begin|>/* * Minio Go Library for Amazon S3 Compatible Cloud Storage (C) 2015, 2016 Minio, 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 cop...
// - *minio.Object // - Any reader which has a method 'ReadAt()' // // If we exhaust all the known types, code proceeds to use stream as
<|file_name|>printingPens.py<|end_file_name|><|fim▁begin|>from robofab.pens.pointPen import BasePointToSegmentPen from ufoLib.pointPen import AbstractPointPen """ Printing pens print their data. Useful for demos and debugging. """ __all__ = ["PrintingPointPen", "PrintingSegmentPen", "SegmentPrintingPointPen"] cl...
def addComponent(self, baseGlyphName, transformation): assert not self.havePath
<|file_name|>author-routing.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { AuthorListComponent } from './authorlist.component'; import { AuthorEditComponent } from './authoredit.component'; const routes: Routes = [ { p...
@NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule],
<|file_name|>index.js<|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 A...
// The scope of 'this' is the event. In order to call the 'receivedEvent' // function, we must explicitly call 'app.receivedEvent(...);'
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)] //! # tray\_rust - A Toy Ray Tracer in Rust //! //! tray\_rust is a toy physically based ray tracer built off of the techniques //! discussed in [Physically Based Rendering](http://pbrt.org/). It began life as a port of //! [tray](https://github.co...
<|file_name|>fasta.py<|end_file_name|><|fim▁begin|>from Bio import SeqIO def get_proteins_for_db(fastafn, fastadelim, genefield): """Runs through fasta file and returns proteins accession nrs, sequences and evidence levels for storage in lookup DB. Duplicate accessions in fasta are accepted and removed by...
return sym[0] except IndexError:
<|file_name|>task.py<|end_file_name|><|fim▁begin|>import argparse import json import os import shutil from .model import train_and_evaluate if __name__ == "__main__": parser = argparse.ArgumentParser() # File arguments parser.add_argument( "--train_file_pattern", help="GCS location to read training...
# Training parameters
<|file_name|>issue-22025.rs<|end_file_name|><|fim▁begin|>// compile-flags: -Cmetadata=aux pub mod foo { pub trait Foo {} pub struct Bar;<|fim▁hole|> impl Foo for Bar {} }<|fim▁end|>
<|file_name|>test.js<|end_file_name|><|fim▁begin|>var sys = require("sys"), my_http = require("http"), path = require("path"), url = require("url"), filesys = require("fs"); my_http.createServer(function(request,response){ var my_path = url.parse(request.url).pathname; var full_path = path.join(process.cwd(),my_path)...
} else{ filesys.readFile(full_path, "binary", function(err, file) {
<|file_name|>tickets.js<|end_file_name|><|fim▁begin|>/** * Setup (required for Joomla! 3) */ if(typeof(akeeba) == 'undefined') { var akeeba = {}; } if(typeof(akeeba.jQuery) == 'undefined') { akeeba.jQuery = jQuery.noConflict(); } akeeba.jQuery(document).ready(function($){ function atsAssignmentClick() { var p...
var wait = akeeba.jQuery(this._rootElement).parents('td').find('.loading'); wait.find('.icon-ok,img').css('display', 'none');
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages from fccsmap import __version__ test_requirements = [] with open('requirements-test.txt') as f: test_requirements = [r for r in f.read().splitlines()] setup( name='fccsmap', version=__version__, author='Joe...
classifiers=[
<|file_name|>new-account-form.service.js<|end_file_name|><|fim▁begin|>(function() { "use strict"; angular.module("blocktrail.setup") .factory("newAccountFormService", function($log, $http, $q, _, cryptoJS, device, CONFIG, launchService, settingsService, trackingService) { return new New...
* @return { promise<string> } * @private
<|file_name|>label.rs<|end_file_name|><|fim▁begin|>use Scalar; use color::{Color, Colorable}; use elmesque::Element; use graphics::character::CharacterCache; use label::FontSize; use theme::Theme; use ui::GlyphCache; use widget::{self, Widget, WidgetId}; <|fim▁hole|> text: &'a str, style: Style, maybe_paren...
/// Displays some given text centred within a rectangle. #[derive(Clone, Debug)] pub struct Label<'a> { common: widget::CommonBuilder,
<|file_name|>mimetypes_pt.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="pt" version="2.0"> <context> <name>Hawaii::SystemPreferences::Preflet</name> <message> <location filename="../preflet.cpp" line="58"/> <source>MIME Types</source> <translation type=...
<message> <location filename="../mimetypespreflet.ui" line="14"/> <source>Form</source> <translation type="unfinished"/>
<|file_name|>plugin.min.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
HostCMS 6.7 = 9fdd2118a94f53ca1c411a7629edf565
<|file_name|>c_game.js<|end_file_name|><|fim▁begin|>function c_game(piece, display, score) { this.piece = piece; this.display = display; this.score = score; this.speed = 250; } c_game.prototype.reassign = function(y) { var x; var tmp; while (y > 0) { tmp = y - 1; x = 1; while (thi...
<|file_name|>fixtures.py<|end_file_name|><|fim▁begin|>from .. import models import datetime def typical_user(): username = 'alice' if not models.User.query.filter_by(username=username).first(): return models.User.register( username=username,<|fim▁hole|> confirmed=True, )...
password='qqq',
<|file_name|>GetMailService.java<|end_file_name|><|fim▁begin|>package org.artifactory.ui.rest.service.admin.configuration.mail; import org.artifactory.api.config.CentralConfigService; import org.artifactory.descriptor.config.MutableCentralConfigDescriptor; import org.artifactory.rest.common.service.ArtifactoryRestRequ...
<|file_name|>FeeValuePO.java<|end_file_name|><|fim▁begin|>package org.sdmlib.openbank.util; import org.sdmlib.models.pattern.PatternObject; import org.sdmlib.openbank.FeeValue; import org.sdmlib.openbank.TransactionTypeEnum; import org.sdmlib.models.pattern.AttributeConstraint; import org.sdmlib.models.pattern.Pattern...
}
<|file_name|>version.go<|end_file_name|><|fim▁begin|>package maintenance import "github.com/Azure/azure-sdk-for-go/version" // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // // Code generated by Microsoft (R)...
// Version returns the semantic version (see http://semver.org) of the client. func Version() string { return version.Number
<|file_name|>model_control_one_enabled_Difference_LinearTrend_Seasonal_Hour_NoAR.py<|end_file_name|><|fim▁begin|>import tests.model_control.test_ozone_custom_models_enabled as testmod <|fim▁hole|><|fim▁end|>
testmod.build_model( ['Difference'] , ['LinearTrend'] , ['Seasonal_Hour'] , ['NoAR'] );
<|file_name|>caldgemm.cpp<|end_file_name|><|fim▁begin|>/** * CPU side of CALDGEMM implementation. * * Copyright 2015: * - David Rohr (drohr@jwdt.org) * - Matthias Bach (bach@compeng.uni-frankfurt.de) * - Matthias Kretz (kretz@compeng.uni-frankfurt.de) * * This file is part of CALDGEMM. * * CALDGEMM is free...
<|file_name|>rust_string.rs<|end_file_name|><|fim▁begin|>extern crate tor_util; extern crate libc; use std::ffi::CString; use tor_util::RustString; #[test] fn rust_string_conversions_preserve_c_string() { let s = CString::new("asdf foo").unwrap();<|fim▁hole|> let r2 = RustString::from(s.clone()); let c = r...
let r = RustString::from(s.clone());
<|file_name|>simplifications_explicit.py<|end_file_name|><|fim▁begin|>from miasm.core.utils import size2mask from miasm.expression.expression import ExprInt, ExprCond, ExprCompose, \ TOK_EQUAL def simp_ext(_, expr): if expr.op.startswith('zeroExt_'): arg = expr.args[0] if expr.size == arg.size...
return (op1 - (op2 + op3.zeroExtend(op1.size))).msb()
<|file_name|>BaseTestVerticle.java<|end_file_name|><|fim▁begin|>/* * Copyright 2016 The Simple File Server 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.ap...
package org.sfs.integration.java;
<|file_name|>testkit_test.go<|end_file_name|><|fim▁begin|>// Copyright 2017 PingCAP, 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-...
<|file_name|>person.cpp<|end_file_name|><|fim▁begin|>#include "person.h" Person::Person() { hunger=0; toilet=0; WaitForDo=0; } void Person::AddToDo(Deal todo, float time) { ToDoList.append(qMakePair(todo,time)); if (WaitForDo==0) WaitForDo=time; } void Person::CheckDeal() { WaitForDo-=1; ...
Deal Person::Eat(float NutritionalValue, float timeToEat)
<|file_name|>sign_in_totp_code.js<|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/. */ const $ = require('jquery'); const _ = require('und...
beforeEach(() => { sinon.stub(account, 'verifyTotpCode').callsFake(() => Promise.reject(AuthErrors.toError('UNEXPECTED_ERROR'))); sinon.spy(view, 'showValidationError'); view.$('.totp-code').val(TOTP_CODE);
<|file_name|>mdialog.js<|end_file_name|><|fim▁begin|>/* * @弹出提示层 ( 加载动画(load), 提示动画(tip), 成功(success), 错误(error), ) * @method tipBox * @description 默认配置参数 * @time 2014-12-19 * @param {Number} width -宽度 * @param {Number} height -高度 * @param {String} str -默认文字 * @param {Object} window...
} // 是否显示按钮
<|file_name|>logout-modal.js<|end_file_name|><|fim▁begin|>(function () { 'use strict'; angular.module('Pedal2Play') .directive('logoutModal', function () { return { restrict: 'E', templateUrl: 'partials/logout.modal.html'<|fim▁hole|> }); })();<|fim▁end|>
};
<|file_name|>dragdrop.js<|end_file_name|><|fim▁begin|>(function() { "use strict"; angular.module('common.dragdrop', []) .factory('DragDropHandler', [function() { return { dragObject: undefined, addObject: function(object, objects, to) { objects.splice(to, 0...
}
<|file_name|>ConnectedArena.java<|end_file_name|><|fim▁begin|>/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package pt.jkaiui.core.messages; import java.util.regex.Matcher; import java.util.regex.Pattern; import pt.jkaiui.core.KaiString; import pt.jkaiui.manager.I_...
if (m.matches()){ ConnectedArena msg = new ConnectedArena();
<|file_name|>Panel.js<|end_file_name|><|fim▁begin|>$(document).ready(function () { form = $('#form'); $("#Grid tbody>tr").click(function () { var id = $(this).find("[name='id']").attr('value'); $("#grid_selecteditem").val(id); }); }); function ClearSelection(e) { $("#grid_se...
var date = new Date(); var datefrom; if (range == "month") {
<|file_name|>game.py<|end_file_name|><|fim▁begin|>import random from .tiles import base INITIAL_TILES = [ base.ASSASSIN, base.BOWMAN, base.CHAMPION, base.DRAGOON, base.FOOTMAN, base.GENERAL, base.KNIGHT, base.LONGBOWMAN, base.MARSHALL, base.PIKEMAN, base.PIKEMAN, base.PRIEST, base.RANGER, base.SEER, base....
class Game(object):
<|file_name|>test_last_binding_operation.py<|end_file_name|><|fim▁begin|>import http from openbrokerapi.service_broker import LastOperation, OperationState from tests import BrokerTestCase class LastBindingOperationTest(BrokerTestCase): def setUp(self): self.broker.service_id.return_value = 'service-guid...
def test_returns_200_with_given_state(self): self.broker.last_binding_operation.return_value = LastOperation(OperationState.IN_PROGRESS, 'Running...')
<|file_name|>load-doc-editor.js<|end_file_name|><|fim▁begin|>/* <|fim▁hole|> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * ...
* Copyright (C) 2014 Xillio (support@xillio.com) *
<|file_name|>downloader.rs<|end_file_name|><|fim▁begin|>use datastore::DataStore; use errors::*; use fillable::*; use futures; use futures::{Sink, Stream}; use futures::future; use futures::future::Future; use manifest::{BlockRequest, ManifestWithFile}; use metainfo::{InfoHash, MetaInfo}; use peer_protocol; use peer_pr...
}
<|file_name|>elapsedtime.go<|end_file_name|><|fim▁begin|>package misc import ( "net/http" "strconv" "time" ) //Writer http response writer interface. type Writer interface { http.ResponseWriter http.Hijacker } //ElapsedTime add requset elapsed time to "Elapsed-Time" header of response. //Elapsed time is time sp...
Writer Timestamp int64 written bool }
<|file_name|>kpabenc_adapt_hybrid.py<|end_file_name|><|fim▁begin|>from charm.toolbox.pairinggroup import PairingGroup,GT,extract_key from charm.toolbox.symcrypto import AuthenticatedCryptoAbstraction from charm.toolbox.ABEnc import ABEnc from charm.schemes.abenc.abenc_lsw08 import KPabe debug = False class HybridABEnc...
<|file_name|>renamer.py<|end_file_name|><|fim▁begin|>import ast from python_minifier.rename.binding import NameBinding from python_minifier.rename.name_generator import name_filter from python_minifier.rename.util import is_namespace def all_bindings(node): """ All bindings in a module :param node: The ...
<|file_name|>svg.tsx<|end_file_name|><|fim▁begin|>import { styled } from '@storybook/theming'; export interface SvgProps { inline?: boolean; } const Svg = styled.svg<SvgProps>( { // Fix rendering bugs in Chrome for hdpi shapeRendering: 'inherit', transform: 'translate3d(0,0,0)', }, ({ inline }) =>...
Svg.displayName = 'Svg';
<|file_name|>test_sensor.py<|end_file_name|><|fim▁begin|>"""Tests for greeneye_monitor sensors.""" from unittest.mock import AsyncMock, MagicMock from homeassistant.components.greeneye_monitor.sensor import ( DATA_PULSES, DATA_WATT_SECONDS, ) from homeassistant.const import STATE_UNKNOWN from homeassistant.cor...
hass, "sensor.channel_two", STATE_UNKNOWN, {DATA_WATT_SECONDS: -400} )
<|file_name|>routes.js<|end_file_name|><|fim▁begin|>import React from "react"; import { NotFoundRoute, Route } from "react-router"; import App from "./components/App"; import Home from "./components/Home"; import NotFound from "./components/NotFound"; import Stargazer from "./components/Stargazer"; import Stargazers f...
<Route name="repo" path="/:user/:repo" handler={Stargazers} />
<|file_name|>fold.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|>storetest.go<|end_file_name|><|fim▁begin|>// Copyright 2018 Istio 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...
// Watch implements store.Backend interface. func (m *Memstore) Watch() (<-chan store.BackendEvent, error) {
<|file_name|>parser2.py<|end_file_name|><|fim▁begin|># parser2.py # parses sentences from the CSV files # J. Hassler Thurston # RocHack Hackathon December 7, 2013 # Modified December 11, 2013 import nltk from random import choice cfg_file = 'upenn_grammar.cfg' tbank_productions = [] nonterminals = [] rightside = [] ...
rightside = [production.rhs().__str__() for production in tbank_productions] tbank_grammar = nltk.grammar.ContextFreeGrammar(nltk.grammar.Nonterminal('S'), tbank_productions) print generate_sample(tbank_grammar)
<|file_name|>common.js<|end_file_name|><|fim▁begin|>import fetch from '../api' import config from '../config' export const login = (source, token) => fetch( 'POST', `${config.API_URL}/login`,<|fim▁hole|> {}, false, {'X-Auth-Source': source, 'X-Auth-Token': token} )<|fim▁end|>
<|file_name|>connection_interface.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ use interner::{Intern, StringKey}; use serde::{Deserialize, Seri...
/// Configuration where Relay should expect some fields in the schema.
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # dolphintools documentation build configuration file, created by # sphinx-quickstart on Mon Oct 12 22:39:14 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration...
#html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation".
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from datetime import datetime, timedelta from pathlib import Path from flask import (Flask, session, redirect, url_for, flash, g, request, render_template) from flask_assets import Environment from flask_babel import gett...
gpg_key_dir=config.GPG_KEY_DIR, )
<|file_name|>elastos_cast_checker.py<|end_file_name|><|fim▁begin|># elastos_cast_checker.py # encoding: UTF-8 # usages: # sudo chmod a+x elastos_cast_checker.py # python elastos_cast_checker.py import re import os import sys def read_file(path): lines = [] if (path.endswith('.cpp') or path.endsw...
if (len(eachLine) > 1) and (eachLine.startswith("//") == False):
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2007 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that ...
There is little need to override this method; instead, subclass ``MouseCursor`` and provide your own ``draw`` method. ''' # Draw mouse cursor if set and visible.
<|file_name|>CLI.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2011 Klaus Reimer <k@ailis.de> * See LICENSE.md for licensing information. */ package de.ailis.microblinks.l.lctrl.shell; import gnu.getopt.Getopt; import gnu.getopt.LongOpt; import java.util.Arrays; import de.ailis.microblinks.l.lctrl.resourc...
protected CLI(final String name, final String shortOpts, final LongOpt[] longOpts) {
<|file_name|>urlsearchparams.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::cell::DOMRefCell; use dom::binding...