prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>strings.rs<|end_file_name|><|fim▁begin|>use libc::size_t; // Helper struct that we'll use to give strings to C. #[repr(C)]<|fim▁hole|>pub struct RustByteSlice { pub bytes: *const u8, pub len: size_t, } impl<'a> From<&'a str> for RustByteSlice { fn from(s: &'a str) -> Self { RustByteSl...
<|file_name|>factory.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 The Kubernetes 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...
return nil, err } if describer, ok := kubectl.DescriberFor(mapping.GroupVersionKind.GroupKind(), client); ok { return describer, nil
<|file_name|>test_for_unicity.py<|end_file_name|><|fim▁begin|># coding: utf-8 ############################################################################### # Module Writen to OpenERP, Open Source Management Solution # # Copyright (c) 2010 Vauxoo - http://www.vauxoo.com/ # All Rights Reserved. # info Vauxo...
stock_move_datas = [{ 'product_id': product.id, 'qty': 1.0 }]
<|file_name|>main.py<|end_file_name|><|fim▁begin|>from tkinter import * from PIL import Image, ImageTk from mandelbrot import * from julia_set import * class App(object): def __init__(self, master): # CANVAS self.ulx, self.uly, self.drx, self.dry, self.def_width = default_settings()[ ...
<|file_name|>Detector.ts<|end_file_name|><|fim▁begin|>/* * Copyright 2007 ZXing 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-...
} catch (re/*NotFoundException*/) { if (!(re instanceof NotFoundException)) {
<|file_name|>NumberContext.java<|end_file_name|><|fim▁begin|>/* * Copyright appNativa Inc. All Rights Reserved. * * This file is part of the Real-time Application Rendering Engine (RARE). * * RARE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as pub...
/** Creates a new instance of DateContext */
<|file_name|>journal.py<|end_file_name|><|fim▁begin|># -*- Mode: python; coding:utf-8; indent-tabs-mode: nil -*- */ # # This file is part of systemd. # # Copyright 2012 David Strauss <david@davidstrauss.net> # Copyright 2012 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> # Copyright 2012 Marti Raudsepp <marti@juf...
def __iter__(self):
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for DocumentDB 1.10 // Project: https://github.com/Azure/azure-documentdb-node // Definitions by: Noel Abrahams <https://github.com/NoelAbrahams>, Brett Gutstein <https://github.com/brettferdosi>, Chris Stone <https://github.com/ctstone>, Yifan Wu...
<|file_name|>db.py<|end_file_name|><|fim▁begin|>import os import pdb import functools import glob from core import models from core.ali.oss import BUCKET, oss2key, is_object_exists, is_size_differ_and_newer, is_source_newer, is_md5_differ from core.misc import * from colorMessage import dyeWARNING, dyeFAIL from sqlalch...
<|file_name|>mapping_BASE_10668.py<|end_file_name|><|fim▁begin|>import numpy as np import cv2 from math import pi def points2mapa(landmarks,pos_rob,mapa,P, delete_countdown): #mapa = (x,y, Px,Py, updt) new_points2add = [] landmarks = np.array(landmarks) for i in range(0,landmarks.shape[0]): x_mapa = pos_rob[...
<|file_name|>point_test.py<|end_file_name|><|fim▁begin|>from __future__ import division # The Hazard Library # Copyright (C) 2012-2016 GEM Foundation # # 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...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from flask import Flask from flask import render_template, request app = Flask(__name__) @app.route("/") def main(): room = request.args.get('room', '') if room: return render_template('watch.html') return render_template('index.html')<|fim▁hole|> app.ru...
if __name__ == "__main__":
<|file_name|>version.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
__version__="0.12.5"
<|file_name|>main.js<|end_file_name|><|fim▁begin|>/////////////// /// main.js // /////////////<|fim▁hole|> jQuery(function () { var $ = jQuery; // happy coding! });<|fim▁end|>
<|file_name|>gdk_x11.rs<|end_file_name|><|fim▁begin|>//! Glue code between gdk and x11, allowing some `gdk_x11_*` functions. //! //! This is not a complete binding, but just provides what we need in a //! reasonable way. use gdk; use gdk_sys::GdkDisplay; use glib::translate::*; use x11::xlib::{Display, Window}; // ...
<|file_name|>test_resources.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2016 Eugene Frolov <eugene@frolov.net.ru> # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the Lic...
from restalchemy.tests.functional.restapi.ra_based.microservice import consts
<|file_name|>DecompositionSVD.java<|end_file_name|><|fim▁begin|>package edu.stanford.rsl.conrad.numerics; import Jama.Matrix; import Jama.util.*; /** Singular Value Decomposition. <P> For an m-by-n matrix A, the singular value decomposition is an m-by-(m or n) orthogonal matrix U, a (m or n)-by-n diagonal ma...
<|file_name|>Main.java<|end_file_name|><|fim▁begin|>package org.bitbucket.ytimes.client.main; import org.springframework.context.support.ClassPathXmlApplicationContext; /**<|fim▁hole|> */ public class Main { public static void main( String[] args ) throws Exception { ClassPathXmlApplicationContext ctx = ...
* Created by andrey on 27.05.17.
<|file_name|>extension_localization_peer_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 <map> #include <string> #include "base/memory/scoped_ptr.h" #i...
EXPECT_TRUE(GetData(filter_peer_.get()).empty());
<|file_name|>scrape.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import time import requests from datetime import datetime from logging import getLogger from typing import Optional from typing import Dict from typing import Iterable from funcy import compose from funcy import partial from pandas import Data...
<|file_name|>indentsublime.py<|end_file_name|><|fim▁begin|>import sublime, sublime_plugin from indenttxt import indentparser<|fim▁hole|> class IndentToList(sublime_plugin.TextCommand): def run(self, edit): parser = indentparser.IndentTxtParser() #Get current selection sels = self.view.sel() ...
<|file_name|>PostgreSQLBackendConnection.java<|end_file_name|><|fim▁begin|>package io.mycat.backend.postgresql; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.nio.ByteBuffer; import java.nio.channels.NetworkChannel; import java.nio.channels.SocketChannel; import java.util.concurre...
this.updateConnectionInfo(conn); conn.metaDataSyned = true; return false;
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res, next) {<|fim▁hole|> res.render('about', { title: 'About' }); }); module.exports = router;<|fim▁end|>
res.render('index', { title: 'Express' }); }); router.get('/about', function(req, res, next) {
<|file_name|>corEdges.py<|end_file_name|><|fim▁begin|>import sys import numpy as np from copy import copy, deepcopy import multiprocessing as mp from numpy.random import shuffle, random, normal from math import log, sqrt, exp, pi import itertools as it from scipy.stats import gaussian_kde, pearsonr from scipy.stats imp...
dat = open(exprfile,'r').read().strip().split("\n") dats = map(lambda x: x.split("\t"), dat) fout = open(fileout,'w') (fromx,toy) = prepGeneDataGG(dats, genes, g1, g2)
<|file_name|>exif.py<|end_file_name|><|fim▁begin|># Created By: Virgil Dupras # Created On: 2011-04-20 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are al...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># # Copyright 2011 the Melange 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<|fim▁hole|># Unless required by applicable law or...
# # http://www.apache.org/licenses/LICENSE-2.0 #
<|file_name|>test_inventory_set.py<|end_file_name|><|fim▁begin|>import os import mock import pytest import bridgy.inventory from bridgy.inventory import InventorySet, Instance from bridgy.inventory.aws import AwsInventory from bridgy.config import Config def get_aws_inventory(name): test_dir = os.path.dirname(os....
aws_instances = [
<|file_name|>AxisProperties.java<|end_file_name|><|fim▁begin|>/* * microMathematics - Extended Visual Calculator * Copyright (C) 2014-2021 by Mikhail Kulesh * * 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 Softw...
<|file_name|>xml-parser-tests.ts<|end_file_name|><|fim▁begin|>import parse = require('xml-parser'); declare var assert: { equal<T>(a: T, b: T): void }; var doc: parse.Document = parse( '<?xml version="1.0" encoding="utf-8"?>' +<|fim▁hole|>var root: parse.Node = doc.root; assert.equal(root.name, 'mydoc'); var childre...
'<mydoc><child a="1">foo</child><child/></mydoc>'); var declaration: parse.Declaration = doc.declaration; assert.equal(declaration.attributes['version'], '1.0'); assert.equal(declaration.attributes['encoding'], 'utf-8');
<|file_name|>Straw.py<|end_file_name|><|fim▁begin|># "Copyright (c) 2000-2003 The Regents of the University of California. # All rights reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose, without fee, and without written agreement # is hereby granted, p...
#now, pack the data so that it can be easily unpacked for i in range(len(data)):
<|file_name|>web.py<|end_file_name|><|fim▁begin|># # Copyright 2009 Facebook # # 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 requ...
.. warning::
<|file_name|>test_dtd.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2013 Zuza Software Foundation # # This file is part of translate. # # translate is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by...
] for special in specials: quoted_special = dtd.quoteforandroid(special) unquoted_special = dtd.unquotefromandroid(quoted_special)
<|file_name|>common.py<|end_file_name|><|fim▁begin|>"""Functions used by least-squares algorithms.""" from math import copysign import numpy as np from numpy.linalg import norm from scipy.linalg import cho_factor, cho_solve, LinAlgError from scipy.sparse import issparse from scipy.sparse.linalg import LinearOperator,...
alpha = initial_alpha
<|file_name|>linux_net.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Isaku Yamahata <yamahata at private email ne jp> # <yamahata at valinux co jp> # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); y...
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>'use strict'; var webpack = require('webpack'); var cfg = { entry: './src/main.jsx', output: { path: __dirname + '/dist',<|fim▁hole|> filename: 'main.js', }, externals: { yaspm: 'commonjs yaspm' }, target: process.env.NODE_ENV === 'web...
<|file_name|>test_casafuncs.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, absolute_import, division import os import shutil from itertools import product import pytest import numpy as np from numpy.testing import assert_allclose from astropy.tests.helper import assert_quantity_allclose from a...
assert_allclose(cube.wcs.pixel_to_world_values(1, 2, 3), [2.406271e+01, 2.993521e+01, 1.421911e+09])
<|file_name|>ModOverrides.java<|end_file_name|><|fim▁begin|>import java.util.*; import Jakarta.util.FixDosOutputStream; import java.io.*; //------------------------ j2jBase layer ------------------- //------ mixin-layer for dealing with Overrides and New Modifier //------ offhand, I wonder why we can't let j2j...
// Step 2: it's OK to be present. If so, the reduction is to // print the white-space in front for pretty-printing props.print( getComment() );
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # © 2017 Cesar Barron Bautista # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).<|fim▁hole|>from . import purchase<|fim▁end|>
<|file_name|>Response.ts<|end_file_name|><|fim▁begin|>import { DerivationError } from './DerivationError';<|fim▁hole|> hasErrors: boolean; errorMessage?: string; versionErrors?: string[]; accessErrors?: string[]; missingErrors?: string[]; derivationErrors?: DerivationError[]; }<|fim▁end|>
import { ResponseType } from './ResponseType'; export interface Response { responseType: ResponseType;
<|file_name|>rm.rs<|end_file_name|><|fim▁begin|>use config::Config; use errors::*;<|fim▁hole|>pub fn setup<'a, 'b>() -> App<'a, 'b> { SubCommand::with_name("rm") .about("Removes a user") .arg( Arg::with_name("USER") .help("Specifies the user") .required(t...
use clap::{App, Arg, ArgMatches, SubCommand};
<|file_name|>mudserver.js<|end_file_name|><|fim▁begin|>/* * Include everything. */ var net = require('net'); var MudClient = require("./mudclient.js"); var MudRooms = require("./mudrooms.js"); /* * I wanted to make this a field on a MudServer class and node decided it wanted to monkeypatch my scope and break that ...
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>'use strict'; var LIVERELOAD_PORT = 35729; var lrSnippet = require('connect-livereload')({ port: LIVERELOAD_PORT }); var mountFolder = function (connect, dir) { return connect.static(require('path').resolve(dir)); }; var fs = require('fs'); var delayApi...
<|file_name|>fake_namespaces.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 The Kubernetes 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/...
return obj.(*api.Namespace), err }
<|file_name|>markovzart2.py<|end_file_name|><|fim▁begin|>import random import musictheory import filezart import math from pydub import AudioSegment from pydub.playback import play class Part: def __init__(self, typ=None, intensity=0, size=0, gen=0, cho=0): self._type = typ #"n1", "n2", "bg", "ch", "ge" ...
<|file_name|>test_qcut.py<|end_file_name|><|fim▁begin|>import os import numpy as np import pytest import pandas as pd from pandas import ( Categorical, DatetimeIndex, Interval, IntervalIndex, NaT, Series, TimedeltaIndex, Timestamp, cut, date_range, isna, qcut, timed...
assert ep <= sn
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from dotenv import load_dotenv <|fim▁hole|><|fim▁end|>
load_dotenv('./.env')
<|file_name|>check_virsh_domains.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Script to determine the performance statistics and other information # related to libvirt guests # https://github.com/odyssey4me/monitoring-scripts # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not...
<|file_name|>dmui.js<|end_file_name|><|fim▁begin|>/*! * ===================================================== * dmui v0.1.0 (http://www.91holy.com) * ===================================================== */ /*! * dmui JavaScript Library v0.1.0 * https://dmui.com/ * Copyright dmui Foundation and other contributo...
getCookie: getCookie, getDocumentCookie: getDocumentCookie };
<|file_name|>word_model.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Module to handle word vectors and initializing embeddings. """ import numpy as np from gensim.models.keyedvectors import KeyedVectors from utils import constants as Constants from utils.timer import Timer from collections import Count...
else: self.set_model(filename, embed_type)
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms from django.core.validators import validate_email from django.db.models import Q from django.utils.translation import ugettext_lazy as _ <|fim▁hole|>class PasswordRecoveryForm(forms.Form): username_or_email = forms.CharField() error_me...
from .utils import get_user_model
<|file_name|>blog.js<|end_file_name|><|fim▁begin|>const SET_BLOGINFO = 'set/blog/info'; /* const SET_BLOGINFO_SUCCESS = 'set/blog/info/success'; const SET_BLOGINFO_FAIL = 'set/blog/info/fail'; */ const initialState = { data: require('../../db/jsonData/blogGroup.json').blogGroupBox }; export default function reducer...
};
<|file_name|>multipart.rs<|end_file_name|><|fim▁begin|>use std::fmt; use std::fs::File; use std::io::Read; use std::io::Write; use std::path::PathBuf; use mime_guess; use crate::error::Result; use crate::http::plus::random_alphanumeric; const BOUNDARY_LEN: usize = 32; fn gen_boundary() -> String { random_alphan...
<|file_name|>memes.py<|end_file_name|><|fim▁begin|>import discord from discord.ext import commands from sys import argv class Memes: """ Meme commands """ def __init__(self, bot): self.bot = bot print('Addon "{}" loaded'.format(self.__class__.__name__)) async def _meme(self, ctx, m...
# this feels wrong...
<|file_name|>mem.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/. //! Memory operations.<|fim▁hole|>pub use lrs_core::mem::{ unini...
<|file_name|>nested-item-spans.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 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.o...
<|file_name|>cci_class_4.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/lic...
} } impl cat {
<|file_name|>checks.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """A flow to run checks for a host.""" from grr.lib import aff4 from grr.lib import flow from grr.lib import rdfvalue from grr.lib.checks import checks from grr.proto import flows_pb2 class CheckFlowArgs(rdfvalue.RDFProtoStruct): protobuf = f...
artifact_id = responses.request_data["artifact_id"] # TODO(user): Check whether artifact collection succeeded.
<|file_name|>lightweight_test_trait.hpp<|end_file_name|><|fim▁begin|>#ifndef BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP #define BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once #endif // boost/core/lightweight_test_trait.hpp // // BOOST_TEST_TRAIT_T...
BOOST_LIGHTWEIGHT_TEST_OSTREAM
<|file_name|>auth-router.js<|end_file_name|><|fim▁begin|>'use strict'; module.exports = ({ app, controllers, authentication }) => { const controller = controllers.auth; const authRoute = '/api/auth';<|fim▁hole|> app.post(authRoute + '/login', controller.loginLocal); app.get(authRoute + '/logout', contro...
app.post(authRoute + '/register', controller.register);
<|file_name|>test_volume.py<|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 applicable la...
<|file_name|>api.py<|end_file_name|><|fim▁begin|># Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. from coriolis import utils from coriolis.conductor.rpc import client as rpc_conductor_client from coriolis.minion_manager.rpc import client as rpc_minion_manager_client <|fim▁hole|> self._rpc_conduct...
class API(object): def __init__(self):
<|file_name|>dell_hw.go<|end_file_name|><|fim▁begin|>package collectors import ( "encoding/json" "fmt" "strconv" "strings" "time" "bosun.org/metadata" "bosun.org/opentsdb" "bosun.org/slog" "bosun.org/util" ) func init() { const interval = time.Minute * 5 collectors = append(collectors, &IntervalCollecto...
&IntervalCollector{F: c_omreport_storage_controller, Interval: interval}, &IntervalCollector{F: c_omreport_storage_enclosure, Interval: interval}, &IntervalCollector{F: c_omreport_storage_vdisk, Interval: interval}, &IntervalCollector{F: c_omreport_system, Interval: interval},
<|file_name|>timing-repeat.js<|end_file_name|><|fim▁begin|><|fim▁hole|>export { default } from 'ember-fhir/serializers/timing-repeat';<|fim▁end|>
<|file_name|>sidebar.js<|end_file_name|><|fim▁begin|>/** ***** BEGIN LICENSE BLOCK ***** * * Copyright (C) 2019 Marc Ruiz Altisent. All rights reserved. * * This file is part of FoxReplace. * * FoxReplace is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Licen...
for (let item of serialized) {
<|file_name|>delivery_carrier.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2018 Simone Rubino - Agile Business Group # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, models from odoo.tools import safe_eval class DeliveryCarrier(models.Model): _inhe...
for line in self.price_rule_ids: if line.product_category_id: products = order.mapped('order_line.product_id') test = any(product.categ_id == line.product_category_id
<|file_name|>ad.js<|end_file_name|><|fim▁begin|>function main () { const ad_el = document.getElementById('bsa-cpc') if (!ad_el || innerWidth < 800) { // if no ad element or element hidden, don't load buysellads return } const script = document.createElement('script') script.onload = () => { if (_b...
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#!coding: utf-8 """ Usage: main.py <host> <username> <password> [-r] [--port=<port>] [--hub=<hub>] [--pppoe-username=<username>] [--pppoe-password=<password>] [--output=<output>] Options: -h --help Show help -r Ch...
logging.info("vpn connect %s (%s)"%(ok,why)) if ok: return True,why
<|file_name|>_rvs_sampling.py<|end_file_name|><|fim▁begin|>import numpy as np import warnings from scipy._lib._util import check_random_state def rvs_ratio_uniforms(pdf, umax, vmin, vmax, size=1, c=0, random_state=None): """ Generate random samples from a probability density function using the ratio-of-un...
<|file_name|>hash_file.py<|end_file_name|><|fim▁begin|>import hashlib from core.analytics import InlineAnalytics from core.observables import Hash HASH_TYPES_DICT = { "md5": hashlib.md5, "sha1": hashlib.sha1, "sha256": hashlib.sha256, "sha512": hashlib.sha512, } class HashFile(InlineAnalytics): ...
"{} hash".format(hash_type.upper()), "HashFile",
<|file_name|>zhttpto.rs<|end_file_name|><|fim▁begin|>// // zhttpto.rs // // Starting code for PS1 // Running on Rust 0.9 // // Note that this code has serious security risks! You should not run it // on any system with access to sensitive files. // // University of Virginia - cs4414 Spring 2014 // Weilin Xu and Davi...
<|file_name|>__manifest__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- { 'name': 'Booths/Exhibitors Bridge', 'category': 'Marketing/Events', 'version': '1.0', 'summary': 'Event Booths, automatically create a sponsor.', 'description': """ Automatically create a sponsor when renting a boot...
}
<|file_name|>test_context.py<|end_file_name|><|fim▁begin|>import typing as t import contextlib import pytest import diana State = t.NewType("State", dict) AsyncState = t.NewType("AsyncState", dict) async def no_op(): pass @pytest.fixture def module(): class ContextModule(diana.Module): def __ini...
injector = diana.Injector() injector.load(module) return injector
<|file_name|>_familysrc.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators <|fim▁hole|> def __init__( self, plotly_name="familysrc", parent_name="funnelarea.hoverlabel.font", **kwargs ): super(FamilysrcValidator, self).__init__( plotly_name=pl...
class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator):
<|file_name|>loginWithCode.js<|end_file_name|><|fim▁begin|>/** * Created by cc on 15-8-1. */ angular.module('app.services').factory('loginWithCode', ['app.api.http', '$ionicPopup','Storage','ENV','$state', function (http, $ionicPopup,Storage,ENV,$state) { var dataJSON = {} function login(){ if(ENV....
}
<|file_name|>DbHelper.java<|end_file_name|><|fim▁begin|>package ru.stqa.pft.mantis.appmanager; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.boot.MetadataSources; import org.hibernate.boot.registry.StandardServiceRegistry; import org.hibernate.boot.registry.StandardServiceRegi...
<|file_name|>DirectSpellcheckerSettings.java<|end_file_name|><|fim▁begin|>/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * t...
public float maxTermFreq() { return maxTermFreq; }
<|file_name|>error.go<|end_file_name|><|fim▁begin|><|fim▁hole|>type Error interface { error StatusCode() int Message() string Package() string Function() string ErrorCode() string }<|fim▁end|>
package gobol // Error - defines a common http error interface
<|file_name|>Multiply.java<|end_file_name|><|fim▁begin|>/* Copyright (c) 2009, University of Oslo, Norway * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of sourc...
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or mo...
'auto_install': False, }
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for octo_nemesis project.<|fim▁hole|>For more information on this file, see https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "octo_nemesis.settings") from django.core.wsgi import...
It exposes the WSGI callable as a module-level variable named ``application``.
<|file_name|>__manifest__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # 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 # ...
# # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>.
<|file_name|>es5.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export declare function enableES5(): void; //# sourceMappingURL=es5.d.ts.map
<|file_name|>plugin.js<|end_file_name|><|fim▁begin|>/** * @license Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Spell checker.<|fim▁hole|> // Register a plugin named "wsc". CKEDITOR.plugins.add( ...
*/
<|file_name|>CustomTargetingValueStatus.java<|end_file_name|><|fim▁begin|><|fim▁hole|> import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for CustomTargetingValue.Status. * * <p>The following schema fragment specifies the expected content contained within this ...
package com.google.api.ads.dfp.jaxws.v201511;
<|file_name|>date.py<|end_file_name|><|fim▁begin|>''' Ugly - will be improved soon ''' from datetime import datetime,timedelta def archive_timestamp(timestamp): ''' ''' _d=datetime.strptime(timestamp, '%Y%m%d%H%M%S') return _d.strftime('%Y%m%d') def way_date(date_input): ''' ''' if isins...
@property def start_date(self): ''' '''
<|file_name|>calendar-sk-utf8.js<|end_file_name|><|fim▁begin|>// Calendar SK language // Author: Peter Valach (pvalach@gmx.net) // Encoding: utf-8 // Last update: 2003/10/29<|fim▁hole|>Calendar._DN = new Array ("NedeÄľa", "Pondelok", "Utorok", "Streda", "Ĺ tvrtok", "Piatok", "Sobota", "NedeÄľa"); // short day n...
// full day names
<|file_name|>all_examples3.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)] extern crate nalgebra as na;<|fim▁hole|>extern crate ncollide3d; extern crate nphysics3d; extern crate nphysics_testbed3d; macro_rules! r( ($e: expr) => { nalgebra::convert::<f64, N>($e) } ); use inflector::Inflector; us...
<|file_name|>_nova.py<|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 appl...
'OS-EXT-STS:power_state', 'OS-EXT-STS:task_state', 'OS-EXT-SRV-ATTR:instance_name', 'OS-EXT-SRV-ATTR:host', 'OS-EXT-AZ:availability_zone', 'OS-DCF:diskConfig']
<|file_name|>add_gold.py<|end_file_name|><|fim▁begin|>import argparse # parse argument import datetime from tinydb import TinyDB import config parser = argparse.ArgumentParser(description='Refill Gold To Bot') parser.add_argument('-n', help='Number of credits', required=True) parser.add_argument('-c', help='Currency...
<|file_name|>user-model.go<|end_file_name|><|fim▁begin|>package app import ( . "strconv" "time" ) type User struct { Id int64 Nom string Prenom string Email string Password string CreatedAt time.Time UpdatedAt time.Time }<|fim▁hole|> // permet d'enregistrer les éléments du formulaire fun...
<|file_name|>FeedForwardPattern.java<|end_file_name|><|fim▁begin|>/* * Encog(tm) Core v3.3 - Java Version * http://www.heatonresearch.com/encog/ * https://github.com/encog/encog-java-core * Copyright 2008-2014 Heaton Research, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may n...
*
<|file_name|>user_input.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import string from time import strftime def append_new_end(word,user_end): space_count = word.count('~') # count number of placeholders if space_count > 0: total_word = word[:-space_count] + user_end # supplie...
write_output(each.encode('utf-8') + ' '), print write_output('\n') print
<|file_name|>worker-manager.js<|end_file_name|><|fim▁begin|><|fim▁hole|>var Worker = require('./worker') /** * Tracks worker state across runs. */ function WorkerManager () { this._pollHandle = null this.workers = {} this.isPolling = false this.shouldShutdown = false } WorkerManager.prototype.registerWorker...
<|file_name|>test_rfxtrx.py<|end_file_name|><|fim▁begin|>"""The tests for the Rfxtrx component.""" # pylint: disable=protected-access import unittest import pytest from homeassistant.core import callback from homeassistant.bootstrap import setup_component from homeassistant.components import rfxtrx as rfxtrx from tes...
class TestRFXTRX(unittest.TestCase): """Test the Rfxtrx component."""
<|file_name|>gifxmp.py<|end_file_name|><|fim▁begin|>from mmap import mmap ## exiftool -xmp-dc:subject=Metadatos XMP de prueba ./test.gif ## class gifxmp: def __init__(self,filename): self.mmaped = self.__mmap(filename) self.fst = self.__checkxmp() if self.fst != -1: self.xml = self.__loadxmppacket() pr...
## Comprueba que el header es correcto, solo se comprobara la existencia de
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2020 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) import platform import sys import os from spack import * class Namd...
self._copy_arch_file(_fftw) opts.extend(['--with-{0}'.format(_fftw), '--fftw-prefix', spec['fftw'].prefix])
<|file_name|>NonlinearElement_Cuda.hpp<|end_file_name|><|fim▁begin|>//@HEADER // ************************************************************************ // // Kokkos v. 2.0 // Copyright (2014) Sandia Corporation // // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corpora...
<|file_name|>GroupAnagrams_time.java<|end_file_name|><|fim▁begin|>package code.one; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; //Given an array of strings, group anagrams together. // //For example, given: ["eat", "tea", "tan",...
for (String str : strs) { char[] c = str.toCharArray(); Arrays.sort(c);
<|file_name|>generate-barcode-and-save-asposecloudstorage.py<|end_file_name|><|fim▁begin|>import asposebarcodecloud from asposebarcodecloud.BarcodeApi import BarcodeApi from asposebarcodecloud.BarcodeApi import ApiException import asposestoragecloud from asposestoragecloud.StorageApi import StorageApi from aspo...
data_folder = "../../data/" #resouece data folder
<|file_name|>TileRenderer.ts<|end_file_name|><|fim▁begin|>import { WRAP_MODES } from '@pixi/constants'; import { BaseTexture, Buffer, ObjectRenderer, Renderer } from '@pixi/core'; import { settings } from './settings'; import { TilemapGeometry, TilemapShader } from './TilemapShader'; import { TextileResource } from './...