prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>links.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use core::PackageSet; use util::{CargoResult, human}; // Validate that there are no duplicated native libraries among packages and // that all packages with `links` also have a build script. pub fn validate(deps: &PackageSet) -> CargoRe...
let lib = match dep.manifest().links() { Some(lib) => lib, None => continue, };
<|file_name|>iworkflow_license_pool.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2017 F5 Networks Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # ...
if self.exists(): return self.update() else: return self.create()
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod application;<|fim▁hole|><|fim▁end|>
pub use application::Application; pub use application::ApplicationMessage;
<|file_name|>term_pygame.py<|end_file_name|><|fim▁begin|>import os import pygame import sys import threading, time from pygame.locals import * import logging log = logging.getLogger('pytality.term.pygame') log.debug("pygame version: %r", pygame.version.ver) """ A mapping of special keycodes into representative s...
<|file_name|>ice-7868.rs<|end_file_name|><|fim▁begin|>#![warn(clippy::undocumented_unsafe_blocks)] #![allow(clippy::no_effect)] #[path = "auxiliary/ice-7868-aux.rs"] mod zero; <|fim▁hole|><|fim▁end|>
fn main() {}
<|file_name|>_component_store.py<|end_file_name|><|fim▁begin|>__all__ = [ 'ComponentStore', ] from pathlib import Path import copy import requests from typing import Callable from . import _components as comp from .structures import ComponentReference class ComponentStore: def __init__(self, local_search_path...
path_suffix = name + '/' + self._tags_subpath + '/' + tag #TODO: Handle symlinks in GIT URLs else: path_suffix = name + '/' + self._component_file_name
<|file_name|>install.py<|end_file_name|><|fim▁begin|>import zeit.cms.generation<|fim▁hole|> import zeit.calendar.calendar import zeit.calendar.interfaces @zeit.cms.generation.get_root def evolve(root): zeit.cms.generation.install.installLocalUtility( root, zeit.calendar.calendar.Calendar, 'calenda...
import zeit.cms.generation.install
<|file_name|>crawlForMovies.test.js<|end_file_name|><|fim▁begin|><|fim▁hole|>'use strict' /* globals describe, test, expect, jest */ const path = require('path') // This is the module we are testing const { crawlForMovies } = require('../crawlForMovies') const crawlParams = { rootDirectory: __dirname, searchDirCb...
<|file_name|>env.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Ethcore (UK) Ltd. // This file is part of Parity. <|fim▁hole|>// Parity 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...
<|file_name|>nmcollector.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python from noisemapper.mapper import * #from collectors.lib import utils ### Define the object mapper and start mapping def main():<|fim▁hole|># utils.drop_privileges() mapper = NoiseMapper() mapper.run() if __name__ == "__main__": ...
<|file_name|>phases.go<|end_file_name|><|fim▁begin|>package build type Phase int const ( PhasePrivileged Phase = iota PhasePrivilegeDropped PhasePreInstall PhasePostInstall ) type PhaseCompileable interface {<|fim▁hole|>}<|fim▁end|>
InstructionsForPhase(phase Phase) []Instruction
<|file_name|>media_manipulator.py<|end_file_name|><|fim▁begin|>from typing import List from backend.common.cache_clearing import get_affected_queries from backend.common.manipulators.manipulator_base import ManipulatorBase from backend.common.models.cached_model import TAffectedReferences from backend.common.models.me...
<|file_name|>index.tsx<|end_file_name|><|fim▁begin|>import { ArtworkExtraLinks_artwork } from "__generated__/ArtworkExtraLinks_artwork.graphql" import { AuctionTimerState } from "app/Components/Bidding/Components/Timer" import { navigate } from "app/navigation/navigate" import { partnerName } from "app/Scenes/Artwork/C...
const tracking = useTracking() return ( <View>
<|file_name|>arrays.js<|end_file_name|><|fim▁begin|>/* * Meran - MERAN UNLP is a ILS (Integrated Library System) wich provides Catalog, * Circulation and User's Management. It's written in Perl, and uses Apache2 * Web-Server, MySQL database and Sphinx 2 indexing. * Copyright (C) 2009-2013 Grupo de desarrollo de Mer...
} } else { a.sort();
<|file_name|>macros_main_return.rs<|end_file_name|><|fim▁begin|>use tests_build::tokio; <|fim▁hole|>#[tokio::main] async fn main() -> Result<(), ()> { return Ok(()); }<|fim▁end|>
<|file_name|>echo.rs<|end_file_name|><|fim▁begin|>extern crate getopts; use std::os; use std::old_io::{print, println}; use std::old_io::stdio; static VERSION: &'static str = "1.0.0"; fn main() { let args = os::args(); let ref program = args[0]; // Set possible flags. // The first argument to `optfl...
// Any exit code other than 0 indicates failure. } };
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>import os from os.path import expanduser import sys import yaml def getSettings(): if not getSettings.settings: cwd = os.getcwd() path = cwd + '/.settings.yaml' if not os.path.isfile(path): path = cwd + '/.screeps_settings....
<|file_name|>MonospaceText.test.tsx<|end_file_name|><|fim▁begin|>import { h, mount } from 'bore'; import * as expect from 'expect'; import { MonospaceText } from './index'; describe( MonospaceText.is, () => {<|fim▁hole|> describe( `Custom element`, () => { it( `should be registered`, () => { expect( cust...
<|file_name|>internalproperty.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding vali...
<|file_name|>new.js<|end_file_name|><|fim▁begin|>var hook = require("../lib/resources/hook"); var hooks = require("hook.io-hooks"); var bodyParser = require('body-parser'); var mergeParams = require('merge-params'); var config = require('../config'); var themes = require('../lib/resources/themes'); var hooks = require(...
mergeParams(req, res, function(){});
<|file_name|>PySCUBA_design.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # PySCUBA/src/PySCUBA/PySCUBA_design.py # Author: Gregory Giecold for the GC Yuan Lab # Affiliation: Harvard University # Contact: g.giecold@gmail.com; ggiecold@jimmy.harvard.edu from PyQt4 import QtCore, QtG...
"PCA", None)) self.clusterModeComboBox.setItemText(2, _translate("MainWindow", "PCA2", None))
<|file_name|>dag.py<|end_file_name|><|fim▁begin|># Copyright 2015 Palo Alto Networks, 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...
<|file_name|>alloc-file.js<|end_file_name|><|fim▁begin|>import { Model, belongsTo } from 'ember-cli-mirage'; export default Model.extend({<|fim▁hole|>});<|fim▁end|>
parent: belongsTo('alloc-file'),
<|file_name|>test_dummy.py<|end_file_name|><|fim▁begin|># coding=utf-8 """Dummy test. Pointless dummy test. """ from __future__ import absolute_import from __future__ import print_function from __future__ import division # import pysnapsync.server<|fim▁hole|> def inc(arg): """Return arg incremented by one.""" ...
# import pysnapsync.client
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|># For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/en/latest/topics/settings.html # BOT_NAME = 'appstore' SPIDER_MODULES =...
# Scrapy settings for appstore project #
<|file_name|>Exp6_LineFollowing_IRSensors.py<|end_file_name|><|fim▁begin|>"""//*********************************************************************** * Exp6_LineFollowing_IRSensors -- RedBot Experiment 6 * * This code reads the three line following sensors on A3, A6, and A7 * and prints them out to the Serial Moni...
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>var gulp = require('gulp'); var gutil = require('gulp-util'); var bower = require('bower'); var concat = require('gulp-concat'); var sass = require('gulp-sass'); var minifyCss = require('gulp-minify'); var rename = require('gulp-rename'); var sh = require('shelljs')...
.pipe(concat('lib2-bundle.js')) .pipe(gulp.dest('./www/dist/')); })
<|file_name|>TAToolsHandler.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # coding=utf-8 # # Copyright (c) 2013-2015 First Flamingo Enterprise B.V. # # 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 o...
self.body.add(self.header)
<|file_name|>MapTraitArgument.java<|end_file_name|><|fim▁begin|>package edu.ucsd.arcum.interpreter.ast; import java.util.List; import java.util.Set; import org.eclipse.core.runtime.CoreException; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import edu.ucsd.arcum.exception...
pseudoStmt = StaticRealizationStatement.makeNested(map, getName(), patternExpr, formals, this.getLocation()); pseudoStmt.typeCheckAndValidate(optionIntf);
<|file_name|>flow.go<|end_file_name|><|fim▁begin|>package surge import ( "fmt" "time" ) type applyCallback func(gwy NodeRunnerInterface, flow FlowInterface) //======================================================================== // // type FlowInterface // //=====================================================...
func (flow *Flow) GetCid() int64 { return flow.cid } func (flow *Flow) GetSid() int64 { return flow.sid } func (flow *Flow) GetTio() TioInterface { return flow.tio.GetTio() } func (flow *Flow) GetRb() RateBucketInterface { return flow.rb }
<|file_name|>test_affinity_groups_projects.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The A...
def __init__(self):
<|file_name|>test_csiactobs.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # ========================================================================== # This scripts performs unit tests for the csiactobs script # # Copyright (C) 2016-2018 Juergen Knoedlseder # # This program is free software: you can redistrib...
runlist = ['15000','15001']
<|file_name|>5396-fnUpdate-arrays-mData.js<|end_file_name|><|fim▁begin|>// DATA_TEMPLATE: empty_table oTest.fnStart("5396 - fnUpdate with 2D arrays for a single row"); $(document).ready(function () { $('#example thead tr').append('<th>6</th>'); $('#example thead tr').append('<th>7</th>'); $('#example thead...
{ "mData": "4.0.1"}, { "mData": "4.1.0"}, { "mData": "4.1.1"},
<|file_name|>combustible.py<|end_file_name|><|fim▁begin|># -*-coding:Utf-8 -* # Copyright (c) 2010-2017 NOEL-BARON Léo # 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 s...
from primaires.objet.types.base import BaseType class Combustible(BaseType):
<|file_name|>issue-21475.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // 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,...
// 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.
<|file_name|>test_config_basic.py<|end_file_name|><|fim▁begin|>import h2o, h2o_config l = h2o_config.setup_test_config(test_config_json='test_config.json') print "\nsetup_test_config returns list of test config objs:", l<|fim▁hole|>print "\nHow to reference.." for i, obj in enumerate(h2o_config.configs): print "ke...
# Here are some ways to reference the config state that the json created
<|file_name|>optimizer.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/. */ //! Transforms a display list to produce a visually-equival...
<|file_name|>proc_txt.py<|end_file_name|><|fim▁begin|>import numpy as np import sys import os from utils import * from utils_procs import * # extract letters and spaces, and transform to lower case # how: python proc_txt.py input_file_name # read input args # _, input_fname = 'temp', 'poetry_2' _, input_fname = sys....
<|file_name|>cache_update.go<|end_file_name|><|fim▁begin|>package dao import ( "context" "fmt" "strconv" "go-common/app/service/main/relation/model" gmc "go-common/library/cache/memcache" "go-common/library/cache/redis" "go-common/library/log" "go-common/library/time" ) const ( _prefixFollowings = "at_" _p...
conn := d.mc.Get(c) if err = conn.Delete(key); err != nil { if err == gmc.ErrNotFound { err = nil
<|file_name|>Style.ts<|end_file_name|><|fim▁begin|>import { Type } from '@ephox/katamari'; // some elements, such as mathml, don't have style attributes // others, such as angular elements, have style attributes that aren't a CSSStyleDeclaration const isSupported = (dom: Node): dom is HTMLStyleElement =><|fim▁hole|> ...
// eslint-disable-next-line @typescript-eslint/unbound-method
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks #<|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, # ...
# 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|>TroubleshootingGuide.tsx<|end_file_name|><|fim▁begin|>/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */ <|fim▁hole|>import React from 'react'; import {N...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * Core dependencies. */ var path = require('path'); var dirname = path.dirname; /** * Create path. * * @param {String} pattern * @returns {Object} * @api private */ function createPattern(pattern) { return { pattern: pattern, included: true, ...
before.reverse().forEach(function(file) { config.files.unshift(createPattern(path.resolve(file))); }); }
<|file_name|>EmployeeWebSocketHandler.java<|end_file_name|><|fim▁begin|>package com.baeldung.webflux; import static java.time.LocalDateTime.now; import static java.util.UUID.randomUUID; import java.time.Duration; import org.springframework.stereotype.Component; import org.springframework.web.reactive.socket.WebSocke...
import reactor.core.publisher.Flux; import reactor.core.publisher.Mono;
<|file_name|>hermite.py<|end_file_name|><|fim▁begin|># Hermite polynomials H_n(x) on the real line for n=0,1,2,3,4 f0 = lambda x: hermite(0,x) f1 = lambda x: hermite(1,x) f2 = lambda x: hermite(2,x) f3 = lambda x: hermite(3,x)<|fim▁hole|><|fim▁end|>
f4 = lambda x: hermite(4,x) plot([f0,f1,f2,f3,f4],[-2,2],[-25,25])
<|file_name|>test_dialect.py<|end_file_name|><|fim▁begin|># coding: utf-8 import datetime from sqlalchemy import bindparam from sqlalchemy import Column from sqlalchemy import DateTime from sqlalchemy import func from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import Table from sqlalche...
<|file_name|>places.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
PLACES = ["Virginia", "Lexington", "Washington", "New York"]
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Defines the Weld abstract syntax tree. //! //! Most of Weld's optimizations occur over the AST, which doubles as a "High-Level IR." The AST //! captures the expressions in Weld using a tree data structure. pub use self::ast::*; // Various convinience methods on the...
<|file_name|>rustwin.rs<|end_file_name|><|fim▁begin|>// Wraps GLUT in an event queue using Rust enums // hides use of callbacks acessing a global, allows users to poll input events from // a user implemented mainloop. // provides a tablet/console oriented MVC framework //use r3d::Vec2f; use common::*; #[deriving(Sh...
pub trait Screen {
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import axios from 'axios' const basePath = '/api' axios.defaults.xsrfCookieName = 'csrftoken' axios.defaults.xsrfHeaderName = 'X-CSRFToken' export default { Utils: { getYearsChoiceList: (app, model) => axios({ url: `${basePath}/${app}/${model}/years/`, ...
url: `${basePath}/${app}/${model}/?o=${ordering}&page=${page}${query_string}`,
<|file_name|>main.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>}<|fim▁end|>
fn main() { let rust = "rust"; println!("{}", rust);
<|file_name|>flashErrors.js<|end_file_name|><|fim▁begin|>module.exports = { Errors: {<|fim▁hole|> set: (req, error_type) => (req.appSession.flashError = error_type), clear: (req) => { if (!req.appSession.flashError) return; const error_type = req.appSession.flashError; delete req.appSession.flashError;...
WrongAccount: "wrong-acount", },
<|file_name|>matrix_store.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2014 Open Connectome Project (http://openconnecto.me) * Written by Da Zheng (zhengda1936@gmail.com) *<|fim▁hole|> * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
* This file is part of FlashMatrix. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
<|file_name|>jwt-optional.hook.ts<|end_file_name|><|fim▁begin|>// 3p import { HookDecorator } from '@foal/core'; // FoalTS<|fim▁hole|> * Hook factory to authenticate users using JSON Web Tokens. * * The hook does not return any error when no user could be authenticated. * * If `options.cookie` is not defined, the ...
import { JWT, JWTOptions, VerifyOptions } from './jwt.hook'; /**
<|file_name|>i2c_esp.py<|end_file_name|><|fim▁begin|># i2c_esp.py Test program for asi2c.py # Tests Responder on ESP8266 # The MIT License (MIT) # # Copyright (c) 2018 Peter Hinch # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the...
# pyb esp8266 # scl X9 - 0 # sda X10 - 2
<|file_name|>ErrorProvider.js<|end_file_name|><|fim▁begin|><|fim▁hole|> errors: [], }); const ErrorProvider = ({ children }) => { const [errors, setErrors] = useState([]); return ( <ErrorContext.Provider value={{ errors, setErrors, }} > {children} </ErrorContext.Prov...
import React, { createContext, useState } from 'react'; import PropTypes from 'prop-types'; const ErrorContext = createContext({
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- __all__ = ["photometry", "epic", "Data", "Inject", "Likelihood", "Summary", "FP", "fit_traptransit"] <|fim▁hole|>from . import photometry, epic from .data import Data from .inject import Inject from .likelihood import Likelihood ...
<|file_name|>exceptions.py<|end_file_name|><|fim▁begin|>from rest_framework import status from rest_framework.exceptions import APIException, ParseError def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors...
class InvalidFilterError(ParseError):
<|file_name|>straight_line_trajectory.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, print_function, division from six.moves import range, map, filter, zip from six import iteritems from collections import deque, defaultdict from .polygon import is_same_direction, line_intersection from .surf...
return type(self) is type(other) and \ self._start == other._start and \
<|file_name|>index.js<|end_file_name|><|fim▁begin|>module.exports = { audioFilter: require('./audioFilter'),<|fim▁hole|>}<|fim▁end|>
destination: require('./destination'), filename: require('./filename'), multer: require('./multer')
<|file_name|>ons-back-button.js<|end_file_name|><|fim▁begin|>import Ember from 'ember'; import layout from '../templates/components/ons-back-button'; export default Ember.Component.extend({<|fim▁hole|>});<|fim▁end|>
layout, tagName: 'ons-back-button', attributeBindings: ['modifier']
<|file_name|>MedianFilter.py<|end_file_name|><|fim▁begin|>import numpy as np from scipy.signal import medfilt import manager.operations.method as method from manager.operations.methodsteps.confirmation import Confirmation from manager.exceptions import VoltPyNotAllowed class MedianFilter(method.ProcessingMethod): ...
yvec = cd.yVector newyvec = medfilt(yvec) dataset.updateCurve(self.model, cd, newyvec) dataset.save()
<|file_name|>KeyspaceParams.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 ...
return new KeyspaceParams(DEFAULT_LOCAL_DURABLE_WRITES, ReplicationParams.local()); }
<|file_name|>Sidebar.ts<|end_file_name|><|fim▁begin|>import { FieldSchema, ValueSchema } from '@ephox/boulder'; import { Fun, Optional, Result } from '@ephox/katamari'; export interface SidebarInstanceApi { element: () => HTMLElement; } export interface SidebarSpec { icon?: string; tooltip?: string; onShow?: ...
export const createSidebar = (spec: SidebarSpec): Result<Sidebar, ValueSchema.SchemaError<any>> => ValueSchema.asRaw('sidebar', sidebarSchema, spec);
<|file_name|>hero-button.component.avoid.ts<|end_file_name|><|fim▁begin|>// #docregion import { Component, EventEmitter } from '@angular/core'; // #docregion example /* avoid */ <|fim▁hole|>@Component({ selector: 'toh-hero-button', template: `<button></button>`, inputs: [ 'label' ], outputs: [ 'change...
<|file_name|>test_copy_in_out_cpp.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************************/ /* Copyright 2009 Barcelona Supercomputing Center */ /* ...
CopyData* cd = wd->getCopies();
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from .models import BackgroundImages, Widget class WidgetAdmin(admin.ModelAdmin): list_display = ('name', 'link', 'is_featured') ordering = ('-id',) <|fim▁hole|>class BackgroundAdmin(admin.ModelAdmin): list_display = ('na...
<|file_name|>fake_apiserver.go<|end_file_name|><|fim▁begin|>// Code generated by client-gen. DO NOT EDIT. package fake import ( "context" configv1 "github.com/openshift/api/config/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema...
<|file_name|>frontend.go<|end_file_name|><|fim▁begin|>package main import ( "net/http" "os" "os/signal" "syscall" "go.uber.org/zap" "github.com/rakyll/statik/fs" "gopkg.in/urfave/cli.v1" "context" "time" "fmt" _ "github.com/jirwin/ipfs-archive/frontend/statik" "github.com/jirwin/ipfs-archive/version" ...
logger.Info(fmt.Sprintf("Listening on %s", addr)) go func() {
<|file_name|>eval_kanungo_est.py<|end_file_name|><|fim▁begin|>import env import numpy as np import metaomr<|fim▁hole|>import metaomr.kanungo as kan from metaomr.page import Page import glob import pandas as pd import itertools import os.path import sys from datetime import datetime from random import random, randint ID...
<|file_name|>GuiHandler.java<|end_file_name|><|fim▁begin|>package com.timotheteus.raincontrol.handlers; import com.timotheteus.raincontrol.tileentities.IGUITile; import com.timotheteus.raincontrol.tileentities.TileEntityInventoryBase; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; im...
}
<|file_name|>grooveoff_it.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="it_IT"> <context> <name>AboutDialog</name> <message> <location filename="../src/grooveoff/AboutDialog.ui" line="14"/> <source>About GrooveOff</source> ...
</message>
<|file_name|>deriving-global.rs<|end_file_name|><|fim▁begin|>// xfail-fast #7103 `extern mod` does not work on check-fast // xfail-pretty - does not converge // 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...
#[deriving(Eq, Ord, TotalEq, TotalOrd,
<|file_name|>naive_bayes.py<|end_file_name|><|fim▁begin|>import numpy import numpy.linalg def training(inputs, minvar=0.1): """Trains a naive-bayes classifier using inputs Returns means and variances of the classifiers """ return numpy.mean(inputs, axis=0), numpy.maximum(minvar, numpy.var(inputs, axis...
# print likelihood(a, m, v) # out = naive_bayes_multidimensional(a, b) # out = (out / numpy.max(out)) * (out > 0.01)
<|file_name|>get_account_urls.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from keyring import get_password from boto.iam.connection import IAMConnection import lib.LoadBotoConfig as BotoConfig from sys import exit envs = ['dev', 'qa', 'staging', 'demo', 'prod'] for env in envs: id = BotoConfig.config.ge...
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>var gulp = require("gulp"), del = require("del"), ts = require("gulp-typescript"), tsProject = ts.createProject("tsconfig.json") typedoc = require("gulp-typedoc"); var compileTS = function () { return tsProject.src()<|fim▁hole|> .js.pipe(gulp.dest("app")); };...
.pipe(tsProject())
<|file_name|>ovirt_disks.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
<|file_name|>formTemplateModel.js<|end_file_name|><|fim▁begin|>/**<|fim▁hole|> * @copyright (c) 2017 WP Ninjas * @since 3.0 */ define( [], function() { var model = Backbone.Model.extend( { defaults: { objectType: 'template', id: 'none', title: 'unknown' }, initialize: func...
* Model that represents our form template. * * @package Ninja Forms client
<|file_name|>UserEtherpadInfoService.java<|end_file_name|><|fim▁begin|>/* * Code contributed to the Learning Layers project * http://www.learning-layers.eu * Development is partly funded by the FP7 Programme of the European * Commission under Grant Agreement FP7-ICT-318209. * Copyright (c) 2016, Karlsruhe Uni...
* See the License for the specific language governing permissions and
<|file_name|>patcher.rs<|end_file_name|><|fim▁begin|>use std::io::prelude::*; use std::fs; use std::cell::RefCell; use std::fs::File; use std::collections::HashMap; use rustc_serialize::json; use rustc_serialize::hex::ToHex; use parser; use parser::usbr; use parser::{Request, Source}; #[derive(RustcDecodable)] struc...
let mut json_line = String::new(); file.read_to_string(&mut json_line).unwrap(); // decode file
<|file_name|>OnboardingContainer.tsx<|end_file_name|><|fim▁begin|>import { useEffect } from 'react'; import { useModals } from '@proton/components'; import DriveOnboardingModal from '../components/onboarding/DriveOnboardingModal'; import DriveContainerBlurred from './DriveContainerBlurred'; interface Props { onD...
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import {Bounds, parseBounds, parseDocumentSize} from './css/layout/bounds'; import {COLORS, isTransparent, parseColor} from './css/types/color'; import {CloneConfigurations, CloneOptions, DocumentCloner, WindowOptions} from './dom/document-cloner'; import {isBodyElemen...
typeof backgroundColorOverride === 'string' ? parseColor(context, backgroundColorOverride) : backgroundColorOverride === null ? COLORS.TRANSPARENT
<|file_name|>Func_readContinuousCharacterData.cpp<|end_file_name|><|fim▁begin|>#include <stddef.h> #include <set> #include <sstream> #include <string> #include <vector> #include "ArgumentRule.h" #include "ConstantNode.h" #include "ContinuousCharacterData.h" #include "Func_readContinuousCharacterData.h" #include "Model...
{
<|file_name|>helper.hpp<|end_file_name|><|fim▁begin|>#pragma once #include <QtGlobal> class Helper { public: <|fim▁hole|> ); static char decodeByte( char *buffer, quint16 position, quint8 positionOffset = 0 ); };<|fim▁end|>
static void encodeByte( char *buffer, quint16 position, char byte, quint8 positionOffset = 0
<|file_name|>CalDAV.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2010 Mark Liversedge (liversedge@gmail.com) * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the...
<|file_name|>vector_plot.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import ma from matplotlib import pyplot as plt from mpl_toolkits.basemap import Basemap as bm from mpl_toolkits.basemap import addcyclic import palettable class vector_plot: def __init__(self, ucompos, vcompos): self.uco...
self.uanoms = self.ucompos.dset['composite_anomalies'] self.vanoms = self.vcompos.dset['composite_anomalies']
<|file_name|>drumkv1widget_elements.cpp<|end_file_name|><|fim▁begin|>// drumkv1widget_elements.cpp // /**************************************************************************** Copyright (C) 2012-2020, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/o...
pDrumkUi->directNoteOn(m_iDirectNoteOn, 0); // note-off! m_iDirectNoteOn = -1; }
<|file_name|>construct-the-rectangle.py<|end_file_name|><|fim▁begin|>class Solution(object): def constructRectangle(self, area): """ :type area: int :rtype: List[int] """ ans = None W = 1 while W * W <= area:<|fim▁hole|> if area % W == 0: ...
<|file_name|>placement.cc<|end_file_name|><|fim▁begin|>/* * This file is part of the demos-linux package. * Copyright (C) 2011-2022 Mark Veltzer <mark.veltzer@gmail.com> *<|fim▁hole|> * (at your option) any later version. * * demos-linux is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANT...
* demos-linux is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or
<|file_name|>list_documents.rs<|end_file_name|><|fim▁begin|>use crate::domain::model::error::Error as ModelError; use crate::domain::ports::secondary::list::{List, Parameters}; use async_trait::async_trait; use common::document::ContainerDocument; use futures::stream::{Stream, StreamExt}; use std::pin::Pin; use tracing...
"List documents", doc_type = D::static_doc_type(), ));
<|file_name|>content.js<|end_file_name|><|fim▁begin|>/* global describe, before, it */ require('mocha')<|fim▁hole|>require('should') var async = require('async') var testUtils = require('./testUtils') var errorMessage = require('../errorMessages/errorMessages') var mongo_dcms_core = require('../index') describe('shoul...
<|file_name|>tracemalloc.py<|end_file_name|><|fim▁begin|>from collections.abc import Sequence, Iterable from functools import total_ordering import fnmatch import linecache import os.path import pickle # Import types and functions implemented in C from _tracemalloc import * from _tracemalloc import _get_objec...
def __lt__(self, other):
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#[derive(Debug)] struct Rectangle { width: u32, height: u32, } // Methods are similar to functions: they’re declared with the fn keyword and // their name, they can have parameters and a return value, and they contain // some code that is run when they’re call...
println!("Can rect1 hold rect2? {}", rect1.can_hold(&rect2)); println!("Can rect1 hold rect3? {}", rect1.can_hold(&rect3)); }
<|file_name|>image.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 the Apache Li...
<|file_name|>sync_request_bouncer.hpp<|end_file_name|><|fim▁begin|>/****************************************************************************** * ____ _ _____ * * / ___| / \ | ___| C++ * * ...
#include "caf/fwd.hpp" #include "caf/exit_reason.hpp"
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>module.exports = function (grunt) { // Project configuration. grunt.initConfig({ // Metadata. pkg : grunt.file.readJSON('storelocator.jquery.json'), banner : '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today...
jshintrc: 'src/.jshintrc' }, globals: {
<|file_name|>test_hwaf_projects_test.go<|end_file_name|><|fim▁begin|>package main_test import ( "fmt" "io/ioutil" "os" "path/filepath" "strings" "testing" "text/template" ) type pkgdef_t struct { Name string Deps []string } func (p pkgdef_t) BaseName() string { return filepath.Base(p.Name) } func (p pkgde...
source: "src/{{.TestName}}.cxx", {{.TestUse}}
<|file_name|>admin.py<|end_file_name|><|fim▁begin|># from .. import Workflow, Stage, Task, TaskFile # # from flask.ext import admin # from flask.ext.admin.contrib import sqla # #<|fim▁hole|># adm.add_view(sqla.ModelView(m, session))<|fim▁end|>
# def add_cosmos_admin(flask_app, session): # adm = admin.Admin(flask_app, 'Flask Admin', base_template="admin_layout.html") # for m in [Workflow, Stage, Task, TaskFile]:
<|file_name|>Nap.java<|end_file_name|><|fim▁begin|>//: move/Nap.java package pokepon.move; import pokepon.enums.*; import pokepon.pony.Pony; import pokepon.battle.*; /** * Heal 50% of user's HP. * * @author silverweed */ <|fim▁hole|> type = Type.NIGHT; moveType = Move.MoveType.STATUS; maxpp = pp = 10; ...
public class Nap extends Move { public Nap() { super("Nap");
<|file_name|>abilities.ts<|end_file_name|><|fim▁begin|>/* Ratings and how they work: -1: Detrimental An ability that severely harms the user. ex. Defeatist, Slow Start 0: Useless An ability with no overall benefit in a singles battle. ex. Color Change, Plus 1: Ineffective An ability that has minimal ef...
if (move.id === 'clangoroussoulblaze') delete move.selfBoost; // Actual negation of `AfterMoveSecondary` effects implemented in scripts.js move.hasSheerForce = true; }