prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>HowToConsumeDirectMessage.java<|end_file_name|><|fim▁begin|>/* * Copyright 2021 Solace 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 * ...
.createDirectMessageReceiverBuilder() .withSubscriptions(TopicSubscription.of("setSubscriptionExpressionHere")) .build().start();
<|file_name|>enkf_main.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012 Statoil ASA, Norway. # # The file 'ecl_kw.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by ...
""" @rtype: ErtWorkflowList """ return EnKFMain.cNamespace().get_workflow_list(self).setParent(self) def getPostSimulationHook(self):
<|file_name|>servers.go<|end_file_name|><|fim▁begin|>package analysisservices // Copyright (c) Microsoft and contributors. 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 Lice...
// List lists all the Analysis Services servers for the given subscription.
<|file_name|>FreeMarkerUtil.java<|end_file_name|><|fim▁begin|>package com.cnpc.framework.utils; import com.cnpc.framework.base.pojo.GenerateSetting; import freemarker.template.Configuration; import freemarker.template.DefaultObjectWrapper; import freemarker.template.Template; import freemarker.template.TemplateExcepti...
* @param setting
<|file_name|>cstool.rs<|end_file_name|><|fim▁begin|>//! Disassembles machine code use std::fmt::Display; use std::fs::File; use std::io; use std::io::prelude::*; use std::process::exit; use std::str::FromStr; use capstone::{self, prelude::*, Arch, Endian, EnumList, ExtraMode, Mode}; use clap::{App, Arg, ArgGroup}; us...
};
<|file_name|>schema2msgs-test.js<|end_file_name|><|fim▁begin|>var chai = require('chai'); var expect = chai.expect; //var should = chai.should(); var Schema2Msgs = require('./Schema2Msgs'); describe('schema2msgs', function () { it.only('should extract messages from a simple schema', function () { var schema...
{ "type": "required", "g10n": "validators.required.message" }
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright lowRISC contributors. // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 <|fim▁hole|>pub mod keys; pub mod misc_crypto; pub mod x509;<|fim▁end|>
//! Test data of all kinds, ranging from manifest, to keys, to certificates. pub mod der;
<|file_name|>generator.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from functools import partial from pkg_resources import Requirement, resource_filename import re from mako.template import Template from sqlalchemy import MetaData, select, create_engine, text from sqlalchemy.exc import Argum...
row_class_name=row_class_name)
<|file_name|>frontmatterparser.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python __author__ = "Dulip Withanage" __email__ = "dulip.withanage@gmail.com" import re import string import sys import operator import globals as gv import os import subprocess import shutil #from django.utils.encoding import smart_str ...
<|file_name|>monitor.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 from messaging.messaging_manager import MessagingManager, MessagingManagerType from common.monitoring import monitor_event_types as event_types from common.monitoring.monitor_message import MonitorMessage from inotify.adapters import Inotify from ...
(_, _, previous_watch_path, _) = previous_event if previous_watch_path == watch_path and is_second_pair_event(header):
<|file_name|>issue-23207-2.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Rust Project Developers. See the COPYRIGHT<|fim▁hole|>// file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.a...
<|file_name|>zap.rs<|end_file_name|><|fim▁begin|>use std::{fmt, mem, ptr, str, Seek}; use super::from_bytes::FromBytes; const MZAP_ENT_LEN: usize = 64; const MZAP_NAME_LEN: usize = MZAP_ENT_LEN - 8 - 4 - 2; #[repr(u64)] #[derive(Copy, Clone, Debug)] pub enum ZapObjectType { Micro = (1 << 63) + 3, Header = (1...
impl fmt::Debug for MZapWrapper { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<|file_name|>odnoklassniki.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The oauth2 Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file.<|fim▁hole|>package odnoklassniki import ( "github.com/coreos/mantle/Godeps/_workspace/src/golang...
// Package odnoklassniki provides constants for using OAuth2 to access Odnoklassniki.
<|file_name|>RigidBodyPlanningWithODESolverAndControls.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ###################################################################### # Software License Agreement (BSD License) # # Copyright (c) 2010, Rice University # All rights reserved. # # Redistribution and use in ...
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
<|file_name|>env.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use std::cell::{Ref, RefCell}; use std::rc::Rc; use types::{Expr, Symbol}; #[derive(Clone, Debug)] struct EnvImpl { symbols: HashMap<String, Expr>, parent: Option<Env>, } <|fim▁hole|>impl Env { pub fn new(symbols: HashMap<Stri...
#[derive(Clone, Debug)] pub struct Env(Rc<RefCell<EnvImpl>>);
<|file_name|>droplet_actions.go<|end_file_name|><|fim▁begin|>package godo import ( "fmt" "net/url" ) // DropletActionsService is an interface for interfacing with the droplet actions // endpoints of the Digital Ocean API // See: https://developers.digitalocean.com/#droplet-actions type DropletActionsService interfa...
request := &ActionRequest{Type: "power_on"} return s.doAction(id, request) }
<|file_name|>Cycle_Business_Hour_50_BH_24.py<|end_file_name|><|fim▁begin|>import tests.periodicities.period_test as per<|fim▁hole|> per.buildModel((24 , 'BH' , 50));<|fim▁end|>
<|file_name|>utf8_idents.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms.
<|file_name|>cmss.py<|end_file_name|><|fim▁begin|>import win32pipe import win32console import win32process import time import win32con import codecs import ctypes user32 = ctypes.windll.user32 CONQUE_WINDOWS_VK = { '3' : win32con.VK_CANCEL, '8' : win32con.VK_BACK, '9' : win32con.VK_TAB, ...
# f.write(con_stdout.ReadConsoleOutputCharacter(size.Right+1, coord(0, i))) # f.write("\n")
<|file_name|>socketTest.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys import optparse import socket def main(): p = optparse.OptionParser() p.add_option("--port", "-p", default=8888) p.add_option("--input", "-i", default="test.txt")<|fim▁hole|> fp = open(options.input, "r") ...
options, arguments = p.parse_args() sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.connect(("localhost", options.port))
<|file_name|>voronoi.py<|end_file_name|><|fim▁begin|># voronoi.py - functions for computing the Voronoi partition of a graph # # Copyright 2016-2018 NetworkX developers. # # This file is part of NetworkX. # # NetworkX is distributed under a BSD license; see LICENSE.txt for more # information. """Functions for computing...
weight : string or function
<|file_name|>char_jobs.cpp<|end_file_name|><|fim▁begin|>/* =========================================================================== Copyright (c) 2010-2014 Darkstar Dev Teams This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as pu...
<|file_name|>Supervisor.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2014 Spotify AB. * * 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/LICEN...
* Perform the command. Although this is declared to throw InterruptedException, this will only * happen when the supervisor is being shut down. During normal operations, the operation will * be allowed to run until it's done. * @param done Flag indicating if operation is done.
<|file_name|>package-info.java<|end_file_name|><|fim▁begin|>/** * Contains the service and the class filter required for this bundle. <|fim▁hole|><|fim▁end|>
*/ package org.awb.env.networkModel.classFilter;
<|file_name|>Node.js<|end_file_name|><|fim▁begin|>/** * Node class * @param {object} value<|fim▁hole|>class Node { constructor(value) { this._data = value; } value() { return this._data; } } export default Node;<|fim▁end|>
* @constructor */
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Adrian Sampson. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software...
'volume': VOLUME_MAX, }) self.config['password'].redact = True
<|file_name|>example.config.js<|end_file_name|><|fim▁begin|>module.exports = { user : 'Your Github Username', cal : 'Google calendar id to update'<|fim▁hole|><|fim▁end|>
};
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) setup( name='django-sizefield', version='0.10.ceda', author='Mathieu Leplatre', author_email='contact@mathieu-leplatre.info', ...
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|>var config = require('lib/config'); var path = require('path'); var url = require('url'); var resolve = path.resolve; var strip = require('strip'); var log = require('debug')('democracyos:facebook-card'); app.get('/topic/:id', function(req, res, next){ l...
var express = require('express'); var app = module.exports = express(); var api = require('lib/db-api');
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. //<|fim▁hole|>// option. This file may not be copied, modified, or distributed // except according to those ...
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
<|file_name|>datasource-metadata-shared.module.ts<|end_file_name|><|fim▁begin|>import {NgModule} from '@angular/core'; import {ConstantService} from './service/constant.service'; import {CommonModule} from '@common/common.module'; import {DatetimeValidPopupComponent} from './component/datetime-valid-popup.component'; i...
imports: [ CommonModule, DataStorageCommonModule ],
<|file_name|>_selinux.py<|end_file_name|><|fim▁begin|># Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Don't use the unicode-wrapped os and shutil modules here since # the whole _selinux module itself will be wrapped. import os import shutil import portage f...
ctx = _unicode_encode(ctx, encoding=_encodings['content'], errors='strict') if selinux.setexeccon(ctx) < 0: ctx = _unicode_decode(ctx, encoding=_encodings['content'],
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate bigtable as bt; #[macro_use] extern crate error_chain; extern crate libc; extern crate goauth; #[macro_use] extern crate serde_derive; extern crate serde_json; extern crate protobuf; extern crate rustc_serialize; mod fdw_error { error_chain! { f...
#[allow(unused_variables)]
<|file_name|>balancete.py<|end_file_name|><|fim▁begin|># !/usr/bin/env python3 # -*- encoding: utf-8 -*- """ ERP+ """ __author__ = 'António Anacleto' __credits__ = [] __version__ = "1.0" __maintainer__ = "António Anacleto" __status__ = "Development" __model_name__ = 'balancete.Balancete' import auth, base_models from o...
try:
<|file_name|>sliderepl.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ This file contains the sample code for XXX. Search for the string CONTENT to skip directly to it. Executing this file will begin an enhanced interactive Python session. You can step through each slide of sample code and explore the res...
try:
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import os import paramiko from django.utils import six from reviewboard.ssh.client import SSHClient from reviewboard.ssh.errors import (BadHostKeyError, SSHAuthenticationError, SSHError) fro...
if msg == 'No authentication methods available': raise SSHAuthenticationError
<|file_name|>edit_recipe_ingredients.js<|end_file_name|><|fim▁begin|>/* * Add a new ingredient form to the bottom of the formset */ function add_ingredient() { // Find the empty form var empty_form = $("#uses-formset .ingredient.empty-form"); // Clone it and remove the unneeded classes to get a new form var new...
} delete_checkbox.val("True"); return false;
<|file_name|>Result.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2007-2012 Hypertable, Inc.<|fim▁hole|> * * This file is part of Hypertable. * * Hypertable 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 Fo...
<|file_name|>test_utils.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) 2019 Radim Rehurek <me@radimrehurek.com> # # This code is distributed under the terms and conditions # from the MIT License (MIT). # import unittest import smart_open.utils<|fim▁hole|> class ClampTest(unittest.TestCase):...
<|file_name|>http_server_flex.cpp<|end_file_name|><|fim▁begin|>// // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // Official reposit...
{ ios.run();
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg from PyQt4.QtCore import QMimeData from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication from Orange.data.io import FileFormat class ImgFormat(FileFormat): @staticmethod def _get_buffer(size, filenam...
def _save_buffer(buffer, _): QApplication.clipboard().setPixmap(buffer) @staticmethod
<|file_name|>interaction-specs.service.spec.ts<|end_file_name|><|fim▁begin|>// Copyright 2020 The Oppia 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 // //...
describe('checking whether an interaction can be trained with ML', () => { it('should throw an error when interaction does not exist.', () => { expect(() => interactionSpecsService.isInteractionTrainable('Fake')) .toThrowError('Fake is not a valid interaction id');
<|file_name|>app_json.py<|end_file_name|><|fim▁begin|># json error messages for oauth, api parameters, getting, updating, uploading, and deleting images oauth_error_json = {'status': 'error', 'msg': "could not verify oauth credentials"} upload_image_blob_error_json = {'status': 'error', 'msg': "failure to upload image ...
<|file_name|>FeatureTypeFilter.java<|end_file_name|><|fim▁begin|>/* * 3D City Database - The Open Source CityGML Database * https://www.3dcitydb.org/ * * Copyright 2013 - 2021 * Chair of Geoinformatics * Technical University of Munich, Germany * https://www.lrg.tum.de/gis/ * * The 3D City Database is jointly d...
FeatureType target = featureProperty.getType(); // we do not accept the feature property if it may contain top-level features; // otherwise we would allow any feature to bypass the given filter settings
<|file_name|>repository_session_model.go<|end_file_name|><|fim▁begin|>package repomodel import ( "github.com/kopia/kopia/repo/content" "github.com/kopia/kopia/repo/manifest" ) // RepositorySession models the behavior of a single session in an repository. type RepositorySession struct { OpenRepo *OpenRepository W...
// Flush flushes the changes written in this RepositorySession and makes them available
<|file_name|>continuity.py<|end_file_name|><|fim▁begin|># TODO WIP this is meant to find discrepencies between the stack templates that # are deployed to CloudFormation and what is checked in, and do some other # basic sanity checks on the stacks and their configurations <|fim▁hole|> cloudformation = boto3.client("clou...
import boto3 import re
<|file_name|>redirect-legacy-routes.ts<|end_file_name|><|fim▁begin|>import { navigate } from 'gatsby' export default function redirectLegacyRoutes(): void {<|fim▁hole|> const category = hash.replace('#/examples/', '') navigate(`category/${category}`, { replace: true, }) } else if (hash === '#/endpoi...
const { hash } = window.location if (hash && hash.startsWith('#/examples/')) {
<|file_name|>lemmings.cc<|end_file_name|><|fim▁begin|>// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) // // This file is part of Olena. // // Olena 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 ...
<|file_name|>Async.d.ts<|end_file_name|><|fim▁begin|>import * as React from 'react'; import Select, { Props as SelectProps } from './Select'; import { handleInputChange } from './utils'; import manageState from './stateManager'; import { GroupedOptionsType, OptionsType, InputActionMeta, OptionTypeBase } from './types';...
export type Props<OptionType extends OptionTypeBase> = SelectProps<OptionType> & AsyncProps<OptionType>;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import Y...
method. Backends looking to populate this variable should do so via calling thisObj._set_p2p_primary_path() directly. YANG Description: List of p2p primary paths for a tunnel
<|file_name|>characterdata.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/. */ //! DOM bindings for `CharacterData`. use dom::binding...
/// /// * `Err(())` indicates that `offset` if after the end of the string /// * `Ok((before, None, after))` indicates that `offset` is between Unicode code points.
<|file_name|>DmRaid.cc<|end_file_name|><|fim▁begin|>/* * Copyright (c) [2017-2021] SUSE LLC * * All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as published * by the Free Software Foundation. * * T...
<|file_name|>htmlhrelement.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::codegen::Bindings::HTMLHRElementBind...
<|file_name|>graph.js<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor * license agreements. See the NOTICE file distributed with this work for additional * information regarding copyright ownership. The ASF licenses this file to * You under the Ap...
<|file_name|>gtest_diff.cpp<|end_file_name|><|fim▁begin|>// Unit Test (numerical differentiation) #include <gtest/gtest.h> #include <cmath> #include "diff.h" #include "matrix.h" using namespace nmlib; static double f_11(double x){ return cos(x); } static double f_n1(const Matrix& x){ return cos(x(0))*cos(2*x(1)); ...
for(size_t j=0; j<x.nrow(); j++){
<|file_name|>try_from_integer.rs<|end_file_name|><|fim▁begin|>use std::convert::TryFrom; <|fim▁hole|> println!("{:?}", std::usize::MAX as i32); println!("{:?}", u32::try_from(std::usize::MAX)); println!("{:?}", std::usize::MAX as u32); }<|fim▁end|>
fn main() { println!("{:?}", std::usize::MAX); println!("{:?}", i32::try_from(std::usize::MAX));
<|file_name|>tran.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import numpy as np def tran_op(op, tmat): """ transform quantum operator from representation A to another representation B Args: op: the matrix form of operator in representation A tmat: the unitary transf...
t_c2j[0,0] = -np.sqrt(4.0/5.0)
<|file_name|>loader_test.go<|end_file_name|><|fim▁begin|>// Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LI...
name: "no enabled", yml: "no_enabled.yaml", want: metadata{}, wantErr: "error validating struct:\n\tmetadata.Metrics[system.cpu.time].Enabled: Enabled is a required field\n",
<|file_name|>class_study5.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding:utf-8 -*- ''' 私有方法和私有字段 私有字段:self.__Thailand 私有字段是不能直接被对象和类进行访问的,需要通过动态方法访问 同样私有字段也是可以通过特性的方法访问的 私有方法: 私有方法是不能直接被对象和类进行访问的,通过使用动态方法进行访问 japan._Provice__sha() #显示调用私有方法,但是不建议这...
def show(self): #访问私有字段 print self.__Thailand
<|file_name|>test_one_node_shutdown_with_scheduler.py<|end_file_name|><|fim▁begin|>''' Integration Test for scheduler reboot VM in HA mode. @author: Quarkonics ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_state as test_state import zstackwoodpecker.test_lib as test_lib im...
start_date = int(time.time()) schd = vm_ops.reboot_vm_scheduler(vm.get_vm().uuid, 'simple', 'simple_reboot_vm_scheduler', start_date+60, 30) node1_ip = os.environ.get('node1Ip')
<|file_name|>debug-app.js<|end_file_name|><|fim▁begin|>(function () {<|fim▁hole|> angular .module('Debug', ['pullrefresh']); })();<|fim▁end|>
'use strict';
<|file_name|>framebuf.go<|end_file_name|><|fim▁begin|>// Copyright 2017 ETH Zurich // // 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 // //...
// See the License for the specific language governing permissions and // limitations under the License. package ingress
<|file_name|>chart.rs<|end_file_name|><|fim▁begin|>use crossterm::{ event::{self, DisableMouseCapture, EnableMouseCapture, Event, KeyCode}, execute, terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen}, }; use std::{ error::Error, io, time::{Duration, Instant...
f.render_widget(chart, chunks[2]); }
<|file_name|>subfind.cc<|end_file_name|><|fim▁begin|>#include "subfind.hh" namespace tao { namespace subfind { void make_hdf5_types( h5::datatype& mem_type, h5::datatype& file_type ) { // Create memory type. mem_type.compound( sizeof(halo) ); mem_type.insert( h5::datatype::native_i...
file_type.insert( h5::datatype::ieee_f32be, "virial mass", 28 );
<|file_name|>gregorian.js.uncompressed.js<|end_file_name|><|fim▁begin|>define( "dojo/cldr/nls/zh-hk/gregorian", //begin v1.x content { "months-standAlone-narrow": [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" ], "quarters-format-wide": [ "第1季", "第2季", ...
"dateFormatItem-yMd": "y/M/d", "dateFormatItem-yMEd": "y/M/d(E)", "field-era": "年代", "field-week": "週",
<|file_name|>IPAddressFinder.py<|end_file_name|><|fim▁begin|>''' Created on Jun 15, 2014 @author: geraldine ''' import socket import fcntl import struct def get_ip_address(ifname):<|fim▁hole|><|fim▁end|>
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) return socket.inet_ntoa(fcntl.ioctl(s.fileno(),0x8915,struct.pack('256s', ifname[:15]))[20:24])
<|file_name|>UpdateTacticEvent.java<|end_file_name|><|fim▁begin|>/** * */ package org.javahispano.javaleague.client.event; import org.javahispano.javaleague.shared.domain.TacticUser; import com.google.gwt.event.shared.GwtEvent; /** * @author adou * */ public class UpdateTacticEvent extends GwtEvent<UpdateTact...
<|file_name|>movie.ts<|end_file_name|><|fim▁begin|>import { createSelector } from 'reselect'; import * as movie from './../actions/movie'; import { Movie } from './../models'; import * as _ from 'lodash'; import { AsyncOperation, AsyncStatus, makeAsyncOp } from "./../utils"; export interface State { entities: {...
...state.mapMovieToCinema[cinemaId], loadingOp: makeAsyncOp(AsyncStatus.Fail, action.payload.errorMessage),
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|> upy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. u...
""" Copyright (C) <2010> Autin L. TSRI This file git_upy/blender/v271/__init__.py is part of upy.
<|file_name|>gridApi.js<|end_file_name|><|fim▁begin|>/** * ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v5.0.0-alpha.5 * @link http://www.ag-grid.com/ * @license MIT */ var __decorate = (this && this.__decorate) || function (decorators, target, key...
this.inMemoryRowModel.setRowData(rowData, true); } else { console.log('cannot call setRowData unless using normal row model');
<|file_name|>.eslintrc.js<|end_file_name|><|fim▁begin|>module.exports = { "env": { "es6": true, "node": true }, "globals": { "expect": true, "it": true, "describe": true, }, "extends": "eslint:recommended", "parser": "babel-eslint", "parserOptions": { ...
"jsx": true
<|file_name|>types.rs<|end_file_name|><|fim▁begin|>// // imag - the personal information management suite for the commandline // Copyright (C) 2015-2020 Matthias Beyer <mail@beyermatthias.de> and contributors // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Les...
<|file_name|>nacl_listener.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 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. #include "chrome/nacl/nacl_listener.h" #include <errno.h> #include <stdlib.h> #include "b...
// get an executable SHM region when CreateMemoryObject() is called, // we preallocate one on startup, since NaCl's sel_ldr only needs one // of them. This saves a round trip.
<|file_name|>_rmenu.py<|end_file_name|><|fim▁begin|>#<|fim▁hole|><|fim▁end|>
# The patch applied in http://bugs.python.org/issue1207589 # changes the structure of rmenu_specs in EditorWindow.py. This breaks a lot of extensions. # This file is a re-factoring of rmenu code for other extensions to use. #
<|file_name|>webhooks.py<|end_file_name|><|fim▁begin|># coding=utf-8 class _Webhooks: def __init__(self, client=None): self.client = client def create_webhook(self, params=None, **options): """Establish a webhook :param Object params: Parameters for the request :param **options...
:return: Object """ if params is None: params = {}
<|file_name|>client.py<|end_file_name|><|fim▁begin|># Copyright 2016 Google LLC All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LIC...
:returns: Iterator of :class:`~google.cloud.spanner_v1.instance.Instance` resources within the client's project. """
<|file_name|>app.js<|end_file_name|><|fim▁begin|>// this sets the background color of the master UIView (when there are no windows/tab groups on it) Titanium.UI.setBackgroundColor('#000'); Ti.API.info( "Platform: " + Titanium.Platform.name ); ///////////////////////////////////////////// // Global Variables /////////...
<|file_name|>test_modify.py<|end_file_name|><|fim▁begin|>import unittest import numpy as np from collections import Counter from diogenes.utils import remove_cols,cast_list_of_list_to_sa import utils_for_tests import unittest import numpy as np from numpy.random import rand import diogenes.read import diogenes.util...
<|file_name|>appendix_f.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ''' Appendix F. Grid Mappings --- Each recognized grid mapping is described in one of the sections below. Each section contains: the valid name that is used with the grid_mapping_name attribute; a list of the specific attributes that may be u...
'false_northing', 'grid_mapping_name', 'grid_north_pole_latitude', 'grid_north_pole_longitude',
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from click_plugins import with_plugins from pkg_resources import iter_entry_points import click <|fim▁hole|>@with_plugins(iter_entry_points('girder.cli_plugins')) @click.group(help='Girder: data management platform for the web.', context_settings=dict(h...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Server-side implementation of a Wayland protocol backend using `libwayland` use std::{ ffi::{CStr, CString}, os::raw::{c_char, c_void}, os::unix::{ io::{IntoRawFd, RawFd}, net::UnixStream, }, sync::{ atomic::{AtomicBool, O...
f.debug_struct("ClientData").finish_non_exhaustive() } }
<|file_name|>tasks.js<|end_file_name|><|fim▁begin|>/* var jsonfile = require('jsonfile'); var file = '../data1.json'; var tasksController = require('../public/js/tasks.js'); jsonfile.writeFile(file,data1); */ // var User = require('../public/js/mongoUser.js'); var Task = require('../public/js/mongoTasks.js'); var Mong...
dataJson: dJ, tasks: taskList,
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var LiveStream = require('../') var SubLevel = require('level-sublevel') var db = SubLevel(require('level-test')()('test-level-live-stream')) var assert = require('assert') var i = 10 var j = 10 var k = 10 LiveStream(db, {tail: true}).on('data', function (data) { ...
assert(err == undefined) })
<|file_name|>lz4_test.go<|end_file_name|><|fim▁begin|>package lz4 import ( "io" "os" "testing" "fmt" ) func printBytes(name string, p []byte) { fmt.Println(name) for i := 0; i < len(p); i++ { if i%8 == 0 { fmt.Printf("|[%v]| ", i) } fmt.Printf("%02x ", p[i]) } fmt.Printf("\n") } func deepEqual(a, b ...
}
<|file_name|>link-ordinal-invalid-format.rs<|end_file_name|><|fim▁begin|>#![feature(raw_dylib)]<|fim▁hole|> #[link(name = "foo")] extern "C" { #[link_ordinal("JustMonika")] //~^ ERROR illegal ordinal format in `link_ordinal` fn foo(); } fn main() {}<|fim▁end|>
//~^ WARN the feature `raw_dylib` is incomplete
<|file_name|>inherent-impl.rs<|end_file_name|><|fim▁begin|>#![feature(const_trait_impl)] #![allow(bare_trait_objects)] struct S; trait T {} impl const S {} //~^ ERROR inherent impls cannot be `const`<|fim▁hole|> fn main() {}<|fim▁end|>
impl const T {} //~^ ERROR inherent impls cannot be `const`
<|file_name|>thrust.py<|end_file_name|><|fim▁begin|># nvprof --print-gpu-trace python examples/stream/thrust.py import cupy x = cupy.array([1, 3, 2]) expected = x.sort() cupy.cuda.Device().synchronize() stream = cupy.cuda.stream.Stream() with stream: y = x.sort() stream.synchronize() cupy.testing.assert_array_equ...
stream = cupy.cuda.stream.Stream()
<|file_name|>Page.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 1998-2014 by Richard A. Wilkes. All rights reserved. * * This Source Code Form is subject to the terms of the Mozilla Public License, * version 2.0. If a copy of the MPL was not distributed with this file, You * can obtain one at http://mozilla...
<|file_name|>test_publisher_for_writer.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import unittest from cwr.parser.encoder.dictionary import PublisherForWriterDictionaryEncoder from cwr.interested_party import PublisherForWriterRecord """ Publisher for Writer record to dictionary encoding tests. The fol...
<|file_name|>apps.py<|end_file_name|><|fim▁begin|>from django.apps import AppConfig <|fim▁hole|> name = 'memos'<|fim▁end|>
class MemosConfig(AppConfig):
<|file_name|>gamma.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/...
mod test {
<|file_name|>LC_375_Guess_Number_Higher_or_Lower_II.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #coding=utf8 ''' We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. <|fim▁hole|> Example: n = 10, I pick 8. First round: You guess 5, I...
Every time you guess wrong, I'll tell you whether the number I picked is higher or lower. However, when you guess a particular number x, and you guess wrong, you pay $x. You win the game when you guess the number I picked.
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from constituencies.models import Constituency from uk_political_parties.models import Party from elections.models import Election class Person(models.Model): name = models.CharField(blank=False, max_length=255) remote_id = mod...
membership_end = models.DateField(null=True) class PersonConstituencies(models.Model):
<|file_name|>angulartics2.js<|end_file_name|><|fim▁begin|>/** * Generated bundle index. Do not edit. */<|fim▁hole|>//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYW5ndWxhcnRpY3MyLmpzIiwic291cmNlUm9vdCI6Im5nOi8vYW5ndWxhcnRpY3MyLyIsInNvdXJjZXMiOlsiYW5ndWxhcnRpY3MyLnRzIl0sIm5hbWVzIjpbXSwib...
export * from './public_api';
<|file_name|>_placelist.py<|end_file_name|><|fim▁begin|># # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2007-2008 Brian G. Matherly # Copyright (C) 2008 Gary Burton # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
# # You should have received a copy of the GNU General Public License
<|file_name|>expected.js<|end_file_name|><|fim▁begin|>"use strict"; var C = function () { function C() { babelHelpers.classCallCheck(this, C); } babelHelpers.createClass(C, [{<|fim▁hole|> } }]); return C; }();<|fim▁end|>
key: "m", value: function m(x) { return 'a';
<|file_name|>CSVTools.py<|end_file_name|><|fim▁begin|>import os, types, collections class EmptyLine(Exception) : """Raised when an empty or comment line is found (dealt with internally)""" def __init__(self, lineNumber) : message = "Empty line: #%d" % lineNumber Exception.__init__(self, message) self.message...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import hashlib import binascii class MerkleTools(object): def __init__(self, hash_type="sha256"): hash_type = hash_type.lower() if hash_type == 'sha256': self.hash_function = hashlib.sha256 elif hash_type == 'md5': ...
<|file_name|>jquery.preload.js<|end_file_name|><|fim▁begin|>/*! Copyright 2011, Ben Lin (http://dreamerslab.com/) * Licensed under the MIT License (LICENSE.txt). *<|fim▁hole|>* Version: 1.0.0 * * Requires: jQuery 1.2.3+ */ $.preload = function(){ var tmp = [], i = arguments.length; // reverse loop run faster for...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_...
# These devices cannot be mapped and configured self.supports_mapping = False