prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>main.js<|end_file_name|><|fim▁begin|>import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
import vuetify from './plugins/vuetify';
import 'roboto-fontface/css/roboto/roboto-fontface.css'
import '@mdi/font/css/materialde... | }).$mount('#app') |
<|file_name|>formfield.go<|end_file_name|><|fim▁begin|>package fork
import (
"fmt"
"net/http"
"strconv"
"strings"
)
func NewFieldIndex(s string, i int) *FieldIndex {<|fim▁hole|> return &FieldIndex{N: s, I: i}
}
type FieldIndex struct {
I int
N string
}
type formField struct {
base Form
Index *FieldIndex
F... | |
<|file_name|>.test_particles_resampling.py<|end_file_name|><|fim▁begin|>#coding:utf-8
"""
functionモジュールのparticle_resampling関数をテストする
"""
from functions import particles_resampling
import pfoe
robot1 = pfoe.Robot(sensor=4,choice=3,particle_num=100)
#case1:パーティクルの分布・重みは等分
for i in range(100):
robot1.particles.distr... | robot1.particles.weight[i] = 1.0 / 100.0 |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'metuly.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^accou... | from django.conf.urls import patterns, include, url |
<|file_name|>base.rs<|end_file_name|><|fim▁begin|>//! WARNING: This file is generated, derived from table system.base, DO NOT EDIT
use chrono::datetime::DateTime;
use chrono::offset::utc::UTC;
use gen::column;
use gen::schema;
use gen::table;
use rustc_serialize::json::Json;<|fim▁hole|>use rustorm::dao::IsDao;
use rus... | use rustc_serialize::json::ToJson;
use rustorm::dao::Dao; |
<|file_name|>shimSetup.ts<|end_file_name|><|fim▁begin|>(global as any).requestAnimationFrame = (callback: any) => {<|fim▁hole|>};<|fim▁end|> | setTimeout(callback, 0); |
<|file_name|>errors.rs<|end_file_name|><|fim▁begin|>#[derive(Debug)]
pub enum MidiError {
<|fim▁hole|> EndOfStream,
}<|fim▁end|> | |
<|file_name|>test_df.py<|end_file_name|><|fim▁begin|>from insights.parsers import df, ParseException
from insights.tests import context_wrap
import pytest
DF_ALP = """
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/mapper/vg_lxcrhel6sat56-lv_root 98571884 4244032 8... | |
<|file_name|>size_of.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> * 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 selectors;
use servo_arc::Arc;
use style;
use style::applicable_declarations::ApplicableDeclarationBlock;
use style:... | /* This Source Code Form is subject to the terms of the Mozilla Public |
<|file_name|>test_mangaPanda.py<|end_file_name|><|fim▁begin|>from unittest import TestCase
from mangopi.site.mangapanda import MangaPanda
class TestMangaPanda(TestCase):
SERIES = MangaPanda.series('gantz')
CHAPTERS = SERIES.chapters
def test_chapter_count(self):
self.assertEqual(len(TestMangaPan... | def test_chapter_title(self):
self.assertEqual(TestMangaPanda.CHAPTERS[-2].title, 'Lightning Counterstrike')
|
<|file_name|>inline.js<|end_file_name|><|fim▁begin|>// jshint ignore: start
/* eslint-disable */
/**
* WordPress dependencies
*/
const { __ } = wp.i18n;
const { Component, createRef, useMemo, Fragment } = wp.element;
const {
ToggleControl,
withSpokenMessages,
} = wp.components;
const { LEFT, RIGHT, UP, DOWN, BACKS... |
onChangeInputValue( inputValue ) {
this.setState( { inputValue } ); |
<|file_name|>59275500.jsonp.js<|end_file_name|><|fim▁begin|><|fim▁hole|>jsonp({"cep":"59275500","cidade":"Ipiranga","uf":"RN","estado":"Rio Grande do Norte"});<|fim▁end|> | |
<|file_name|>helpers.go<|end_file_name|><|fim▁begin|>package stripedash
<|fim▁hole|> "strconv"
)
func Uint64ToDollars(i uint64) string {
d := []byte(strconv.FormatUint(i, 10))
// Cents only
if len(d) < 3 {
return fmt.Sprintf("0.%s", d)
}
// Dollars and cents
centStart := len(d) - 2
dollars := d[0:centStart... | import (
"fmt" |
<|file_name|>repository.ts<|end_file_name|><|fim▁begin|>import { OcticonSymbol } from '../octicons'
import { Repository } from '../../models/repository'
import { CloningRepository } from '../../models/cloning-repository'
/**
* Determine the octicon to display for a given repository.
*/
export function iconForReposit... | |
<|file_name|>coverageinfo.rs<|end_file_name|><|fim▁begin|>use crate::traits::*;
use rustc_middle::mir::coverage::*;
use rustc_middle::mir::Coverage;
use rustc_middle::mir::SourceScope;
use super::FunctionCx;
impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
pub fn codegen_coverage(&self, bx... | let Coverage { kind, code_region } = coverage;
match kind {
CoverageKind::Counter { function_source_hash, id } => {
if bx.set_function_source_hash(instance, function_source_hash) { |
<|file_name|>language.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export type Language = 'fr' | 'en' | 'de' | 'ja' | 'ko' | 'zh' | 'ru';<|fim▁end|> | |
<|file_name|>ambig3.C<|end_file_name|><|fim▁begin|>// { dg-do assemble }
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 23 June 2000 <nathan@codesourcery.com><|fim▁hole|>
// Origin GNATS bug report 69 from Glenn Ammons <ammons@cs.wisc.edu>
//
// A base which derives a virtual b... | |
<|file_name|>test_qgsdefaultvalue.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsDefaultValue.
.. note:: 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 vers... | self.assertTrue(QgsDefaultValue('test'))
self.assertTrue(QgsDefaultValue('abc', True))
self.assertTrue(QgsDefaultValue('abc', False)) |
<|file_name|>battle_service.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from kubb_match.data.models import GridPosition, Round, Game
class BattleService(object):
def __init__(self):
pass
def create_games(self, positions):
games = []
nr = int(len(positions) / 5)
fie... | |
<|file_name|>matching.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/. */
//! High-level interface to CSS selector matching.
#![allow... | // encapsulate this better.
if cfg!(feature = "servo") { |
<|file_name|>launcher.go<|end_file_name|><|fim▁begin|>// -*- Mode: Go; indent-tabs-mode: t -*-
/*
* Copyright (C) 2017 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundat... | // the url is parseable
// - scheme: http(s)://example.com
"http", |
<|file_name|>decode_test.rs<|end_file_name|><|fim▁begin|>#[cfg(test)]
mod tests {
use crate::arch::arch_tests::common::tests::setup_tests;
use crate::utils::bit_utils::*;
#[test]
fn test_decode_absolute() {
let mut cpu = setup_tests();
cpu.memory.store(cpu.registers.pc + 1, 0xcd);
... | |
<|file_name|>analysis.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""This module contains some functions for EM analysis.
"""
__author__ = 'Wenzhi Mao'
__all__ = ['genPvalue', 'calcPcutoff', 'showPcutoff', 'transCylinder',
'showMRCConnection', 'showMRCConnectionEach', 'gaussian3D']
def interpo... | ax.w_zaxis.set_pane_color((0, 0, 0)) |
<|file_name|>Target_Network.cpp<|end_file_name|><|fim▁begin|>//
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//
#include <nanoHAL.h><|fim▁hole|>bool Network_Interface_Bind(int index)
{
(void)index;
return true;
}
int Network_Interfac... | #include <lwip/netif.h>
extern "C" struct netif * nf_getNetif();
|
<|file_name|>event_setting.rs<|end_file_name|><|fim▁begin|>// Copyright 2016, The Gtk-rs Project Developers.
// See the COPYRIGHT file at the top-level directory of this distribution.
// Licensed under the MIT license, see the LICENSE file or <https://opensource.org/licenses/MIT>
use gdk_sys;<|fim▁hole|>
#[derive(Clon... | use glib::translate::*;
use glib::GString; |
<|file_name|>test_activity_stream.py<|end_file_name|><|fim▁begin|>from actstream.models import Action
from django.test import TestCase
from cyidentity.cyfullcontact.tests.util import create_sample_contact_info
<|fim▁hole|>class FullContactActivityStreamTestCase(TestCase):
def test_contact_create(self):
cont... | |
<|file_name|>addon-toolbars.stories.ts<|end_file_name|><|fim▁begin|>import { html } from 'lit';<|fim▁hole|>} as Meta;
const getCaptionForLocale = (locale: string) => {
switch (locale) {
case 'es':
return 'Hola!';
case 'fr':
return 'Bonjour !';
case 'zh':
return '你好!';
case 'kr':
... | import { Story, Meta } from '@storybook/web-components';
export default {
title: 'Addons / Toolbars', |
<|file_name|>instr_vpsubusw.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::*;
use ::test::run_test;
#[test]
fn vpsubusw_1() {
run_test(&Inst... | }
|
<|file_name|>base.py<|end_file_name|><|fim▁begin|>"""Kytos Napps Module."""
import json
import os
import re
import sys
import tarfile
import urllib
from abc import ABCMeta, abstractmethod
from pathlib import Path
from random import randint
from threading import Event, Thread
from kytos.core.events import KytosEvent
fr... | """Run before the app is unloaded and the controller, stopped. |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import React from 'react';
import ReactDOM from 'react-dom';
import Layout from './layout.js';
<|fim▁hole|><|fim▁end|> | document.addEventListener('DOMContentLoaded', () => {
ReactDOM.render(<Layout />, document.getElementById('main'));
}); |
<|file_name|>voter.py<|end_file_name|><|fim▁begin|># This file is part of VoltDB.
# Copyright (C) 2008-2018 VoltDB Inc.
#
# 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, ... | # IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
<|file_name|>plot_current25.py<|end_file_name|><|fim▁begin|># ------------------------------------------------------
# current.py
#
# Plot a current field at fixed depth
# Modified from the spermplot example
#
# Bjørn Ådlandsvik <bjorn@imr.no>
# 2020-03-27
# ------------------------------------------------------
# ---... | |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>/*
* @license Apache-2.0
*
* Copyright (c) 2021 The Stdlib 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.apac... |
/**
* Returns a list of strided array data types.
* |
<|file_name|>testcolor.py<|end_file_name|><|fim▁begin|>from colordetection import *
<|fim▁hole|><|fim▁end|> | topColors(992780587437103) |
<|file_name|>service.py<|end_file_name|><|fim▁begin|>import attr
from navmazing import NavigateToAttribute
from navmazing import NavigateToSibling
from cfme.common import Taggable
from cfme.common import TagPageView
from cfme.containers.provider import ContainerObjectAllBaseView
from cfme.containers.provider import Co... | |
<|file_name|>test_cancel.py<|end_file_name|><|fim▁begin|># This file is part of the Trezor project.
#
# Copyright (C) 2012-2018 SatoshiLabs and contributors
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# as published by ... | address_n=[0],
coin_name="Bitcoin",
script_type=m.InputScriptType.SPENDADDRESS,
show_display=True, |
<|file_name|>en.js<|end_file_name|><|fim▁begin|>// 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 3 of the License, or
// (at your option) any later version.
// This progra... | // along with this program. If not, see <http://www.gnu.org/licenses/>.
|
<|file_name|>webpack.node.config.js<|end_file_name|><|fim▁begin|>/* eslint-disable */
var webpack = require('webpack');
var path = require('path');
var nodeExternals = require('webpack-node-externals');
module.exports = {
entry: './index.js',
output: {
path: path.join(__dirname, '..', '..', 'build'),
filen... | test: /\.(css|less)$/,
loader: 'css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!less'
},
{ |
<|file_name|>borrowck-move-by-capture-ok.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// http://rust-lang.org/COPYRIGHT.
//
// 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 you... | // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at |
<|file_name|>game.rs<|end_file_name|><|fim▁begin|>use shogi::{Color, Position, TimeControl};
use std::time::Instant;
#[derive(Debug)]
pub struct Game {
pub black_player: String,
pub white_player: String,
pub pos: Position,
pub time: TimeControl,
pub turn_start_time: Instant,
}
#[derive(Debug, Clon... | }
#[derive(Debug, Clone, Copy)]
pub enum GameOverReason { |
<|file_name|>commandpipe_test.py<|end_file_name|><|fim▁begin|># Ant-FS
#
# Copyright (c) 2012, Gustav Tiger <gustav@tiger.name>
#
# 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 restr... |
def main():
|
<|file_name|>revert_osiris.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import httplib2
import io
import os
import sys
import time
import dateutil.parser
from apiclient import discovery
from oauth2client import client
from oauth2client import tools
from oauth2client.file import Storage
from ap... | |
<|file_name|>test_soup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""Tests of Beautiful Soup as a whole."""
from pdb import set_trace
import logging
import unittest
import sys
import tempfile
from bs4 import (
BeautifulSoup,
BeautifulStoneSoup,
)
from bs4.builder import (
TreeBuilder,
Par... | |
<|file_name|>Devloader.py<|end_file_name|><|fim▁begin|>""" Here, we need some documentation...
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import os
import types
import threading
import time
import six
from DIRAC import gLogger
from DIRAC.... | path = getattr(modObj, "__file__", None)
if not path:
continue |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod codec;
mod handshake;<|fim▁hole|>pub use self::codec::ApCodec;
pub use self::handshake::handshake;
use std::io::{self, ErrorKind};
use std::net::ToSocketAddrs;
use futures_util::{SinkExt, StreamExt};
use protobuf::{self, Message, ProtobufError};
use thiserror::Erro... | |
<|file_name|>dom_manipulation.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::inheritance::Castable;
use dom::b... | |
<|file_name|>specialfunctions.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""This module defines some special functions
(originally defined in SpecialFunctions.h)."""
# Copyright (C) 2008-2014 Anders Logg
#
# This file is part of DOLFIN.
#
# DOLFIN is free software: you can redistribute it and/or modify
# ... | vol = CellNormal(mesh) |
<|file_name|>app.js<|end_file_name|><|fim▁begin|>'use strict';
var consoleBaseUrl = window.location.href;
consoleBaseUrl = consoleBaseUrl.substring(0, consoleBaseUrl.indexOf("/console"));
consoleBaseUrl = consoleBaseUrl + "/console";
var configUrl = consoleBaseUrl + "/config";
var auth = {};
var resourceBundle;
var l... | |
<|file_name|>HttpError.d.ts<|end_file_name|><|fim▁begin|>export declare class HttpError extends Error {
statusCode: number;
constructor(errorMessage: string, statusCode: number);<|fim▁hole|>}<|fim▁end|> | |
<|file_name|>DeriveColumnsFromTimeTransform.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2... | |
<|file_name|>vapid-details-model.d.ts<|end_file_name|><|fim▁begin|>import { DBInterface } from './db-interface';
export declare class VapidDetailsModel extends DBInterface {
protected readonly dbName: string;
protected readonly dbVersion: number;
protected readonly objectStoreName: string;
protected onD... | * Given a service worker scope, this method will look up the vapid key
* in indexedDB. |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup
import pybvc
setup(
name='pybvc',
version=pybvc.__version__,
description='A python library for programming your network via the Brocade Vyatta Controller (BVC)',<|fim▁hole|> author_email='jeb@elbrys.com',
url='https://gi... | long_description=open('README.rst').read(),
author='Elbrys Networks', |
<|file_name|>inabox-messaging-host.js<|end_file_name|><|fim▁begin|>/**
* Copyright 2016 The AMP HTML 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
*
* ... | const measurableWin = measurableFrame.contentWindow; |
<|file_name|>tableentries.py<|end_file_name|><|fim▁begin|># Purpose: ac1009 table entries
# Created: 16.03.2011
# Copyright (C) 2011, Manfred Moitzi
# License: MIT License
from __future__ import unicode_literals
__author__ = "mozman <mozman@gmx.at>"
from ..entity import GenericWrapper
from ..tags import DXFTag
from ..... | 23 |
<|file_name|>visitor.go<|end_file_name|><|fim▁begin|>package semantical
import (
"github.com/cloudson/gitql/parser"
)
type Visitor interface {
Visit(*parser.NodeProgram) error
VisitSelect(*parser.NodeSelect) error
VisitExpr(*parser.NodeExpr) error
VisitGreater(*parser.NodeGreater) error
VisitSmaller(*parser.Nod... | type SemanticalVisitor struct {
Visitor
} |
<|file_name|>isOrthogonal.ts<|end_file_name|><|fim▁begin|>/**<|fim▁hole|> */
isOrthogonal() : boolean {
return this.transpose().times(this).isIdentity();
}<|fim▁end|> | * Determines if the matrix is a orthogonal.
*
* @return {boolean} |
<|file_name|>SearchFragment.java<|end_file_name|><|fim▁begin|>/*****************************************************************************
* SearchFragment.java
*****************************************************************************
* Copyright © 2014-2015 VLC authors, VideoLAN and VideoLabs
* Author: Geoff... | |
<|file_name|>test_sound_formats.py<|end_file_name|><|fim▁begin|>import sys
from unittest import TestCase, expectedFailure, skipIf
import pygame
from pgzero.loaders import sounds, set_root, UnsupportedFormat
pygame.init()
class SoundFormatsTest(TestCase):
"""Test that sound formats we cannot open show an... | self.assert_loadable('vorbis1')
|
<|file_name|>BalanceType.java<|end_file_name|><|fim▁begin|>package com.bitdubai.fermat_api.layer.dmp_basic_wallet.common.enums;<|fim▁hole|> * Created by natalia on 06/07/15.
*/
public enum BalanceType {
AVAILABLE("AVAILABLE"),
BOOK("BOOK");
private final String code;
BalanceType(String code) {
... |
/** |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.http import Http404, HttpResponse
from django.template.context_processors import csrf
from rest_framework.authentication import TokenAuthentication
from rest_framework.parsers import JSONParser
from rest_framework.permissions import DjangoModelPermissions
f... | <div class="FalmerAppRoot"></div> |
<|file_name|>accept_ranges.rs<|end_file_name|><|fim▁begin|>use std::fmt::{self, Display};
use std::str::FromStr;
header! {
#[doc="`Accept-Ranges` header, defined in"]
#[doc="[RFC7233](http://tools.ietf.org/html/rfc7233#section-2.3)"]
#[doc=""]
#[doc="The `Accept-Ranges` header field allows a server to ... |
test_acccept_ranges { |
<|file_name|>upload_file.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
' 检查扩展名是否合法 '
__author__ = 'Ellery'
from app import app
import datetime, random
from PIL import Image
import os
def allowed_file(filename):
return '.' in filename and \
filename.rsplit('.', 1)[1] in app.config.get('ALLOW... | w, h = im.size |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Implements methods and structs required to go from binary to SSA
//!
//! Also acts a gateway for users to use the library. Check containers
//! submodule for more information.
pub mod ssaconstructor;
// Old/deprecated
pub mod containers;
pub mod source;
/**********... | pub mod radeco_containers;
pub mod radeco_source;
pub mod bindings; |
<|file_name|>FilterTest.py<|end_file_name|><|fim▁begin|>##########################################################################
#
# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that t... | |
<|file_name|>MakeExternal.java<|end_file_name|><|fim▁begin|>package me.ccrama.redditslide.Activities;
import android.app.Activity;
import android.content.SharedPreferences;<|fim▁hole|>import java.net.MalformedURLException;
import java.net.URL;
import me.ccrama.redditslide.SettingValues;
/**
* Created by ccrama on 9... | import android.os.Bundle;
|
<|file_name|>ErrorIcon.iconSketch.js<|end_file_name|><|fim▁begin|>import React from 'react';
import ErrorIcon from './ErrorIcon';
<|fim▁hole|>export const symbols = {
'ErrorIcon -> with filled': <ErrorIcon filled={true} />,
'ErrorIcon -> without filled': <ErrorIcon filled={false} />
};<|fim▁end|> | |
<|file_name|>kendo.columnmenu.js<|end_file_name|><|fim▁begin|>/*
* Kendo UI Web v2012.2.710 (http://kendoui.com)
* Copyright 2012 Telerik AD. All rights reserved.
*
* Kendo UI Web commercial licenses may be obtained at http://kendoui.com/web-license
* If you do not own a commercial license, this file shall be governed ... | title = trim(col.title || "");
if (col.menu === false || (!col.field && !title.length)) {
result = false; |
<|file_name|>dexdata.ts<|end_file_name|><|fim▁begin|>export const BattleAvatarNumbers = {
1: 'lucas',
2: 'dawn',
3: 'youngster-gen4',
4: 'lass-gen4dp',
5: 'camper',
6: 'picnicker',
7: 'bugcatcher',
8: 'aromalady',
9: 'twins-gen4dp',
10: 'hiker-gen4',
11: 'battlegirl-gen4',
12: 'fisherman-gen4',
13: 'cyclis... | 46: 'tuberf',
47: 'sailor',
48: 'sisandbro',
49: 'ruinmaniac', |
<|file_name|>migration.py<|end_file_name|><|fim▁begin|># Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENS... |
@staticmethod
def _from_db_object(context, migration, db_migration): |
<|file_name|>constants.py<|end_file_name|><|fim▁begin|>"""
Constants
"""
<|fim▁hole|>TOOL_PINDEL = 'pindel'
TOOL_DELLY = 'delly'
TOOL_LUMPY = 'lumpy'<|fim▁end|> | TOOL_FREEBAYES = 'freebayes' |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>app.config.from_object('config')<|fim▁end|> | from flask import Flask
app = Flask(__name__) |
<|file_name|>FinalizeOAuth.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
###############################################################################
#
# FinalizeOAuth
# Completes the OAuth process by retrieving a Foursquare access token for a user, after they have visited the authorization URL returned b... | class FinalizeOAuthChoreographyExecution(ChoreographyExecution):
def _make_result_set(self, response, path): |
<|file_name|>warnings.rs<|end_file_name|><|fim▁begin|>// A warning for an unused variable
fn main() {
let x = true;<|fim▁hole|><|fim▁end|> | } |
<|file_name|>access.py<|end_file_name|><|fim▁begin|>"""This file contains (or should), all access control logic for the courseware.
Ideally, it will be the only place that needs to know about any special settings
like DISABLE_START_DATES"""
import logging
from datetime import datetime, timedelta
import pytz
from djang... |
'staff' -- global staff access. |
<|file_name|>start_grammar.rs<|end_file_name|><|fim▁begin|>use crate::grammar::ElemTypes;
use crate::grammar::{
build, Elem, Grammar, GrammarErrors, Prod, ProdElement, Rule,
};
use crate::utils::{take_only, ToDoc};
use std::marker::PhantomData;
#[derive(Clone, PartialOrd, Ord, PartialEq, Eq, Debug)]
pub enum StreamT... | .collect::<Vec<_>>(),
);
}
}); |
<|file_name|>test_encryption.py<|end_file_name|><|fim▁begin|>import io
import tempfile
import unittest
from zipencrypt import ZipFile, ZipInfo, ZIP_DEFLATED
from zipencrypt.zipencrypt2 import _ZipEncrypter, _ZipDecrypter
class TestEncryption(unittest.TestCase):
def setUp(self):
self.plain = "plaintext" *... |
def test_setcompressiontype(self):
with ZipFile(self.zipfile, mode="w") as zipfd: |
<|file_name|>bump.rs<|end_file_name|><|fim▁begin|>//! # Bump frame allocator
//! Some code was borrowed from [Phil Opp's Blog](http://os.phil-opp.com/allocating-frames.html)
use paging::PhysicalAddress;
use super::{Frame, FrameAllocator, MemoryArea, MemoryAreaIter};
pub struct BumpAllocator {
next_free_frame: F... | kernel_end: Frame::containing_address(PhysicalAddress::new(kernel_end))
};
allocator.choose_next_area();
allocator |
<|file_name|>routes.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from framework.routing import Rule, json_renderer
from website.addons.github import views
settings_routes = {
'rules': [
# Configuration
Rule(
[
'/project/<pid>/github/settings/',
... | '/project/<pid>/github/zipball/',
'/project/<pid>/node/<nid>/github/zipball/',
],
'get', |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""Support for Streamlabs Water Monitor Usage."""
from datetime import timedelta
from homeassistant.components.streamlabswater import DOMAIN as STREAMLABSWATER_DOMAIN
from homeassistant.const import VOLUME_GALLONS
from homeassistant.helpers.entity import Entity
from... | |
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>if __name__ == "__main__":
try:
from mvc.ui.widgets import Application
except ImportError:
from mvc.ui.console import Application
from mvc.widgets import app<|fim▁hole|> app.widgetapp = Application()
initialize(app.widgetapp)<|fim▁... | from mvc.widgets import initialize |
<|file_name|>SectionNotification.spec.tsx<|end_file_name|><|fim▁begin|>import { mount } from 'enzyme';
import * as React from 'react';
import { isUniEnzymeTestkitExists } from 'wix-ui-test-utils/enzyme';
import { createUniDriverFactory } from 'wix-ui-test-utils/uni-driver-factory';
import { isUniTestkitExists } from 'w... | describe('testkit', () => { |
<|file_name|>face.js<|end_file_name|><|fim▁begin|>'use strict';<|fim▁hole|>
var conf = require('../config');
var ctrlBuilder = require('../controllers/face-controller');
var version = conf.get('version');
var base_route = conf.get('baseurlpath');
var face_route = base_route + '/face';
module.exports = function (serv... | |
<|file_name|>observable.ts<|end_file_name|><|fim▁begin|>//Copyright (c) wildcatsoft.
//All Rights Reserved.
//Licensed under the Apache License, Version 2.0.
//See License.txt in the project root for license information.
/// <reference path="../typings/winjs/winjs.d.ts" />
module WinJS.KO {
export var observabl... | }
|
<|file_name|>SetReceiptRulePositionResult.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2012-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 ... | }
@Override
public int hashCode() { |
<|file_name|>atsc_rx_filter.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env /usr/bin/python
#
# Copyright 2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# t... |
pfb = filter.pfb_arb_resampler_ccf(interp, rrc_taps, nfilts)
|
<|file_name|>bitcoin_ca@valencia.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ca@valencia" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Quantum</source>
<translation... | <translation type="unfinished"/>
</message> |
<|file_name|>test.rs<|end_file_name|><|fim▁begin|>use intern::intern;
use grammar::repr::*;
use test_util::{normalized_grammar};
use super::lalr_states;
use super::super::interpret::interpret;
fn nt(t: &str) -> NonterminalString {
NonterminalString(intern(t))
}
macro_rules! tokens {
($($x:expr),*) => {
... | };
"#);
|
<|file_name|>simple.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap;
use unshare::{Command, Fd};
use crate::config::command::{CommandInfo, WriteMode};
use crate::launcher::{Context, socket};
use crate::launcher::options::{ArgError, parse_docopts};
use crate::launcher::volumes::prepare_volumes;
use crate... | } |
<|file_name|>signals.py<|end_file_name|><|fim▁begin|>from django.db.models.signals import post_save
from django.dispatch import receiver
from .models import Board, BoardPermissions, User, UserSettings
<|fim▁hole|>def init_board_permissions(sender, **kwargs):
"""Link existing benchmark countries to newly created co... |
@receiver(post_save, sender=Board) |
<|file_name|>dialogs.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*-
#--------------------------------------------------------------------------
# Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas
# Copyright: (C) 2001 Centro de Pesquisas Renato Archer
# Homepage: http://www.soft... | |
<|file_name|>ScopedAliases.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2010 The Closure Compiler 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... | for (Node scopeCall : traversal.getScopeCalls()) {
Node expressionWithScopeCall = scopeCall.getParent();
Node scopeClosureBlock = scopeCall.getLastChild().getLastChild(); |
<|file_name|>footer.component.spec.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>//
// describe('FooterComponent', () => {
// let component: FooterComponent;
// let fixture: ComponentFixture<FooterComponent>;
//
// beforeEach(async(() => {
// TestBed.configureTestingModule({
// declarations: [FooterComponent]
// ... | // import { async, ComponentFixture, TestBed } from '@angular/core/testing';
//
// import { FooterComponent } from './footer.component'; |
<|file_name|>ng-grid-tests.ts<|end_file_name|><|fim▁begin|>/// <reference path="ng-grid.d.ts" />
var options1: ngGrid.IGridOptions = {
data: [{ 'Name': 'Bob' }, { 'Name': 'Jane' }]
};
var options2: ngGrid.IGridOptions = {
afterSelectionChange: () => { },
beforeSelectionChange: () => {return true; },
... | |
<|file_name|>reset.request.controller.js<|end_file_name|><|fim▁begin|>(function() {
'use strict';
angular
.module('fitappApp')
.controller('RequestResetController', RequestResetController);
RequestResetController.$inject = ['$timeout', 'Auth'];
function RequestResetController ($timeou... | if (response.status === 400 && response.data === 'e-mail address not registered') {
vm.errorEmailNotExists = 'ERROR';
} else { |
<|file_name|>configuration-loader.service.ts<|end_file_name|><|fim▁begin|>import { Http, Headers, Response, RequestOptions } from '@angular/http';
import { IConfig } from '../models/config.interface';
export class ConfigurationLoader {
private CONF: { [id: string] : IConfig } = {
"DEV": {
APP_... | return { |
<|file_name|>django_1_0.py<|end_file_name|><|fim▁begin|>"""
Hacks for the Django 1.0/1.0.2 releases.
"""
from django.conf import settings
from django.db.backends.creation import BaseDatabaseCreation
from django.db.models.loading import cache
from django.core import management
from django.core.management.commands.flush... | Clears the contents of AppCache to a blank state, so new models
from the ORM can be added. |
<|file_name|>event-test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python -u
#
#
#
#################################################################################
# Start off by implementing a general purpose event loop for anyones use
#################################################################################
... | |
<|file_name|>client.py<|end_file_name|><|fim▁begin|># Copyright 2012 OpenStack Foundation
# 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|>colorpicker-cmyk.ts<|end_file_name|><|fim▁begin|>// spell-checker:ignore cmyk, colorpicker
/**
* Specifies colors as a combination of cyan, magenta, yellow, and black.
*/
export interface SkyColorpickerCmyk {<|fim▁hole|> */
cyan: number;
/**
* Specifies the percentage of magenta to use.
*/
... | /**
* Specifies the percentage of cyan to use. |
<|file_name|>datatype-date-math.js<|end_file_name|><|fim▁begin|>YUI.add('datatype-date-math', function (Y, NAME) {
/**
* Date Math submodule.
*
* @module datatype-date
* @submodule datatype-date-math
* @for Date
*/
var LANG = Y.Lang;
Y.mix(Y.namespace("Date"), {
/**
* Checks whether a native JavaScript Date... | newDate.setFullYear(newYear);
newDate.setMonth(newMonth);
return newDate; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.