prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>quantized_ops_test.py<|end_file_name|><|fim▁begin|># Copyright 2015 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://ww... | |
<|file_name|>DictMaintFlag.js<|end_file_name|><|fim▁begin|>/**
* Created by hooxin on 14-10-10.
*/
/**
* 字典维护标志
*/
Ext.define('Techsupport.store.DictMaintFlag', {
extend: 'Ext.data.Store',<|fim▁hole|> fields: ['text', 'value'],
data: [
{text: '维护', value: 0},
{text: '停止维护', value: 1}
... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
This configuration file loads environment's specific config settings for the application.
It takes precedence over the config located in the boilerplate package.
"""
import os
if os.environ['HTTP_HOST'] == "appengine.beecoss.com":
# Load Boilerplate config... | else:
from config.testing import config |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/*
* Created on Sat Nov 13 2021
*
* Copyright (c) storycraft. Licensed under the MIT Licence.
*/
pub mod depth;
use std::{num::NonZeroU32, sync::Arc};
use euclid::{Point2D, Rect, Size2D};<|fim▁hole|>use wgpu::{
AddressMode, BindGroup, BindGroupDescriptor, Bind... | |
<|file_name|>file.js<|end_file_name|><|fim▁begin|>/*
* file.js: Transport for outputting to a local log file
*
* (C) 2010 Charlie Robbins
* MIT LICENCE
*
*/
var events = require('events'),
fs = require('fs'),
path = require('path'),
util = require('util'),
async = require('async'),
colors = r... | // used by this instance.
// |
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime<|fim▁hole|>
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Message'
db.create_table('firstclass_message', (
('key', self.gf('... | from south.db import db
from south.v2 import SchemaMigration
from django.db import models |
<|file_name|>test.ts<|end_file_name|><|fim▁begin|>// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/... | const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context); |
<|file_name|>configure.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
## ##
## Copyright 2011-2012, Neil Wallace <neil@openmolar.com... | ) |
<|file_name|>ParClassInstanceExpr.java<|end_file_name|><|fim▁begin|>package jastadd.soot.JastAddJ;
import java.util.HashSet;import java.util.LinkedHashSet;import java.io.File;import java.util.*;import jastadd.beaver.*;import java.util.ArrayList;import java.util.zip.*;import java.io.*;import java.io.FileNotFoundExceptio... | |
<|file_name|>vocab.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>use std::io::File;
use std::os;
use std::str::StrSlice;
fn main()
{
let args = os::args();
let path = Path::new(args[1].as_slice());
let mut file = BufferedReader::new(File::open(&path));
let mut counter: HashMap<String, uint> = HashMap::ne... | use std::collections::hashmap::{Occupied, Vacant, HashMap};
use std::io::BufferedReader; |
<|file_name|>Main.java<|end_file_name|><|fim▁begin|>/*
Copyright 2011 LinkedIn Corporation
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.... | request.addQuerystringParameter("facets", "location,industry"); |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from eventkit_cloud.settings.prod import * # NOQA
# Override settings here for test purposes.
TESTING = True
CELERY_ALWAYS_EAGER = True
BROKER_BACKEND = "memory"<|fim▁hole|>
PASSWORD_HASHERS = ("django.contrib.auth.hashers.MD5PasswordHasher",)<|fim▁end|> | |
<|file_name|>colour.rs<|end_file_name|><|fim▁begin|>use super::request::*;
use std::cmp::Ordering;
/// HSB colour representation - hue, saturation, brightness (aka value).
/// Aka HSV (LIFX terminology) - hue, saturation, value.
/// This is not the same as HSL as used in CSS.
/// LIFX uses HSB aka HSV, not HSL.
#[de... | blue: 0,
},
hsb: HSB { |
<|file_name|>api.test.js<|end_file_name|><|fim▁begin|>import request from 'supertest';
import low from 'lowdb';
import apiLoader from '../src/api.js';
import Car from '../../models/Car.js';
const freshDB = () => {
const fresh = low();
fresh.defaults({ cars: [] }).write();
return fresh;
};
describe('GET /api/car... | |
<|file_name|>rollout.go<|end_file_name|><|fim▁begin|>/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless... | |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>"""
Models for code snippets and related data.
Most of these models also have custom managers defined which add
convenient shortcuts for repetitive or common bits of logic; see
``managers.py`` in this directory.
"""
import datetime, re
from django.db import connect... | def save(self, *args, **kwargs):
if not self.id:
self.slug = slugify(self.name) |
<|file_name|>moc_ColorController.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************
** Meta object code from reading C++ file 'ColorController.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.1)
**
** WARNING! All changes made in this file w... | 0, 0, // properties |
<|file_name|>saved_messages.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {
PostOptions,
SettingsSidebar,
} from '@support/ui/component';
import {SearchResultPostScreen} from '@support/ui/screen';
class Sa... | |
<|file_name|>project_list.go<|end_file_name|><|fim▁begin|><|fim▁hole|> "github.com/goodmustache/pt/command/display"
)
//counterfeiter:generate . ProjectListActor
type ProjectListActor interface {
Projects() ([]actor.Project, error)
}
type ProjectList struct {
UserID uint64 `short:"u" long:"user-id" description:"Us... | package command
import (
"github.com/goodmustache/pt/actor" |
<|file_name|>bitcoin_th_TH.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="th_TH" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Harambecoin</s... | <translation type="unfinished"/>
</message>
<message>
<location line="+2"/> |
<|file_name|>buildconfigsetrecords.py<|end_file_name|><|fim▁begin|>__author__ = 'thauser'
from argh import arg
import logging
from pnc_cli import utils
from pnc_cli.swagger_client.apis import BuildconfigurationsetsApi
from pnc_cli.swagger_client.apis import BuildconfigsetrecordsApi
sets_api = BuildconfigurationsetsA... | return
return response.content |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The rust-pcre authors.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not... | |
<|file_name|>han_solo_lazer_gun.cpp<|end_file_name|><|fim▁begin|>#include <stdio.h>
#include <set>
#include <utility>
#include <vector>
using namespace std;
const int MAXN = 1e+2;
int n, x0, y0;
typedef pair<int, int> point;
set<point> s;
int cross(int x0, int y0, const point &a, const point &b) {
return (a.f... | dead[i] = true;
count++;
for (int j = i + 1; j < n; j++) { |
<|file_name|>f9847149153d_add_certifications_columns_to_slice.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 lice... | Create Date: 2021-11-03 14:07:09.905194 |
<|file_name|>admin-rejection-reason.module.js<|end_file_name|><|fim▁begin|>/*
* This program is part of the OpenLMIS logistics management information system platform software.
* Copyright © 2017 VillageReach
*
* This program is free software: you can redistribute it and/or modify it under the terms
* of the GNU Af... | */
(function() {
|
<|file_name|>Signal1.ts<|end_file_name|><|fim▁begin|>import Event = require('./Event');
/*
* Signal1
*
* 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, including ... | }
}
|
<|file_name|>product.ts<|end_file_name|><|fim▁begin|>module app.domain {
export interface IProduct{
productId: number;
productName: string;
productCode: string;
releaseDate: Date;
price: number;
description: string;
imageUrl: string;
//calculateDiscount(percent:number):number;
}
export class Produc... | }
calculateDiscount(percent:number):number{ |
<|file_name|>api_v1_1_tests.py<|end_file_name|><|fim▁begin|>import time
from proboscis.asserts import assert_equal
from proboscis.asserts import assert_not_equal
from proboscis.asserts import assert_false
from proboscis import SkipTest
from proboscis import test
from proboscis import before_class
from proboscis import... | from modules.amqp import AMQPWorker
from modules.worker import WorkerThread, WorkerTasks
from config.api1_1_config import *
from config.amqp import * |
<|file_name|>diagrammodel.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|>from harpia.system import System as System
class DiagramModel(object):
# ----------------------------------------------------------------------
def __init__(self):
self.last_id = 1 # first block is n1, increm... |
from harpia.model.connectionmodel import ConnectionModel as ConnectionModel |
<|file_name|>cache_aligned.rs<|end_file_name|><|fim▁begin|>use alloc::heap::{allocate, deallocate};
use std::fmt;<|fim▁hole|>const CACHE_LINE_SIZE: usize = 64;
unsafe fn allocate_cache_line(size: usize) -> *mut u8 {
allocate(size, CACHE_LINE_SIZE)
}
pub struct CacheAligned<T: Sized> {
ptr: Unique<T>,
}
impl<T... | use std::mem::size_of;
use std::ops::{Deref, DerefMut};
use std::ptr::{self, Unique};
|
<|file_name|>RfRequest.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2014 Ranjan Kumar
*
* 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/LICENS... | |
<|file_name|>choiceKeyFrameDialog.cpp<|end_file_name|><|fim▁begin|>/*
* choiceKeyFrameDialog.cpp - Keyframe selection for optioned properties
* Copyright (C) 2015, D Haley
* 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
... | ASSERT(choiceStrings.size());
|
<|file_name|>test_programs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Unit tests covering the program listing and detail pages.
"""
import json
import re
from urlparse import urljoin
from uuid import uuid4
import mock
from bs4 import BeautifulSoup
from django.conf import settings
from django.urls impo... | |
<|file_name|>treemap.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/license... | fn next(&mut self) -> Option<(K, V)> { |
<|file_name|>KHR_lights_punctual.ts<|end_file_name|><|fim▁begin|>import { Nullable } from "babylonjs/types";
import { Vector3 } from "babylonjs/Maths/math.vector";
import { Color3 } from 'babylonjs/Maths/math.color';
import { DirectionalLight } from "babylonjs/Lights/directionalLight";
import { PointLight } from "babyl... | const name = light.name || babylonMesh.name;
this._loader.babylonScene._blockEntityCollection = this._loader._forAssetContainer; |
<|file_name|>schema.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
#
#... | dict(name="platform-load", description='Platform Load'),
dict(name="software-version-refresh", description='Software Version Refresh'), ]) |
<|file_name|>Debug.cpp<|end_file_name|><|fim▁begin|>//===-- Debug.cpp - An easy way to add debug output to your code ----------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===---... | // errs() but this will never be invoked.
llvm::circular_raw_ostream &dbgout =
static_cast<circular_raw_ostream &>(llvm::dbgs()); |
<|file_name|>users.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from django import template
from django_users.forms import CreateUserForm
#from django.utils.translation import ugettext as _
register = template.Library()
@register.inclusion_tag('users/templatetags/registration.html', takes_context = True)
d... | 'form': form,
} |
<|file_name|>test_str.py<|end_file_name|><|fim▁begin|>from .. utils import TranspileTestCase, UnaryOperationTestCase, BinaryOperationTestCase, InplaceOperationTestCase
class StrTests(TranspileTestCase):
def test_setattr(self):
self.assertCodeExecution("""
x = "Hello, world"
x.attr ... | |
<|file_name|>dataplex_v1_generated_dataplex_service_update_lake_async.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... | |
<|file_name|>TaskForm.js<|end_file_name|><|fim▁begin|>import React, { Component, PropTypes } from 'react';
import ReactDOM from 'react-dom';
export default class TaskForm extends Component {
constructor(props, context) {
super(props, context);
this.state = {
text: this.props.text || ''
};
}
... | text: nextProps.text || '' |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate tinyexpr;
#[test]
fn check_basics() {
assert_eq!(tinyexpr::interp("2*2").unwrap(), 4.0);
assert_eq!(tinyexpr::interp("2+2").unwrap(), 4.0);
assert_eq!(tinyexpr::interp("3-2").unwrap(), 1.0);
assert_eq!(tinyexpr::interp("5%2").unwrap(), 1.0);... | |
<|file_name|>index.rs<|end_file_name|><|fim▁begin|>use std::c_str::CString;
use std::iter::Range;
use std::kinds::marker;
use std::mem;
use std::path::PosixPath;
use libc;
use {raw, Repository, Error, Tree, Oid, IndexAddOption, IndexTime};
/// A structure to represent a git [index][1]
///
/// [1]: http://git-scm.com... | |
<|file_name|>Stack.java<|end_file_name|><|fim▁begin|>package eu.cyfronoid.core.configuration.evaluator;
import java.util.ArrayDeque;
public class Stack extends ArrayDeque<Double> {
private static final long serialVersionUID = 1L;
@Override
public void push(Double v) {
super.push(v);
... |
@Override
|
<|file_name|>SubversionRepositoryAdaptor.java<|end_file_name|><|fim▁begin|>/*
* Vulcan Build Manager
* Copyright (C) 2005-2012 Chris Eldredge
*
* 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 Foundat... | return new RevisionTokenDto(revision, "r" + revision);
} |
<|file_name|>msm_sampled.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
__author__ = 'noe'
from pyemma._base.model import SampledModel
from pyemma.msm.models.msm import MSM
from pyemma.util.types import is_iterable
class SampledMSM(MSM, SampledModel):
def __init__(self, samples, ref=None,... | # self._ensure_sample_eigendecomposition(k=k, ncv=ncv)
# return np.std(self.sample_Ls, axis=0)
# |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Handle automations."""
# Copyright 2013-2017 The Home Assistant Authors
# https://github.com/home-assistant/home-assistant/blob/master/LICENSE.md
# This file was modified by The Camacq Authors.
import logging
from collections import deque
from functools import pa... | """Return True if all or any condition(s) pass.""" |
<|file_name|>meteo.model.ts<|end_file_name|><|fim▁begin|>export class Meteo {
constructor(
/* Stato del meteo. Es: 'Soleggiato' */
public descrizione: string,
/* Icona del meteo. */<|fim▁hole|> /* Temperatura attuale */
public temperatura: number,
/* Velocità del vento... | public icona: string,
/* Umidita presente nell'aria */
public umidita: number, |
<|file_name|>run.py<|end_file_name|><|fim▁begin|>import os, os.path
import subprocess
import shutil
import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-m", "--make", help="run make clean && make on all files",
action="store_true")
parser.add_argument("-c", "--check", ... | |
<|file_name|>test_init.py<|end_file_name|><|fim▁begin|>"""Tests for the DirecTV integration."""
from homeassistant.components.directv.const import DOMAIN
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
from tests.components.directv import setup_integration
from te... | ) -> None: |
<|file_name|>Plotting.py<|end_file_name|><|fim▁begin|># Name: Seline, Li, Taylor, Son
# Leap Motion project
import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D<|fim▁hole|>mpl.rcParams['legend.fontsize'] = 10
fig = plt.figure()
ax = Axes3D(fig)
theta = np.linspace(-4 * np.pi, 4 * np.pi, 100)
z = np.linspa... | import numpy as np
import matplotlib.pyplot as plt
import time
|
<|file_name|>test_results.py<|end_file_name|><|fim▁begin|>import gdsfactory as gf
import gdsfactory.simulation.gtidy3d as gt
from gdsfactory.config import CONFIG
from gdsfactory.simulation.gtidy3d.get_results import get_results
# def test_results_run(data_regression) -> None:
# """Run simulations and checks local ... | dirpath = CONFIG["sparameters"]
r = get_results(sim=sim, dirpath=dirpath, overwrite=True).result() |
<|file_name|>reduce.py<|end_file_name|><|fim▁begin|>"""This module provides an interface to the program Reduce.
Requires the reduce executable and reduce_wwPDB_het_dict.txt located
in a directory specified in global_settings. These can be downloaded
from: http://kinemage.biochem.duke.edu/software/reduce.php
For more ... | for path in path_list:
output_path = output_reduce(path, force=force)
if output_path: |
<|file_name|>multi_gpu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Multi-gpu code for Keras/TF.
From https://github.com/avolkov1/keras_experiments
"""
# MODIFIED. Inspiration taken from the ref link below.
# ref: https://raw.githubusercontent.com/kuza55/keras-extras/master/utils/multi_gpu.py @IgnorePep8... | |
<|file_name|>platform.js<|end_file_name|><|fim▁begin|>/*!
* Platform.js <http://mths.be/platform>
* Copyright 2010-2012 John-David Dalton <http://allyoucanleet.com/>
* Available under MIT license <http://mths.be/mit>
*/
;(function(window) {
/** Backup possible window/global object */
var oldWin = window,
/*... | hasKey = function(object, key) {
return object != null && hasOwnProperty.call(object, key); |
<|file_name|>SynExprSeq.java<|end_file_name|><|fim▁begin|>package AbsSytree;
import java.util.ArrayList;
public class SynExprSeq extends AbsSynNode {
public ArrayList<AbsSynNode> exprs;
public SynExprSeq(AbsSynNode e) {
this.exprs = new ArrayList<AbsSynNode>();
this.exprs.add(e);
}
public SynExp... | return visitor.visit(this);
}
|
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|>##############
# Standard #
##############<|fim▁hole|>##############
# External #
##############
import pytest
##############
# Module #
##############
import powermate
#Enable the logging level to be set from the command line
def pytest_addoption(parser):... | import io
import logging
import tempfile
|
<|file_name|>docu.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-docu',
templateUrl: './docu.component.html',
styleUrls: ['./docu.component.scss']
})
export class DocuComponent implements OnInit {
constructor() { }
ngOnInit() {
}<|... |
} |
<|file_name|>Wabei_BBBB_UHF.cc<|end_file_name|><|fim▁begin|>/*
*@BEGIN LICENSE
*
* PSI4: an ab initio quantum chemistry software package
*
* 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; ... | /** Z(mb,ei) <-- <mb||ei> **/
global_dpd_->buf4_init(&C, PSIF_CC_CINTS, 0, 30, 31, 30, 31, 0, "C <ia||jb> (ia,bj)");
global_dpd_->buf4_copy(&C, PSIF_CC_TMP0, "Z(mb,ei)"); |
<|file_name|>0004_copy_exif_data_to_model.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from django.contrib.gis.geos import geometry
from PIL import Image
from PIL.ExifTag... | |
<|file_name|>component.py<|end_file_name|><|fim▁begin|># ogf4py3
# Copyright (C) 2017 Oscar Triano @cat_dotoscat
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the ... | |
<|file_name|>arg_from_python.hpp<|end_file_name|><|fim▁begin|>// Copyright David Abrahams 2002.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef ARG_FROM_PYTHON_DWA2002128_HPP
# define ARG_FROM_PYTHON... | |
<|file_name|>aesdec.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode};<|fim▁hole|>use ::instruction_def::*;
use ::Operand::*;
use ::Reg::*;
use ::RegScale::*;
fn aesdec_1() {
run_test(&Instruction { mnemonic: Mnemonic::AESDEC, operand1:... | use ::RegType::*; |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup
setup(
name = 'voxgenerator',
packages = ['voxgenerator',
'voxgenerator.core',<|fim▁hole|> 'voxgenerator.control'],
version = '1.0.3',
description = 'Vox generator',
url = 'https://gith... | 'voxgenerator.plugin',
'voxgenerator.pipeline',
'voxgenerator.generator',
'voxgenerator.service', |
<|file_name|>CMinMTTRTest.java<|end_file_name|><|fim▁begin|><|fim▁hole|>import org.btrplace.model.Node;
import org.btrplace.model.VM;
import org.btrplace.model.constraint.Preserve;
import org.btrplace.model.constraint.SatConstraint;
import org.btrplace.model.view.ShareableResource;
import org.btrplace.plan.Reconfigurat... | package org.btrplace.scheduler.choco.constraint.mttr;
import org.btrplace.model.DefaultModel;
import org.btrplace.model.Model; |
<|file_name|>blacklist-test.cpp<|end_file_name|><|fim▁begin|>#include "loader/token.h"
#include "models/filtering/blacklist.h"
#include "catch.h"
TEST_CASE("Blacklist")
{
SECTION("ToString")
{
Blacklist blacklist;
blacklist.add("tag1");
blacklist.add(QStringList() << "tag2" << "tag3");
blacklist.add("tag4")... | QMap<QString, Token> tokensWithout; |
<|file_name|>manipulation-test.js<|end_file_name|><|fim▁begin|>/* global document */
import test from 'ava'
import { $ } from '../lib/traversal.js'
import { addClass, removeClass, css, chain } from '../lib/manipulation.js'
test.beforeEach(() => { document.body.innerHTML = '' })
/**
* addClass
*/
test('addClass',... | t.is(element.className, 'some-class')
}) |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
from setuptools import setup
setup(
name='SecFS',<|fim▁hole|> author_email='jon@thesquareplanet.com',
maintainer='MIT PDOS',
maintainer_email='pdos@csail.mit.edu',
url='https://github.com/mit-pdos/6.858-secfs',
packages=[... | version='0.1.0',
description='6.858 final project --- an encrypted and authenticated file system',
long_description= open('README.md', 'r').read(),
author='Jon Gjengset', |
<|file_name|>eslint-config.ts<|end_file_name|><|fim▁begin|>export interface ESLintConfig {<|fim▁hole|> }
];
}<|fim▁end|> | extends?: string | string[];
overrides?: [
{
extends?: string | string[]; |
<|file_name|>v_univar.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
***************************************************************************
v_univar.py
---------------------
Date : December 2012
Copyright : (C) 2012 by Victor Olaya
Email :... | __revision__ = '$Format:%H$'
|
<|file_name|>command_logout.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
<|fim▁hole|>)
type LogoutProvider struct {
}
const (
CMD_LOGOUT = "logout"
)
func init() {
RegisterCommandProvider(&LogoutProvider{})
}
func (me *Logo... | package api
import (
"github.com/mattermost/platform/model" |
<|file_name|>down-with-thread-dtors.rs<|end_file_name|><|fim▁begin|>// ignore-emscripten
thread_local!(static FOO: Foo = Foo);
thread_local!(static BAR: Bar = Bar(1));
thread_local!(static BAZ: Baz = Baz);
static mut HIT: bool = false;
struct Foo;
struct Bar(i32);
struct Baz;
impl Drop for Foo {
fn drop(&mut se... | impl Drop for Bar {
fn drop(&mut self) {
assert_eq!(self.0, 1);
self.0 = 2; |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
from models import Place
class SimpleTest(TestCas... | """
places = Place.objects.filter(name="Test Place")
[place.delete() for place in places]
|
<|file_name|>module-shared-tests.js<|end_file_name|><|fim▁begin|>/* global describe, it, beforeEach */
'use strict';
process.env.NODE_ENV = 'test';
var sharedModule = require('../lib/module-shared');
var instance1;
var instance2;
var should = require('should');
var stubs = {};
describe('Private Module Tests', func... | });
}); |
<|file_name|>rawrecords3.server.routes.test.js<|end_file_name|><|fim▁begin|>'use strict';
var should = require('should'),
request = require('supertest'),
app = require('../../server'),
mongoose = require('mongoose'),
User = mongoose.model('User'),
Rawrecords3 = mongoose.model('Rawrecords3'),
agent = request.agen... |
agent.post('/auth/signin') |
<|file_name|>rensa_coef_tracker.rs<|end_file_name|><|fim▁begin|>use field_bit::FieldBit;
use rensa_tracker::RensaTracker;
use score;
pub struct RensaCoefTracker {
pub num_erased: [usize; 20],
pub long_bonus_coef: [usize; 20],
pub color_bonus_coef: [usize; 20],
}
impl RensaCoefTracker {
pub fn new() ->... | assert_eq!(5, tracker.num_erased[5]);
|
<|file_name|>ez-dashboardview.js<|end_file_name|><|fim▁begin|>/*
* Copyright (C) eZ Systems AS. All rights reserved.
* For full copyright and license information view LICENSE file distributed with this source code.
*/
YUI.add('ez-dashboardview', function (Y) {
"use strict";
/**
* Provides the Dashboard ... | /** |
<|file_name|>test_level_event.py<|end_file_name|><|fim▁begin|>from sentry.testutils.cases import RuleTestCase
from sentry.rules.conditions.level import LevelCondition, LevelMatchType
class LevelConditionTest(RuleTestCase):
rule_cls = LevelCondition
def get_event(self):
event = self.event
even... | return event
|
<|file_name|>regress_determinants_ticpe.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Created on Tue Sep 22 09:47:41 2015
@author: thomas.douenne
"""
from __future__ import division
import statsmodels.formula.api as smf
from openfisca_france_indirect_taxation.examples.utils_example import simulate_df_... | data_for_reg['rev_disp_loyerimput_2'] = data_for_reg['rev_disp_loyerimput'] ** 2
data_for_reg['part_carburants'] = data_for_reg['depenses_carburants'] / data_for_reg['rev_disp_loyerimput']
data_for_reg['part_diesel'] = data_for_reg['depenses_diesel'] / data_for_reg['rev_disp_loyerimput']
data_for_reg['p... |
<|file_name|>product.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Pexego Sistemas Informáticos All Rights Reserved
# $Jesús Ventosinos Mayor <jesus@pexego.es>$
#
# This program is free software: you... | |
<|file_name|>tenant.py<|end_file_name|><|fim▁begin|>from keystone import utils
from keystone.common import wsgi
import keystone.config as config
from keystone.logic.types.tenant import Tenant
from . import get_marker_limit_and_url
class TenantController(wsgi.Controller):
"""Controller for Tenant related operation... | tenant = config.SERVICE.get_tenant_by_name(
utils.get_auth_token(req),
tenant_name)
return utils.send_result(200, req, tenant) |
<|file_name|>UploadRosters.tsx<|end_file_name|><|fim▁begin|>import * as React from "react";
import XLSX from 'xlsx'
import request from 'request'
export const UploadRosters = () => {
const [schoolId, setSchoolId] = React.useState<Number>();
const [teachers, setTeachers] = React.useState<Array<any>>([]);
const ... | <input aria-label="enter-school-id" className="input" defaultValue="" onChange={handleSchoolIdChange} type="text" />
</p>
</label> |
<|file_name|>FromSimpleReact.java<|end_file_name|><|fim▁begin|>package com.aol.cyclops.guava;
<|fim▁hole|> public static <T> FluentIterable<T> fromSimpleReact(
FutureStream<T> s) {
return FluentIterable.from(s);
}
}<|fim▁end|> | import com.aol.simple.react.stream.traits.FutureStream;
import com.google.common.collect.FluentIterable;
public class FromSimpleReact { |
<|file_name|>buildpkg.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""buildpkg.py -- Build OS X packages for Apple's Installer.app.
This is an experimental command-line tool for building packages to be
installed with the Mac OS X Installer.app application.
It is much inspired by Apple's GUI tool called Pack... | optionalKeys.remove(k)
optionalKeys.sort()
maxKeyLen = max(map(len, optionalKeys))
for k in optionalKeys: |
<|file_name|>libusb.ts<|end_file_name|><|fim▁begin|><!DOCTYPE TS><TS>
<context>
<name>USBGUI</name>
<message>
<source>USB</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Nothing to configure</source>
<translation type="unfinished"></tra... | </context> |
<|file_name|>server.py<|end_file_name|><|fim▁begin|>''' Provide basic Bokeh server objects that use a Tornado ``HTTPServer`` and
``BokeTornado`` Tornado Application to service Bokeh Server Applications.
There are two public classes in this module:
:class:`~bokeh.server.server.BaseServer`
This is a lightweight clas... | |
<|file_name|>IntezerV2.py<|end_file_name|><|fim▁begin|>from http import HTTPStatus
from typing import Callable
from typing import Dict
from typing import List
from typing import Union
import demistomock as demisto
import requests
from CommonServerPython import *
from CommonServerUserPython import *
from intezer_sdk im... | |
<|file_name|>error_py3.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 for
# license information.
#
# Code generat... |
_attribute_map = { |
<|file_name|>a.py<|end_file_name|><|fim▁begin|># import re, os
# from jandy.profiler import Profiler
#
#
# class Base:
# def __init__(self):
# print('init call')
#
# def compile(self, str):
# re.compile(str)
#
# #
# p = Profiler("12K", "localhost:3000", 1)
# try:
# p.start()
# b = Base()... | # #try: |
<|file_name|>combined_open_ended_modulev1.py<|end_file_name|><|fim▁begin|>import json
import logging
import traceback
from lxml import etree
from xmodule.timeinfo import TimeInfo
from xmodule.capa_module import ComplexEncoder
from xmodule.progress import Progress
from xmodule.stringify import stringify_children
from x... |
self.required_peer_grading = instance_state.get('required_peer_grading', 3)
self.peer_grader_count = instance_state.get('peer_grader_count', 3)
self.min_to_calibrate = instance_state.get('min_to_calibrate', 3) |
<|file_name|>findbits_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
import unittest, sys, findbits
class TestFindBits(unittest.TestCase):
def setUp(self):
self.old_stdout = sys.stdout
sys.stdout = OutputBuffer()
def tearDown(self):
sys.stdout = self.old_stdout
INVER... | ]
def test_search(self):
for target, data, expected_fragments in self.SEARCH_CASES:
sys.stdout.clear_buffer() |
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Get rid of "FormatSerializer:Method 'create' is abstract in class 'BaseSerializer' but is not overridden"
# FormatSerializer is read only anyway
# pylint: disable=abstract-method
from __future__ import unicode_literals
from rest_framew... | |
<|file_name|>DefaultConnectionFactory.java<|end_file_name|><|fim▁begin|>package com.phonedeck.gcm4j;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
/**
* Connection Factory that uses {@link URL#openConnection()}.
*
*/
public class DefaultConnectionFactory implements ConnectionF... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
Recursive data-types and support functions.<|fim▁hole|>"""<|fim▁end|> | |
<|file_name|>sub.rs<|end_file_name|><|fim▁begin|>use float::add::__adddf3;
use float::add::__addsf3;
use float::Float;
intrinsics! {
#[arm_aeabi_alias = __aeabi_fsub]
pub extern "C" fn __subsf3(a: f32, b: f32) -> f32 {
__addsf3(a, f32::from_repr(b.repr() ^ f32::SIGN_MASK))
}
#[arm_aeabi_alias ... | a - b
} |
<|file_name|>share_wizard.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redist... | |
<|file_name|>admin.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*-
from django.contrib import admin
from .models import ZoteroExtractorLog
### ZoteroExtractorLogAdmin
####################################################################################################
class ZoteroExtractorLogAdmin(adm... |
admin.site.register(ZoteroExtractorLog, ZoteroExtractorLogAdmin) |
<|file_name|>version.js<|end_file_name|><|fim▁begin|>import StorageAdapter from 'ui-web/snf/adapters/storage';
export default StorageAdapter.extend({
<|fim▁hole|> delete store.object_id;
return this.ajax(this.buildURL(type.typeKey, object_id), 'GET', { data: query });
},
});<|fim▁end|> | findQuery: function(store, type, query) {
var object_id = store.get('object_id'); |
<|file_name|>alerts.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { Observable, Subject } from 'rxjs';
import { AlertType, Alert } from './alerts.model';
@Injectable({
providedIn: 'root',
})
export class AlertsServi... | }
|
<|file_name|>read_factor.cpp<|end_file_name|><|fim▁begin|>#include "read_factor.h"
using namespace std;
<|fim▁hole|> while (getline(fin, s)) {
if (s.find("%") == string::npos) {
// input frequency range and count
if(s.find("begin") != string::npos) f.begin = input_factor(s);
else if ... |
void read_factor(ifstream& fin, Freq& f, vector<double>& fa, vector<double>& fb)
{
string s;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.