prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>simple-imap.js<|end_file_name|><|fim▁begin|>var Imap = require('imap'), MailParser = require('mailparser').MailParser, moment = require('moment') util = require('util'), events = require('events'); var SimpleImap = function(options) { this.options = options; this.imap = null; this.start = functio...
<|file_name|>serv.rs<|end_file_name|><|fim▁begin|>// Copyright 2021 The Grin Developers // // 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....
stop_state, }) }
<|file_name|>choices.py<|end_file_name|><|fim▁begin|>from model_utils import Choices SPONSOR_TYPES = Choices( ('diamond', 'DIAMOND', 'Diamond Sponsor'), ('lanyard', 'LANYARD', 'Lanyard Sponsor'), ('track', 'TRACK', 'Track Sponsor'), ('foodanddrinks', 'FOOD_AND_DRINKS', 'Food & Drinks Sponsor'), ('l...
)
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export { default } from './RubymineOriginal'
<|file_name|>Feature.java<|end_file_name|><|fim▁begin|>package com.lgvalle.beaufitulphotos.fivehundredpxs.model; import com.lgvalle.beaufitulphotos.R; /** * Created by luis.gonzalez on 23/07/14. * Enum to represent service features */ public enum Feature { Popular("popular", R.string.feature_popular), HighestRat...
<|file_name|>IntType.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2010---2013 星星(wuweixing)<349446658@qq.com> * * This file is part of Wabacus * * Wabacus is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free S...
{ DecimalFormat df=new DecimalFormat(this.numberformat); return df.format((Integer)value);
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 TiKV Project Authors. Licensed under Apache-2.0. /*! This module provides an implementation of mpsc channel based on crossbeam_channel. Comparing to the crossbeam_channel, this implementation supports closed detection and try operations. */ pub mod b...
<|file_name|>extractor.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 https://mozilla.org/MPL/2.0/. use message::Message; use error::{Error, Result}; use common:...
Ok(()) }
<|file_name|>generatePlots.py<|end_file_name|><|fim▁begin|>import numpy as np import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plot import matplotlib.pylab from matplotlib.backends.backend_pdf import PdfPages import re def drawPlots(data,plotObj,name,yLabel,position): drawing = plotObj.add_subpl...
pdfDoc = PdfPages('%s.pdf' %(vol))
<|file_name|>SignInteractEvent.java<|end_file_name|><|fim▁begin|>package net.ess3.api.events; import com.earth2me.essentials.signs.EssentialsSign; import net.ess3.api.IUser; import org.bukkit.event.HandlerList; /** * Fired when an Essentials sign is interacted with. * * This is primarily intended for use with Esse...
<|file_name|>movement.js<|end_file_name|><|fim▁begin|>import settings from './../settings' import {findDistance, limitPositions, chooseOne, randomInt, getAvgPostion} from './general' module.exports = { applyLimbForces: (Eves) => { for(var i = 0; i < Eves.length; i++) { var eve = Eves[i]; for(var j = ...
//NEEDS TO GO ON CLIENT ONLY??
<|file_name|>fragment.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/. */ //! The `Fragment` type, which represents the leaves of the ...
let block_flow = flow_ref::deref_mut(&mut info.flow_ref).as_block();
<|file_name|>fckstylecommand.js<|end_file_name|><|fim▁begin|><<<<<<< HEAD /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2010 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * -...
FCKUndo.SaveUndoStep() ;
<|file_name|>switch.py<|end_file_name|><|fim▁begin|>"""Support for SCSGate switches.""" import logging import voluptuous as vol from homeassistant.components import scsgate from homeassistant.components.switch import SwitchDevice, PLATFORM_SCHEMA from homeassistant.const import ATTR_ENTITY_ID, ATTR_STATE, CONF_NAME, ...
)
<|file_name|>broken.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2013-2016 Sandstorm Development Group, Inc. and contributors // Licensed under the MIT License: // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"),...
<|file_name|>StringReferenceProvider.java<|end_file_name|><|fim▁begin|>package de.espend.idea.shopware.reference.provider; import com.intellij.codeInsight.lookup.LookupElement; import com.intellij.codeInsight.lookup.LookupElementBuilder; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiPolyVariantReferen...
<|file_name|>async_await.py<|end_file_name|><|fim▁begin|>import threading import asyncio async def hello(): print('Hello world! (%s)' % threading.currentThread()) await asyncio.sleep(1) print('Hello again! (%s)' % threading.currentThread()) loop = asyncio.get_event_loop() <|fim▁hole|><|fim▁end|>
tasks = [hello(), hello()] loop.run_until_complete(asyncio.wait(tasks)) loop.close()
<|file_name|>base.py<|end_file_name|><|fim▁begin|># Copyright 2017 Huawei Technologies Co.,LTD. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may<|fim▁hole|># # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# not use this file except in compliance with the License. You may obtain # a copy of the License at
<|file_name|>copy_training_service.py<|end_file_name|><|fim▁begin|>############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universit...
# 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 3 of the License, or # (at your option) any later version.
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Package' db.create_table(u'api_pac...
'Meta': {'unique_together': "(('name', 'url'),)", 'object_name': 'Package'}, 'created_at': ('django.db.models.fields.DateField', [], {'auto_now_add': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db....
<|file_name|>wechat.js<|end_file_name|><|fim▁begin|>/** * 微信网页端调用JS * @author dodge * @contact dodgepudding@gmail.com * @link http://blog.4wer.com/wechat-timeline-share * @version 1.1 * * 自定义分享使用: * WeixinJS.hideOptionMenu() 隐藏右上角按钮 * WeixinJS.showOptionMenu() 显示右上角按钮 * WeixinJS.hideToolbar() 隐藏工具栏 * Weixin...
//扫描二维码 WeixinJS.scanQRCode = function() { if (typeof WeixinJSBridge!='undefined') WeixinJSBridge.invoke("scanQRCode", {});
<|file_name|>scene_main.go<|end_file_name|><|fim▁begin|>package main /* * CSCI 4229 Assignment 5: Lighting * * Author: Zach Anders * * Some code derived from CSCI 4229 Examples 9, 10, and 13 (ex9.c, ex10.c, ex13.c) * * Code for 2D text display (due to missing windowpos2i) based off some example code * at http://progra...
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>from django.contrib.auth import authenticate, login, get_user_model from mailin import Mailin from string import punctuation def authorize(request): email = request.POST.get('Email') password = request.POST.get('Password') if len(email) < 6 or len(password) < 10:...
elif c.isdigit(): security_combo[2] = 1
<|file_name|>issue-10031.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed
<|file_name|>Tools.js<|end_file_name|><|fim▁begin|>define([], function() {<|fim▁hole|> 'use strict'; /** * Prints a debugging console message for a shortcut * * @param {Shortcut} shortcut - shortcut object */ var printDebugConsoleMessage = function(shortcut) { console.log('Shortc...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># This file is part of authapi. # Copyright (C) 2014-2020 Agora Voting SL <contact@nvotes.com> # authapi is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundatio...
<|file_name|>GameObject.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include "GameObject.h" using namespace Physics; void GameObject::init(string name, string particle, string entity) { m_name = name; if (mp_PhysicsManager->hasParticle(particle)) m_particleName = particle; if (mp_GraphicsManager->has...
// give data to graphics engine mp_GraphicsManager->updateEntityPosition(m_entityName, m_position.GLM());
<|file_name|>XeroCredentials.java<|end_file_name|><|fim▁begin|><|fim▁hole|>/** * User: thomas Date: 18/02/14 */ public interface XeroCredentials { String getXeroConsumerKey(); String getXeroConsumerSecret(); String getPrivateKeyPath(); }<|fim▁end|>
package com.pi.xerosync.dbconnect;
<|file_name|>EventDetailPanel.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2010-2012 Matthias Klass, Johannes Leimer, * Rico Lieback, Sebastian Gabriel, Lothar Gesslein, * Alexander Rampp, Kai Weidner * * This file is part of the Physalix Enrollment System * * Foobar is free s...
break; case PERIODICAL: s = "Wöchentlich am " + dayFormat.format(item.getModelObject().getStartDate().getTime());
<|file_name|>usage-builder.js<|end_file_name|><|fim▁begin|>'use strict'; const { extend } = require('underscore'); <|fim▁hole|> testResourceType, testAccountID, testMeteringPlanID, testRatingPlanID, testPricingPlanID } = require('./fixtures/usageDocumentFieldsConstants'); const _commonBlueprint = { collected_usa...
const dbclient = require('abacus-dbclient'); const { testCollectedUsageID, testResourceID, testOrganizationID, testSpaceID, testConsumerID, testPlanID,
<|file_name|>invite_list.js<|end_file_name|><|fim▁begin|>/** A data model representing a list of Invites @class InviteList @extends Discourse.Model @namespace Discourse @module Discourse **/ Discourse.InviteList = Discourse.Model.extend({ empty: (function() { return this.blank('pending') && this.blank(...
<|file_name|>cifarnet_preprocessing.py<|end_file_name|><|fim▁begin|># Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://ww...
<|file_name|>recreate_webassets.py<|end_file_name|><|fim▁begin|>from django.core.management.base import BaseCommand, CommandError from django.db.models import Q from django.template.defaultfilters import filesizeformat from hav.apps.media.models import Media from hav.apps.hav_collections.models import Collection from h...
<|file_name|>str.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licens...
0x000a_u16]), ("𐌀𐌖𐌋𐌄𐌑𐌉·𐌌𐌄𐌕𐌄𐌋𐌉𐌑\n".to_string(),
<|file_name|>onbuild.go<|end_file_name|><|fim▁begin|>package onbuild import ( "bytes" "fmt" "io" "os" "path/filepath" "github.com/golang/glog" "github.com/openshift/source-to-image/pkg/api" "github.com/openshift/source-to-image/pkg/build" "github.com/openshift/source-to-image/pkg/build/strategies/sti" "gith...
<|file_name|>DVVideoRTPSource.cpp<|end_file_name|><|fim▁begin|>/********** This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version...
return True; } char const* DVVideoRTPSource::MIMEtype() const {
<|file_name|>d3d11_renderstate.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************** * The MIT License (MIT) * * Copyright (c) 2015-2018 Baldur Karlsson * Copyright (c) 2014 Crytek * * Permission is hereby granted, free of charge, to any person obtaining ...
}
<|file_name|>neon_node.rs<|end_file_name|><|fim▁begin|>use std::cmp; use std::collections::HashMap; use std::collections::{HashSet, VecDeque}; use std::convert::{TryFrom, TryInto}; use std::default::Default; use std::net::SocketAddr; use std::sync::mpsc::{sync_channel, Receiver, SyncSender, TrySendError}; use std::sync...
let mut expected_attachments = match attachments_rx.try_recv() {
<|file_name|>relational_layers_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2018 The DisentanglementLib 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 ...
<|file_name|>task_view.py<|end_file_name|><|fim▁begin|>""" Task performed by user in django view """ import functools from django.core.urlresolvers import reverse from django.conf.urls import url from django.shortcuts import get_object_or_404 from ..activation import Activation, ViewActivation, STATUS from ..exceptio...
return self.__class__(func, activation=activation) return flow_view_decorator
<|file_name|>tag_block.go<|end_file_name|><|fim▁begin|>package tsi1 import ( "bytes" "encoding/binary" "errors" "fmt" "io" "github.com/influxdata/influxdb/pkg/rhh" ) // TagBlockVersion is the version of the tag block. const TagBlockVersion = 1 // Tag key flag constants. const ( TagKeyTombstoneFlag = 0x01 ) ...
<|file_name|>blocks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import logging import pickle import re from cacheops import invalidate_model from django import http from django.contrib import messages from django.core.urlresolvers import reverse from django.http import HttpResponse from django.shortcuts ...
if "date" in request.GET: date = request.GET.get("date")
<|file_name|>statement.py<|end_file_name|><|fim▁begin|>from . import claim, util from .attr_dict import AttrDict class Statement(AttrDict): @classmethod def from_json(cls, statement_doc): return normalize(statement_doc) <|fim▁hole|> references = {} for item in statement_doc.get('references', ...
def normalize(statement_doc): statement_doc = util.ensure_decoded_json(statement_doc)
<|file_name|>streakgaming.py<|end_file_name|><|fim▁begin|># !/usr/bin/python # -*- coding: cp1252 -*- # ################################################################################## # # Copyright 2016 Félix Brezo and Yaiza Rubio (i3visio, contacto@i3visio.com) # # This program is part of OSRFramework. You ca...
<|file_name|>Query.java<|end_file_name|><|fim▁begin|>/** * <copyright> * </copyright> * * $Id$ */ package org.eclipse.bpel4chor.model.pbd; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Query</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: *...
<|file_name|>manage_test.py<|end_file_name|><|fim▁begin|><|fim▁hole|>if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tdjango.tests.testapp.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)<|fim▁end|>
#!/usr/bin/env python import os import sys
<|file_name|>HttpServletRequestAdapterTest.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one<|fim▁hole|> * "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/LIC...
* 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 License, Version 2.0 (the
<|file_name|>connector.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 SAP SE Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by ap...
c.locale = v[0] case DSNTLSServerName: if len(v) == 0 {
<|file_name|>spaceicon.py<|end_file_name|><|fim▁begin|>############################################################################### #cyn.in is an open source Collaborative Knowledge Management Appliance that #enables teams to seamlessly work together on files, documents and content in #a secure central environment. ...
<|file_name|>active.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016, Ben Morgan. All rights reserved. // Use of this source code is governed by an MIT license // that can be found in the LICENSE file. package lackey import ( "os" "os/exec" "strconv" "strings" "github.com/cassava/lackey/audio/mp3" "github...
if o.Verbose { o.Color.Printf("@{g.}ok:@|@. %s\n", dst) }
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>import os import signal import subprocess class Camera(object): # In order to run mjpg-streamer through Python, make sure # mjpg-streamer-experimental is installed so the .so objects # and mjpg-streamer are all on defualt PATH so we don't have # to ...
# closes video feed for an instance of Camera: each instance of Camera must be killed
<|file_name|>model.py<|end_file_name|><|fim▁begin|>import tensorflow as tf from tensorflow.python.ops import rnn_cell from tensorflow.python.ops import seq2seq import numpy as np class Model(): def __init__(self, args, infer=False): self.args = args if infer: args.batch_size = 1 ...
softmax_b = tf.get_variable("softmax_b", [args.vocab_size]) # with tf.device("/cpu:0"): # embedding = tf.get_variable("embedding", [args.vocab_size, args.rnn_size])
<|file_name|>NametagGroup.py<|end_file_name|><|fim▁begin|>from panda3d.core import * from panda3d.direct import * from NametagConstants import * from Nametag3d import * from Nametag2d import * class NametagGroup: CCNormal = CCNormal CCNoChat = CCNoChat CCNonPlayer = CCNonPlayer CCSuit = CCSuit CCTo...
def setPageNumber(self, page): self.chatPage = page self.updateTags()
<|file_name|>leafletScriptStrings.py<|end_file_name|><|fim▁begin|>from utils import scaleToZoom def jsonScript(layer): json = """ <script src="data/json_{layer}.js\"></script>""".format(layer=layer) return json def scaleDependentLayerScript(layer, layerName): min = layer.minimumScale() max =...
<|file_name|>kvazaarfilter.cpp<|end_file_name|><|fim▁begin|>#include "kvazaarfilter.h" #include "statisticsinterface.h" #include "common.h" #include "settingskeys.h" #include "logger.h" #include <kvazaar.h> #include <QtDebug> #include <QTime> #include <QSize> enum RETURN_STATUS {C_SUCCESS = 0, C_FAILURE = -1}; Kv...
std::unique_ptr<Data> input = getInput();
<|file_name|>timesheet.js<|end_file_name|><|fim▁begin|>function changeNameLength(name, limit) { return (name.length > limit) ? name.substring(0, limit - 3) + "..." : name; } function getTimesheet(data) { data = $.parseJSON(data); $(".alert").addClass("display-hide"); $(".schedule-info").removeClass("di...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![feature(plugin)] #![plugin(clippy)] extern crate calamine; extern crate hyper; use std::fs; use std::fs::File; use std::io::{Read, Write}; use std::path::Path; use std::str; use hyper::client::Client; mod excel; fn main() { fs::create_dir_all("data").unwrap(...
} fn download(url: &str, xls: &Path) {
<|file_name|>java.awt.image.RGBImageFilter.d.ts<|end_file_name|><|fim▁begin|>declare namespace java { namespace awt {<|fim▁hole|> abstract class RGBImageFilter extends java.awt.image.ImageFilter { protected origmodel: java.awt.image.ColorModel protected newmodel: java.awt.image.ColorModel ...
namespace image {
<|file_name|>espacios.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.template import Library from ..models import Espacio register = Library()<|fim▁hole|>@register.inclusion_tag('espacios/_otros_espacios.html', takes_context=True) def otros_espacios(context)...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! This module contains all of the built-in mutators. <|fim▁hole|><|fim▁end|>
pub mod vym;
<|file_name|>assignment2.py<|end_file_name|><|fim▁begin|>''' author Lama Hamadeh ''' import pandas as pd import matplotlib.pyplot as plt import matplotlib import assignment2_helper as helper # Look pretty... matplotlib.style.use('ggplot') # Do * NOT * alter this line, until instructed! scaleFeatures = True #Featur...
<|file_name|>test_scrooge_gen.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, ...
<|file_name|>build.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> build::link("mdmregistration", true) }<|fim▁end|>
// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md> extern crate build; fn main() {
<|file_name|>test_api.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python3 import vk import sys import json # get access token #app_id = 4360605 #url = "http://api.vkontakte.ru/oauth/authorize?client_id=" + str(app_id) + "&scope=4&redirect_uri=http://api.vk.com/blank.html&display=page&response_type=token" #webbrow...
<|file_name|>walrus_concurrency.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import time from concurrent.futures import ThreadPoolExecutor from eucaops import Eucaops from eucaops import S3ops from eutester.eutestcase import EutesterTestCase class WalrusConcurrent(EutesterTestCase): def __init__(self): ...
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from .forms import SetupForm from django.contrib.auth.decorators import login_required<|fim▁hole|> @login_required def home(request): # Redirect to the default view, which happens to be a non-framework view return redirect('/en-us/app/twitter2/twitter_general')...
from django.core.urlresolvers import reverse from django.shortcuts import redirect from splunkdj.decorators.render import render_to from splunkdj.setup import create_setup_view_context
<|file_name|>test_serializers.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals from collections import namedtuple from django.core.exceptions import ValidationError, ObjectDoesNotExist from django.db.models.fields import FieldDoesNotExist from django.test.client import RequestFac...
with mock.patch.object(self.rel_field.queryset, 'get') as qs: qs.return_value = test_models.NormalModel(id=42) answer = self.rel_field.from_native({'id': 42 })
<|file_name|>data_utils.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2022 The Google Research 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....
# the token at index `char_to_token_index[i]`. A whitespace belongs to the # later token. Note that the `text` stored in this class is obtained from # first SentencePiece tokenize the input text, then detokenize the tokens.
<|file_name|>cauchy.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 L...
# `np.zeros_like` does not support scalar at this moment.
<|file_name|>bitcoin_ar.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ar" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Vector</source> <translation>عن البلاك كوين</tr...
<translation>أدخل عبارة المرور القديمة والجديدة إلى المحفظة.</translation>
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from pyramid.httpexceptions import ( HTTPException, HTTPFound, HTTPNotFound, HTTPBadRequest, HTTPConflict, ) from pyramid.security import Authenticated from pyramid.view import view_config from perpetualfailure.db import session from perpetualfailu...
route_name='knowledgebase.article.view', renderer='knowledgebase/article/view.mako',
<|file_name|>mwcc.py<|end_file_name|><|fim▁begin|>"""SCons.Tool.mwcc Tool-specific initialization for the Metrowerks CodeWarrior compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 200...
try: HLM = SCons.Util.HKEY_LOCAL_MACHINE product = 'SOFTWARE\\Metrowerks\\CodeWarrior\\Product Versions' product_key = SCons.Util.RegOpenKeyEx(HLM, product)
<|file_name|>world.ts<|end_file_name|><|fim▁begin|>///<reference path='refs.ts'/> module TDev { export module World { export function log(s: string) { Util.log("World: " + s); } // Filled in from [editor/default.ts]; expects [s] to be a // *touchdevelop* script text, not an external editor...
<|file_name|>loop.js<|end_file_name|><|fim▁begin|>// Benchpress: A collection of micro-benchmarks. var allResults = [ ]; // ----------------------------------------------------------------------------- // F r a m e w o r k // ----------------------------------------------------------------------------- function Benc...
time(Loop);
<|file_name|>config.js<|end_file_name|><|fim▁begin|>System.config({ baseURL: ".", defaultJSExtensions: true, transpiler: "babel", babelOptions: { "optional": [ "runtime", "optimisation.modules.system" ] }, paths: { "github:*": "jspm_packages/github/*", "npm:*": "jspm_packages/npm...
"diffie-hellman": "npm:diffie-hellman@5.0.1", "inherits": "npm:inherits@2.0.1", "pbkdf2": "npm:pbkdf2@3.0.4", "public-encrypt": "npm:public-encrypt@4.0.0",
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate serde_json; #[macro_use] extern crate serde_derive; #[macro_use] extern crate exonum; extern crate router; extern crate bodyparser; extern crate iron; use std::path::Path; use std::fs::File; use std::io::prelude::*; use std::collections::HashMap; use exo...
let node_cfg = NodeConfig { listen_address: peer_address,
<|file_name|>mixins.js<|end_file_name|><|fim▁begin|>/** * @file A set of global functions available to all components. * @author Rowina Sanela */ (bbn => { "use strict"; if ( !bbn.vue ){ throw new Error("Impossible to find the library bbn-vue") } Vue.mixin({ computed: { /** * Return the...
* @method getRef * @param {String} name * @fires bbn.vue.getRef * @return {Function}
<|file_name|>web.py<|end_file_name|><|fim▁begin|>import busbus from busbus.entity import BaseEntityJSONEncoder from busbus.provider import ProviderBase from busbus.queryable import Queryable import cherrypy import collections import itertools import types def json_handler(*args, **kwargs): value = cherrypy.servi...
<|file_name|>fakes.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2015 Spanish National Research Council # # 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://...
"name": "foo", }, "bar": {
<|file_name|>eternus_dx_fc.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 FUJITSU LIMITED # Copyright (c) 2012 EMC Corporation. # Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in complianc...
def create_snapshot(self, snapshot): """Creates a snapshot.""" LOG.debug('create_snapshot, '
<|file_name|>usuarios.js<|end_file_name|><|fim▁begin|>/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ angular.module('MetronicApp').controller('UsuariosCtrl', function ($scope, GetSv...
);
<|file_name|>GraphViewConfigurationUIFactory.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...
* limitations under the License.
<|file_name|>anitoonstv.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import re from channels import renumbertools from channelselector import get_thumb from core import httptools from core import scrapertools from core import servertools from core import tmdb from core.item import Item from platformcode i...
<|file_name|>releases.py<|end_file_name|><|fim▁begin|>''' MLAB calls MATLAB funcitons and looks like a normal python library. authors: Yauhen Yakimovich <eugeny.yakimovitch@gmail.com> <|fim▁hole|>from types import ModuleType from mlabwrap import (MlabWrap, choose_release, find_available_releases, ...
Module wrapping borrowed from `sh` project by Andrew Moffat. ''' import os import sys
<|file_name|>runtests.py<|end_file_name|><|fim▁begin|>""" This is our testing framework. Goals: * it should be compatible with py.test and operate very similarly (or identically) * doesn't require any external dependencies * preferably all the functionality should be in this file only * no magic, just import the test...
funcs = [] else: # we need to filter only those functions that begin with 'test_' # that are defined in the testing file or in the file where
<|file_name|>levelpoint.ts<|end_file_name|><|fim▁begin|>import {Graphics} from 'controller/tiling/graphics' import Point from 'controller/geom/point' export default class LevelPoint { tile :Graphics pos :Point seen :boolean persistent :boolean moving :boolean constructor(pos :Point, tile :Gr...
<|file_name|>store_change_logger.py<|end_file_name|><|fim▁begin|>class StoreChangeLogger: def __init__(self, store_name, context) -> None: self.topic = f'{context.application_id}-{store_name}-changelog' self.context = context self.partition = context.task_id.partition self.record_col...
if self.record_collector:
<|file_name|>bosh.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import jsonschema import json import os import sys import os.path as op import tempfile import pytest from argparse import ArgumentParser, RawTextHelpFormatter from jsonschema import ValidationError from boutiques.validator import DescriptorValida...
parser.add_argument("input_descriptor", help="Input descriptor to be " "converted. For '0.4'"
<|file_name|>timeout_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 """ Created on 17 Sep 2019 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) """ import time from scs_core.sys.timeout import Timeout # ----------------------------------------------------------------------------------------...
except TimeoutError: print("TimeoutError")
<|file_name|>iterableFilterInterface.ts<|end_file_name|><|fim▁begin|>namespace jsfx { export interface IterableFilterInterface extends jsfx.FilterInterface {<|fim▁hole|> } }<|fim▁end|>
iterateCanvas(helper : jsfx.util.ImageDataHelper) : void;
<|file_name|>create.py<|end_file_name|><|fim▁begin|>"""Creates a user """ # :license: MIT, see LICENSE for more details. import json import string import sys import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions from SoftLayer.CLI import formatting from SoftLayer.CL...
def cli(env, username, email, password, from_user, template):
<|file_name|>p_haul_img.py<|end_file_name|><|fim▁begin|># # images driver for migration (without FS transfer) # import os import tempfile import rpyc import tarfile import time import shutil import time img_path = "/var/local/p.haul-fs/" img_tarfile = "images.tar" xfer_size = 64 * 1024 def copy_file(s, d): while Tr...
<|file_name|>GooglePlayMusicController.py<|end_file_name|><|fim▁begin|>from gmusicapi import Mobileclient import getpass class GpmSession(object): # Private Variables # Public Variables api = None logged_in = False songs = None playlists = None <|fim▁hole|> # Omit credentials if you want to...
# Constructor with optionally passed credentials
<|file_name|>barcode_issue_line.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012-2015 Netforce Co. Ltd. # # 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 w...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from rest_framework.routers import (Route, DynamicDetailRoute, SimpleRouter, DynamicListRoute) from app.api.account.views import Account...
<|file_name|>test.cpp<|end_file_name|><|fim▁begin|>#include "orca_gazebo/orca_gazebo_util.h" void testGaussianKernel() { // Anything outside of 4 stddev on either side is an outlier, and go in the first and last buckets constexpr int NUM_BUCKETS = 10; constexpr double MEAN = NUM_BUCKETS / 2; constexpr double ...
double m = orca_gazebo::gaussianKernel(MEAN, STDDEV); int i = static_cast<int>(m / BUCKET_WIDTH); if (i < 0) i = 0; if (i >= NUM_BUCKETS) i = NUM_BUCKETS - 1;
<|file_name|>ReactionsById.ts<|end_file_name|><|fim▁begin|>export interface ReactionsById_me_reactions_reactionKind { __typename: "ReactionKind"; /** * Id */ id: number; /** * Name of reaction example is like or dislike */ name: string; } export interface ReactionsById_me_reactions_study { __ty...
firstName: string | null; /**
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import re import datetime import time #niru's git commit while True: #open the file for reading file = open("test.txt") content = file.read() #Get timestamp ts = time.time() ist = datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d %H:%M:...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var fastn = require('fastn')({<|fim▁hole|> templater: require('fastn/templaterComponent'), text: require('fastn/textComponent'), ratingControl: require('./ratingControlComponent') }); module.exports = function(settings){ return fastn('ratingControl', se...
_generic: require('fastn/genericComponent'), list: require('fastn/listComponent'),
<|file_name|>descriptor_cpp2_test.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modif...