prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2011-2012 clevelandcoin Developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licens...
<|file_name|>Helper.cpp<|end_file_name|><|fim▁begin|>#include "stdafx.h" #include "Helper.h" #include "common.h" Helper::Helper(void) { x = rand() % wide; y = 0; type = rand() % 5; exist = true; } Helper::~Helper(void) { } //wide //height void Helper::get(Player* p) { y += 2; if (y >= height)//ÅжÏÊÇ·ñ³öÁËÆÁÄ...
p->bombnum ++; }
<|file_name|>express.js<|end_file_name|><|fim▁begin|>let express = require('express'); let bodyParser = require('body-parser'); let path = require('path');<|fim▁hole|>module.exports = function() { let app = express(); app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json()); app.use('/ga...
<|file_name|>airflow.py<|end_file_name|><|fim▁begin|>from shutit_module import ShutItModule import base64 class openshift_airflow(ShutItModule): def build(self, shutit): shutit.send('cd /tmp/openshift_vm') shutit.login(command='vagrant ssh') shutit.login(command='sudo su -',password='vagrant',note='Become root...
# Takes too long. #shutit.send('oc describe buildconfig airflow',note='Ideally you would take this github url, and update your github webhooks for this project. But there is no public URL for this server so we will skip and trigger a build manually.') #shutit.send('oc start-build airflow',note='Trigger a build by...
<|file_name|>mqtt.py<|end_file_name|><|fim▁begin|># This file is part of Scapy # See http://www.secdev.org/projects/scapy for more informations # Copyright (C) Santiago Hernandez Ramos <shramos@protonmail.com> # This program is published under GPLv2 license from scapy.packet import Packet, bind_layers from scapy.fiel...
VariableFieldLenField("len", None, length_of="len", adjust=lambda pkt, x: len(pkt.payload),), ]
<|file_name|>securitygroups.go<|end_file_name|><|fim▁begin|>package network // Copyright (c) Microsoft and contributors. 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 Licens...
return }
<|file_name|>GalleryRoute.ts<|end_file_name|><|fim▁begin|>'use strict'; import express = require('express'); const router: express.Router = express.Router(); <|fim▁hole|> router.get('/:limit', service.getAll); router.get('/main/:limit', service.getAll); router.get('/main/random/:limit', service.getRandomGallery); rout...
const service = require('../../services').GalleryService;
<|file_name|>part1.rs<|end_file_name|><|fim▁begin|>// adventofcode - day 9 // part 1 use std::io::prelude::*; use std::fs::File; use std::collections::HashSet; struct Graph { nodes: Option<Vec<String>>, matrix: Option<Vec<Vec<i32>>>, } impl Graph { fn new(names: HashSet<&str>) -> Graph { let mut...
} // bruteforce solution
<|file_name|>filter.py<|end_file_name|><|fim▁begin|># Filename: filter.py """ LendingClub2 Filter Module """ # Standard libraries import collections from abc import abstractmethod from abc import ABC # lendingclub2 from lendingclub2.error import LCError # pylint: disable=too-few-public-methods class BorrowerTrait...
<|file_name|>STM32F429IDISCOVERY.py<|end_file_name|><|fim▁begin|>#!/bin/false # This file is part of Espruino, a JavaScript interpreter for Microcontrollers # # Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk> # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the ...
pins = pinutils.scan_pin_file([], 'stm32f40x.csv', 6, 9, 10) return pinutils.only_from_package(pinutils.fill_gaps_in_pin_list(pins), chip["package"])
<|file_name|>services.py<|end_file_name|><|fim▁begin|># Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the t...
<|file_name|>use_closure_externs.js<|end_file_name|><|fim▁begin|>goog.module('test_files.use_closure_externs.use_closure_externs');var module = module || {id: 'test_files/use_closure_externs/use_closure_externs.js'};/** * @fileoverview A source file that uses types that are used in .d.ts files, but * that are not ava...
* @suppress {checkTypes} checked by tsc */
<|file_name|>data_source_google_compute_ssl_policy.go<|end_file_name|><|fim▁begin|>package google import ( "fmt" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" ) func dataSourceGoogleComputeSslPolicy() *schema.Resource { // Generate datasource schema from resource dsSchema := datasourceSchemaFromResou...
return err } policyName := d.Get("name").(string)
<|file_name|>grpc.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
on the server. """ # Generate a "stub function" on-the-fly which will actually make
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from achievs.models import Achievement # from achievs.models import Gold # from achievs.models import Silver # from achievs.models import Bronze # from achievs.models import Platinum from achievs.models import Level # class PlatinumInl...
<|file_name|>Ui_MainWindow.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'D:\github repos\Python\A05_SimplyGame\Binaries\MyView.ui' # # Created: Tue Oct 25 22:22:12 2016 # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes m...
self.formLayout.setWidget(9, QtGui.QFormLayout.FieldRole, self.label_9) self.label_10 = QtGui.QLabel(self.formLayoutWidget) self.label_10.setObjectName("label_10")
<|file_name|>eip150_state.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity 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, eith...
use super::test_common::*; use tests::helpers::*;
<|file_name|>bloom-cmd.py<|end_file_name|><|fim▁begin|>#!/bin/sh """": # -*-python-*- bup_python="$(dirname "$0")/bup-python" || exit $? exec "$bup_python" "$0" ${1+"$@"} """ # end of bup preamble import glob, os, sys, tempfile from bup import options, git, bloom from bup.helpers import (add_error, debug1, handle_ctr...
else: do_bloom(path, outfilename) if saved_errors:
<|file_name|>anon_trait_static_method_exe.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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 // htt...
let x = Foo::new(); println!("{}", x.x); }
<|file_name|>datalib.py<|end_file_name|><|fim▁begin|>"""Copyright 2008 Orbitz WorldWide 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 requi...
from ..utils import epoch
<|file_name|>cnetwork_tree_node.py<|end_file_name|><|fim▁begin|>""" Specify the NetworkNode with its action, context-menus """ # Copyright (C) 2009-2010, Ecole Polytechnique Federale de Lausanne (EPFL) and # University Hospital Center and University of Lausanne (UNIL-CHUV) # # Modified BSD License # Standard library i...
# a default icons # Name of group item icon icon_group = Str('home.png')
<|file_name|>cards.js<|end_file_name|><|fim▁begin|>// Models app.SearchModel = Backbone.Model.extend({ idAttribute: "session_token",<|fim▁hole|> } }); // Collections app.SearchCollection = Backbone.Collection.extend({ model: app.SearchModel, url: function() { if (typeof this...
urlRoot: function() { var u = '/search/' + this.id; return u;
<|file_name|>utility.ts<|end_file_name|><|fim▁begin|>const boolType = "boolean" const funType = "function"; const stringType = "string"; export function isFunction(obj: any) { if (!obj) return null; return typeof obj === funType; } <|fim▁hole|> return obj === undefined; } export function getFullDateFormated() { ...
export function isUndefined(obj: any) {
<|file_name|>Map.ts<|end_file_name|><|fim▁begin|>import {Sequelize} from 'sequelize'; import {DataTypes} from 'sequelize'; export default function (sequelize: Sequelize, DataTypes: DataTypes) { let Map = sequelize.define('Map', { uid: { type: DataTypes.STRING, allowNull: false }, name: { ...
tableName: 'core__map', charset: 'utf8' });
<|file_name|>keyboard_win32_unittests.cc<|end_file_name|><|fim▁begin|>// Copyright 2013 The Flutter 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 "flutter/shell/platform/common/json_message_codec.h" #include "flutter/shell...
kWmResultZero)}); EXPECT_EQ(key_calls.size(), 1);
<|file_name|>Tab1.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react'; import {ContentBlock} from 'framework7-react'; export const Tab1 = () => { return ( <ContentBlock> <p>Tab 1</p> <p><a href="/nested-routes/tabs/tab-2/">Go to tab 2</a></p> <p><a href="/ne...
); };
<|file_name|>apply_crd_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2019 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 ...
} } } }`), &noxuDefinition.Spec.Versions[0].Schema)
<|file_name|>fmt.rs<|end_file_name|><|fim▁begin|>use std::fmt; #[cfg(all(feature = "color", not(target_os = "windows")))] use ansi_term::Colour::{Red, Green, Yellow}; #[cfg(all(feature = "color", not(target_os = "windows")))] use ansi_term::ANSIString; #[allow(dead_code)] pub enum Format<T> { Error(T), Warn...
<|file_name|>DiagnosticGroupWarningsGuard.java<|end_file_name|><|fim▁begin|>/* * Copyright 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.or...
public DiagnosticGroupWarningsGuard(
<|file_name|>service.rs<|end_file_name|><|fim▁begin|>use futures::{Future, IntoFuture}; use std::io; use std::marker::PhantomData; use std::sync::{Arc, Mutex}; /// An asynchronous function from `Request` to a `Response`. /// /// The `Service` trait is a simplified interface making it easy to write /// network applicat...
/// type Resp = T::Resp; /// type Error = T::Error; /// type Fut = Box<Future<Item = Self::Resp, Error = Self::Error>>; ///
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ This module contains the :class:`.DataType` class and its subclasses. These types define how data should be converted during the creation of a :class:`.Table`. A :class:`TypeTester` class is also included which be used to infer data types...
if i in force_indices: continue
<|file_name|>log_reader.py<|end_file_name|><|fim▁begin|>import time import asyncio from aiokafka import AIOKafkaProducer from settings import KAFKA_SERVERS, SAVEPOINT, LOG_FILE, KAFKA_TOPIC class LogStreamer: def __init__(self, KAFKA_SERVERS, KAFKA_TOPIC, loop, ...
self.savepoint_file.seek(0) self.savepoint_file.write(str(current_position)) continue
<|file_name|>SlippyMapOriginal.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sip sip.setapi('QVariant', 2) import math from PyQt4 import QtCore, QtGui, QtNetwork from lib.Point import Point from lib.tileOperations import * TDIM = 256 class LightMaps(QtGui.QWidget): def __init__(self, parent = N...
#path = 'http://tile.openstreetmap.org/%d/%d/%d.png' % (self.zoom, grab.x(), grab.y()) path = 'https://mts2.google.com/vt?lyrs=y&x={0}&y={1}&z={2}'.format(grab.x(), grab.y(), self.parent.zoom) print path
<|file_name|>IndexerSQLMetadataStorageCoordinatorTest.java<|end_file_name|><|fim▁begin|>/* * Licensed to Metamarkets Group Inc. (Metamarkets) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Metamarkets l...
{ additionalNumberedShardTest(ImmutableSet.of(numberedSegment0of0, numberedSegment1of0, numberedSegment2of0)); }
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import importlib def import_string(import_name: str): """ Import an object based on the import string. <|fim▁hole|> raise RuntimeError( f'{import_name} must separate module from object with ":". ' f'For example, "linguee_api.dow...
Separate module name from the object name with ":". For example, "linuguee_api.downloaders:HTTPXDownloader" """ if ":" not in import_name:
<|file_name|>fields.py<|end_file_name|><|fim▁begin|>"""Contain common module fields.""" # pylint: disable=too-many-public-methods from __future__ import absolute_import import re from django.db import models from django.core.exceptions import ValidationError class NameField(models.CharField): """Item name string...
Bad examples:
<|file_name|>Sizzle.js<|end_file_name|><|fim▁begin|>// #ifndef jquery /* * Sizzle CSS Selector Engine * Copyright, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function(){ var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][...
// We ended someplace up the tree so do a sibling check return i === al ? siblingCheck( a, bp[i], -1 ) :
<|file_name|>authentication.py<|end_file_name|><|fim▁begin|># accounts/authentication.py import requests import logging from django.conf import settings from django.contrib.auth import get_user_model logger = logging.getLogger(__name__) User = get_user_model() PERSONA_VERIFY_URL = 'https://verifier.login.persona.or...
logging.warning(response.content.decode()) if response.ok and response.json()['status'] == 'okay': email = response.json()['email']
<|file_name|>bitrate_prober.cc<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property right...
// Compute the time delta needed to send packet_size bytes at bitrate_bps // bps. Result is in milliseconds.
<|file_name|>CommandInputRecordField.ts<|end_file_name|><|fim▁begin|>import {CommandLineBinding} from "./CommandLineBinding"; import { CommandInputArraySchema, CommandInputEnumSchema, CommandInputMapSchema, CommandInputRecordSchema, CommandInputSchema } from "./CommandInputSchema"; import {Datatype}...
<|file_name|>event_event.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields, api, _ from odoo.addons.http_routing.models.ir_http import slug class EventEvent(models.Model): _inherit = "event.event" ...
<|file_name|>insertion_sort.py<|end_file_name|><|fim▁begin|># _*_ encoding: utf-8 _*_ import timeit def insertion_sort(nums): """Insertion Sort.""" for index in range(1, len(nums)): val = nums[index] left_index = index - 1 while left_index >= 0 and nums[left_index] > val: n...
def insertion_sort_tuples(nums): """Insertion Sort."""
<|file_name|>luoo_Download.py<|end_file_name|><|fim▁begin|>import urllib2 import os import re<|fim▁hole|>print 'version: v1.0' print 'author: ChenYao' print 'data: 2013/9/4' print 'Introductions: the music will Downloaded to path D:\\Luoo.net\\' print '---------------------------------------------------------------' ...
import time print '---------------------------------------------------------------' print 'Name: Luoo.net-Mp3 crawler '
<|file_name|>clone_rope.rs<|end_file_name|><|fim▁begin|>extern crate ropey; use std::iter::Iterator; use ropey::Rope; const TEXT: &str = include_str!("test_text.txt"); #[test] fn clone_rope() { let mut rope1 = Rope::from_str(TEXT); let mut rope2 = rope1.clone();<|fim▁hole|> rope1.insert(432, "Hello "); ...
// Do identical insertions into both ropes
<|file_name|>test_wsgi_breakpad_collector.py<|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/. import hashlib import StringIO import gzip imp...
eq_(rc.Version, '99') eq_(rc.some_field, '23') eq_(rc.some_other_field, 'XYZ')
<|file_name|>test_convert.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals<|fim▁hole|>import io from glob import glob from psd_tools import PSDImage from psd2svg import psd2svg FIXTURES = [ p for p in glob( os.path.join(os.path.dirname(__file__), 'fixtures', '*.psd')...
from builtins import str import os import pytest
<|file_name|>v1_namespace_spec.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.6.1<|fim▁hole|> from pprint import pformat from six import iteritems import re cla...
Generated by: https://github.com/swagger-api/swagger-codegen.git """
<|file_name|>multiProjects.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Protein Engineering Analysis Tool DataBase (PEATDB) # Copyright (C) 2010 Damien Farrell & Jens Erik Nielsen # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License...
DB.meta.refprotein = 'wt' DB.meta.info['protein'] = name
<|file_name|>apply_update.js<|end_file_name|><|fim▁begin|>import { includes } from './array_proxy' /** * Given a record and an update object, apply the update on the record. Note * that the `operate` object is unapplied. * * @param {Object} record * @param {Object} update */ export default function applyUpdate ...
function exclude (values, value) { return !includes(values, value)
<|file_name|>parrot_utils.py<|end_file_name|><|fim▁begin|># # Copyright (C) 2012-2014 The Paparazzi Team # # This file is part of Paparazzi. # # Paparazzi 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...
return execute_command(tn, 'cat ' + directory + '/version.txt')
<|file_name|>interpreterutils.rs<|end_file_name|><|fim▁begin|>use bytecodes::bytecode; use context::Context; use stack::StackEntry; use constants; use exceptions::{throw_exception, throw_exception_from_interpretererror, InterpreterException}; use traits::{BufferAccessor, HasType}; // macro allowing to simplify null re...
.set_local(index as i16, value_to_put1)
<|file_name|>imcbackup.py<|end_file_name|><|fim▁begin|># Copyright 2016 Cisco Systems, 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 # # U...
mgmt_backup.hostname = remote_host
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from .models import * from django.contrib import admin class PingLogAdmin(admin.ModelAdmin): list_display = ('id','hash_key','url','ip_address','user_agent','time')<|fim▁hole|> admin.site.register(PingLog, PingLogAdmin)<|fim▁end|>
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test import TestCase from django.test.client import Client from django.test.utils import override_settings @override_settings(AUTHENTICATION_BACKENDS= ...
'class_num': '', 'phone_num': ''})
<|file_name|>pg.rs<|end_file_name|><|fim▁begin|>use discrete::{DiscreteDist32}; use env::{Env, DiscreteEnv, EnvRepr, EnvConvert, Action, DiscreteAction, Response, Value, Episode, EpisodeStep}; use operator::prelude::*; use operator::rw::{ReadBuffer, ReadAccumulateBuffer, WriteBuffer, AccumulateBuffer}; use rng::xorshi...
panic!();
<|file_name|>securityhub.rs<|end_file_name|><|fim▁begin|>#![cfg(feature = "securityhub")] extern crate env_logger; extern crate rusoto_core; extern crate rusoto_securityhub; use rusoto_core::Region; use rusoto_securityhub::{ListInvitationsRequest, SecurityHub, SecurityHubClient}; <|fim▁hole|> let _ = env_logger::t...
#[tokio::test] #[ignore] async fn should_list_invitations() {
<|file_name|>quickstart.js<|end_file_name|><|fim▁begin|>// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applica...
<|file_name|>few-ones.rs<|end_file_name|><|fim▁begin|>use test_float_parse::validate; fn main() { let mut pow = vec![]; for i in 0..63 { pow.push(1u64 << i); } for a in &pow { for b in &pow { for c in &pow {<|fim▁hole|> } }<|fim▁end|>
validate(&(a | b | c).to_string()); } }
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>use formats::{match_name, Format}; use once_cell::sync::Lazy; use parser::{ eyre::{bail, Result}, graph_triples::{Resource, ResourceInfo}, ParserTrait, }; use std::collections::BTreeMap; use std::sync::Arc; // Re-exports pub use parser::Parser; // The follo...
($format:expr, $method:ident $(,$arg:expr)*) => {
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import { Component } from 'vidom'; import { DocComponent, DocTabs, DocTab, DocAttrs, DocAttr, DocExample, DocChildren, DocText, DocInlineCode } from '../../Doc'; import SimpleExample from './examples/SimpleExample'; import simpleExampleCode from '!raw!./examples/Simple...
<|file_name|>flag.rs<|end_file_name|><|fim▁begin|>// Std use std::convert::From; use std::ffi::{OsStr, OsString}; use std::fmt::{Display, Formatter, Result}; use std::mem; use std::rc::Rc; use std::result::Result as StdResult; // Internal use args::{AnyArg, ArgSettings, Base, DispOrder, Switched}; use map::{self, VecM...
impl<'n, 'e> FlagBuilder<'n, 'e> { pub fn new(name: &'n str) -> Self {
<|file_name|>scheme.rs<|end_file_name|><|fim▁begin|>use alloc::boxed::Box; use collections::string::{String, ToString}; use collections::vec::Vec; use collections::vec_deque::VecDeque; use core::ops::DerefMut; use core::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; use core::usize; use common::elf::Elf; use com...
_lseek: usize, _fsync: usize,
<|file_name|>table.ts<|end_file_name|><|fim▁begin|>/// <reference path="../vendor/underscore.d.ts" /> /// <reference path="./promises/promises.ts" /> /// <reference path="./common.ts" /> module IndexedStorage { export module Table { <|fim▁hole|> export interface Info { ix: string[][]; ux: string[][]; key:s...
<|file_name|>configs.py<|end_file_name|><|fim▁begin|># 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
'django', ]
<|file_name|>config.py<|end_file_name|><|fim▁begin|># Copyright 2011 VMware, 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://www.apache...
cfg.ListOpt('service_plugins', default=[], help=_("The service plugins Neutron will use")), cfg.StrOpt('base_mac', default="fa:16:3e:00:00:00", help=_("The base MAC address Neutron will use for VIFs")),
<|file_name|>to_bits.rs<|end_file_name|><|fim▁begin|>use itertools::Itertools; use malachite_base::num::basic::signeds::PrimitiveSigned; use malachite_base::num::basic::unsigneds::PrimitiveUnsigned; use malachite_base_test_util::bench::bucketers::{signed_bit_bucketer, unsigned_bit_bucketer}; use malachite_base_test_uti...
<|file_name|>sint.rs<|end_file_name|><|fim▁begin|>use super::{write_marker, RmpWrite}; use crate::encode::{ write_pfix, write_u16, write_u32, write_u64, write_u8, ValueWriteError, }; use crate::Marker; /// Encodes and attempts to write a negative small integer value as a negative fixnum into the /// given write. /...
wr.write_data_i16(val)?;
<|file_name|>CCParser.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 # Copyright (C) 2014-2016, 2018 Rafael Senties Martinelli # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License 3 as published by # the Free Software Foundation. # #...
if not os.path.exists(os.path.dirname(self.ini_path)):
<|file_name|>sidenav.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import { MdDrawer, MdDrawerContainer } from './drawer'; export declare class MdSidenav extends MdDrawer { } export declare class MdSidenavContainer extends MdDrawerContainer { _drawers: any; }<|fim▁end|>
<|file_name|>AutoConfigureJooq.java<|end_file_name|><|fim▁begin|>/* * Copyright 2012-2019 the original author or 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 * * https...
import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited;
<|file_name|>navigation-controls.js<|end_file_name|><|fim▁begin|>import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; import {defaults as defaultControls, ZoomToExtent} from '../src/ol/control.js'; import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.js'; const m...
813079.7791264898, 5929220.284081122,
<|file_name|>request.py<|end_file_name|><|fim▁begin|>import asyncio import email.utils import json import sys from cgi import parse_header from collections import namedtuple from http.cookies import SimpleCookie from urllib.parse import parse_qs, unquote, urlunparse from httptools import parse_url from sanic.excepti...
"raw_url", "stream",
<|file_name|>value_from_settings.py<|end_file_name|><|fim▁begin|>''' /******************************************************************************* * * Copyright (c) 2015 Fraunhofer FOKUS, All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the ...
class ValueFromSettings(Node): def __init__(self, settingsvar, asvar): self.arg = Variable(settingsvar)
<|file_name|>validate.js<|end_file_name|><|fim▁begin|>//>>built<|fim▁hole|><|fim▁end|>
define({invalidMessage:"Angivet v\u00e4rde \u00e4r inte giltigt.",missingMessage:"V\u00e4rdet kr\u00e4vs.",rangeMessage:"V\u00e4rdet ligger utanf\u00f6r intervallet."});
<|file_name|>boss_skeram.cpp<|end_file_name|><|fim▁begin|>/* * * Copyright (C) 2011-2013 ArkCORE <http://www.arkania.net/> * * Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/> * * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you...
<|file_name|>deriving-cmp-generic-enum.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// 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 //...
<|file_name|>norm_blr.py<|end_file_name|><|fim▁begin|>from __future__ import print_function from __future__ import division import os import sys import numpy as np import pandas as pd from ast import literal_eval try: # run as a package if installed from pcntoolkit.model.bayesreg import BLR from pcntoolkit.n...
<|file_name|>ui_mainwindow.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindow.ui' # # Created: Wed May 25 13:43:28 2016 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import Qt...
self.saveToolButton = QtGui.QToolButton(self.frame) self.saveToolButton.setGeometry(QtCore.QRect(60, 0, 32, 32)) icon2 = QtGui.QIcon()
<|file_name|>enum_type_wrapper.py<|end_file_name|><|fim▁begin|># Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted p...
self._enum_type.name, number)) def Value(self, name):
<|file_name|>MobileFactory.java<|end_file_name|><|fim▁begin|>package demo.designpatterns.simplefactory; /** * Created by Roger Xu on 2017/6/24. */<|fim▁hole|> if (title.equalsIgnoreCase("nokia")) { return new Nokia(); } else if (title.equalsIgnoreCase("motorola")) { return new ...
public class MobileFactory { public Mobile getMobile(String title) throws Exception {
<|file_name|>map_unlock_codec.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from hazelcast.protocol.builtin import DataCodec # hex: 0x011300 _REQUEST_MESSAGE_TYPE = 70400 # hex: 0x011301 _RESPONSE_MESSAGE_TYPE = 70401 _REQUEST_THREAD_ID_OFFSET = REQUEST_HEADER_SIZE _REQUEST_REFERENCE_ID_OFFSET = _REQUEST_THREAD_ID_OFFS...
from hazelcast.serialization.bits import * from hazelcast.protocol.builtin import FixSizedTypesCodec from hazelcast.protocol.client_message import OutboundMessage, REQUEST_HEADER_SIZE, create_initial_buffer from hazelcast.protocol.builtin import StringCodec
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>declare module "fscreen" { namespace fscreen { export const fullscreenEnabled: boolean; export const fullscreenElement: Element | null; export const requestFullscreen: (elem: Element) => void; export const requestFullscreenFunction: (elem: Element) => (...
export default fscreen; }
<|file_name|>jsonutil.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import sys def diff(a,b): return compareTree(a, b) def getType(a): if isinstance(a, dict): return 'object' elif isinstance(a, list): return 'array' elif isinstance(a, str): return 'string' elif is...
#if key[0:4] == '_sys': # continue
<|file_name|>dubstep.py<|end_file_name|><|fim▁begin|>#Kunal Gautam #Codewars : @Kunalpod #Problem name: Dubstep #Problem level: 6 kyu <|fim▁hole|><|fim▁end|>
def song_decoder(song): return " ".join(" ".join(song.split('WUB')).split())
<|file_name|>UserData.ts<|end_file_name|><|fim▁begin|>export class UserData { givenName: string; familyName: string;<|fim▁hole|> email: string; }<|fim▁end|>
name: string;
<|file_name|>text_io_xml.py<|end_file_name|><|fim▁begin|>bl_info = { "name" : "text objects to-from xml", "author" : "chebhou", "version" : (1, 0), "blender" : (2, 7, 3), "location" : "file->export->text to-from xml", "discription" : "copys an text objectx from-to xml file", "wiki_url" : " h...
for sce in bpy.data.scenes :
<|file_name|>solver041.rs<|end_file_name|><|fim▁begin|>// COPYRIGHT (C) 2017 barreiro. All Rights Reserved. // Rust solvers for Project Euler problems use euler::algorithm::combinatorics::permutations_with; use euler::algorithm::long::{from_digits_index, is_even}; use euler::algorithm::prime::miller_rabin; use euler::...
pub n: isize, }
<|file_name|>decorators.py<|end_file_name|><|fim▁begin|>from pypermissions.permission import PermissionSet def _prepare_runtime_permission(self, perm=None, runkw=None, args=None, kwargs=None): """This function parses the provided string arguments to decorators into the actual values for use when the decorator...
if not perm_check(perm_set, permission): return on_failure(self, *args, **kwargs)
<|file_name|>server.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import os import subprocess<|fim▁hole|><|fim▁end|>
running = os.system("nc -u -l -p 5001 | mplayer -cache 1024 -") #subprocess.check_call('/opt/vc/bin/raspivid -n -w 800 -h 600 -fps 24 -t 0 -o - | socat - udp-sendto:' + '129.16.194.248' + ':5001')
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 Google LLC // // Use of this source code is governed by an MIT-style license that can be found // in the LICENSE file or at https://opensource.org/licenses/MIT. use std::fmt::{Debug, Display, Formatter}; use regex::Error as RegexError; /// An error t...
<|file_name|>0025_auto_20170109_2017.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.11 on 2017-01-09 19:17 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('productdb', '0024_auto_...
<|file_name|>0003_auto_20170313_0117.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-13 01:17 from __future__ import unicode_literals from django.db import migrations, models import uuid class Migration(migrations.Migration): dependencies = [ ('dash', '000...
operations = [
<|file_name|>DefaultMetaResolver.java<|end_file_name|><|fim▁begin|>package com.ejlchina.searcher.implement; import com.ejlchina.searcher.*; import com.ejlchina.searcher.bean.InheritType; import java.lang.reflect.Field; import java.util.*; import java.lang.reflect.Modifier; import java.util.concurrent.ConcurrentHashMa...
private final Map<Class<?>, BeanMeta<?>> cache = new ConcurrentHashMap<>();
<|file_name|>test_dataset.py<|end_file_name|><|fim▁begin|># Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Ap...
<|file_name|>controller_ref_manager.go<|end_file_name|><|fim▁begin|>package deploymentconfig import ( "fmt" "github.com/golang/glog" kerrors "k8s.io/apimachinery/pkg/api/errors" kmetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" klabels "k8s.io/apimachinery/pkg/labels" kschema "k8s.io/apimachinery/pkg/runtime/schem...
// NewRCControllerRefManager returns a RCControllerRefManager that exposes
<|file_name|>parse_clinical_trials.py<|end_file_name|><|fim▁begin|>############################################################################## # Clinical trials parser # # eg 2013-2016 ############################################################################## import cPickle, os, re def main(): #base_dir = ...
elif drug in synonym_to_drug: drugbank_id = synonym_to_drug[drug] else:
<|file_name|>example_test.go<|end_file_name|><|fim▁begin|>package compress_test import ( "io" "net/http" "github.com/mkch/burrow/compress" )<|fim▁hole|>} func ExampleNewResponseWriter() { handler := func(w http.ResponseWriter, r *http.Request) { cw, _ := compress.NewResponseWriter(w, compress.DefaultGzipWriter...
func ExampleNewHandler() { http.ListenAndServe(":8080", compress.NewHandler(http.DefaultServeMux, nil))
<|file_name|>api_op_DeprovisionIpamPoolCidr.go<|end_file_name|><|fim▁begin|>// Code generated by smithy-go-codegen DO NOT EDIT. package ec2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/ec2/types" ...
if err = addResolveEndpointMiddleware(stack, options); err != nil { return err }
<|file_name|>map_element.cpp<|end_file_name|><|fim▁begin|>#include "platform/i_platform.h" #include "core/map/map_element.h" namespace map { MapElement::~MapElement() { } MapElement::MapElement( int32_t Id ) : mIdentifier( 0 ) , mId( Id ) , mSpawnedActorGUID( -1 ) { SetNextUID(); } void MapElement:...
return *this; } DefaultMapElement::DefaultMapElement( int32_t Id )
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (C) 2015 Henrique Pereira Coutada Miranda # All rights reserved. # # This file is part of yambopy # # """ Create, read and write yambo input files Read, modify and write yambo databases Analyse results from yambo calculations Modules: io - Y...
from yambopy.dbs.latticedb import * from yambopy.dbs.electronsdb import *