prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>userListContainer.js<|end_file_name|><|fim▁begin|>import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { selectUser } from '../../../store/actions'
import {
PagingState,
SortingState,
} from '@devexpress/dx... | |
<|file_name|>snmpv3.rs<|end_file_name|><|fim▁begin|>use crate::rparser::*;
use crate::snmp::parse_pdu_enveloppe_version;
use crate::{gen_get_variants, Variant};
use snmp_parser::{parse_snmp_v3, SecurityModel};
pub struct SNMPv3Builder {}
impl RBuilder for SNMPv3Builder {
fn build(&self) -> Box<dyn RParser> {
... | ParseResult::Error |
<|file_name|>resilient_backpropagation.py<|end_file_name|><|fim▁begin|>from ..tools import add_bias, confirm
from ..activation_functions import softmax_function
from ..cost_functions import softmax_neg_loss
import numpy as np
def resilient_backpropagation(network, trainingset, testset, cost_function, ERROR_LIMIT=1e-3... |
# positive |
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Peter Atashian
// Licensed under the MIT License <LICENSE.md>
extern crate build;
fn main() {
build::link("wiautil", true)<|fim▁hole|><|fim▁end|> | } |
<|file_name|>bubble.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import numpy as np
import sys
import mesh.patch as patch
import compressible_sr.eos as eos
from util import msg
def init_data(my_data, rp):
""" initialize the bubble problem """
msg.bold("initializing the bubble probl... | dens_cutoff)
if j == myg.jlo: |
<|file_name|>ios-wineglass.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export default class IoIosWineglass extends React.Component<IconBaseProps, any> { }<|fim▁end|> | // TypeScript Version: 2.1
import * as React from 'react';
import { IconBaseProps } from 'react-icon-base'; |
<|file_name|>dataload.py<|end_file_name|><|fim▁begin|>#*******************************************************************************
# Copyright (c) 2015 IBM Corp.
#
# 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 ... | |
<|file_name|>introspection.py<|end_file_name|><|fim▁begin|>from collections import namedtuple
# Structure returned by DatabaseIntrospection.get_table_list()
TableInfo = namedtuple('TableInfo', ['name', 'type'])
# Structure returned by the DB-API cursor.description interface (PEP 249)
FieldInfo = namedtuple('FieldInfo... | """ |
<|file_name|>cuehandler.cpp<|end_file_name|><|fim▁begin|>#include "cuehandler.hpp"
CueHandler *CueHandler::New(){
return new CueHandler;
}
/*void CueHandler::Execute(vtkObject *vtkNotUsed(caller), unsigned long event, void *calldata){
if((this->animator != 0) && (this->renderer != 0)){
vtkAnimationCue::Animat... | case vtkCommand::AnimationCueTickEvent:
animator->Tick(info, this->renderer);
break; |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2.7
<|fim▁hole|> version='0.1a',
description='A wrapper to manage docker instances',
url='https://github.com/wnormandin/bftest_cli',
author='wnormandin',
author_email='bill@pokeybill.us',
license='MIT',
classifiers=[
... | from setuptools import setup, find_packages
setup(
name='bftest_cli', |
<|file_name|>app.js<|end_file_name|><|fim▁begin|>var http = require("http");
http.createServer(function(request, response) {
response.writeHead(200, {
"Content-Type": "application/json"
});
response.write(JSON.stringify({<|fim▁hole|> response.end();
}).listen(3000);<|fim▁end|> | "api": "data"
})); |
<|file_name|>job_search_commute_search_test.py<|end_file_name|><|fim▁begin|># Copyright 2020 Google LLC
#
# 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 applicable law or agreed to in writing, software
... | # You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# |
<|file_name|>FileStream.java<|end_file_name|><|fim▁begin|>package com.teckcoder.crashengine.file;
import com.teckcoder.crashengine.utils.logger.Logger;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
public class FileStream {
File file = null;
... | return locationType;
}
} |
<|file_name|>belt_interpreter_node.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import rospy
from belt_parser import BeltParser
import tf
import tf2_ros
import math
import copy
from memory_definitions.srv import GetDefinition
from processing_belt_interpreter.msg import *
from drivers_ard_others.msg import Be... | rospy.loginfo("Belt interpreter is initializing...") |
<|file_name|>options.go<|end_file_name|><|fim▁begin|>package middleware
import (
"net/http"
"strings"
"github.com/zenazn/goji/web"
)
type autoOptionsState int
const (
aosInit autoOptionsState = iota
aosHeaderWritten
aosProxying
)
// I originally used an httptest.ResponseRecorder here, but package httptest
//... | if !ok {
return nil |
<|file_name|>test_monotone.py<|end_file_name|><|fim▁begin|>"""
Tests for L{monotone}.
"""
from hypothesis import given, strategies as st
import errno
from monotone import get_clock_info, monotonic
from monotone import _api, _bindings
import os
import platform
<|fim▁hole|> reason="POSIX-only tests (clock_gettime(3... | import pytest
needs_posix = pytest.mark.skipif(
os.name == "posix" and platform.system() == "Darwin", |
<|file_name|>EnsuresNonNullIfInheritedTest.java<|end_file_name|><|fim▁begin|>import org.checkerframework.checker.nullness.qual.*;
import org.checkerframework.dataflow.qual.Pure;
class Node {
int id;
@Nullable Node next;
Node(int id, @Nullable Node next) {
this.id = id;
this.next = next;
... | public boolean hasMoreElements() {
return (current != null); |
<|file_name|>LensDistortOpTest.py<|end_file_name|><|fim▁begin|>##########################################################################
#
# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided... | # * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer. |
<|file_name|>site.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# This file is part of Dyko
# Copyright © 2008-2010 Kozea<|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 library is free software: you can redistribute it and/or modify |
<|file_name|>js_Fc4I144XPrPKyUpaWv36lNESuazCkfla6EpZyDPBOQk.js<|end_file_name|><|fim▁begin|>(function ($) {
/**
* Attach the child dialog behavior to new content.
*/
Drupal.behaviors.overlayChild = {
attach: function (context, settings) {
// Make sure this behavior is not processed more than once.
if (this... | $(e.target).closest('.form-item, .form-wrapper').find('label').append('<span class="form-required">*</span>');
} |
<|file_name|>version.js<|end_file_name|><|fim▁begin|>const exec = require('child_process').exec;
const ver = require('../package.json').version;
let hash;
module.exports.init = function (b) {
exec('git rev-parse HEAD', (error, stdout, stderr) => {
if (error != null) {
hash = null;
console.err("git'... | hash = stdout;
});
};
|
<|file_name|>GeoPointRecord.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2015 Luca Capra <luca.capra@gmail.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 License at<|fim▁hole|> *
* ... | |
<|file_name|>issue-9968.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.apache.org/lice... |
extern mod lib = "issue-9968";
|
<|file_name|>wmlparser3.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# encoding: utf-8
"""
This parser uses the --preprocess option of wesnoth so a working
wesnoth executable must be available at runtime if the WML to parse
contains preprocessing directives.
Pure WML can be parsed as is.
For example:
... | """
[test]
a, b = 1, 2, 3 |
<|file_name|>_drop_test2.js<|end_file_name|><|fim▁begin|>import { expect } from 'chai'
import _drop from '../../src/array/_drop2'
describe('_drop', function(){
<|fim▁hole|> it('is a function', function(){
expect(_drop).to.be.a('function')
})
it('returns an array', function(){
const droppedArray = _drop([... | |
<|file_name|>value.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.apache.org/licenses/... | } |
<|file_name|>app.js<|end_file_name|><|fim▁begin|>'use strict';
/**
* @ngdoc overview
* @name hciApp
* @description
* # hciApp
*
* Main module of the application.
*/
angular
.module('hciApp', [
'ngAnimate',<|fim▁hole|> 'ngResource',
'ngRoute',
'ngSanitize',
'ngTouch',
'ui.bootstrap',
... | 'ngCookies', |
<|file_name|>lib.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/. */
#![feature(custom_derive, plugin)]
#![plugin(heapsize_plugin, plu... |
/// If none of the bits outside this mask are set, the stacking context is a special stacking |
<|file_name|>SecretFormField.tsx<|end_file_name|><|fim▁begin|>import omit from 'lodash/omit';
import React, { InputHTMLAttributes, FunctionComponent } from 'react';
import { FormField } from '../FormField/FormField';
import { Button } from '../Button/Button';
import { css, cx } from 'emotion';
export interface Props e... | noRadiusButton: css` |
<|file_name|>pythonicos.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from random import shuffle
class Carta():
def __init__(self, numero, naipe):
self.numero = numero
self.naipe = naipe
def __repr__(self):
return '%s ... | vetor1 = Vetor(1, 1) |
<|file_name|>vacation.py<|end_file_name|><|fim▁begin|>def hotel_cost(nights):
return 140 * nights
def plane_ride_cost(city):<|fim▁hole|> elif city == "Pittsburgh":
return 222
elif city == "Los Angeles":
return 475
def rental_car_cost(days):
total_car = days * 40
if days >= 7:
... | if city == "Charlotte":
return 183
elif city == "Tampa":
return 220 |
<|file_name|>test_envcheckr.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_envcheckr
----------------------------------<|fim▁hole|>
import pytest
from envcheckr import envcheckr
def test_parse_lines():
lines_a = envcheckr.parse_lines('tests/env')
assert len(lines_a) ==... |
Tests for `envcheckr` module.
"""
|
<|file_name|>tree.py<|end_file_name|><|fim▁begin|>"""
This module gathers tree-based methods, including decision, regression and
randomized trees. Single and multi-output problems are both handled.
"""
# Authors: Gilles Louppe <g.louppe@gmail.com>
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# ... | Returns the index of the leaf that each sample is predicted as.
.. versionadded:: 0.17 |
<|file_name|>handlers.py<|end_file_name|><|fim▁begin|>import urllib
from urlparse import urlparse
from django.conf import settings
from django.core.handlers.wsgi import WSGIHandler
from django.contrib.staticfiles import utils
from django.contrib.staticfiles.views import serve
class StaticFilesHandler(WSGIHa... | |
<|file_name|>_shared-libs.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { CommonModule } from '@angular/common';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { NgJhipster... | |
<|file_name|>soccer_PK_reward.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import rospy
from std_msgs.msg import Float32
import numpy as np
import soccer_PK.utils
rospy.init_node("reward")
pub = rospy.Publisher("reward", Float32, queue_size=10)
rate = rospy.Rate(3)
rospy.wait_for_service('/gazebo/get_model_... |
while not rospy.is_shutdown():
tic = rospy.get_time() |
<|file_name|>Pathway.ts<|end_file_name|><|fim▁begin|>import { Universe } from '@ephox/boss';
import * as Simplify from '../../pathway/Simplify';
type SimplifyFn = <E, D>(universe: Universe<E, D>, elements: E[]) => E[];
/**<|fim▁hole|> * @see Simplify.simplify()
*/
const simplify: SimplifyFn = Simplify.simplify;
ex... | |
<|file_name|>DbHelper.java<|end_file_name|><|fim▁begin|>package com.igoldin.qa.school.appmanager;
import com.igoldin.qa.school.model.ContactData;
import com.igoldin.qa.school.model.Contacts;
import com.igoldin.qa.school.model.GroupData;
import com.igoldin.qa.school.model.Groups;
import org.hibernate.Session;
import or... | |
<|file_name|>af2de80654b6_add_default_compile_yara_rule_on_save_.py<|end_file_name|><|fim▁begin|>"""Add default COMPILE_YARA_RULE_ON_SAVE setting
Revision ID: af2de80654b6
Revises: 2f0f6d26a505
Create Date: 2018-11-11 19:26:53.631142
"""
from alembic import op
import sqlalchemy as sa
from app.models import cfg_settin... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Parallel testing, supporting arbitrary collection ordering
The Workflow
------------
- Master py.test process starts up, inspects config to decide how many slave to start, if at all
- env['parallel_base_urls'] is inspected first
- py.test config.option.app... | |
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>extern crate cc;
fn main() {
if !cfg!(feature = "no_cc") {
cc::Build::new()
.file("src/hide.c")<|fim▁hole|>}<|fim▁end|> | .compile("clear_on_drop");
} |
<|file_name|>SendSurveyRequest.java<|end_file_name|><|fim▁begin|>package co.colector.model.request;
import java.util.ArrayList;
import java.util.List;
import co.colector.ColectorApplication;
import co.colector.R;
import co.colector.model.IdInputValue;
import co.colector.model.IdValue;
import co.colector.model.Survey;... | this.horaini = survey.getInstanceHoraIni();
this.horafin = survey.getInstanceHoraFin();
this.setResponsesData(survey.getInstanceAnswers());
} |
<|file_name|>pipeline.py<|end_file_name|><|fim▁begin|># Copyright 2020 Google 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.apache.org/licenses/... | |
<|file_name|>env.py<|end_file_name|><|fim▁begin|>#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache Li... | action="store_true", default=False, |
<|file_name|>metrics.py<|end_file_name|><|fim▁begin|># Copyright 2020 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.org/licenses/LICENSE-2.0
#
# Unless... | """Metrics."""
import numpy as np
import tensorflow.compat.v2 as tf |
<|file_name|>walletview.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2011-2013 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 "walletview.h"
#include "addressbookpage.h"
#include "askpa... |
#include "ui_interface.h"
|
<|file_name|>parsemode.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# pylint: disable=R0903
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2016
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or... |
class ParseMode(object):
"""This object represents a Telegram Message Parse Modes."""
|
<|file_name|>metrics-router.go<|end_file_name|><|fim▁begin|>/*
* Minio Cloud Storage, (C) 2018 Minio, 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... | prometheusMetricsPath = "/prometheus/metrics"
)
|
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#[link(
name = "vertesaur",
vers = "0.0.1",
author = "Aaron Dandy",
url = "https://github.com/aarondandy/vertesaur-rust"
)];
#[desc = "A computational geometry and math library for Rust with potential medical, gaming, and GIS uses."];
#[license = "MIT... | pub mod point; |
<|file_name|>mirror.cc<|end_file_name|><|fim▁begin|>// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// $Id: mirror.cc,v 1.59 2004/05/08 19:42:35 mdz Exp $
/* ######################################################################
Mirror Aquire Method - This is the Mirror aquire method for APT.
... | } |
<|file_name|>tests.rs<|end_file_name|><|fim▁begin|>use super::*;
#[test]
fn test_struct_info_roundtrip() {
let s = ItemEnum::Struct(Struct {
struct_type: StructType::Plain,
generics: Generics { params: vec![], where_predicates: vec![] },
fields_stripped: false,
fields: vec![],
... |
assert_eq!(u, de_u);
} |
<|file_name|>ForStatement.java<|end_file_name|><|fim▁begin|>// Copyright 2014 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, softwar... | // you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// |
<|file_name|>getOptionsHandler.go<|end_file_name|><|fim▁begin|>package main
import (
"strconv"
"github.com/gin-gonic/gin"
)
func getOptionsHandler(c *gin.Context) {
var request struct{
Hash string `form:"hash" binding:"required"`
}
if c.Bind(&request) == nil{
var optionsList, optionsCount = makeOpti... | initdata.Data = make([]Set, 0)
for i:=0;i<=11;i++{ |
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>from .howdoi import command_line_runner<|fim▁hole|><|fim▁end|> |
command_line_runner() |
<|file_name|>tls.go<|end_file_name|><|fim▁begin|>package types
import (
"context"
"crypto/tls"
"crypto/x509"
"errors"
"fmt"
"os"
"github.com/traefik/traefik/v2/pkg/log"
)
// +k8s:deepcopy-gen=true
// ClientTLS holds TLS specific configurations as client
// CA, Cert and Key can be either path or file contents... | } |
<|file_name|>CAS.js<|end_file_name|><|fim▁begin|>/* eslint key-spacing : 0 */
const EventEmitter = require('events');
class CAS extends EventEmitter {
constructor() {
super();
this.timeout = {
encode_ignition : null,
};
} // constructor()
// [0x130] Ignition status
decode_ignition(data) {
data.comm... | |
<|file_name|>test_yaml_utils.py<|end_file_name|><|fim▁begin|>import pytest
from apispec import yaml_utils
def test_load_yaml_from_docstring():
def f():
"""
Foo
bar
baz quux
---
herp: 1
derp: 2
"""
result = yaml_utils.load_yaml_from_docs... | assert yaml_utils.load_operations_from_docstring(docstring) == {} |
<|file_name|>modules.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | angular.module('CareFull', ['ui.router','rzModule']); |
<|file_name|>layouts.py<|end_file_name|><|fim▁begin|>''' Functions for arranging bokeh Layout objects.
'''
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
from __future__ import absolute_import
fro... | |
<|file_name|>user.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Nitrate is copyright 2010 Red Hat, Inc.
#
# Nitrate 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... | return get_user_dict(u) |
<|file_name|>ImageOps.py<|end_file_name|><|fim▁begin|>#
# The Python Imaging Library.
# $Id$
#
# standard image operations
#
# History:
# 2001-10-20 fl Created
# 2001-10-23 fl Added autocontrast operator
# 2001-12-18 fl Added Kevin's fit operator
# 2004-03-14 fl Fixed potential division by zero in equalize
# 20... |
##
# Deform the image.
# |
<|file_name|>DataNodeHighlight.java<|end_file_name|><|fim▁begin|>/**
* Copyright (C) 2013 The Language Archive, Max Planck Institute for
* Psycholinguistics
*
* 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 Softw... | |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.models import User
from django.db import models
from django.utils import timezone
import jsonfield
from .hooks import hookset
from .utils import load_path_attr
class UserState(models.Model):
"""
this stores the overall state of a p... | def state_for_user(cls, user, activity_key):
assert user.is_authenticated(), "user must be authenticated" |
<|file_name|>protractor.js<|end_file_name|><|fim▁begin|>var numLimitInput = element(by.model('numLimit'));
var letterLimitInput = element(by.model('letterLimit'));
var longNumberLimitInput = element(by.model('longNumberLimit'));
var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));
var limited... | });
// There is a bug in safari and protractor that doesn't like the minus key
// it('should update the output when -3 is entered', function() { |
<|file_name|>column.py<|end_file_name|><|fim▁begin|># Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from ..extern import six
from ..extern.six.moves import zip
import warnings
import weakref
fr... | super_class = ma.MaskedArray if isinstance(self, ma.MaskedArray) else np.ndarray
super_class.__setstate__(self, state) |
<|file_name|>pastWeekTime.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python<|fim▁hole|>import os
files = [TIME_WORKED]
print get_total_time_by_day_files(files)
raw_input()<|fim▁end|> | from TimeWorked import * |
<|file_name|>test_list_all_files_in_directory.py<|end_file_name|><|fim▁begin|>from raptiformica.utils import list_all_files_in_directory
from tests.testcase import TestCase
class TestListAllFilesInDirectory(TestCase):
def setUp(self):
self.walk = self.set_up_patch('raptiformica.utils.walk')
self.w... | |
<|file_name|>client.py<|end_file_name|><|fim▁begin|># *****************************************************************************
# Copyright (c) 2014, 2018 IBM Corporation and other Contributors.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse ... | self.commandCallback(command) |
<|file_name|>currency.rs<|end_file_name|><|fim▁begin|>use params::to_snakecase;
/// Currency is the list of supported currencies.
///
/// For more details see https://support.stripe.com/questions/which-currencies-does-stripe-support.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq, Hash)]
pub enum C... | "thb" => Ok(Currency::THB),
"tjs" => Ok(Currency::TJS), |
<|file_name|>DoiFetcher.java<|end_file_name|><|fim▁begin|>package org.jabref.logic.importer.fetcher;
import java.io.IOException;
import java.net.URL;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import org.jabref.logic.formatter.bibtexfields.ClearFormatter;
import org.jabref.logic.f... | |
<|file_name|>window.py<|end_file_name|><|fim▁begin|>from gi.repository import Gtk, Gdk, GdkPixbuf
(TARGET_ENTRY_TEXT, TARGET_ENTRY_PIXBUF) = range(2)
(COLUMN_TEXT, COLUMN_PIXBUF) = range(2)
DRAG_ACTION = Gdk.DragAction.COPY
class DragDropWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, ... | class DragSourceIconView(Gtk.IconView):
def __init__(self):
Gtk.IconView.__init__(self) |
<|file_name|>plot_string_subst_bar.py<|end_file_name|><|fim▁begin|><|fim▁hole|># Plotting performance of string_subst_.py scripts
# bar chart of relative comparison with variances as error bars
import numpy as np
import matplotlib.pyplot as plt
performance = [10.3882388499416,1,10.3212281215746]
variance = [0.7904351... | |
<|file_name|>unwind-match.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/li... | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
|
<|file_name|>defines_69.js<|end_file_name|><|fim▁begin|>var searchData=<|fim▁hole|><|fim▁end|> | [
['img',['IMG',['../define_8h.html#a116f6464c8184676310301dc13ed1dd5',1,'define.h']]],
['items',['ITEMS',['../define_8h.html#a8e3d0b04841186d4f38b7880a9e4b5c6',1,'define.h']]]
]; |
<|file_name|>StringConverter.test.ts<|end_file_name|><|fim▁begin|>let assert = require('chai').assert;
import { StringConverter } from '../../src/convert/StringConverter';
suite('StringConverter', ()=> {
<|fim▁hole|> assert.equal('123', StringConverter.toString(123));
assert.equal('true', String... | test('To String', () => {
assert.equal(null, StringConverter.toNullableString(null));
assert.equal('xyz', StringConverter.toString('xyz'));
|
<|file_name|>bootstrap.js<|end_file_name|><|fim▁begin|>/**
* Bootstrap
* (sails.config.bootstrap)
*
* An asynchronous bootstrap function that runs before your Sails app gets lifted.
* This gives you an opportunity to set up your data model, run jobs, or perform some special logic.
*
* For more information on boo... | var CronJob = require('cron').CronJob;
var cronJobs = Object.keys(sails.config.cron);
cronJobs.forEach(function(key) { |
<|file_name|>player.rs<|end_file_name|><|fim▁begin|>use crate::{
entity::{Character, Entity, EntityId, EntityPersistence, EntityRef, EntityType, StatsItem},
entity_copy_prop, entity_string_prop,
sessions::SignUpData,
};
use pbkdf2::{pbkdf2_check, pbkdf2_simple};
use serde::{Deserialize, Serialize};
#[deriv... | |
<|file_name|>suggest.ts<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*----------... | if (snippetConfig === 'top') {
return snippetUpComparator; |
<|file_name|>upload.js<|end_file_name|><|fim▁begin|>'use strict'
// untuk status uploader
const STATUS_INITIAL = 0
const STATUS_SAVING = 1
const STATUS_SUCCESS = 2
const STATUS_FAILED = 3
// base url api
const BASE_URL = 'http://localhost:3000'
const app = new Vue({
el: '#app',
data: {
message: 'Hello',
... | this.uploadedFiles = [].concat(up) |
<|file_name|>g++.py<|end_file_name|><|fim▁begin|>"""SCons.Tool.g++
Tool-specific initialization for g++.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, ... | # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
<|file_name|>issue-5100.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, ... | // 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. |
<|file_name|>phage_annotation_table.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# vim: set fileencoding=utf-8
import os
import argparse
from gff3 import genes, get_gff3_id, get_rbs_from, feature_test_true, feature_lambda, feature_test_type
from cpt_gffParser import gffParse, gffWrite
from Bio import SeqIO
fro... |
def gaf_assigned_by(record, feature, gaf_data): |
<|file_name|>speed_limit_exceeded_by_hour.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
from scripts.db_api import accident
def usa_query(hour):
return '''
SELECT count(*), (select count(*) from accident
join vehicle on(acc_id = accident.id)
where country = 'USA'
and vehic... | and vehicle.speed > -1
and accident.speed_limit > 0
and date_part('hour', timestamp) = {0}) as exceeded
from accident |
<|file_name|>t242.py<|end_file_name|><|fim▁begin|>class O(object): pass
class A(O): pass
class B(O): pass
class C(O): pass<|fim▁hole|>class D(O): pass
class E(O): pass
class K1(A,B,C): pass
class K2(D,B,E): pass
class K3(D,A): pass
class Z(K1,K2,K3): pass
print K1.__mro__
print K2.__mro__
print K3.__mro__
print Z.__mro... | |
<|file_name|>virtual_machine_scale_set_extension_profile.go<|end_file_name|><|fim▁begin|>package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"... |
} |
<|file_name|>compaction_filter.rs<|end_file_name|><|fim▁begin|>//! `CompactionFilter` allows an application to modify/delete a key-value at
//! the time of compaction.
use std::os::raw::{c_char, c_int};
use rocks_sys as ll;
#[repr(C)]
#[derive(Debug, PartialEq, PartialOrd, Eq, Ord, Copy, Clone)]
pub enum ValueType {... |
#[cfg(test)]
mod tests { |
<|file_name|>mangle.cpp<|end_file_name|><|fim▁begin|>// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -fblocks -std=c++11 | FileCheck %s
struct X { };
struct Y { };
// CHECK: @unmangled_variable = global
// CHECK: @_ZN1N1iE = global
// CHECK: @_ZZN1N1fEiiE1b = internal global
// CHECK: @_ZZN1N1gEvE1a... | } |
<|file_name|>archive.go<|end_file_name|><|fim▁begin|>// Copyright 2014 Docker authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the DOCKER-LICENSE file.
package archive
import (
"archive/tar"
"bufio"
"compress/gzip"
"fmt"
"io"
"os"
"path/filepat... | |
<|file_name|>AddListener.java<|end_file_name|><|fim▁begin|>/*
* RapidMiner
*
* Copyright (C) 2001-2011 by Rapid-I and the contributors
*
* Complete list of developers available at our web site:
*
* http://rapid-i.com
*
* This program is free software: you can redistribute it and/or modify
... | } |
<|file_name|>map2tmx.js<|end_file_name|><|fim▁begin|>"use strict"
const process = require(`process`)
const fs = require(`fs`)
const path = require(`path`)
const js2xmlparser = require(`js2xmlparser`)
const abbrevJson = require(`../abbrevJson`)
const asset = require(`../asset.js`)
const loadMappoMap = require(`../load... | |
<|file_name|>ClientInfo.java<|end_file_name|><|fim▁begin|>/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under ... | * Unless required by applicable law or agreed to in writing, |
<|file_name|>controllers.js<|end_file_name|><|fim▁begin|>var phonecatControllers = angular.module('phonecatControllers', []);
phonecatControllers.controller('PhoneListCtrl', ['$scope', '$http',
function ($scope, $http) {
$http.get('phones/phones.json').success(function(data) {
$scope.phones = data;
})... | $scope.setImage = function(imageUrl) {
$scope.mainImageUrl = imageUrl;
} |
<|file_name|>jquery.ui.datepicker-no.js<|end_file_name|><|fim▁begin|>/* Norwegian initialisation for the jQuery UI date picker plugin. */
/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */
jQuery(function($){
$.datepicker.regional['no'] = {
closeText: 'Lukk',
prevText: '«Forrige',
next... | currentText: 'I dag',
monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'],
|
<|file_name|>projmgr.py<|end_file_name|><|fim▁begin|>import tangelo
import pymongo
import bson.json_util
from ArborFileManagerAPI import ArborFileManager
api = ArborFileManager()
api.initDatabaseConnection()
@tangelo.restful
def get(*pargs, **query_args):
if len(pargs) == 0:
return tangelo.HTTPStatusCode(... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals
from .abc import ABCIE
from .abc7news import Abc7NewsIE
from .academicearth import AcademicEarthCourseIE
from .addanime import AddAnimeIE
from .adobetv import (
AdobeTVIE,
AdobeTVVideoIE,
)
from .adultswim import Adul... | |
<|file_name|>headers.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::cell::DOMRefCell;
use dom::bindings::codeg... | }
// https://fetch.spec.whatwg.org/#dom-headers |
<|file_name|>scrollview-list.js<|end_file_name|><|fim▁begin|><|fim▁hole|>size 3077<|fim▁end|> | version https://git-lfs.github.com/spec/v1
oid sha256:94e212e6fc0c837cd9fff7fca8feff0187a0a22a97c7bd4c6d8f05c5cc358519 |
<|file_name|>template.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Authors: Daniel P. Berrange <berrange@redhat.com>
#
# Copyright (C) 2015 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 F... | docker+https://index.docker.io/ubuntu?tag=latest |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models
class ProductionDatasetsExec(models.Model):<|fim▁hole|> taskid = models.DecimalField(decimal_places=0, max_digits=10, db_column='TASK_ID', null=False, default=0)
status = models.CharField(max_length=12, db_column='STATUS', null=Tru... | name = models.CharField(max_length=200, db_column='NAME', primary_key=True) |
<|file_name|>test_drive_edit.py<|end_file_name|><|fim▁begin|>import os
import time
from nose.plugins.skip import SkipTest
from nxdrive.client import LocalClient
from nxdrive.tests.common import OS_STAT_MTIME_RESOLUTION
from nxdrive.client.common import LOCALLY_EDITED_FOLDER_NAME
from nxdrive.tests.common_unit_test imp... | self.assertTrue(local.exists('/%s/test.odt'
% LOCALLY_EDITED_FOLDER_NAME)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.