prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>User.java<|end_file_name|><|fim▁begin|>package ruboweb.pushetta.back.model; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; im...
char[] digits = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; byte b;
<|file_name|>main_menu.py<|end_file_name|><|fim▁begin|># Copyright 2008 Owen Taylor # # This file is part of Reinteract and distributed under the terms # of the BSD license. See the file COPYING in the Reinteract # distribution for full details. # ########################################################################...
if self.__active_window and hasattr(self.__active_window, method_name): getattr(self.__active_window, method_name)(None) elif hasattr(self, method_name): getattr(self, method_name)()
<|file_name|>cbicqc_incoming.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 """ Rename and organize Horos QC exported data in <BIDS Root>/incoming and place in <BIDS Root>/sourcedata AUTHOR ---- Mike Tyszka, Ph.D. MIT License Copyright (c) 2019 Mike Tyszka Permission is hereby granted, free of charge, to an...
except AttributeError: print("* Problem opening %s" % dcm_fname) raise
<|file_name|>types.rs<|end_file_name|><|fim▁begin|>pub type Tempo = f64; pub const DEFAULT_TEMPO: Tempo = 120 as Tempo; pub type SampleRate = f64; <|fim▁hole|><|fim▁end|>
pub static DEFAULT_SAMPLE_RATE: SampleRate = 44100 as SampleRate;
<|file_name|>listcreator.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import itertools class ListCreator(): current_list = None def fcstDiracGammasInAlldimsAllIndicesContracted(self): self.current_list = set( list(itertools.permutations(['dirac_gamma<1>', 'dirac_gamma<1>'])) + l...
<|file_name|>cron_trigger.py<|end_file_name|><|fim▁begin|># coding=utf-8 ''' cron trigger @author: Huiyugeng ''' import datetime import trigger class CronTrigger(trigger.Trigger): def __init__(self, cron): trigger.Trigger.__init__(self, 0, 1); self.cron = cron def _is_m...
def _parse_month(self, value): months = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"]
<|file_name|>init_lib.py<|end_file_name|><|fim▁begin|># # init_lib.py # # functions for initialization # from aws_lib import SpinupError import base64 from boto import vpc, ec2 from os import environ from pprint import pprint import re import sys import time from yaml_lib import yaml_attr def read_user_data( fn ): ...
<|file_name|>video.js<|end_file_name|><|fim▁begin|>var dogVideos = [ "http://media.giphy.com/media/l2JHZ7CDZa6jp1rAQ/giphy.mp4", "http://media.giphy.com/media/26tnmOjq7uQ98qxZC/giphy.mp4", "http://media.giphy.com/media/26tnazn9Fm4V3VUMU/giphy.mp4", "http://media.giphy.com/media/26tnhrpR1B6iOnUgo/giphy.mp4", "...
$("#dog-video").attr("src", dogVideos[randomIndex]);
<|file_name|>version.py<|end_file_name|><|fim▁begin|><|fim▁hole|>VERSION = '2017.3.10'<|fim▁end|>
NAME = 'pokerserver' DESCRIPTION = 'Poker server for our Python workshop at TNG Technology Consulting.'
<|file_name|>scatter-matrix.js<|end_file_name|><|fim▁begin|>// Heavily influenced by Mike Bostock's Scatter Matrix example // http://mbostock.github.io/d3/talk/20111116/iris-splom.html // ScatterMatrix = function(url, data, dom_id) { this.__url = url; if (data === undefined || data === null) { this.__...
<|file_name|>plugin.go<|end_file_name|><|fim▁begin|>package custom_commands import ( "github.com/jmoiron/sqlx" "github.com/sgt-kabukiman/kabukibot/bot" ) type pluginStruct struct { db *sqlx.DB } func NewPlugin() *pluginStruct { return &pluginStruct{} } func (self *pluginStruct) Name() string { return "custom_c...
}
<|file_name|>primality_trial_div.rs<|end_file_name|><|fim▁begin|>//Implements http://rosettacode.org/wiki/Primality_by_Trial_Division use std::iter::range_step; fn is_prime(nb: int) -> bool { if nb%2 == 0 { return false; } else { for i in range_step(3,(nb as f32).sqrt() as int + 1, 2) { ...
fn main() { println!("{:b}", is_prime(15485863)); // The 1 000 000th prime.
<|file_name|>basic.rs<|end_file_name|><|fim▁begin|>extern crate lichen; use lichen::parse::Parser; use lichen::var::Var; use lichen::eval::Evaluator; fn main() { //load the lichen source file as a string let bytes = include_bytes!("basic.ls"); let mut src = String::from_utf8_lossy(bytes); let mu...
while let Some((vars, _next_node)) = ev.next() { // here we loop through the evaluator steps for var in vars {
<|file_name|>simple-remote.py<|end_file_name|><|fim▁begin|># run scripts/jobslave-nodatabase.py import os os.environ["SEAMLESS_COMMUNION_ID"] = "simple-remote" os.environ["SEAMLESS_COMMUNION_INCOMING"] = "localhost:8602" import seamless seamless.set_ncores(0) from seamless import communion_server communion_server.co...
print("after 1.0 sec...") print(ctx.result.value, ctx.status) print("...") ctx.compute()
<|file_name|>server.py<|end_file_name|><|fim▁begin|>############################################################################### # # # Peekaboo Extended Email Attachment Behavior Observation Owl # # ...
logger.info('Peekaboo server is now listening on %s:%d', self.host, self.port) self.loop.run_until_complete(self.server.wait_closed())
<|file_name|>sessions_api.py<|end_file_name|><|fim▁begin|>import requests from flask import session, Blueprint, redirect from flask import request from grano import authz from grano.lib.exc import BadRequest from grano.lib.serialisation import jsonify from grano.views.cache import validate_cache from grano.core impor...
<|file_name|>push.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2016-2017 Chef Software Inc. and/or applicable contributors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // ht...
// limitations under the License.
<|file_name|>base64.js<|end_file_name|><|fim▁begin|>// Base64 encoder/decoder with UTF-8 support // // Copyright (c) 2011 Vitaly Puzrin // Copyright (c) 2011 Aleksey V Zapparov // // Author: Aleksey V Zapparov AKA ixti (http://www.ixti.net/) // // Permission is hereby granted, free of charge, to any person obtaining a ...
// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in
<|file_name|>shepherd.js<|end_file_name|><|fim▁begin|>(function() { var ATTACHMENT, Evented, Shepherd, Step, addClass, createFromHTML, extend, matchesSelector, parseShorthand, removeClass, uniqueId, _ref, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwn...
tetherOpts = { classPrefix: 'shepherd',
<|file_name|>test_nova.py<|end_file_name|><|fim▁begin|># Copyright 2013 IBM Corp. # # 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/LICENS...
class FakeNovaClient(object): class Volumes(object):
<|file_name|>pipeline.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/. */ use CompositorProxy; use compositor_thread; use compositor_t...
use profile_traits::time; use script_traits::{ConstellationControlMsg, InitialScriptState, MozBrowserEvent}; use script_traits::{LayoutControlMsg, LayoutMsg, NewLayoutInfo, ScriptMsg};
<|file_name|>git_requirements.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- from ansible.module_utils.basic import AnsibleModule import git import itertools import multiprocessing import os import signal import time DOCUMENTATION = """ --- module: git_requirements short_description: Module...
# Pull in module fields and pass into variables module = AnsibleModule(argument_spec=fields) git_repos = module.params['repo_info']
<|file_name|>Core.UI.Datepicker.js<|end_file_name|><|fim▁begin|>// -- // Copyright (C) 2001-2016 OTRS AG, http://otrs.com/ // -- // This software comes with ABSOLUTELY NO WARRANTY. For details, see // the enclosed file COPYING for license information (AGPL). If you // did not receive this file, see http://www.gnu.org/l...
else {
<|file_name|>loggerConfig.py<|end_file_name|><|fim▁begin|>import logging def initLogger():<|fim▁hole|> logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages file_handler = logging.FileHandler('cam.log') file_handler.setLevel(logging.DEBUG) # create console handler with a higher lo...
# create logger logger = logging.getLogger('cam')
<|file_name|>purchase_order_line.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2019 OpenSynergy Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api class PurchaseOrderLine(models.Model): _inherit = "purchase.order.line" ...
"product_qty", "product_uom", "order_id.partner_id",
<|file_name|>multibyte.rs<|end_file_name|><|fim▁begin|>//! Beginnings of a Emacs-encoded string handling library. //! //! Emacs Lisp strings (and by extension, most strings handled by the //! Emacs C API) are encoded in one of two ways: //! //! * "unibyte" strings are just sequences of 8-bit bytes that don't //! carr...
} /// Store multibyte form of character CP at TO. If CP has modifier bits,
<|file_name|>weapons_data.py<|end_file_name|><|fim▁begin|># This file is generated from pydcs_export.lua class Weapons: AB_250_2___144_x_SD_2__250kg_CBU_with_HE_submunitions = {"clsid": "{AB_250_2_SD_2}", "name": "AB 250-2 - 144 x SD-2, 250kg CBU with HE submunitions", "weight": 280} AB_250_2___17_x_SD_10A__2...
"{ARAKM70BHE}": Weapons.ARAK_M_70B_HE_6x_135mm_UnGd_Rkts__Shu70_HE_FRAG,
<|file_name|>users.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import webapp2 from boilerplate import models from boilerplate import forms from boilerplate.handlers import BaseHandler from google.appengine.datastore.datastore_query import Cursor from google.appengine.ext import ndb from google.appengine.api...
except ValueError:
<|file_name|>database_library_validators.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from healthcareai.common.healthcareai_error import HealthcareAIError def validate_pyodbc_is_loaded(): """ Simple check that alerts user if they are do not have pyodbc installed, which is not a requirement. """ if 'pyodbc' not...
import sys
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Support for the MAX! Cube LAN Gateway.""" import logging from socket import timeout from threading import Lock import time from maxcube.cube import MaxCube import voluptuous as vol from homeassistant.const import CONF_HOST, CONF_PORT, CONF_SCAN_INTERVAL import ...
<|file_name|>lcd_update.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 # Example using a character LCD connected to a Raspberry Pi or BeagleBone Black. import time import datetime import Adafruit_CharLCD as LCD def file_get_contents(filename): with open(filename) as f:<|fim▁hole|># Raspberry Pi pin configurati...
return f.read()
<|file_name|>html.py<|end_file_name|><|fim▁begin|>"""HTML utilities suitable for global use.""" from __future__ import unicode_literals import re from django.utils.encoding import force_text, force_str from django.utils.functional import allow_lazy from django.utils.safestring import SafeData, mark_safe from django....
<|file_name|>enum_set.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/licens...
<|file_name|>resultados_1.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
plataformatcc.resultados
<|file_name|>tool-bar.component.ts<|end_file_name|><|fim▁begin|>import {Component, OnInit} from '@angular/core' @Component({<|fim▁hole|>}) export class ToolBarComponent implements OnInit { mockLines: [ { name: 'S1' }, { name: 'S2' }, { name: 'S3' } ] selectedLine: any ...
selector: 'app-tool-bar', templateUrl: './tool-bar.component.html', styleUrls: ['./tool-bar.component.scss']
<|file_name|>pydevd_xml.py<|end_file_name|><|fim▁begin|>import pydev_log import traceback import pydevd_resolver from pydevd_constants import * #@UnusedWildImport from types import * #@UnusedWildImport try: from urllib import quote except: from urllib.parse import quote #@UnresolvedImport try: from xml.sa...
else: if isinstance(value, bytes):
<|file_name|>todo-editor.component.js<|end_file_name|><|fim▁begin|>(function(){ angular.module('nbTodos') .component('todoEditor', { templateUrl: '/app/todos/todo-editor/todo-editor.component.html', controller: TodoEditorController, controllerAs: 'vm' }); <|fim▁hole|> this.text = ''; ...
TodoEditorController.$inject = ['todosStore']; function TodoEditorController(todosStore) {
<|file_name|>order_material_form.py<|end_file_name|><|fim▁begin|>############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py # ########...
@staticmethod
<|file_name|>sw.js<|end_file_name|><|fim▁begin|>var dataCacheName = 'Jblog-v1'; var cacheName = 'Jblog-1'; var filesToCache = [ '/', '/index.html' ]; self.addEventListener('install', function(e) { console.log('[ServiceWorker] Install'); e.waitUntil( caches.open(cacheName).then(function(cache) {...
}); self.addEventListener('activate', function(e) { console.log('[ServiceWorker] Activate');
<|file_name|>factory.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless...
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/extensions"
<|file_name|>remakerings.py<|end_file_name|><|fim▁begin|>#!/home/mjwtom/install/python/bin/python # -*- coding: utf-8 -*- import os import subprocess from nodes import storage_nodes as ips def generate_rings(): print (os.environ["PATH"]) os.environ["PATH"] = '/home/mjwtom/install/python/bin' + ":" + os.envir...
<|file_name|>test_zplsc_c_echogram.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os from mi.logging import log from mi.dataset.parser.zplsc_c import ZplscCParser from mi.dataset.dataset_parser import DataSetDriverConfigKeys from mi.dataset.driver.zplsc_c.resource import RESOURCE_PATH __author__ = 'Ren...
MODULE_NAME = 'mi.dataset.parser.zplsc_c'
<|file_name|>DifferentiationFailedException.java<|end_file_name|><|fim▁begin|>package filediff.myers;<|fim▁hole|> private static final long serialVersionUID = 1L; public DifferentiationFailedException() { } public DifferentiationFailedException(String msg) { super(msg); } }<|fim▁end...
public class DifferentiationFailedException extends DiffException {
<|file_name|>application.go<|end_file_name|><|fim▁begin|>package gtka import ( "github.com/gotk3/gotk3/gtk" "github.com/coyim/gotk3adapter/gliba" "github.com/coyim/gotk3adapter/gtki" ) type application struct { *gliba.Application<|fim▁hole|> func wrapApplicationSimple(v *gtk.Application) *application { if v == n...
internal *gtk.Application }
<|file_name|>DeviceModel.js<|end_file_name|><|fim▁begin|>/** * Model for Devices */ Ext.define('FHEM.model.DeviceModel', { extend: 'Ext.data.Model',<|fim▁hole|> } ] });<|fim▁end|>
fields: [ { name: 'DEVICE', type: 'text'
<|file_name|>perf.rs<|end_file_name|><|fim▁begin|>//~ #include <assert.h> //~ #include <string.h> //~ #include <stdio.h> //~ #include <stdlib.h> //~ #include <math.h> //~ #include <uv.h> //~ #include "cassandra.h" //~ /* //~ * Use this example with caution. It's just used as a scratch example for debugging and //~ * ro...
//~ } //~ for (i = 0; i < NUM_CONCURRENT_REQUESTS; ++i) {
<|file_name|>StatefulTabPanel.js<|end_file_name|><|fim▁begin|>/* global Ext, ViewStateManager, App */<|fim▁hole|> initComponent: function() { this.iconCls = this.iconCls || this.itemId; this.on( 'afterrender', this.onAfterRender, this); this.callParent( arguments); }, setActiveTab: function( tab, ...
Ext.define( 'App.ux.StatefulTabPanel', { extend: 'Ext.tab.Panel', alias: 'widget.statefultabpanel',
<|file_name|>subscription.py<|end_file_name|><|fim▁begin|>import json import re from trac.admin import IAdminCommandProvider from trac.attachment import Attachment, IAttachmentChangeListener from trac.core import Component, implements from trac.versioncontrol import ( RepositoryManager, NoSuchChangeset, IRepositor...
return None finally: repo.close()
<|file_name|>test_views.py<|end_file_name|><|fim▁begin|>""" Tests suite for the views of the private messages app. """ from django.test import TestCase, Client from django.conf import settings from django.core.urlresolvers import reverse from django.contrib.auth import get_user_model from django.utils import timezone ...
"""
<|file_name|>TestServer.java<|end_file_name|><|fim▁begin|>package org.jsoup.integration; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.servlet.ServletHandler; import org.jsoup.integration.servlets.BaseServlet; import java.util.concurrent.atomic.Atomi...
}
<|file_name|>decoratorMetadataForMethodWithNoReturnTypeAnnotation01.js<|end_file_name|><|fim▁begin|>//// [decoratorMetadataForMethodWithNoReturnTypeAnnotation01.ts] declare var decorator: any; class MyClass { constructor(test: string, test2: number) { } @decorator doSomething() { } } //// ...
decorator, __metadata('design:type', Function),
<|file_name|>assert_equal.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016-2017 Dustin Doloff # Licensed under Apache License v2.0 import argparse import difflib import hashlib import os import subprocess import zipfile # Resets color formatting COLOR_END = '\33[0m' # Modifies characters or color COLOR_BOLD = '\3...
file_a_contents = a.read() with open(file_b, 'rb') as b: file_b_contents = b.read()
<|file_name|>gamepaddb.go<|end_file_name|><|fim▁begin|>// Copyright 2021 The Ebiten 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/LICENS...
<|file_name|>csrf_test.py<|end_file_name|><|fim▁begin|>"""Tests for the CSRF helper.""" import unittest import mock import webapp2 import webtest from ctc.helpers import csrf from ctc.testing import testutil MOCKED_TIME = 123 # Tests don't need docstrings, so pylint: disable=C0111 # Tests can test protected memb...
def post(self): pass
<|file_name|>assessments.go<|end_file_name|><|fim▁begin|>package migrate // Copyright (c) Microsoft and contributors. 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 a...
<|file_name|>templates.py<|end_file_name|><|fim▁begin|>import cgi import errno import io import mimetypes import os import posixpath import re import shutil import stat import sys import tempfile from os import path import django from django.conf import settings from django.core.management.base import BaseCommand, Com...
<|file_name|>vs9to10.py<|end_file_name|><|fim▁begin|>#Run this file after automatic conversion of the VisualStudio 2008 solution by VisualStudio 2010. #This can be done whenever the 2008 solution changes. #It will make the necessary cleanup and updates to the vcxproj files #the .props files need to be maintained by ...
elif b"pythoncore" not in lastline: lines.append(b' <Import Project="pythoncore.props" />\r\n')
<|file_name|>dsntool.py<|end_file_name|><|fim▁begin|>import collections import re import urlparse class DSN(collections.MutableMapping): ''' Hold the results of a parsed dsn. This is very similar to urlparse.ParseResult tuple. http://docs.python.org/2/library/urlparse.html#results-of-urlparse-and-urlspli...
if url.query:
<|file_name|>utils.test.ts<|end_file_name|><|fim▁begin|>import polarToCartesian from '../src/utils/polarToCartesian'; describe('GridUtils', () => { describe('polarToCartesian', () => { const config = { radius: 20,<|fim▁hole|> x: config.radius * Math.cos(config.angle), y: config.radius * Math...
angle: 20, }; it('should return cartesian output for the given polar input config', () => { const expected = {
<|file_name|>merge_h5.py<|end_file_name|><|fim▁begin|># encoding: utf-8 from __future__ import absolute_import, division, print_function import numpy as np import tables from liam2.data import merge_arrays, get_fields, index_table_light, merge_array_records from liam2.utils import timed, loop_wh_progress, merg...
merge_group(input1root, input2root, 'globals', output_file, 'PERIOD')
<|file_name|>handlers.py<|end_file_name|><|fim▁begin|>""" Handlers for OpenID Connect provider. """ from django.conf import settings from django.core.cache import cache from courseware.access import has_access from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from openedx.core.djangoa...
<|file_name|>ifdef.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # Selectively preprocess #ifdef / #ifndef statements. # Usage: # ifdef [-Dname] ... [-Uname] ... [file] ... # # This scans the file(s), looking for #ifdef and #ifndef preprocessor # commands that test for one of the names mentioned in the...
if ko: ok = 0 else:
<|file_name|>state.py<|end_file_name|><|fim▁begin|>"""Helpers that help with state related things.""" import asyncio import datetime as dt import json import logging from collections import defaultdict from types import TracebackType from typing import ( # noqa: F401 pylint: disable=unused-import Awaitable, Dict, ...
worker(domain, data) for domain, data in to_call.items() ])
<|file_name|>device_tracker.py<|end_file_name|><|fim▁begin|>"""Device tracker for Synology SRM routers.""" from __future__ import annotations import logging import synology_srm import voluptuous as vol from homeassistant.components.device_tracker import ( DOMAIN, PLATFORM_SCHEMA as DEVICE_TRACKER_PLATFORM_SC...
"is_baned": "is_banned", "is_beamforming_on": None, "is_guest": None,
<|file_name|>0006_course_coursesection.py<|end_file_name|><|fim▁begin|># Generated by Django 3.1.6 on 2022-01-26 20:48 import common.mixins from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): ...
"id", models.AutoField(
<|file_name|>parser.py<|end_file_name|><|fim▁begin|>""" functions for evaluating spreadsheet functions primary function is parse, which the rest revolves around evaluate should be called with the full string by a parent program A note on exec: This uses the exec function repeatedly, and where possible, use of it...
prefix = get_prefix(s, parent_start)
<|file_name|>mam.ts<|end_file_name|><|fim▁begin|>import { Agent } from '../'; import { mergeFields } from '../helpers/DataForms'; import * as JID from '../JID'; import { NS_MAM_2 } from '../Namespaces'; import { DataForm, DataFormField, IQ, MAMFin, MAMPrefs, MAMQuery, MAMResult, Message,...
<|file_name|>api.go<|end_file_name|><|fim▁begin|>package fsrateio import ( "io" "github.com/Symantec/Dominator/lib/rateio" "github.com/Symantec/tricorder/go/tricorder" "github.com/Symantec/tricorder/go/tricorder/units" ) type ReaderContext struct { maxBytesPerSecond uint64 maxBlocksPerSecond uint64 ctx ...
<|file_name|>training_stsbenchmark_continue_training.py<|end_file_name|><|fim▁begin|>""" This example loads the pre-trained SentenceTransformer model 'nli-distilroberta-base-v2' from the server. It then fine-tunes this model for some epochs on the STS benchmark dataset. Note: In this example, you must specify a Senten...
############################################################################## # # Load the stored model and evaluate its performance on STS benchmark dataset #
<|file_name|>method-on-enum.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 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,...
// 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|>test-polyfill.ts<|end_file_name|><|fim▁begin|>/** * Tests for polyfill function. * * Copyright (C) 2016 Martin Poelstra<|fim▁hole|> import "source-map-support/register"; import { expect } from "chai"; import polyfill from "../lib/polyfill"; import tsPromise from "../lib/Promise"; import * as util from ...
* License: MIT */
<|file_name|>SKLearn3KMOutlier.py<|end_file_name|><|fim▁begin|># coding = utf-8 """ 3.8 将 KMeans 用于离群点检测 http://git.oschina.net/wizardforcel/sklearn-cb/blob/master/3.md """ # 生成 100 个点的单个数据块,然后识别 5 个离形心最远的点 import numpy as np from sklearn.datasets import make_blobs from sklearn.cluster import KMeans (x, labels) = make_...
<|file_name|>guest.py<|end_file_name|><|fim▁begin|># Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyright (c) 2012 ...
def delete_configuration(self): """Undefines a domain from hypervisor.""" try: self._domain.undefineFlags(
<|file_name|>eos_user.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # 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 Software Foundation, either version 3 of the License, or # (at yo...
default: present choices: ['present', 'absent'] """
<|file_name|>level.go<|end_file_name|><|fim▁begin|>// Copyright 2015 Garrett D'Amore // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // U...
sprite := GetSprite("GameOver") sprite.SetLayer(LayerDialog) sprite.SetFrame("F0")
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import MPopper from '../m-popper.vue';<|fim▁hole|> */ export const UIconTooltip = { name: 'u-icon-tooltip', props: { type: { type: String, default: 'info' }, // 按钮名称 size: { type: String, default: 'normal' }, // 提示大小 content: String, ...
import pick from 'lodash/pick'; /** * 默认显示一个按钮,hover 上去有提示
<|file_name|>BasicInfo.js<|end_file_name|><|fim▁begin|>import React from 'react'; import { FlexRow, FlexCell } from '../common'; import CharacterName from './CharacterName'; import InfoBlock from './InfoBlock'; const PersonalInfo = ({ character }) => ( <FlexRow> <FlexCell columns={3}> <CharacterName charac...
<FlexCell columns={9}> <InfoBlock character={character} />
<|file_name|>ConfigDB_Longest_8.py<|end_file_name|><|fim▁begin|>HOST = "wfSciwoncWiki:enw1989@172.31.29.101:27001,172.31.29.102:27001,172.31.29.103:27001,172.31.29.104:27001,172.31.29.105:27001,172.31.29.106:27001,172.31.29.107:27001,172.31.29.108:27001,172.31.29.109:27001/?authSource=admin" PORT = "" USER = "" PASS...
COLLECTION_OUTPUT = "top_sessions" PREFIX_COLUMN = "w_" ATTRIBUTES = ["duration", "start time", "end time", "contributor_username", "edition_counts"]
<|file_name|>jano.py<|end_file_name|><|fim▁begin|>import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate...
<|file_name|>MapKeyLoaderUtil.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2008-2017, Hazelcast, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * h...
<|file_name|>EditStudyLogActionTest.java<|end_file_name|><|fim▁begin|>/** * Copyright 5AM Solutions Inc, ESAC, ScenPro & SAIC * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/caintegrator/LICENSE.txt for details. */ package gov.nih.nci.caintegrator.web.action.study.manageme...
<|file_name|>options.rs<|end_file_name|><|fim▁begin|>//! The user-configurable portion of the type checker. use std::str; use std::ascii::AsciiExt; use std::path::{Path, PathBuf, MAIN_SEPARATOR}; use kailua_env::{Spanned, WithLoc}; use kailua_diag::{Report, Stop}; use kailua_syntax::Chunk; /// Options for customizin...
<|file_name|>block_args.rs<|end_file_name|><|fim▁begin|>// rustfmt-indent_style: Block // Function arguments layout fn lorem() {} fn lorem(ipsum: usize) {} fn lorem(ipsum: usize, dolor: usize, sit: usize, amet: usize, consectetur: usize, adipiscing: usize, elit: usize) { // body }<|fim▁hole|> pub fn GetConsol...
// #1441 extern "system" {
<|file_name|>pattern-white.go<|end_file_name|><|fim▁begin|>package opc // White // Set all pixels to white. import ( "github.com/longears/pixelslinger/colorutils" "github.com/longears/pixelslinger/config" "github.com/longears/pixelslinger/midi" ) func MakePatternWhite(locations []float64) ByteThread { return f...
} }
<|file_name|>snapshots.py<|end_file_name|><|fim▁begin|># Copyright 2011 Justin Santa Barbara # 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:/...
import webob
<|file_name|>BlockMicrowave.java<|end_file_name|><|fim▁begin|>package us.mcsw.minerad.blocks; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.tileentity.TileEntity; import net.minecraft....
setHardness(4.0f); isBlockContainer = true;
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>const path = require('path') module.exports = { context: __dirname, entry: './js/ClientApp.js', devtool: 'eval', output: { path: path.join(__dirname, '/public'), publicPath: '/public/', filename: 'bundle.js' }, devServer: { publicP...
}, { test: /\.otf$/, loader: 'file-loader?name=fonts/[name].[ext]'
<|file_name|>Solution.java<|end_file_name|><|fim▁begin|>package com.javarush.test.level07.lesson12.home01; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; /* Вывести числа в обратном порядке Ввести с клавиатуры 10 чисел и ...
<|file_name|>text_visual.py<|end_file_name|><|fim▁begin|>import numpy as np import os from galry import log_debug, log_info, log_warn, get_color from fontmaps import load_font from visual import Visual __all__ = ['TextVisual'] VS = """ gl_Position.x += (offset - text_width / 2) * spacing.x / window_size.x; ...
d.update(self.position_compound(coordinates)) return d
<|file_name|>tests.py<|end_file_name|><|fim▁begin|><|fim▁hole|>Created on Jun 6, 2013 @author: dmitchell ''' from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory from student.tests.factories import AdminFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase import xmodule_...
'''
<|file_name|>orderables.py<|end_file_name|><|fim▁begin|>from collections import namedtuple from datetime import date, datetime, timedelta from cms.models import CMSPlugin from django.db import models from django.utils.formats import date_format, time_format from django.utils.functional import cached_property from djan...
help_text=_("The template used to render plugin."),
<|file_name|>test_chart_chartarea02.py<|end_file_name|><|fim▁begin|>############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org #<|fim▁hole|> class TestCompareXLSXFiles(ExcelComparisonTest): """ Test f...
from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook
<|file_name|>period.py<|end_file_name|><|fim▁begin|># # Copyright 2013 Quantopian, 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 # # ...
return sortino_ratio(self.algorithm_returns,
<|file_name|>RenameModulesScript.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- import os from abjad.tools import documentationtools from abjad.tools import systemtools from abjad.tools.developerscripttools.DeveloperScript import DeveloperScript from abjad.tools.developerscripttools.ReplaceInFilesScript \ ...
self._rename_old_module(*new_args)
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from distutils.core import setup<|fim▁hole|> setup( name='Harmony', version='0.1', author='H. Gökhan Sarı', author_email='th0th@returnfalse.net', packages=['harmony'], scripts=['bin/harmony'], url='https://github.com...
<|file_name|>DoublePeerAvatar.js<|end_file_name|><|fim▁begin|>/** * Copyright 2017 dialog LLC <info@dlg.im> * @flow */ import type { PeerInfo } from '@dlghq/dialog-types'; import type { AvatarSize } from '../Avatar/getAvatarSize'; import type { Gradient } from '../Avatar/getAvatarColor'; import React, { PureCompon...
<stop offset="1" stopColor={colors.payload.to} />
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod buffer; mod buffered; <|fim▁hole|> pub use self::buffered::*; pub use self::buffer::*;<|fim▁end|>
#[cfg(test)] mod tests;
<|file_name|>odp.js<|end_file_name|><|fim▁begin|>'use strict' // Module dependencies. var request = require('request') var querystring = require('querystring') var userAgent = require('random-useragent') // Root for all endpoints. var _baseUrl = 'http://data.europa.eu/euodp/data/api/action' // Infrastructure prevents...
method: 'GET', endpoint: 'tag_list', query: (options !== undefined ? options.query : '')
<|file_name|>__manifest__.py<|end_file_name|><|fim▁begin|># Copyright 2021 Tecnativa - Sergio Teruel # License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). { "name": "Account Invoice Margin Sale Delivered Sync", "summary": "Sync invoice margin between invoices and sale orders", "version": "12.0.1....
"author": "Tecnativa, " "Odoo Community Association (OCA)",
<|file_name|>work-item-link.reducer.ts<|end_file_name|><|fim▁begin|>import { ActionReducer, State } from '@ngrx/store'; import * as WorkItemLinkActions from './../actions/work-item-link.actions'; import { initialState, WorkItemLinkState } from './../states/work-item-link.state'; export type Action = WorkItemLinkAction...