prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>vnc_event.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import string
from universe import error
from universe.vncdriver import constants
class VNCEvent(object):
pass
def keycode(key):
if key in constants.KEYMAP:
return constants.KEYMAP.get(key)
elif len(key) == 1:
return ord(ke... | |
<|file_name|>processor.go<|end_file_name|><|fim▁begin|>// Copyright The OpenTelemetry 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/LI... | // Each worker in the eventMachine also uses a ring buffer to hold the in-flight trace IDs, so that we don't hold more than the given maximum number
// of traces in memory/storage. Items that are evicted from the buffer are discarded without warning. |
<|file_name|>rerun.py<|end_file_name|><|fim▁begin|>import experiment
from ..util import dirs
from ..util import file_handling as fh
from optparse import OptionParser
import sys
def main():
usage = "%prog project logfile "
parser = OptionParser(usage=usage)
parser.add_option('-n', dest='new_name', defau... | # log['reuse'] = True |
<|file_name|>x11Bridge.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
An x11 bridge provides a secure/firewalled link between a desktop application and the host x11 server. In this case, we use XPRA to do the bridging.
::.
------------- -------------
|desktop app| <--/tmp/.X11-u... | serverSubuserInstalled = self.getServerSubuserName() in self.user.registry.subusers
return clientSubuserInstalled and serverSubuserInstalled
|
<|file_name|>main.go<|end_file_name|><|fim▁begin|>// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The coordinator runs on GCE and coordinates builds in Docker containers.
package main
import (
"bytes"
"... | PerfResults []string
} |
<|file_name|>server.rs<|end_file_name|><|fim▁begin|>use common::err;
pub struct Server {
pub name: String,
cipher: Cipher,
suffix: Vec<u8>,<|fim▁hole|>impl Server {
fn new(name: &str, cipher: &Cipher) -> Self {
Server {
name: name
}
}... | network: &Network
}
|
<|file_name|>tablesorter.js<|end_file_name|><|fim▁begin|>(function($) {
$.extend({
tablesorter: new function() {
var parsers = [], widgets = [];
this.defaults = {
cssHeader: "header",
cssAsc: "headerSortUp",
cssDesc: "headerSortDown",
sortInitialOrder: "asc",
sortMultiSortKey: "shif... |
// user only whants to sort on one column
if(!e[config.sortMultiSortKey]) { |
<|file_name|>invalid-character.js<|end_file_name|><|fim▁begin|>bql`
image(size="foo") {
width
height
src
}<|fim▁hole|><|fim▁end|> | `; |
<|file_name|>docs-mixin.js<|end_file_name|><|fim▁begin|>/*
* docs-mixin: used by any page under /docs path
*/
import { updateMetaTOC, scrollTo, offsetTop } from '~/utils'
import { bvDescription, nav } from '~/content'
const TOC_CACHE = {}
// @vue/component
export default {
head() {
return {
title: this.... | this.clearScrollTimeout()
this.focusScroll()
}, |
<|file_name|>component.js<|end_file_name|><|fim▁begin|>import Ember from 'ember';
export default Ember.Component.extend({
colorMap: {
running: 'green',
waiting: 'orange',
terminated: 'red'
},
getStatusByName(name) {
let retval = null;
Ember.$.each(this.get('containerStatuses'), (i, container... | if (name === containerStatus.name) {
retval = containerStatus;
return;
} |
<|file_name|>BaseFactory.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2015 JBoss, by Red Hat, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/li... | color,
positionX, |
<|file_name|>comp-624.component.spec.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { async, ComponentFixture, TestBed } fro... | describe('Comp624Component', () => {
let component: Comp624Component;
let fixture: ComponentFixture<Comp624Component>; |
<|file_name|>use-self-type.rs<|end_file_name|><|fim▁begin|>struct S;
impl S {
fn f() {}
fn g() {
use Self::f; //~ ERROR unresolved import<|fim▁hole|> }
}
fn main() {}<|fim▁end|> | pub(in Self::f) struct Z; //~ ERROR use of undeclared type `Self` |
<|file_name|>test_secrecy.py<|end_file_name|><|fim▁begin|># Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# ... | import rigour |
<|file_name|>truncate_a_file.rs<|end_file_name|><|fim▁begin|>// http://rosettacode.org/wiki/Truncate_a_file
use std::fs::OpenOptions;
use std::env;
use std::str::FromStr;
fn main() {
if env::args().count() != 3 {
println!("Usage: {} <filename> <size>", env::args().nth(0).unwrap());
} else {
let... | |
<|file_name|>platform.hpp<|end_file_name|><|fim▁begin|>#ifndef __PLATFORM_H_
#define __PLATFORM_H_
#define STDOUT_IS_PS7_UART
#define UART_DEVICE_ID 0
#include "xil_io.h"
#include "xtmrctr.h"
#include "assert.h"
/* Write to memory location or register */
#define X_mWriteReg(BASE_ADDRESS, RegOffset, data) \
... |
void wait_ms(unsigned int time);
void init_platform(); |
<|file_name|>jquery.a-tools.js<|end_file_name|><|fim▁begin|>/*!
* a-tools 1.5.2
*
* Copyright (c) 2009 Andrey Kramarev(andrey.kramarev[at]ampparit.com), Ampparit Inc. (www.ampparit.com)
* Licensed under the MIT license.
* http://www.ampparit.fi/a-tools/license.txt
*
* Basic usage:
<textarea></textarea>
<in... |
for (var pos = 0; pos < obj.length; pos++) {
if (obj[pos] == input) { |
<|file_name|>lrc.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .stop_words import STOP_WORDS
from .lex_attrs import LEX_ATTRS
from .punctuation import TOKENIZER_SUFFIXES
from ...language import Language, BaseDefaults
class UrduDefaults(BaseDefaults):
suffixes = TOKENIZER_SUFFIXES
lex_attr_getters = LEX_ATTRS<|fim... | stop_words = STOP_WORDS
writing_system = {"direction": "rtl", "has_case": False, "has_letters": True} |
<|file_name|>html.py<|end_file_name|><|fim▁begin|>import re
def analyzeLine(txtlines):
outline = []
lcnt = -1
for line in txtlines:
lcnt += 1
typ = None
itmText = None
spc = (len(line) -len(line.lstrip()))*' '
tls = line.lstrip()
if tls... | typ = 'function'
elif tls.startswith('<!---'):
itmText =tls[5:].replace('-->','')
typ = 'heading' |
<|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", "django_pesapal.settings")
from django.core.management import execute_from_command_line<|fim▁hole|><|fim▁end|> |
execute_from_command_line(sys.argv) |
<|file_name|>crypto.py<|end_file_name|><|fim▁begin|>import Aplicacion
import Probabilidades as pr
from Menu import *
from Variable import *
from validador import *
#------------------------------------------------
#--------------- TODO ---------------------------
#------------------------------------------------... | print "3) Se mostrara en pantalla el codigo desencriptado."
|
<|file_name|>pandas_util.py<|end_file_name|><|fim▁begin|>import numpy as np
import pandas as pd
"""
Specifications (So far, only implemented for the single index part below):
feature_df ... Data Frame of intervals along the genome,
equivalent of a bed file, but 1-indexed
index:
(chrom, start)
col... | raise e |
<|file_name|>CT_ShapeNonVisual.go<|end_file_name|><|fim▁begin|>// Copyright 2017 Baliance. All rights reserved.
//
// DO NOT EDIT: generated by gooxml ECMA-376 generator
//
// Use of this source code is governed by the terms of the Affero GNU General
// Public License version 3.0 as published by the Free Software Found... | case xml.Name{Space: "http://schemas.openxmlformats.org/drawingml/2006/chartDrawing", Local: "cNvPr"}:
if err := d.DecodeElement(m.CNvPr, &el); err != nil {
return err |
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
flask_security.forms
~~~~~~~~~~~~~~~~~~~~
Flask-Security forms module
:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2017 by CERN.
:license: MIT, see LICENSE for more details.
"""
import inspect
from flask i... |
fields = inspect.getmembers(form, is_field_and_user_attr) |
<|file_name|>dev_ldap_directory.py<|end_file_name|><|fim▁begin|>import glob
import logging
import os
from typing import Any, Dict, List, Optional
from django.conf import settings
from zerver.lib.storage import static_path
# See https://jackstromberg.com/2013/01/useraccountcontrol-attributeflag-values/
# for docs on ... | profile_images = [] |
<|file_name|>Embedded.java<|end_file_name|><|fim▁begin|>package cvc3;
import java.util.*;
import java.io.*;
/** Wrapper for a c++ object as a java Object.
see README for details on garbage collection,
i.e. interplay of delete, finalize, and EmbeddedManager to destruct
the embedded c++ object. */
public a... | } |
<|file_name|>FitsAnalysis.py<|end_file_name|><|fim▁begin|>#!/bin/python
'''
Author: Yin Lin Date: September 23, 2013
The class object StarClass loads stars from the catalog.py and from the source extractor cat file and converts them into proper format.
The lists of stars are then passed to the subclass, StarCal... | minIndex = index
|
<|file_name|>fr.js<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'liststyle', 'fr', {
armenian: 'Numération arménienne',
bulletedTitle: 'Propriétés de la lis... | square: 'Carré',
|
<|file_name|>eager_drop.rs<|end_file_name|><|fim▁begin|>extern crate futures;
use std::sync::mpsc::channel;
use futures::Poll;
use futures::future::*;
use futures::sync::oneshot;
mod support;
use support::*;
#[test]
fn map() {
// Whatever runs after a `map` should have dropped the closure by that
// point.
... | |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate sdl2;
extern crate rustc_serialize;
use sdl2::keycode::KeyCode;
use sdl2::event::Event;
use sdl2::timer::get_ticks;
mod sprite;
mod assets;
mod draw;
mod player;
mod tile;
mod map;
mod physics;
use sprite::Sprite;
use player::Player;
use player::PlayerSt... |
//move player
player.update(); |
<|file_name|>autoderef-method-on-trait.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.... | |
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>from sqlite3 import connect
class DB:<|fim▁hole|> def __init__(self,path="people.db"):
self.conn = connect(path)
self.c = self.conn.cursor()
def getList(self):
self.c.execute('SELECT * FROM people')
return self.c.fetchall()
def close(self):
self.con... | |
<|file_name|>union-fields-2.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 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/... | // <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|>serializer.py<|end_file_name|><|fim▁begin|># Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICEN... | # Unless required by applicable law or agreed to in writing, software |
<|file_name|>BitmapImage.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
* Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the follow... | canvas->translate(adjustedDstRect.x(), adjustedDstRect.y()); |
<|file_name|>suggestSupport.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.
*---... | import {IConfigurationRegistry, Extensions} from 'vs/platform/configuration/common/configurationRegistry';
import {Registry} from 'vs/platform/platform';
import {localize} from 'vs/nls';
import {CancellationToken} from 'vs/base/common/cancellation'; |
<|file_name|>controller.cpp<|end_file_name|><|fim▁begin|>// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ==++==
//
//
// ==--==
// *****************************... | _ASSERTE(pIP != NULL);
Thread * pThread = g_pEEInterface->GetThread();
_ASSERTE(pThread != NULL); |
<|file_name|>product.py<|end_file_name|><|fim▁begin|>##############################################################################
#
# Copyright (C) 2014 Comunitea Servicios Tecnológicos All Rights Reserved
# $Kiko Sánchez <kiko@comunitea.com>$
#
# This program is free software: you can redistribute it and/or... | from datetime import datetime
class OutletLoss(models.Model): |
<|file_name|>preprocess_trace.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
# Copyright (c) 2014 Quanta Research Cambridge, Inc
# Original author John Ankcorn
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),... | for filename in sys.argv[2:]: |
<|file_name|>0011_auto_20160115_1328.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-01-15 18:28
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ims', '0010_auto_20151227_... | field=models.CharField(blank=True, default=b'', help_text=b'First street address of this site', max_length=50),
),
] |
<|file_name|>main.cc<|end_file_name|><|fim▁begin|>//
// Author : Toru Shiozaki
// Date : May 2009
//
#define NGRID 12
#define MAXT 64
#define NBOX 32
#define NBOXL 0
#define T_INFTY 11
#include <sstream>
#include <iostream>
#include <iomanip>
#include <vector>
#include "mpreal.h"
#include <map>
#include <cmath>
#inc... | |
<|file_name|>URNSyntaxError.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2017 Saxon State and University Library Dresden (SLUB)
*
* 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, eit... | */
package de.slub.urn;
|
<|file_name|>graphite.py<|end_file_name|><|fim▁begin|>"""
homeassistant.components.graphite
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Component that records all events and state changes and feeds the data to
a graphite installation.
For more details about this component, please refer to the documentation at
https://home-assis... | try: |
<|file_name|>data.service.ts<|end_file_name|><|fim▁begin|>export class DataService {
static $inject: string[] = ['$http'];<|fim▁hole|> private data: any;
/**
* Constructor
* @param {angular.IHttpService} private $http Injected service reference
*/
constructor (private $http: angular.IHttpService) { }
... | // data store |
<|file_name|>session.rs<|end_file_name|><|fim▁begin|>//! This exposes `Session`, the struct stored in the `Alloy`.
use std::sync::Arc;
use super::SessionStore;
/// A session which provides basic CRUD operations.
pub struct Session<K, V> {
key: K,
store: Arc<Box<SessionStore<K, V> + 'static + Send + Sync>>
}
... | /// Create a new session
pub fn new(key: K, store: Box<SessionStore<K, V> + 'static + Send + Sync>) -> Session<K, V> {
Session { |
<|file_name|>avatar.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react';
import classNames from 'classnames';
import ResizeObserver from 'rc-resize-observer';
import { composeRef } from 'rc-util/lib/ref';
import { ConfigContext } from '../config-provider';
import devWarning from '../_util/devWarning';
impor... | const { getPrefixCls } = React.useContext(ConfigContext);
const setScaleParam = () => {
if (!avatarChildrenRef.current || !avatarNodeRef.current) { |
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
flask.views
~~~~~~~~~~~
This module provides class-based views inspired by the ones in Django.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from .globals import request
http... |
# we attach the view class to the view function for two reasons: |
<|file_name|>dirRoutesOverride.dirunit.js<|end_file_name|><|fim▁begin|>"use strict";
module.exports = {
"wires.json": {
":path/": `./path-`,<|fim▁hole|> },
"path-test.js"() {
module.exports = `parent`;
},
"/child": {
"wires-defaults.json": {
":path/": `./defaults-... | |
<|file_name|>test_image_colors_manip_relabeller.py<|end_file_name|><|fim▁begin|>import numpy as np
import pytest
from nilabels.tools.image_colors_manipulations.relabeller import relabeller, permute_labels, erase_labels, \
assign_all_other_labels_the_same_value, keep_only_one_label, relabel_half_side_one_label
de... |
test_keep_only_one_label_label_simple()
test_keep_only_one_label_label_not_present() |
<|file_name|>bitcoin_da.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="da" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About HOST</source>
<translation>Om HOST</translation... | </message>
<message>
<location line="+2"/>
<source>Mined</source> |
<|file_name|>common.hpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2010 Tieto Czech, s.r.o.
* All rights reserved.
* Contact: Tomáš Hanák <tomas.hanak@tieto.com>
* Radek Valášek <radek.valasek@tieto.com>
* Martin Kampas <martin.kampas@tieto.com>
* Jiří Litomyský <jiri.litomysky@tie... | #define SFD_DEPRECATED __attribute__((deprecated)) |
<|file_name|>plot_distribution.py<|end_file_name|><|fim▁begin|>"""
Plots a scatter plot of 2 metrics provided.
Data could be given from postgres or a csv file.
"""
from matplotlib.colors import LogNorm
from mpl_toolkits.mplot3d import Axes3D
import sys
import numpy as np
import argparse
import matplotlib
import matplot... | |
<|file_name|>fileserve_com.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Bheesham Persaud
# The license is available in LICENSE
from __future__ import division
import re
from includes.functions import *
class fileserve_com:
def init( self ):
self.url_pattern = re.compile( r'(http://www\.fileserve\.com/file/... | res_urls = res_urls.replace( "\r", '' )
res_urls = res_urls.replace( "\n", '' ) |
<|file_name|>getJsonFromBody.js<|end_file_name|><|fim▁begin|>var parseString = require('xml2js').parseString;
// The body of the response from each of our api requests can either be xml or json
// if body is json, simply return the json
// else body is xml, so asynchronously parse the xml and wait for the result
// Th... | };
module.exports = getJsonFromBody; |
<|file_name|>JSONParser_JavaDesktop.java<|end_file_name|><|fim▁begin|>package org.glob3.mobile.specific;
import java.util.Map;
import org.glob3.mobile.generated.IByteBuffer;
import org.glob3.mobile.generated.IJSONParser;
import org.glob3.mobile.generated.JSONArray;
import org.glob3.mobile.generated.JSONBaseObject;
im... | public class JSONParser_JavaDesktop
extends
IJSONParser {
|
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![allow(unknown_lints)]
#![warn(clippy_pedantic)]
#![allow(print_stdout, missing_docs_in_private_items, filter_map, string_add)]
extern crate termios;
extern crate libc;
extern crate colored;
use colored::*;
use std::io::{self, Read, Write, BufWriter};
use std::fs::F... | }
}
|
<|file_name|>CodegenRust.py<|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/.
# Common codegen classes.
from collections import defaultdict
... |
# The argument at index distinguishingIndex can't possibly
# be unset here, because we've already checked that argc is |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/<|fim▁hole|>
var Line = require('./Line');
Line.Angle = require('./A... | |
<|file_name|>mailer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2
import threading
from systemd import journal
from threading import Thread
import smtplib
import email.utils
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
class Mailer(threading.Thread):
"""
Mailer
:... | journal.send("systemd-denotify: "+message)
finally: |
<|file_name|>SpaceProfileInstManager.java<|end_file_name|><|fim▁begin|>/**
* Copyright (C) 2000 - 2013 Silverpeas
*
* This program is free software: you can redistribute it and/or modify it under the terms of the
* GNU Affero General Public License as published by the Free Software Foundation, either version 3
* o... | // delete the spaceProfile node
ddManager.getOrganization().spaceUserRole.removeSpaceUserRole(idAsInt(spaceProfileInst |
<|file_name|>filter_glsl_manager.cpp<|end_file_name|><|fim▁begin|>/*
* filter_glsl_manager.cpp
* Copyright (C) 2011-2012 Christophe Thommeret <hftom@free.fr>
* Copyright (C) 2013 Dan Dennedy <dan@dennedy.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU ... | return (MltInput*) get_frame_specific_data( MLT_PRODUCER_SERVICE(producer), frame, "_movit input", NULL );
} |
<|file_name|>bitcoin_hr.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="hr">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Bi... | <message>
<location line="-15"/>
<source>Error: could not start node</source> |
<|file_name|>SubmitLabelManipulationTask.java<|end_file_name|><|fim▁begin|>package gui;
//: gui/SubmitLabelManipulationTask.java
import javax.swing.*;
import java.util.concurrent.*;
public class SubmitLabelManipulationTask {
public static void main(String[] args) throws Exception {
JFrame frame = new JFra... | frame.setSize(300, 100);
frame.setVisible(true);
TimeUnit.SECONDS.sleep(1);
|
<|file_name|>ImplementableByClient.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2011 Gian Perrone
*
* 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/... | |
<|file_name|>CubeTextureLoader.d.ts<|end_file_name|><|fim▁begin|>export interface CubeTextureLoader {
load(
urls: string[],
onLoad?: (texture?: THREE.Texture) => any,
onProgress?: LoaderProgressHandler,
onError?: (error?: any) => any,<|fim▁hole|>}<|fim▁end|> | ): THREE.Texture; |
<|file_name|>JPhotoDirectory.java<|end_file_name|><|fim▁begin|>/*
* This file is part of JPhotoAlbum.
* Copyright 2004 Jari Karjala <jpkware.com> & Tarja Hakala <hakalat.net>
*
* @version $Id: JPhotoDirectory.java,v 1.1.1.1 2004/05/21 18:24:59 jkarjala Exp $
*/
/** Container for a single photo, may not always con... | |
<|file_name|>tradingUI.py<|end_file_name|><|fim▁begin|>import pygame
import os
from buffalo import utils
from item import Item
# User interface for trading with NPCs
# Similar to the crafting UI, with some minor differences
# The biggest thing is that it only appears when you "talk to" (read click on)
# A trader NPC a... | self.pos = (utils.SCREEN_W / 2 + self.surface.get_width() / 2 + 350, utils.SCREEN_H / 2 - 150)
self.tileRects = list()
self.tileTrades = list() |
<|file_name|>test_patron_transactions_permissions.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# RERO ILS
# Copyright (C) 2020 RERO
# Copyright (C) 2020 UCLouvain
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as publis... | pttr_saxon_permission_url = url_for(
'api_blueprint.permissions',
route_name='patron_transactions',
record_pid=patron_transaction_overdue_saxon.pid |
<|file_name|>gapic_image_annotator_v1p1beta1.ts<|end_file_name|><|fim▁begin|>// Copyright 2022 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
//
// https://www.apache.org/... | }
|
<|file_name|>checkpoint_utils.py<|end_file_name|><|fim▁begin|># Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.... | # -- name='old_scope_1/var2', shape=[50, 4]
# -- name='old_scope_2/var3', shape=[100, 100]
# Create new model's variables |
<|file_name|>newtype-temporary.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
// http://www.apache.o... | Foo(42)
}
|
<|file_name|>box_builder.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/. */
//! Creates CSS boxes from a DOM tree.
use layout::block... | } else {
info!("Tried to make image box, but couldn't find image. Made generic box \
instead."); |
<|file_name|>0017_remove_profile_emails.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-30 12:24
from __future__ import unicode_literals
from django.db import migrations
<|fim▁hole|> ('webcore', '0016_profile_emails'),
]
operations = [
migrations.Re... |
class Migration(migrations.Migration):
dependencies = [ |
<|file_name|>jws.go<|end_file_name|><|fim▁begin|>package acme
import (
"bytes"
"crypto/ecdsa"
"crypto/rsa"
"fmt"
"net/http"<|fim▁hole|>type jws struct {
directoryURL string
privKey *rsa.PrivateKey
nonces []string
}
func keyAsJWK(key interface{}) *jose.JsonWebKey {
switch k := key.(type) {
case *e... |
"github.com/square/go-jose"
)
|
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms
from django.contrib.auth.models import User
from .models import Perfil,SolicitudColaboracion
class SolicitudColaboracionForm(forms.ModelForm):<|fim▁hole|><|fim▁end|> |
class Meta:
model = SolicitudColaboracion
fields = ('name','licenciatura_leyes','telefono','fecha_nacimiento') |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>import json
import logging
import time
from datetime import datetime, timedelta
from itertools import chain
from django.conf import settings
from django.http import (
HttpResponse, HttpResponseBadRequest, HttpResponseRedirect)
from django.shortcuts import render
f... | search_form = SimpleSearchForm(request.GET, auto_id=False)
# 3. Validate request.
if not search_form.is_valid(): |
<|file_name|>infinite-scroll.js<|end_file_name|><|fim▁begin|>import InfiniteScroll from './directive';
import 'bh-mint-ui2/src/style/empty.css';
import Vue from 'vue';
const install = function(Vue) {
Vue.directive('InfiniteScroll', InfiniteScroll);
};
if (!Vue.prototype.$isServer && window.Vue) {
window.infiniteS... | Vue.use(install); // eslint-disable-line |
<|file_name|>PaymentServiceInterceptor.java<|end_file_name|><|fim▁begin|>package bookshop2.client.paymentService;
import java.util.List;
import org.aries.message.Message;
import org.aries.message.MessageInterceptor;
import org.aries.util.ExceptionUtil;
import bookshop2.Payment;
@SuppressWarnings("serial")
public c... | Message request = createMessage("removeAllPaymentRecords");
getProxy().invoke(request);
} catch (Exception e) {
throw ExceptionUtil.rewrap(e); |
<|file_name|>tsm_vte.rs<|end_file_name|><|fim▁begin|>#![feature(libc)]
extern crate libc;
extern crate regex;
extern crate tsm_sys;
use libc::c_char;
use libc::c_void;
use libc::size_t;
use std::ptr;
use std::slice;
use tsm_sys::*;
#[test]
fn tsm_vte_stuff_works() {
let mut screen = ptr::null_mut();
let err ... | extern "C" fn write_cb(_: *mut tsm::TsmVte, input_ptr: *const c_char, input_size: size_t, output: *mut c_void) {
let output: &mut Output = unsafe { &mut *(output as *mut Output) };
let input = unsafe { slice::from_raw_parts(input_ptr, input_size as usize) };
for c in input { |
<|file_name|>ClientDriverTestCase.java<|end_file_name|><|fim▁begin|>// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jdisc.client;
import com.google.inject.AbstractModule;
import com.google.inject.Inject;
import org.junit.Test;
import static or... | |
<|file_name|>outputPorts.ts<|end_file_name|><|fim▁begin|>export function outputPorts(nodeDef) {
if(Object.keys(nodeDef.ports.output).length) {
return Object.keys(nodeDef.ports.output).map((name) => {
return {
name,
...nodeDef.ports.output[name]
}
})
}<|fim▁hole|><|fim▁end|> |
return []
} |
<|file_name|>FilterPill.tsx<|end_file_name|><|fim▁begin|>import React from 'react';
import { useStyles2 } from '../../themes';
import { GrafanaTheme2 } from '@grafana/data';
import { css, cx } from '@emotion/css';
import { Icon } from '../Icon/Icon';
import { IconName } from '../../types';
export interface FilterPillP... | background: ${theme.colors.action.selected};
&:hover {
background: ${theme.colors.action.focus}; |
<|file_name|>comp-177.component.spec.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { async, ComponentFixture, TestBed } fro... | }); |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import { translate } from 'i18n-calypso';
import { registerHandlers } from 'calypso/state/data-layer/handler-registry';
import { bypassDataLayer } from 'calypso/state/data-layer/utils';
import { http } from 'calypso/state/data-layer/wpcom-http/actions';
import { dispat... | export function receiveNotificationUnsubscriptionError( action ) {
return [
errorNotice(
translate( 'Sorry, we had a problem unsubscribing you from notifications. Please try again.' ) |
<|file_name|>takeLast.d.ts<|end_file_name|><|fim▁begin|>import { MonoTypeOperatorFunction } from '../types';
/**
* Emits only the last `count` values emitted by the source Observable.
*
* <span class="informal">Remembers the latest `count` values, then emits those
* only when the source completes.</span>
*
*  -> PointInterferencesCollector<'a, P, B> {
PointInterferencesCollector {
point: point, |
<|file_name|>ToontownLauncher.py<|end_file_name|><|fim▁begin|>import os
import sys
import time
import types
ltime = 1 and time.localtime()
logSuffix = '%02d%02d%02d_%02d%02d%02d' % (ltime[0] - 2000, ltime[1], ltime[2],
ltime[3], ltime[4], ltime[5])
logfile = 'toontownD-' + ... | |
<|file_name|>repolist.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
# -*- coding: utf-8 -*-
# repolist.py file is part of slpkg.
# Copyright 2014-2021 Dimitris Zlatanidis <d.zlatanidis@gmail.com>
# All rights reserved.<|fim▁hole|>
# Slpkg is a user-friendly package manager for Slackware installations
# https://... | |
<|file_name|>oojs-ui-wikimediaui.js<|end_file_name|><|fim▁begin|>/*!
* OOjs UI v0.25.0
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2018 OOjs UI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2018-01-10T00:26:02Z
*/
( function ( OO ) {
'use... | OO.ui.ToolGroup && element instanceof OO.ui.ToolGroup && ( isActive || element.hasFlag( 'primary' ) )
) { |
<|file_name|>luxi.py<|end_file_name|><|fim▁begin|>#
#
# Copyright (C) 2006, 2007, 2011, 2012, 2014 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,... | # Verify version if there was one in the response
if resp_version is not None and resp_version != version: |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import terrariumLogging
logger = terrariumLogging.logging.getLogger(__name__)
from pathlib import Path
import inspect
from importlib import import_module
import sys
import statistics
from hashlib import md5
from time import time, sleep
from ... | |
<|file_name|>plotmetadata.py<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<... | <sender>buttonBox</sender> |
<|file_name|>screenshotCommentReplyModel.js<|end_file_name|><|fim▁begin|><|fim▁hole|> *
* When created, this must take a parentObject attribute that points to a
* Review object.
*/
RB.ScreenshotCommentReply = RB.BaseCommentReply.extend({
rspNamespace: 'screenshot_comment'
});<|fim▁end|> | /*
* A reply to a screenshot comment made on a review. |
<|file_name|>kafka_defaults.go<|end_file_name|><|fim▁begin|>/*
Copyright 2020 The Knative 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
Unl... | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Contains traits with platform-specific methods in them.
//!
//! Contains the following modules:
//!
//! - `android`
//! - `ios`
//! - `macos`
//! - `unix`
//! - `windows`
//!
/// Platform-specific methods for android.
pub mod android;
/// Platform-specific meth... | ))]
pub use winit::platform::desktop::*;
}
|
<|file_name|>app.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# If this page isn't working, try executing `chmod +x app.py` in terminal.
# enable debugging
import cgitb, cgi; cgitb.enable()
from classes import Factory
fieldStorage = cgi.FieldStorage()
factory = Factory.Factory()
webA... |
def outputHeaders(): |
<|file_name|>all.js<|end_file_name|><|fim▁begin|>/* =========================================================
* params/all.js v0.0.1
* =========================================================
* Copyright 2012 Wpbakery
*
* Visual composer javascript functions to enable fields.
* This script loads with settings fo... | |
<|file_name|>Entity.java<|end_file_name|><|fim▁begin|>/*L
* Copyright SAIC, SAIC-Frederick.
*
* Distributed under the OSI-approved BSD 3-Clause License.
* See http://ncip.github.com/caadapter/LICENSE.txt for details.
*/
package gov.nih.nci.caadapter.sdtm.util;
/**
* This class represents a entity
*
* @author ... | return entityName;
}
public void setEntityName(String entityName) { |
<|file_name|>doctest.py<|end_file_name|><|fim▁begin|># Module doctest.
# Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org).
# Major enhancements and refactoring by:
# Jim Fulton
# Edward Loper
# Provided as-is; use at your own risk; no warranty; no promises; enjoy!
r"""Module doctest -... | True |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.