prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>DateOfBirthImpl.java<|end_file_name|><|fim▁begin|>/* * Copyright 2010-2011 Nabeel Mukhtar * * 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.apac...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>__import__("pkg_resources").declare_namespace(__name__) from infi.clickhouse_orm.database import * from infi.clickhouse_orm.engines import *<|fim▁hole|>from infi.clickhouse_orm.models import * from infi.clickhouse_orm.query import * from infi.clickhouse_orm.system_...
from infi.clickhouse_orm.fields import * from infi.clickhouse_orm.funcs import * from infi.clickhouse_orm.migrations import *
<|file_name|>tag-variant-cast-non-nullary.rs<|end_file_name|><|fim▁begin|>// run-rustfix #![allow(dead_code, unused_variables)] enum NonNullary { Nullary, Other(isize), } impl From<NonNullary> for isize { fn from(val: NonNullary) -> isize { match val { NonNullary::Nullary => 0,<|fim▁hol...
NonNullary::Other(i) => i, } }
<|file_name|>JsonAction.java<|end_file_name|><|fim▁begin|>/* * Copyright 2020 ThoughtWorks, 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/...
<|file_name|>gen.go<|end_file_name|><|fim▁begin|>// Copyright 2013 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. // +build ignore // This program generates internet protocol constatns and tables by // reading IANA protocol...
fmt.Fprintf(w, "var icmpTypes = map[ICMPType]string{\n") for _, pr := range prs { if pr.Descr == "" {
<|file_name|>base.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, Inc. #<|fim▁hole|># You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.
<|file_name|>fastq.rs<|end_file_name|><|fim▁begin|>// Copyright 2014-2018 Johannes Köster, Henning Timm. // Licensed under the MIT license (http://opensource.org/licenses/MIT) // This file may not be copied, modified, or distributed // except according to those terms. //! Structs and trait to read and write files in F...
let actual = Writer::to_file(path).unwrap_err(); let expected = io::Error::new(io::ErrorKind::NotFound, "foo");
<|file_name|>admin.py<|end_file_name|><|fim▁begin|><|fim▁hole|> # Register your models here. from learning_logs.models import Topic, Entry admin.site.register(Topic) admin.site.register(Entry)<|fim▁end|>
from django.contrib import admin
<|file_name|>utils.rs<|end_file_name|><|fim▁begin|>use bidir_map::BidirMap; use serde_json; use serde_json::Value; use serde_json::value::Map; use error::*; use types::Currency; use types::Pair; use types::Pair::*; lazy_static! { static ref PAIRS_STRING: BidirMap<Pair, &'static str> = { let mut m = BidirM...
<|file_name|>net.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use std::mem; use std::net::Ipv4Addr; use std::path::Path; use std::thread; use net_util::{MacAddress...
<|file_name|>SpecializeModuleTest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2010 The Closure Compiler 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...
// m1 "var ns = {};" +
<|file_name|>vec.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.apache.org/licenses/LI...
#[bench] fn bench_push_all_move_1000_1000(b: &mut Bencher) { do_bench_push_all_move(b, 1000, 1000) }
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import shutil import sys import datetime from invoke import task from invoke.util import cd from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer CONFIG = { # Local path configuration (can be absolute or relativ...
'{} {production}:{dest_path}'.format( CONFIG['deploy_path'].rstrip('/') + '/', **CONFIG))
<|file_name|>validation.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE...
pod.Labels = oldPod.Labels
<|file_name|>application_credit_test.py<|end_file_name|><|fim▁begin|>import shopify import json from test.test_helper import TestCase class ApplicationCreditTest(TestCase): def test_get_application_credit(self): self.fake("application_credits/445365009", method="GET", body=self.load_fixture("application_c...
self.assertEqual(1, len(application_credits))
<|file_name|>description-list-fixtures.module.ts<|end_file_name|><|fim▁begin|>import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { SkyThemeService } from '@skyux/theme'; import { SkyDescriptionListModule } from '../description-list.module'; import { SkyDescriptionListTest...
export class SkyDescriptionListFixturesModule {}
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from mindfeed.mindfeed import main <|fim▁hole|><|fim▁end|>
if __name__ == "__main__": main()
<|file_name|>cost.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, the GPyOpt Authors # Licensed under the BSD 3-clause license (see LICENSE.txt) from ...models import GPModel import numpy as np class CostModel(object): """ Class to handle the cost of evaluating the function. param cost_withGradie...
else:
<|file_name|>header.go<|end_file_name|><|fim▁begin|>package jasm const header = ` function jasm(stdlib, foreign, heap) { "use asm"; var pc = 0; // pseudo program counter var sp = 0; // stack pointer var ret = 0; // return address, for jal var r0 = 0, r1 = 0, r2 = 0, r3 = 0; // general p...
} } }
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// `encode` and `decode` are used instead of `ser` and `de` to avoid confusion with the serder // Serializer and Deserializer traits which occupy a similar namespace. mod cow_iter; pub mod decode; pub mod encode; mod into_cow; pub use crate::decode::Deserializer; pub us...
pub trait RedisDeserialize<'de, T> where T: serde::de::Deserialize<'de>,
<|file_name|>rate.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var __chunk_1 = require('./chunk-14c82365.js'); require('./helpers.js'); var __chunk_2 = require('./chunk-185921d7.js'); var __chunk_4 = require('./chunk-925c5339.js'); var __chunk_5 = requir...
result = this.texts[Math.ceil(this.newValue) - 1]; } return result;
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use std::io;<|fim▁hole|> pub use self::posix::PosixInputHandler; pub use self::default::DefaultInputHandler; mod posix; mod default; const CMD_PROMPT: &'static str = ">> "; #[derive(Debug)] enum Key { Esc, Enter, Tab, Up, Down, Left, Right...
<|file_name|>seodiv.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # ------------------------------------------------------------ # Canal (seodiv) por Hernan_Ar_c # ------------------------------------------------------------ import urlparse,urllib2,urllib,re import os, sys from core import logger ...
from core.item import Item
<|file_name|>form-password.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1<|fim▁hole|><|fim▁end|>
oid sha256:4f8b1998d2048d6a6cabacdfb3689eba7c9cb669d6f81dbbd18156bdb0dbe18f size 1880
<|file_name|>scene.go<|end_file_name|><|fim▁begin|>// Copyright 2015 Matthew Collins // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 /...
for _, d := range t.drawables {
<|file_name|>robot.js<|end_file_name|><|fim▁begin|>define("dojo/robot", ["dojo", "doh/robot", "dojo/window"], function(dojo) { dojo.experimental("dojo.robot"); (function(){ // users who use doh+dojo get the added convenience of dojo.mouseMoveAt, // instead of computing the absolute coordinates of their elements thems...
}, delay);
<|file_name|>add_apt_repository.py<|end_file_name|><|fim▁begin|>"""Resource manager for using the add-apt-repository command (part of the python-software-properties package). """ # Common stdlib imports import sys import os import os.path import re import glob # fix path if necessary (if running from source or ru...
<|file_name|>RepManager.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ ORCA Open Remote Control Application Copyright (C) 2013-2020 Carsten Thielepape Please contact me by : http://www.orca-remote.org/ This program is free software: you can redistribute it and/or modify it u...
oFnFontDefinition:cFileName = cFileName(cPath(uFontFolder)) + "fonts.xml" oRepManagerEntry:cRepManagerEntry = cRepManagerEntry(oFileName=oFnFontDefinition) if oRepManagerEntry.ParseFromXML(): if not oRepManagerEntry.oRepEntry.bSkip:
<|file_name|>info_gain.py<|end_file_name|><|fim▁begin|>import os import sys import numpy as np import math def findBinIndexFor(aFloatValue, binsList): #print "findBinIndexFor: %s" % aFloatValue returnIndex = -1 for i in range(len(binsList)): thisBin = binsList[i] if (aFloatValue >= thisBin[0]) and (aFloatValu...
<|file_name|>navigation-bar.ts<|end_file_name|><|fim▁begin|>// (C) Copyright 2015 Martin Dougiamas // // 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...
constructor(private textUtils: CoreTextUtilsProvider) {
<|file_name|>scrollSvc.js<|end_file_name|><|fim▁begin|>diamondApp.service('scrollSvc', function () { this.scrollTo = function (eID) { // This scrolling function // is from http://www.itnewb.com/tutorial/Creating-the-Smooth-Scroll-Effect-with-JavaScript var startY = currentYPosition(); ...
// Internet Explorer 6, 7 and 8 if (document.body.scrollTop) return document.body.scrollTop; return 0; }
<|file_name|>internetvideoarchive.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_parse_qs, compat_urlparse, ) from ..utils import ( determine_ext, int_or_none, xpath_text, ) class InternetVideoArchiveIE(InfoE...
<|file_name|>format.go<|end_file_name|><|fim▁begin|>package apachelog import ( "strings" ) // Format supported by the Apache mod_log_config module. // For more information, see:<|fim▁hole|>// Supported formats. // // TODO(gilliek): move complex format, such as COOKIE, at the bottom of the list // in order to treat t...
// https://httpd.apache.org/docs/2.4/en/mod/mod_log_config.html#formats type Format int
<|file_name|>templatetags.py<|end_file_name|><|fim▁begin|># Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); yo...
from horizon.test.test_dashboards.dogs.dashboard import Dogs # noqa
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|>import socket import subprocess import sys import time import h11 import pytest import requests @pytest.fixture def turq_instance(): return TurqInstance() class TurqInstance: """Spins up and controls a live instance of Turq for testing.""" def __i...
args += ['--editor-password', self.password] args += self.extra_args self._process = subprocess.Popen(args, stdin=subprocess.DEVNULL,
<|file_name|>fileUtilTests.py<|end_file_name|><|fim▁begin|># # Copyright 2012 Red Hat, Inc. # # 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 2 of the License, or # (at your optio...
donec, curabitur senectus ut fusce. A. Mauris fringilla senectus et eni facilisis magna inceptos eu, cursus habitant fringilla neque. Nibh. Elit facilisis sed, elit, nostra ve torquent dictumst, aenean sapien quam, habitasse in. Eu tempus aptent, diam, nisi risus
<|file_name|>create-github-repo.ts<|end_file_name|><|fim▁begin|>import * as denodeify from 'denodeify'; const Task = require('../ember-cli/lib/models/task'); const SilentError = require('silent-error'); import { exec } from 'child_process'; import * as https from 'https'; import { oneLine } from 'common-tags'; export...
type: 'input', message: 'and your GitHub user name:', validate: function(userName: string) {
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>use std::ops::*; extern crate cgmath; use cgmath::num_traits::*; use cgmath::*; use std::num::FpCategory; #[derive(Copy, Clone, PartialEq, Debug)] pub struct F64Err { val: f64, err: f64, } impl F64Err { #[inline] pub fn new_errorfree(val: f64) -> F6...
err: self.val.abs() * rhs.err + rhs.val.abs() * self.err
<|file_name|>randomColor.js<|end_file_name|><|fim▁begin|>// randomColor by David Merfield under the CC0 license // https://github.com/davidmerfield/randomColor/ ;(function(root, factory) { // Support AMD if (typeof define === 'function' && define.amd) { define([], factory); // Support CommonJS } else if ...
k/2 * 100
<|file_name|>stats.py<|end_file_name|><|fim▁begin|># uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: stats.py """Statistics analyzer for HotShot.""" import profile import pstats import hotshot.log fr...
<|file_name|>rancheros.go<|end_file_name|><|fim▁begin|>package provision import ( "bufio" "fmt" "net/http" "strings" "github.com/docker/machine/commands/mcndirs" "github.com/docker/machine/libmachine/auth" "github.com/docker/machine/libmachine/drivers" "github.com/docker/machine/libmachine/engine" "github.co...
<|file_name|>lodash.compat.js<|end_file_name|><|fim▁begin|>/** * @license * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> * Build: `lodash -o ./dist/lodash.compat.js` * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> * Copyr...
* @static * @memberOf _ * @alias drop, tail
<|file_name|>Class_175.java<|end_file_name|><|fim▁begin|>package fr.javatronic.blog.massive.annotation1; <|fim▁hole|>public class Class_175 { }<|fim▁end|>
import fr.javatronic.blog.processor.Annotation_001; @Annotation_001
<|file_name|>server.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 import _thread import RPi.GPIO as GPIO import socket import time from time import sleep from sys import exit import datetime #import MySQLdb # Start task command # sleep 30 && python /home/pi/Scripts/Sprinkler/Sprinkler.py > /home/pi/Scr...
<|file_name|>m_ao_eval_libnao.py<|end_file_name|><|fim▁begin|># Copyright 2014-2018 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://w...
POINTER(c_int64), # nmult POINTER(c_double), # psi_log_rl POINTER(c_int64), # nr POINTER(c_double), # rhomin_jt
<|file_name|>test_bnet_calculation.py<|end_file_name|><|fim▁begin|># RABDAM # Copyright (C) 2020 Garman Group, University of Oxford # This file is part of RABDAM. # RABDAM is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free S...
'5UPN': 1.477252783, '4XLZ': 1.473298738, '4XGY': 1.465885549, '5M4G': 1.400219288,
<|file_name|>exporter.py<|end_file_name|><|fim▁begin|>""" Base class for exporters """ # Standard library modules. import os # Third party modules. # Local modules. from pyhmsa.util.monitorable import _Monitorable, _MonitorableThread # Globals and constants variables. class _ExporterThread(_MonitorableThread): ...
raise ValueError('Path is not a directory: %s' % dirpath) self._start(datafile, dirpath)
<|file_name|>test_psrfits_to_sdfits.py<|end_file_name|><|fim▁begin|>"""Unit tests for psrfits_to_sdfits.py.""" import unittest import sys import scipy as sp import numpy.random as rand import psrfits_to_sdfits as p2s import kiyopy.custom_exceptions as ce class TestFormatData(unittest.TestCase) : def setUp(sel...
def test_fails_late_on(self) :
<|file_name|>validators.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import re # from flask_restful import inputs # objectid = inputs.regex('^[0-9a-z]{24}$')<|fim▁hole|> message = 'ciao' if not value: return None pattern = re.compile('^[0-9a-z]{24}$') if not pattern.match(value):...
def objectid(value):
<|file_name|>ols_table.py<|end_file_name|><|fim▁begin|>"""Example: statsmodels.OLS """ from statsmodels.datasets.longley import load import statsmodels.api as sm from statsmodels.iolib.table import SimpleTable, default_txt_fmt<|fim▁hole|> data_orig = (data.endog.copy(), data.exog.copy()) #.. Note: In this example usi...
import numpy as np data = load()
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ mod subscription; mod watchman_file; pub use subscription::{ Wat...
<|file_name|>returnOnTop.js<|end_file_name|><|fim▁begin|>$(document).ready( function () { // Add return on top button $('body').append('<div id="returnOnTop" title="Retour en haut">&nbsp;</div>'); // On button click, let's scroll up to top $('#returnOnTop').click( function() { $('html,body').anima...
$(window).scroll(function() { // If on top fade the bouton out, else fade it in if ( $(window).scrollTop() == 0 )
<|file_name|>x86.rs<|end_file_name|><|fim▁begin|>pub type cc_t = ::uchar_t; pub type speed_t = ::uint_t; pub type tcflag_t = ::uint_t; #[repr(C)] #[derive(Copy)] pub struct termios { pub c_iflag: tcflag_t, pub c_oflag: tcflag_t, pub c_cflag: tcflag_t, pub c_lflag: tcflag_t, pub c_line: cc_t,<|fim▁ho...
pub c_cc: [cc_t; 32],
<|file_name|>generator.go<|end_file_name|><|fim▁begin|>package soa import ( "encoding/json" "fmt" "strconv" "time" "github.com/Shark/powerdns-consul/backend/store" ) type soaEntry struct { NameServer string EmailAddr string Sn uint32 Refresh int32 Retry int32 Expiry int32 Nx ...
func (g *Generator) tryToRetrieveOrCreateSOAEntry(kv store.Store, zone string) (entry *store.Entry, err error) { prefix := fmt.Sprintf("zones/%s", zone) pairs, err := kv.List(prefix)
<|file_name|>CampaignSharedSetServiceInterfaceget.java<|end_file_name|><|fim▁begin|>// Copyright 2018 Google LLC // // 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.or...
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for PythonAnywhere test project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` co...
from whitenoise.django import DjangoWhiteNoise
<|file_name|>resource_exchange_tests.cc<|end_file_name|><|fim▁begin|>#include <set> #include <string> #include <math.h> #include <gtest/gtest.h> #include "agent.h" #include "bid.h" #include "bid_portfolio.h" #include "composition.h" #include "equality_helpers.h" #include "exchange_context.h" #include "facility.h" #in...
BidPortfolio<Material>::Ptr port_; std::string commod_;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
default_app_config = "nnmware.apps.booking.apps.BookingAppConfig"
<|file_name|>nwayBlender.cpp<|end_file_name|><|fim▁begin|>/** * @file NWayBlender.cpp * @brief N-Way shape blend deformer plugin for Maya * @section LICENSE The MIT License * @section requirements: Eigen 3: http://eigen.tuxfamily.org/ * @section Autodesk Maya: http://www.autodesk.com/products/autodesk-maya/...
<|file_name|>Grammar.ts<|end_file_name|><|fim▁begin|>import Rule from "./rule/Rule"; class Grammar { readonly rules: Rule[] = [];<|fim▁hole|> constructor(public readonly newline: number) {} add(rule: Rule) { this.rules.push(rule); this.ruleOpenLookup[rule.open] = this.ruleOpenLookup[rule.open] || []; ...
readonly ruleOpenLookup: { [key: number]: Rule[] } = {};
<|file_name|>gallery.js<|end_file_name|><|fim▁begin|>/* * @Author: justinwebb * @Date: 2015-09-24 21:08:23 * @Last Modified by: justinwebb * @Last Modified time: 2015-09-24 22:19:45 */ (function (window) { 'use strict'; window.JWLB = window.JWLB || {}; window.JWLB.View = window.JWLB.View || {}; //-------...
})(window);
<|file_name|>util.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)] use std::env; use std::fs::{self, File}; use std::io::{Read, Write}; #[cfg(unix)] use std::os::unix::fs::symlink as symlink_file; #[cfg(windows)] use std::os::windows::fs::symlink_file; use std::path::Path; use std::process::{Command, Stdio}; use s...
($cond:expr) => ( if $cond.stderr.len() > 0 { panic!(format!("stderr: {}", $cond.stderr))
<|file_name|>feng_destroyer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import os, sys, signal, random from datetime import datetime, timedelta VLC_POOL_SIZE = 10 #number of vlc client to keep open SPAWN_TIMER = 5 #number of seconds between vlc spawn MAX_VLC_LIFE_TIME = 60 #max life time in seconds of a vlc clie...
for vlc in to_remove: vlc_pool.remove(vlc)
<|file_name|>device.py<|end_file_name|><|fim▁begin|># Partname: ATmega644A # generated automatically, do not edit MCUREGS = { 'ADCSRB': '&123', 'ADCSRB_ACME': '$40', 'ACSR': '&80', 'ACSR_ACD': '$80', 'ACSR_ACBG': '$40', 'ACSR_ACO': '$20', 'ACSR_ACI': '$10', 'ACSR_ACIE': '$08', 'ACSR_ACIC': '$04'...
'DDRB': '&36',
<|file_name|>print.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import sys def get_color(color): if 'default'==color: return '\x1b[39;01m' elif 'black'==color: return '\x1b[30;01m' elif 'red'==color: return '\x...
print(template%(color,action,cmd))
<|file_name|>argument_double_underscored.rs<|end_file_name|><|fim▁begin|>use std::pin::Pin; use juniper::graphql_subscription; type Stream<'a, I> = Pin<Box<dyn futures::Stream<Item = I> + Send + 'a>>; struct Obj; #[graphql_subscription] impl Obj { async fn id(&self, __num: i32) -> Stream<'static, &'static str> ...
fn main() {}
<|file_name|>zed_wrapper_nodelet.cpp<|end_file_name|><|fim▁begin|>/////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2017, STEREOLABS. // // All rights reserved. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED W...
<|file_name|>PickerIOS.ios.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found...
}, getInitialState: function() {
<|file_name|>font_context.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/. */ #[derive(Clone, HeapSizeOf, Debug)] pub struct FontConte...
}
<|file_name|>cmp.rs<|end_file_name|><|fim▁begin|>//! Tests for comparison operators. mod less { use util::*; #[test] fn constants() { assert_eval_true("1 < 2"); assert_eval_true("-5 < 0"); assert_eval_true("1.5 < 2"); assert_eval_true("8 < 10.0"); assert_eval_true(...
#[test] fn constants() { assert_eval_true("2 >= 1");
<|file_name|>wrong.js<|end_file_name|><|fim▁begin|>import { expect } from 'chai'; import Urlsparser from '../src/app.js'; describe('wrong', () => { it('...', () => { const caps = () => {new Urlsparser('...')}; expect(caps).to.throw(); }); <|fim▁hole|> }); it('0:5:92', () => { const caps = () => {n...
it('+++abs+', () => { const caps = () => {new Urlsparser('+++abs+')}; expect(caps).to.throw();
<|file_name|>en-MH.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 */ // THIS CODE IS GENERATED - DO NOT MODIFY // See angular/tools/gu...
u,
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from .hu_psi_constraints import HuPsiConstraints
<|file_name|>aws.py<|end_file_name|><|fim▁begin|>""" This is the default template for our main set of AWS servers. """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=W0401, W0614 import json from .common import * from logset...
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' ###################################### CELERY ################################
<|file_name|>java_wire_library.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, ...
payload=None,
<|file_name|>nk.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>% Nonlinear New Keynesian Model % Reference: Foerster, Rubio-Ramirez, Waggoner and Zha (2013) % Perturbation Methods for Markov Switching Models. %------------------------------------------------------------- endogenous PAI, "Inflation", Y, "Output gap", R, "...
%-------------------------------------------------------------
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Foremast - Pipeline Tooling #<|fim▁hole|># You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed o...
# Copyright 2018 Gogo, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.
<|file_name|>V2MainFragModel.java<|end_file_name|><|fim▁begin|>package com.stdnull.v2api.model; import android.os.Bundle; import android.os.Parcelable; import java.util.ArrayList; import java.util.List; /** * Created by chen on 2017/8/20. */ public class V2MainFragModel { private static final String KEY_V2EXB...
public List<V2ExBean> getContentListModel() { return mContentListModel;
<|file_name|>test_settings.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
DATE_FORMAT = '%Y-%m-%dT%H:%M:%S+00:00'
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url, include from django.contrib import admin<|fim▁hole|> from .views import UploadBlackListView, DemoView, UdateBlackListView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^upload-blacklist$', login_required(Upl...
from django.contrib.auth.decorators import login_required
<|file_name|>group_by_results_test.go<|end_file_name|><|fim▁begin|>package search import ( "github.com/aliyun/aliyun-tablestore-go-sdk/tablestore/otsprotocol" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "math" "math/rand" "testing" ) func genPBGroupBysResult() *otsprotocol.GroupBysRe...
return &pbGroupBysResults
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of REANA. # Copyright (C) 2021, 2022 CERN. # # REANA is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """REANA client validation utilities....
for parameter in parsed_input_parameters.keys(): if parameter not in original_parameters: display_message(
<|file_name|>board.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import re from user import make_anonymous_user from exeptions import HttpStatusError, RegexError def make_subject_url(url): if url.endswith("/"): return url + "subject.txt" else: return url + "/su...
message = "HTTP status is invalid: " + str(response.code)
<|file_name|>element-rendering.ts<|end_file_name|><|fim▁begin|>const { registerHtml, useStore } = require('../../src/tram-one'); const html = registerHtml(); /** * This page has an input that changes the total number of elements on the page */ export default () => { const pageStore = useStore({ queue: '1000', elem...
return html` <section>
<|file_name|>authz.py<|end_file_name|><|fim▁begin|>from buildbot.status.web.auth import IAuth class Authz(object): """Decide who can do what.""" knownActions = [ # If you add a new action here, be sure to also update the documentation # at docs/cfg-statustargets.texinfo 'gracefulShutdown',...
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>// MIT License // // Copyright (c) 2016 Fingercomp // // 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 with...
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import js from './js'<|fim▁hole|><|fim▁end|>
js();
<|file_name|>any_of_test.go<|end_file_name|><|fim▁begin|>package match import ( "reflect" "testing" ) func TestAnyOfIndex(t *testing.T) { for id, test := range []struct { matchers Matchers fixture string index int segments []int }{ { Matchers{ Any{}, NewText("b"), NewText("c"), }, ...
0, []int{1},
<|file_name|>sale_order.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from openerp import models, api class sale_order_line(models.Model): _inherit = "sale.order.line"<|fim▁hole|> @api.one def button_confirm(self): if self.product_id.recurring_invoice and self.order_id.project_id: ...
<|file_name|>dump.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" ) func dumpCmd() command { return command{fn: func([]string) error { return fmt.Errorf("vegeta dump has been deprecated and succeeded by the vegeta encode command") }}<|fim▁hole|><|fim▁end|>
}
<|file_name|>ex1.py<|end_file_name|><|fim▁begin|>#Working with variables<|fim▁hole|>import pyaudiogame spk = pyaudiogame.speak MyApp = pyaudiogame.App("My Application") #Here are some variables #Lets first write one line of text my_name = "Frastlin" #now lets write a number my_age = 42 #now lets write several lines ...
<|file_name|>CString.java<|end_file_name|><|fim▁begin|>/***************************************************************************** * This file is part of the Prolog Development Tool (PDT) * * Author: Lukas Degener (among others) * WWW: http://sewiki.iai.uni-bonn.de/research/pdt/start * Mail: pdt@lists.iai.uni-...
<|file_name|>cli.py<|end_file_name|><|fim▁begin|># Copyright 2013 Answers for AWS LLC # # 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 # # Un...
if args.cross_account_role and not args.cross_account_number: parser.error('The --cross-account-number parameter is required if you specify --cross-account-role (doing a cross-account snapshot)')
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// String types for sending to/from the jvm mod ffi_str; pub use self::ffi_str::*;<|fim▁hole|> mod java_str; pub use self::java_str::*;<|fim▁end|>
<|file_name|>test_views.py<|end_file_name|><|fim▁begin|>""" Tests for Discussion API views """ from datetime import datetime import json from urlparse import urlparse import ddt import httpretty import mock from pytz import UTC from django.core.urlresolvers import reverse from rest_framework.test import APIClient f...
<|file_name|>example.rs<|end_file_name|><|fim▁begin|>extern crate int_range_check; use std::fmt::Display; use std::num::Int; use int_range_check::uncovered_and_overlapped; use int_range_check::IntRange; use int_range_check::IntRange::*; fn main() { example_driver("Example 1", vec![Bound(0i32, 5i32), From(3)]); ...
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from __future__ import division from typing import Any, Dict, List, Tuple from django.db import connection from django.template import RequestContext, loader from django.core import urlresolvers from django.http import HttpRespon...
<|file_name|>arguments.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import argparse ###basic parser for parent help statement### def parentArgs(): parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter, description='''\ Suzanne's pipeline to identify somatic CNVs from ...
<|file_name|>preferences.js<|end_file_name|><|fim▁begin|>$(document).ready(function() { //Note: default min/max ranges are defined outside of this JS file //include "js/BoulderRouteGradingSystems.js" before running this script //generate Bouldering rating selection upon click //Find which boulder grading system...
//initialize the boulder grading system var maxBoulder = boulderRatings[boulderGradingID].length - 1;
<|file_name|>account.js<|end_file_name|><|fim▁begin|>Session.setDefault('isLoggingIn', false); Template.account.helpers({ signedUp: function() { return Package["brettle:accounts-login-state"].LoginState.signedUp() } }); Template.account.events({ 'click .logout': function(evt) { Meteor.logout(); evt...
Session.set('isLoggingIn', true); evt.preventDefault(); }