prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>HIDManagerTest.java<|end_file_name|><|fim▁begin|>package com.cibuddy.hid.test; import com.codeminders.hidapi.ClassPathLibraryLoader; import com.codeminders.hidapi.HIDDeviceInfo; import com.codeminders.hidapi.HIDManager; import java.io.IOException; import org.junit.Assert; import org.junit.BeforeClass; imp...
/** * A simple test to see if the native libraries could be loaded.
<|file_name|>ViewDoctorActivity.java<|end_file_name|><|fim▁begin|>package com.faravy.icare; import java.util.ArrayList; import android.app.ActionBar; import android.app.Activity; import android.content.ContentProviderOperation; import android.content.Intent; import android.content.OperationApplicationException; impor...
Intent mActivityIntent = getIntent(); mID = mActivityIntent.getStringExtra("mId"); mDataSource = new DoctorDataSource(this); mDoctor = mDataSource.singleDoctor(mID);
<|file_name|>jquery,mmenu.addon-template.js<|end_file_name|><|fim▁begin|>/* * jQuery mmenu {ADDON} add-on * mmenu.frebsite.nl * * Copyright (c) Fred Heusschen */ (function( $ ) { var _PLUGIN_ = 'mmenu', _ADDON_ = '{ADDON}'; $[ _PLUGIN_ ].addons[ _ADDON_ ] = { // setup: fired once per menu setup: fun...
_c = $[ _PLUGIN_ ]._c;
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of th...
//! [2] QTranslator translator; //! [2] //! [3]
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>export { authentication } from './authentication' export { authorization } from './authorization'<|fim▁hole|><|fim▁end|>
export { errorHandler } from './error-handler' export { logRequest } from './log-request' export { validate } from './validator' export { responseTime } from './response-time'
<|file_name|>increment.py<|end_file_name|><|fim▁begin|>import ConfigParser from .settings import SECTIONS, CONFIG config = ConfigParser.ConfigParser() config.read(CONFIG) if not config.has_section(SECTIONS['INCREMENTS']): config.add_section(SECTIONS['INCREMENTS']) with open(CONFIG, 'w') as f: config....
for user, max_id in max_ids.items(): config.set(SECTIONS['INCREMENTS'], user, str(max_id)) with open(CONFIG, 'w') as f:
<|file_name|>emailer_plugin.py<|end_file_name|><|fim▁begin|>from gi.repository import Gtk import gourmet.gtk_extras.dialog_extras as de from gourmet.plugin import RecDisplayModule, UIPlugin, MainPlugin, ToolPlugin from .recipe_emailer import RecipeEmailer from gettext import gettext as _ class EmailRecipePlugin (MainP...
self.actionGroup.add_actions([ ('EmailRecipes',None,_('Email recipes'),
<|file_name|>client.py<|end_file_name|><|fim▁begin|>import json import httplib from conpaas.core import https def _check(response): code, body = response if code != httplib.OK: raise Exception('Received http response code %d' % (code)) data = json.loads(body) if data['error']: raise Exception(data['error']) ...
return _check(https.client.jsonrpc_get(host, port, '/', method)) def startup(host, port):
<|file_name|>test_url.cpp<|end_file_name|><|fim▁begin|>#include "test_url.hpp" #include <oonet/http/url.hpp> namespace oonet { namespace test { test_url test_url_inst; bool test_url::TestUrlParamCtor::operator()() { http::url_params a; if (!a.list().empty()) return false; if (!a.full(...
http::url_params d("dsfklgjsdkflgjsdf=123=123"); if (d.full() != "dsfklgjsdkflgjsdf=123=123") return false;
<|file_name|>elf64.rs<|end_file_name|><|fim▁begin|>use core::fmt; use core::iter::Iterator; use ::kern::console::LogLevel::*; pub const SIZEOF_IDENT: usize = 16; pub const SIZEOF_EHDR: usize = 64; pub const ELFCLASS: u8 = ELFCLASS64; #[repr(C)]<|fim▁hole|> pub e_ident: [u8; SIZEOF_IDENT], /// Object file type ...
#[derive(Clone, Copy, Default, PartialEq)] pub struct Header { /// Magic number and other info
<|file_name|>docker_info_test.go<|end_file_name|><|fim▁begin|>package appui import ( "testing" "github.com/moncho/dry/mocks" ) var expectedDockerInfoWithSwarm = ` <blue>Docker Host:</> <yellow>dry.io</> <blue>Docker Version:</> <yellow>1.0</> <blue>Hostname:</> <yellow>test</> <blue>Swarm:...
if len(content.CellMap) == 0 {
<|file_name|>getgit.component.ts<|end_file_name|><|fim▁begin|>angular.module('component').component('getGit', { template: `<|fim▁hole|> <h1>GIT : Repro</h1> <div class="controller" > <div git-repro="user : 'gaetanV',repositories :'angular_directive',branch:'master',path:'angu...
<section>
<|file_name|>wordpress.js<|end_file_name|><|fim▁begin|>import fs from 'fs'; import path from 'path'; import Wxr from 'wxr'; import Base from './base'; const NOT_SAFE_IN_XML = /[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm; export default class extends Base { constructor(...args) { super(.....
slug: cate.pathname }); }
<|file_name|>bitmap_font.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use std::old_io::{File}; use xml::Element; /// /// Representation of a bitmap font, generated with a tool like /// [BMFont](http://www.angelcode.com/products/bmfont/) /// /// A BitmapFont describes a bitmap font texture, providing...
pub x: u8,
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python from distutils.core import setup, Extension from distutils.util import get_platform import shutil import os, sys def buil_all():<|fim▁hole|> packages=['miasm2', 'miasm2/arch', 'miasm2/arch/x86', 'mia...
<|file_name|>tools.py<|end_file_name|><|fim▁begin|>import sys import inspect import os import numpy as np import time import timeit import collections import subprocess from qtools.qtpy import QtCore, QtGui from qtools.utils import get_application, show_window from functools import wraps from galry import log_debug, lo...
r[idx] = q[idx] g[idx] = v[idx] b[idx] = p[idx]
<|file_name|>SimpleAccess3.py<|end_file_name|><|fim▁begin|>import sdms server = { 'HOST' : 'localhost', 'PORT' : '2506', 'USER' : 'SYSTEM', 'PASSWORD' : 'VerySecret' } conn = sdms.SDMSConnectionOpenV2(server, server['USER'], server['PASSWORD'], "Simple Access Example") try: if 'ERROR' in conn: print(str...
<|file_name|>object.rs<|end_file_name|><|fim▁begin|>use libc::c_void; use llvm_sys::object::{self, LLVMObjectFileRef, LLVMSymbolIteratorRef}; use cbox::CBox; use std::fmt; use std::iter::Iterator; use std::marker::PhantomData; use std::mem; use super::buffer::MemoryBuffer; use super::util; /// An external object file ...
pub size: usize, } impl<'a> Copy for Symbol<'a> {} impl<'a> Clone for Symbol<'a> {
<|file_name|>vector.rs<|end_file_name|><|fim▁begin|>use std::ops::Add; use std::ops::Sub; use std::ops::Mul; use std::ops::Div; use std::cmp::PartialEq; #[derive(Debug)] pub struct Vector2 { pub x:f64 , pub y:f64 } impl Vector2 { /* constructors*/ /// /// Returns zero vector /// pub ...
<|file_name|>crypto.go<|end_file_name|><|fim▁begin|>package pusher<|fim▁hole|> // "crypto/md5" "crypto/sha256" "encoding/hex" "strings" ) func hmacSignature(toSign, secret string) string { return hex.EncodeToString(hmacBytes([]byte(toSign), []byte(secret))) } func hmacBytes(toSign, secret []byte) []byte { _authS...
import ( "crypto/hmac"
<|file_name|>issue-14901.rs<|end_file_name|><|fim▁begin|>// check-pass pub trait Reader {} enum Wrapper<'a> { WrapReader(&'a (dyn Reader + 'a)) } trait Wrap<'a> {<|fim▁hole|>} impl<'a, R: Reader> Wrap<'a> for &'a mut R { fn wrap(self) -> Wrapper<'a> { Wrapper::WrapReader(self as &'a mut dyn Reader) ...
fn wrap(self) -> Wrapper<'a>;
<|file_name|>message.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 https://mozilla.org/MPL/2.0/. */ use crate::rpc::LayoutRPC; use crate::{OpaqueStyleAndLayoutD...
use servo_url::ServoUrl; use std::sync::atomic::AtomicBool; use std::sync::Arc;
<|file_name|>Wire.cpp<|end_file_name|><|fim▁begin|>/* TwoWire.cpp - TWI/I2C library for Wiring & Arduino Copyright (c) 2006 Nicholas Zambetti. All right reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by ...
// alert user program
<|file_name|>qgssourcefieldsproperties.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************** qgssourcefieldsproperties.cpp --------------------- begin : July 2017 copyright : (C) 2017 by David Signer email ...
updateButtons(); updateFieldRenamingStatus();
<|file_name|>archive.rs<|end_file_name|><|fim▁begin|>use rustc_data_structures::temp_dir::MaybeTempDir;<|fim▁hole|>use std::io; use std::path::{Path, PathBuf}; pub(super) fn find_library( name: Symbol, verbatim: bool, search_paths: &[PathBuf], sess: &Session, ) -> PathBuf { // On Windows, static li...
use rustc_session::cstore::DllImport; use rustc_session::Session; use rustc_span::symbol::Symbol;
<|file_name|>custom_workflow.py<|end_file_name|><|fim▁begin|>from cloudify.workflows import ctx, parameters ctx.logger.info(parameters.node_id)<|fim▁hole|> for relationship in instance.relationships: relationship.execute_source_operation('custom_lifecycle.custom_operation')<|fim▁end|>
instance = [n for n in ctx.node_instances if n.node_id == parameters.node_id][0]
<|file_name|>List.spec.js<|end_file_name|><|fim▁begin|>const test = require('tape') const sinon = require('sinon') const helpers = require('../test/helpers') const MockCrock = require('../test/MockCrock') const bindFunc = helpers.bindFunc const curry = require('./curry') const _compose = curry(require('./compose')) c...
t.throws(reject(undefined), err, 'throws with undefined') t.throws(reject(null), err, 'throws with null')
<|file_name|>travis_doc.py<|end_file_name|><|fim▁begin|>def function1(): """ Return 1 """ return 1<|fim▁hole|> Return 2 """ return 2<|fim▁end|>
def function2(): """
<|file_name|>IdeationStatusExtension.java<|end_file_name|><|fim▁begin|>package com.adobe.aem.scf.extensions; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; <|fim▁hole|>import org.apache.felix.scr.annotations.Service; import org.apache.sling.api.resource.Resource; impo...
import javax.jcr.Session; import org.apache.felix.scr.annotations.Component;
<|file_name|>SingleThreadPortScan.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Author: S.H. Version: 0.1 Date: 2015-01-17 Description: Scan ip: 74.125.131.0/24 74.125.131.99-125 74.125.131.201 Only three format above. Read ip form a ip.txt, and scan all p...
fileOpen.close()
<|file_name|>Balance.hpp<|end_file_name|><|fim▁begin|>/* * Balance.hpp * * Created on: Apr 24, 2014 * Author: f3r0x */ #ifndef BALANCE_HPP_ #define BALANCE_HPP_ // BalanceSheet #include "SheetItem.hpp" namespace bs { class Balance { private: std::string name; SheetItem assets; SheetItem liabilities;...
}; } /* namespace bs */ #endif /* BALANCE_HPP_ */
<|file_name|>block.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/. */ //! CSS block layout. use layout::box::{RenderBox, RenderBoxUt...
MaybeAuto::from_style(style.Margin.margin_left, remaining_width), MaybeAuto::from_style(style.Margin.margin_right, remaining_width));
<|file_name|>matrix.py<|end_file_name|><|fim▁begin|>from typing import Sequence from numbers import Number from tabulate import tabulate class Matrix(Sequence): def __init__(self, matrix: Sequence[Sequence[float]]): assert (isinstance(matrix, Sequence) and isinstance(matrix, Sequence)), "W...
<|file_name|>rpcapi.py<|end_file_name|><|fim▁begin|># Copyright 2013, Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE...
default='scheduler', help='The topic scheduler nodes listen on'), ]
<|file_name|>config-form.js<|end_file_name|><|fim▁begin|>(function($) { var FourthWallConfiguration = function() { this.token = localStorage.getItem('token'); this.gitlab_host = localStorage.getItem('gitlab_host'); } FourthWallConfiguration.prototype.save = function() { localStorage.setItem('token', ...
FourthWallConfigurationForm.prototype.updateStatus = function(string) { this.statusField.text(string).show();
<|file_name|>res_users.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://open...
# read regular fields (other_fields); add 'groups_id' if necessary drop_groups_id = False if group_fields and fields: if 'groups_id' not in other_fields:
<|file_name|>Class_914.java<|end_file_name|><|fim▁begin|>package fr.javatronic.blog.massive.annotation1;<|fim▁hole|> import fr.javatronic.blog.processor.Annotation_001; @Annotation_001 public class Class_914 { }<|fim▁end|>
<|file_name|>SSHGEComputingElement.py<|end_file_name|><|fim▁begin|>######################################################################## # $HeadURL$ # File : SSHGEComputingElement.py # Author : A.T. V.H. ######################################################################## """ Grid Engine Computing Element wit...
<|file_name|>38.rs<|end_file_name|><|fim▁begin|>#[derive(Debug)] struct Structure(i32); #[derive(Debug)] struct Deep(Structure);<|fim▁hole|> fn main() { println!("{:?} months in a year.", 12); println!("{1:?} {0:?} is the {actor:?} name.", "Slater", "Christian", actor="actor...
<|file_name|>header.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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.apache.org/lic...
if pp_exact.is_none() { pp_exact = parse_pp_exact(ln, testfile); }
<|file_name|>scanner.rs<|end_file_name|><|fim▁begin|>use std::fmt; use std::iter::{FusedIterator, IntoIterator}; use std::mem; use std::sync::Arc; use std::time::{Duration, Instant}; use bytes::{Bytes, BytesMut}; use futures::{Async, Future, Poll, Stream}; use krpc::Proxy; use vec_map::{self, VecMap}; use backoff::Ba...
self.state = ScannerState::Lookup(lookup); }
<|file_name|>pages.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, faculties, institut...
while not last: try: elt = self.find_element(By.ID, 'spn_student_name_%d' % row) names.append(elt.text)
<|file_name|>jsonmaking.py<|end_file_name|><|fim▁begin|>import json, random, time, sys """ Creating a random JSON object based on lists of info and random numbers to assign the index """ ##Directory input_file = "test.json" ###Success message takes the file_name and operation type (ie. written, closed) def process_me...
##Lists of info
<|file_name|>blake2s_test.go<|end_file_name|><|fim▁begin|>// Copyright 2016 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 blake2s import ( "bytes" "encoding" "encoding/hex" "fmt" "testing" ) func TestHashes(t ...
"a4fe2bd0f96a215fa7164ae1a405f4030a586c12b0c29806a099d7d7fdd8dd72", "7dce710a20f42ab687ec6ea83b53faaa418229ce0d5a2ff2a5e66defb0b65c03c9", "0320c40b5eea641d0bc25420b7545ac1d796b61563728a4dc451207f1addeedcf860", "460539415f2baeb626fad748dee0eb3e9f27221661160e13edf39d1b5d476ee0672400",
<|file_name|>NewPollScreen.js<|end_file_name|><|fim▁begin|>import React from 'react'; import { View, ScrollView } from 'react-native'; import ConcensusButton from '../components/ConcensusButton'; import axios from 'axios'; const t = require('tcomb-form-native'); const Form = t.form.Form; const NewPollScreen = ({ navig...
<|file_name|>test_driver.py<|end_file_name|><|fim▁begin|># Copyright 2010 OpenStack Foundation # Copyright 2012 University Of Minho # # 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...
device_path='/dev/disk/by-path/' 'ip-1.2.3.4:3260-iqn.'
<|file_name|>derivations.cc<|end_file_name|><|fim▁begin|>#include "derivations.hh" #include "store-api.hh" #include "globals.hh" #include "util.hh" #include "worker-protocol.hh" #include "fs-accessor.hh" #include "istringstream_nocopy.hh" namespace nix {<|fim▁hole|> recursive = false; string algo = hashAlgo; ...
void DerivationOutput::parseHashInfo(bool & recursive, Hash & hash) const {
<|file_name|>filenotfound.rs<|end_file_name|><|fim▁begin|>use std::fs::File; fn main() { let f = File::open("main.jpg"); // main.jpg doesn't exist<|fim▁hole|> Err(e)=> { println!("file not found \n{:?}",e); //handled error } } println!("end of main"); }<|fim▁end|>
match f { Ok(f)=> { println!("file found {:?}",f); },
<|file_name|>resources.go<|end_file_name|><|fim▁begin|>package main import ( "net/http" "github.com/gorilla/mux" "github.com/lxc/lxd/lxd/resources" "github.com/lxc/lxd/lxd/response" storagePools "github.com/lxc/lxd/lxd/storage" "github.com/lxc/lxd/shared/api" ) var api10ResourcesCmd = APIEndpoint{ Path: "res...
<|file_name|>ethcore.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Ethcore (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of t...
let io1 = deps.with_signer(SignerService::new_test(Some(18180))); let io2 = deps.default_client();
<|file_name|>metadata.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-go. DO NOT EDIT. // source: hapi/chart/metadata.proto package chart import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var ...
Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
<|file_name|>admin.py<|end_file_name|><|fim▁begin|># encoding: utf-8 from django.contrib import admin<|fim▁hole|><|fim▁end|>
# Register your models here.
<|file_name|>transport.py<|end_file_name|><|fim▁begin|>""" Read/Write AMQP frames over network transports. 2009-01-14 Barry Pederson <bp@barryp.org> """ # Copyright (C) 2009 Barry Pederson <bp@barryp.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser G...
Given a few parameters from the Connection constructor,
<|file_name|>inventory_work_unit.py<|end_file_name|><|fim▁begin|># ============================================================================= # Copyright (c) 2016, Cisco Systems, Inc # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided t...
# Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
<|file_name|>Annotation.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../src/CaseModel.ts" /> /// <reference path="../../src/CaseViewer.ts" /> /// <reference path="../../src/PlugInManager.ts" /> class AnnotationPlugIn extends AssureIt.PlugInSet { constructor(public plugInManager: AssureIt.PlugInManager) { ...
} }
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyKiwisolver(PythonPackage): """A fas...
version('1.3.1', sha256='950a199911a8d94683a6b10321f9345d5a3a8433ec58b217ace979e18f16e248') version('1.3.0', sha256='14f81644e1f3bf01fbc8b9c990a7889e9bb4400c4d0ff9155aa0bdd19cce24a9') version('1.2.0', sha256='247800260cd38160c362d211dcaf4ed0f7816afb5efe56544748b21d6ad6d17f') version('1.1.0', sha256='53e...
<|file_name|>MicroSortRuntimeFactory.java<|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 ...
this.keyNormalizerFactories = keyNormalizerFactories;
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licens...
#[stable(feature = "rust1", since = "1.0.0")] #[inline] pub fn count_ones(self) -> u32 { (self as $UnsignedT).count_ones() }
<|file_name|>L2EngineVarRef2.java<|end_file_name|><|fim▁begin|>/* * The MIT License * * Copyright 2014 Kamnev Georgiy (nt.gocha@gmail.com). * * Данная лицензия разрешает, безвозмездно, лицам, получившим копию данного программного * обеспечения и сопутствующей документации (в дальнейшем именуемыми "Программное О...
// + " }\n" // + " };\n" // + "v = \"def\";\n"
<|file_name|>test_column.py<|end_file_name|><|fim▁begin|>import numpy as np import pandas as pd import pytest ROWID_ZERO_INDEXED_BACKENDS = ('omniscidb',) @pytest.mark.parametrize( 'column', [ 'string_col', 'double_col', 'date_string_col', pytest.param('timestamp_col', marks=p...
def test_rowid(con, backend):
<|file_name|>mappers.py<|end_file_name|><|fim▁begin|># This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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...
class WPRoomMapperList(WPRoomMapperBase): def __init__(self, rh, params): WPRoomMapperBase.__init__(self, rh)
<|file_name|>user.controller.js<|end_file_name|><|fim▁begin|>import User from '../models/user.model'; import Post from '../models/post.model'; import UserPost from '../models/users_posts.model'; import fs from 'fs'; import path from 'path'; /** * Load user and append to req. */ function load(req, res, next, id) { Us...
"lastname": new RegExp(params.query, 'i') }] }; }
<|file_name|>group.list.resolver.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; import { GroupService } from '../services/GroupService'; import { Observable } from 'rxjs/Rx'; <|fim▁hole|> constructor...
@Injectable() export class GroupListResolver implements Resolve<any> {
<|file_name|>continue_run.hpp<|end_file_name|><|fim▁begin|>/* * continue_run.hpp * * Created on: Aug 14, 2014 * Author: joost */ #ifndef CONTINUE_RUN_HPP_ #define CONTINUE_RUN_HPP_ #include <boost/fusion/container.hpp> #include <boost/fusion/include/vector.hpp> #include <sferes/dbg/dbg.hpp> #include "glo...
* sferes::ea::Nsga2 need this method. */
<|file_name|>pipelines.py<|end_file_name|><|fim▁begin|># Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting<|fim▁hole|> def process_item(self, item, spider): return item<|fim▁end|>
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html class Mycar168Pipeline(object):
<|file_name|>slack.go<|end_file_name|><|fim▁begin|>package services import ( "github.com/nlopes/slack" "fmt" ) type slackService struct { token string channel string channelId string serviceName string api *slack.Client rtm *slack.RTM userCache map[string]*slack.User sent map[string]bool } func N...
return slackService{token, channel, channelId, "slack", api, rtm, cache, make(map[string]bool)} }
<|file_name|>challengeboard.py<|end_file_name|><|fim▁begin|>from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.permissions import IsAuthenticated from edctf.api.models import challengeboard, category, challenge from edctf.api.serializers import challengeboard_seria...
for cat in categories: challenges += challenge.objects.filter(category=cat)
<|file_name|>test_parsers.py<|end_file_name|><|fim▁begin|>import json from unittest.mock import patch from federation.hostmeta.parsers import ( parse_nodeinfo_document, parse_nodeinfo2_document, parse_statisticsjson_document, int_or_none, parse_mastodon_document, parse_matrix_document) from federation.tests.fi...
class TestParseStatisticsJSONDocument:
<|file_name|>extract_references.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os, sys, codecs, re def usage(): print "Usage info for extract_references.py" print " extract_references.py ref_sgml ref_prefix" print sys.exit() def main(): if (len(sys.argv) < 3 or sys.argv[1] == "-h"): u...
doc_pattern = re.compile('.* docid="([^"]*).*"') seg_pattern = re.compile('.* id="([^"]*)".*')
<|file_name|>test_plotter.py<|end_file_name|><|fim▁begin|># Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import json import os import unittest from monty.json import MontyDecoder from pymatgen.apps.battery.conversion_battery import ConversionElectrode from pymatgen.apps...
<|file_name|>mxHandle.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2006-2015, JGraph Ltd * Copyright (c) 2006-2015, Gaudenz Alder */ /** * Class: mxHandle * * Implements a single custom handle for vertices. * * Constructor: mxHandle * * Constructs a new handle for the given state. * * Parameters:...
* * Called after <setPosition> has been called in <processEvent>. This repaints * the state using <mxCellRenderer>.
<|file_name|>mount_da_DK.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="da_DK"> <context> <name>DeviceActionInfo</name> <message> <location filename="../actions/deviceaction_info.cpp" line="45"/> <source>The device &lt;b&gt;&lt;no...
<source>Behaviour</source> <translation>Adfærd</translation> </message>
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>""" Django settings for huts project. Generated by 'django-admin startproject' using Django 1.10.5. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.dja...
import os import dj_database_url
<|file_name|>gtk.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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 Foun...
<|file_name|>term.rs<|end_file_name|><|fim▁begin|>/* * Copyright 2016-2019 Ben Ashford * * 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....
where
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for my_doku_application project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJ...
from django.core.wsgi import get_wsgi_application
<|file_name|>uutils.rs<|end_file_name|><|fim▁begin|>#![crate_name = "uutils"] #![feature(exit_status, rustc_private)] /* * This file is part of the uutils coreutils package. * * (c) Michael Gehring <mg@ebfe.org> * * For the full copyright and license information, please view the LICENSE * file that was distribut...
// "uutils-suffix" or "busybox-suffix". Not sure // what busybox uses the -suffix pattern for. } else { println!("{}: applet not found", binary_as_util);
<|file_name|>controllers.py<|end_file_name|><|fim▁begin|># This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from datetime import timedelta from flask import...
class RHCreateNews(RHManageNewsBase): def _process(self): form = NewsForm()
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Structured communication between timely dataflow operators. pub use self::message::Message; pub use self::message::Content; /// A collection of types that may be pushed at. pub mod pushers; /// A collection of types that may be pulled from. pub mod pullers; /// Typ...
pub mod pact;
<|file_name|>membro.py<|end_file_name|><|fim▁begin|>class Membro(object): nome = None<|fim▁hole|> self.nome = nome self.cargo = cargo<|fim▁end|>
cargo = None def __init__(self, nome, cargo):
<|file_name|>DeactivatePipelineResultJsonUnmarshaller.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. 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. A copy of ...
public static DeactivatePipelineResultJsonUnmarshaller getInstance() { if (instance == null) instance = new DeactivatePipelineResultJsonUnmarshaller();
<|file_name|>SemaExprCXX.cpp<|end_file_name|><|fim▁begin|>//===--- SemaExprCXX.cpp - Semantic Analysis for Expressions --------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //...
// do not have the same type, and either has (cv) class type, ... if (!Same && (LTy->isRecordType() || RTy->isRecordType())) { // ... overload resolution is used to determine the conversions (if any)
<|file_name|>bundesliga_de.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from resources.lib.parser import cParser from resources.lib.handler.requestHandler import cRequestHandler from resources.lib.gui.guiElement import cGuiElement from resources.lib.gui.gui import cGui from resources.lib.util import cUtil f...
oGuiElement = cGuiElement() oGuiElement.setSiteName(SITE_IDENTIFIER)
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.contrib.auth import models as auth import datetime from application import settings from django.db.models.signals import post_save from django.dispatch import receiver typeChoices = ( ('task', 'Task'), ('userStory', 'Use...
creator = models.ForeignKey( settings.AUTH_USER_MODEL, related_name='createdTasks',
<|file_name|>boss_unsok.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2012-2013 JadeCore <http://www.pandashan.com/> * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can re...
struct boss_unsokAI : public BossAI { boss_unsokAI(Creature* creature) : BossAI(creature, DATA_UNSOK)
<|file_name|>configuration.ts<|end_file_name|><|fim▁begin|>import Adapter from '../../../../src/core/adapters/configuration'; import SearchAdapter from '../../../../src/core/adapters/search'; import { DEFAULT_AREA } from '../../../../src/core/reducers/data/area'; import { DEFAULT_COLLECTION } from '../../../../src/core...
}); describe('extractAutocompleteLanguage()', () => { it('should return autocomplete language', () => {
<|file_name|>example_svc_dsls.go<|end_file_name|><|fim▁begin|>package testdata import ( . "goa.design/goa/v3/dsl"<|fim▁hole|> Title("conflict with API name and service names") }) var _ = Service("aloha", func() {}) // same as API name var _ = Service("alohaapi", func() {}) // API name + 'api' suffix var _ =...
) var ConflictWithAPINameAndServiceNameDSL = func() { var _ = API("aloha", func() {
<|file_name|>FESpace_imp.hpp<|end_file_name|><|fim▁begin|>/** * @file FESpace_imp.hpp * @brief Implementation of the functional space class methods * @author Carlo Marcati * @date 2013-09-08 */ /* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public...
<|file_name|>ZipError.js<|end_file_name|><|fim▁begin|>/* Copyright 2012-2013, Polyvi Inc. (http://www.xface3.com) This program is distributed under the terms of the GNU General Public License. This file is part of xFace. xFace is free software: you can redistribute it and/or modify it under the terms of the GNU ...
};
<|file_name|>preferences.js<|end_file_name|><|fim▁begin|>import { t } from '../../core/localizer'; import { uiPane } from '../pane'; import { uiSectionPrivacy } from '../sections/privacy'; export function uiPanePreferences(context) { let preferencesPane = uiPane('preferences', context) .key(t('preferences.key')...
]);
<|file_name|>amo.js<|end_file_name|><|fim▁begin|>module.exports = { domain:"messages", locale_data:{ messages:{ "":{ domain:"messages", plural_forms:"nplurals=2; plural=(n != 1);", lang:"el" }, "%(addonName)s %(startSpan)sby %(authorList)s%(endSpan)s":[ "%(addonName)s %(startSpan)s από %(authorL...
typeof exports === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? factory(require('../moment')) : typeof define === 'function' && define.amd ? define(['../moment'], factory) :
<|file_name|>block.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/. */ //! Layout for CSS block-level elements. //! //! As a terminolo...
/// absolute flow). fn set_inline_size_constraint_solutions(&self, block: &mut BlockFlow,
<|file_name|>khr_technique_webgl.py<|end_file_name|><|fim▁begin|>import base64 import os import re import bpy import gpu LAMP_TYPES = [ gpu.GPU_DYNAMIC_LAMP_DYNVEC, gpu.GPU_DYNAMIC_LAMP_DYNCO, gpu.GPU_DYNAMIC_LAMP_DYNIMAT, gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT, gpu.GPU_DYNAMIC_LAMP_DYNENERGY, gpu.GP...
gpu.GPU_DATA_4F: list, }
<|file_name|>autoderef-and-borrow-method-receiver.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 // ...
struct Foo { x: isize,
<|file_name|>valkyrie.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2.7 # Uploads Scrypt mining farm status to CouchDB database for detailed logging. # Written by Vishakh. # https://github.com/vishakh/valkyrie # Based on open source code by etkeh <https://github.com/setkeh> import datetime import json import l...
response = makerpccall([command], host, port) summary = response['SUMMARY'][0]
<|file_name|>BSDismemberSkinInstance.cpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2006, NIF File Format Library and Tools All rights reserved. Please see niflib.h for license. */ //-----------------------------------NOTICE----------------------------------// // Some of this file is automatically filled in by a P...
out << " Body Part: " << partitions[i1].bodyPart << endl; };
<|file_name|>phenomic.js<|end_file_name|><|fim▁begin|>export type PhenomicDB = { destroy: () => Promise<*>, put: (sub: string | Array<string>, key: string, value: any) => Promise<*>,<|fim▁hole|> sub: string | Array<string>, config: LevelStreamConfig, filter?: string, filterValue: string ) => Promis...
get: (sub: string | Array<string>, key: string) => Promise<*>, getPartial: (sub: string | Array<string>, key: string) => Promise<*>, getList: (
<|file_name|>ItemRTMHarvester.java<|end_file_name|><|fim▁begin|>package com.orcinuss.reinforcedtools.item.tools; import com.google.common.collect.Sets; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.Ite...
public ItemRTMHarvester(Item.ToolMaterial material, EnumRarity rarity ){ super(0.0F, material, blocksToBreak);
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ flask.ext.hippocket.tasks ~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2013 by Sean Vieira. :license: MIT, see LICENSE for more details. """ from flask import Blueprint, Markup, request, render_template from itertools import c...
<|file_name|>paths.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated b...
# Construct URL url = '/paths/string/unicode/{stringPath}' path_format_arguments = { 'stringPath': self._serialize.url("string_path", string_path, 'str')