prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>ParseDepends.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including<|fim▁hole|>#...
<|file_name|>DoubleMatrix1D.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.analytics.math.matrix; import java.util.Arrays; import org.apache.commons.lang.Validate; /** *...
<|file_name|>vm.py<|end_file_name|><|fim▁begin|>import sys import os import pty, shlex import signal import subprocess import socket import time import atexit import re import string import logging import random from .vif import VirtualInterface from .vnet import VirtualNet from .riotnative import RIOT from string i...
self.nics = nics if not nics: self.nics = []
<|file_name|>daltonparser.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (c) 2016, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """Parser for DALTON output files""" from __future__ import pr...
line = next(inputfile)
<|file_name|>testEth4.js<|end_file_name|><|fim▁begin|>/******************************************************************************** * Ledger Node JS API * (c) 2016-2017 Ledger * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License....
<|file_name|>test_parsers_module.py<|end_file_name|><|fim▁begin|>import pytest from collections import OrderedDict from insights.parsers import (calc_offset, keyword_search, optlist_to_dict, parse_delimited_table, parse_fixed_table, split_kv_pairs, unsplit_lines, ParseException, SkipExcep...
# Search on absent keywords produces empty list assert keyword_search(DATA_LIST, cpu_count=4) == []
<|file_name|>IProxy.java<|end_file_name|><|fim▁begin|>package com.Deoda.MCMBTools.proxy; public interface IProxy {<|fim▁hole|><|fim▁end|>
}
<|file_name|>doRPC.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import os, sys from AnnotationLib import * from optparse import OptionParser import copy import math # BASED ON WIKIPEDIA VERSION # n - number of nodes # C - capacity matrix # F - flow matrix # s - source # t - sink # sumC - sum over rows of C (too ...
anno.rects = [rect for rect in anno.rects if (rect.classID == options.classID or rect.classID == -1)] for anno in detIDL: anno.rects = [rect for rect in anno.rects if (rect.classID == options.classID or rect.classID == -1)]
<|file_name|>main.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from bottle import run, get, post, view, request, redirect, route, static_file, template import bottle import json import threading import requests import time import sys messages = set([]) @bottle.route('/static/<path:path>') def server_static...
def index(): redirect('chat')
<|file_name|>test_settings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import django SECRET_KEY = 'psst' SITE_ID = 1 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '...
} ROOT_URLCONF = 'allauth.urls'
<|file_name|>00_pass.py<|end_file_name|><|fim▁begin|># Tests: # assign ::= expr store<|fim▁hole|><|fim▁end|>
pass
<|file_name|>environment-type-def.ts<|end_file_name|><|fim▁begin|>export interface Environment { readonly production: boolean; readonly geoLocation: { readonly timeoutMillis: number readonly firefoxWorkaroundTimeoutMillis: number readonly updateMillis: number }; readonly gastroLo...
* The initial center of the map */ readonly center: {
<|file_name|>keyword.rs<|end_file_name|><|fim▁begin|>use liquid_core::Expression; use liquid_core::Result; use liquid_core::Runtime; use liquid_core::{ Display_filter, Filter, FilterParameters, FilterReflection, FromFilterParameters, ParseFilter, }; use liquid_core::{Value, ValueView}; <|fim▁hole|>struct TestKeywor...
#[derive(Debug, FilterParameters)]
<|file_name|>connection.py<|end_file_name|><|fim▁begin|># # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER # # Copyright (c) 2015 Juniper Networks, Inc. # All rights reserved. # # Use is subject to license terms. # # Licensed under the Apache License, Version 2.0 (the ?License?); you may not # use this fi...
raise ValueError('password is valid only along with username') if cert is None:
<|file_name|>transpose4x4-opt.py<|end_file_name|><|fim▁begin|># This file is part of Peach-Py package and is licensed under the Simplified BSD license. # See license.rst for the full text of the license. from peachpy.x86_64 import * from peachpy import * matrix = Argument(ptr(float_)) with Function("transpose4x4_...
# xmm_rows[3] = ( m03, m13, m23, m33 ) MOVHLPS(xmm_rows[3], xmm_temps[1]) MOVUPS([reg_matrix + 48], xmm_rows[3])
<|file_name|>network_cls.py<|end_file_name|><|fim▁begin|>import tensorflow as tf from ocnn import * # octree-based resnet55 def network_resnet(octree, flags, training=True, reuse=None): depth = flags.depth channels = [2048, 1024, 512, 256, 128, 64, 32, 16, 8] with tf.variable_scope("ocnn_resnet", reuse=reuse): ...
with tf.variable_scope("fc2"): logit = dense(data, flags.nout, use_bias=True)
<|file_name|>pull_request_file.py<|end_file_name|><|fim▁begin|># coding=utf-8 from __future__ import unicode_literals, print_function from flask import request, jsonify, url_for from flask_login import current_user import bugsnag from . import load from webhookdb.tasks.pull_request_file import spawn_page_tasks_for_pul...
resp.headers["Location"] = url_for("tasks.status", task_id=result.id) return resp
<|file_name|>HedgeHogFieldActorPropertiesPanel.java<|end_file_name|><|fim▁begin|>// // Copyright (c) 2014 Limit Point 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 // // ...
tabbedPane.addTab("Hedge Hog", hedgeHogPanel);
<|file_name|>AutoEnchanter.java<|end_file_name|><|fim▁begin|>package me.mrCookieSlime.Slimefun.Objects.SlimefunItem.machines; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import me.mrCookieSlime.CSCoreLibPlugin.gener...
<|file_name|>LoadedProcedureSet.java<|end_file_name|><|fim▁begin|>/* This file is part of VoltDB. * Copyright (C) 2008-2014 VoltDB Inc. * * This program 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 Foundati...
Class<?> procClass = null; try {
<|file_name|>aws-autoscale-ec2-instance-modify.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Purpose : Extract next sequence number of auto-scaled instance and set new tag to self instance. Script will be running from new instance. will take input from command line instead of from json file Future Plan : wi...
#
<|file_name|>consts.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/licenses...
pub fn trans_static(ccx: &CrateContext, m: ast::Mutability, id: ast::NodeId) -> ValueRef { unsafe { let _icx = push_ctxt("trans_static"); let g = base::get_item_val(ccx, id);
<|file_name|>qemu_vm.py<|end_file_name|><|fim▁begin|>""" Utility classes and functions to handle Virtual Machine creation using qemu. :copyright: 2008-2009 Red Hat Inc. """ import time import os import logging import fcntl import re import commands from autotest.client.shared import error from autotest.client import ...
class attributes is used.
<|file_name|>FriendlyTimeTest.java<|end_file_name|><|fim▁begin|><|fim▁hole|> import com.comandante.creeper.common.FriendlyTime; import org.junit.Test; public class FriendlyTimeTest { @Test public void testFriendlyParsing() throws Exception { FriendlyTime friendlyTime = new FriendlyTime(400); ...
package com.comandante.creeper.command.commands;
<|file_name|>pattern-tyvar-2.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...
fn main() { }
<|file_name|>xkcd_rgb.py<|end_file_name|><|fim▁begin|>xkcd_rgb = {'acid green': '#8ffe09', 'adobe': '#bd6c48', 'algae': '#54ac68', 'algae green': '#21c36f', 'almost black': '#070d0d', 'amber': '#feb308', 'amethyst': '#9b5fc0', 'apple': ...
<|file_name|>ChromeEval.js<|end_file_name|><|fim▁begin|>/** * @license * Copyright 2014 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *<|fim▁hole|> *...
* http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS,
<|file_name|>printvals.py<|end_file_name|><|fim▁begin|>import time from usb_vendor import PIC_USB import traceback # Product IDs: Master PIC is 0x0004, Rocket PIC is 0x0005, Barge PIC is 0x0006 comms = PIC_USB(0x0005) def main(): print("START") loop_time = .2 # How often to run the main loop, in seconds w...
uart2["RIDLE"],
<|file_name|>reachable-loop-head.cpp<|end_file_name|><|fim▁begin|>//======================================================================= // Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee, // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or...
std::map<std::string,std::string>& attr_map = eattr_map[*ei];
<|file_name|>ExpressionEnrichmentServiceImplTest.java<|end_file_name|><|fim▁begin|>package org.cbioportal.service.impl; import java.math.BigDecimal; import java.util.*; import org.cbioportal.model.*; import org.cbioportal.model.meta.GenericAssayMeta; import org.cbioportal.persistence.MolecularDataRepository; import or...
genericAssayEnrichment = result.get(1); Assert.assertEquals(HUGO_GENE_SYMBOL_2, genericAssayEnrichment.getStableId());
<|file_name|>release.spec.ts<|end_file_name|><|fim▁begin|>import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; import { TestBed } from '@angular/core/testing';<|fim▁hole|>import { ReleaseProvider } from './release'; describe('Release Provider', () => { let releaseProvide...
import { AppProvider } from '../../providers/app/app'; import { Logger } from '../../providers/logger/logger';
<|file_name|>ALPHA3.py<|end_file_name|><|fim▁begin|># Copyright (c) 2003-2010, Berend-Jan "SkyLined" Wever <berendjanwever@gmail.com> # Project homepage: http://code.google.com/p/alpha3/ # All rights reserved. See COPYRIGHT.txt for details. import charsets, encode, io import x86, x64, test import os, re, sys #_...
if __name__ == "__main__": encoders.extend(x86.encoders);
<|file_name|>ReplaceNoCase.java<|end_file_name|><|fim▁begin|>/** * * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. * * 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 Software Foundation...
import lucee.runtime.op.Caster; import lucee.runtime.op.Decision;
<|file_name|>adt.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/LI...
match *r {
<|file_name|>zlobpcg.cpp<|end_file_name|><|fim▁begin|>/* -- MAGMA (version 2.1.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date August 2016 @author Stan Tomov @author Hartwig Anzt @precisions normal z ->...
blockAP = NULL; blockAR = NULL;
<|file_name|>tailer.go<|end_file_name|><|fim▁begin|>package tailer<|fim▁hole|> "github.com/docker/infrakit/pkg/discovery" "github.com/docker/infrakit/pkg/launch/inproc" logutil "github.com/docker/infrakit/pkg/log" "github.com/docker/infrakit/pkg/plugin" "github.com/docker/infrakit/pkg/plugin/event/tailer" metadat...
import ( "path/filepath"
<|file_name|>JsQuanLyNgayPhep.js<|end_file_name|><|fim▁begin|>var getColor = function (value, p, record) { return "<span style='color:blue;'>" + value + "</span>"; } var getDayNumber = function (value, p, record) { if (value == "" || value == 0) { return "<span style='float:right;'>0</span>"; ...
txtSoNgayDaSuDung.reset();
<|file_name|>test_core_resolver.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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...
"collectLogs": False, "collectArtifacts": False,
<|file_name|>graphbench_unix.go<|end_file_name|><|fim▁begin|>// +build linux freebsd package graphtest import ( "bytes" "io" "io/ioutil" "path/filepath" "testing" "github.com/docker/docker/pkg/stringid" ) // DriverBenchExists benchmarks calls to exist func DriverBenchExists(b *testing.B, drivername string, dr...
_, err = io.Copy(ioutil.Discard, arch) if err != nil { b.Fatalf("Error copying archive: %s", err)
<|file_name|>fn-spec.js<|end_file_name|><|fim▁begin|>/* * Copyright 2014,2015 Open Networking Laboratory * * 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/l...
someDate = new Date(),
<|file_name|>metric_configuration.py<|end_file_name|><|fim▁begin|>import json from typing import Tuple from great_expectations.core.id_dict import IDDict class MetricConfiguration: def __init__( self, metric_name: str, metric_domain_kwargs: dict, metric_value_kwargs: dict = None, ...
json_dict: dict = { "metric_name": self.metric_name,
<|file_name|>boot.ts<|end_file_name|><|fim▁begin|>import {bootstrap} from '/node_modules/angular2/platform/browser' import {AppComponent} from './app.component' bootstrap(AppComponent); /* Copyright 2016 Google Inc. All Rights Reserved.<|fim▁hole|>can be found in the LICENSE file at http://angular.io/license */<|...
Use of this source code is governed by an MIT-style license that
<|file_name|>server.js<|end_file_name|><|fim▁begin|>var http = require("http"); var server = http.createServer(function(request, response) { response.writeHead(200, { "Grip-Hold": "response", "Grip-Channel": "mychannel", <|fim▁hole|> "Grip-Timeout": "60"}); re...
<|file_name|>spree_awesome_blog.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
//= require admin/spree_backend
<|file_name|>LinearInterpolatorTest.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 ...
double target[] = {y[0], 1d};
<|file_name|>mdl_file.cpp<|end_file_name|><|fim▁begin|>#include "mdl_file.hpp" MDLFile::MDLFile(std::string file_path): File(std::move(file_path)) {this->update();} bool MDLFile::exists_tag(const std::string& tag_name) const { return this->parsed_tags.find(tag_name) != this->parsed_tags.end(); } bool MDLFile::exist...
if(!data.empty()) for(std::size_t i = 0; i < data.size(); i++)
<|file_name|>parm.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/licenses/L...
} else { state = SeekIfEnd(level);
<|file_name|>sketch2.ts<|end_file_name|><|fim▁begin|>//#!tsc && NODE_PATH=dist/src node dist/sketch2.js import { Point, Rect, TextHjustify, TextVjustify, Transform, DECIDEG2RAD, TextAngle, } from "./src/kicad_common"; import { StrokeFont } from "./src/kicad_strokefont"; import { Plotter, CanvasPlotter } from "...
<|file_name|>output_folder.py<|end_file_name|><|fim▁begin|># coding=utf-8 import typing from collections import MutableMapping from emft.core.logging import make_logger from emft.core.path import Path from emft.core.singleton import Singleton LOGGER = make_logger(__name__) # noinspection PyAbstractClass class Outpu...
<|file_name|>assign-to-method.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.or...
cat {
<|file_name|>HeaderButton.tsx<|end_file_name|><|fim▁begin|>/* Copyright 2015, 2016 OpenMarket Ltd Copyright 2017 Vector Creations Ltd Copyright 2017 New Vector Ltd Copyright 2018 New Vector Ltd Copyright 2019 The Matrix.org Foundation C.I.C. Licensed under the Apache License, Version 2.0 (the "License"); you may not u...
<|file_name|>dicco_numbers.py<|end_file_name|><|fim▁begin|>def freq_month(obj): if obj is None or obj == []: return months = {1: 'jan', 2: 'feb', 3: 'mar', 4: 'apr', 5: 'may', 6: 'jun', 7: 'jul', 8: 'aug', ...
# frequencies[ obj[i] -1] += 1
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod dyngen; mod error; mod helpers; mod impl_debug; mod impl_partialeq; pub mod struct_layout; #[cfg(test)] #[allow(warnings)] pub(crate) mod bitfield_unit; #[cfg(all(test, target_endian = "little"))] mod bitfield_unit_tests; use self::dyngen::DynamicItems; use self::h...
.count() >
<|file_name|>surface_drawing.cc<|end_file_name|><|fim▁begin|>#include "deps.h" // Not implemented: // SDL_ConvertSurface - need PixelFormat implementation // SDL_CreateRGBSurfaceFrom - need to think about memory management? clone? keep reference? // SDL_CreateRGBSurfaceWithFormatFrom - ditto // SDL_LoadBMP_RW // SDL_S...
STRINGARG(file, 0);
<|file_name|>sorting.ts<|end_file_name|><|fim▁begin|>/* Copyright 2016 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/licenses/LI...
let bi = 0; while (true) { if (ai === a.length) return bi === b.length ? 0 : -1; if (bi === b.length) return 1;
<|file_name|>bitcoin_nl.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="nl" version="2.0"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Freshcoin Core</source> <translation>Over Fresh...
<location line="-407"/> <source>&amp;Overview</source> <translation>&amp;Overzicht</translation>
<|file_name|>harwell_boeing.py<|end_file_name|><|fim▁begin|># This file is not meant for public use and will be removed in SciPy v2.0.0. # Use the `scipy.io` namespace for importing the functions # included below. import warnings from . import _harwell_boeing __all__ = [ # noqa: F822 'MalformedHeader', 'hb_read'...
category=DeprecationWarning, stacklevel=2) return getattr(_harwell_boeing, name)
<|file_name|>config.py<|end_file_name|><|fim▁begin|># config.py # Configuration for tasks application. # Author: Julien Pecqueur (julien@peclu.net) # License: GPL NAME = 'tasks.py' VERSION = 0.1 # Path to tasks database DB = './tasks.db' <|fim▁hole|>PORT = '8081' # Debug mode DEBUG = False # Auto-relo...
# Interface to listen HOST = '0.0.0.0'
<|file_name|>floatScalar.C<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright held by original...
#undef ScalarVSMALL #undef readScalar // ************************************************************************* //
<|file_name|>test01_validity_test_SH-PSV_input_S.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Thu Jan 21 04:00:41 2016 @author: irnakat """ # test IOfile import IOfile from TFCalculator import TFCalculator as TFC import TFDisplayTools # validity test for SH PSV case using S wave...
theclass4 = TFC(datapsvs) theclass4.tf_knopoff_psv_adv() print theclass4.tf[1][19] print 'calculation has been finished!'
<|file_name|>diag_diff.py<|end_file_name|><|fim▁begin|>import ast<|fim▁hole|>s1=s2=0 for i in range(0, n): a = list(ast.literal_eval(','.join(input().split()))) if(len(a) == n): s1+=a[i] s2+=a[n-1-i] print(abs(s1-s2))<|fim▁end|>
n = int(input()) a=[]
<|file_name|>AACTransport.d.ts<|end_file_name|><|fim▁begin|>/// <reference types="node" /> import RTSPClient from "../RTSPClient"; import { RTPPacket } from "../util"; import * as transform from "sdp-transform"; import { Writable } from "stream"; interface Details { codec: string; mediaSource: transform.MediaDe...
export default class AACTransport {
<|file_name|>scatter_nd_ops_test.py<|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://w...
expected = np.array([
<|file_name|>mit_benchmark.py<|end_file_name|><|fim▁begin|>import itertools import os import os.path as osp import chainer import numpy as np import scipy.misc from sklearn.model_selection import train_test_split from base import APC2016DatasetBase def ids_from_scene_dir(scene_dir, empty_scene_dir): for i_frame...
data_ids = [] # office contain_dir = osp.join(self.dataset_dir, 'office/test') for loc in ['shelf', 'tote']:
<|file_name|>units.py<|end_file_name|><|fim▁begin|>I = complex(0,1) ha2ev = 27.211396132 ev2cm1 = 8065.5440044136285 bohr2ang = 0.52917720859 atomic_mass = [ None, 1.00794, 4.002602, 6.941, 9.012182, 10.811, 12.0107, 14.0067, 15.9994, 18.9984032, 20.1797, 22....
<|file_name|>schedule.py<|end_file_name|><|fim▁begin|>from npoapi.npoapi import NpoApi class Schedule(NpoApi): def get(self, guideDay=None, channel=None, sort="asc", offset=0, limit=240, properties=None, accept=None): params = { 'guideDay': guideDay, "sort": sort, "max...
"offset": offset, "properties": properties
<|file_name|>aquifer.py<|end_file_name|><|fim▁begin|>import numpy as np import matplotlib.pyplot as plt import inspect # Used for storing the input class AquiferData: def __init__(self, model, kaq, z, Haq, Hll, c, Saq, Sll, poraq, porll, ltype, topboundary, phreatictop, kzoverkh=None, model3d=Fal...
return pot / self.Tcol[layers] def isInside(self,x,y):
<|file_name|>dst-deref.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/licen...
}
<|file_name|>cve_role.py<|end_file_name|><|fim▁begin|>""" An interpreted text role to link docs to CVE issues. To use: :cve:`XXXXX`<|fim▁hole|>from docutils.parsers.rst import roles def cve_role(name, rawtext, text, lineno, inliner, options=None, content=None): if options is None: options = {} url_pa...
""" from docutils import nodes, utils
<|file_name|>lexical-scope-in-match.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://ww...
// gdb-command:print shadowed
<|file_name|>loadInitialState.js<|end_file_name|><|fim▁begin|>import _ from 'lodash' // eslint-disable-line export default function loadInitialState(req) { const user = req.user const state = { auth: {}, }<|fim▁hole|> } if (req.session.accessToken) { state.auth.accessToken = req.session.accessT...
if (user) { state.auth = { user: {id: user.id},
<|file_name|>localVariable.py<|end_file_name|><|fim▁begin|>def test_local_variable(): x = 1<|fim▁hole|><|fim▁end|>
x = 2
<|file_name|>LightingMode.java<|end_file_name|><|fim▁begin|>/* * _____ _ _ _____ _ * | __ \| | | | / ____| | | * | |__) | | ___ | |_| (___ __ _ _ _ __ _ _ __ ___ __| | * | ___/| |/ _ \| __|\___ \ / _` | | | |/ _`...
<|file_name|>user.py<|end_file_name|><|fim▁begin|>class User(object): def __init__(self, username=None, password=None, email=None): self.username = username self.password = password self.email = email @classmethod def admin(cls): return cls(username="admin", password="admin...
#random values for username and password @classmethod
<|file_name|>step_success.go<|end_file_name|><|fim▁begin|>package proxmox import ( "context" "github.com/hashicorp/packer-plugin-sdk/multistep" )<|fim▁hole|>type stepSuccess struct{} func (s *stepSuccess) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction { // We need to ensure stepStartVM.Cl...
// stepSuccess runs after the full build has succeeded. // // It sets the success state, which ensures cleanup does not remove the finished template
<|file_name|>Range.java<|end_file_name|><|fim▁begin|>/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package VerilogCompiler.SyntacticTree; import VerilogCompiler.SemanticCheck.ErrorHandler; import VerilogCompiler.SemanticCheck.ExpressionType; import VerilogCompiler....
<|file_name|>run_tests.py<|end_file_name|><|fim▁begin|>import os import nose import django NAME = os.path.basename(os.path.dirname(__file__)) ROOT = os.path.abspath(os.path.dirname(__file__)) os.environ['DJANGO_SETTINGS_MODULE'] = 'fake_settings' os.environ['PYTHONPATH'] = os.pathsep.join([ROOT, ...
# initiate it.
<|file_name|>workspace_event_handler_unittest.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ash/wm/workspace/workspace_event_handler.h" #include "ash/scr...
EXPECT_EQ(restored_bounds.y(), bounds_in_screen.y()); EXPECT_EQ(restored_bounds.height(), bounds_in_screen.height()); EXPECT_EQ(work_area2.x(), bounds_in_screen.x());
<|file_name|>GuiManager.cpp<|end_file_name|><|fim▁begin|>#include "GuiManager.h" #include "Shader.h" #include "TextureData.h" #include "Component.h" #if defined(GLES2) #include <GLES2/gl2.h> #elif defined(GLES3) #include <GLES3/gl3.h> #else #include <GL/glew.h> #endif #include <glm/gtx/transform.hpp> TextureData *m...
ImGui::Columns(2); renderSceneGraph(sceneGraph);
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) class PyAzureMgmtDeploymentmanager(PythonPackage): """Microsoft ...
depends_on('py-setuptools', type='build')
<|file_name|>natural_language.py<|end_file_name|><|fim▁begin|># coding: utf-8<|fim▁hole|> natural_language = [ 'Natural Language :: Portuguese (Brazilian)', ]<|fim▁end|>
<|file_name|>send-resource.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/l...
impl Drop for test {
<|file_name|>P13nSelectionItem.js<|end_file_name|><|fim▁begin|>/* * ! ${copyright} */ // Provides control sap.m.P13nSelectionItem. sap.ui.define([ 'jquery.sap.global', './library', 'sap/ui/core/Item' ], function(jQuery, library, Item) { "use strict"; /** * Constructor for a new P13nSelectionItem. * * @para...
<|file_name|>cmp.rs<|end_file_name|><|fim▁begin|>#![feature(core)] extern crate core; #[cfg(test)] mod tests { use core::cmp::Ordering::{self, Less, Equal, Greater}; // #[derive(Clone, Copy, PartialEq, Debug)] // #[stable(feature = "rust1", since = "1.0.0")] // pub enum Ordering { // /// An or...
// impl Ord for Ordering { // #[inline]
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from fancontroller.fan_controller import Thermostat, STATE_ON, STATE_OFF<|fim▁hole|> Thermostat STATE_ON STATE_OFF<|fim▁end|>
<|file_name|>test_type.py<|end_file_name|><|fim▁begin|>from unittest import TestCase from decimal import Decimal import datetime import sys if sys.version_info[0] == 3: unicode_str = '\u2603' else: unicode_str = unicode('snowman') import validictory class TestType(TestCase): def test_schema(self): ...
def test_default(self): # test default value (same as any really)
<|file_name|>issue-2718-a.rs<|end_file_name|><|fim▁begin|>pub struct SendPacket<T> { p: T } mod pingpong { use SendPacket; pub type Ping = SendPacket<Pong>;<|fim▁hole|> pub struct Pong(SendPacket<Ping>); //~^ ERROR recursive type `Pong` has infinite size } fn main() {}<|fim▁end|>
<|file_name|>test_send.py<|end_file_name|><|fim▁begin|>from test_base import BaseTest, load_msg from mock import patch from smtplib import SMTP from deliver.send import Sender class SendTest(BaseTest): def setUp(self): super(SendTest,self).setUp() self.sender = Sender(self.config) @patch('s...
self.assertEqual(msg['To'], u'email@address.com') self.assertEqual(msg['From'], self.sender.get_address()) self.assertEqual(msg['Reply-To'], self.sender.get_address())
<|file_name|>main.js<|end_file_name|><|fim▁begin|><|fim▁hole|> stretchyNavs.each(function(){ var stretchyNav = $(this), stretchyNavTrigger = stretchyNav.find('.cd-nav-trigger'); stretchyNavTrigger.on('click', function(event){ event.preventDefault(); stretchyNav.toggleClass('nav-is-visible'); ...
jQuery(document).ready(function(){ if( $('.cd-stretchy-nav').length > 0 ) { var stretchyNavs = $('.cd-stretchy-nav');
<|file_name|>run.py<|end_file_name|><|fim▁begin|>from app import create_app app = create_app()<|fim▁hole|>if __name__ == "__main__": app.run(host="0.0.0.0", port=5000, debug=True)<|fim▁end|>
<|file_name|>0002_auto_20150623_1913.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 = [ ('QuickBooking', '0001_initial'), ] operations = [ ...
<|file_name|>node.js<|end_file_name|><|fim▁begin|>'use strict'; var i18n = require('./i18n.js') i18n.add_translation("pt-BR", { test: 'OK', greetings: { hello: 'Olá', welcome: 'Bem vindo' } }); i18n.locale = 'pt-BR'; console.log(i18n.t('greetings.hello')); console.log(i18n.t('greetings.welcome')); cons...
console.log(i18n.t('greetings.hello')); console.log(i18n.t('test'));
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2004-2012 Pexego Sistemas Informáticos All Rights Reserved # $Omar Castiñeira Saavedra$ <omar@pexego.es> # # This program is free...
# This program is distributed in the hope that it will be useful,
<|file_name|>quadcopter_controller_example.py<|end_file_name|><|fim▁begin|>from xboxdrv_parser import Controller from time import sleep import os def main (): # Get input from the two analog sticks as yaw, throttle, roll, and pitch. Take the (0 - 255) input value and # map it to a (-1 - 1) range. controlle...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|>from . import test_convert from . import test_env<|fim▁end|>
<|file_name|>devlali.py<|end_file_name|><|fim▁begin|>import sys devlali = {}<|fim▁hole|> for n in str_n: total += int(n) return total + number def generate_devlali(): for i in range(10001): total = sum_number(i) if (total in devlali.keys()): tmp_list = devlali[total] ...
def sum_number(number): str_n = str(number) total = 0
<|file_name|>ip_ban.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Copyright 2013 Joe Harris 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 ...
<|file_name|>linalg.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import numpy.linalg as npla from .numpy_wrapper import wrap_namespace, dot from . import numpy_wrapper as anp wrap_namespace(npla.__dict__, globals()) def atleast_2d_col(x): # Promotes a 1D array into a column rather than a...
inv.defgrad( lambda ans, x : lambda g : -dot(dot(ans.T, g), ans.T)) det.defgrad( lambda ans, x : lambda g : g * ans * inv(x).T) slogdet.defgrad(lambda ans, x : lambda g : g[1] * inv(x).T)
<|file_name|>plotting.py<|end_file_name|><|fim▁begin|>"""This screws up visualize.py""" """ import numpy as np from matplotlib import pyplot as plt from matplotlib.lines import Line2D from torch.autograd import Variable as Var from torch import Tensor class RealtimePlot(): def __init__(self, style='ggplot'): ...
self.yvals.append(y) self.line.set_data(np.arange(len(self.yvals)), self.yvals)
<|file_name|>DataBaseCronTriggerBean.java<|end_file_name|><|fim▁begin|>package net.iharding.core.timer; import java.text.ParseException; import net.iharding.modules.task.model.TimeTask; import net.iharding.modules.task.service.TimeTaskService; import org.springframework.beans.factory.annotation.Autowired; import or...
this.setCronExpression(task.getCronExpression()); DynamicTask.updateSpringMvcTaskXML(getObject(),task.getCronExpression()); }