prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>notsotalkative.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ voice_nav.py allows controlling a mobile base using simple speech commands. Based on the voice_cmd_vel.py script by Michael Ferguson in the pocketsphinx ROS package. """ import roslib; #roslib.load_manifest('pi_speech_tutorial')...
<|file_name|>schedule_tabulate.go<|end_file_name|><|fim▁begin|>package models import ( "errors" "fmt" "log" "sort" "time" "github.com/UniversityRadioYork/2016-site/utils" ) // weekFromVars extracts the year, and week strings from vars. func weekFromVars(vars map[string]string) (string, string, error) { y, ok ...
}
<|file_name|>Sock.cpp<|end_file_name|><|fim▁begin|>// // ooSocket.c WJ112 // /* * Copyright (c) 2014, Walter de Jong * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions ...
throw IOError("socket is already in use"); }
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>use std::str::FromStr; #[macro_use] extern crate nom; use std::collections::HashMap; mod parser; use parser::{get_lines, Line}; pub use parser::ParseError; #[derive(Debug)] pub struct Config { map: HashMap<String, String>, } impl Config { pub fn get(&self, p...
fn comments() {
<|file_name|>settings_base.py<|end_file_name|><|fim▁begin|>"""private_base will be populated from puppet and placed in this directory""" import logging import os import dj_database_url from lib.settings_base import ( CACHE_PREFIX, ES_INDEXES, KNOWN_PROXIES, LOGGING, CSP_SCRIPT_SRC, CSP_FRAME_SRC) from .. im...
}, }
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Simphony-remote documentation build configuration file, created by # sphinx-quickstart on Tue Jun 7 14:01:45 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not ...
#
<|file_name|>basic.js<|end_file_name|><|fim▁begin|>require('./harness')({ numRuns: 10000,<|fim▁hole|> concurrency: 1 }, function (err, time) { console.log('Ran 10000 jobs through Bull with concurrency 1 in %d ms', time); });<|fim▁end|>
<|file_name|>SidebarItem.js<|end_file_name|><|fim▁begin|>import classnames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; <|fim▁hole|> static propTypes = { baseClassName: PropTypes.string, children: PropTypes.node, modifier: PropTypes.string, }; static defaultProps =...
class SidebarItem extends React.Component {
<|file_name|>json.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # json.py # TurboHvZ # # Copyright (C) 2008 Ross Light #<|fim▁hole|># # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR ...
# 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, or # (at your option) any later version.
<|file_name|>build.js<|end_file_name|><|fim▁begin|>"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const chalk = require("chalk"); const cli_utils_1 = require("@ionic/cli-utils"); const command_1 = require("@ionic/cli-utils/lib/command"); const validators_1...
<|file_name|>GeneralAbInitioProgram.py<|end_file_name|><|fim▁begin|>from __future__ import (absolute_import, division, print_function) from mantid.kernel import logger import AbinsModules import six from mantid.kernel import Atom class GeneralAbInitioProgramName(type): def __str__(self): return self.__nam...
<|file_name|>l-fileinfo_sv.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="sv"> <context> <name>MainUI</name> <message> <location filename="../MainUI.ui" line="14"/> <location filename="../MainUI.ui" line="29"/> <location f...
<source>Created:</source> <translation>Skapad:</translation> </message> <message>
<|file_name|>ISpikes.ts<|end_file_name|><|fim▁begin|>import { IClawSpikes } from './IClawSpikes';<|fim▁hole|>export type ISpikes = IClawSpikes<'w'>;<|fim▁end|>
<|file_name|>test_psmdb40_upgrade_from.py<|end_file_name|><|fim▁begin|>import os import pytest import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') DEB_PACKAGES = ['percona-server-mongodb', 'percona-server-m...
pytest.skip("This test only for RHEL based platforms") if float(host.system_info.release) < 8.0: pytest.skip("Only for centos7 tests")
<|file_name|>hardy_bearing_3.js<|end_file_name|><|fim▁begin|>var Base = require("./../plugin"); module.exports = class extends Base { isDisableSelfAttackPriority(self, rival) { return true; } isDisableEnemyAttackPriority(self, rival) { return true;<|fim▁hole|>}<|fim▁end|>
}
<|file_name|>browser.go<|end_file_name|><|fim▁begin|>// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Taken from https://tip.golang.org/src/cmd/internal/browser/browser.go?m=text // Package browser provide...
<|file_name|>ODistributedVersion.java<|end_file_name|><|fim▁begin|>/* * Copyright 2010-2012 Luca Garulli (l.garulli--at--orientechnologies.com) * * 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 ...
<|file_name|>tone.js<|end_file_name|><|fim▁begin|>(function (root) { "use strict"; var Tone; //constructs the main Tone object function Main(func){ Tone = func(); } //invokes each of the modules with the main Tone object as the argument function Module(func){ func(Tone); } /** * Tone.js * @author Yot...
Tone.DrumSynth.prototype.dispose = function () { Tone.Instrument.prototype.dispose.call(this); this._writable([ 'oscillator',
<|file_name|>Utility.java<|end_file_name|><|fim▁begin|>package app.yweather.com.yweather.util; import android.annotation.TargetApi; import android.content.Context; import android.content.SharedPreferences; import android.os.Build; import android.preference.PreferenceManager; import org.json.JSONArray; import org.json...
editor.putString("current_date",sdf.format(new Date())); editor.commit();
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ###########################################################################...
from . import account_invoice # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
<|file_name|>timer.py<|end_file_name|><|fim▁begin|>import threading __author__ = "Piotr Gawlowicz" __copyright__ = "Copyright (c) 2015, Technische Universitat Berlin" __version__ = "0.1.0" __email__ = "gawlowicz@tkn.tu-berlin.de" class Timer(object): def __init__(self, handler_): assert callable(handler_...
self._thread.setDaemon(True) self._thread.start()
<|file_name|>TaskListActivity.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2016 Hugo Matalonga & João Paulo Fernandes * * 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...
if (mTaskList.isEmpty()) { Snackbar.make(
<|file_name|>layout.module.js<|end_file_name|><|fim▁begin|>(function () {<|fim▁hole|> angular.module('app.layout', ['app.core', 'ui.bootstrap.collapse']); })();<|fim▁end|>
'use strict';
<|file_name|>librato.go<|end_file_name|><|fim▁begin|>package librato import ( "bytes" "encoding/json" "fmt" "io/ioutil" "log" "net/http" "regexp" "github.com/influxdata/telegraf" "github.com/influxdata/telegraf/internal" "github.com/influxdata/telegraf/plugins/outputs" "github.com/influxdata/telegraf/plugi...
func (l *Librato) buildGauges(m telegraf.Metric) ([]*Gauge, error) { gauges := []*Gauge{}
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ use crate::{ lsp_runtime_error::{LSPRuntimeError, LSPRuntimeResult}, serve...
}; use common::PerfLogger;
<|file_name|>0006_add_migration_user.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models<|fim▁hole|> def forwards(self, orm): """Adds a user to be used for migrations.""" # ``make_password(None...
from django.contrib.auth.hashers import make_password class Migration(DataMigration):
<|file_name|>proxy_test.go<|end_file_name|><|fim▁begin|>package mist import "testing" // TestSameSubscriber tests to ensure that mist will not send message to the // same proxy who publishes them func TestSameSubscriber(t *testing.T) { // create a new proxy sender := NewProxy() defer sender.Close() // sender sub...
// tags; we test both configurations here because maps are unordered
<|file_name|>model.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {fromPromise} from 'rxjs/observable/fromPromise'; import ...
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>import json from datetime import datetime from django.test import TestCase, Client from authentication.models import Account from recipies.models import Recipe, RecipeSteps from recipies.serializers import RecipeSerializer, RecipeStepsSerializer class Utility(Test...
<|file_name|>parser_internal.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import logging import time from flexget import plugin<|fim▁hole|>from .parser_common import ParseWarning log ...
from flexget.event import event from flexget.utils.log import log_once from flexget.utils.titles.movie import MovieParser from flexget.utils.titles.series import SeriesParser
<|file_name|>AuthenticateModule.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017 Crown Copyright * * 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/lice...
@Override protected void configure() {
<|file_name|>JPAOverriddenAnnotationReader.java<|end_file_name|><|fim▁begin|>/* * Hibernate, Relational Persistence for Idiomatic Java * * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ packag...
annotation = getPhysicalAnnotation( PrimaryKeyJoinColumns.class ); addIfNotNull( annotationList, annotation ); annotation = getPhysicalAnnotation( MapKey.class ); addIfNotNull( annotationList, annotation );
<|file_name|>proc-macro.rs<|end_file_name|><|fim▁begin|>extern crate cargotest; extern crate hamcrest; use cargotest::is_nightly; use cargotest::support::{project, execs}; use hamcrest::assert_that; #[test] fn noop() { if !is_nightly() { return; } let client = project("client") .file("Car...
<|file_name|>base.py<|end_file_name|><|fim▁begin|>""" Django settings for astrology project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.django...
<|file_name|>numberRecognizer.ts<|end_file_name|><|fim▁begin|>import { IModel } from "../models"; import { Recognizer } from "../recognizer"; import { Culture } from "../culture"; import { NumberMode, NumberModel, OrdinalModel, PercentModel } from "./models"; import { AgnosticNumberParserType, AgnosticNumberParserFacto...
AgnosticNumberParserFactory.getParser(AgnosticNumberParserType.Percentage, new ChineseNumberParserConfiguration()), new ChinesePercentageExtractor())); // French models
<|file_name|>sale_margin.py<|end_file_name|><|fim▁begin|>############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify #...
if line.product_id: res[line.id] = round(line.price_subtotal - ((line.purchase_price or line.product_id.standard_price) * line.product_uos_qty), 2) return res
<|file_name|>expr.rs<|end_file_name|><|fim▁begin|>/*如果代码块最后一条表达式结尾处有分号,那 么返回值将变成 ()。 (译注:代码块中的最后一条语句是代码块中实际执行的最后一条语句,而不一 定是代码块中最后一行的语句。)*/ fn main() { let x = 5u32; let y = { let x_squared = x * x; let x_cube = x_squared * x; // 将此表达式赋给 `y` x_cube + x_squared + x }; l...
println!("z is {:?}", z);
<|file_name|>audio.py<|end_file_name|><|fim▁begin|><|fim▁hole|> from mutagen.flac import FLAC from mutagen.oggvorbis import OggVorbis except ImportError: pass import parser import mutagenstripper class MpegAudioStripper(parser.GenericParser): """ Represent mpeg audio file (mp3, ...) """ def _s...
""" Care about audio fileformat """ try:
<|file_name|>HorizontalMetricsTable.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|>messages_zh.js<|end_file_name|><|fim▁begin|>(function( factory ) { if ( typeof define === "function" && define.amd ) { define( ["jquery", "../jquery.validate"], factory ); } else if (typeof module === "object" && module.exports) { module.exports = factory( require( "jquery" ) ); } else { factory( ...
min: $.validator.format( "请输入不小于 {0} 的数值" ) } );
<|file_name|>backoff_utils.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ...
} // Gc execute garbage collection on the pod back-off.
<|file_name|>TasksService.js<|end_file_name|><|fim▁begin|>export default class TasksService { static async fetchTasks() { const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); await delay(1000); return [<|fim▁hole|> } }<|fim▁end|>
{ id: 0, description: "task1", status: "Active" }, { id: 1, description: "task2", status: "Active" }, ];
<|file_name|>latinEntities.js<|end_file_name|><|fim▁begin|>//>>built define("dojox/editor/plugins/nls/latinEntities", { root: //begin v1.x content ({ /* These are already handled in the default RTE amp:"ampersand",lt:"less-than sign", gt:"greater-than sign", nbsp:"no-break space\nnon-breaking space", quot:"quo...
ecirc:"Latin small letter e with circumflex", euml:"Latin small letter e with diaeresis", igrave:"Latin small letter i with grave",
<|file_name|>blocks.rs<|end_file_name|><|fim▁begin|>use ansi_term::Style; use crate::fs::fields as f; use crate::output::cell::TextCell; impl f::Blocks { pub fn render<C: Colours>(&self, colours: &C) -> TextCell { match self { Self::Some(blk) => TextCell::paint(colours.block_count(), blk.to_...
fn no_blocks(&self) -> Style; }
<|file_name|>0002_auto_20171113_0933.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-11-13 09:33 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('questionnaires', '0001_initial'...
]
<|file_name|>system.py<|end_file_name|><|fim▁begin|># coding: utf-8 # This file is part of Thomas Aquinas. # # Thomas Aquinas 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, or...
<|file_name|>generateDIPFromAIPGenerateDIP.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica is free software: you can redistribute it and/or modify # it under the terms of the GNU Aff...
<|file_name|>GridMap.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * Copyright (C) 2009-2011 MaNGOSZero <https://github.com/mangos/zero> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as ...
int cy_int = ((int)y & (MAP_RESOLUTION-1)) - m_liquid_offX;
<|file_name|>ListView.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2015, Facebook, Inc. All rights reserved. * * Facebook, Inc. ("Facebook") owns all right, title and interest, including * all intellectual property and other proprietary rights, in and to the React * Native CustomComponents software (the "S...
<|file_name|>bookmark.d.ts<|end_file_name|><|fim▁begin|>import * as React from 'react';<|fim▁hole|><|fim▁end|>
import { IconBaseProps } from 'react-icon-base'; export default class FaBookmark extends React.Component<IconBaseProps, any> { }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>#from exceptions import ConfigError, DomainError, ConversionError #import tools #import io #__all__ = ['wrftools', 'tools', 'io']<|fim▁end|>
#import wrftools
<|file_name|>issue520.rs<|end_file_name|><|fim▁begin|>#![allow(clippy::float_cmp)] use serde_derive::{Serialize, Deserialize}; #[derive(Serialize, Deserialize, Debug)] #[serde(tag = "type", content = "data")] enum E { Float(f32), } #[test] fn test() { let e = E::Float(159.1); let v = serde_json::to_value...
match e {
<|file_name|>oppia-interactive-text-input.component.spec.ts<|end_file_name|><|fim▁begin|>// Copyright 2021 The Oppia 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 Lic...
{
<|file_name|>config.spec.js<|end_file_name|><|fim▁begin|>/* Copyright 2013 10gen 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/L...
it('stores the script name', function () { expect(mongo.config.scriptName).toBeDefined(); });
<|file_name|>test_users.py<|end_file_name|><|fim▁begin|># Copyright 2010 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www....
<|file_name|>scale.go<|end_file_name|><|fim▁begin|>package util import ( "github.com/golang/glog" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/strategicpatch" kapi "k8s.io/kubernetes/pkg/api" kapiv1 "k8s.io/kuberne...
rc, err = c.rcs.ReplicationControllers(namespace).Get(ref.Name, metav1.GetOptions{}) if err != nil { return nil, nil, err }
<|file_name|>p_alac.cpp<|end_file_name|><|fim▁begin|>/* mkvmerge -- utility for splicing together matroska files from component media subtypes Distributed under the GPL v2 see the file COPYING for details or visit http://www.gnu.org/copyleft/gpl.html ALAC output module Written by Moritz Bunkus <...
} alac_packetizer_c::~alac_packetizer_c() {
<|file_name|>constraintteachersmaxgapsperdayform.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************** constraintteachersmaxgapsperdayform.cpp - description ------------------- begin : Jan...
int i=constraintsListWidget->currentRow();
<|file_name|>test_distance__token_distance.py<|end_file_name|><|fim▁begin|># Copyright 2019-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos 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 Foundati...
), ) self.assertEqual(
<|file_name|>const_eval.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org...
<|file_name|>test_roles.py<|end_file_name|><|fim▁begin|>from django.test import TestCase from django.contrib.auth import get_user_model from model_mommy import mommy from rolepermissions.roles import RolesManager, AbstractUserRole class RolRole1(AbstractUserRole): available_permissions = { 'permission1'...
class RolRole2(AbstractUserRole): available_permissions = { 'permission3': True,
<|file_name|>compare.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------------------- # Copyright 2015 Nervana Systems 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 ...
<|file_name|>customelementregistry.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/. */ use crate::compartments::InCompartment; use cr...
}
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ pytest fixtures """ import pytest from django.contrib.auth.models import User from orb.models import Category, Tag, UserProfile from orb.peers.models import Peer from orb.resources.tests.factory import resource_factory pytestmark = py...
<|file_name|>test_oscapcontent.py<|end_file_name|><|fim▁begin|>"""Tests for Oscapcontent :Requirement: Oscapcontent :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: UI :TestType: Functional :CaseImportance: High :Upstream: No """ import unittest2 from fauxfactory import gen_string from nailgun ...
:Steps: 1. Create an openscap content.
<|file_name|>errors_test.go<|end_file_name|><|fim▁begin|>package testservices<|fim▁hole|> gc "gopkg.in/check.v1" ) func Test(t *testing.T) { gc.TestingT(t) } type ErrorsSuite struct { } var _ = gc.Suite(&ErrorsSuite{}) func (s *ErrorsSuite) TestServerErrorMessage(c *gc.C) { err := &ServerError{ message: "Instan...
import ( "testing"
<|file_name|>config.py<|end_file_name|><|fim▁begin|>''' Created on Jul 28, 2013 @author: Rob ''' import os, yaml config = { 'names': [ 'NT', 'VGTestServer' ], 'servers':{ 'irc.server.tld': { 'port':6667, 'password':None, ...
<|file_name|>scrollview-paginator-coverage.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:c4d5490597798effaf63d11e546f0b200f196f28e17c69d39ce236de0c6683f0<|fim▁hole|><|fim▁end|>
size 64139
<|file_name|>channels.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from django import template from temba.channels.views import get_channel_icon register = template.Library() @register.filter def channel_icon(channel):<|fim▁hole|><|fim▁end|>
return get_channel_icon(channel.channel_type)
<|file_name|>VMSupport.py<|end_file_name|><|fim▁begin|><|fim▁hole|> def getVMTemporaryDirectory____(): raise NotImplementedError() clazz.getVMTemporaryDirectory____ = staticmethod(getVMTemporaryDirectory____)<|fim▁end|>
def add_native_methods(clazz):
<|file_name|>test.js<|end_file_name|><|fim▁begin|>'use strict'; module.exports = function(gulp, plugins) { // Test /task/ // Run all available test tasks. // $ gulp test // gulp.task('test', function(done) { plugins.runSequence('jshint', done); }); // JSHint /test/<|fim▁hole|> ...
// JavaScript Code Quality Tool - Helps to detect errors and potential problems in code. // $ gulp jshint // gulp.task('jshint', function() {
<|file_name|>processTemplate.js<|end_file_name|><|fim▁begin|>'use strict'; (function() { angular.module('openshiftConsole').component('processTemplate', { controller: [ '$filter', '$q', '$scope', '$uibModal', 'APIDiscovery', 'APIService', 'DataService', 'Navigate',...
<|file_name|>servers.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- __author__ = 'glow' import requests<|fim▁hole|> client = requests.Session() response = client.get(server + "/Patient?_id=23&_format=application/json+fhir") print(response) print(response.json())<|fim▁end|>
import json server = "http://fhir.careevolution.com/apitest/fhir"
<|file_name|>test_distributed_reader.py<|end_file_name|><|fim▁begin|># Copyright (c) 2019 PaddlePaddle 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 # # ...
yield val
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>// Copyright 2017, 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/licens...
)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from .base import _Base, Base from .base_collection import BaseCollection from .habit_groups import HabitGroups from .habit_groups_collection import HabitGroupsCollection from .habits import Habits from .habits_collection import HabitsCollec...
from .attempts_collection import AttemptsCollection from .routines import Routines from .routines_collection import RoutinesCollection from .attempts_logs import AttemptsLogs
<|file_name|>size_big.rs<|end_file_name|><|fim▁begin|>//! The GC can work with objects that take up most of a page. extern crate cell_gc; #[macro_use] extern crate cell_gc_derive; type Big32 = (u64, u64, u64, u64); type Big128 = (Big32, Big32, Big32, Big32); type Big512 = (Big128, Big128, Big128, Big128); type Big256...
cell_gc::with_heap(|hs| { hs.set_page_limit::<Big>(Some(1));
<|file_name|>180_dns_test.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2021 Pantheon.tech // // 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|>tsdp_header_M.js<|end_file_name|><|fim▁begin|>/* line 1 "./ragel/tsdp_parser_header_M.jrl" */ /* * Copyright (C) 2012-2018 Doubango Telecom <http://www.doubango.org> * License: BSD * This file is part of Open Source sipML5 solution <http://www.sipml5.org> */ tsdp_header_M.prototype = Object.create(tsdp_he...
__acts += 1; switch (_tsdp_machine_parser_header_M_actions[__acts - 1]) { case 3: /* line 30 "./ragel/tsdp_parser_header_M.jrl" */
<|file_name|>page-not-found.component.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core'; @Component({ selector: 'app-page-not-found', templateUrl: './page-not-found.component.html' })<|fim▁hole|>}<|fim▁end|>
export class PageNotFoundComponent {
<|file_name|>bitcoin_zh_CN.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_CN" version="2.0"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Mithril</source> <translation>关于比特币</tran...
</message>
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.http import HttpResponseRedirect, HttpResponse from django.contrib.auth.decorators import login_required from django.contrib.auth.models import Use...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// DO NOT EDIT ! // This file was generated automatically from 'src/mako/api/lib.rs.mako' // DO NOT EDIT ! //! This documentation was generated from *taskqueue* crate version *0.1.8+20141111*, where *20141111* is the exact revision of the *taskqueue:v1beta2* schema buil...
//! // The Error enum provides details about what exactly happened. //! // You can also just use its `Debug`, `Display` or `Error` traits //! Error::HttpError(_)
<|file_name|>colormap.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # """ These functions, when given a magnitude mag between cmin and cmax, return a colour tuple (red, green, blue). Light blue is cold (low magnitude) and yellow is hot (high magnitude). """ import math def floatRgb(mag, cmin, cmax, alpha=1.0...
x = 0.5
<|file_name|>task_tracker.cc<|end_file_name|><|fim▁begin|>// Copyright 2016 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 "base/task/thread_pool/task_tracker.h" #include <atomic> #include <string> #include <v...
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for Pjs 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.11/howto/deployment/wsgi/ """ <|fim▁hole|>from django.core.wsgi import get_wsgi_a...
import os
<|file_name|>htmlformelement.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::bindings::codegen::Bindings::BlobBinding::Bl...
} // Step 6
<|file_name|>SaveStrategy.java<|end_file_name|><|fim▁begin|>package ch.hgdev.toposuite.transfer; import android.content.Context; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; /** * Interface implementing the Strategy design pattern in order to provide an * easy way to save an ob...
<|file_name|>ncurses.py<|end_file_name|><|fim▁begin|>#!/Users/pjjokine/anaconda/bin/python3 import curses import os import signal from time import sleep stdscr = curses.initscr() curses.noecho() begin_x = 20; begin_y = 7 height = 5; width = 40 win = curses.newwin(height, width, begin_y, begin_x) count = 5 <|fim▁hol...
for x in range(0,20): for y in range (0,5): win.addstr(y, x, "a", curses.A_BLINK)
<|file_name|>page0zip.cc<|end_file_name|><|fim▁begin|>/***************************************************************************** Copyright (c) 2005, 2014, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it un...
return(PAGE_ZIP_DIR_SLOT_SIZE * page_zip_dir_elems(page_zip)); }
<|file_name|>dihedral_opls.cpp<|end_file_name|><|fim▁begin|>/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://lammps.sandia.gov/, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (200...
<|file_name|>userbase_models.py<|end_file_name|><|fim▁begin|>import datetime class AuthenticationInfo: def __init__(self, password, email): self.Password = password self.Email = email class ProfileInfo: def __init__(self, display_name): self.DisplayName = display_name class Token: ...
class AddUserToGroupRequest: def __init__(self, username, token, user_to_add, id_group):
<|file_name|>enum-discrim-manual-sizing.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 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...
Auint = 0, Buint = 1 }
<|file_name|>upload_dm_results.py<|end_file_name|><|fim▁begin|># Copyright 2016 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. # Recipe for uploading DM results. import calendar PYTHON_VERSION_COMPATIBILITY = "PY3" D...
<|file_name|>PranksterTest.java<|end_file_name|><|fim▁begin|>package net.prank.core; import net.prank.example.ExampleObject; import net.prank.example.ExampleScoreCard; import org.junit.Test; import java.math.BigDecimal; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; im...
<|file_name|>farcolor.hpp<|end_file_name|><|fim▁begin|>#ifndef __COLORS_HPP__ #define __COLORS_HPP__ /* farcolor.hpp Colors Index for FAR Manager 1.75 build 2631 HKCU\Software\Far\Colors\CurrentPalette Copyright (c) 1996-2000 Eugene Roshal Copyrigth (c) 2000-2010 FAR group */ enum PaletteColors { COL_MEN...
COL_DIALOGLISTSELECTEDGRAYTEXT, COL_WARNDIALOGCOMBOGRAY, COL_WARNDIALOGCOMBOSELECTEDGRAYTEXT,
<|file_name|>location.py<|end_file_name|><|fim▁begin|>""" Module with location helpers. detect_location_info and elevation are mocked by default during tests. """ import asyncio import collections import math from typing import Any, Dict, Optional, Tuple import aiohttp ELEVATION_URL = "https://api.open-elevation.com...
<|file_name|>Operator.java<|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.apache.org/lice...
* * <p>The group name must be a <a * href="https://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.8">valid Java
<|file_name|>test_topology_reader.py<|end_file_name|><|fim▁begin|><|fim▁hole|># Jakub Krajniak (jkrajniak at gmail.com) # # This file is part of ChemLab # # ESPResSo++ 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 Softw...
# Copyright (C) 2016
<|file_name|>list.js<|end_file_name|><|fim▁begin|>var list = { "Manual": { "Getting Started": { "Creating a scene": "manual/introduction/Creating-a-scene", "Import via modules": "manual/introduction/Import-via-modules", "Browser support": "manual/introduction/Browser-support", "WebGL compatibility chec...
"BufferGeometry": "api/core/BufferGeometry", "Clock": "api/core/Clock",