prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | export default from './Input'; |
<|file_name|>calendar_ui.js<|end_file_name|><|fim▁begin|>/**
* Client UI Javascript for the Calendar plugin
*
* @version @package_version@
* @author Lazlo Westerhof <hello@lazlo.me>
* @author Thomas Bruederli <bruederli@kolabsys.com>
*
* Copyright (C) 2010, Lazlo Westerhof <hello@lazlo.me>
* Copyright (C) 2012,... | if (!rcmail.busy) |
<|file_name|>test_rule_015.py<|end_file_name|><|fim▁begin|>import os
import unittest
from vsg.rules import generate
from vsg import vhdlFile
from vsg.tests import utils
sTestDir = os.path.dirname(__file__)
lFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_015_test_input.vhd'))
lExpected = []
l... | lExpected = [20, 25, 30]
oRule.analyze(self.oFile)
self.assertEqual(lExpected, utils.extract_violation_lines_from_violation_object(oRule.violations)) |
<|file_name|>model.py<|end_file_name|><|fim▁begin|># Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Signing Model Objects
This module contains classes that encapsulate data about the signing process.
"""... | def provisioning_profile_basename(self):
profile = base_config.provisioning_profile_basename |
<|file_name|>errorHandling.test.js<|end_file_name|><|fim▁begin|>'use strict';
var Crawler = require('../lib/crawler');
var expect = require('chai').expect;
var jsdom = require('jsdom');
var httpbinHost = 'localhost:8000';
describe('Errors', function() {
describe('timeout', function() {
var c = new Crawler... | });
it('should not return an error on a 500', function(done) {
c.queue({
uri : 'http://'+httpbinHost+'/status/500', |
<|file_name|>error.py<|end_file_name|><|fim▁begin|># Copyright 2009-2010 Joshua Roesslein<|fim▁hole|>
def __init__(self, reason):
self.reason = reason.encode('utf-8')
def __str__(self):
return self.reason<|fim▁end|> | # See LICENSE for details.
class WeibopError(Exception):
"""Weibopy exception""" |
<|file_name|>wechat_upload.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Author: mcxiaoke
# @Date: 2018-01-26
from __future__ import print_function, unicode_literals, absolute_import
import json
import sys
import os
import re
import time
import shutil
import random
import mimetypes... | |
<|file_name|>update_line_items.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# h... | |
<|file_name|>0002_alter_request_ip.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.11.27 on 2020-02-13 22:21<|fim▁hole|>from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('registration'... | |
<|file_name|>ippool.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# Copyright (c) 2014 Pawel Rozlach, Brainly.com sp. z o.o.
#
# 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 tmp
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
from yali.storage import StorageError
<|fim▁hole|><|fim▁end|> | class LibraryError(StorageError):
pass |
<|file_name|>untrusted_rlp.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This ... | pub struct UntrustedRlpIterator<'a, 'view>
where
'a: 'view,
{ |
<|file_name|>config.js<|end_file_name|><|fim▁begin|>(function (window) {
'use strict';
<|fim▁hole|>
var service = {
applicationModuleName: applicationModuleName,
applicationModuleVendorDependencies: ['ngResource', 'ngAnimate', 'ngMessages', 'ui.router', 'angularFileUpload', 'ngMaterial'],
registerModule... | var applicationModuleName = 'mean'; |
<|file_name|>cisco_constants.py<|end_file_name|><|fim▁begin|># Copyright 2011 Cisco Systems, 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
#
# ht... | NETWORK = 'network'
PORT = 'port'
BASE_PLUGIN_REF = 'base_plugin_ref'
CONTEXT = 'context' |
<|file_name|>reader.rs<|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 Apa... | |
<|file_name|>iter_first_last.rs<|end_file_name|><|fim▁begin|>use std::iter::Peekable;
pub trait IdentifyFirstLast: Iterator + Sized {
fn identify_first_last(self) -> Iter<Self>;
}
impl<T: Iterator> IdentifyFirstLast for T {
fn identify_first_last(self) -> Iter<Self> {
Iter {
first: true,
... | |
<|file_name|>rebalance.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import math
import numpy as np
from scipy.interpolate import interp1d
def _avgdiff(x):
dx = np.diff(x)
dx2 = np.zeros_like(x)
dx2[0], dx2[-1] = dx[0], dx[-1]
... | pow_err : number
Exponent of error in weighting.
pow_dx : number |
<|file_name|>trait-bounds-cant-coerce.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.a... | // except according to those terms. |
<|file_name|>EasyCheckoutResult.java<|end_file_name|><|fim▁begin|>/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.docuware.dev.Extensions;
import java.io.Closeable... | }
} |
<|file_name|>instance.py<|end_file_name|><|fim▁begin|># Copyright 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/... | 'value': value |
<|file_name|>test_core.py<|end_file_name|><|fim▁begin|>import sys<|fim▁hole|> import unittest2 as unittest
else:
import unittest
from datetime import datetime
from datetime import date
from twilio.rest.resources import parse_date
from twilio.rest.resources import transform_params
from twilio.rest.resources impor... | if sys.version_info < (2, 7): |
<|file_name|>0007_auto__del_field_feed_feed_type.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration<|fim▁hole|>
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Feed.feed_type'
db.delete_c... | from django.db import models |
<|file_name|>thread.rs<|end_file_name|><|fim▁begin|>// 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://www.apache.org/licenses... | |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>use std::fmt;
use std::io;
use std::io::Write;
use thud_game::board::Cells;
use thud_game::board::Content;
use thud_game::coordinate::Coordinate;
use thud_game::Role;
pub fn prompt_for_piece(board: &Cells, role: Role) -> Coordinate {
loop {
let c = read_coordinat... | };
input.clear();
print!("col? "); |
<|file_name|>test_0396.py<|end_file_name|><|fim▁begin|>import unittest
import itertools
<|fim▁hole|>class Solution:
def maxRotateFunction(self, A):
"""
:type A: List[int]
:rtype: int
"""
if not A:
return 0
n = len(A)
sum_ = sum(A)
f = sum(i... | |
<|file_name|>ScrollableTabsButtonPrevent.js<|end_file_name|><|fim▁begin|>import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from 'material-ui/styles';
import AppBar from 'material-ui/AppBar';
import Tabs, { Tab } from 'material-ui/Tabs';
import PhoneIcon from '@material-ui/icons/Phone'... | value: 0, |
<|file_name|>automaton.py<|end_file_name|><|fim▁begin|># This file is part of Scapy
# Copyright (C) 2007, 2008, 2009 Arnaud Ebalard
# 2015, 2016, 2017 Maxence Tury
# This program is published under a GPLv2 license
"""
The _TLSAutomaton class provides methods common to both TLS client and server.
"""
imp... |
We call these successive groups of messages:
ClientFlight1, ServerFlight1, ClientFlight2 and ServerFlight2.
|
<|file_name|>inst_combining.py<|end_file_name|><|fim▁begin|>"""
The MIT License (MIT)
Copyright (c) <2015> <sarangis>
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, includin... | class ConstPropagationPass(FunctionPass, IRBaseVisitor): |
<|file_name|>config_test.go<|end_file_name|><|fim▁begin|>// Copyright © 2021 Genome Research Limited
// Author: Ashwini Chhipa <ac55@sanger.ac.uk>
//
// This file is part of wr.
//
// wr is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as publishe... | |
<|file_name|>keyvalue.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2017 Uber Technologies, 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/LI... | |
<|file_name|>registerDefaultRoutes.js<|end_file_name|><|fim▁begin|>"use strict";
module.exports = function registerDefaultRoutes( baseUrl,
app,
opts ){
var controller = opts.controller;
var listRouter = app.route( bas... | .patch( controller.update )
.delete( controller.remove );
return {
list: listRouter, |
<|file_name|>TableHeaderAddon.java<|end_file_name|><|fim▁begin|>/*
* $Id$
*
* Copyright 2009 Sun Microsystems, Inc., 4150 Network Circle,
* Santa Clara, California 95054, U.S.A. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser Ge... | }
|
<|file_name|>test_queue.py<|end_file_name|><|fim▁begin|># test_queue.py
# Created on: Dec 2, 2015
# Author: pchero
import os
import sys
import test_common
def main():
ast = test_common.Ami()
ast.username = sys.argv[1]
ast.password = sys.argv[2]
if ast.conn() == False:
... | |
<|file_name|>multiplePositionalContainers.py<|end_file_name|><|fim▁begin|>def handle(foo, *args, <error descr="multiple * parameters are not allowed">*moreargs</error>):<|fim▁hole|><|fim▁end|> | print(foo, args, moreargs)
def handle(foo, *args: int, <error descr="multiple * parameters are not allowed">*moreargs: int</error>):
print(foo, args, moreargs) |
<|file_name|>JpegInputStream.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2016 Skynav, Inc. All rights reserved.
* Portions Copyright 2009 Extensible Formatting Systems, Inc (XFSI).
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the follo... | int getTotalBytesRead()
{
return this.readByteCount;
}
|
<|file_name|>func_expand.go<|end_file_name|><|fim▁begin|>package generic
import (
"text/template"
"sync"
"bytes"
"errors"
"github.com/v2pro/quokka/docstore/compiler"
"github.com/v2pro/plz/countlog"
)
var expandLock = &sync.Mutex{}
var templates = map[string]*template.Template{}
var state = struct {
pkgPath ... | importPackages map[string]bool |
<|file_name|>0070_install_triggers.py<|end_file_name|><|fim▁begin|># Generated by Django 3.2.6 on 2021-10-19 09:14
from django.db import migrations
from ureport.sql import InstallSQL
class Migration(migrations.Migration):
dependencies = [
("polls", "0069_pollquestion_color_choice"),<|fim▁hole|> oper... | ]
|
<|file_name|>hooks.py<|end_file_name|><|fim▁begin|># Copyright 2015-2017 F-Secure
# 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 r... | self.hooks = [] |
<|file_name|>encoding.py<|end_file_name|><|fim▁begin|>import sys
class Encoding(object):
@staticmethod
def normalize(value):
"""
Normalize value
:param value: The value
:return: The processed value
"""
# Python 2 vs Python 3
if sys.version_inf... |
# Dict
if isinstance(value, dict): |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LI... | # See the License for the specific language governing permissions and |
<|file_name|>WebController.js<|end_file_name|><|fim▁begin|>"use strict"
var merge = require('merge');
var HttpError = require('http-errors');
var Path = require('path');
module.exports = BaseController.extend({
view: {
file: '',
partials: {},
params: {}
},
before: function(next) {
... | }
var params = this.view.params;
params.partials = {}; |
<|file_name|>shared_ab.py<|end_file_name|><|fim▁begin|># debuggin
from lxml import etree
# 3rd-party modules
from lxml.builder import E
# module packages
from jnpr.junos.cfg import Resource
from jnpr.junos import jxml as JXML
from jnpr.junos.cfg.srx.shared_ab_addr import SharedAddrBookAddr
from jnpr.junos.cfg.srx.sha... | |
<|file_name|>simple.rs<|end_file_name|><|fim▁begin|>#![allow(missing_docs, unused, unused_variables)]
use id3v2::Tag;
use id3v2::frame::{PictureType, Id, Field, Frame, Encoding};
#[derive(Debug, Clone, PartialEq)]
#[allow(missing_docs)]
/// The parsed contents of an extended text frame.
pub struct ExtendedText {
... | match text {
Some(s) => text_match = s == &comment.text,
None => text_match = true, |
<|file_name|>9_queue.rs<|end_file_name|><|fim▁begin|>pub struct Queue<T> {
older: Vec<T>,
younger: Vec<T>
}
impl<T> Queue<T> {
pub fn new() -> Self {
Queue { older: Vec::new(), younger: Vec::new() }
}
pub fn push(&mut self, t: T) {
self.younger.push(t);
}
pub fn is_empty(&... | let _q = Queue::<char>::new();
} |
<|file_name|>sha256block_decl.go<|end_file_name|><|fim▁begin|>// Copyright 2013 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.
// +build ignore
// +build 386 amd64 s390x
package sha256
<|fim▁hole|><|fim▁end|> | //go:noescape
func block(dig *digest, p []byte) |
<|file_name|>ItemSoulGlassMod.java<|end_file_name|><|fim▁begin|>package com.MatofSteel1.soulglassmod.item;
import com.MatofSteel1.soulglassmod.creativetab.CreativeTabSGM;
import com.MatofSteel1.soulglassmod.inventory.ItemInventory;
import com.MatofSteel1.soulglassmod.reference.Reference;
import com.MatofSteel1.soulgla... | @SideOnly(Side.CLIENT) |
<|file_name|>test_regression.py<|end_file_name|><|fim▁begin|>from __future__ import division, print_function, absolute_import
import numpy as np
import scipy.interpolate as interp
from numpy.testing import assert_almost_equal
<|fim▁hole|> x = np.linspace(0,10)
y = x**3
tck = interp.splrep(x, y,... | class TestRegression(object):
def test_spalde_scalar_input(self):
"""Ticket #629""" |
<|file_name|>tick-tock.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core';
import { TickTockComponent } from './components';
import { TickTockService } from './services';
@NgModule({
providers: [<|fim▁hole|> TickTockComponent,
],
exports: [
TickTockComponent,
]
})
export cla... | TickTockService,
],
declarations: [ |
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""displays the root page"""
############################################################
#
# Copyright 2010, 2014 Mohammed El-Afifi
# This file is part of yabe.
#
# yabe is free software: you can redistribute it and/or modify
# it under the t... | # function: root view
# |
<|file_name|>exchange.rs<|end_file_name|><|fim▁begin|>//! This module contains Exchange enum.
use std::fmt::Debug;
use std::convert::Into;
use std::str::FromStr;
use crate::error::*;
use crate::types::*;
#[derive(Debug, PartialEq, Clone, Copy)]
pub enum Exchange {
Bitstamp,
Kraken,
Poloniex,
Bittr... | match self {
Exchange::Bitstamp => "Bitstamp".to_string(),
Exchange::Kraken => "Kraken".to_string(), |
<|file_name|>main_test.ts<|end_file_name|><|fim▁begin|>/// <reference path='../../typings/mocha/mocha.d.ts'/>
/// <reference path='../../typings/chai/chai.d.ts'/>
/// <reference path='../../typings/node/node.d.ts'/>
import * as assert from 'assert';
import * as ts from 'typescript';
import * as chai from 'chai';
impor... | getDefaultLibFileName: () => defaultLibName,
useCaseSensitiveFileNames: () => false,
getCanonicalFileName: (filename) => filename, |
<|file_name|>NoButtonNavbarToOverviewTouchController.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2020 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 Licens... | config.duration = duration;
LauncherState state = mLauncher.getStateManager().getState();
mLauncher.getStateManager().createAtomicAnimation(state, state, config).start();
} |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the A... | Returns a Job instance given a job tracker interface and an id. The job tracker interface is typically
located in request.jt. |
<|file_name|>pipelineBranchesitemlatestRun.ts<|end_file_name|><|fim▁begin|>/**
* Swaggy Jenkins
* Jenkins API clients generated from Swagger / Open API specification
*
* The version of the OpenAPI document: 1.1.2-pre.0
* Contact: blah@cliffano.com
*
* NOTE: This class is auto generated by OpenAPI Generator (http... | result?: string;
runSummary?: string;
startTime?: string;
state?: string; |
<|file_name|>nexttick-order.js<|end_file_name|><|fim▁begin|>var EventEmitter = require('events').EventEmitter;
var fs = require('fs');
var content;
function readFileIfRequired(cb) {
if (!content) { //<co id="callout-globals-nexttick-3-1" />
fs.readFile(__filename, 'utf8', function(err, data) {
content = da... | readFileIfRequired(function(err, data) { //<co id="callout-globals-nexttick-3-3" />
console.log('1. Length:', data.length);
readFileIfRequired(function(err, data2) { |
<|file_name|>jabba_tp_romo_vax_bunker.py<|end_file_name|><|fim▁begin|>import sys
# Project SWG: Jabba TP Romo Vax Bunker: Static Spawns
# (C)2014 ProjectSWG
from resources.datatables import Options
from resources.datatables import State
def addPlanetSpawns(core, planet):
stcSvc = core.staticService
objSvc = ... | stcSvc.spawnObject('romovax_henchman', 'tatooine', bunker.getCellByCellNumber(9), float(32.4), float(-14), float(78.7), float(0), float(0), float(0), float(0), 45)
stcSvc.spawnObject('fighting_romo_vax', 'tatooine', bunker.getCellByCellNumber(9), float(-43.5), float(-14), float(-78.9), float(0), float(0), float(0),... |
<|file_name|>website_group.go<|end_file_name|><|fim▁begin|>// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"strconv"
"github.com/go-openapi/errors"
... | return nil
} |
<|file_name|>NullExp.d.ts<|end_file_name|><|fim▁begin|>/// <reference path="Object.d.ts" /><|fim▁hole|>export var convert : any;
export var revert : any;
export var mulTo : any;
export var sqrTo : any;
}<|fim▁end|> | module NullExp{ |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>"""
Menu utilities.
"""
from fnmatch import fnmatch
from django.utils.importlib import import_module
from django.core.urlresolvers import reverse
from wpadmin.utils import (
get_wpadmin_settings, get_admin_site, get_admin_site_name)
def get_menu_cls(menu, admin... | Returns the admin add url.
"""
app_label = model._meta.app_label
return reverse('%s:%s_%s_add' % (get_admin_site_name(context), |
<|file_name|>py3kcompat.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# This file is part of the Shiboken Python Bindings Generator project.
#
# Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
#
# Contact: PySide team <contact@pyside.org>
#
# This program is free software; you can redistri... |
unicode = unicode |
<|file_name|>qa_g723_24_vocoder.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# Copyright 2011,2013 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, vocoder, blocks
class test_g723_24_vocoder (gr_unitt... | def setUp(self):
self.tb = gr.top_block()
|
<|file_name|>score_encoding_progress_overview.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 a... | |
<|file_name|>CTstat8HelpSystem.cpp<|end_file_name|><|fim▁begin|>#include <cstdlib>
#include <stdexcept>
#include <vector>
#include <algorithm>
#include "Platform.h"
#include "T3000.h"
#include "Position.h"
#include "Selection.h"
using namespace T3000;
void CTstat8HelySystem::MoveForInsertDelete(bool insertion, Sc... | if (position == other.position)
return virtualSpace < other.virtualSpace;
else |
<|file_name|>namespaces_0.js<|end_file_name|><|fim▁begin|>var searchData=
[
['analog',['Analog',['../namespace_d_s_g_1_1_analog.html',1,'DSG']]],
['blit',['BLIT',['../namespace_d_s_g_1_1_b_l_i_t.html',1,'DSG']]],
['dpw',['DPW',['../namespace_d_s_g_1_1_d_p_w.html',1,'DSG']]],<|fim▁hole|> ['eptr',['EPTR',['../name... | ['dsg',['DSG',['../namespace_d_s_g.html',1,'']]], |
<|file_name|>ProgressUtils.java<|end_file_name|><|fim▁begin|>/*
* RapidMiner
*
* Copyright (C) 2001-2008 by Rapid-I and the contributors
*
* Complete list of developers available at our web site:
*
* http://rapid-i.com
*
* This program is free software: you can redistribute it and/or modify
... | * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/
|
<|file_name|>apps.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals
<|fim▁hole|>from django.apps import AppConfig
class ToolboxConfig(AppConfig):
name = 'toolbox'<|fim▁end|> | |
<|file_name|>GameScreen.js<|end_file_name|><|fim▁begin|>import animate;
import event.Emitter as Emitter;
import device;
import ui.View;
import ui.ImageView;
import ui.TextView;
import src.Match3Core as Core;
import src.Utils as Utils;
//var Chance = require('chance');
//Some constants
var CoreGame = new Core();
var l... | this.OnLaunchMainMenu = function(){
this.emit('MainMenu');
}; |
<|file_name|>base.py<|end_file_name|><|fim▁begin|>"""Common settings and globals."""
from os.path import abspath, basename, dirname, join, normpath
from sys import path
try:
from secret import *
except:
pass
########## PATH CONFIGURATION
# Absolute filesystem path to the Django project directory:
DJANGO_ROO... | )
# See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders
STATICFILES_FINDERS = ( |
<|file_name|>Quadcopter.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
####################################################################################################
####################################################################################################
## ... | __MPU6050_RA_EXT_SENS_DATA_01 = 0x4A
__MPU6050_RA_EXT_SENS_DATA_02 = 0x4B |
<|file_name|>decorators.py<|end_file_name|><|fim▁begin|>import functools
from django import http
from django.core.exceptions import PermissionDenied
from django.shortcuts import redirect
from olympia import amo
from olympia.access import acl
from olympia.addons.decorators import addon_view_factory
from olympia.addons... | if acl.check_addon_ownership(request, addon, |
<|file_name|>pause.py<|end_file_name|><|fim▁begin|># Copyright 2012, Tim Bielawa <tbielawa@redhat.com>
#
# 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 versio... | try:
import curses
|
<|file_name|>tensor_approx_spectral.py<|end_file_name|><|fim▁begin|>"""Approximating spectral functions with tensor networks.
"""
import numpy as np
import random
import quimb as qu
from .tensor_gen import MPO_rand, MPO_zeros_like
def construct_lanczos_tridiag_MPO(A, K, v0=None, initial_bond_dim=None,
... | V = Vt / beta[j + 1]
if j >= k_min:
yield (np.copy(alpha[1:j + 1]), |
<|file_name|>pay.js<|end_file_name|><|fim▁begin|>'use strict';
let lib = {
"_id": "5e409c94c5a59210a815262c",
"name": "pay",
"description": "MS pay service for marketplace",
"type": "service",
"configuration": {
"subType": "ecommerce",
"port": 4102,
"group": "Marketplace",
"requestTimeout": 30,
"requestT... | "urac_Profile": false, |
<|file_name|>climate.py<|end_file_name|><|fim▁begin|>"""Support for KNX/IP climate devices."""
import voluptuous as vol
from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice
from homeassistant.components.climate.const import (
STATE_DRY, STATE_ECO, STATE_FAN_ONLY, STATE_HEAT, STATE_IDLE, STAT... | CONF_CONTROLLER_STATUS_STATE_ADDRESS = 'controller_status_state_address'
CONF_CONTROLLER_MODE_ADDRESS = 'controller_mode_address'
CONF_CONTROLLER_MODE_STATE_ADDRESS = 'controller_mode_state_address' |
<|file_name|>UserInfoDao.java<|end_file_name|><|fim▁begin|>package com.bingoogol.algorithmhome.dao;<|fim▁hole|>public interface UserInfoDao {
public int plusPrice(String sellerid, int price);
public int minusPrice(String buyerid, int price);
}<|fim▁end|> | |
<|file_name|>all-downloads-unified-init.js<|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/. */
(function(Mozilla){<|fim▁hole|> 'use st... | |
<|file_name|>strutils.py<|end_file_name|><|fim▁begin|>import termcolor
import sys
class StrUtils:
<|fim▁hole|> pass
@staticmethod
def print_log_row(op_code, url, status_code, documented_reason, body, curlcommand):
if type(curlcommand) == str:
curlstr = curlcommand
else:
... | def __init__(self): |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""Support for monitoring emoncms feeds."""
from __future__ import annotations
from datetime import timedelta
from http import HTTPStatus
import logging
import requests
import voluptuous as vol
from homeassistant.components.sensor import (
PLATFORM_SCHEMA,
... | ATTR_TAG = "Tag"
ATTR_USERID = "UserId"
|
<|file_name|>about.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
DCRM - Darwin Cydia Repository Manager
Copyright (C) 2017 WU Zheng <i.82@me.com>
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 Fou... | but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
|
<|file_name|>DatabaseCallInLoop.go<|end_file_name|><|fim▁begin|>package main
import "gorm.io/gorm"<|fim▁hole|> for _, name := range names {
var user User
db.Where("name = ?", name).First(&user)
res = append(res, user)
}
return res
}<|fim▁end|> |
func getUsers(db *gorm.DB, names []string) []User {
res := make([]User, 0, len(names)) |
<|file_name|>get_ready.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""Robobonobo setup script.
Usage:
./get_ready.py [options]
Options:
-h, --help Show this help screen
--version Show the version.
"""
from docopt import docopt
from glob import glob
import os
GPIOS = [30, 31, 112, 113,... |
def setup_gpio(pin): |
<|file_name|>config_schema.py<|end_file_name|><|fim▁begin|>from marshmallow import (
Schema,
fields,
validates_schema,
ValidationError,
validates_schema,
EXCLUDE,
)
from marshmallow.validate import Regexp
MAP_1 = {
"name": "OpenStreetMap",
"layer": "//{s}.tile.openstreetmap.fr/hot/{z}/... | |
<|file_name|>dbus_client.py<|end_file_name|><|fim▁begin|>#
# uchroma - Copyright (C) 2021 Stefanie Kondik
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, version 3.
#
# This program is ... | if isinstance(identifier, str):
if identifier.startswith(BASE_PATH):
return self._bus.get(SERVICE, identifier) |
<|file_name|>ui_drop_plate_classes.py<|end_file_name|><|fim▁begin|># file ui_drop_plate_classes.py
import os
from thlib.side.Qt import QtWidgets as QtGui
from thlib.side.Qt import QtGui as Qt4Gui
from thlib.side.Qt import QtCore
from thlib.environment import env_mode, env_inst, env_write_config, env_read_config
impor... | |
<|file_name|>distributed_discrete_gaussian_query_test.py<|end_file_name|><|fim▁begin|># Copyright 2021, Google 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 of the License at
#
# ... | |
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.<|fim▁hole|>
class RPng(RPackage):
"""This package provides an easy and simple way to read, write and display
b... | #
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import * |
<|file_name|>opt.rs<|end_file_name|><|fim▁begin|>// -------------------------------------------------------------------------------------------------
// Rick, a Rust intercal compiler. Save your souls!
//
// Copyright (c) 2015-21 Georg Brandl
//
// This program is free software; you can redistribute it and/or modify i... | Var::A16(n, _) => program.var_info.2[n].can_stash = true,
Var::A32(n, _) => program.var_info.3[n].can_stash = true,
}
} |
<|file_name|>list.d.ts<|end_file_name|><|fim▁begin|>import { Emitter, DependencyTree } from './interfaces';
export interface ListOptions {
cwd: string;
production?: boolean;
emitter?: Emitter;
}<|fim▁hole|><|fim▁end|> | export declare function list(options: ListOptions): Promise<DependencyTree>; |
<|file_name|>iframe.js<|end_file_name|><|fim▁begin|>// Generated by CoffeeScript 1.9.3
(function() {
var iframe_template, utils;
<|fim▁hole|>
exports.app = {
iframe: function(req, res) {
var content, context, k, quoted_md5;
context = {
'{{ sockjs_url }}': this.options.sockjs_url
};
... | utils = require('./utils');
iframe_template = "<!DOCTYPE html>\n<html>\n<head>\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n <script src=\"{{ sockjs_url }}\"></script>\n <script>\n document.domain = document.domain... |
<|file_name|>test_handlers_status.py<|end_file_name|><|fim▁begin|># Copyright (C) 2016 Red Hat, Inc
#
# 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 the License, or
# (at y... | """
Test cases for the commissaire.handlers.status module. |
<|file_name|>str.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 geometry::Au;
use cssparser::{self, RGBA, Color};
use libc:... |
let sign = match input.peek() {
None => return None,
Some(&'-') => { |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for multer-s3 2.7
// Project: https://github.com/badunk/multer-s3
// Definitions by: KIM Jaesuck a.k.a. gim tcaesvk <https://github.com/tcaesvk>
// Gal Talmor <https://github.com/galtalmor>
// Matt Terski <https://g... | |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate libc;
#[cfg(feature = "x11")]
extern crate xcb;
#[cfg(feature = "wayland")]<|fim▁hole|>extern crate memmap;
pub mod xkb;<|fim▁end|> | |
<|file_name|>map_space.js<|end_file_name|><|fim▁begin|>// colors and line weights
var NOTHING = 0;
var EVERYTHING = 255;
var MOSTLY = 200;
var THICK_WEIGHT = 4;
var THIN_WEIGHT = 1;
// background
var CANVAS_WIDTH = 1000;
var CANVAS_HEIGHT = 750;
// touchpad
var BOX_SIZE = 50;<|fim▁hole|>var Y_MIN = BOX_SIZE;
var Y_MA... | var X_MIN = CANVAS_WIDTH - (2 * BOX_SIZE);
var X_MAX = X_MIN + BOX_SIZE; |
<|file_name|>LinearPool.hpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003, 2005, 2006 MySQL AB
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; version 2 of the License.
This program... | * Level 0 free entry has space for one record. Level N free entry
* implies space for base^N records. The implied levels are created and
* removed on demand. Empty maps are usually removed. |
<|file_name|>timepi.cc<|end_file_name|><|fim▁begin|>#include <cln/number.h>
#include <cln/io.h>
#include <cln/float.h>
#include <cln/float_io.h>
#include <cln/real.h>
#include <cln/random.h>
#include <cstdlib>
#include <cstring>
#include <cln/timing.h>
using namespace std;
using namespace cln;
int main (int argc, cha... | for (int rep = repetitions; rep > 0; rep--)
{ p = compute_pi_ramanujan_163(len); } |
<|file_name|>build_windows.rs<|end_file_name|><|fim▁begin|>use cc;
pub fn build_windows() {
cc::Build::new()
.include("bullet3/src")
.define("BT_USE_DOUBLE_PRECISION", None)
.define("LinearMath_EXPORTS", None)
.define("NDEBUG", None)
.opt_level(3) // ignoring OPT_LEVEL from ... | |
<|file_name|>associated-const-outer-ty-refs.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.<|fim▁hole|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
/... | // |
<|file_name|>bottle.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Bottle is a fast and simple micro-framework for small web applications. It
offers request dispatching (Routes) with URL parameter support, templates,
a built-in HTTP Server and adapters for many third party WSGI/HTTP-s... |
class Bottle(object): |
<|file_name|>instrument.cc<|end_file_name|><|fim▁begin|>#include <ladspam-jack-0/instrument.h>
#include <ladspam1.pb.h>
#include <iostream>
#include <fstream>
#include <unistd.h>
#include <string>
int main(int argc, char *argv[])
{
if (argc < 2)
{
std::cout << "Missing filename parameter" << std::endl;
return E... | {
std::cout << "Failed to open input stream" << std::endl; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.