prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>MtsfFmi.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Copyright (C) 2011-2014 German Aerospace Center DLR (Deutsches Zentrum fuer Luft- und Raumfahrt e.V.), Institute of System Dynamics and Control and BAUSCH-GALL GmbH, Munich All rights reserved. This file is license...
StandardSeriesForFmi = [pyMtsf.Series('Fixed', None, 'constant', 1), pyMtsf.Series('Continuous', 'Time', 'linear', 100), pyMtsf.Series('Discrete', 'TimeDiscrete', 'constant', 10)]
<|file_name|>ServerMatcherMiddleware.js<|end_file_name|><|fim▁begin|>var theServersDao = require('../daos/ServersDao'); var ServerMatcherMiddleware = function (pReq, pRes, pNext) { 'use strict'; var ip = pReq.headers['x-forwarded-for'] || pReq.connection.remoteAddress; theServersDao.getServerIdByIp(ip, f...
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|>var subjectType = require('./type'); var subjectValue = require('./value'); /** * Given the parts of speech, this returns an subjects type & value. * @param {Object} parts The parts of speech. * @return {Object} The parsed subjects type & val...
/*jslint node: true */ /*global module, require*/ 'use strict';
<|file_name|>liasptecanalisis.js<|end_file_name|><|fim▁begin|>function ValidarPuntaje(id) { var aux = id.split("_"); var name=aux[0]; var fil=parseInt(aux[1]); var col=parseInt(aux[2]);<|fim▁hole|> var colpuntajereal=col+1; var puntaje=name+"_"+fil+"_"+colpuntaje; var puntajereal=name+"_"+fil...
var colpuntaje=col;
<|file_name|>create.py<|end_file_name|><|fim▁begin|># Copyright 2016 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/LIC...
<|file_name|>main.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # AWL simulator - Dummy hardware interface # # Copyright 2013-2014 Michael Buesch <m@bues.ch> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
<|file_name|>accumulator.py<|end_file_name|><|fim▁begin|>import time class RecordAccumulator(object): def __init__(self, buffer_class, config): self.config = config self.buffer_time_limit = config['buffer_time_limit'] self._buffer_class = buffer_class self._reset_buffer() def...
def is_ready(self): """Check whether the buffer is ready."""
<|file_name|>UnknownTypeException.java<|end_file_name|><|fim▁begin|>/* UnknownTypeException.java -- Thrown by an unknown type. Copyright (C) 2012 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU G...
<|file_name|>By_idName.py<|end_file_name|><|fim▁begin|>from selenium import webdriver from time import sleep driver=webdriver.Firefox() driver.get("http://www.baidu.com/") sleep(3)<|fim▁hole|>driver.find_element_by_name('wd').send_keys('Selenium我要自学网') sleep(3) driver.find_element_by_id('su').click() sleep(3) driver...
# driver.find_element_by_id('kw').send_keys('Selenium我要自学网')
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Configure Watchmaker documentation.""" from __future__ import (absolute_import, division, print_function, unicode_literals, with_statement) import os import sys # # Created by sphinx-quickstart on Thu Jun 30 20:11:36 ...
# This patterns also effect to html_static_path and html_extra_path exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
<|file_name|>ImagePath.py<|end_file_name|><|fim▁begin|># # The Python Imaging Library # $Id: ImagePath.py,v 1.2 2007/06/17 14:12:15 robertoconnor Exp $ # # path interface # # History: # 1996-11-04 fl Created # 2002-04-14 fl Added documentation stub class # # Copyright (c) Secret Labs AB 1997. # Copyright...
# override with C implementation Path = Image.core.path
<|file_name|>test_server_groups.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 Cisco Systems, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ...
instances[1]._context = cctxt
<|file_name|>plot.py<|end_file_name|><|fim▁begin|>import sys, os, math import time import numpy as np from pandas.io.parsers import read_csv from sklearn.decomposition import PCA from sklearn.cross_validation import StratifiedShuffleSplit from sklearn import metrics import sklearn.svm as svm from sklearn.naive_bayes ...
cut_pt = 1 print ("Reading the file...")
<|file_name|>qsr_qtc_bc_simplified.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import division from qsrlib_qsrs.qsr_qtc_simplified_abstractclass import QSR_QTC_Simplified_Abstractclass import numpy as np from qsrlib_io.world_qsr_trace import * class QSR_QTC_BC_Simplified(QSR_QTC_Simplified...
ret = np.append(ret, state, axis=0) return ret.reshape(-1,4) def qtc_to_output_format(self, qtc):
<|file_name|>bug_693.py<|end_file_name|><|fim▁begin|>from PySide.QtCore import * from PySide.QtGui import * import unittest class MyModel (QAbstractListModel): stupidLine = QLine(0, 0, 10, 10) def rowCount(self, parent):<|fim▁hole|> def data(self, index, role): return self.stupidLine class TestB...
return 1
<|file_name|>event_store.js<|end_file_name|><|fim▁begin|>import { EventBus } from '../wires/event_bus'; class EventStore {<|fim▁hole|> constructor(storeAdapter) { this.adapter = storeAdapter; } appendToStream(streamId, expectedVersion, events) { if (events.length === 0) { return...
<|file_name|>config.js<|end_file_name|><|fim▁begin|>'use strict' const pkg = require('../package') module.exports = { port: 4000,<|fim▁hole|><|fim▁end|>
title: 'slotlist.info - ArmA 3 mission and slotlist management', publicPath: '/', }
<|file_name|>test10.py<|end_file_name|><|fim▁begin|>import requests params = {'username':'Ryan', 'password':'password'} r = requests.post("http://pythonscraping.com/pages/cookies/welcome.php", params) print("Cookie is set to:") print(r.cookies.get_dict())<|fim▁hole|>print("-------------") print("Going to profile page....
<|file_name|>admin.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|>from django.contrib import admin from blog.models import Post class PostAdmin(admin.ModelAdmin): list_display = ['id', 'title', 'created', 'status'] list_filter = ('status', ) admin.site.register(Post, PostAdmin)<|fim▁end...
from __future__ import unicode_literals from django.forms import ModelForm, TextInput
<|file_name|>phase.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ############################################################################## # # diffpy.pyfullprof by DANSE Diffraction group # Simon J. L. Billinge # (c) 2010 Trustees of the Columbia University # ...
[0, 1, -1, 2, 3]), "Jvi": EnumInfo("Jvi", "Output options", 0, {0: "no operation", 3: "unknow operation",
<|file_name|>main.js<|end_file_name|><|fim▁begin|>requirejs.config({ // baseUrl: '/', paths: { lodash: '//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash', jquery: '//code.jquery.com/jquery-1.11.0.min', react: '//cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react-with-addons' }, ...
}) requirejs(['jquery', 'react', 'ImageSearch'], function ($, React, ImageSearch) {
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>export { default as AggregateStatusCard, default as PfAggregateStatusCard } from './AggregateStatusCard.vue'; export { default as ApplicationLauncher, default as PfApplicationLauncher } from './ApplicationLauncher.vue'; export { default as Button, default as PfButton }...
export { default as DrawerNotification, default as PfDrawerNotification } from './DrawerNotification.vue';
<|file_name|>Infix.py<|end_file_name|><|fim▁begin|># Allows the creation of infix operators # Thanks to Ferdinand Jamitzky # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/384122 class Infix(object): def __init__(self, function): self.function = function def __ror__(self, other): return Infix...
return Infix(lambda x, self=self, other=other: self.function(other, x)) def __rshift__(self, other):
<|file_name|>keyboard.js<|end_file_name|><|fim▁begin|>var EA_keys = {8:"Retour arriere",9:"Tabulation",12:"Milieu (pave numerique)",13:"Entrer",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"Verr Maj",27:"Esc",32:"Espace",33:"Page up",34:"Page down",35:"End",36:"Begin",37:"Fleche gauche",38:"Fleche haut",39:"Fleche droit...
// send the event to the plugins
<|file_name|>dirname.rs<|end_file_name|><|fim▁begin|>#![crate_name = "uu_dirname"] /* * This file is part of the uutils coreutils package. * * (c) Derek Chiang <derekchiang93@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. ...
return 0; } let separator = if matches.opt_present("zero") {"\0"} else {"\n"};
<|file_name|>specest_mtm.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2010 Communications Engineering Lab, KIT # # This 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; either version 3, ...
<|file_name|>normalizer_sv.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2017, Dogan Yazar 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 limitation ...
/** * Remove commonly used diacritic marks from a string as these
<|file_name|>effects.py<|end_file_name|><|fim▁begin|>import random import actor from vector import Vector as v class SmokePuff(actor.Actor): collides = False def __init__(self, world, pos): super(SmokePuff, self).__init__(world, pos=pos, radius=10, image_file="images/all/star.svgz")<|fim▁hole|> ...
self.apply_impulse(v((random.gauss(0,2),random.gauss(0,2)))) def tick(self):
<|file_name|>father.py<|end_file_name|><|fim▁begin|>from stard.services import BaseService class Service(BaseService):<|fim▁hole|><|fim▁end|>
def init_service(self): self.children = {self.service('child')}
<|file_name|>api.js<|end_file_name|><|fim▁begin|>var express = require('express'), formidable = require('formidable'), imgur = require('imgur'), fs = require('fs'), url = require('url'), bodyParser = require('body-parser'), router = express.Router(), uuid = require('node-uuid'), db = req...
res.end('Server Online');
<|file_name|>pipe.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/L...
<|file_name|>Pagination.py<|end_file_name|><|fim▁begin|>''' Created on 17-Feb-2015 @author: Asawari.Vaidya ''' from PythonNetBanxSDK.common.DomainObject import DomainObject class Pagination(DomainObject): ''' classdocs ''' def __init__(self,obj): ''' Constructor ''' #...
if obj is not None:
<|file_name|>simd.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...
//! } //! ```
<|file_name|>Constantes.java<|end_file_name|><|fim▁begin|>/* * Class Name: Constantes * Name: Daniel Arevalo * Date: 13/03/2016 * Version: 1.0 */ package co.edu.uniandes.eco...
public static final String PGS_CHAPTER = "Pgs/Chapter";
<|file_name|>bin.rs<|end_file_name|><|fim▁begin|>// // imag - the personal information management suite for the commandline // Copyright (C) 2015-2020 Matthias Beyer <mail@beyermatthias.de> and contributors // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesse...
<|file_name|>test.py<|end_file_name|><|fim▁begin|>from os.path import dirname, join, exists, isfile, splitext, basename, isdir, relpath from nose import SkipTest from . import BaseTargQC, info class UnitTests(BaseTargQC): def test_01_simple(self): self._test('simple', [self.samples[0]], bams=[self.bams[...
def test_06_threads(self): self._test('threads', bams=self.bams, bed=self.bed4, threads='2')
<|file_name|>backend.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright(C) 2013 Julien Veyssier # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundati...
VERSION = '0.f' DESCRIPTION = 'parolesmania lyrics website' LICENSE = 'AGPLv3+'
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import React from 'react'; import PrivateRoute from '../../../routes/PrivateRoute'; import TextNodesEditorLayout from '../layouts/TextNodesLayout/TextNodesEditorLayout'; export default ( <PrivateRoute exact path="/textNodes/edit" component={TextNodesEditorLayo...
roles={['commenter', 'editor', 'admin']} /> );
<|file_name|>react-instantsearch-tests.tsx<|end_file_name|><|fim▁begin|>import * as React from "react"; import { connectMenu, connectRefinementList, connectStateResults, SearchState } from "react-instantsearch/connectors"; import { InstantSearch, SearchBox, Index, Hits, Highlight, Menu } from "react-instantsearch/dom"...
<Index indexName="second"> <IndexResults> <div>
<|file_name|>required.ts<|end_file_name|><|fim▁begin|>import { getTestClient } from '../../../../../utils/getTestClient' const describeIf = (condition: boolean) => (condition ? describe : describe.skip) let PrismaClient, prisma const id = 'cccccccccccccccccccccccc' /** * Test update operations on required composit...
data: { country: 'Mars', content: { set: {
<|file_name|>internals.go<|end_file_name|><|fim▁begin|>package dockerfile // internals for handling commands. Covers many areas and a lot of // non-contiguous functionality. Please read the comments. import ( "crypto/sha256" "encoding/hex" "errors" "fmt" "io" "io/ioutil" "net/http" "net/url" "os" "path/file...
func (b *Builder) create() (string, error) {
<|file_name|>tvec.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.org/licen...
} ast::ExprVec(ref elements) => {
<|file_name|>probe.js<|end_file_name|><|fim▁begin|>const { getURL, sockets } = require('../common/configuration.js'); const io = require('socket.io-client'); const os = require('os'); const socket = io.connect(getURL(sockets.measures), {<|fim▁hole|> setInterval(() => { socket.emit('new.load', { load: os.loadavg(), ...
query: `id=${os.hostname()}&cores=${os.cpus().length}` });
<|file_name|>Component.js<|end_file_name|><|fim▁begin|>/* * Ext JS Library 2.1 * Copyright(c) 2006-2008, Ext JS, LLC. * licensing@extjs.com * * http://extjs.com/license */ /** * @class Ext.Component * @extends Ext.util.Observable * <p>Base class for all Ext components. All subclasses of Component ca...
} };
<|file_name|>AbstractMailFaxClientSpi.java<|end_file_name|><|fim▁begin|>package org.fax4j.spi.email; import java.io.IOException; import javax.mail.Message; import javax.mail.Transport; import org.fax4j.FaxException; import org.fax4j.FaxJob; import org.fax4j.common.Logger; import org.fax4j.spi.AbstractFax4JClientSpi; i...
mailConnection=this.connection; } else {
<|file_name|>_version.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
version_info = (1, 4, 2) __version__ = '.'.join(map(str, version_info))
<|file_name|>Asm.py<|end_file_name|><|fim▁begin|>def filename_directive(filename): return "\t.file\t\"{0}\"\n".format(filename) def compiler_ident_directive(): return "\t.ident\t\"{0}\"\n".format("HEROCOMP - Tomas Mikula 2017") def text_directive(): return "\t.text\n" def data_directive(): return ...
return code
<|file_name|>ThingData.js<|end_file_name|><|fim▁begin|>module.exports = { // Load Mock Product Data Into localStorage init: function() { // localStorage.clear(); localStorage.setItem('thing', JSON.stringify([{ _id:'cbus-254-56-61', parent:null, label:'much test' }, { _id:'...
icon: 'scotch-beer.png', widget:'Slider'
<|file_name|>test_ogrenci_iletisim_bilgileri.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from test_settings import Settings class TestCase(Settings):<|fim▁hole|> def test_sidebar(self): # Ayarlari yapiyor. self.do_settings() # Genel'e tikliyor. self.driver.find_element_b...
<|file_name|>campus.py<|end_file_name|><|fim▁begin|>from models.basemodel import BaseModel class Campus(BaseModel): CAMPUS_CODES = ['BD', 'DN', 'CS'] LONG_NAMES = { 'BD': 'University of Colorado, Boulder', 'DN': 'University of Colorado, Denver', 'CS': 'University of Colorado, Colorado ...
}
<|file_name|>robustlq.py<|end_file_name|><|fim▁begin|>""" Filename: robustlq.py Authors: Chase Coleman, Spencer Lyon, Thomas Sargent, John Stachurski Solves robust LQ control problems. """ from __future__ import division # Remove for Python 3.sx import numpy as np from lqcontrol import LQ from quadsums import var_q...
C0 = np.zeros((self.n, 1)) A0 = self.A - dot(self.B, F) + dot(self.C, K) e = var_quadratic_sum(A0, C0, H0, self.beta, x0) return e
<|file_name|>api_v2.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Isaku Yamahata <yamahata at private email ne jp> # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the Lic...
raise orm_exc.NoResultFound() return new_key
<|file_name|>intrinsics.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/lice...
//! //! [atomics]: http://llvm.org/docs/Atomics.html //!
<|file_name|>deploy_local.ts<|end_file_name|><|fim▁begin|>// tslint:disable:no-var-requires /* Allows easier local debugging over SSH. Running `npm run deploy_local` updates remote adapter files and restarts the instance */ /* CONFIGURATION: - provide a deploy_password.json file in the local dir with contents ...
"username": "<USERNAME>",
<|file_name|>ssl-insecure-version.py<|end_file_name|><|fim▁begin|>import ssl from pyOpenSSL import SSL ssl.wrap_socket(ssl_version=ssl.PROTOCOL_SSLv2) SSL.Context(method=SSL.SSLv2_METHOD) SSL.Context(method=SSL.SSLv23_METHOD) herp_derp(ssl_version=ssl.PROTOCOL_SSLv2) herp_derp(method=SSL.SSLv2_METHOD) herp_derp(metho...
def open_ssl_socket(version=SSL.SSLv23_METHOD):
<|file_name|>rating.d.ts<|end_file_name|><|fim▁begin|>import { EventEmitter, OnInit, TemplateRef, OnChanges, SimpleChanges } from '@angular/core'; import { NgbRatingConfig } from './rating-config'; /** * Context for the custom star display template */ export interface StarTemplateContext { /** * Star fill pe...
readonly: boolean; /** * A template to override star display.
<|file_name|>json_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2020 The Kubernetes 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<|fim▁hole|> http://www.apache....
<|file_name|>0006_auto__add_field_surveyuser_oneuser.py<|end_file_name|><|fim▁begin|># encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'SurveyUser.on...
<|file_name|>StartPage.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1"> <context> <name>StartPage</name> <message> <location filename="../../../StartPage/TranslationTexts.py" line="42"/> <source>Start</source> <translation type="unfi...
<|file_name|>kv-grid-export.js<|end_file_name|><|fim▁begin|>/*! * @package yii2-grid * @author Kartik Visweswaran <kartikv2@gmail.com> * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2016 * @version 3.1.3 * * Grid Export Validation Module for Yii's Gridview. Supports export of * grid ...
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals from .celery import app @app.task def add(x, y): return x + y @app.task def mul(x, y): return x * y<|fim▁hole|>def xsum(numbers): return sum(numbers)<|fim▁end|>
@app.task
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2010 Anso Labs, LLC # # Licensed under the Apac...
.. moduleauthor:: Devin Carlen <devin.carlen@gmail.com> .. moduleauthor:: Vishvananda Ishaya <vishvananda@yahoo.com> .. moduleauthor:: Joshua McKenty <joshua@cognition.ca> .. moduleauthor:: Manish Singh <yosh@gimp.org>
<|file_name|>githook.go<|end_file_name|><|fim▁begin|>/* * This file handles GitHub webhooks. For more information on GitHub webhooks * go to https://developer.github.com/webhooks/, and for information on their * payloads, go to https://developer.github.com/v3/activity/events/types. * For information on the hookserv...
<|file_name|>simple_5_lstm.py<|end_file_name|><|fim▁begin|># TODO: # 1. Fix broken functions # 2. Network architecture changed, but functions need to use mask differently # 3. Evaluation function from __future__ import print_function import cPickle as pickle import sys import time from collections import OrderedDict ...
<|file_name|>0017_change_edit_page_permission_description.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("wagtailcore", "0016_change_page_url_path_to_text_field"), ] operations = [ ...
], max_length=20, verbose_name="Permission type",
<|file_name|>AtomicIntegerEditorTestCase.java<|end_file_name|><|fim▁begin|>/* * JBoss, Home of Professional Open Source. * Copyright 2011, Red Hat, Inc., and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. *...
return new NumberComparator(); }
<|file_name|>1058.A+B_in_Hogwarts.cpp<|end_file_name|><|fim▁begin|>/** \PAT 1058 * * \ AC! * \ Yitian * \ 20130924 * */ #include <iostream> #include <string> #include <cstdlib> using namespace std; long long radix[] = {1, 29 , 29 * 17}; long long CurrencyConvert(string & str) { long long sum = 0; long...
while (cin >> A >> B)
<|file_name|>input-errors.ts<|end_file_name|><|fim▁begin|>// (C) Copyright 2015 Moodle Pty Ltd. // // 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...
errorKeys: any[]; constructor(private translate: TranslateService) { }
<|file_name|>ma-ecca-treenode.js<|end_file_name|><|fim▁begin|>define(['handlebars'], function (Handlebars) { var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {}; templates['ma-ecca-treenode'] = template(function (Handlebars,depth0,helpers,partials,data) { this.compilerInf...
buffer += " "; if (stack1 = helpers.iconClass) { stack1 = stack1.call(depth0, {hash:{},data:data}); } else { stack1 = depth0.iconClass; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; } buffer += escapeExpression(stack1)
<|file_name|>Particle.java<|end_file_name|><|fim▁begin|>package net.fisty.packgame.client.graphics.particle; import java.awt.Graphics; import java.awt.image.ImageObserver; public abstract class Particle { public int index = 0; public abstract void render(Graphics g, ImageObserver obs); public abstract void updat...
public abstract String serializeParticle(); public abstract void unserializeParticle(String s);
<|file_name|>db_test_lib_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from absl.testing import absltest<|fim▁hole|>from grr_response_server.databases import db as abstract_db from grr.test_lib import db_test_lib class WithDatabaseTest(absltest.TestCase): def testDatabaseIsProvided(self): @db_te...
from typing import Text from grr_response_core.lib import rdfvalue from grr_response_server import blob_store
<|file_name|>field_mask.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: google/protobuf/field_mask.proto package types import ( bytes "bytes" fmt "fmt" proto "github.com/gogo/protobuf/proto" io "io" math "math" reflect "reflect" strings "strings" ) // Reference...
} func (m *FieldMask) Size() (n int) { if m == nil { return 0
<|file_name|>run-tests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright JS Foundation and other contributors, http://js.foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Licen...
return ret_build | ret_test def run_jerry_tests(options): ret_build = ret_test = 0
<|file_name|>createDataPlugin.tsx<|end_file_name|><|fim▁begin|>/* eslint-disable @typescript-eslint/ban-types */ import type { SlatePlugin } from '../types/SlatePlugin'; import type { SlateDataPluginDefinition } from '../types/slatePluginDefinitions'; function createDataPlugin<T = {}>(def: SlateDataPluginDefinition<T>...
return customizablePlugin; }
<|file_name|>bitcoin_pt_BR.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="pt_BR" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Asiadigicoin</...
<location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source>
<|file_name|>0007_auto_20170828_2317.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-28 15:17 from __future__ import unicode_literals import DjangoUeditor.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ...
name='category', field=models.CharField(choices=[('web', 'Web\u5f00\u53d1'), ('linux', '\u7cfb\u7edf\u8fd0\u7ef4'), ('algorithm', '\u7b97\u6cd5'), ('language', '\u7f16\u7a0b\u8bed\u8a00'), ('others', '\u5176\u4ed6')], default='web', max_length=64, verbose_name='\u7c7b\u522b'), ), ]
<|file_name|>external-library-modal.component.ts<|end_file_name|><|fim▁begin|>import {Component, OnInit, ViewChild} from '@angular/core'; import {FormBuilder, FormControl, FormGroup} from '@angular/forms'; import {Library} from '../../../../entity/library'; import {LibraryService} from '../../../../service/library.serv...
public showModal() { this.externalLibraryModal.show();
<|file_name|>client.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2022 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/licenses/...
# If we have keyword arguments corresponding to fields on the
<|file_name|>Heuristic_Coeff.py<|end_file_name|><|fim▁begin|>#------------------------------------------------------------------------------- # Name: Heuristic_Coeff.py # Purpose: Implements FIH algorithm found in "An Integer Linear Programming Scheme to Sanitize Sensitive Frequent Itemsets" by Kagklis et ...
tid[sens_ind[i]] = tid[sens_ind[i]] - rem[i] change_raw_data += len(rem[i])
<|file_name|>show.py<|end_file_name|><|fim▁begin|># coding=utf-8 __author__ = 'stasstels' import cv2 import sys image = sys.argv[1] targets = sys.argv[2] <|fim▁hole|>img = cv2.imread(image, cv2.IMREAD_COLOR) with open(targets, "r") as f: for line in f: print line (_, x, y) = line.split() cv2.ci...
# Load an color image in grayscale
<|file_name|>CoasterFigureService.ts<|end_file_name|><|fim▁begin|>import {Point} from "../type/Point"; import {Bounds} from "../type/Bounds"; import * as $ from "jquery"; import * as d3Selection from "d3-selection"; import {BaseType, Selection} from "d3-selection"; import * as d3Voronoi from "d3-voronoi"; import {Voron...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^pyconpads/', include('pyconpads.foo.urls')), # Uncomment the ...
)
<|file_name|>fn-custom-6.rs<|end_file_name|><|fim▁begin|>// rustfmt-brace_style: PreferSameLine // Test different indents. fn foo(a: Aaaaaaaaaaaaaa, b: Bbbbbbbbbbbbbb) {<|fim▁hole|> foo(); } fn bar(a: Aaaaaaaaaaaaaa, b: Bbbbbbbbbbbbbb, c: Cccccccccccccccccc, d: Dddddddddddddddd, e: Eeeeeeeeeeeeeee) { bar(); } ...
<|file_name|>GetPowerOfTwo.js<|end_file_name|><|fim▁begin|>/** * @author Richard Davey <rich@photonstorm.com> * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ /** * Returns the nearest power of 2 to the given `value`. * * @function Phaser.Ma...
* @since 3.0.0 * * @param {number} value - The value. *
<|file_name|>fixedIO_test.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2013-2015 The btcsuite developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package wire_test import ( "bytes" "io" ) // fixedWriter implements the io.Writer interface and intentially...
} // newFixedWriter returns a new io.Writer that will error once more bytes than
<|file_name|>page.controller.client.js<|end_file_name|><|fim▁begin|>(function () { angular .module("WebAppMaker") .controller("EditPageController", EditPageController) .controller("PageListController", PageListController) .controller("NewPageController", NewPageController); fun...
<|file_name|>IDObject.py<|end_file_name|><|fim▁begin|>class IDObject(): """ Base class for all objects having unique id within the application<|fim▁hole|> Constructor method for building IDObject objectId - the unique objectId of the object in the application """ self._objectId = ...
""" def __init__(self, objectId): """
<|file_name|>variance-covariant-arg-trait-match.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)] // Test that even when `T` is only used in covariant position, it // is treated as invariant. trait Get<T> { fn get(&self) -> T; } fn get_min_from_max<'min, 'max, G>() where 'max : 'min, G : Get<&'max i32> { ...
} fn get_max_from_min<'min, 'max, G>() where 'max : 'min, G : Get<&'min i32>
<|file_name|>parser.py<|end_file_name|><|fim▁begin|>from datetime import datetime from argparse import ArgumentParser import pprint import time import warnings import os, sys, io import signal import beretta import importlib __author__ = 'holly' class Parser(object):<|fim▁hole|> self.parser.add_argument('--v...
def __init__(self): self.parser = ArgumentParser(description=beretta.__doc__)
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>import { MovementInOverlappingNetworks } from "../../";<|fim▁hole|><|fim▁end|>
export = MovementInOverlappingNetworks;
<|file_name|>StartMojo.java<|end_file_name|><|fim▁begin|>/** * Copyright 2015-2016 Red Hat, Inc, and individual contributors. * * 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:/...
<|file_name|>photowall.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import tempfile import pipes import subprocess import time import random import shutil try: from wand.image import Image from wand.display import display except ImportError as e: # cd /usr/lib/ # ln -s libMagickWand-6.Q16.s...
print("Please refer to #http://dahlia.kr/wand/ to install it.") import traceback; traceback.print_exc()
<|file_name|>ops.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/LI...
/// #[derive(Copy, Clone)] /// struct Foo; /// /// impl Div for Foo {
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.<|fim▁hole|> import { format } from 'date-fns' export = format<|fim▁end|>
<|file_name|>CoverImageDialogFragment.java<|end_file_name|><|fim▁begin|>package com.fjaviermo.dropdroid; import java.io.ByteArrayOutputStream; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.support.v4.app.DialogFragment; import android.view.LayoutInflat...
imgView.setImageBitmap(mImage); return view; }
<|file_name|>document.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 core::nonzero::NonZero; use devtools_traits::ScriptToDev...
window.GetFrameElement().map_or(false, |el| el.has_attribute(&local_name!("allowfullscreen"))) }
<|file_name|>test_hash.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************** The MIT License(MIT) Embedded Template Library. Copyright(c) 2014 jwellbelove Permission is hereby granted, free of charge, to any person obtaining a copy of this software and assoc...
<|file_name|>BaseService.java<|end_file_name|><|fim▁begin|>package com.oinux.lanmitm.service; import com.oinux.lanmitm.R; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent;<|fim▁hole|>import android.content.Intent; import android.os.IBinder; public class BaseSe...
import android.app.Service; import android.content.Context;
<|file_name|>wakizashi.js<|end_file_name|><|fim▁begin|>/* global process */ /** * Dependencies */ // Third party libraries var debug = require('debug')('wakizashi'); var merge = require('merge-descriptors'); var fs = require('fs'); // Wakizashi libraries var domoweb = require('./domoweb'); var auth = require('./aut...
<|file_name|>server.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- if __name__ == '__main__': import sys<|fim▁hole|> sys.setdefaultencoding('utf-8') import jam.webserver from jam.server import server jam.webserver.run(server)<|fim▁end|>
reload(sys)