prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>VectCollection.py<|end_file_name|><|fim▁begin|># $Id$
#
# Copyright (C) 2005-2006 greg landrum and Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at th... | if not self.__vects: |
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main
import (
"flag"
"fmt"
"image/png"
"math"
"os"
"runtime"
)
const (
MAX_DIST = 1999999999
PI_180 = 0.017453292
SMALL = 0.000000001
)
func calcShadow(r *Ray, collisionObj int) float64 {
shadow := 1.0 //starts with no shadow
for i, obj := ran... | |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.<|fim▁hole|>// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be c... | //
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license |
<|file_name|>building.rs<|end_file_name|><|fim▁begin|>use std::iter;
use crate::descriptor::field_descriptor_proto;
use crate::descriptor::DescriptorProto;
use crate::descriptor::EnumDescriptorProto;
use crate::descriptor::FieldDescriptorProto;
use crate::descriptor::FileDescriptorProto;
use crate::reflect::error::Ref... | panic!(
"enum not found: {}, in files: {}",
full_name,
self.all_files_str() |
<|file_name|>defaults.py<|end_file_name|><|fim▁begin|>from draftjs_exporter.constants import BLOCK_TYPES, INLINE_STYLES
from draftjs_exporter.dom import DOM
from draftjs_exporter.types import Element, Props
def render_children(props: Props) -> Element:
"""
Renders the children of a component without any speci... | INLINE_STYLES.SUPERSCRIPT: "sup",
INLINE_STYLES.SUBSCRIPT: "sub",
INLINE_STYLES.MARK: "mark",
INLINE_STYLES.QUOTATION: "q", |
<|file_name|>base64.cpp<|end_file_name|><|fim▁begin|>/* xoreos-tools - Tools to help with xoreos development
*
* xoreos-tools is the legal property of its developers, whose names
* can be found in the AUTHORS file distributed with this source
* distribution.
*
* xoreos-tools is free software; you can redistribute... | n += 6;
}
}
|
<|file_name|>representation.go<|end_file_name|><|fim▁begin|>package service
import (
"encoding/json"
"fmt"
)
type ServiceRepr interface {
Service() Service
Serialize() ([]byte, error)
}
// ParseServiceRepr attempts parse using each of the ReprParsers in turn. Returns the first
// result to not error, or the erro... |
func (v2 *V2ServiceRepr) Service() Service {
acl, _ := v2.Config["Acl"]
return Service{ |
<|file_name|>_pid_correction.py<|end_file_name|><|fim▁begin|>import torch
from deluca.lung.core import Controller, LungEnv
class PIDCorrection(Controller):
def __init__(self, base_controller: Controller, sim: LungEnv, pid_K=[0.0, 0.0], decay=0.1, **kwargs):
self.base_controller = base_controller
... | |
<|file_name|>require.js<|end_file_name|><|fim▁begin|>/* eslint strict:0 */
var modules = Object.create(null);
var inGuard = false;
function define(id, factory) {
modules[id] = {
factory,
module: {exports: {}},
isInitialized: false,
hasError: false,
};
if (__DEV__) { // HMR
Object.assign(modu... |
global.__d = define; |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for react-hammerjs 1.0
// Project: https://github.com/JedWatson/react-hammerjs#readme
// Definitions by: Jason Unger <https://github.com/jsonunger>
// Cecchi MacNaughton <https://github.com/cecchi>
// Definitions: https://github.co... | interface ReactHammerProps {
direction?:
| "DIRECTION_NONE" |
<|file_name|>group.rs<|end_file_name|><|fim▁begin|>#[cfg(feature = "yaml")]
use std::collections::BTreeMap;
use std::fmt::{Debug, Formatter, Result};
#[cfg(feature = "yaml")]
use yaml_rust::Yaml;
/// `ArgGroup`s are a family of related [arguments] and way for you to express, "Any of these
/// arguments". By placing a... | |
<|file_name|>vprorvq.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode};
use ::RegType::*;
use ::instruction_def::*;
use ::Operand::*;
use ::Reg::*;
use ::RegScale::*;
fn vprorvq_1() {
run_test(&Instruction { mnemonic: Mnemonic::VPRORVQ,... | |
<|file_name|>diff.py<|end_file_name|><|fim▁begin|>from gittle import Gittle
repo = Gittle('.')
lastest = [
info['sha']
for info in repo.commit_info()[1:3]
]
print(repo.diff(*lastest, diff_type='classic'))<|fim▁hole|>Last Diff
""")
print(list(repo.diff('HEAD')))<|fim▁end|> |
print("""
|
<|file_name|>0007_auto_20160628_1243.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):<|fim▁hole|>
operations = [
migrations.RemoveField(
model_name='trainesscourserec... |
dependencies = [
('training', '0006_auto_20160627_1620'),
] |
<|file_name|>linear_operator_full_matrix.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
#
# ... | These have the following meaning: |
<|file_name|>types_bytes_subscrstep.py<|end_file_name|><|fim▁begin|><|fim▁hole|>"""
categories: Types,bytes
description: Bytes subscr with step != 1 not implemented
cause: Unknown
workaround: Unknown
"""
print(b'123'[0:3:2])<|fim▁end|> | |
<|file_name|>views.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 (viewDescriptor.when) {
for (const key of viewDescriptor.when.keys()) { |
<|file_name|>test_sys_settrace.py<|end_file_name|><|fim▁begin|># Testing the line trace facility.
from test import test_support
import unittest
import sys
import difflib
import gc
# A very basic example. If this fails, we're in deep trouble.
def basic():
return 1
basic.events = [(0, 'call'),
... | _settrace_and_return(tracefunc)
settrace_and_return.events = [(1, 'return')]
|
<|file_name|>slides.js<|end_file_name|><|fim▁begin|>/*
Google HTML5 slides template
Authors: Luke Mahé (code)
Marcin Wichary (code and design)
Dominic Mazzoni (browser compatibility)
Charles Chen (ChromeVox support)
URL: http://code.google.com/p/html5slides/
*/
var PERMANENT_U... | } |
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms
from django.forms import ModelForm
from models import *
from django.forms import Textarea
from django.contrib.auth.hashers import make_password
from django.contrib.auth.models import Group
class OgretimElemaniFormu(ModelForm):<|fim▁hole|> ... | parolasi=forms.CharField(label="Parolasi",
help_text='Parola yazilmazsa onceki parola gecerlidir', |
<|file_name|>create.go<|end_file_name|><|fim▁begin|>package vnetpeering
import (
"context"
"fmt"
<|fim▁hole|> "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-11-01/network"
"github.com/giantswarm/microerror"
"github.com/giantswarm/operatorkit/v4/pkg/controller/context/reconciliationcanceledcontext"
... | |
<|file_name|>q3.go<|end_file_name|><|fim▁begin|>package main<|fim▁hole|>func main() {
for i := 1; i <= 100; i++ {
switch {
case i % 3 == 0 && i % 5 == 0:
fmt.Printf("FizzBuzz\n")
case i % 5 == 0:
fmt.Printf("Buzz\n")
case i % 3 == 0:
fmt.Printf("Fizz\n")
}
}
}<|fim▁end|> |
import "fmt"
// |
<|file_name|>cp-widget-datetimepicker-patch.directive.js<|end_file_name|><|fim▁begin|>/**
* Created by rg12 on 02/05/2016.
*/
/**
* @desc Add to uib-timepicker to fix timezone issues
* @example <uib-timepicker cp-widget-datetimepicker-patch></uib-timepicker>
*/
(function () {
'use strict';
angular
.modu... | |
<|file_name|>loudness.py<|end_file_name|><|fim▁begin|>import numpy as np
<|fim▁hole|>import nlpaug.model.spectrogram as nms
class LoudnessAug(SpectrogramAugmenter):
"""
Augmenter that change loudness on mel spectrogram by random values.
:param tuple zone: Default value is (0.2, 0.8). Assign a zone for au... | from nlpaug.augmenter.spectrogram import SpectrogramAugmenter
from nlpaug.util import Action |
<|file_name|>test_unquote.py<|end_file_name|><|fim▁begin|># coding: utf-8
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>
#
# 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 as published by
# the Free Software Fo... | __metaclass__ = type |
<|file_name|>opie-login.ts<|end_file_name|><|fim▁begin|><!DOCTYPE TS><TS>
<context>
<name>Calibrate</name>
<message>
<source>Touch the crosshairs firmly and
accurately to calibrate your screen.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>L... | <source><center>Welcome to OPIE</center></source>
<translation type="unfinished"></translation>
</message> |
<|file_name|>boot.go<|end_file_name|><|fim▁begin|>// Copyright 2017-2022 The Usacloud Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LIC... | if err != nil {
errs = append(errs, err) |
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|>var lib = require(path.join(__dirname, '/lib'))
module.exports = lib<|fim▁end|> | var path = require('path') |
<|file_name|>cube.rs<|end_file_name|><|fim▁begin|>pub const VERTEX: &'static str = r#"
#version 150
in uint face;
in uvec3 pos;
in vec3 corner;
void main() {
gl_Position = vec4(corner + pos, 1.0);
}
"#;
pub const GEOMETRY: &'static str = r#"
... | |
<|file_name|>issue-63226.rs<|end_file_name|><|fim▁begin|>pub struct VTable{
state:extern "C" fn(),
}
impl VTable{
pub const fn vtable()->&'static VTable{
Self::VTABLE
}
const VTABLE: &'static VTable =<|fim▁hole|>}
extern "C" fn state() {}<|fim▁end|> | &VTable{state}; |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>default_app_config = 'wagtail_commons.core.apps.WagtailCommonsCoreConfig'<|fim▁end|> | |
<|file_name|>kptdocumentseditor.cpp<|end_file_name|><|fim▁begin|>/* This file is part of the KDE project
Copyright (C) 2007, 2012 Dag Andersen danders@get2net>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the F... | |
<|file_name|>Selection.cpp<|end_file_name|><|fim▁begin|>/**
* \file IMP/atom/Selection.cpp
* \brief Select a subset of a hierarchy.
*
* Copyright 2007-2017 IMP Inventors. All rights reserved.
*
*/
#include "IMP/atom/hierarchy_tools.h"
#include <IMP/SingletonContainer.h>
#include <IMP/algebra/vector_generators... | IMP_NEW(core::TableRefiner, tr, ());
ParticlesTemp rps;
for (unsigned int i = 0; i < s.size(); ++i) {
ParticlesTemp ps = s[i].get_selected_particles(); |
<|file_name|>parser.py<|end_file_name|><|fim▁begin|>"""The vimdoc parser."""
from vimdoc import codeline
from vimdoc import docline
from vimdoc import error
from vimdoc import regex
def IsComment(line):
return regex.comment_leader.match(line)
def IsContinuation(line):
return regex.line_continuation.match(line)... |
def ParseCommentLine(line):
"""Parses one line of documentation and creates the appropriate DocLine."""
block = regex.block_directive.match(line) |
<|file_name|>battery-charge.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | import * as React from 'react';
import { IconBaseProps } from 'react-icon-base';
export default class TiBatteryCharge extends React.Component<IconBaseProps> { } |
<|file_name|>helper_random.py<|end_file_name|><|fim▁begin|>import os
from pyelliptic.openssl import OpenSSL
def randomBytes(n):
try:<|fim▁hole|> return OpenSSL.rand(n)<|fim▁end|> | return os.urandom(n)
except NotImplementedError: |
<|file_name|>JsHdrAccess.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright (c) 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public Li... | * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: |
<|file_name|>test.rs<|end_file_name|><|fim▁begin|>extern crate rimd;
use rimd::{SMF,SMFError};
use std::env::{args,Args};
use std::path::Path;
fn main() {
let mut args: Args = args();
args.next();
let pathstr = match args.next() {
Some(s) => s,
None => { panic!("Please pass a path to an SM... | println!(" {}",event.fmt_with_time_offset(time));
time += event.vtime;
} |
<|file_name|>test_artificial_1024_Quantization_PolyTrend_30__0.py<|end_file_name|><|fim▁begin|>import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
<|fim▁hole|><|fim▁end|> |
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 30, transform = "Quantization", sigma = 0.0, exog_count = 0, ar_order = 0); |
<|file_name|>ascii.hpp<|end_file_name|><|fim▁begin|>/* HexChat
* Copyright (C) 1998-2010 Peter Zelezny.<|fim▁hole|> * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the Lic... | * Copyright (C) 2009-2013 Berke Viktor.
* |
<|file_name|>privatestorage.cpp<|end_file_name|><|fim▁begin|>#include "privatestorage.h"
#include <definitions/namespaces.h>
#include <definitions/stanzahandlerorders.h>
#include <utils/options.h>
#include <utils/stanza.h>
#include <utils/logger.h>
#define PRIVATE_STORAGE_TIMEOUT 30000
#define SHC_NO... | |
<|file_name|>cancel-clean-via-immediate-rvalue-ref.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
//... | #![feature(box_syntax)] |
<|file_name|>config.js<|end_file_name|><|fim▁begin|>'use strict';
var nconf = require('nconf');
var path = require('path');
/**
* Handle the configuration management.
*
* @constructor
*/
function Config() {
nconf.argv().env("_");<|fim▁hole|> nconf.file(environment, {file: path.resolve(__dirname, '../config/' +... | var environment = nconf.get("NODE:ENV") || "development"; |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>__author__ = 'mwn'
import os
import sys
import logging
from logging.handlers import RotatingFileHandler
from flask import Flask, render_template
app = Flask(__name__)
app.config.from_object('config')
handler = RotatingFileHandler('yapki.log', maxBytes=10000, back... | |
<|file_name|>galeranotify.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#
# Script to send email notifications when a change in Galera cluster membership
# occurs.
#
# Complies with http://www.codership.com/wiki/doku.php?id=notification_command
#
# Author: Gabe Guillen <gabeguillen@outlook.com>
# Version: 1.5
# Rel... | sys.exit()
elif opt in ("--status"):
message_obj.set_status(arg)
elif opt in ("--uuid"): |
<|file_name|>aggregate_ordering.rs<|end_file_name|><|fim▁begin|>use crate::expression::functions::sql_function;
use crate::sql_types::{IntoNullable, SingleValue, SqlOrd, SqlType};
pub trait SqlOrdAggregate: SingleValue {
type Ret: SqlType + SingleValue;
}
impl<T> SqlOrdAggregate for T
where<|fim▁hole|>}
sql_func... | T: SqlOrd + IntoNullable + SingleValue,
T::Nullable: SqlType + SingleValue,
{
type Ret = T::Nullable; |
<|file_name|>build_kfont.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#-*- coding: ascii -*-
from __future__ import print_function
import sys
from blib_util import *
def build_kfont(build_info):
for compiler_info in build_info.compilers:
<|fim▁hole|>
if __name__ == "__main__":
cfg = cfg_from_argv... | build_a_project("kfont", "kfont", build_info, compiler_info, True)
|
<|file_name|>jshint_runner.js<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2011-2014 YY Digital Pty Ltd. All Rights Reserved.
* Please see the LICENSE file included with this distribution for details.
*/
var jshint = require("jshint").JSHINT,
logger = require("../../server/logger"),
fs = require("fs"),
... | |
<|file_name|>EntityMob.java<|end_file_name|><|fim▁begin|>package net.minecraft.entity.monster;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttri... | |
<|file_name|>caffe.cpp<|end_file_name|><|fim▁begin|>#include <string>
#include <vector>
#include <TH/TH.h>
#include "caffe/caffe.hpp"
extern "C"
{
void init(void* handle[1], const char* param_file, const char* model_file, const char* phase);
void do_forward(void* handle[1], THFloatTensor* bottom, THFloatTensor* outp... | |
<|file_name|>overuse_frame_detector.cc<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual proper... | const float kInitialSampleDiffMs;
const CpuOveruseOptions options_; |
<|file_name|>mupen64plus.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os
from lutris import settings
from lutris.runners.runner import Runner
class mupen64plus(Runner):
"""Nintendo 64 emulator"""
human_name = "Mupen64Plus"
platform = "Nintendo 64"
game_options = [{
'option': ... | 'label': 'ROM file',
'help': ("The game data, commonly called a ROM image.") |
<|file_name|>system-prompt.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from __future__ import unicode_literals
from prompt_toolkit import prompt
if __name__ == '__main__':
print('If you press meta-! or esc-! at the following prompt, you can enter system commands.')<|fim▁hole|> answer = prompt('Give m... | |
<|file_name|>other.py<|end_file_name|><|fim▁begin|>"""<|fim▁hole|>
Just export lexer classes previously contained in this module.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexers.sql import SqlLexer, MySqlLexer, SqliteConso... | pygments.lexers.other
~~~~~~~~~~~~~~~~~~~~~ |
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>use std::ffi::OsString;
use std::fmt;
use std::io;
use std::path::PathBuf;
#[derive(Debug)]
pub enum ExpectedNumberOfArgs {
Single(usize),
Range(usize, usize),
}
impl fmt::Display for ExpectedNumberOfArgs {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt... | // Note: Use Box<Error> instead of Error to reduce size of Result<T> |
<|file_name|>test_authentication.py<|end_file_name|><|fim▁begin|>from django.conf import settings
from django.contrib.auth import get_user_model
from django.core.cache import cache
from django.urls import reverse
from django.utils import timezone
from freezegun import freeze_time
from rest_framework import status, test... | self.assertEqual(response.status_code, status.HTTP_200_OK)
token = response.data['token'] |
<|file_name|>clickjacking.py<|end_file_name|><|fim▁begin|>"""
Clickjacking Protection Middleware.
This module provides a middleware that implements protection against a
malicious site loading resources from your site in a hidden frame.
"""
from django.conf import settings
class XFrameOptionsMiddleware(object):
... | By default this uses the value from the X_FRAME_OPTIONS Django
secure. If not found in secure, defaults to 'SAMEORIGIN'. |
<|file_name|>install.py<|end_file_name|><|fim▁begin|>"""Treadmill bootstrap module.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import io
import errno
import json
import logging
import os
import sys
import sub... | |
<|file_name|>json_pref_store.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 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.
#include "base/prefs/json_pref_store.h"
#include <algorithm>
#include "base/bind.h"
#in... | void ReadFileAndReport(const base::FilePath& path) {
DCHECK(sequenced_task_runner_->RunsTasksOnCurrentThread()); |
<|file_name|>default.rs<|end_file_name|><|fim▁begin|>use value::Value;
pub fn apply(input: Option<Box<Value>>, arg: &str) -> Option<Box<Value>> {
match input {<|fim▁hole|> None => Some(Box::new(arg.to_string())),
}
}<|fim▁end|> | Some(content) => Some(content), |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2017 Mycroft AI 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
#
# Un... | |
<|file_name|>bootstrap-datepicker.it.js<|end_file_name|><|fim▁begin|>/**
* Italian translation for bootstrap-datepicker
* Enrico Rubboli <rubboli@gmail.com><|fim▁hole|>;(function($){
$.fn.datepicker.dates['it'] = {
days: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato", "Domenica"],
... | */ |
<|file_name|>registry.py<|end_file_name|><|fim▁begin|># Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | # See the License for the specific language governing permissions and
# limitations under the License.
|
<|file_name|>note.ts<|end_file_name|><|fim▁begin|>export interface INote {
NotesID: number;
DealID: number;
UserID: number;
NotesDate: string;
Notes: string;
Title: string;
ActionableNoteStatus: boolean;<|fim▁hole|>}<|fim▁end|> | IsSubmitted: boolean;
NoteType: string;
isActivated: boolean; |
<|file_name|>digest.py<|end_file_name|><|fim▁begin|># -*- test-case-name: twisted.web.test.test_httpauth -*-
# Copyright (c) 2009 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Implementation of RFC2617: HTTP Digest Authentication
@see: U{http://www.faqs.org/rfcs/rfc2617.html}
"""
<|fim▁hole|>class Diges... | from zope.interface import implements
from twisted.cred import credentials
from twisted.web.iweb import ICredentialFactory
|
<|file_name|>zh-CN.js<|end_file_name|><|fim▁begin|>export default {
forward: "转发",
reply: "回复",
ignore: "忽略",
toVoicemail: "到语音信箱",
answer: "接听",
answerAndEnd: "接听并结束",
answerAndHold: "接听并保持"
};
// @key: @#@"forward"@#@ @source: @#@"Forward"@#@
// @key: @#@"reply"@#@ @source: @#@"Reply"@#@<|fim▁hole|>// ... | // @key: @#@"ignore"@#@ @source: @#@"Ignore"@#@ |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from flask import Flask
from flask.ext.bootstrap import Bootstrap
from flask.ext.mail import Mail
from flask.ext.moment import Moment
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
from flask.ext.pagedown import PageDown
from co... | |
<|file_name|>Error404.ts<|end_file_name|><|fim▁begin|>import * as express from "express";
import {Route} from "../src/Route";
import {NextFunction, Request, Response} from "express-serve-static-core";
import {ErrorCode} from "../src/ErrorCodes";
import Socket = SocketIO.Socket;
export default class Error404Route exten... | const err: any = new Error('Not Found');
err.status = 404; |
<|file_name|>GetAuditData.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2014 Richard Thurston.
*
* Licensed under the Apache License, Version 2.0 (the "License");<|fim▁hole|> *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASI... | * 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 |
<|file_name|>foo-test.js<|end_file_name|><|fim▁begin|>/* jshint expr:true */
import Ember from 'ember';
const {
run
} = Ember;
import { expect } from 'chai';
import { describeModel, it } from 'ember-mocha';
import { beforeEach } from 'mocha';
let store;
let m;
describeModel(
'parent',
'Unit | Model | foo',
... | m = "Parent should be dirty after updating an attribute on itself";
expect(parent.get('hasDirtyAttributes'), m).true; |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
import operator
import sys
from collections import OrderedDict
from functools import reduce
from django import forms
from django.contrib.admin import FieldListFilter, widgets
from django.contrib.admin.exception... | for key, value in lookup_params.items():
lookup_params[key] = prepare_lookup_value(key, value) |
<|file_name|>outroTipoDeProducaoBibliografica.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# encoding: utf-8
# filename: outroTipoDeProducaoBibliografica.py
#
# scriptLattes V8
# Copyright 2005-2013: Jesús P. Mena-Chalco e Roberto M. Cesar-Jr.
# http://scriptlattes.sourceforge.net/
#
#
# Este programa é um sof... | # Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
|
<|file_name|>index.tsx<|end_file_name|><|fim▁begin|>import { modelProxy } from 'modelproxy'; //引入modelProxy
import mockjsEngine from './engines/mockjs';
import reactEngineObj, { reactEngine } from './engines/react';
const api1 = require('./configs/api1');
const api2 = require('./configs/api2');
const proxy = new mode... | |
<|file_name|>plugin.js<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @file Horizontal Page Break
*/
// Register a plugin named "pagebreak".
CKEDITOR.plugins.add( 'pagebreak... | {
|
<|file_name|>buildRoboFabDistroFromSVN.py<|end_file_name|><|fim▁begin|>"""
Build the zipped robofab + dependency distros for RoboFab.
Check out fresh copies of the code from SVN.
Compile into zips.
Write optional html page.
"""
import os, glob, time
def getRevision(url):
""" Ask svn fo... |
def buildProducts(products, buildFolder=None, deleteBuilds=False, verbose=True):
""" Build the different distro products. |
<|file_name|>main.ts<|end_file_name|><|fim▁begin|>import * as CreepManager from "./components/creeps/creepManager";
import * as Config from "./config/config";
<|fim▁hole|>// Any code written outside the `loop()` method is executed only when the
// Screeps system reloads your script.
// Use this bootstrap wisely. You ca... | import * as Profiler from "screeps-profiler";
import { log } from "./lib/logger/log";
|
<|file_name|>regression.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
"""
Program that parses standard format results,
compute and check regression bug.
:copyright: Red Hat 2011-2012
:author: Amos Kong <akong@redhat.com>
"""
import os
import sys
import re
import commands
import warnings
import ConfigParser
import... | avg2 = s2.getAvg(avg_update=avg_update)
sd2 = s2.getSD()
sd1 = s1.getSDRate([avg1, sd1]) |
<|file_name|>bitcoin_pl.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="pl" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Platinum</source>
<translation>O Platinum</tran... | <source>Generated but not accepted</source> |
<|file_name|>aboutdialog.cpp<|end_file_name|><|fim▁begin|>/*=========================================================================
== ==
== Rong is free software: you can redistribute it and/or modify ==
== it under the terms of the GNU ... | |
<|file_name|>search_bar.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { fetchWeather } from '../actions/index';<|fim▁hole|> constructor(props) {
super(props);
this.state = { term: '' };
... |
class SearchBar extends Component { |
<|file_name|>render.C<|end_file_name|><|fim▁begin|>// $Revision$ $Author$ $Date$
/*
Copyright (C) 2004 Kurt Schwehr
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2... | SoSeparator *sep = new SoSeparator; |
<|file_name|>enum.rs<|end_file_name|><|fim▁begin|>enum Opaque {
Foo(i32),
Bar,
}
#[repr(u64)]
enum A {
a1 = 0,
a2 = 2,
a3,
a4 = 5,
}
#[repr(u32)]
enum B {
b1 = 0,
b2 = 2,
b3,
b4 = 5,
}
#[repr(u16)]
enum C {
c1 = 0,
c2 = 2,
c3,
c4 = 5,
}
#[repr(u8)]
enum D {
... | }
|
<|file_name|>test_ols_sparse.py<|end_file_name|><|fim▁begin|>import unittest
import numpy as np
import pysal
import pysal.spreg as EC
from scipy import sparse
from pysal.common import RTOL
PEGP = pysal.examples.get_path
class TestBaseOLS(unittest.TestCase):
def setUp(self):
db = pysal.open(PEGP('columbus.... | |
<|file_name|>caboutdlg.cpp<|end_file_name|><|fim▁begin|>#include "caboutdlg.h"<|fim▁hole|> QDialog(parent),
ui(new Ui::CAboutDlg)
{
ui->setupUi(this);
initWnd();
initWidget();
initAction();
}
CAboutDlg::~CAboutDlg()
{
delete ui;
}
void CAboutDlg::mousePressEvent(QMouseEvent * ev)
{
QMou... | #include "ui_caboutdlg.h"
CAboutDlg::CAboutDlg(QWidget *parent) : |
<|file_name|>SankeyView.js<|end_file_name|><|fim▁begin|><|fim▁hole|> var SankeyShape = graphic.extendShape({
shape: {
x1: 0, y1: 0,
x2: 0, y2: 0,
cpx1: 0, cpy1: 0,
cpx2: 0, cpy2: 0,
extent: 0
},
buildPath: function (ctx, shape) {
... | var graphic = require('../../util/graphic');
var modelUtil = require('../../util/model');
var zrUtil = require('zrender/lib/core/util');
|
<|file_name|>enumvalues_4.js<|end_file_name|><|fim▁begin|>var searchData=
[
['nullvalue',['nullValue',['../namespaceJson.html#a7d654b75c16a57007925868e38212b4ea7d9899633b4409bd3fc107e6737f8391',1,'Json']]],
['numberofcommentplacement',['numberOfCommentPlacement',['../namespaceJson.html#a4fc417c23905b2ae9e2c47d197a4... | ]; |
<|file_name|>tree.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/. */
//! Traits that nodes must implement. Breaks the otherwise-cycli... | ) -> bool;
|
<|file_name|>[slug].json.ts<|end_file_name|><|fim▁begin|>import posts from "./_posts";
const lookup = new Map();
posts.forEach(post => {
lookup.set(post.slug, JSON.stringify(post));
});
export function get(req: any, res: any, next: any) {
// the `slug` parameter is available because
// this file is called... | res.writeHead(200, {
"Content-Type": "application/json"
});
|
<|file_name|>1.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pla
import numpy as np
def read_data(filename):
with open(filename, 'r') as infile:
X = []
y = []
for line in infile:
fields = line.strip().split()
X.append([float(x... | err = 0
for x, y in zip(X_test, y_test): |
<|file_name|>config.js<|end_file_name|><|fim▁begin|>// # Ghost Configuration
// Setup your Ghost install for various environments
var path = require('path'),
config;
config = {
// ### Development **(default)**
development: {
// The url to use when providing links to the site, E.g. in RSS and email... | url: 'http://127.0.0.1:2368', |
<|file_name|>syscall-counts-by-pid.py<|end_file_name|><|fim▁begin|># system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls call... | |
<|file_name|>DebuggerInterfaceRuby.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (c) 2007 - 2015 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing the Ruby debugger interface for the debug server.
"""
from __future__ import unicode_literals
import os
from PyQt5.QtCore impo... | |
<|file_name|>test_wsgiref.py<|end_file_name|><|fim▁begin|>from unittest import mock
from test import support
from test.test_httpservers import NoLogRequestHandler
from unittest import TestCase
from wsgiref.util import setup_testing_defaults
from wsgiref.headers import Headers
from wsgiref.handlers import BaseHandler, B... | |
<|file_name|>ColdDrink.java<|end_file_name|><|fim▁begin|>package creationalPattern.builder;
public abstract class ColdDrink implements Item {
<|fim▁hole|> }
public abstract float price();
}<|fim▁end|> | public Packing packing() {
return new Bottle(); |
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*-
from django.shortcuts import render
import models
# Create your views here.
class Pager(object):
def __init__(self,current_page):
self.current_page = current_page
@property
def start(self):
return (self.current_pag... | # # temp = '<a href="/user_list/?page=%d"> %d </a>' % (i,i)
# # page_str += temp
if all_page<=11: |
<|file_name|>cli.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
from datetime import datetime
import inspect
import json
import logging
import os
try:
import pkg_resources
except ImportError: # pragma: no cover
pkg_resources = None
import random
import re
import subprocess
import shutil... | @climax.argument('--memory', type=int, default=128, |
<|file_name|>generallayout.hpp<|end_file_name|><|fim▁begin|>/* -*- Mode: C++; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
/*
* generallayout.h
* Copyright (C) 2015 Dejardin Gilbert <dejarding@gmail.com>
*
* audio is free software: you can redistribute it and/or modify it
* under the terms of the G... | |
<|file_name|>mat33.rs<|end_file_name|><|fim▁begin|>use super::Vec2;
use super::Vec3;
/// A 3-by-3 matrix. Stored in column-major order.
pub struct Mat33 {
pub ex: Vec3,
pub ey: Vec3,
pub ez: Vec3
}
impl Mat33 {
pub fn new() -> Mat33 {
Mat33 {
ex: Vec3::new(0.0, 0.0, 0.0),
... |
/// Solve A * x = b, where b is a column vector. This is more efficient
/// than computing the inverse in one-shot cases.
pub fn solve22(&self, b: Vec2) -> Vec2 { |
<|file_name|>test_page_breaks04.py<|end_file_name|><|fim▁begin|>###############################################################################
#<|fim▁hole|># SPDX-License-Identifier: BSD-2-Clause
# Copyright (c), 2013-2022, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
fr... | # Tests for XlsxWriter.
# |
<|file_name|>DiskSpaceMonitor.java<|end_file_name|><|fim▁begin|>/*
* The MIT License
*
* Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.