prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>Response.java<|end_file_name|><|fim▁begin|>/* * www.yiji.com Inc. * Copyright (c) 2016 All Rights Reserved */ package com.falcon.suitagent.web; /* * 修订记录: * guqiu@yiji.com 2016-07-26 13:54 创建 */ import com.falcon.suitagent.config.AgentConfiguration; import com.falcon.suitagent.plugins.metrics.Metric...
}else if(urlPath.size() >= 1 && "version".equals(urlPath.get(0))){
<|file_name|>navtree.js<|end_file_name|><|fim▁begin|>var NAVTREE = [ [ "game_of_life", "index.html", [ [ "game_of_life", "md__r_e_a_d_m_e.html", null ], [ "Classes", null, [ [ "Class List", "annotated.html", "annotated" ], [ "Class Index", "classes.html", null ], [ "Class Members", "function...
expandNode(o, n, true, true); }
<|file_name|>CoarseFundamentalTop3Algorithm.py<|end_file_name|><|fim▁begin|># QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this fil...
if security.Invested:
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use crate::{config::WorkMode, env::Env, file_saver::*}; use std::path::Path; mod alias; mod child_properties; mod constants; mod doc; mod enums; mod flags; pub mod function; mod function_body_chunk; mod functions; mod general; mod object; mod objects;<|fim▁hole|>mod par...
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # CoderDojo Twin Cities Python for Minecraft documentation build configuration file, created by # sphinx-quickstart on Fri Oct 24 00:52:04 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that ...
project = u'CoderDojo Twin Cities Python for Minecraft'
<|file_name|>publicationfolder.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from ._base import IIngestableFolder, Ingestor, IngestableFolderView from .interfaces import IPublication from five import grok class IPublicationFolder(IIngestableFolder): u'''Folder containing publications.''' class PublicationIngestor...
# encoding: utf-8 u'''MCL — Publication Folder'''
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># AsteriskLint -- an Asterisk PBX config syntax checker # Copyright (C) 2015-2016 Walter Doekes, OSSO B.V. # # 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 Free Sof...
from .config import ConfigAggregator from .dialplan import DialplanAggregator from .file import FileReader
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Validate checks some basic safety conditions. use super::{NormError, NormResult}; use super::norm_util::{self, Symbols}; use grammar::consts::*; use grammar::parse_tree::*; use grammar::repr as r; use string_cache::DefaultAtom as Atom; use collections::{set, Multim...
}
<|file_name|>mnist_model.py<|end_file_name|><|fim▁begin|>""" CNN on mnist data using fluid api of paddlepaddle """ import paddle import paddle.fluid as fluid def mnist_cnn_model(img): """ Mnist cnn model Args: img(Varaible): the input image to be recognized Returns: Variable: the lab...
<|file_name|>parser_ips.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import sys from intelmq.lib import utils from intelmq.lib.bot import Bot from intelmq.lib.message import Event class MalwareGroupIPsParserBot(Bot): def process(self): report = self.rec...
<|file_name|>Applicant.java<|end_file_name|><|fim▁begin|>package org.glamey.training.designmodel.responsibility_chain; import lombok.Builder; import lombok.Getter; import java.math.BigDecimal;<|fim▁hole|> /** * @author zhouyang.zhou. 2017.08.14.16. */ @Getter @Builder public class Applicant { private String nam...
<|file_name|>cookie.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals from django.utils.encoding import force_str from django.utils import six from django.utils.six.moves import http_cookies # Some versions of Python 2.7 and later won't need this encoding bug fix: _cookie_encod...
c.load(cookie) except http_cookies.CookieError:
<|file_name|>ApplicationActionBarAdvisor.java<|end_file_name|><|fim▁begin|>package fr.obeo.dsl.minidrone.application; import org.eclipse.jface.action.IMenuManager; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.application.ActionBarAdvisor; import org.eclipse.ui.application.IActionBarConfigurer; public...
protected void fillMenuBar(IMenuManager menuBar) { }
<|file_name|>iomgr_windows.cc<|end_file_name|><|fim▁begin|>/* * * Copyright 2015 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/L...
<|file_name|>esempio0_json.py<|end_file_name|><|fim▁begin|>import json import sys import urllib keyword = sys.argv[1] def getTimes(query,num): "Questa funzione fa una ricerca su NY Times" url = "http://query.nytimes.com/svc/cse/v2/sitesearch.json?query="+query.replace(" ","%20")+"&pt=article&page="+str(num) ...
print headline.encode('utf-8')
<|file_name|>password-generator.js<|end_file_name|><|fim▁begin|>// passwort-generator.js // http://passwort-generieren.de // (c) 2014 Jan Krause (function() { "use strict"; var root = this; var PasswordGenerator = function(options) { if(!options){ options = {}; options.el =...
exports = module.exports = PasswordGenerator;
<|file_name|>CanvasAnimation.js<|end_file_name|><|fim▁begin|>var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; f...
<|file_name|>PersistenceEngine.py<|end_file_name|><|fim▁begin|>import os import sys import time ''' @author: msune,omoya,CarolinaFernandez @@organization: i2CAT, OFELIA FP7 Persistence engine Implementes driver-based persistence backend selection ''' class PersistenceEngine(): #Default Class Attributes...
exec('from ' + PATH + ' import RAWFile') return RAWFile except: raise Exception(driverName + ' persistence driver not found in ' + PersistenceEngine.PATH_TO_DRIVERS)
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function (req, res, next) { res.render('index', { title: 'Express' });<|fim▁hole|> res.render('canvas'); }); module.exports = router;<|fim▁end|>
}); //test canvas router.get('/canvas', function (req, res, next) {
<|file_name|>amdDeclarationEmitNoExtraDeclare.ts<|end_file_name|><|fim▁begin|>// @declaration: true // @module: amd // @out: dist.js // @filename: Class.ts import { Configurable } from "./Configurable" export class HiddenClass {} export class ActualClass extends Configurable(HiddenClass) {} // @filename: Con...
}; }
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from django.test import TestCase import time from .models import SimpleTree, MPTTTree, TBMP, TBNS def timeit(method): """ Measure time of method's execution. """ def timed(*args, **kw): ts = time.time() result = method(*args, **kw) ...
<|file_name|>utilities.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python #coding: UTF-8 #COPIRIGHT: Patrick Roncagliolo #LICENCE: GNU GPL 3 import cgi, json argsDict = cgi.FieldStorage() EMPTY_DICT = {} def getState (init = False): dataDict = getDataDict () if dataDict is None \ and init is True: ...
print '<!DOCTYPE html>', print '<meta name="viewport" content="width=device-width, initial-scale=1.0">',
<|file_name|>te.js<|end_file_name|><|fim▁begin|><|fim▁hole|>OC.L10N.register( "settings", { "Delete" : "తొలగించు", "Server address" : "సేవకి చిరునామా", "Cancel" : "రద్దుచేయి", "Email" : "ఈమెయిలు", "Your email address" : "మీ ఈమెయిలు చిరునామా", "Password" : "సంకేతపదం", "New password" :...
<|file_name|>BufferGL.cpp<|end_file_name|><|fim▁begin|>// // Copyright 2015 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // BufferGL.cpp: Implements the class methods for BufferGL. #include "libANGLE/renderer...
memcpy(mShadowCopy.data() + destOffset, sourceGL->mShadowCopy.data() + sourceOffset, size); }
<|file_name|>tests.py<|end_file_name|><|fim▁begin|># This Python file uses the following encoding: utf-8 from django.test import TestCase, RequestFactory from models import Meeting, Abstract, Author from django.core.urlresolvers import reverse from fiber.models import Page from views import AbstractCreateView from hom...
'author_set-0-country': 'United States of America',
<|file_name|>description.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, th...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! Keep track of all the git repositories on your machine. //! //! This crate houses the binary and library for the git-global subcommand, a //! way to find, query statuses, and gain other insights about all the git repos //! on your machine. The binary can be installed...
pub use errors::{GitGlobalError, Result}; pub use repo::Repo; pub use report::Report;
<|file_name|>operations.go<|end_file_name|><|fim▁begin|>package costmanagement // Copyright (c) Microsoft and contributors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the Lic...
func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { err = autorest.Respond(
<|file_name|>chromium_code_search.py<|end_file_name|><|fim▁begin|># Copyright 2017 Josh Karlin. All rights reserved. # Use of this source code is governed by the Apache license found in the LICENSE # file. import argparse import datetime import getopt import json import sys import tempfile import threading import time...
f.seek(0);
<|file_name|>add_vcf_to_project.py<|end_file_name|><|fim▁begin|>import os from xbrowse_server import xbrowse_controls from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project, Individual, VCFFile from xbrowse_server import sample_management class Command(BaseCommand): ...
parser.add_argument('--cohort-id') parser.add_argument('--clear', action="store_true", help="Whether to clear any previously-added VCF paths before adding this one") parser.add_argument('--load', action="store_true", help="Whether to also load the VCF data, and not just add record its path in t...
<|file_name|>14-builder-uglify-badmodule-cmd.js<|end_file_name|><|fim▁begin|>var vows = require('vows'), assert = require('assert'), path = require('path'), fs = require('fs'), exec = require('child_process').exec, base = path.join(__dirname, 'assets/badmodule/'), buildBase = path.join(base, 'bu...
fs.stat(path.join(buildBase, 'foo'), function(err) { self.callback(null, err);
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Settings and configuration for Django. Values will be read from the module specified by the DJANGO_SETTINGS_MODULE environment variable, and then from django.conf.global_settings; see the global settings file for a list of all possible variables. """ import lo...
if setting == setting.upper(): setattr(self, setting, getattr(global_settings, setting))
<|file_name|>TestMNITagPoints.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Test label reading from an MNI tag file # # The current directory must be writeable. # try: ...
# Add the actors to the renderer, set the background and size # ren1.AddViewProp(actor) ren1.AddViewProp(labelActor)
<|file_name|>test_shell_interactive.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding=utf-8 # Copyright 2014 Cloudera 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 # # h...
queries = ["select\n1--comment;",
<|file_name|>sort.js<|end_file_name|><|fim▁begin|>if(App.namespace) { App.namespace('Action.Sort', function(App) { /** * @namespace App.Action.Sort * @type {*} */ var sort = {}; /** @type {App.Action.Project} Project */ var Project = null; /** * button for sortin...
sort.onSortByStart = function(event){ sort.icoSort.start.direction = !sort.icoSort.start.direction; gantt.sort(sortByStart);
<|file_name|>lib_mk.py<|end_file_name|><|fim▁begin|># See utils/checkpackagelib/readme.txt before editing this file. # There are already dependency checks during the build, so below check # functions don't need to check for things already checked by exploring the # menu options using "make menuconfig" and by running "m...
def before(self): self.conditional = 0
<|file_name|>test-hub-shutdown.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2014, Andre Caron (andre.l.caron@gmail.com) // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistr...
<|file_name|>Master.cpp<|end_file_name|><|fim▁begin|>/* * Ascent MMORPG Server * Copyright (C) 2005-2008 Ascent Team <http://www.ascentemu.com/> * * This program 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 S...
#ifdef VOICE_CHAT
<|file_name|>SuperBot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import json import os import time import psutil import pyautogui pubg_url = 'steam://rungameid/578080' PROCNAME = "TslGame.exe" CRASH_PROCNAME = "BroCrashReporter.exe" debug_directory = "debug_screenshots" start_state = "HELLO" play_state...
<|file_name|>common_utils.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2018 The Google AI Language Team 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://w...
<|file_name|>protractor.conf.js<|end_file_name|><|fim▁begin|><|fim▁hole|>/*eslint-env node */ exports.config = { specs: [ 'test/e2e/**/*.js' ], baseUrl: 'http://localhost:9000', chromeOnly: true }<|fim▁end|>
'use strict'
<|file_name|>osxpasscrack.py<|end_file_name|><|fim▁begin|>import itertools import subprocess import sys #http://pastebin.com/zj72xk4N<|fim▁hole|> #run when system password box is showing eg. keychain password dialog #apple script for automating dialog box input sys_script = ''' tell application "System Events" to tel...
<|file_name|>console.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node // Fires up a console with Valid loaded.<|fim▁hole|>Valid = require('./lib/valid'); require('repl').start();<|fim▁end|>
// Allows you to quickly play with Valid on the console.
<|file_name|>test_ciftify_recon_all.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import unittest import logging import importlib import copy import os from docopt import docopt from unittest.mock import patch import pytest import ciftify.utils logging.disable(logging.CRITICAL) ciftify_recon_all = importlib...
<|file_name|>test_realm_domains.py<|end_file_name|><|fim▁begin|>import orjson from django.core.exceptions import ValidationError from django.db.utils import IntegrityError from zerver.lib.actions import ( do_change_realm_domain, do_change_user_role, do_create_realm, do_remove_realm_domain, do_set_r...
do_change_user_role(
<|file_name|>Server.java<|end_file_name|><|fim▁begin|>package proxy.test; import java.rmi.Naming; import java.rmi.RemoteException; import java.rmi.server.UnicastRemoteObject; import util.JavaLog; public class Server extends UnicastRemoteObject implements RemoteInterface{ private static final long serialVersionUID ...
<|file_name|>home-view-model.ts<|end_file_name|><|fim▁begin|>import { Observable } from "tns-core-modules/data/observable"; export class HomeViewModel extends Observable { constructor() { super(); } <|fim▁hole|><|fim▁end|>
}
<|file_name|>byteResponseDTO.ts<|end_file_name|><|fim▁begin|>/** * Soccer API<|fim▁hole|> * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ export interface ByteResponseDTO { bytes?: string; ...
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: 1.0 * Contact: voetbalsvk@gmail.com
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (c) Peter Parente # Distributed under the terms of the BSD 2-Clause License. import os from flask import Flask from flask_sslify import SSLify from .model import db from .auth import oauth from .ui import ui_bp<|fim▁hole|> app = Flask(__name__) app.secre...
from .api import api_bp
<|file_name|>create-multimethod.ts<|end_file_name|><|fim▁begin|>import {AsyncMultimethod, Decorators, Methods, Multimethod} from '../interface/multimethod'; import {Options} from '../interface/options'; import {analyse} from './analysis'; import {codegen} from './codegen'; // TODO: ... export function createMultime...
<|file_name|>Process58TestElement.py<|end_file_name|><|fim▁begin|># Copyright 2016 Casey Jaymes # This file is part of PySCAP. # # PySCAP is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by<|fim▁hole|># but WITHOUT ANY WARRANTY; without even th...
# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # PySCAP is distributed in the hope that it will be useful,
<|file_name|>MessageIntegerOverflowException.java<|end_file_name|><|fim▁begin|>// // MessagePack for Java // // 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....
// limitations under the License. // package org.msgpack.core;
<|file_name|>segment_hook.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # 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 ...
# http://www.apache.org/licenses/LICENSE-2.0 #
<|file_name|>mdbook.rs<|end_file_name|><|fim▁begin|>use std::path::{Path, PathBuf}; use std::fs::{self, File}; use std::io::Write; use std::error::Error; use {BookConfig, BookItem, theme, parse, utils}; use book::BookItems; use renderer::{Renderer, HtmlHandlebars}; use utils::{PathExt, create_path}; pub struct MDBook...
pub fn get_title(&self) -> &str { &self.config.title
<|file_name|>import_from_imilo.ts<|end_file_name|><|fim▁begin|>import convertImiloPropsToBobProps from './imilo' import {ImiloProps, getCoords, getDegrees, getIdentity, getMobility, getSituations} from './imilo_api' type ImiliPropsFetcher = { [K in keyof ImiloProps]: (userId: string) => Promise<ImiloProps[K]> } ...
BOB_BOOTSTRAP_ADVICES_ENDPOINT + encodeURIComponent(JSON.stringify(bobProps)), '_blank', 'noopener noreferrer') }
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>/* License: MIT. * Copyright (C) 2013, 2014, Uri Shaked. */ 'use strict'; <|fim▁hole|> grunt.initConfig({ karma: { unit: { configFile: 'karma.conf.js', singleRun: true } }, jshint: { options: { jshintrc: '.jshintrc' ...
module.exports = function (grunt) { // load all grunt tasks require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
<|file_name|>lint-unused-imports.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...
// except according to those terms. #![feature(globs)] #![deny(unused_imports)]
<|file_name|>instance_test.cc<|end_file_name|><|fim▁begin|>// Copyright 2017 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-...
std::unique_ptr<MyData> up2 = MakeStdUnique(&csp1); EXPECT_FALSE(up2); EXPECT_TRUE(csp1); EXPECT_TRUE(sp);
<|file_name|>flowerNet.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ AUTHOR : MIN PURPOSE : the deep learning CNN model, similar as inception VERSION : 0.1 DATE : 4.2017 """ __author__ = 'Min' import math import time import tensorflow as tf from datetime import datetime NUM...
<|file_name|>lxqt-session_fr_FR.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="fr_FR"> <context> <name>LXQtModuleManager</name> <message> <source>LXQt Session Crash Report</source> <translation type="vanished">Rapport de plantage ...
<location filename="../src/wmselectdialog.ui" line="71"/> <source>You will be able to change this at any time through Preferences -&gt; Session Settings -&gt; Basic Settings.</source> <translation type="unfinished"></translation> </message>
<|file_name|>in_memory_repository.py<|end_file_name|><|fim▁begin|><|fim▁hole|>class InMemoryRepository(list): pass<|fim▁end|>
<|file_name|>populatedb.py<|end_file_name|><|fim▁begin|><|fim▁hole|> with open('clinicalsearch/trials_ranked.csv', 'rU') as csvfile: reader = csv.reader(csvfile, delimiter=',') for row in reader: print row t = ClinicalTrial(id=row[0], sponsor=row[1], published=(row[2]=="TRUE"), state=row[3], url=row[4], ongoing=(...
# Run this in the Django shell from clinicalsearch.models import ClinicalTrial import csv
<|file_name|>inv.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <vector> //merges two arrays std::vector<int> merge(std::vector<int>& ar1,std::vector<int>& ar2,unsigned int& inv_count) { unsigned int n=ar1.size(); unsigned int m=ar2.size(); std::vector<int> merged(n+m); unsigned int a,b; a=0...
n2=n-n1; std::vector<int> ar1(n1),ar2(n2); for(unsigned int i=0;i<n1;++i) {
<|file_name|>ConfigDialog.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ *************************************************************************** ConfigDialog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email ...
<|file_name|>day_5.rs<|end_file_name|><|fim▁begin|>use std::iter::Peekable; use std::str::Chars; pub fn evaluate(line: &str) -> f32 { evaluate_iter(&mut line.chars().peekable()) } fn evaluate_iter(iter: &mut Peekable<Chars>) -> f32 { let mut accumulator = parse_term(iter.by_ref()); while iter.peek().is_so...
fn test_two_subs() { assert_eq!(evaluate("6-4-1"), 1.0); }
<|file_name|>run.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # coding: utf-8 # import re import os import time import argparse import yaml import bunch import uiautomator2 as u2 from logzero import logger CLICK = "click" # swipe SWIPE_UP = "swipe_up" SWIPE_RIGHT = "swipe_right" SWIPE_LEFT = "swipe_left" ...
device = None conf_filename = None
<|file_name|>validation-parser.ts<|end_file_name|><|fim▁begin|>/** * @file Validation Parser * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ <|fim▁hole|>import { Debug, Log, ParserRegistry } from '../globals' import XmlParser, { XmlParserParameters } from './xml-parser' import Validation from '...
<|file_name|>notify.py<|end_file_name|><|fim▁begin|>"""Mycroft AI notification platform.""" import logging from mycroftapi import MycroftAPI from homeassistant.components.notify import BaseNotificationService _LOGGER = logging.getLogger(__name__) def get_service(hass, config, discovery_info=None): """Get the M...
"""Send a message mycroft to speak on instance.""" text = message
<|file_name|>asr1k_routertype_driver.py<|end_file_name|><|fim▁begin|># Copyright 2015 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 # # ...
<|file_name|>constellation.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 pipeline::{Pipeline, CompositionPipeline}; use com...
next_pipeline_id: PipelineId(0), next_frame_id: FrameId(0), pending_frames: vec!(), pending_sizes: HashMap::new(),
<|file_name|>manager.py<|end_file_name|><|fim▁begin|># Copyright 2013 IBM Corp. # # 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-...
security_groups, block_device_mapping, legacy_bdm=True): request_spec = scheduler_utils.build_request_spec(context, image, instances)
<|file_name|>threeJS.js<|end_file_name|><|fim▁begin|>///@INFO: UNCOMMON // This Component shows the possibility of using another Render Engine within WebGLStudio. // The idea here is to create a component that calls the other render engine renderer during my rendering method function ThreeJS( o ) { this.enabled =...
ThreeJS.prototype.onRemovedFromScene = function( scene )
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>trait Shape { fn area(&self) -> i32; fn is_shape(&self) -> bool { true } } struct Square { side_length: i32, } impl Shape for Square { fn area(&self) -> i32 { self.side_length * self.side_length } } fn main() { let square ...
<|file_name|>EntityStatePeSubsystemType.py<|end_file_name|><|fim▁begin|># Copyright 2016 Casey Jaymes<|fim▁hole|># PySCAP 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 of the License, or # (...
# This file is part of PySCAP. #
<|file_name|>apps.py<|end_file_name|><|fim▁begin|>from biohub.core.plugins import PluginConfig <|fim▁hole|> name = 'tests.core.plugins.test' title = '' author = '' description = ''<|fim▁end|>
class TestConfig(PluginConfig):
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.shortcuts import render, redirect, HttpResponse from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.views.decorators.csrf import csrf...
<|file_name|>Enums.hpp<|end_file_name|><|fim▁begin|>/* * File: Enums.hpp * Author: Arthur Lisek-Koper <deathvango@gmail.com> * * Created on December 28, 2014, 3:50 PM * * Summary of Code: * */ #ifndef ENUMS_HPP #define ENUMS_HPP enum class frameType : int { UNKNOWN = -1, STAND_1 = 0, STAND_2, WALK_1...
STAIRS,
<|file_name|>SimpleDipEntityItem.java<|end_file_name|><|fim▁begin|>package yio.tro.antiyoy.menu.customizable_list; import com.badlogic.gdx.graphics.g2d.BitmapFont; import yio.tro.antiyoy.gameplay.diplomacy.DiplomaticEntity; import yio.tro.antiyoy.menu.render.AbstractRenderCustomListItem; import yio.tro.antiyoy.menu.re...
public DiplomaticEntity diplomaticEntity; public int backgroundColor;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # $Id:$ import ctypes import math import sys import threading import time import pyglet _debug = pyglet.options['debug_media'] import mt_media from . import lib_dsound as lib from pyglet.window.win32 import user32, kernel32 class DirectSound...
_min_write_size = 9600
<|file_name|>AndTypeImpl.java<|end_file_name|><|fim▁begin|>/** */ package org.liquibase.xml.ns.dbchangelog.impl; import java.util.Collection; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecor...
case DbchangelogPackage.AND_TYPE__GROUP: ((FeatureMap.Internal)getGroup()).set(newValue); return;
<|file_name|>report.py<|end_file_name|><|fim▁begin|>import os from django_extensions.management.jobs import DailyJob import nbformat from nbconvert.preprocessors import ExecutePreprocessor from nbconvert import HTMLExporter<|fim▁hole|> class Job(DailyJob): help = "Convert Jupyter Notebook in lowfat/reports to HTM...
<|file_name|>rate_scan.py<|end_file_name|><|fim▁begin|>""" Make a "Bias Curve" or perform a "Rate-scan", i.e. measure the trigger rate as a function of threshold.<|fim▁hole|>Usage: digicam-rate-scan [options] [--] <INPUT>... Options: --display Display the plots --compute Compu...
<|file_name|>auth.go<|end_file_name|><|fim▁begin|><|fim▁hole|> "github.com/skmetaly/pbblog/framework/session" "net/http" "net/url" ) //AuthenticateRequest checks if for a given requrest the user is authenticated or not func AuthenticateRequest(w http.ResponseWriter, r *http.Request) { //Redirect to login if they ar...
package handlers import (
<|file_name|>hebrew.js.uncompressed.js<|end_file_name|><|fim▁begin|>define( "dojo/cldr/nls/hu/hebrew", //begin v1.x content<|fim▁hole|> "months-format-abbr": [ "Tisri", "Hesván", "Kiszlév", "Tévész", "Svát", "Ádár I", "Ádár", "Niszán", "Ijár", "Sziván", "Tamuz", "Áv", "Elul" ], "months-forma...
{
<|file_name|>PResource.java<|end_file_name|><|fim▁begin|><|fim▁hole|>/* This file was generated by SableCC (http://www.sablecc.org/). */ package se.sics.kola.node; public abstract class PResource extends Node { // Empty body }<|fim▁end|>
<|file_name|>test_requests.py<|end_file_name|><|fim▁begin|>from django.test import TestCase from threadlocals.threadlocals import set_current_user from django.contrib.auth import get_user_model from powerdns.models import ( Domain, DomainRequest, Record, RecordRequest, ) from .utils import ( Servi...
self.user2 = get_user_model().objects.create_user(
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from flask.ext.script import Manager from flask_frozen import Freezer import discovery import logging out = logging.StreamHandler() out.setFormatter(logging.Formatter()) out.setLevel(logging.DEBUG) logging.getLogger('freepto-web').setLevel(loggi...
freezer.freeze()
<|file_name|>evacuation.py<|end_file_name|><|fim▁begin|># python3 import queue class Edge: def __init__(self, u, v, capacity): self.u = u self.v = v self.capacity = capacity self.flow = 0 # This class implements a bit unusual scheme for storing edges of the graph, # in order to r...
for _ in range(edge_count): u, v, capacity = map(int, input().split()) graph.add_edge(u - 1, v - 1, capacity)
<|file_name|>probe_test.go<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT ...
* Minio Cloud Storage, (C) 2015 Minio, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>extern crate build_utils; extern crate protoc_grpcio; use std::fs::File; use std::io::Write; use std::path::PathBuf; use build_utils::BuildRoot; fn main() { let build_root = BuildRoot::find().unwrap(); let thirdpartyprotobuf = build_root.join("3rdparty/protobuf"...
<|file_name|>filecredsource.go<|end_file_name|><|fim▁begin|><|fim▁hole|>// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package externalaccount import ( "bytes" "encoding/json" "errors" "fmt" "io" "io/ioutil" "os" ) type fileCredentialSource struct { Fi...
// Copyright 2020 The Go Authors. All rights reserved.
<|file_name|>FanMapMaker.java<|end_file_name|><|fim▁begin|>import java.util.List; import java.util.LinkedList; import java.util.ArrayList; import java.util.Arrays; import java.io.File; import java.io.BufferedReader; import java.io.FileReader; import java.util.Scanner; import java.io.IOException; import java.io.FileNotF...
); }
<|file_name|>junk-tests.ts<|end_file_name|><|fim▁begin|>/// <reference types="node" /> <|fim▁hole|> junk.is('foo'); // $ExpectType boolean junk.not('foo'); // $ExpectType boolean junk.regex; // $ExpectType RegExp fs.readdir('some/path', (err, files) => { files.filter(junk.not); });<|fim▁end|>
import fs = require('fs'); import * as junk from 'junk';
<|file_name|>opcodes.rs<|end_file_name|><|fim▁begin|>use {Node, ValueInfo}; #[derive(Copy,Clone,Debug,PartialEq,Eq)] pub enum OpCode { Add, Sub, Mul, Div, Shl, Shr, Ret,<|fim▁hole|> /// Zero extension. /// `(sext 16 %value)` Zext, /// Set a register. /// `(set %reg, %valu...
/// Signed extension, /// `(sext 16 %value)` Sext,
<|file_name|>edgeop_lsys.rs<|end_file_name|><|fim▁begin|>extern crate rand; extern crate evo; extern crate petgraph; #[macro_use] extern crate graph_annealing; extern crate pcg; extern crate triadic_census; extern crate lindenmayer_system; extern crate graph_edge_evolution; extern crate asexp; extern crate expression; ...
println!("{}", pp(&Sexp::from(("solutions", Sexp::Array(solutions))))); //println!("])");
<|file_name|>ServiceRepeatCreateException.java<|end_file_name|><|fim▁begin|>package com.xiaojinzi.component.error; public class ServiceRepeatCreateException extends RuntimeException { public ServiceRepeatCreateException() { } public ServiceRepeatCreateException(String message) { super(message);<|...
}
<|file_name|>RequestDB.py<|end_file_name|><|fim▁begin|>######################################################################## # $HeadURL $ # File: RequestDB.py # Author: Krzysztof.Ciba@NOSPAMgmail.com # Date: 2012/12/04 08:06:30 ######################################################################## """ :mod: Reques...
trans.append( "DELETE FROM `Operation` WHERE `RequestID` = %s AND `OperationID` = %s;" % ( requestID, operationID ) ) # # last bit: request itself if requestID:
<|file_name|>Mfdlsrtm.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python 'Finite difference RTM as a linear operator' <|fim▁hole|> # Madagascar bin directory bindir=os.path.join(rsf.prog.RSFROOT,'bin') # Madagascar DATAPATH datapath=rsf.path.datapath().rstrip('/') # Madagascar commands cp=os.path.join(bindir,'sfcp') r...
import os, sys, tempfile, subprocess import rsf.prog, rsf.path
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import logging<|fim▁hole|> logger = logging.getLogger(__name__)<|fim▁end|>
import os from gym import error
<|file_name|>retry.rs<|end_file_name|><|fim▁begin|>// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::async_client::{defaults, Error}; use std::time::Duration; pub trait RetryStrategy: std::fmt::Debug + Send + Sync { fn max_retries(&self, err: &Error) -> u32; fn dela...