prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>lib.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/. */ #![feature(box_syntax)] #![feature(core_intrinsics)] #![feature(l...
<|file_name|>AppContainer.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) Nicolas Gallagher. * 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. * * */ import StyleSheet from '../Sty...
<|file_name|>lexer.rs<|end_file_name|><|fim▁begin|>//! Lexer //! //! This module contains elements than can be used for writing plugins //! but can be ignored for simple usage. use token::Token; use token::Token::*; use token::ComparisonOperator::*; use self::Element::*; use regex::Regex; use error::{Error, Result}; ...
} tokens.push(&text[start..end]); current = end; }
<|file_name|>rawHttpService.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---...
if (location) {
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ flaskbb.forum.models ~~~~~~~~~~~~~~~~~~~~ It provides the models for the forum :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ from datetime import datetime, timedelta from f...
def __repr__(self):
<|file_name|>test_monitor_attributes.py<|end_file_name|><|fim▁begin|>def testHasMasterPrimary(txnPoolNodeSet): masterPrimaryCount = 0 for node in txnPoolNodeSet: masterPrimaryCount += int(node.monitor.hasMasterPrimary)<|fim▁hole|> assert masterPrimaryCount == 1<|fim▁end|>
<|file_name|>GetBookByTitleAndAuthor.py<|end_file_name|><|fim▁begin|>from aquarius.objects.Book import Book class GetBookByTitleAndAuthor(object):<|fim▁hole|> def __init__(self, connection): self.__connection = connection def execute(self, book): b = Book() sql = "SELECT Id, Title, Aut...
<|file_name|>uniform.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 Jeremy Mason // // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // http://opensource.org/licenses/MIT>, at your option. This file may not be // copie...
(u32: 0, u32::MAX, 128, de_u32_0_MAX_128) (u8: 0, u8::MAX, 32768, de_u8_0_MAX_32768) (u16: 0, u16::MAX, 32768, de_u16_0_MAX_32768)
<|file_name|>get-success-interjection.ts<|end_file_name|><|fim▁begin|>// See https://developer.amazon.com/docs/custom-skills/speechcon-reference-interjections-english-us.html import { chooseOne } from './choose-one'; import { getAllSuccessInterjections } from './get-all-success-interjections';<|fim▁hole|> export const...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Module implementing the handling of gists. //! //! Gists are represented as the Gist structure, with the auxiliary URI //! that helps refering to them as command line arguments to the program. mod info; mod uri; use std::borrow::Cow; use std::path::PathBuf; use s...
Gist{id: Some(id.to_string()), ..self} }
<|file_name|>AcceptsItems.java<|end_file_name|><|fim▁begin|>/* * This file is part of SpongeAPI, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of...
* * @param value {@link ItemType}s to accept * @return new property
<|file_name|>options.js<|end_file_name|><|fim▁begin|>module.exports.parse = function ( arr, obj ) { obj = obj || {}; for ( var i = 0; i < arr.length; ++i ) { var val = arr[i]; var matches = val.match( /^-(\w+):("?)([^"]+)\2$/ );<|fim▁hole|> } } return obj; };<|fim▁end|>
if ( matches ) { obj[matches[1]] = matches[3];
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- """zigzi, Platform independent binary instrumentation module. Copyright (c) 2016-2017 hanbum park <kese111@gmail.com> All rights reserved. For detailed copyright information see the file COPYING in the root of the distri...
import argparse from PEInstrument import *
<|file_name|>nsXMLBinding.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|>/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "Li...
<|file_name|>deletenetworkaclentry.py<|end_file_name|><|fim▁begin|># Copyright 2013-2014 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code m...
class DeleteNetworkAclEntry(EC2Request):
<|file_name|>config_test.py<|end_file_name|><|fim▁begin|># pylint: disable=redefined-outer-name, missing-docstring import sys import pytest sys.path.append('..') from batchflow import Config @pytest.fixture def config(): _config = dict(key1='val1', key2=dict()) _config['key2']['subkey1'] = 'val21' return...
assert 'subkey1' not in config, 'nested key should have been deleted' assert 'key2' in config, 'outer key should remain' def test_pop_missing_key(self, config):
<|file_name|>p2wpkh.ts<|end_file_name|><|fim▁begin|>import * as bcrypto from '../crypto'; import { bitcoin as BITCOIN_NETWORK } from '../networks'; import * as bscript from '../script'; import { isPoint, typeforce as typef } from '../types'; import { Payment, PaymentOpts } from './index'; import * as lazy from './lazy'...
});
<|file_name|>Steg_rc.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Resource object code # # Created: Mon Jan 25 18:31:00 2010 # by: The Resource Compiler for PyQt (Qt v4.6.1) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\...
\x24\xef\x87\xc3\xca\x98\x29\x73\xe2\x00\x84\x73\x56\x2a\x99\x44\ \x29\xa3\x14\x65\x53\xd4\x19\xad\xd9\x44\xf3\x3e\xf4\xe8\x13\x5f\ \x35\x05\x22\x58\x54\xcc\xb9\x52\x71\x01\x10\xb8\x9e\xb7\xc2\x20\ \x9a\xbf\x68\x41\xfd\xbd\x41\x8f\x9e\xa7\xd0\xcc\x35\x87\x93\x78\
<|file_name|>nested_item.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// 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/LICENSE-2.0> or the MIT license // <LICENSE-MIT...
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>Helper and server modules """<|fim▁end|>
"""
<|file_name|>duplicated-headers_wsh.py<|end_file_name|><|fim▁begin|>from mod_pywebsocket import handshake from mod_pywebsocket.handshake.hybi import compute_accept def web_socket_do_extra_handshake(request): message = 'HTTP/1.1 101 Switching Protocols\r\n' message += 'Upgrade: websocket\r\n' message += 'C...
<|file_name|>tchelper.py<|end_file_name|><|fim▁begin|>################################################################################ """ DESCRIPTION: Helpers for telecommand wrapper functions. PACKAGE: spell.lang.helpers.tchelper PROJECT: SPELL Copyright (C) 2008, 2015 SES ENGINEERING, Luxembourg S.a.r.l. ...
_tcArguments = [] _tcItem = None _isSequence = False
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.urls import path, re_path from django.conf import settings from django.contrib.auth import views as auth_views urlpatterns = [ re_path( 'login/', auth_views.LoginView.as_view(template_name='dj_auth/login.html'), name='login'), ...
name='password_reset'),
<|file_name|>node.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 Red Hat, Inc. # Author: William Benton (willb@redhat.com) # 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|>AssignmentManager.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 * ...
if (t instanceof java.net.SocketTimeoutException || t instanceof FailedServerException) {
<|file_name|>xdg_test.go<|end_file_name|><|fim▁begin|>package xdg_test import ( "os" "path/filepath" "testing" <|fim▁hole|> type envSample struct { name string value string expected interface{} actual interface{} } func testDirs(t *testing.T, samples ...*envSample) { // Test home directory. require....
"github.com/adrg/xdg" "github.com/stretchr/testify/require" )
<|file_name|>test_generate_product_templates_tfidf_api.py<|end_file_name|><|fim▁begin|>""" Tests barbante.api.generate_product_templates_tfidf. """ import json import nose.tools import barbante.api.generate_product_templates_tfidf as script<|fim▁hole|> log = barbante_logging.get_logger(__name__) def test_script():...
import barbante.utils.logging as barbante_logging import barbante.tests as tests
<|file_name|>api.ts<|end_file_name|><|fim▁begin|>import * as request from 'superagent'; import { assign } from 'lodash'; declare var window; <|fim▁hole|>}<|fim▁end|>
export function init() { return request .get('/api/user') .set('x-auth', window.localStorage.jwt_token || window.jwt_token || '');
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|># Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/django_coverage_plugin/blob/master/NOTICE.txt """ Pytest auto configuration. This module is run automatically by pytest, to define and enable f...
"""
<|file_name|>MusicOperat.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** * ¹¦ ÄÜ£ºÒôƵÎļþ²Ù×÷Àà * * Ìí ¼Ó ÈË£ºÐ¡¿É * * Ìí¼Óʱ¼ä£º2015.01.17 1...
//CMusicOpreat * CMusicOpreat::GetInstance() //{ // static CMusicOpreat _Instance;
<|file_name|>account_invoice_send.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import UserError class AccountInvoiceSend(models.TransientModel): _name = 'account.invo...
<|file_name|>Content.java<|end_file_name|><|fim▁begin|>/* * Asqatasun - Automated webpage assessment * Copyright (C) 2008-2020 Asqatasun.org * * This file is part of Asqatasun. * * Asqatasun is free software: you can redistribute it and/or modify<|fim▁hole|> * * This program is distributed in the hope that it w...
* it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version.
<|file_name|>board.ts<|end_file_name|><|fim▁begin|>import { HeadlessState } from './state.js'; import { pos2key, key2pos, opposite, distanceSq, allPos, computeSquareCenter } from './util.js'; import { premove, queen, knight } from './premove.js'; import * as cg from './types.js'; export function callUserFunction<T ext...
<|file_name|>SortOrder.java<|end_file_name|><|fim▁begin|>// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of ...
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;
<|file_name|>clss.py<|end_file_name|><|fim▁begin|>import conv import tools from ..api.clss import api from ..sql.clss import sql from pandas import DataFrame import time as tm <|fim▁hole|>class data(object): def __init__(self): self.a = api() self.s = sql() self.jobs = [] self.trd ...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls.defaults import patterns, url urlpatterns = patterns( 'popcorn_gallery.users.views', url(r'^edit/$', 'edit', name='users_edit'), url(r'^delete/$', 'delete_profile', name='users_delete'), url(r'^(?P<username>[\w-]+)/$', 'profile', n...
)
<|file_name|>xml2json.min.js<|end_file_name|><|fim▁begin|>function X2JS(_1){ "use strict"; var _2="1.1.2"; _1=_1||{}; _3(); function _3(){ if(_1.escapeMode===undefined){ _1.escapeMode=true; } if(_1.attributePrefix===undefined){ _1.attributePrefix="_"; } if(_1.arrayAccessForm===undefined){ _1.arrayAccessForm="none"; } i...
_13[_15]=[_13[_15]]; _e(_13,_15); } }
<|file_name|>check_static_recursion_foreign_helper.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 //...
// Helper definition for test/run-pass/check-static-recursion-foreign.rs.
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import *<|fim▁hole|>class Hashcat(MakefilePackage): ""...
<|file_name|>template_testing.py<|end_file_name|><|fim▁begin|>#!/bin/python3 # Testscript for template generation and deploying from cloud_provider.amazon import Amazon from template.template import CloudFormationTemplate from pprint import pprint if __name__ == "__main__": # Amazon Settings region = "eu-wes...
# aws.delete_stack(stack_name)
<|file_name|>util.py<|end_file_name|><|fim▁begin|># This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 Fo...
# # You should have received a copy of the GNU General Public License # along with Indico; if not, see <http://www.gnu.org/licenses/>.
<|file_name|>selector-css3.js<|end_file_name|><|fim▁begin|>/* YUI 3.17.0 (build ce55cc9) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add('selector-css3', function (Y, NAME) { /** * The selector css3 module provides support for css3 selectors. ...
b = (oddeven === 'odd') ? 1 : 0;
<|file_name|>11.js<|end_file_name|><|fim▁begin|>$(function () { var colors = Highcharts.getOptions().colors, categories = ['已关闭', 'NEW', '已解决'], name = 'Browser brands', data = [{ y: 290, color: colors[0], drilldown: { ...
dataLabels: { formatter: function() { // display only if larger than 1
<|file_name|>tests.rs<|end_file_name|><|fim▁begin|>#[test] fn it_works() { assert!(true);<|fim▁hole|><|fim▁end|>
}
<|file_name|>test_build_scripts.py<|end_file_name|><|fim▁begin|>"""Tests for distutils.command.build_scripts.""" import os import unittest from distutils.command.build_scripts import build_scripts from distutils.core import Distribution import sysconfig from distutils.tests import support from test.test_su...
<|file_name|>SilverInlineEditorWidthTest.ts<|end_file_name|><|fim▁begin|>import { ApproxStructure, Assertions, UiFinder } from '@ephox/agar'; import { describe, it } from '@ephox/bedrock-client'; import { Arr, Fun, Type } from '@ephox/katamari'; import { Css, Scroll, SugarBody, SugarElement } from '@ephox/sugar'; impor...
};
<|file_name|>tst_qsslkey.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the test su...
rx.cap(1) == QLatin1String("rsa") ? QSsl::Rsa : QSsl::Dsa, rx.cap(2) == QLatin1String("pub") ? QSsl::PublicKey : QSsl::PrivateKey, rx.cap(3).toInt(),
<|file_name|>url.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 click2stream, 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/LICENSE-2.0 ...
// limitations under the License.
<|file_name|>db.py<|end_file_name|><|fim▁begin|>import contextlib import functools import logging import psycopg2.extras from psycopg2 import Error as Psycopg2Error _logger = logging.getLogger(__name__) def retry_on_psycopg2_error(func): """ Decorator that retries 3 times after Postgres error, in particula...
@functools.wraps(func)
<|file_name|>parser_tests.py<|end_file_name|><|fim▁begin|>import unittest import os import math from rdbtools import RdbCallback, RdbParser class RedisParserTestCase(unittest.TestCase): def setUp(self):<|fim▁hole|> pass def tearDown(self): pass def test_empty_rdb(self): r =...
<|file_name|>metrics.py<|end_file_name|><|fim▁begin|>''' Copyright (C) 2017 The Board of Trustees of the Leland Stanford Junior University. Copyright (C) 2016-2017 Vanessa Sochat. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as publis...
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
<|file_name|>n_queens.rs<|end_file_name|><|fim▁begin|>// Implements http://rosettacode.org/wiki/N-queens_problem #![feature(test)] extern crate test; use std::vec::Vec; use std::thread::spawn; use std::sync::mpsc::channel; #[cfg(test)] use test::Bencher;<|fim▁hole|> #[cfg(not(test))] fn main() { for num in 0i32....
<|file_name|>app.component.ts<|end_file_name|><|fim▁begin|>import {Component} from 'angular2/core'; export class Reward{ id: number; name: string; description: string; points: number; }<|fim▁hole|>}) export class AppComponent { title: string; title = 'Reward'; reward: Reward = { i...
@Component({ selector: 'my-app', templateUrl: 'templates/reward-detail.html'
<|file_name|>dbpediamap.py<|end_file_name|><|fim▁begin|>__author__ = 'Lorenzo' planet_mapper = { '<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>': 'planet type', # link to yago category, can be explored more '<http://live.dbpedia.org/ontology/wikiPageExternalLink>': 'external link', # many '<http://l...
'<http://live.dbpedia.org/property/atmosphereComposition>': 'atmosphere chemistry', # text
<|file_name|>assoc-const.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 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...
impl<N: Nat> Nat for Succ<N> { const VALUE: usize = N::VALUE + 1;
<|file_name|>test_main.py<|end_file_name|><|fim▁begin|><|fim▁hole|> def test_safe_timezone_with_tzinfo_objects(): tz = _safe_timezone(pytz.timezone("Europe/Paris")) assert isinstance(tz, Timezone) assert "Europe/Paris" == tz.name<|fim▁end|>
import pytz from pendulum import _safe_timezone from pendulum.tz.timezone import Timezone
<|file_name|>policy.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # 2016-05-07 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Add realm dropdown # 2016-04-06 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Add time dependency in policy # 2016-02-22 Cornelius Kölbel <cor...
<|file_name|>0026_auto_20160426_1232.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-04-26 12:32 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ...
name='Staff', fields=[
<|file_name|>lusolve.js<|end_file_name|><|fim▁begin|>export var lusolveDocs = {<|fim▁hole|> syntax: ['x=lusolve(A, b)', 'x=lusolve(lu, b)'], description: 'Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.', examples: ['a = [-2, 3; 2, 1]', 'b = [11, 9]', 'x = lusolve(a, b...
name: 'lusolve', category: 'Algebra',
<|file_name|>ianna_score.py<|end_file_name|><|fim▁begin|>import pygame import time import scripts """ Score class Handles all the score area package: ianna """ class IannaScore(): def __init__ (self, buffer, screen, game_entities): self.score_image = pygame.image.load('artwork/marcador.png').convert() self....
self.print_char(entity.level,232,184) self.print_inventory(self.game_entities[0])
<|file_name|>later-hydrator.tsx<|end_file_name|><|fim▁begin|>import * as React from "react" export function LaterHydrator({ children, }: React.PropsWithChildren<Record<string, unknown>>): React.ReactNode { React.useEffect(() => {<|fim▁hole|> // eslint-disable-next-line no-unused-expressions import(`./lazy-hy...
<|file_name|>autocomplete_light_registry.py<|end_file_name|><|fim▁begin|>import autocomplete_light<|fim▁hole|> autocomplete_light.register(City, search_fields=('search_names',), autocomplete_js_attributes={'placeholder': 'city name ..'})<|fim▁end|>
from cities_light.models import City
<|file_name|>markdown_extensions.py<|end_file_name|><|fim▁begin|>import markdown import re from django.core.urlresolvers import reverse from django.template.context import Context from django.template.loader import render_to_string from wiki.core.permissions import can_read ATTACHMENT_RE = re.compile(r'(?P<before>.*)...
new_text.append(line)
<|file_name|>io.go<|end_file_name|><|fim▁begin|>package io import ( "fmt" "os" ) func Info(args ...interface{}) { fmt.Print("\033[1m-----> ") args = append(args, "\033[0m") fmt.Println(args...) } func Infof(format string, args ...interface{}) { fmt.Print("\033[1m-----> ") fmt.Printf(format+"\033[0m", args...)...
func Print(args ...interface{}) { fmt.Print(" ")
<|file_name|>lib.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.org/licenses/LI...
<|file_name|>update-google-chart.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # TODO: issues with new oauth2 stuff. Keep using older version of Python for now. # #!/usr/bin/env python import json import gspread from oauth2client.client import SignedJwtAssertionCredentials import datetime from participantCollectio...
<|file_name|>haudiobroadcast.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2011 Tuomo Penttinen, all rights reserved. * * Author: Tuomo Penttinen <tp@herqq.org> * * This file is part of Herqq UPnP Av (HUPnPAv) library. * * Herqq UPnP Av is free software: you can redistribute it and/or modify * it und...
{
<|file_name|>store_mocks.go<|end_file_name|><|fim▁begin|>// Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may // not use this file except in compliance with the License. A copy of the // License is located at // // h...
}
<|file_name|>text.mako.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/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% fr...
${helpers.predefined_type("text-decoration-line", "TextDecorationLine",
<|file_name|>LaunchScriptAction.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2013, Moss Computing Inc. * * This file is part of simpledeb. * * simpledeb 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 Foun...
* * Linking this library statically or dynamically with other modules is * making a combined work based on this library. Thus, the terms and
<|file_name|>generated_secondary_launch_config.go<|end_file_name|><|fim▁begin|>package client const ( SECONDARY_LAUNCH_CONFIG_TYPE = "secondaryLaunchConfig" ) type SecondaryLaunchConfig struct { Resource AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` AgentId string `json:"agentId,omit...
return resp, err } func (c *SecondaryLaunchConfigClient) ActionConsole(resource *SecondaryLaunchConfig, input *InstanceConsoleInput) (*InstanceConsole, error) {
<|file_name|>0004_auto_20171223_0859.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-23 08:59<|fim▁hole|>from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0003_auto_20171221_0336'), ] opera...
from __future__ import unicode_literals
<|file_name|>parseJson.py<|end_file_name|><|fim▁begin|>import json, sys, re def printString(s, begin, end): if not re.match(r'^(\*.*\*|CAM[0-9] .*|Z ?NULL.*)$', s): sys.stdout.write('{}_({}){}'.format(begin, json.dumps(s, ensure_ascii=False), end)) def parse(obj): if isinstance(obj, dict): for k, v in obj.items...
<|file_name|>st.js<|end_file_name|><|fim▁begin|>/** * 统计js * author zzy */ var st_config = {"memc":"","memcExpires":"","pass":0}; var st=(function(e){ var _self = this; var config = {}; /*获取cookie*/ var _getCookie = function(key){ var strCookie=document.cookie; var arrCookie=strCookie.split("; "); ...
<|file_name|>driver.rs<|end_file_name|><|fim▁begin|>//! Abstracts out the entire chain of runtime sub-drivers into common types. use crate::park::thread::ParkThread; use crate::park::Park; use std::io; use std::time::Duration; // ===== io driver ===== cfg_io_driver! { type IoDriver = crate::io::driver::Driver; ...
type SignalDriver = IoDriver; fn create_signal_driver(io_driver: IoDriver) -> io::Result<(SignalDriver, SignalHandle)> { Ok((io_driver, ()))
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! This module provides the interface to different solvers. //! //! Both [`coin_cbc`](https://docs.rs/coin_cbc/latest/coin_cbc/) and //! [`minilp`](https://docs.rs/minilp/0.2.2/minilp/) are available as cargo //! [features](https://doc.rust-lang.org/cargo/reference/feat...
use std::fs::File; use std::fs; use util::is_zero;
<|file_name|>project-cache-issue-37154.rs<|end_file_name|><|fim▁begin|>// run-pass #![allow(dead_code)] // Regression test for #37154: the problem here was that the cache // results in a false error because it was caching placeholder results // even after those placeholder regions had been popped. trait Foo { fn ...
struct Wrapper<T>(T);
<|file_name|>monocore.js<|end_file_name|><|fim▁begin|>//= require ./core/monocle //= require ./compat/env //= require ./compat/css //= require ./compat/stubs //= require ./compat/browser //= require ./compat/gala //= require ./core/bookdata //= require ./core/factory //= require ./core/events //= require ./core/styles ...
//= require ./core/reader
<|file_name|>another-py-invaders.py<|end_file_name|><|fim▁begin|># import libraries import math import random import pygame from pygame.locals import * pygame.init() pygame.mixer.init() width, height = 800, 600 screen = pygame.display.set_mode((width, height)) keys = [False, False, False, False] player = [100, 520] ...
elif event.key == K_s: keys[2] = False
<|file_name|>cpp.min.js<|end_file_name|><|fim▁begin|><|fim▁hole|>oid sha256:5181d344dc3334a5a80ecae84df1bb3107af7d92135639b56a7f73ec2ea1931c size 3057<|fim▁end|>
version https://git-lfs.github.com/spec/v1
<|file_name|>EventException.java<|end_file_name|><|fim▁begin|>/* * Copyright 2009-2020 Aarhus University * * 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.apach...
<|file_name|>loss_layer.cpp<|end_file_name|><|fim▁begin|>// Copyright 2013 Yangqing Jia #include <algorithm> #include <cmath> #include <cfloat> #include <vector> #include "caffe/layer.hpp" #include "caffe/vision_layers.hpp" #include "caffe/util/math_functions.hpp" #include "caffe/util/io.hpp" #define C_ ...
for (int i = 0; i < num; ++i) { int label = static_cast<int>(bottom_label[i]);
<|file_name|>intrinsics.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/lice...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#[no_mangle] pub extern "C" fn foo() {<|fim▁hole|><|fim▁end|>
println!("abc"); }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python<|fim▁hole|> # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT-license # Copyright (c) 2014 Bernardo Heynemann heynemann@gmail.com from fish_bundles.version import __version__<|fim▁end|>
# -*- coding: utf-8 -*- # This file is part of fish-bundles. # https://github.com/fish-bundles/fb
<|file_name|>forceListMetadata.ts<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2019, salesforce.com, inc. * All rights reserved. * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ import { CliCommandExec...
<|file_name|>raphael.js<|end_file_name|><|fim▁begin|>// ┌────────────────────────────────────────────────────────────────────┐ \\ // │ Raphaël 2.1.2 - JavaScript Vector Library │ \\ // ├────────────────────────────────────────────────────────────────────┤ \\ // │ Copyright © 2008-2012 Dmitry Ba...
- el (object) element to sync with - anim (object) animation to sync with - params (object) #optional final attributes for the element, see also @Element.attr
<|file_name|>CustomPrinter.java<|end_file_name|><|fim▁begin|>package org.andidev.applicationname.format.custom; <|fim▁hole|>import org.apache.commons.lang3.StringUtils; import org.springframework.expression.EvaluationContext; import org.springframework.expression.ExpressionParser; import org.springframework.expression....
import java.util.Locale; import org.andidev.applicationname.format.annotation.CustomFormat;
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from bananas.apps.appointment.forms import AppointmentForm from bananas.apps.appointment.models import Appointment from bananas.apps.appointment.models import AppointmentType @admin.register(Appointment) class AppointmentAdmin(admin....
list_filter = ('time', ) form = AppointmentForm
<|file_name|>ServerPublicKey.java<|end_file_name|><|fim▁begin|>package com.sochat.client; import java.math.BigInteger; import java.security.GeneralSecurityException; import java.security.KeyFactory; import java.security.PublicKey; import java.security.spec.RSAPublicKeySpec; public class ServerPublicKey { public ...
<|file_name|>issue_reporting.py<|end_file_name|><|fim▁begin|># Copyright (c) 2017 Charles University, Faculty of Arts, # Institute of the Czech National Corpus # Copyright (c) 2017 Tomas Machalek <tomas.machalek@gmail.com> # # This program is free software; you can redistribute it and/or # modify it ...
<|file_name|>sequence_base_listener.go<|end_file_name|><|fim▁begin|>// File generated by ANTLR. DO NOT EDIT. package sequence // Sequence import "github.com/antlr/antlr4/runtime/Go/antlr" // BaseSequenceListener is a complete listener for a parse tree produced by SequenceParser. type BaseSequenceListener struct{} va...
<|file_name|>DataRdr_.java<|end_file_name|><|fim▁begin|>package gplx.core.stores; import gplx.*; import gplx.core.*; import gplx.core.strings.*; public class DataRdr_ { public static final DataRdr Null = new DataRdr_null(); public static DataRdr as_(Object obj) {return obj instanceof DataRdr ? (DataRdr)obj : n...
<|file_name|>wordprocessor.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import additional import animal import configuration import dbfs import financial import html import log import medical import person import users import utils from i18n import _, format_currency_no_symbol, now, python2display, yes_no from si...
displaydob = python2display(l, a["DATEOFBIRTH"]) displayage = a["ANIMALAGE"] estimate = "" if a["ESTIMATEDDOB"] == 1:
<|file_name|>lint.go<|end_file_name|><|fim▁begin|>// Package staticcheck contains a linter for Go source code. package staticcheck // import "honnef.co/go/tools/staticcheck" import ( "fmt" "go/ast" "go/constant" "go/token" "go/types" htmltemplate "html/template" "net/http" "regexp" "sort" "strconv" "strings...
} } }
<|file_name|>TagEnum.java<|end_file_name|><|fim▁begin|>package com.xyp.sapidoc.idoc.enumeration; import java.util.HashSet; import java.util.Set; /** * * @author Yunpeng_Xu */ public enum TagEnum { FIELDS("FIELDS"), RECORD_SECTION("RECORD_SECTION"), CONTROL_RECORD("CONTROL_RECORD"), ...
TagEnum[] tagEnums = TagEnum.values(); for (TagEnum tagEnum : tagEnums) { tags.add(tagEnum.getTagBegin());
<|file_name|>382-linked-list-random-node.py<|end_file_name|><|fim▁begin|>import random # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): _largesize = 300 def __init__(self, head): self....
return _get(nextpos, self.head)
<|file_name|>post_anju.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #-*- coding:utf-8 -*- from poster.encode import multipart_encode from poster.streaminghttp import register_openers import urllib2,urllib,sys,time import cookielib,mechanize import re DEBUG =0 reload(sys) sys.setdefaultencoding('utf8') #@Undef...
httpsHandler = mechanize.HTTPSHandler()
<|file_name|>density.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless...
It("[Feature:ManualPerformance] should allow running maximum capacity pods on nodes", func() { totalPods = 0 for _, n := range nodes.Items { totalPods += int(n.Status.Capacity.Pods().Value())
<|file_name|>tuples.rs<|end_file_name|><|fim▁begin|>use data::*; use generators::core::*; macro_rules! tuple_generator_impl { ($gen_a:ident: $var_a:ident: $type_a:ident $(, $gen_n: ident: $var_n:ident: $type_n:ident)*) => ( impl<$type_a: Generator, $($type_n: Generator),*> Generator ...