prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>VariantBool.hpp<|end_file_name|><|fim▁begin|>// Generated from /POI/java/org/apache/poi/hpsf/VariantBool.java
#pragma once
#include <fwd-POI.hpp>
#include <org/apache/poi/hpsf/fwd-POI.hpp>
#include <org/apache/poi/util/fwd-POI.hpp>
#include <java/lang/Object.hpp>
struct default_init_tag;
class poi::hps... | protected:
void ctor();
public: /* package */ |
<|file_name|>chain_data.rs<|end_file_name|><|fim▁begin|>use core::ops::{Add, AddAssign, Mul, MulAssign};
use num_traits::{One, Zero};
/// `ChainData` derives several traits and attempts to allow chaining the IntoIterator
/// implementation over `&` and `&mut` to allow access to the data within.
/// This is critical to... | where |
<|file_name|>express-session.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for express-session
// Project: https://www.npmjs.org/package/express-session
// Definitions by: Hiroki Horiuchi <https://github.com/horiuchi/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../e... | secure?: boolean;
httpOnly: boolean;
domain?: string; |
<|file_name|>cargo.rs<|end_file_name|><|fim▁begin|>extern crate rustc_serialize;
extern crate docopt;
use docopt::Docopt;
// Write the Docopt usage string.
const USAGE: &'static str = "
Rust's package manager
Usage:
cargo <command> [<args>...]
cargo [options]
Options:
-h, --help Display this messa... | .unwrap_or_else(|e| e.exit());
println!("{:?}", args);
} |
<|file_name|>test_dtoc.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2012 The Chromium OS Authors.
#
"""Tests for the dtb_platdata module
This includes unit tests for some functions and functional tests for the dtoc
tool.
"""
import collections
import os
i... | \t.platdata\t= &dtv_gpios_at_0, |
<|file_name|>horizontalintervals.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
<|fim▁hole|>canvas = postscript('horizontalintervals.eps')
d = drawable(canvas, coord=[50,30], xrange=[0,900],
yrange=[0,t.getmax('nodes')])
axis(d, xtitle='Throughput (MB)', xauto=[0,900,300],
ytitle='Nodes', yaut... | from zplot import *
t = table('horizontalintervals.data') |
<|file_name|>debug.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
## Copyright 2015 Rasmus Scholer Sorensen, rasmusscholer@gmail.com
##
## This file is part of Nascent.
##
## Nascent is free software: you can redistribute it and/or modify
## it under the terms of the GNU Affero General Public Licen... | frameinfo = getframeinfo(currentframe().f_back) |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * 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 extract_graphql::parse_chunks;
use fixture_tests::Fixture;
pub fn ... | |
<|file_name|>index.story.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react';
import { Ratings, Mode, Size, Layout } from '..';
import * as examples from './examples';
import {
header,
api,
divider,
importExample,
playground,
tab,
code as baseCode,
tabs,
testkit,
title,
} from 'wix-story... | value: ['Very Baasa', 'Baasa', 'OK', 'Achla', 'Very Achla'],
label: 'with hovers',
},
], |
<|file_name|>polar.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
from numpy import array, zeros, linspace, meshgrid, ndarray, diag
from numpy import uint8, float64, int8, int0, float128, complex128
from numpy import exp, sqrt, cos, tan, arctan
from numpy import minimum, maximum
from numpy i... | n2 = rpncalc.wild("n2")
v2 = rpncalc.wild("v2")
mul = rpncalc.rpn_funcs[u"⋅"]
add = rpncalc.rpn_funcs[u"+"] |
<|file_name|>ui.rs<|end_file_name|><|fim▁begin|>//
// imag - the personal information management suite for the commandline
// Copyright (C) 2015, 2016 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 Lesse... | |
<|file_name|>sum_roof_to_leaf.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python
'''
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Find the total sum of all root-to-leaf numbers.
For exa... |
if __name__ == '__main__':
solution = Solution()
root = TreeNode(1) |
<|file_name|>ossHandler.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#coding=utf-8
# Copyright (C) 2011, Alibaba Cloud Computing
#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 ... | |
<|file_name|>test_commands.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2014 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Li... | call_command(
'import_project',
'test', |
<|file_name|>abs-floor.js<|end_file_name|><|fim▁begin|>export default function absFloor(number) {
if (number < 0) {
// -0 -> 0<|fim▁hole|> return Math.ceil(number) || 0;
} else {
return Math.floor(number);
}
}<|fim▁end|> | |
<|file_name|>bitcoinrpc.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "init.h"
#include "ut... |
JSONRequest jreq;
try { |
<|file_name|>mapper_data.py<|end_file_name|><|fim▁begin|>from modelmapper.declarations import Mapper, Field
from modelmapper.qt.fields import QLineEditAccessor
class String(QLineEditAccessor):
<|fim▁hole|> def get_value(self):
return str(self.widget.text())
def set_value(self, value):
self.wid... | |
<|file_name|>Excel Sheet Column Title.go<|end_file_name|><|fim▁begin|>func convertToTitle(n int) string {
execl := []string{"A", "B","C","D","E","F","G","H", "I", "J","K","L","M","N","O", "P", "Q","R","S","T","U","V","W","X","Y","Z"}
var temp string
for n >0 {
temp = execl[(n-1)%26] +temp
n ... | var res []byte
for n > 0 {
n--
k := n % 26 |
<|file_name|>decorators.py<|end_file_name|><|fim▁begin|># Copyright 2013 django-htmlmin authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
from functools import wraps
from htmlmin.minify import html_minify
def minified_response(f):
... | |
<|file_name|>genericContextualTypingSpecialization.js<|end_file_name|><|fim▁begin|><|fim▁hole|>b.reduce(function (c, d) {
return c + d;
}, 0); // should not error on '+'<|fim▁end|> | var b;
|
<|file_name|>select.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 Colin Sherratt
//
// 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|>ImgHeaderCallback.java<|end_file_name|><|fim▁begin|>/*
* ImgHeaderCallback.java
*
* Copyright 2001-2007 Goldin-Rudahl Associates
*
* Created by Sally Goldin, 5/16/2001
*
* $Id: ImgHeaderCallback.java,v 1.20 2007/01/05 07:41:57 rudahl Exp $
* $Log: ImgHeaderCallback.java,v $
* Revision 1.20 2007... | *
* Revision 1.10 2001/11/30 18:01:21 goldin
* Moved most of the UI basic components to the com.grs.gui package
* |
<|file_name|>TransformationClient.py<|end_file_name|><|fim▁begin|>""" Class that contains client access to the transformation DB handler. """
__RCSID__ = "$Id$"
import types
from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.Core.Base.Client ... | # Set the status in the parent transformation first
for status, lfnList in parentStatusFiles.items():
for lfnChunk in breakListIntoChunks( lfnList, 5000 ): |
<|file_name|>range_traits-5.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 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/... | struct R(RangeFull);
|
<|file_name|>axios-response-interceptor.spec.ts<|end_file_name|><|fim▁begin|>import axios, { AxiosInstance } from 'axios';
import * as moxios from 'moxios';
import { AxiosResponseInterceptor } from '../axios-response-interceptor';
describe( 'AxiosResponseInterceptor', () => {
let apiResponseInterceptor: AxiosResponse... | |
<|file_name|>buf.rs<|end_file_name|><|fim▁begin|>use bytes::Buf;
use iovec::IoVec;
/// A `Buf` wrapping a static byte slice.
#[derive(Debug)]
pub(crate) struct StaticBuf(pub(crate) &'static [u8]);
impl Buf for StaticBuf {
#[inline]
fn remaining(&self) -> usize {
self.0.len()
}
#[inline]
f... | }
} |
<|file_name|>test_input_thermo_elasticity_ess.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
input_name = '../examples/multi_physics/thermo_elasticity_ess.py'
output_name = 'test_thermo_elasticity_ess.vtk'
from tests_basic import TestInput<|fim▁hole|>class Test(TestInput):
pass<|fim▁end|> | |
<|file_name|>example.py<|end_file_name|><|fim▁begin|>import matplotlib.pyplot as plt
import numpy as np
from ad3 import simple_grid, general_graph
def example_binary():
# generate trivial data
x = np.ones((10, 10))
x[:, 5:] = -1
x_noisy = x + np.random.normal(0, 0.8, size=x.shape)
x_thresh = x_noi... | plt.subplot(235, title="cut_simple")
plt.imshow(result, interpolation='nearest')
plt.subplot(236, title="cut_from_graph") |
<|file_name|>apps.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
<|fim▁hole|> name = 'blog'<|fim▁end|> | class BlogConfig(AppConfig):
|
<|file_name|>const.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
__author__ = 'LIWEI240'
"""
Constants definition
"""
class Const(object):
class RetCode(object):
OK = 0
InvalidParam = -1<|fim▁hole|> NotExist = -2
ParseError = -3<|fim▁end|> | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Documentation package """
import neuroptikon
import wx, wx.html
import os.path, sys, urllib
_sharedFrame = None
def baseURL():
if neuroptikon.runningFromSource:
basePath = os.path.join(neuroptikon.rootDir, 'documentation', 'build', 'Documentatio... | |
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** Commercial Usage
**
** L... | |
<|file_name|>user.js<|end_file_name|><|fim▁begin|>"use strict";
let mongoose = require('mongoose'),
Schema = mongoose.Schema,
EmailValidator = require('./emailValidator');
class User {
constructor(explicitConnection) {
this.explicitConnection = explicitConnection;
this.schema = new Schema({
emai... | return mongoose.model('User', this.schema);
} else {
return this.explicitConnection.model('User', this.schema);
} |
<|file_name|>conn_rpc_test.go<|end_file_name|><|fim▁begin|>/*
Copyright 2019 The Vitess 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
Unle... | |
<|file_name|>homepage.js<|end_file_name|><|fim▁begin|>/* Set the width of the side navigation to 250px */
function openNav() {
document.getElementById("mySidenav").style.width = "250px";
}
<|fim▁hole|>function closeNav() {
document.getElementById("mySidenav").style.width = "0";
}<|fim▁end|> | /* Set the width of the side navigation to 0 */ |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>"""
Python script "setup.py"
by Matthew Garcia, PhD student
Dept. of Forest and Wildlife Ecology
University of Wisconsin - Madison
matt.e.garcia@gmail.com
Copyright (C) 2015-2016 by Matthew Garcia
Licensed Gnu GPL v3; see 'LICENSE_GnuGPLv3.txt' for complete terms
Send... | |
<|file_name|>pgoapi.py<|end_file_name|><|fim▁begin|>"""
pgoapi - Pokemon Go API
Copyright (c) 2016 tjado <https://github.com/tejado>
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 restric... |
class PGoApi:
API_ENTRY = 'https://pgorelease.nianticlabs.com/plfe/rpc' |
<|file_name|>weird-exprs.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/lic... |
fn zombiejesus() {
loop {
while (return) { |
<|file_name|>wf.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/LIC... | |
<|file_name|>ReplProbe.js<|end_file_name|><|fim▁begin|>// ReplProbe.js (c) 2010-2013 Loren West and other contributors
// May be freely distributed under the MIT license.
// For further details and documentation:
// http://lorenwest.github.com/monitor-min
(function(root){
// Module loading - this runs server-side on... | }(this)); |
<|file_name|>format_labels.js<|end_file_name|><|fim▁begin|>'use strict';
var Axes = require('../../plots/cartesian/axes');
module.exports = function formatLabels(cdi, trace, fullLayout) {
var labels = {};
var mockGd = {_fullLayout: fullLayout};
var xa = Axes.getFromTrace(mockGd, trace, 'x');
var ya =... | labels.xLabel = Axes.tickText(xa, xa.c2l(cdi.x), true).text;
labels.yLabel = Axes.tickText(ya, ya.c2l(cdi.y), true).text;
|
<|file_name|>worksheet.ts<|end_file_name|><|fim▁begin|>import { ExcelOOXMLTemplate, ExcelWorksheet, ExcelRow, ExcelColumn } from '@ag-grid-community/core';
import columnFactory from './column';
import rowFactory from './row';
import mergeCell from './mergeCell';
const updateColMinMax = (col: ExcelColumn, min: number, ... | |
<|file_name|>authentication-guard.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router';
import { Observable } from 'rxjs';
import { AuthenticationService } from './';
@Injectable()
export c... | constructor(private $router: Router) {}
|
<|file_name|>amp-embedly-card-impl.js<|end_file_name|><|fim▁begin|>import {removeElement} from '#core/dom';
import {Layout_Enum, applyFillContent} from '#core/dom/layout';
import {Services} from '#service';
import {userAssert} from '#utils/log';
import {TAG as KEY_TAG} from './amp-embedly-key';
import {getIframe} f... | }
/** @override */
unlayoutCallback() { |
<|file_name|>cover.min.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1
oid sha256:c1d57d1ad50c4639ecd398deb6c1db998e272cc6faf1314dec77ca509ca49153<|fim▁hole|><|fim▁end|> | size 1303 |
<|file_name|>overwriting_attribute.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
def __init__(self):
self.var = 0
class D(C):
def __init__(self):
self.var = 1 # self.var will be overwritten
C.__init__(self)
#Attribute set in both superclass and subclass
class E(object):
def __init... | #Attribute set in both superclass and subclass
class C(object): |
<|file_name|>matrans.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#-------------------------------------------------------------------------------
#License GPL v3.0
#Author: Alexandre Manhaes Savio <alexsavio@gmail.com>
#Grupo de Inteligencia Computational <www.ehu.es/ccwintco>
#Universidad del Pais Vasco UPV/EHU... | idx = np.where(msk > 0)[0]
|
<|file_name|>negative-out-of-bounds-target.js<|end_file_name|><|fim▁begin|>// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-%typedarray%.prototype.copywithin
description: >
Set values with out of bounds negative t... | new TA([1n, 2n, 3n, 4n, 5n]).copyWithin(-Infinity, 0),
[1n, 2n, 3n, 4n, 5n] |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>import sys
from django.conf import settings
from django.core.exceptions import MiddlewareNotUsed
from django.core.signals import got_request_exception
from django.http import HttpResponse
from django.template import engines
from django.template.response import ... | self.assertEqual(value.args, (error, ))
def assert_middleware_usage(self, middleware, request, view, template_response, response, exception):
|
<|file_name|>_customunitary.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2017 IBM RESEARCH. 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.
<|fim▁hole|>#
# Unless required by applica... | # You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
|
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>/* Aurélien DESBRIÈRES
aurelien(at)hackers(dot)camp
License GNU GPL latest */
// Rust experimentations
// Borrowing Aliasing in Rust
struct Point { x: i32, y: i32, z: i32 }
fn main() {
let mut point = Point { x: 0, y: 0, z: 0 };
{
let borrowed_point =... | // TODO ^ Try uncommenting this line
// Immutable references go out of scope
} |
<|file_name|>test_distributions.py<|end_file_name|><|fim▁begin|>""" Test functions for stats module
"""
import warnings
import re
import sys
import pickle
import os
from numpy.testing import (assert_equal, assert_array_equal,
assert_almost_equal, assert_array_almost_equal,
... | assert_(np.isposinf(b))
# c < 0: a=0, b=1/|c|
c = np.asarray(-2.) |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from functools import reduce
def vartype(var):
if var.is_discrete:
return 1
elif var.is_continuous:
return 2
elif var.is_string:
return 3
else:<|fim▁hole|> return set([int(i*count/float(iterations)) for i in range(iterati... | return 0
def progress_bar_milestones(count, iterations=100): |
<|file_name|>test_eng.py<|end_file_name|><|fim▁begin|># test_eng.py
# Copyright (c) 2013-2016 Pablo Acosta-Serafini
# See LICENSE for details
# pylint: disable=C0103,C0111,C0302,E0611,R0913,R0915,W0108,W0212
# Standard library imports
import functools
import sys
import pytest
from numpy import array, ndarray
# Putil i... | |
<|file_name|>cmdbServer.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import httplib
import pprint
import json
import sys
import logging
import datetime
import os
import os.path
import codecs
class cmdb( object ):
def __init__( self, args , info=None ):
self.res = {}
self.result = {}... | start = 0 |
<|file_name|>talk.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
DEBUG = True
observer = None
ser_port = None
s = 0
ser = None
#--------------------------------------------------------------------
import signal
import sys
import os
def signal_handler(signal, frame):
... | print |
<|file_name|>host_daily_profile.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# MIT License
#
# Copyright (c) 2017 Michal Stefanik <stefanik dot m@mail.muni.cz>, Tomas Jirsik <jirsik@ics.muni.cz>
# Institute of Computer Science, Masaryk University
#
# Permission is hereby granted, free of charge, to any pe... |
# Parse arguments.
args = parser.parse_args() |
<|file_name|>crvserver_crpolicy_binding.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2008-2015 Citrix 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 a copy of the License at
#
# http://... | @name.setter
def name(self, name) :
ur"""Name of the cache redirection virtual server to which to bind the cache redirection policy.<br/>Minimum length = 1 |
<|file_name|>test_profiler.py<|end_file_name|><|fim▁begin|># Copyright 2014 Mirantis 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://ww... | self.assertEqual(1, len(mock_start.call_args_list))
self.assertIn(mock_start.call_args_list[0],
possible_mock_calls("rpc", expected_info))
mock_stop.assert_called_once_with() |
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># Copyright 2013, Big Switch Networks, 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/licens... | |
<|file_name|>0011_auto_20150702_1812.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('postcode_api', '0010_auto_20150601_1513'),
]
operations = [<|fi... | migrations.AlterIndexTogether(
name='address',
index_together=set([('postcode_index', 'uprn')]),
), |
<|file_name|>account.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##
## test_account.py
## Login : <dax@happycoders.org>
## Started on Wed Feb 14 08:23:17 2007 David Rousselie
## $Id$
##
## Copyright (C) 2007 David Rousselie
## This program is free software; you can redistribute it and/or modify
## it under... | def test_get_new_mail_list(self):
test_func = self.make_test(\ |
<|file_name|>tasks.js<|end_file_name|><|fim▁begin|>/*
* taskapi.
*/
var input_taskname_text = '<input type="text" id="task_name_{0}" value="{1}" class="form-control">';
var input_taskdesc_text = '<input type="text" id="task_desc_{0}" value="{1}" class="form-control">';
var btn_update_task = '<a href="#" class="bt... | row.addClass("task-row-inactive");
}
|
<|file_name|>IRIS_DF_Controller.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
'''======================================================
Created by: D. Spencer Maughan
Last updated: May 2015
File name: IRIS_DF_Controller.py
Organization: RISC Lab, Utah State University
Notes:
=========... |
#==================================#
# Rotate to Vehicle 1 Frame # |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/// <reference path="./typings/globals.d.ts"/>
/// <reference path="./typings/lib.d.ts"/>
var angular = require('angular');
var magics_scene_1 = require('./directives/magics-scene');
var magics_spy_1 = require('./directives/magics-spy');
var magics_stage_1 = require('.... | magics_spy_1["default"],
magics_stage_1["default"],
constants_1["default"],
magics_1["default"] |
<|file_name|>button.component.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|> colored: string;
btnDisabled: boolean;
}<|fim▁end|> | export declare class ButtonDemo {
buttonType: string;
doRipple: boolean;
|
<|file_name|>underscore.js<|end_file_name|><|fim▁begin|>// Underscore.js 1.8.3
// http://underscorejs.org
// (c) 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Underscore may be freely distributed under the MIT license.
(function() {
// Baseline setup
// --------... | |
<|file_name|>test_webserver.py<|end_file_name|><|fim▁begin|>from twisted.trial.unittest import TestCase
from mock import Mock
from twisted.web.test.test_web import DummyRequest<|fim▁hole|>from cryptosync.resources import make_site
def make_request(uri='', method='GET', args={}):
site = make_site(authenticator=Moc... | from twisted.web.http import OK, NOT_FOUND
|
<|file_name|>search.ts<|end_file_name|><|fim▁begin|>import Route from '@ember/routing/route';
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
import { refreshModelForQueryParams } from '@datahub/utils/routes/refresh-model-for-query-params';
import { action, setProperties, set }... | */
model(queryParam: { |
<|file_name|>ArraySortService.java<|end_file_name|><|fim▁begin|>package com.orionplatform.data.data_structures.array;
import java.util.Arrays;
import java.util.Comparator;
import com.orionplatform.core.abstraction.OrionService;
public class ArraySortService<T> extends OrionService
{
public static synchronized voi... | Arrays.sort(array, comparator);
}
} |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! The command-line tool works in the following order:
//!
//! 1. [`RemoteMounts::load`](struct.RemoteMounts.html#method.load) is called to load the contents
//! of `/etc/mtab` into an internal struct.
//! 2. [`RemoteMounts::into_current_dir`](struct.RemoteMounts.htm... | //! above into [`ProgramArgs`](struct.ProgramArgs.html).
//! 3. [`ProgramArgs::into_command`](struct.ProgramArgs.html#method.into_command) is called to |
<|file_name|>docker.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
import sys
sys.path.insert(0, '/Users/neo/workspace/devops')
from netkiller.docker import *
# from environment.experiment import experiment
# from environment.development import development
# from environment.production import production
from ... | |
<|file_name|>element.py<|end_file_name|><|fim▁begin|>import collections
import re
import sys
import warnings
from bs4.dammit import EntitySubstitution
DEFAULT_OUTPUT_ENCODING = "utf-8"
PY3K = (sys.version_info[0] > 2)
whitespace_re = re.compile("\s+")
def _alias(attr):
"""Alias one attribute name to another for ... | |
<|file_name|>imp.go<|end_file_name|><|fim▁begin|>package openrtb_ext
// ExtImp defines the contract for bidrequest.imp[i].ext
type ExtImp struct {
Prebid *ExtImpPrebid `json:"prebid"`
Appnexus *ExtImpAppnexus `json:"appnexus"`
Rubicon *ExtImpRubicon `json:"rubicon"`
}
// ExtImpPrebid defines the contract for... | |
<|file_name|>makepath.cpp<|end_file_name|><|fim▁begin|>// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
/***
*makepath.c - create path name from components
*
*
*Purp... | |
<|file_name|>foldtest.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from __future__ import division
from __future__ import print_function
from builtins import input
from builtins import range
from past.utils import old_div
import sys
import numpy
import matplotlib
if matplotlib.get_backend() != "TKAgg":
matpl... | |
<|file_name|>root.ts<|end_file_name|><|fim▁begin|>import { AnyAction, combineReducers } from 'redux';
import { CleanUp, cleanUpAction } from '../actions/cleanUp';
import sharedReducers from 'app/core/reducers';
import alertingReducers from 'app/features/alerting/state/reducers';
import teamsReducers from 'app/features/... |
return (state: any, action: AnyAction) => {
if (action.type !== cleanUpAction.type) { |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
with open('requirements.txt') as f:
requirements = f.read().splitlines()
with open('cli-requirements.txt') as f:
cli_requirements = f.read().splitlines()
setuptools.setup(... | |
<|file_name|>factory.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from robotics.robots.aizek_robot import AizekRobot
from robotics.sensors.redbot_wheel_encoder_sensor import RedbotWheelEncoderSensor
from robotics.sensors.sharp_ir_distance_sensor import SharpIrDistanceSensor
class RobotFactory(object):
@staticmeth... | from RPi import GPIO as gpio
from robotics.actors.redbot_motor_actor import RedbotMotorActor
from robotics.interfaces.spi.mcp3008_spi_interface import MCP3008SpiInterface |
<|file_name|>notosanssylotinagri_regular.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
class Charset(object):<|fim▁hole|> native_name = ''
def glyphs(self):
glyphs = []
glyphs.append(0x0039) #glyph00057
glyphs.append(0x0034) #uniA82A
glyphs.append(0x0035) #uniA82B
... | common_name = 'NotoSansSylotiNagri-Regular' |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages
setup(name='MODEL1310110042',
version=20140916,
description='MODEL1310110042 from BioModels',
url='http://www.ebi.ac.uk/biomodels-main/MODEL1310110042',
maintainer='Stanley Gu',
maintainer_url='... | packages=find_packages(), |
<|file_name|>DefaultOkHttpResourceExtractor.java<|end_file_name|><|fim▁begin|>/*
* Copyright 1999-2020 Alibaba Group Holding Ltd.
*
* 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
*
* ... | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
<|file_name|>types.ts<|end_file_name|><|fim▁begin|>import * as EventLogger from './'
const log = new EventLogger()
log.info('Basic information')
log.information('Basic information')
log.warning('Watch out!')
log.warn('Watch out!')
log.error('Something went wrong.')
log.auditFailure('Audit Failure')
log.auditSuccess('... | new EventLogger({ |
<|file_name|>types.py<|end_file_name|><|fim▁begin|># Lint as: python3
# Copyright 2020 The Bazel 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://ww... | |
<|file_name|>people.js<|end_file_name|><|fim▁begin|>angular.module('emp').service('PeopleService', function($http) {
var service = {
getAllPeople: function() {
return $http.get('core/data/people.json', { cache: true }).then(function(resp) {
return resp.data;<|fim▁hole|>
getPerson: function(id) {... | });
}, |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>TESTS = {
"Level_1": [
{
"input": [1, 2, 3],
"answer": 2,
"explanation": "3-1=2"
},
{
"input": [5, -5],
"answer": 10,
"explanation": "5-(-5)=10"
},
{
... | {"input": [0, 0, 0, 0],
"answer": 0,
"explanation": "0-0"},
|
<|file_name|>routes.js<|end_file_name|><|fim▁begin|>/* eslint-disable global-require */
import React from 'react';
import { Router, Route, IndexRoute } from 'react-router';
import App from './modules/App/App';
import Landing from './modules/App/Landing';
import TalentInput from './modules/App/TalentInput';
import Perfo... | />*/}
<Route path="/room" component={Performer} />
{/* <Route |
<|file_name|>map.view.clicked.examples.js<|end_file_name|><|fim▁begin|>cmapi.channel["map.view.clicked"].examples = [<|fim▁hole|> "title": "Map Clicked",
"description": "Report that the map was clicked at a location",
"valid": true,
"payload": {
"lat": 40.195659093364654,
"lon": -74.28955... | { |
<|file_name|>rgb.py<|end_file_name|><|fim▁begin|>"""
RGB Colourspace & Transformations
=================================
Defines the following *RGB* colourspace transformations:
- :func:`colour_hdri.camera_space_to_RGB`
- :func:`colour_hdri.camera_space_to_sRGB`
"""
from __future__ import annotations
import num... | ... RGB,
... M_XYZ_to_camera_space, |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>export {toMarkdown} from './lib/index.js'
export type SafeOptions = import('./lib/types.js').SafeOptions
export type Context = import('./lib/types.js').Context
export type Handle = import('./lib/types.js').Handle<|fim▁hole|>export type Map = import('./lib/util/indent... | export type Handlers = import('./lib/types.js').Handlers
export type Join = import('./lib/types.js').Join
export type Unsafe = import('./lib/types.js').Unsafe
export type Options = import('./lib/types.js').Options |
<|file_name|>Event.ts<|end_file_name|><|fim▁begin|>module X3Map {
export class Event {
private handlers: Array<EventHandler>;
constructor() {
this.handlers = [];
}
public Add(handler: EventHandler) {
this.handlers.push(handler);
}<|fim▁hole|> ... |
public Remove(handler: EventHandler) {
var a = this.handlers.indexOf(handler); |
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals
import re
from functools import partial
from importlib import import_module
from inspect import getargspec, getcallargs
import warnings
from django.apps import apps
from django.conf import settings
from django.template.context i... | arg_vals.append(arg.resolve(context))
if getattr(func, 'expects_localtime', False):
obj = template_localtime(obj, context.use_tz) |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>const fs = require("fs");
module.exports = function (config) {
var mod = require("./mod.js")(config);
config[mod.name] = mod;
function tryPatchComponent(componentName) {
if (config[componentName] && fs.existsSync(`${__dirname}/${componentName}.js`... | }; |
<|file_name|>count_visits_to_subdomains.hpp<|end_file_name|><|fim▁begin|>#ifndef COUNT_VISITS_TO_SUBDOMAINS_HPP
#define COUNT_VISITS_TO_SUBDOMAINS_HPP
/*
https://leetcode.com/problems/subdomain-visit-count/
A website domain like "discuss.leetcode.com" consists of various subdomains. At the top level,
we have "com", at... | for (const auto& domain : domains) {
count_map[domain] += count; |
<|file_name|>parse_metamap.py<|end_file_name|><|fim▁begin|>#!/bin/python
# The purpose of this script is to take the *machine-readable* output of UMLS
# MetaMap and convert it to something that looks like a sentence of UMLS CUIs,
# if possible. Ideally there would be an option in MetaMap to do this, assuming
# it is ... | # yolo
print '\nMapping phrase:',
print phrase, '...' |
<|file_name|>rest_api_server.py<|end_file_name|><|fim▁begin|>import time
import json
import random
from flask import Flask, request, current_app, abort
from functools import wraps
from cloudbrain.utils.metadata_info import (map_metric_name_to_num_channels,
get_supported_devi... | app.config['PROPAGATE_EXCEPTIONS'] = True
from cloudbrain.datastore.CassandraDAO import CassandraDAO |
<|file_name|>Server.cpp<|end_file_name|><|fim▁begin|>// **********************************************************************
//
// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
/... |
virtual int run(int, char*[]);
}; |
<|file_name|>passive_cable.py<|end_file_name|><|fim▁begin|>"""
Implements compartmental model of a passive cable. See Neuronal Dynamics
`Chapter 3 Section 2 <http://neuronaldynamics.epfl.ch/online/Ch3.S2.html>`_
"""
# This file is part of the exercise code repository accompanying
# the book: Neuronal Dynamics (see ht... | # integration time step in milliseconds
b2.defaultclock.dt = 0.01 * b2.ms
# DEFAULT morphological and electrical parameters |
<|file_name|>sawlive.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
'''<|fim▁hole|> 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.
This program is distributed in the hope... | FanFilm Add-on
Copyright (C) 2015 lambda
This program is free software: you can redistribute it and/or modify |
<|file_name|>model.py<|end_file_name|><|fim▁begin|># This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import re
import heapq
from sql import Null
from sql.aggregate import Max
from sql.conditionals import Case
from collections... | @staticmethod
def default_perm_create(): |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.