prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>roger.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python from __future__ import print_function import os import sys import subprocess import re import importlib from cli.utils import Utils def print_help_opt(opt, desc): print(" {} {}".format(opt.ljust(13), desc)) def roger_help(root, commands): ...
else: raise SystemExit("Command is not valid. Exiting.") else: raise SystemExit("No arguments found. Please refer to usage: roger -h")
<|file_name|>cz.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Tests for the contrib/localflavor/ CZ Form Fields tests = r""" # CZPostalCodeField ######################################################### >>> from django.contrib.localflavor.cz.forms import CZPostalCodeField >>> f = CZPostalCodeField() >>> f...
<|file_name|>dirs.go<|end_file_name|><|fim▁begin|>// -*- Mode: Go; indent-tabs-mode: t -*- /* * Copyright (C) 2014-2015 Canonical Ltd * * 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 Founda...
// see:
<|file_name|>routers.py<|end_file_name|><|fim▁begin|>class TestRouter(object): def allow_migrate(self, db, app_label, model_name=None, **hints): """ The Tribble model should be the only one to appear in the 'other' db. """ if model_name == 'tribble': return db == 'other' ...
return False
<|file_name|>pick-target.js<|end_file_name|><|fim▁begin|>'use strict'; var type = require('type-detect'); var path = require('path'); var removeTrailingSeparator = require('remove-trailing-path-separator'); var errors = require('common-errors'); var prettyFormat = require('pretty-format'); module.exports = function (i...
return; }
<|file_name|>api.py<|end_file_name|><|fim▁begin|>""" uritemplate.api =============== This module contains the very simple API provided by uritemplate. """ from uritemplate.template import URITemplate def expand(uri, var_dict=None, **kwargs): """Expand the template with the given parameters. :param str uri...
:param dict var_dict: Optional dictionary with variables and values :param kwargs: Alternative way to pass arguments :returns: :class:`URITemplate`
<|file_name|>htmliframeelement.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::attr::Attr; use dom::attr::AttrValue; use ...
<|file_name|>test_cassandra.py<|end_file_name|><|fim▁begin|># stdlib import threading import time from types import ListType import unittest # 3p from nose.plugins.attrib import attr # project from aggregator import MetricsAggregator<|fim▁hole|> STATSD_PORT = 8121 class DummyReporter(threading.Thread): def __in...
from dogstatsd import Server from jmxfetch import JMXFetch from tests.checks.common import Fixtures
<|file_name|>Create_pos&neg.py<|end_file_name|><|fim▁begin|>def create_pos_n_neg():<|fim▁hole|> if file_type == 'pos': line = file_type+'/'+img+' 1 0 0 50 50\n' with open('info.dat','a') as f: f.write(line) elif file_type == 'neg': ...
for file_type in ['neg']: for img in os.listdir(file_type):
<|file_name|>command.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Gfx-rs Developers. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICE...
error!("Depth and stencil views have to be the same"); }
<|file_name|>test_input_poisson.py<|end_file_name|><|fim▁begin|>input_name = '../examples/diffusion/poisson.py'<|fim▁hole|>class Test( TestInput ): pass<|fim▁end|>
output_name = 'test_poisson.vtk' from testsBasic import TestInput
<|file_name|>manager.js<|end_file_name|><|fim▁begin|>var _ = require('lodash'), Promise = require('bluebird'), IndexMapGenerator = require('./index-generator'), PagesMapGenerator = require('./page-generator'), PostsMapGenerator = require('./post-generator'), UsersMapGenerator = require('./user-...
var pageData = page.toJSON(), wasPublished = page.updated('status') === 'published', isPublished = pageData.status === 'published';
<|file_name|>auth.ts<|end_file_name|><|fim▁begin|>import {HttpClient} from '@angular/common/http'; import {Injectable} from '@angular/core'; import {Observable, ReplaySubject, throwError} from 'rxjs'; import {map, tap, switchMap} from 'rxjs/operators'; import {SocketService} from './sockets'; import {StorageServic...
return !!this.userInfo; } observe(): Observable<{User: any, Session: string}> {
<|file_name|>Setup.py<|end_file_name|><|fim▁begin|>from Screen import Screen from Components.ActionMap import NumberActionMap from Components.config import config, ConfigNothing, ConfigBoolean, ConfigSelection from Components.Label import Label from Components.SystemInfo import SystemInfo from Components.ConfigList imp...
<|file_name|>status.py<|end_file_name|><|fim▁begin|>import requests class Status(object): SKIP_LOCALES = ['en_US'] def __init__(self, url, app=None, highlight=None): self.url = url self.app = app self.highlight = highlight or [] self.data = [] self.created = None <|fi...
def get_data(self): if self.data: return
<|file_name|>RecordButtonUtil.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2015, 张涛. * * 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...
} }
<|file_name|>xmlImport.py<|end_file_name|><|fim▁begin|>from PyQt5.QtCore import pyqtSlot, QThread, pyqtSignal import os from PyQt5.QtWidgets import QFileDialog, QProgressDialog, QMessageBox from PyQt5.QtCore import pyqtSlot, QObject from books.soldiers import processData import route_gui from lxml import etree import m...
<|file_name|>BlockReaderUtil.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 yo...
/* See {@link BlockReader#readAll(byte[], int, int)} */ public static int readAll(BlockReader reader, byte[] buf, int offset, int len) throws IOException {
<|file_name|>scale_button.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> use libc::c_double; use cast::GTK_...
<|file_name|>python.py<|end_file_name|><|fim▁begin|>#!/usr/local/bin/python3 import cgi print("Content-type: text/html") print(''' <!DOCTYPE html> <html> <head> <title>Python</title> </head> <body> <h1>Python</h1><|fim▁hole|> </body> </html> ''')<|fim▁end|>
<p>Python</p> <p>This is the article for Python</p>
<|file_name|>consumer_group_defaults_test.go<|end_file_name|><|fim▁begin|>/* * Copyright 2021 The Knative 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.apa...
<|file_name|>rpiemu.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os, Queue import sys from time import sleep<|fim▁hole|># External if len(sys.argv) > 1: print "ARGS:", str(sys.argv) sys.path.append(os.path.dirname( sys.argv[1] )) ###########################################################...
from threading import Thread from libs.qemu import QemuInstance, UARTLineParser
<|file_name|>gecko.mako.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // `data` comes from components/style/properties.mako.rs;...
let data = data.borrow(); let cv = data.stylist.device().default_computed_values(); <% # Skip properties with initial values that change at computed value time.
<|file_name|>external-macro-src.rs<|end_file_name|><|fim▁begin|>// aux-build:external-macro-src.rs #![crate_name = "foo"] #[macro_use]<|fim▁hole|> // @has foo/struct.Foo.html // @has - '//a[@href="../src/foo/external-macro-src.rs.html#12"]' '[src]' make_foo!();<|fim▁end|>
extern crate external_macro_src; // @has foo/index.html '//a[@href="../src/foo/external-macro-src.rs.html#3-12"]' '[src]'
<|file_name|>room.rs<|end_file_name|><|fim▁begin|>use util::{Privacy, AppendToQueryParams}; use message::{Color, MessageFormat}; use url::UrlQuery; use url::form_urlencoded::Serializer; #[derive(Debug, Hash, Eq, PartialEq)] pub struct RoomsRequest { pub start_index: Option<u64>, pub max_results: Option<u64>,...
"prev":"https://www.example.com", "next":"https://www.example.com"
<|file_name|>add.js<|end_file_name|><|fim▁begin|>import { create, visitable } from 'ember-cli-page-object';<|fim▁hole|>import editForm from 'vault/tests/pages/components/identity/edit-form'; export default create({ visit: visitable('/vault/access/identity/:item_type/aliases/add/:id'), editForm, });<|fim▁end|>
<|file_name|>tooltip.go<|end_file_name|><|fim▁begin|>// Copyright 2010 The Walk Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package walk import ( "syscall" "unsafe" ) import ( "github.com/lxn/win" ) func init() { var err e...
}
<|file_name|>metric_test.go<|end_file_name|><|fim▁begin|>package sql_test import ( "bytes" "testing" "github.com/cockroachdb/cockroach/roachpb" "github.com/cockroachdb/cockroach/testutils" "github.com/cockroachdb/cockroach/testutils/storageutils" "github.com/cockroachdb/cockroach/util/leaktest" )<|fim▁hole|>fun...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- try: from functools import reduce # noqa except Exception: pass try: from .tornado_handler import TornadoHandler # noqa except ImportError:<|fim▁hole|><|fim▁end|>
pass from .environmentdump import EnvironmentDump # noqa from .healthcheck import HealthCheck # noqa
<|file_name|>linear_test.go<|end_file_name|><|fim▁begin|>package linear_test import ( "github.com/amitkgupta/goodlearn/data/columntype" "github.com/amitkgupta/goodlearn/data/dataset" "github.com/amitkgupta/goodlearn/data/row" "github.com/amitkgupta/goodlearn/data/slice" "github.com/amitkgupta/goodlearn/errors/reg...
Ω(err).ShouldNot(HaveOccurred()) }) Context("When number of test features does not equal number of training features", func() {
<|file_name|>enum-alignment.rs<|end_file_name|><|fim▁begin|>// run-pass<|fim▁hole|> use std::mem; fn addr_of<T>(ptr: &T) -> usize { ptr as *const T as usize } fn is_aligned<T>(ptr: &T) -> bool { unsafe { let addr: usize = mem::transmute(ptr); (addr % mem::min_align_of::<T>()) == 0 } } pub...
#![allow(dead_code)] #![allow(deprecated)]
<|file_name|>pymem.rs<|end_file_name|><|fim▁begin|>use libc::{c_void, size_t}; #[cfg(Py_3_4)] #[cfg(not(Py_LIMITED_API))] #[cfg_attr(windows, link(name="pythonXY"))] extern "C" { pub fn PyMem_RawMalloc(size: size_t) -> *mut c_void; #[cfg(Py_3_5)] pub fn PyMem_RawCalloc(nelem: size_t, elsize: size_t) -...
<|file_name|>generics-and-bounds.rs<|end_file_name|><|fim▁begin|>// build-pass (FIXME(62277): could be check-pass?) // edition:2018 // compile-flags: --crate-type lib use std::future::Future; pub async fn simple_generic<T>() {} pub trait Foo { fn foo(&self) {} } struct FooType; impl Foo for FooType {} pub asyn...
let mut d = call_with_ref(&f_one); d = call_with_ref(&f_two); }
<|file_name|>angular-locale_en-jm.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module("ngLocale", [], ["$provide", function ($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i =...
v = Math.min(getDecimals(n), 3);
<|file_name|>control_flow_util.py<|end_file_name|><|fim▁begin|># Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www...
def GraphOrParentsInXlaContext(graph):
<|file_name|>bytefmt.go<|end_file_name|><|fim▁begin|>// Package bytefmt contains helper methods and constants for converting to and from a human-readable byte format. // // bytefmt.ByteSize(100.5*bytefmt.MEGABYTE) // "100.5M" // bytefmt.ByteSize(uint64(1024)) // "1K" // // https://github.com/cloudfoundry/bytefmt/blob/m...
if i == -1 { return 0, invalidByteQuantityError }
<|file_name|>static-assert.rs<|end_file_name|><|fim▁begin|>#[static_assert] static b: bool = true; #[static_assert] static c: bool = 1 == 1; <|fim▁hole|>#[static_assert] static f: bool = (4/2) == 2; pub fn main() { }<|fim▁end|>
#[static_assert] static d: bool = 1 != 2;
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># Copyright 2021 The SLOE Logistic 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...
# distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<|file_name|>test_l3_schedulers.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ...
'topic': topics.L3_AGENT,
<|file_name|>SOAPEnvelopeBlockImpl.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...
<|file_name|>feature_extraction.py<|end_file_name|><|fim▁begin|>import librosa import numpy as np import help_functions def extract_mfccdd(fpath, n_mfcc=13, winsize=0.25, sampling_rate=16000): ''' Compute MFCCs, first and second derivatives :param fpath: the file path :param n_mfcc: the number of MFCC ...
mfccdd = np.concatenate((mfccs, deltas, deltadeltas), axis=1) return mfccdd
<|file_name|>block-arg.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. //<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or htt...
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
<|file_name|>manager-dialog.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, OnDestroy } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Response } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import { NgbActiveModal } from '@ng-bootstrap/ng-...
})
<|file_name|>IC7443.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <headingcell level=2> # Usage of IC 7443 # <codecell> from __future__ import print_function from BinPy import * # <codecell> # Usage of IC 7443: ic = IC_7443() print(ic.__doc__) # <codecell> # The Pin conf...
# <codecell>
<|file_name|>reacttree.go<|end_file_name|><|fim▁begin|>package flux import ( "errors" "fmt" "reflect" ) //Reactive data components that are able to react to changes within the given fields they have so an action can be initiated // ReactorType is the reflect.TypeOf value of the Reactor interface var ReactorType =...
fl, ok := target.(Reactor)
<|file_name|>mongodbcatalog_test.go<|end_file_name|><|fim▁begin|>package mongodbcatalog import ( "fmt" "strconv" "strings" "testing" "github.com/cloudstax/firecamp/api/catalog" "github.com/cloudstax/firecamp/api/common" "github.com/cloudstax/firecamp/pkg/dns" ) func TestMongoDBReplicaConfig(t *testing.T) { r...
} if strings.Contains(replcfgs[3].Configs[0].Content, "clusterrole:") {
<|file_name|>formService.js<|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...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import React from 'react'; import { Card } from 'bm-kit'; import './_pillar.schedule.source.scss'; const friday = [ { start: '6:00 PM', name: '📋 Check in begins' }, { start: '8:00 PM', name: '🎤 Opening Ceremonies' }, { start: '9:00 PM',...
name: '🥤 Cup stacking with MLH'
<|file_name|>CircularLinkedList.java<|end_file_name|><|fim▁begin|>/** * CircularLinkedList implementation * @author Tyler Smith * @version 1.0 */ public class CircularLinkedList<T> implements LinkedListInterface<T> { private Node<T> head = null, tail = head; private int size = 0; @Override public...
* for grading your work. * * @return Node representing the head of the linked list */
<|file_name|>services.py<|end_file_name|><|fim▁begin|>import re from copy import copy from random import randint class Server(object): def __init__(self, ip, port, hostname): self.ip = ip self.port = port self.hostname = hostname self.weight = 500 self.maxconn = None de...
if self.slots[i] == server: del self.slots[i] return
<|file_name|>jinja2.py<|end_file_name|><|fim▁begin|>from django.contrib.staticfiles.storage import staticfiles_storage from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from jinja2 import Environment from albums.models import Album, Artist, RecordLabel def get_spo...
'static': staticfiles_storage.url, 'url': reverse,
<|file_name|>get_vgg16.py<|end_file_name|><|fim▁begin|>from tensorflow.keras.applications.vgg16 import VGG16<|fim▁hole|>tfjs.converters.save_keras_model(model, 'vgg16_tfjs')<|fim▁end|>
import tensorflowjs as tfjs model = VGG16(weights='imagenet')
<|file_name|>BaseExporter.js<|end_file_name|><|fim▁begin|>BaseExporter = function () {}; BaseExporter.prototype = {}; function niceWrite (writeStream, toWrite) { // NOTE: might need to break toWrite into multiple strings if (toWrite.length > 10000) { console.log("break toWrite into multiple strings"); } v...
throw new Error("not called with new keyword"); }
<|file_name|>WrapBootstrapActivity.java<|end_file_name|><|fim▁begin|>package org.develnext.jphp.android.ext.classes.app; import android.os.Bundle; import org.develnext.jphp.android.AndroidStandaloneLoader; import org.develnext.jphp.android.ext.AndroidExtension; import php.runtime.annotation.Reflection; @Reflection.Na...
<|file_name|>TestJsonReader.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...
assertEquals("[]", vw.getValueVector().getAccessor().getObject(0).toString()); assertEquals("[1,2,3]", vw.getValueVector().getAccessor().getObject(1).toString());
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from flask import Flask app = Flask(__name__) <|fim▁hole|><|fim▁end|>
import views
<|file_name|>TaskIconCache.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2018 The Android Open Source Project * * 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...
// Nothing to load, the icon is already loaded callback.accept(task); return null;
<|file_name|>ui-col.d.ts<|end_file_name|><|fim▁begin|>export declare class UICol { protected element: Element;<|fim▁hole|> minWidth: string; align: "" | "top" | "middle" | "bottom" | "stretch"; constructor(element: Element); readonly sizes: string; readonly classes: string; }<|fim▁end|>
size: "auto" | "fill" | string; width: string; maxWidth: string;
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Author: Joël Grand-Guillaume (Camptocamp) # Copyright 2010-2015 Camptocamp SA # # This program is free software: you can redistribute it and/or mod...
<|file_name|>state_test.go<|end_file_name|><|fim▁begin|>/* Copyright IBM Corp. 2016 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....
package state import ( "testing"
<|file_name|>cufflink.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node process.env.FORCE_COLOR = true; const program = require('commander'); const package = require('../package.json'); /**<|fim▁hole|> */ program .version((package.name) + '@' + (package.version)); /** * Command for creating and seeding */ pr...
* CLI Commands *
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.shortcuts import render def home(request): return render(request, 'home.html', {'context_var': 'expected'}) def withUrlFields(request, value):<|fim▁hole|>@...
return HttpResponse(value)
<|file_name|>multi_threading.py<|end_file_name|><|fim▁begin|># coding:utf-8 # 测试多线程 import threading import time from utils import fn_timer from multiprocessing.dummy import Pool import requests from utils import urls # 耗时任务:听音乐 def music(name): print 'I am listening to music {0}'.format(name) time...
I am listening to music 1 I am listening to music 2
<|file_name|>test_artificial_32_Quantization_PolyTrend_12_12_0.py<|end_file_name|><|fim▁begin|>import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art <|fim▁hole|> art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 12, transform = "Quantiz...
<|file_name|>DomainDiagnostics.ts<|end_file_name|><|fim▁begin|>/* -------------------------------------------------------------------------------------------- * Copyright (c) Jan Dolejsi. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. * --------------...
this.diagnosticCollection.set(toUri(domainInfo.fileUri), diagnostics);
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import asyncio try: from unittest.mock import Mock, create_autospec except ImportError: from mock import Mock, create_autospec from uuid import uuid4 from functools import wraps from copy import copy from unittest import TestCase as unittestTestCase from zer...
<|file_name|>CofenseTriageThreatEnrichment.py<|end_file_name|><|fim▁begin|>from CommonServerPython import * ''' STANDALONE FUNCTION ''' <|fim▁hole|> def get_threat_indicator_list(args: Dict[str, Any]) -> list: """ Executes cofense-threat-indicator-list command for given arguments. :type args: ``Dict[str, ...
<|file_name|>feedbackStatusbarItem.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 license information...
<|file_name|>pkg.installspace.context.pc.py<|end_file_name|><|fim▁begin|># generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []<|fim▁hole|>PROJECT_VERSION = "0.0.0"<|fim▁end|>
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "r2_description" PROJECT_SPACE_DIR = "/home/mkhuthir/learnROS/src/chessbot/install"
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.utils.translation import ugettext_lazy as _ class Contact(models.Model): name = models.CharField(max_length=255, verbose_name=_("namn")) email = models.EmailField(verbose_name=_("e-post")) def __str__(self):<|fim...
return self.name class Meta: verbose_name = _("Kontaktval")
<|file_name|>build_errortext.py<|end_file_name|><|fim▁begin|>import sys import os.path import setuptools # Fix distutils issues from cffi import FFI ffi = FFI() mod_name = 'instrumental.drivers.cameras._pixelfly.errortext'<|fim▁hole|> #define PCO_ERR_H_CREATE_OBJECT #define PCO_ERRT_H_CREATE_OBJECT ...
if sys.platform.startswith('win'): ffi.set_source(mod_name, """
<|file_name|>HeroicStrike.java<|end_file_name|><|fim▁begin|>package com.hearthsim.card.basic.spell; import com.hearthsim.card.spellcard.SpellTargetableCard; import com.hearthsim.event.effect.EffectCharacter; import com.hearthsim.event.effect.EffectCharacterBuffTemp; import com.hearthsim.event.filter.FilterCharacter; i...
* *
<|file_name|>contentClientLibraries.ts<|end_file_name|><|fim▁begin|>// Constants import {CLIENT_LIBS} from 'src/shared/constants/routes' // Types import {WriteDataItem, WriteDataSection} from 'src/writeData/constants' // Markdown import ArduinoMarkdown from 'src/writeData/components/clientLibraries/Arduino.md' import...
description: 'Back-end, front-end, and mobile applications',
<|file_name|>ActivityBasedTimeoutPolicyRequest.java<|end_file_name|><|fim▁begin|>// Template Source: BaseEntityRequest.java.tt // ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in ...
@Nonnull public java.util.concurrent.CompletableFuture<ActivityBasedTimeoutPolicy> deleteAsync() { return sendAsync(HttpMethod.DELETE, null);
<|file_name|>uhd_rx_cfile.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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 S...
self.connect(self._u, self._sink) else: if options.output_shorts:
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages from os.path import join, dirname setup( name="fant_sizer", version="0.7", author="Rypiuk Oleksandr", author_email="ripiuk96@gmail.com", description="fant_sizer command-line file-infor...
'License :: OSI Approved :: MIT License', 'Intended Audience :: Developers',
<|file_name|>NanoTrasenBot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # This script is shared under the # Creative Commons Attribution-ShareAlike 3.0 license (CC BY-SA 3.0) # Added clause to Attribution: # - You may not remove or hide the '<Bot_name> who created you?' functionality # and you may not m...
arg1 = arg1.read().split("\n") arg2 = []
<|file_name|>eight.hpp<|end_file_name|><|fim▁begin|>//============================================================================== // Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2014 LRI UMR 8623 CNRS/Univ Paris Sud XI // Copyright 2012 - 2014 MetaSc...
{ return vec_splat_s8(8); } };
<|file_name|>fixed_interval.rs<|end_file_name|><|fim▁begin|>use std::iter::Iterator; use std::time::Duration; /// A retry strategy driven by a fixed interval. #[derive(Debug, Clone)] pub struct FixedInterval { duration: Duration, } impl FixedInterval { /// Constructs a new fixed interval strategy. pub fn ...
}
<|file_name|>arnoldi.py<|end_file_name|><|fim▁begin|># Copyright 2014-2021 The PySCF Developers. 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...
self.sol[:] = self.evecs[:,i] self.cv = np.dot(self.vlist[:self.currentSize].transpose(),self.sol[:self.currentSize])
<|file_name|>test_install.py<|end_file_name|><|fim▁begin|>import os import textwrap import glob from os.path import join, curdir, pardir import pytest from pip.utils import appdirs, rmtree from tests.lib import (pyversion, pyversion_tuple, _create_test_package, _create_svn_repo, path_to_url) f...
result = script.run(*args, **kwargs)
<|file_name|>Function.ts<|end_file_name|><|fim▁begin|>function Sum(x: number, y: number) : void { console.log('processNumKeyPairs: key = ' + key + ', value = ' + value) return x + y; } let greeting = function() { console.log("Hello TypeScript!"); }; let SumAnon = function(x: number, y: number) ...
function Test(value: TestClass | TestClass2): value is TestClass { return (<TestClass>value).someFunction !== undefined;
<|file_name|>__manifest__.py<|end_file_name|><|fim▁begin|># Copyright 2021 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Mozaik Mass Mailing Access Rights", "summary": """ New group: Mass Mailing Manager. Managers can edit and unlink mass mailings.""",...
"security/groups.xml",
<|file_name|>notification.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { ToasterService, ToasterConfig, Toast } from 'angular2-toaster/angular2-toaster'; @Injectable() export class NotificationService { constructor(private toasterService: ToasterService) { } p...
popToast(type: any, title: string, body: string) { this.toasterService.pop(type, title, body); }
<|file_name|>discoverer.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2014 Simon Jagoe and Enthought Ltd. # All rights reserved. # # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. from __future__ import absolu...
start_directory : str The package directory in which to start test discovery. """
<|file_name|>flags.rs<|end_file_name|><|fim▁begin|>use coll::options::{CursorType, FindOptions}; /// Represents the bit vector of options for an OP_REPLY message. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct OpReplyFlags { pub cursor_not_found: bool, // Bit 0 pub query_failure: bool, // Bit 1 ...
/// Represents the bit vector of flags for an OP_QUERY message. #[derive(Clone, Copy, Debug, PartialEq, Eq)]
<|file_name|>JsonEntity.java<|end_file_name|><|fim▁begin|>/** * */ package com.eclipsesource.gerrit.plugins.fileattachment.api.entities; /** * Represents an JSON entity that is passed between the client and the server. * This is the base interface that should be used for all JSON entities. * * @author Florian ...
*
<|file_name|>consts.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)] use winapi::*; //winsdk 7.0A windowx.h //pub const WM_CTLCOLOR: UINT = 0x0019; //winsdk 7.0A OleCtl.h pub const OCM__BASE: UINT = WM_USER + 0x1c00; pub const OCM_COMMAND: UINT = OCM__BASE + WM_COMMAND; <|fim▁hole|>pub const OCM_CTLCOL...
pub const OCM_CTLCOLORBTN: UINT = OCM__BASE + WM_CTLCOLORBTN; pub const OCM_CTLCOLOREDIT: UINT = OCM__BASE + WM_CTLCOLOREDIT;
<|file_name|>static_virtual_machine.py<|end_file_name|><|fim▁begin|># Copyright 2014 PerfKitBenchmarker 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 # # htt...
self.ssh_port = vm_spec.ssh_port self.install_packages = vm_spec.install_packages self.password = vm_spec.password
<|file_name|>logger.ts<|end_file_name|><|fim▁begin|>export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'profile'; export const LogLevels: LogLevel[] = ['debug', 'info', 'warn', 'error', 'profile']; export function isLogLevel(arg: any): arg is LogLevel { if (typeof arg !== "string") { return false...
if (level === arg) { return true; }
<|file_name|>userModel.js<|end_file_name|><|fim▁begin|>var Backbone = require('backbone'); module.exports = Backbone.Model.extend({ defaults: { "name": "", "email": "", "phone": ""<|fim▁hole|> }, url: '/users' });<|fim▁end|>
<|file_name|>carbohydrates_on_board.go<|end_file_name|><|fim▁begin|>package dosingdecision import ( "time" "github.com/tidepool-org/platform/structure" ) const ( CarbohydratesOnBoardAmountMaximum = 1000 CarbohydratesOnBoardAmountMinimum = 0 ) type CarbohydratesOnBoard struct { Time *time.Time `json:"time,omi...
func ParseCarbohydratesOnBoard(parser structure.ObjectParser) *CarbohydratesOnBoard {
<|file_name|>transformer.cpp<|end_file_name|><|fim▁begin|>/* *** Transformer *** src/base/transformer.cpp Copyright T. Youngs 2013-2015 This file is part of uChroma. uChroma 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 Sof...
Array<double> Transformer::transformArray(Array<double> sourceX, Array<double> sourceY, double z, int target) {
<|file_name|>sse.cc<|end_file_name|><|fim▁begin|>/////////////////////////////////////////////////6//////////////////////// // $Id: sse.cc 11984 2013-12-01 22:21:55Z sshwarts $ ///////////////////////////////////////////////////////////////////////// // // Copyright (c) 2003-2013 Stanislav Shwartsman // Writ...
{ op1.xmm32u(i->Ib() & 3) = BX_READ_32BIT_REG(i->src2()); }
<|file_name|>FrenchDeck.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 <|fim▁hole|> suits = 'spades diamonds clubs hearts'.split() def __init__(self): self._cards = [Card(rank, suit) for suit in self.suits for rank in self.ranks] def __len__(self): ...
Card = collections.namedtuple('Card', ['rank', 'suit']) class FrenchDeck: ranks = [str(n) for n in range(2, 11)] + list('JQKA')
<|file_name|>interceptors_client.go<|end_file_name|><|fim▁begin|>package gocsi import ( "golang.org/x/net/context" "google.golang.org/grpc" "github.com/thecodeteam/gocsi/csi" ) // ChainUnaryClient chains one or more unary, client interceptors // together into a left-to-right series that can be provided to a // ne...
switch trep := rep.(type) {
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import copy import warnings from itertools import chain from django.core.exceptions import ImproperlyConfigured from django.utils import six from haystack import fields as haysta...
from rest_framework import serializers from rest_framework.compat import OrderedDict from rest_framework.fields import empty
<|file_name|>_notify_raceboss_cry_msg_request_zocl.hpp<|end_file_name|><|fim▁begin|>// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually<|fim▁hole|>#pragma once #include <common/common.h> START_ATF_NAMESPACE struct _notify_raceboss_cry_msg_request_zocl ...
<|file_name|>arduino.js<|end_file_name|><|fim▁begin|>var Arduino = function(port) { this.portName = port; this.status = "CLOSED";<|fim▁hole|>} module.exports = Arduino;<|fim▁end|>
<|file_name|>bitcoin_sq.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="sq" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About breakout</source> <translation type="unfinished...