prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>dependencies.rs<|end_file_name|><|fim▁begin|>use std::process::{Command, Stdio}; use error::{KawsError, KawsResult}; pub fn ensure_dependencies() -> KawsResult { ensure_cfssl().and(ensure_kubectl()).and(ensure_terraform()) } fn ensure_cfssl() -> KawsResult { let installed = match Command::new("c...
<|file_name|>donutchart.js<|end_file_name|><|fim▁begin|>'use strict'; /** * @ngdoc directive * @name SubSnoopApp.directive:pieChart * @description * # pieChart */ angular.module('SubSnoopApp') .directive('donutChart', ['d3Service', '$window', '$document', 'subFactory', '$filter', 'moment', 'sentiMood', 'reactio...
d3.select('.center-value-' + attrs.type).text(d.data.label);
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![deny(broken_intra_doc_links)] //! Implementation of marshaller for rust-protobuf parameter types. use bytes::Bytes; use grpc::marshall::Marshaller; use protobuf::CodedInputStream; use protobuf::Message; pub struct MarshallerProtobuf; impl<M: Message> Marshaller<...
<|file_name|>local_ptr.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/licen...
#[inline]
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" python bindings to flux-core, the main core of the flux resource manager """ # Import core symbols directly, allows flux.FLUX_MSGTYPE_ANY for example # pylint: disable=wildcard-import from flux.constants import * from flux.core import Flux __all__ = ['core', ...
'sec',
<|file_name|>test_link_shared_libraries.py<|end_file_name|><|fim▁begin|># Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os from pants.backend.native.targets.native_artifact import NativeArtifact from pants.backend.native.tasks.c...
target_roots=[cpp], for_task_types=[cpp_compile_task_type], options={"libc": {"enable_libc_search": True}}, )
<|file_name|>shell-scribe.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python """ .. module:: shellscribe Shell-Scribe run.py @author: Keith E. Miller <keithmiller@umass.edu> Expected issues: - cd command is shell-scribe specific so commands that use cd in a non-trivial way might break the cd command """ import cmd imp...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals # Django from django.conf import settings from django.db import models # 3rd Party from grapevine import generics from grapevine.models.base import GrapevineModel from model_utils.managers import PassThroughManager # Local Ap...
def as_str(self):
<|file_name|>cell.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 Joe Wilm, The Alacritty Project 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 // // http://www.apach...
<|file_name|>Dados.py<|end_file_name|><|fim▁begin|>from Probabilidades import Probabilidad from validador import * a = Probabilidad() a.cargarDatos("1","2","3","4","5","6") uno = [" ------- ","| |","| # |","| |"," ------- "] dos = [" ------- ","| # |","| |","| # |"," ------- "...
<|file_name|>watcher.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 Mozilla // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use // this file except in compliance with the License. You may obtain a copy of the // License at http://www.apache.org/licenses/LICENSE-2.0 // Unless require...
use core_traits::{ Entid, TypedValue,
<|file_name|>application.js<|end_file_name|><|fim▁begin|>// FIXME: Tell people that this is a manifest file, real code should go into discrete files // FIXME: Tell people how Sprockets and CoffeeScript works // //= require jquery<|fim▁hole|><|fim▁end|>
//= require jquery_ujs //= require_tree .
<|file_name|>win32socketserver.cc<|end_file_name|><|fim▁begin|>/* * Copyright 2004 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights...
<|file_name|>test_textbox38.py<|end_file_name|><|fim▁begin|>############################################################################### # # Tests for XlsxWriter. # # SPDX-License-Identifier: BSD-2-Clause # Copyright (c), 2013-2022, John McNamara, jmcnamara@cpan.org # from ..excel_comparison_test import ExcelCompar...
self.assertExcelEqual()
<|file_name|>pids.py<|end_file_name|><|fim▁begin|>""" Python module presenting an API to an ELM327 serial interface (C) 2015 Jamie Fraser <fwaggle@fwaggle.org> http://github.com/fwaggle/pyELM327 Please see License.txt and Readme.md. """ # Pretty much taken from https://en.wikipedia.org/wiki/OBD-II_PIDs __pids ={ 0x...
'Units': '', 'Pattern': '^[A-Z0-9]{2} [A-Z0-9]{2} ([A-Z0-9]{2}) [A-Z0-9]{2} $',
<|file_name|>func_interfaces.py<|end_file_name|><|fim▁begin|># pylint:disable-msg=R0201 """docstring""" __revision__ = '' class Interface: """base class for interfaces""" class IMachin(Interface): """docstring""" def truc(self): """docstring""" def troc(self, argument): """doc...
__implements__ = undefined def __init__(self):
<|file_name|>jquery.ui.progressbar.js<|end_file_name|><|fim▁begin|>/* * jQuery UI Progressbar 1.8.2 * * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Progressbar * * Depends: * jq...
_refreshValue: function() {
<|file_name|>FormsControls.tsx<|end_file_name|><|fim▁begin|>import * as b from "bobril"; import { IRouteWithNavDefinition } from "../../../../common/routing"; import { Anchor } from "../../../../common/Anchor"; import { Example } from "../../../../common/Example"; import { Col, Form, margin, Row } from "../../../../../...
{ url: "color", name: "form-controls-color", label: "Color",
<|file_name|>stringHandlePy.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #coding:utf-8 ## # @file longestPalindrome.py # @brief Find longest palindrome string # @author unlessbamboo # @version 1.0 # @date 2016-02-15 def secondHelper(str1, left, right): """secondHelper:Find a palindrome string from one...
maxLength = max(maxLength, i - start + 1) usedChar[str1[i]] = i
<|file_name|>BackgroundIframe.js<|end_file_name|><|fim▁begin|>define([ "require", // require.toUrl "./main", // to export dijit.BackgroundIframe "dojo/_base/config", "dojo/dom-construct", // domConstruct.create "dojo/dom-style", // domStyle.set "dojo/_base/lang", // lang.extend lang.hitch "dojo/on", "dojo/sni...
// cache of iframes
<|file_name|>sparseMatrixPrepare.py<|end_file_name|><|fim▁begin|>""" Prepare Sparse Matrix for Sparse Affinity Propagation Clustering (SAP) """ # Authors: Huojun Cao <bioinfocao at gmail.com> # License: BSD 3 clause import numpy as np import pandas as pd import sparseAP_cy # cython for calculation ###################...
# for samples that col have single data point, copy minimal value of this sample's row
<|file_name|>make_irmas_index.py<|end_file_name|><|fim▁begin|>import argparse import glob import hashlib import json import os IRMAS_INDEX_PATH = '../mirdata/indexes/irmas_index.json' def md5(file_path): """Get md5 hash of a file. Parameters ---------- file_path: str File path. Returns ...
)
<|file_name|>SensorTagMovementProfile.java<|end_file_name|><|fim▁begin|>/************************************************************************************************** Filename: SensorTagMovementProfile.java Copyright (c) 2013 - 2015 Texas Instruments Incorporated All rights reserved not granted herein. ...
this.configC = c; } if (c.getUuid().toString().equals(SensorTagGatt.UUID_MOV_PERI.toString())) {
<|file_name|>vimba_c.py<|end_file_name|><|fim▁begin|>from sys import platform as sys_plat import platform import os from ctypes import * if sys_plat == "win32": def find_win_dll(arch): """ Finds the highest versioned windows dll for the specified architecture. """ dlls = [] filename = 'V...
vmb_feature_int_range_query = _vimba_lib.VmbFeatureIntRangeQuery vmb_feature_int_range_query.restype = c_int32 vmb_feature_int_range_query.argtypes = (c_void_p,
<|file_name|>spki_test.go<|end_file_name|><|fim▁begin|>package spki_test import "github.com/hlandau/degoutils/spki" import "github.com/agl/ed25519" import "testing" import "crypto/rand" import "github.com/hlandau/sx" import "bytes" import "fmt" func TestSPKI(t *testing.T) { pk, sk, err := ed25519.GenerateKey(rand.Re...
<|file_name|>da.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license<|fim▁hole|> toolbar: 'Ny side' } );<|fim▁end|>
*/ CKEDITOR.plugins.setLang( 'newpage', 'da', {
<|file_name|>issue-16747.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/lic...
struct List<'a, T: ListItem<'a>> {
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>"""Copyright 2008 Orbitz WorldWide Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless require...
value = self[key] if not isinstance(value, list):
<|file_name|>db.rs<|end_file_name|><|fim▁begin|>use iron_diesel_middleware::{DieselMiddleware}; use diesel::result::Error; use r2d2;<|fim▁hole|>use r2d2_diesel; use diesel::pg::PgConnection; pub type ConnectionPool = r2d2::PooledConnection<r2d2_diesel::ConnectionManager<PgConnection>>; pub type InsertResult = Result<u...
<|file_name|>trait-with-bounds-default.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....
impl<T: Clone> Getter<T> for Option<T> { fn do_get(&self) -> T { self.as_ref().unwrap().clone() } }
<|file_name|>os_chdir.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 ''' This example shows how to use the os chdir command. Note that an exception is thrown if a directory name which cannot be changed to is supplied (bad name, access problem and more). ''' import os # for chdir, system # a wrong directory on p...
os.chdir('/tmp') os.system('ls')
<|file_name|>range.py<|end_file_name|><|fim▁begin|>from datetime import timedelta import operator from sys import getsizeof import warnings import numpy as np from pandas._libs import index as libindex, lib import pandas.compat as compat from pandas.compat import get_range_parameters, lrange, range from pandas.compat...
Returns ------- argsorted : numpy array
<|file_name|>stylesheet_set.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/. */ //! A centralized set of stylesheets for a document. ...
/// The stylesheet invalidations for this origin that we still haven't /// processed. invalidations: StylesheetInvalidationSet,
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use super::cmp::Cmp; use serde_json::Value;<|fim▁hole|>use item::FieldInt; use super::action::SearchAction; use super::searcher::meet::Meet; #[derive(Debug, Clone)] pub struct Comparision { pub field_int: FieldInt, pub cmp: Cmp, pub other: Value, } impl Co...
use super::math::Math;
<|file_name|>normalization.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import re import unicodedata def lower_text(text): return text.lower() <|fim▁hole|> def normalize_unicode(text, form='NFKC'): normalized_text = unicodedata.normalize(form, text) return normalized_text def normalize_number...
<|file_name|>test_sorted_feed.py<|end_file_name|><|fim▁begin|>import thoonk from thoonk.feeds import SortedFeed import unittest from ConfigParser import ConfigParser class TestLeaf(unittest.TestCase): def setUp(self): conf = ConfigParser() conf.read('test.cfg') if conf.sections() == [...
'4': "you're welcome"} self.assertEqual(r, ['1', '2', '3', '4'], "Sorted feed results did not match publish: %s." % r) self.assertEqual(v, items, "Sorted feed items don't match: %s" % v)
<|file_name|>hu.js<|end_file_name|><|fim▁begin|>import {test} from '../qunit'; import {localeModule} from '../qunit-locale'; import moment from '../../moment'; localeModule('hu'); test('parse', function (assert) { var tests = 'január jan_február feb_március márc_április ápr_május máj_június jún_július júl_augusztu...
assert.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), '21 óra', '21 óra = 21 óra'); assert.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), 'egy nap', '22 óra = egy nap'); assert.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), 'egy nap', '35...
<|file_name|>stripConsole.js<|end_file_name|><|fim▁begin|>define(["../../buildControl"], function(bc){ if(bc.stripConsole){ var consoleMethods = "assert|count|debug|dir|dirxml|group|groupEnd|info|profile|profileEnd|time|timeEnd|trace|log"; if(bc.stripConsole === "warn"){ consoleMethods += "|warn"; }else if(bc...
<|file_name|>bpr.py<|end_file_name|><|fim▁begin|># Author: Immanuel Bayer # License: BSD 3 clause import ffm import numpy as np from .base import FactorizationMachine from sklearn.utils.testing import assert_array_equal from .validation import check_array, assert_all_finite class FMRecommender(FactorizationMachine):...
self.w0_, self.w_, self.V_ = ffm.ffm_fit_sgd_bpr(self, X, pairs) return self
<|file_name|>sizing.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! https://drafts.csswg.org/css-sizing/ use crate::style_ex...
// Percentages for 'width' are treated as 'auto'
<|file_name|>ComponentIssuesRepositoryImpl.java<|end_file_name|><|fim▁begin|>/* * SonarQube * Copyright (C) 2009-2019 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as pub...
return issues; }
<|file_name|>configure-rows.module.ts<|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 * t...
*/ import { NgModule } from '@angular/core'; import { SharedModule } from '../../shared/shared.module';
<|file_name|>Tag.java<|end_file_name|><|fim▁begin|>package com.etiennelawlor.loop.network.models.response; import android.os.Parcel; import android.os.Parcelable; import com.google.gson.annotations.SerializedName; /** * Created by etiennelawlor on 5/23/15. */ public class Tag implements Parcelable { // region...
private String canonical; // endregion // region Constructors
<|file_name|>populate_custom_taxonomies.py<|end_file_name|><|fim▁begin|>import json import logging from django.core.management.base import BaseCommand from django.db import transaction from osf.models import AbstractProvider, PreprintProvider, PreprintService, Subject from osf.models.provider import rules_to_subjects...
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>/* * main.cpp * * Created on: 25 mar 2014 * Author: Mike */ // Inclusions #include "main.h" // Functions void welcome(){ std::cout << "Project Euler v" << GLOBAL_CONST_VERSION; } <|fim▁hole|> welcome(); } // prototype else ...
// Main function int main(int argc, char *argv[]){ if(argc <= 1){ if(argc == 1){
<|file_name|>VariableSetCreateParams.java<|end_file_name|><|fim▁begin|>/* * Copyright 2015-2020 OpenCB * * 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...
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<|file_name|>createhostedconfigurationversionrequest.cpp<|end_file_name|><|fim▁begin|>/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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 Sof...
const CreateHostedConfigurationVersionRequestPrivate &other, CreateHostedConfigurationVersionRequest * const q) : AppConfigRequestPrivate(other, q) {
<|file_name|>usql_view_paged.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code g...
<|file_name|>store.go<|end_file_name|><|fim▁begin|>package grocery import () // rawStore is a row parsed directly from the open data CSV file type rawStore struct { Phone string Hours string Snap string SIC string NAICS string Sales string Br...
<|file_name|>PemEncodedTest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2016 The Netty Project * * The Netty Project licenses this file to you 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: *...
pemKey = PemPrivateKey.valueOf(toByteArray(ssc.privateKey())); pemCert = PemX509Certificate.valueOf(toByteArray(ssc.certificate())); } finally {
<|file_name|>icon_set.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>use IconSource; use StyleContext; #[cfg(any(feature = "v3_10", feature = "dox"))] use cairo; use ffi; #[cfg(any(feature = "v3_10", feature = "dox"))] use gdk; use gdk_pixbuf; use glib::translate::*; use glib_ffi; use gobject_ffi; use std::mem; use std::p...
// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT
<|file_name|>import-flights.py<|end_file_name|><|fim▁begin|>from pik.flights import Flight import csv import sys<|fim▁hole|> for flight in Flight.generate_from_csv(reader): print flight<|fim▁end|>
reader = csv.reader(sys.stdin)
<|file_name|>graph.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/lice...
<|file_name|>datepicker-inner.component.d.ts<|end_file_name|><|fim▁begin|>import { OnInit, EventEmitter, OnChanges } from '@angular/core'; export declare class DatePickerInnerComponent implements OnInit, OnChanges { datepickerMode: string; startingDay: number; yearRange: number; minDate: Date; maxDa...
customClass: Array<{ date: Date;
<|file_name|>lint-exceeding-bitshifts.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.a...
let n = 1i8 >> 7; let n = 1i8 >> 8; //~ ERROR: bitshift exceeds the type's number of bits let n = 1i16 >> 15; let n = 1i16 >> 16; //~ ERROR: bitshift exceeds the type's number of bits
<|file_name|>file.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, url from django.views.generic import TemplateView urlpatterns = patterns('gnowsys_ndf.ndf.views.file', url(r'^[/]$', 'file', name='file'), # url(r'^/(?P<file_id>[\w-]+)$', 'file', nam...
url(r'^/readDoc/(?P<_id>[\w-]+)/(?:(?P<file_name>[^/]+))?$', 'readDoc', name='read_file'), url(r'^/search/$', 'file_search', name='file_search'),
<|file_name|>column_function.py<|end_file_name|><|fim▁begin|># This file is part of Osgende # Copyright (C) 2017 Sarah Hoffmann #<|fim▁hole|># modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or any later version. # # This pro...
# This is free software; you can redistribute it and/or
<|file_name|>kinematicCloud.C<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright held by origi...
} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
<|file_name|>hextobase64.rs<|end_file_name|><|fim▁begin|>extern crate matasano; use self::matasano::common::{base64, err}; fn test_hex_to_base64(input: &str, output: &str) { let r: Result<String, err::Error> = base64::hex_to_base64(input); let base64 = match r { Ok(v) => v, Err(e) => { println!("{}", e); ...
#[test]
<|file_name|>server.js<|end_file_name|><|fim▁begin|>/* Run a HTTP server that registers its location using the Datawire * Microservices Development Kit (MDK). * * Make sure you have the DATAWIRE_TOKEN environment variable set with your * access control token. */ /* jshint node: true */ "use strict"; var process...
<|file_name|>tuple.rs<|end_file_name|><|fim▁begin|>// Compiler: // // Run-time: // status: 0 // stdout: 3 #![feature(auto_traits, lang_items, no_core, start, intrinsics)] #![no_std] #![no_core] /* * Core */ // Because we don't have core yet. #[lang = "sized"] pub trait Sized {} #[lang = "copy"] trait Copy { ...
fn main(mut argc: isize, _argv: *const *const u8) -> isize { let test: (isize, isize, isize) = (3, 1, 4);
<|file_name|>travis_test_script.py<|end_file_name|><|fim▁begin|>import sys, subprocess, time """ This script is made as a wrapper for sc2 bots to set a timeout to the bots (in case they cant find the last enemy structure or the game is ending in a draw) Usage: cd into python-sc2/ directory docker build -t test_image ...
process = subprocess.Popen(["python", sys.argv[1]], stdout=subprocess.PIPE)
<|file_name|>pro.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright(C) 2014 Romain Bignon # # This file is part of weboob. # # weboob 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 Foundation, e...
<|file_name|>XFormSerializingVisitor.java<|end_file_name|><|fim▁begin|>package org.javarosa.model.xform; import org.javarosa.core.data.IDataPointer; import org.javarosa.core.model.IAnswerDataSerializer; import org.javarosa.core.model.instance.FormInstance; import org.javarosa.core.model.instance.TreeElement; import or...
for (int i = 0; i < instanceNode.getAttributeCount(); i++) { String namespace = instanceNode.getAttributeNamespace(i); String name = instanceNode.getAttributeName(i);
<|file_name|>method-mangling.rs<|end_file_name|><|fim▁begin|>#![allow( dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals )] #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct Foo { pub _address: u8, } #[test] fn bindgen_test_layout_Foo() { assert_eq!( ::s...
1usize, concat!("Size of: ", stringify!(Foo))
<|file_name|>issue-17545.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/lic...
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed
<|file_name|>pytorch.py<|end_file_name|><|fim▁begin|>import klampt.math.autodiff.ad as ad import torch,numpy as np class TorchModuleFunction(ad.ADFunctionInterface): """Converts a PyTorch function to a Klamp't autodiff function class.""" def __init__(self,module): self.module=module self._eval_...
elif isinstance(func,ad.ADFunctionInterface): context=[]
<|file_name|>go.cpp<|end_file_name|><|fim▁begin|>#include <iostream> using namespace std;<|fim▁hole|>int main(int argc, char const *argv[]) { int n= 20; label: cout << n << endl; n--; if(n > 0){ goto label; } std::cout << "endle" << '\n'; std::cout << "string euqals: " << (strcm...
<|file_name|>04-accessors&static.ts<|end_file_name|><|fim▁begin|>// Accessors are only available when targeting ECMAScript 5 and higher. <|fim▁hole|>class Person { private _name:string; static age:number; get name():string { return this._name; } set name(newName:string) { this._name = newName; } tell(){ re...
<|file_name|>policystringmap_binding.go<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2021 Citrix Systems, 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.ap...
* Binding object which returns the resources bound to policystringmap_binding. */
<|file_name|>options.go<|end_file_name|><|fim▁begin|>/* Copyright (c) 2015 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at<|fim▁hole|> Unless required by applicable...
http://www.apache.org/licenses/LICENSE-2.0
<|file_name|>CoordinatorStreamStore.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 *...
<|file_name|>burrows_wheeler.py<|end_file_name|><|fim▁begin|>def burrows_wheeler(text): """Calculates the burrows wheeler transform of <text>. returns the burrows wheeler string and the suffix array indices The text is assumed to not contain the character $""" <|fim▁hole|> all_permutations = [] for ...
text += "$"
<|file_name|>collect.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/license...
let tpt = { let ty = ccx.to_ty(&ExplicitRscope, t); ty_param_bounds_and_ty { generics: ty_generics(ccx, generics, 0),
<|file_name|>getAssetDataFromName.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can b...
assetName = filename;
<|file_name|>MatrixCalculator.java<|end_file_name|><|fim▁begin|>package com.catsprogrammer.catsfourthv; /** * Created by C on 2016-09-14. */ public class MatrixCalculator { public static float[] getRotationMatrixFromOrientation(float[] o) { float[] xM = new float[9]; float[] yM = new float[9]; ...
result[2] = A[0] * B[2] + A[1] * B[5] + A[2] * B[8]; result[3] = A[3] * B[0] + A[4] * B[3] + A[5] * B[6];
<|file_name|>vec.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/LI...
<|file_name|>i3-exit.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # based on cb-exit used in CrunchBang Linux <http://crunchbanglinux.org/> import pygtk pygtk.require('2.0') import gtk import os import getpass import time class i3_exit: def disable_buttons(self): self.cancel.set_sensitive(False)...
<|file_name|>node_info_test.go<|end_file_name|><|fim▁begin|>package types import ( "fmt" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/crypto/ed25519" tmnet "github.com/tendermint/tendermint/libs/net" "github.com/tendermint/tendermint/ve...
<|file_name|>widget-vimeo.service.ts<|end_file_name|><|fim▁begin|>import { h } from 'vue'; import AppVideoEmbed from '../../video/embed/embed.vue'; import { WidgetCompilerWidget } from '../widget'; import { WidgetCompilerContext } from '../widget-compiler.service'; export class WidgetCompilerWidgetVimeo extends Widget...
}); }
<|file_name|>DnspodFree.java<|end_file_name|><|fim▁begin|>package com.qiniu.android.dns.http; import com.qiniu.android.dns.Domain; import com.qiniu.android.dns.IResolver; import com.qiniu.android.dns.NetworkInfo; import com.qiniu.android.dns.Record; import java.io.IOException; import java.io.InputStream; import java....
InputStream is = httpConn.getInputStream(); byte[] data = new byte[length]; int read = is.read(data);
<|file_name|>Woundy.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # <nbformat>3.0</nbformat><|fim▁hole|> import os, os.path from matplotlib import pyplot as plt from pylab import get_cmap import SimpleCV as cv from glob import glob # <codecell> def show_img(img, ax = None): if ax is not None: pl...
# <codecell>
<|file_name|>0527_auto_20200730_1502.py<|end_file_name|><|fim▁begin|># Generated by Django 2.2.13 on 2020-07-30 15:02 import django.db.models.deletion from django.db import migrations, models<|fim▁hole|> class Migration(migrations.Migration): dependencies = [ ('base', '0526_unique_together_groupelementyea...
<|file_name|>lib.es2015.symbol.d.ts<|end_file_name|><|fim▁begin|>/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance ...
<|file_name|>itinerary-walk-steps.js<|end_file_name|><|fim▁begin|>var ItineraryWalkStep = require('./itinerary-walk-step') <|fim▁hole|>var Backbone = window.Backbone var ItineraryWalkSteps = Backbone.Collection.extend({ model: ItineraryWalkStep }) module.exports = ItineraryWalkSteps<|fim▁end|>
<|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...
use dom::document::Document;
<|file_name|>schema_extractor.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ const SVG_PREFIX = ':svg:'; // Element | Node interfa...
const SVGComponentTransferFunctionElement = _G['SVGComponentTransferFunctionElement'];
<|file_name|>ApplicationTest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2015 Tinbytes 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/...
* distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
<|file_name|>arm.ad-tests.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) Microsoft. 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...
testSPs.push(result); //servicePrincipal mytestapp9045 must be a member of testgroup1 graphUtil.addGroupMember(testGroups[0], testSPs[0], function (err, result) { if (err) {
<|file_name|>corpusInfo.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 ci_version="0.10" # This script is used to retrieve corpus information. It can be run after the parser # has finished its work. The corpus information is part of the final report. # Database connection is configured in the server configuration....
print("Total characters: ", characterCount) print("Total words: ", totalWordCount) print()
<|file_name|>printer.rs<|end_file_name|><|fim▁begin|>use types::MalVal; pub fn escape_str(s: &str) -> String { let mut escaped = String::new(); escaped.push('"'); for c in s.chars() { let _ = match c { '"' => escaped.push_str("\\\""), '\\' => escaped.push_str("\\\\"), ...
let re2 = regex!(r#"\\n"#); let re3 = regex!(r#"\\\\"#);
<|file_name|>tasks.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *------------...
export enum ShellQuoting { /** * Use character escaping.
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::io; use std::rand; use std::cmp::Ordering; fn main() { let secret_number = (rand::random::<u32>() % 100) + 1; println!("Guess the number!"); loop { println!("Please input your guess."); let input = io::stdin().read_line() ...
match cmp(num, secret_number) { Ordering::Less => println!("Too small!"), Ordering::Greater => println!("Too big!"),
<|file_name|>data_entry_flow.py<|end_file_name|><|fim▁begin|>"""Classes to help gather user submissions.""" import abc import logging from typing import Any, Dict, List, Optional, cast import uuid import voluptuous as vol from .core import HomeAssistant, callback from .exceptions import HomeAssistantError _LOGGER = ...
"type": RESULT_TYPE_EXTERNAL_STEP, "flow_id": self.flow_id,
<|file_name|>test_base_python.py<|end_file_name|><|fim▁begin|>import os import unittest import mozharness.base.python as python here = os.path.dirname(os.path.abspath(__file__)) class TestVirtualenvMixin(unittest.TestCase): def test_package_versions(self): example = os.path.join(here, 'pip-freeze.example...
if __name__ == '__main__': unittest.main()
<|file_name|>widgets_radio.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014-2015 Cedric Bellegarde <cedric.bellegarde@adishatz.org> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either ver...
<|file_name|>vmware_host_facts.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Wei Gao <gaowei3@qq.com> # Copyright: (c) 2018, Ansible Project # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute...
self.module.exit_json(changed=False, ansible_facts=ansible_facts)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" CryptoPy - a pure python cryptographic libraries<|fim▁hole|> Read LICENSE.txt for license information. """<|fim▁end|>
crypto.passwords package Copyright (c) 2002 by Paul A. Lambert
<|file_name|>apiserver.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 The Kubernetes 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/LICENSE-2.0 Unle...
// if we're dealing with the legacy group, we're done here
<|file_name|>0008_auto_20170422_1629.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-22 16:29 from __future__ import unicode_literals<|fim▁hole|>class Migration(migrations.Migration): dependencies = [ ('website', '0007_auto_20170422_1622'), ] operati...
from django.db import migrations, models