prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import core
logger = core.log.getLogger("monitoring-utils")
class MonitoringUtils(object):
def __init__(self):
pass
@staticmethod
def check_existing_tag_in_topology(root, node, node_type, node_urns,
domain=... | return slice_name |
<|file_name|>float.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 Developers of the Rand project.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
// option. This... | f64x2::new(0.7346051961657583, 0.20298547462974248),
f64x2::new(0.8166436635290655, 0.7423708925400552),
f64x2::new(0.16387782224016323, 0.9087068770169618), |
<|file_name|>httpUtils.ts<|end_file_name|><|fim▁begin|>import * as Cookies from 'js-cookie'
import AppSettings from '../appSettings'
import { IFetchResult } from '../interfaces'
import History from './history'
export class HttpUtils {
parseJSON<T> (response: Response): Promise<IFetchResult<T>> {
return ne... | errors: {},
rulesExceptionListContainers: []
}
}) |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup
with open('requirements.txt') as f:
required = f.read().splitlines()<|fim▁hole|>
setup(
name="aloft.py",
version="0.0.4",
author="Nate Mara",
author_email="natemara@gmail.com",
description="A simple API for getting winds aloft data f... | |
<|file_name|>PropertyFactory.java<|end_file_name|><|fim▁begin|>package models.factories;
import models.squares.PropertySquare;
import java.util.Set;
/**
* @author Ani Kristo
*/<|fim▁hole|>}<|fim▁end|> | interface PropertyFactory {
Set<? extends PropertySquare> makeSquares(); |
<|file_name|>source_map.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/lice... | |
<|file_name|>Indices1.cpp<|end_file_name|><|fim▁begin|>#include <seqan/sequence.h>
#include <seqan/index.h>
using namespace seqan;
int main()
{
String<Dna5> genome = "TTATTAAGCGTATAGCCCTATAAATATAA";
Index<String<Dna5>, IndexEsa<> > esaIndex(genome); <|fim▁hole|> while(find(esaFinder, "TATAA")){
std::... | Finder<Index<String<Dna5>, IndexEsa<> > > esaFinder(esaIndex);
|
<|file_name|>baserlib.py<|end_file_name|><|fim▁begin|>#
#
# Copyright (C) 2006, 2007, 2008, 2012 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, o... | |
<|file_name|>RecursiveLexicon.py<|end_file_name|><|fim▁begin|>from SimpleLexicon import SimpleLexicon
from LOTlib.Evaluation.EvaluationException import RecursionDepthException
class RecursiveLexicon(SimpleLexicon):
"""
A lexicon where word meanings can call each other. Analogous to a RecursiveLOTHypothesis fro... | |
<|file_name|>test_serialization.py<|end_file_name|><|fim▁begin|>import os
import shutil
import tempfile
import numpy as np
import pytest
import torch
from spotlight.cross_validation import random_train_test_split
from spotlight.datasets import movielens
from spotlight.evaluation import mrr_score, sequence_mrr_score
f... | train, test = data |
<|file_name|>task-lists.rs<|end_file_name|><|fim▁begin|>// ignore-tidy-linelength<|fim▁hole|>// Unfortunately that requires LXML, because the built-in xml module doesn't support all of xpath.
// @has task_lists/index.html '//ul/li/input[@type="checkbox"]' ''
// @has task_lists/index.html '//ul/li/input[@disabled]' ''
... | // FIXME: this doesn't test as much as I'd like; ideally it would have these query too:
// has task_lists/index.html '//li/input[@type="checkbox" and disabled]/following-sibling::text()' 'a'
// has task_lists/index.html '//li/input[@type="checkbox"]/following-sibling::text()' 'b' |
<|file_name|>FlipDirection.java<|end_file_name|><|fim▁begin|>package ontology.effects.unary;
<|fim▁hole|>import core.game.Game;
import ontology.Types;
import ontology.effects.Effect;
import tools.Direction;
import tools.Utils;
import tools.Vector2d;
/**
* Created with IntelliJ IDEA.
* User: Diego
* Date: 03/12/13
... | import core.VGDLSprite;
import core.content.InteractionContent; |
<|file_name|>kill_ships.js<|end_file_name|><|fim▁begin|>import Objective from '../objective';
export default class KillShipsObjective extends Objective {
constructor (game, ships) {
super(game);
if (!Array.isArray(ships)) {
ships = [ships];
}
this.bots = _.fi... | |
<|file_name|>to_rawdata.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: ascii -*-
"""
package.module
~~~~~~~~~~~~~
A description which can be long and explain the complete<|fim▁hole|>:copyright: year by my name, see AUTHORS for more details
:license: license_name, see LICENSE for more details
"""
... | functionality of this module even with indented code examples.
Class/Function however should not be documented here.
|
<|file_name|>ForwardDocumentEventProtos.java<|end_file_name|><|fim▁begin|>// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ForwardDocumentEvent.proto
package Diadoc.Api.Proto;
public final class ForwardDocumentEventProtos {
private ForwardDocumentEventProtos() {}
public static void registerA... | * <code>optional .Diadoc.Api.Proto.Timestamp Timestamp = 1;</code> |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
app_name = 'sms'
urlpatterns = [
url(r'^$', views.index, name="index"),
]<|fim▁end|> | from django.conf.urls import url
from sms import views
|
<|file_name|>server_test.go<|end_file_name|><|fim▁begin|>package fasthttp
import (
"bufio"
"bytes"
"crypto/tls"
"fmt"
"io"
"io/ioutil"
"net"
"os"
"strings"
"sync"
"testing"
"time"
"github.com/valyala/fasthttp/fasthttputil"
)
func TestServerErrSmallBuffer(t *testing.T) {
logger := &customLogger{}
s := ... |
ch := make(chan struct{}) |
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest
from bolt.discord.permissions import Permission
class TestPermission(unittest.TestCase):
def test_permission_from_list_to_list(self):
expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS']
permission = Permission(['MANAG... |
def test_permissions_in_permission(self):
self.assertTrue(["ADMINISTRATOR", "SEND_MESSAGES"] in Permission(2056))
|
<|file_name|>rec-align-u64.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2015 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.... | target_os = "macos", |
<|file_name|>container.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# coding=utf-8
"""
The `META-INF/container.xml` file, storing:
1. the Rendition objects
2. the Rendition Mapping Document
"""
from yael.element import Element
from yael.jsonable import JSONAble
from yael.mediatype import MediaType
from yael... | # multiple renditions |
<|file_name|>peliculasyseries.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# -*- Channel PeliculasySeries -*-
# -*- Created for Alfa-addon -*-
# -*- By the Alfa Develop Group -*-
import re
import urllib
import base64
from channelselector import get_thumb
from core import httptools
from core impo... |
itemlist.append(Item(channel=item.channel, title= title, url=url, action='findvideos',
thumbnail=scrapedthumbnail, language=language, infoLabels=infoLabels))
|
<|file_name|>IOService.cpp<|end_file_name|><|fim▁begin|>//
// IOService.cpp
// Firedrake
//
// Created by Sidney Just
// Copyright (c) 2015 by Sidney Just
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to dea... |
void Service::Stop()
{} |
<|file_name|>usrp_transmit_path.py<|end_file_name|><|fim▁begin|>#
# Copyright 2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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 Foundati... | from gnuradio import eng_notation
def add_freq_option(parser):
""" |
<|file_name|>about.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from "@angular/core";
import { Title } from "@angular/platform-browser";
import AppConfig from "../core/app.config";<|fim▁hole|> // styleUrls: ["about.component.scss"],
templateUrl: "about.component.html",
})
export defau... | import LazyLoadService from "../core/lazy-load.service";
@Component({
selector: "ac-about", |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>// pages/list/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {<|fim▁hole|> * 生命周期函数--监听页面显示
*/
onShow: function () {
... |
},
/** |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
------
Urls
------
Arquivo de configuração das urls da aplicação blog
Autores:
* Alisson Barbosa Ferreira <alissonbf@hotmail.com>
Data:
============== ==================
Criação Atualização
============== =================... |
from django.conf.urls import patterns, url |
<|file_name|>TestParser.java<|end_file_name|><|fim▁begin|><|fim▁hole|>
import java.io.IOException;
import java.util.Iterator;
import com.drogon.core.Drogon;
/**
Contributors: Nachi
*/
public class TestParser {
public static void main(String[] args) {
String str = "Mozilla/5.0 (Linux; Android 4.4.2; SGH-T399N Buil... | package com.drogon.test; |
<|file_name|>MappingGenerator.java<|end_file_name|><|fim▁begin|>package alien4cloud.tosca.parser.mapping.generator;
import java.io.IOException;
import java.util.AbstractMap;
import java.util.Map;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.sp... | key = ParserUtils.getScalar(tuple.getValueNode(), context);
} else if (tupleKey.equals("value")) {
valueMappingTarget = getMappingTarget(tuple.getValueNode(), context);
} else { |
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from framework.tasks import app
from framework.tasks.handlers import enqueue_task
from website import settings
from . import piwik
@app.task(bind=True, max_retries=5, default_retry_delay=60)
def _update_node(self, node_id, updated_fields=No... | |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.conf.urls import url, include
from rest_framework.routers import DefaultRouter
from rest_framework.urlpatterns import format_suffix_patterns
from . import views
router = De... | ),
] |
<|file_name|>router.js<|end_file_name|><|fim▁begin|>app.router = Backbone.Router.extend({<|fim▁hole|> '!/event-list/': function () {
app.preRoute('event-list', this.el);
new app.eventListView({ el: this.el });
},
'!/event-detail/:key': function (key) {
app.preR... | el : $('main'),
routes: {
// '': 'home',
// '!/': 'home', |
<|file_name|>sparse_feature_stats_generator.py<|end_file_name|><|fim▁begin|># Copyright 2019 Google LLC
#
# 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... | missing_bucket.label = index_label
missing_bucket.sample_count = accumulator[ |
<|file_name|>zipper.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2.7 -tt
"""
Copyright (c) 2013, Adel Qodmani
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must r... | |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Viper documentation build configuration file, created by
# sphinx-quickstart on Mon May 5 18:24:15 2014.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values a... | # -- Options for Texinfo output ------------------------------------------------ |
<|file_name|>BlendingFactorSrc.d.ts<|end_file_name|><|fim▁begin|>/**
*
*/
export declare enum BlendingFactorSrc {
ZERO = 0,<|fim▁hole|> SRC_ALPHA_SATURATE = 776,
SRC_ALPHA = 770,
ONE_MINUS_SRC_ALPHA = 771,
DST_ALPHA = 772,
ONE_MINUS_DST_ALPHA = 773
}<|fim▁end|> | ONE = 1,
DST_COLOR = 774,
ONE_MINUS_DST_COLOR = 775, |
<|file_name|>dololi.py<|end_file_name|><|fim▁begin|>import lief
import sys
import os
import traceback
import configparser
import struct
from collections import OrderedDict
# Opcodes
X86_PUSH_BYTE = 0x6a
X86_32_PUSH_DWORD = 0x68
x86_32_CALL = [0xff, 0x15]
X86_64_CALL = [0xff, 0xd0]
X86_64_MOV_R9 =... | dll = pe_loader.add_library(dll_name)
dll.add_entry(export_name) |
<|file_name|>HttpBody.java<|end_file_name|><|fim▁begin|>package com.survivorserver.Dasfaust.WebMarket.mojang.http;
public class HttpBody {
<|fim▁hole|> private String bodyString;
public HttpBody(String bodyString) {
this.bodyString = bodyString;
}
public byte[] getBytes() {
return body... | |
<|file_name|>hello_runfiles.rs<|end_file_name|><|fim▁begin|>use std::fs::File;
use std::io::prelude::*;
use runfiles::Runfiles;
fn main() {<|fim▁hole|>
let mut buffer = String::new();
f.read_to_string(&mut buffer).unwrap();
println!("This program's source is {} characters long.", buffer.len());
}<|fim▁en... | let r = Runfiles::create().unwrap();
let mut f = File::open(r.rlocation("examples/hello_runfiles/hello_runfiles.rs")).unwrap(); |
<|file_name|>lexical-scope-in-for-loop.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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:/... | let x = 1000000i; // wan meeeljen doollaars!
for &x in range.iter() { |
<|file_name|>autocodeparameterrender.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-autocodeparameterrender',
templateUrl: './autocodeparameterrender.component.html',
styleUrls: ['./autocodeparameterrender.component.css', './_autoco... | |
<|file_name|>hosted_docker.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# -----------------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, fre... | try:
self.__start(host_server, container_create_result["Id"])
host_server.container_count += 1 |
<|file_name|>image-viewer.js<|end_file_name|><|fim▁begin|>window.ImageViewer = function(url, alt, title){
var img = $('<img />').attr('src', url).attr('alt', title).css({
display: 'inline-block',
'max-width': '90vw',
'max-height': '90vh'
});
var a = $('<a></a>').attr('target', ... | var close_it = function(){
overlay.remove();
container.remove();
|
<|file_name|>lista-schede-fake-json.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core';
import { Observable } from "rxjs/Observable";
import 'rxjs/add/observable/of';
import { Http } from "@angular/http";
import { SchedaContatto } from "../scheda-contatto/scheda-contatto.model";
@Injec... | "classificazioneNUE": "Apertura porta",
"attributiClassificazione":"Attributi di classificazione", |
<|file_name|>legality.cpp<|end_file_name|><|fim▁begin|>// QueenMaxima, a chess playing program.
// Copyright (C) 1996-2013 Erik van het Hof and Hermen Reitsma
//
// 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 ... | return ! attacked_by_PNBRQK (node, f8); |
<|file_name|>response.go<|end_file_name|><|fim▁begin|>package echo
import (
"bufio"
"net"
"net/http"
)
type (
// Response wraps an http.ResponseWriter and implements its interface to be used
// by an HTTP handler to construct an HTTP response.
// See: https://golang.org/pkg/net/http/#ResponseWriter
Response st... | // See [http.Flusher](https://golang.org/pkg/net/http/#Flusher) |
<|file_name|>ITC06010401_UpdateNetwork.py<|end_file_name|><|fim▁begin|>#encoding:utf-8
__authors__ = ['wei keke']
__version__ = "V0.1"
'''
# ChangeLog:
#---------------------------------------------------------------------------------
# Version Date Desc Author
#------... | nw_info = ''' |
<|file_name|>ListenAddress.hpp<|end_file_name|><|fim▁begin|><|fim▁hole|>// 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/.
#ifndef OPENTXS_PROTO_LISTENADDRESS_HPP
#defi... | // Copyright (c) 2020 The Open-Transactions developers |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>function validateUser(req){
return (req.session.hasOwnProperty('user')&&req.session.user.length!=0);
}
module.exports = {
index:function(req,res,next){
if(validateUser(req)){
next()
}else{<|fim▁hole|>};<|fim▁end|> | res.render('login',{params:req.params,session:req.session});
}
} |
<|file_name|>NPCHandler.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2010-2012 Project SkyFire <http://www.projectskyfire.org/>
* Copyright (C) 2010-2012 Oregon <http://www.oregoncore.com/>
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2012 MaNGOS <http://getmangos.... |
void WorldSession::SendTabardVendorActivate(uint64 guid)
{
WorldPacket data(MSG_TABARDVENDOR_ACTIVATE, 8); |
<|file_name|>types.go<|end_file_name|><|fim▁begin|>package api
import (
kapi "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned"
)
const (
ClusterNetworkDefault = "default"
EgressNetworkPolicyMaxRules = 50
)
// +genclient=true
type ClusterNetwork struct {
unversioned.TypeMeta
kapi.Object... | Network string |
<|file_name|>Barra.java<|end_file_name|><|fim▁begin|>package selector;
import java.awt.event.AdjustmentEvent;
import java.awt.event.AdjustmentListener;
import java.util.EventObject;
class Barra
implements AdjustmentListener
{
SelectorApplet applet;
public Barra(SelectorApplet applet)
{
this.... | |
<|file_name|>http_api_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""Tests for HTTP API."""
import json
from grr.gui import api_aff4_object_renderers
from grr.gui import api_call_renderers
from grr.gui import http_api
from grr.lib import flags
from grr.lib import registry
from grr.lib import test_li... | self.assertEqual(
json.loads(response.content),
{"method": "GET", |
<|file_name|>issues_test.rs<|end_file_name|><|fim▁begin|>extern crate goji;
extern crate serde_json;
<|fim▁hole|>#[test]
fn deserialise_issue_results() {
let issue_results_str = r#"{
"expand": "names,schema",
"startAt": 0,
"maxResults": 50,
"total": 0,
"issues": []
}"#;
... | use goji::issues::*;
|
<|file_name|>request.go<|end_file_name|><|fim▁begin|>package commands
import (
"errors"
"fmt"
"io"
"os"
"reflect"
"strconv"
"time"
"github.com/ipfs/go-ipfs/commands/files"
"github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/repo/config"
u "github.com/ipfs/go-ipfs/util"
context "gx/ipfs/QmZy2y8t9zQH2a1... |
for _, name := range opt.Names() {
if _, ok := r.options[name]; name != k && ok {
return fmt.Errorf("Duplicate command options were provided ('%s' and '%s')", |
<|file_name|>browser.d.ts<|end_file_name|><|fim▁begin|>/// <reference path="browser/ambient/angular-protractor/index.d.ts" />
/// <reference path="browser/ambient/angular/index.d.ts" />
/// <reference path="browser/ambient/assertion-error/index.d.ts" /><|fim▁hole|>/// <reference path="browser/ambient/chai/index.d.ts" /... | |
<|file_name|>improve.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 by Ecreall under licence AGPL terms
# available on http://www.gnu.org/licenses/agpl.html
# licence: AGPL
# author: Amen Souissi
import deform
import colander
from pyramid.view import view_config
from dace.objectofcollaboration.principal.util... | |
<|file_name|>sg-ski.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import sys
def parse_map_file(path):
map_grid = []
# Create a two-dimensional list based on the input data
with open(path, 'r') as f:
width, height = map(int, f.readline().split())
for line in f:
row = ma... | |
<|file_name|>HttpGet.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2008-2016 Computer Network Information Center (CNIC), Chinese Academy of Sciences.
*
* This file is part of Duckling project.<|fim▁hole|> * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in... | * |
<|file_name|>issue-2935.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/lice... | pub fn main() {
// let x = ({a: 4i} as it);
// let y = @({a: 4i}); |
<|file_name|>zmq.py<|end_file_name|><|fim▁begin|>"""
kombu.transport.zmq
===================
ZeroMQ transport.
"""
from __future__ import absolute_import, unicode_literals
import errno
import os
import socket
try:
import zmq
from zmq import ZMQError
except ImportError:
zmq = ZMQError = None # noqa
fro... | connection.__dict__['context'].term() |
<|file_name|>database.py<|end_file_name|><|fim▁begin|>import os
from sqlalchemy import create_engine, MetaData
from sqlalchemy.orm import scoped_session, sessionmaker
metadata = MetaData()
def get_sa_db_uri(driver='', username='', password='', host='', port='', database=''):
"""get SQLAlchemy DB URI: driver://u... | if not database.startswith('/'):
db_file = os.path.abspath(database)
else: |
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>// Copyright 2019 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/... | |
<|file_name|>attribute.py<|end_file_name|><|fim▁begin|># This module has moved to zope.annotation.attribute
# and will go away in Zope 3.5
import zope.deprecation<|fim▁hole|><|fim▁end|> | zope.deprecation.moved(
'zope.annotation.attribute',
"Zope 3.5",
) |
<|file_name|>TextAlignJustify.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | export { TextAlignJustify as default } from "./"; |
<|file_name|>size_hint.rs<|end_file_name|><|fim▁begin|>#![feature(core)]
extern crate core;
#[cfg(test)]
mod tests {
use core::option::Iter;
// #[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
// #[stable(feature = "rust1", since = "1.0.0")]
// pub enum Option<T> {
// /// No... | let (lower, upper): (usize, Option<usize>) = iter.size_hint();
assert_eq!(lower, 0); |
<|file_name|>materialize-css.js<|end_file_name|><|fim▁begin|>//
// https://github.com/Dogfalo/materialize/issues/634#issuecomment-113213629
// and
// https://github.com/noodny/materializecss-amd/blob/master/config.js
//<|fim▁hole|> 'global',
'initial',
'animation',
'buttons',
'cards',
'carousel',
'charact... | //
require([ |
<|file_name|>test.py<|end_file_name|><|fim▁begin|># Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above co... | |
<|file_name|>print_progressbar.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|>
def print_progress (iteration, total, prefix = '', suffix = '', decimals = 1, barLength = 100):
"""
Call in a loop to create terminal progress bar
@params:
iteration - Required : current iteration (... | import sys |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>"""
Flask-Validictory
-------------
Simple integration between Flask and Validictory.
"""
import os
from setuptools import setup
module_path = os.path.join(os.path.dirname(__file__), 'flask_validictory.py')
version_line = [line for line in open(module_path)
... | include_package_data=True,
platforms='any',
install_requires=[
'Flask>=0.10.1', 'validictory>=0.9.1' |
<|file_name|>PetrolStationGenerator.java<|end_file_name|><|fim▁begin|>package simulation.generators;
import simulation.data.PetrolStation;
import simulation.data.Road;
/**
* Created by user on 03.06.2017.
*/
public class PetrolStationGenerator {
private Road road;
private int minimalDistanceBetweenStations... |
public Road getRoad() { |
<|file_name|>fulljslint.js<|end_file_name|><|fim▁begin|>// jslint.js
// 2009-03-28
// TO DO: In ADsafe, make lib run only.
/*
Copyright (c) 2002 Douglas Crockford (www.JSLint.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "... | advance('in');
parse(20);
advance(')', t);
s = block(true); |
<|file_name|>tk.cpp<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2006-2013, Alexis Royer, http://alexis.royer.free.fr/CLI
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* R... | and/or other materials provided with the distribution.
* Neither the name of the CLI library project nor the names of its contributors may be used to endorse or promote products derived from this software
|
<|file_name|>machinekitapplicationcontrols_de.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="de_DE">
<context>
<name>AppPage</name>
<message>
<source>QML Error:</source>
<translation>QML Fehler:</translation>
</message>
<m... | </message>
<message> |
<|file_name|>account.go<|end_file_name|><|fim▁begin|>package routes
import (
"crypto/sha256"
"crypto/subtle"
"database/sql"
"encoding/hex"
"html"
"log"
"math"
"net/http"
"strconv"
"strings"
c "github.com/Azareal/Gosora/common"
p "github.com/Azareal/Gosora/common/phrases"
qgen "github.com/Azareal/Gosora/q... | accountEditHead("account", w, r, u, h) |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import config from "./webpack.config";
export default {
key: "uneven-slashes",
label: "Sitemap with uneven slashes in the base URL and paths",<|fim▁hole|> config
};<|fim▁end|> | |
<|file_name|>train.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
import time
import os.path
from collections import OrderedDict, namedtuple
import gevent
import flask
from digits import device_query
from digits.task import Task
from digits.utils import subclass,... | if self.gpu_count is not None:
identifiers = [] |
<|file_name|>AllTests.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright (c) 2012 Max Hohenegger.
* All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse
* Public License v1.0 whic... | import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
|
<|file_name|>Epos_AD.py<|end_file_name|><|fim▁begin|># cell definition
# name = 'Epos_AD'<|fim▁hole|>inp = 0
outp = 1
parameters = dict() #parametriseerbare cell
properties = {'Device ID': ' 0x01', 'Channel [0/1]': ' 0', 'name': 'epos_areadBlk'} #voor netlisten
#view variables:
iconSource = 'AD'
views = {'icon':icon... | # libname = 'can'
|
<|file_name|>optionSelect.js<|end_file_name|><|fim▁begin|>var instance = null;<|fim▁hole|> this.options = options;
instance.instanceData.set(this);
}
OptionSelect.prototype.open = function() {
$(this.containerId).show();
};
Template.optionSelect.onCreated(function() {
this.instanceData = new ReactiveVar({});
ins... |
OptionSelect = function OptionSelect(optionSelectFunction, id, options) {
this.optionSelect = optionSelectFunction;
this.containerId = id; |
<|file_name|>project.py<|end_file_name|><|fim▁begin|>import random
import string
from model.project import Project
def rand_string(prefix, maxlen):
chars = string.ascii_letters + string.digits + string.punctuation + " " * 10
return prefix + "".join([random.choice(chars) for i in range(random.randrange(maxlen)... | |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>try:
from setuptools import setup<|fim▁hole|> from distutils.core import setup
setup(
name='lkd',
version='2',
packages=['lkd', 'tests'],
author='Karan Goel',
author_email='karan@goel.im',
maintainer='Karan Goel',
maintainer_email='k... | except ImportError: |
<|file_name|>KDirWatch.py<|end_file_name|><|fim▁begin|># encoding: utf-8
# module PyKDE4.kio
# from /usr/lib/python2.7/dist-packages/PyKDE4/kio.so
# by generator 1.135
# no doc
# imports
import PyKDE4.kdeui as __PyKDE4_kdeui
import PyQt4.QtCore as __PyQt4_QtCore
import PyQt4.QtGui as __PyQt4_QtGui
class KDirWatch(__... | pass
def removeDir(self, *args, **kwargs): # real signature unknown |
<|file_name|>rcp_log_linter.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
import optparse
class RcpLogValidator(object):
MAX_ERRORS = 25
MAX_INTERVAL_STEP_MS = 3000
MIN_INTERVAL_STEP_MS = 1
def __init__(self):
self.interval = 0
self.columns = 0
def _count_commas(self, li... | parser.error("No log file path given")
|
<|file_name|>_color.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="surface.hoverlabel.font", **kwargs
):
super(ColorValidator, self).__init__(
... | edit_type=kwargs.pop("edit_type", "none"),
**kwargs |
<|file_name|>validate.go<|end_file_name|><|fim▁begin|>// Copyright 2013 Matthew Baird
// 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<|fim▁h... | // Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and |
<|file_name|>plot_evoked_topomap_delayed_ssp.py<|end_file_name|><|fim▁begin|>"""
===============================================
Create topographic ERF maps in delayed SSP mode
===============================================
This script shows how to apply SSP projectors delayed, that is,
at the evoked stage. This is p... | |
<|file_name|>orm.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# coding:utf-8
"""
Database operation module. This module is independent with web module.
"""
import time, logging
import db
class Field(object):
_count = 0
def __init__(self, **kw):
self.name = kw.get('name', None)
sel... | |
<|file_name|>param_route_path.ts<|end_file_name|><|fim▁begin|>import {RegExpWrapper, StringWrapper, isPresent, isBlank} from '../../../src/facade/lang';
import {BaseException} from '../../../src/facade/exceptions';
import {StringMapWrapper} from '../../../src/facade/collection';
import {TouchMap, normalizeString} from ... | |
<|file_name|>python_editor.py<|end_file_name|><|fim▁begin|>#------------------------------------------------------------------------------
# Copyright (c) 2007, Riverbank Computing Limited
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD license.
# However, when used with... | control.code.modificationChanged.connect(self._on_dirty_changed)
control.code.textChanged.connect(self._on_text_changed)
# Load the editor's contents. |
<|file_name|>error.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 std::error;
use std::fmt;
use svgdom;
/// List of all errors... | InvalidSize,
/// Failed to parse an SVG data. |
<|file_name|>InstructorFicha.java<|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.
*/
package co.edu.sena.mavenproject2.model.entities;
import java.io.Serial... | |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup
setup(
name='geovalidation.server',
version='0.5',
long_description="Flask-based server to validate GIS datasets (with prepair and val3dity).",
packages=['geovalidation'],
include_package_data=True,
zip_safe=False,
... | ,'redis>=2.9.1'
,'lxml>=3.3.3' |
<|file_name|>cacconsole.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# CACConsole Copyright (C) 2015 foospidy
# https://github.com/foospidy/CACConsole
# See LICENSE for details
# This software includes/uses the python-cloudatcost library which
# is MIT licensed, see https://github.com/adc4392/python-cloudatcost/bl... | |
<|file_name|>localUserActions.js<|end_file_name|><|fim▁begin|>import { emit } from "../../api";
import { setActiveRoom } from "../room/roomSlice.js";
export function presentChanged(present) {
return { type: "localUser/present", present };
}
export const ping = () => () => emit("/user/current/ping");
export const ch... | return emit("/user/current/present", { present }).then(() => dispatch(presentChanged(present))); |
<|file_name|>pprint.py<|end_file_name|><|fim▁begin|># Author: Fred L. Drake, Jr.
# fdrake@acm.org
#
# This is a simple little module I wrote to make life easier. I didn't
# see anything quite like it in the library, though I may have overlooked
# something. I wrote this when I was trying to rea... | |
<|file_name|>class_mock.js<|end_file_name|><|fim▁begin|>var class_mock =
[
[ "Mock", "class_mock.html#a2b9528f2e7fcf9738201a5ea667c1998", null ],
[ "Mock", "class_mock.html#a2b9528f2e7fcf9738201a5ea667c1998", null ],
[ "MOCK_METHOD0", "class_mock.html#ae710f23cafb1a2f17772e8805d6312d2", null ],
[ "MOCK_... | [ "MOCK_METHOD1", "class_mock.html#a2db4d82b6f92b4e462929f651ac4c3b1", null ],
[ "MOCK_METHOD1", "class_mock.html#ae73b4ee90bf6d84205d2b1c17f0b8433", null ], |
<|file_name|>test_heat_control.py<|end_file_name|><|fim▁begin|>"""The tests for the heat control thermostat."""
import unittest
from homeassistant.bootstrap import _setup_component
from homeassistant.const import (
ATTR_UNIT_OF_MEASUREMENT,
SERVICE_TURN_OFF,
SERVICE_TURN_ON,
STATE_ON,
STATE_OFF,
... | 'target_sensor': ENT_SENSOR |
<|file_name|>search.js<|end_file_name|><|fim▁begin|>(function () {
function getQueryVariable(variable) {
var query = window.location.search.substring(1),
vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] === variable) {
return pair[1];
}
... | });
|
<|file_name|>power.cpp<|end_file_name|><|fim▁begin|>//
// begin license header
//
// This file is part of Pixy CMUcam5 or "Pixy" for short
//
// All Pixy source code is provided under the terms of the
// GNU General Public License v2 (http://www.gnu.org/licenses/gpl-2.0.html).
// Those wishing to use Pixy source code, ... | #include "pixy_init.h" |
<|file_name|>compat.cpp<|end_file_name|><|fim▁begin|>#include "Sub.h"
<|fim▁hole|>{
hal.scheduler->delay(ms);
}<|fim▁end|> | void Sub::delay(uint32_t ms) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.