prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>master.py<|end_file_name|><|fim▁begin|><|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 on an "AS IS" BASIS,
# WITHOUT WARRANTIES ... | # Copyright 2015 Philipp Pahl, Sven Schubert, Daniel Britzger
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. |
<|file_name|>models.ts<|end_file_name|><|fim▁begin|>import { SelectableItem, LoadableItem } from '../core/classes';
import { Company, CompanyDetail } from './contracts';
import { StorageItem } from './storage/models';
export class CompanyItem extends SelectableItem {
private _item : Company;
get item() {
retur... | }
get storage() {
return this._storage;
} |
<|file_name|>address.go<|end_file_name|><|fim▁begin|>/*
Copyright 2015 Philippe Hilger, aka "PeerGum"
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/license... | pos := i*4 + j
vLow[pos] = v % uint64(DIST_MAX) |
<|file_name|>SketchUploadState.java<|end_file_name|><|fim▁begin|><|fim▁hole|>package com.punchthrough.bean.sdk.internal.upload.sketch;
public enum SketchUploadState {
INACTIVE, RESETTING_REMOTE, SENDING_START_COMMAND, SENDING_BLOCKS, FINISHED
}<|fim▁end|> | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Plugins that are not OS-specific"""
# pylint: disable=unused-import
from rekall.plugins.common import address_resolver
from rekall.plugins.common import api
from rekall.plugins.common import bovine
from rekall.plugins.common import efilter_plugins
from rekall.pl... | from rekall.plugins.common import scanners
from rekall.plugins.common import sigscan |
<|file_name|>rest.py<|end_file_name|><|fim▁begin|>from datetime import datetime
from flask import Blueprint, jsonify, request
from app.dao.fact_notification_status_dao import (
get_total_notifications_for_date_range,
)
from app.dao.fact_processing_time_dao import (
get_processing_time_percentage_for_date_rang... | |
<|file_name|>angular_jqxtabs.ts<|end_file_name|><|fim▁begin|>/*
jQWidgets v11.0.0 (2020-Nov)
Copyright (c) 2011-2020 jQWidgets.
License: https://jqwidgets.com/license/
*/
/* eslint-disable */
/// <reference path="jqwidgets.d.ts" />
import '../jqwidgets/jqxcore.js';
import '../jqwidgets/jqxbuttons.js';
import '.... | template: '<div><ng-content></ng-content></div>'
})
export class jqxTabsComponent implements OnChanges |
<|file_name|>SolomonServer.java<|end_file_name|><|fim▁begin|>/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package solomonserver;
import java.io.IOException;
import java.net.Server... | public static String error; |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Structures that can be passed into Weld.
//!
//! This currently defines the type layout specified for the single threaded backend. In general,
//! type layouts vary from backend to backend especially for builders.
//!
//! # Primitives
//!<|fim▁hole|>//! defined in a ... | //! Primitives in Weld match their Rust counterparts, _except for booleans_. Booleans in Weld are
//! guaranteed to be one byte in size, but are defined as `_Bool` from `stdbool.h` in Rust when |
<|file_name|>BlockNodeManipulator.java<|end_file_name|><|fim▁begin|>package tb.common.block;
import tb.common.item.ItemNodeFoci;
import tb.common.tile.TileNodeManipulator;
import tb.init.TBItems;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
... | w.spawnEntityInWorld(itm);
} |
<|file_name|>task-comm-7.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>#![allow(unused_must_use)]
#![allow(unused_assignments)]
// ignore-emscripten no threads support
use std::sync::mpsc::{channel, Sender};
use std::thread;
pub fn main() { test00(); }
fn test00_start(c: &Sender<isize>, start: isize,
n... | // run-pass |
<|file_name|>Input_Value_Line.cpp<|end_file_name|><|fim▁begin|>//-----------------------------------------------------------------------------
// Class implementation: Input_Value::Line
//-----------------------------------------------------------------------------
#include "../pragmas.h"
#include "Input_Valu... | Input_Value::Line::Line()
: str_(""),
|
<|file_name|>pageVisibility.js<|end_file_name|><|fim▁begin|>var
utils = require('./utils'),
Signals = require('./Signals');
/**
* Support for the W3C Page Visibility API - http://www.w3.org/TR/page-visibility
*
* {@link module:enyo/pageVisibility.hidden} and {@link module:enyo/pageVisibility.visibilityState}
* conta... | |
<|file_name|>get_all_audience_segments.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#
# 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
#
... | # Initialize client object. |
<|file_name|>ShowPrice.java<|end_file_name|><|fim▁begin|>package pricing;
import org.configureme.ConfigurationManager;
import org.configureme.Environment;
import org.configureme.GlobalEnvironment;
import org.configureme.environments.DynamicEnvironment;
public class ShowPrice {
public static void main(String a[]){
... | ConfigurationManager.INSTANCE.configure(pricing);
System.out.println("Please pay "+pricing.getProductPrice()); |
<|file_name|>_xsrc.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators
class XsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="xsrc", parent_name="histogram2d", **kwargs):
super(XsrcValidator, self).__init__(
plotly_name=plotly_name,
... | edit_type=kwargs.pop("edit_type", "none"),
**kwargs
) |
<|file_name|>0003_auto__add_unique_category_name.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding unique constraint on 'Cate... | def backwards(self, orm):
# Removing unique constraint on 'Category', fields ['name']
db.delete_unique(u'website_category', ['name']) |
<|file_name|>ServletInitializer.java<|end_file_name|><|fim▁begin|>package yaycrawler.admin;
import org.springframework.boot.builder.SpringApplicationBuilder;<|fim▁hole|>public class ServletInitializer extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuil... | import org.springframework.boot.context.web.SpringBootServletInitializer;
|
<|file_name|>ManageCoursePage.js<|end_file_name|><|fim▁begin|>import React, {PropTypes} from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import * as courseActions from '../../actions/courseActions';
import CourseForm from './CourseForm';
import {authorsFormattedForDropdown} f... | |
<|file_name|>ExcludeRegexpFilter.java<|end_file_name|><|fim▁begin|>/*
No-Babylon a job search engine with filtering ability
Copyright (C) 2012-2014 ferenc.jdev@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publish... | public class ExcludeRegexpFilter implements Filter { |
<|file_name|>db.rs<|end_file_name|><|fim▁begin|>use std::path::Path;
use std::fs::File;
use std::io::{Write, Read, self, Error, ErrorKind};
use db::Entry;
use nacl::secretbox::{SecretKey, SecretMsg};
use rand::{ Rng, OsRng };
use crypto::bcrypt::bcrypt;
use serde_json;
const DB_VERSION: u8 = 1u8;
const SALT_SIZE: usi... | Err(Error::new(ErrorKind::InvalidData, text))
}
} |
<|file_name|>cmd_init.py<|end_file_name|><|fim▁begin|># coding: utf-8
import os
import click
from chado import ChadoInstance
from chakin.cli import pass_context
from chakin import config
from chakin.io import warn, info
CONFIG_TEMPLATE = """## Chado's chakin: Global Configuration File.
# Each stanza should contain a... | dbname: "%(dbname)s"
dbuser: "%(dbuser)s"
dbpass: "%(dbpass)s" |
<|file_name|>calculate_distance.go<|end_file_name|><|fim▁begin|>package main
import (
"bufio"
"fmt"
"log"
"math"
"os"
)
func sqrt(a int) int {
return int(math.Sqrt(float64(a)))
}
<|fim▁hole|>func main() {
var x1, y1, x2, y2 int
data, err := os.Open(os.Args[1])
if err != nil {
log.Fatal(err)
}
defer data.... | |
<|file_name|>stat.go<|end_file_name|><|fim▁begin|>package stat
import (
"fmt"
"time"
// "encoding/json"
)
type RevStat struct {
RevId string `json:"RevId"`
UserName string `json:"UserName"`
WordCount int `json:"WordCount"`
ModDate string `json:"ModDate"`
WordFreq []WordPair `json:"W... | func (rev RevStat) String() string { |
<|file_name|>dbrp_mapping.go<|end_file_name|><|fim▁begin|>package influxdb
import (
"context"
"strconv"
"strings"
"unicode"
)
// DBRPMappingServiceV2 provides CRUD to DBRPMappingV2s.
type DBRPMappingServiceV2 interface {
// FindBy returns the dbrp mapping for the specified ID.
// Requires orgID because every re... | }
|
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.9.12 on 2018-12-04 15:13
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependen... | },
), |
<|file_name|>MainActivity.java<|end_file_name|><|fim▁begin|>package com.rarnu.tools.neo.activity;
import android.Manifest;
import android.app.AlertDialog;
import android.app.Fragment;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import com.rarnu.tools.neo.R;
import com.r... | |
<|file_name|>connection.js<|end_file_name|><|fim▁begin|>"use strict";
var net = require('net');
var events = require('events');
var util = require('util');
var async = require('async');
var tls = require('tls');
var Encoder = require('./encoder.js');
var writers = require('./writers');
var requests = require('./reques... | err.isServerUnhealthy = true;
if (innerError) { |
<|file_name|>bitor.rs<|end_file_name|><|fim▁begin|>#![feature(core)]
extern crate core;
#[cfg(test)]
mod tests {
use core::num::Wrapping;
use core::ops::BitOr;
// macro_rules! wrapping_impl {
// ($($t:ty)*) => ($(
// #[stable(feature = "rust1", since = "1.0.0")]
// impl Ad... |
// wrapping_impl! { usize u8 u16 u32 u64 isize i8 i16 i64 i64 } |
<|file_name|>chef.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import chef
import datetime
from errbot import BotPlugin, botcmd
from time import time
STALE_TIME = 60 * 30 # 30 minutes
class Chef(BotPlugin):
def pretty_time(self, time):
return datetime.datetime.fromtimestamp(int(time))... | def stale(self, mess, args):
""" Search for stale nodes """
list = "Stale nodes for query : %s ( stale time %s seconds )\n" % (args, STALE_TIME)
for row in self.search_node(args): |
<|file_name|>FloatTag.java<|end_file_name|><|fim▁begin|>package org.jnbt;
/*
* JNBT License
*
* Copyright (c) 2010 Graham Edgecombe
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
*... | /**
* The <code>TAG_Float</code> tag.
* @author Graham Edgecombe
* |
<|file_name|>phpcomposer.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2015 nexB Inc. and others. All rights reserved.
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
# The ScanCode software is licensed under the Apache License version 2.0.
# Data generated with ScanCode require an acknowledgment.
#... | |
<|file_name|>ClusterUtils.py<|end_file_name|><|fim▁begin|># This file is part of profileNJ
#
# Date: 02/2014
# ClusterUtils contain implementation of nj and upgma clustering algo, and
# required methods
__author__ = "Emmanuel Noutahi"
from TreeClass import TreeClass
import os
import numpy as np
from StringIO import S... | upgma_depth = num_entries - 1 # default, do all |
<|file_name|>top-nav.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core';
<|fim▁hole|>})
export class TopNavComponent implements OnInit {
title = 'Blogging Application';
constructor() { }
ngOnInit() {
}
}<|fim▁end|> | @Component({
selector: 'app-top-nav',
templateUrl: './top-nav.component.html',
styleUrls: ['./top-nav.component.css'] |
<|file_name|>data_resync.go<|end_file_name|><|fim▁begin|>package vpp
import (
"github.com/ligato/vpp-agent/clientv2/vpp"
"github.com/contiv/vpp/mock/localclient/dsl"
"github.com/ligato/vpp-agent/api/models/vpp/abf"
"github.com/ligato/vpp-agent/api/models/vpp/acl"
"github.com/ligato/vpp-agent/api/models/vpp/inter... | func (d *MockDataResyncDSL) Span(val *vpp_interfaces.Span) vppclient.DataResyncDSL { |
<|file_name|>二分查找.py<|end_file_name|><|fim▁begin|>def search(L, e):
def bSearch(L, e, low, high):<|fim▁hole|>
if L[mid] == e:
return True
elif L[mid] > e:
if low == mid:
return False
else:
return bSearch(L, e, low, mid - 1)
... | if high == low:
return L[low] == e
mid = (low + high) // 2 |
<|file_name|>grid_test.ts<|end_file_name|><|fim▁begin|>/// <reference path="grid_astar.ts" />
// create abstract grid representation (no nodes here)
var grid =
[[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
[1, 0, 0... | testHeuristic(new grid_astar.DijkstraHeuristic());
}
|
<|file_name|>pcValidation.js<|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 th... | ngModel;
/** @type {Array} */ |
<|file_name|>helpers.js<|end_file_name|><|fim▁begin|>export const generateGuid = () => {
function s4() {<|fim▁hole|> return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
return `${s4() + s4()}-${s4()}${s4()}`;
};
export default {
generateGuid,
};<|fim▁end|> | |
<|file_name|>test_toggle.py<|end_file_name|><|fim▁begin|>from tests import tests<|fim▁hole|>
def test_toggle():
temporary = tests.toggled_seats
assert temporary == [[1, 1, 1], [1, 1, 1], [1, 1, 1]]<|fim▁end|> | |
<|file_name|>example_group.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>use std::sync::{Arc, Mutex};
use std::fmt;
use std::thread::JoinHandle;
use std::panic::{recover, RecoverSafe, UnwindSafe};
use world_state;
use util::{await_handles, SourceLocation};
use example::{Example, ExampleResult};
use example_group::exampl... | |
<|file_name|>FlatDhcpAcquireDhcpServerIpReply.java<|end_file_name|><|fim▁begin|>package org.zstack.network.service.flat;
import org.zstack.header.message.MessageReply;
import org.zstack.header.network.l3.IpRangeInventory;
import org.zstack.header.network.l3.UsedIpInventory;
/**
* Created by frank on 10/11/2015.
*/
... | |
<|file_name|>serve-static.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for serve-static 1.7.1
// Project: https://github.com/expressjs/serve-static
// Definitions by: Uros Smolnik <https://github.com/urossmolnik/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/* =================== USAGE ====... | |
<|file_name|>shipsptoptimalbonusmf.py<|end_file_name|><|fim▁begin|><|fim▁hole|># shipSPTOptimalBonusMF
#
# Used by:
# Ship: Chremoas
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Small Projectile Turret"),
"max... | |
<|file_name|>ord.js<|end_file_name|><|fim▁begin|>function ord (string) {
// From: http://phpjs.org/functions
// + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + bugfixed by: Onno Marsman
// + improved by: Brett Zamir (http://brett-zamir.me)
// + input by: incidence
// * ex... | // we could also throw an error as it is not a complete character, but someone may want to know |
<|file_name|>notes.js<|end_file_name|><|fim▁begin|>// The following are instance methods and variables
var Note = Class.create({
initialize: function(id, is_new, raw_body) {
if (Note.debug) {
console.debug("Note#initialize (id=%d)", id)
}
this.id = id
this.is_new = is_new
this.document_obse... | |
<|file_name|>resource.py<|end_file_name|><|fim▁begin|>"""
===================
Resource Management
===================
This module provides a tool to manage dependencies on resources within a
:mod:`vivarium` simulation. These resources take the form of things that can
be created and utilized by components, for example ... | A list of names of the resources being added.
producer
A method or object that will produce the resources. |
<|file_name|>mnist_evaluate.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
from mnist import evaluate
import sys
model = evaluate.init()
prediction1, confidence1 = evaluate.from_local_image(sys.argv[1], model)
print("prediction: {}; confidence: {:.2f}".format(prediction1, confidence1))
predicti... | print("prediction: {}; confidence: {:.2f}".format(prediction2, confidence2)) |
<|file_name|>test_group_norm_op.py<|end_file_name|><|fim▁begin|># Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:... | class TestGroupNormOp2_With_NHWC(TestGroupNormOp):
def init_test_case(self): |
<|file_name|>linear.py<|end_file_name|><|fim▁begin|># Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org... | else:
model_fn = _linear_model_fn |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from .mdl_event import *
from .mdl_receipt import *
from .mdl_budget import *
from .mdl_division import *
from .mdl_eventsignin import *
from .mdl_joinrequest import *<|fim▁end|> | from .mdl_user import *
from .mdl_club import * |
<|file_name|>0014_formulacolumnmapping.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2017-06-16 19:25
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [... | |
<|file_name|>vmware_vmkernel_ip_config.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Joseph Callen <jcallen () csc.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
... | argument_spec.update(dict(vmk_name=dict(required=True, type='str'),
ip_address=dict(required=True, type='str'),
subnet_mask=dict(required=True, type='str'))) |
<|file_name|>profile.py<|end_file_name|><|fim▁begin|>import copy
from collections import OrderedDict
from collections import defaultdict
from conans.model.env_info import EnvValues
from conans.model.options import OptionsValues
from conans.model.values import Values
class Profile(object):
"""A profile contains a... | |
<|file_name|>webpack.dev.config.js<|end_file_name|><|fim▁begin|>var webpack = require('webpack');
var path = require('path');
var APP_DIR = path.resolve(__dirname, 'react');
var BUILD_DIR = path.resolve(__dirname, 'project/static/js');
var config = {
entry: {
public: APP_DIR + '/public.main.jsx',
private: A... | presets: [
require.resolve('babel-preset-react'),
require.resolve('babel-preset-es2015'),
require.resolve('babel-preset-stage-0'), |
<|file_name|>gitstats.py<|end_file_name|><|fim▁begin|>import urllib2
import base64
import json<|fim▁hole|>from GitFetcher import GitHubFetcher;
username = "debuggerman"
password = "megadeth"
orgUrl = "https://api.github.com/orgs"
orgName = "coeus-solutions"
gitFetcher = GitHubFetcher(username = username, password = p... | from link import *; |
<|file_name|>jquery.flot.js<|end_file_name|><|fim▁begin|>/* Javascript plotting library for jQuery, v. 0.5.
*
* Released under the MIT license by IOLA, December 2007.
*
*/
(function($) {
function Plot(target, data_, options_, plugins) {
// data is on the form:
// [ series1, series2 ... ]
... | if (x2 < axisx.min) |
<|file_name|>JitArm64_Integer.cpp<|end_file_name|><|fim▁begin|>// Copyright 2014 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#include "Common/Arm64Emitter.h"
#include "Common/Common.h"
#include "Core/Core.h"
#include "Core/CoreTiming.h"
#include "Core/PowerPC/PowerPC.h"... | ARM64Reg RA = gpr.R(a);
ARM64Reg RS = gpr.R(s);
ARM64Reg WA = gpr.GetReg(); |
<|file_name|>purchase-modal.service.ts<|end_file_name|><|fim▁begin|>import { defineAsyncComponent } from 'vue';
import { showModal } from '../../../modal/modal.service';
import { User } from '../../../user/user.model';
import { GameBuild } from '../../build/build.model';
import { Game } from '../../game.model';
import ... | partner?: User;
}
|
<|file_name|>openvpn.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# openvpn.py: library to handle starting and stopping openvpn instances
import subprocess
import threading
import time
class OpenVPN():
def __init__(self, config_file=None, auth_file=None, timeout=10):
self.started = False
sel... | while start_time + timeout > time.time():
self.thread.join(1)
if self.error or self.started: |
<|file_name|>test_disambiguate.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function, absolute_import
import unittest
from ..morf import analyze, disambiguate
# EINO SANTANEN. Muodon vanhimmat
# http://luulet6lgendus.blogspot.com/
sentences = '''KÕIGE VANEM MU... | for sentence in sentences:
an_with = analyze(sentence) |
<|file_name|>fmbt.py<|end_file_name|><|fim▁begin|># fMBT, free Model Based Testing tool
# Copyright (c) 2012 Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU Lesser General Public License,
# version 2.1, as published by the Free S... | raise ValueError(
'unexpected answer "%s", fmbt-debug expected' %
(whos_there.strip(),))
_g_debug_conn.sendall("fmbt.debug\n") |
<|file_name|>database_type.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##############################################################################
#
# Infrastructure
# Copyright (C) 2014 Ingenieria ADHOC
# No email
#
# This program is free software: you can redistribute it and/or modify
# ... | _defaults = {
} |
<|file_name|>test3D_old.py<|end_file_name|><|fim▁begin|>from rdkit import Chem
from rdkit import rdBase
from rdkit.Chem import rdMolDescriptors as rdMD
from rdkit.Chem import AllChem
from rdkit.Chem.EState import EStateIndices
from rdkit.Chem.EState import AtomTypes
import time
print rdBase.rdkitVersion
print rd... | r=rdMD.CalcWHIM(m)
print "Ei:"+str(r[0])+ "," + str(r[1]) + "," + str(r[2])+ "\n" |
<|file_name|>JavaHTMLTableCaptionElement.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of t... | } |
<|file_name|>config.py<|end_file_name|><|fim▁begin|>import os
basedir = os.path.abspath(os.path.dirname(__file__))
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db')
CSRF_ENABLED = True<|fim▁hole|>SECRET_KEY = 'f35fc593c73a35956a70d0a7eeac9bdb'<|fim▁end|> | |
<|file_name|>JobComparator.java<|end_file_name|><|fim▁begin|>package it.unimarconi.utils;
import it.unimarconi.beans.Job;
import java.util.Comparator;
public class JobComparator implements Comparator<Job> {
<|fim▁hole|>
}<|fim▁end|> | public int compare(Job a, Job b) {
return a.compareTo(b);
} |
<|file_name|>HeadersTest.java<|end_file_name|><|fim▁begin|>package com.github.wovnio.wovnjava;
import java.util.HashMap;
import javax.servlet.FilterConfig;
import javax.servlet.http.HttpServletRequest;
import org.easymock.EasyMock;
import java.net.URL;
import java.net.MalformedURLException;
import junit.framework.T... | HttpServletRequest mockRequest = MockHttpServletRequest.create("https://ja.example.com/test");
FilterConfig mockConfig = mockConfigSubdomain(); |
<|file_name|>common-crud.service.ts<|end_file_name|><|fim▁begin|>import {MdSnackBar} from '@angular/material';
export abstract class CommonCrudService {
constructor(private snackBar: MdSnackBar) {
}
// todo refactor crud operations to here (use metadata?)
onOperationPerformedNotify(opName: string): (res: boo... | let text;
if (res) { |
<|file_name|>managers.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from belt.managers import SearchQuerySetMixin
class PostQuerySet(SearchQuerySetMixin, models.QuerySet):
pass
class CategoryQuerySet(SearchQuerySetMixin, models.QuerySet):
pass
class BlogQuerySet(SearchQuerySetMixin, models.QuerySet):
de... | from django.db import models
from django.db.models import Count
|
<|file_name|>brush.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>
export default function Brush(props: SvgIconProps): React.ReactElement<SvgIconProps>;<|fim▁end|> | import * as React from 'react';
import {SvgIconProps} from '../../SvgIcon'; |
<|file_name|>multiple_hosts.py<|end_file_name|><|fim▁begin|>import os
from locust import HttpUser, TaskSet, task, between
from locust.clients import HttpSession
class MultipleHostsUser(HttpUser):
abstract = True
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.api_... | self.user.api_client.get("/stats/requests")
class WebsiteUser(MultipleHostsUser): |
<|file_name|>event.py<|end_file_name|><|fim▁begin|>'''
Copyright 2015-2020 HENNGE K.K. (formerly known as HDE, Inc.)
Licensed under MIT.<|fim▁hole|>import json
def read_event(path):
with open(path) as event:
data = json.load(event)
return data<|fim▁end|> | '''
|
<|file_name|>functions.ts<|end_file_name|><|fim▁begin|>let nop = function() {};
// Function params
let oneParam = function(n: number) {};
function twoParams(b: boolean, s: string) {}
function withDefaultValue(list = []) {}
// Function returns
let anyReturn = function(): any {
return 'hello';
};
<|fim▁hole|>
// Bo... | function typedReturn(): number {
return 4;
}
let partiallyTyped = function(n: number, u1, b: boolean, u2) {}; |
<|file_name|>transform.rs<|end_file_name|><|fim▁begin|>extern crate rier;
extern crate cgmath;
use rier::transform::Transform;<|fim▁hole|>#[test]
fn new_transform() {
let trans = Transform::new();
assert!(trans.matrix == Matrix4::one());
}<|fim▁end|> | use cgmath::{Matrix4, One};
|
<|file_name|>BooleanNode.js<|end_file_name|><|fim▁begin|>'use strict';
var isA = require("Espresso/oop").isA;
var oop = require("Espresso/oop").oop;
var init = require("Espresso/oop").init;
var trim = require("Espresso/trim").trim;
var isA = require("Espresso/oop").isA;
var oop = require("Espresso/oop").oop;
var Sca... | {
if ( typeof $value !== 'boolean') {
var $ex = new InvalidTypeException(format( |
<|file_name|>try-catch-before-try.js<|end_file_name|><|fim▁begin|>// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 25.3.1.3
description: >
When a generator is paused before a `try..catch` statement, `return` should... | yield;
try {
$ERROR('This code is unreachable (within `try` block)');
} catch (e) { |
<|file_name|>check_internal.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> Copyright 2013 Jesse 'Jeaye' Wilkerson
See licensing in LICENSE file, or at:
http://www.opensource.org/licenses/BSD-3-Clause
File: client/gfx/check_internal.rs
Author: Jesse 'Jeaye' Wilkerson
Description:
Provides... | /* |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>import json
import os
import re
from django import http
from django.conf import settings
from django.db.transaction import non_atomic_requests
from django.http import HttpResponse, HttpResponseBadRequest
from django.shortcuts import render
from django.utils.encoding i... | |
<|file_name|>imp.rs<|end_file_name|><|fim▁begin|>//! This code might still contain bugs. In either case it's very inefficient because we
//! want to avoid reading invalid memory at all costs. Note that the implementation from
//! 1024cores does not handle ABA!
use std::{ptr, mem};
use std::sync::atomic::{AtomicUsize, ... | deallocate(self.buf as *mut u8,
(self.cap_mask as usize + 1) * mem::size_of::<T>(),
mem::align_of::<T>());
} |
<|file_name|>mouse_handler.rs<|end_file_name|><|fim▁begin|>use sfml::graphics::RenderTarget;
pub trait MousePosHandler {
fn mouse_pos(&mut self, target: &RenderTarget, mx: i32, my: i32);
}
/*
pub trait MouseClickHandler {
fn mouse_click(&mut self, target: &RenderTarget, mx: i32, my: i32);<|fim▁hole|><|fim▁end... | }
*/ |
<|file_name|>itemFactories-test.js<|end_file_name|><|fim▁begin|>import {
createEllipsisItem,
createFirstPage,
createLastItem,
createNextItem,
createPageFactory,
createPrevItem,
} from 'src/lib/createPaginationItems/itemFactories'
describe('itemFactories', () => {
describe('createEllipsisItem', () => {
... | })
describe('createPageFactory', () => { |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(name='megacl',
version='0.4.6',
description='mega.co.nz command line client.',
author='Arthibus Gisséhel',
author_email='public-dev-megacl@gissehel... | |
<|file_name|>strobe.js<|end_file_name|><|fim▁begin|>var five = require("johnny-five"),
board = new five.Board();
board.on("ready", function() {
var led = new five.Led(12);
var rgb = new five.Led.RGB([6, 5, 3]);
var index = 0;
this.loop(10, function() {
// led.toggle();
if (index === 1677721... | // var led = new five.Led(13);
// led.blink(5); |
<|file_name|>watch_calendars.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*-
## Copyright 2011,2013 Luc Saffre
## This file is part of the Lino project.
## Lino 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 Fo... | rs_deleted = qs.count()
qs.delete() # note: doesn't call delete methods of individual objects
dblogger.info( |
<|file_name|>PolicyManagementDAOFactory.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.... | "has not been attempted");
} |
<|file_name|>issue-1397.rs<|end_file_name|><|fim▁begin|>pub enum TransactionState {
Committed(i64),
}
pub enum Packet {
Transaction { state: TransactionState },
}
<|fim▁hole|>fn baz(p: Packet) {
loop {
loop {
loop {
loop {
if let Packet::Transaction {... | |
<|file_name|>socketstream.js<|end_file_name|><|fim▁begin|>// SocketStream 0.3
// ----------------
'use strict';
// console.log('CHECK');
// console.log(process.env);
// console.log('/CHECK');
require('colors');
var EventEmitter2 = require('eventemitter2').EventEmitter2;
// Get current version from package.json
var ... | exports.start = function(httpServer) {
return serverInstance || (serverInstance = start(httpServer)); |
<|file_name|>game.js<|end_file_name|><|fim▁begin|>var GlobezGame = GlobezGame || {};
GlobezGame.Boot = function() {};
GlobezGame.Boot.prototype = {
preload: function() {
console.log("%cStarting Fish Vs Mines", "color:white; background:red");
this.load.image("loading", "assets/sprites/loading.png");
this.l... | |
<|file_name|>Reading_raw_input.py<|end_file_name|><|fim▁begin|>input = raw_input();<|fim▁hole|><|fim▁end|> | print input |
<|file_name|>unit_selection_system.rs<|end_file_name|><|fim▁begin|>// OpenAOE: An open source reimplementation of Age of Empires (1997)
// Copyright (c) 2016 Kevin Fuller
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Softw... | &mouse_ray.world_coord,
unit_info.terrain_restriction);
action_batcher.queue_for_entity(entity.get_id(), Action::ClearQueue); |
<|file_name|>strings3.rs<|end_file_name|><|fim▁begin|>// Ok, here are a bunch of values-- some are `Strings`, some are `&strs`. Your
// task is to call one of these two functions on each value depending on what
// you think each value is. That is, add either `string_slice` or `string`
// before the parentheses on each ... | |
<|file_name|>list_box_row.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (b7f5189) from gir-files (71d73f0)
// DO NOT EDIT
use Bin;
use Container;
use Widget;
use ffi;
use glib::object::Downcast;
use glib::object::IsA;
use glib::signal::connect;
use glib::translate::*;
use glib_ffi;
use std::boxed::... | unsafe {
ffi::gtk_list_box_row_set_header(self.to_glib_none().0, header.to_glib_none().0);
}
} |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! Linear Algebra eXtension (LAX)
//! ===============================
//!
//! ndarray-free safe Rust wrapper for LAPACK FFI
//!
//! Linear equation, Inverse matrix, Condition number
//! --------------------------------------------------
//!
//! As the property of $A$, s... | } |
<|file_name|>7.4.3_convert_table.py<|end_file_name|><|fim▁begin|>'''
Convert a table from a nested list to a nested dictionary and back.
-----------------------------------------------------------
(c) 2013 Allegra Via and Kristian Rother
Licensed under the conditions of the Python License
This code appears i... | # convert nested list to nested dict
nested_dict = {} |
<|file_name|>paths.py<|end_file_name|><|fim▁begin|><|fim▁hole|>basedir = '/data/t3serv014/snarayan/deep/v_deepgen_4_akt_small/'
figsdir = '/home/snarayan/public_html/figs/deepgen/v4_akt/'<|fim▁end|> | |
<|file_name|>2D_Dielectric_Dielectric.js<|end_file_name|><|fim▁begin|>$(window).on('load', function() {//main
const dom = {//define inputs
tswitch: $("#wave-switch input"),
aSlider: $("input#angle"),//angle slider
nSlider: $("input#refractive-index-ratio"),
};
let... | let k_x = Math.cos(-theta_i)*k_1;
let k_y = Math.sin(-theta_i)*k_1;
let E_0_r = reflect();
|
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
#[doc = r" Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::OR {
#[doc = r" Modifies the contents of the register"]
#[inline(always)]
pub fn modify<F>(&self,... | #[doc = "Bits 0:1 - Timer input 1 remap"]
#[inline(always)]
pub fn rmp(&self) -> RMPR {
let bits = { |
<|file_name|>test_backend_compile_engine.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 y... | from tvm.relay.testing.temp_op_attr import TempOpAttr
import tvm.testing
|
<|file_name|>linux_shell.py<|end_file_name|><|fim▁begin|># Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import subprocess
from devtoolslib.shell import Shell
from devtoolslib import http_server
class L... | """Wrapper around Mojo shell running on Linux. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.