prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>widgets.py<|end_file_name|><|fim▁begin|># Copyright (c) 2008 Joost Cassee # Licensed under the terms of the MIT License (see LICENSE.txt) """ This TinyMCE widget was copied and extended from this code by John D'Agostino: http://code.djangoproject.com/wiki/CustomWidgetsTinyMCE """ from django import forms...
for lang, names in lang_names.items(): if lang == content_language:
<|file_name|>cache-plugin.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:5b06c8bb34dea0d08a98bb98d8fc80c43e4c6e36f6051a72b41fd447afd37cfc<|fim▁hole|><|fim▁end|>
size 1253
<|file_name|>train.py<|end_file_name|><|fim▁begin|># Example implementing 5 layer encoder # Original code taken from # https://github.com/aymericdamien/TensorFlow-Examples/blob/master/examples/3_NeuralNetworks/autoencoder.py # The model trained here is restored in load.py from __future__ import division, print_functio...
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """rds-create-cpu-alarms Script used to create CPUUtilization alarms in AWS CloudWatch for all RDS instances. A upper-limit threshold needs to be defined. Usage: rds-create-cpu-alarms [options] <threshold> <sns_topic_arn> <region> rds-cre...
def get_cpuutilization_alarms_to_create(rds_instances, threshold, aws_cw_connect,
<|file_name|>stack.py<|end_file_name|><|fim▁begin|># Stack implementation class Stack (object): def __init__ (self): self.stack = [] def push (self, data): self.stack.append(data) def peek (self):<|fim▁hole|> return None return self.stack[-1] def pop (self): if self.isEmpty(): return None return...
if self.isEmpty():
<|file_name|>_generate-readme.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # -*- coding: utf-8 -*- import subprocess import os def path(*path_segments): return os.path.join(os.getcwd(), *path_segments) def open_file(*path_segments): file_path = path(*path_segments) open(file_path, 'w').close...
<|file_name|>aaspi_file.py<|end_file_name|><|fim▁begin|>#!/bin/env python #========================================================================== # (c) 2004 Total Phase, Inc. #-------------------------------------------------------------------------- # Project : Aardvark Sample Code # File : aaspi_file.c #-----...
blast_bytes(handle, filename)
<|file_name|>Spinner.py<|end_file_name|><|fim▁begin|>import sublime from . import SblmCmmnFnctns <|fim▁hole|> SYMBOLS_BOX = u'⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏' def __init__(self, symbols, view, startStr, endStr): self.symbols = symbols self.length = len(symbols) self.position = 0 self.stopFlag = False self.view = view self.s...
class Spinner: SYMBOLS_ROW = u'←↑→↓'
<|file_name|>file-matcher.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2012, Yahoo! Inc. All rights reserved. Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var fileset = require('fileset'), path = require('path'), seq = 0; function filesFor(options, cal...
callback = options; options = null; } options = options || {};
<|file_name|>Image.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2011 Matthias Fuchs * * 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...
{ std::auto_ptr<stromx::cvsupport::Image> allocateFromDimension(const unsigned int width, const unsigned int height, const Image::PixelType pixelType)
<|file_name|>test_with_shap.py<|end_file_name|><|fim▁begin|>import numpy as np import xgboost as xgb import pytest try: import shap except ImportError: shap = None<|fim▁hole|> pass pytestmark = pytest.mark.skipif(shap is None, reason="Requires shap package") # Check integration is not broken from xgboost...
<|file_name|>test_label_semantic_roles.py<|end_file_name|><|fim▁begin|># Copyright (c) 2018 PaddlePaddle 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 # # ...
decay_rate=0.5, staircase=True)) sgd_optimizer.minimize(avg_cost)
<|file_name|>internal.go<|end_file_name|><|fim▁begin|>package internal import ( "bufio" "crypto/rand" "crypto/tls" "crypto/x509" "errors" "fmt" "io/ioutil" "os" "strings" "time" "unicode" ) const alphanum string = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" // Duration just wraps time...
) (*tls.Config, error) { if SSLCert == "" && SSLKey == "" && SSLCA == "" && !InsecureSkipVerify {
<|file_name|>pendingRst.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2017 ProjectV 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 # # htt...
raise ExceptionRest(status_code=404, message="No se han encontrado resultados") else: raise ExceptionRest(status_code=404, message="No se han encontrado resultados") except (Exception, ExceptionRest), e:
<|file_name|>bmp280.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Author: Jon Trulson <jtrulson@ics.com> # Copyright (c) 2016 Intel Corporation. # # 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...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># ------------------------------------------------------------------------------------------------ # Software: Stem Applier (staply) # Description: Applies inflections to stem morphemes # Version: 0.0.1a<|fim▁hole|># Module: Main # # Author: ...
<|file_name|>_load_balancers_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 information. #...
def get_long_running_output(pipeline_response):
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls.defaults import patterns from django.conf import settings # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover()<|fim▁hole|> urlpatterns = patterns('', ( r'^$', 'statserver.stats.views.brows...
<|file_name|>package-info.java<|end_file_name|><|fim▁begin|>/** * Server-side support classes for WebSocket requests. */ @NonNullApi<|fim▁hole|> import org.springframework.lang.NonNullApi; import org.springframework.lang.NonNullFields;<|fim▁end|>
@NonNullFields package org.springframework.web.reactive.socket.server.support;
<|file_name|>config.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- #------------------------------------------------------------ # Gestión de parámetros de configuración - xbmc #------------------------------------------------------------ # tvalacarta # http://blog.tvalacarta.info/plugin-xbmc/tvalacarta/ #----...
old_xbmc_directory = os.path.join( get_runtime_path() , "platformcode" , "xbmc" ) if os.path.exists( old_xbmc_directory ):
<|file_name|>game.rs<|end_file_name|><|fim▁begin|>use nom::branch::alt; use nom::bytes::complete::{is_a, is_not, tag, take}; use nom::character::complete::{anychar, digit1, one_of}; use nom::combinator::{map, map_res, opt, value}; use nom::multi::{count, many0, separated_list0}; use nom::sequence::{delimited, preceded,...
); assert_eq!( special_move(b"%MATTA"), Result::Ok((&b""[..], Action::Matta))
<|file_name|>input_test.rs<|end_file_name|><|fim▁begin|>//! Example that just prints out all the input events. use ggez::event::{self, Axis, Button, GamepadId, KeyCode, KeyMods, MouseButton}; use ggez::graphics::{self, Color, DrawMode}; use ggez::{conf, input}; use ggez::{Context, GameResult}; use glam::*; struct Mai...
<|file_name|>small_objects_stress.rs<|end_file_name|><|fim▁begin|>extern crate stopwatch; use stopwatch::Stopwatch; extern crate mo_gc; use mo_gc::{GcThread, GcRoot, Trace, StatsLogger}; const THING_SIZE: usize = 8; const THING_COUNT: i64 = 2500000; struct Thing { _data: [u64; THING_SIZE], } impl Thing { ...
println!("app finished in {}ms", sw.elapsed_ms()); }
<|file_name|>auth.go<|end_file_name|><|fim▁begin|>// mgo - MongoDB driver for Go // // Copyright (c) 2010-2012 - Gustavo Niemeyer <gustavo@niemeyer.net> // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditio...
return err }
<|file_name|>regiment.js<|end_file_name|><|fim▁begin|>'use strict'; const os = require('os'); const cluster = require('cluster'); const DEFAULT_DEADLINE_MS = 30000; function makeWorker(workerFunc) { var server = workerFunc(cluster.worker.id); server.on('close', function() { process.exit(); }); process....
<|file_name|>test__socket_timeout.py<|end_file_name|><|fim▁begin|>import sys import gevent from gevent import socket import greentest class Test(greentest.TestCase): def start(self): self.server = socket.socket() self.server.bind(('127.0.0.1', 0)) self.server.listen(1) self.server...
sock.settimeout(0.1) try:
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.contrib.contenttypes.models import ContentType import json from django.http import Http404, HttpResponse from django.contrib import messages from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required, use...
from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404, redirect, render from guardian.decorators import permission_required
<|file_name|>72.py<|end_file_name|><|fim▁begin|>class Solution: def minDistance(self, word1, word2):<|fim▁hole|> :type word1: str :type word2: str :rtype: int """ l1 = len(word1) l2 = len(word2) if l1 == 0 and l2 != 0: return l2 if ...
"""
<|file_name|>no_command.py<|end_file_name|><|fim▁begin|>from difflib import get_close_matches import os from pathlib import Path def _safe(fn, fallback): try: return fn() except OSError: return fallback def _get_all_bins(): return [exe.name for path in os.environ.get('PATH', ...
for exe in _safe(lambda: list(Path(path).iterdir()), []) if not _safe(exe.is_dir, True)]
<|file_name|>machine.go<|end_file_name|><|fim▁begin|>package main import ( "errors" "fmt" "strings" "sync" . "github.com/tendermint/go-common" "github.com/codegangsta/cli" ) //-------------------------------------------------------------------------------- func cmdSsh(c *cli.Context) { args := c.Args() mac...
}
<|file_name|>ops.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/licenses/LI...
/// println!("Remainder-ing!"); /// self
<|file_name|>test_init.py<|end_file_name|><|fim▁begin|>import __builtin__ import etcd from etcd import Client import importlib import inspect import maps from mock import MagicMock from mock import patch import os import pkgutil import pytest import yaml from tendrl.commons import objects import tendrl.commons.object...
tendrlNS._validate_ns_flow_definitions(raw_ns, defs)
<|file_name|>KIconDialog.py<|end_file_name|><|fim▁begin|># encoding: utf-8 # module PyKDE4.kio # from /usr/lib/python3/dist-packages/PyKDE4/kio.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc <|fim▁hole|>import PyKDE4.kdeui as __PyKDE4_kdeui import PyQt4.QtCore as __PyQt4_QtCore import PyQt4.QtGui as __Py...
# imports
<|file_name|>CloseQuestionHandler.java<|end_file_name|><|fim▁begin|>/* * The Kuali Financial System, a comprehensive financial management system for higher education. * * Copyright 2005-2014 The Kuali Foundation * * This program is free software: you can redistribute it and/or modify * it under the terms ...
<|file_name|>test-adb.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import unittest import warnings from tcdb import adb class TestADBSimple(unittest.TestCase): def setUp(self): self.adb = adb.ADBSimple() self.adb.open('*') def tearDown(self): self.adb.close() self...
obj = 10.10 self.adb.put_float(obj, obj)
<|file_name|>datacollect.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import time import threading from . import log <|fim▁hole|> """ pass class DataFailure(Exception): """DataError: a problem occurred while trying to collect the data, (ie, while calling module.collectData(...
# Exceptions class IndexError(Exception): """IndexError: a Data History index is out of range
<|file_name|>mainThreadNotebookDocuments.ts<|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 infor...
<|file_name|>2111005.js<|end_file_name|><|fim▁begin|>/*@author Jvlaple *Crystal of Roots */ var status = 0; <|fim▁hole|> importPackage(net.sf.odinms.client); function start() { status = -1; action(1, 0, 0); } function action(mode, type, selection) { if (mode == -1) { cm.dispose(...
var PQItems = Array(4001087, 4001088, 4001089, 4001090, 4001091, 4001092, 4001093);
<|file_name|>settings_test.py<|end_file_name|><|fim▁begin|>from django.test.testcases import SimpleTestCase from publicweb.extra_models import (NotificationSettings, OrganizationSettings, NO_NOTIFICATIONS, FEEDBACK_MAJOR_CHANGES) from django.contrib.auth.models import User, AnonymousUser from organizations.models i...
<|file_name|>kempston_di.cpp<|end_file_name|><|fim▁begin|>// license:BSD-3-Clause // copyright-holders:Curt Coder /********************************************************************** Kempston Disk Interface emulation **********************************************************************/ #include "kempston_di...
}
<|file_name|>shapeCircle.py<|end_file_name|><|fim▁begin|>''' Created on 13.06.2016 @author: mkennert ''' from kivy.properties import NumericProperty, ObjectProperty from kivy.uix.gridlayout import GridLayout from crossSectionView.circleView import CSCircleView from shapes.ashape import AShape import numpy a...
def get_width(self, y): x1 = -np.sqrt(np.abs((self.d / 2.)**2 - (y - self.d / 2.)** 2)) + self.d / 2.
<|file_name|>15.2.3.3-4-250.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 Ecma International. All rights reserved. // Ecma International makes this code available under the terms and conditions set<|fim▁hole|>// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the // "Use Terms"). Any re...
<|file_name|>Iterator.py<|end_file_name|><|fim▁begin|># This file is part of pybliographer # # Copyright (C) 1998-2004 Frederic GOBRY # Email : gobry@pybliographer.org # # 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 ...
class Iterator:
<|file_name|>node.py<|end_file_name|><|fim▁begin|># (c) Copyright 2014, University of Manchester # # This file is part of PyNSim. # # PyNSim 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, eithe...
""" type = 'surface reservoir' _properties = dict(
<|file_name|>reflection_test.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python # -*- coding: utf-8 -*- # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without #...
# support lazy parsing, but the current C++ implementation results in
<|file_name|>ermcfg.py<|end_file_name|><|fim▁begin|>''' Config/Settings for ER Tweet Matching Service ''' from datetime import date # GLOBAL # Maximum size a database can grow to (should be a multiple of 10MB) MAX_DB_SIZE = 10485760 * 1000 * 100 # 10MB -> 10GB -> 1TB ## ER SERVICE # Credentials ER_USER = 'luis....
START_DATE = date(2014, 11, 1) # End fetching (archive mode) at date #END_DATETIME = datetime.date.today()
<|file_name|>engine.js<|end_file_name|><|fim▁begin|>exports.engine = function(version){<|fim▁hole|> case '0.8.2': return require('./0.8.2').engine; default: return null; } };<|fim▁end|>
version = version || null; switch (version){ case null:
<|file_name|>trainobject.py<|end_file_name|><|fim▁begin|>from .stopper import EarlyStopper from .progbar import ProgressBar from .utils import split_arr from .data_iterator import SequentialIterator from tensorflow.python.framework import ops import tensorflow as tf import logging logging.basicConfig(format='%(module)s...
train_arr, valid_arr = split_arr(arr, train_valid_ratio, randomize=randomize_split) phs.append(ph) train_arrs.append(train_arr)
<|file_name|>CNodeContentManager.java<|end_file_name|><|fim▁begin|>package org.cohorte.studio.eclipse.ui.node.project; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.StringWriter; import java.util.HashMap; import java.util.Map; import javax.inject.Inject; import javax.json.Json; impor...
} if (wTransport instanceof IXmppTransport) { IXmppTransport wXmpp = (IXmppTransport) wTransport;
<|file_name|>sprite.py<|end_file_name|><|fim▁begin|>import pygame from ui.utils.interpolator import Interpolator class LcarsWidget(pygame.sprite.DirtySprite): """Base class for all widgets""" def __init__(self, color, pos, size, handler=None): pygame.sprite.DirtySprite.__init__(self) if self.i...
if (pixel > 50):
<|file_name|>errors.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2007 The Closure Linter 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 # #...
FILE_IN_BLOCK = 301
<|file_name|>login.js<|end_file_name|><|fim▁begin|>$(document).ready(function() { $('#login-form').on('submit', login()); function login(){ $.ajax({ url: "http://localhost:9999/main/login", type: "GET", data: { username:$("#username-field").val(), password:$("#password-field").val() ...
error: function(xhr) {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""The ReCollect Waste integration.""" from __future__ import annotations from datetime import date, timedelta from aiorecollect.client import Client, PickupEvent from aiorecollect.errors import RecollectError from homeassistant.config_entries import ConfigEntry<...
from homeassistant.const import Platform from homeassistant.core import HomeAssistant from homeassistant.helpers import aiohttp_client from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
<|file_name|>ExecuteDecisionWithAuditTrailCmd.java<|end_file_name|><|fim▁begin|>/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * ...
import org.flowable.engine.common.impl.interceptor.CommandContext; /**
<|file_name|>invoice_attachment_wizard.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################# # # Copyright (c) 2007 Martin Reisenhofer <martin.reisenhofer@funkring.net> # # This program is free software: you can redistribute it and/or...
import base64
<|file_name|>tools.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ''' Main entry to worch from a waf wscript file. Use the following in the options(), configure() and build() waf wscript methods: ctx.load('orch.tools', tooldir='.') ''' def options(opt): opt.add_option('--orch-config', action = 'store...
if not parent_node: if path.startswith('/'):
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! A simple library for parsing an XML file into an in-memory tree structure //! //! Not recommended for large XML files, as it will load the entire file into memory. //! //! ## Reading //! //! For reading XML you can use the `Element::from_reader` method which will //!...
/// ``` /// # use elementtree::QName; /// let a = QName::from("{http://www.w3.org/1999/xhtml}a"); /// ```
<|file_name|>GridFilters.js<|end_file_name|><|fim▁begin|>/** * Ext.ux.grid.GridFilters v0.2.7 **/ Ext.namespace("Ext.ux.grid"); Ext.ux.grid.GridFilters = function(config){ this.filters = new Ext.util.MixedCollection(); this.filters.getKey = function(o){return o ? o.dataIndex : null}; for(var i=0, len=config.f...
return state.filters = filters; },
<|file_name|>cp852.py<|end_file_name|><|fim▁begin|><<<<<<< HEAD <<<<<<< HEAD """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP852.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_enco...
0x2518: 0x00d9, # BOX DRAWINGS LIGHT UP AND LEFT 0x251c: 0x00c3, # BOX DRAWINGS LIGHT VERTICAL AND RIGHT 0x2524: 0x00b4, # BOX DRAWINGS LIGHT VERTICAL AND LEFT 0x252c: 0x00c2, # BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
<|file_name|>kde_po_importer.py<|end_file_name|><|fim▁begin|># Copyright 2009 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Import module for legacy KDE .po files. This is an extension of standard gettext PO files. You can read more about ...
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>from django.conf import settings <|fim▁hole|><|fim▁end|>
IMAGE_URL = getattr(settings, 'AWARDS_IMAGE_URL', 'icons/awards/{slug}.png')
<|file_name|>TabbedPane.js<|end_file_name|><|fim▁begin|>/** * a tabbed pane based on a definition list */ var openmdao = (typeof openmdao === "undefined" || !openmdao ) ? {} : openmdao ; openmdao.TabbedPane = function(id) { jQuery("#"+id+" dl").css({ 'margin': '0', 'width': '100%', 'posi...
'position': 'relative', 'float': 'left', 'display': 'block',
<|file_name|>windows.py<|end_file_name|><|fim▁begin|># Copyright 2012 Cloudbase Solutions Srl # # 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/licens...
fw_protocol = self._get_fw_protocol(protocol) fw_profile = fw_profile.GloballyOpenPorts.Remove(port, fw_protocol) def is_wow64(self):
<|file_name|>data-importer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys, json, psycopg2, argparse parser = argparse.ArgumentParser(description='Imports word data into the taboo database.') parser.add_argument('--verified', dest='verified', action='store_true', help='include if these words are verif...
conn.autocommit = True
<|file_name|>account.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from config.template_middleware import TemplateResponse from gaecookie.decorator import no_csrf from gaepermission.decorator import login_required from pytz import common_timezones impor...
_logged_user.timezone = timezone
<|file_name|>tracked_services.py<|end_file_name|><|fim▁begin|>""" Classes and functions to manage arkOS tracked services. arkOS Core (c) 2016 CitizenWeb Written by Jacob Cook Licensed under GPLv3, see LICENSE.md """ import glob import miniupnpc import random from arkos import config, logger, policies, signals, stora...
def open_upnp_site(site): """Convenience function to register a website with uPnP."""
<|file_name|>associated-types-no-suitable-supertrait.rs<|end_file_name|><|fim▁begin|>// Check that we get an error when you use `<Self as Get>::Value` in // the trait definition but `Self` does not, in fact, implement `Get`.<|fim▁hole|>// See also associated-types-no-suitable-supertrait-2.rs, which checks // that we se...
//
<|file_name|>issue-9446.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or<|fim▁hole|> struct Wrapper(St...
// 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 distributed // except according to those terms.
<|file_name|>portal.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # portal.py # # # # # # # # # # # # # Copyright 2016 Giorgio Ladu <giorgio.ladu >at< gmail.com> # # ...
<|file_name|>PyFunctionTypeAnnotationElementTypes.java<|end_file_name|><|fim▁begin|>/* * Copyright 2000-2016 JetBrains s.r.o. * * 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:/...
<|file_name|>ModelRepository.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright [2016] [Quirino Brizi (quirino.brizi@gmail.com)] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in com...
* @author quirino.brizi * */ public interface ModelRepository {
<|file_name|>supported-cast.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/...
info!(f as u32); info!(f as u64);
<|file_name|>Footer.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow * @format */ import React, {Component} from 'react'; import Link fro...
<a href="https://github.com/facebook/yoga">GitHub</a> <a href="https://twitter.com/yogalayout">Twitter</a>
<|file_name|>bounds.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/licenses...
let name = match mitem.node { MetaWord(ref tname) => {
<|file_name|>solver.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Additional helper functions for the optlang solvers. All functions integrate well with the context manager, meaning that all operations defined here are automatically reverted when used in a `with model:` block. The functions defined here...
solver : a cobra or optlang solver interface Returns a valid solver for the problem. May be a cobra solver or an optlang interface.
<|file_name|>task-repository.ts<|end_file_name|><|fim▁begin|>import { Task } from '../entities' import { NotFoundError } from '../errors' import { MySql } from '../lib/database' export class TaskRepository { private readonly TABLE: string = 'task' private db: MySql constructor(db: MySql) { this.db = db } ...
<|file_name|>negative_binomial.rs<|end_file_name|><|fim▁begin|>use crate::distribution::{self, poisson, Discrete, DiscreteCDF}; use crate::function::{beta, gamma}; use crate::statistics::*; use crate::{Result, StatsError}; use rand::Rng; use std::f64; /// Implements the /// [NegativeBinomial](http://en.wikipedia.org/w...
test_almost(1.0, 0.3, 0.3, 1e-08, cdf(0)); test_almost(1.0, 0.3, 0.51, 1e-08, cdf(1)); test_almost(1.0, 0.3, 0.83193, 1e-08, cdf(4)); test_almost(1.0, 0.3, 0.9802267326, 1e-08, cdf(10));
<|file_name|>debugModel.test.ts<|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. *--...
}); // Stopped event with only one thread stopped model.rawUpdate({
<|file_name|>run.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import sys,os sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../util') from settings import SettingManager def main(): conf = SettingManager() instance = Scraping4blog(conf) instance.run() if __name__ == "__main__": main()<|f...
# -*- coding: utf-8 -*- from Scraping4blog import Scraping4blog
<|file_name|>service_check.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to...
limitations under the License. """
<|file_name|>application.js<|end_file_name|><|fim▁begin|>(function(config, models, views, routers, utils, templates) { // This is the top-level piece of UI. views.Application = Backbone.View.extend({ // Events // ------ events: { 'click .toggle-view': 'toggleView' }, toggleView: function (e) { e....
var that = this;
<|file_name|>test_value2D.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import math import random import unittest from measurement_stats import angle from measurement_stats import val...
class TestValue2D(unittest.TestCase):
<|file_name|>online.py<|end_file_name|><|fim▁begin|>from typing import ( Dict, Optional, ) import numpy as np from pandas.compat._optional import import_optional_dependency from pandas.core.util.numba_ import ( NUMBA_FUNC_CACHE, get_jit_arguments, ) def generate_online_numba_ewma_func(engine_kwargs...
self.last_ewm = None
<|file_name|>bootstrap.js<|end_file_name|><|fim▁begin|>/*! * Bootstrap v3.3.6 (http://getbootstrap.com) * Copyright 2011-2015 Twitter, Inc. * Licensed under the MIT license */ if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') } + function($) { 'use strict'; ...
<|file_name|>DirectiveToken.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2008-2010 Andrey Somov * * 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/l...
}
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from .views import TriggerCRUDL<|fim▁hole|><|fim▁end|>
urlpatterns = TriggerCRUDL().as_urlpatterns()
<|file_name|>profile_solarcell.py<|end_file_name|><|fim▁begin|>''' Open Source Initiative OSI - The MIT License:Licensing Tue, 2006-10-31 04:56 nelson The MIT License Copyright (c) 2009 BK Precision Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documenta...
'''load is either a COM object or a DCLoad object. They have the
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#! flask/bin/python from os.path import abspath from flask import current_app from flask.ext.script import Manager from flask.ext.assets import ManageAssets from flask.ext.migrate import Migrate, MigrateCommand from bluespot import create_app from bluespot.extension...
manager.run()
<|file_name|>0014_auto_20170325_1723.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-25 11:53 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('consent', '0013_auto_20...
operations = [ migrations.AlterField(
<|file_name|>url_abuse_async.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # # Copyright (C) 2014 Sascha Rommelfangen, Raphael Vinot # Copyright (C) 2014 CIRCL Computer Incident Response Center Luxembourg (SMILE gie) # from datetime import date import json import redis try: from urllib.parse import quote...
ticket_id = ticket["id"] ticket_link = url + str(ticket_id)
<|file_name|>Factorial.java<|end_file_name|><|fim▁begin|>package ua.job4j.loop; /** * Class Класс для вычисления факториала заданного числа. * @author vfrundin * @since 05.11.2017 * @version 1.0 */ public class Factorial { /** * Метод должен вычислять факториал поданного на вход числа. * @param n Ч...
if (n != 0) {
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import include, url from django.views.decorators.cache import cache_page as cp<|fim▁hole|>from django.views.generic import TemplateView from rest_framework.routers import DefaultRouter from .views import ReviewViewSet, ReviewView router = Default...
<|file_name|>model.py<|end_file_name|><|fim▁begin|># Copyright 2021 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LIC...
eval_dataset = _input_fn(
<|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", "logger.settings") <|fim▁hole|> execute_from_command_line(sys.argv)<|fim▁end|>
from django.core.management import execute_from_command_line
<|file_name|>cli.py<|end_file_name|><|fim▁begin|>#coding=utf-8 """ Command-line interface utilities for Trigger tools. Intended for re-usable pieces of code like user prompts, that don't fit in other utils modules. """ __author__ = 'Jathan McCollum' __maintainer__ = 'Jathan McCollum' __email__ = 'jathan.mccollum@team...
<|file_name|>button.js<|end_file_name|><|fim▁begin|>// Generated by CoffeeScript 1.12.4 (function() { var BaseButtonTask, ButtonTask, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype...
return ButtonTask.__super__.constructor.apply(this, arguments); } ButtonTask.prototype.choiceTemplate = require('../templates/choice');
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render_to_response, get_object_or_404 from django.http import Http404 from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django.views.generic.dates import YearArchiveView, MonthArchiveView...
<|file_name|>Account.java<|end_file_name|><|fim▁begin|>/* * The MIT License (MIT) * * Copyright (c) 2016 by luxe - https://github.com/de-luxe - BURST-LUXE-RED2-G6JW-H4HG5 * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software * and associated documentation files (the "So...
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<|file_name|>d3d9types.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Corey Richardson // Licensed under the MIT License <LICENSE.md> //! Direct3D capabilities include file pub type D3DCOLOR = ::DWORD; #[repr(C)] #[derive(Clone, Copy, Debug)] pub struct D3DVECTOR { pub x: ::c_float, pub y: ::c_float, ...
CONST4 = 13, CONSTBOOL = 14,
<|file_name|>once.rs<|end_file_name|><|fim▁begin|>use consumer::*; use stream::*; /// A stream that emits an element exactly once. /// /// This `struct` is created by the [`once()`] function. See its documentation /// for more. /// /// [`once()`]: fn.once.html #[must_use = "stream adaptors are lazy and do nothing unle...
/// let vec = once(5).into_vec(); /// assert!(vec == [5], "vec == {:?}", vec);