prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>ExpenseReport.java<|end_file_name|><|fim▁begin|>package cz.muni.fi.pv243.et.model;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.se... | public int hashCode() {
return getId() != null ? getId().hashCode() : 0;
}
|
<|file_name|>windows.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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/li... | |
<|file_name|>[userId].tsx<|end_file_name|><|fim▁begin|>import { Fab, makeStyles, Toolbar } from '@material-ui/core';
import Container from '@material-ui/core/Container';
import Grid from '@material-ui/core/Grid';
import Paper from '@material-ui/core/Paper';
import Typography from '@material-ui/core/Typography';
import ... | |
<|file_name|>TransactionScopeListObject.java<|end_file_name|><|fim▁begin|>package nam.model.transactionScope;
import java.io.Serializable;
import org.aries.ui.AbstractListObject;
import nam.model.TransactionScope;
public class TransactionScopeListObject extends AbstractListObject<TransactionScope> implements Compa... | return getKey(transactionScope);
}
public Object getKey(TransactionScope transactionScope) { |
<|file_name|>curses_ui_test.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.ap... | # Scrolled up one line.
self.assertEqual({
0: [3, 0],
-1: None |
<|file_name|>sort-by-letter.pipe.ts<|end_file_name|><|fim▁begin|>// 按照中文首字母顺序排序
import {Pipe, PipeTransform} from '@angular/core';
@Pipe({
name: 'sortByLetter'
})
export class SortByLetterPipe implements PipeTransform {
transform(value: Array<any>, key?: any): any {
if (key) {
if (!value) { return value... | return valueKeyArray |
<|file_name|>ssh_session.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# Eric S. Raymond
#
# Greatly modified by Nigel W. Moriarty
# April 2003
#
from pexpect import *
import os, sys
import getpass
import time
class ssh_session:
"Session with extra state including the password to be used."
def ... | |
<|file_name|>parse.rs<|end_file_name|><|fim▁begin|>use diagnostic::Pos;
use nom::{ErrorKind, IResult, Needed};
use std::cell::RefCell;
use std::vec::Drain;
use syntax::Expr::*;
use syntax::{Expr, Ty};
use typed_arena::Arena;
pub mod lex {
use super::*;
fn space(i: &str) -> IResult<&str, ()> {
let mut chars = ... | alt!(i, |
<|file_name|>monitor.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) SAS Institute Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | self.updateTrovesForJob(jobId)
else:
self.states[jobId, troveTuple] = state |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Érudit.org documentation build configuration file, created by
# sphinx-quickstart on Mon Dec 14 17:16:39 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all p... | # If false, no index is generated.
#html_use_index = True |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// The MIT License (MIT)
//
// Copyright (c) 2014 Jeremy Letang
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, inc... |
#[cfg(target_os = "wind32")]
#[path = "windows/mod.rs"]
mod imp; |
<|file_name|>reflection.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2004-2005 The Dojo Foundation, Licensed under the Academic Free License version 2.1 or above */dojo.provide("dojo.reflect");
/*****************************************************************
reflect.js
v.1.5.0
(c) 2003-2004 Thomas R. Tre... | this.isBaseTypeOf = function(o, type) {
return (type instanceof o);
};
|
<|file_name|>system.rs<|end_file_name|><|fim▁begin|>use super::world::World;
use super::event::{EventQueue, EventEmitter};
<|fim▁hole|> /// This method is called each frame, giving the `System` access to the `World`, `EventQueue`,
/// and `EventEmitter`. `dt` is the time in milliseconds since the last update.
... | /// Trait that must be implemented by all systems in the `Simulation`.
pub trait System { |
<|file_name|>performance.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::c... | res.sort_by(|a, b| {
a.start_time()
.partial_cmp(&b.start_time()) |
<|file_name|>issue-73827-bounds-check-index-in-subexpr.rs<|end_file_name|><|fim▁begin|>// This test checks that bounds checks are elided when
// index is part of a (x | y) < C style condition
// compile-flags: -O
#![crate_type = "lib"]
// CHECK-LABEL: @get
#[no_mangle]
pub fn get(array: &[u8; 8], x: usize, y: usize)... | |
<|file_name|>csearch.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/li... | pub fn get_repr_attrs(cstore: &cstore::CStore, def: ast::DefId)
-> Vec<attr::ReprAttr> { |
<|file_name|>message_dialogs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# message_dialogs.py
# misc Gtk.MessageDialogs
#
# Copyright (C) 2014 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# ... | class ConfirmActionsDialog(object):
""" Confirm execute actions
"""
|
<|file_name|>0011_auto_20170831_1618.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-08-31 14:18
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
... | migrations.AlterField(
model_name='orderitem',
name='product',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='order_items', to='products.Product'), |
<|file_name|>ui.scroll_view.js<|end_file_name|><|fim▁begin|>/**
* DevExtreme (ui/scroll_view/ui.scroll_view.js)
* Version: 16.2.6
* Build date: Tue Mar 28 2017
*
* Copyright (c) 2012 - 2017 Developer Express Inc. ALL RIGHTS RESERVED
* EULA: https://www.devexpress.com/Support/EULAs/DevExtreme.xml
*/
"use ... | case "refreshStrategy":
this._invalidate();
break;
|
<|file_name|>routerless.module.d.ts<|end_file_name|><|fim▁begin|>import { ModuleWithProviders } from '@angular/core';<|fim▁hole|>import { Angulartics2Settings } from 'angulartics2';
export declare class Angulartics2RouterlessModule {
static forRoot(settings?: Partial<Angulartics2Settings>): ModuleWithProviders;
}<|... | |
<|file_name|>addressbook_upgrade_from_1_to_2.py<|end_file_name|><|fim▁begin|># -*- test-case-name: txdav.common.datastore.upgrade.sql.test -*-
# #
# Copyright (c) 2011-2015 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | |
<|file_name|>Observable.java<|end_file_name|><|fim▁begin|>package com.ebrightmoon.doraemonkit.ui.widget.tableview.listener;
import java.util.ArrayList;
import java.util.List;
public abstract class Observable<T> {
public final ArrayList<T> observables = new ArrayList<>();
/**AttachObserver(通过实例注册观察者)
... | observables.clear(); |
<|file_name|>spinners-routing.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SpinnersComponent } from './spinners.component';
const routes: Routes = [
{
path: '',
component: SpinnersComponent,
data: {
... | @NgModule({ |
<|file_name|>JobStatusDisplay.py<|end_file_name|><|fim▁begin|># Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import unicode_literals
import formatter<|fim▁hole|>
import portage
from portage import os
from portage import _encodings
from portag... | import io
import sys
import time |
<|file_name|>Tag.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aw... | return payload;
}
|
<|file_name|>WikiSearch.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 com.power.text.Run;
import static com.power.text.dialogs.WebS... |
public static void wikisearch(){
String searchqueryw = searchbox.getText();
|
<|file_name|>test_ordering.py<|end_file_name|><|fim▁begin|># pylint: disable=missing-docstring
from django.contrib.auth import get_user_model
from django.contrib.auth.models import AnonymousUser<|fim▁hole|>
from guardian.shortcuts import assign_perm
from rest_framework.test import APITestCase
from resolwe.flow.models ... | from django.core.urlresolvers import reverse |
<|file_name|>compile_info.py<|end_file_name|><|fim▁begin|>from telecommand import Telecommand
class GetCompileInfoTelecommand(Telecommand):
def __init__(self):
Telecommand.__init__(self)
def apid(self):
return 0x27
def payload(self):
<|fim▁hole|><|fim▁end|> | return [] |
<|file_name|>BootStrapJmxServlet.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 ... | throws ServletException, IOException {
doGet(req, resp);
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##############################################################################
#
# Ingenieria ADHOC - ADHOC SA
# https://launchpad.net/~ingenieria-adhoc
#
# This program is free software: you can redistribute it and/or modify
# it... | |
<|file_name|>Ares.cpp<|end_file_name|><|fim▁begin|>/*
_<|fim▁hole|>*/
#include "Ares.h"
/*
Description:
Function that is called when the library is loaded, use this as an entry point.
*/
int __attribute__((constructor)) Ares() {
SDL2::SetupSwapWindow();
return 0;
}<|fim▁end|> | /_\ _ _ ___ ___
/ _ \| '_/ -_|_-<
/_/ \_\_| \___/__/
|
<|file_name|>access_manager.py<|end_file_name|><|fim▁begin|>import uuid
import time
from hashlib import md5
from ..json_store import LoginTokenStore
__author__ = 'bromix'
class AccessManager(object):
def __init__(self, context):
self._settings = context.get_settings()
self._jstore = LoginTokenS... | |
<|file_name|>test_thread.py<|end_file_name|><|fim▁begin|>"""TestCases for multi-threaded access to a DB.
"""
import os
import sys
import time
import errno
from random import random
DASH = '-'
try:
WindowsError
except NameError:
class WindowsError(Exception):
pass
import unittest
fr... | if sys.version_info[0] < 3 :
|
<|file_name|>Opcode8030Handler.cpp<|end_file_name|><|fim▁begin|>#include "../../VM/Handler/Opcode8030Handler.h"
#include "../../VM/Script.h"
namespace Falltergeist
{
namespace VM
{
namespace Handler
{
Opcode8030::Opcode8030(VM::Script *script, std::shared_ptr<ILogger> logger) : Opco... | _script->setProgramCounter(_script->dataStack()->popInteger());
}
}
} |
<|file_name|>links.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
__author__ = 'Patrick Michl'
__email__ = 'frootlab@gmail.com'
__license__ = 'GPLv3'
import nemoa
import numpy
class Links:
"""Class to unify common ann link attributes."""
params = {}
def __init__(self): pass
@staticmethod
... | elif src['class'] == 'sigmoid':
M = - links['A'] * links['W'] |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>MODULE_DESCRIPTION = "Web pages"<|fim▁end|> | |
<|file_name|>timeline_demo.rs<|end_file_name|><|fim▁begin|>use nannou::prelude::*;
use nannou::ui::prelude::*;
use nannou_timeline as timeline;
use pitch_calc as pitch;
use std::iter::once;
use time_calc as time;
use timeline::track::automation::{BangValue as Bang, Envelope, Point, ToggleValue as Toggle};
use timeline:... | // Piano roll.
let piano_roll = track::PianoRoll::new(&context.bars, PPQN, ¬es[..]).color(color);
let track = context.set_next_track(piano_roll, ui); |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2008 German Aerospace Center (DLR)
#
# 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... | #
# Unless required by applicable law or agreed to in writing, software |
<|file_name|>ASTContext.cpp<|end_file_name|><|fim▁begin|>//===- ASTContext.cpp - Context to hold long-lived AST nodes --------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.... |
// If the pipe element type isn't canonical, this won't be a canonical type |
<|file_name|>t145_longjmp3.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from runtest import TestBase
class TestCase(TestBase):
def __init__(self):
TestBase.__init__(self, 'longjmp3', """
# DURATION TID FUNCTION
1.164 us [ 4107] | __monstartup();
0.657 us [ 4107] | __cxa_atexit();
... | |
<|file_name|>reader.js<|end_file_name|><|fim▁begin|>module.exports = {
readFiles: readFiles
};
var filewalker = require('filewalker');<|fim▁hole|> return new Promise(function(resolve, reject) {
var files = [];
filewalker(directory)
.on('file', function(file) {
if (fil... | var _ = require('kling/kling.js');
var fs = require('fs');
function readFiles(directory, fileSuffix) { |
<|file_name|>create_user.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
from django.contrib.auth.models import UserManager
from django.utils.timezone import now as timezone_now
from zerver.models import UserProfile, Recipient, Subscription, Realm, Stream
import base64
import ujson
import os
imp... | if default_all_public_streams is not None:
user_profile.default_all_public_streams = default_all_public_streams
if user_profile_id is not None: |
<|file_name|>61_replace_step_location_with_plan_id.go<|end_file_name|><|fim▁begin|>package migrations
import "github.com/BurntSushi/migration"
func ReplaceStepLocationWithPlanID(tx migration.LimitedTx) error {
_, err := tx.Exec(`
ALTER TABLE containers DROP COLUMN step_location;
`)
if err != nil {
return err... |
return err |
<|file_name|>floatingrendererwindow.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# codimension - graphics python two-way code editor and analyzer
# Copyright (C) 2010-2019 Sergey Satskiy <sergey.satskiy@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the term... | """Detached renderer window"""
|
<|file_name|>material.ts<|end_file_name|><|fim▁begin|>import { css, ThemedStyledProps } from 'styled-components';
import { ripple } from '../../utils/animations';
import { Theme } from '../../themes/default';
import { StyleProps } from './default';
export const style = ({
theme,
main,
}: ThemedStyledProps<StylePro... | border: none;
border-bottom: 2px solid transparent; |
<|file_name|>lachas.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | showWord(["n. "," aktivite pou al chase bèt sovaj pou vyann nan osnon pou po. Mwen pa janm al lachas, paske mwen pa gen kè pou mwen touye okenn bèt."
]) |
<|file_name|>Counter.py<|end_file_name|><|fim▁begin|>"""Counter.py
Part of the AQuA Cesium Controller software package
author=Martin Lichtman
created=2013-10-19
modified>=2015-05-11
This file holds everything to model a National Instruments DAQmx counter.
It communicated to LabView via the higher up LabView(I... | ax = fig.add_subplot('{}1{}'.format(len(shots), 1+i))
hbins = self.hbins
if self.hbins < 0:
# use explicit bins
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import<|fim▁hole|>from .read_only import ReadOnlyCell<|fim▁end|> | # Copyright (c) 2010-2017 openpyxl
from .cell import Cell, WriteOnlyCell |
<|file_name|>test_segmenttail.py<|end_file_name|><|fim▁begin|>'''<|fim▁hole|>
from mock import Mock
from fakelargefile.segmenttail import OverlapSearcher
def test_index_iter_stop():
os = OverlapSearcher("asdf")
segment = Mock()
segment.start = 11
try:
os.index_iter(segment, stop=10).next()
... | Created on Nov 10, 2014
@author: lauritz
''' |
<|file_name|>helpers.cpp<|end_file_name|><|fim▁begin|>#include <string.h>
#include <sys/time.h>
#include <sys/resource.h>
///////////////////////////////////////
// Function: trim - Remove "\n" //
///////////////////////////////////////
int trim(char *line) {
int end_pos = strlen(line) - 1;
if (line[end_pos... | // Function: get_time_cpu - Get CPU time //
///////////////////////////////////////////////////////
|
<|file_name|>animation.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/. */
//! CSS transitions and animations.
use clock_ticks;
use f... |
let animation_state;
if rw_data.running_animations.is_empty() {
animation_state = AnimationState::NoAnimationsPresent; |
<|file_name|>file-upload.js<|end_file_name|><|fim▁begin|>const mtype = require('@lib/mediatype');
const model = require('@lib/model');
const fs = require('fs');
const mcdir = require('@lib/mcdir');
module.exports = function(r) {
const db = require('../db')(r);
async function addFileToDirectoryInProject(fileTo... | }
}
// findMatchingFileIdByChecksum will return the id of the file that |
<|file_name|>main.py<|end_file_name|><|fim▁begin|>def main(i):
ins = i.split("\n")
arr = [int(i) for i in ins]
index =0
iterations = 0
while (index>=0 and index < len(arr)):
arr[index], index = arr[index] + 1, index + arr[index];
iterations = iterations+1
print(iterations)
def main2(i):
ins = i... | -245
-746
-610
-855 |
<|file_name|>xensm.py<|end_file_name|><|fim▁begin|># Copyright (c) 2011 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://www.apache.org/license... |
def remove_export(self, context, volume):
"""Removes an export for a logical volume."""
pass |
<|file_name|>win_msg.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License... |
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'} |
<|file_name|>tag_ports_during_bulk_creation.py<|end_file_name|><|fim▁begin|># Copyright (c) 2019 Verizon Media
# 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
... | |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from models import Post, PostForm, Department
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404, render, redirect
from django.template.loader import render_to_string
import os
from d... | def contribute(request): |
<|file_name|>feature-gate-const_eval_limit.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>//~^ ERROR the `#[const_eval_limit]` attribute is an experimental feature [E0658]
const CONSTANT: usize = limit();
fn main() {
assert_eq!(CONSTANT, 1764);
}
const fn limit() -> usize {
let x = 42;
x * 42
}<|fim▁end|> | #![const_eval_limit="42"] |
<|file_name|>segos_mv.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
'''
FanFilm Add-on
Copyright (C) 2016 mrknow
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either ... | return sources |
<|file_name|>ShapefileIndexReader.py<|end_file_name|><|fim▁begin|>"""
This script exposes a class used to read the Shapefile Index format
used in conjunction with a shapefile. The Index file gives the record
number and content length for every record stored in the main shapefile.
This is useful if you need to extract s... | The 'shx' object will expose three properties |
<|file_name|>Shannon.py<|end_file_name|><|fim▁begin|># This script will calculate Shannon entropy from a MSA.
# Dependencies:
# Biopython, Matplotlib, Math
"""
Shannon's entropy equation (latex format):
H=-\sum_{i=1}^{M} P_i\,log_2\,P_i
Entropy is a measure of the uncertainty of a probability distribution (p... | # Function to calcuate the Shannon's entropy per alignment column
# H=-\sum_{i=1}^{M} P_i\,log_2\,P_i (http://imed.med.ucm.es/Tools/svs_help.html) |
<|file_name|>httpapi.py<|end_file_name|><|fim▁begin|># (c) 2018 Red Hat Inc.
# 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)
__metaclass__ = type
DOCUMENTATION = """
---
author: Ansible Networking Team
conn... | |
<|file_name|>MapManager.js<|end_file_name|><|fim▁begin|>//Create an event node
var Event = (function($) { return function(properties) {
this.properties = properties;
this.blip = null;
this.listing = null;
this.className = properties.event_type_name.replace(/[^\w]/ig,"-").toLowerCase();
thi... | // eventsList = originalEventList.filter(function(eventItem) {
// var unmatch = $(eventItem.properties.filters).not(filters); |
<|file_name|>ListGroupItem.d.ts<|end_file_name|><|fim▁begin|>import * as React from 'react';
import { CSSModule } from './index';
export interface ListGroupItemProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ElementType;
active?: boolean;
disabled?: boolean;
color?: string;
... | |
<|file_name|>benches.rs<|end_file_name|><|fim▁begin|>#![feature(plugin,test)]
#![plugin(power_assert)]
extern crate ip2location;
extern crate test;
use ip2location::Ip2Location;<|fim▁hole|>use test::Bencher;
#[bench] fn ip2country (bencher: &mut Bencher) {
let ip2location = Ip2Location::open ("/usr/share/ip2locati... | |
<|file_name|>parserTest.py<|end_file_name|><|fim▁begin|>import unittest
from rmgpy.molecule.molecule import Molecule
from .parser import *
class ParserTest(unittest.TestCase):
def test_fromAugmentedInChI(self):
aug_inchi = 'InChI=1S/CH4/h1H4'
mol = fromAugmentedInChI(Molecule(), aug_inchi)
... | self.assertTrue(atom in rdAtomIndices) |
<|file_name|>OglofusProtectionStaff.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2014-2015 Nikos Grammatikos
*
* 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
*
* https://raw.git... | import java.util.Iterator; |
<|file_name|>access.py<|end_file_name|><|fim▁begin|>"""Accessors for Amber TI datasets.
"""
from os.path import dirname, join
from glob import glob
from .. import Bunch
def load_bace_improper():
"""Load Amber Bace improper solvated vdw example
Returns
-------
data: Bunch
Dictionary-like o... | ------- |
<|file_name|>size.py<|end_file_name|><|fim▁begin|># ============================================================================
# FILE: size.py
# AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com>
# License: MIT license
# ============================================================================
from defx.base.c... | |
<|file_name|>TrueRangeValueSource.java<|end_file_name|><|fim▁begin|>/*
###############################
# Copyright (C) 2012 Jon Schang
#
# This file is part of jSchangLib, released under the LGPLv3
#
# jSchangLib is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Pu... | atr = diffCurHighPrevClose > atr ? diffCurHighPrevClose : atr;
atr = diffCurLowPrevClose > atr ? diffCurLowPrevClose : atr;
return atr; |
<|file_name|>visuals.js<|end_file_name|><|fim▁begin|>var map, layer, districtLayer;
var projectAPIKey = 'AIzaSyDdCELFax8-q-dUCHt9hn5Fbf_7ywY6yvA';// Personal Account
// var citiesTableID = '1CU4KNOJYGWoCkUZWrxgvleGq-k6PFFUO6qfqTCid';
var citiesTableID = '1cKfYbbWs6JJujJPk-lJfdBLWVaRRSMxfXNx6K6_y';... | if (attributeNameX.indexOf("C-") > -1) {
generateReportQuery = "SELECT '" + attributeNameY + "','Annual Target','C-Target','C-Achievement','C-Achievement (percentage)','C-Marks','Max Marks','C-Rank' " + generateReportQuery + " ORDER BY 'C-Rank' ASC";
} e... |
<|file_name|>matrix.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 The CGMath Developers. For a full listing of the authors,
// refer to the Cargo.toml file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except ... |
self[0][0] * m0.determinant() - |
<|file_name|>dns_string_io.py<|end_file_name|><|fim▁begin|>import struct
OK, EFORMAT, ESERVER, ENAME, ENOTIMP, EREFUSED = range(6)
IXFR, AXFR, MAILB, MAILA, ALL_RECORDS = range(251, 256)
IN, CS, CH, HS = range(1, 5)
from io import BytesIO
class Message:
"""
L{Message} contains all the information represented ... | body = body[:self.maxSize - self.headerSize]
byte3 = (( ( self.answer & 1 ) << 7 )
| ((self.opCode & 0xf ) << 3 ) |
<|file_name|>protocol.go<|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 ... | WriteFieldStop(ctx context.Context) error
WriteMapBegin(ctx context.Context, keyType TType, valueType TType, size int) error
WriteMapEnd(ctx context.Context) error
WriteListBegin(ctx context.Context, elemType TType, size int) error |
<|file_name|>instr_table.rs<|end_file_name|><|fim▁begin|>use crate::arch::cpu::Cpu;
use crate::arch::instrs::*;
use crate::utils::tls::Syncify;
use lazy_static::*;
use log::debug;
lazy_static! {
pub static ref INSTR_TABLE: Syncify<[Instr; 256]> = {
unsafe { Syncify::new ([
Instr::new(Box::new(others::brk),... | Instr::new(Box::new(cmp::absolute_y), "cmp::absolute_y", 3 ), // d9
Instr::new(Box::new(error_fn), "error_fn", 255 ), // da
Instr::new(Box::new(error_fn), "error_fn", 255 ), // db
Instr::new(Box::new(error_fn), "error_fn", 255 ), // dc |
<|file_name|>signals.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
<|fim▁hole|>from blinker import Namespace
namespace = Namespace()
#: Trigerred when a dataset is published
on_dataset_published = namespace.signal('on-dataset-published')<|fim▁end|> | |
<|file_name|>http_client.py<|end_file_name|><|fim▁begin|>import os
import sys
import textwrap
import warnings
from stripe import error, util
# - Requests is the preferred HTTP library
# - Google App Engine has urlfetch
# - Use Pycurl if it's there (at least it verifies SSL certs)
# - Fall back to urllib2 with a warn... | try:
result = urlfetch.fetch(
url=url,
method=method, |
<|file_name|>graft.js<|end_file_name|><|fim▁begin|>'use strict';
<|fim▁hole|>var Transform = require('readable-stream').Transform;
var inherits = require('inherits');
var deepMatch = require('./lib/deepMatch');
var wrap = require('./lib/wrapMessage');
var jschan = require('jschan');
function noop() {}
functi... | |
<|file_name|>JythonAbacus.py<|end_file_name|><|fim▁begin|>#
# Copyright 2006 The Apache Software Foundation<|fim▁hole|>#
# 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.apach... | |
<|file_name|>redmine_backend.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from redmine import Redmine
from feedbacks import settings
from base import IBackend
<|fim▁hole|>class RedmineBackend(IBackend):
def __init__(self):
self.redmine = Redmine(settings.DJFEEDBACK_REDMINE_URL,
... | |
<|file_name|>step_defs.js<|end_file_name|><|fim▁begin|>/* eslint-disable no-undef */
const cukeBtnSubmit = '//button[@data-cuke="save-item"]';
const cukeInpSize = '//input[@data-cuke="size"]';
const cukeInpTitle = '//input[@data-cuke="title"]';
const cukeInpContent = '//textarea[@data-cuke="content"]';
const cukeS... | |
<|file_name|>click_report.test.js<|end_file_name|><|fim▁begin|>import * as chai from 'chai';
const expect = chai.expect;
const chaiAsPromised = require('chai-as-promised');
import * as sinon from 'sinon';
import * as sinonAsPromised from 'sinon-as-promised';
import { ClickReport } from '../src/models/click_report';
ch... | expect(args[1]).to.have.property('TableName', tableName); |
<|file_name|>UnitAuraProcHandler.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either versio... | |
<|file_name|>eggfunctions.py<|end_file_name|><|fim▁begin|>"""Some eastereggs just for fun"""
from utils import Filehandler
class EasterEggFunctions(object):
"""Easter Egg functions"""
def __init__(self):
self.fhandler = Filehandler()
<|fim▁hole|> def darkwing(self, channel, callback, msg=None, nck... | |
<|file_name|>TestSystemPropertiesInvariantRule.java<|end_file_name|><|fim▁begin|>package org.apache.lucene.util.junitcompat;
/*
* 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 regardin... | Assert.assertTrue(runClasses.getFailures().get(0).getMessage()
.contains(PROP_KEY1));
Assert.assertNull(System.getProperty(PROP_KEY1)); |
<|file_name|>TitleProvider.java<|end_file_name|><|fim▁begin|>package com.nvapp.android.libs.view;
public interface TitleProvider {
/**
* Returns the title of the view at position<|fim▁hole|> *
* @param position
* @return
*/
public String getTitle(int position);
}<|fim▁end|> | |
<|file_name|>MultiValue.cpp<|end_file_name|><|fim▁begin|>/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Copyright (c) 2014-2020 The plumed team
(see the PEOPLE file at the root of the distribution for a list of names)
See http://www.plumed.org for more information.
This file ... | }
} |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>default_app_config = 'comet.apps.CometIndicatorConfig'<|fim▁end|> | |
<|file_name|>noteGroup.js<|end_file_name|><|fim▁begin|>var pulse = pulse || {};<|fim▁hole|>
model: pulse.Note,
});<|fim▁end|> |
pulse.NoteGroup = Backbone.Collection.extend({ |
<|file_name|>_peer_express_route_circuit_connections_operations.py<|end_file_name|><|fim▁begin|># coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root fo... | return ItemPaged(
get_next, extract_data
)
list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections'} # type: ignore |
<|file_name|>read.rs<|end_file_name|><|fim▁begin|>extern crate rss;
use std::collections::HashMap;
use rss::Channel;
use rss::extension::Extension;
use rss::extension::dublincore::DublinCoreExtension;
fn get_extension_values<'a>(
map: &'a HashMap<String, Vec<Extension>>,
key: &str,
) -> Option<Vec<&'a str>> ... | .items()
.get(0) |
<|file_name|>mspdb.cpp<|end_file_name|><|fim▁begin|>// Convert DMD CodeView debug information to PDB files
// Copyright (c) 2009-2010 by Rainer Schuetze, All Rights Reserved
//
// License for redistribution is given by the Artistic License 2.0
// see file LICENSE for further details
#include "mspdb.h"
#includ... | char* mspdb100_dll = "mspdb100.dll";
bool mspdb::DBI::isVS10 = false;
|
<|file_name|>AnsiSqlDomServiceUnitTests.java<|end_file_name|><|fim▁begin|>// Wildebeest Migration Framework
// Copyright © 2013 - 2018, Matheson Ventures Pte Ltd
//
// This file is part of Wildebeest
//
// Wildebeest is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public... | |
<|file_name|>kinesis.rs<|end_file_name|><|fim▁begin|>#![cfg(feature = "kinesis")]
<|fim▁hole|>extern crate rusoto;
use rusoto::kinesis::{KinesisClient, ListStreamsInput};
use rusoto::{DefaultCredentialsProvider, Region};
#[test]
fn should_list_streams() {
let credentials = DefaultCredentialsProvider::new().unwrap... | |
<|file_name|>ProvisionerCli.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2008-2015, Hazelcast, 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
*
* htt... | provisioner.terminate();
} else {
printHelpAndExit(cli.parser);
} |
<|file_name|>orders.server.routes.js<|end_file_name|><|fim▁begin|>'use strict';
module.exports = function(app) {
var users = require('../../app/controllers/users.server.controller');
var orders = require('../../app/controllers/orders.server.controller');
// Orders Routes
app.route('/orders')
.get(orders.list)
... | .get(orders.read)
.put(users.requiresLogin, orders.hasAuthorization, orders.update) |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod workbook;
use std::os::raw::c_char;
use std::ffi::CStr;
use std::str;
#[link(name = "xlsreader")]
extern {<|fim▁hole|> let c_string = unsafe { CStr::from_ptr(xls_getVersion()) };
str::from_utf8(c_string.to_bytes()).unwrap().to_string()
}<|fim▁end|> | fn xls_getVersion() -> *const c_char;
}
pub fn version() -> String { |
<|file_name|>view.rs<|end_file_name|><|fim▁begin|>use std::{
boxed::Box,
collections::VecDeque,
os::raw::*,
slice, str,
sync::{Arc, Mutex, Weak},
};
use cocoa::{
appkit::{NSApp, NSEvent, NSEventModifierFlags, NSEventPhase, NSView, NSWindow},
base::{id, nil},
foundation::{NSInteger, NSPo... | decl.add_method(
sel!(validAttributesForMarkedText),
valid_attributes_for_marked_text as extern "C" fn(&Object, Sel) -> id, |
<|file_name|>parse_args.py<|end_file_name|><|fim▁begin|>"""
atomorder/parse_args.py
Parses command line arguments and overwrites setting defaults
"""
from . import settings
import argparse
import sys
description = ""
epilog = ""
parser = argparse.ArgumentParser(
description = description,
formatter_... | parser.add_argument('--print-level', help='Print-level - 0: quiet, 1: results and errors, 2: +warnings, 3: +progress, 4: excess, 5: EXTREME',
action='store', choices = range(0,6), default=1, type=int)
parser.add_argument('-f', '--format', help='File format', type=str, action='store... |
<|file_name|>tasks_for_notebook.py<|end_file_name|><|fim▁begin|>import os
import json
import pandas
import numpy
from IPython.display import HTML
from datetime import datetime
import pandas_highcharts.core
title_name = 'Tasks'
file_name = 'tasks.csv'
css_dt_name = '//cdn.datatables.net/1.10.12/css/jquery.dataTables.mi... | data = read_task()
data = data[data['status'] != 'done']
return render_task(data)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.