prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>syncResult.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core';
import { SyncResult } from 'app/model/syncResult'
import { Log } from 'app/model/log'
import { LogItem } from 'app/model/logItem'
@Injectable()
export class SyncResultService
{
syncResultService : any;
... | getResults() : SyncResult[]
{ |
<|file_name|>relative.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>Foo</name>
<message>
<location filename="foo.cpp" line="+13"/>
<source>This is the first entry.</source>
<translation></translation><|fim▁hole|> ... | </message>
<message> |
<|file_name|>recursiveWrappedTypeParameters1.ts<|end_file_name|><|fim▁begin|>/// <reference path='fourslash.ts'/>
////interface I<T> {
//// a: T;
//// b: I<T>;
//// c: I<I<T>>;
////}
////var x: I<number>;
<|fim▁hole|>////var b/*3*/b = x.b;
////var c/*4*/c = x.c;
////var d/*5*/d = x.c.a;
////var e/*6*/e = x.c... | ////var y/*1*/y = x.c.c.c.c.c.b;
////var a/*2*/a = x.a;
|
<|file_name|>timeit.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = "Ricardo Ribeiro"
__credits__ = ["Ricardo Ribeiro"]
__license__ = "MIT"
__version__ = "0.0"
__maintainer__ = "Ricardo Ribeiro"
__email__ = "ricardojvr@gmail.com"<|fim▁hole|>import time
fro... | __status__ = "Development"
|
<|file_name|>console.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Handles the "Console" unit format.
"""
from . import base, core, utils
class Console(base.Base):
"""
Output-only format for to display pretty formatting at the<|f... | |
<|file_name|>robots_txt.rs<|end_file_name|><|fim▁begin|>use crate::model::Path;
use crate::model::RequestRate;
use crate::model::RobotsTxt;
use crate::service::RobotsTxtService;
use std::time::Duration;
use url::Url;
impl RobotsTxtService for RobotsTxt {
fn can_fetch(&self, user_agent: &str, url: &Url) -> bool {
... | |
<|file_name|>monster.cpp<|end_file_name|><|fim▁begin|>#include <math.h>
#include "monster.h"
#include "../../engine/graphics/graphics.h"
#include "../../engine/input/input.h"
#include "../../engine/engine.h"
#include "../../engine/common/log.h"
CMonster::CMonster()
{
mTexture = NULL;
//LoadTexture();
}
... | int CMonster::AttackStrength()
{
return 1;
|
<|file_name|>EnergyBar.java<|end_file_name|><|fim▁begin|>package TankWarGame;
<|fim▁hole|>import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;
public class EnergyBar extends GameObject {
int energy;
int defaultEnergy = 5000/30;
public int getEnergy() {
return energy;
}
public void... | |
<|file_name|>security_api.py<|end_file_name|><|fim▁begin|># coding: utf-8
#
# Copyright 2010-2014 Ning, Inc.
# Copyright 2014-2020 Groupon, Inc
# Copyright 2020-2021 Equinix, Inc
# Copyright 2014-2021 The Billing Project, LLC
#
# The Billing Project, LLC licenses this file to you under the Apache License, version 2.0
... | query_params, |
<|file_name|>volume_metrics.go<|end_file_name|><|fim▁begin|>/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
... | Expect(err).NotTo(HaveOccurred(), "Error getting c-m metricValues: %v", err)
for i, metric := range metrics {
expectValues := metricValues[i] |
<|file_name|>GameBoard.java<|end_file_name|><|fim▁begin|>package tpe.exceptions.trycatchfinally;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Point;
import de.smits_net.games.framework.board.Board;
/**
* Spielfeld.
*/
public class GameBoard extends Board {
/** Sp... | /**
* Spielfeld neu zeichnen. Wird vom Framework aufgerufen.
*/
@Override |
<|file_name|>ms.js<|end_file_name|><|fim▁begin|>/* flatpickr v4.4.2, @license MIT */<|fim▁hole|> typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.ms = {})));
}(this, (function (exports) { 'use strict';
var fp = typeof window !== "undefined" && window.flatpickr !==... | (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : |
<|file_name|>offsetter.py<|end_file_name|><|fim▁begin|>'''
offsets = [[[originalx,originaly], [511,709],[498,707]],\
[[522,711], [508,709],[493,706]],\
[[522,714], [503,708],[488,705]]]
'''
def offsetter(length,dim,dx,dy,sx,sy,fx,fy):
x = x0 = sx
y =... | for i in range(dim): |
<|file_name|>CRBMTestExperiment.cpp<|end_file_name|><|fim▁begin|>#include "models/crbm/crbm.h"
#include "models/crbm/layers/conv.h"
#include "generator/onehut/onehut.h"
#include "generator/psr/psr.h"
#include "utils/putils.h"
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv) {
OneHut *oh = ne... |
} |
<|file_name|>pig-hint.js<|end_file_name|><|fim▁begin|>(function () {
var pigKeywordsU = pigKeywordsL = pigTypesU = pigTypesL = pigBuiltinsU = pigBuiltinsL = [];
var mimeMode = CodeMirror.mimeModes['text/x-pig'];
Object.keys(mimeMode.keywords).forEach( function(w) {
pigKeywordsU.push(w.toUpperCase());
p... | function arrayContains(arr, item) { |
<|file_name|>test_utils.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals
import pickle
from io import StringIO, BytesIO
from kombu import version_info_t
from kombu import utils
from kombu.five import python_2_unicode_compatible
from kombu.utils.text import version_string_as_tu... | from kombu.entity import Exchange
self.assertIs(
utils.symbol_by_name('.entity:Exchange', package='kombu'),
Exchange, |
<|file_name|>private-in-public-lint.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.apa... | |
<|file_name|>duplicateLocalVariable2.ts<|end_file_name|><|fim▁begin|>export class TestCase {
constructor (public name: string, public test: ()=>boolean, public errorMessageRegEx?: string) {
}
}
export class TestRunner {
static arrayCompare(arg1: any[], arg2: any[]): boolean {
return false;
... | var expected = [0xEF];
|
<|file_name|>encoding.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals
<|fim▁hole|>def locale_decode(bytestr):
try:
return unicode(bytestr)
except UnicodeError:
return str(bytestr).decode(locale.getpreferredencoding())<|fim▁end|> | import locale
|
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity 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... | pub fn serve_with_registrar() -> (Server, Arc<FakeRegistrar>) {
init_server(|builder| builder, Default::default(), Remote::new_sync())
}
|
<|file_name|>worldmap.cpp<|end_file_name|><|fim▁begin|>// SuperTux - A Jump'n Run
// Copyright (C) 2004 Ingo Ruhnke <grumbel@gmail.com>
// Copyright (C) 2006 Christoph Sommer <christoph.sommer@2006.expires.deltadevelopment.de>
//
// This program is free software: you can redistribute it and/or modify
// it under ... | }
void
WorldMap::change(const std::string& filename, const std::string& force_spawnpoint_) |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//! This module provides rust bindings for the XPCOM string types... | |
<|file_name|>HardwareInfo.py<|end_file_name|><|fim▁begin|>from boxbranding import getBoxType, getBrandOEM
from Components.About import about
class HardwareInfo:
device_name = None
device_version = None
def __init__(self):
if HardwareInfo.device_name is not None:
# print "using cached result"
return
Hardw... | HardwareInfo.device_name = file.readline().strip()
file.close()
try: |
<|file_name|>word2vec.rs<|end_file_name|><|fim▁begin|>extern crate vect;
extern crate argparse;
use vect::termcounts;
use vect::ingestion;
use vect::dictionary::Dictionary;
use argparse::{ArgumentParser, Store};
use vect::huffman;
use vect::base::split_words;
use std::io;
// This is labeled public to shut up the linte... | let words = split_words(&line);
for i in 0..words.len()-1 { |
<|file_name|>stream_crypto.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from Crypto import Random
from M2Crypto import EVP
from io_helper import stream
from padding import pad_pkcs5, unpad_pkcs5
from chunk_buffer import ChunkBuffer
ALGORITHM = 'aes_256_cbc'
# AES has a fixed block size of 16 bytes regardl... | buf = ChunkBuffer(
min_size=BLOCK_SIZE, |
<|file_name|>article.model.ts<|end_file_name|><|fim▁begin|>export interface IArticle {
articleId: number,
name: string,<|fim▁hole|> stock: number
}<|fim▁end|> | description: string,
prix: number, |
<|file_name|>domquad.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 dom::bindings::codegen::Bindings::DOMPointBinding::{DOMPo... |
// https://drafts.fxtf.org/geometry/#dom-domquad-fromquad
pub fn FromQuad(global: &GlobalScope, other: &DOMQuadInit) -> DomRoot<DOMQuad> {
DOMQuad::new(global, |
<|file_name|>Vector.js<|end_file_name|><|fim▁begin|>// Generated by CoffeeScript 1.4.0
/* 2D Vector
*/
var Vector;
Vector = (function() {
/* Adds two vectors and returns the product.
*/
Vector.add = function(v1, v2) {
return new Vector(v1.x + v2.x, v1.y + v2.y);
};
/* Subtracts v2 from v1 and returns ... | Vector.prototype.add = function(v) {
this.x += v.x;
this.y += v.y; |
<|file_name|>_metrics_advisor.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.
# Code gene... | stream = kwargs.pop("stream", True)
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) |
<|file_name|>cache_prefetcher.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Copyright 2011-2012 OpenStack Foundation
# 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 o... | app.run()
except RuntimeError as e:
sys.exit("ERROR: %s" % e)
|
<|file_name|>core.go<|end_file_name|><|fim▁begin|>package corerouting
import (
"errors"
context "context"
core "github.com/ipfs/go-ipfs/core"
repo "github.com/ipfs/go-ipfs/repo"
supernode "github.com/ipfs/go-ipfs/routing/supernode"
gcproxy "github.com/ipfs/go-ipfs/routing/supernode/proxy"
"gx/ipfs/QmPTGbC34bPK... | |
<|file_name|>recreate_tables.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Tool to recreate all tables/procedures in the database.
"""
import argparse
import copy
import re
from os import path
from src.sqllist import re_sub
try:
import monetdb.sql as db
try:
import ... | """
if self.monet:
self.conn.execute("copy into frequencybands from '%s';" % |
<|file_name|>OAuth20EndpointServices.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright (c) 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclip... | if (result.getStatus() != OAuthResult.STATUS_OK) {
OAuth20TokenRequestExceptionHandler handler = new OAuth20TokenRequestExceptionHandler(); |
<|file_name|>test_support.py<|end_file_name|><|fim▁begin|># BEGIN_COPYRIGHT
#
# Copyright 2009-2015 CRS4.
#
# 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/LI... | |
<|file_name|>auth.rs<|end_file_name|><|fim▁begin|>/* Copyright 2021 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/L... | |
<|file_name|>logging.rs<|end_file_name|><|fim▁begin|>//! Module implementing logging for the application.
//!
//! This includes setting up log filtering given a verbosity value,
//! as well as defining how the logs are being formatted to stderr.
use std::borrow::Cow;
use std::collections::HashMap;
use std::env;
use st... | if excessive {
warn!("-v/-q flag passed too many times, logging level {:?} assumed", level);
} |
<|file_name|>RSA.js<|end_file_name|><|fim▁begin|>// Depends on jsbn.js and rng.js
// Version 1.1: support utf-8 encoding in pkcs1pad2
// convert a (hex) string to a bignum object
function parseBigInt(str,r) {
return new BigInteger(str,r);
}
function linebrk(s,n) {
var ret = "";
var i = 0;
while(i + n < s.len... | ba[--n] = (c & 63) | 128; |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render
from django.views.generic import ListView
from ..cms.models import Page
from ..utils import JsonView
from .models import Original, Print
class ShopOriginalsView(ListView):
context_object_name = 'shop_items'
queryset = Orig... | context = super(ShopOriginalsView, self).get_context_data(**kwargs) |
<|file_name|>tower_host.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.com>
#
# This module 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... | import tower_cli.utils.exceptions as exc |
<|file_name|>integrals.py<|end_file_name|><|fim▁begin|>from sympy.core import (Basic, Expr, S, C, Symbol, Wild, Add, sympify, diff,
oo, Tuple, Dummy, Equality, Interval)
from sympy.core.symbol import Dummy
from sympy.core.compatibility import ordered_iter
from sympy.integrals.trigonometry impor... | if V[0].is_Symbol:
newsymbol = V[0]
if len(V) == 2 and isinstance(V[1], Interval):
V[1:] = [V[1].start, V[1].end] |
<|file_name|>SysMLImporter.spec.js<|end_file_name|><|fim▁begin|>/*jshint node:true, mocha:true*/
/**
* Generated by PluginGenerator 0.14.0 from webgme on Wed Feb 24 2016 10:25:35 GMT-0600 (Central Standard Time).
*/
'use strict';
var testFixture = require('../../globals');
describe('SysMLImporter', function () {
... |
after(function (done) {
storage.closeDatabase()
.then(function () { |
<|file_name|>cron_servlet.py<|end_file_name|><|fim▁begin|># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import posixpath
import traceback
from app_yaml_helper import AppYamlHelper
from ap... | |
<|file_name|>PasswordValidator.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | //>>built
define({nomatchMessage:"Die Kennw\u00f6rter stimmen nicht \u00fcberein.",badPasswordMessage:"Ung\u00fcltiges Kennwort."}); |
<|file_name|>02.wc.py<|end_file_name|><|fim▁begin|><|fim▁hole|>wc = f.flatMap(lambda x: x.split(' ')).map(lambda x: (x, 1)).reduceByKey(add)
wc.saveAsTextFile("wc_out")<|fim▁end|> | from operator import add
f = sc.textFile("data/README.md") |
<|file_name|>read_selection_in_pt_PT.js<|end_file_name|><|fim▁begin|>(function(synth, lang, langIndex) {
var voice = synth.getVoices().filter(voice => voice.lang === lang)[langIndex],
text = window.getSelection().toString();
function speak(text, voice) {
var utterance = new SpeechSynthesisUtte... | utterance.voice = voice;
utterance.lang = lang; |
<|file_name|>HTMLUtil.py<|end_file_name|><|fim▁begin|>import html5lib
import traceback
def build_html_dom_from_str(html_str):
return html5lib.parse(html_str, 'dom')
def find_html_element_list_for_tag(element, tag, class_style = None):
elements = element.getElementsByTagName(tag)
if not class_style: return... | |
<|file_name|>test_debugger.py<|end_file_name|><|fim▁begin|>import pytest
import textwrap
import ctypes
import os
import windows
import windows.debug
import windows.generated_def as gdef
import windows.native_exec.simple_x86 as x86
import windows.native_exec.simple_x64 as x64
from .conftest import generate_pop_and_exi... | yolo = generate_pop_and_exit_fixtures([pop_proc_32, pop_proc_64], ids=["proc32dbg", "proc64dbg"], dwCreationFlags=gdef.CREATE_SUSPENDED)
DEFAULT_DEBUGGER_TIMEOUT = 10
|
<|file_name|>nrs.server.js<|end_file_name|><|fim▁begin|>/**
* @depends {nrs.js}
*/
var NRS = (function(NRS, $, undefined) {
var _password;
NRS.multiQueue = null;
NRS.setServerPassword = function(password) {
_password = password;
}
NRS.sendOutsideRequest = function(url, data, callback, async) {
if ($.isFun... | |
<|file_name|>cursor.rs<|end_file_name|><|fim▁begin|>//! This module defines a cheaply-copyable cursor into a TokenStream's data.
//!
//! It does this by copying the data into a stably-addressed structured buffer,
//! and holding raw pointers into that buffer to allow walking through delimited
//! sequences cheaply.
//!... | |
<|file_name|>132_palindrome_partitioning_ii.py<|end_file_name|><|fim▁begin|># 132. Palindrome Partitioning II QuestionEditorial Solution My Submissions
# Total Accepted: 58982<|fim▁hole|># Return the minimum cuts needed for a palindrome partitioning of s.
#
# For example, given s = "aab",
# Return 1 since the palind... | # Total Submissions: 256833
# Difficulty: Hard
# Given a string s, partition s such that every substring of the partition is a palindrome.
# |
<|file_name|>test_legacy_v2_compatible_wrapper.py<|end_file_name|><|fim▁begin|># Copyright 2015 Intel Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may<|fim▁hole|># a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | # not use this file except in compliance with the License. You may obtain |
<|file_name|>16.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | export { InformationSquare16 as default } from "../../"; |
<|file_name|>app-routing.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { BlogComponent } from './blog.component';
import { HeroComponent } from './hero.component';
import { AboutComponent } from './about.component';
impor... | import { ContactUsComponent } from './contact-us.component';
import { BlogPostFullComponent } from './blog-post-full.component';
const appRoutes: Routes = [ |
<|file_name|>data_source_aws_ssm_document_test.go<|end_file_name|><|fim▁begin|>package aws
import (
"fmt"
"testing"
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccAWSSsmDocumentDataSource_basic(t *testing.T) {
resourceName := "data.aws_ssm_document... | } |
<|file_name|>test-pcopy.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
import libploop
import shutil
import io<|fim▁hole|>import socket
import time
import subprocess as sp
import unittest
import hashlib
sleep_sec = 3
def hashfile(afile, hasher, blocksize=65536):
buf = afile.read(blocksize)
while len(buf) > 0:
... | import os |
<|file_name|>issue-2111.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// 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, ... | // 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. |
<|file_name|>group.go<|end_file_name|><|fim▁begin|>package main
import (
"reflect"
"strconv"
"unsafe"
"github.com/STNS/STNS/stns"
"github.com/STNS/libnss_stns/libstns"
)
/*
#include <grp.h>
#include <sys/types.h>
*/
import "C"
type Group struct {
grp *C.struct_group
result **C.struct_group
}
func (s Grou... | |
<|file_name|>datatables.net-fixedcolumns-tests.ts<|end_file_name|><|fim▁begin|>$(document).ready(() => {
const config: DataTables.Settings = {
// FixedColumns extension options
fixedColumns: {
heightMatch: 'semiauto',
leftColumns: 2,<|fim▁hole|> }
};
});<|fim▁end|> | rightColumns: 1 |
<|file_name|>Params.java<|end_file_name|><|fim▁begin|>package br.eti.mertz.wkhtmltopdf.wrapper.params;
import java.util.ArrayList;
import java.util.List;<|fim▁hole|>
public Params() {
this.params = new ArrayList<Param>();
}
public void add(Param param) {
params.add(param);
}
publi... |
public class Params {
private List<Param> params; |
<|file_name|>util.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 layout::box::Box;
use layout::construct::{ConstructionResult... | }
impl<'self> LayoutDataAccess for LayoutNode<'self> { |
<|file_name|>general.py<|end_file_name|><|fim▁begin|>import discord
from discord.ext import commands
from .utils.chat_formatting import escape_mass_mentions, italics, pagify
from random import randint
from random import choice
from enum import Enum
from urllib.parse import quote_plus
import datetime
import time... | async with aiohttp.get(url) as r:
result = await r.json()
|
<|file_name|>loading.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
import os
import os.path
import cgi, cgitb
import re
#own packages
import dbcPattern
<|fim▁hole|>
def createHTML():
file=open("Header_Saved.html")
html_string = file.read()
file.close()
html_string += "<body>"
filename=os.path.join("/home/p... | def dbc_main(): # NEW except for the call to processInput
contents = createHTML() # process input into a page
print(contents)
return -1 |
<|file_name|>guiutil.cpp<|end_file_name|><|fim▁begin|>#include "guiutil.h"
#include "bitcoinaddressvalidator.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "util.h"
#include "init.h"
#include "base58.h"
#include <QString>
#include <QDateTime>
#include <QDoubleValidator>
#include <QFont>
#include <QLine... | QString HtmlEscape(const QString& str, bool fMultiLine) |
<|file_name|>poi_symbol_shape.cpp<|end_file_name|><|fim▁begin|>#include "drape_frontend/poi_symbol_shape.hpp"
#include "drape_frontend/color_constants.hpp"
#include "drape_frontend/shader_def.hpp"
#include "drape/attribute_provider.hpp"
#include "drape/batcher.hpp"
#include "drape/texture_manager.hpp"
#include "drape/... | |
<|file_name|>u256.rs<|end_file_name|><|fim▁begin|>// Copyright Ethereum Classic Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICEN... | write!(f, "{:08x}", self.0[i])?;
}
Ok(()) |
<|file_name|>build_fsm.py<|end_file_name|><|fim▁begin|>from enum import Enum
import time
from fysom import Fysom, FysomError
# WIP(joey): Fysom is not thread safe -- multiple threads could theoretically traverse
# WIP(joey): the same state transition simultaneously.
from app.util import log
class BuildState(str, En... | {'name': BuildEvent.START_PREPARE,
'src': BuildState.CANCELED,
'dst': '='}, # '=' means the destination state is the same as the source state (no-op).
|
<|file_name|>breweriesController.js<|end_file_name|><|fim▁begin|>Hilary.scope('node-example').register({
name: 'breweriesController',
dependencies: ['newGidgetModule', 'GidgetRoute', 'viewEngine'],
factory: function (self, GidgetRoute, viewEngine) {
'use strict';
self.get['/breweries/:brewe... | });
next(err, req);
}, |
<|file_name|>plugin_asset_util.py<|end_file_name|><|fim▁begin|># Copyright 2017 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<|fim▁hole|># Unles... | #
# http://www.apache.org/licenses/LICENSE-2.0
# |
<|file_name|>injection.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, division, absolute_import
# Copyright (c) 2013 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, includ... | def factory(*args, **kwargs): |
<|file_name|>_walker.py<|end_file_name|><|fim▁begin|>from typing import Iterable, Callable, Optional, Any, List, Iterator
from dupescan.fs._fileentry import FileEntry
from dupescan.fs._root import Root
from dupescan.types import AnyPath
<|fim▁hole|>FSPredicate = Callable[[FileEntry], bool]
ErrorHandler = Callable[[Env... | |
<|file_name|>test_monitor_checkins.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, print_function
from datetime import timedelta
from django.utils import timezone
from freezegun import freeze_time
from sentry.models import CheckInStatus, Monitor, MonitorCheckIn, MonitorStatus, MonitorType
from... | project_id=project.id, |
<|file_name|>aux2bib.rs<|end_file_name|><|fim▁begin|>#[macro_use(crate_version, crate_authors)]
extern crate clap;
use inspirer;
use inspirer::InspirerError;
use std::error::Error;
use human_panic::setup_panic;
#[macro_use]
extern crate slog;
use slog::DrainExt;
use slog_term;
use clap::{App, Arg};
fn main() {
... | info!(root_logger, "Application started");
|
<|file_name|>test_dupefilters.py<|end_file_name|><|fim▁begin|>import hashlib
import tempfile
import unittest
import shutil
import os
import sys
from testfixtures import LogCapture
from scrapy.dupefilters import RFPDupeFilter
from scrapy.http import Request<|fim▁hole|>from scrapy.utils.test import get_crawler
from test... | from scrapy.core.scheduler import Scheduler
from scrapy.utils.python import to_bytes
from scrapy.utils.job import job_dir |
<|file_name|>test_handler_locale.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
#
# Author: Juerg Haefliger <juerg.haefliger@hp.com>
#
# Based on test_handler_set_hostname.py
#
# This program is free software: you can redistribute it and/or modify
# it unde... | self.addCleanup(shutil.rmtree, self.new_root) |
<|file_name|>speaker_tracking.py<|end_file_name|><|fim▁begin|># MIT License
#
# Copyright (c) 2020-2021 CNRS
#
# 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|>notes.py<|end_file_name|><|fim▁begin|>import re
from io import BytesIO
from typing import Optional, List
from telegram import MAX_MESSAGE_LENGTH, ParseMode, InlineKeyboardMarkup
from telegram import Message, Update, Bot
from telegram.error import BadRequest
from telegram.ext import CommandHandler, RegexHa... | raise
else:
try: |
<|file_name|>test_bgp_multi_vrf_topo1.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# Copyright (c) 2020 by VMware, Inc. ("VMware")
# Used Copyright (c) 2018 by Network Device Education Foundation,
# Inc. ("NetDEF") in this file.
#
# Permission to use, copy, modify, and/or distribute this software
# for any ... | |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# try:
# from setuptools import setup
# except ImportError:
# from distutils.core import setup
#from setuptools import setup
#from setuptools import Extension
from numpy.distutils.core import setup
from numpy.... | 'PyYAML', |
<|file_name|>widgets.py<|end_file_name|><|fim▁begin|>from django.core.files.uploadedfile import InMemoryUploadedFile
import re
import six
from django import forms
from django.forms.util import flatatt
from django.forms.widgets import FileInput
from django.template import Context
from django.template.loader import rend... | |
<|file_name|>0008_auto_20170224_1912.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-24 18:12
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
<|fim▁hole|> dependencies = [
('accounting',... | |
<|file_name|>foundation.min.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1<|fim▁hole|><|fim▁end|> | oid sha256:a285e8981a5115bbdd913280943a1d1a0d498b079ace167d6e90a0cc9e2cdfba
size 93324 |
<|file_name|>phpdocsconfig.cpp<|end_file_name|><|fim▁begin|>/* This file is part of the KDevelop PHP Documentation Plugin
Copyright 2012 Milian Wolff <mail@milianw.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
publishe... | PhpDocsConfig::PhpDocsConfig(QWidget *parent, const QVariantList &args) |
<|file_name|>button.cpp<|end_file_name|><|fim▁begin|>#include "button.h"
#include "util.h"
<|fim▁hole|>
void ZCGtkButton::onClick(GtkButton*, ZCGtkButton* btn)
{
btn->onClickFunc();
}
ZCGtkButton::ZCGtkButton(const std::string& text, boost::function<void(void)> c):
onClickFunc(c)
{
std::string mod=convertM... | namespace GUI
{ |
<|file_name|>bitcoin_lv_LV.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="lv_LV" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Faucetcoin</so... | |
<|file_name|>dnd.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#===============================================================================
#
# Copyright 2013 Horacio Guillermo de Oro <hgdeoro@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the term... | import datetime |
<|file_name|>test_cli20_healthmonitor.py<|end_file_name|><|fim▁begin|># Copyright 2013 Mirantis Inc.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# ... | |
<|file_name|>interest.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from openerp import fields, models, api, _
class account_account_interest(models.Model):
_name = "account.account.interest"
_description = 'Account Account Interest'
account_id = fields.Many2one(
'account.account',
... | def get_active_interest_data(self, cr, uid, ids, dt_from, dt_to, context=None):
if context is None: |
<|file_name|>app.component.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core';
import { AuthService } from './services/auth.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
})
export class AppComponent {
title = 'Time... | constructor(public auth: AuthService) { }
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Treadmill Kafka API"""
import fnmatch
import logging<|fim▁hole|>import re
import socket
from .. import admin as tadmin
from .. import context
from .. import dnsutils
from .. import discovery
from .. import fs
from .. import zkutils
_LOGGER = logging.getLogger... | import os |
<|file_name|>range.rs<|end_file_name|><|fim▁begin|>use super::Index;
/// A range of values in a vector-like object
#[derive(Debug, PartialEq, Copy, Clone)]
pub(crate) struct Range {
/// Starting index
start: Index,
/// Ending index
end: Index,
/// Is this range inclusive? If false, this object repr... | inclusive: true,
}
}
|
<|file_name|>server.cpp<|end_file_name|><|fim▁begin|>#include <iostream>
#include <future>
#include <signal.h>
#include <string.h>
#include <vector>
#include "BotHandler.h"
#include "BotService.h"
#include "config.h"
#include "ClientHandler.h"
#include "Net/TCPConnection.h"
#include "Net/TCPServer.h"
using namespace ... | TCPServer spServer(string(SP_PORT)); |
<|file_name|>Campus.py<|end_file_name|><|fim▁begin|>class Campus(object):
def __init__(self,dados=None):
if dados is not None:
self.id = dados ['id']
self.nome = dados ['nome']
def getId(self):
return self.id
def setNome(self,nome):
self.nome = nome
<|fim▁hole|><|fim▁end|> | def getNome(self):
return self.nome |
<|file_name|>archivant_api.py<|end_file_name|><|fim▁begin|>import json
import tempfile
import os
from werkzeug import secure_filename
from webant.util import send_attachment_file, routes_collector
from flask import request, current_app, url_for, jsonify
from archivant import Archivant
from archivant.exceptions import N... | |
<|file_name|>addon_deleted_date.py<|end_file_name|><|fim▁begin|>import datetime
import logging
from django.core.management.base import BaseCommand
from django.db import connection, transaction
from framework.celery_tasks import app as celery_app
logger = logging.getLogger(__name__)
TABLES_TO_POPULATE_WITH_MODIFIED =... | if dry_run:
raise RuntimeError('Dry Run -- Transaction rolled back') |
<|file_name|>exceptions.py<|end_file_name|><|fim▁begin|>class ClopureSyntaxError(Exception):<|fim▁hole|> super().__init__(*args, **kwargs)
self.pos = pos
class ClopureRuntimeError(Exception):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)<|fim▁end|> | def __init__(self, *args, pos=0, **kwargs): |
<|file_name|>post_user_login.rs<|end_file_name|><|fim▁begin|>#[allow(non_snake_case)]
#[derive(RustcDecodable, RustcEncodable, Debug, Clone)]
pub struct PostUserLoginBody {
pub login: Option<String>,
pub password: Option<String>,
pub remember: Option<bool>,
}
<|fim▁hole|>#[allow(non_snake_case)]
#[derive(Ru... | |
<|file_name|>Struct.js<|end_file_name|><|fim▁begin|>var Struct = ( function()
{<|fim▁hole|> var mode = "default";
var ctor = function( values )
{
if ( mode === "new" )
{
mode = "void";
return new Struct();
}
if ( mode... | return function ( members )
{ |
<|file_name|>hlo_parser.cc<|end_file_name|><|fim▁begin|>/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/lice... | std::unordered_map<string, HloComputation*> computation_pool_;
HloLexer lexer_;
std::unique_ptr<HloModule> module_; |
<|file_name|>fd-common-primitives-test.js<|end_file_name|><|fim▁begin|>import { module, test } from 'qunit';
module('Unit | Utility | fd common primitives');
<|fim▁hole|><|fim▁end|> | // Replace this with your real tests.
test('it works', function(assert) {
assert.ok(true);
}); |
<|file_name|>worklet.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/. */
//! An implementation of Houdini worklets.
//!
//! The goal o... | &self.global_init,
);
entry.insert(Dom::from_ref(&*result));
result |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.