prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>eecli.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """Executable for the Earth Engine command line interface. This executable starts a Python Cmd instance to receive and process command line input entered by the user. If the executable is invoked with some command line arguments, the Cmd is launc...
from __future__ import print_function
<|file_name|>header.ts<|end_file_name|><|fim▁begin|>import {Component} from 'angular2/core'; import {Nav} from '../services/Nav'; import {ROUTER_DIRECTIVES} from 'angular2/router'; @Component({ selector: 'app-header', template: ` <img role="tab" class="header__menu js-toggle-menu" src="/images/ic_menu_24px.svg" al...
openSideNav(){
<|file_name|>AbstractJumpStatement.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2018 Johan Dykstrom * * 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 version 3 of the License...
* but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details.
<|file_name|>load-ner.js<|end_file_name|><|fim▁begin|>/* Copyright 2016-2017 University of Pittsburgh 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....
"rawurl": uriStr, "user": "alice" }
<|file_name|>edit.rs<|end_file_name|><|fim▁begin|>// // imag - the personal information management suite for the commandline // Copyright (C) 2015-2020 Matthias Beyer <mail@beyermatthias.de> and contributors // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Less...
impl EditHeader for Entry { fn edit_header(&mut self, rt: &Runtime) -> Result<()> { let mut header = ::toml::ser::to_string_pretty(self.get_header())?;
<|file_name|>bookmark_model.cc<|end_file_name|><|fim▁begin|>// Copyright 2014 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. #include "components/bookmarks/browser/bookmark_model.h" #include <algorithm> #include <funct...
<|file_name|>utils.go<|end_file_name|><|fim▁begin|>package helpers func getWhitelistedDrivers(resourceData *ResourceData) []string { tempMap := make(map[string]string) for _, driver := range resourceData.Blacklist { tempMap[driver] = "" } whitelist := []string{} for _, driver := range resourceData.Drivers { i...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages setup( name="panic-deployer", version="0.1", packages=find_packages(), requires=['kamaki', 'paramiko'], author='Giannis Giannakopoulos', author_email='ggian@cslab.ece.ntua.gr'<|fim▁hole|...
)
<|file_name|>Print.java<|end_file_name|><|fim▁begin|>//: net/mindview/util/Print.java // Print methods that can be used without // qualifiers, using Java SE5 static imports: package tsj.example.java.project.tsj.net.mindview.util; import java.io.*; public class Print { // Print with a newline: public static void pr...
} // The new Java SE5 printf() (from C): public static PrintStream
<|file_name|>show_filter.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import xbmc import xbmcgui import xbmcaddon import xbmcplugin import sys import urllib import shows import settings def menu(handle): total_items = 4 addDirectory(handle, 'All', 14, True, settings.addon_path + '/manage.png', total_items) ...
<|file_name|>aws-iotanalytics-pipeline_deviceshadowenrich.go<|end_file_name|><|fim▁begin|>package resources import "github.com/awslabs/goformation/cloudformation/policies" // AWSIoTAnalyticsPipeline_DeviceShadowEnrich AWS CloudFormation Resource (AWS::IoTAnalytics::Pipeline.DeviceShadowEnrich) // See: http://docs.aws...
<|file_name|>test_showmigrations_command.py<|end_file_name|><|fim▁begin|>from django.core.management import call_command import pytest import septentrion def test_showmigrations_command_override(mocker): mock_django_handle = mocker.patch( 'django.core.management.commands.showmigrations.Command.handle') ...
assert 'Current version is None' in captured.out
<|file_name|>apps.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig class LoginConfig(AppConfig):<|fim▁hole|><|fim▁end|>
name = 'login'
<|file_name|>helper.js<|end_file_name|><|fim▁begin|>//Change class of "Home" and "About" function setActive() { document.getElementById("about").className += "active" document.getElementById("home").setAttribute('class','no')<|fim▁hole|><|fim▁end|>
}
<|file_name|>collections_reduce.rs<|end_file_name|><|fim▁begin|>#![feature(test)] extern crate sknife; extern crate test; use sknife::collection::reduce; mod tests { use super::*; use test::Bencher; #[bench] fn bench_reduce_func(b: &mut Bencher) { let mut list: Vec<i32> = (1..50).collect(); ...
#[bench] fn bench_reduce_method(b: &mut Bencher) { let mut list: Vec<i32> = (1..50).collect(); let mut fact = |acc: i32, x| acc * x;
<|file_name|>args.py<|end_file_name|><|fim▁begin|>"""Playbook Args"""<|fim▁hole|> class Args: """Playbook Args""" def __init__(self, parser: ArgumentParser): """Initialize class properties."""<|fim▁end|>
from argparse import ArgumentParser
<|file_name|>ncmd_server.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import socket import os import time import shutil import sys import re import datetime import argparse # NCMD Libs import ncmd_print as np from ncmd_print import MessageLevel as MessageLevel import ncmd_commands as ncmds import ncmd_fileops as...
for path in paths: if not validatePath(path, server_mnt): result = False break
<|file_name|>commonconfig.py<|end_file_name|><|fim▁begin|>""" Default configuration values for certmaster items when not specified in config file. Copyright 2008, Red Hat, Inc see AUTHORS This software may be freely redistributed under the terms of the GNU general public license. You should have received a copy of t...
hash_function = Option('sha256')
<|file_name|>docker_image_availability_test.py<|end_file_name|><|fim▁begin|>import pytest from openshift_checks.docker_image_availability import DockerImageAvailability @pytest.fixture() def task_vars(): return dict( openshift=dict( common=dict( service_type='origin', ...
check._module_retry_interval = 0
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (C) 2010-2015 Bastian Kleineidam # # 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 version 3 of t...
def _need_func(testfunc, name, description): """Decorator skipping test if given testfunc returns False."""
<|file_name|>sql_util.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The Cockroach 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/LIC...
<|file_name|>lookup.py<|end_file_name|><|fim▁begin|>import re import django.core.exceptions import productstatus.core.models UUID_REGEX = re.compile('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}') def get_objects_from_field(field, value): results = [] for subclass in productstatus.core.mod...
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python import os import sys import shutil import logging import argparse import tempfile sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from webloader.phantomjs_loader import PhantomJSLoader from webloader.curl_loader import CurlLoader ...
else: logging.error('Unknown loader: %s', args.loader)
<|file_name|>downloader.go<|end_file_name|><|fim▁begin|>package mock import ( "errors" "fmt" . "github.com/macarrie/flemzerd/objects" ) type Downloader struct{} type ErrorDownloader struct{} type StalledDownloader struct{} type DLErrorDownloader struct{} var testTorrentsCount int // Status func (d Downloader) S...
Name: "Downloader",
<|file_name|>_php.py<|end_file_name|><|fim▁begin|>############################################################################### # Name: php.py # # Purpose: Define PHP syntax for highlighting and other features # # Author: Cody Precord <cpreco...
"""
<|file_name|>pion.py<|end_file_name|><|fim▁begin|># -*-coding:Utf-8 -* # Copyright (c) 2012 LE GOFF Vincent # 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 ...
self.numero = numero
<|file_name|>net_udp_test.go<|end_file_name|><|fim▁begin|>package collector import ( "fullerite/metric" "testing" l "github.com/Sirupsen/logrus" "github.com/stretchr/testify/assert" ) func TestNewProcNetUDPStats(t *testing.T) { c := make(chan metric.Metric) i := 10 l := defaultLog.WithFields(l.Fields{"collect...
assert.Nil(t, fakeCollector.remoteAddressWhitelist)
<|file_name|>bucket_hash.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...
}
<|file_name|>main_module.py<|end_file_name|><|fim▁begin|># - # Copyright 2016 Max Fischer # - # # - # 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...
def __eq__(self, other):
<|file_name|>pipelines_provider.go<|end_file_name|><|fim▁begin|>package mock import ( "context" fn "knative.dev/kn-plugin-func" ) <|fim▁hole|> RunFn func(fn.Function) error RemoveInvoked bool RemoveFn func(fn.Function) error } func NewPipelinesProvider() *PipelinesProvider { return &PipelinesProvid...
type PipelinesProvider struct { RunInvoked bool
<|file_name|>compat.py<|end_file_name|><|fim▁begin|><|fim▁hole|> # Django 1.5 add support for custom auth user model from django.conf import settings if django.VERSION >= (1, 5): AUTH_USER_MODEL = settings.AUTH_USER_MODEL else: try: from django.contrib.auth.models import User AUTH_USER_MODEL = ...
import django
<|file_name|>logging_test.go<|end_file_name|><|fim▁begin|>// Copyright 2015 Canonical Ltd. // Licensed under the LGPLv3, see LICENCE file for details. package utils_test import ( "errors" jc "github.com/juju/testing/checkers" gc "gopkg.in/check.v1" "github.com/juju/juju/feature" "github.com/juju/juju/testing" ...
s.SetFeatureFlags(feature.LogErrorStack)
<|file_name|>convex_try_new3d.rs<|end_file_name|><|fim▁begin|>extern crate nalgebra as na; use na::Point3; use ncollide3d::shape::ConvexHull; fn main() { let points = vec![<|fim▁hole|> Point3::new(0.0, 1.0, 0.0), Point3::new(0.0, -1.0, 0.0), Point3::new(1.0, 0.0, 0.0), Point3::new(-...
Point3::new(0.0f32, 0.0, 1.0), Point3::new(0.0, 0.0, -1.0),
<|file_name|>mu_lambda.rs<|end_file_name|><|fim▁begin|>use std::sync::mpsc::{Sender, Receiver}; use std::sync::{mpsc, Arc}; use rand::{Rng, thread_rng}; use threadpool::{ThreadPool}; use chapter2::evaluation::{EvaluationFn}; use chapter2::genotype::{Genotype}; use chapter2::statistics::{Statistic}; use util::util::{sh...
current_iteration: u32, mu: usize, // number to keep lambda: usize, // number to generate mutation: f64, // mutation of genotype to mutate (between 0.0 and 1.0)
<|file_name|>underscore_static.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> static _: () = (); //~ ERROR expected identifier, found reserved identifier `_`<|fim▁end|>
// compile-flags: -Z parse-only
<|file_name|>four_bit_adder.rs<|end_file_name|><|fim▁begin|>// http://rosettacode.org/wiki/Four_bit_adder use std::ops::Deref; use std::fmt; // primitive gates fn not(a: bool) -> bool { !a } fn or(a: bool, b: bool) -> bool { a || b } fn and(a: bool, b: bool) -> bool { a && b } /// xor gate [2x not, 2x and...
assert_eq!(false, not(true)); }
<|file_name|>0037_auto_20170813_0319.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-08-13 03:19 from __future__ import unicode_literals from django.db import migrations, models <|fim▁hole|> class Migration(migrations.Migration): dependencies = [ ('website', '00...
<|file_name|>findChildrenComponentNodes.ts<|end_file_name|><|fim▁begin|>import { fastFindAll } from '../utils/fastFindAll'; import { isSupportedComponent } from '../utils/isSupportedComponent'; <|fim▁hole|>export function findChildrenComponentNodes(node: ChildrenMixin) { return fastFindAll(node.children, (v) => v !==...
<|file_name|>FeatureStyleTypeItemProvider.java<|end_file_name|><|fim▁begin|>/** * <copyright> * </copyright> * * $Id$ */ package net.opengis.gml.provider; import java.util.Collection; import java.util.List; import net.opengis.gml.FeatureStyleType; import net.opengis.gml.GmlFactory; import net.opengis.gml.GmlPac...
*/
<|file_name|>3.js<|end_file_name|><|fim▁begin|>var arrayOfInts = [1, 10, -5, 1, -100]; function maxProduct(arr) { var smallest = 0; var almostSmallest = 0; var largest = 0; var second = 0; var third = 0; for(var i = 0; i < arr.length; i++ ) { if(arr[i] > largest){ third = seco...
smallest = arr[i]; } else { if( arr[i] < almostSmallest) { almostSmallest = arr[i]
<|file_name|>calendar-state.ts<|end_file_name|><|fim▁begin|>import ModulDate from './../../../../utils/modul-date/modul-date'; import { RangeDate, SingleDate } from './abstract-calendar-state'; export enum CalendarEvent { DAY_SELECT = 'day-select', DAY_MOUSE_ENTER = 'day-mouse-enter', DAY_MOUSE_LEAVE = 'da...
<|file_name|>resolver.js<|end_file_name|><|fim▁begin|>/** Represents an asynchronous operation. Provides a standard API for subscribing to the moment that the operation completes either successfully (`fulfill()`) or unsuccessfully (`reject()`). @class Promise.Resolver @constructor @param {Promise} promise The promise ...
/** List of success callbacks @property _callbacks
<|file_name|>0007_add_novice_h2h.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-03-14 22:11 from __future__ import unicode_literals from django.db import migrations, models <|fim▁hole|> ('olympic', '0006_allow_seeding_and_results'), ] operations = [ ...
class Migration(migrations.Migration): dependencies = [
<|file_name|>package.py<|end_file_name|><|fim▁begin|>############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, t...
depends_on('libxt')
<|file_name|>ResponderTouchHistoryStore.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import invariant from 'fbjs/lib/invariant'; import w...
<|file_name|>sv.js<|end_file_name|><|fim▁begin|>/* flatpickr v4.2.1, @license MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (factory((global.sv = {}))); }(this, (functi...
<|file_name|>leaves.rs<|end_file_name|><|fim▁begin|>// Methods, signals, properties, and interfaces. use super::utils::{Argument, Annotations, Introspect, introspect_args}; use super::{MethodType, MethodInfo, MethodResult, MethodErr, DataType, PropInfo, MTFn, MTFnMut, MTSync}; use {Member, Signature, Message, Path, Mes...
<|file_name|>custom-deserializer.spec.ts<|end_file_name|><|fim▁begin|>import {jsonArrayMember, jsonMember, jsonObject, TypedJSON} from '../../src'; import {CustomDeserializerParams} from '../../src/metadata'; describe('lazy, custom array member deserializer', () => { @jsonObject class Obj { @jsonArrayM...
shouldDeserialize: false, }, { prop: 'gogo',
<|file_name|>input-output.component.ts<|end_file_name|><|fim▁begin|>import { Component, Input, Output, EventEmitter } from '@angular/core'; @Component({ selector: 'app-input-output', templateUrl: './input-output.component.html', styleUrls: ['./input-output.component.css'] }) export class InputOutputComponent { ...
lineThrough = ''; delete() { console.warn('Child says: emiting item deleteRequest with', this.item);
<|file_name|>processedData.ts<|end_file_name|><|fim▁begin|>import * as _ from 'lodash'; <|fim▁hole|>import { data } from './data'; import { extendFramework } from './extendedFramework'; // Note: nugetTarget is empty for the XBox framework. export const processedData = data .filter(p => p.nugetTarget) .map(p =>...
<|file_name|>Input.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react'; import { View, TextInput, Text } from 'react-native'; <|fim▁hole|>const Input = ({ label, securetxt, maxlen, keytype, value, onChangeText, placeHolder }) => { return ( <View style={styles.containerStyle}> ...
<|file_name|>DeployFromImageDetails.py<|end_file_name|><|fim▁begin|>from cloudshell.cp.vcenter.models.vCenterVMFromImageResourceModel import vCenterVMFromImageResourceModel class DeployFromImageDetails(object): def __init__(self, image_params, app_name):<|fim▁hole|> :return: """ self.image_...
""" :type image_params: vCenterVMFromImageResourceModel :type app_name: str
<|file_name|>process_mx_test.go<|end_file_name|><|fim▁begin|>package lang_test import ( "testing" _ "github.com/lmorg/murex/builtins" "github.com/lmorg/murex/test" ) // TestMxProcess is a function for testing parser, builtins and other behaviors // which are defined in process.go. This might result in duplication...
{
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! Watchexec: the library<|fim▁hole|>//! and foremost. **For this reason, semver guarantees do _not_ apply to this //! library.** Please use exact version matching, as this API may break even //! between patch point releases. This policy may change in the future. //! //...
//! //! This is the library version of the CLI tool [watchexec]. The tool is //! implemented with this library, but the purpose of the watchexec project is //! to deliver the CLI tool, instead of focusing on the library interface first
<|file_name|>openstack_identity.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...
def list_tenants(self):
<|file_name|>test8.3.cpp<|end_file_name|><|fim▁begin|>template <typename Item> void mergesort(Item a[], int l, int r)<|fim▁hole|> mergesort(a, l, m); mergesort(a, m+1, r); merge(a, l, m, r); }<|fim▁end|>
{ if (r <= 1) return ; int m = (r+1)/2;
<|file_name|>length.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/. */ //! [Length values][length]. //! //! [length]: https://drafts....
}
<|file_name|>Circles.py<|end_file_name|><|fim▁begin|>import turtle kay = turtle.Turtle() kay.penup() kay.goto(-125,0) kay.pendown() kay.width(5) kay.color() kay.color('blue','yellow') kay.circle(50) kay.penup() kay.goto(0,0) kay.pendown()<|fim▁hole|> kay.color() kay.color('black','yellow') kay.circle(50) kay.penup(...
<|file_name|>client_stats.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2012 Google Inc. All Rights Reserved. """AFF4 object representing client stats.""" from grr.lib import aff4 from grr.lib import rdfvalue from grr.lib.aff4_objects import standard class ClientStats(standard.VFSDirectory): "...
"Client Stats.", "Client stats")
<|file_name|>htmllegendelement.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/. <|fim▁hole|>use dom::bindings::codegen::Bindings::HTMLL...
<|file_name|>tests.bundle.ts<|end_file_name|><|fim▁begin|>import 'core-js'; import 'core-js/es7/reflect'; import 'zone.js/dist/zone'; import 'zone.js/dist/long-stack-trace-zone'; import 'zone.js/dist/async-test'; import 'zone.js/dist/fake-async-test'; import 'zone.js/dist/sync-test'; import 'zone.js/dist/proxy'; import...
<|file_name|>app.js<|end_file_name|><|fim▁begin|>define(function (require) { var app = angular.module('easyCodeApp', ['ngRoute', 'ui.bootstrap', 'ui.codemirror', 'vtortola.ng-terminal', 'flow']); // controller for header actions app.controller('headerController', function($scope){ // add header properties fo...
<|file_name|>S11.8.3_A3.2_T1.2.js<|end_file_name|><|fim▁begin|>// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- info: > Operator x <= y returns ToString(x) <= ToString(y), if Type(Primitive(x)) is String and Type(Primitive...
//CHECK#2 if ((function(){return 1} <= {}) !== (function(){return 1}.toString() <= {}.toString())) {
<|file_name|>for_continue.py<|end_file_name|><|fim▁begin|>import question_template game_type = 'input_output' source_language = 'C' parameter_list = [ ['$x1','int'],['$x2','int'],['$x3','int'],['$y0','int'], ] tuple_list = [ ['for_continue_', [0,1,2,None], [0,2,2,None], [0,4,2,None], [0,6,2,None], [0...
[None,None,5,7], ] ]
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate byteorder; use std::collections::HashMap; use std::io::Write; use byteorder::{LittleEndian, WriteBytesExt}; #[derive(Hash, Eq, PartialEq, Clone, Debug)] struct Frac(u64, u64); type Memory = HashMap<Frac, f64>;<|fim▁hole|> if y == 0 { x...
fn simplify(Frac(a, b): Frac) -> Frac { fn gcd(x: u64, y: u64) -> u64 {
<|file_name|>setting_util.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import glob import inspect import os import keyring import getpass import sys import signal from i3pystatus import Module, SettingsBase from i3pystatus.core import ClassFinder from collections import defaultdict, OrderedDict def signal_han...
print("%s - %s" % (idx, module))
<|file_name|>mep-feature-contextmenu.js<|end_file_name|><|fim▁begin|>/* * ContextMenu Plugin * * */ (function($) { $.extend(mejs.MepDefaults, contextMenuItems = [ // demo of a fullscreen option { render: function(player) { // check for fullscreen plugin if (typeof player.enterFul...
if (rendered != null) {
<|file_name|>response_test.go<|end_file_name|><|fim▁begin|>package gogo import ( "net/http" "net/http/httptest" "testing" "github.com/golib/assert" ) func Test_NewResponse(t *testing.T) { it := assert.New(t) recorder := httptest.NewRecorder() response := NewResponse(recorder) it.Implements((*Responser)(nil)...
response.FlushHeader()
<|file_name|>NoOpMetric.java<|end_file_name|><|fim▁begin|>/** * Copyright 2016 Yahoo 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...
*/ public NoOpMetric() { }
<|file_name|>parse_test.py<|end_file_name|><|fim▁begin|>import unittest from aiourlstatus import app class TestEmpty(unittest.TestCase): def test_no_urls(self): data = '' urls, len_urls = app.find_sort_urls(data) self.assertEqual(urls, []) self.assertEqual(len_urls, 0) class TestTX...
['http://www.bbc.com/sport/0/'], ['http://www.haskell.org/'], ['http://lxer.com/'], ['http://www.find-happiness.com/definition-of-happiness.html'], ['http://www.wikihow.com/Elevate-Your-Self-Esteem']]
<|file_name|>bitcoin_fr.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="fr" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Euphoria</source> <translation>Au sujet de Euph...
<source>Could not unlock wallet.</source> <translation>Impossible de déverrouiller le portefeuille.</translation> </message> <message>
<|file_name|>x86_64_unknown_freebsd.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apa...
arch: "x86_64".to_string(), target_os: "freebsd".to_string(), options: base,
<|file_name|>test_discover.py<|end_file_name|><|fim▁begin|>#!/bin/env python # -*- coding: utf-8 -*- __author__ = 'eduardo' import unittest import os import os.path import cocar.tests from ..session import Host, SnmpSession, NmapSession from ..model import network from .. import utils class TestDiscover(unittest.Tes...
def test_scan(self):
<|file_name|>util.js<|end_file_name|><|fim▁begin|>/** * utils * * @namespace mix.util * * @author Yang,junlong at 2016-07-28 20:27:54 build. * @version $Id$ */ var fs = require('fs'); var url = require('url'); var pth = require('path'); var util = require('util'); //var iconv = require('iconv-lite'); var cryp...
<|file_name|>Label.py<|end_file_name|><|fim▁begin|>class Label: def collectLabel(self,l): """genera l'elenco delle etichette, perche' potrebbero essere presenti varie versioni di documenti nella collezione in mongodb @param list: lista degli item in da inserire nel file excel @return: []"""<|fim▁hole|> labels...
labels = {} for i in l:
<|file_name|>moodle-core-blocks-debug.js<|end_file_name|><|fim▁begin|>YUI.add('moodle-core-blocks', function (Y, NAME) { /** * Provides drag and drop functionality for blocks. * * @module moodle-core-blockdraganddrop */ var AJAXURL = '/lib/ajax/blocks.php', CSS = { BLOCK : 'block', BLOCKREGION : 'block-re...
* Returns the class name to use on the body if the region contains blocks. * @method get_used_region_class
<|file_name|>guardian.py<|end_file_name|><|fim▁begin|>AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', # default<|fim▁hole|> # DJANGO GUARDIAN ANONYMOUS_USER_ID = -1<|fim▁end|>
'guardian.backends.ObjectPermissionBackend', )
<|file_name|>options.go<|end_file_name|><|fim▁begin|>package logger // options keep settings for loggers/sweepers // Indexed by the logger unique name type options struct { values map[string][]OptionItem } // Option represents settings of the logger type Option struct { // Apply logger option Apply func(op *option...
func SweeperOption(name string, duration int, settings map[string]interface{}) Option {
<|file_name|>tables.py<|end_file_name|><|fim▁begin|># Copyright 2012 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENS...
class CreateNetwork(tables.LinkAction): name = "create" verbose_name = _("Create Network") url = "horizon:project:networks:create"
<|file_name|>user.rs<|end_file_name|><|fim▁begin|>use util::AppendToQueryParams; use url::UrlQuery; use url::form_urlencoded::Serializer; #[derive(Debug, Hash, Eq, PartialEq)] pub struct UsersRequest { pub start_index: Option<u64>, pub max_results: Option<u64>, pub include_guests: Option<bool>, pub inc...
impl Default for UsersRequest {
<|file_name|>deleted.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>#[derive(Deserialize)] pub struct Deleted { pub deleted: bool, pub id: String, }<|fim▁end|>
<|file_name|>_virtual_machine_scale_set_vms_operations.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license...
request = _convert_request(request) request.url = self._client.format_url(request.url)
<|file_name|>frame.cpp<|end_file_name|><|fim▁begin|>// Chemfiles, a modern library for chemistry file reading and writing // Copyright (C) Guillaume Fraux and contributors -- BSD license #include <cstdint> #include <string> #include "chemfiles/capi/types.h" #include "chemfiles/capi/misc.h" #include "chemfiles/capi/ut...
static_assert(
<|file_name|>CanvasPanel.java<|end_file_name|><|fim▁begin|>package org.iq4j.webcam; import java.awt.Canvas; import java.awt.Color; import java.awt.Dimension; import java.awt.EventQueue; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import ja...
} public static GraphicsDevice getDefaultScreenDevice() { return GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
<|file_name|>hash.go<|end_file_name|><|fim▁begin|>package utils import (<|fim▁hole|> "github.com/mmcloughlin/geohash" "github.com/whosonfirst/go-whosonfirst-geojson-v2" "github.com/whosonfirst/go-whosonfirst-hash" ) func GeohashFeature(f geojson.Feature) (string, error) { bboxes, err := f.BoundingBoxes() if err...
"errors"
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 -Es # # Copyright (C) 2013 Red Hat # see file 'COPYING' for use and warranty information # # selinux gui is a tool for the examining and modifying SELinux policy # # This program is free software; you can redistribute it and/or # modify it under ...
if app.startswith(compare): if app.startswith(compare) and not self.exclude_type(app, exclude_list): iter = self.files_type_combolist.append()
<|file_name|>interface.go<|end_file_name|><|fim▁begin|>// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. // Package kinesisiface provides an interface to enable mocking the Amazon Kinesis service client // for testing your code. // // It is important to note that this interface will have breaking ch...
<|file_name|>run_game.py<|end_file_name|><|fim▁begin|>import pw19.__main__<|fim▁hole|> pw19.__main__.main()<|fim▁end|>
if __name__ == "__main__":
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2015 Open-RnD Sp. z o.o. # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without # restriction, including without lim...
# included in all copies or substantial portions of the Software.
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- #<|fim▁hole|># Copyright (c) 2017 mooncake. All Rights Reserved #### # @brief # @author Eric Yue ( hi.moonlight@gmail.com ) # @version 0.0.1 from distutils.core import setup V = "0.7" setup( name = 'mooncake_utils', packages = ['mooncake_ut...
<|file_name|>impls.rs<|end_file_name|><|fim▁begin|>macro_rules! max_of { ($name:ident) => { ::std::$name::MAX }; } macro_rules! min_of { ($name:ident) => { ::std::$name::MIN }; } macro_rules! approx_blind { (($($attrs:tt)*), $src:ty, $dst:ty, $scheme:ty) => { as_item! { $($attrs)* ...
num_conv! { usize=> n-i8, n-i16, #[32] n-i32, #[32] w i64, #[64] n-i32, #[64] n-i64 } num_conv! { usize=> n-u8, n-u16, #[32] e u32, #[32] w u64, #[64] n-u32, #[64] e u64 } num_conv! { usize=> n-isize }
<|file_name|>russian.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="ru" sourcelanguage="en"> <context> <name>U2::LocalWorkflow::CallVariantsPrompter</name> <message> <location filename="../src/SamtoolMpileupWorker.cpp" line="690"/> ...
</message> <message> <location filename="../src/SamtoolMpileupWorker.cpp" line="698"/> <source>For reference sequence from &lt;u&gt;%1&lt;/u&gt;,</source>
<|file_name|>test_remote.py<|end_file_name|><|fim▁begin|>import sys from flexmock import flexmock import inject from mcloud.events import EventBus from mcloud.txdocker import IDockerClient, DockerTwistedClient from mcloud.util import txtimeout<|fim▁hole|>from mcloud.remote import Server, Client, ApiError, Task, ApiRpcS...
import pytest
<|file_name|>digits.rs<|end_file_name|><|fim▁begin|>extern crate num;<|fim▁hole|> use self::num::traits::Num; use std::string::ToString; pub trait Digits { fn digits(self) -> Vec<u32>; } impl<T> Digits for T where T: Num + ToString { fn digits(self) -> Vec<u32> { self.to_string().chars().filter(|c| c.is_numer...
<|file_name|>org_team.go<|end_file_name|><|fim▁begin|>// Copyright 2016 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package models import ( "errors" "fmt" "strings" ) const ownerTeamName = "Owners" // Team represen...
// RemoveTeamMember removes member from given team of given organization.
<|file_name|>game.ts<|end_file_name|><|fim▁begin|>///// <reference path="babylon.2.5.d.ts" /> import * as BABYLON from 'babylonjs'; import * as firebase from 'firebase'; // import { LeftPanel } from './ui/left-panel'; import { Gamer } from "./gamer"; import { UIService } from "../../providers/providers"; import { ST...
if (committed) { if (snapshot.val().joiner.uid == user.uid) {
<|file_name|>account_edi_format.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from odoo import api, models, fields, tools, _ from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, float_repr from odoo.tests.common import Form from odoo.exceptions import UserError from datetime import datetime from lxml import e...
# Invoice lines.
<|file_name|>cluster_flags.rs<|end_file_name|><|fim▁begin|>#[repr(i32)] pub enum ClusterFlags {<|fim▁hole|>}<|fim▁end|>
Forwards = 0, Backwards = 1
<|file_name|>test_smsshell_commands.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*- import argparse import logging import pytest import SMSShell import SMSShell.commands def test_abstract_init(): """Test abstract init methods """ abs = SMSShell.commands.AbstractCommand(logging.getLogger(), ...
com = Bad(logging.getLogger(), object(), object(),
<|file_name|>disable.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """Renames *.py files to *.py.park.""" import os import sys def main(): """Drives the main script behavior.""" script_dir = os.path.dirname(os.path.realpath(__file__)) for filename in os.listdir(script_dir): basename, exten...