prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>general.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 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 # # U...
conductor = c.API
<|file_name|>magCardFactory.js<|end_file_name|><|fim▁begin|><|fim▁hole|> .factory('Kartica', function ($resource) { return $resource('http://localhost:8080/xws/api/magacinska-karticaK/:idMagacinskaKartica', { idMagacinskaKartica: '@idMagacinskaKartica' }, { 'update': { method:'PUT' } }); })<|fim▁end|>
angular.module('resource.magacinska', ['ngResource'])
<|file_name|>bm_stacko_1_1.py<|end_file_name|><|fim▁begin|># http://stackoverflow.com/questions/13202799/python-code-geometric-brownian-motion-whats-wrong import matplotlib.pyplot as plt import numpy as np T = 2 mu = 0.1 sigma = 0.1 S0 = 10<|fim▁hole|>dt = 0.01 alpha = 0.1 N = round(T/dt) t = np.linspace(0, T, N) W = ...
<|file_name|>IsUnique.java<|end_file_name|><|fim▁begin|>public class IsUnique { public static boolean isUnique1(String input) { int checker = 0; int n = input.length(); if (n <= 1) return true; for (int i = 0; i < n; i++) { int c = input.charAt(i) - 'a';<|fim▁hole|> checker |= (1 << c); ...
if ((checker & (1 << c)) > 0) return false;
<|file_name|>baster.py<|end_file_name|><|fim▁begin|>import datetime import Adafruit_BBIO.GPIO as GPIO import tornado.gen class Baster(object): """ Controller for the baster<|fim▁hole|> def __init__(self, baster_pin): """ Initializes the controller for a baster and sets it closed :p...
"""
<|file_name|>initial_added_tables.py<|end_file_name|><|fim▁begin|>"""Added initial tables Revision ID: initial Revises: None Create Date: 2013-10-25 16:52:12.150570 """ # revision identifiers, used by Alembic. revision = 'initial' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ...
sa.Column('location_id', sa.Integer(), nullable=True),
<|file_name|>mivExchangeTimeZone.js<|end_file_name|><|fim▁begin|>/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 3.0 * * The contents of this file are subject to the General Public License * 3.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the Licen...
result += aDate.minute;
<|file_name|>generated.pb.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-2.0 U...
<|file_name|>adcutil.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # アルゴリズムデザインコンテストのさまざまな処理 # # Copyright (C) 2015 Fujitsu import numberlink from datastore import * from hashlib import sha1, sha256 from flask import make_response, render_template import random import datetime from tz import gae_datetime_J...
if q is not None:
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup d = generate_distutils_setup( packages=['orgpmp2'], package_dir={'': 'pythonsrc'},<|fim▁hole|>setup(**d)<|fim▁end|>
)
<|file_name|>AuthenticationWsModuleTest.java<|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 publis...
<|file_name|>tweak.js<|end_file_name|><|fim▁begin|>/** * Conversion: * All dynamic tweaked dom id or class names are prefixed with 't-'. */ /** * Config */ var PRIVATE_TOKEN = 'xYDh7cpVX8BS2unon1hp'; /** * Globals. */ var autocompleteOpts, projectOpts, currentProjectID, currentProjectPath; $(function ...
$('.file-title .options .btn-group a:nth-child(2)').after(slideLink);
<|file_name|>multiprocess.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 from multiprocessing import Process, Pool import os, time def proc(name): print(time.asctime(), 'child process(name: %s) id %s. ppid %s' % (name, os.getpid(), os.getppid())) time.sleep(3) print(time.asctime(), 'child ...
<|file_name|>version.py<|end_file_name|><|fim▁begin|>from os.path import join as pjoin # Format expected by setup.py and doc/source/conf.py: string of form "X.Y.Z" _version_major = 0 _version_minor = 2 _version_micro = '' # use '' for first of series, number for 1 and above<|fim▁hole|>_version_extra = 'dev' #_version...
<|file_name|>4-linkedlist.py<|end_file_name|><|fim▁begin|>import urllib2 url = r"http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=" #number = '12345' #number = '8022' number = '63579' data = urllib2.urlopen(url+number).read() #while (data[0:3]=='and'): #while (data[-8:-6]=='is'): while data.find('nothin...
count = data.find(str) + len(str) + 1 # print count data = urllib2.urlopen(url+data[count:]).read() print data
<|file_name|>sobasis.cc<|end_file_name|><|fim▁begin|>/* * @BEGIN LICENSE * * Psi4: an open-source quantum chemistry software package * * Copyright (c) 2007-2022 The Psi4 Developers. * * The copyrights for code used from other parties are included in * the corresponding files. * * This file is part of Psi4. *...
<|file_name|>subscription_impl_test.cc<|end_file_name|><|fim▁begin|>#include <memory> #include "test/common/config/delta_subscription_test_harness.h" #include "test/common/config/filesystem_subscription_test_harness.h" #include "test/common/config/grpc_subscription_test_harness.h" #include "test/common/config/http_sub...
void startSubscription(const std::set<std::string>& cluster_names) {
<|file_name|>main.py<|end_file_name|><|fim▁begin|># Copyright (c) 2005 The Regents of The University of Michigan # 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 mu...
if arguments and not os.path.isfile(arguments[0]): print "Script %s not found" % arguments[0]
<|file_name|>check-boundary.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python from sensu_plugin import SensuPluginMetricJSON import requests #import os import json from sh import curl from walrus import * #from redis import * import math #from requests.auth import HTTPBasicAuth import statsd import warnings from reques...
<|file_name|>StringSchema.ts<|end_file_name|><|fim▁begin|>import { Type } from "./Type"; import * as _ from "lodash"; export class StringSchema extends Type{ private lengthN: number; private minLengthN: number; private maxLengthN: number; private trimB: boolean; private toUpperCaseB: boolean; private toLo...
if(this.lengthN != null){
<|file_name|>vertex_array_object.rs<|end_file_name|><|fim▁begin|>use std::borrow::Borrow; use std::cell::{Cell, RefCell}; use std::collections::HashMap; use std::mem; use smallvec::SmallVec; use Handle; use buffer::BufferViewAnySlice; use program::Program; use vertex::AttributeType; use vertex::VertexFormat; use GlOb...
let attribute = match program.get_attribute(Borrow::<str>::borrow(name)) { Some(a) => a, None => continue };
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! The `dnm` can be used for easier switching between the DOM //! (Document Object Model) representation and the plain text representation, //! which is needed for most NLP tools. mod c14n; /// Node auxiliaries for DNMs pub mod node; mod parameters; mod range; use libx...
<|file_name|>0002_auto_20150405_1041.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('customers', '0001_initial'), ] operations = [ migration...
migrations.AddField( model_name='recipient', name='address_line1', field=models.CharField(max_length=45, verbose_name=b'Address line 1', blank=True),
<|file_name|>histogram.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, division, absolute_import from george import kernels, GP import numpy as np from kglib import fitters from scipy.integrate import quad<|fim▁hole|>class HistFitter(fitters.Bayesian_LS): def __init__(self, mcmc_samples, bi...
from scipy.optimize import minimize
<|file_name|>interpolate.go<|end_file_name|><|fim▁begin|>package config import ( "fmt" "strconv" "strings" "github.com/hashicorp/terraform/config/lang/ast"<|fim▁hole|>// Implementations of this interface represents various sources where // variables can come from: user variables, resources, etc. type Interpolated...
) // An InterpolatedVariable is a variable reference within an interpolation. //
<|file_name|>Events.js<|end_file_name|><|fim▁begin|>'use strict'; var canUseDOM = require('./canUseDOM'); var one = function() { }; var on = function() { }; var off = function() { }; if (canUseDOM) { var bind = window.addEventListener ? 'addEventListener' : 'attachEvent'; var unbind = window.removeEventListener ?...
<|file_name|>html_erb.rs<|end_file_name|><|fim▁begin|>//! A simple lexer for HTML data with embedded Ruby. Breaks data into three //! segments: HTML, erb tags, and Ruby. Defers to other lexers for the HTML //! and Ruby segments. use lexers; use token::{Category, Token}; use tokenizer::{Tokenizer, StateFunction}; fn i...
} match tokenizer.current_char() { Some(_) => {
<|file_name|>t4_adm.py<|end_file_name|><|fim▁begin|>''' t4_adm.py - this file is part of S3QL (http://s3ql.googlecode.com) Copyright (C) 2008-2009 Nikolaus Rath <Nikolaus@rath.org> This program can be distributed under the terms of the GNU GPLv3. ''' from __future__ import division, print_function, absolute_import ...
print(self.passphrase, file=proc.stdin)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from representation import Representation from patch import Patch<|fim▁end|>
import storage
<|file_name|>pyramidnet1.py<|end_file_name|><|fim▁begin|>import os import math import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable def make_conv_bn_relu(in_channels, out_channels, kernel_size=3, stride=1, padding=1, groups=1): return [ nn.Conv2d(in_channe...
if self.downsample is not None: residual = self.downsample(x) out += residual
<|file_name|>duplexer_redux.js<|end_file_name|><|fim▁begin|>var duplex = require('duplexer') var through = require('through') module.exports = function (counter) { var countries = {} function count(input) { countries[input.country] = (countries[input.country] || 0) + 1 } function end() { counter.setC...
}
<|file_name|>invitationForm.js<|end_file_name|><|fim▁begin|>$(function(){ var InvitationForm = Backbone.View.extend({ <|fim▁hole|> el: $('fieldset[data-control=invitation]'), events: { }, initialize: function(){ if(!this.$el.length) return null; this.listenTo(Backbone, 'showInvitationFo...
<|file_name|>common.py<|end_file_name|><|fim▁begin|>import json import time class TaskQueueInputError(Exception): def __init__(self, *args, **kwargs): Exception.__init__(self, *args, **kwargs) class TaskQueueSystemError(Exception): def __init__(self, *args, **kwargs): Exception.__init__(self...
def epoch(): return int(time.time())
<|file_name|>navtreeindex37.js<|end_file_name|><|fim▁begin|>var NAVTREEINDEX37 = { "a03349.html":[3,0,174], "a03349.html#a30f34b2cebac981b0ff2be7508b2537a":[3,0,174,3], "a03349.html#a6a98c1ea78a5041690c98cd3010df4a1":[3,0,174,2], "a03349.html#abdebedb1f3f9fd43f04e051ae965bd6e":[3,0,174,0], "a03349.html#adebb3f6f6beb03a...
"a03509.html":[3,0,8], "a03509.html#a87314cfe5cd68f08bf4432a7f5100512":[3,0,8,1], "a03509.html#aa448aea48ce5fc89703c79774de537b7":[3,0,8,2],
<|file_name|>profileapi.rs<|end_file_name|><|fim▁begin|>// 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 files in the project carrying such notice may not ...
<|file_name|>systemd-networkd-tests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1+ # systemd-networkd tests import argparse import os import re import shutil import signal import subprocess import sys import time import unittest from shutil import copytree network_unit_fil...
resolvectl_bin = os.path.join(ns.build_dir, 'resolvectl') timedatectl_bin = os.path.join(ns.build_dir, 'timedatectl') else:
<|file_name|>create.js<|end_file_name|><|fim▁begin|>import { Duration, isDuration } from './constructor'; import toInt from '../utils/to-int'; import hasOwnProp from '../utils/has-own-prop'; import { DATE, HOUR, MINUTE, SECOND, MILLISECOND } from '../units/constants'; import { cloneWithOffset } from '../units/offset'; ...
<|file_name|>0121_workflow_uuids.py<|end_file_name|><|fim▁begin|>""" Add UUIDs to workflows """ from sqlalchemy import * from sqlalchemy.orm import * from migrate import * from migrate.changeset import * from galaxy.model.custom_types import UUIDType, TrimmedString import logging log = logging.getLogger( __name__ ) ...
try: workflow_table = Table( "workflow", metadata, autoload=True ) workflow_uuid_column.create( workflow_table ) assert workflow_uuid_column is workflow_table.c.uuid
<|file_name|>trajectory.py<|end_file_name|><|fim▁begin|>from dnfpyUtils.stats.statistic import Statistic import numpy as np class Trajectory(Statistic): """ Abstract class for trajectory """ def __init__(self,name,dt=0.1,dim=0,**kwargs): super().__init__(name=name,size=0,dim=dim,dt=dt,**kw...
def getTrace(self):
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import inspect import os import sys from datetime import timedelta from io import StringIO from unittest.mock import Mock from urllib.error import HTTPError import django import django.db import django.test.runner import django.test.testcases import django.test.utils f...
<|file_name|>ResponseCode.java<|end_file_name|><|fim▁begin|>package easyrec.poc.client.entity; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType;<|fim▁hole|>@XmlAccessorType(XmlAccessType.FIELD) public class ResponseCode { @XmlAttribute(name="code") private Integer code...
import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name="success")
<|file_name|>limitTo.js<|end_file_name|><|fim▁begin|>'use strict'; /** * @ngdoc function * @name ng.filter:limitTo * @function * * @description * Creates a new array or string containing only a specified number of elements. The elements * are taken from either the beginning or the end of the source array or str...
if (limit > input.length)
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>""" Django settings for blog project. Generated by 'django-admin startproject' using Django 1.9. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangop...
<|file_name|>http_challenge_cache.py<|end_file_name|><|fim▁begin|># ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import threading try: import urllib.parse as parse except ImportError: import urlparse as pars...
with _lock: _cache[src_url.netloc] = challenge
<|file_name|>ProxyServletTest.java<|end_file_name|><|fim▁begin|>/* ************************************************************************ ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** * * (c) 2019. ...
* the GNU Affero General Public la “GNU Affero General Public * License as published by the License” telle que publiée
<|file_name|>languageConfigurationExtensionPoint.ts<|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 licen...
}
<|file_name|>AggHelp.py<|end_file_name|><|fim▁begin|># # AggHelp.py -- help classes for the Agg drawing # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. import aggdraw ...
# if self.linestyle == 'dash': # cr.set_dash([ 3.0, 4.0, 6.0, 4.0], 5.0)
<|file_name|>DicomEventHandler.cpp<|end_file_name|><|fim▁begin|>/*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD l...
} else
<|file_name|>poller-wrapper.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python3 """ poller-wrapper A small tool which wraps around the poller and tries to guide the polling process with a more modern approach with a Queue and workers Authors: Job Snijders <job.snijders@atrat...
print("Finished %.3fs after interval start." % (time.time() - int(time_tag))) # EOC6
<|file_name|>Hatran-code-points.js<|end_file_name|><|fim▁begin|>// All code points in the `Hatran` script as per Unicode v10.0.0: [<|fim▁hole|> 0x108E2, 0x108E3, 0x108E4, 0x108E5, 0x108E6, 0x108E7, 0x108E8, 0x108E9, 0x108EA, 0x108EB, 0x108EC, 0x108ED, 0x108EE, 0x108EF, 0x108F0, 0x108F1, 0x108F2, 0x108F...
0x108E0, 0x108E1,
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>export * from './csv'; export * from './file'; export * from './ini'; export * from './json'; export * from './shell';<|fim▁hole|>import * as cli from './cli'; export { cli };<|fim▁end|>
export * from './tmpl'; export * from './yaml';
<|file_name|>user.js<|end_file_name|><|fim▁begin|>var db = require('../db'); var User = db.model('User', { username: { type: String, required: true }, email: { type: String, required: true }, password: { type: String, required: true, select: f...
<|file_name|>new_decision_module.py<|end_file_name|><|fim▁begin|>__author__ = 'tiramola group' import os, datetime, operator, math, random, itertools, time import numpy as np from lib.fuzz import fgraph, fset from scipy.cluster.vq import kmeans2 from lib.persistance_module import env_vars from scipy.stats import linre...
<|file_name|>node-mark-invalid-default.js<|end_file_name|><|fim▁begin|>/** @jsx h */ import h from '../../helpers/h' export const schema = { blocks: { paragraph: {<|fim▁hole|> }, }, } export const input = ( <value> <document> <paragraph> one <i>two</i> three </paragraph> </do...
marks: [{ type: 'bold' }, { type: 'underline' }],
<|file_name|>errmsgwin.cpp<|end_file_name|><|fim▁begin|>/* $Id: errmsgwin.cpp $ */ /** @file * IPRT - Status code messages. */ /* * Copyright (C) 2006-2011 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; ...
<|file_name|>TestPostExpr.cpp<|end_file_name|><|fim▁begin|>#include "TestBase.h" const char *testPostExpressions = "typedef char[] string;\r\n\ \r\n\ int string:find(char a)\r\n\ {\r\n\ int i = 0;\r\n\ while(i < this.size && this[i] != a)\r\n\ i++;\r\n\ if(i == this.size)\r\n\ i = -1;\r\n\ return i...
<|file_name|>AbstractOneOffJobSpringIntegrateTest.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...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Copyright (2010-2014) INCUBAID BVBA Licensed under the Apache License, Version 2.0 (the "License");<|fim▁hole|> http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is ...
you may not use this file except in compliance with the License. You may obtain a copy of the License at
<|file_name|>uppod.py<|end_file_name|><|fim▁begin|>#------------------------------------------------------------------------------- # Uppod decoder #------------------------------------------------------------------------------- import urllib2 def decode(param): try: #-- define variables ...
#-- define hash parameters for decoding
<|file_name|>importer.go<|end_file_name|><|fim▁begin|>// Package importer imports dependency configuration from Glide, Godep, GPM, GB and gom package importer import ( "io/ioutil" "os"<|fim▁hole|> "github.com/Masterminds/glide/gb" "github.com/Masterminds/glide/godep" "github.com/Masterminds/glide/gom" "github.com...
"path/filepath" "github.com/Masterminds/glide/cfg"
<|file_name|>card-padding.directive.ts<|end_file_name|><|fim▁begin|>import { Directive } from '@angular/core'; @Directive({ selector: '[bwCardPadding]', host: { '[class.card-padding]': 'true' },<|fim▁hole|>}) export class CardPaddingDirective { }<|fim▁end|>
<|file_name|>PLATFORM_RGBA_LOAD.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python '''Test RGBA load using the platform decoder (QuickTime, Quartz, GDI+ or Gdk). You should see the rgba.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import unittest im...
from pyglet.image.codecs.gdiplus import GDIPlusDecoder as dclass elif sys.platform == 'darwin': from pyglet import options as pyglet_options if pyglet_options['darwin_cocoa']:
<|file_name|>fourslash.ts<|end_file_name|><|fim▁begin|>// // Copyright (c) Microsoft Corporation. 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|>user.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import re from lilac.controller import ADMIN, LOGGER from lilac.orm import Backend from lilac.tool import access, set_secure_cookie from lilac.model import User from solo.template import render_template from solo.web.util import jsonify from sol...
<|file_name|>panel.py<|end_file_name|><|fim▁begin|># Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may #...
# # http://www.apache.org/licenses/LICENSE-2.0
<|file_name|>tls_t.hpp<|end_file_name|><|fim▁begin|>/// @copyright /// Copyright (C) 2020 Assured Information Security, Inc. /// /// @copyright /// 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 So...
<|file_name|>binary_util.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2015 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, ...
with self._select_binary_stream(name, binary_path) as stream: with safe_open(downloadpath, 'wb') as bootstrapped_binary: bootstrapped_binary.write(stream()) os.rename(downloadpath, bootstrapped_binary_path)
<|file_name|>test_v1_i6300_esb_watchdog.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ KubeVirt API This is KubeVirt API an add-on for Kubernetes. OpenAPI spec version: 1.0.0 Contact: kubevirt-dev@googlegroups.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __...
<|file_name|>noveltycurve.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra * * This file is part of Essentia * * Essentia is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as publish...
} /** * Compute the novelty curve for a single variable (energy band, spectrum bin, ...).
<|file_name|>clarity_cli.rs<|end_file_name|><|fim▁begin|>/* copyright: (c) 2013-2019 by Blockstack PBC, a public benefit corporation. This file is part of Blockstack. Blockstack is free software. You may redistribute or modify it under the terms of the GNU General Public License as published by the Free Software...
clarity::invoke_command(&argv[0], &argv[1..]); }
<|file_name|>as_conversions.rs<|end_file_name|><|fim▁begin|>use clippy_utils::diagnostics::span_lint_and_help; use rustc_ast::ast::{Expr, ExprKind}; use rustc_lint::{EarlyContext, EarlyLintPass}; use rustc_middle::lint::in_external_macro; use rustc_session::{declare_lint_pass, declare_tool_lint}; declare_clippy_lint! ...
/// If you want more precise lints for `as`, please consider using these separate lints: /// `unnecessary_cast`, `cast_lossless/possible_truncation/possible_wrap/precision_loss/sign_loss`, /// `fn_to_numeric_cast(_with_truncation)`, `char_lit_as_u8`, `ref_to_mut` and `ptr_as_ptr`. /// There is a good ex...
<|file_name|>zipup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import sys import os import argparse import zipfile import tarfile def make_zipfile(outname, filenames, prefix): with zipfile.ZipFile(outname, "w", zipfile.ZIP_DEFLATED) as z: for filename in filenames: z.write(filename, ...
else: with open(args.filelist, "r") as infp: filenames = set(infp) filenames = set(x.strip() for x in filenames)
<|file_name|>segmented-bar-common.js<|end_file_name|><|fim▁begin|>var view = require("ui/core/view"); var proxy = require("ui/core/proxy"); var dependencyObservable = require("ui/core/dependency-observable"); var color = require("color"); var bindable = require("ui/core/bindable"); var types; function ensureTypes() { ...
Object.defineProperty(SegmentedBar.prototype, "items", { get: function () { return this._getValue(SegmentedBar.itemsProperty); },
<|file_name|>main.java<|end_file_name|><|fim▁begin|>import java.io.IOException; import java.util.Scanner; import iterators.*; import User.User; public class main { public static void zad1(ArrayIterator it){ PredicateCoN pred = new PredicateCoN(4); PredicateCoN pred2 = new PredicateCoN(2); IteratorCoN con = n...
} }
<|file_name|>racao-lote.pipe.ts<|end_file_name|><|fim▁begin|>import { RacaoLote } from './../../../shared/entity/produto/racao-lote'; import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'filtroPorRacaoLote' }) export class FiltroPorRacaoLote implements PipeTransform { transform(racaoLotes: Rac...
key !== 'dataLote' && //
<|file_name|>parseCurrentPlayers.py<|end_file_name|><|fim▁begin|># parsing the dump to get all the keys for the current players import json dic={} with open('currentPlayerDump.json','r') as f: data=json.load(f) print data["resultSets"][0]["headers"]<|fim▁hole|> with open('playerKey','w') as f1: for key in dic: f...
print len(data["resultSets"][0]["rowSet"]) for obj in data["resultSets"][0]["rowSet"]: if obj[0] not in dic: dic[obj[0]]=obj[1]
<|file_name|>liveness-uninit-after-item.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...
// option. This file may not be copied, modified, or distributed // except according to those terms. fn main() {
<|file_name|>test_zipcontent.py<|end_file_name|><|fim▁begin|>import hashlib import os import tempfile import zipfile from bs4 import BeautifulSoup from django.test import Client from django.test import TestCase from mock import patch from ..models import LocalFile from ..utils.paths import get_content_storage_file_pa...
<|file_name|>packagepolicy.py<|end_file_name|><|fim▁begin|># # Copyright (c) SAS Institute 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-...
or group, or it must exist even if it is empty.
<|file_name|>core.rs<|end_file_name|><|fim▁begin|>#![cfg(feature = "core")] use rusoto_core::request::{HttpClient, HttpResponse}; use rusoto_core::credential::{DefaultCredentialsProvider, ProvideAwsCredentials}; use rusoto_core::param::{Params, ServiceParams}; use rusoto_core::signature::SignedRequest; use rusoto_core...
let provider = DefaultCredentialsProvider::new().unwrap();
<|file_name|>stream.hpp<|end_file_name|><|fim▁begin|>// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) // (C) Copyright 2003-2007 Jonathan Turkanis // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) ...
struct stream : detail::stream_base<Device, Tr, Alloc> { public: typedef typename char_type_of<Device>::type char_type; struct category
<|file_name|>PyCOBRA_run.py<|end_file_name|><|fim▁begin|>import numpy as np import matplotlib.pyplot as plt from scipy.constants import c, e, m_p import matplotlib.pyplot as plt plt.switch_backend('TkAgg') plt.ion() from PyCOBRA_accelerator import TwissMap<|fim▁hole|>from PyCOBRA_beam import Bunch, gaussian_generator...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![feature(plugin, no_std, start, core_intrinsics)] #![no_std] #![plugin(macro_platformtree)] extern crate zinc; use zinc::drivers::chario::CharIO; platformtree!( tiva_c@mcu { clock { source = "MOSC"; xtal = "X16_0MHz"; pll = true; ...
prescale = 80; mode = "periodic"; } }
<|file_name|>profilehandler.py<|end_file_name|><|fim▁begin|>import sys import logging import profile import pstats try: import cStringIO as StringIO StringIO # pyflakes except ImportError: import StringIO from instrumenting import utils class BaseProfilingHandler(utils.InstrumentingHandler): """ ...
def disable(self):
<|file_name|>controls.test.ts<|end_file_name|><|fim▁begin|>import xs from 'xstream'; import { forall, integer, assert, Options } from 'jsverify'; import { VNode, div, p } from '@cycle/dom'; import { withTime } from 'cyclejs-test-helpers'; const htmlLooksLike = require('html-looks-like'); const toHtml = require('snabbdo...
tests: 25, quiet: false, size: 60 * 60 * 24
<|file_name|>column-height.pipe.ts<|end_file_name|><|fim▁begin|>/* * Lumeer: Modern Data Definition and Processing Platform * * Copyright (C) since 2017 Lumeer.io, s.r.o. and/or its affiliates. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public ...
name: 'columnHeight', }) export class ColumnHeightPipe implements PipeTransform { public transform(column: TableConfigColumn, table: TableModel, cursor: TableHeaderCursor): number {
<|file_name|>greatcircle_intersect.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Tues Jun 23 16:32:27 2015 @author: boland help for interesections function came from: http://stackoverflow.com/questions/29465468\ python-intersection-point-of-two-great-circles-lat-long CODE DESCRIPTION: The fo...
<|file_name|>app.py<|end_file_name|><|fim▁begin|>import web urls = ( '/hello','Index' ) app = web.application(urls,globals()) render = web.template.render('/usr/local/LPTHW/ex51/gothonweb/templates/',base="layout") class Index(object): def GET(self): return render.hello_form() ...
if __name__ == '__main__':
<|file_name|>regress-463259.js<|end_file_name|><|fim▁begin|>/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); yo...
* * Contributor(s): Jesse Ruderman
<|file_name|>OFOxmBsnUdf4MaskedVer13.java<|end_file_name|><|fim▁begin|>// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University // Copyright (c) 2011, 2012 Open Networking Foundation // Copyright (c) 2012, 2013 Big Switch Networks, Inc. // This library was generated by the LoxiGen Compiler. ...
// package private constructor - used by readers, builders, and factory OFOxmBsnUdf4MaskedVer13(UDF value, UDF mask) { if(value == null) {
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>from sys import exit import argparse import sobol, morris, extended_fast parser = argparse.ArgumentParser(description='Perform sensitivity analysis on model output') parser.add_argument('-m', '--method', type=str, choices=['sobol', 'morris', 'fast'], require...
if args.morris_model_input is not None: morris.analyze(args.paramfile, args.morris_model_input, args.model_output_file, args.column, delim = args.delimiter)
<|file_name|>MainApp.java<|end_file_name|><|fim▁begin|>package com.sien.aimanager; import android.content.Intent; import android.os.Handler; import com.sien.aimanager.services.MonitorServices; import com.sien.lib.baseapp.BaseApplication; import com.sien.lib.databmob.config.DatappConfig; import cn.bmob.v3.Bmob; impor...
}
<|file_name|>ShardSplitTest.java<|end_file_name|><|fim▁begin|>package org.apache.solr.cloud; /* * 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 AS...
protected void indexAndUpdateCount(List<DocRouter.Range> ranges, int[] docCounts, int id) throws Exception { indexr("id", id); // todo - hook in custom hashing
<|file_name|>AddImagesOptions.java<|end_file_name|><|fim▁begin|>/* * (C) Copyright IBM Corp. 2019, 2020. * * 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...
protected List<FileWithMetadata> imagesFile;
<|file_name|>file.js<|end_file_name|><|fim▁begin|>/* * @package jsDAV * @subpackage DAV * @copyright Copyright(c) 2011 Ajax.org B.V. <info AT ajax DOT org><|fim▁hole|> var jsDAV_Ftp_Node = require("./node").jsDAV_Ftp_Node; var jsDAV_iFile = require("./../iFile").jsDAV_iFile; var Exc = require("./.....
* @author Mike de Boer <info AT mikedeboer DOT nl> * @license http://github.com/mikedeboer/jsDAV/blob/master/LICENSE MIT License */ "use strict";
<|file_name|>modules_stub.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2007 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|>weather.py<|end_file_name|><|fim▁begin|>import urllib2,json def almanac(zip): url = "http://api.wunderground.com/api/4997e70515d4cbbd/almanac/q/%d.json"%(zip) r = urllib2.urlopen(url) data = json.loads(r.read()) almanac = {"record low":data['almanac']['temp_low']['record']['F'].encode("asc...
return almanac
<|file_name|>AlbumFactory.java<|end_file_name|><|fim▁begin|>package nl.ulso.sprox.json.spotify; import nl.ulso.sprox.Node;<|fim▁hole|>import java.time.LocalDate; import java.util.List; /** * Sprox processor for Spotify API album data. This is a very simple processor that ignores most data. * <p> * This implementat...
<|file_name|>canvas.rs<|end_file_name|><|fim▁begin|>// +--------------------------------------------------------------------------+ // | Copyright 2016 Matthew D. Steele <mdsteele@alum.mit.edu> | // | | // | This file is part of Tu...
pub fn tool_icon(&self, icon: ToolIcon) -> &Sprite { &self.tool_icons[icon as usize] }
<|file_name|>digitalbitbox.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------------------------- # Electrum plugin for the Digital Bitbox hardware wallet by Shift Devices AG # digitalbitbox.com # try: import electrum_arg as electrum from electrum_arg.bitcoin impor...
break # txin is complete