prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>NodeContent.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enu...
// const shouldUpdate = shallowCompare(this, nextProps, nextState)
<|file_name|>actions_path_test.go<|end_file_name|><|fim▁begin|>package horizon import ( "testing" . "github.com/smartystreets/goconvey/convey" "github.com/stellar/horizon/test" ) func TestPathActions(t *testing.T) { test.LoadScenario("paths") app := NewTestApp() defer app.Close() rh := NewRequestHelper(app) ...
"&destination_amount=10"
<|file_name|>killmail.go<|end_file_name|><|fim▁begin|>package hammer import ( "context" "log" "github.com/antihax/evedata/internal/datapackages" ) func init() { registerConsumer("killmail", killmailConsumer) } func killmailConsumer(s *Hammer, parameter interface{}) { parameters := parameter.([]interface{}) ha...
return
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for sticky-cluster 0.3 // Project: https://github.com/uqee/sticky-cluster // Definitions by: Austin Turner <https://github.com/paustint> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 /// <reference ...
concurrency?: number; port?: number;
<|file_name|>thread_pool.rs<|end_file_name|><|fim▁begin|>// Copyright 2020, The Gtk-rs Project Developers. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or <https://opensource.org/licenses/MIT> use glib_sys; use translate::*; use fut...
#[derive(Debug)] pub struct ThreadPool(ptr::NonNull<glib_sys::GThreadPool>);
<|file_name|>HeapLongBuffer.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2014 The Android Open Source Project * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute i...
public LongBuffer slice() {
<|file_name|>package.js<|end_file_name|><|fim▁begin|>require("../pc.v0"); require("util").puts(JSON.stringify({ "name": "pc", "version": pc.version, "description": "property creation for reusable d3.js code.", "keywords": ["d3", "visualization"], "homepage": "http://milroc.github.com/pc/", "author": {"name": "M...
"vows": "0.6.0" }
<|file_name|>cmediaserverdelegate.cpp<|end_file_name|><|fim▁begin|>#include <vector> #include <fstream> #include <logger.h> #include <iupnpdevicedelegate.h> #include <cupnpservice.h> #include <crapidxmlhelper.h> #include "cmediaserverdelegate.h" #define XSTR(x) #x #define STR(x) XSTR(x) #define UPNP_MEDIA_SERVER_DE...
{ LOGGER_ERROR("Error reading file. descrXmlPath=" << descrXmlPath); }
<|file_name|>CCashDbWorkerTH.hpp<|end_file_name|><|fim▁begin|>// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually #pragma once #include <common/common.h> #include <CashDbWorker.hpp> #include <_param_cash_update.hpp> START_ATF_NAMESPACE struct CCashDbWorke...
END_ATF_NAMESPACE
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- { 'name': 'Import OFX Bank Statement', 'category': 'Banking addons', 'version': '8.0.1.0.1', 'license': 'AGPL-3', 'author': 'OpenERP SA,' 'Odoo Community Association (OCA)', 'website': 'https://github....
<|file_name|>pca9543a.py<|end_file_name|><|fim▁begin|>""" Created on 19 Nov 2020 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) Two-Channel I2C-Bus Switch With Interrupt Logic and Reset https://www.ti.com/product/PCA9543A """ <|fim▁hole|> # ----------------------------------------------------------------...
from scs_host.bus.i2c import I2C
<|file_name|>lorem.ts<|end_file_name|><|fim▁begin|>import { LoremIpsum } from 'lorem-ipsum'; /**<|fim▁hole|> */ export const lorem = new LoremIpsum({ sentencesPerParagraph: { max: 4, min: 2, }, wordsPerSentence: { max: 16, min: 4, }, });<|fim▁end|>
* 生成占位符的方法
<|file_name|>allprimes.py<|end_file_name|><|fim▁begin|>#print's all prime numbers in a given range limit _author__ = "Dilipbobby" <|fim▁hole|>lower = int(input("Enter lower range: ")) upper = int(input("Enter upper range: ")) #condtion to print all prime numbers that are in btw given number limits for num in ra...
#Take the input from the user:
<|file_name|>ptm_voronoi_cell.cpp<|end_file_name|><|fim▁begin|>// clang-format off /* Voro++ Copyright (c) 2008, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. Redistribution a...
<|file_name|>test_unix_echo_server.rs<|end_file_name|><|fim▁begin|>use {TryRead, TryWrite}; use mio::*; use mio::deprecated::{EventLoop, Handler}; use mio::deprecated::unix::*; use bytes::{Buf, ByteBuf, MutByteBuf, SliceBuf}; use slab; use std::path::PathBuf; use std::io; use tempdir::TempDir; const SERVER: Token = To...
impl Handler for Echo { type Timeout = usize;
<|file_name|>app-dispatcher.js<|end_file_name|><|fim▁begin|>var Dispatcher = require('flux').Dispatcher; var assign = require('object-assign') var AppDispatcher = assign(new Dispatcher(), { handleViewAction: function(action) { this.dispatch({<|fim▁hole|> handleServerAction: function(action) { this.dispatch...
actionType: 'VIEW_ACTION', action: action }); },
<|file_name|>amqp.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 2011 - 2012, Red Hat, Inc. # # Licensed under the Apa...
self.prev_msgids = collections.deque([], maxlen=self.DUP_MSG_CHECK_SIZE)
<|file_name|>qmljstoolsplugin.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding va...
&resetCodeModelAction, Constants::RESET_CODEMODEL);
<|file_name|>migration_cli.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of EUDAT B2Share. # Copyright (C) 2017 CERN, SurfsSara # # B2Share 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 F...
<|file_name|>second_urls_for_apphook_tests.py<|end_file_name|><|fim▁begin|>from django.conf import settings from django.conf.urls.defaults import handler500, handler404, patterns, include, \ url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/', include(admin.site...
{'document_root': settings.CMS_MEDIA_ROOT, 'show_indexes': True}), url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}), url(r'^', include('cms.test_utils.project.second_cms_urls_for_apphook_tests')),
<|file_name|>qdocumentconstructor.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of th...
QAbstractXmlReceiver *const receiver = context->outputReceiver(); DocumentContentValidator validator(receiver, context, ConstPtr(this));
<|file_name|>weather.py<|end_file_name|><|fim▁begin|>"""Platform for retrieving meteorological data from Environment Canada.""" import datetime import re from env_canada import ECData # pylint: disable=import-error import voluptuous as vol from homeassistant.components.weather import ( ATTR_FORECAST_CONDITION, ...
<|file_name|>binary_tree_postorder_traversal_iter.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #coding: utf-8 # Definition for a binary tree node class TreeNode:<|fim▁hole|> self.right = None class Solution: # @param root, a tree node # @return a list of integers def postorderTraversal(se...
def __init__(self, x): self.val = x self.left = None
<|file_name|>SessionShiny.cpp<|end_file_name|><|fim▁begin|>/* * SessionShiny.cpp * * Copyright (C) 2009-12 by RStudio, Inc. * * Unless you have received this program directly from RStudio pursuant * to the terms of a commercial license agreement with RStudio, then * this program is licensed to you under the term...
using namespace core;
<|file_name|>query_test.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2020 Uber Technologies, Inc. // // 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 with...
"--namePrefix", "foo", "StrKey:eq:foo", } main()
<|file_name|>test_quantity_ufuncs.py<|end_file_name|><|fim▁begin|># The purpose of these tests are to ensure that calling ufuncs with quantities # returns quantities with the right units, or raises exceptions. import warnings import pytest import numpy as np from numpy.testing.utils import assert_allclose from ... i...
# comparison with 0., inf, nan is OK even for dimensional quantities
<|file_name|>fr-VU.js<|end_file_name|><|fim▁begin|><|fim▁hole|> * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // THIS CODE IS GENERATED - DO NOT MODIFY // See angular/...
/**
<|file_name|>IMethodCall.java<|end_file_name|><|fim▁begin|>package openperipheral.adapter; public interface IMethodCall { public IMethodCall setEnv(String name, Object value);<|fim▁hole|>}<|fim▁end|>
public Object[] call(Object... args) throws Exception;
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate byteorder; mod error; mod mqtt; mod read; mod write; mod topic; mod msg; pub use error::{ Error, Result }; pub use msg::{ Message }; pub use mqtt::{ Packet, Connect, Connack, Publish, Subscribe, Suback, Unsubscribe...
} } }
<|file_name|>generate-tx.py<|end_file_name|><|fim▁begin|># Note - to use this script you need Jeff Garzik's python-bitcoinrpc # https://github.com/jgarzik/python-bitcoinrpc import os import sys; import json; from bitcoinrpc.authproxy import AuthServiceProxy; # SET THESE VALUES rpc_user = "bitcoinrpc"; rpc_pass = "A7X...
exit (0);
<|file_name|>datetime.rs<|end_file_name|><|fim▁begin|>// This is a part of Chrono. // See README.md and LICENSE.txt for details. //! ISO 8601 date and time with time zone. use std::{str, fmt, hash}; use std::cmp::Ordering; use std::ops::{Add, Sub}; use std::time::{SystemTime, UNIX_EPOCH}; use oldtime::Duration as Old...
{ serializer.serialize_i64(dt.timestamp_nanos()) }
<|file_name|>scheduler_state.rs<|end_file_name|><|fim▁begin|>use time::precise_time_ns; <|fim▁hole|>data! ( SchedulerState { current_time : u64 = precise_time_ns() max_fps : u64 = 60 target_frame_time : u64 = 1000000000 / max_fps last_frame_time : u64 = preci...
<|file_name|>streamexcept.py<|end_file_name|><|fim▁begin|>import functions import heapq import vtbase ### Classic stream iterator registered = True class StreamExcept(vtbase.VT): def BestIndex(self, constraints, orderbys): return (None, 0, None, True, 1000) def VTiter(self, *parsedArgs, **envars): ...
<|file_name|>lint_output_format.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. //<|fim▁hole|>// except according to those terms. #![crate_id="lint_output_format#0.1"] #![c...
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed
<|file_name|>test_devstack.py<|end_file_name|><|fim▁begin|># Copyright 2013: Mirantis 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://w...
@mock.patch("rally.deploy.engines.devstack.objects.Endpoint") def test_deploy(self, m_endpoint, m_server, m_gs, m_gus, m_gp): m_gp.return_value = fake_provider = mock.Mock()
<|file_name|>envInformationModule.js<|end_file_name|><|fim▁begin|>var exec = require('child_process').exec; exports.setHostname = function(envSettings){ var command = 'hostname'; exec(command,[], function (error, stdout, stderr) { if(error){ console.log('error when executing: ' + command); console.log('outpu...
envSettings.serverPath = result; }); };
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Liquid Processing Errors. #![warn(missing_docs)] #![warn(missing_debug_implementations)] #![warn(unused_extern_crates)] mod clone;<|fim▁hole|>pub use clone::*; pub use error::*; pub use result_ext::*; use trace::*;<|fim▁end|>
mod error; mod result_ext; mod trace;
<|file_name|>extern-stress.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/l...
extern fn cb(data: libc::uintptr_t) -> libc::uintptr_t { if data == 1u { data } else {
<|file_name|>migration.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # Unless...
""" Check if SRC object with `src_id` === DST object with `dst_id`. :return: boolean
<|file_name|>sticky_spec.js<|end_file_name|><|fim▁begin|>import { isSticky } from '~/lib/utils/sticky'; describe('sticky', () => { const el = { offsetTop: 0, classList: {}, }; beforeEach(() => { el.offsetTop = 0; el.classList.add = jasmine.createSpy('spy'); el.classList.remove = jasmine.crea...
<|file_name|>viewport.ts<|end_file_name|><|fim▁begin|>import type { GeneralWindow } from './shared/types'; import getCurrentDocument from './getCurrentDocument'; /** * Get the current viewport element (scrolling element) of the current document, from a given element * * @param doc - Element to find the viewport ...
* ``` */
<|file_name|>HW5_2.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Oct 25 21:46:31 2017 @author: sitibanc """ import pandas as pd import numpy as np import matplotlib.pyplot as plt # ============================================================================= # Read ...
idx2 = np.nonzero(TAIEX[idx, 4] <= p1 - 30)[0] # 最低價跌破停損點 # 設定停利點 idx3 = np.nonzero(TAIEX[idx, 3] >= p1 + 30)[0] # 最高價衝破停利點 if len(idx2) == 0 and len(idx3) == 0: # 當日沒有觸及平損停利點
<|file_name|>Application.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA # # Author: Zhongjie Wang <wzj401@gmail.com> # Tianwei Liu <liutianweidlut@gmail.com> # # This program is free software; y...
from umit.icm.agent.logger import g_logger from umit.icm.agent.BasePaths import *
<|file_name|>connectivity_source_py3.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ...
<|file_name|>dump_source.py<|end_file_name|><|fim▁begin|># Import the JModelica.org Python packages import pymodelica<|fim▁hole|># Create a compiler and compiler target object mc = ModelicaCompiler() # Build trees as if for an FMU or Model Exchange v 1.0 #target = mc.create_target_object("me", "1.0") source = mc.parse...
from pymodelica.compiler_wrappers import ModelicaCompiler
<|file_name|>HomeDrawerRouter.js<|end_file_name|><|fim▁begin|>import React, { Component } from "react"; import Home from "../components/home/"; import BlankPage2 from "../components/blankPage2"; import { DrawerNavigator } from "react-navigation"; import DrawBar from "../components/DrawBar"; export default (DrawNav = Dr...
BlankPage2: { screen: BlankPage2 } },
<|file_name|>aStarNode.hpp<|end_file_name|><|fim▁begin|>/// @file aStarNode.hpp /// @brief Contains the class of nodes use by the astar pathfinder. /// @author Enrico Fraccaroli /// @date Nov 11 2016 /// @copyright /// Copyright (c) 2016 Enrico Fraccaroli <enrico.fraccaroli@gmail.com> /// Permission is hereby gran...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|><|fim▁hole|># # Copyright 2012 Nebula, 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/licens...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved.
<|file_name|>test.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2013-2014 Sandstorm Development Group, Inc. and contributors // Licensed under the MIT License: // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), t...
assert!(bool_list.get(1));
<|file_name|>donations-inline.js<|end_file_name|><|fim▁begin|>var InlineDonation = function(){ this.clientToken = document.getElementById('client_token').value; this.setupEvents(); } InlineDonation.prototype.setupEvents = function(){ jQuery(document.body).on('keyup', '#donation-form input', this.clearInvalidE...
inlineDonation.showErrorMessage(response.message); }
<|file_name|>TemplateString.jest.ts<|end_file_name|><|fim▁begin|>/* * Copyright 2019 Simon Edwards <simon@simonzone.com> * * This source code is licensed under the MIT license which is detailed in the LICENSE.txt file. */ import "jest";<|fim▁hole|>describe.each([ ["foo", [{ type: "text", text: "foo", startColu...
import { Segment, TemplateString, TextSegment, FieldSegment } from "../TemplateString";
<|file_name|>Heading2.py<|end_file_name|><|fim▁begin|># encoding: utf-8 from yast import import_module import_module('UI') from yast import * class Heading2Client: def main(self): UI.OpenDialog( VBox( Heading("This Is a Heading."), Label("This is a Label."), PushButton("...
<|file_name|>path_tool.py<|end_file_name|><|fim▁begin|>__author__ = 'Dongwoo Kim' import itertools from collections import defaultdict import numpy as np def num_neighbor(T, idx, link_val=1): """ find neighborhood of given idx (node) """ outlink = len(np.nonzero(T[idx, :, :] == link_val)) inlink...
while not find: i, j, k = np.random.permutation(range(T.shape[0]))[:3] a, b, c = np.random.randint(T.shape[2], size=3)
<|file_name|>forums.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # ************************************************************************** # Copyright © 2016 jianglin # File Name: forums.py # Author: jianglin # Email: xiyang0807@gmail.com # Created: 2016-12-17 13:12:23 (CST) # Last U...
# Description:
<|file_name|>NwEvent.js<|end_file_name|><|fim▁begin|>OJ.extendClass( 'NwEvent', [OjEvent], { '_get_props_' : { 'data' : null }, '_constructor' : function(type/*, bubbles = false, cancelable = false, data = null*/){ var ln = arguments.length; this._super(OjEvent, '_constructor', ln > 3 ? [].slice.cal...
} }
<|file_name|>gce.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless req...
} if configFile.Global.NetworkProjectID != "" { cloudConfig.NetworkProjectID = configFile.Global.NetworkProjectID }
<|file_name|>codeReference.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ create rst files for documentation of DIRAC """ import os import shutil import socket import sys import logging import glob from diracdoctools.Utilities import writeLinesToFile, mkdir, makeLogger from diracdoctools.Config import Conf...
modulefinal = modulename
<|file_name|>expedia.py<|end_file_name|><|fim▁begin|>from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.select import Select # Configure the baseURL baseUrl = "https://www.expedia.es" # Create a webDriver instance and maximize window driver = webdriver.Firefox()...
<|file_name|>filter_transcript_counts.py<|end_file_name|><|fim▁begin|><|fim▁hole|>print "Gene\tTranscript\tExpression" for l in sys.stdin: t = l.strip().split('\t') if float(t[2]) > 1.1: print '\t'.join(t[0:3])<|fim▁end|>
# python filter_transcript_counts.py < transcript_counts.txt > active_transcripts.txt import sys
<|file_name|>identity.py<|end_file_name|><|fim▁begin|># Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache...
"NONE" - no activation function. "TANH" - tanh activation function. "SIGMOID" - sigmoid activation function.
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015-2017 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compa...
from . import account_analytic_attribution from . import account_analytic_distribution_line
<|file_name|>reflect.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """<|fim▁hole|>""" import operator import string from optparse import OptionParser from sqlalchemy import create_engine, MetaData from tsadisplay import describe, render, __version__ def run(): """Command for reflection database objects"...
Program for generating plantuml or dot format of a database tables by connection string \n\nDatabase connection string - http://goo.gl/3GpnE
<|file_name|>verification.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity 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, eith...
check_ok(basic_test(&create_test_block_with_data(&header, &good_transactions, &good_uncles), engine)); header.set_gas_limit(min_gas_limit - From::from(1)); check_fail(basic_test(&create_test_block(&header), engine),
<|file_name|>xbox-remote-power.py<|end_file_name|><|fim▁begin|>import sys, socket, select, time from optparse import OptionParser <|fim▁hole|> help_text = "xbox-remote-power.py -a <ip address> -i <live id>" py3 = sys.version_info[0] > 2 def main(): parser = OptionParser() parser.add_option('-a', '--address', ...
XBOX_PORT = 5050 XBOX_PING = "dd00000a000000000000000400000002" XBOX_POWER = "dd02001300000010"
<|file_name|>decorators.py<|end_file_name|><|fim▁begin|># Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Function/method decorators that provide timeout and retry logic.<|fim▁hole|>import itertools impo...
""" import functools
<|file_name|>TwitchCore.java<|end_file_name|><|fim▁begin|>package gavilan.irc; import java.util.Set; import javax.annotation.PreDestroy; import org.pircbotx.PircBotX; public interface TwitchCore { void doGreet(ChatMessage cm); Set<String> getPendings(); void message(String channel, String message);<|fim▁hol...
<|file_name|>astencode.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2015 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/...
Ok(ty) }).unwrap();
<|file_name|>popover.js<|end_file_name|><|fim▁begin|>$(function () { 'use strict'; QUnit.module('popover plugin') QUnit.test('should be defined on jquery object', function (assert) { assert.expect(1) assert.ok($(document.body).popover, 'popover method is defined') }) QUnit.module(...
$popover.bootstrapPopover('hide') assert.strictEqual($('.popover').length, 0, 'popover was removed')
<|file_name|>minwinbase.rs<|end_file_name|><|fim▁begin|>// Copyright © 2016-2017 winapi-rs developers // Licensed under the Apache License, Version 2.0 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // All file...
pub const LMEM_VALID_FLAGS: UINT = 0x0F72; pub const LMEM_INVALID_HANDLE: UINT = 0x8000;
<|file_name|>ScriptBinding.py<|end_file_name|><|fim▁begin|>"""Extension to execute code outside the Python shell window. This adds the following commands: - Check module does a full syntax check of the current module. It also runs the tabnanny to catch any inconsistent tabs. - Run module executes the module...
<|file_name|>ProgressBarTest.py<|end_file_name|><|fim▁begin|>########################################################################## # # Copyright (c) 2011-2012, Image Engine Design Inc. All rights reserved.<|fim▁hole|># Redistribution and use in source and binary forms, with or without # modification, are perm...
#
<|file_name|>qsdateutil.py<|end_file_name|><|fim▁begin|>''' (c) 2011, 2012 Georgia Tech Research Corporation This source code is released under the New BSD license. Please see http://wiki.quantsoftware.org/index.php?title=QSTK_License for license details. Created on Jan 1, 2011 @author:Drew Bratcher @contact: dbratc...
<|file_name|>bot.py<|end_file_name|><|fim▁begin|>class Bot: def setup(self, initial_data): pass <|fim▁hole|><|fim▁end|>
def update(self, state, response): pass
<|file_name|>slack.py<|end_file_name|><|fim▁begin|>import json import requests class SlackNotification(object):<|fim▁hole|> self.slack_url = slack_url self.channel = channel if not self.channel.startswith("#"): self.channel = "#%s" % (self.channel,) def notify(self, data): ...
icon_url = "https://github-bogdal.s3.amazonaws.com/freepacktbook/icon.png" def __init__(self, slack_url, channel):
<|file_name|>get-rnd-thumbnail.js<|end_file_name|><|fim▁begin|>'use babel'; //import reddit from './api/reddit'; import giphy from './api/giphy'; import ohMaGif from './api/oh-ma-gif'; import reactionGifs from './api/reaction-gifs'; const apis = [ //reddit, giphy, ohMaGif, reactionGifs ]; export defa...
atom.notifications.addError(err, {
<|file_name|>polyfills.ts<|end_file_name|><|fim▁begin|>/** * This file includes polyfills needed by Angular and is loaded before the app. * You can add your own extra polyfills to this file. * * This file is divided into 2 sections: * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted b...
import 'core-js/es7/reflect'; /**
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) Open Solutions Finland 2013. # # This program is free software: you can redistribute it an...
'product_extension_view.xml', 'invoice_extension_view.xml' ],
<|file_name|>gmm.py<|end_file_name|><|fim▁begin|>""" synrcat gaussian mixture model """ import sys import os import numpy as np import logging from collections import OrderedDict from astropy.table import Table from pypeline import pype, add_param, depends_on from syn import Syn from syncat.errors import NoPoints ...
<|file_name|>get_worker_test_list.py<|end_file_name|><|fim▁begin|>""" This script strips the console log of a pytest-xdist Jenkins run into the test<|fim▁hole|>Assumes the following format: [test-suite] [worker] RESULT test """ import io import os import re import shutil import click @click.command() @click.option...
lists of each pytest worker.
<|file_name|>AbstractFrame.java<|end_file_name|><|fim▁begin|>/* * Created on May 17, 2004 * * Paros and its related class files. * * Paros is an HTTP/HTTPS proxy for assessing web application security. * Copyright (C) 2003-2004 Chinotec Technologies Company * * This program is free software; you can redistribut...
<|file_name|>clean_raxml_parsimony_tree.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # File created on 10 Nov 2011 from __future__ import division __author__ = "Jesse Stombaugh" __copyright__ = "Copyright 2011, The QIIME project"<|fim▁hole|>__maintainer__ = "Jesse Stombaugh" __email__ = "jesse.stombaugh@color...
__credits__ = ["Jesse Stombaugh"] __license__ = "GPL" __version__ = "1.9.1-dev"
<|file_name|>dataset.py<|end_file_name|><|fim▁begin|>import os import numpy as np class Dataset(object): """ This class represents a dataset and consists of a list of SongData along with some metadata about the dataset """ def __init__(self, songs_data=None): if songs_data is None: ...
@property def num_frames(self):
<|file_name|>controllers.py<|end_file_name|><|fim▁begin|>"""<|fim▁hole|>created by: Chris Lemelin (cxl8826@rit.edu) created on: 04/20/18 """ from flask_socketio import emit from app.decorators import ensure_dict from app import socketio, db from app.committee_notes.models import * from app.committees.models import * f...
filename: controllers.py description: Controllers for committee notes.
<|file_name|>credentials-in-url.https.window.js<|end_file_name|><|fim▁begin|>// META: script=/service-workers/service-worker/resources/test-helpers.sub.js // META: script=resources/utils.js 'use strict'; // "If parsedURL includes credentials, then throw a TypeError."<|fim▁hole|>// "A URL includes credentials if its us...
// https://fetch.spec.whatwg.org/#dom-request // (Added by https://github.com/whatwg/fetch/issues/26).
<|file_name|>FromAddressSpinner.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2012, 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/li...
<|file_name|>executors.py<|end_file_name|><|fim▁begin|>"""Single and multi-threaded executors.""" import datetime import functools import logging import math import os import threading from abc import ABCMeta, abstractmethod from threading import Lock from typing import ( Dict, Iterable, List, MutableSe...
): if process.metadata.get(ORIGINAL_CWLVERSION) == "v1.0": raise WorkflowException( "`cwl:requirements` in the input object is not part of CWL "
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import annotations from os import getenv import gc import sys from unittest import TestCase, main from unittest import skip as skip from unittest import skipIf as skipIf import logging from progressivis import Scheduler, log_level from progressivis...
class ProgressiveTest(TestCase): CRITICAL = logging.CRITICAL ERROR = logging.ERROR
<|file_name|>showMeMore.js<|end_file_name|><|fim▁begin|>jQuery.fn.showMeMore = function (options) { var options = $.extend({ current: 4, // number to be displayed at start count: 4, // how many show in one click fadeSpeed: 300, // animation speed showButton: '', // show button (...
if (enableHide == false) { showButton.hide();
<|file_name|>mod.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 https://mozilla.org/MPL/2.0/. */ //! Style sheets and their CSS rules. mod counter_style_rule; m...
Namespace = 10, // https://drafts.csswg.org/css-counter-styles-3/#extentions-to-cssrule-interface
<|file_name|>0003_auto__add_orderset.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding mod...
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), ...
<|file_name|>PlacementPoliciesImpl.java<|end_file_name|><|fim▁begin|>// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.avs.implementation; import com.azure.core.http.rest.PagedIt...
public final class PlacementPoliciesImpl implements PlacementPolicies { @JsonIgnore private final ClientLogger logger = new ClientLogger(PlacementPoliciesImpl.class);
<|file_name|>ResteasyUriInfo.java<|end_file_name|><|fim▁begin|>package org.jboss.resteasy.spi; import org.jboss.resteasy.specimpl.MultivaluedMapImpl; import org.jboss.resteasy.specimpl.PathSegmentImpl; import org.jboss.resteasy.specimpl.ResteasyUriBuilder; import org.jboss.resteasy.util.Encode; import javax.ws.rs.cor...
if (pathParameterPathSegments == null)
<|file_name|>escape.py<|end_file_name|><|fim▁begin|>from rpython.flowspace.model import Variable from rpython.rtyper.lltypesystem import lltype from rpython.translator.simplify import get_graph from rpython.tool.uid import uid class CreationPoint(object): def __init__(self, creation_method, TYPE, op=None): ...
if isonheap(block.inputargs[0]): self.escapes(self.getstate(block.inputargs[0]))
<|file_name|>p2.d.ts<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2014,Egret-Labs.org * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain t...
<|file_name|>font.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/. */ //! Specified values for font properties use Atom; use app_unit...
.clone_font_size() .keyword_info .map(|i| i.compose(factor, Au(0).into())) };
<|file_name|>callResult.ts<|end_file_name|><|fim▁begin|>export class CallResult {<|fim▁hole|> public LoggingUser: string = ""; public Priority: string = ""; public PriorityCss: string = ""; public State: string = ""; public StateCss: string = ""; public Timestamp: string = ""; public Color: ...
public Id: string = ""; public Name: string = "";
<|file_name|>base_class.py<|end_file_name|><|fim▁begin|>"""Base class for IKEA TRADFRI.""" from __future__ import annotations from collections.abc import Callable from functools import wraps import logging from typing import Any from pytradfri.command import Command from pytradfri.device import Device from pytradfri....
<|file_name|>http-client.js<|end_file_name|><|fim▁begin|>import {HttpClientConfiguration} from './http-client-configuration'; import {RequestInit, Interceptor} from './interfaces'; import 'core-js'; /** * An HTTP client based on the Fetch API. * * @constructor */ export class HttpClient { activeRequestCount: number ...
headers.set(name, defaultHeaders[name]); }
<|file_name|>breadcrumb.py<|end_file_name|><|fim▁begin|><|fim▁hole|>class Breadcrumb: def __init__(self, text, url): self.text = text self.url = url<|fim▁end|>
<|file_name|>delivery.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Vaucher # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the term...