prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * @file * @copyright 2020 Aleksej Komarov * @license MIT */ <|fim▁hole|>// Themes import './styles/main.scss'; import './styles/themes/abductor.scss'; import './styles/themes/cardtable.scss'; import './styles/themes/hackerman.scss'; import './styles/themes/malf...
<|file_name|>ConnexionHelper.java<|end_file_name|><|fim▁begin|>package org.nla.tarotdroid.lib.helpers; import static com.google.common.base.Preconditions.checkArgument; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; /** * Network and internet connexion helper...
<|file_name|>CreateLoanAccountSearchParameters.java<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * 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 law or agreed to in writi...
* Copyright (c) 2005-2010 Grameen Foundation USA * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License");
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># engine/__init__.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """SQL connections, SQL exe...
<|file_name|>table.go<|end_file_name|><|fim▁begin|>// Copyright 2012 James Cooper. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. // Package gorp provides a simple way to marshal Go structs to and from // SQL databases. It uses the database...
} s.WriteString(dialect.QuoteField(t.keys[x].ColumnName))
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>pub use self::{animal::*, food::*, world::*}; mod animal; mod food; mod world; use lib_simulation as sim; use rand::prelude::*; use serde::Serialize; use wasm_bindgen::prelude::*; #[wasm_bindgen] pub struct Simulation { rng: ThreadRng, sim: sim::Simulation, } ...
pub fn config(&self) -> JsValue { JsValue::from_serde(self.sim.config()).unwrap()
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // For simd (currently x86_64/aarch64) #![cfg_attr(any(target_arc...
extern crate azure;
<|file_name|>discard.go<|end_file_name|><|fim▁begin|>package events import (<|fim▁hole|> "time" "github.com/gravitational/teleport/lib/session" ) // DiscardAuditLog is do-nothing, discard-everything implementation // of IAuditLog interface used for cases when audit is turned off type DiscardAuditLog struct { } fun...
"io"
<|file_name|>UserDao.java<|end_file_name|><|fim▁begin|>package lexek.wschat.db.dao; import lexek.wschat.chat.e.EntityNotFoundException; import lexek.wschat.chat.e.InvalidInputException; import lexek.wschat.db.model.DataPage; import lexek.wschat.db.model.UserData; import lexek.wschat.db.model.UserDto; import lexek.wsch...
<|file_name|>alertSrv.js<|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 th...
* with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0
<|file_name|>ScreenDAOImpl.java<|end_file_name|><|fim▁begin|>package mx.com.cinepolis.digital.booking.persistence.dao.impl; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.ejb.EJB; import javax.ejb.Stateless; import javax.interceptor.Interceptors; import...
* com.cinepolis.digital.booking.model.to.ScreenTO) */ @Override
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bikes_prediction.settings") from django.core.management import execute_from_command_line <|fim▁hole|><|fim▁end|>
execute_from_command_line(sys.argv)
<|file_name|>jsoncors.js<|end_file_name|><|fim▁begin|>(function(ns) { /** * JSON CORS utility * Wraps up all the cors stuff into a simple post or get. Falls back to jsonp */ var JSONCORS = function() { var self = this; var supportsCORS = ('withCredentials' in new XMLHttpRequest()) || (typeof XDomainRequest !...
self.get = function(options) {
<|file_name|>python.py<|end_file_name|><|fim▁begin|>""" A Python "serializer". Doesn't do much serializing per se -- just converts to and from basic Python data types (lists, dicts, strings, etc.). Useful as a basis for other serializers. """ from __future__ import unicode_literals from django.conf import settings fro...
from django.utils import six class Serializer(base.Serializer):
<|file_name|>test_mdk.py<|end_file_name|><|fim▁begin|>""" Tests for the MDK public API that are easier to do in Python. """ from time import time from builtins import range from past.builtins import unicode from unittest import TestCase from tempfile import mkdtemp from collections import Counter import configparser ...
self.assertEqual((lmid.traceId, lmid.causalLevel), (session._context.traceId, [2]))
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>mod frame_timer;<|fim▁hole|><|fim▁end|>
pub use frame_timer::FrameTimer;
<|file_name|>ldap_settings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cstr from frappe.model.docu...
except ImportError: msg = """
<|file_name|>basic.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2011, Chris Umbel 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 without limitation the rights t...
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
<|file_name|>grab-cores.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import threading import spam def grab_cores(threads=1, count=int(1e9)): _threads = [] for i in range(threads): thread = threading.Thread(target=spam.busy, args=(count,)) _threads.append(thread) thread.start...
if __name__ == '__main__': import sys
<|file_name|>demo.js<|end_file_name|><|fim▁begin|>/**<|fim▁hole|> */ alert('local');<|fim▁end|>
* Created by inwebo on 05/02/15.
<|file_name|>util.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import os import sys import copy import re import time import datetime from urllib.request import urlopen import numpy as np import nltk from nltk.stem.wordnet import WordNetLemmatizer from nltk.stem.porter import PorterStemmer import json imp...
for i in range(repeat_times): # repeat in case of http failure
<|file_name|>link.pipe.ts<|end_file_name|><|fim▁begin|>import {Injectable, Pipe, PipeTransform} from '@angular/core'; import {Bundle} from '../domain/bundle';<|fim▁hole|>}) @Injectable() export class LinkPipe implements PipeTransform { constructor(private _appGlobals: AppGlobals) {} transform(text: string, ar...
import {AppGlobals} from '../services/appglobals.service'; @Pipe({ name: 'link'
<|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) { res.render('index', { title: 'SALTI Test Express Site' }); });<|fim▁hole|><|fim▁end|>
module.exports = router;
<|file_name|>IPlayerActionListener.java<|end_file_name|><|fim▁begin|>/* * The MIT License * * Copyright 2013 Thomas Schaffer <thomas.schaffer@epitech.eu>. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to dea...
public void gameAction(ITable table, IPlayerData plData, ActionType type, int amount); public void leave(ITable table, IPlayerData plData);
<|file_name|>training.py<|end_file_name|><|fim▁begin|># Copyright 2015 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.o...
<|file_name|>SwitchFlowUtils.java<|end_file_name|><|fim▁begin|>/* Copyright 2020 Telstra Open Source * * 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.or...
* @param sw switch
<|file_name|>simplereq.go<|end_file_name|><|fim▁begin|>package dchan import ( "bufio" "bytes" "io" "io/ioutil" "strconv" "strings" ) type SimpleReq struct { Header Header Body io.ReadCloser } type Header []header func (h Header) get(k string) int { for idx := range h { if strings.EqualFold(h[idx].Name,...
<|file_name|>Main.js<|end_file_name|><|fim▁begin|>/************************************************************* * * MathJax/jax/output/HTML-CSS/fonts/Neo-Euler/Variants/Regular/Main.js * * Copyright (c) 2013-2014 The MathJax Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * ...
* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS,
<|file_name|>backend.py<|end_file_name|><|fim▁begin|># This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from collections imp...
) else:
<|file_name|>fingerprinter.js<|end_file_name|><|fim▁begin|>const zlib = require('zlib'); const log = require('winston'); const Mutex = require('../mutex'); const database = require('../models/mysql'); const ENV = process.env.NODE_ENV || 'development'; const config = ENV !== 'test' ? require('../config') : require('.....
}); } else {
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 click2stream, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 ...
#[cfg(feature = "discovery")] pub mod rtsp;
<|file_name|>test_source_notfound.py<|end_file_name|><|fim▁begin|>import source_navigation_steps import functional_test class TestSourceInterfaceNotFound( functional_test.FunctionalTest, source_navigation_steps.SourceNavigationStepsMixin):<|fim▁hole|><|fim▁end|>
def test_not_found(self): self._source_not_found()
<|file_name|>archive_test.go<|end_file_name|><|fim▁begin|>package dao import ( "context" "testing" "github.com/smartystreets/goconvey/convey" ) func TestDaotypesURI(t *testing.T) { convey.Convey("typesURI", t, func(ctx convey.C) { ctx.Convey("When everything gose positive", func(ctx convey.C) { p1 := testDa...
ctx.So(rmap, convey.ShouldNotBeNil) })
<|file_name|>_provider_operations_operations.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license informati...
# Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>export * from './application' export * from './breakpoint'<|fim▁hole|>export * from './theme'<|fim▁end|>
export * from './goto' export * from './icons' export * from './lang'
<|file_name|>const.go<|end_file_name|><|fim▁begin|>// Copyright (c) nano Authors. All Rights Reserved. // // 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 wit...
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions:
<|file_name|>_ResourceCreateForm.py<|end_file_name|><|fim▁begin|>""" RESTx: Sane, simple and effective data publishing and integration. Copyright (C) 2010 MuleSoft Inc. http://www.mulesoft.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Lice...
specialized_value = "checked " if input_rctp.get("specialized") in [ "on", "ON" ] else " " if not specialized: body += """ <tr>
<|file_name|>test.js<|end_file_name|><|fim▁begin|>'use strict'; var chai = require('chai'); require('chai-as-promised'); var should = chai.should(); var PouchDB = require('pouchdb-browser'); PouchDB.adapter('worker', require('../../client')); describe('custom api test suite', function () { this.timeout(180000); <...
var db; before(function () {
<|file_name|>echo.py<|end_file_name|><|fim▁begin|><|fim▁hole|> while True: cmd = input('Send: ') answer = serialbus.send_request_wait(10, bytes(cmd, 'ascii')) answer_str = ""; for char in answer: answer_str += (chr(char)) print(answer_str)<|fim▁end|>
from SerialBus import SerialBus serialbus = SerialBus(baud = 19200, serialnum="ABCD")
<|file_name|>create.tsx<|end_file_name|><|fim▁begin|>import { Badge, Button, FormControl, FormLabel, Input, Modal, ModalBody, ModalContent, ModalHeader, ModalFooter, ModalOverlay, ModalCloseButton, Select, useDisclosure, Tabs, TabList, Tab, TabPanel, TabPanels } from '@chakra-ui/re...
projectId, type,
<|file_name|>instr_vmulps.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode}; use ::RegType::*; use ::instruction_def::*; use ::Operand::*; use ::Reg::*; use ::RegScale::*; use ::test::run_test; #[test] fn vmulps_1() { run_test(&Instruct...
<|file_name|>url.rs<|end_file_name|><|fim▁begin|>use std::{error::Error as StdError, io::Write, str::FromStr}; use diesel::{backend::Backend, deserialize, serialize, sql_types::Text}; use url::Url as OrigUrl; #[derive(AsExpression, Clone, Debug, FromSqlRow)] #[sql_type = "Text"] pub struct Url(pub OrigUrl); impl<DB>...
where DB: Backend, { fn to_sql<W: Write>(&self, out: &mut serialize::Output<W, DB>) -> serialize::Result {
<|file_name|>jinja_helpers.py<|end_file_name|><|fim▁begin|>import jinja2 from django_jinja import library from kitsune.sumo import parser from kitsune.wiki.diff import BetterHtmlDiff <|fim▁hole|> diff = html_diff.make_table(content_from.splitlines(), content_to.splitlines(), context=True) return jinja2.Markup(...
@library.global_function def diff_table(content_from, content_to): """Creates an HTML diff of the passed in content_from and content_to.""" html_diff = BetterHtmlDiff()
<|file_name|>foundation.offcanvas.js<|end_file_name|><|fim▁begin|>'use strict'; !function($) { /** * OffCanvas module. * @module foundation.offcanvas * @requires foundation.util.keyboard * @requires foundation.util.mediaQuery * @requires foundation.util.triggers * @requires foundation.util.motion */ class Off...
this.options.revealOn = this.options.revealOn || this.$element[0].className.match(/(reveal-for-medium|reveal-for-large)/g)[0].split('-')[2];
<|file_name|>discard.py<|end_file_name|><|fim▁begin|>from protocols.forms import forms from core.utils import TIME_UNITS class DiscardForm(forms.VerbForm): name = "Discard" slug = "discard" has_manual = True layers = ['item_to_act','item_to_retain','conditional_statement','settify'] item_to_act =...
time_units = forms.ChoiceField(required=False, choices=TIME_UNITS, help_text='in seconds', initial = 'sec' ) time_comment = forms.CharField(required=False)
<|file_name|>index.ts<|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 ...
* http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing,
<|file_name|>APDUHexValidator.py<|end_file_name|><|fim▁begin|># -*- coding: iso-8859-15 -*- """ A wxValidator that matches APDU in hexadecimal such as: A4 A0 00 00 02 A4A0000002 __author__ = "http://www.gemalto.com" Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com ...
if key < wx.WXK_SPACE or key == wx.WXK_DELETE or key > 255: event.Skip()
<|file_name|>convert_docx.py<|end_file_name|><|fim▁begin|>#https://python-docx.readthedocs.io/en/latest/user/install.html #python-docx may be installed with pip if you have it available: # pip install python-docx #python-docx can also be installed using easy_install, although this is #discouraged: # easy_install pyth...
#should be raising an exception... print('uh oh, there should be exactly one table in the document')
<|file_name|>remove.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2015 by Rafael Angel Aznar Aparici (rafaaznar at gmail dot com) * * openAUSIAS: The stunning micro-library that helps you to develop easily * AJAX web applications by using Java and jQuery * openAUSIAS is distributed under the MI...
window.history.back(); }; $scope.ob = 'tipocompeticion'; $scope.id = $routeParams.id;
<|file_name|>json-include.json.js<|end_file_name|><|fim▁begin|>const basicJson = require('./basic.json') <|fim▁hole|><|fim▁end|>
export const jsonExport = { basicJson }
<|file_name|>key_file.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use glib_sys; use std; use std::mem; use std::ptr; use translate::*; #[cfg(any(feature = "v2_50", feature = "dox"))] use Bytes; ...
<|file_name|>int_divzero.py<|end_file_name|><|fim▁begin|>try: 1 // 0 except ZeroDivisionError: print("ZeroDivisionError") try:<|fim▁hole|><|fim▁end|>
1 % 0 except ZeroDivisionError: print("ZeroDivisionError")
<|file_name|>FluidWindowExample.ts<|end_file_name|><|fim▁begin|>import {Component, View} from "angular2/core"; import {FORM_DIRECTIVES} from "angular2/common"; import {bootstrap} from "angular2/platform/browser"; import {Window1} from "./Window1"; import {Window2} from "./Window2"; @Component({ selector: "fluid-w...
export class FluidWindowExample {
<|file_name|>test_complementary_dna.py<|end_file_name|><|fim▁begin|>import unittest from katas.kyu_7.complementary_dna import DNA_strand class DNAStrandTestCase(unittest.TestCase): def test_equals(self):<|fim▁hole|> def test_equals_2(self): self.assertEqual(DNA_strand('ATTGC'), 'TAACG') def test_...
self.assertEqual(DNA_strand('AAAA'), 'TTTT')
<|file_name|>Romanian.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="ro"> <context> <name>SettingsDialog</name> <message> <source>Some settings require restarting qOrganizer</source> <translation>Unele setari cer repornirea progra...
<translation type="obsolete">Reîncarcă datele la schimbarea vederii</translation> </message> <message> <source>Hide to system tray on close</source>
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import atexit from flask import Flask, jsonify, g, request, make_response from flask_migrate import Migrate from flask_sqlalchemy import SQLAlchemy from flask_cors import CORS<|fim▁hole|>from apscheduler.schedulers.background import BackgroundScheduler import logging l...
from flask_jwt_extended import JWTManager, set_access_cookies, jwt_required, unset_jwt_cookies
<|file_name|>generate_features.py<|end_file_name|><|fim▁begin|>import gc import os import argparse os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'<|fim▁hole|> parser = argparse.ArgumentParser(description='Generate features using a previously trained model') parser.add_argument('data', type=str, help='File containing th...
from util import generate_features def get_arguments():
<|file_name|>RemoveFileExplorerViewFilesAction.java<|end_file_name|><|fim▁begin|>package com.sgu.infowksporga.jfx.menu.action.edit; import java.awt.event.ActionEvent; import com.sgu.apt.annotation.AnnotationConfig; import com.sgu.apt.annotation.i18n.I18n; import com.sgu.apt.annotation.i18n.I18nProperty; import com.sg...
public class RemoveFileExplorerViewFilesAction extends AbstractInfoWrkspOrgaAction { /**
<|file_name|>selector.go<|end_file_name|><|fim▁begin|>package cascadia import ( "bytes" "fmt" "regexp" "strings" "golang.org/x/net/html" ) // the Selector type, and functions for creating them // A Selector is a function which tells whether a node matches or not. type Selector func(*html.Node) bool // hasChil...
<|file_name|>APICreatePolicyMsg.java<|end_file_name|><|fim▁begin|>package org.zstack.header.identity; <|fim▁hole|>import org.zstack.header.message.APIMessage; import org.zstack.header.message.APIParam; @NeedRoles(roles = {IdentityRoles.CREATE_POLICY_ROLE}) public class APICreatePolicyMsg extends APICreateMessage i...
import org.zstack.header.message.APICreateMessage;
<|file_name|>build.go<|end_file_name|><|fim▁begin|>// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. <|fim▁hole|>// This file enables 'go generate' to regenerate this specific SDK //go:generate pwsh.exe ../../../....
<|file_name|>hrvstitcher.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Includes the HRV stitcher data source class """ import pandas as pd import numpy as np from scipy.io import loadmat from scipy.interpolate import UnivariateSpline from data_source import DataSource from schema im...
labels = labels[(labels['flag'] != 255)] return labels
<|file_name|>0002_auto_20171114_0704.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django.db import migrations, models<|fim▁hole|> class Migration(migrations.Migration): dependencies = [ ('video_pipeline', '0001...
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>export = IPFS;<|fim▁hole|>//# sourceMappingURL=index.d.ts.map<|fim▁end|>
declare const IPFS: typeof import("ipfs-core/src");
<|file_name|>univariate_selection.py<|end_file_name|><|fim▁begin|>"""Univariate features selection.""" # Authors: V. Michel, B. Thirion, G. Varoquaux, A. Gramfort, E. Duchesnay. # L. Buitinck, A. Joly # License: BSD 3 clause import numpy as np import warnings from scipy import special, stats from scipy.spa...
# Now perform some acrobatics to set the right named parameter in # the selector
<|file_name|>ServiceService.ts<|end_file_name|><|fim▁begin|>"use strict"; module ServiceRegister { export class ServiceService { public static $inject = ["$http", "apiBaseUrl"]; constructor(private $http: angular.IHttpService, private apiBaseUrl: string) { } public ad...
public getServices(organizationId: string): angular.IPromise<Array<ServiceListItem>> { return this.$http.get(this.apiBaseUrl + "serviceregister/organizations/" + organizationId + "/services")
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main import "fmt" func checkPandig(allNum []int) bool { checker := make([]bool, 10) for _, num := range allNum { tmpNum := num for tmpNum != 0 { remainder := tmpNum % 10 if checker[remainder] { return false } else { checker[remainder] = ...
} } }
<|file_name|>TennisRuleTest.java<|end_file_name|><|fim▁begin|>package fr.imie; import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; import fr.imie.Jeu; public class TennisRuleTest { private Jeu jeu; @Before public void initJeux(){ ISerialiser serialiser = new StateLessMockedSerial...
joueur1To40(); //Assert assertEquals("40-0",jeu.getScore());
<|file_name|>test_quantization_mkldnn.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 ...
#
<|file_name|>entries.py<|end_file_name|><|fim▁begin|># Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
<|file_name|>at.js<|end_file_name|><|fim▁begin|>var baseAt = require('../internal/baseAt'), baseFlatten = require('../internal/baseFlatten'), restParam = require('../function/restParam'); /** * Creates an array of elements corresponding to the given keys, or indexes, * of `collection`. Keys may be specified ...
<|file_name|>resultviewer.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import pandas as pd import matplotlib matplotlib.use("TkAgg") # important to call this right after from matplotlib.backends.backend_tkagg import FigureCanvasTkA...
tkMessageBox.showinfo("Date out of Range", "Please enter a date from %s to %s" % (daily_pnl.index[0].strftime('%Y-%m-%d'), daily_pnl.index[-1].strftime('%Y-%m-%d'))) except ValueError: raise ValueError("Not a Valid Date")
<|file_name|>UpdateUserAction.ts<|end_file_name|><|fim▁begin|>import CeraonAction from '../CeraonAction'; import CeraonActionType from '../CeraonActionType'; import UserIdentity from '../../State/Identity/UserIdentity'; export interface UpdateUserAction extends CeraonAction { user: Partial<UserIdentity>; } export f...
user: user,
<|file_name|>DropDownDirective.Tests.ts<|end_file_name|><|fim▁begin|>/// <reference path='../../../Application/Reference.ts' /> /// <reference path='../../../Application/Main.ts' /> /// <reference path='../../../Application/Utils.ts' /> /// <reference path='../../../Assets/Typings/Jasmine/jasmine.d.ts' /> 'use stric...
<|file_name|>acoustic_wave.rs<|end_file_name|><|fim▁begin|>extern crate arrayfire as af; use af::*; use std::f64::consts::*; fn main() { set_device(0); info(); acoustic_wave_simulation(); } fn normalise(a: &Array) -> Array { (a/(max_all(&abs(a)).0 as f32 * 2.0f32)) + 0.5f32 } fn acoustic_wave_simula...
<|file_name|>_FormWidget.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ if(!dojo._hasResource["dijit.form._FormWidget"]){ //_hasResource c...
// (although there's no easy way to do that now)
<|file_name|>p065.rs<|end_file_name|><|fim▁begin|>//! [Problem 65](https://projecteuler.net/problem=65) solver. #![warn( bad_style, unused, unused_extern_crates, unused_import_braces, unused_qualifications, unused_results<|fim▁hole|>)] use num_bigint::BigUint; fn napier_seq(i: u32) -> u32 { ...
<|file_name|>0002_useraddress.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-29 17:03 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ...
],
<|file_name|>klopfer.py<|end_file_name|><|fim▁begin|>import directory import scanner import mapper import board import os class Klopfer(object): def __init__(self, import_dir, export_dir): self.import_dir = import_dir self.export_dir = export_dir print "Klopfer class" def run(self): ...
cards = mapping.get_cards() # create board
<|file_name|>CreateStackResult.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at ...
if(!resultNode.IsNull()) { XmlNode stackIdNode = resultNode.FirstChild("StackId"); if(!stackIdNode.IsNull())
<|file_name|>cmdlineparser.cpp<|end_file_name|><|fim▁begin|>/* * Cppcheck - A tool for static C/C++ code analysis * Copyright (C) 2007-2016 Cppcheck team. * * 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 Soft...
} else { i++;
<|file_name|>Availability.java<|end_file_name|><|fim▁begin|>package org.opencommercesearch.client.impl; import java.util.Date; /** * Represents a sku's availability. * * @author rmerizalde */ public class Availability { public enum Status { InStock, OutOfStock, PermanentlyOutOfStock, Backordera...
<|file_name|>petra_output.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 """Output a CSV file that can be imported to Petra""" import os import sys import calendar import csv from csv_dict import CSVDict, CSVKeyMissing def split_csv(table_file='Tabell.csv'): """Split account, cost center and project into ...
<|file_name|>VariableParserPath.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| ...
#| (at your option) any later version. | #| |
<|file_name|>privacy_reexport.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or...
// 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
<|file_name|>expr-if-struct.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/...
<|file_name|>DefaultRouteHandler.java<|end_file_name|><|fim▁begin|>/* <|fim▁hole|> * 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 law or agreed to in writing, soft...
* Copyright 2014 NAVER Corp. * * Licensed under the Apache License, Version 2.0 (the "License");
<|file_name|>alienplugs_test.go<|end_file_name|><|fim▁begin|>package alienplugs import ( "fmt" "os" "testing" "github.com/deze333/alienplugs/mandrill" "github.com/deze333/skini" ) //------------------------------------------------------------ // Mandrill //-------------------------------------------------------...
}
<|file_name|>leader_reputation_test.rs<|end_file_name|><|fim▁begin|>// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::liveness::{ leader_reputation::{ ActiveInactiveHeuristic, LeaderReputation, MetadataBackend, ReputationHeuristic, }, proposer_election::{...
signers.push(signer); }
<|file_name|>test_snapshot_index.py<|end_file_name|><|fim▁begin|>from changes.config import db from changes.models.project import ProjectOption from changes.models.snapshot import SnapshotStatus from changes.testutils import APITestCase class SnapshotListTest(APITestCase): def test_simple(self): project_1...
<|file_name|>phystricksENQZooVqRaIv.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*- from phystricks import * def rotation(angle,pts): ptsp=[ x.rotation(angle) for x in pts ] return tuple(ptsp) def truc(A,B,C,D,points_names,angle,pspicts,n): A,B,C,D=rotation(angle,[A,B,C,D]) quadri=Polygon(A,...
I=Point(0,0) J=Point(2,0)
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np class WordClusters(object): def __init__(self, vocab, clusters): self.vocab = vocab self.clusters = clusters def ix(self, word): """ Returns the index on self.vocab and self.clusters for 'word' ...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict'; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descrip...
<|file_name|>cluster_catalog_sync.go<|end_file_name|><|fim▁begin|>package manager import ( v3 "github.com/rancher/rancher/pkg/generated/norman/management.cattle.io/v3" helmlib "github.com/rancher/rancher/pkg/helm" "github.com/sirupsen/logrus" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/...
cmt := &CatalogInfo{ catalog: &clusterCatalog.Catalog, clusterCatalog: clusterCatalog,
<|file_name|>CodesIthaca.java<|end_file_name|><|fim▁begin|>// Openbravo POS is a point of sales application designed for touch screens. // Copyright (C) 2007-2009 Openbravo, S.L. // http://www.openbravo.com/product/pos // // This file is part of Openbravo POS. // // Openbravo POS is free software: you ca...
public byte[] getOpenDrawer() { return OPEN_DRAWER; } public byte[] getCutReceipt() { return PARTIAL_CUT; } public byte[] getNewLine() { return NEW_LINE; }
<|file_name|>search_indexes.py<|end_file_name|><|fim▁begin|># """SearchIndex classes for Django-haystack.""" from typing import List from django.utils.html import format_html, mark_safe from haystack import indexes from projects.models import Project, Nomination, Claim class ProjectIndex(indexes.SearchIndex, indexe...
nomination_policy = indexes.CharField(model_attr='nomination_policy', indexed=True, stored=True) # nominator_orgs nominators = indexes.MultiValueField(indexed=True, null=True, stored=True)
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from .models import Topping, Pizza class ToppingInlineAdmin(admin.TabularInline):<|fim▁hole|>class PizzaAdmin(admin.ModelAdmin): fieldsets = ( ('', { 'fields': ('description',), }), ('Advanced',...
model = Topping extra = 1
<|file_name|>authnresponse.go<|end_file_name|><|fim▁begin|>package saml import ( "encoding/xml" "errors" "time" "github.com/bmanth60/go-saml/packager" "github.com/bmanth60/go-saml/util" ) //Validate saml response func (r *Response) Validate(s *Settings) error { if r.Version != "2.0" { return ErrUnsupportedVe...
Local: "saml:Assertion", }, XS: "http://www.w3.org/2001/XMLSchema", XSI: "http://www.w3.org/2001/XMLSchema-instance",
<|file_name|>ModelBuilder.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2014 Pivotal Software, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public Licens...
* Interface that hides the mechanics of how models are being built via Gradle's tooling API (or whatever way
<|file_name|>IndexInput.java<|end_file_name|><|fim▁begin|>package org.targettest.org.apache.lucene.store; /** * 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 owners...