prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>bgp.py<|end_file_name|><|fim▁begin|># Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # # 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/...
<|file_name|>SelectionCriteriaEditPart.java<|end_file_name|><|fim▁begin|>package com.odcgroup.t24.enquiry.editor.part; <|fim▁hole|>import org.eclipse.gef.EditPolicy; import com.google.common.base.Joiner; import com.odcgroup.t24.enquiry.editor.policy.EnquiryEditorComponentEditPolicy; import com.odcgroup.t24.enquiry.enq...
import org.eclipse.draw2d.IFigure;
<|file_name|>saved.js<|end_file_name|><|fim▁begin|>import { Mongo } from 'meteor/mongo' export const Saved = new Mongo.Collection('saved'); if (Meteor.isClient) { Meteor.subscribe('saved') } if (Meteor.isServer) { Meteor.publish('saved', function savedPublication() {<|fim▁hole|> }) }<|fim▁end|>
return Saved.find()
<|file_name|>cs_forwardingrules.py<|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 ...
return False if ruleA["type"] == "staticnat":
<|file_name|>connection.ts<|end_file_name|><|fim▁begin|>import { EventEmitter } from 'events' import { applyReducer, Operation } from 'fast-json-patch' import { camelCase, omit } from 'lodash' import { FORMAT_TEXT_MAP, SpanContext, Tracer } from 'opentracing' import { Observable, Subscription, Symbol } from 'rxjs' impo...
}) }
<|file_name|>actual.js<|end_file_name|><|fim▁begin|><|fim▁hole|>match x: | it?(): true<|fim▁end|>
<|file_name|>ty.rs<|end_file_name|><|fim▁begin|>use {Error, protocol}; use server::client::{ClientState, Action}; /// Handle the 'TYPE' command. pub fn handle(ty: &protocol::TYPE,<|fim▁hole|> session.transfer_type = ty.file_type; debug!("file type set to {:?}", ty.file_type); Ok(Action::Reply(protocol::Rep...
client: &mut ClientState) -> Result<Action, Error> { let mut session = client.session.expect_ready_mut()?;
<|file_name|>test_stringptr.py<|end_file_name|><|fim▁begin|>import unittest from ctypes import * import _ctypes_test lib = CDLL(_ctypes_test.__file__) class StringPtrTestCase(unittest.TestCase): def test__POINTER_c_char(self): class X(Structure): _fields_ = [("str", POINTER(c_char...
# c_char_p and Python string is compatible
<|file_name|>util.js<|end_file_name|><|fim▁begin|>'use strict'; /* eslint-disable no-console */ const cryptoJS = require('crypto-js'); module.exports = { toJsonObj: function (str) { try { return JSON.parse(str); } catch (e) { return false;<|fim▁hole|> var arr = []; for (let key in req) {...
} }, getMacString: function (req) {
<|file_name|>gdb-pretty-struct-and-enums.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import rhwl_hr import rhwl_holidays<|fim▁hole|><|fim▁end|>
import controllers
<|file_name|>map.feature.plot.url.js<|end_file_name|><|fim▁begin|>/*global emp, cmapi */ // Register a channel handler for MAP_FEATURE_PLOT_URL. cmapi.channel.handler[cmapi.channel.names.MAP_FEATURE_PLOT_URL] = { // args will have a message and sender property process: function (args) { var featureTransa...
url: payload.url, params: payload.params, properties: payload.properties
<|file_name|>access_groups.py<|end_file_name|><|fim▁begin|>################################################################################### # # Copyright (c) 2017-2019 MuK IT GmbH. # # This file is part of MuK Documents Access # (see https://mukit.at). # # This program is free software: you can redistri...
#----------------------------------------------------------
<|file_name|>MtdsDemo1.cc<|end_file_name|><|fim▁begin|>/********************************************************************************/ /* */ /* MtdsDemo1.pde -- MTDS Library Reference Example 1 */ /* ...
*/ mtds.TextOut(hdsColor, xco, yco, strlen(rgchTest1), rgchTest1); yco += dyco;
<|file_name|>cats.model.js<|end_file_name|><|fim▁begin|>var cats; (function (cats) { 'use strict'; var initModule = function () { }; var getCat = function () { return "tabby"; }; cats.model = { <|fim▁hole|> initModule: initModule, getCat: getCat }; })(cats |...
<|file_name|>xrs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # ###################################################################### # Copyright (c) 2014, Brookhaven Science Associates, Brookhaven # # National Laboratory. All rights reserved. # # ...
1.253, 1.200, 1.153, 1.111, 1.039, 1.008, 0.980, 0.953, 0.929, 0.907, 0.886, 0.848, 0.831, 0.815, 0.800] ), 'Ni': PowderStandard.from_d(
<|file_name|>BusinessDataService.java<|end_file_name|><|fim▁begin|>package dataservice.businessdataservice; import java.rmi.Remote; import java.rmi.RemoteException; import java.util.ArrayList; import po.BusinessPO; import po.DistributeReceiptPO; import po.DriverPO; import po.EnVehicleReceiptPO; import po.GatheringRec...
// 添加装车单到今日装车单文件中
<|file_name|>jsts.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for jsts 0.16.0 // Project: https://github.com/bjornharrtell/jsts // Definitions by: Stephane Alie <https://github.com/StephaneAlie> // Definitions: https://github.com/borisyankov/DefinitelyTyped declare namespace jsts { export var version: s...
*/ getInteriorRingN(n: number): LinearRing;
<|file_name|>models.go<|end_file_name|><|fim▁begin|>//go:build go1.9 // +build go1.9 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // This code was auto-generated by: // github.com/Azure/azure-sdk-for-go/eng...
<|file_name|>NewTaskDialog.js<|end_file_name|><|fim▁begin|>import React from 'react'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; // import RaisedButton from 'material-ui/RaisedButton'; import TextField from 'material-ui/TextField'; export default class NewTaskDialog exten...
/>, ];
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>export { RatingComponent } from './rating.component';<|fim▁hole|><|fim▁end|>
export { RatingModule } from './rating.module';
<|file_name|>read.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate kappa_lisp; use kappa_lisp::read; use kappa_lisp::util::*; #[test] fn test_read_empty() { // assert_eq!(read(""), (keOF)); // assert_eq!(read("(a b"), (keOF)); } #[test] fn test_read_nil() { assert_eq!(read("nil"), Ok(knil()...
assert_eq!(read("\"str123ing\""), Ok(kstr("str123ing"))); assert_eq!(read("\"()string\""), Ok(kstr("()string"))); assert_eq!(read("\"123string\""), Ok(kstr("123string"))); assert_eq!(read("(\"string\")"), Ok(klist!(kstr("string"))));
<|file_name|>parse_laws.py<|end_file_name|><|fim▁begin|># encoding: utf-8 import datetime import logging import os import re import urllib import urllib2 from HTMLParser import HTMLParseError from urlparse import urlparse from BeautifulSoup import BeautifulSoup, Comment, NavigableString from django.contrib.contenttype...
############# # Main # #############
<|file_name|>icon.js<|end_file_name|><|fim▁begin|>const { nativeImage } = require('electron') const { resolve } = require('path') exports.size16 = nativeImage.createFromPath(resolve(__dirname, '../icon16.png'))<|fim▁hole|><|fim▁end|>
exports.size16.setTemplateImage(true)
<|file_name|>feed.component.spec.ts<|end_file_name|><|fim▁begin|>import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { FeedComponent } from './feed.component'; describe('FeedComponent', () => { let component: FeedComponent; let fixture: ComponentFixture<FeedComponent>; beforeEach(a...
<|file_name|>ucred.rs<|end_file_name|><|fim▁begin|>use libc::{gid_t, pid_t, uid_t}; /// Credentials of a process. #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub struct UCred { /// PID (process ID) of the process. pid: Option<pid_t>, /// UID (user ID) of the process. uid: uid_t, /// GID (gro...
/// Gets UID (user ID) of the process. pub fn uid(&self) -> uid_t { self.uid
<|file_name|>http_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 LinkedIn Corp. Licensed under the Apache License, Version * 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unles...
decoder := json.NewDecoder(r.Body)
<|file_name|>ItemUpdateDelistingRequest.py<|end_file_name|><|fim▁begin|>''' Created by auto_sdk on 2014-12-17 17:22:51 ''' from top.api.base import RestApi class ItemUpdateDelistingRequest(RestApi): def __init__(self,domain='gw.api.taobao.com',port=80): RestApi.__init__(self,domain, port) self.num_iid = Non...
return 'taobao.item.update.delisting'
<|file_name|>radar.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
version https://git-lfs.github.com/spec/v1 oid sha256:2e65db5b56d276f8bcf293bede932b782ec29e72a25125d3412f81315301ecc4 size 14066
<|file_name|>options.rs<|end_file_name|><|fim▁begin|>use std::str::FromStr; use crate::params_style::ParamStyle; use crate::rpc_attr::path_eq_str; const CLIENT_META_WORD: &str = "client"; const SERVER_META_WORD: &str = "server"; const PARAMS_META_KEY: &str = "params"; #[derive(Debug)] pub struct DeriveOptions { pub...
if path_eq_str(&nv.path, PARAMS_META_KEY) { if let syn::Lit::Str(ref lit) = nv.lit { options.params_style = ParamStyle::from_str(&lit.value())
<|file_name|>exporter.py<|end_file_name|><|fim▁begin|># Copyright 2017 Capital One Services, 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/licenses/LICENSE-2.0...
date_key = (y, month) months.append(month) months.sort(reverse=True)
<|file_name|>pagerduty.go<|end_file_name|><|fim▁begin|>package rule import ( "encoding/json" "fmt" "github.com/influxdata/flux/ast" "github.com/influxdata/influxdb/v2" "github.com/influxdata/influxdb/v2/notification/endpoint" "github.com/influxdata/influxdb/v2/notification/flux" ) // PagerDuty is the rule conf...
// A version 4 UUID expressed as a 32-digit hexadecimal number. This is the Integration Key for an integration on any given service. endpointProps = append(endpointProps, flux.Property("routingKey", flux.Identifier("pagerduty_secret")))
<|file_name|>AbstractFeedbackPanel.java<|end_file_name|><|fim▁begin|>package fr.openwide.core.wicket.more.markup.html.feedback; import java.util.ArrayList; import java.util.List; import org.apache.wicket.MarkupContainer; import org.apache.wicket.feedback.FeedbackMessage; import org.apache.wicket.markup.html.panel.Fee...
public abstract FeedbackPanel getFeedbackPanel(String id, int level, MarkupContainer container); }
<|file_name|>cifar10_train.py<|end_file_name|><|fim▁begin|># Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
print (format_str % (datetime.now(), self._step, loss_value, examples_per_sec, sec_per_batch)) with tf.train.MonitoredTrainingSession(
<|file_name|>FileSystemPersistService.java<|end_file_name|><|fim▁begin|>/* * Copyright 2013, Red Hat, Inc. and individual contributors * as indicated by the @author tags. See the copyright.txt file in the * distribution for a full listing of individual contributors. * * This is free software; you can redistribute ...
if (basePathStringOrNull == null) { throw new RuntimeException(
<|file_name|>rebuild_storage.py<|end_file_name|><|fim▁begin|>#!python3 # -*- coding:utf-8 -*- import os import sys import time import ctypes import shutil import subprocess IsPy3 = sys.version_info[0] >= 3 if IsPy3: import winreg else: import codecs import _winreg as winreg BuildType = 'Rel...
if consoleColor == -1, use default color '''
<|file_name|>DRMAA_python-macosx.py<|end_file_name|><|fim▁begin|>import os, sys, shutil if "SGE_ROOT" not in os.environ: print "scramble(): Please set SGE_ROOT to the path of your SGE installation" print "scramble(): before scrambling DRMAA_python" sys.exit(1) # change back to the build dir if os.path.dir...
except: from ez_setup import use_setuptools use_setuptools( download_delay=8, to_dir=scramble_lib ) from setuptools import *
<|file_name|>report_panel.js<|end_file_name|><|fim▁begin|> var report_test_url = "reports\\BSV_GC_n_08_du_22_octobre_2013.pdf"; var report_dir = "files/"; var report_extension = ".pdf"; /***************************************************************************************************************************/ /* rep...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>fn main() { let sum = (1..1000) .filter(|&x| x % 3 == 0 || x % 5 == 0) .fold(0, |a,b| a+ b); println!("{}", sum); }<|fim▁end|>
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # ricecooker documentation build configuration file, created by # sphinx-quickstart on Wed Sep 21 19:57:19 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all p...
<|file_name|>macros-nested.rs<|end_file_name|><|fim▁begin|>// This test is similar to `macros.rs`, but nested in modules. // run-pass // edition:2018 #![allow(non_camel_case_types)] mod foo { // Test that ambiguity errors are not emitted between `self::test` and // `::test`, assuming the latter (crate) is no...
// Test that qualified paths can refer to both the external crate and local item. macro_rules! m2 {
<|file_name|>scylla_config_get.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # # Copyright 2016 ScyllaDB # # # This file is part of Scylla. # # Scylla is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundatio...
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details.
<|file_name|>Obj.java<|end_file_name|><|fim▁begin|>package com.kit.db; public class Obj {<|fim▁hole|>}<|fim▁end|>
<|file_name|>cssstyledeclaration.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<|fim▁hole|> use dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::{self, CSSStyleDeclarationMethods};...
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod transaction_scripts;
<|file_name|>dckeytab.py<|end_file_name|><|fim▁begin|># Tests for source4/libnet/py_net_dckeytab.c # # Copyright (C) David Mulder <dmulder@suse.com> 2018 # # 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 Fo...
result += c principal_parts = self.principal.split('@')
<|file_name|>user_test.go<|end_file_name|><|fim▁begin|>package spec import ( "regexp" "strings" "testing" ) func TestUserPattern(t *testing.T) { pat, err := regexp.Compile("^" + UserPattern + "$") if err != nil { t.Fatal(err) } tests := []struct { input string wantMatch bool ...
if err == nil { if uid != test.wantUID {
<|file_name|>numeric.rs<|end_file_name|><|fim▁begin|>#![cfg(feature = "bigdecimal")] use bigdecimal::{BigDecimal, FromPrimitive}; <|fim▁hole|>use crate::sqlite::Sqlite; impl FromSql<Numeric, Sqlite> for BigDecimal { fn from_sql(bytes: SqliteValue<'_>) -> deserialize::Result<Self> { let x = <f64 as FromSql...
use crate::deserialize::{self, FromSql}; use crate::sql_types::{Double, Numeric}; use crate::sqlite::connection::SqliteValue;
<|file_name|>struct.rs<|end_file_name|><|fim▁begin|>// 一个 `Borrowed` 类型,含有一个指向 `i32` 类型的引用。 // 指向 `i32` 的引用必须比 `Borrowed` 寿命更长。 // (原望:A type `Borrowed` which houses a reference to an // `i32`. The reference to `i32` must outlive `Borrowed`.) #[derive(Debug)] struct Borrowed<'a>(&'a i32); // 和前面类似,这里的两个引用都必须比这个结构体长寿。 ...
<|file_name|>ViewLookupCachingFrameLayout.java<|end_file_name|><|fim▁begin|>// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.ui.widget; import android.content.Context; import androi...
View view = null;
<|file_name|>test_gl.py<|end_file_name|><|fim▁begin|># Copyright (C) 2009 Gaetan Guidet # # This file is part of pygl. # # luagl 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 ...
print("check v2") checkVertex(v) v = mesh.element(3)
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import PropTypes, { configStyleValidator, styleValidator } from './PropTypes' import Box from './components/Box' import Email from './components/Email' import Image from './components/Image' import Item from './components/Item' import Span from './components/Span' impo...
Image, Item, Span, A,
<|file_name|>kraken_system.py<|end_file_name|><|fim▁begin|>"""KrakenSystem - objects.kraken_core module. Classes: KrakenSystem - Class for constructing the Fabric Engine Core client. """ import logging import os import sys import json import importlib from collections import OrderedDict import FabricEngine.Core # ...
<|file_name|>utils.js.uncompressed.js<|end_file_name|><|fim▁begin|>define("dojox/gfx/utils", ["dojo/_base/kernel","dojo/_base/lang","./_base", "dojo/_base/html","dojo/_base/array", "dojo/_base/window", "dojo/_base/json", "dojo/_base/Deferred", "dojo/_base/sniff", "require","dojo/_base/config"], function(kernel, la...
<|file_name|>MeetMeTalkingRequestEvent.cpp<|end_file_name|><|fim▁begin|>/* * MeetMeTalkingRequestEvent.cpp * * Created on: Mar 14, 2012 * Author: augcampos */ #include "asteriskcpp/manager/events/MeetMeTalkingRequestEvent.h" namespace asteriskcpp { MeetMeTalkingRequestEvent::MeetMeTalkingRequestEvent(...
}
<|file_name|>lu.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate linxal; extern crate ndarray; extern crate num_traits; use ndarray::{Array, ArrayBase, Data, Ix2}; use linxal::factorization::{LUError, LUFactors}; use linxal::types::{LinxalMatrix}; use std::cmp; /// Check that all the properties of the lu fa...
let reconstructed_a = lu.reconstruct(); println!("{:?}", reconstructed_a);
<|file_name|>base.js<|end_file_name|><|fim▁begin|>var expect = require("chai").expect; var sinon = require("sinon"); var chalk = require("chalk"); var ReadlineStub = require("../../helpers/readline"); var Base = require("../../../lib/prompts/base"); describe("`base` prompt (e.g. prompt helpers)", function() { bef...
this.rl = new ReadlineStub(); this.base = new Base({
<|file_name|>construct.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/...
breakable_block_scopes: Vec<BlockScope>, }
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>import base64 import imghdr import six import uuid from django.core.files.base import ContentFile <|fim▁hole|>from .models import Scholar, Record class ScholarSerializer(serializers.ModelSerializer): class Meta: model = Scholar fields = ( ...
from rest_framework import serializers
<|file_name|>ref_cell.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 core::marker::{Sync, NoSend, PhantomData, Send}; use core::...
}
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import pcbnew from . import toggle_visibility class ToggleVisibilityPlugin(pcbnew.ActionPlugin): def defaults(self): self.name = "Toggle visibility of value/reference (of selected modules)" self.category = "A descriptive category name" s...
ToggleVisibilityPlugin().register() # Instantiate and register to Pcbnew
<|file_name|>buffer.rs<|end_file_name|><|fim▁begin|>use futures::{Future, IntoFuture}; use std::marker::PhantomData; use std::mem; use std::collections::HashMap; use std::ops::{Deref, DerefMut}; use device::Device; use vault::{Vault, VaultAcquired}; use frameworks::native; #[derive(Debug, Clone, Eq, PartialEq, Hash)]...
} #[cfg(feature = "native")] impl From<native::Memory> for BufferMemory {
<|file_name|>ioread.py<|end_file_name|><|fim▁begin|>import axi2s_c import sys <|fim▁hole|> uut = axi2s_c.axi2s_c() uut.read(sys.argv[1])<|fim▁end|>
<|file_name|>AddressRepository.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 u...
preparedStatement.setLong(1, entity.getAddressId()); preparedStatement.setString(2, entity.getAddressName()); preparedStatement.executeUpdate(); }
<|file_name|>analyze_raw_data.py<|end_file_name|><|fim▁begin|>''' Script to convert the raw data and to plot all histograms''' from __future__ import division import logging import warnings import os import multiprocessing as mp from functools import partial from matplotlib.backends.backend_pdf import PdfPages import...
if self._create_rel_bcid_hist: if self.set_stop_mode: plotting.plot_relative_bcid_stop_mode(hist=out_file_h5.root.HistRelBcid[:] if out_file_h5 is not None else self.rel_bcid_hist, filename=output_pdf) else:
<|file_name|>handle_email.py<|end_file_name|><|fim▁begin|>from datetime import datetime import webapp2 from google.appengine.ext.webapp.mail_handlers import InboundMailHandler from google.appengine.ext import ndb from models import Email, Subscriber from google.appengine.api import mail class LogSenderHandler(Inb...
email = Email(parent=Email.get_root(),
<|file_name|>app_yaml.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: google/appengine/v1/app_yaml.proto package google_appengine_v1 import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" import _ "go.pedge.io/pb/gogo/google/api" import googl...
<|file_name|>test_bip21.py<|end_file_name|><|fim▁begin|>import jmbitcoin as btc import pytest def test_bip21_decode(): # These should raise exception because of not being valid BIP21 URI's with pytest.raises(ValueError): btc.decode_bip21_uri('') btc.decode_bip21_uri('nfdjksnfjkdsnfjkds') ...
<|file_name|>arithmetic_optimizer_test.cc<|end_file_name|><|fim▁begin|>/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www....
GrapplerItem item; item.fetch = {"id1"}; TF_CHECK_OK(s.ToGraphDef(&item.graph));
<|file_name|>279.js<|end_file_name|><|fim▁begin|><|fim▁hole|>"EL": {"custom":["org.nutz.el.issue279.Uuuid"]} }<|fim▁end|>
{
<|file_name|>path.rs<|end_file_name|><|fim▁begin|>//! Items related to working with paths for 2D geometry and vector graphics. //! //! This module attempts to provide abstractions around the various `Path` and `Builder` types //! offerred by `lyon` in a way that interoperates a little more fluidly and consistently with...
/// Returns a lyon view on this **Path**. pub fn as_slice(&self) -> lyon::path::PathSlice { self.path.as_slice() }
<|file_name|>callmeanSB.py<|end_file_name|><|fim▁begin|>from defcuts import * from defflags import * from defclump import * import astropy.table as table indir='/Users/amandanewmark/repositories/galaxy_dark_matter/GAH/' outdir='/Users/amandanewmark/repositories/galaxy_dark_matter/lumprofplots/clumps/' datatab = ta...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/* vim: set syntax=javascript ts=8 sts=8 sw=8 noet: */ /* * Copyright 2016, Joyent, Inc. */ var BINDING = require('./lockfd_binding'); function check_arg(pos, name, value, type) { if (typeof (value) !== type) { throw (new Error('argument #' + pos + ' (' + name ...
if (!cb_fired) { throw (new Error('flockSync: CALLBACK NOT FIRED')); } else if (err) { throw (err);
<|file_name|>biophysical_perisomatic_api.py<|end_file_name|><|fim▁begin|># Copyright 2015 Allen Institute for Brain Science # This file is part of Allen SDK. # # Allen SDK 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 F...
include_associations = ''.join([ 'neuronal_model_template(well_known_files(well_known_file_type)),', 'specimen', '(ephys_result(well_known_files(well_known_file_type)),'
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import re try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages <|fim▁hole|>PYPI_RST_FILTERS ...
<|file_name|>_dtype.py<|end_file_name|><|fim▁begin|>""" A place for code to be called from the implementation of np.dtype String handling is much easier to do correctly in python. """ import numpy as np _kind_to_stem = { 'u': 'uint', 'i': 'int', 'c': 'complex', 'f': 'float', 'b': 'bool', 'V':...
if fld_dtype.subdtype is not None: base, shape = fld_dtype.subdtype
<|file_name|>linear_chain_crf_op.cc<|end_file_name|><|fim▁begin|>/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apac...
} };
<|file_name|>Honeybee_Radiance Mirror Material By Color.py<|end_file_name|><|fim▁begin|># # Honeybee: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari # # This file is part of Honeybee. # # Copyright (c) 2013-2015, Mostapha Sadeghipour Roudsari <Sadeghipour@gmail.com> # Honeybee is ...
RADMaterial = main()
<|file_name|>file_util_shell.cc<|end_file_name|><|fim▁begin|>/* * Copyright 2012 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.apa...
result = false;
<|file_name|>ch04_05.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python def print_banner(s): print('##------------------------------------------------------------------------------') print(f'## {s}') print('##------------------------------------------------------------------------------') print_banner(...
class Base: def foo(self):
<|file_name|>funcionario.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # from __future__ import (unicode_literals, nested_scopes, generators, division, # absolute_import, with_statement, print_function) import datetime import math class Funcionario(object): def __init__(self, no...
self.idade = idade self.salario = salario
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import data from "./core/data"; import watch from "./core/watch"; import template from "./template/index.html"; import * as props from "./core/props"; import * as methods from "./core/methods"; import * as computed from "./core/computed"; import * as directives from "...
methods, template,
<|file_name|>container.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Delix Project Authors. See the AUTHORS file at the top level directory. // // 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 L...
pack(message::Kind::from(pt), packet) } pub fn unpack_packet(container: Container) -> Result<(u32, io::Result<Vec<u8>>)> {
<|file_name|>User.java<|end_file_name|><|fim▁begin|>package org.baeldung.persistence.model; import io.katharsis.resource.annotations.JsonApiId; import io.katharsis.resource.annotations.JsonApiRelation; import io.katharsis.resource.annotations.JsonApiResource; import io.katharsis.resource.annotations.SerializeType; im...
@Override public int hashCode() { final int prime = 31; int result = 1;
<|file_name|>model_policy_ControllerSlice.py<|end_file_name|><|fim▁begin|>def handle(controller_slice): from core.models import ControllerSlice, Slice try: my_status_code = int(controller_slice.backend_status[0]) try:<|fim▁hole|> if (my_status_code not in [0,his_status_code]): ...
his_status_code = int(controller_slice.slice.backend_status[0]) except: his_status_code = 0
<|file_name|>close_on_drop.rs<|end_file_name|><|fim▁begin|>#![cfg(all(feature = "os-poll", feature = "net"))] use std::io::Read; use log::debug; use mio::net::{TcpListener, TcpStream}; use mio::{Events, Interest, Poll, Token}; mod util; use util::{any_local_address, init}; use self::TestState::{AfterRead, Initial};...
assert!(handler.state == AfterRead, "actual={:?}", handler.state); }
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|>import os from invoke import task <|fim▁hole|> os.system('coverage run --source tryagain -m py.test') os.system('coverage report') @task def register(production=False): target = 'pypi' if production else 'pypitest' os.system('python3 setup.py register...
@task def test():
<|file_name|>VirusTotalAnalyzer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2016 Hannes Juutilainen # # 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....
permalink = json_data.get("permalink", None) self.output("Message: %s" % verbose_msg)
<|file_name|>oxygensizegrip.cpp<|end_file_name|><|fim▁begin|>////////////////////////////////////////////////////////////////////////////// // oxygensizegrip.cpp // bottom right size grip for borderless windows // ------------------- // // Copyright (c) 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr> // // Permission...
case Qt::MidButton: { hide();
<|file_name|>mipsisa32r6_unknown_linux_gnu.rs<|end_file_name|><|fim▁begin|>use crate::abi::Endian; use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "mipsisa32r6-unknown-linux-gnu".to_string(), pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-...
}, } }
<|file_name|>CWE127_Buffer_Underread__new_char_loop_54c.cpp<|end_file_name|><|fim▁begin|>/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE127_Buffer_Underread__new_char_loop_54c.cpp Label Definition File: CWE127_Buffer_Underread__new.label.xml Template File: sources-sink-54c.tmpl.cpp */ /* * @description * CWE...
#ifndef OMITGOOD /* goodG2B uses the GoodSource with the BadSink */ void goodG2BSink_d(char * data);
<|file_name|>karma.conf.js<|end_file_name|><|fim▁begin|>'unit tests'; module.exports = function(config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: './src', // frameworks to use // available frameworks: https://npmjs.org/browse/keyword/karma-a...
browserify: { debug: true,
<|file_name|>windows-build.py<|end_file_name|><|fim▁begin|>#!/usr/env python import os import sys import shutil import tempfile if os.name != 'nt': print 'Windows only!'<|fim▁hole|> if not len(sys.argv) == 3: print 'USAGE: %s PortablePythonDir output-dir' % sys.argv[0] print ' Example: D:\yCanta>..\PortablePyt...
sys.exit(1)
<|file_name|>test_file_bzip2.py<|end_file_name|><|fim▁begin|>from tests.base_test import BaseTest from tests import config from core import modules from core.sessions import SessionURL from testfixtures import log_capture from core import messages import logging import os import subprocess class FileBzip(BaseTest): ...
# Recompress it keeping the original file
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Follow' db.create_table('actstre...
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
<|file_name|>vgng.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Translation of videogamena.me javascript to python # # http://videogamena.me/vgng.js # http://videogamena.me/video_game_names.txt # # (C) 2014 Dustin Knie <dustin@nulldomain.com> import argparse import os import random from math import floor, ...
allow_similar_matches=allow_similar_matches)
<|file_name|>spend_test.go<|end_file_name|><|fim▁begin|>package types import ( "bytes" "encoding/hex" "strings" "testing" "github.com/davecgh/go-spew/spew" "github.com/bytom/bytom/encoding/blockchain" "github.com/bytom/bytom/protocol/bc" "github.com/bytom/bytom/testutil" ) func TestSerializationSpendCommitm...
sc := &SpendCommitment{ AssetAmount: bc.AssetAmount{ AssetId: &assetID, Amount: 254354,
<|file_name|>BaseClient.cpp<|end_file_name|><|fim▁begin|>// // This file is part of the aMule Project. // // Copyright (c) 2003-2011 aMule Team ( admin@amule.org / http://www.amule.org ) // Copyright (c) 2002-2011 Merkur ( devs@emule-project.net / http://www.emule-project.net ) // // Any parts of this program derived f...
// other downloads that are faster. limit +=1024; } else if(limit == 0) {
<|file_name|>macros.rs<|end_file_name|><|fim▁begin|>#[macro_escape] macro_rules! build { ($ctx:expr) => () } macro_rules! native_ref( (&$name:ident = $alias:ty) => ( impl Eq for $name {} impl PartialEq<$name> for $name { fn eq(&self, other: &$name) -> bool { use std:...
<|file_name|>gtkcustom.py<|end_file_name|><|fim▁begin|>""" Created on 2013-12-16 @author: readon @copyright: reserved @note: CustomWidget example for mvp """ from gi.repository import Gtk from gi.repository import GObject class CustomEntry(Gtk.Entry): """ custom widget inherit from gtkentry. """<|fim▁hol...
def __init__(self): Gtk.Entry.__init__(self) print "this is a custom widget loading"