prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>cxxsource.cpp<|end_file_name|><|fim▁begin|>#include "cxxsource.h"<|fim▁hole|>
CxxSource::CxxSource()
{
}<|fim▁end|> | |
<|file_name|>DiagramDesignerWidget.Keyboard.js<|end_file_name|><|fim▁begin|>/*globals define, _*/
/*jshint browser: true*/
/**
* @author rkereskenyi / https://github.com/rkereskenyi
*/
define(['js/KeyboardManager/IKeyTarget'], function (IKeyTarget) {<|fim▁hole|>
var DiagramDesignerWidgetKeyboard;
DiagramDe... |
'use strict'; |
<|file_name|>Demo010.java<|end_file_name|><|fim▁begin|>package com.jinwen.thread.ch01;
/**
* 知识点:线程挂起的问题
* @author JIN
*
*/
public class Demo010 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
final SynchronizedObject1 object = new Synchronized... | } |
<|file_name|>Simple.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | foo.bar() |
<|file_name|>Error.ts<|end_file_name|><|fim▁begin|>import * as ActionTypes from '../ActionTypes';
import { createAction } from './ActionCreator';
import { errorKeys } from '../Reducers/Error';
export const throwError = createAction(ActionTypes.THROW_ERROR, (message: errorKeys) => ({
type: ActionTypes.THROW_ERROR,
... | }));
|
<|file_name|>register.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from rest_framework import status as http_status
import itertools
from flask import request
from framework import status
from framework.exceptions import HTTPError
from framework.flask import redirect # VOL-aware redirect
from framework.a... | status.push_status_message(
'You have been redirected to the project\'s registrations page. From here you can initiate a new Draft Registration to complete the registration process',
trust=False, |
<|file_name|>ios_system.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at ... | def parse_domain_search(config): |
<|file_name|>tst_qpacketprotocol.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the... | private slots: |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 MaidSafe.net limited.
//
// This SAFE Network Software is licensed to you under (1) the MaidSafe.net Commercial License,
// version 1.0 or later, or (2) The General Public License (GPL), version 3, depending on which
// licence you accepted on initial a... | pub const STRUCTURED_DATA_TAG: u64 = MAIDSAFE_DATA_TAG + 4;
pub const AN_MPID_TAG: u64 = MAIDSAFE_DATA_TAG + 5;
pub const AN_MAID_TAG: u64 = MAIDSAFE_DATA_TAG + 6; |
<|file_name|>plotting.go<|end_file_name|><|fim▁begin|>package get_cocoa
import (
"log"
"github.com/gonum/plot"
"github.com/gonum/plot/plotter"
"github.com/gonum/plot/plotutil"
"github.com/gonum/plot/vg"
)
type PlotStruct struct {
X float64
Y float64
}
func Plot(series plotter.XYs) {
p, err := plot.New()
if... |
err = plotutil.AddLinePoints(p,
"Close", series,
) |
<|file_name|>test_ui.py<|end_file_name|><|fim▁begin|>import openerp.addons.website.tests.test_ui as test_ui
def load_tests(loader, base, _):
base.addTest(test_ui.WebsiteUiSuite(test_ui.full_path(__file__,'website_sale-add_product-test.js'),
{'redirect': '/page/website.homepage'}))
base.addTest(test_ui.... | # Tech Saas & AL agreement |
<|file_name|>basicTest.py<|end_file_name|><|fim▁begin|>import os
import sys
import logging
import datetime
from future.utils import iteritems
from pandaharvester.harvesterconfig import harvester_config
try:
os.remove(harvester_config.db.database_filename)
except Exception:
pass
from pandaharvester.harvestercore... | queueConfigMapper = QueueConfigMapper()
proxy = DBProxy()
proxy.make_tables(queueConfigMapper) |
<|file_name|>SnomedRf2DescriptionFileRecord.java<|end_file_name|><|fim▁begin|>package edu.ucdenver.ccp.datasource.fileparsers.snomed;
import edu.ucdenver.ccp.datasource.fileparsers.SingleLineFileRecord;
/*
* #%L
* Colorado Computational Pharmacology's common module
* %%
* Copyright (C) 2012 - 2015 Regents of the ... | * @param languageCode
* @param typeId
* @param term
* @param caseSignificanceId |
<|file_name|>wsregex.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import absolute_import
import re
<|fim▁hole|> """
A class containing all regular expressions used throughout the DataHound
application.
"""
# Class Members
# Potentially better email regex
# "([A-... | class RegexLib(object): |
<|file_name|>blob.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::InheritTypes::FileDerived;
use dom::... | impl FileDerived for Blob { |
<|file_name|>ssha.go<|end_file_name|><|fim▁begin|>package htpasswd
import (
"crypto/sha1"
"crypto/subtle"
"encoding/base64"
"fmt"
"strings"
)
type sshaPassword struct {
hashed []byte
salt []byte
}
//AcceptSsha accepts any valid password encoded using bcrypt.
func AcceptSsha(src string) (EncodedPasswd, error... | sha := append([]byte(password), s.salt[:]...) |
<|file_name|>burstusage.go<|end_file_name|><|fim▁begin|>package cloudsigma
const (
EndpointBurstUsage = "burstusage"
)
// BurstUsage
type BurstUsage struct {
Args *Args
}
// NewBurstUsage returns a BurstUsage object.<|fim▁hole|> return &o
}
// NewList returns the args required for a BurstUsage GET request.
func (... | func NewBurstUsage() *BurstUsage {
o := BurstUsage{}
o.Args = NewArgs()
o.Args.Resource = EndpointBurstUsage |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.<|fim▁hole|>export default lastDayOfISOWeekYear<|fim▁end|> |
import { lastDayOfISOWeekYear } from 'date-fns' |
<|file_name|>reflect.go<|end_file_name|><|fim▁begin|>/**
* Copyright 2014 Paul Querna
*
* 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/LICENS... | |
<|file_name|>variational_neural_bandit_model.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors 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
#
# ... |
for l_number, n_nodes in enumerate(self.layers):
if n_nodes > 0: |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from oscar_vat_moss import fields
from oscar.apps.address.abstract_models import AbstractShippingAddress
from oscar.apps.address.abstract_models import AbstractBillingAddress
class ShippingAddress(AbstractShippingAddress):
vatin = fields.vatin()
class BillingA... |
from oscar.apps.order.models import * # noqa |
<|file_name|>decoder.rs<|end_file_name|><|fim▁begin|>use std::io::{Error, ErrorKind, Read, Result};
use std::ptr;
use super::liblz4::*;
use libc::size_t;
const BUFFER_SIZE: usize = 32 * 1024;
struct DecoderContext {
c: LZ4FDecompressionContext,
}
pub struct Decoder<R> {
c: DecoderContext,
r: R,
buf: ... | /// `finish()`
pub fn new(r: R) -> Result<Decoder<R>> {
Ok(Decoder { |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from datetime import datetime
from flask import Blueprint, render_template
from flask_cas import login_required
from timecard.api import current_period_start<|fim▁hole|>admin_views = Blueprint('admin', __name__, url_prefix='/admin', template_folder='templates')
@ad... | from timecard.models import config, admin_required
|
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/
#![deny(warnings)]
use anyhow::{Error, Result};
use blobrepo::BlobRepo;
use blobrepo_hg::... | blobrepo: &BlobRepo, |
<|file_name|>bitcoin_zh_HK.ts<|end_file_name|><|fim▁begin|><TS language="zh_HK" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>按右擊修改位址或標記</translation>
</message>
<message>
<source>Create a new ad... | <translation>已接收</translation> |
<|file_name|>p2p-versionbits-warning.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
# Copyright (c) 2016 The Bitcoin Unlimited developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/m... | block.nVersion = nVersionToUse
block.solve()
peer.send_message(msg_block(block)) |
<|file_name|>qa_linear_equalizer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# Copyright 2020 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
from gnuradio import gr, gr_unittest
import random, numpy
from gnuradio import digital, block... |
if __name__ == '__main__':
gr_unittest.run(qa_linear_equalizer) |
<|file_name|>MD5.cpp<|end_file_name|><|fim▁begin|>#include "MD5.h"
#include "string.h"
namespace engine
{
namespace tools
{
using namespace std;
/* Constants for MD5Transform routine. */
#define S11 7
#define S12 12
#define S13 17
#def... | /* Save current state and count. */
memcpy(oldState, _state, 16);
memcpy(oldCount, _count, 8);
|
<|file_name|>OGCfunction.js<|end_file_name|><|fim▁begin|>/*
| Copyright 2015 Pispidikis john
|
| Licensed under the GNU GENERAL PUBLIC LICENSE Version 3
| you may not use this file except in compliance with the License.
|
|
| Unless required by applicable law or agreed to in writing, software
| distributed u... | |
<|file_name|>list10_c.hpp<|end_file_name|><|fim▁begin|>// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.lslboost.org/LICENSE_1_0.txt)
//
// Preprocessed version of "lslboost/mpl/list/list10_c.hp... | typename T
, T C0, T C1, T C2, T C3, T C4, T C5, T C6 |
<|file_name|>learning_unit_specifications.py<|end_file_name|><|fim▁begin|>##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as un... | text_label=self.text_label)
self.fields['cms_id'].initial = value.id |
<|file_name|>synoptic-to-org.py<|end_file_name|><|fim▁begin|>import sys
import re
def import_file(lines):
tags_label = "TAGS: "
separator = 60*"-"
idx = 0
while idx < len(lines):
assert lines[idx].startswith(tags_label)
tags = lines[idx][len(tags_label):].split(",")
tags = [t.... | |
<|file_name|>tls.py<|end_file_name|><|fim▁begin|>import struct
import time
from dataclasses import dataclass
from typing import Iterator, Literal, Optional, Tuple
from OpenSSL import SSL
from mitmproxy import certs, connection
from mitmproxy.net import tls as net_tls
from mitmproxy.proxy import commands, events, layer... | Returns the raw handshake packet bytes, without TLS record headers.
""" |
<|file_name|>TestDC.java<|end_file_name|><|fim▁begin|>/*
*=====================================================================
* This file is part of JSatTrak.
*
* Copyright 2007-2013 Shawn E. Gano
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file ... | |
<|file_name|>db.py<|end_file_name|><|fim▁begin|>import sqlalchemy
from sqlalchemy import Column, Integer, String
from sqlalchemy.orm import mapper, sessionmaker
import subprocess
class PygrationState(object):
'''Python object representing the state table'''
def __init__(self, migration=None, step_id=None, step... | , Column('drop_state', String(length=16))
, schema=schema |
<|file_name|>ctime_blank.py<|end_file_name|><|fim▁begin|>""" blank screen to stop game being played out-of-hours """
import random
import os
import pygame
import pygame.locals<|fim▁hole|>from ctime_common import go_fullscreen
class BlankScreen():
""" a blank screen with no controls """
def __init__(self, ctime... | |
<|file_name|>test_init.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Cloudbase Solutions Srl
#
# 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 Lice... | def test_check_plugin_os_requirements_other_requirenments(self): |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from distutils.core import setup
setup(
name='popy',
description='Parser for GNU Po files',
long_description=open('README.rst').read(),
version='0.3.0',
packages=['popy'],<|fim▁hole|> url='https://github.com/murataydos/po... | author='Murat Aydos',
author_email='murataydos@yandex.com', |
<|file_name|>server.py<|end_file_name|><|fim▁begin|># !/usr/bin/env python
# coding: utf-8
__author__ = 'Moch'
import tornado.ioloop
import tornado.options
import tornado.httpserver
from application import application
from tornado.options import define, options
define("port", default=8000, help="run on the given po... |
tornado.ioloop.IOLoop.instance().start()
if __name__ == "__main__": |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#
#
# Copyright (C) 2013 Google Inc.
#<|fim▁hole|># the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even ... | # 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 |
<|file_name|>xhr.js<|end_file_name|><|fim▁begin|>;(function(){
"use strict";
const module = window.load = {
name: "xhr"
};
const xhr = module.exports = (type, url, cb, opts) => {
const xhr = new XMLHttpRequest();<|fim▁hole|>
xhr.onreadystatechange = () => {
if (xhr.readyState == 4) {
cb(xhr);
}
... | if (opts) Object.keys(opts).map(key => xhr[key] = opts[key]);
xhr.open(type, url); |
<|file_name|>pm_test.py<|end_file_name|><|fim▁begin|>
"""
-----------------------------------------------------------------------------
This source file is part of OSTIS (Open Semantic Technology for Intelligent Systems)
For the latest info, see http://www.ostis.net
Copyright (c) 2010 OSTIS
OSTIS is free software: y... | |
<|file_name|>type.go<|end_file_name|><|fim▁begin|>// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package protoreflect
// Descriptor provides a set of accessors that are common to every descriptor.
// Each d... | Syntax() Syntax // e.g., Proto2 or Proto3
// Name is the short name of the declaration (i.e., FullName.Name). |
<|file_name|>bills.py<|end_file_name|><|fim▁begin|>import datetime
import logging
from collections import defaultdict
from billy.core import db
from billy.core import settings
from billy.utils import term_for_session
from billy.reports.utils import (update_common, get_quality_exceptions,
... | # handle no_actions bills |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
<|fim▁hole|>from .nihts_xcam import XenicsCamera<|fim▁end|> | |
<|file_name|>trait-where-clause-self-referential.rs<|end_file_name|><|fim▁begin|>// check-pass<|fim▁hole|>
trait Foo {
fn bar() where Self: ~const Foo;
}
struct S;
impl Foo for S {
fn bar() {}
}
fn baz<T: Foo>() {
T::bar();
}
const fn qux<T: ~const Foo>() {
T::bar();
}
fn main() {}<|fim▁end|> |
#![feature(const_trait_impl)]
#![feature(const_fn_trait_bound)] |
<|file_name|>shared-libs.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { CommonModule } from '@angular/common';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { NgJhipsterModule } from 'ng-jhipster';
import { Infinit... | |
<|file_name|>TestMemoryMXBeans.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2017 Red Hat, Inc. and/or its affiliates.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
... | * or visit www.oracle.com if you need additional information or have any
* questions. |
<|file_name|>MusicMedia.java<|end_file_name|><|fim▁begin|>package com.lqtemple.android.lqbookreader.model;
import java.io.Serializable;
/**音乐信息
* Created by chenling on 2016/3/15.
*/
public class MusicMedia implements Serializable{
private int id;
private String title;
private String artist;
privat... | } else if (size >= mb) {
float f = (float) size / mb; |
<|file_name|>gateway.state.js<|end_file_name|><|fim▁begin|>(function() {
'use strict';
angular
.module('anelclothesApp')
.config(stateConfig);
stateConfig.$inject = ['$stateProvider'];
function stateConfig($stateProvider) {
$stateProvider.state('gateway', {
parent:... | },
resolve: {
translatePartialLoader: ['$translate', '$translatePartialLoader', function ($translate, $translatePartialLoader) {
$translatePartialLoader.addPart('gateway'); |
<|file_name|>strings.js<|end_file_name|><|fim▁begin|>define(
({
_widgetLabel: "분석",
executeAnalysisTip: "실행할 분석 도구 클릭",
noToolTip: "분석 도구를 선택하지 않았습니다!",
back: "뒤로",
next: "다음",
home: "홈",
jobSubmitted: "제출하였습니다.",
jobCancelled: "취소되었습니다.",
jobFailed: "실패함",
jobSuccess: "성공했습니... | executing: "실행 중",
cancelJob: "분석 작업 취소", |
<|file_name|>csvdump.rs<|end_file_name|><|fim▁begin|>use std::fs::{self, File};
use std::io::{BufWriter, Write};
use std::path::PathBuf;
use clap::{App, Arg, ArgMatches, SubCommand};
use crate::blockchain::parser::types::CoinType;
use crate::blockchain::proto::block::Block;
use crate::blockchain::proto::tx::{Evaluate... | |
<|file_name|>configrepo.rs<|end_file_name|><|fim▁begin|>// Copyright (C) 2020 Jason Ish
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitat... | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
use std::path::PathBuf;
use std::sync::Arc; |
<|file_name|>open_gitbash_here.py<|end_file_name|><|fim▁begin|>import sublime, sublime_plugin
import os<|fim▁hole|>
class OpenGitbashHere(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
file_path = view.file_name()
dirname = os.path.dirname(file_path)
th = BashTer... | import subprocess
import threading
|
<|file_name|>security.js<|end_file_name|><|fim▁begin|>/* This file is part of Jeedom.
*
* Jeedom is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option)... | error: function(error) {
$('#div_alert').showAlert({message: error.message, level: 'danger'});
|
<|file_name|>HasRankDirective.js<|end_file_name|><|fim▁begin|><|fim▁hole|>
module.exports = function (Logger, $rootScope) {
return {
restrict: 'A',
scope: {
hasRank: '='
},
link: function ($scope, elem, attrs) {
$rootScope.$watch('currentUser', function () {... | 'use strict'; |
<|file_name|>test_api.py<|end_file_name|><|fim▁begin|>from molotov.api import pick_scenario, scenario, get_scenarios, setup
from molotov.tests.support import TestLoop, async_test
class TestUtil(TestLoop):
def test_pick_scenario(self):
@scenario(weight=10)
async def _one(self):<|fim▁hole|> a... | pass
@scenario(weight=90) |
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># Generated by Django 3.0.5 on 2020-04-17 14:12
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import easy_thumbnails.fields
import userena.models
class Migration(migrations.Migration):
initial ... | |
<|file_name|>kwarqs_drive_mech.py<|end_file_name|><|fim▁begin|>import wpilib
import hal
from wpilib import RobotDrive
class KwarqsDriveMech(RobotDrive):
def __init__(self, *args, **kwargs):<|fim▁hole|>
def set_multiplier(self, in_multi = None):
if in_multi != None :
self.w... | super().__init__(*args, **kwargs)
self.weight_multiplier = 1 |
<|file_name|>combination.py<|end_file_name|><|fim▁begin|>#
# Copyright 2013 eNovance <licensing@enovance.com>
#
# Authors: Mehdi Abaakouk <mehdi.abaakouk@enovance.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
# ... | if transition: |
<|file_name|>generic-lifetime-trait-impl.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://ww... | trait Bar<'a> {}
trait Foo<'a> { |
<|file_name|>angular-deckgrid.js<|end_file_name|><|fim▁begin|>/*! angular-deckgrid (v0.1.1) - Copyright: 2013, André König (andre.koenig@posteo.de) - MIT */
/*
* angular-deckgrid
*
* Copyright(c) 2013 Andre Koenig <akoenig@posteo.de>
* MIT Licensed
*
*/
/**
* @author André König (akoenig@posteo.de)
*
*/
angu... | /**
* @private
* |
<|file_name|>smtpd.py<|end_file_name|><|fim▁begin|>#!/home/toppatch/Python-2.7.5/bin/python2.7
"""An RFC 2821 smtp proxy.
Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]]
Options:
--nosetuid
-n
This program generally tries to setuid `nobody', unless this flag is
set.... | lines = data.split('\n') |
<|file_name|>test_process_mode_boot.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 ... | |
<|file_name|>CreditsMenu.cc<|end_file_name|><|fim▁begin|>/*
Copyright (C) 2014 Darran Kartaschew
This file is part of Occillo.
Occillo 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 ver... | |
<|file_name|>vanity_pharma_display_url_mode.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/enums/vanity_pharma_display_url_mode.proto
package enums // import "google.golang.org/genproto/googleapis/ads/googleads/v1/enums"
import proto "github.com/... | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x50, 0x41, 0x6a, 0xb3, 0x40,
0x18, 0xfd, 0x35, 0xf0, 0x17, 0x26, 0x8b, 0x8a, 0x5d, 0xb4, 0x84, 0xa4, 0x25, 0x39, 0xc0, 0x88,
0x74, 0x37, 0x5d, 0x69, 0x62, 0x82, 0xb4, 0x31, 0x62, 0xa2, 0x81, 0x22, 0xc8, 0xb4, 0x23, 0x56,
0xd0, 0x19, 0xeb, 0x98, 0x40... |
<|file_name|>issue-3029.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/lice... | // error-pattern:so long |
<|file_name|>container_ops.go<|end_file_name|><|fim▁begin|>package build
import (
"bytes"
"context"
"fmt"
"io"
"io/ioutil"
"os"
"runtime"
"github.com/BurntSushi/toml"
"github.com/buildpacks/lifecycle/platform"
"github.com/docker/docker/api/types"
dcontainer "github.com/docker/docker/api/types/container"
"... |
if os == "windows" { |
<|file_name|>runTask.js<|end_file_name|><|fim▁begin|>/*jshint node:true */
"use strict";
var extend = require('util')._extend;
module.exports = function (task, args, done) {
var that = this, params, finish, cb, isDone = false, start, r, streamReturn = [];
finish = function (err, results, runMethod) {
var hrDura... | }; |
<|file_name|>test_acc.py<|end_file_name|><|fim▁begin|>import mobula.layers as L
import numpy as np
def test_acc():<|fim▁hole|>
Y = np.array([1, 0, 2, 1]).reshape((-1, 1))
# top-k
# 1 [False, False, True, True]
# 2 [True, True, True, True]
target = [np.array([False, False, Tr... | X = np.array([[0, 1, 2],
[1, 2, 0],
[0, 1, 2],
[1, 2, 0]]) |
<|file_name|>SimpleNotesInfo.java<|end_file_name|><|fim▁begin|>package com.fteams.siftrain.entities;
import com.fteams.siftrain.util.SongUtils;
public class SimpleNotesInfo implements Comparable<SimpleNotesInfo>{
public Double timing_sec;
public Integer effect;
public Double effect_value;<|fim▁hole|> @... | public Integer position;
|
<|file_name|>test_DataSeriesLoader.py<|end_file_name|><|fim▁begin|>import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from excel_helper.helper import DataSeriesLoader
class TestDataFrameWithCAGRCalculation(unittest.TestCase):
def test_simple_CAGR(self):
"""
Basi... | # the time axis of our dataset
times = pd.date_range('2009-01-01', '2009-04-01', freq='MS')
# the sample axis our dataset
samples = 2 |
<|file_name|>io.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 Licen... | [ 34. 35.]]
[[ 4. 5.] |
<|file_name|>env.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap;
use crate::common::Id;
use crate::explicit::{self, Type};
fn fmt(n: i32, id: &str) -> (i32, Id) {
(n + 1, format!("{}_a{}", id, n))
}
fn convert(
n: i32,
env: &mut HashMap<Id, Type>,
renamed: &HashMap<Id, Id>,
expr: &... | }
pub fn extract(expr: &explicit::Expr) -> (explicit::Expr, HashMap<Id, Type>) { |
<|file_name|>read.go<|end_file_name|><|fim▁begin|>// Package binary implements sintax-sugar functions on top of the standard
// library binary package
package binary
import (
"bufio"
"encoding/binary"
"io"
"gopkg.in/src-d/go-git.v4/plumbing"
)
// Read reads structured binary data from r into data. Bytes are read... | }
|
<|file_name|>create_router_state.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {BehaviorSubject} from 'rxjs/BehaviorSubject... | return a._routeConfig === b._routeConfig;
} |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>import datetime
import hashlib
import random
import re
from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
from django.db import transaction
from django.template.loader import render_to_string
from django.utils.tr... | |
<|file_name|>p3gxscircles.cc<|end_file_name|><|fim▁begin|>/*
* libretroshare/src/services p3gxscircles.cc
*
* Circles Interface for RetroShare.
*
* Copyright 2012-2012 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Publi... |
std::map<RsGxsGroupId, std::vector<RsGxsMessageId> > &msgChangeMap = msgChange->msgChangeMap;
std::map<RsGxsGroupId, std::vector<RsGxsMessageId> >::iterator mit; |
<|file_name|>dannybot.js<|end_file_name|><|fim▁begin|>/*eslint-env browser */
// main dannybot script
const mail = require('./mail');
const storage = require('electron-json-storage');
const fs = require('fs');
const q = require('q');
var readFile = q.nbind(fs.readFile);
/* Function to run when DOM loaded */
functio... | }
|
<|file_name|>Sidemenu.stories.tsx<|end_file_name|><|fim▁begin|>import React from 'react';
import { Meta, Story } from '@storybook/react/dist/client/preview/types-6-0';
import { ISidemenuComponentProps } from '../components/Sidemenu/model';
import { Sidemenu, SidemenuItem } from '../components/Sidemenu/Sidemenu';
imp... | <>
<SidemenuItem value="/settings">Settings</SidemenuItem>
<SidemenuItem active value="/template" onClick={(e) => console.log('Template Clicked')}> |
<|file_name|>storage.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::StorageBinding;
use dom... |
}
|
<|file_name|>HeroSubClass.java<|end_file_name|><|fim▁begin|>/*
* Pixel Dungeon
* Copyright (C) 2012-2015 Oleg Dolya
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of th... | |
<|file_name|>proxier.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... | return |
<|file_name|>missing-allocator.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Copyright 2015 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://... | |
<|file_name|>tex2.rs<|end_file_name|><|fim▁begin|>use std::io::{self, Write};
use image;
use image::GenericImage;
use nom::{le_u8, le_u32};
use byteorder::{LittleEndian, WriteBytesExt};
named!(pub tex2_header<(u32, u32, u8)>,
do_parse!(
tag!("\x11\x40") >> //.@, the magic number for the format
hei... | impl GenericImage for DDTex2Image {
type Pixel = image::Rgba<u8>; |
<|file_name|>config_multiple_8.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import config_speller_8
import config_robot_8
class Config(object):
def __init__(self):
self.number_of_decisions = 8
speller = config_speller_8.Config()
robot = config_robot_8.Config(... | self.actions.append(robot.actions[i]) |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
import django
from django.db import models
from django.utils.translation import ugettext_lazy as _
from .managers import QueueManager, MessageManager
class Queue(models.Model):
name = models.CharField(_... | objects = MessageManager()
|
<|file_name|>qa_cell_mapping_cc.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014 <+YOU OR YOUR COMPANY+>.
#
# This 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 Foundati... | def setUp (self):
self.tb = gr.top_block ()
self.tp = drm.transm_params(1, 3, False, 0, 1, 0, 1, 1, 0, False, 24000, "station label", "text message") |
<|file_name|>peg.rs<|end_file_name|><|fim▁begin|>extern crate peg;
<|fim▁hole|> peg::cargo_build("src/grammar/smtp.rustpeg");
}<|fim▁end|> | fn main() { |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages
import sys, os, glob
version = '0.7.1'
setup(name='seqtools',
version=version,
description="",
long_description="""\
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list... | packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), |
<|file_name|>find.go<|end_file_name|><|fim▁begin|>// Copyright 2015 CNI 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
//
// ... | break
}
} |
<|file_name|>match-reference.ts<|end_file_name|><|fim▁begin|>import IMatchReference = require('./../../interfaces/matchlist/match-reference');
class MatchReference
{
constructor(matchReferenceData : IMatchReference) {
if(matchReferenceData.lane)
this.lane = matchReferenceData.lane;
... | };
|
<|file_name|>observing-file-cache.go<|end_file_name|><|fim▁begin|>// +build linux
package caching
import(
"golang.org/x/exp/inotify"
simpleton "github.com/ProhtMeyhet/libgosimpleton"
"github.com/ProhtMeyhet/libgosimpleton/logging"
)
/*
* uses inotify to detect changes made to the cached files
* and if so update ... | cache.sizeMax = maxSize
cache.freeThreshold = cache.sizeMax / 4 |
<|file_name|>challenge45.rs<|end_file_name|><|fim▁begin|>use crate::errors::*;
use dsa::{gen_range, Dsa, DsaParams, Signature};
use bignum::OpensslBigNum as BigNum;
use bignum::{BigNumExt, BigNumTrait};
#[allow(clippy::many_single_char_names)]
pub fn fake_signature(params: &DsaParams<BigNum>, y: &BigNum) -> Signatur... | |
<|file_name|>policies.test.js<|end_file_name|><|fim▁begin|>const assert = require('assert');
const adminHelper = require('../common/admin-helper')();
const Config = require('../../lib/config/config');
const os = require('os');
const fs = require('fs');
const path = require('path');
const idGen = require('uuid62');
cons... | |
<|file_name|>FileTypes.py<|end_file_name|><|fim▁begin|># Copyright (C) 2008 LibreSoft
#
# 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 the License, or
# (at your option) any... |
cursor.close() |
<|file_name|>trie.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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/licen... | Internal(box ref mut x) => {
return insert(&mut x.count, &mut x.children[chunk(key, idx)], key, value, idx + 1);
}
External(stored_key, ref mut stored_value) if stored_key == key => { |
<|file_name|>issue-13304.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/lic... | |
<|file_name|>pump_bfd2.py<|end_file_name|><|fim▁begin|>import pump
import pump_bfd
class BFDSinkEx(pump_bfd.BFDSink):
def __init__(self, opts, spec, source_bucket, source_node,
source_map, sink_map, ctl, cur):
super(pump_bfd.BFDSink, self).__init__(opts, spec, source_bucket, source_node,
... | cur['snapshot'][(source_bucket['name'], source_node['hostname'])] = snapshot_markers |
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>/*
-------------------------------------------------------------------------------
This file is part of the weather information collector.
Copyright (C) 2018, 2019, 2020, 2021 Dirk Stolle
This program is free software: you can redistribute it and/or modi... | } // if batch size
else if ((param == "--skip-update-check") || (param == "--no-update-check"))
{
if (skipUpdateCheck) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.