prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>htmlpreelement.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::HTMLPreElementBi...
use dom::node::Node; use dom_struct::dom_struct; use html5ever::{LocalName, Prefix};
<|file_name|>rules.py<|end_file_name|><|fim▁begin|>rules = [ { "name": "always false",<|fim▁hole|><|fim▁end|>
"rule": lambda container: False } ]
<|file_name|>anchor_spec.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {Injector, RenderComponentType, RootRenderer, Saniti...
}); it('should create views with multiple root anchor nodes', () => { const rootNodes =
<|file_name|>config-retry1.py<|end_file_name|><|fim▁begin|>TASKS = { "tests.tasks.general.Retry": { "max_retries": 1, "retry_delay": 1 }<|fim▁hole|><|fim▁end|>
}
<|file_name|>when.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Friendly Dates and Times """ # Disable pylint's invalid name warning. 'tz' is used in a few places and it # should be the only thing causing pylint to include the warning. # pylint: disable-msg=C0103 import calendar import datetime import ...
assert hasattr(value, 'tzinfo') return value.tzinfo is not None and \
<|file_name|>secname_app.cpp<|end_file_name|><|fim▁begin|>/*BEGIN_LEGAL Intel Open Source License Copyright (c) 2002-2013 Intel Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistrib...
the Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without
<|file_name|>value.rs<|end_file_name|><|fim▁begin|>// Distributed under the OSI-approved BSD 3-Clause License. // See accompanying LICENSE file for details. <|fim▁hole|>pub use crates::dbus_serialize::types::*;<|fim▁end|>
pub use crates::dbus_bytestream::marshal::Marshal;
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation from django.contrib.contenttypes.models import ContentType from django.db import models from base.models import ModelloSemplice from base.tratti import ConMarcaTemporale class Giudizi...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>""" Python-packaging for synbiomts Copyright 2017 Alexander C. Reis, Howard M. Salis, all rights reserved. """ from setuptools import setup def readme(): with open('README.rst') as f: return f.read() <|fim▁hole|> version='1.0', description='T...
setup(name='synbiomts',
<|file_name|>pilot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from modules import Robot import time r = Robot.Robot() state = [0, 1000, 1500] (run, move, write) = range(3) i = run slowdown = 1 flag_A = 0 flag_C = 0 lock = [0, 0, 0, 0] while(True): a = r.Read() for it in range(len(lock)): ...
<|file_name|>zz_generated_auth_provider_lifecycle_adapter.go<|end_file_name|><|fim▁begin|>package v3public import ( "github.com/rancher/norman/lifecycle" "github.com/rancher/norman/resource" "k8s.io/apimachinery/pkg/runtime" ) type AuthProviderLifecycle interface {<|fim▁hole|> type authProviderLifecycleAdapter str...
Create(obj *AuthProvider) (runtime.Object, error) Remove(obj *AuthProvider) (runtime.Object, error) Updated(obj *AuthProvider) (runtime.Object, error) }
<|file_name|>debounce.py<|end_file_name|><|fim▁begin|>"""Debounce helper.""" from __future__ import annotations import asyncio from collections.abc import Awaitable, Callable from logging import Logger from typing import Any from homeassistant.core import HassJob, HomeAssistant, callback class Debouncer: """Cla...
except Exception: # pylint: disable=broad-except self.logger.exception("Unexpected exception from %s", self.function)
<|file_name|>query.py<|end_file_name|><|fim▁begin|>""" Create SQL statements for QuerySets. The code in here encapsulates all of the SQL construction so that QuerySets themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know...
return self.annotation_select[name] else: field_list = name.split(LOOKUP_SEP) field, sources, opts, join_list, path = self.setup_joins(
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code, unused_macros)] pub mod callback; #[macro_use] #[path = "../../src/utils/memzeroize.rs"] pub mod zeroize; #[path = "../../src/utils/environment.rs"] pub mod environment; pub mod pool; pub mod crypto; pub mod did; pub mod wallet; pub mod ledger; pu...
<|file_name|>0002_auto_20180826_0054.py<|end_file_name|><|fim▁begin|># Generated by Django 2.1 on 2018-08-26 00:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('model_filefields_example', '0001_initial'), ] operations = [ migrations.A...
), migrations.AlterField( model_name='book', name='index',
<|file_name|>hooks.js<|end_file_name|><|fim▁begin|>var resource = require('../'), creature = resource.define('creature'); creature.persist('memory'); creature.property('name');<|fim▁hole|> console.log('before creature.create') data.name += '-a'; next(null, data) }); creature.after('create', function (data, ...
creature.before('create', function (data, next) {
<|file_name|>CharUtils.cpp<|end_file_name|><|fim▁begin|>/////////////////////////////////////////////////////////////////////////////// // // This file is part of libntfslinks. // // Copyright (c) 2014, Jean-Philippe Steinmetz // All rights reserved. <|fim▁hole|>// // Redistribution and use in source and binary ...
<|file_name|>build-json-language-data.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """Parses language data from IANA subtag registry plus several other files, and outputs JSON data in the following format: [ { 'name': 'Ghotuo', 'code': { 'three': 'aaa' }, 'country': ['Nigeria'], ...
COUNTRY_CODES_FNAME = "CountryCodes.txt" LANGUAGE_CODES_FNAME = "LanguageCodes.txt" LANGUAGE_INDEX_FNAME = "LanguageIndex.txt" CONVERT_2_TO_3_FNAME = "TwoToThreeCodes.txt"
<|file_name|>SimpleUserPrincipal.java<|end_file_name|><|fim▁begin|>/* * Copyright 2015-2016 DevCon5 GmbH, info@devcon5.ch * * 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:/...
@Override public String getName() { return this.name;
<|file_name|>test_languages.py<|end_file_name|><|fim▁begin|># This file is part of Shoop. #<|fim▁hole|># LICENSE file in the root directory of this source tree. import pytest from django.utils import translation from shoop.simple_cms.models import Page from shoop_tests.simple_cms.utils import create_multilanguage_page...
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the
<|file_name|>template.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding: utf-8 import mistune from pygments import highlight from pygments.lexers import get_lexer_by_name from pygments.formatters import html from flask import current_app, render_template from application.models.system import site from ...
'site': site, 'has': has, 'tags': { 'join': lambda x: '',
<|file_name|>topi_integration.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 licenses this file # to you under th...
_REGISTERED_DISPATCHER = {
<|file_name|>type_props.rs<|end_file_name|><|fim▁begin|>use proc_macro2::TokenStream; use quote::quote; use std::default::Default; use syn::{parse_quote, DeriveInput, Ident, Path, Visibility}; use super::case_style::CaseStyle; use super::metadata::{DeriveInputExt, EnumDiscriminantsMeta, EnumMeta}; use super::occurrenc...
pub discriminant_vis: Option<Visibility>, } impl HasTypeProperties for DeriveInput {
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import os import curses import cumodoro.config as config import cumodoro.interface as interface import cumodoro.globals as globals from cumodoro.cursest import Refresher import logging log = logging.getLogger('...
def get_title(): print("\x1B[23t") return sys.stdin.read()
<|file_name|>box.rs<|end_file_name|><|fim▁begin|>// https://rustbyexample.com/std/box.html // http://rust-lang-ja.org/rust-by-example/std/box.html use std::mem; #[allow(dead_code)] #[derive(Debug, Clone, Copy)] struct Point { x: f64, y: f64, } #[allow(dead_code)] struct Rectangle { p1: Point, p2: Poi...
fn boxed_origin() -> Box<Point> { // Allocate this point in the heap, and return a pointer to it Box::new(Point { x: 0.0, y: 0.0 })
<|file_name|>bitcoin_pl.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="pl" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About C2coin</source> ...
<source>Show transaction details</source> <translation>Pokaż szczegóły transakcji</translation>
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>extern crate protoc;<|fim▁hole|>extern crate protoc_rust; use std::env; use std::fs; fn main() { if env::var("CARGO_FEATURE_PROTOCOLS").is_ok() { generate_protocols(); } } fn generate_protocols() { let protocols = protocol_files(); protoc_rus...
<|file_name|>server.js<|end_file_name|><|fim▁begin|>/** * Created by Stefan on 9/19/2017 */ /** * Created by Stefan Endres on 08/16/2017. */ 'use strict' var http = require('http'), https = require('https'), url = require('url'), util = require('util'), fs = require('fs'), path = require('path...
<|file_name|>markupbase.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
raise NotImplementedError("markupbase is not yet implemented in Skulpt")
<|file_name|>test_lms_user_preview.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Tests the "preview" selector in the LMS that allows changing between Staff, Learner, and Content Groups. """ from textwrap import dedent from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc f...
course_page.a11y_audit.config.set_rules({ 'ignore': [
<|file_name|>make_release.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import os import sys from subprocess import Popen, PIPE from getpass import getpass from shutil import rmtree import argparse # inspired by https://github.com/mitsuhiko/flask/blob/master/scripts/make-release.py def set_f...
return version_str_to_lst(namespace['version']) def get_git_tags():
<|file_name|>McAfee_DXL.py<|end_file_name|><|fim▁begin|>from typing import Dict import tempfile from dxlclient.client_config import DxlClientConfig from dxlclient.client import DxlClient from dxlclient.broker import Broker from dxlclient.message import Event import demistomock as demisto from CommonServerPython import ...
def push_ip(self, ip, trust_level, topic):
<|file_name|>script.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Startup utilities""" # pylint:skip-file import os import sys from functools import partial import paste.script.command import werkzeug.script etc = partial(os.path.join, 'parts', 'etc') DEPLOY_INI = etc('deploy.ini') DEPLOY_CFG = etc('de...
# bin/flask-ctl stop
<|file_name|>Max.java<|end_file_name|><|fim▁begin|>package ru.job4j.max; /** *Класс помогает узнать, какое из двух чисел больше. *@author ifedorenko *@since 14.08.2017 *@version 1 */ public class Max { /** *Возвращает большее число из двух. *@param first содержит первое число *@param second содержит второе чис...
<|file_name|>CharacterReader.java<|end_file_name|><|fim▁begin|>package org.jsoup.parser; import org.jsoup.helper.Validate; import java.util.Arrays; import java.util.Locale; /** CharacterReader consumes tokens off a string. To replace the old TokenQueue. */ final class CharacterReader { static final char EOF = ...
<|file_name|>controller.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
Controller = undefined;
<|file_name|>generated_expansion.go<|end_file_name|><|fim▁begin|>// Code generated by client-gen. DO NOT EDIT. package v1 type APIServerExpansion interface{} type AuthenticationExpansion interface{} type BuildExpansion interface{} type ClusterOperatorExpansion interface{} type ClusterVersionExpansion interface{} ...
type ImageContentPolicyExpansion interface{}
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- #Copyright (C) 2013 Jonathan Delvaux <dumpformat@djoproject.net> #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 F...
import unittest
<|file_name|>Detail.js<|end_file_name|><|fim▁begin|>import React, {useContext} from 'react'; import {StyleSheet, ScrollView, Text, View, Platform, TouchableHighlight} from 'react-native'; import {NavigationContext} from 'navigation-react'; import {NavigationBar, RightBar, BarButton, SharedElement, useNavigated} from 'n...
paddingTop: 10, }, color: { height: 300,
<|file_name|>test_datatype_stringarray.py<|end_file_name|><|fim▁begin|>""" """ import unittest import arcpy from gsfarc.test import config<|fim▁hole|>class TestDataTypeStringArray(unittest.TestCase): """Tests the string array task datatype""" @classmethod def setUpClass(cls): config.setup_idl_to...
<|file_name|>test_grid_definition_template_40.py<|end_file_name|><|fim▁begin|># (C) British Crown Copyright 2015 - 2016, Met Office # # This file is part of iris-grib. # # iris-grib 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 ...
<|file_name|>test_refresh.py<|end_file_name|><|fim▁begin|># vim: fileencoding=utf-8 et sw=4 ts=4 tw=80: # python-quilt - A Python implementation of the quilt patch system<|fim▁hole|># # See LICENSE comming with the source of python-quilt for details. import os from helpers import make_file from unittest import TestC...
<|file_name|>restore-topology.rs<|end_file_name|><|fim▁begin|>use futures_lite::stream::StreamExt; use lapin::{options::*, topology::*, BasicProperties, Connection, ConnectionProperties, Result}; use tracing::info; fn main() -> Result<()> { if std::env::var("RUST_LOG").is_err() { std::env::set_var("RUST_LO...
Ok(()) }) }
<|file_name|>token.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Ian Good # Copyright 2014 Ryan Lane # # 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 Licen...
pipe.setex(token_key, json_data, ttl_seconds) if user_id:
<|file_name|>path.rs<|end_file_name|><|fim▁begin|>use fnv; use super::Entry; #[derive(Debug, Clone)] pub struct Path { pub src: u32, pub dst: u32, pub path: Result<Vec<u32>,PathError>, } #[derive(Debug, Clone)] pub enum PathError { NoSuchPath, Terminated(u32) } impl Path { pub fn len(&self) -...
false }
<|file_name|>A.java<|end_file_name|><|fim▁begin|>public class A extends B { public A() {}<|fim▁hole|><|fim▁end|>
}
<|file_name|>qt4.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) 2010 TUBITAK/UEKAE # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, o...
def make(parameters=''): cmaketools.make(parameters)
<|file_name|>test_disk_offering.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import logging from django.core.cache import cache from django.test import TestCase from django.contrib import admin from physical.tests.factory import DiskOfferingFactory, En...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # (c) 2013, Russell Stuart. # Licensed under GPLv2, or any later version. See COPYING for details. # from distutils.core import setup import re<|fim▁hole|> pass long_description=[] for line in handle: if line.startswith("====="): ...
def get_long_description(): handle = open("doc/lrparsing.rst") while not next(handle).startswith("====="):
<|file_name|>jquery.acewidget.js<|end_file_name|><|fim▁begin|>// anonymous closure - BEGIN (function(jQuery){ // anonymous closure - BEGIN ////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////// // include m...
var event = jQueryEvent.originalEvent;
<|file_name|>TestCHIPCallback.cpp<|end_file_name|><|fim▁begin|>/* * * Copyright (c) 2020 Project CHIP 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...
* Test Suite. It lists all the test functions. */ // clang-format off
<|file_name|>unboxed-closures-all-traits.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://ww...
// option. This file may not be copied, modified, or distributed // except according to those terms.
<|file_name|>run_eat_at_restaurant.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> fn main() { restaurant::eat_at_restaurant(); }<|fim▁end|>
extern crate restaurant; // Optional in Rust 2018
<|file_name|>scheduler.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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/lic...
if isinstance(v, float): self._active_workers[k] = Worker(worker_id=k, last_active=v) # Compatibility since 2015-05-28
<|file_name|>testPathHelpers.py<|end_file_name|><|fim▁begin|>############################################################################### # lazyflow: data flow based lazy parallel computation framework # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # #...
# See the files LICENSE.lgpl2 and LICENSE.lgpl3 for full text of the # GNU Lesser General Public License version 2.1 and 3 respectively. # This information is also available on the ilastik web site at: # http://ilastik.org/license/
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Meta-estimators for building composite models with transformers In addition to its current contents, this module will eventually be home to refurbished versions of Pipeline and FeatureUnion. <|fim▁hole|> __all__ = [ 'ColumnTransformer', 'make_column_tra...
""" from ._column_transformer import ColumnTransformer, make_column_transformer from ._target import TransformedTargetRegressor
<|file_name|>unassignedbugs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 import urllib2 import urllib from BeautifulSoup import BeautifulSoup import smtplib import ConfigParser # Retreive user information config = ConfigParser.ConfigParser() config.read('config.cfg') user = config.get('data','user') passwor...
<|file_name|>toString.spec.js<|end_file_name|><|fim▁begin|>"use strict"; var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(o...
it("should not matter which order the chain is called in", function () { User.find.where("id", 1).one.toString().should.eql("User.find.one.where(\"id\", 1)"); }); });
<|file_name|>omnet_vector.py<|end_file_name|><|fim▁begin|># # Python module to parse OMNeT++ vector files # # Currently only suitable for small vector files since # everything is loaded into RAM # # Authors: Florian Kauer <florian.kauer@tuhh.de> # # Copyright (c) 2015, Institute of Telematics, Hamburg University of Tec...
# notice, this list of conditions and the following disclaimer.
<|file_name|>FlatgridKeyingTest.ts<|end_file_name|><|fim▁begin|>import { FocusTools, Keyboard, Keys, Step } from '@ephox/agar'; import { UnitTest } from '@ephox/bedrock'; import { Objects } from '@ephox/boulder'; import { Arr } from '@ephox/katamari'; import * as Behaviour from 'ephox/alloy/api/behaviour/Behaviour'; i...
components: Arr.map(squares, (num) => {
<|file_name|>DrawCanvas.java<|end_file_name|><|fim▁begin|>package com.baselet.gwt.client.view; import java.util.List; import com.baselet.control.basics.geom.Rectangle; import com.baselet.control.config.SharedConfig; import com.baselet.control.enums.ElementId; import com.baselet.element.Selector; import com.baselet.el...
// TODO would not work because canvas gets always resized and therefore cleaned -> so everything must be redrawn // private boolean tryOptimizedDrawing() { // List<GridElement> geToRedraw = new ArrayList<GridElement>();
<|file_name|>model_fields.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import arrow from django.db.models import DateTimeField, SubfieldBase from .form_fields import ArrowField as ArrowFormField class ArrowField(DateTimeField):<|fim▁hole|> return value value = super(Arro...
__metaclass__ = SubfieldBase def to_python(self, value): if isinstance(value, arrow.Arrow):
<|file_name|>early-vtbl-resolution.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.apac...
// option. This file may not be copied, modified, or distributed
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//#![feature(getpid)] #![allow(unknown_lints, bool_comparison)] // NOTE: when running on the simple wiki, parsing is slightly different // run with `cargo build --features=simple` // LOGGING #[macro_use] extern crate slog; extern crate slog_term; // SERIALIZING #[macro...
extern crate chrono; // COMPONENTS pub mod link_state;
<|file_name|>ApplicationInit.java<|end_file_name|><|fim▁begin|>/* * Copyright 2014 Space Dynamics Laboratory - Utah State University Research Foundation. * * 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...
@Override public void contextDestroyed(ServletContextEvent sce)
<|file_name|>lang-item-missing.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.o...
<|file_name|>state.py<|end_file_name|><|fim▁begin|>import pyintersim.corelib as corelib import ctypes ### Load Library _core = corelib.LoadCoreLibrary() <|fim▁hole|>class State: """Wrapper Class for the State""" def __init__(self): self.p_state = setup() def __enter__(self): return self.p...
### State wrapper class to be used in 'with' statement
<|file_name|>Views.ts<|end_file_name|><|fim▁begin|>import * as AdhBadge from "../Badge/Badge"; import * as AdhConfig from "../Config/Config"; import * as AdhHttp from "../Http/Http"; import * as AdhMovingColumns from "../MovingColumns/MovingColumns"; import * as AdhPermissions from "../Permissions/Permissions"; import ...
supportEmail : string; success : boolean;
<|file_name|>0003_delete_empty_desc_feedback.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Deletes all feedback that have a description that's an empty string. """ from __future__ import unicode_literals import sys from django.db import models, migrations def delete_feedback(apps, schema_editor): ...
]
<|file_name|>JavaLangToString.java<|end_file_name|><|fim▁begin|><|fim▁hole|>import com.github.sergejsamsonow.codegenerator.api.producer.sc.SCMethodCodeConcatenator; import com.github.sergejsamsonow.codegenerator.api.producer.sc.SCNewLineAndIndentationFormat; import com.github.sergejsamsonow.codegenerator.producer.pojo....
package com.github.sergejsamsonow.codegenerator.producer.pojo.renderer;
<|file_name|>provides.py<|end_file_name|><|fim▁begin|>from charms.reactive import Endpoint, when class TestAltProvides(Endpoint): invocations = [] @when('endpoint.{endpoint_name}.joined') def handle_joined(self): self.invocations.append('joined: {}'.format(self.endpoint_name)) @when('endpoin...
self.invocations.append('changed.foo: {}'.format(self.endpoint_name))
<|file_name|>router.js<|end_file_name|><|fim▁begin|>Router.map(function(){ this.route('home',{ path:'/', template: 'home', onBeforeAction: function(pause){ this.subscribe('getAlgosByReg',Session.get('mainQuery')).wait(); this.subscribe('getAlgosByName',Session.get('mainQuery')).wait(); this.subscribe('g...
});
<|file_name|>neuron.py<|end_file_name|><|fim▁begin|>import h5py import sys import os.path as op from fos import * import numpy as np a=np.loadtxt(op.join(op.dirname(__file__), "data", "rat-basal-forebrain.swc") ) pos = a[:,2:5].astype( np.float32 ) radius = a[:,5].astype( np.float32 ) * 4 # extract parent connectivi...
vertices = pos,
<|file_name|>ns3_module_dot11s.py<|end_file_name|><|fim▁begin|>from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() ## simple-ref-count.h: ns3::SimpleRefCount<ns3::dot11s::IeBeaconTimingUnit, ns3::empty, ns3::DefaultD...
return def register_Ns3Dot11sIePeerManagement_methods(root_module, cls):
<|file_name|>plot_tsl.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import sys import re import numpy as np import matplotlib.pyplot as plt import argparse remove_comments = re.compile("(?!\#)", re.VERBOSE) parser = argparse.ArgumentParser() parser.add_argument("-f", nargs=1, default=None) parser.add_argument("...
<|file_name|>SmoothScroll.js<|end_file_name|><|fim▁begin|>/*! * smooth-scroll v16.1.0 * Animate scrolling to anchor links * (c) 2019 Chris Ferdinandi * MIT License * http://github.com/cferdinandi/smooth-scroll */ (function (root, factory) { if (typeof define === 'function' && define.amd) { define([],...
*/ if (window.pageYOffset === 0) {
<|file_name|>vtkExporter.py<|end_file_name|><|fim▁begin|>from yade import export,polyhedra_utils mat = PolyhedraMat() O.bodies.append([ sphere((0,0,0),1), sphere((0,3,0),1), sphere((0,2,4),2), sphere((0,5,2),1.5), facet([Vector3(0,-3,-1),Vector3(0,-2,5),Vector3(5,4,0)]), facet([Vector3(0,-3,-1),Vector3(0,-2,5),V...
polyhedra_utils.polyhedra(mat,(1,2,3),0), polyhedra_utils.polyhedralBall(2,20,mat,(-2,-2,4)), ])
<|file_name|>fias.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # coding=utf-8 """ # fias2postgresql Импорт ФИАС (http://fias.nalog.ru) в PostgreSQL. Необходимы: * *python3.2+* с пакетами [requests](http://docs.python-requests.org/en/latest/), [lxml](http://lxml.de) * *unrar* * [*pgdbf*](https://github.c...
<|file_name|>model_template.py<|end_file_name|><|fim▁begin|># @name <%= app_name %> # @description<|fim▁hole|> class <%= endpoint %>Model(BaseModel): _parse_class_name = '<%= table %>' pass<|fim▁end|>
# Models for UserControler. import json from src.models import BaseModel
<|file_name|>msg_test.go<|end_file_name|><|fim▁begin|>package msg import ( "testing" ) func Test_Analysis(t *testing.T) { st := "HI!"<|fim▁hole|> st = ":set_name 123" mt, msg = Analysis(st) t.Logf("msgType = %v\tcontent = %v", mt, msg) }<|fim▁end|>
mt, msg := Analysis(st) t.Logf("msgType = %v\tcontent = %v", mt, msg)
<|file_name|>OptionParser.cpp<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under t...
m_timeout = 0; m_transport = 0; m_address = 0;
<|file_name|>any.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licens...
//! fn do_work<T: Show+'static>(value: &T) { //! log(value); //! // ...do some other work //! }
<|file_name|>guard.rs<|end_file_name|><|fim▁begin|>use std::io::{self, Write}; use std::sync::mpsc::{SyncSender, SendError}; pub struct Guard(SyncSender<()>); impl Guard { pub fn new(tx: SyncSender<()>) -> Self { Guard(tx) } pub fn stop(self) -> Result<(), SendError<()>> { self.0.send(())...
}
<|file_name|>datasource.py<|end_file_name|><|fim▁begin|>""" DataSource is a wrapper for the OGR Data Source object, which provides an interface for reading vector geometry data from many different file formats (including ESRI shapefiles). When instantiating a DataSource object, use the filename of a GDAL-supporte...
else: self._write = 0
<|file_name|>languages.py<|end_file_name|><|fim▁begin|># encoding: utf-8 # Author: Zhang Huangbin <zhb@iredmail.org> import os import glob import web langmaps = { 'en_US': u'English (US)', 'sq_AL': u'Albanian', 'ar_SA': u'Arabic', 'hy_AM': u'Armenian', 'az_AZ': u'Azerbaijani', 'bs_BA': u'Bosni...
languagemaps = {} for i in available_langs:
<|file_name|>mongoose-error.directive.js<|end_file_name|><|fim▁begin|>'use strict'; /**<|fim▁hole|> .directive('mongooseError', function () { return { restrict: 'A', require: 'ngModel', link: function(scope, element, attrs, ngModel) { element.on('keydown', function() { return n...
* Removes server error when user updates input */ angular.module('assassinsApp')
<|file_name|>SearchServer.java<|end_file_name|><|fim▁begin|>/* * Copyright 2014 University of Zürich, SIB, and others. * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"...
*
<|file_name|>cdbgui.py<|end_file_name|><|fim▁begin|>"""cdbgui.py Developers: Christina Hammer, Noelle Todd Last Updated: August 19, 2014 This file contains a class version of the interface, in an effort to make a program with no global variables. """ from datetime import datetime, timedelta, date from tkinter import...
return
<|file_name|>310.js<|end_file_name|><|fim▁begin|><|fim▁hole|> { "Id": 945, "Chapter": 310, "Name": "wxWizard", "Sort": 0 } ]<|fim▁end|>
var __v=[
<|file_name|>main.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('meanDemoApp') .config(function ($stateProvider) { $stateProvider .state('main', {<|fim▁hole|> templateUrl: 'app/main/main.html', controller: 'MainCtrl' }); });<|fim▁end|>
url: '/',
<|file_name|>model.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # ------------------------------------------------------------------------- # Portello membership system # Copyright (C) 2014 Klubb Alfa Romeo Norge # # This program is free software; you can redistribute it and/or modify # it under the terms of...
# You should have received a copy of the GNU General Public License along
<|file_name|>decorators.py<|end_file_name|><|fim▁begin|>import sys import inspect from functools import partial __all__ = ['decorator', 'wraps', 'unwrap', 'ContextDecorator', 'contextmanager'] def decorator(deco): # Any arguments after first become decorator arguments has_args = get_argcounts(deco) != (1, F...
return make_decorator(deco, dargs, dkwargs) return wraps(deco)(decorator_fab) else:
<|file_name|>expressions.rs<|end_file_name|><|fim▁begin|>use super::*; use expressions::{expression, Property, PropertyKey}; use nom::Slice; use tests::utils::GetLocation; fn check_expression<'a, F>(expression_to_parse: &'a str, get_expected: F) where F: Fn(StrSpan<'a>) -> Expression<'a> { let input = StrSpan:...
}
<|file_name|>CubicFileGenerator.java<|end_file_name|><|fim▁begin|>package thesis; import java.io.File; import java.io.FileNotFoundException; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import termo.component.Compound; import termo.eos.Cubic; import termo.eos.EquationsOfState; import termo...
for(double reducedTemperature = min_reducedTemperature; reducedTemperature <= max_reducedTemperature; reducedTemperature +=0.1){ for(double reducedPressure = min_reducedPressure ; reducedPressure <= max_reducedPressure; reducedPressure+= pressurepass){ double temperature = criticalTemperature * reducedTem...
<|file_name|>simpleitems.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import print_function from acq4.util import Qt import acq4.pyqtgraph as pg from .CanvasItem import CanvasItem from .itemtypes import registerItemType class GridCanvasItem(CanvasItem): _typeName = "Grid" def ...
registerItemType(RulerCanvasItem)
<|file_name|>redirector_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import unittest from compiled_file_system import CompiledFile...
'apps': { 'redirects.json': json.dumps({
<|file_name|>utime.js<|end_file_name|><|fim▁begin|>// load package date-util require('../libs/sugar-date') module.exports = (pluginContext) => { return { respondsTo: (query) => { return true }, search: (query = '', env = {}) => { // check if timestamp given ...
// create Sugar Date var sugarDate = Sugar.Date.create(query);
<|file_name|>constants.js<|end_file_name|><|fim▁begin|>(function() { 'use strict'; angular<|fim▁hole|> .module('app') .constant('FIREBASE_BASE_URL', 'https://word-game-d1e51.firebaseio.com'); })();<|fim▁end|>
<|file_name|>fetch-polyfill.ts<|end_file_name|><|fim▁begin|>import { default as nodeFetch, Headers, Request, Response, } from 'node-fetch'; // Registering Fetch as a glboal polyfill (<any> global).fetch = nodeFetch; (<any> global).Request = Request;<|fim▁hole|><|fim▁end|>
(<any> global).Headers = Headers; (<any> global).Response = Response;
<|file_name|>halo_endpoint.py<|end_file_name|><|fim▁begin|>"""HaloEndpoint class""" import cloudpassage.sanity as sanity from .utility import Utility as utility from .http_helper import HttpHelper class HaloEndpoint(object): """Base class inherited by other specific HaloEndpoint classes.""" default_endpoint...