prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>V3_getProtectionGrpList.java<|end_file_name|><|fim▁begin|>//To Test:http://localhost:8080/nbia-auth/services/v3/getProtectionGrpList?format=html package gov.nih.nci.nbia.restAPI; import gov.nih.nci.nbia.dao.TrialDataProvenanceDAO; import gov.nih.nci.nbia.util.SpringApplicationContext; import gov.nih.nci....
<|file_name|>coupon.rs<|end_file_name|><|fim▁begin|>// entity #[allow(dead_code)] use chrono::prelude::*; use rust_decimal::prelude::*; #[derive(Clone)] pub struct Coupon { pub code: String, pub percentage: Decimal, pub expiration_date: Date<Utc>, } impl Coupon { pub fn expired(&self, today: Date<Utc...
expiration_date: Utc.ymd(2019, 1, 1),
<|file_name|>participant.pb.go<|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...
<|file_name|>frmHelp.cpp<|end_file_name|><|fim▁begin|>/* * File: frmHelp.cpp * Author: matej * * Created on July 24, 2011, 8:33 PM */ #include "frmHelp.h" #include <QFile> frmHelp::frmHelp() { widget.setupUi(this); } frmHelp::~frmHelp() { } void frmHelp::loadHelpFile( QString helpFile ) { QFile file(...
<|file_name|>add_multi_asset_responsive_display_ad.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2018 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 # # ...
'asset': { 'xsi_type': 'ImageAsset', 'assetId': UploadImageAsset(client, 'https://goo.gl/mtt54n')
<|file_name|>must-auth.js<|end_file_name|><|fim▁begin|>import firebase from 'firebase' export default function ({ isServer, store, req, redirect }) { // Don't run this middleware on the server if (isServer) { // TODO: check cookie<|fim▁hole|> return } else { console.log('firebase.auth().currentUser =',...
<|file_name|>BatchResponsePartImpl.java<|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 ...
public List<ODataResponse> getResponses() { return responses; }
<|file_name|>build_binaries.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ script to build the latest binaries for each vehicle type, ready to upload Peter Barker, August 2017 based on build_binaries.sh by Andrew Tridgell, March 2013 AP_FLAKE8_CLEAN """ from __future__ import print_function import dateti...
vehicle_binaries_subdir, tag)) # record some history about this build
<|file_name|>reducer.js<|end_file_name|><|fim▁begin|>import { GET_POSTS, GET_POST, GET_POST_SLUG, GET_TAGS, GET_TAG, GET_TAG_SLUG, GET_USERS, GET_USER, GET_USER_SLUG, RESET, } from './action-types'; const initialData = { data: null, error: null, loading: false, meta: null }; const initialState = {...
<|file_name|>config.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- class Config(object): def __init__(self, bucket, root): self.bucket = bucket<|fim▁hole|><|fim▁end|>
self.root = root
<|file_name|>xlsx.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the XLSX output module.""" import os import unittest import zipfile from xml.etree import ElementTree from plaso.containers import events from plaso.formatters import interface as formatters_interface from plaso....
sheet. """ zip_file = zipfile.ZipFile(filename)
<|file_name|>node.js<|end_file_name|><|fim▁begin|>import fs from "fs"; import { parse } from "babylon"; import CodeGenerator from "../CodeGenerator"; import processTokens from "../process-tokens"; import {timeLogStart, timeLog} from "../utils"; function parseText(text) { timeLogStart("started parsing text"); ...
<|file_name|>SaveAllAction.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2012-2015 Codenvy, S.A. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v...
<|file_name|>ConsoleTestBase.py<|end_file_name|><|fim▁begin|>import unittest from aquarius.Aquarius import Aquarius class ConsoleTestBase(unittest.TestCase): def initialise_app_mock(self): self.app = Aquarius(None, None, None) def assert_called(self, method):<|fim▁hole|><|fim▁end|>
self.assertTrue(method.called)
<|file_name|>text_field_style.py<|end_file_name|><|fim▁begin|># Enthought library imports from traits.api import HasTraits, Int, Bool from kiva.trait_defs.api import KivaFont from enable.colors import ColorTrait class TextFieldStyle(HasTraits): """ This class holds style settings for rendering an EnableTextField....
<|file_name|>MCRPrioritySupplier.java<|end_file_name|><|fim▁begin|>/* * This file is part of *** M y C o R e *** * See http://www.mycore.de/ for details. * * MyCoRe 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 ...
private Supplier<T> delegate; private int priority;
<|file_name|>model.ts<|end_file_name|><|fim▁begin|>import { IDisposable } from '@lumino/disposable'; import { ISignal, Signal } from '@lumino/signaling'; import { Git } from '../../tokens'; /** * Base DiffModel class */ export class DiffModel implements IDisposable, Git.Diff.IModel { constructor(props: Omit<Git.Di...
return this._reference; } set reference(v: Git.Diff.IContent) { const emitSignal = this._didContentChange(this._reference, v);
<|file_name|>StaticImageDeactivateScheduleActionSettings.java<|end_file_name|><|fim▁begin|>/* * Copyright 2014-2019 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 ...
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator")
<|file_name|>argparser.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2006 Donald N. Allingham, A. Roitman # Copyright (C) 2007-2009 B. Malengier # Copyright (C) 2008 Lukasz Rymarczyk # Copyright (C) 2008 Raphael Ackermann #...
if os.path.isfile(fil):
<|file_name|>count-spec.js<|end_file_name|><|fim▁begin|>describe('IDBIndex.count', function() { 'use strict'; it('should return an IDBRequest', function(done) { util.createDatabase('inline', 'inline-index', function(err, db) { var tx = db.transaction('inline', 'readwrite'); tx.o...
var tx = db.transaction('inline', 'readwrite'); var store = tx.objectStore('inline');
<|file_name|>074 Search a 2D Matrix.py<|end_file_name|><|fim▁begin|>""" Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to right. The first integer of each row is greater than the last integer of the prev...
if __name__=="__main__":
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
__version__ = '0.1.2'
<|file_name|>uas-subscribe-terminated-retry.py<|end_file_name|><|fim▁begin|># $Id: uas-subscribe-terminated-retry.py 4188 2012-06-29 09:01:17Z nanang $ # import inc_const as const PJSUA = ["--null-audio --max-calls=1 --id sip:pjsua@localhost --add-buddy $SIPP_URI"] <|fim▁hole|> [0, "Subscribe presence of:", "1...
PJSUA_EXPECTS = [[0, "", "s"],
<|file_name|>demo.py<|end_file_name|><|fim▁begin|>from pathlib import Path import cv2 import dlib import numpy as np import argparse from contextlib import contextmanager from omegaconf import OmegaConf from tensorflow.keras.utils import get_file from src.factory import get_model pretrained_model = "https://github.co...
cv2.imshow("result", img)
<|file_name|>less.js<|end_file_name|><|fim▁begin|>/*! * LESS - Leaner CSS v1.7.0 * http://lesscss.org * * Copyright (c) 2009-2014, Alexis Sellier <self@cloudhead.net> * Licensed under the Apache v2 License. * */ /** * @license Apache v2 */ (function (window, undefined) {// // Stub out `require` in...
<|file_name|>parser_predictor.py<|end_file_name|><|fim▁begin|>from typing import Dict, Any, List, Optional import numpy from allennlp.common.util import JsonDict from allennlp.data import DatasetReader from allennlp.models import Model from allennlp.predictors.predictor import Predictor import depccg.parsing from dep...
@Predictor.register('parser-predictor')
<|file_name|>config.js<|end_file_name|><|fim▁begin|>/** * Configure app in a block instead of hard-coding values inside the scripts. */ var config = { //domain: 'http://localhost:63342/FeatureScapeApps', domain: '/featurescapeapps', quipUrl: '/camicroscope/osdCamicroscope.php', //reserve4Url: 'http://...
default_execution_id: 'tahsin-test-1', default_db: 'quip',
<|file_name|>firstlook.py<|end_file_name|><|fim▁begin|># this program requires the 32 bit version of Python!! import os import glob import math import subprocess import re import sys import string from decimal import Decimal from astropy.io import fits from astropy.wcs import WCS import matplotlib.pyplot as plt import...
log_fname = './log.firstlook.txt' # path to sextractor executable and config files (incl. the filenames!) sextractor_bin_fname = os.path.dirname( os.path.realpath(__file__)) + '\\' + 'sextractor.exe'
<|file_name|>DelegatingPreferenceChangeListenerForLabel.java<|end_file_name|><|fim▁begin|>package org.plista.kornakapi.core.training.preferencechanges; import java.util.List; import java.util.Map; import com.google.common.collect.Lists; import com.google.common.collect.Maps; public class DelegatingPreferenceChangeLi...
} @Override
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use sea_canal::Analyzer; use sea_canal::Pattern; use sea_canal::PatternElem::*; #[test] fn meta_find_any_pattern() { let slice = &[1, 2, 4, 7, 11]; let analyzer = Analyzer::with_meta(slice); assert_eq!(Some(pat!(Meta(pat!(Plus(1), Plus(2), Plus(3), Plus(4))...
<|file_name|>behavior.py<|end_file_name|><|fim▁begin|># MAEC Behavior Class # Copyright (c) 2018, The MITRE Corporation # All rights reserved from mixbox import fields from mixbox import idgen import maec from . import _namespace import maec.bindings.maec_bundle as bundle_binding from cybox.core.action_re...
class PlatformList(maec.EntityList): _binding = bundle_binding
<|file_name|>CacheLocalityTest.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
<|file_name|>utils.ts<|end_file_name|><|fim▁begin|>import {vec2} from "gl-matrix"; // In-place perpendicularization of a vector. (x,y) => (-y, x) export function perpendicularize(vector :vec2) { let x :number = vector[0]; vector[0] = -vector[1]; vector[1] = x;<|fim▁hole|> export function cross(w: vec2, v: ...
}
<|file_name|>test_interface_TOC.py<|end_file_name|><|fim▁begin|># coding: utf-8 import flask from flask import url_for from .base import BaseTestCase from . import utils class TOCTestCase(BaseTestCase): # TOC def test_the_title_of_the_article_list_when_language_pt(self): """ Teste para ver...
{'name': "Article Title In Portuguese", 'language': 'en'} ] utils.makeOneArticle({
<|file_name|>IngroupSplitter.py<|end_file_name|><|fim▁begin|>from MAF import MAF class IngroupSplitter: def __init__(self, ingroup, splitdist, junkchars='Nn'): self.ingroup = ingroup self.splitdist = splitdist self.junkchars = junkchars assert "-" not in self.junkchars #re...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from distutils.core import setup import py2exe setup(console=['server.py'])
<|file_name|>config_flow.py<|end_file_name|><|fim▁begin|>"""Config flow to configure the OVO Energy integration.""" import aiohttp from ovoenergy.ovoenergy import OVOEnergy import voluptuous as vol from homeassistant import config_entries from homeassistant.config_entries import ConfigFlow from homeassistant.const imp...
class OVOEnergyFlowHandler(ConfigFlow, domain=DOMAIN):
<|file_name|>chain_workflow_generator.py<|end_file_name|><|fim▁begin|>import random import numpy from graph_diff.nirvana_object_model.workflow import Workflow from .standard_workflow_generator import StandardWorkflowGenerator class ChainWorkflowGenerator(StandardWorkflowGenerator): """Generator for chained work...
min_input_output_number, max_input_output_number,
<|file_name|>v1beta1.js<|end_file_name|><|fim▁begin|>"use strict"; /** * Copyright 2015 Google Inc. 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:/...
* @namespace datastore
<|file_name|>callback.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/. */ //! Base classes to work with IDL callbacks. use dom::bindi...
/// Returns the `JSContext` used for the call. pub fn get_context(&self) -> *mut JSContext {
<|file_name|>Timer.java<|end_file_name|><|fim▁begin|>/* * Copyright 2012 PRODYNA AG * * Licensed under the Eclipse Public License (EPL), Version 1.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.opensource.org/licenses...
}
<|file_name|>test_binary_create_integration.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|>bridge.go<|end_file_name|><|fim▁begin|>// +build linux package bridge import ( "errors" "fmt" "io/ioutil" "net" "os" "os/exec" "path/filepath" "strconv" "sync" "syscall" "github.com/docker/docker/libnetwork/datastore" "github.com/docker/docker/libnetwork/discoverapi" "github.com/docker/dock...
// configuration info for the "bridge" driver.
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver class UserProfile(models.Model): user = models.OneToOneField(User, related_name='profile') display_na...
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import pygame import enemies from core import balloon, bullet, game, gem, particle, player, world from scenes import credits, scene, splashscreen from ui import menu, text from utils import prettyprint, utility, vector from utils.settings import * p...
<|file_name|>order.js<|end_file_name|><|fim▁begin|>define( ['app/models/proto_model'], function(ProtoModel) { var Model = ProtoModel.extend({ // matches first part of method name in @remote.method urlRoot: '/cru_api.order_', must_be_floats: ['sub_total', 'actual_total...
return Model; }
<|file_name|>memory_image.go<|end_file_name|><|fim▁begin|>package api import (<|fim▁hole|> JoinIndex(index crdt.Index) error GetIndex() (crdt.Index, error) CloseMemoryImage() error }<|fim▁end|>
"github.com/johnny-morrice/godless/crdt" ) type MemoryImage interface {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>''' Copyright (C) 2012 mentalsmash.org <contact@mentalsmash.org> This library is free software; you can redistribute it and/or<|fim▁hole|>version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be use...
modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either
<|file_name|>ViewContainer.tsx<|end_file_name|><|fim▁begin|>import { BaseComponent, setRef } from './vdom-util' import { ComponentChildren, Ref, createElement } from './vdom' import { CssDimValue } from './scrollgrid/util' export interface ViewContainerProps { labeledById: string liquid?: boolean height?: CssDim...
) { this.setState({ availableWidth: this.el.offsetWidth })
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponsePermanentRedirect from django.middleware.locale import LocaleMiddleware from django....
class URLResponseTests(URLTestCaseBase): """
<|file_name|>disable-key.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node process.chdir(__dirname) var crypto = require('crypto'), fs = require('fs'), config = require('../config.js')<|fim▁hole|>var newPasswordSha1 = crypto.createHash('sha1').update('').digest('hex') var content = '// auto-generated\n...
<|file_name|>SpringBootRuntimeProvider.java<|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...
@Override public String getOtherJSonSchemaDirectory() { return OTHER_DIR;
<|file_name|>modulegen__gcc_ILP32.py<|end_file_name|><|fim▁begin|>from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnin...
cls.add_method('DisconnectWithoutContext',
<|file_name|>test_vpc.py<|end_file_name|><|fim▁begin|># Copyright 2016 Capital One Services, 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...
'IpProtocol': 'tcp', 'IpRanges': ['10.0.0.0/8'], 'PrefixListIds': [],
<|file_name|>appcache_unittest.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2009 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. #include "testing/gtest/include/gtest/gtest.h" #include "webkit/appcache/appcache.h" #i...
EXPECT_EQ(0L, cache->cache_size());
<|file_name|>test_broken_pipe.rs<|end_file_name|><|fim▁begin|>#![cfg(unix)] use mio::{Token, Ready, PollOpt}; use mio::deprecated::{unix, EventLoop, Handler}; use std::time::Duration; pub struct BrokenPipeHandler; impl Handler for BrokenPipeHandler { type Timeout = (); type Message = (); fn ready(&mut se...
#[test] pub fn broken_pipe() { let mut event_loop: EventLoop<BrokenPipeHandler> = EventLoop::new().unwrap();
<|file_name|>options.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2017 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without...
// derivative order between rollup operations in pipelines.. MaxTransformationDerivativeOrder() int
<|file_name|>noStringLiteralRule.ts<|end_file_name|><|fim▁begin|><|fim▁hole|> * 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...
/** * @license * Copyright 2013 Palantir Technologies, Inc. *
<|file_name|>views.py<|end_file_name|><|fim▁begin|>""" Entry point to API application. This will be for running simple checks on the application """ from flask import jsonify, url_for, redirect, request from flask_login import current_user from . import home from ..__meta__ import __version__, __project__, __copyright...
<|file_name|>descriptorx.rs<|end_file_name|><|fim▁begin|>/// utilities to work with descriptor use descriptor::FileDescriptorProto; use descriptor::DescriptorProto; use descriptor::EnumDescriptorProto; use descriptor::EnumValueDescriptorProto; pub struct RootScope<'a> { pub file_descriptors: &'a [FileDescriptorP...
{ FileScope { file_descriptor: fd }
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from flask import make_response from flask.views import MethodView <|fim▁hole|> def get(self): return make_response('Congratulations!')<|fim▁end|>
class IndexView(MethodView):
<|file_name|>semver.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/licenses...
build.push(id); ch = c; if ch != '.' { break; }
<|file_name|>issue-2467.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/lice...
<|file_name|>utility.rs<|end_file_name|><|fim▁begin|>// unfortunately, there is no such a trait in the standard library // extern crates use `std` pub trait UInt: Copy { fn from64(x: u64) -> Self; fn to64(self) -> u64; } macro_rules! implement { ($t: ty) => ( impl UInt for $t { fn from6...
#[cfg(os_test)] pub mod utility_tests {
<|file_name|>hls.js<|end_file_name|><|fim▁begin|>typeof window !== "undefined" && (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(...
this.timer = null; } };
<|file_name|>lib_medintux_sl.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="sl_SI"> <context> <name>MedinTux::Configuration</name> <message> <location filename="../../libs/medintuxutils/configuration.cpp" line="455"/> <source>Unab...
</message>
<|file_name|>TextAnalyzer.py<|end_file_name|><|fim▁begin|>import codecs import logging logger = logging.getLogger(__name__) class TextAnalyzer: def __init__(self): logger.debug('-- Initializing TextAnalyzer --') """ Deze functie leest een stopwoorden file (stoplist_tno.tab) in...
<|file_name|>tests.js<|end_file_name|><|fim▁begin|>/** * Add your manual test filenames and display names below. **/ var tests = [ { href: "test-add.html", name: "Add Events" }, { href: "test-delete.html", name: "Delete Events" }, { href: "test-tracks.html", name: "Add Tracks" }, { href: "test-vimeo.html", na...
{ href: "test-sharevimeo.html", name: "Share Vimeo project" }, { href: "test-shareyoutube.html", name: "Share YouTube project" },
<|file_name|>test.py<|end_file_name|><|fim▁begin|>""" .. module:: test test ************* :Description: test :Authors: bejar :Version: <|fim▁hole|> """ __author__ = 'bejar' from MeanPartition import MeanPartitionClustering from kemlglearn.datasets import cluster_generator import matplotlib.pyplot as plt from sk...
:Created on: 10/02/2015 9:50
<|file_name|>server.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """Entry point to run app. Used to launch the REST and Cron servers. """ import logging import io import os import flask from flask_api import status from google.cloud import storage from typing import Text logging.getLogger().setLevel(logging...
# https://cloud.google.com/appengine/docs/standard/python3/scheduling-jobs-with-cron-yaml#validating_cron_requests
<|file_name|>check_full_toc.py<|end_file_name|><|fim▁begin|># check_full_toc.py - Unit tests for SWIG-based libcueify full TOC APIs # # Copyright (c) 2011 Ian Jacobi <pipian@pipian.com> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # fi...
self.assertEqual(full_toc.discLength.frm, 13) self.assertEqual(full_toc.tracks[11].length.min, 4) self.assertEqual(full_toc.tracks[11].length.sec, 16) self.assertEqual(full_toc.tracks[11].length.frm, 40)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # -*- coding: utf-8 -*- import logging import os from openfisca_france_data import default_config_files_directory as config_files_directory from openfisca_france_data.erfs.input_data_builder import ( # analysis:ignore step_01_pre_proc...
from openfisca_survey_manager.survey_collections import SurveyCollection
<|file_name|>Works.js<|end_file_name|><|fim▁begin|>exports.definition = { config: { columns: { title: "text", attachments: "text" }, adapter: { type: "sql", collection_name: "works", idAttribute: "_id" }<|fim▁hole|> ...
}, extendModel: function(Model) { _.extend(Model.prototype, { initialize: function(data) {
<|file_name|>InMoov2.minimal.py<|end_file_name|><|fim▁begin|>#file : InMoov2.minimal.py # this will run with versions of MRL above 1695 # a very minimal script for InMoov # although this script is very short you can still # do voice control of a right hand or finger box # for any command which you say - you will be re...
##############
<|file_name|>simpleheat.js<|end_file_name|><|fim▁begin|>/* (c) 2014, Vladimir Agafonkin simpleheat, a tiny JavaScript library for drawing heatmaps with Canvas https://github.com/mourner/simpleheat */ (function () { 'use strict'; function simpleheat(canvas) { // jshint newcap: false, validthis: true if (!(t...
<|file_name|>simd.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/L...
//! //! These are all experimental. The interface may change entirely, without //! warning.
<|file_name|>team_invite_test.go<|end_file_name|><|fim▁begin|>package systests import ( "fmt" "strings" "testing" "time" "golang.org/x/net/context" "github.com/keybase/client/go/engine" "github.com/keybase/client/go/jsonhelpers" libkb "github.com/keybase/client/go/libkb" keybase1 "github.com/keybase/client/...
userParams := standaloneUserArgs{
<|file_name|>ActivityType.java<|end_file_name|><|fim▁begin|>package com.agileEAP.workflow.definition; /** 活动类型 */ public enum ActivityType { /** 开始活动 */ //C# TO JAVA CONVERTER TODO TASK: Java annotations will not correspond to .NET attributes: //[Remark("开始活动")] StartActivity(1), /** 人工活动 */ //...
/** 处理活动
<|file_name|>abi.rs<|end_file_name|><|fim▁begin|>use std::{fmt::Debug, result::Result}; use wasm_bindgen::{ convert::FromWasmAbi,<|fim▁hole|> JsValue, }; pub type JsResult<T> = Result<T, JsValue>; pub trait Context<T> { fn context(self, msg: &dyn Debug) -> JsResult<T>; } impl<T, TError> Context<T> for Res...
describe::{inform, WasmDescribe},
<|file_name|>Enum.hpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2010-2011 * Written by: * Aly Hirani <alyhirani@gmail.com> * James Chou <uohcsemaj@gmail.com> * * All Rights Reserved * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser Ge...
#ifndef LIBFACEBOOKCPP_ENUM_H_
<|file_name|>local.rs<|end_file_name|><|fim▁begin|>//! UDP relay local server use std::{ io::{self, Cursor, ErrorKind, Read}, net::{IpAddr, Ipv4Addr, SocketAddr}, sync::{Arc, Mutex}, time::Duration, };<|fim▁hole|>use tokio::{self, net::UdpSocket, util::FutureExt}; use crate::{ config::{ServerAddr,...
use futures::{self, Future, Stream}; use log::{debug, error, info};
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup import os import glob setup( name = 'pyspecfit',<|fim▁hole|> url = 'http://justincely.github.io', version = '0.0.1', description = 'interact with IRAF task specfit I/O products', author = 'Justin Ely', author_ema...
<|file_name|>script.min.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
Bitrix 17.0.9 Business Demo = f37a7cf627b2ec3aa4045ed4678789ad
<|file_name|>upstream.py<|end_file_name|><|fim▁begin|>import os import re import subprocess import sys import urlparse from wptrunner.update.sync import LoadManifest from wptrunner.update.tree import get_unique_name from wptrunner.update.base import Step, StepRunner, exit_clean, exit_unclean from .tree import Commit,...
:param patch: the Patch to convert :param strip_dir: the path prefix to remove """
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md> extern crate build; fn main() {<|fim▁hole|><|fim▁end|>
build::link("webservices", true) }
<|file_name|>setup_ip_tables.go<|end_file_name|><|fim▁begin|>package bridge import ( "errors" "fmt"<|fim▁hole|> "net" "github.com/Sirupsen/logrus" "github.com/docker/libnetwork/iptables" ) // DockerChain: DOCKER iptable chain name const ( DockerChain = "DOCKER" IsolationChain = "DOCKER-ISOLATION" ) func se...
<|file_name|>ClosureOptimizePrimitives.java<|end_file_name|><|fim▁begin|>/* * Copyright 2011 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:...
} }
<|file_name|>project.js<|end_file_name|><|fim▁begin|>var fs = require('fs'); var path = require('path'); var log = require('./logging').logger; var Project = module.exports; Project.PROJECT_FILE = 'ionic.config.json'; Project.OLD_PROJECT_FILE = 'ionic.project'; Project.OLD_V2_PROJECT_FILE = 'ionic.config.js'; Project...
return data[key]; } else {
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm, UserChangeForm from django.contrib.auth.admin import UserAdmin from django.contrib import admin from django import forms class VoterCreationForm(UserCreationForm): ...
class Meta: model = User
<|file_name|>seg.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import matplotlib from matplotlib.patches import Polygon from matplotlib.collections import PatchCollection fig, ax = plt.subplots() #ax = plt.gca() #ax.set_autoscale_on(False) polygons = [] color = [] c = (np.random.random((1, 3))*0.6+0.4).tolist()[0] # ...
import numpy as np import matplotlib.pyplot as plt
<|file_name|>codfigio_ini.cpp<|end_file_name|><|fim▁begin|>/* * Copyright © 2009-2010, 2015 Shaun Bouckaert * * This file is part of Codfig. * * Codfig 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...
* but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details.
<|file_name|>endpointstable.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************** * Icinga 2 * * Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org/) * * ...
Endpoint::Ptr endpoint = static_cast<Endpoint::Ptr>(row); if (!endpoint) return Empty;
<|file_name|>exclusive_range_pattern_syntax_collision2.rs<|end_file_name|><|fim▁begin|>#![feature(half_open_range_patterns)] #![feature(exclusive_range_pattern)] fn main() {<|fim▁hole|> _ => {}, } }<|fim▁end|>
match [5..4, 99..105, 43..44] { [_, 99..] => {}, //~^ ERROR pattern requires 2 elements but array has 3 //~| ERROR mismatched types
<|file_name|>rds.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # 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 published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
region: description: - The AWS region to use. If not specified then the value of the EC2_REGION environment variable, if any, is used. required: true
<|file_name|>Application.js<|end_file_name|><|fim▁begin|>/** * The main application class. An instance of this class is created by app.js when it calls * Ext.application(). This is the ideal place to handle application launch and initialization * details. * * */ Ext.define('Sample.Application', { extend: 'Dev...
'Sample.controller.cook.CookController' ], launch: function() {
<|file_name|>PixelEncoding.py<|end_file_name|><|fim▁begin|># coding: utf-8 #Created on 05.06.2012 #Copyright (C) 2013 Fabian Hachenberg #This file is part of EcstaticaLib. #EcstaticaLib is free software: you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #th...
''' maxlen = 128000 bytedata = bytearray(data)
<|file_name|>hybrid-file-system.js<|end_file_name|><|fim▁begin|>"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path_1 = require("path"); var virtual_file_utils_1 = require("./virtual-file-utils"); var HybridFileSystem = (function () { function HybridFileSystem(fileCache) { ...
<|file_name|>fig-dataset-correlation.py<|end_file_name|><|fim▁begin|>import svgutils.transform as sg from common import load_svg, label_plot fig = sg.SVGFigure("4.1in", "1.8in") a = load_svg(snakemake.input[1]) b = load_svg(snakemake.input[0]) b.moveto(190, 0) la = label_plot(5, 10, "a") lb = label_plot(185, 10, "b"...
fig.append([a, b, la, lb]) fig.save(snakemake.output[0])
<|file_name|>tax_rate.js<|end_file_name|><|fim▁begin|>Ext.define('TaxRate', { extend: 'Ext.data.Model', fields: [{name: "id"}, {name: "date",type: 'date',dateFormat: 'Y-m-d'}, {name: "rate"}, {name: "remark"}, {name: "create_time",type: 'date',dateFormat: ...
} }, {
<|file_name|>UnitBezierTest.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2013 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: * 1. Redistributions of source code must ret...
{ UnitBezier bezier(0.5, 1.0, 0.5, 1.0); EXPECT_EQ(0.0, bezier.solve(-1.0, 1.0)); EXPECT_EQ(1.0, bezier.solve(2.0, 1.0));