prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>run_raw_file_io.py<|end_file_name|><|fim▁begin|># Copyright 2017 The Vispek 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 # # http://www.apach...
run_file_io(args)
<|file_name|>BoatWithSupport.cpp<|end_file_name|><|fim▁begin|>/* * boatWithSupport.cpp * * Created on: 16 de Abr de 2013 * Author: Windows */ #include "BoatWithSupport.h" BoatWithSupport::BoatWithSupport(int extraCapacity) : Boat() { extraCap = extraCapacity; lastMaxCap = 0; lastTransport...
BoatWithSupport::BoatWithSupport(int capacity, int extraCapacity) : Boat(capacity) { extraCap = extraCapacity; lastMaxCap = 0;
<|file_name|>argument-passing.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.or...
struct X {
<|file_name|>base.py<|end_file_name|><|fim▁begin|>""" Django settings for eproweb project. Generated by 'django-admin startproject' using Django 1.8.2. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.django...
DEBUG = True ALLOWED_HOSTS = ["localhost", ".mercycorps.org"]
<|file_name|>update_find_and_modify_id.js<|end_file_name|><|fim▁begin|>// SERVER-4516 and SERVER-6913: test that update and findAndModify tolerate // an _id in the update document, as long as the _id will not be modified var t = db.jstests_server4516; var startingDoc = {_id: 1, a: 1}; function prepare() { t.drop(...
assert.eq(t.findOne({_id: qid}), resultDoc);
<|file_name|>blast2matrix.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 """Parses multiple blast files (for the same target) and print table combining best matches to all target sequences from all query file. Author: l.p.pryszcz+git@gmail.com Barcelona, 24/05/2012 """ import os, sys from optparse import Opt...
#split by dot if requested if o.fnsplit: s = fn.split(".")[0]
<|file_name|>production.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import dj_database_url if os.environ.get('DEBUG') == 'False': DEBUG = False else: DEBUG = True try: from .local import * except ImportError: pass ALLOWED_HOSTS = ['*'] DATABASES = {'default': dj_database_url.config()} SOCIAL_AUTH...
from .base import *
<|file_name|>linux.py<|end_file_name|><|fim▁begin|># Copyright (C) 2010-2013 Claudio Guarnieri. # Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import logging import datetime import re imp...
for k, v in self.kwfilters.items(): if event[k] != v:
<|file_name|>config.py<|end_file_name|><|fim▁begin|>import logging try: from configparser import ConfigParser except ImportError:<|fim▁hole|> logger = logging.getLogger("packges.knightos.org") logger.setLevel(logging.DEBUG) sh = logging.StreamHandler() sh.setLevel(logging.DEBUG) formatter = logging.Formatter("%(a...
# Python 2 support from ConfigParser import ConfigParser
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>/******************************************************************************* Add to .git/hooks/pre-commit (and chmod +x) to enable auto-linting/uglifying: #!/bin/sh grunt build if [ $? -ne 0 ]; then exit 1 fi git add deflector.min.js exit 0 ***************...
options: { testname: '<%= pkg.name %> tests',
<|file_name|>kmz_test.go<|end_file_name|><|fim▁begin|>package kmz import ( "bytes" "log" "github.com/twpayne/go-kml" ) func ExampleNewKMZ() { kmz := NewKMZ(<|fim▁hole|> kml.Name("Simple placemark"), kml.Description("Attached to the ground. Intelligently places itself at the height of the underlying terrain....
kml.Placemark(
<|file_name|>runner.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import argparse import logging import json import subprocess import sys import os.path import urllib2 from base64 import b64decode from distutils.dir_util import mkpath from tempfile import TemporaryFile from shutil import copyfileobj from urlpa...
return process.wait() if __name__ == '__main__':
<|file_name|>struct_zone.go<|end_file_name|><|fim▁begin|>package hsm //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 by app...
//See the License for the specific language governing permissions and //limitations under the License. //
<|file_name|>bitcoin_gu_IN.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="gu_IN" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About TLGCoin</sourc...
<source>Failed to write block</source> <translation type="unfinished"/>
<|file_name|>plugin.py<|end_file_name|><|fim▁begin|>import sys import time import os.path from collections import Counter from vial import vfunc, vim, dref from vial.utils import redraw, focus_window from vial.widgets import make_scratch collector = None def get_collector(): global collector if not collecto...
<|file_name|>_quicktable.py<|end_file_name|><|fim▁begin|># # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2008 Donald N. Allingham # Copyright (C) 2009 Douglas S. Blank # Copyright (C) 2011 Tim G L Lyons # # This program is free software; you can redistribute it and/or modify # it under the t...
<|file_name|>file.rs<|end_file_name|><|fim▁begin|>// "Tifflin" Kernel // - By John Hodge (thePowersGang) // // Modules/fs_fat/dir.rs use kernel::prelude::*; use kernel::lib::mem::aref::ArefBorrow; use kernel::vfs::node; const ERROR_SHORTCHAIN: node::IoError = node::IoError::Unknown("Cluster chain terminated early"); ...
let n = dst.clone_from_slice( &c ); assert_eq!(n, dst.len()); } }
<|file_name|>db.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3.4 ############################################################################# # # Dictionnary DB managing script. Add/Del/Search definitions # Copyright (C) 2014 bertrand # # This program is free software; you can redistribute it and/or modify #...
############ ### MAIN ###
<|file_name|>api.js<|end_file_name|><|fim▁begin|>export default { queryRouteList: '/routes', queryUserInfo: '/user', logoutUser: '/user/logout', loginUser: 'POST /user/login', queryUser: '/user/:id', queryUserList: '/users', updateUser: 'Patch /user/:id', createUser: 'POST /user', removeUser: 'DELET...
<|file_name|>test_vmware_vmdk.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2013 VMware, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain ...
<|file_name|>outgoing.js<|end_file_name|><|fim▁begin|>const _ = require('lodash') const handleText = (event, next, botfmk) => { if (event.platform !== 'botfmk' || event.type !== 'text') { return next() } // TODO DEBUG console.log('REPLIED', event.raw) const session = event.session const replied = ev...
} return next() }
<|file_name|>dc.rs<|end_file_name|><|fim▁begin|>/*! DC (Distance Coding) forward and backward transformation. Designed to be used on BWT block output for compression. # Links http://www.data-compression.info/Algorithms/DC/ # Example ```rust use compress::bwt::dc; let bytes = b"abracadabra"; let distances = dc::en...
fn roundtrip(bytes: &[u8]) {
<|file_name|>union-abi.rs<|end_file_name|><|fim▁begin|>// ignore-emscripten vectors passed directly // compile-flags: -C no-prepopulate-passes // This test that using union forward the abi of the inner type, as // discussed in #54668 #![crate_type="lib"] #![feature(repr_simd)] #[derive(Copy, Clone)] pub enum Unhab {...
pub union UnionI64x4Tuple{ a: i64x4, b: (i64, i64, i64, i64) }
<|file_name|>ItemController.java<|end_file_name|><|fim▁begin|>/* * Copyright 2014 NAVER Corp. * * 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/LIC...
* Unless required by applicable law or agreed to in writing, software
<|file_name|>simplestreams_test.go<|end_file_name|><|fim▁begin|>// Copyright 2013 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package tools_test import ( "bytes" "encoding/json" "flag" "fmt" "io" "io/ioutil" "net/http" "os" "path/filepath" "reflect" "runtime" "strings" "tes...
<|file_name|>test_count_minimal_sketch_counter.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Automated tests for checking transformation algorithms (the models package). """ import logging import unittest...
current = itertools.chain(current, iter([[special_token]]), TestPhrasesModel.get_sentence(i))
<|file_name|>panel.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/. */ "use strict"; // The panel module currently supports only Fir...
if (anchor instanceof Ci.nsIDOMElement) { console.warn(
<|file_name|>api.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # RERO ILS # Copyright (C) 2019 RERO # Copyright (C) 2020 UCLouvain # # 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 Founda...
<|file_name|>capture_source_list_dshow.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2015 The WebM project authors. All Rights Reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the LICENSE file in the root of the source // tree. An additional intellectual property rig...
#include "encoder/capture_source_list.h" #include <sstream>
<|file_name|>facebox_test.go<|end_file_name|><|fim▁begin|>package facebox_test import ( "io" "net/http" "net/http/httptest" "testing" "github.com/machinebox/sdk-go/facebox" "github.com/matryer/is" ) func TestInfo(t *testing.T) { is := is.New(t) srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseW...
}
<|file_name|>telnet.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import telnetlib import time import sys import socket TEL_PORT = 23 TEL_TO = 3 def write_cmd(cmd, conn): cmd = cmd.rstrip() conn.write(cmd + '\n') time.sleep(1) return conn.read_very_eager() def telnet_conn(ip, port, timeout):...
hostname.lstrip('hostname ')
<|file_name|>test_pool3d_op.py<|end_file_name|><|fim▁begin|># Copyright (c) 2018 PaddlePaddle 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 # # http://ww...
<|file_name|>LinkKeySerializer.java<|end_file_name|><|fim▁begin|>/* * Copyright 2014-present Open Networking Foundation * * 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://w...
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and
<|file_name|>controllers.py<|end_file_name|><|fim▁begin|>from application import CONFIG, app from .models import * from flask import current_app, session from flask.ext.login import login_user, logout_user, current_user from flask.ext.principal import Principal, Identity, AnonymousIdentity, identity_changed, identity_l...
return None def verify_user(email, password):
<|file_name|>inferFromUsage.ts<|end_file_name|><|fim▁begin|>/* @internal */ namespace ts.codefix { const fixId = "inferFromUsage"; const errorCodes = [ // Variable declarations Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code, ...
return builtinConstructors[type.symbol.escapedName as string](combineTypes(types));
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main import ( "encoding/json" "flag" "fmt" "gopkg.in/mgo.v2/bson" "os" "path/filepath" "strings" "time" "github.com/apache/thrift/lib/go/thrift" "github.com/go-kit/kit/log" thriftclient "github.com/banerwai/micros/command/workhistory/client/thrift...
protocolFactory = thrift.NewTJSONProtocolFactory()
<|file_name|>rx.binding.js<|end_file_name|><|fim▁begin|>/* */ "format cjs"; ; (function(factory) { var objectTypes = { 'function': true, 'object': true }; function checkGlobal(value) { return (value && value.Object === Object) ? value : null; } var freeExports = (objectTypes[typeof exports] && ex...
<|file_name|>proc_macro_harness.rs<|end_file_name|><|fim▁begin|>use std::mem; use rustc_ast::attr; use rustc_ast::ptr::P; use rustc_ast::visit::{self, Visitor}; use rustc_ast::{self as ast, NodeId}; use rustc_ast_pretty::pprust; use rustc_expand::base::{parse_macro_name_and_helper_attrs, ExtCtxt, ResolverExpand}; use ...
// // If we find one, try to locate a `#[proc_macro_derive]` attribute on it.
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from models import * import datetime admin.site.register(PingHost)<|fim▁hole|><|fim▁end|>
admin.site.register(PingResult)
<|file_name|>bitcoin_nb.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="nb" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Podcoin</source> ...
<source>Error: system error: </source> <translation type="unfinished"/> </message> <message>
<|file_name|>result.rs<|end_file_name|><|fim▁begin|>use std::io::Error as IoError; use std::sync::mpsc::{SendError, RecvError}; use std::result; use mio::NotifyError; use queue::Message; use {Handler}; #[derive(Debug)] pub enum Error<H: Handler> { QueueOutOfService, Io(IoError), NotifyError(NotifyError<Mes...
impl<H: Handler> From<IoError> for Error<H> { fn from(err: IoError) -> Error<H> { Error::Io(err)
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># Django settings for tests2 project. import django import sys sys.path.append("../..") sys.path.append("../../../../..") from siteconf import * DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS ...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'description':'End to end solution for bitcoin data gathering, backtesting, and live trading', 'author': 'ross palmer',<|fim▁hole|> 'url':'http://rosspalmer.github.io...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import os from django...
local_settings_file = os.getenv('LOCAL_SETTINGS_FILE')
<|file_name|>jquery-validation-unobtrusive.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for Microsoft jQuery Unobtrusive Validation v3.2.3 // Project: http://aspnetwebstack.codeplex.com/ // Definitions by: Matt Brooks <https://github.com/EnableSoftware> // Definitions: https://github.com/DefinitelyTyped/Defin...
parse(selector: JQuerySelector): void; } }
<|file_name|>watcher.py<|end_file_name|><|fim▁begin|>import cPickle import logging import numpy import os import time from collections import deque from copy import deepcopy from datetime import datetime from pytz import timezone from threading import Event, Thread from coinbase.wallet.client import Client from jarvi...
<|file_name|>PersistDlg.cpp<|end_file_name|><|fim▁begin|>// Copyleft 2005 Chris Korda // 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 any later version. /*...
{ CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CPersistDlg) //}}AFX_DATA_MAP
<|file_name|>iBeanRoastInformation.ts<|end_file_name|><|fim▁begin|>export interface IBeanRoastInformation { /* On which temperature where the beans removed from the roaster **/ drop_temperature: number; /* Roasting length **/ roast_length: number; /* Roasting machine **/ roaster_machine: string; /* The...
second_crack_temperature: number; }
<|file_name|>wemo.py<|end_file_name|><|fim▁begin|>""" Support for WeMo switches. For more details about this component, please refer to the documentation at https://home-assistant.io/components/switch.wemo/ """ import logging from datetime import datetime, timedelta from homeassistant.components.switch import SwitchD...
self._update(force_update=(not updated))
<|file_name|>score_responsible.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 universities,...
# The core business involves the administration of students, teachers, # courses, programs and so on.
<|file_name|>observing-proxy.js<|end_file_name|><|fim▁begin|>/* A proxy for observing object state changes. var obj={person:'Eddie',age:22}; _o.onUpdate(obj,{ age:function(value){ if(value>this.oldValue) console.log('Happy birthday, Peter!') }, person:function(value){ console.log(this.oldValue+' i...
var val=this.target[this.name], targetInd=targetIndex(this.target); if(val!==userVal){
<|file_name|>container.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 The Kubernetes 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 http://www.apache.org/licens...
<|file_name|>test_KeepOpenTCP.py<|end_file_name|><|fim▁begin|>import dns import os import socket import struct from recursortests import RecursorTest class testKeepOpenTCP(RecursorTest): _confdir = 'KeepOpenTCP' _config_template = """dnssec=validate packetcache-ttl=10 packetcache-servfail-ttl=10 auth-zones=a...
sock[i].settimeout(2.0) res = self.sendTCPQueryKeepOpen(sock[i], query) self.assertMessageIsAuthenticated(res) self.assertRRsetInAnswer(res, expected)
<|file_name|>Java.py<|end_file_name|><|fim▁begin|>from coalib.bearlib.languages.Language import Language @Language class Java:<|fim▁hole|> extensions = '.java', comment_delimiter = '//' multiline_comment_delimiters = {'/*': '*/'} string_delimiters = {'"': '"'} multiline_string_delimiters = {} i...
<|file_name|>app.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, ViewChild, ElementRef, Renderer } from '@angular/core'; import { Task } from './shared/task.model'; import { Param } from './shared/param.model'; import { Class, ClassTypes } from './shared/class.model'; import { ClassParams } from '...
// let graphArguments: ClassGraphArguments = new ClassGraphArguments({
<|file_name|>config.py<|end_file_name|><|fim▁begin|># # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
'credentials')), cfg.ListOpt('hidden_stack_tags', default=[],
<|file_name|>image_ordering_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import cv2 import numpy as np from vision import camera_message_framework import itertools import time shape = (500, 500, 3) size = 1 for dim in shape: size *= dim def image_of(axes): im = np.zeros(shape, dtype=np.uint8) ...
<|file_name|>chess.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import struct class GGZChessFeedback: def onSeat(self, seatNum, version): pass def onPlayers(self, whiteType, whiteName, blackType, blackName): pass def onClockRequest(self)...
whiteCode = self.command[1] if whiteCode == self.GGZ_SEAT_OPEN: requiredLength += 1 whiteName = ''
<|file_name|>0004_auto_20170913_1043.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-09-13 10:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('company', '0003_auto_20...
model_name='company', name='basic_material', field=models.IntegerField(choices=[(0, 'Plastic / Resin'), (1, 'Metal'), (3, 'Other'), (4, '---')], default=0),
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*-<|fim▁hole|>from . import res_partner_bank from . import account_bank_statement_import<|fim▁end|>
<|file_name|>DateUtil.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ''' Created on 2015年8月24日 @author: hustcc ''' import datetime import time # 当前时间,可用于mysql datetime def now_datetime_string(): return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") def now_datetime(): return datetime.dateti...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2009 by the FIFE team # http://www.fifengine.de # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # ...
<|file_name|>medication_usage.pb.go<|end_file_name|><|fim▁begin|>// Copyright 2020 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 // // https://www.apache....
NumServices: 0,
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from django.test import TestCase from django.test.utils import override_settings from rest_framework import status from rest_framework.test import APIClient from axes.signals import user_locked_out import json import time from family_tree.models.family import Family f...
<|file_name|>util.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ use std::sync::Arc; use cpython::*; use cpython_ext::{ExtractInner, PyPath, PyPathBuf, Re...
Ok(dict) }
<|file_name|>RequisitionNewIndividualItemValidation.java<|end_file_name|><|fim▁begin|>/* * The Kuali Financial System, a comprehensive financial management system for higher education. * * Copyright 2005-2017 Kuali, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms...
* published by the Free Software Foundation, either version 3 of the
<|file_name|>dbscan.rs<|end_file_name|><|fim▁begin|>use rm::linalg::Matrix; use rm::learning::dbscan::DBSCAN; use rm::learning::UnSupModel; #[test] fn test_basic_clusters() { let inputs = Matrix::new(6, 2, vec![1.0, 2.0, 1.1, 2.2, 0.9...
<|file_name|>test.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/L...
<|file_name|>router.rs<|end_file_name|><|fim▁begin|>use regex::Regex; use hyper::Method; use hyper::server::Request; use context::{Context, Params, ParamType}; type Handler = fn(Context) -> ::Response; pub struct Router { pub routes: Vec<Route> } impl Router { pub fn new() -> Router { Router { ...
<|file_name|>test_local_file.py<|end_file_name|><|fim▁begin|>"""The tests for local file camera component.""" import asyncio from unittest import mock # Using third party package because of a bug reading binary data in Python 3.4 # https://bugs.python.org/issue23004 from mock_open import MockOpen from homeassistant.b...
}})
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #![crate_name = "webdriver_server"] #![crate_type = "rlib"] #![d...
.or(Err(WebDriverError::new(ErrorStatus::NoSuchFrame, "Frame does not exist")))?;
<|file_name|>encrypt_decrypt_test.go<|end_file_name|><|fim▁begin|>// Copyright 2014 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published b...
if !bytes.Equal(pt, message) {
<|file_name|>NexaRemapButton.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2005-2013, Stefan Strömberg <stefangs@nethome.nu> * * This file is part of OpenNetHome (http://www.nethome.nu) * * OpenNetHome is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public ...
@SuppressWarnings("UnusedDeclaration") public void setButton(String deviceCode) {
<|file_name|>speed_mixture.py<|end_file_name|><|fim▁begin|>''' testing speedup of code Created on Sep 17, 2016 @author: jonaswallin ''' from Mixture.density import mNIG from Mixture.density.purepython import mNIG as pmNIG from Mixture import mixOneDims import numpy as np import numpy.random as npr import timeit # mos...
# 2000 0.051 0.000 0.051 0.000 {Mixture.util.cython_Bessel.Bessel0approx}
<|file_name|>project.ts<|end_file_name|><|fim▁begin|>import * as fs from 'fs'; import * as path from 'path'; import * as npm from './npm'; import * as node from './node'; import * as typings from './typings'; import { rmrfSync, walk, exists, symlink, readJsonFile, readFile, flatSymlinkDirectoryIgnore, writeJsonFile, co...
<|file_name|>routes.js<|end_file_name|><|fim▁begin|>Router.map(function() { this.route('index.view', { path: '/', onBeforeAction: function () { if (Meteor.isClient) { Session.set('siteTitle', 'Vazco SlideDeck!'); }; this.next(); } }); ...
<|file_name|>binop.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, division, print_function import ast from jaspyx.ast_util import ast_load, ast_call from jaspyx.visitor import BaseVisitor class BinOp(BaseVisitor): def visit_BinOp(self, node): attr = getattr(self, 'BinOp_%s' % node...
'BitAnd': '&', 'BitOr': '|', 'BitXor': '^', 'LShift': '<<',
<|file_name|>phase5.py<|end_file_name|><|fim▁begin|>import json from django.template.loader import render_to_string from django.http import HttpResponse from django.utils import timezone from django.shortcuts import render_to_response from cir.models import * import claim_views from cir.phase_control import PHASE_CO...
vote.save() response = {} return HttpResponse(json.dumps(response), mimetype='application/json')
<|file_name|>inicio.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- print '''<!DOCTYPE html><html>''' incluir(data,"head") print '''<body>''' incluir(data,"header")<|fim▁hole|>print '''</body></html>'''<|fim▁end|>
<|file_name|>unsafe-block-without-braces.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at<|fim▁hole|>// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modi...
// http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
<|file_name|>coded_input_stream.rs<|end_file_name|><|fim▁begin|>use std::io; use std::io::BufRead; use std::io::Read; use std::mem; use std::mem::MaybeUninit; #[cfg(feature = "bytes")] use ::bytes::Bytes; #[cfg(feature = "bytes")] use crate::chars::Chars; use crate::enums::Enum; use crate::error::ProtobufError; use c...
} /// Read raw bytes into the supplied vector. The vector will be resized as needed and /// overwritten.
<|file_name|>view_dt.py<|end_file_name|><|fim▁begin|>import django_tables2 as tables from django_tables2 import RequestConfig from django_tables2.utils import A # alias for Accessor from django.shortcuts import render import inspect class DtTemplate(tables.Table):<|fim▁hole|> #name_last = tables.LinkColumn('t...
#name_first = tables.Column(verbose_name="First Name")
<|file_name|>hooks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2014 Nicolas Bessi, Alexandre Fayolle, Camptocamp SA # Copyright 2016 Sodexis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). def post_init_hook(cr, registry): """ Add street3 to address format """ query = "...
<|file_name|>search_highlight.js<|end_file_name|><|fim▁begin|>/* http://www.kryogenix.org/code/browser/searchhi/ */ /* Modified 20021006 to fix query string parsing and add case insensitivity */ /* Modified 20030227 by sgala@hisitech.com to skip words with "-" and cut %2B (+) preceding pages */ function highlightWord(...
if (tempNodeVal.indexOf(tempWordVal) != -1) { pn = node.parentNode; if (pn.className != "searchword")
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from django.db import models from django.utils import timezone class Post(models.Model): author = models.ForeignKey('auth.User')<|fim▁hole|> text = models.TextField() created_date = models.DateTimeField( default=t...
title = models.CharField(max_length=200)
<|file_name|>ReturnTypeHandler.spec.ts<|end_file_name|><|fim▁begin|>import 'reflect-metadata'; import { NoReturnValueHandlerFoundError } from '../src/errors/NoReturnValueHandlerFoundError'; import { ReturnTypeHandler } from '../src/ReturnTypeHandler'; import { ReturnType } from '../src/routes/ReturnType'; describe('R...
getHeaders: () => ({}), getStatus: () => 0, getValue: () => '',
<|file_name|>xistream.hpp<|end_file_name|><|fim▁begin|>// vim: bs=2:ts=4:sw=4:tw=80:noexpandtab #ifndef FST_XISTREAM_HPP #define FST_XISTREAM_HPP #include "ex.hpp" #include <string> #include <istream> namespace fst { // class that extend/modify istream methods/behaviors // catch ios_base::failure exceptions and th...
std::istream &get_istream() const; // set another istream
<|file_name|>module.js<|end_file_name|><|fim▁begin|><|fim▁hole|> let fs = require("fs") , chalk = require("chalk"); module.exports = function(name) { let file = process.env.CONFIG_PATH + "initializers/" + name; if (!fs.existsSync(file + ".js")) console.log(chalk.red("\tInitializer", name + ".js not found, add it...
"use strict";
<|file_name|>sensor_base.py<|end_file_name|><|fim▁begin|>"""Support for the Philips Hue sensors as a platform.""" from __future__ import annotations from datetime import timedelta import logging from typing import Any from aiohue import AiohueException, Unauthorized from aiohue.v1.sensors import TYPE_ZLL_PRESENCE imp...
primary_sensor = primary_sensor_devices.get(_device_id(api[item_id])) if primary_sensor is not None: base_name = primary_sensor.name
<|file_name|>Family.java<|end_file_name|><|fim▁begin|>/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package HW09_101044044; /** * CSE241_HW09 Samet Sait Talayhan 101044044 */ /** * @author talayhan * */ public class Family { // Data fields ...
<|file_name|>window_size.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)] use std::sync::atomic::AtomicBool; use std::sync::atomic::AtomicIsize; use std::sync::atomic::Ordering; use std::sync::Arc; use std::task::Poll; use super::atomic_box_option::AtomicBoxOption; use super::waiters::*; use crate::debug_undebu...
window_size: AtomicIsize,
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate curl; extern crate tokio_core;<|fim▁hole|> use std::io::{self, Write, BufWriter}; use curl::easy::Easy; use futures::future::*; use std::fs::File; use futures_cpupool::CpuPool; use std::sync::{Mutex, Arc}; use futures::{Future, Stream, Async}; use futures::...
extern crate tokio_curl; extern crate fibers; extern crate futures; extern crate futures_cpupool;
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # nala - file/directory watcher # Copyright (C) 2013 Eugenio "g7" Paolantonio <me@medesimo.eu> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licen...
author_email='me@medesimo.eu', url='https://github.com/g7/python-nala', packages=[ "nala"
<|file_name|>loyalty-outlined.js<|end_file_name|><|fim▁begin|>import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(h(h.f, null, h("path", { d: "M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41...
}), h("circle", { cx: "6.5", cy: "6.5",
<|file_name|>utils_libguestfs.py<|end_file_name|><|fim▁begin|>""" libguestfs tools test utility functions. """ import logging from autotest.client import os_dep, utils from autotest.client.shared import error import propcan class LibguestfsCmdError(Exception): """ Error of libguestfs-tool command. """ ...
<|file_name|>DocumentsViewController.js<|end_file_name|><|fim▁begin|>Ext.define('Hrproject.view.clouddrive.documentview.DocumentsViewController',{ extend : 'Ext.app.ViewController', requires:['Hrproject.view.fw.PDF.panel.PDF'], alias : 'controller.documentview', clouddrive : null, drivelist : null, driveDetails :...
} }], items :[{ xtype : 'treepanel',
<|file_name|>bar-chart.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { BarChartComponent } from './bar-chart.component'; @NgModule({ imports: [ CommonModule, FormsModule,<|f...
<|file_name|>prefix_test.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT # All rights reserved. This work is under a BSD license, see LICENSE.TXT. from jenkinsflow.flow import serial from .framework import api_select prefixed_jobs = """ serial flow: [ job: 'top_quic...
assert prefixed_jobs.strip() in sout
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- { 'name': "BestJa: Application Moderation", 'summary': "Two stage recruitment process", 'description': """ BestJa Application Moderation ============================= Split recruitment process into two separate stages. The fir...
'base',
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>import collections from django import forms from django.forms.util import ErrorDict from tower import ugettext as _, ugettext_lazy as _lazy import amo from amo import helpers from applications.models import AppVersion sort_by = ( ('', _lazy(u'Keyword Match')), ...
amo.FIREFOX: tuplize(amo.FIREFOX.min_display_version), amo.THUNDERBIRD: tuplize(amo.THUNDERBIRD.min_display_version), amo.SEAMONKEY: tuplize(amo.SEAMONKEY.min_display_version),