prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>plotMesonetOrgData.py<|end_file_name|><|fim▁begin|>import matplotlib.pyplot as plt import numpy as np from matplotlib.lines import lineStyles Light_cnames={'mistyrose':'#FFE4E1','navajowhite':'#FFDEAD','seashell':'#FFF5EE','papayawhip':'#FFEFD5','blanchedalmond':'#FFEBCD','white':'#FFFFFF','mintcream':'#F...
day_data.append((sta_name,mon+day,data)) X=[(i*5.0/60.0) for i in range(1,len(day_data[0][2]),1)]
<|file_name|>0017_merge_20181221_1508.py<|end_file_name|><|fim▁begin|># Generated by Django 2.1.4 on 2018-12-21 14:08 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('mainapp', '0016_auto_20181202_2205'), ('mainapp', '0016_auto_20181221_1432'),<|fim▁hole|...
]
<|file_name|>issue-8506.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org...
<|file_name|>predictor.rs<|end_file_name|><|fim▁begin|>// The MIT License (MIT) //<|fim▁hole|>// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitat...
// Copyright (c) 2015 dinowernli //
<|file_name|>markdown_to_html.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, ...
src_dir = os.path.dirname(util().page_to_html_path(page)) return linked_page.name, os.path.relpath(dest, src_dir)
<|file_name|>ExReadFermiCatalog.py<|end_file_name|><|fim▁begin|># author David Sanchez david.sanchez@lapp.in2p3.fr # ------ Imports --------------- # import numpy from Plot.PlotLibrary import * from Catalog.ReadFermiCatalog import * from environ import FERMI_CATALOG_DIR # ------------------------------ # #look for thi...
em,ep,flux,dflux = Cat.GetDataPoints('3FGL') #energy in TeV since the user ask for that in the call of Cat ener = numpy.sqrt(em*ep) dem = ener-em
<|file_name|>car.rs<|end_file_name|><|fim▁begin|>use super::camera::Camera; use crate::color::*; use cgmath::{Vector2, Vector3}; // Present a car that can be drawed, check for collision // with other car and bullet, turn left/right, move forward // and jump. pub trait Car { fn render(&self, _: &Camera) -> Vec<([Ve...
} } fn forward(&mut self, dt: f64, outside_speed: f64) { self.position.z -= dt * (self.speed + outside_speed);
<|file_name|>call.py<|end_file_name|><|fim▁begin|># Copyright 2015 Google Inc. All Rights Reserved. #<|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 distribu...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate log; extern crate flexi_logger; extern crate ansi_term; extern crate wrust_types; extern crate wrust_conf;<|fim▁hole|>use wrust_types::{Error, Result}; use wrust_conf::{Conf, FromConf}; use conf::{LogConf, LogDevice}; /// Initialize logging system using co...
pub mod conf; use log::{LogLevel, LogRecord};
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # from datetime import datetime, timedelta from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django....
logger.info('Saving record to user<%s>:%s...'%(user.id, user.username))
<|file_name|>test_groups.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2013-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions # of the GNU General Public License v.2, or (at your ...
} output = self.app.post('/package/rpms/guake/give', data=data, follow_redirects=True)
<|file_name|>generated.rs<|end_file_name|><|fim▁begin|>// ================================================================= // // * WARNING * // // This file is generated! // // Changes made to this file will be overwritten. If changes are // required to the generated code...
pub thing_name: String, }
<|file_name|>webapis-rtc-peer-connection.js<|end_file_name|><|fim▁begin|>/** * @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 */ (function (global, factory) { typeof exports === ...
if (!RTCPeerConnection) { return; } var addSymbol = api.symbol('addEventListener');
<|file_name|>logic.rs<|end_file_name|><|fim▁begin|>//! Logic module. #[cfg(feature = "gps")] mod acquiring_fix; #[cfg(not(feature = "gps"))] mod eternal_loop; #[cfg(feature = "gps")] mod fix_acquired; #[cfg(feature = "gps")] mod going_down; #[cfg(feature = "gps")] mod going_up; mod init; #[cfg(feature = "gps")] mod la...
#[cfg(not(feature = "gps"))] fn it_as_str_eternal_loop() { assert_eq!("ETERNAL_LOOP", State::EternalLoop.as_str()); }
<|file_name|>to_hilbert.rs<|end_file_name|><|fim▁begin|>extern crate byteorder; extern crate COST; use std::fs::File; use std::io::BufWriter; use byteorder::{WriteBytesExt, LittleEndian}; use COST::graph_iterator::NodesEdgesMemMapper; fn main() { if std::env::args().len() != 2 && std::env::args().len() != 3 { ...
<|file_name|>example_ros_spinnaker_interface.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author Stephan Reith @date 31.08.2016 This is a simple example to demonstrate how the ROS Spinnaker Interface can be used. You will also need a ROS Listener and a ROS Talker to send and re...
pynn.Projection(ros_interface, pop, pynn.OneToOneConnector(weights=5, delays=1))
<|file_name|>commission_site_urlbuilder.go<|end_file_name|><|fim▁begin|>// Code generated by go-swagger; DO NOT EDIT. package operations // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command import ( "errors" "net/url" golangswaggerpaths "path...
}
<|file_name|>qa_vco.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr, gr_unittest, blocks import math def sig_source_f(samp_rate, freq, amp, N): t = ...
<|file_name|>rest.py<|end_file_name|><|fim▁begin|>import urllib import urllib2 import json import functools def buildUrl(url, params = []): if(len(params) > 0): if url.find('?') < 0: # no '?' in the url url += '?' first = True else: first ...
def urlopen(self, url, data = None): return json.loads(super(JsonUrlOpenFactory, self).urlopen(url, json.dumps(data) if not data is None else None)) def dumpHttpError(f):
<|file_name|>turbo.rs<|end_file_name|><|fim▁begin|>fn main() { a::<B<>><|fim▁hole|>}<|fim▁end|>
<|file_name|>zoom_out_tool.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import {ZoomBaseTool, ZoomBaseToolView} from "./zoom_base_tool" import {tool_icon_zoom_out} from "styles/icons.css" import * as p from "core/properties" export class ZoomOutToolView extends ZoomBaseToolView { override model: ZoomBaseTool } expor...
<|file_name|>yusat_deframer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2021-2022 Daniel Estevez <daniel@destevez.net> # # This file is part of gr-satellites # # SPDX-License-Identifier: GPL-3.0-or-later # from gnuradio import gr, digital import pmt from ...hier.sync_to...
<|file_name|>flags.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 Tamás Gulácsi 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<|fim▁h...
Unless required by applicable law or agreed to in writing, software
<|file_name|>models.go<|end_file_name|><|fim▁begin|>package main import ( "database/sql" "fmt" ) //go:generate reform type yesNo bool func (yn *yesNo) Scan(src interface{}) error { var str string switch s := src.(type) { case string: str = s case []byte: str = string(s) default: return fmt.Errorf("unex...
var _ sql.Scanner = (*yesNo)(nil) //reform:information_schema.tables
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>var gulp = require('gulp'); var setup = require('web3-common-build-setup'); var DEPS_FOLDER = setup.depsFolder; // Build tools var _ = require(DEPS_FOLDER + 'lodash'); var insert = require(DEPS_FOLDER + 'gulp-insert'); var del = require(DEPS_...
gulpInstance.task('dist', ['tscompile:templates', 'tscompile:app', 'resources']);
<|file_name|>CustomLoginBean.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2005-2010 Alfresco Software Limited. * * This file is part of Alfresco * * Alfresco is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free So...
}
<|file_name|>freezer_table.go<|end_file_name|><|fim▁begin|>// Copyright 2019 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library 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|>vca_fw.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Copyright (c) 2015 VMware, Inc. All Rights Reserved. # # This file is part of Ansible # # Ansible 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 Fo...
<|file_name|>CudaEMAlgorithm.cpp<|end_file_name|><|fim▁begin|>/* ----------------------------------------------------------------------- Copyright: 2010-2015, iMinds-Vision Lab, University of Antwerp 2014-2015, CWI, Amsterdam<|fim▁hole|>This file is part of the ASTRA Toolbox. The ASTRA Toolbox is free soft...
Contact: astra@uantwerpen.be Website: http://sf.net/projects/astra-toolbox
<|file_name|>DragSourceImpl.d.ts<|end_file_name|><|fim▁begin|>import type { DragDropMonitor, DragSource, Identifier } from 'dnd-core'; import type { Connector } from '../../internals'; import type { DragSourceMonitor } from '../../types'; import type { DragSourceHookSpec } from '../types'; export declare class Drag...
spec: DragSourceHookSpec<O, R, P>;
<|file_name|>unit_tests.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/. */ extern crate webrtc_sdp; #[cfg(test)] fn check_parse_and_...
let sdp = sdp_opt.unwrap(); assert_eq!(sdp.get_version(), 0); assert_eq!(sdp.get_session(), &None);
<|file_name|>consts.ts<|end_file_name|><|fim▁begin|>import * as countries from './countries.json'; import * as routes from './routes.json';<|fim▁hole|> routes: routes.routes };<|fim▁end|>
export const Consts = { countries: countries,
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>from conf import paths import scipy.io import numpy as np def load_train(): """ Loads all training data. """ tr_set = scipy.io.loadmat(file_name = paths.TR_SET) tr_identity = tr_set['tr_identity'] tr_labels = tr_set['tr_labels'] tr_images = tr_set[...
return test_images
<|file_name|>testing_support.py<|end_file_name|><|fim▁begin|>""" Functions that aid testing in various ways. A typical use would be:: lowcore = create_named_configuration('LOWBD2-CORE') times = numpy.linspace(-3, +3, 13) * (numpy.pi / 12.0) frequency = numpy.array([1e8]) channe...
freq_interval = 0.0001
<|file_name|>Auth.js<|end_file_name|><|fim▁begin|>class Auth { isAuthenticate () { return this.getToken() !== null }<|fim▁hole|> setToken (token) { window.localStorage.setItem('access_token', token) } getToken () { return window.localStorage.getItem('access_token') } removeToken () { win...
<|file_name|>save.py<|end_file_name|><|fim▁begin|>""" Simple utils to save and load from disk. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals # TODO(rbharath): Use standard joblib once old-data has been regenerated. import joblib from sklearn.externals...
return joblib.load(filename)
<|file_name|>rand_reader.go<|end_file_name|><|fim▁begin|>package restic import ( "io" "math/rand" "github.com/restic/restic/internal/errors" ) // RandReader allows reading from a rand.Rand. type RandReader struct { rnd *rand.Rand buf []byte } // NewRandReader creates a new Reader from a random source. func New...
func (rd *RandReader) read(p []byte) (n int, err error) { if len(p)%7 != 0 { panic("invalid buffer length, not multiple of 7")
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! Rsure is a set of utilities for capturing information about files, and later verifying it is<|fim▁hole|>//! The easiest way to use Rsure is to build the `rsure` executable contained in this crate. This //! program allows you to use most of the functionality of the c...
//! still true. //!
<|file_name|>sdi_rc.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Resource object code # # Created: Sun May 12 18:04:51 2013 # by: The Resource Compiler for PyQt (Qt v5.0.2) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x03\x54\ \x8...
\x39\x17\xdc\x1a\x16\x98\x80\x40\x6c\xa6\x43\xca\x20\x2b\x83\x1e\ \x28\xcc\xda\xd1\x96\xd2\xd2\x4a\x7b\xfa\x01\xa5\xd0\xef\x16\x1e\ \xdf\xff\xdb\x1d\xc7\xcc\x04\x2a\x87\x93\x3c\x39\x6f\x21\x9c\xe7\
<|file_name|>scrapeMps.js<|end_file_name|><|fim▁begin|>/* eslint-disable */ // not run locally - here for reference function pageFunction(context) { // called on every page the crawler visits, use it to extract data from it var $ = context.jQuery; var result = { constituency: $('#commons-constituency').tex...
parlTel: $('#ctl00_ctl00_FormContent_SiteSpecificPlaceholder_PageContent_addParliamentaryAddress_rptAddresses_ctl00_pnlTelephone').text(), conAddress: $('#ctl00_ctl00_FormContent_SiteSpecificPlaceholder_PageContent_addConstituencyAddress_rptAddresses_ctl00_pnlAddress').text(), conTel: $('#ctl00_ctl00_...
<|file_name|>pyarena.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
pub enum PyArena {}
<|file_name|>tensor_types.d.ts<|end_file_name|><|fim▁begin|>/** * @license<|fim▁hole|> * Copyright 2018 Google LLC. 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|>roi_gcibs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ''' 'roi_gcibs.py' compares two groups informed by an a priori bootstrap analysis. ''' import os import sys import argparse import tempfile, shutil import json import pprint import copy from collections import defaultd...
logTee = True, ) def f_stage0callback(**kwargs): for key, val in kwargs.iteritems():
<|file_name|>decorators.py<|end_file_name|><|fim▁begin|>from django.http import HttpResponseRedirect def anonymous_required(view, redirect_to= None): return AnonymousRequired(view, redirect_to) class AnonymousRequired(object):<|fim▁hole|> redirect_to = settings.LOGIN_REDIRECT_URL self.view = vi...
def __init__(self, view, redirect_to): if redirect_to is None: from django.conf import settings
<|file_name|>runner.py<|end_file_name|><|fim▁begin|>import os import subprocess # This is an example for using Kataja to launch a visualisation from a python script that doesn't use kataja # structures, but can output bracket trees. Kataja is launched as a separate process so it doesn't stop the # main script. def ...
elif os.name == 'nt' and hasattr(os, 'P_DETACH'): return os.spawnv(os.P_DETACH, 'python', args)
<|file_name|>Role.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python #-*- coding: utf-8 -*- ########################################################### # © 2011 Daniel 'grindhold' Brendle and Team # # This file is part of Skarphed. # # Skarphed is free software: you can redistribute it and/or <|fim▁hole|># version 3 of...
# modify it under the terms of the GNU Affero General Public License # as published by the Free Software Foundation, either
<|file_name|>ModuleFile.cpp<|end_file_name|><|fim▁begin|>//===- ModuleFile.cpp - Module description --------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2....
// has been loaded from an AST file. //
<|file_name|>PreviousPosition.java<|end_file_name|><|fim▁begin|>/** __ __ * _____ _/ /_/ /_ Computational Intelligence Library (CIlib) * / ___/ / / / __ \ (c) CIRG @ UP * / /__/ / / / /_/ / http://cilib.net * \___/_/_/_/_.___/ */ package net.sourceforge.cilib.problem.boundaryconstraint; i...
<|file_name|>CollapsibleToolbar.js<|end_file_name|><|fim▁begin|>//>>built define(<|fim▁hole|>);<|fim▁end|>
"dojox/editor/plugins/nls/hr/CollapsibleToolbar", ({ "collapse": "Spusti traku s alatima editora", "expand": "Proširi traku s alatima editora" })
<|file_name|>healthToMongo.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # 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/. # Copyright (c) 2014 Mozilla Corporatio...
import logging import requests import sys
<|file_name|>histogram.py<|end_file_name|><|fim▁begin|># Plot histogram import os import numpy as np from plantcv.plantcv.threshold import binary as binary_threshold from plantcv.plantcv import params from plantcv.plantcv import fatal_error from plantcv.plantcv._debug import _debug import pandas as pd from plotnine im...
# Create dataframe hist_df = pd.DataFrame( {'pixel intensity': px_int, 'proportion of pixels (%)': prop, 'hist_count': hist_count, 'color channel': channel})
<|file_name|>tool_bar.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2015, 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 <http://opensource.org/licenses/MIT> //! Create bars of buttons and other wi...
} pub fn get_drop_index(&self, x: i32, y: i32) -> i32 { unsafe {
<|file_name|>print.py<|end_file_name|><|fim▁begin|>""" Boolean geometry utilities. """ from __future__ import absolute_import #Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module. import __init__ import sys __au...
return valueString def line(valueString): 'Print line.'
<|file_name|>sf2_glm.hpp<|end_file_name|><|fim▁begin|>/** SF2 annotations for glm types ******************************************** * * * Copyright (c) 2015 Florian Oetke * * This file is distributed ...
<|file_name|>download.rs<|end_file_name|><|fim▁begin|>use chrono::naive::NaiveDateTime; use chrono::Local; use database::Database; use rutracker::RutrackerForum; use std::collections::HashMap; use std::collections::HashSet; type Result<T> = std::result::Result<T, failure::Error>; pub struct Downloader<'a> { db: &...
<|file_name|>test_dump.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl import datetime import decimal from io import BytesIO from openpyxl.xml.functions import tostring, xmlfile from openpyxl.utils.indexed_list import IndexedList from openpyxl.utils.datetime...
<v>1</v> </c> <c r="B2" t="n"> <v>3</v>
<|file_name|>test_complextype_user_osismodelbase.py<|end_file_name|><|fim▁begin|>from JumpScale import j class test_complextype_user_osismodelbase(j.code.classGetJSRootModelBase()): """ group of users """ def __init__(self): pass self._P_id=0 self._P_organization="" self...
else: msg="property organization input error, needs to be str, specfile: /opt/jumpscale/apps/osis/logic/test_complextype/model.spec, name model: user, value was:" + str(value) raise TypeError(msg)
<|file_name|>update_search.py<|end_file_name|><|fim▁begin|>import os import sys # Put communityshare in sys this_directory = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.abspath(os.path.join(this_directory, '..'))) from community_share import config, store, Base from community_share.models.user...
) store.session.add(new_label) store.session.commit() # Associate Labels with Users instead of with searches.
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Backend loading # Based on the Django cache framework # https://github.com/django/django/blob/5d263dee304fdaf95e18d2f0619d6925984a7f02/django/core/cache/__init__.py import sys from importlib import import_module import warnings from django.utils import six from ...
conf = search_backends[backend]
<|file_name|>ByteBufferAsCharBuffer.java<|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...
} else { ((ByteArrayBuffer) byteBuffer).put(src, srcOffset, charCount); }
<|file_name|>test_user_messages.py<|end_file_name|><|fim▁begin|>""" Unit tests for user messages. """ import warnings import ddt from django.contrib.messages.middleware import MessageMiddleware from django.test import RequestFactory, TestCase from common.test.utils import normalize_repr from openedx.core.djangolib....
PageLevelMessages.register_user_message(self.request, UserMessageType.INFO, "something else") assert self.global_message_count() == 1
<|file_name|>uuid.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; @Injectable() export class UuidService { constructor() { } /* tslint:disable:no-bitwise */<|fim▁hole|> for (i = 0; i < 32; i++) { random = Math.random() * 16 | 0; if (i === 8 || i === 12 || i ==...
get() { let uuid = ''; let i; let random;
<|file_name|>test_help_msg.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 required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
<|file_name|>AppInstanceMetricsDAOImpl.java<|end_file_name|><|fim▁begin|>package org.cloudfoundry.autoscaler.data.couchdb.dao.impl; import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; import org.cloudfoundry.autoscaler.data.couchdb.dao.AppInstanceMetricsDAO; import org.cloudfoundry.auto...
// TODO Auto-generated method stub return this.metricsRepoAll.getAllRecords();
<|file_name|>zone0.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # coding=UTF-8 # import copy import time import socket import logging import vdns.common class Zone0: """ Base class for producing zone files """ def __init__(self, dt): self.dt=dt def fmttd(self, td): """ ...
times=('ttl', 'refresh', 'retry', 'expire', 'minimum') for i in times:
<|file_name|>bdz.py<|end_file_name|><|fim▁begin|>from b_hash import b_hash from b_hash import NoData from jenkins import jenkins from h3_hash import h3_hash from jenkins import jenkins_fast, jenkins_wrapper from graph import * from collections import deque from bitstring import BitArray import math class bdz(b_hash):...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 TiKV Project Authors. Licensed under Apache-2.0. mod batch; mod config; mod fsm; mod mailbox; mod router; #[cfg(feature = "test-runner")] pub mod test_runner;<|fim▁hole|>pub use self::config::Config; pub use self::fsm::{Fsm, Priority}; pub use self::m...
pub use self::batch::{create_system, BatchRouter, BatchSystem, HandlerBuilder, PollHandler};
<|file_name|>pyparser_geoparser_testing.py<|end_file_name|><|fim▁begin|>#parser_testing.py import os, sys, re, StringIO sys.path.append('/Users/Jason/Dropbox/JournalMap/scripts/GeoParsers') #from jmap_geoparser_re import * from jmap_geoparser import * #def test_parsing(): test = "blah blah blah 45º 23' 12'', 123º 23' ...
for result, start, end in coordinateParser.scanString(test): assert coordinate(result).calcDD() == {'latitude': 21.0, 'longitude': 112.5} test = '27°43.886, 34°15.663'
<|file_name|>pkg_build.go<|end_file_name|><|fim▁begin|>package main import ( "flag" "fmt" "os" "path/filepath" "github.com/linuxkit/linuxkit/src/cmd/linuxkit/pkglib" ) func pkgBuild(args []string) { flags := flag.NewFlagSet("pkg build", flag.ExitOnError) flags.Usage = func() { invoked := filepath.Base(os.Ar...
if err != nil { fmt.Fprintf(os.Stderr, "%v\n", err) os.Exit(1)
<|file_name|>test_stack_lock.py<|end_file_name|><|fim▁begin|># # 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 requ...
slock = stack_lock.StackLock(self.context, self.stack_id, self.engine_id) def check_thread_lock():
<|file_name|>character.component.ts<|end_file_name|><|fim▁begin|>import { Component, Input } from '@angular/core'; import { Character } from '../../../data/models/character';<|fim▁hole|> selector: 'lc-character', templateUrl: 'character.component.html', styleUrls: [ 'character.component.scss' ], }) export class Ch...
import { LinkLocation } from '../../directive/insertLinks/insertLinks.directive'; @Component({
<|file_name|>VehicleMakePage.java<|end_file_name|><|fim▁begin|>package uk.gov.dvsa.ui.pages.vehicleinformation; import org.openqa.selenium.Keys;<|fim▁hole|>import org.openqa.selenium.support.FindBy; import uk.gov.dvsa.domain.model.vehicle.Make; import uk.gov.dvsa.domain.navigation.PageNavigator; import uk.gov.dvsa.fra...
import org.openqa.selenium.WebElement;
<|file_name|>application.js<|end_file_name|><|fim▁begin|>// This is a manifest file that'll be compiled into application.js, which will include all the files<|fim▁hole|>// listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascr...
<|file_name|>GSTTools.py<|end_file_name|><|fim▁begin|>''' Various tools to interface with pyGSTi for running GST experiments. Created on May 16, 2018 Original Author: Guilhem Ribeill Copyright 2018 Raytheon BBN Technologies Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file ex...
"""
<|file_name|>SQLUtility.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2004 Actuate Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1...
* @param parameters */ private static void proccessParamDefn( ParameterDefinition defn, DataSetParameters parameters )
<|file_name|>functions.rs<|end_file_name|><|fim▁begin|>use std::rc::Rc; use std::collections::{HashSet, HashMap}; extern crate symbolic_polynomials; extern crate num; use symbolic_polynomials::*; use num::Integer; #[allow(dead_code)] type TestMonomial = Monomial<String, i64, u8>; #[allow(dead_code)] type TestPolynomia...
let values = deduce_values(&implicit_values).unwrap(); assert_eq!(a.eval(&values), Ok(a_val)); assert_eq!(b.eval(&values), Ok(b_val));
<|file_name|>content.ts<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2007-2022 Crafter Software Corporation. All Rights Reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as published by * the Free Software Foundati...
site, targetParentPath, (element) => {
<|file_name|>cms_plugins.py<|end_file_name|><|fim▁begin|>from cms.plugin_pool import plugin_pool from cms.plugin_base import CMSPluginBase from django.template import loader from django.template.loader import select_template from django.utils.translation import ugettext_lazy as _ from . import models from .conf import ...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import logging as _logging import sys __author__ = 'luckydonald' __all__ = ["logging", "ColoredFormatter", "ColoredStreamHandler", "LevelByNameFilter"] DEFAULT_DATE_FORMAT = "%Y-%m-%d %H:%M:%S" class ColoredFormatter(_logging.Formatter):...
"FATAL": _logging.FATAL, # = CRITICAL "CRITICAL": _logging.CRITICAL, }[level_string]
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # -*- coding: utf-8 -*- ############################################################################## # # sci.AI EXE # Copyright(C) 2017 sci.AI # # This program is free software: you can redistribute it and / or modify # it un...
db = MongoEngine(app) redis_conn = Redis()
<|file_name|>core.py<|end_file_name|><|fim▁begin|># Copyright 2021 DeepMind Technologies Limited # # 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/LICENS...
_work_unit_arguments(job, self._args))
<|file_name|>metric_service_client.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.ap...
<|file_name|>run.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Eve Demo (Secured) ~~~~~~~~~~~~~~~~~~ This is a fork of Eve Demo (https://github.com/pyeve/eve-demo) intended to demonstrate how a Eve API can be secured by means of Flask-Sentinel. For demonstration purposes, beside...
with a BearerToken class instance, we are also adding a static html
<|file_name|>ssl.spec.js<|end_file_name|><|fim▁begin|>const ASSERT = require('assert'); describe('SSL Specs', function () { const PATH = require('path'); let Acts = require('./../index'); let testcert = PATH.join(__dirname, 'certs', 'test.cert'); let testkey = PATH.join(__dirname, 'certs', 'test.key');...
privatekey: testkey, certificate: testcert, certificationauthority: []
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>__author__ = 'herald olivares' # -*- coding: utf-8 -*- from django.contrib import admin from upc.sunat.models import Person, Concept, Debt class PersonAdmin(admin.ModelAdmin): list_display = ('name', 'ruc', 'phone', 'type') class ConceptAdmin(admin.ModelAdmin): ...
admin.site.register(Concept, ConceptAdmin) admin.site.register(Debt, DebtAdmin)
<|file_name|>base.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- """Generic base class for cli hammer commands.""" import logging from robottelo import ssh from robottelo.cli import hammer from robottelo.config import conf <|fim▁hole|> class CLIReturnCodeError(Exception): """Indicates that a CLI command...
class CLIError(Exception): """Indicates that a CLI command could not be run."""
<|file_name|>err.rs<|end_file_name|><|fim▁begin|>// information from https://raw.githubusercontent.com/torvalds/linux/master/ // /include/uapi/linux/can/error.h use std::convert::TryFrom; use super::CanFrame; use std::error::Error; use std::{error, fmt}; #[inline] /// Helper function to retrieve a s...
StartOfFrame, /// ID bits 28-21 (SFF: 10-3)
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Stub.<|fim▁hole|>pub use self::memvector::*; pub use self::readonly::*;<|fim▁end|>
mod memvector; mod readonly;
<|file_name|>failure.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/license...
use kinds::Send; use option::{Some, None}; use result::Ok; use rt::backtrace;
<|file_name|>models.go<|end_file_name|><|fim▁begin|>// +build go1.9 // Copyright 2018 Microsoft Corporation // // 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.or...
) type AgentVersionStatus = original.AgentVersionStatus
<|file_name|>removebucketencryption.go<|end_file_name|><|fim▁begin|>//go:build example // +build example /* * MinIO Go Library for Amazon S3 Compatible Cloud Storage * Copyright 2020 MinIO, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance wi...
<|file_name|>scarf.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
# scarf1{background-image: url('https://rollforfantasy.com/images/clothing/nmale/scarf1.png');} scarf = ["scarf{}.png".format(i) for i in range(1, 31)]
<|file_name|>baseline.py<|end_file_name|><|fim▁begin|># Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unles...
<|file_name|>LimitSet.py<|end_file_name|><|fim▁begin|># Copyright (C) 2010-2011 Richard Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limita...
<|file_name|>available-demos.js<|end_file_name|><|fim▁begin|>export default [ { name: 'hello-wold-functional', displayName: 'Hello World (functional)', directory: 'hello-world', files: ['hello-world-functional.js'] }, { name: 'hello-wold-class', displayName: '...
displayName: 'Clock',
<|file_name|>JavaCSVTransform.java<|end_file_name|><|fim▁begin|>package com.igonics.transformers.simple; import java.io.PrintStream; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli...
<|file_name|>TestUtils.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2015 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 o...
import com.ibm.ws.lars.rest.model.Asset; import com.ibm.ws.lars.rest.model.AssetList; /**
<|file_name|>RGA.py<|end_file_name|><|fim▁begin|>import time import numpy from rga_telnet import * # Connecting to RGA - RGA(HOST,PORT) class RGA: scan = True # This is used for stop of peak scan - if set to False status = [0 for col in range(4)] # Status of the device, look in rga_status method showReadout = T...
<|file_name|>icontrol_driver.py<|end_file_name|><|fim▁begin|># coding=utf-8# # Copyright (c) 2014-2018, F5 Networks, 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.apa...
# get currrent member status
<|file_name|>highmaps.src.js<|end_file_name|><|fim▁begin|>/** * @license Highmaps JS v5.0.1 (2016-10-26) * * (c) 2011-2016 Torstein Honsi * * License: www.highcharts.com/license */ 'use strict'; (function(root, factory) { if (typeof module === 'object' && module.exports) { module.exports = root.docume...
/** * Draw the borders and backgrounds for chart and plot area