prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>list.py<|end_file_name|><|fim▁begin|>from recon.core.module import BaseModule import codecs import os class Module(BaseModule): meta = { 'name': 'List Creator', 'author': 'Tim Tomes (@LaNMaSteR53)', 'description': 'Creates a file containing a list of records from the database....
('column', 'ip_address', True, 'source column of data for the list'),
<|file_name|>generics.go<|end_file_name|><|fim▁begin|>// Copyright 2015, Cyrill @ Schumacher.fm and the CoreStore contributors // // 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...
)
<|file_name|>registryaccess.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding vali...
accessRights |= KEY_WOW64_32KEY;
<|file_name|>httpcache.py<|end_file_name|><|fim▁begin|>from email.utils import formatdate from typing import Optional, Type, TypeVar from twisted.internet import defer from twisted.internet.error import ( ConnectError, ConnectionDone, ConnectionLost, ConnectionRefusedError, DNSLookupError, TCPT...
<|file_name|>test_pitchtools_PitchArrayCell_pitches.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- from abjad import * def test_pitchtools_PitchArrayCell_pitches_01(): array = pitchtools.PitchArray([[1, 2, 1], [2, 1, 1]]) array[0].cells[0].pitches.append(NamedPitch(0)) array[0].cells[1].pitche...
assert array[1].cells[1].pitches == [] assert array[1].cells[2].pitches == []
<|file_name|>csv.rs<|end_file_name|><|fim▁begin|>extern crate nalgebra; use nalgebra::*; use om::koe::*; use om::cb::*; use tick::*; use push::*; use std::rc::*; /// #Cartesian State Vectors /// This structure represents an orbit using a /// radius vector and a velocity vector. /// It holds a reference to the central ...
} } }
<|file_name|>proxy.cpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file This file is part of libzmq, the ZeroMQ core engine in C++. libzmq is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public Licens...
rc = ctrl.copy (msg_); if (unlikely (rc < 0)) return -1;
<|file_name|>decision.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals from collections import namedtuple from botocore.vendored.requests.exceptions import ReadTimeout from py_swf.errors import NoTaskFound __all__ = ['DecisionCli...
:return: A generator that returns successive elements in the workflow execution history. :rtype: collections.Iterable
<|file_name|>jdb_dbinfo.cpp<|end_file_name|><|fim▁begin|>INTERFACE: #include "initcalls.h" #include "types.h" class Jdb_symbol_info; class Jdb_lines_info; class Jdb_dbinfo { }; //--------------------------------------------------------------------------- IMPLEMENTATION: #include "config.h" // We have to do this ...
STATIC_INITIALIZE(Jdb_dbinfo);
<|file_name|>climsig.py<|end_file_name|><|fim▁begin|>r""" Modeling and inversion of temperature residuals measured in wells due to temperature perturbations in the surface. Perturbations can be of two kinds: **abrupt** or **linear**. Forward modeling of these types of changes is done with functions: * :func:`~fatian...
The residual temperatures measured along the well
<|file_name|>model.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
Parkings = new Meteor.Collection("parkings");
<|file_name|>dict.oxford.ts<|end_file_name|><|fim▁begin|>import { NetDict } from "./dict/net-dict" const { debug } = require("b-logger")("copilot.dict.oxford") export interface ISenses { definitions: string[], examples?: [{ text: string }], subsenses?: ISenses[], } export interface IOxfordParam { results: [{ ...
"examples": [ { "text": "she was getting polite nods and hellos from people"
<|file_name|>default_auth.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import import logging logger = logging.getLogger('magiccontent.default_auth') def naive_can_edit(request): logger.warning(<|fim▁hole|> 'GALLERY_PAGE_...
('naive_can_edit method has been used, please provide a '
<|file_name|>KeyStore.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Pub...
/**
<|file_name|>scripts.rs<|end_file_name|><|fim▁begin|>//! This integration test runs the test scripts found in //! the scripts/ directory //! See image-worker/README.md for a full description of //! the test script syntax and details about this test //! runner. extern crate image; use std::fs::{File, read_dir, remove_...
if last_response.is_some() { if let Err(error) = check_success(last_response.as_ref()) { return Err(format!("{}#EOF: {}", filename, error));
<|file_name|>cfg.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> println!("You are running linux!") } // 而这个函数仅当操作系统**不是** Linux 时才会编译 #[cfg(not(target_os = "linux"))] fn are_you_on_linux() { println!("You are *not* running linux!") } fn main() { are_you_on_linux(); println!("Are you sure?"); if ...
// 这个函数仅当操作系统是 Linux 的时候才会编译 #[cfg(target_os = "linux")] fn are_you_on_linux() {
<|file_name|>_jax_backend.py<|end_file_name|><|fim▁begin|>import numbers import warnings from functools import wraps, partial from typing import List, Callable import logging import numpy as np import jax import jax.numpy as jnp import jax.scipy as scipy from jax.core import Tracer from jax.interpreters.xla import Dev...
def expand_dims(self, a, axis=0, number=1):
<|file_name|>iss118-spec.js<|end_file_name|><|fim▁begin|>/** @babel */ /* eslint-env jasmine, atomtest */ /* This file contains verifying specs for: https://github.com/sindresorhus/atom-editorconfig/issues/118 */ import fs from 'fs'; import path from 'path'; const testPrefix = path.basename(__filename).split('-'...
expect(textEditor.getText().length).toEqual(textWithoutTrailingWhitespaces.length);
<|file_name|>StreamParser.hh<|end_file_name|><|fim▁begin|>/********** 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 the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. (...
virtual ~StreamParser(); void saveParserState();
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># coding=utf-8 """ Widgets Module """ <|fim▁hole|><|fim▁end|>
__author__ = 'Matt Eland'
<|file_name|>categories.client.service.js<|end_file_name|><|fim▁begin|>//Categories service used to communicate Categories REST endpoints (function () { 'use strict'; angular .module('categories') .factory('CategoriesService', CategoriesService); CategoriesService.$inject = ['$resource']; <|fim▁hole|> ...
function CategoriesService($resource) {
<|file_name|>macros.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses...
}
<|file_name|>DefaultApiTest.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright 2017 Xoriant Corporation. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. ...
// TODO: test validations
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Parallel testing, supporting arbitrary collection ordering The Workflow ------------ - Master py.test process starts up, inspects config to decide how many slave to start, if at all - env['parallel_base_urls'] is inspected first - py.test config.option.app...
parametrized_id = item.split('[')[1].rsplit(']')[0] except IndexError: # splits failed, item has no parametrized id parametrized_id = None
<|file_name|>TestObject.java<|end_file_name|><|fim▁begin|>package com.couchbase.lite.testapp.ektorp.tests; import org.ektorp.support.OpenCouchDbDocument; import java.util.List; import java.util.Set; @SuppressWarnings("serial") public class TestObject extends OpenCouchDbDocument { private Integer foo; privat...
return false; }
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from .fixtures import * # noqa, pylint: disable=wildcard-import
<|file_name|>term_x.go<|end_file_name|><|fim▁begin|>// +build linux darwin freebsd netbsd openbsd solaris package clif <|fim▁hole|>import ( "os" "runtime" "syscall" "unsafe" ) func init() { TermWidthCall = func() (int, error) { w := new(termWindow) tio := syscall.TIOCGWINSZ if runtime.GOOS == "darwin" { ...
<|file_name|>fancy-select.component.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core'; @Component({ selector: 'cs-fancy-select', templateUrl: 'fancy-select.component.html', styleUrls: ['fancy-select.component.scss'],<|fim▁hole|><|fim▁end|>
}) export class FancySelectComponent {}
<|file_name|>EtcdJsonBundle.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2015 meltmedia (christian.trimble@meltmedia.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ...
}
<|file_name|>42child.rs<|end_file_name|><|fim▁begin|>use std::process::Command;<|fim▁hole|>// shell static FILE_CMD :& 'static str = "file"; fn main() { let output = Command::new(FILE_CMD) .arg("--version1") .output().unwrap_or_else( |e| panic!("failed to run cmd: {} with ...
<|file_name|>issue-90113.rs<|end_file_name|><|fim▁begin|>mod list { pub use self::List::Cons; pub enum List<T> { Cons(T, Box<List<T>>), } } mod alias { use crate::list::List; pub type Foo = List<String>; } fn foo(l: crate::alias::Foo) { match l { Cons(..) => {} //~ ERROR: can...
} }
<|file_name|>demo2.py<|end_file_name|><|fim▁begin|># Import time (for delay) library (for SmartHome api) and GPIO (for raspberry pi gpio) from library import SmartHomeApi import RPi.GPIO as GPIO import time from datetime import datetime # 7 -> LED # Create the client with pre-existing credentials api = SmartHomeApi(...
print(bedtime)
<|file_name|>async_client.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # 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/lic...
<|file_name|>pygoogle.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python """ Google AJAX Search Module http://code.google.com/apis/ajaxsearch/documentation/reference.html Needs Python 2.6 or later """ try: import json except ImportError as e: import simplejson as json except ImportError as e: print(e) ex...
<|file_name|>h2spec.go<|end_file_name|><|fim▁begin|>package main import ( "crypto/tls" "flag" "fmt" "github.com/summerwind/h2spec" "os" ) func main() {<|fim▁hole|> host := flag.String("h", "127.0.0.1", "Target host") useTls := flag.Bool("t", false, "Connect over TLS") insecureSkipVerify := flag.Bool("k", false...
port := flag.Int("p", 80, "Target port")
<|file_name|>root_variables.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ use fnv::{FnvHashMap, FnvHashSet}; use graphql_ir::{ FragmentDefini...
fn visit_fragment_spread(&mut self, spread: &FragmentSpread) { self.visit_directives(&spread.directives);
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from models import Connection from django import forms class ConnectionForm(forms.ModelForm): class Meta:<|fim▁hole|> model = Connection exclude = ('d_object_id',)<|fim▁end|>
<|file_name|>table_split_test.go<|end_file_name|><|fim▁begin|>// Copyright 2017 PingCAP, 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/LICE...
GetRegionCache() *tikv.RegionCache }
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate bytes; extern crate futures; extern crate tokio_core; extern crate tokio_io; extern crate tokio_proto; extern crate tokio_service; use futures::{future, Future}; use tokio_io::{AsyncRead, AsyncWrite}; use tokio_io::codec::{Decoder, Encoder, Framed}; use toki...
let ret = TcpClient::new(CollatzProto).connect(addr, handle) .map(|service| Client { inner: service, });
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod pic; pub mod pit; pub mod port_io; use driver::vga; use core::fmt::Write; use driver::vga::Writer; pub fn pic_init() { unsafe { //start the initialisation of the PICs port_io::outb(pic::PIC_MASTER_COMMAND, pic::ICW1_INIT | pic::ICW1_ICW4); ...
//mask all interrupts, since none are currently initialised port_io::outb(pic::PIC_MASTER_DATA, 0xFF); port_io::outb(pic::PIC_SLAVE_DATA, 0xFF);
<|file_name|>sale.py<|end_file_name|><|fim▁begin|>from api_request import Api from util import Util from twocheckout import Twocheckout class Sale(Twocheckout): def __init__(self, dict_): super(self.__class__, self).__init__(dict_) @classmethod def find(cls, params=None): if params is Non...
<|file_name|>opentsdb.go<|end_file_name|><|fim▁begin|>package ingest import ( "compress/gzip" "encoding/json" "io" "io/ioutil" schema "github.com/grafana/metrictank/schema" "github.com/raintank/tsdb-gw/api/models" "github.com/raintank/tsdb-gw/publish" log "github.com/sirupsen/logrus" ) func OpenTSDBWrite(ctx...
}
<|file_name|>buf_writer.rs<|end_file_name|><|fim▁begin|>use futures_core::task::{Context, Poll}; use futures_io::{AsyncSeek, AsyncWrite, IoSlice, SeekFrom}; use pin_utils::{unsafe_pinned, unsafe_unpinned}; use std::fmt; use std::io::{self, Write}; use std::pin::Pin; use super::DEFAULT_BUF_SIZE; /// Wraps a writer and ...
} else { Poll::Ready(self.buf().write(buf))
<|file_name|>externalities.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 ...
} struct TestSetup { state: GuardedTempResult<State>,
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import React, { PropTypes } from 'react' import { Grid, Row, Col } from 'react-bootstrap' import Sort from '../../components/Sort' import ProjectFilterForm from '../../components/ProjectFilterForm' import Search from '../../containers/Search' import ProjectsDashboardSt...
export default ProjectsDashboard
<|file_name|>gecko.mako.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/. */ // `data` comes from components/style/properties.mako.rs; ...
debug_assert!(!raw_initial_values().is_null());
<|file_name|>settings.rs<|end_file_name|><|fim▁begin|>// src/settings.rs // Copyright (C) 2017 authors and contributors (see AUTHORS file) // // This file is released under the MIT License. // =========================================================================== // Imports // ====================================...
<|file_name|>collapseDuplicateDeclarations.js<|end_file_name|><|fim▁begin|>export default function collapseDuplicateDeclarations() { return (root) => { root.walkRules((node) => { let seen = new Map() let droppable = new Set([]) node.walkDecls((decl) => { // This could happen if we have ...
<|file_name|>mod_resolver.rs<|end_file_name|><|fim▁begin|>use std::io; use std::path::PathBuf; use super::read_config; use crate::{FileName, Input, Session}; fn verify_mod_resolution(input_file_name: &str, exp_misformatted_files: &[&str]) { let input_file = PathBuf::from(input_file_name); let config = read_c...
<|file_name|>economy.py<|end_file_name|><|fim▁begin|>from canvas.exceptions import ServiceError, ValidationError from canvas.economy import InvalidPurchase from drawquest import knobs from drawquest.apps.palettes.models import get_palette_by_name, all_palettes from drawquest.signals import balance_changed def balance(...
<|file_name|>consistencygroups.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012 - 2014 EMC Corporation. # 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 # #...
class CreateDeserializer(wsgi.MetadataXMLDeserializer): def default(self, string):
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Util classes ------------ Classes which represent data types useful for the package pySpatialTools. <|fim▁hole|> ## Spatial elements collectors from spatialelements import SpatialElementsCollection, Locations ## Membership relations from Membership import Membe...
"""
<|file_name|>tailhook-config.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from libqtile.manager import Key, Click, Drag, Screen, Group from libqtile.command import lazy from libqtile import layout, bar, widget, hook from libqtile import xcbq xcbq.keysyms["XF86AudioRaiseVolume"] = 0x1008ff13 xcbq.keysyms["XF...
('documentation', 'Docs'), ('-ietf-', 'Docs'), ('GNOME Live!', 'Docs'),
<|file_name|>animationToggle.js<|end_file_name|><|fim▁begin|>/* * Copyright 2020 Google LLC * * 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.org/licenses/LICE...
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.views.generic import TemplateView #from apiclient.discovery import build from googleapiclient.discovery import build from .utils import SearchResults from . import * class SearchView(TemplateView): template_name = "googlesearch/search_results.html" ...
<|file_name|>local_data_table.js<|end_file_name|><|fim▁begin|>import $ from "jquery"; import _ from "underscore"; import "bootstrap"; import "jquery-deparam"; import "./configure_datatables"; import View from "../view"; import Cache from "../cache"; import ColumnManager from "./column_manager"; import SelectionManag...
});
<|file_name|>filesystem.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|>""" from lib.core.exception import SqlmapUnsupportedFeatureException from plugins.generic.filesystem import Filesystem as GenericFilesystem class Filesystem(GenericFilesystem): def __init__(self): GenericFilesystem.__...
""" Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission
<|file_name|>0012_auto_20170620_1435.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-06-20 18:35 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hamask', '0011_auto_201...
operations = [ migrations.AddField(
<|file_name|>ssml-type.ts<|end_file_name|><|fim▁begin|>/** Copyright 2020 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/licens...
getSsml: (data: T) => string getOuterSsml: (data: T) => string getEditor: (data: T, soundLibrary: SoundLibrary) => {
<|file_name|>filters.js<|end_file_name|><|fim▁begin|>/* global createNS */ /* exported filtersFactory */ var filtersFactory = (function () { var ob = {}; ob.createFilter = createFilter; ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter; function createFilter(filId, skipCoordinates) { var fil ...
fil.setAttribute('x', '0%');
<|file_name|>do_with.py<|end_file_name|><|fim▁begin|><|fim▁hole|> @contextmanager def log(name): print('[%s] start...' % name) yield print('[%s] end.' % name) with log('DEBUG'): print('Hello, world!') print('Hello, Python!')<|fim▁end|>
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from contextlib import contextmanager
<|file_name|>oxygen.py<|end_file_name|><|fim▁begin|><|fim▁hole|> extra_keys = ['capacity', 'pipe_length', 'is_initial'] def __init__(self, *args, **kwargs): super(Oxygen, self).__init__(*args, **kwargs) self.capacity = kwargs.get('capacity', 3000) self.contained = self.capacity se...
import actor class Oxygen(actor.Actor):
<|file_name|>observable.rs<|end_file_name|><|fim▁begin|>// Rx -- Reactive programming for Rust // Copyright 2016 Ruud van Asseldonk // // 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 the License has been included in the ...
/// The returned value represents the subscription. Dropping the subscription /// will prevent further calls on the observer.
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var crypto = require('crypto') var multimatch = require('multimatch') var path = require('path') var KEY = 'metalsmith' module.exports = plugin function plugin(options) { return function (files, metalsmith, done) {<|fim▁hole|> Object.keys(files) ...
var metadata = metalsmith.metadata() metadata.fingerprint = (metadata.fingerprint || {})
<|file_name|>edu_dp_o.py<|end_file_name|><|fim▁begin|>import sys import ctypes <|fim▁hole|> if sys.platform.startswith('linux'): libc = ctypes.cdll.LoadLibrary('libc.so.6') return libc.__sched_cpucount(ctypes.sizeof(ctypes.c_long), (ctypes.c_long * 1)(N)) elif sys.platform == 'darwin': l...
def popcount(N):
<|file_name|>grpc_vtgate_client.py<|end_file_name|><|fim▁begin|># Copyright 2013 Google Inc. All Rights Reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. """A simple, direct connection to the vtgate proxy server, using gRPC. """ import logging import re fr...
<|file_name|>analysis.rs<|end_file_name|><|fim▁begin|>/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright (C) 2015-2022 Christian Krause * * ...
<|file_name|>statics-and-consts.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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.ap...
x + STATIC2 }; let _ = {
<|file_name|>0011_thread_updated.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations<|fim▁hole|> dependencies = [ ('fastapp', '0010_auto_20150910_2010'), ] operations = [ migrations.AddField( mo...
class Migration(migrations.Migration):
<|file_name|>settings.rs<|end_file_name|><|fim▁begin|>use crate::render::object::BodyColor; use std::fs::File; use std::path::PathBuf; #[derive(Deserialize)] pub struct Car { pub id: String, pub color: BodyColor, pub slots: Vec<String>, pub pos: Option<(i32, i32)>, } #[derive(Copy, Clone, Deserialize...
pub depth_range: (f32, f32), }
<|file_name|>git_gc.rs<|end_file_name|><|fim▁begin|>//! Tests for git garbage collection. use std::env; use std::ffi::OsStr; use std::path::PathBuf; use std::process::Command; use cargo_test_support::git; use cargo_test_support::paths; use cargo_test_support::project; use cargo_test_support::registry::Package; use u...
let mut cfg = index.config().unwrap(); cfg.set_str("user.email", "foo@bar.com").unwrap();
<|file_name|>lu.rs<|end_file_name|><|fim▁begin|>#![cfg_attr(rustfmt, rustfmt_skip)] use na::Matrix3; #[test] fn lu_simple() { let m = Matrix3::new( 2.0, -1.0, 0.0, -1.0, 2.0, -1.0, 0.0, -1.0, 2.0); let lu = m.lu(); assert_eq!(lu.determinant(), 4.0); let (p, l, u) = lu.unpac...
let id1 = &m * &m1; let id2 = &m1 * &m;
<|file_name|>RevokeDriver.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * # Copyright 2015 InfinitiesSoft Solutions Inc. * # * # Licensed under the Apache License, Version 2.0 (the "License"); you may * # not use this file except in compliance wit...
// lastFetch=null List<RevokeEvent> getEvents(Calendar lastFetch);
<|file_name|>default_test.go<|end_file_name|><|fim▁begin|>package test import ( "net/http" "net/http/httptest" "testing" "runtime" "path/filepath" _ "github.com/dvwallin/gopress/routers" "github.com/astaxie/beego" . "github.com/smartystreets/goconvey/convey" ) func init() { _, file, _, _ := runtime.Caller(1...
}) Convey("The Result Should Not Be Empty", func() {
<|file_name|>exceptions.cpp<|end_file_name|><|fim▁begin|>// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s typedef typeof(sizeof(0)) size_t; // This just shouldn't crash. namespace test0 { struct allocator { allocator(); allocator(const allocato...
// Make sure we generate the correct code for the delete[] call which
<|file_name|>Proxy.js<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------+ - Dateiname: app/proxy/Proxy.js - Beschreibung: JsonP Proxy - Autor(en): Andreas Gärtner <andreas.gaertner@hotmail.com> +------------------------------------------------------...
extend: 'Ext.data.Connection', xtype: 'proxy',
<|file_name|>ConfigParser.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import with_statement from time import sleep from os.path import exists, join from shutil import copy from traceback import print_exc from utils import chmod # ignore these plugin configs, mainly because plugins were wi...
def __init__(self, parser, section): """Constructor"""
<|file_name|>MllpComponent.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 to You unde...
if (-1 != colonIndex) { endpoint.setHostname(hostPort.substring(0, colonIndex));
<|file_name|>scoping_rules_lifetimes.rs<|end_file_name|><|fim▁begin|>// Lifetimes are annotated below with lines denoting the creation // and destruction of each variable. // `i` has the longest lifetime because its scope entirely encloses // both `borrow1` and `borrow2`. The duration of `borrow1` compared // to `borro...
let borrow2 = &i; // `borrow2` lifetime starts. ──┐│ // ││ println!("borrow2: {}", borrow2); // ││ } // `borrow2` ends. ─────────────────────────────────┘│
<|file_name|>test_UrbanRunoffLiter.py<|end_file_name|><|fim▁begin|>import numpy as np from .VariableUnitTest import VariableUnitTest from gwlfe.MultiUse_Fxns.Runoff import UrbRunoffLiter class TestUrbanRunoffLiter(VariableUnitTest): def test_UrbanRunoffLiter(self): z = self.z np.testing.assert_a...
UrbRunoffLiter.UrbRunoffLiter_f(z.NYrs, z.DaysMonth, z.InitSnow_0, z.Temp, z.Prec, z.NRur, z.NUrb, z.Area, z.CNI_0, z.AntMoist_0, z.Grow_0, z.CNP_0, z.Imper, z.ISRR, z.ISRA), UrbRunoffLiter.UrbRunoffLiter(z.NYrs, z.DaysMonth, z.InitSnow_0, z.Temp, z.Pr...
<|file_name|>mysql_impl.py<|end_file_name|><|fim▁begin|># Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
<|file_name|>mod.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/. */ //! An adapter providing access to IP cameras. Currently only the...
<|file_name|>DataMapStoreManager.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 to You...
manualSegmentRefresh.put(segmentId, false); return true; } else {
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models class Group(models.Model): BASE_URL = "https://www.facebook.com/groups/%s" def __unicode__(self): return self.name id = models.BigIntegerField(primary_key=True) name = models.CharField(max_length = 100) school = models.CharField...
def __unicode__(self):
<|file_name|>database.cc<|end_file_name|><|fim▁begin|>#include <map> #include <assert.h> #include <exception> #include "pf/base/string.h" #include "pf/file/database.h" namespace pf_file { Database::Database(uint32_t id) { __ENTER_FUNCTION id_ = id; string_buffer_ = NULL; index_column_ = -1; record_n...
} const Database::field_data *Database::get_fielddata(int32_t line,
<|file_name|>WdLayoutMode.java<|end_file_name|><|fim▁begin|>package com.charlesdream.office.word.enums; import com.charlesdream.office.BaseEnum; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; /** * Specifies how text is laid out in the layout mode for the current document. * <p> * * @a...
for (WdLayoutMode e : EnumSet.allOf(WdLayoutMode.class)) { lookup.put(e.value(), e);
<|file_name|>RedisOutputStream.java<|end_file_name|><|fim▁begin|>package redis.clients.jedis.util; import java.io.FilterOutputStream; import java.io.IOException; import java.io.OutputStream; /** * The class implements a buffered output stream without synchronization There are also special * operations like in-place...
<|file_name|>init.js<|end_file_name|><|fim▁begin|>angular.module('SpamExpertsApp') .run(['$rootScope', '$state', 'uiService', 'AuthService', 'API_EVENTS', function ($rootScope, $state, uiService, AuthService, API_EVENTS) { $rootScope.$on('$stateChangeStart', function (event, next) { ...
<|file_name|>rforest_on_patch_lean.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Sat Dec 6 17:01:05 2014 @author: remi @TODO : in the function train_RForest_with_kfold we should keep all result proba for each class, this could be very intersting. """ import numpy as np ; #efficient arra...
result = pd.DataFrame() ; feature_importances = [] ; learning_time = 0.0 ;
<|file_name|>LocationModel.java<|end_file_name|><|fim▁begin|>package com.sva.model; import java.math.BigDecimal; public class LocationModel { private String idType; private BigDecimal timestamp; private String dataType; private BigDecimal x; private BigDecimal y; private BigDecimal z; ...
public void setPath(String path) { this.path = path;
<|file_name|>liveness-use-after-move.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.ap...
fn main() { let x = ~5; let y = x; info!("{:?}", *x); //~ ERROR use of moved value: `x`
<|file_name|>threads.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 documentati...
** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com.
<|file_name|>scalar_unittest.py<|end_file_name|><|fim▁begin|># Copyright 2013 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. import os import unittest from telemetry import story from telemetry import page as page_module ...
self.assertEquals('important metric', vM.description) self.assertEquals(True, vM.important) self.assertEquals([1, 2], vM.values)
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 #from __future__ import print_function from setuptools import setup, Extension import sys import os import psutil # monkey-patch for parallel compilation def parallelCCompile(self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, ...
return extensionsList
<|file_name|>TruncatedLorentzian.cpp<|end_file_name|><|fim▁begin|>// // $Id: TruncatedLorentzian.cpp 2051 2010-06-15 18:39:13Z chambm $ // // // Original author: Darren Kessner <darren@proteowizard.org> // // Copyright 2006 Louis Warschaw Prostate Cancer Center // Cedars Sinai Medical Center, Los Angeles, California ...
<|file_name|>Canalave Gym Set.tsx<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="UTF-8"?> <tileset name="Canalave Gym Set" firstgid="1" tilewidth="16" tileheight="16"><|fim▁hole|><|fim▁end|>
<image source="Canalave Gym Set.png" trans="000000"/> </tileset>
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![allow(non_camel_case_types)] extern crate libc; use libc::{c_char, c_float, c_int, c_uint, c_void}; use libc::{size_t, uint64_t}; /// manually define unsigned int pub type mx_uint = c_uint; /// manually define float pub type mx_float = c_float; pub enum OpaqueNDAr...
/// get the shape of the array ///
<|file_name|>provider.go<|end_file_name|><|fim▁begin|>package test import ( "github.com/tidepool-org/platform/config" "github.com/tidepool-org/platform/log" "github.com/tidepool-org/platform/version" ) type Provider struct { VersionReporterInvocations int VersionReporterStub func() version.Reporter Versi...
}
<|file_name|>cookieeditor.js<|end_file_name|><|fim▁begin|>/** * @license * Copyright The Closure Library Authors. * SPDX-License-Identifier: Apache-2.0 */ /** * @fileoverview Displays and edits the value of a cookie. * Intended only for debugging. */ goog.provide('goog.ui.CookieEditor'); goog.require('goog.ass...
goog.net.Cookies.getInstance().remove(this.cookieKey_); } this.textAreaElem_.value = '';
<|file_name|>index.js<|end_file_name|><|fim▁begin|>module.exports = { getOne: require('./get-one'), getAllByUser: require('./get-all-by-user'),<|fim▁hole|> delete: require('./delete'), testProjects: require('./test-projects') };<|fim▁end|>
create: require('./create'), update: require('./update'),