prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>boxplot.py<|end_file_name|><|fim▁begin|>import numpy as np import pandas as pd from bokeh.plotting import * # Generate some synthetic time series for six different categories cats = list("abcdef") y = np.random.randn(2000) g = np.random.choice(cats, 2000) for i, l in enumerate(cats): y[g == l] += i //...
q1 = groups.quantile(q=0.25) q2 = groups.quantile(q=0.5) q3 = groups.quantile(q=0.75) iqr = q3 - q1
<|file_name|>gothamadsBidAdapter.js<|end_file_name|><|fim▁begin|>import { registerBidder } from '../src/adapters/bidderFactory.js'; import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js'; import * as utils from '../src/utils.js'; import { config } from '../src/config.js'; const BIDDER_CODE = 'gothamads'; const A...
utils.deepSetValue(data, 'regs.ext.us_privacy', bidRequest.uspConsent); }
<|file_name|>word2pinyin.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # PEP 8 check with Pylint """Word to pinyin. """ from numpy import mat, zeros, where from pypinyin import pinyin, lazy_pinyin # from .mytools import time_me def sum_cosine(matrix, threshold): """Calcul...
zero_row = zeros([1, col]) zero_col = zeros([row, 1]) max_score = matrix.max() while max_score > threshold:
<|file_name|>qp_decorators.py<|end_file_name|><|fim▁begin|>from decorator import decorator from inspect import getargspec # ------------------------------------------------------------------------ # decorators # ------------------------------------------------------------------------ def lazy_property(func): """D...
val_index = all_args.index(val)
<|file_name|>setAuthorization.js<|end_file_name|><|fim▁begin|>import axios from 'axios' export const setAuthorization = token => { if (token) { axios.defaults.headers.common['Authorization'] = `Bearer ${token}` } else { delete axios.defaults.headers.common['Authorization'] }<|fim▁hole|><|fi...
}
<|file_name|>credentials.go<|end_file_name|><|fim▁begin|>package trivette import ( "encoding/json" "io/ioutil" ) type Credentials struct { User, Token string } func e(err error) {<|fim▁hole|> } } func ReadCredentials(path string) *Credentials { raw, err := ioutil.ReadFile(path) var credentials Credentials err...
if nil != err { panic(err)
<|file_name|>ps3_driver.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #<|fim▁hole|># # This file is under the GPLv3 licence. # import rospy from std_msgs.msg import String from std_msgs.msg import Int32MultiArray #sudo apt-get install python-pyaudio import pyaudio from rospy.numpy_msg import numpy_msg import...
# This file is part of the SSM_LinearArray (Sound Sources Mapping # using a Linear Microphone Array) # developed by Daobilige Su <daobilige DOT su AT student DOT uts DOT edu DOT au>
<|file_name|>app02-functions.js<|end_file_name|><|fim▁begin|>'use strict' // const foo = (msg) => { // Função anónima... MAS o this tem outro significado // const foo = function(msg) { // Função anónima function foo(msg) { // if(msg == undefined) return console.log('Empty msg') if(!msg) return console.log...
foo('ola mundo') foo(3,4,4,5)
<|file_name|>animated_properties.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 cssparser::RGBA; use style::properties::anima...
assert_eq!(interpolate_rgba(RGBA::from_floats(1.0, 0.0, 0.0, 0.8),
<|file_name|>gmainwindow.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************** gmainwindow.cpp (c) 2004-2006 - Daniel Campos Fernández <dcamposf@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GN...
if (!_min_w && !_min_h) {
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! # MongoDB Rust Driver //! //! A driver written in pure Rust, providing a native interface to MongoDB. //! //! ## Connecting to MongoDB //! //! The Client is an entry-point to interacting with a MongoDB instance. //! //! ```no_run //! # use mongodb::{Client, ClientOpt...
<|file_name|>shared.js<|end_file_name|><|fim▁begin|>"use strict";; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var types_1 = __importDefault(require("./types")); ...
"null": function () { return null; }, "emptyArray": function () { return []; }, "false": function () { return false; }, "true": function () { return true; },
<|file_name|>browser.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 compositing::compositor_thread::EmbedderMsg; use composit...
} (KeyModifiers::NONE, None, Key::End) => {
<|file_name|>admins.py<|end_file_name|><|fim▁begin|>from canvas_sdk import client, utils def make_account_admin(request_ctx, account_id, user_id, role=None, role_id=None, send_confirmation=None, **request_kwargs): """ Flag an existing user as an admin within the account. :param request_ctx: The reques...
Remove the rights associated with an account admin role from a user. :param request_ctx: The request context
<|file_name|>proof_map_index.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 The Exonum Team // // 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/LICEN...
proptest!( self.config(), |((mut keys, data) in strategy, absent_keys in absent_keys_strategy)| { write_data(&db, data);
<|file_name|>Function.java<|end_file_name|><|fim▁begin|>/** * Licensed to Odiago, Inc. under one or more contributor license * agreements. See the NOTICE.txt file distributed with this work for * additional information regarding copyright ownership. Odiago, Inc. * licenses this file to you under the Apache Licens...
package com.odiago.flumebase.lang;
<|file_name|>ServiceNow.ts<|end_file_name|><|fim▁begin|>export interface IServiceNowCredentials { username: string; password: string; url: string; } export interface ICreatedTicket { tableName: string; ticketNumber: string; url: string; } <|fim▁hole|> Complete, Rejected } export interfa...
export enum StageStatus { NotStarted, InProgress,
<|file_name|>hashalgo.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide,...
is equivalent to:
<|file_name|>AsyncRequest.js<|end_file_name|><|fim▁begin|>// // Jala Project [http://opensvn.csie.org/traccgi/jala] // // Copyright 2004 ORF Online und Teletext GmbH // // Licensed under the Apache License, Version 2.0 (the ``License''); // you may not use this file except in compliance with the License. // You may obt...
if (delay != null) {
<|file_name|>fvMeshDistribute.H<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd ...
const wordList& cellZoneNames, const labelList& sourceFace,
<|file_name|>C.controller.js<|end_file_name|><|fim▁begin|>sap.ui.define([ 'jquery.sap.global',<|fim▁hole|> 'sap/ui/model/json/JSONModel' ], function(jQuery, Fragment, Controller, Filter, JSONModel) { "use strict"; var CController = Controller.extend("sap.m.sample.InputAssistedTwoValues.C", { inputId: '', on...
'sap/ui/core/Fragment', 'sap/ui/core/mvc/Controller', 'sap/ui/model/Filter',
<|file_name|>no_shorthand_arrow_function.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
(this => {});
<|file_name|>rs_enum.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python3 # -*- coding: utf-8 -*- import gettext from enum import Enum, unique _ = gettext.gettext strategy_descriptions = [_("New resourcelist strategy"), _("New changelist strategy"), _("Incremental...
""" names = dir(SelectMode) return [x for x in names if not x.startswith("_")]
<|file_name|>cbuster.cpp<|end_file_name|><|fim▁begin|>#include "../vidhrdw/cbuster.cpp" /*************************************************************************** Crude Buster (World version FX) (c) 1990 Data East Corporation Crude Buster (World version FU) (c) 1990 Data East Corporation Crude Buster (Japan...
0,0,0,0, { {
<|file_name|>sentiment-satisfied-outlined.js<|end_file_name|><|fim▁begin|>import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon';<|fim▁hole|> cx: "15.5", cy: "9.5", r: "1.5" }), h("circle", { cx: "8.5", cy: "9.5", r: "1.5" }), h("path", { d: "M12 16c-1.48 0-2.75-.81-3.45-2H6.88c.8 2.05 ...
export default createSvgIcon(h(h.f, null, h("circle", {
<|file_name|>counters.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/. */ //! Generic types for counters-related CSS values. #[cfg(f...
ToShmem, )] pub struct CounterPair<Integer> { /// The name of the counter.
<|file_name|>auth.js<|end_file_name|><|fim▁begin|>/** * Created by IvanIsrael on 06/04/2017. */ 'use strict'; const express = require('express'); const router = express.Router(); const user_controller = require("../controllers/users"); const methods = user_controller.methods; const controllers = user_controller.cont...
})); router.get('/logout', function(req, res, next){ try {
<|file_name|>test_util.py<|end_file_name|><|fim▁begin|>from unittest import TestCase class Test(TestCase):<|fim▁hole|><|fim▁end|>
pass
<|file_name|>upload.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import sys import os import subprocess import time filename = sys.argv[1] print("extracting " + filename) p = subprocess.Popen(["unzip", filename, "-dintro"], stdout=subprocess.PIPE) p.communicate() p = subprocess.Popen(["php","-f","uploadtod...
<|file_name|>get_folder.py<|end_file_name|><|fim▁begin|>from ..errors import ErrorFolderNotFound, ErrorInvalidOperation, ErrorNoPublicFolderReplicaAvailable from ..util import MNS, create_element from .common import EWSAccountService, folder_ids_element, parse_folder_elem, shape_element class GetFolder(EWSAccountServ...
<|file_name|>ie.d.ts<|end_file_name|><|fim▁begin|>import * as webdriver from './index'; /** * A WebDriver client for Microsoft's Internet Explorer. */ export class Driver extends webdriver.WebDriver { /** * @param {(capabilities.Capabilities|Options)=} opt_config The configuration * options...
* @return {!capabilities.Capabilities} The capabilities.
<|file_name|>acf-address.js<|end_file_name|><|fim▁begin|>function init_map(field_id) { //console.log(field_id); } /*acf.fields.address = acf.field.extend({ type: 'address', $el: null, $input: null, status: '', // '', 'loading', 'ready' geocoder: false, map: false, maps: {}, pending: $(), ac...
* * @type event * @date 20/07/13
<|file_name|>zkclient.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import os import gevent import logging import kazoo.client import kazoo.exceptions import kazoo.handlers.gevent import kazoo.recipe.election from kazoo.client import KazooState from kazoo.retry imp...
current_value = self.read_node(path) if current_value == value: return True; raise ResourceExistsError(path, str(current_value), 'zookeeper')
<|file_name|>jupyter_configure.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM SYSTEMS INC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance ...
<|file_name|>bus.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import zmq import threading import logging import logging.handlers import util class Logger(threading.Thread): """logger for all messages and events""" def __init__(self, stop_logging, filename='bus.log'): super(Logger,...
frontend.bind("tcp://*:5559") # socket facing services
<|file_name|>linear_operator_test_util.py<|end_file_name|><|fim▁begin|># Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ht...
for use_placeholder in self._use_placeholder_options:
<|file_name|>PhotoView.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright 2011, 2012 Chris Banes. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You ...
return mAttacher.getMaximumScale(); }
<|file_name|>issue-54521-3.rs<|end_file_name|><|fim▁begin|>// run-rustfix // This test checks that the following error is emitted and the suggestion works: // // ``` // let _ = vec![1, 2, 3].into_iter().collect::<Vec<usize>>>>(); // ^^ help: remove extra angle bra...
// ```
<|file_name|>RTreeGridRecordWriter.java<|end_file_name|><|fim▁begin|>package org.apache.hadoop.mapred.spatial; import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapre...
<|file_name|>lawnchair.js<|end_file_name|><|fim▁begin|>/** * Lawnchair! * --- * clientside json store * */ var Lawnchair = function () { // lawnchair requires json if (!JSON) throw 'JSON unavailable! Include http://www.json.org/json2.js to fix.' // options are optional; callback is not if (argum...
<|file_name|>pants_daemon.py<|end_file_name|><|fim▁begin|># Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import logging import os import sys import threading from contextlib import contextmanager from dataclasses import dataclass from...
@classmethod def create(cls, options_bootstrapper, full_init=True): """
<|file_name|>ordinal_split_handler_test.py<|end_file_name|><|fim▁begin|># Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # h...
example_partitions, gradients, hessians, empty_gradients,
<|file_name|>dag.js<|end_file_name|><|fim▁begin|>'use strict'; var _ = require('./underscore-mixins.js'); var fnToNode = new Map(); exports.load = function (nodes, prefix) { let uuid = require('uuid'); if (prefix != null && prefix.length > 0) { prefix = prefix + ':'; } else { prefix = '...
<|file_name|>Options.js<|end_file_name|><|fim▁begin|>jQuery(document).ready(function(){ var numSaves, _autoSaveChanges;<|fim▁hole|> systemSettingSave = 0; _autoSaveChanges = autoSaveChanges; numSaves = 0; autoSaveChanges = function() { numSaves += 1; return _autoSaveChanges.apply(this, arguments); ...
module("TiddlyWiki options", { setup: function() { config.options.chkAutoSave = true;
<|file_name|>OntologyHelperBuilder.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2016 Lemur Consulting Ltd. * <p> * 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 * <p> * http://w...
String key;
<|file_name|>xrandr.py<|end_file_name|><|fim▁begin|>import os from functools import reduce, lru_cache import logging import re import subprocess from randrctl import DISPLAY, XAUTHORITY from randrctl.exception import XrandrException, ParseException from randrctl.model import Profile, Viewport, XrandrConnection, Displ...
elif in_field and not line.startswith(indent): return val
<|file_name|>test_convert.py<|end_file_name|><|fim▁begin|># # Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # 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 # ...
<|file_name|>bitcoin_zh_CN.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_CN" version="2.0"> <defaucmcodec>UTF-8</defaucmcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Communistcoin<...
<translation>&amp;验证消息</translation> </message>
<|file_name|>convert_to_records.py<|end_file_name|><|fim▁begin|>"""Converts image data to TFRecords file format with Example protos. The image data set is expected to reside in JPEG files located in the following directory structure. data_dir/run/video1/00001.jpeg data_dir/run/video1/00002.jpeg data_dir/run/vid...
colorspace = 'RGB' channels = 3
<|file_name|>issues_loop_mut_cond.rs<|end_file_name|><|fim▁begin|>#![allow(clippy::blocks_in_if_conditions)]<|fim▁hole|>pub fn loop_on_block_condition(u: &mut isize) { while { *u < 0 } { *u += 1; } } /// https://github.com/rust-lang/rust-clippy/issues/2584 fn loop_with_unsafe_condition(ptr: *const u8) ...
#![allow(dead_code)] /// Issue: https://github.com/rust-lang/rust-clippy/issues/2596
<|file_name|>rest.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals, division import hashlib import hmac import time from quadriga.exceptions import RequestError class RestClient(object): """REST client using HMAC SHA256 authentication. :param url: QuadrigaCX URL. ...
http_success_status_codes = {200, 201, 202}
<|file_name|>c1_Optimizer.hpp<|end_file_name|><|fim▁begin|>/* * Copyright 1999-2001 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public Licen...
*
<|file_name|>iostat_darwin.go<|end_file_name|><|fim▁begin|>// +build darwin package readers<|fim▁hole|> "encoding/json" "errors" ) func init() { Register("IOStat", NewIOStat) } func NewIOStat() IReader { ios := &IOStat{} ios.Data = make(map[string]interface{}) return ios } type IOStat struct { Data map[string]...
import (
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) 2011 Uninett AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License version 3 as published ...
<|file_name|>error.py<|end_file_name|><|fim▁begin|># # Copyright (C) 2009, 2010 JAGSAT Development Team (see below) # # This file is part of JAGSAT. # # JAGSAT 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 Foun...
<|file_name|>config-test.js<|end_file_name|><|fim▁begin|>var should = require('should'); var npg = require('../core/npg').npg; var config = require('./_test_config_npg'); var request = ({body: {phrase: "111"}}); describe('NPG w/ config', function () { it('should using fixed key', function () {<|fim▁hole|> }) });<|f...
config.useFixedKey.should.be.ok; }); it('should return correct answer', function () { npg("111",config.key1,config.key2).should.eql({ md5: '747207ac', b64: '!QWOwMWY3AjM3QzN' })
<|file_name|>commands.py<|end_file_name|><|fim▁begin|>import collections import numbers import re import sqlalchemy as sa from sqlalchemy.ext import compiler as sa_compiler from sqlalchemy.sql import expression as sa_expression # At the time of this implementation, no specification for a session token was # found. A...
def _process_fixed_width(spec): return ','.join(('{0}:{1:d}'.format(col, width) for col, width in spec))
<|file_name|>TestLazyPersistFiles.java<|end_file_name|><|fim▁begin|>/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file<|fim▁hole|> * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in complia...
* distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file
<|file_name|>computeNodeListNextOptions.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause ...
}, ocpDate: {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>''' Library for doing fun things with computers. ''' __author__ = 'Andrew M Bates' __version__ = '0.001' import io, os, sys<|fim▁hole|> # the core imports go here # this should go in in the mods dir try: '''IF RASPBERRY PI & HAS A GPIO BOARD''' import RPi.GPIO...
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys <|fim▁hole|> from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that the # issue is really that Django is miss...
if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "MyGarden.settings") try:
<|file_name|>test_glance.py<|end_file_name|><|fim▁begin|># Copyright 2013 OpenStack Foundation # 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...
<|file_name|>audioPlayer.js<|end_file_name|><|fim▁begin|>import React from "react"; import basicComponent from "core/basicComponent"; import Radium from "radium"; import ReactAplayer from "react-aplayer"; import mergeAdvanced from "object-merge-advanced"; class audioPlayer extends basicComponent { constructor(props) ...
const styles = this.getStyles(); return ( <ReactAplayer ref={this.myRef}
<|file_name|>한겨레.ts<|end_file_name|><|fim▁begin|>import * as $ from 'jquery'; import { clearStyles } from '../util'; import { Article } from '..'; export const cleanup = () => { $('#scrollDiv').remove(); } export function parse(): Article { let articleBody = clearStyles($('.article-text')[0].cloneNode(true));...
$('.relation2-area', articleBody).remove();
<|file_name|>JSONHeader.java<|end_file_name|><|fim▁begin|>package cn.oftenporter.servlet; /** * 实现了该接口的对象,被输出时设置内容类型为{@linkplain ContentType#APP_JSON}。<|fim▁hole|>}<|fim▁end|>
*/ public interface JSONHeader {
<|file_name|>rpg_operation.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ RPG: Operation These are any operations we want to carry out from our YAML files. Operations are strings that are tied to Python code, to carry out things that arent possible to easily make YAML tags for directly. """ <|fim▁...
from rpg_log import Log
<|file_name|>user.js<|end_file_name|><|fim▁begin|>'use strict'; <|fim▁hole|>var userSchema = new mongoose.Schema({ name: { type: String, required: true }, email: { type: String, required: true, unique: true, trim: true }, username: { type: String, required: true, unique: tr...
var mongoose = require('mongoose'); var bcrypt = require('bcrypt'); var eat = require('eat');
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Athena Developers. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE...
"setup" => commands::setup::execute(),
<|file_name|>SecretsConfigDump.ts<|end_file_name|><|fim▁begin|>// Original file: deps/envoy-api/envoy/admin/v3/config_dump.proto import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; import type { Any as _google_proto...
*/ 'static_secrets'?: (_envoy_admin_v3_SecretsConfigDump_StaticSecret)[]; /** * The dynamically loaded active secrets. These are secrets that are available to service
<|file_name|>datatype.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|> def __init__(self, type, preprocessor=None): self.type = type self.preprocessor = preprocessor def preprocess(self, value): return self.preprocessor(value) if self.preprocessor else value def ...
class DataType(object):
<|file_name|>pandas_03a_selecting_data2.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
males['Age'].mean()
<|file_name|>pose.py<|end_file_name|><|fim▁begin|>""" Custom made pose attribute for simulation """<|fim▁hole|> import math from vector_3 import Vector3 from polar_vector import PolarVector class Pose: def __init__(self): self.position = Vector3() self.velocity = PolarVector()<|fim▁end|>
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># *** submodules *** # from matrix import constants, decompositions, errors, approximation, nearest # *** functions *** # from matrix.calculate import (is_positive_semidefinite, is_positive_definite, is_invertible, decompose, solve) ...
from ._version import get_versions __version__ = get_versions()['version']
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>DEBUG = False TEMPLATE_DEBUG = DEBUG TIME_ZONE = 'UTC' LANGUAGE_CODE = 'en-US' SITE_ID = 1 USE_L10N = True USE_TZ = True SECRET_KEY = 'local' CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', } } DATABASES = { ...
} }
<|file_name|>secrets.template.py<|end_file_name|><|fim▁begin|># These are the instance-dependent settings. Copy this file to # secrets.py and apply the desired settings. # # Only one variable is required here, SECRET_KEY. Fill this using: # http://www.miniwebtool.com/django-secret-key-generator/ SECRET_KEY = '' # I...
<|file_name|>lot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from openprocurement.auctions.core.utils import ( apply_patch, context_unpack, get_now, json_view, opresource, save_auction, ) from openprocurement.auctions.core.validation import ( validate_lot_data, validate_patch...
if auction.status not in ['active.tendering']: self.request.errors.add('body', 'data', 'Can\'t delete lot in current ({}) auction status'.format(auction.status)) self.request.errors.status = 403
<|file_name|>restricted.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) """ import sys import cPickle import traceback impo...
s['pyver'] = 'Python ' + sys.version.split()[0] + ': ' + sys.executable s['date'] = time.ctime(time.time())
<|file_name|>scu_interrupt.rs<|end_file_name|><|fim▁begin|>#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - SCU Service Request Status"] pub srstat: crate::Reg<srstat::SRSTAT_SPEC>, #[doc = "0x04 - SCU Raw Service Request Status"] pub srraw: crate::Reg<srraw::SRRAW_SPEC>,...
<|file_name|>path.py<|end_file_name|><|fim▁begin|>import unicodedata import re class PathExtension: """ Enables readable url path names instead of ids for object traversal. Names are stored as meta.pool_filename and generated from title by default. Automatic generation can be disabled by setting ...
<|file_name|>test_provider.py<|end_file_name|><|fim▁begin|>import pytest import math import io import time import base64 import hashlib from http import client from unittest import mock import aiohttpretty from waterbutler.core import streams from waterbutler.core import metadata from waterbutler.core import excepti...
<BlobType>BlockBlob</BlobType> <LeaseStatus>unlocked</LeaseStatus> <LeaseState>available</LeaseState>
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>''' Copyright 2015 This file is part of Orbach. Orbach 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<|fim▁hole|> Orbach is ...
(at your option) any later version.
<|file_name|>stream_server.js<|end_file_name|><|fim▁begin|>// Generated by CoffeeScript 1.12.6 (function() { var Bits, CustomReceiver, DEBUG_INCOMING_PACKET_DATA, DEBUG_INCOMING_PACKET_HASH, DEFAULT_SERVER_NAME, Sequent, StreamServer, aac, avstreams, config, crypto, fs, h264, http, logger, mp4, net, packageJson, ref,...
if (DEBUG_INCOMING_PACKET_HASH) {
<|file_name|>ColorSensor.py<|end_file_name|><|fim▁begin|># coding: utf-8 from Sensor import Sensor import nxt class ColorSensor(Sensor): name = 'color'<|fim▁hole|> def Scan(self): return self.sensor.get_sample()<|fim▁end|>
def Initialize(self): #self.sensor = nxt.Light(self.robot.GetBrick(), self.port) #self.sensor.set_illuminated(0) self.sensor = nxt.Color20(self.robot.GetBrick(), self.port)
<|file_name|>firtFile.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
# The scripts begin here
<|file_name|>collections_deque_maxlen.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import collections import random # Set the random seed so we see the same output each time # the script is run. random.seed(1) d1 = collections.deque(maxlen=3) d2 = collections.deque(maxlen=3) for i in range(5): n = random.randint...
<|file_name|>gmap.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Run GMAP/GSNAP commands. GMAP/GSNAP manual: <http://research-pub.gene.com/gmap/src/README> """ import os.path as op import sys import logging from jcvi.formats.sam import get_prefix from jcvi.apps.base import OptionP...
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # cloudtracker documentation build configuration file, created by # sphinx-quickstart on Fri Aug 5 12:45:40 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration v...
# The short X.Y version. version = '1.0' # The full version, including alpha/beta/rc tags.
<|file_name|>migration.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Module providing base class migration for blog entry content""" import lxml from Acquisition import aq_inner from Products.CMFCore.utils import getToolByName from Products.Five.browser import BrowserView from meetshaus.blog.blogpost impor...
<|file_name|>Paths.java<|end_file_name|><|fim▁begin|>package be.idoneus.hipchat.buildbot.hipchat.server; <|fim▁hole|> public static String PATH_CAPABILITIES = ""; public static String PATH_INSTALL = "install"; public static String PATH_WEBHOOK_ROOM_MESSAGE = "webhooks/room_message"; public static String ...
public class Paths {
<|file_name|>problem_0001.rs<|end_file_name|><|fim▁begin|>fn triangle_number(n: i32) -> i32{ n*(n+1)/2 }<|fim▁hole|> let brute_force = (1..1000)//All numbers below 1000 .filter(|&x| (x%3)*(x%5) ==0)//which are multiples of 3 or 5 .fold(0, |acc, item| acc + item);//sum them let mathy = 3*triangle_number(999...
fn main() {
<|file_name|>get_ng_build.py<|end_file_name|><|fim▁begin|>import io import os import requests import shutil import sys import zipfile from waxe_image import __version__ API_RELEASES_URL = 'https://api.github.com/repos/waxe/waxe-image/releases' NG_BUILD_FOLDER = 'website' def main(argv=sys.argv): if len(argv) >...
assert(ng_asset) url = ng_asset['browser_download_url']
<|file_name|>fibonacci.rs<|end_file_name|><|fim▁begin|>fn fib(n: i64) -> i64 { if n == 0 { 0<|fim▁hole|> fib(n - 1) + fib(n - 2) } } fn main() { let argument = 10; println!("fib({}) = {}", argument, fib(argument)); }<|fim▁end|>
} else if n == 1 { 1 } else {
<|file_name|>ProjectBanner.js<|end_file_name|><|fim▁begin|>const m = require('mithril'); const Component = require('../../core/Component'); class ProjectBanner extends Component { view(vnode) { return m('.project', { style: "background-image: url(" + vnode.attrs.bannerImage + ")", ...
]) ]) } }
<|file_name|>database.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import pymongo from pymongo import MongoClient from pymongo import errors import re class Database(object): '''Database creation''' def __init__(self, database_name): self.client = MongoClient('mongodb://localhost,...
def show_dbs(self): return self.client.database_names()
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Lukas Lalinsky # Distributed under the MIT license, see the LICENSE file for details. import re import syslog from logging import Handler from logging.handlers import SysLogHandler<|fim▁hole|> Logging handler that logs to the local syslog using...
class LocalSysLogHandler(Handler): """
<|file_name|>RecentHistory-test.tsx<|end_file_name|><|fim▁begin|>/* * SonarQube * Copyright (C) 2009-2022 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by th...
<|file_name|>real_test.py<|end_file_name|><|fim▁begin|># coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http...
"""Tests for classification of real numbers."""
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Authors: Stéphane Bidoul & Olivier Laurent # Copyright (c) 2012 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is ...
<|file_name|>export-worker.ts<|end_file_name|><|fim▁begin|> //this is here for compilation in a web worker interface CanvasRenderingContext2D { } declare var PDFDocument: PDFKit.PDFDocument; /* module system */ var module = this as NodeModule; module.require = (id: string): any => { if (id in module) { ...
};
<|file_name|>mock_stats_provider.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 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...
return r0, r1 }