prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>DocumentDescriptionJsonUnmarshaller.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017-2022 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 L...
<|file_name|>fw.js<|end_file_name|><|fim▁begin|>var myTimeout = 12000; Storage.prototype.setObject = function(key, value) { this.setItem(key, JSON.stringify(value)); }; Storage.prototype.getObject = function(key) { var value = this.getItem(key); return value && JSON.parse(value); }; // Обеспечиваем поддержу XMLHt...
} // window.onerror = myErrHandler; //назначаем обработчик для события onerror // ПОТОМ ВКЛЮЧИТЬ window.onerror = myErrHandler;
<|file_name|>index.go<|end_file_name|><|fim▁begin|>// Copyright 2015 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License");<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License...
// you may not use this file except in compliance with the License. // You may obtain a copy of the License at //
<|file_name|>sql_part.ts<|end_file_name|><|fim▁begin|>import { clone } from 'lodash'; export class SqlPartDef { type: string; style: string; label: string; params: any[]; defaultParams: any[]; wrapOpen: string; wrapClose: string; separator: string; constructor(options: any) { this.type = options...
this.params.splice(index, 1);
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict'; var util = require('../node_modules/mapbox-gl/js/util/util'); try { main(); } catch (err) { log('red', err.toString()); throw err; } function main() { var benchmarks = { simple_select_small: require('./tests/simple_select_small'...
}); testDiv.innerHTML = innerHTML;
<|file_name|>actions_secrets.go<|end_file_name|><|fim▁begin|>// Copyright 2020 The go-github AUTHORS. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package github import ( "context" "fmt" ) // PublicKey represents the public key that...
<|file_name|>cached-map.model.ts<|end_file_name|><|fim▁begin|><|fim▁hole|> key: string } export interface CachedMap { lastModified: number data: any }<|fim▁end|>
export interface CachedMapEntry { cachedMap: CachedMap,
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import re<|fim▁hole|>def check_tag(root, expected): pattern = re.compile(r"{.*}([a-zA-Z]+)") for tag, el in zip(expected, root.iter()): m = pattern.match(el.tag) assert m is not None assert m.group(1) == tag, "Expect tag=%s, get %s" %...
from six.moves import zip
<|file_name|>moc_stackencadenamientos.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** Meta object code from reading C++ file 'stackencadenamientos.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.3.2) ** ** WARNING! All changes made in t...
#include <QtCore/qmetatype.h> #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'stackencadenamientos.h' doesn't include <QObject>."
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """digitalocean API to manage droplets""" __version__ = "1.16.0" __author__ = "Lorenzo Setale ( http://who.is.lorenzo.setale.me/? )" __author_email__ = "lorenzo@setale.me" __license__ = "LGPL v3" __copyright__ = "Copyright (c) 2012-2020 Lore...
from .Balance import Balance from .Domain import Domain from .Record import Record
<|file_name|>assistant_to_the_transport_manager_spec.js<|end_file_name|><|fim▁begin|>var Mocks = require("mocks"); var AssistantToTheTransportManager = require('core/transports/assistant_to_the_transport_manager').default; var Util = require('core/util').default; describe("AssistantToTheTransportManager", function() {...
); }); });
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>/// Definition of Tantivy's error and result. use std::io; use std::path::PathBuf; use std::error; use std::sync::PoisonError; use directory::error::{OpenReadError, OpenWriteError, OpenDirectoryError}; use query; use schema; use fastfield::FastFieldNotAvailableError;...
<|file_name|>babynames.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re """Baby Names ex...
if not year_match: # We didn't find a year, so we'll exit with an error message. sys.stderr.write('Couldn\'t find the year!\n') sys.exit(1)
<|file_name|>MessageEncode.java<|end_file_name|><|fim▁begin|>package org.epilot.ccf.codec; import org.apache.mina.common.ByteBuffer; import org.epilot.ccf.core.code.AbstractMessageEncode; import org.epilot.ccf.core.protocol.Message; import org.epilot.ccf.core.protocol.MessageBody;<|fim▁hole|> public class MessageEnco...
import org.epilot.ccf.core.protocol.MessageHeader; import org.epilot.ccf.core.util.ByteBufferDataHandle;
<|file_name|>trait-safety-inherent-impl.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...
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed
<|file_name|>rock_paper_scissors_multiagent.py<|end_file_name|><|fim▁begin|>"""A simple multi-agent env with two agents playing rock paper scissors. This demonstrates running the following policies in competition: (1) heuristic policy of repeating the same move (2) heuristic policy of beating the last opponent...
<|file_name|>event_factory.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.utils import timezone from django.test import TestCase from django.contrib.auth.models import User from django.test.utils import override_settings import six from ha...
if is_response: response.content = content else:
<|file_name|>rand.py<|end_file_name|><|fim▁begin|>from axelrod import Player import random class Random(Player): """A player who randomly chooses between cooperating and defecting.""" name = 'Random' <|fim▁hole|> def strategy(self, opponent): return random.choice(['C','D'])<|fim▁end|>
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>"""todolist URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatte...
]
<|file_name|>pagination.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Third Party Stuff # Third Party Stuff from rest_framework.pagination import PageNumberPagination as DrfPageNumberPagination class PageNumberPagination(DrfPageNumberPagination): # Client can control the page using this query paramet...
# Default is 'None'. Set to eg 'page_size' to enable usage.
<|file_name|>database_config.py<|end_file_name|><|fim▁begin|>import psycopg2<|fim▁hole|> def server_db(): urlparse.uses_netloc.append("postgres") url = urlparse.urlparse(os.environ["DATABASE_URL"]) conn = psycopg2.connect(database=url.path[1:], user=url.username, password=url.password, host=url.hostname, p...
import urlparse import os
<|file_name|>0004_auto.py<|end_file_name|><|fim▁begin|># encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding index on 'Place', fields ['place_id'] db.c...
'Meta': {'unique_together': "(('parent', 'child'),)", 'object_name': 'PlaceRelation'}, 'child': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'place_parent'", 'to': "orm['storybase_geo.Place']"}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': ...
<|file_name|>infiniteConstraints.ts<|end_file_name|><|fim▁begin|>// @strict: true // Both of the following types trigger the recursion limiter in getImmediateBaseConstraint type T1<B extends { [K in keyof B]: Extract<B[Exclude<keyof B, K>], { val: string }>["val"] }> = B; type T2<B extends { [K in keyof B]: B[Ex...
<|file_name|>helpers.ts<|end_file_name|><|fim▁begin|><|fim▁hole|> if (status != null) { expect(actual.status).toBe(status); } if (message != null) { expect(actual.message).toBe(message); } };<|fim▁end|>
import {PreviewServerError} from '../../lib/preview-server/preview-error'; export const expectToBePreviewServerError = (actual: PreviewServerError, status?: number, message?: string) => { expect(actual).toEqual(jasmine.any(PreviewServerError));
<|file_name|>report_issue.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012-2015 Netforce Co. Ltd. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without...
<|file_name|>test_clexer.py<|end_file_name|><|fim▁begin|><|fim▁hole|> ~~~~~~~~~~~~~~~~~ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import unittest import os from pygments.token import Text, Number from pygments.lexers import CLexer clas...
# -*- coding: utf-8 -*- """ Basic CLexer Test
<|file_name|>SnipersMark.java<|end_file_name|><|fim▁begin|><|fim▁hole|> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later ver...
/* * Pixel Dungeon * Copyright (C) 2012-2015 Oleg Dolya
<|file_name|>css.js<|end_file_name|><|fim▁begin|>/* * Require-CSS RequireJS css! loader plugin * 0.1.8 * Guy Bedford 2014 * MIT */ /* * * Usage: * require(['css!./mycssFile']); * * Tested and working in (up to latest versions as of March 2013): * Android * iOS 6 * IE 6 - 10 * Chome 3 - 26 * Firefox 3.5...
<|file_name|>functions_b.js<|end_file_name|><|fim▁begin|>var searchData= [<|fim▁hole|><|fim▁end|>
['_7eqresourcestream',['~QResourceStream',['../classqsf_1_1QResourceStream.html#a5bea8c4481aec48f45d10c0b98e366a9',1,'qsf::QResourceStream']]], ['_7eqsfmlwidget',['~QSFMLWidget',['../classqsf_1_1QSFMLWidget.html#a4eae9c14ac6a8389edcd5949e154f337',1,'qsf::QSFMLWidget']]] ];
<|file_name|>runtime_isolator_tests.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 ...
using process::Future;
<|file_name|>KMeansSamplerTest.java<|end_file_name|><|fim▁begin|>package org.cobu.randomsamplers; import org.apache.commons.math3.ml.clustering.CentroidCluster; import org.apache.commons.math3.ml.clustering.DoublePoint; import org.apache.commons.math3.ml.distance.EuclideanDistance; import org.junit.Assert; import org....
@Test public void testGetTwoCentroidsAndSample() {
<|file_name|>sort.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved. # Use of this source code is governed by a BSD-style license (see the COPYING file). """ Topological sort """ from __future__ import absolute_import from __fu...
>>> topological_sort({ ... 'a' : ( 'g', 'b', 'c', 'd' ), ... 'b' : ( 'e', 'c' ), ... 'q' : ( 'u', 'i' ),
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>"""api_server URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpa...
""" from django.conf.urls import url, include from django.contrib import admin
<|file_name|>Style.js<|end_file_name|><|fim▁begin|>/** * Created by levchenko on 5/12/14. */ function Style(styles) { this.styles = styles; this.applyStyles = function (object) { for(var key in this.styles) {<|fim▁hole|> object.setAttribute('style', object.getAttribute('style') + key + ...
if(this.getStyleProperty(key) === false) {
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! # bittrex-api //! //! **bittrex-api** provides a wrapper for the [Bittrex API](https://bittrex.com/home/api). //! This crate makes it easy to consume the **Bittrex API** in Rust. //! //! ##Example //! //! ```no_run //! extern crate bittrex_api;<|fim▁hole|>//! # fn ...
//! //! use bittrex_api::BittrexClient;
<|file_name|>client_extensions_test.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @generated SignedSource<<691a67dec6705e4e28e898d46ea1d665>> *...
<|file_name|>ternary_search.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" ) // Part of Cosmos by OpenGenus Foundation func ternarySearch(data []int, left int, right int, value int) int { if right >= left { mid1 := left + (right-left)/3 mid2 := right - (right-left)/3 if data[mid1] == value { ...
}
<|file_name|>storageevent.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::EventBinding::Even...
Ok(event) } }
<|file_name|>bae.js<|end_file_name|><|fim▁begin|>//config file for bae if(sumeru.BAE_VERSION){ sumeru.config.database({ dbname : '', user: '',//bae 3.0 required password: ''//bae 3.0 required });<|fim▁hole|> }); }<|fim▁end|>
sumeru.config({ site_url : '' //with tailing slash
<|file_name|>generic-lifetime-trait-impl.rs<|end_file_name|><|fim▁begin|>// This code used to produce an ICE on the definition of trait Bar // with the following message: // // Type parameter out of range when substituting in region 'a (root // type=fn(Self) -> 'astr) (space=FnSpace, index=0) // // Regression test for ...
<|file_name|>InjectorApi.java<|end_file_name|><|fim▁begin|>/** * * Copyright (c) 2009-2016 Freedomotic team http://freedomotic.com * * This file is part of Freedomotic * * 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 t...
* @author Enrico Nicoletti
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>use failure::Error as FailureError; use reqwest::StatusCode; use super::response::PropfindParseError; /// Result which uses failure::Error by default. pub type Result<T> = ::std::result::Result<T, FailureError>; /// Our custom error type using Failure. #[derive(Fail...
NetworkingError(#[cause] ::reqwest::Error),
<|file_name|>DirectOpt.py<|end_file_name|><|fim▁begin|>""" MUSE -- A Multi-algorithm-collaborative Universal Structure-prediction Environment Copyright (C) 2010-2017 by Zhong-Li Liu <|fim▁hole|> terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License. Thi...
This program is free software; you can redistribute it and/or modify it under the
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>use std::collections::HashSet; use std::io; use serde::{Deserializer, Deserialize}; use reqwest; #[derive(Fail, Debug)] pub enum Error { #[fail(display = "{:?}", _0)] Codes(HashSet<Code>), #[fail(display = "{}", _0)] Reqwest(#[cause] reqwest::Error), ...
TimeoutOrDuplicate, Unknown(String) }
<|file_name|>actualSDN.py<|end_file_name|><|fim▁begin|>from ryu.base import app_manager from ryu.controller import ofp_event from ryu.controller.handler import CONFIG_DISPATCHER, MAIN_DISPATCHER from ryu.controller.handler import set_ev_cls from ryu.ofproto import ofproto_v1_3 from ryu.ofproto import ether from ryu.li...
<|file_name|>paramsExtractor.ts<|end_file_name|><|fim▁begin|>export class ParamsExtractor { static extract<Entity>(params: string[], objectReceived: Entity) { var objectToReturn = <Entity> {} var keyNames = Object.keys(objectReceived) for (var i = 0; i < keyNames.length; i++) { ...
<|file_name|>ByteFieldCodec.java<|end_file_name|><|fim▁begin|>/* * Copyright 2018 Sebastien Callier * * 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|>prot.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>use super::super::bio::*; pub fn run(input: &str) -> String { parse_rna(input) .chunks(3) .map(translate) .collect::<Seq<AminoAcid>>() .to_string() }<|fim▁end|>
<|file_name|>ImmutableTypeSetTest.java<|end_file_name|><|fim▁begin|>package com.koch.ambeth.util; import org.junit.Assert; import org.junit.Test; import com.koch.ambeth.ioc.util.ImmutableTypeSet; <|fim▁hole|> public interface MyType { // intended blank } public class MyClass implements MyType { // in...
public class ImmutableTypeSetTest {
<|file_name|>function.go<|end_file_name|><|fim▁begin|>package sol // TODO Merge with Clause? type Operator interface { Wrap(string) string // TODO errors? }<|fim▁hole|>func Function(name string, col Columnar) ColumnElem { return col.Column().AddOperator(FuncClause{Name: name}) } // Avg returns a column wrapped in t...
// Function adds a generic function to the column
<|file_name|>DataTable.d.ts<|end_file_name|><|fim▁begin|>import * as React from 'react'; interface DataTableProps { id?: string; value?: any[]; header?: any; footer?: any; style?: object; className?: string; tableStyle?: object; tableClassName?: string; paginator?: boolean; pagi...
onRowExpand?(e: {originalEvent: Event, data: any}): void; onRowCollapse?(e: {originalEvent: Event, data: any}): void; onContextMenu?(e: {originalEvent: Event, data: any}): void; onColReorder?(e: {originalEvent: Event, dragIndex: number, dropIndex: number, columns: any}): void;
<|file_name|>regex_map.py<|end_file_name|><|fim▁begin|>#coding=utf-8 ''' Created on 2013年7月13日 @author: huiyugeng ''' import types import ndb import regex ''' 载入解析映射 ''' def load_map(map_file): map_struct = ndb.load(map_file) map_list = ndb.execute(map_struct, 'select: map') return...
if regex.check_line('(\S+)\((\S+)\)', match): fun, value = regex.get_line('(\S+)\((\S+)\)', match)
<|file_name|>KapuaIllegalNullArgumentException.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2016, 2021 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms ...
* which is available at https://www.eclipse.org/legal/epl-2.0/
<|file_name|>contourAnimation.py<|end_file_name|><|fim▁begin|>import matplotlib.pyplot as plt import matplotlib.animation as animation import numpy as np # from sympy import * from src import jeffery_model as jm DoubleletStrength = np.array((1, 0, 0)) alpha = 1 B = np.array((0, 1, 0)) lbd = (alpha ** 2 - 1) / (alpha *...
Bij = Sij + lbd * Oij TrB2 = (Bij[0, 0, :] ** 2 + Bij[1, 1, :] ** 2 + Bij[2, 2, :] ** 2).reshape(x.shape) TrB3 = (Bij[0, 0, :] ** 3 + Bij[1, 1, :] ** 3 + Bij[2, 2, :] ** 3).reshape(x.shape) DtLine = TrB2 ** 3 - 6 * TrB3 ** 2
<|file_name|>log-err-phi.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.apache.org/lic...
pub fn main() { if false { println!("{}", ~"foo" + "bar"); } }
<|file_name|>halls_of_reflection.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.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 Software Foundation; ei...
<|file_name|>check_tx.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 The Exonum Team // // 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 ...
}
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""The Hyperion component.""" from __future__ import annotations import asyncio from contextlib import suppress import logging from typing import Any, Callable, cast from awesomeversion import AwesomeVersion from hyperion import client, const as hyperion_const fr...
return f"{server_id}_{instance}_{name}"
<|file_name|>otp-required.js<|end_file_name|><|fim▁begin|>"use strict"; exports.__esModule = true; exports.OTPRequiredError = void 0; var _base = require("./base"); var _includes = _interopRequireDefault(require("lodash/includes")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { defau...
<|file_name|>test_quotas.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 #...
resp, quota_set = self.client.get_quota_set(self.demo_tenant_id) default_vcpu_quota = quota_set['cores'] vcpu_quota = 0 # Set the quota to zero to conserve resources
<|file_name|>indeed.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import dateutil.parser import dateutil.tz import feedparser import re from datetime import datetime, timedelta from joblist import JobList class FilterException(Exception): pass class IndeedJobList(JobList): '''Joblist class for Indee...
# of jobs is ended
<|file_name|>pyramidal_blstm.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # -*- coding: utf-8 -*- """Pyramidal bidirectional LSTM encoder.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf class PyramidBLSTMEncoder(obje...
""" initializer = tf.random_uniform_initializer( minval=-self.parameter_init, maxval=self.parameter_init)
<|file_name|>introduction.js<|end_file_name|><|fim▁begin|>var Quest = require('../quest'), Messages = require('../../../../../../network/messages'),<|fim▁hole|> Packets = require('../../../../../../network/packets'), Utils = require('../../../../../../util/utils'); module.exports = Introduction = Quest.exte...
<|file_name|>annotate_trees.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys import os from treestore import Treestore try: taxonomy = sys.argv[1] except: taxonomy = None t = Treestore() treebase_uri = 'http://purl.org/phylo/treebase/phylows/tree/%s' tree_files = [x for x in os.listdir('trees') if ...
if not 'TB2_' in tree_uri: continue tree_id = t.id_from_uri(tree_uri) tb_uri = treebase_uri % (tree_id.replace('_', ':')) print tree_id, tb_uri
<|file_name|>Standby.py<|end_file_name|><|fim▁begin|>import os import RecordTimer import Components.ParentalControl from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.ActionMap import ActionMap from Components.config import config from Components.AVSwitch import AVSwitch from Co...
class TryQuitMainloop(MessageBox): def __init__(self, session, retvalue=QUIT_SHUTDOWN, timeout=-1, default_yes=False, check_reasons=True):
<|file_name|>exit-unreachable.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.or...
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms.
<|file_name|>test_jvm_binary.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, ...
<|file_name|>fields.py<|end_file_name|><|fim▁begin|>from django.db import models from django.utils import timezone from pytz import common_timezones from .validators import YoutubeValidator class TimezoneField(models.CharField): """ A field for selecting a timezone from the common timezones list. """ ...
common_timezone_names = [tz.replace('_', ' ') for tz in common_timezones] the_kwargs = {
<|file_name|>eh25.cpp<|end_file_name|><|fim▁begin|>// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions" } #include <exception> #include <stdlib.h> void my_terminate() {<|fim▁hole|> exit (0); // Double faults should call terminate } struct A { A() { } ~A() { std::set_terminate (m...
<|file_name|>step_collector.py<|end_file_name|><|fim▁begin|># Copyright 2021 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 # #...
if render_kwargs is None:
<|file_name|>Body.js<|end_file_name|><|fim▁begin|>define( ({ loadingInfo: "Carregando...", emptyInfo: "Nenhum item a exibir", loadFailInfo: "Falha ao carregar dados!" })<|fim▁hole|><|fim▁end|>
);
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export { default } from './EditData';
<|file_name|>random-image.js<|end_file_name|><|fim▁begin|><|fim▁hole|>document.addEventListener('DOMContentLoaded', function() { photoKeys = Object.keys(TRAVEL_PHOTOS); function injectRandomPhotos() { figures = document.getElementsByClassName('figure-placeholder'); [].forEach.call(figures, function(fig) { ...
<|file_name|>test_myepisodes.py<|end_file_name|><|fim▁begin|>import pytest @pytest.mark.online class TestMyEpisodes: """Uses test account at MyEpisodes, username and password are 'flexget'""" config = """ tasks: test: mock: - title: the.simpsons.S10E10.hdtv ...
assert entry, 'entry not present' # It's tough to verify the marking worked properly, at least check that myepisodes_id is populated
<|file_name|>httpretty_mock.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2018 CERN. # # Zenodo 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...
<|file_name|>ws28xx.py<|end_file_name|><|fim▁begin|># $Id$ # Copyright 2013 Matthew Wall # See the file LICENSE.txt for your full rights. # # Thanks to Eddie De Pieri for the first Python implementation for WS-28xx. # Eddie did the difficult work of decompiling HeavyWeather then converting # and reverse engineering int...
+ (buf[0][start+1] >> 4)* 10 \ + (buf[0][start+1] & 0xF)* 1 \ + (buf[0][start+2] >> 4)* 0.1
<|file_name|>boxcar2.py<|end_file_name|><|fim▁begin|># Author: Marvin Pinto <me@marvinp.ca> # Author: Dennis Lutter <lad1337@gmail.com> # Author: Shawn Conroyd <mongo527@gmail.com> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard is free software: you can redistribute it an...
logger.log(u"BOXCAR2: Notification successful.", logger.MESSAGE) return True
<|file_name|>errors.py<|end_file_name|><|fim▁begin|>__author__ = 'Cedric Da Costa Faro' from flask import render_template from . import main @main.app_errorhandler(404) def page_not_found(e): return render_template('404.html'), 404 @main.app_errorhandler(405) def method_not_allowed(e): return render_templa...
@main.app_errorhandler(500) def internal_server_error(e): return render_template('500.html'), 500
<|file_name|>Oct_10_2016_HuR_Human_rna.py<|end_file_name|><|fim▁begin|>## Absolute location where all raw files are RAWDATA_DIR = '/home/cmb-06/as/skchoudh/dna/Oct_10_2016_HuR_Human_Mouse_Liver/rna-seq/Penalva_L_08182016/human' ## Output directory OUT_DIR = '/staging/as/skchoudh/Oct_10_2016_HuR_Human_Mouse_Liver/RNA-...
## GenePred bed downloaded from UCSC ## (this is used for inferring the type of experiment i.e stranded/non-stranded
<|file_name|>target_platform_mac.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2.4 # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of s...
def ComponentPlatformSetup(env, builder_name): """Hook to allow platform to modify environment inside a component builder. Args:
<|file_name|>LatinExtendedA.js<|end_file_name|><|fim▁begin|><|fim▁hole|>oid sha256:ac9e4d0cf97f46d8fcb1545ff017272b57a2c9a45f74cc1e57792311dd060f6e size 603<|fim▁end|>
version https://git-lfs.github.com/spec/v1
<|file_name|>string_stuff.rs<|end_file_name|><|fim▁begin|>// TODO - these string constants are inflexible. pub const LINE_WIDTH: usize = 100; pub const INDENT: &str = " "; pub const DOC_COMMENT: &str = "///"; use crate::error::Result; use std::borrow::Cow; use std::cmp::Ordering; use std::fmt::{Display, Formatter};...
let mut final_lines: Vec<Cow<'_, str>> = Vec::new(); for line in &clean_lines {
<|file_name|>f.js<|end_file_name|><|fim▁begin|>import {Ternary} from "./ternary"; import {cast} from "./cast"; export const F = Object.assign(new Ternary("F", false), { and() { return this; }, xor(b) { return cast(b); } }); <|fim▁hole|>Ternary.F = F;<|fim▁end|>
<|file_name|>service.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 The Exonum Team // // 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 /...
/// # Return value /// /// Returns the hash of the created transaction, or an error if the transaction cannot be
<|file_name|>takeaway.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid from db.common import Base from db.specific_event import SpecificEvent from db.event import Event from db.player import Player from db.team import Team class Takeaway(Base, SpecificEvent): __tablename...
self.event_id = event_id for attr in self.STANDARD_ATTRS: if attr in data_dict:
<|file_name|>decode.rs<|end_file_name|><|fim▁begin|>use std::borrow::Cow; use serde::de::value::MapDeserializer; use serde::de::{self, IntoDeserializer}; use url::form_urlencoded::Parse; pub use serde::de::value::Error; pub struct Decoder<'de> { inner: MapDeserializer<'de, PartIterator<'de>, Error>, } impl<'de>...
{ visitor.visit_map(self.inner)
<|file_name|>ranking-curiosity.js<|end_file_name|><|fim▁begin|>class Ranking { //object for ranking in curiosity constructor(){// in contructor set a values for default in this class ranking.colorActive = "#2262ae";//colors of active stars ranking.colorUnActive = "rgba(46,46,46,0.75)";//colors for unactive star...
mouseOut(event){// mouse over event var limitStars = Math.floor(event.target.parentNode.getAttribute("data-stars"));
<|file_name|>ssh.py<|end_file_name|><|fim▁begin|># (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # Copyright 2015 Abhijit Menon-Sen <ams@2ndQuadrant.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
<|file_name|>document_loader.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/. */ //! Tracking of pending loads in a document. //! http...
pub pipeline: PipelineId,
<|file_name|>test_fitting.py<|end_file_name|><|fim▁begin|>from random import random, seed import numpy as np from skued import biexponential, exponential, with_irf seed(23) def test_exponential_tzero_limits(): """Test that the output of ``exponential`` has the correct time-zero""" tzero = 10 * (random() - ...
)
<|file_name|>pingping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: latin-1 -*- import sys import datetime from threading import Thread class ProcPing(Thread): def __init__(self, name, data, qtdMsg): Thread.__init__(self) self.name = name self.data = data self.qtdMsg = qtdMsg s...
arq.close()
<|file_name|>details_dialog.py<|end_file_name|><|fim▁begin|># Created By: Virgil Dupras # Created On: 2010-02-05 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The ...
<|file_name|>test-string-array-concat.py<|end_file_name|><|fim▁begin|>def test(): for i in xrange(int(5e3)): t = [] for j in xrange(int(1e4)): #t[j] = 'x' t.append('x') t = ''.join(t)<|fim▁hole|> test()<|fim▁end|>
<|file_name|>Document.java<|end_file_name|><|fim▁begin|>/* * 2007-2016 [PagSeguro Internet Ltda.] * * NOTICE OF LICENSE * * 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://...
* * @return Document Type * @see DocumentType
<|file_name|>main.ts<|end_file_name|><|fim▁begin|>import '@uirouter/angularjs' import * as angular from 'angular' import userdive from 'userdive' import Sample1 from './controllers/sample1' import Sample2 from './controllers/sample2' const _ud = userdive() const main = angular.module('myapp', ['ui.router']) main.conf...
})
<|file_name|>05_menus.py<|end_file_name|><|fim▁begin|>import Tkinter as tk root = tk.Tk() def noop(): pass menubar = tk.Menu(root) # create a pulldown menu, and add it to the menu bar filemenu = tk.Menu(menubar) filemenu.add_command(label="Open", command=noop) filemenu.add_command(label="Save", command=noop) fileme...
<|file_name|>Cctop111V.java<|end_file_name|><|fim▁begin|>package de.metas.edi.esb.pojo.invoice.cctop; /* * #%L * de.metas.edi.esb * %% * Copyright (C) 2015 metas GmbH * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as * publishe...
* * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<|file_name|>odb_file_path_generator.hpp<|end_file_name|><|fim▁begin|>/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * Copyright (C) 2012-2015 Marco Craveiro <marco.craveiro@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of t...
<|file_name|>ImgBatchModeDlg.cpp<|end_file_name|><|fim▁begin|>/*____________________________________________________________________________ ExifPro Image Viewer Copyright (C) 2000-2015 Michael Kowalski ____________________________________________________________________________*/ // ImgBatchModeDlg.cpp...
<|file_name|>standard-validator.d.ts<|end_file_name|><|fim▁begin|>import { ViewResources } from 'aurelia-templating'; import { Validator } from '../validator'; import { ValidateResult } from '../validate-result'; import { Rule } from './rule'; import { ValidationMessageProvider } from './validation-messages';<|fim▁hole...