prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>contrived_std_string_find.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python """Do not call std::string::find_first_of or std::string::find with a string of characters to locate that has the size 1. Use the version of std::string::find that takes a single character to locate instead. Same for find_last_o...
r"rfind('\t')",
<|file_name|>contact_ball_ball.rs<|end_file_name|><|fim▁begin|>use crate::math::{Point, Vector}; use crate::query::Contact; use crate::shape::Ball; use na::{self, RealField, Unit}; /// Contact between balls.<|fim▁hole|> b1: &Ball<N>, center2: &Point<N>, b2: &Ball<N>, prediction: N, ) -> Option<Contact<N...
#[inline] pub fn contact_ball_ball<N: RealField>( center1: &Point<N>,
<|file_name|>state.rs<|end_file_name|><|fim▁begin|>use std::{ cell::RefCell, rc::Rc, sync::{ atomic::{AtomicBool, Ordering}, Arc, Mutex, }, }; use smithay::{ reexports::{ calloop::{generic::Generic, Interest, LoopHandle, Mode, PostAction}, wayland_server::{protocol::...
<|file_name|>SprintMB.java<|end_file_name|><|fim▁begin|>/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package edu.mum.ea.mb; import edu.mum.ea.ejb.ProjectEJB; import edu....
<|file_name|>uoccin_lookup.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals, division, absolute_import import os from flexget import plugin from flexget.event import event from flexget.utils import json def load_uoccin_data(path): udata = {} ufile = os.path.join(path, 'uoccin.json') ...
entry['uoccin_watched'] = episode in ser.get('watched', {}).get(season, []) elif 'imdb_id' in entry:
<|file_name|>text_util.py<|end_file_name|><|fim▁begin|>import re from nltk.corpus import stopwords from nltk.corpus import words from nltk.stem.snowball import SnowballStemmer from apiv2.models import QuestionText, Question from apiv2.search.fsearch import formula_extractor as fe cachedStopWords = stopwords.words("en...
<|file_name|>nxos_vpc_interface.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # This file is part of Ansible # # Ansible 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, o...
mapping = get_existing_portchannel_to_vpc_mappings(module)
<|file_name|>skill.py<|end_file_name|><|fim▁begin|># -*- coding: iso-8859-1 -*- # Copyright (C) 2011 Daniele Simonetti # # 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 version 2 of the L...
<|file_name|>howto.js<|end_file_name|><|fim▁begin|>(function(){ var app = angular.module('howtoApp', []); /*TODO - add custom filters https://scotch.io/tutorials/building-custom-angularjs-filters */ app.filter('facetedNavFilter', function() { return function(input,scope) { ...
$scope.defaultQry = "!padrenullquery";
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>/* * SPKI - Simple Public Key Infrastructure * * Copyright © 2014 Senso-Rezo * All rigths reserved. * * See LICENSE file for licensing information. * See http://github/olemaire/spki for more information. */ fn main() { Usage(); } fn Usage() { let message...
--help Display this short help message --version Will display the SPKI version
<|file_name|>FileDetail.js<|end_file_name|><|fim▁begin|>/** * Wheel, copyright (c) 2019 - present by Arno van der Vegt * Distributed under an MIT license: https://arnovandervegt.github.io/wheel/license.txt **/ const File = require('./File'); exports.FileDetail = class extends File.File { constructor(opts) { ...
}, !file.directory && file.size ?
<|file_name|>SynIO.hpp<|end_file_name|><|fim▁begin|>/* * File: SynIO.hpp * Author: Matteo Di Carlo * Created on March 17, 2016, 9:05 PM * * Copyright (C) 2016 Matteo Di Carlo - www.gleeno.com * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public...
<|file_name|>tests.rs<|end_file_name|><|fim▁begin|>use super::*; #[test] fn from_vec() { let q = Queue::from(vec![1, 2, 3]); assert_eq!(&vec![1, 2, 3], q.vec()); } #[test] fn from_empty_vec() { let v: Vec<i64> = Vec::new(); let q = Queue::from(v.clone()); assert_eq!(&v, q.vec()); } #[test] fn queue() { let mut...
fn vec_some() { let mut q = Queue::new();
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>declare module 'date-fns/end_of_month' { import {endOfMonth} from 'date-fns'<|fim▁hole|><|fim▁end|>
export = endOfMonth }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>''' Decomposition ------------- The core of sector decomposition. This module implements the actual decomposition routines. Common ~~~~~~ This module collects routines that are used by multiple decompition modules. .. autoclass:: pySecDec.decomposition.Sector .....
.. automodule:: pySecDec.decomposition.iterative :members:
<|file_name|>gradient_check.py<|end_file_name|><|fim▁begin|>import numpy as np from Other_samples.testCases import * from Other_samples.Gradient_check.gc_utils import sigmoid, relu, dictionary_to_vector, vector_to_dictionary, \ gradients_to_vector def forward_propagation(x, theta): """ Implement the line...
denominator = np.linalg.norm(grad) + np.linalg.norm(gradapprox) # Step 2'
<|file_name|>compute_rmsd_pdb_files.py<|end_file_name|><|fim▁begin|>""" Routines to compute RMSD of all PROT_IND_ files These routines were developed by: Rodrigo Antonio Faccioli - rodrigo.faccioli@usp.br / rodrigo.faccioli@gmail.com Leandro Oliveira Bortot - leandro.bortot@usp.br / leandro.obt@gmai...
<|file_name|>funcs.go<|end_file_name|><|fim▁begin|>package runners import ( "encoding/json" "fmt" "reflect" "strings" "text/template" "github.com/davecgh/go-spew/spew" "github.com/kylelemons/godebug/pretty" yaml "gopkg.in/yaml.v2" )<|fim▁hole|> return template.FuncMap{ "pretty": func(i interface{}) string {...
func getFuncs() template.FuncMap {
<|file_name|>Interface.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file '11.ui' # # Created by: PyQt5 UI code generator 5.8.2 # # WARNING! All changes made in this file will be lost! from __future__ import print_function from keras.preprocessing import seque...
from keras.layers import Dense, SpatialDropout1D,Dropout, Activation from keras.layers import Embedding
<|file_name|>QSETPeriodicHullImpl.java<|end_file_name|><|fim▁begin|>/* The contents of this file are subject to the Health Level-7 Public * License Version 1.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.hl7.org/HPL/ * * S...
throw new UnsupportedOperationException(); } }
<|file_name|>debug_endpoint.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import logging import os import sys import datetime import psutil from six import StringIO from twisted.web import http, resource from Tribler.Core.Utilities.instrumentation import WatchDog import Tribler.Core.Utilitie...
<|file_name|>HiveWriteUtils.java<|end_file_name|><|fim▁begin|>/* * 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 required by...
}
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>use std::env; use std::fs::{self, File}; use std::path::{MAIN_SEPARATOR, Path}; use j4rs; use j4rs::{Jvm, JvmBuilder, LocalJarArtifact, MavenArtifact}; fn main() { let ui_jar = "rust-keylock-ui-java-0.14.0.jar"; let desktop_ui_jar_in_java_target = format!(".....
let javaassets_path_buf = Path::new(&home).join("javaassets"); let javaassets_path = javaassets_path_buf.to_str().unwrap().to_owned();
<|file_name|>multibuffer_data_source_unittest.cc<|end_file_name|><|fim▁begin|>// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <stddef.h> #include <stdint.h> #include "base/bind.h" #include "ba...
EXPECT_TRUE(loading()); EXPECT_TRUE(data_source_->IsStreaming()); Stop();
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * @license Apache-2.0 * * Copyright (c) 2022 The Stdlib 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.apach...
// EXPORTS // module.exports = main;
<|file_name|>LoginController.java<|end_file_name|><|fim▁begin|>package com.ues21.ferreteria.login; import java.util.ArrayList; import java.util.List; import java.util.Map; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Cont...
<|file_name|>RedisFactory.py<|end_file_name|><|fim▁begin|>from JumpScale9 import j redisFound = False try: from .Redis import Redis from .RedisQueue import RedisQueue from redis._compat import nativestr # import itertools import socket redisFound = True except: pass import os import time # ...
self.cache_clear() self._running = None
<|file_name|>HeaderTransformer.ts<|end_file_name|><|fim▁begin|>import isUndefined from 'lodash.isundefined'; import isFunction from 'lodash.isfunction'; import uniq from 'lodash.uniq'; import groupBy from 'lodash.groupby'; import { ParserOptions } from '../ParserOptions'; import { HeaderArray, HeaderTransformFu...
private processedFirstRow = false;
<|file_name|>ComparatorLambda.java<|end_file_name|><|fim▁begin|>package at.ltd.tools.fw.peer2peerFirewall.backend.entities.comparator; <|fim▁hole|> @FunctionalInterface public interface ComparatorLambda<T> { int comp(T t1, T t2); }<|fim▁end|>
<|file_name|>collection_artifact.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import json from changes.config import db from changes.constants import Result from changes.models.jobplan import JobPlan from changes.utils.http import build_web_uri from .base import ArtifactHandler, ArtifactPars...
""" def process(self, fp, artifact): try: phase_config = json.load(fp)
<|file_name|>TableViewEditPart.java<|end_file_name|><|fim▁begin|>// LICENSE package com.forgedui.editor.edit; import java.beans.PropertyChangeEvent; import java.util.ArrayList; import java.util.List; import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.gef.commands.Command; import org.eclipse.gef.requests...
List list = new ArrayList(super.getModelChildren_()); TableView model = (TableView)getModel(); if (model.getHeaderView() != null){
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! IO related functions <|fim▁hole|>pub mod arguments; pub mod constants; pub mod events; pub mod graphics; pub mod sound;<|fim▁end|>
pub mod applicationsettings; pub mod applicationstate;
<|file_name|>checkout.js<|end_file_name|><|fim▁begin|>var express = require('express') var braintree = require('braintree') var router = express.Router() // eslint-disable-line new-cap var gateway = require('../lib/gateway') var TRANSACTION_SUCCESS_STATUSES = [ braintree.Transaction.Status.Authorizing, braintree.T...
braintree.Transaction.Status.SubmittedForSettlement
<|file_name|>sin.rs<|end_file_name|><|fim▁begin|>//! Implements vertical (lane-wise) floating-point `sin`. macro_rules! impl_math_float_sin { ([$elem_ty:ident; $elem_count:expr]: $id:ident | $test_tt:tt) => { impl $id { /// Sine. #[inline] pub fn sin(self) -> Self { ...
/// Sine and cosine of `self * PI`. #[inline]
<|file_name|>write.ts<|end_file_name|><|fim▁begin|>import { Nibble, UInt4 } from '../types' /** * Returns a Nibble (0-15) which equals the given bits. * * @example * byte.write([1,0,1,0]) => 10 * * @param {Array} nibble 4-bit unsigned integer * @return {Number} */ export default (nibble: Nibble): UInt4 => { i...
return <UInt4>result }
<|file_name|>trait-inheritance-auto.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.apa...
<|file_name|>traversal.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 context::{SharedStyleContext, StyleContext}; use dom::{...
"Putting into a never-taken thread-local bloom filter"); *style_bloom.borrow_mut() = Some((bf, *unsafe_node, context.generation)); }) }
<|file_name|>getcbsperiod.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2009 Lund University * * Written by Anton Cervin, Dan Henriksson and Martin Ohlin, * Department of Automatic Control LTH, Lund University, Sweden. * * This file is part of Truetime 2.0 beta. * * Truetime 2.0 beta is free software: ...
* Truetime 2.0 beta is distributed in the hope that it will be useful, but
<|file_name|>0013_show2.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations<|fim▁hole|> class Migration(migrations.Migration): dependencies = [ ('setlist', '0012_remove_show_leg'), ] operations = [ migra...
<|file_name|>style.rs<|end_file_name|><|fim▁begin|>use std::borrow::Cow; use std::collections::HashMap; use std::fmt::{self, Write}; use std::mem; use console::{measure_text_width, Style}; #[cfg(feature = "improved_unicode")] use unicode_segmentation::UnicodeSegmentation; use crate::format::{ BinaryBytes, Decimal...
#[derive(Copy, Clone, Debug, PartialEq)]
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # 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|>RegionEnteredEvent.java<|end_file_name|><|fim▁begin|>package net.senmori.customtextures.events; import net.senmori.customtextures.util.MovementType; import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerEvent; import com.sk89q.worldguard.protection.regions.ProtectedRegion; /** ...
/** * creates a new RegionEnteredEvent * @param region the region the player entered
<|file_name|>predicates.py<|end_file_name|><|fim▁begin|>######################################################################## # amara/xpath/locationpaths/predicates.py """ A parsed token that represents a predicate list. """ from __future__ import absolute_import from itertools import count, izip from amara.xpath i...
self.select = izip()
<|file_name|>calendar-base_ru.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1<|fim▁hole|>size 394<|fim▁end|>
oid sha256:7678f6e4188a6066c45fd9a295882aea8e986bbc11eea3dbeabf24eca190b774
<|file_name|>arnoldi.rs<|end_file_name|><|fim▁begin|>use ndarray::*; use ndarray_linalg::{krylov::*, *}; #[test] fn aq_qh_mgs() { let a: Array2<f64> = random((5, 5)); let v: Array1<f64> = random(5); let (q, h) = arnoldi_mgs(a.clone(), v, 1e-9); println!("A = \n{:?}", &a); println!("Q = \n{:?}", &q)...
println!("Q = \n{:?}", &q);
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! This crate defines [structs for the on-disk minidump format](format/index.html) as well as<|fim▁hole|>//! the actual functionality of reading minidumps using the structs defined in this crate. //! //! [minidump]: https://crates.io/crates/minidump #![warn(missing_deb...
//! [some common traits](traits/index.html) used by related crates. //! //! You probably don't want to use this crate directly, the [minidump][minidump] crate provides
<|file_name|>attendances.js<|end_file_name|><|fim▁begin|>'use strict'; /**<|fim▁hole|> Schedule = mongoose.model('Schedule'), Group = mongoose.model('Group'), _ = require('lodash'); exports.attendance = function(req, res, next, id) { CurrentModel.load(id, function(err, item) { if (err) return next(err); ...
* Module dependencies. */ var mongoose = require('mongoose'), CurrentModel = mongoose.model('Attendance'),
<|file_name|>set.go<|end_file_name|><|fim▁begin|>package suffix import ( "bufio" "fmt" "io" "sort" "strings" ) type matchType uint8 const (<|fim▁hole|> // matchMore doesn't match anything directly, // but indicates there are more matching suffixes. matchMore = 1 << iota matchExact = 1 << iota // match exac...
matchNone matchType = iota
<|file_name|>boss_koralon.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2014-2017 StormCore * * 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 version 2 of the License, or (at y...
break; case EVENT_BURNING_BREATH:
<|file_name|>hello_coroutine.py<|end_file_name|><|fim▁begin|>"""Print 'Hello World' every two seconds, using a coroutine.""" import asyncio @asyncio.coroutine def greet_every_two_seconds(): while True: print('Hello World') yield from asyncio.sleep(2) if __name__ == '__main__': loop = asynci...
loop.close()
<|file_name|>dependency.py<|end_file_name|><|fim▁begin|># orm/dependency.py # Copyright (C) 2005, 2006, 2007, 2008 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Bridge the ``PropertyLoader`` (...
def preprocess_dependencies(self, task, deplist, uowcommit, delete = False): #print self.mapper.mapped_table.name + " " + self.key + " " + repr(len(deplist)) + " preprocess_dep isdelete " + repr(delete) + " direction " + repr(self.direction) if delete:
<|file_name|>ADM_muxerUtils.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************** ADM_muxerUtils.cpp - description ------------------- copyright : (C) 2008 by mean email : f...
i=(i+scale->num-1)/scale->num;
<|file_name|>RayWarper.java<|end_file_name|><|fim▁begin|>package au.com.codeka.planetrender; import java.util.Random; import au.com.codeka.common.PerlinNoise; import au.com.codeka.common.Vector2; import au.com.codeka.common.Vector3; /** * This class takes a ray that's going in a certain direction and warps it based...
<|file_name|>lexer.rs<|end_file_name|><|fim▁begin|>use lexeme::Lexeme; /*** * Structure Lexer * -> Lexical Analyzer structure used to analyze given source code */ #[allow(dead_code)] pub struct Lexer<'a>{ index: usize, errors: u32, code: String, whitespaces: String, terminals: Vec<&'a str>, l...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![crate_type = "lib"] #![crate_name = "comm"] #![feature(box_syntax, core, alloc, oom, heap_api, unsafe_no_drop_flag, filling_drop, wait_timeout, wait_timeout_with, static_mutex, raw, nonzero, drain, num_bits_bytes)] #![cfg_attr(test, feature(test,...
//! Shared usage: //!
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|> * @license * Copyright Mauricio Gemelli Vigolo. * * Use of this source code is governed by a MIT-style license that can be * found in the LICENSE file at https://github.com/orchejs/rest/LICENSE */ export * from './interceptor.loader'; export * from '....
/**
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from flask import Flask from flask.ext.bootstrap import Bootstrap from flask.ext.mail import Mail from flask.ext.moment import Moment from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager from flask.ext.pagedown import PageDown from co...
return app
<|file_name|>tag_test.go<|end_file_name|><|fim▁begin|>package dao import ( "context" "go-common/app/admin/main/growup/model" "testing" "github.com/smartystreets/goconvey/convey" ) func TestDaoUpdateTagState(t *testing.T) { convey.Convey("UpdateTagState", t, func(ctx convey.C) { var ( c = context.Ba...
} )
<|file_name|>test_transfer.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # test_transfer.py # # Copyright (C) 2012 Bro <bro.development@gmail.com> # # Deluge is free software. # # You may redistribute it and/or modify it under the terms of the # GNU General Public License, as published by the Free Software ...
<|file_name|>template.py<|end_file_name|><|fim▁begin|># -*- python -*- # Package : omniidl # template.py Created on: 2000/01/18 # Author : David Scott (djs) # # Copyright (C) 2003-2008 Apasphere Ltd # Copyright (C) 1999 AT&T Laboratories Cambridge # # This file ...
"""
<|file_name|>FNV.ts<|end_file_name|><|fim▁begin|>namespace ZincDB { export namespace Hashing { export namespace FNV {<|fim▁hole|> export const fnv1a = function(bytes: Uint8Array | Buffer): number { let hash = 0x811c9dc5; for (let i = 0, len = bytes.length; i < len; i++) { hash ^= bytes[i]; hash ...
// Based on http://isthe.com/chongo/tech/comp/fnv/
<|file_name|>tests.rs<|end_file_name|><|fim▁begin|>use super::rocket; use rocket::testing::MockRequest; use rocket::http::Method::*; #[test] fn hello_world() { let rocket = rocket::ignite().mount("/", routes![super::hello]); let mut req = MockRequest::new(Get, "/"); let mut response = req.dispatch_with(&ro...
<|file_name|>unattended_install.py<|end_file_name|><|fim▁begin|>from __future__ import division import logging import time import re import os import tempfile import threading import shutil import stat import xml.dom.minidom try: import configparser as ConfigParser except ImportError: import ConfigParser from ...
<|file_name|>TestPlugins.js<|end_file_name|><|fim▁begin|>/* ************************************************************************ * * qxcompiler - node.js based replacement for the Qooxdoo python * toolchain * * https://github.com/qooxdoo/qooxdoo-compiler * * Copyright: * 2011-2018 Zenesis L...
members: { testSimple: function() { qx.io.PartLoader.require(["pluginFramework", "pluginOne"], () => { this.debug("pluginOne loaded");
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import include, url from ginger.views import utils __all__ = ('include', 'url', 'scan', 'scan_to_include') def scan(module, predicate=None): view_classes = utils.find_views(module, predicate=predicate) urls = [] for view in view_cla...
return scan(module, predicate), app_name, namespace
<|file_name|>give_player_dialog.hpp<|end_file_name|><|fim▁begin|>class GivePlayerDialog { idd = -1; movingenable = 0; enableSimulation = true; class controlsBackground { class Life_RscTitleBackground2:Life_RscText { colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilename...
y = 0.2; w = 0.3; h = (1 / 25);
<|file_name|>main.go<|end_file_name|><|fim▁begin|>// Copyright 2013 Prometheus Team // 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 // // Unl...
// Pruner is responsible for cleaning all Prometheus disk databases, which
<|file_name|>no-undef.js<|end_file_name|><|fim▁begin|>/** * @fileoverview Rule to flag references to undeclared variables. * @author Mark Macdonald */ "use strict"; //------------------------------------------------------------------------------ // Helpers //---------------------------------------------------------...
context.report({ node: identifier, message: "'{{name}}' is not defined.", data: identifier
<|file_name|>tmdrv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright 2016, 2017 Andrew Conrad # # 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 version 3 of the License,...
"""Tool to initialize Thrustmaster racing wheels.""" import argparse import time
<|file_name|>finally.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/license...
*
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup # type: ignore[import] with open("README.md", "r") as fh: long_description = fh.read() setup( name="objname", version="0.12.0", packages=["objname"], package_data={ "objname": ["__init__.py", "py.typed", "_mo...
<|file_name|>16.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export { Moonrise16 as default } from "../../";
<|file_name|>shapiro.rs<|end_file_name|><|fim▁begin|>extern crate diffgeom; extern crate gr_engine; #[macro_use] extern crate generic_array; extern crate numeric_algs; use diffgeom::coordinates::Point; use diffgeom::tensors::Vector; use gr_engine::coord_systems::schwarzschild::{Mass, Schwarzschild}; use gr_engine::par...
let start_point = Point::<Coords>::new(arr![f64; 0.0, D, PI / 2.0, 0.0]); let u_init1 = Vector::<Coords>::new(start_point.clone(), arr![f64; u0, 0.0, 0.0, 1.0]); let u_init2 = Vector::<Coords>::new(start_point.clone(), arr![f64; -u0, 0.0, 0.0, -1.0]);
<|file_name|>serialize.cc<|end_file_name|><|fim▁begin|>// { dg-options "-std=gnu++11" } // { dg-require-cstdint "" } // // 2012-01-28 Edward M. Smith-Rowland <3dw4rd@verizon.net> // // Copyright (C) 2012-2015 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // s...
<|file_name|>gsharpnote.go<|end_file_name|><|fim▁begin|>package gx var gsharpnote = []byte{ 0xff, 0xfb, 0x50, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x69, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x08, 0xfa, 0x00, 0x03, 0xa6, 0xc8, 0x...
0xd0, 0x46, 0x97, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0x24, 0x31, 0x75, 0x40, 0x24, 0x1a, 0x59, 0x98, 0x30, 0x89, 0xd1, 0xbf, 0x5b, 0x6f, 0x9d, 0xfa, 0x81, 0x8e, 0x05, 0xad, 0x67, 0x05, 0x53, 0x26, 0x29, 0x11, 0xb4, 0xf3, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff...
<|file_name|>Dag.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 under the A...
* @param queuedNodes list of queued nodes
<|file_name|>opt3.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import subprocess short_name = 'Opt 3' disp_name = 'Option 3 Submenu' otype = 'Routine' need = ['need 1: ', 'need 2: ', 'need 3: '] answers = [] def run(): global answers while True: subprocess.call('clear') i = 0 while i < len(need): ...
<|file_name|>logger.py<|end_file_name|><|fim▁begin|>""" Component that will help set the level of logging for components. For more details about this component, please refer to the documentation at https://home-assistant.io/components/logger/ """ import logging from collections import OrderedDict import voluptuous as...
hass.services.call(DOMAIN, SERVICE_SET_LEVEL, logs)
<|file_name|>problem04.py<|end_file_name|><|fim▁begin|>#!/usr/local/bin/python3 # Find the number of elements of a list def lenOf(mylist):<|fim▁hole|>print (lenOf("")) print (lenOf([123,123,123]))<|fim▁end|>
return (len(mylist)) print (lenOf("Hello"))
<|file_name|>CustomRequestScopeAttr.java<|end_file_name|><|fim▁begin|>package org.innovateuk.ifs.registration.service; import org.springframework.web.context.request.RequestAttributes; import java.util.HashMap; import java.util.Map; /** * This solves the java.lang.IllegalStateException: Cannot ask for request attri...
public void removeAttribute(String name, int scope) { if (scope == RequestAttributes.SCOPE_REQUEST) {
<|file_name|>Category.py<|end_file_name|><|fim▁begin|># SecuML # Copyright (C) 2016-2017 ANSSI # # SecuML 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 2 of the License, or # (at your option)...
if kind not in list(self.annotation_queries.keys()): self.annotation_queries[kind] = [] for index, row in queries_df.iterrows(): query = self.generateAnnotationQuery(int(index), row['likelihood'],
<|file_name|>pop3Dclrt.cpp<|end_file_name|><|fim▁begin|>/* program to compute the CLRT from 3D SFS input is a global 3D sfs file and the corresponding local windows 3D sfs file */ #include <iostream> #include <fstream> #include <vector> #include <string> #include <sstream> #include <cmath> #include <iomani...
return CLRT; }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Support for the (unofficial) Tado API.""" import asyncio from datetime import timedelta import logging from PyTado.interface import Tado from requests import RequestException import requests.exceptions import voluptuous as vol from homeassistant.components.clim...
device_type, "ON", mode,
<|file_name|>V3DResourceMemory.cpp<|end_file_name|><|fim▁begin|>#include "V3DResourceMemory.h" #include "V3DDevice.h" #include "V3DBuffer.h" #include "V3DImage.h" #include "V3DAdapter.h" /******************************/ /* public - V3DResourceMemory */ /******************************/ V3DResourceMemory* V3D...
vkOffsets[i] = vkAllocSize; vkAllocSize += resourceDesc.memorySize; }
<|file_name|>dataflow.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/l...
cfg.graph.each_node(|node_index, node| {
<|file_name|>ts_plugin_spec.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google LLC 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 */ import {LanguageService} from '../../language_service'; i...
externalFiles = getExternalFiles(project);
<|file_name|>app.go<|end_file_name|><|fim▁begin|>package main import ( "strings" "strconv" "time" "bufio" "regexp" "fmt" "os" ) var rules = map[string]map[string]*regexp.Regexp{ "food": map[string]*regexp.Regexp{ "ALBERT HEIJN": regexp.MustCompile(`ALBERT HEIJN`), "Jumb...
p.currency = matched[0][2]
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin # Register your models here. from .models import Author, Genre, Book, BookInstance, Language """ # Minimal registration of Models. admin.site.register(Book)<|fim▁hole|>admin.site.register(BookInstance) admin.site.register(Genre) admi...
admin.site.register(Author)
<|file_name|>trimEmptyImports.ts<|end_file_name|><|fim▁begin|>import { ModuleDeclarationDependency } from '../../Chunk'; export default function trimEmptyImports(dependencies: ModuleDeclarationDependency[]) { let i = dependencies.length; while (i--) { const dependency = dependencies[i]; if (dependency.exportsDe...
<|file_name|>Matreshka.Array#renderIfPossible.jsdoc.js<|end_file_name|><|fim▁begin|>/** @member {boolean} Seemple.Array#renderIfPossible @importance 3<|fim▁hole|>@example class MyArray extends Seemple.Array { get renderIfPossible() { return false; } // ... }); */<|fim▁end|>
@summary The ``renderIfPossible`` property cancels the array rendering if it equals ``false`` @see {@link Seemple.Array#itemRenderer}
<|file_name|>multicol.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ //! CSS Multi-column layout http://dev.w3.org/csswg/css-mult...
}
<|file_name|>animation.cpp<|end_file_name|><|fim▁begin|>#include "prism/animation.h" #include <stdlib.h> #include "prism/log.h" #include "prism/datastructures.h" #include "prism/memoryhandler.h" #include "prism/system.h" #include "prism/timer.h" #include "prism/stlutil.h" using namespace std; static struct { int ...
static void setAnimationRotationZ_internal(AnimationHandlerElement* e, double tAngle, const Vector3D& tCenter) { e->mIsRotated = 1;
<|file_name|>RegistrationHandler.py<|end_file_name|><|fim▁begin|>from piston.handler import BaseHandler from piston.utils import rc from telemaco.models import User from django.db.utils import IntegrityError class RegistrationHandler(BaseHandler): class _UserProxy(User): pass allowed_methods = ('POST') ...
<|file_name|>graphite.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Resource information of graphite """ def get_name(friendly=False): """Get name of this resource :return: name of this resource :rtype: str """ if friendly: # pragma: no cover return 'G...
'nullable': True,
<|file_name|>PrintSurfaceTypeArrayListener.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>energymodels.PrintSurfaceTypeArrayListener<|fim▁end|>
<|file_name|>tpl-py-0001.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #################################### # # --- TEXTPATGEN TEMPLATE --- # # Users can change the output by editing # this file directly. # #################################### import sys<|fim▁hole|> sys.stdout.write('#########################...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. *<|fim▁hole|> * LICENSE file in the root directory of this source tree. */ use fixture_tests::Fixture; use relay_transforms::{ transform_connections, transform_refetchable_fragment, ConnectionInterface, }; us...
* This source code is licensed under the MIT license found in the
<|file_name|>gstr_1.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt frappe.query_reports["GSTR-1"] = { "filters": [ { "fieldname":"company", "label": __("Company"), "fieldtype": "Link", "opti...
{ "fieldname":"to_date",
<|file_name|>problem-048.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 Peter Beard // Distributed under the GNU GPL v2. For full terms, see the LICENSE file. // #![feature(test)] extern crate test; /// Compute n^p mod b fn modular_pow(n: u64, p: u64, b: u64) -> u64 { let mut pow = n % b; for _ in 1..p { ...
<|file_name|>jsonSchema.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. *-------...
patternErrorMessage?: string; // VSCode extension deprecationMessage?: string; // VSCode extension