prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for mockjs 1.0 // Project: http://mockjs.com/ // Definitions by: lavyun <httpS://github.com/lavyun> // ChenKS12138 <https://github.com/ChenKS12138> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Ve...
// Mockjs.Random - Miscellaneous
<|file_name|>MediaVerticalList.js<|end_file_name|><|fim▁begin|>import React from 'react' import MediaSummary from './MediaSummary' import { Button } from 'semantic-ui-react' import './mediaverticallist.css' <|fim▁hole|> arr = [] } var mediaNodes = arr.map((media, idx) => { return ( <MediaSum...
export default class MediaVerticalList extends React.Component { render () { var arr = this.props.data if (arr === undefined) {
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ cookiecutter.main ----------------- Main entry point for the `cookiecutter` command. The code in this module is also a good example of how to use Cookiecutter as a library rather than a script. """ from __future__ im...
config_dict = get_user_config(rc_file) template = expand_abbreviations(template, config_dict)
<|file_name|>simple.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ A simple example of how to get or set environment variables from python """ import os <|fim▁hole|>if 'HOSTNAME' in os.environ: print(os.environ['HOSTNAME']) else: print( 'you dont have a HOSTNAME in your environment, it is p...
print(os.environ['USER'])
<|file_name|>sb.js<|end_file_name|><|fim▁begin|>// Scarlet Blaze Article Tool // By: Jose Mulia // http://www.scarletblaze.com // Version: 1.1 ns4 = document.layers; ie = document.all; moz = document.getElementById && !document.all; function changeFontSize (id, isIncrease) { // 1 = increase // 0 = decre...
else
<|file_name|>CompositingVisualLoop.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************** * SOFA, Simulation Open-Framework Architecture, development version * * (c) 2006-2017 INRIA, USTL, UJF, CNRS, MGH * * ...
defaultRendering(vparams); } //rendering sequence: call each VisualManagerPass elements, then composite the frames
<|file_name|>d3d11on12.rs<|end_file_name|><|fim▁begin|>// Copyright © 2017 winapi-rs developers // 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. // All files in t...
UINT, *const D3D_FEATURE_LEVEL,
<|file_name|>baseconsultbar.ts<|end_file_name|><|fim▁begin|>//baseconsultbar.ts import {BaseConsultViewModel} from '../../data/baseconsultmodel'; import {BaseBar} from './basebar'; import {IBaseItem} from 'infodata'; import {BaseModel} from '../../data/basemodel'; // export class BaseConsultBar<T extends IBaseItem> ext...
<|file_name|>htmlframeelement.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::codegen::Bindings::HTMLFrameEleme...
use dom::element::ElementTypeId;
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Generic deserialization framework. use std::error; pub mod impls; pub mod value; /////////////////////////////////////////////////////////////////////////////// /// `Error` is a trait that allows a `Deserialize` to generically create a /// `Deserializer` error. p...
/// `VariantVisitor` is a visitor that is created by the `Deserializer` and passed to the /// `Deserialize` in order to deserialize a specific enum variant.
<|file_name|>directed_context.rs<|end_file_name|><|fim▁begin|>use std::marker::PhantomData; use Construct; use Data; use Count; use Of; use ToIndex; use ToPos; use Zero; /// Same as `Context`, but for directed edges. pub struct DirectedContext<T = Data>(PhantomData<T>); impl<T> Construct for DirectedContext<T> { ...
impl<T, U, V> Zero<Vec<U>, (Vec<V>, usize, V)>
<|file_name|>SPK_TextureQuadRenderer.cpp<|end_file_name|><|fim▁begin|>// This file is part of Chaotic Rage (c) 2010 Josh Heidenreich // // kate: tab-width 4; indent-width 4; space-indent off; word-wrap off; #include "SPK_TextureQuadRenderer.h" #include <Core/SPK_Particle.h> #include <Core/SPK_Group.h> #include <glm/g...
glBindVertexArray(vao); // The VBO containing the 4 vertices of the particles. // Thanks to instancing, they will be shared by all particles.
<|file_name|>kaptcha.js<|end_file_name|><|fim▁begin|>var Canvas = require('canvas'); function generateCode() {<|fim▁hole|>function generateImage(req, res, params) { params.color = params.color || 'rgb(0, 0, 0)'; params.background = params.background || 'rgb(255, 255, 255)'; params.width = params.width || 250; ...
return ('' + Math.random()).substr(3, 6); }
<|file_name|>manage_wiki.py<|end_file_name|><|fim▁begin|>import re from django.conf import settings from tincan import ( Activity, ActivityDefinition, LanguageMap ) from xapi.patterns.base import BasePattern from xapi.patterns.eco_verbs import ( LearnerCreatesWikiPageVerb, LearnerEditsWikiPageVerb )...
<|file_name|>test_artificial_32_RelativeDifference_MovingAverage_7__20.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 = 32 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 7, transform = "RelativeDifference", sigma = 0.0, exog_count = 20, ar_order = 0);
<|file_name|>delete_machine.rs<|end_file_name|><|fim▁begin|>use std::os::unix::fs::PermissionsExt; use pidfile_rs::{ Pidfile, PidfileError, }; use eyre::{ eyre, Result, // Context as _, }; use crate::machine::Machine; use crate::config::MachineConfig; #[xactor::message(result = "Result<()>")] pub ...
<|file_name|>neuralnet.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8; Mode: Python; indent-tabs-mode: nil; tab-width: 4 -*- # vim: set fileencoding=utf-8 filetype=python syntax=python.doxygen fileformat=unix tabstop=4 expandtab : # kate: encoding utf-8; bom off; syntax python; indent-mode p...
the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This software is distributed in the hope that it will be useful,
<|file_name|>uninhabited-enum-cast.rs<|end_file_name|><|fim▁begin|>enum E {} fn f(e: E) { println!("{}", (e as int).to_str()); //~ ERROR non-scalar cast<|fim▁hole|> fn main() {}<|fim▁end|>
}
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from flask import Flask app = Flask('keyhub')
<|file_name|>optional_comma_in_match_arm.rs<|end_file_name|><|fim▁begin|>// run-pass #![allow(unused_unsafe)] // ignore-pretty issue #37199 #![allow(while_true)] fn main() { let x = 1; match x { 1 => loop { break; }, 2 => while true { break; }, 3 => if true { () }, 4 => if true...
<|file_name|>OrderRepository.java<|end_file_name|><|fim▁begin|>/** * */ package com.sivalabs.demo.orders.repositories;<|fim▁hole|>import com.sivalabs.demo.orders.entities.Order; /** * @author Siva * */ public interface OrderRepository extends JpaRepository<Order, Integer>{ }<|fim▁end|>
import org.springframework.data.jpa.repository.JpaRepository;
<|file_name|>types.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICEN...
Stdin bool `json:"stdin,omitempty"` // Stdout if true indicates that stdout is to be redirected for the attach call.
<|file_name|>avatar.js<|end_file_name|><|fim▁begin|>import * as React from 'react'; import ApiPage from 'docs/src/modules/components/ApiPage'; import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations'; import jsonPageContent from './avatar.json'; export default function Page(props) { const {...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
default_app_config = 'jobs.apps.JobConfig'
<|file_name|>test_model.py<|end_file_name|><|fim▁begin|># coding: utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import json import re import unittest2 import warnings import httpretty as hp from coinbase.clie...
@hp.activate def test_get_transaction(self): account = Account(Client(api_key, api_secret))
<|file_name|>router_test.go<|end_file_name|><|fim▁begin|>// Copyright 2015 go-swagger maintainers // // 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/L...
<|file_name|>screen.py<|end_file_name|><|fim▁begin|>import time from pygame.locals import * import gui MOUSE_LEFT_BUTTON = 1 MOUSE_MIDDLE_BUTTON = 2 MOUSE_RIGHT_BUTTON = 3 MOUSE_WHEELUP = 4 MOUSE_WHEELDOWN = 5 class Screen(object): """Base gui screen class every game screen class should inh...
<|file_name|>sendfn-spawn-with-fn-arg.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 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.a...
fn test05_start(f: ~fn(int)) {
<|file_name|>field_type_test.go<|end_file_name|><|fim▁begin|>// Copyright 2020 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 License at // // https://www.apache.org/licenses/LICENSE...
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and
<|file_name|>ContactTracker.cpp<|end_file_name|><|fim▁begin|>/* -------------------------------------------------------------------------- * * Simbody(tm): SimTKmath * * -------------------------------------------------------------------------- * * This is part of ...
const ContactGeometry::Sphere& sphere = ContactGeometry::Sphere::getAs(geoSphere); const ContactGeometry::TriangleMesh& mesh = ContactGeometry::TriangleMesh::getAs(geoMesh);
<|file_name|>describer.py<|end_file_name|><|fim▁begin|>from storytext.javaswttoolkit import describer as swtdescriber from org.eclipse.core.internal.runtime import InternalPlatform from org.eclipse.ui.forms.widgets import ExpandableComposite import os from pprint import pprint class Describer(swtdescriber.Describer): ...
usedTypes.append(imageType) if not cacheExists:
<|file_name|>carousel.js<|end_file_name|><|fim▁begin|>/*! formstone v1.4.20-1 [carousel.js] 2021-01-29 | GPL-3.0 License | formstone.it */ /* global define */ (function(factory) { if (typeof define === "function" && define.amd) { define([ "jquery", "./core", "./mediaquery", "....
<|file_name|>or_bcv_parser.js<|end_file_name|><|fim▁begin|>(function() { var bcv_parser, bcv_passage, bcv_utils, root, hasProp = {}.hasOwnProperty; root = this; bcv_parser = (function() { bcv_parser.prototype.s = ""; bcv_parser.prototype.entities = []; bcv_parser.prototype.passage = null; ...
if (s0 === peg$FAILED) { s0 = peg$parsev_letter(); if (s0 === peg$FAILED) {
<|file_name|>DistributedPartyJukeboxActivityBase.py<|end_file_name|><|fim▁begin|>from direct.actor.Actor import Actor from direct.task.Task import Task from panda3d.core import * from panda3d.direct import * from otp.otpbase.OTPBase import OTPBase from toontown.toonbase import ToontownGlobals from toontown.toonbase imp...
self.music.stop()
<|file_name|>ms.js<|end_file_name|><|fim▁begin|>/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */ /* vim: set ts=2 et sw=2 tw=80: */ /************************************************************* * * MathJax/jax/output/HTML-CSS/autoload/ms.js * * Implements the HTML-CSS output for <ms> e...
this.HTMLhandleSpace(span); this.HTMLhandleColor(span); this.HTMLhandleDir(span);
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for school_registry project. It exposes the WSGI callable as a module-level variable named ``application``.<|fim▁hole|>https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.env...
For more information on this file, see
<|file_name|>ReflectiveBeanClassesProcessor.java<|end_file_name|><|fim▁begin|>package io.quarkus.arc.deployment; import org.jboss.jandex.AnnotationInstance; import org.jboss.jandex.ClassInfo; import org.jboss.jandex.DotName; import org.jboss.jandex.Type; import io.quarkus.arc.processor.BeanInfo; import io.quarkus.dep...
<|file_name|>alert2.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
alert("alert2.js")
<|file_name|>settings.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('publisherApp') .config(function ($stateProvider) { $stateProvider .state('settings', { parent: 'account', url: '/settings', data: { roles: ['RO...
<|file_name|>GoogleJsonResponseExceptionFactoryTestingTest.java<|end_file_name|><|fim▁begin|><|fim▁hole|> * Copyright 2013 Google 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 * * h...
/*
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from django.contrib.auth.models import User, Group from navigation.api import register_multi_item_links from navigation.classes import Link from project_setup.api import register_setup from .links import (user_list, user_set...
register_setup(user_setup) register_setup(group_setup)
<|file_name|>Service.js<|end_file_name|><|fim▁begin|>/** * Red Hat Open Innovation Labs API * A generic model to support automation at all levels of the application and infrastructure lifecycle. * * OpenAPI spec version: 0.3.0-alpha * Contact: rhc-open-innovation-labs@redhat.com * * NOTE: This class is auto gene...
* You may obtain a copy of the License at *
<|file_name|>toggle_button.rs<|end_file_name|><|fim▁begin|>// This file is part of rgtk. // // rgtk 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 License, or // (at your opti...
fn set_active(&mut self, is_active: bool) {
<|file_name|>sleep.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>use std::time::Duration; use std::thread; fn main() { let amount: u64 = env::args().nth(1).unwrap().parse().unwrap(); println!("Sleeping..."); thread::sleep(Duration::from_secs(amount)); println!("Awake!"); }<|fim▁end|>
// http://rosettacode.org/wiki/Sleep /// Sleeps for the number of seconds specified on the command line. use std::env;
<|file_name|>test.js<|end_file_name|><|fim▁begin|>const pageIcon = require('./../lib/index'); const helpers = require('./helpers'); const fs = require('fs'); const chai = require('chai'); const path = require('path'); const url = require('url'); const expect = chai.expect; const {isIconValid, saveToFile} = helpers; c...
.then(function(icon) { if (!icon) {
<|file_name|>common.py<|end_file_name|><|fim▁begin|>"""Plugin common functions.""" import logging import os import re import shutil import tempfile import OpenSSL import pkg_resources import zope.interface from acme.jose import util as jose_util from certbot import constants from certbot import crypto_util from cert...
<|file_name|>parser.rs<|end_file_name|><|fim▁begin|>use std::fs::File; use std::io::prelude::*; use png::errors::PNGError; use super::chunk::{Chunk, ChunkBuilder};<|fim▁hole|>} impl<'a> Iterator for ChunkIterator<'a> { type Item = Chunk; fn next (&mut self) -> Option<Chunk> { self.parser.read_chunk()...
pub struct ChunkIterator<'a> { parser: &'a PNGParser<'a>,
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- # # # Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Licen...
# You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>.
<|file_name|>gzip_util.py<|end_file_name|><|fim▁begin|>import zlib import struct import time def parse_encoding_header(header): """ Break up the `HTTP_ACCEPT_ENCODING` header into a dict of the form, {'encoding-name':qvalue}. """ encodings = {'identity':1.0} for encoding in header.split(","): ...
<|file_name|>parse.py<|end_file_name|><|fim▁begin|>''' Parse links in html and css pages. ''' import logging import re import hashlib import urllib.parse from functools import partial import multidict import html from bs4 import BeautifulSoup from . import stats from .urls import URL from . import facet from . impor...
''' Find links in an html body, divided among links and embeds.
<|file_name|>test_interpreter.py<|end_file_name|><|fim▁begin|>import sys sys.path.insert(0, "../") import unittest from dip.typesystem import DNull, DBool, DInteger, DString, DList from dip.compiler import BytecodeCompiler from dip.interpreter import VirtualMachine from dip.namespace import Namespace class...
EQ 3 5 6 # 4 data6 = (data3 == data5) LIST_REM 0 4 # 5 data0.remove(data4 (represents an index)) LEN 0 3 # 6 data3 = len(data0) NEQ 3 5 7 # 7 data7 = (data3 != data5...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import { createAction } from 'redux-actions'; import axios from '../../../utils/APIHelper'; export const CATEGORY_FORM_UPDATE = 'CATEGORY_FORM_UPDATE'; export const CATEGORY_FORM_RESET = 'CATEGORY_FORM_RESET'; export const categoryFormUpdate = createAction(CATEGORY_F...
dispatch(categoryFormReset()); return response.data.category; }, e => dispatch(categoryFormUpdate(e))); };
<|file_name|>blocks.rs<|end_file_name|><|fim▁begin|>/* copyright: (c) 2013-2019 by Blockstack PBC, a public benefit corporation. This file is part of Blockstack. Blockstack is free software. You may redistribute or modify it under the terms of the GNU General Public License as published by the Free Software Foun...
assert!(StacksChainState::load_staging_block_pubkey_hash(&chainstate.blocks_db, burn_header, &block.block_hash()).unwrap().is_none()); assert_eq!(StacksChainState::get_staging_block_status(&chainstate.blocks_db, burn_header, &block.block_hash()).unwrap().unwrap(), true); assert!(StacksChainStat...
<|file_name|>test_networkutil.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2019-2020, Kevin Andre <hyperquantum@gmail.com> This file is part of PMP (Party Music Player). PMP is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published b...
QTEST_MAIN(TestNetworkUtil)
<|file_name|>build.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>extern crate syntex; extern crate serde_codegen; use std::env; use std::path::Path; pub fn main() { let out_dir = env::var_os("OUT_DIR").unwrap(); let src = Path::new("src/lib.rs.in"); let dst = Path::new(&out_dir).join("lib.rs"); let mu...
<|file_name|>main.go<|end_file_name|><|fim▁begin|>// 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 License at // // http://www.apache.org/licenses/LICENSE-2.0 // // ...
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License.
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># SharePlum # This library simplfies the code necessary # to automate interactions with a SharePoint # server using python from .office365 import Office365 # noqa: F401 from .site import Site # noqa: F401<|fim▁hole|>__title__ = "SharePlum SharePoint Library" __aut...
from .version import __version__ # noqa: F401 __all__ = ["site", "office365"]
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! The mathematical constant tau. /// The mathematical constant [tau](http://tauday.com/), /// where pi is defined as tau/2. /// /// We provide it as `f64` for now. /// /// ```rust{.example} /// use tau::TAU; /// assert_eq!(TAU.cos(), 1.0); /// ``` pub const TAU: f64 =...
use super::TAU; use std::f64::consts::PI; #[test]
<|file_name|>interfaces.py<|end_file_name|><|fim▁begin|>from zope.interface import Interface<|fim▁hole|>class IUWOshThemeLayer(Interface): """ Marker interface that defines a browser layer """<|fim▁end|>
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils import timezone from django.contrib.auth.models import User from django.template.loader import render_to_string from django.conf import settings from django.contrib....
privacy = models.CharField(_('privacy'), max_length=15, choices=PRIVACY_CHOICES,
<|file_name|>Scheduler.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ The scheduler is responsible for the module handling. """ import modules from importlib import import_module from additional.Logging import Logging ################################################################################ cla...
raise SubClassError( 'Modul is not an instance of DatasourceBase: {}' .format(module.__class__.__name__))
<|file_name|>aws_netapp_cvs_FileSystems.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # (c) 2019, NetApp Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """AWS Cloud Volumes Services - Manage fileSystem""" from __future__ import absolute_import, division, print_fu...
result_message = "FileSystem Updated" self.module.exit_json(changed=self.na_helper.changed, msg=result_message)
<|file_name|>lxqt-session_es_UY.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="es_UY"> <context> <name>LXQtModuleManager</name> <message> <location filename="../src/lxqtmodman.cpp" line="311"/> <source>Crash Report</source> ...
<translation type="unfinished"></translation>
<|file_name|>GameController.cpp<|end_file_name|><|fim▁begin|>// // File: GameController.cpp // Class: GameController // Author: John Barbero Unenge // All code is my own except where credited to others. // // Copyright (c) 2012 Catch22. All Rights Reserved. // // Date: 24/9/12 // // License: The followin...
} void GameController::didRecieveInputEvent(InputType type, int locX, int locY) {
<|file_name|>uglify-js-tests.ts<|end_file_name|><|fim▁begin|>/// <reference path="uglify-js.d.ts" /> /// <reference path="../node/node.d.ts" /> import * as UglifyJS from 'uglify-js'; import * as fs from 'fs'; var result = UglifyJS.minify("/path/to/file.js"); console.log(result.code); // minified output // if you need...
//... source_map: source_map });
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals from django.conf import settings as django_settings <|fim▁hole|> django_settings, 'WIKI_PLUGINS_METHODS', ('article_list', 'toc', ))<|fim▁end|>
SLUG = 'macros' APP_LABEL = 'wiki' METHODS = getattr(
<|file_name|>classes.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # # URL: https://sickrage.github.io # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # t...
ErrorViewer.errors = []
<|file_name|>process_NCEI_03_prcp_180d.py<|end_file_name|><|fim▁begin|><|fim▁hole|>University of Wisconsin - Madison matt.e.garcia@gmail.com Copyright (C) 2015-2016 by Matthew Garcia Licensed Gnu GPL v3; see 'LICENSE_GnuGPLv3.txt' for complete terms Send questions, bug reports, any related requests to matt.e.garcia@gm...
""" Python script 'process_NCEI_03_prcp_180d.py' by Matthew Garcia, PhD student Dept. of Forest and Wildlife Ecology
<|file_name|>models.py<|end_file_name|><|fim▁begin|>""" Module `lino_xl.lib.properties` ------------------------------- Imagine that we are doing a study about alimentary habits. We observe a defined series of properties on the people who participate in our study. Here are the properties that we are going to observe:...
>>> married.set_value_for(chris,True) >>> married.set_value_for(fred,False) >>> married.set_value_for(vera,True)
<|file_name|>extern-rust.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 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/lic...
fn main() {}
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url from . import views urlpatterns = [ # General endpoints url(r"^status/?$", views.get_status), url(r"^version/?$", views.get_version), # API authorization url(r"^login/?$", views.login), url(r"^logout/?$", views....
url(r"^drinks/last/?$", views.last_drink),
<|file_name|>dsknn.py<|end_file_name|><|fim▁begin|>import numpy as np from brew.base import Ensemble from brew.metrics.diversity.paired import kuncheva_double_fault_measure from .base import DCS class DSKNN(DCS): """DS-KNN The DS-KNN selects an ensemble of classifiers based on their accuracy and diversi...
test sample. Attributes ----------
<|file_name|>apps.py<|end_file_name|><|fim▁begin|># # Copyright © 2012–2022 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # 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 S...
# (at your option) any later version. # # This program is distributed in the hope that it will be useful,
<|file_name|>reach_reader.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str<|fim▁hole|>import logging from indra.java_vm import autoclass, JavaException logger = logging.getLogger('reach_reader') class ReachReader(object): """Th...
<|file_name|>sim_noise.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015-2018 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. import numpy as np from .tod import TOD from .noise import Noise fr...
# put a final point at Nyquist tempfreq.append(nyquist)
<|file_name|>dashboard.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, 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 # # ...
panels = (BasePanels, NetworkPanels, ObjectStorePanels, BackupJobPanels) default_panel = 'overview' supports_tenants = True
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # EForge project management system, Copyright © 2010, Element43 # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this per...
<|file_name|>rest.py<|end_file_name|><|fim▁begin|>""" Support for RESTful binary sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.rest/ """ import logging from homeassistant.components.binary_sensor import BinarySensorDevice from ho...
<|file_name|>interpreter.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use std::cmp::Ordering; use parser::{Expr, Stmt}; use value::Value; use util::Boxable; /// The entities that result from interpretation and that are stored in a /// `Context`. #[derive(Debug, PartialEq, Clone)] pub enum Ru...
head: MapContext,
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict'; const ServiceEmitter = require('./lib/ServiceEmitter'); const ServiceProvider = require('./lib/ServiceProvider'); <|fim▁hole|>module.exports = { ServiceEmitter, ServiceProvider };<|fim▁end|>
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>extern crate env_logger; extern crate gluon; mod support; use gluon::Compiler; <|fim▁hole|>fn dont_panic_when_error_span_is_at_eof() { let _ = ::env_logger::init(); let vm = support::make_vm(); let text = r#"abc"#; let result = Compiler::new().load_sc...
#[test]
<|file_name|>notIn.js<|end_file_name|><|fim▁begin|>const validate = (value, options) => {<|fim▁hole|> return value.every(val => validate(val, options)); } // eslint-disable-next-line return ! options.filter(option => option == value).length; }; export default validate;<|fim▁end|>
if (Array.isArray(value)) {
<|file_name|>data.py<|end_file_name|><|fim▁begin|>from app import db, cache from model import UserInfo import pickle from random import seed, randint from heapq import nlargest seed() cache.clear() fr = open('dat/a.dat','rb') U = pickle.load(fr) # a user_num x 100 mat unorm = pickle.load(fr) fr.close() #for i in xra...
if e>11:
<|file_name|>expr.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # 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...
max_expr = self.parse_expression() return RqlBinary('AND', RqlBinary('>=', expr, min_expr), RqlBinary('<=', expr, min_expr)) def parse_binary(self, operators, lhs, min_precedence):
<|file_name|>raster_symbolizer_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from nose.tools import * from utilities import execution_path, save_data, contains_word import os, mapnik def setup(): # All of the paths used are relative, if we run the tests # from another directory we need to chdir(...
x, y = 427417, 4477517 features = _map.query_point(0,x,y).features assert len(features) == 1
<|file_name|>non_existing_spec.js<|end_file_name|><|fim▁begin|>var commons = require('../commons')<|fim▁hole|> .get(commons.host+'/file/2134354/zgzhrthztrh/sgeh' ) .after(function(err, res, body) { expect(res.request.href.match(/errcode=404/)).not.toBeNull() }) .toss()<|fim▁end|>
var frisby = require('frisby'); var FormData = require('form-data'); frisby.create('Get file')
<|file_name|>test_leaves.py<|end_file_name|><|fim▁begin|>from ipctest import IpcTest class TestLeaves(IpcTest): def test_workspace_leaves(self, i3): ws_name = self.fresh_workspace() con1 = self.open_window()<|fim▁hole|> self.open_window() ws = [w for w in i3.get_tree().workspaces()...
i3.command('[id=%s] floating enable' % con1) self.open_window()
<|file_name|>test_cli20_natpool.py<|end_file_name|><|fim▁begin|># 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 req...
<|file_name|>build.js<|end_file_name|><|fim▁begin|>import webpack from 'webpack'; import webpackConfig from '../webpack.config.js'; async function build() { return new Promise((resolve, reject) => { webpack(webpackConfig[1]).run((errServer, serverStats) => { if (errServer) reject(errServer); console....
}); }); }); }
<|file_name|>struct2tensor_ops_test.py<|end_file_name|><|fim▁begin|># Copyright 2019 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 License at # # http://www.apache.org/licenses/LICENSE...
def _get_full_message_level_runnable(proto_list): return _make_dict_runnable(_parse_full_message_level_as_dict(proto_list))
<|file_name|>method.py<|end_file_name|><|fim▁begin|>from lims.browser import BrowserView from dependencies.dependency import getToolByName from dependencies.dependency import check as CheckAuthenticator import json class ajaxGetInstruments(BrowserView): """ Returns a json list with the instruments assigned to the ...
'title': <instrument_absolute_path>, 'url': <instrument_url>, 'outofdate': True|False, 'qcfail': True|False,
<|file_name|>new.js<|end_file_name|><|fim▁begin|>import Ember from 'ember'; export default Ember.Controller.extend({ actions: { create() { this.get('model').save().then((user) => {<|fim▁hole|> }) } } });<|fim▁end|>
this.transitionToRoute('admin.users.show', user);
<|file_name|>ParamTableRules.java<|end_file_name|><|fim▁begin|>package fr.inria.contraintes.biocham.modelData; import fr.inria.contraintes.biocham.BiochamDynamicTree; import fr.inria.contraintes.biocham.BiochamMainFrame; import fr.inria.contraintes.biocham.BiochamModel; import fr.inria.contraintes.biocham.BiochamModel...
jt=trees.get(t); jt.setToolTipText("Show expanded rules..."); String s=jt.getName(); ArrayList<TreeNode> nodes = new ArrayList<TreeNode>();
<|file_name|>base.py<|end_file_name|><|fim▁begin|>""" tests can be run from the root dir with: clean-pyc && \ APP_ID= APP_KEY= coverage run --source=. --branch `which nosetests` tests/* &&\<|fim▁hole|>""" import os from unittest import TestCase from mock import patch from dandelion import Datagem, DandelionException,...
coverage html
<|file_name|>alg_runner.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use network::{ DoubleVec, Network, NodeId }; use network::algorithms::{ dijkstra, pagerank }; use usage::{ DEFAULT_BETA, DEFAULT_EPS, DEFAULT_START_ID, Args }; #[derive(Debug, RustcDecodable)] pub enum Algorithm { dijkstra, pageran...
for i in (0..pred.len()).take(100) { let to_id = i as NodeId; let from_node = get_node_name(pred.get(i).unwrap(), &id_to_node);
<|file_name|>Schema.java<|end_file_name|><|fim▁begin|>package water.api; import org.reflections.Reflections; import java.lang.reflect.Array; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; import java.lang.reflect.ParameterizedType; import java.la...
Log.debug("Registering subclasses of: " + clz.toString() + " in package: " + pkg); for (Class<? extends Schema> schema_class : reflections.getSubTypesOf(clz)) if (!Modifier.isAbstract(schema_class.getModifiers())) Schema.register(schema_class);
<|file_name|>funcs_test.go<|end_file_name|><|fim▁begin|>package funcs<|fim▁hole|> "testing" ) func TestFuncs(t *testing.T) { Urlfilter("hi") }<|fim▁end|>
import (
<|file_name|>hash.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 Pants project contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). use std::fmt; use std::io::{Write, Result}; use blake2_rfc::blake2b::Blake2b; const FINGERPRINT_SIZE: usize = 32; #[derive(Clone, Cop...
/// Returns the result of fingerprinting this stream, and Drops the stream. ///
<|file_name|>BaseAttachmentTargetResponseEntityReaderTest.java<|end_file_name|><|fim▁begin|>/** * */ package com.eclipsesource.gerrit.plugins.fileattachment.api.test.converter; import java.util.ArrayList; import java.util.List; import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.junit.Test;<|fim▁...
import com.eclipsesource.gerrit.plugins.fileattachment.api.AttachmentTarget; import com.eclipsesource.gerrit.plugins.fileattachment.api.AttachmentTargetDescription;
<|file_name|>transport_test.go<|end_file_name|><|fim▁begin|>package chord import ( "bytes" "testing" ) type MockVnodeRPC struct { err error pred *Vnode not_pred *Vnode succ_list []*Vnode key []byte succ []*Vnode skip *Vnode } func (mv *MockVnodeRPC) GetPredecessor() (*Vnode, erro...
}