prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>4ccfe9c1b8fa_.py<|end_file_name|><|fim▁begin|>"""empty message Revision ID: 4ccfe9c1b8fa Revises: 1391ee426d4 Create Date: 2014-12-23 12:56:44.406087 """ # revision identifiers, used by Alembic. revision = '4ccfe9c1b8fa' down_revision = '1391ee426d4' from alembic import op import sqlalchemy as sa def...
<|file_name|>traits.rs<|end_file_name|><|fim▁begin|>#![warn(clippy::borrow_interior_mutable_const)] #![allow(clippy::declare_interior_mutable_const)] // this file replicates its `declare` counterpart. Please see it for more discussions. use std::borrow::Cow; use std::cell::Cell; use std::sync::atomic::{AtomicUsize, O...
trait BothOfCellAndGeneric<T> { const DIRECT: Cell<T>; const INDIRECT: Cell<*const T>;
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|>"""Test configuration for the ZHA component.""" from unittest.mock import AsyncMock, MagicMock, PropertyMock, patch import pytest import zigpy from zigpy.application import ControllerApplication import zigpy.config import zigpy.group import zigpy.types from homeas...
@pytest.fixture(params=["zha_device_joined", "zha_device_restored"]) def zha_device_joined_restored(request): """Join or restore ZHA device."""
<|file_name|>authorization.go<|end_file_name|><|fim▁begin|>package authorization import ( "errors" "fmt" "io" "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" utilerrors "k8s.io/apimachinery/pkg/util/errors" rbacinternalversion "k8s.io/kubernetes/pkg/client/clientset_generated/internalc...
Include: []string{ "clusterroles.authorization.openshift.io", "roles.authorization.openshift.io", "clusterrolebindings.authorization.openshift.io",
<|file_name|>data-analytics-oncology.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; import { AgGridModule } from 'ag-grid-angular/main'; import...
OncologyAggregateReportViewComponent,
<|file_name|>cryptomath.py<|end_file_name|><|fim▁begin|># Authors: # Trevor Perrin # Martin von Loewis - python 3 port # Yngve Pettersen (ported by Paul Sokolovsky) - TLS 1.2 # # See the LICENSE file for legal information regarding use of this file. """cryptomath module This module has basic math/crypto code."...
import binascii
<|file_name|>plugin.py<|end_file_name|><|fim▁begin|># -*- coding: iso-8859-1 -*- # (c) 2006 Stephan Reichholf # This Software is Free, use it where you want, when you want for whatever you want and modify it if you want but don't remove my copyright! from Screens.Screen import Screen from Screens.Standby import TryQuit...
<|file_name|>setting.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*- from flask import current_app, flash, url_for, request from flask_admin import expose, BaseView from logpot.admin.base import AuthenticateView, flash_errors from logpot.admin.forms import SettingForm from logpot.utils import ImageUtil, getDir...
dirpath = getDirectoryPath(current_app, '_settings') filepath = os.path.join(dirpath, "profile.png")
<|file_name|>scheduler_bg.py<|end_file_name|><|fim▁begin|># Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Ap...
<|file_name|>FileHashStateElement.py<|end_file_name|><|fim▁begin|># Copyright 2016 Casey Jaymes<|fim▁hole|># This file is part of PySCAP. # # PySCAP is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either versi...
<|file_name|>sample.component.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export declare class SampleComponent { constructor(); }
<|file_name|>response_parameters.rs<|end_file_name|><|fim▁begin|>use serde::de::{Deserialize, Deserializer, Error}; use crate::types::*; /// All API responses are from this type. Mostly used internal. #[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)] pub enum ResponseWrapper<T> { /// Request was succe...
} } /// Directly mapped telegram API response.
<|file_name|>running.rs<|end_file_name|><|fim▁begin|>// @lecorref - github.com/lecorref, @geam - github.com/geam, // @adjivas - github.com/adjivas. See the LICENSE // file at the top-level directory of this distribution and at // https://github.com/adjivas/krpsim // // This file may not be copied, modified, or distribu...
10usize, // cycle Inventory::new( vec!( Ressource::new("green-rupee".to_string(), 1),
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.utils import timezone class Hcmeta(models.Model): hcver = models.IntegerField(blank=True, null=True) org_id = models.CharField(max_length=50, blank=True, null=True) details = models.TextField(blank=True, null=True...
<|file_name|>topology.py<|end_file_name|><|fim▁begin|># TODO: use a unit-testing library for asserts # invoke with: # ./pox.py --script=tests.topology.topology topology # # Maybe there is a less awkward way to invoke tests... <|fim▁hole|>topology = core.components['topology'] def autobinds_correctly(): topology.l...
from pox.core import core from pox.lib.revent import *
<|file_name|>network.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Network Plugin Network usage and connections """ import os, netifaces, psutil, time from pkm import utils, SHAREDIR from pkm.decorators import never_raise, threaded_method from pkm.plugin import BasePlugin, BaseConfig from pkm.filters impo...
def network_friendly_iface(iface):
<|file_name|>impl-not-adjacent-to-type.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Rust Project Developers. See the COPYRIGHT<|fim▁hole|>// 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.o...
// file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. //
<|file_name|>test_kernelspecs_api.py<|end_file_name|><|fim▁begin|># coding: utf-8 """Test the kernel specs webservice API.""" import errno import io import json import os import shutil pjoin = os.path.join import requests from IPython.kernel.kernelspec import NATIVE_KERNEL_NAME from IPython.html.utils import url_pa...
self.assertEqual(model['default'], NATIVE_KERNEL_NAME) specs = model['kernelspecs'] assert isinstance(specs, dict)
<|file_name|>password.mocha.js<|end_file_name|><|fim▁begin|>var Password = require('../../lib/Interactor/Password.js'); var should = require('should');<|fim▁hole|>describe('Password test', function() { var crypted = ''; it('should crypt a password', function() { crypted = Password.generate('testpass'); });...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>try: # Try using ez_setup to install setuptools if not already installed. from ez_setup import use_setuptools use_setuptools() except ImportError: # Ignore import error and assume Python 3 which already has setuptools. pass from setuptools import s...
install_requires = ['Adafruit-GPIO>=0.7'], packages = find_packages())
<|file_name|>TreebankFile.java<|end_file_name|><|fim▁begin|>package com.cognitionis.nlp_files; import java.io.*; import java.util.regex.*; /** * * @author Héctor Llorens * @since 2011 */ public class TreebankFile extends NLPFile { public TreebankFile(String filename) { super(filename); } ...
<|file_name|>unparse.rs<|end_file_name|><|fim▁begin|>use crate::{ ast::{Ast, AstContents, AstContents::*}, grammar::{ FormPat::{self, *}, SynEnv, }, name::*, util::mbe::EnvMBE, }; fn node_names_mentioned(pat: &FormPat) -> Vec<Name> { match *pat { Named(n, ref body) => { ...
(&Seq(ref sub_pats), _) => { let mut prev_empty = true;
<|file_name|>owo.py<|end_file_name|><|fim▁begin|>"""<|fim▁hole|>OwO whats this? """ __author__ = ('Smurphicus') COMMAND = 'owo' from random import choice substitutions = {'r':'w','R':'W','l':'w','L':'W','na':'nya','NA':'NYA','qu':'qw','QU':'QW'} faces = [' OwO', ' owo', ' UwU', ' uwu', ' :3', ' :33', ' :333', ''] d...
<|file_name|>sphere.rs<|end_file_name|><|fim▁begin|>// Copyright Colin Sherratt 2014 // // 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/LIC...
u: 0, v: 0, sub_u: u, sub_v: v
<|file_name|>renderer.rs<|end_file_name|><|fim▁begin|>use logic::game::*; use opengl_graphics::{ GlGraphics }; use graphics::{ Context, DrawState}; use graphics::rectangle::*; pub struct Renderer { cellSize: f64, rectangle: Rectangle, // cellTexture : Texture, // cellImage: Image, } impl Renderer { pub fn new(ce...
<|file_name|>ext_rescapture.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ IPython extension: new prefilters for output grabbing Provides var = %magic blah blah var = !ls """ <|fim▁hole|> ip = IPython.ipapi.get() import re def hnd_magic(line,mo): """ Handle a = %mymagic blah blah """ #cmd = ...
import IPython.ipapi from IPython.genutils import *
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Mathematical helper functions and types.<|fim▁hole|>pub use self::rect::Rect; pub(crate) use self::utils::resize_dimensions;<|fim▁end|>
pub mod nq; pub mod utils; mod rect;
<|file_name|>snapshot_test.py<|end_file_name|><|fim▁begin|>import distutils.dir_util import glob import os import shutil import subprocess import time from cassandra.concurrent import execute_concurrent_with_args from dtest import (Tester, cleanup_cluster, create_ccm_cluster, create_ks, debug, get_...
<|file_name|>arcTo.js<|end_file_name|><|fim▁begin|>import Instruction from './Instruction'; function arcTo(x1, y1, x2, y2, r) {<|fim▁hole|> count: 5, }); } export default arcTo;<|fim▁end|>
return new Instruction('call', { name: 'arcTo', args: [x1, y1, x2, y2, r],
<|file_name|>cholesky.rs<|end_file_name|><|fim▁begin|>use ndarray::*; use ndarray_linalg::*; macro_rules! cholesky { ($elem:ty, $rtol:expr) => { paste::item! { #[test] fn [<cholesky_ $elem>]() { let a_orig: Array2<$elem> = random_hpd(3); println!("a =...
assert_close_l2!(&lower, &fac_lower.into_lower(), $rtol); assert_close_l2!(&lower, &fac_upper.into_lower(), $rtol); }
<|file_name|>openid_selector_mailru.js<|end_file_name|><|fim▁begin|>(function ($) { providers_small.mailru = { name: 'mail.ru', url: "javascript: $('#mail_ru_auth_login a').click();" }; openid.getBoxHTML__mailru = openid.getBoxHTML; openid.getBoxHTML = function (box_id, provider, box_size, index) { if (box_id ==...
}
<|file_name|>samdb.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007-2010 # Copyright (C) Matthias Dieter Wallnoefer 2009 # # Based on the original in EJS: # Copyright (C) Andrew Tridgell <tridge@samba.org> 2005 # # This progra...
<|file_name|>EndpointLinksResolver.java<|end_file_name|><|fim▁begin|>/* * Copyright 2012-2018 the original author or 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 * * h...
private static final Log logger = LogFactory.getLog(EndpointLinksResolver.class);
<|file_name|>buttonpress.cpp<|end_file_name|><|fim▁begin|>#include "buttonpress.h" #include <iostream> void button::shutdown() { std::cout << "Shutdown" << std::endl; } void button::pause48h() { std::cout << "Pause" << std::endl; } void button::masterButton() { std::cout << "Master" << std::endl; } void...
}
<|file_name|>plot.py<|end_file_name|><|fim▁begin|># encoding: utf-8 """ Plot-related objects. A plot is known as a chart group in the MS API. A chart can have more than one plot overlayed on each other, such as a line plot layered over a bar plot. """ from __future__ import absolute_import, print_function, unicode_li...
@property def has_data_labels(self):
<|file_name|>bench_hash.py<|end_file_name|><|fim▁begin|>def benchmark_hash_data(): """ CommandLine: python ~/code/ubelt/dev/bench_hash.py --convert=True --show python ~/code/ubelt/dev/bench_hash.py --convert=False --show """ import ubelt as ub #ITEM = 'JUST A STRING' * 100 ITEM =...
relratios = ub.odict(zip(nicekeys, ratios)) print('speedup: ' + ub.repr2(relratios, precision=4, nl=0))
<|file_name|>LensProjectionContext.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2010-2013 Evolveum * * 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...
if (showTriples) {
<|file_name|>docker.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 #-*- coding: utf-8 -*- ############################################## # Home : http://netkiller.github.io # Author: Neo <netkiller@msn.com> # Upgrade: 2021-09-05 ############################################## # try: import os, sys module = os.path....
docker = Docker({ 'DOCKER_HOST': 'ssh://root@192.168.30.11', 'SSS': 'sdfff' })
<|file_name|>ContentPartnerError.java<|end_file_name|><|fim▁begin|>package com.google.api.ads.dfp.jaxws.v201508; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; /** * * ...
* allowed object is * {@link ContentPartnerErrorReason }
<|file_name|>resources.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 Matthew Collins // // 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...
<|file_name|>java_properties.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Title : Java program file Author : JG Date : dec 2016 Objet : script to create Propertie File Program in : get infos from yml out : print infos in properties file """ import sys,os import yaml import util as u from r...
<|file_name|>rottentomatoes.py<|end_file_name|><|fim▁begin|>from cloudbot import hook from cloudbot.util import http api_root = 'http://api.rottentomatoes.com/api/public/v1.0/' movie_search_url = api_root + 'movies.json' movie_reviews_url = api_root + 'movies/%s/reviews.json' @hook.command('rt') def rottentomatoes(i...
return 'No results.'
<|file_name|>test_nfs_ganesha.py<|end_file_name|><|fim▁begin|>import json import pytest class TestNFSs(object): @pytest.mark.no_docker def test_nfs_ganesha_is_installed(self, node, host): assert host.package("nfs-ganesha").is_installed @pytest.mark.no_docker def test_nfs_ganesha_rgw_package_i...
@pytest.mark.no_docker def test_nfs_config_override(self, node, host): assert host.file("/etc/ganesha/ganesha.conf").contains("Entries_HWMark")
<|file_name|>CascadingServiceInjector.java<|end_file_name|><|fim▁begin|>/** * */ package org.necros.settings; /** * @author weiht <|fim▁hole|>public class CascadingServiceInjector<T> { private Integer zIndex = 0; private T service; private CascadingService<T> cascadingService; public void doInject...
* */
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for HW3 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MO...
<|file_name|>messages.controller.js<|end_file_name|><|fim▁begin|>angular.module('messages') .controller('messageCtrl',['$scope','messages','socket','$stateParams',MessageController]) function MessageController($scope,messages,socket,$stateParams) {<|fim▁hole|> $scope.messages = messages; $scope.msg = ''; ...
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import json import random import requests from plugin import create_plugin from message import SteelyMessage HELP_STR = """ Request your favourite bible quotes, right to the chat. Usage: /bible - Random quote /bible Genesis 1:3 - Specific verse /bible hel...
<|file_name|>ErrorBoundary.tsx<|end_file_name|><|fim▁begin|>import React, { PureComponent, ReactNode, ComponentType } from 'react'; import { captureException } from '@sentry/browser'; import { Alert } from '../Alert/Alert'; import { ErrorWithStack } from './ErrorWithStack'; export interface ErrorInfo { componentStac...
if (style === 'alertbox') { return ( <Alert title={title || ''}>
<|file_name|>UpdaterSelectorTest.java<|end_file_name|><|fim▁begin|>package lan.dk.podcastserver.manager.worker.selector; import lan.dk.podcastserver.manager.worker.selector.update.*; import lan.dk.podcastserver.manager.worker.updater.*; import org.junit.Before; import org.junit.Test; import java.util.HashSet; import ...
<|file_name|>hooktest.py<|end_file_name|><|fim▁begin|>import psyco psyco.full() import linker.coff from linker import store m,n='python26.dll','Py_DecRef' localname = None,'__imp__<%s!%s>'%(m,n) if True: # this should import from python26.lib,Py_DecRef # this should export ia32.obj,stuff a = linker.coff....
# raise NotImplementedError("symbol consolidation isn't working")
<|file_name|>lexical-scope-with-macro.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://...
// debugger:continue
<|file_name|>test_cancel.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # test_cancel.py - unit test for query cancellation # # Copyright (C) 2010-2011 Jan Urbański <wulczer@wulczer.org> # # psycopg2 is free software: you can redistribute it and/or modify it # under the terms of the GNU...
<|file_name|>15.2.3.6-3-37.js<|end_file_name|><|fim▁begin|>/// Copyright (c) 2009 Microsoft Corporation /// /// Redistribution and use in source and binary forms, with or without modification, are permitted provided /// that the following conditions are met: /// * Redistributions of source code must retain the ab...
<|file_name|>t_server-internalerr_test.go<|end_file_name|><|fim▁begin|>package petrel import ( "fmt" "strings" "testing" ) // the faulty echo function for our dispatch table func badecho(s [][]byte) ([]byte, error) { return nil, fmt.Errorf("oh no something is wrong") } // implement an echo server with a bad comm...
if msg.Txt != "client disconnected" { t.Errorf("unexpected msg.Txt: %v", msg.Txt) }
<|file_name|>0004_auto_20141128_0914.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api', '0003_auto_20141128_0831'), ] operations = [ migrations.Alter...
# -*- coding: utf-8 -*-
<|file_name|>dns_driver.py<|end_file_name|><|fim▁begin|># Copyright 2011 Andrew Bogott for the Wikimedia Foundation # # 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|>serializers.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from bluebottle.statistics.serializers import StatisticSerializer from rest_framework import serializers class HomePageSerializer(serializers.Serializer): id = serializers.CharField() quotes = QuoteSerializer(many=True) slides = SlideSer...
from bluebottle.projects.serializers import ProjectPreviewSerializer from bluebottle.quotes.serializers import QuoteSerializer from bluebottle.slides.serializers import SlideSerializer
<|file_name|>colorpicker-result.ts<|end_file_name|><|fim▁begin|>import { SkyColorpickerOutput } from './colorpicker-output'; /** * Indicates the color that users apply when they select Apply in the colorpicker. */ export interface SkyColorpickerResult {<|fim▁hole|> /** * Describes the color that users select in ...
<|file_name|>config.pro.spec.js<|end_file_name|><|fim▁begin|><|fim▁hole|> test('exist', () => { expect(config).toMatchSnapshot() }) })<|fim▁end|>
// config.pro.spec.js import config from '../../../src/constants/config.pro' describe('Config PRO constants', function () {
<|file_name|>group_report_test.py<|end_file_name|><|fim▁begin|># Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest import webapp2 import webtest from google.appengine.ext import ndb from das...
<|file_name|>__manifest__.py<|end_file_name|><|fim▁begin|># Copyright 2020 initOS GmbH # Copyright 2012-2018 Therp BV <https://therp.nl> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "LDAP groups assignment", "version": "11.0.1.0.0", "depends": ["auth_ldap"], "author": ...
'python': ['ldap'], },
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for parallel.js // Project: https://github.com/parallel-js/parallel.js#readme // Definitions by: Josh Baldwin <https://github.com/jbaldwin> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /* Copyright(c) 2013 Josh Baldwin https...
included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
<|file_name|>background.js<|end_file_name|><|fim▁begin|>chrome.app.runtime.onLaunched.addListener(function(){ chrome.app.window.create('index.html', { bounds: { width: Math.round(window.screen.availWidth - 100), height: Math.round(window.screen.availHeight - 100)<|fim▁hole|><|fim▁end|>
} }); });
<|file_name|>app.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
var dep = require('./dep'); dep('');
<|file_name|>builder.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2....
if len(b.resources) != 0 { return &Result{singular: singular, err: fmt.Errorf("when paths, URLs, or stdin is provided as input, you may not specify resource arguments as well")}
<|file_name|>cancel_of_async_receive.rs<|end_file_name|><|fim▁begin|>extern crate asyncio; use std::io; use std::time::Duration; use asyncio::*; use asyncio::ip::*; static mut GOAL_FLAG: bool = false; struct UdpClient { soc: UdpSocket,<|fim▁hole|> impl UdpClient { fn start(ctx: &IoContext) -> io::Result<()> ...
timer: SteadyTimer, buf: [u8; 256], }
<|file_name|>AntragsgruenEditor.ts<|end_file_name|><|fim▁begin|>import domObject = CKEDITOR.dom.domObject; import editor = CKEDITOR.editor; export class AntragsgruenEditor { private editor: editor; private $el: JQuery; private static ckeditor_strip(html: string): string { let tmp = document.create...
'a[href];'; }
<|file_name|>static.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 Kyle Mayes // // 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▁...
<|file_name|>test_enums.py<|end_file_name|><|fim▁begin|>#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-----------...
<|file_name|>torchcall.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2013 Soumith Chintala * */ #include <jni.h> #include <stdio.h> #include <stdlib.h> #include "torchandroid.h" #include <assert.h> extern "C" { JNIEXPORT jstring JNICALL Java_com_torch_Torch_jni_1call( JNIEnv* env, ...
buffer[0] = 0;
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from .models import SimpleModel, Type, FKModel<|fim▁hole|> admin.site.register(SimpleModel) admin.site.register(Type) admin.site.register(FKModel)<|fim▁end|>
<|file_name|>pause.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------------------- # cocos2d # Copyright (c) 2008-2012 Daniel Moisset, Ricardo Quesada, Rayentray Tappa, # Lucio Torre # Copyright (c) 2009-2015 Richard Jones, Claudio Canepa # All rights reserved. #<|fim▁hol...
# Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: #
<|file_name|>kafka_service.go<|end_file_name|><|fim▁begin|>package services import ( "encoding/json" "errors" "fmt" "github.com/adbourne/go-archetype-kafka-processor/config" "github.com/adbourne/go-archetype-kafka-processor/messages" "gopkg.in/Shopify/sarama.v1" "log" "time" ) // KafkaProcessor turns a Source...
} // KafkaClient is an abstraction away from the kafka client implementation
<|file_name|>test_v1_event_source.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """...
if __name__ == '__main__':
<|file_name|>uva_10407.py<|end_file_name|><|fim▁begin|># /* UVa problem: 10407 # * Simple Division # * Topic: Number Theory # * # * Level: challenging # * # * Brief problem description: # * Given a list of numbers, a1, a2, a3.... an compute a number m such that # * ai mod m = x for some arbitrary x for al...
for i in range(0, n-1): # Now find gcd of all the differences:
<|file_name|>ek-instance-filters.controller.js<|end_file_name|><|fim▁begin|>/* Copyright 2016 ElasticBox 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://www.apache.o...
} }
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from . import models class WPSiteAdmin(admin.ModelAdmin): list_display = ('name', 'url', 'hook') readonly_fields = ('name', 'description') def save_model(self, request,...
out the host for us.
<|file_name|>wrap_Video.cpp<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2006-2016 LOVE Development Team * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software.<|fim▁hole|> * freely, ...
* * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it
<|file_name|>principals.py<|end_file_name|><|fim▁begin|># This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from sqlalchemy.ext.declarative import declared_at...
__tablename__ = 'principals' principal_backref_name = 'in_category_acls'
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup, Command from pyvx import __version__ import sys class PyTestCommand(Command): user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): import pytes...
author_email='pyvx@googlegroups.com',
<|file_name|>items.py<|end_file_name|><|fim▁begin|>pkg_dnf = { 'collectd': {}, 'collectd-chrony': {}, 'collectd-curl': {}, 'collectd-curl_json': {}, 'collectd-curl_xml': {}, 'collectd-netlink': {}, 'rrdtool': {}, } if node.os == 'fedora' and node.os_version >= (26): pkg_dnf['collectd-di...
'rev': 'master',
<|file_name|>SortRegister.cpp<|end_file_name|><|fim▁begin|>//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2022 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// Licensed under the Apache License, Versio...
<|file_name|>test_snapshot.py<|end_file_name|><|fim▁begin|>import shutil from nose.tools import * from holland.lib.lvm import LogicalVolume from holland.lib.lvm.snapshot import * from tests.constants import * class TestSnapshot(object): def setup(self): self.tmpdir = tempfile.mkdtemp() def teardown(se...
<|file_name|>publications.js<|end_file_name|><|fim▁begin|>import { Meteor } from 'meteor/meteor'; import '../images.js'; import { Devs } from '../../devs/devs.js'; import { Teams } from '../../teams/teams.js'; import { Visitors } from '../../visitors/visitors.js'; import { Sponsors } from '../../sponsors/sponsors.js'; ...
return Images.find({'_id':{ $in : list }}).cursor; //return Images.find({}).cursor; } });
<|file_name|>kzip_sys.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 The Kythe 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://www.apache.o...
#[doc = " Must be called before destroying the object."] pub fn KzipWriter_Close(writer: *mut KzipWriter) -> i32; } extern "C" {
<|file_name|>ProductSearchForm.java<|end_file_name|><|fim▁begin|>/* * Copyright 2015-2017 the original author or 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:/...
<|file_name|>parsertestcase.py<|end_file_name|><|fim▁begin|># # Walldo - A wallpaper downloader # Copyright (C) 2012 Fernando Castillo # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either...
# of the License, or (at your option) any later version. #
<|file_name|>tools.ts<|end_file_name|><|fim▁begin|>export function mergeSort<T>(source: Array<T>, compare: (a: T, b: T) => boolean) { let s = 1, n = source.length; let buff: Array<T> = new Array(n); while (s < n) {<|fim▁hole|> mergeAll(buff, source, s, n, compare); s += s; } } // merge [...
mergeAll(source, buff, s, n, compare); s += s;
<|file_name|>check_irc_access.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # Copyright 2011, 2013-2014 OpenStack Foundation # Copyright 2012 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
logging.basicConfig(level=logging.INFO)
<|file_name|>multi.py<|end_file_name|><|fim▁begin|>import numpy as np def multiprod(A, B): """ Inspired by MATLAB multiprod function by Paolo de Leva. A and B are assumed to be arrays containing M matrices, that is, A and B have dimensions A: (M, N, P), B:(M, P, Q). multiprod multiplies each matrix ...
return np.dot(A, B)
<|file_name|>CmsPropertyDelete.java<|end_file_name|><|fim▁begin|>/* * This library is part of OpenCms - * the Open Source Content Management System * * Copyright (c) Alkacon Software GmbH (http://www.alkacon.com) * * This library is free software; you can redistribute it and/or * modify it under the terms of the...
setAction(ACTION_DEFAULT); // build title for change property value dialog
<|file_name|>maxlen.directive.js<|end_file_name|><|fim▁begin|>angular.module('umbraco').directive('maxlen', function () { return { require: 'ngModel', link: function (scope, el, attrs, ctrl) { var validate = false; var length = 999999; if (attrs.name === 'title...
});
<|file_name|>InputEmptyLineSeparatorPrePreviousLineEmptiness.java<|end_file_name|><|fim▁begin|><|fim▁hole|>package com.puppycrawl.tools.checkstyle.checks.whitespace.emptylineseparator; public class InputEmptyLineSeparatorPrePreviousLineEmptiness { }<|fim▁end|>
<|file_name|>test_node_children_list.py<|end_file_name|><|fim▁begin|>import pytest from api.base.settings.defaults import API_BASE from framework.auth.core import Auth from osf.models import AbstractNode, NodeLog from osf.utils import permissions from osf.utils.sanitize import strip_html from osf_tests.factories impor...
<|file_name|>0004_auto_20150721_2058.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals<|fim▁hole|> class Migration(migrations.Migration): dependencies = [ ('taxonomy', '0003_auto_20150720_1937'), ] operations = [ migrations.AddField( ...
from django.db import models, migrations
<|file_name|>sort_transient_data.py<|end_file_name|><|fim▁begin|>""" Module to correct pulsar and FRB DMs for the MW ISM """ from ne2001 import ne_io, density #ne2001 ism model import pygedm #ymw ism model import numpy as np import pandas as pd from astropy import units as u from astropy.coordinates import SkyCoord, G...
Accepts 'frb' or 'pulsar'. transient_data (str): Path to data (in .csv format).
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property r...
json_packet_loss_data = packet_loss.ToJSon(helper.GetOrdering(description)) description, data = helper.CreateData('bit_rate') # Add a column of data points for the desired bit rate to be plotted.
<|file_name|>EasyDialogs_AskYesNoCancel.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|>""" """ __version__ = "$Id$" #end_pymotw_header import EasyDialogs valid_responses = { 1:'yes', 0:'no', -1:'cancel', } response = EasyDialogs.AskYesNoC...
# encoding: utf-8 # # Copyright (c) 2008 Doug Hellmann All rights reserved. #
<|file_name|>build.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Licensed under the MIT License <LICENSE.md> extern crate build; fn main() { build::link("windows.data.pdf", true) }<|fim▁end|>
// Copyright © 2015, Peter Atashian
<|file_name|>GlobalLimitOptimizer.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 * ...