prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>onlinesignin.js<|end_file_name|><|fim▁begin|>var clientid = '4c3b2c1b-364c-4ceb-9416-8371dd4ebe3a'; if (/^#access_token=/.test(location.hash)) { location.assign('/Home/index?auto=1&ss=0' + '&cors=1' + '&client_id=' + clientid+ '&origins=https://webdir.online.lync.com/a...
<|file_name|>game.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright (C) 2007 Sascha Peilicke <sasch.pe@gmx.de> # # 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 ...
elif field == FIELD_MARKED_VALID: self.__level[row][col] = FIELD_VALID
<|file_name|>4_04_system_of_systems.rs<|end_file_name|><|fim▁begin|>// The Nature of Code // Daniel Shiffman // http://natureofcode.com // // example 4-04: System of Systems use nannou::prelude::*; fn main() { nannou::app(model).update(update).run(); } struct Model { systems: Vec<ParticleSystem>, } // A simp...
let mut particles = Vec::new(); // Initialise the Vector for _i in 0..num {
<|file_name|>diff_index_scanner.go<|end_file_name|><|fim▁begin|>package lfs import ( "bufio" "fmt" "strconv" "strings" "github.com/git-lfs/git-lfs/errors" "github.com/git-lfs/git-lfs/git" ) // Status represents the status of a file that appears in the output of `git // diff-index`. // // More information about...
// https://git-scm.com/docs/git-diff-index
<|file_name|>RegionPass.cpp<|end_file_name|><|fim▁begin|>//===- RegionPass.cpp - Region Pass and Region Pass Manager ---------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //=...
<|file_name|>qubole_operator.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 t...
# software 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
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url<|fim▁hole|>from . import views urlpatterns = [ # Captures special abbreviations and redirects to UOS websites url(r"^(?P<site>bb|udc|ms|uos)/?$", views.redirect_to_uos), # All website related requests link to views.layout ...
<|file_name|>mnist.py<|end_file_name|><|fim▁begin|>__author__ = 'igor' """ 构建 mnist network 构建 Graph 1.inference() - Builds the model as far as is required for running the network forward to make predictions. 2.loss() -Adds to the inference model the layers required to generate loss 3.training() - Adds to the loss mo...
concated = tf.concat(1, [indices, labels]) one_hot_labels = tf.sparse_to_dense( concated, tf.pack([batch_size, NUM_CLASSES]), 1.0, 0.0)
<|file_name|>test_dauth.py<|end_file_name|><|fim▁begin|>from nintendo import dauth, switch from anynet import http import pytest <|fim▁hole|> "Host: 127.0.0.1:12345\r\n" \ "User-Agent: libcurl (nnDauth; 16f4553f-9eee-4e39-9b61-59bc7c99b7c8; SDK 12.3.0.0)\r\n" \ "Accept: */*\r\n" \ "X-Nintendo-PowerState: FA...
CHALLENGE_REQUEST = \ "POST /v6/challenge HTTP/1.1\r\n" \
<|file_name|>jqueryui_integration.component.ts<|end_file_name|><|fim▁begin|>/** * Created by jebaprince on 1/23/2017. */ import {Component, AfterViewInit, ViewChild, ElementRef} from '@angular/core'; import {Inject} from '@angular/core'; declare var $:any; @Component({ templateUrl: 'resources/app/app_templ...
}
<|file_name|>ty.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LIC...
span: Span, self_ty: Ident,
<|file_name|>alg.py<|end_file_name|><|fim▁begin|>import astra def gpu_fp(pg, vg, v): v_id = astra.data2d.create('-vol', vg, v) rt_id = astra.data2d.create('-sino', pg) fp_cfg = astra.astra_dict('FP_CUDA') fp_cfg['VolumeDataId'] = v_id fp_cfg['ProjectionDataId'] = rt_id fp_id = astra.algorithm.create(fp_cfg...
<|file_name|>dir_code.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #include <dirent.h> #include <errno.h> using namespace std; int main(int argc, char** argv) { if(argc <= 1) { ...
<|file_name|>ManaUsageChartComponent.js<|end_file_name|><|fim▁begin|>import React from 'react'; import PropTypes from 'prop-types'; import ManaUsageGraph from './ManaUsageGraph'; class HealingDoneGraph extends React.PureComponent { static propTypes = { start: PropTypes.number.isRequired, end: PropTypes.numb...
} export default HealingDoneGraph;
<|file_name|>indexentries.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ sphinx.environment.managers.indexentries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Index entries manager for sphinx.environment. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see ...
# hack: mutating the subitems dicts to a list in the keyfunc
<|file_name|>build.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md> extern crate build; fn main() { build::link("wow32", true) }<|fim▁end|>
<|file_name|>prompt.py<|end_file_name|><|fim▁begin|>""" Enables interactivity for CLI operations """ import sys <|fim▁hole|> "question" is a string that is presented to the user. "default" is the presumed answer if the user just hits <Enter>. It must be "yes" (the default), "no" or None (meaning ...
def query_yes_no(question, default="yes"): """Ask a yes/no question via raw_input() and return their answer.
<|file_name|>geojsonsource.js<|end_file_name|><|fim▁begin|>goog.provide('ol.source.GeoJSON'); goog.require('ol.format.GeoJSON'); goog.require('ol.source.StaticVector'); /** * @classdesc * Static vector source in GeoJSON format * <|fim▁hole|> * @constructor * @extends {ol.source.StaticVector} * @fir...
<|file_name|>attachment.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) 2003-2009 Edgewall Software # Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com> # Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de> # All rights reserved. # # This software is licensed as described in the file...
self.ipnr = ipnr
<|file_name|>ast.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/licens...
#[deriving(PartialEq, Eq, Encodable, Decodable, Hash, Show)] pub struct BareFnTy {
<|file_name|>instrumenttype.py<|end_file_name|><|fim▁begin|>from openerp import fields, models,osv<|fim▁hole|> from base_olims_model import BaseOLiMSModel from openerp.tools.translate import _ from fields.string_field import StringField from fields.text_field import TextField from fields.widget.widget import TextAreaWi...
<|file_name|>compress_nc.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from __future__ import print_function<|fim▁hole|>import multiprocessing as mp import subprocess as sp import tempfile import shlex import shutil """ Compress all netcdf files under a directories. compress_nc.py ~/exps/access/cm_1440x1080-...
import argparse import sys import os
<|file_name|>security-group-page.component.ts<|end_file_name|><|fim▁begin|>import { Component, Input } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { SecurityGroup } from '../sg.model'; import { ViewMode } from '../../shared/components/view-mode-switch/view-mode-switch.compone...
private activatedRoute: ActivatedRoute, public listService: ListService, ) {}
<|file_name|>run.go<|end_file_name|><|fim▁begin|>package main import ( "net/url" "time" "github.com/codegangsta/cli" "github.com/michaeltrobinson/cadvisor-integration/scraper" "github.com/signalfx/metricproxy/protocol/signalfx" log "github.com/Sirupsen/logrus" ) var ( sfxAPIToken string sfxIngestURL ...
Action: run, Before: setupRun, Flags: []cli.Flag{ cli.StringFlag{
<|file_name|>dump-stats.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import time, json # Run this as 'watch python misc/dump-stats.py' against a 'wormhole-server # start --stats-file=stats.json' with open("stats.json") as f: data_s = f.read() now = time.time() data = json.loads(data_s) i...
<|file_name|>errorcodes.js<|end_file_name|><|fim▁begin|>module.exports = { errorcodes: { NoError: 0, GeneralError: 1, InvalidGame: 2, Timeout: 3, InvalidRequest: 4, DoNotTrack: 5, GeoIPDisabled: 100, LeaderboardsDisabled: 200, I...
"405": "Level already exists",
<|file_name|>jsonobject.cpp<|end_file_name|><|fim▁begin|>#include "jsonobject.h" #include "jsonparser.h" namespace amgcommon { namespace json { JsonObject::JsonObject(string rawJson) { this->originalJson = rawJson; this->root = JsonNode(); } ...
return this->root.toString(); } JsonNode JsonObject::getRoot() {
<|file_name|>util.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // /...
}
<|file_name|>lib.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/. */ //! Servo, the mighty web browser engine from the future. //! //!...
__errno() }
<|file_name|>importborme.py<|end_file_name|><|fim▁begin|>from django.core.management.base import BaseCommand from django.utils import timezone import logging import time from borme.models import Config from borme.parser.importer import import_borme_download # from borme.parser.postgres import psql_update_documents im...
parser.add_argument( '--no-missing', action='store_true', default=False,
<|file_name|>checkMeshDict.H<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | cfMesh: A library for mesh generation \\ / O peration | \\ / A nd | Author: Franjo Juretic (...
); //- check removeCellsIntersectingPatches entry
<|file_name|>CacheSerializationTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2008-2020, Hazelcast, 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 ...
CacheReplicationOperation operation = new CacheReplicationOperation(); operation.prepare(segment, namespaces, replicaIndex); Data serialized = service.toData(operation); try {
<|file_name|>Error.cc<|end_file_name|><|fim▁begin|>#include <apertium_xml2cpp.h> #include <string><|fim▁hole|>#include <iostream> namespace apertium { namespace xml2cpp { } // namespace xml2cpp } // namespace apertium<|fim▁end|>
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Scrapy settings for DynamicItemsScrapy project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/t...
# See also autothrottle settings and docs
<|file_name|>request.go<|end_file_name|><|fim▁begin|>// // Last.Backend LLC CONFIDENTIAL // __________________ // // [2014] - [2019] Last.Backend LLC // All Rights Reserved. // // NOTICE: All information contained herein is, and remains // the property of Last.Backend LLC and its suppliers, // if any. The intellectua...
<|file_name|>xss.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- __license__ = """<|fim▁hole|>GoLismero 2.0 - The web knife - Copyright (C) 2011-2014 Authors: Jekkay Hu | jekkay<@>gmail.com Daniel Garcia Garcia a.k.a cr0hn | cr0hn<@>cr0hn.com Mario Vilas | mvilas<@>gmail.com Golismero...
<|file_name|>shuffle_an_array.rs<|end_file_name|><|fim▁begin|>extern crate rand; use rand::Rng; fn swap(arr: &mut Vec<i64>, i: usize) { let a = &arr[i]; arr[i] = arr[i + 1]; arr[i + 1] = *a;<|fim▁hole|>} fn randomize(arr: &Vec<i64>) -> Vec<i64> { let mut rng = rand::thread_rng(); let mut temp = ar...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>''' Setup.py script. ''' __author__ = 'riko' from Cython.Build import cythonize import numpy from setuptools import setup, Extension, find_packages try: use_cython = True from Cython.Distutils import build_ext except ImportError: use_cython = False ex...
print "Doing extensions: ", ext_modules
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Library for performing speech recognition with the Google Speech Recognition API.""" __author__ = 'Anthony Zhang (Uberi)' __version__ = '1.0.4' __license__ = 'BSD' import io, subprocess, wave, shutil import math, audioop, collections import json, urllib.request...
# handle timeout if specified elapsed_time += seconds_per_buffer
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*- from lino.projects.std.settings import * <|fim▁hole|> class Site(Site): title = "Lino@prj1" # server_url = "https://prj1.mydomain.com" SITE = Site(globals()) # locally override attributes of individual plugins # SITE.plugins.fi...
import logging logging.getLogger('weasyprint').setLevel("ERROR") # see #1462
<|file_name|>issue-28472.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.or...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import random import string from django.contrib.auth.models import User from django.test import TestCase from longerusernameandemail.forms import UserCreationForm def get_random_string(alpha=string.ascii_letters, length=100): "Get a 'long', randmon string" ...
self.assertTrue(form.is_valid())
<|file_name|>e10.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python -tt -Wall def prime_sieve(upper):<|fim▁hole|> def next_prime(): for i,v in enumerate(marked): if not v: yield i+2 next_prime_gen = next_prime() for p in next_prime_gen: for n in xrange(2*p - 2, len(marked), p): marked[n] = True y...
marked = [False] * (upper-2)
<|file_name|>boolean.rs<|end_file_name|><|fim▁begin|>//! [Lambda-encoded booleans](https://en.wikipedia.org/wiki/Church_encoding#Church_Booleans) use crate::term::Term::*; use crate::term::{abs, app, Term}; /// A lambda-encoded boolean `true`. /// /// TRUE ≡ λab.a ≡ λ λ 2 pub fn tru() -> Term { abs!(2, Var(2)) } ...
} /// Applied to a lambda-encoded predicate and two terms it returns the first one if the predicate
<|file_name|>appengine.settings.ts<|end_file_name|><|fim▁begin|>import type { IProviderSettings } from '@spinnaker/core'; import { SETTINGS } from '@spinnaker/core'; export interface IAppengineProviderSettings extends IProviderSettings { defaults: { account?: string; }; } export const AppengineProviderSetting...
if (AppengineProviderSettings) {
<|file_name|>find.dutch.test.ts<|end_file_name|><|fim▁begin|>import { findWord, PartialFindOptions, FindFullResult } from './find'; import * as fs from 'fs-extra'; import * as zlib from 'zlib'; import { importTrie } from './importExport'; import { TrieNode } from './TrieNode'; import * as path from 'path'; import { no...
Lange woorden: Kindercarnavalsoptochtenvoorbereidingswerkzaamheden
<|file_name|>hashing_analyzer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the Hashing analyzer.""" import unittest from plaso.containers import analyzer_result from plaso.analyzers import hashing_analyzer from plaso.analyzers.hashers import manager from tests import te...
<|file_name|>PolyhedraRenderer.js<|end_file_name|><|fim▁begin|>Clazz.declarePackage ("J.renderspecial"); Clazz.load (["J.render.ShapeRenderer"], "J.renderspecial.PolyhedraRenderer", ["JU.P3i", "JM.Atom", "JU.C"], function () { c$ = Clazz.decorateAsClass (function () { this.drawEdges = 0; this.isAll = false; this.f...
var atom = (Clazz.instanceOf (vertices[i], JM.Atom) ? vertices[i] : null);
<|file_name|>InsertionSort.java<|end_file_name|><|fim▁begin|>package tutorialHorizon.arrays; /** * Created by archithrapaka on 7/4/17. */ public class InsertionSort { public static void insertionSort(int[] items, int n) { int i, j; for (i = 1; i < n; i++) { j = i; while ...
items[i] = items[j]; items[j] = temp;
<|file_name|>unused-macro-with-bad-frag-spec.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT.<|fim▁hole|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or ...
//
<|file_name|>DdosProtectionPlanTests.java<|end_file_name|><|fim▁begin|>// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package com.azure.resourcemanager.network; <|fim▁hole|>import com.azure.resourcemanager.test.utils.TestUtilities; import com.azure.core.management.Region...
import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.network.models.DdosProtectionPlan;
<|file_name|>net.rs<|end_file_name|><|fim▁begin|>//! A collection of traits abstracting over Listeners and Streams. use std::any::{Any, TypeId}; use std::fmt; use std::io::{self, ErrorKind, Read, Write}; use std::net::{SocketAddr, ToSocketAddrs, TcpStream, TcpListener, Shutdown}; use std::mem; #[cfg(feature = "openssl...
match *self { HttpsStream::Http(ref mut s) => s.peer_addr(), HttpsStream::Https(ref mut s) => s.peer_addr()
<|file_name|>line_modification.cc<|end_file_name|><|fim▁begin|>#include "line_modification.hh" #include "buffer.hh" #include "unit_tests.hh" namespace Kakoune { static LineModification make_line_modif(const Buffer::Change& change) { LineCount num_added = 0, num_removed = 0; if (change.type == Buffer::Change:...
}
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import sys import warnings try: # Use setuptools if available, for install_requires (among other things). import setuptools from setuptools import setup except ImportError: setuptools = None from distutils.core import setup...
<|file_name|>detect.rs<|end_file_name|><|fim▁begin|>/* Copyright (C) 2019 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free * Software Foundation. * * This program is distributed in the ...
*buffer_len = p.len() as u32; return 1;
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate fall_parse; extern crate fall_tree; pub mod arith; pub mod sexp; pub mod weird; pub fn match_ast(actual: &str, expected: &str) { let actual = actual.trim(); let expected = expected.trim(); if actual != expected {<|fim▁hole|><|fim▁end|>
panic!("Actual:\n{}\nExpected:\n{}\n", actual, expected) } }
<|file_name|>glusterfs.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 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...
newReplicaCount, err := convertVolumeParam(parseVolumeTypeInfo[1]) if err != nil { return nil, fmt.Errorf("error parsing volumeType %q: %s", parseVolumeTypeInfo[1], err) }
<|file_name|>choose.rs<|end_file_name|><|fim▁begin|>//! depends: rand = "0.3" //! depends: regex = "0.2" extern crate zaldinar_core; extern crate regex; extern crate rand; use rand::Rng; use zaldinar_core::client::PluginRegister; use zaldinar_core::events::CommandEvent; macro_rules! regex { ($s:expr) => (::rege...
<|file_name|>hitting_sets.cpp<|end_file_name|><|fim▁begin|>/*++ Copyright (c) 2014 Microsoft Corporation Module Name: hitting_sets.h Abstract: Hitting set approximations. Author: Nikolaj Bjorner (nbjorner) 2014-06-06 Notes: --*/ #include "vector.h" #include "util.h" #include "hitting_sets.h" #inc...
idx < m_model.size() && m_model[idx] == l_true;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .main import IMDB def start(): return IMDB() config = [{ 'name': 'imdb', 'groups': [ { 'tab': 'automation', 'name': 'imdb_automation', 'label': 'IMDB', 'description': 'From any <strong>public...
'name': 'automation_urls',
<|file_name|>sonarr_list.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin from future.moves.urllib.parse import urlparse import json import logging from collections import MutableSet import req...
if entry.get('title').lower() == sb_entry.get('title').lower():
<|file_name|>manifest.py<|end_file_name|><|fim▁begin|>import io import os import sys from atomicwrites import atomic_write from copy import deepcopy from multiprocessing import Pool, cpu_count from six import ensure_text from . import jsonlib from . import vcs from .item import (ConformanceCheckerTest, ...
def paths(self):
<|file_name|>import3.rs<|end_file_name|><|fim▁begin|>// error-pattern: unresolved use main::bar; <|fim▁hole|><|fim▁end|>
fn main() { println!("foo"); }
<|file_name|>dimensions.py<|end_file_name|><|fim▁begin|># encoding: utf-8 # # # self 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 self file, # You can obtain one at http:# mozilla.org/MPL/2.0/. # # Author: Kyle Lahnakoski (kyle@lahnakosk...
partitions = FlatList() for g, p in parts.groupby(edges):
<|file_name|>udp.rs<|end_file_name|><|fim▁begin|>use {io, Ready, Poll, PollOpt, Token}; use event::Evented; use unix::EventedFd; use std::net::{self, Ipv4Addr, Ipv6Addr, SocketAddr}; use std::os::unix::io::{RawFd, IntoRawFd, AsRawFd, FromRawFd}; #[allow(unused_imports)] // only here for Rust 1.8 use net2::UdpSocketExt...
pub fn only_v6(&self) -> io::Result<bool> {
<|file_name|>manufactureGAP_vertical.py<|end_file_name|><|fim▁begin|>import polyadcirc.run_framework.domain as dom import polyadcirc.pyGriddata.manufacture_gap as manu grid_dir = '.' domain = dom.domain(grid_dir) domain.read_spatial_grid() x_values = [n.x for n in domain.node.values()] y_values = [n.y for n in domai...
p3 = [.2, .3, .4, .1]
<|file_name|>split_list__paged_rt__int__int32_t.cpp<|end_file_name|><|fim▁begin|>#include "benchmark/benchmark.h" #include "c4/log.hpp" #include "c4/allocator.hpp" #include "../list_types.hpp" namespace bm = benchmark; namespace c4 { template< class List > void BM_ListPushBack(bm::State& st) { List li;<|fim▁hol...
using T = typename List::value_type; T v{}; size_t count = 0; while(st.KeepRunning())
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os DEBUG = True BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject....
# Internationalization
<|file_name|>infeed_ops.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.apache.org/lice...
limitations under the License. ==============================================================================*/
<|file_name|>coherence-pair-covered-uncovered-1.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 // ht...
extern crate "coherence-lib" as lib; use lib::{Remote1, Pair}; pub struct Local<T>(T);
<|file_name|>tests.rs<|end_file_name|><|fim▁begin|>use crate::direct_transport::{DirectTransport, DirectTransportOptions}; use crate::router::{Router, RouterOptions}; use crate::transport::Transport; use crate::worker::WorkerSettings; use crate::worker_manager::WorkerManager; use futures_lite::future; use std::env; as...
let worker_manager = WorkerManager::new();
<|file_name|>AtomicMarkableReference.java<|end_file_name|><|fim▁begin|>/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software ...
* reference. Any given invocation of this operation may fail * (return {@code false}) spuriously, but repeated invocation * when the current value holds the expected value and no other * thread is also attempting to set the value will eventually
<|file_name|>LocalAuthSupplier.java<|end_file_name|><|fim▁begin|>/* * Copyright 2018 OPS4J 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.apache.org/licens...
return null; }
<|file_name|>main.py<|end_file_name|><|fim▁begin|>"""A guestbook sample with sqlite3.""" import logging import os import jinja2 import sqlite3 import webapp2 from google.appengine.api import app_identity from google.appengine.api import modules from google.appengine.api import runtime from google.appengine.api impor...
"""Just call shutdown_hook now for a temporary workaround.
<|file_name|>iterate-over-array.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<|fim▁hole|>// except ...
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|>exports.forward = require('./forward'); exports.respond = require('./respond');<|fim▁end|>
<|file_name|>constant.rs<|end_file_name|><|fim▁begin|>//! Handling of `static`s, `const`s and promoted allocations use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_errors::ErrorReported; use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags; use rustc_middle::mir::interpret::{ read_target_...
fx: &mut FunctionCx<'_, '_, 'tcx>,
<|file_name|>search.service.spec.ts<|end_file_name|><|fim▁begin|>// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICE...
const targetRepo = 'repo', targetOrg = 'org'; service.quickSearch(targetRepo, targetOrg).subscribe(repos => { expect(repos.length).toEqual(0); // empty array
<|file_name|>before_vm_migrate_destination.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import os import sys import grp import pwd import traceback import utils import hooking DEV_MAPPER_PATH = "/dev/mapper" DEV_DIRECTLUN_PATH = '/dev/directlun' def createdirectory(dirpath): # we don't use os.mkdir/chown ...
if retcode != 0: sys.stderr.write('directlun: error mknod %s, err = %s\n' % (devpath, err)) sys.exit(2)
<|file_name|>static.js<|end_file_name|><|fim▁begin|>// Here will be compiled design document<|fim▁hole|>DESIGNS=false;<|fim▁end|>
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Computed values. use self::transform::DirectionVector; use ...
<|file_name|>service_prpc_pb2.py<|end_file_name|><|fim▁begin|># Generated by the pRPC protocol buffer compiler plugin. DO NOT EDIT! # source: service.proto import base64 import zlib from google.protobuf import descriptor_pb2 # Includes description of the service.proto and all of its transitive # dependencies. Inclu...
'iU2odeLmAVpLkE/qfVSjm0TsyVTNKutXnYQk9y0y99paflKbK28xgoYP3nbG0k1L6mVz/92qJ0' 'dlINPttemZRabba3MpOwUnxQQyMU8NygF0UF3t/WWfwAbUgyw3Y5/p8xf1vQcpI558tS4VGsI9' 'LxgfqJjXIS7c4fslKStesq/ovF3ONDBVvKCum9tY7uQpwLfwK2dn/Hib7IsNHbLa5peSnrhQCP'
<|file_name|>projection.py<|end_file_name|><|fim▁begin|>import random from firedrake import * from firedrake_adjoint import * import sys mesh = UnitSquareMesh(4, 4) V3 = FunctionSpace(mesh, "CG", 3) V2 = FunctionSpace(mesh, "CG", 2) firedrake.parameters["adjoint"]["record_all"] = True def main(ic, annotate=False): ...
<|file_name|>irbuilder.py<|end_file_name|><|fim▁begin|>__author__ = 'sarangis' from src.ir.function import * from src.ir.module import * from src.ir.instructions import * BINARY_OPERATORS = { '+': lambda x, y: x + y, '-': lambda x, y: x - y, '*': lambda x, y: x * y, '**': lambda x, y: x ** y, ...
def create_shl(self, op1, op2, name=None):
<|file_name|>coupled_OLS_SED_funcs_test.C<|end_file_name|><|fim▁begin|>/*-------------------------------------------------------------------------- *-------------------------------------------------------------------------- * * Copyright (C) 2011 Gabriel Terejanu - terejanu@cec.sc.edu * * This is an application fr...
// outputs double final_y0; double final_y1;
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import os, sys import datetime from glob import glob import json import numpy as np import pandas from skimage.morphology import binary_erosion from nitime.timeseries import TimeSeries from nitime.analysis import SpectralAnalyzer, FilterAnalyzer import nibabel impor...
TA : acquisition Time TR: repetition Time sliceorder : array with slice order to run slicetime correction """
<|file_name|>config_flow.py<|end_file_name|><|fim▁begin|>"""Config flow for ReCollect Waste integration.""" from __future__ import annotations from typing import Any from aiorecollect.client import Client from aiorecollect.errors import RecollectError import voluptuous as vol from homeassistant import config_entries...
<|file_name|>_context.py<|end_file_name|><|fim▁begin|>from __future__ import annotations from collections import defaultdict from collections.abc import Generator, Iterable, Mapping, MutableMapping from contextlib import contextmanager import logging import re import textwrap from types import MappingProxyType from ty...
if can_break_paragraph and opening_re.search(lines[i]): lines[i] = f" {lines[i]}" break
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var Chartist = require('chartist'); module.exports = makePluginInstance; makePluginInstance.calculateScaleFactor = calculateScaleFactor; makePluginInstance.scaleValue = scaleValue; function makePluginInstance(userOptions) { var defaultOptions = { dot: { ...
} else if (data.type === 'line') {
<|file_name|>while_loops.rs<|end_file_name|><|fim▁begin|>// This test case tests the incremental compilation hash (ICH) implementation // for `while` loops. // The general pattern followed here is: Change one thing between rev1 and rev2 // and make sure that the hash has changed, then change nothing between rev2 and /...
<|file_name|>_logging.py<|end_file_name|><|fim▁begin|>""" websocket - WebSocket client library for Python Copyright (C) 2010 Hiroki Ohtani(liris) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Softwa...
<|file_name|>columngroup.d.ts<|end_file_name|><|fim▁begin|>import * as React from 'react'; // tslint:disable-next-line:no-empty-interface<|fim▁hole|><|fim▁end|>
export interface ColumnGroupProps { } export declare class ColumnGroup extends React.Component<ColumnGroupProps, any> { }
<|file_name|>PackingRecipe.java<|end_file_name|><|fim▁begin|>package betterwithaddons.crafting.recipes; import betterwithaddons.crafting.ICraftingResult; import betterwithaddons.util.ItemUtil;<|fim▁hole|>import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.Ingredient; import java.util.ArrayList; im...
import net.minecraft.block.state.IBlockState;
<|file_name|>BaseNCodec.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 und...
} else {
<|file_name|>JavascriptPropertyWrapper.cpp<|end_file_name|><|fim▁begin|>// Copyright © 2010-2014 The CefSharp Project. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.<|fim▁hole|>#pragma once #include "Stdafx.h" #include "JavascriptPropertyWr...
<|file_name|>builder.rs<|end_file_name|><|fim▁begin|>use crate::enums::{CapStyle, DashStyle, LineJoin}; use crate::factory::IFactory; use crate::stroke_style::StrokeStyle; use com_wrapper::ComWrapper; use dcommon::Error; use winapi::shared::winerror::SUCCEEDED; use winapi::um::d2d1::D2D1_STROKE_STYLE_PROPERTIES; pub ...
StrokeStyleBuilder { factory, start_cap: CapStyle::Flat, end_cap: CapStyle::Flat,
<|file_name|>firebase-test.py<|end_file_name|><|fim▁begin|>from firebase import firebase firebase = firebase.FirebaseApplication('https://wapi.firebaseio.com', None) new_user = 'Ozgur Vatansever' <|fim▁hole|><|fim▁end|>
result = firebase.post('/users', new_user, name=None, connection=None, params={'print': 'pretty'}, headers={'X_FANCY_HEADER': 'VERY FANCY'}) print result
<|file_name|>cornerstone.js<|end_file_name|><|fim▁begin|>// This is a manifest file that'll be compiled into including all the files listed below. // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically // be included in the compiled file accessible from http://example.com/assets...
//= require_tree .
<|file_name|>makeBalise.py<|end_file_name|><|fim▁begin|>#! usr/bin/env python # coding: utf8 from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals """metalex is general tool for lexicographic and metalexicographic activities Copyright (C) 2017 by Elvis ...
return "*"+name+"* dictionary articles formated in xml is"+\
<|file_name|>xw_reporting.py<|end_file_name|><|fim▁begin|>import warnings from pathlib import Path from typing import Union try: import xlwings as xw except ImportError: xw = None from larray.util.misc import _positive_integer from larray.core.group import _translate_sheet_name from larray.core.array import a...
self.graphs_per_row = graphs_per_row