prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>ShareAdapter.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2017 Martin Pfeffer * * 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/licens...
<|file_name|>check_reqs.js<|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...
<|file_name|>dbsnapshot.py<|end_file_name|><|fim▁begin|># Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # 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, incl...
<|file_name|>track_info_sse.py<|end_file_name|><|fim▁begin|>import logging from concurrent.futures import CancelledError import asyncio from aiohttp import web from aioredis import create_redis from etc.ice_fetcher import get_current_song from config.settings import STREAM_HOST, STREAM_PORT server_logger = logging....
# every 3 second request for new song. stream.write(b'event: track_update\r\n') stream.write(b'data: ' + message + b'\r\n\r\n') else:
<|file_name|>serverTools.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import keyring from ironworks.database import mDb, db app = None rundir = None datadir = None logger = None webroot = "" log_list = [] log_file = "" commits_behind = 0 latest_commit = None current_commit = None commits_compare_url = "" us...
<|file_name|>core.middleware.compression.js<|end_file_name|><|fim▁begin|>"use strict"; var compression = require("../lib/core/middleware/compression"); describe("core.middleware.compression", function() { var fakeThis; beforeEach("create fake this", function() { fakeThis = { enabled: sinon.stub().wit...
<|file_name|>ca-multicore.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import numpy as np from sklearn.metrics import mutual_info_score import MDAnalysis import os import re import math import sys from itertools import combinations_with_replacement,permutations from concurrent.futures import ProcessPoolExecutor, F...
def t_time(X, t_t): rg = 1
<|file_name|>example_gossip_codebox.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2006 - 2011 ScriptDev2 <http://www.scriptdev2.com/> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; ei...
Script* pNewScript; pNewScript = new Script;
<|file_name|>AStar.hpp<|end_file_name|><|fim▁begin|>/* * AStar.hpp * * Created on: 10.07.2014 * Author: lowkey */ #ifndef ASTAR_HPP_ #define ASTAR_HPP_ #include "DungeonGenerator.hpp" #include <vector> #include <algorithm> #include <cassert> #include <iostream> typedef std::vector<Position> Path; templa...
<|file_name|>radionodelist.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::codegen::Bindings::HTMLInputElementB...
}
<|file_name|>div.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -* # Filename: div.py __author__ = 'Piratf' from pygame.locals import *<|fim▁hole|>class Div(object): """small panel in the frame""" def __init__(self, (width, height), (x, y) = (0, 0)): # super(Div, self).__init__() self.wid...
import pygame
<|file_name|>quality_review_objective.py<|end_file_name|><|fim▁begin|><|fim▁hole|># Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt # import frappe from frappe.model.document import Document class QualityReviewObjective(Document): pass<|fim▁end|>
<|file_name|>nmcli.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Chris Long <alcamie@gmail.com> <chlong@redhat.com> # # This file is a module for Ansible that interacts with Network Manager # # Ansible is free software: you can redistribute it and/or modify # it under the terms ...
cmd.append(self.ip4) if self.gw4 is not None: cmd.append('ipv4.gateway')
<|file_name|>methods.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use blob_loader::load_blob_sync; use data_loader::decode; use...
// Step 16. if internal_response.url_list.is_empty() { internal_response.url_list = request.url_list.clone(); }
<|file_name|>001-fizzbuzz.py<|end_file_name|><|fim▁begin|>import sys file_name = sys.argv[1] with open(file_name) as open_file: for line in open_file.readlines(): a, b, n = map(int, line.split()) output = "" for i in xrange(1, n + 1): out = ""<|fim▁hole|> if i == 1: spacing = "" if i % a == 0: ...
spacing = " "
<|file_name|>refresh-images.component.ts<|end_file_name|><|fim▁begin|>import { Component, Input } from '@angular/core'; @Component({ selector: 'svg[refresh-images]', template: ` <svg:g> <svg:g> <svg:path d="M484.08,296.216c-5.1-5.128-11.848-7.936-19.032-7.936H330.516c-14.828...
:host{ height: 1em; vertical-align: middle; background-color: var(--select-refresh-images-background, transparent);
<|file_name|>models.go<|end_file_name|><|fim▁begin|>package job // 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 License at // http...
return nil, false }
<|file_name|>test_sensor.py<|end_file_name|><|fim▁begin|>"""Tests for the kraken sensor platform.""" from datetime import timedelta from unittest.mock import patch from pykrakenapi.pykrakenapi import KrakenAPIError from homeassistant.components.kraken.const import ( CONF_TRACKED_ASSET_PAIRS, DEFAULT_SCAN_INTE...
xbt_jpy_sensor = hass.states.get("sensor.xbt_jpy_ask") assert xbt_jpy_sensor.state == "0.0003494"
<|file_name|>unparser.py<|end_file_name|><|fim▁begin|># # Contain unparsing procedures. # import sys #------------------------------------------- def unparseToC(vars, annot_body_code, indent, extra_indent): '''Unparse to C/C++ code''' if len(vars) == 0: return annot_body_code s = '\n' s += ...
def unparseToFortran(vars, annot_body_code, indent, extra_indent): '''Unparse to Fortran code'''
<|file_name|>route.js<|end_file_name|><|fim▁begin|>import Ember from 'ember'; export default Ember.Route.extend({ appState: Ember.inject.service('app-state'), actions: { toggleLeftSidebar(){ this.set('appState.isLeftSidebarOpen', !this.get('appState.isLeftSidebarOpen')); }, toggleRightSidebar(){...
});*/
<|file_name|>create_treasures_json.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import json f = file('treasures.json', 'r') try: foo = json.load(f) json_contents = foo except ValueError: json_contents = dict() f.close() print 'Type \'q\' to [q]uit' while True: name = raw_input('Treasure Name: '...
f = open('treasures.json', 'w') json.dump(json_contents, f, indent=4)
<|file_name|>fake.go<|end_file_name|><|fim▁begin|>/* walter: a deployment pipeline template * Copyright (C) 2014 Recruit Technologies Co., Ltd. and contributors * (see CONTRIBUTORS.md) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Lice...
<|file_name|>CryptoPlugin.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|>Copyright (c) 2010 Olle Johansson 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, ...
""" The MIT License
<|file_name|>member_access.rs<|end_file_name|><|fim▁begin|>///! fff-lang ///! ///! syntax/member_access ///! member_access = expr '.' identifier use std::fmt; <|fim▁hole|>use super::SimpleName; use super::super::Formatter; use super::super::ParseResult; use super::super::ParseSession; use super::super::ISynt...
use crate::source::Span; use crate::lexical::Token; use crate::lexical::Seperator; use super::Expr;
<|file_name|>predicates.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright 2014-2021 BigML # # 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<|fim▁hole|># a copy of the License at # # http://www.apa...
<|file_name|>xarray_tools.py<|end_file_name|><|fim▁begin|>''' Created on Feb. 23, 2019 Utility functions to extract data from xarray Dataset or DataArray classes. @author: Andre R. Erler, GPL v3 ''' from warnings import warn from datetime import datetime import os import numpy as np import xarray as xr import netCDF...
crs = genCRS(crs) if crs != _crs:
<|file_name|>type-path-err-node-types.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.a...
// Type arguments in unresolved entities (reporting errors before type checking) // should have their types recorded.
<|file_name|>maze.py<|end_file_name|><|fim▁begin|>from cocosCairo.cocosCairo import * # Convenience module to import all other modules from splash import * BACKGROUND_COLOR = Color(0.1, 0.3, 0.7) MAZE_PATHS = ["maze01.maze", "maze02.maze", "maze03.maze"] # an ordered list of the maze files PATH_INDEX = 0 # the index ...
self.getDirector().getGestureDispatch().addListener(self)
<|file_name|>picklemain.py<|end_file_name|><|fim▁begin|>""" Extensions to pickle allowing items in __main__ to be saved. """ # CEBALERT: move into snapshots.py? import new import pickle import types import __main__ from StringIO import StringIO import copy def _name_is_main(obj): # CEBALERT: see IPython hack in...
elif _name_is_main(obj): # Types in __main__ are saved by value # Make sure we have a reference to type.__new__
<|file_name|>0004_faq_fairplay.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models faq_en = ''' <p> <b>Why statistics on the site does not coincide with the statistics in the game?</b> </p> <p> Algorithms collection statistics IL2 s...
faq.title_en = 'FAQ' faq.title_ru = 'FAQ'
<|file_name|>User.ts<|end_file_name|><|fim▁begin|>import { Structures } from 'discord.js'; import { User as UserModel } from '../models/User';<|fim▁hole|> const UserExtensionClass = Structures.extend('User', User => class UserExtension extends User { public fetchModel(): Promise<UserModel> { return UserModel....
<|file_name|>controller.js<|end_file_name|><|fim▁begin|>/* Copyright (C) 2013 Bryan Hughes <bryan@theoreticalideations.com> This file is part of Aquarium Control. Aquarium Control is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Fre...
function log(level, message) { process.send({ destination: 'master', type: 'log',
<|file_name|>timescales-plot.py<|end_file_name|><|fim▁begin|>"""Plot implied timescales vs lagtime {{header}} """ # ? include "plot_header.template" # ? from "plot_macros.template" import xdg_open with context import numpy as np<|fim▁hole|>sns.set_style('ticks') colors = sns.color_palette() ## Load timescales = pd....
import pandas as pd import seaborn as sns from matplotlib import pyplot as plt
<|file_name|>GUISliderControl.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2005-2008 Team XBMC * http://www.xbmc.org * * This Program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; e...
{ CGUIControl::UpdateColors(); m_guiBackground.SetDiffuseColor(m_diffuseColor); m_guiMid.SetDiffuseColor(m_diffuseColor);
<|file_name|>state.cpp<|end_file_name|><|fim▁begin|>/* * @file gui/dvonn/state.cpp * * This file is part of OpenXum games * * Copyright (c) 2011-2012 Eric Ramat <eramat@users.sourceforge.net> * * See the AUTHORS or Authors.txt file for copyright owners and contributors * * This program is free software: you ca...
namespace openxum { namespace dvonn {
<|file_name|>client.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 OpenStack LLC. # 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 ...
return (alias, name)
<|file_name|>chain.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import gdb import pwndbg.abi import pwndbg.color.chain as C import pwndbg.color.memory as M import pwndbg.color.theme as theme import pwndbg.enhance import pwndbg.memory import pwndbg.symbol import pwndbg.typeinfo import ...
else: enhanced = C.contiguous('%s' % config_contiguous)
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># This file is part of HDL Checker. # # Copyright (c) 2015 - 2019 suoto (Andre Souto) # # HDL Checker 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 v...
install_requires = ['argcomplete', 'argparse', 'backports.functools_lru_cache; python_version<"3.2"',
<|file_name|>pFUnitParser.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # For python 2.6-2.7 from __future__ import print_function from os.path import * import re # from parseBrackets import parseBrackets from parseDirectiveArgs import parseDirectiveArguments class MyError(Exception): def __init__(self,...
self.outputFile.write(' type (' + type + ') :: testParameter\n') self.outputFile.write(' integer :: iParam \n')
<|file_name|>sql_coverage_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # This file is part of VoltDB. # Copyright (C) 2008-2017 VoltDB 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...
someStats = (get_numerical_html_table_element(min_statements_per_pattern, strong_warn_below=1) +
<|file_name|>aci_firmware_group_node.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1'...
name_alias = module.params.get('name_alias')
<|file_name|>FileSyncSource.java<|end_file_name|><|fim▁begin|>/* * Funambol is a mobile platform developed by Funambol, Inc. * Copyright (C) 2008 Funambol, Inc. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License version 3 as publ...
FileObjectOutputStream foos = (FileObjectOutputStream)os; applyFileObjectProperties(fsi, foos); // The key for this item must be updated with the real // file name
<|file_name|>blocks.py<|end_file_name|><|fim▁begin|>from eth_utils import ( is_hex, is_string, is_integer, remove_0x_prefix, force_text, ) def is_predefined_block_number(value): if not is_string(value): return False return force_text(value) in {"latest", "pending", "earliest"} de...
return False elif is_hex_encoded_block_hash(value):
<|file_name|>generatef.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (C) 2017 The Android Open Source Project # # 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 # # htt...
outfile.close()
<|file_name|>DashboardSummaryPeriod.java<|end_file_name|><|fim▁begin|>package com.dotmarketing.portlets.dashboard.model; import java.io.Serializable; import java.util.Date; public class DashboardSummaryPeriod implements Serializable { private static final long serialVersionUID = 1L; private long id; privat...
return id; } public void setId(long id) {
<|file_name|>garch.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 o...
# "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at #
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>import re from django import forms from django.conf import settings from django.template.defaultfilters import slugify from tower import ugettext_lazy as _lazy from kitsune.products.models import Product, Topic from kitsune.sumo.form_fields import MultiUsernameField...
<|file_name|>WareHouseWithdrawListPacket.java<|end_file_name|><|fim▁begin|>package l2s.gameserver.network.l2.s2c; import java.util.ArrayList; import java.util.Collections; import java.util.List; import l2s.commons.lang.ArrayUtils; import l2s.gameserver.model.Player; import l2s.gameserver.model.items.ItemInfo; import ...
<|file_name|>build.js<|end_file_name|><|fim▁begin|>/* eslint-disable no-console */ const buildData = require('./build_data'); const buildSrc = require('./build_src'); const buildCSS = require('./build_css'); let _currBuild = null; // if called directly, do the thing. buildAll(); <|fim▁hole|> function buildAll() { i...
<|file_name|>http_method_parser.py<|end_file_name|><|fim▁begin|># This file is part of Copernicus # http://www.copernicus-computing.org/ # # Copyright (C) 2011, Sander Pronk, Iman Pouya, Erik Lindahl, and others. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU G...
import cpc.util.log ''' Created on Mar 7, 2011
<|file_name|>memory_io.rs<|end_file_name|><|fim▁begin|>extern crate openexr; use std::io::Cursor; use openexr::{FrameBuffer, FrameBufferMut, Header, InputFile, PixelType, ScanlineOutputFile}; #[test] fn memory_io() { // Target memory for writing let mut in_memory_buffer = Cursor::new(Vec::<u8>::new()); ...
<|file_name|>kexidbconnectionwidget.cpp<|end_file_name|><|fim▁begin|>/* This file is part of the KDE project Copyright (C) 2005-2014 Jarosław Staniek <staniek@kde.org> Copyright (C) 2014 Roman Shtemberko <shtemberko@gmail.com> This program is free software; you can redistribute it and/or modify it under th...
<|file_name|>ruler3.cpp<|end_file_name|><|fim▁begin|>#include <mystdlib.h> #include "meshing.hpp" namespace netgen { extern double minother; extern double minwithoutother; static double CalcElementBadness (const Array<Point3d, PointIndex::BASE> & points, const Element & elem) {...
{ PointIndex locpi = pmap.Elem(npok); ok = 0;
<|file_name|>phystricksQWEHooSRqSdw.py<|end_file_name|><|fim▁begin|>from phystricks import *<|fim▁hole|> A=Point(0,0) O=Point(0,2) B=Point(3,0) s1=Segment(A,O) s2=Segment(O,B) angle=AngleAOB(A,O,B,r=0.7) angle.put_mark(text="\( c\)",pspict=pspict) pspict.DrawGraphs(angle,s1,s2) fig....
def QWEHooSRqSdw(): pspict,fig = SinglePicture("QWEHooSRqSdw") pspict.dilatation(3)
<|file_name|>nativeMap.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 Apache L...
# the License. You may obtain a copy of the License at #
<|file_name|>database.js<|end_file_name|><|fim▁begin|>function Database() { if(typeof this.mysql == "undefined") { this.init(); } } Database.prototype.init = function() { var mysql = require('mysql'); <|fim▁hole|> user : 'root', password : 'test1234', database : 'linkbank' }); }, Databas...
this.connection = mysql.createConnection({ host : 'localhost',
<|file_name|>bitcoin_gl.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="gl" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About TrollCoin</source> <translation>Acerca de Troll...
<location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source>
<|file_name|>CheckBoxDecor.java<|end_file_name|><|fim▁begin|>/** * Copyright © MyCollab * * This program is free software: you can redistribute it and/or modify * 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 y...
*/
<|file_name|>beaglebone_blinkm.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" "time" "github.com/hybridgroup/gobot" "github.com/hybridgroup/gobot/platforms/beaglebone"<|fim▁hole|> "github.com/hybridgroup/gobot/platforms/i2c" ) func main() { gbot := gobot.NewGobot() beagleboneAdaptor := beaglebone....
<|file_name|>tree.go<|end_file_name|><|fim▁begin|>package dao import ( "bytes" "context" "fmt" "net/http" "strings" "time" "go-common/app/admin/main/cache/model" "go-common/library/ecode" "go-common/library/log" ) var ( tokenURI = "http://easyst.bilibili.co/v1/token" dataURI = "http://easyst.bilibili.co/...
var ( req *http.Request )
<|file_name|>one_byte_xor.rs<|end_file_name|><|fim▁begin|>use std::slice; use common::{err, ascii, charfreq, util}; pub struct Guess { pub plain: Vec<u8>, pub key: u8, pub distance: f32 } pub fn guess_key(cipher: &Vec<u8>, opt_options: Option<&GuessOptions>) -> Result<Guess, err::Error> { ...
} pub fn set_distance_fn(&mut self, distance_fn: FnDistance) { self.distance_fn = distance_fn;
<|file_name|>0206 - Reverse Linked List.py<|end_file_name|><|fim▁begin|># Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def reverseList(self, head: ListNode) -> ListNode: current = head ...
<|file_name|>wizard_genesis.go<|end_file_name|><|fim▁begin|>// Copyright 2017 The go-ethereum Authors // This file is part of go-ethereum. // // go-ethereum is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, ei...
// makeGenesis creates a new genesis struct based on some user input. func (w *wizard) makeGenesis() { // Construct a default genesis block
<|file_name|>multimap.rs<|end_file_name|><|fim▁begin|>use std::collections::btree_map; use std::default::Default; use std::iter::FromIterator; use super::map::{map, Map}; use super::set::Set; pub struct Multimap<K, C: Collection> { map: Map<K, C>, } pub trait Collection: Default { type Item; fn push(&mu...
pub fn new() -> Multimap<K, C> {
<|file_name|>_utils.py<|end_file_name|><|fim▁begin|>""" Strictly internal utilities. """ from __future__ import absolute_import, division, print_function from twisted.web.client import HTTPConnectionPool def default_reactor(reactor): """ Return the specified reactor or the default. """ if reactor is...
<|file_name|>Room.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
const Room = ({routeParams}) => <h1>{routeParams.name} Room</h1> module.exports = Room
<|file_name|>git_submodule.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding: utf-8 """ Waf tool for defining ardupilot's submodules, so that they are kept up to date. Submodules can be considered dynamic sources, since they are updated during the build. Furthermore, they can be used to generate other d...
m.update(self.env.get_flat('SUBMODULE_PATH'))
<|file_name|>connect_monitor.hpp<|end_file_name|><|fim▁begin|>#pragma once #include "../acl_cpp_define.hpp" #include "../stdlib/thread.hpp" #include "../stream/aio_handle.hpp" #include <vector> namespace acl { class aio_handle; class check_client; class connect_manager; class rpc_service; class socket_stream; class a...
int conn_timeout_; // Á¬½Ó·þÎñÆ÷µÄ³¬Ê±Ê±¼ä
<|file_name|>inherent_impl.rs<|end_file_name|><|fim▁begin|>// run-pass // compile-flags: -Z chalk trait Foo { } impl Foo for i32 { } struct S<T: Foo> { x: T, } fn only_foo<T: Foo>(_x: &T) { } impl<T> S<T> { // Test that we have the correct environment inside an inherent method. fn dummy_foo(&self) { ...
}; s.dummy_bar::<u32>();
<|file_name|>get_test.go<|end_file_name|><|fim▁begin|>/* Copyright The Helm 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 required ...
"github.com/spf13/cobra" "k8s.io/helm/pkg/helm"
<|file_name|>graph_visualization_test.go<|end_file_name|><|fim▁begin|>// Copyright (C) 2018 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.org/li...
&api.Label{LevelsName: []string{VK_COMMAND_BUFFER}, LevelsID: []int{3}}, &api.Label{LevelsName: []string{VK_COMMAND_BUFFER}, LevelsID: []int{3}}, &api.Label{LevelsName: []string{VK_COMMAND_BUFFER}, LevelsID: []int{3}},
<|file_name|>middleware.py<|end_file_name|><|fim▁begin|>from django.conf import settings from csp.utils import build_policy class CSPMiddleware(object): """ Implements the X-Content-Security-Policy response header, which conforming user-agents can use to restrict the permitted sources of various cont...
header = 'X-Content-Security-Policy' if getattr(settings, 'CSP_REPORT_ONLY', False): header = 'X-Content-Security-Policy-Report-Only'
<|file_name|>test01.py<|end_file_name|><|fim▁begin|>import gevent import time def doit(i): print "do it:%s" % (i) gevent.sleep(2) print "done:%s" %(i) t2 = time.time()<|fim▁hole|>threads = {} for i in range(5): t = gevent.spawn(doit, i) threads[i] = t #print dir(t) geven...
<|file_name|>test_alert.py<|end_file_name|><|fim▁begin|>""" Copyright 2017-present Airbnb, 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 Unless...
'h': { 'i': 9 } }
<|file_name|>android-platform-livesync-service.ts<|end_file_name|><|fim▁begin|>import {PlatformLiveSyncServiceBase} from "./platform-livesync-service-base"; class AndroidPlatformLiveSyncService extends PlatformLiveSyncServiceBase { constructor(_liveSyncData: ILiveSyncData, protected $devicesService: Mobile.IDevices...
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python '''Test framework for pyglet. Reads details of components and capabilities from a requirements document, runs the appropriate unit tests. How to Run the Tests -------------------- :: python tests/test.py top app graphics clock resource # th...
assert self.captured_image is None if isinstance(test, tests.regression.ImageRegressionTestCase):
<|file_name|>method.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" ) type myType int func (t myType) println() { fmt.Println(t)<|fim▁hole|> var z myType = 123 z.println() }<|fim▁end|>
} func main() {
<|file_name|>Socket.cpp<|end_file_name|><|fim▁begin|>#include "Log.h" #include "Socket.h" #include <string.h> #include <iostream> #include <atomic> #define SOCKET_MAX_CONNECTIONS 20 #if (defined __CYGWIN__ || defined __GNUC__) #include <unistd.h> #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #in...
std::atomic<bool> mIsConnected; std::atomic<bool> mIsListening; };
<|file_name|>WhoObserver.py<|end_file_name|><|fim▁begin|>from FaustBot.Communication import Connection from FaustBot.Model.RemoteUser import RemoteUser from FaustBot.Modules.MagicNumberObserverPrototype import MagicNumberObserverPrototype from FaustBot.Modules.ModuleType import ModuleType<|fim▁hole|>from FaustBot.Modul...
<|file_name|>dashboard.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core'; import { NodesService, NodegraphModel, NodeModel } from '../sharedservices/index'; import { NodegraphComponent } from '../d3components/nodegraph.component'; import { NodetableComponent } from '../nodetab...
<|file_name|>0014_auto_20180107_1716.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2018-01-07 16:16 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ...
('porocilo', models.TextField(max_length=10000)), ('organizator', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='taborniki.Oseba')), ('udelezenci', models.ManyToManyField(null=True, related_name='akcija_clan', to='taborniki.Oseba')),
<|file_name|>mod.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 // http://www.apache.org/licens...
fldr: |r: ty::Region| -> ty::Region) -> ty::FnSig { ty_fold::RegionFolder::regions(tcx, fldr).fold_sig(fn_sig)
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># coding: utf-8 from django.conf.urls import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patter...
# Uncomment the admin/doc line below to enable admin documentation:
<|file_name|>IGoogleApiMaps.java<|end_file_name|><|fim▁begin|>package sellpotato.sellpotato.Model; /** * @author Freddy * @version 1.0 * @created 08-ene-2015 19:29:24 */ public class IGoogleApiMaps { public IGoogleApiMaps(){ } <|fim▁hole|> } public void DibujarRuta(){ } public double CombertirDireccionPun...
public void finalize() throws Throwable {
<|file_name|>canvas_paint_thread.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use azure::azure::{AzColor, AzFloat}; use azure::...
} ); if self.need_to_draw_shadow() {
<|file_name|>ObjectGridLoader.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public Lice...
#include "World.h" #include "CellImpl.h"
<|file_name|>graph.py<|end_file_name|><|fim▁begin|>''' *** SHED SKIN Python-to-C++ Compiler *** Copyright 2005-2013 Mark Dufour; License GNU GPL version 3 (See LICENSE) graph.py: build constraint graph used in dataflow analysis constraint graph: graph along which possible types 'flow' during an 'abstract execution' o...
<|file_name|>raw_block.rs<|end_file_name|><|fim▁begin|>use Renderable; use Block; use context::Context; use LiquidOptions; use tags::RawBlock; use lexer::Token; use lexer::Element; use lexer::Element::{Expression, Tag, Raw}; #[cfg(test)] use std::default::Default; struct RawT{ content : String } impl Renderable ...
}
<|file_name|>easy.rs<|end_file_name|><|fim▁begin|>use std::sync::{Once, ONCE_INIT}; use std::c_vec::CVec; use std::{io,mem}; use std::collections::HashMap; use libc::{c_void,c_int,c_long,c_double,size_t}; use super::{consts,err,info,opt}; use super::err::ErrCode; use http::body::Body; use http::{header,Response}; type...
}
<|file_name|>compiler.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ use crate::build_project::{build_project, build_schema, check_project, Writte...
compiler_state: &mut CompilerState, setup_event: &impl PerfLogEvent, ) -> Result<()> { let graphql_asts =
<|file_name|>PlayerDump.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of th...
<|file_name|>property.rs<|end_file_name|><|fim▁begin|>//! Parse the result of `LineReader` into parts. //! //! Split the result of `LineReader` into property. A property contains: //! - A name formated in uppercase. //! - An optional list of parameters represented by a vector of `(key/value)` tuple . The key is //! for...
if param_value_delimiter < value_delimiter
<|file_name|>networks_test.go<|end_file_name|><|fim▁begin|>package cloudapi_test import ( gc "launchpad.net/gocheck" "github.com/joyent/gosdc/cloudapi" ) func (s *LocalTests) TestListNetworks(c *gc.C) { nets, err := s.testClient.ListNetworks() c.Assert(err, gc.IsNil) c.Assert(nets, gc.NotNil) } func (s *LocalT...
<|file_name|>test_tasks.py<|end_file_name|><|fim▁begin|>from ddt import ddt, data from django.test import TestCase from six.moves import mock from waldur_core.core import utils from waldur_core.structure import tasks from waldur_core.structure.tests import factories, models class TestDetectVMCoordinatesTask(TestCase...
mock_request_get.return_value.json.return_value = response tasks.detect_vm_coordinates(utils.serialize_instance(instance))
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Package for tesseract cube controllers. """<|fim▁hole|>from .c_gpio import CffiGpioController CUBES = [ SimulatedController, GPIOController, CffiGpioController, ]<|fim▁end|>
from .sim import SimulatedController from .gpio import GPIOController
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|># django-drf imports from rest_framework import serializers<|fim▁hole|> # app level imports from .models import Player, Team class PlayerSerializer(serializers.ModelSerializer): class Meta: model = Player fields = ( 'id', 'name',...
<|file_name|>test_rpcapi.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4<|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.a...
# Copyright 2012, Red Hat, Inc. #
<|file_name|>rfc1157.py<|end_file_name|><|fim▁begin|># # SNMPv1 message syntax # # ASN.1 source from: # http://www.ietf.org/rfc/rfc1157.txt # # Sample captures from: # http://wiki.wireshark.org/SampleCaptures/ # from pyasn1.type import univ, namedtype, namedval, tag from pyasn1_modules import rfc1155 <|fim▁hole|> ) ...
class Version(univ.Integer): namedValues = namedval.NamedValues( ('version-1', 0)
<|file_name|>channel.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/license...
match self.ports.fetch_sub(1, Ordering::SeqCst) { 1 => {}
<|file_name|>test_shapefile.py<|end_file_name|><|fim▁begin|>import unittest from cStringIO import StringIO from pysal.core.util.shapefile import noneMax, noneMin, shp_file, shx_file, NullShape, Point, PolyLine, MultiPoint, PointZ, PolyLineZ, PolygonZ, MultiPointZ, PointM, PolyLineM, PolygonM, MultiPointM, MultiPatch im...