prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>ancestor.go<|end_file_name|><|fim▁begin|>ancestor{ import go.io. import go.unit. parent:[symbol,symbol]{}. parent('a','b'). parent('a','c'). parent('c','d'). parent('c','e'). parent('e','f'). ancestor:[symbol,symbol]{}. ancestor(X,Y) :- parent(X,Y). ancestor(X,Y) :- parent(X,Z), anc...
ancestorTester..{ doAction() -> ancestor('a',X) *> stdout.outLine("A is ancestor of " <> X^).
<|file_name|>UnorderedTree.java<|end_file_name|><|fim▁begin|>package utils; import java.util.ArrayList; import java.util.List; /** * Utility tree class, where the children are not necessarily ordered in any * particular way besides their locations. * * @author tetigi * * @param <T> * Type of the d...
} public UnorderedTree() { value = null;
<|file_name|>aliases.py<|end_file_name|><|fim▁begin|>""" Encoding Aliases Support This module is used by the encodings package search function to map encodings names to module names. Note that the search function converts the encoding names to lower case and replaces hyphens with underscores *before* ...
'base_64': 'base64_codec', 'zlib': 'zlib_codec', 'zip': 'zlib_codec', 'hex': 'hex_codec',
<|file_name|>modo_extension.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Amavis management frontend. Provides: * SQL quarantine management * Per-domain settings """ from __future__ import unicode_literals from django.utils.translation import ugettext_lazy from modoboa.admin.models import Domain fr...
label = ugettext_lazy("Amavis frontend") version = __version__
<|file_name|>0012_video.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-02-26 09:59 from __future__ import unicode_literals from django.db import migrations, models <|fim▁hole|> ('directorio', '0011_auto_20160225_0957'), ] operations = [ migrations.Cr...
class Migration(migrations.Migration): dependencies = [
<|file_name|>auth.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import errno import os from nacl.exceptions import CryptoError from cabinet.person import Person def mkdir_p(path): """ Creates the path and all the intermediate directories that don't exist Might raise ...
def create_vault_key(self): import nacl.secret import nacl.utils
<|file_name|>room.py<|end_file_name|><|fim▁begin|>from bson.objectid import ObjectId import json class Room(): def __init__(self, players_num, objectid, table, current_color='purple'): if players_num: self.players_num = players_num else: self.players_num = 0 f...
rid = objectid room_in_db = self.db.rooms.find_one({'_id': ObjectId(rid)}) if room_in_db: print('Room', objectid, 'extrapolated from db')
<|file_name|>resetPasswordForVirtualMachine.py<|end_file_name|><|fim▁begin|>"""Resets the password for virtual machine. The virtual machine must be in a "Stopped" state and the template must already support this feature for this command to take effect. [async]""" from baseCmd import * from baseResponse import * class...
self.startport = None """"the list of resource tags associated with the rule""" self.tags = [] """"the account associated with the tag"""
<|file_name|>handlers.py<|end_file_name|><|fim▁begin|>"""Tornado handlers for kernel specifications. Preliminary documentation at https://github.com/ipython/ipython/wiki/IPEP-25%3A-Registry-of-installed-kernels#rest-api """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD Li...
def kernelspec_model(handler, name): """Load a KernelSpec by name and return the REST API model""" ksm = handler.kernel_spec_manager spec = ksm.get_kernel_spec(name)
<|file_name|>DefaultHygieiaServiceStub.java<|end_file_name|><|fim▁begin|>package jenkins.plugins.hygieia; public class DefaultHygieiaServiceStub extends DefaultHygieiaService {<|fim▁hole|> // private HttpClientStub httpClientStub; public DefaultHygieiaServiceStub(String host, String token, String name) { ...
<|file_name|>issue-39889.rs<|end_file_name|><|fim▁begin|>// run-pass #![allow(dead_code)] // aux-build:issue-39889.rs extern crate issue_39889; use issue_39889::Issue39889; #[derive(Issue39889)] struct S; <|fim▁hole|>fn main() {}<|fim▁end|>
<|file_name|>app.js<|end_file_name|><|fim▁begin|>var beep = require('../beep.js');<|fim▁hole|><|fim▁end|>
beep(3);
<|file_name|>decode_ref.rs<|end_file_name|><|fim▁begin|>use rmpv::decode::{read_value_ref, Error}; use rmpv::ValueRef; #[test] fn from_nil() { let buf = [0xc0]; let mut rd = &buf[..]; assert_eq!(ValueRef::Nil, read_value_ref(&mut rd).unwrap()); } #[test] fn from_bool_false() { let buf = [0xc2]; ...
assert_eq!(ValueRef::from("B123456789012345678901234567890E"),
<|file_name|>collection.rs<|end_file_name|><|fim▁begin|>use http::StatusCode; use std::path::{Path, PathBuf}; use crate::app::index; use crate::service::test::{add_trailing_slash, constants::*, protocol, ServiceType, TestService}; use crate::test_name; #[test] fn browse_requires_auth() { let mut service = ServiceTyp...
#[test] fn browse_bad_directory() { let mut service = ServiceType::new(&test_name!());
<|file_name|>collaborators.rs<|end_file_name|><|fim▁begin|>use crate::users::User; use crate::Future; use crate::{Error, Github}; use futures::prelude::*; use http::StatusCode;<|fim▁hole|>pub enum Permissions { Admin, Push, Pull, } impl Default for Permissions { fn default() -> Permissions { Pe...
use std::collections::HashMap; use std::fmt; #[derive(Debug)]
<|file_name|>test_converter.py<|end_file_name|><|fim▁begin|>__author__ = "John Kirkham <kirkhamj@janelia.hhmi.org>" __date__ = "$Mar 30, 2015 08:25:33 EDT$" import collections import json import os import os.path import shutil import tempfile import numpy import h5py import vigra import vigra.impex import nanshe.u...
): each_filename = os.path.join(self.temp_dir, "test_tiff_" + str(i) + ".tif") each_data = self.data[a_b:a_e]
<|file_name|>HomeScreenActivity.java<|end_file_name|><|fim▁begin|>package org.easyaccess.nist; import java.io.File; import java.util.HashMap; import java.util.Locale; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.co...
<|file_name|>is_unique.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <string> // time complexity O(1) - constant // space complexity O(1) - constant bool is_unique (std::string s) { if (s.length() > 128) return false; bool char_list[128] = {0}; for (int i = 0; i < s.length(); i++) {<|fim▁hole|> }...
if (char_list[s[i]]) return false; char_list[s[i]] = true;
<|file_name|>locality_finder.hpp<|end_file_name|><|fim▁begin|>#pragma once #include "indexer/index.hpp" #include "geometry/point2d.hpp" #include "geometry/rect2d.hpp" #include "geometry/tree4d.hpp" #include "std/set.hpp" class Index; namespace search { struct LocalityItem { m2::RectD m_rect; string m_name; ...
void ClearCacheAll(); void ClearCache(size_t idx);
<|file_name|>gesture_long_press.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (b7f5189) from gir-files (71d73f0) // DO NOT EDIT use EventController; use Gesture; use GestureSingle; #[cfg(feature = "v3_14")] use Widget; use ffi; use glib::Value;<|fim▁hole|>use glib::translate::*; #[cfg(feature = "v3...
use glib::object::Downcast; use glib::object::IsA; #[cfg(feature = "v3_14")] use glib::signal::connect;
<|file_name|>euctwprober.py<|end_file_name|><|fim▁begin|>######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright ...
# Contributor(s): # Mark Pilgrim - port to Python # # This library is free software; you can redistribute it and/or
<|file_name|>events.rs<|end_file_name|><|fim▁begin|>use chainstate::stacks::events::*; use vm::types::{Value, QualifiedContractIdentifier, ResponseData, PrincipalData, AssetIdentifier}; use vm::types::TypeSignature::{UIntType}; use vm::contexts::{OwnedEnvironment, GlobalContext, Environment}; use vm::errors::{CheckErro...
(begin (unwrap-panic (ft-transfer? token u10 sender recipient))
<|file_name|>task-killjoin.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/l...
// Create a task that is supervised by another task, join the supervised task // from the supervising task, then fail the supervised task. The supervised
<|file_name|>VM.py<|end_file_name|><|fim▁begin|>from .. import Availability, Class, Constant, Define, Method, Parameter, Type gx_class = Class('VM', doc=""" In-memory vector data methods The :class:`VM` class will store vector (array) data in a memory buffer which ...
]), Method('ReSize_VM', module='geoengine.core', version='5.0.0',
<|file_name|>emitter.js<|end_file_name|><|fim▁begin|><|fim▁hole|> class MomentumEventEmitter extends EventEmitter {} module.exports = MomentumEventEmitter;<|fim▁end|>
const EventEmitter = require('events');
<|file_name|>violations.py<|end_file_name|><|fim▁begin|>"""Docstring violation definition.""" from collections import namedtuple from functools import partial from itertools import dropwhile from typing import Any, Callable, Iterable, List, Optional from .parser import Definition from .utils import is_blank __all__ ...
<|file_name|>vmware_rest_client.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import ...
def connect_to_vsphere_client(self): """ Connect to vSphere API Client with Username and Password
<|file_name|>test_dellsc.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 Dell 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/...
<|file_name|>autoscale_setting_resource_paged.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 inform...
<|file_name|>package-info.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2017 GG-Net GmbH <|fim▁hole|> * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS F...
* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or
<|file_name|>BlockChimney.java<|end_file_name|><|fim▁begin|>package com.stijnhero.forgery.common.block; import java.util.List; import com.stijnhero.forgery.Forgery; import net.minecraft.block.Block; import net.minecraft.block.BlockFence; import net.minecraft.block.material.Material; import net.minecraft.block.state....
super(materialIn); this.setCreativeTab(Forgery.Forgery); }
<|file_name|>plugins.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import with_statement import datetime from cms.api import create_page, publish_page, add_plugin from cms.exceptions import PluginAlreadyRegistered, PluginNotRegistered from cms.models import Page, Placeholder from cms.models.p...
})
<|file_name|>scale_button.rs<|end_file_name|><|fim▁begin|>// This file is part of rgtk.<|fim▁hole|>// the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // rgtk is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the impli...
// // rgtk is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by
<|file_name|>dmp.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: UTF-8 -*- """ DGA: Implementation of the Distributed Greedy Algorithm for channel assignment The DMP class handles the control flow after the initialization of DGA. Authors: Simon Seif <seif.simon@googlemail.com>, Felix ...
<|file_name|>issue24159.go<|end_file_name|><|fim▁begin|>// errorcheck <|fim▁hole|>package p type intAlias = int func f() { switch interface{}(nil) { case uint8(0): case byte(0): // ERROR "duplicate case" case int32(0): case rune(0): // ERROR "duplicate case" case int(0): case intAlias(0): // ERROR "duplicate c...
// Copyright 2018 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.
<|file_name|>uctypes_test.py<|end_file_name|><|fim▁begin|>import uctypes ACCEL_CONFIG = { 'x_self_test' : uctypes.BFUINT8 | 0 | 7 << uctypes.BF_POS | 1 << uctypes.BF_LEN, 'y_self_test' : uctypes.BFUINT8 | 0 | 6 << uctypes.BF_POS | 1 << uctypes.BF_LEN, 'z_self_test' : uctypes.BFUINT8 | 0 | 5 << uctype...
accel_config = uctypes.struct(ACCEL_CONFIG, uctypes.addressof(buf))
<|file_name|>builder.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) 2006-2009 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi...
<|file_name|>manageuserdirectories.py<|end_file_name|><|fim▁begin|># This file is part of the mantidqt package # # Copyright (C) 2017 mantidproject # # 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 Fou...
from mantidqt.utils.qt import import_qtlib
<|file_name|>atexit_sys_exit.py<|end_file_name|><|fim▁begin|>import atexit import sys def all_done(): print('all_done()') print('Registering') atexit.register(all_done) print('Registered') <|fim▁hole|><|fim▁end|>
print('Exiting...') sys.exit()
<|file_name|>0019_auto_20190309_1223.py<|end_file_name|><|fim▁begin|># Generated by Django 2.1.7 on 2019-03-09 11:23 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("account", "0018_auto_20190309_1153"), ] operat...
name="tag_new",
<|file_name|>SerialConnection.py<|end_file_name|><|fim▁begin|>import serial class SerialConnection: """RS-232 connection to the Agilent power supply""" def __init__(self, port='/dev/usb/ttyUSB0', baudrate=9600, parity=serial.PARITY_NONE, bytesize=serial.EIGHTBITS): """Initialize the connection""" self.seri...
"""Send one query to the device and returns the answer""" if cnt>2: raise Exception("Too many empty responses to query: "%data)
<|file_name|>test_django.py<|end_file_name|><|fim▁begin|>import os import apium.frameworks <|fim▁hole|><|fim▁end|>
def test_basic_task_run___state_is_consistent(port_num, running_worker): os.environ['DJANGO_SETTINGS_MODULE'] = 'django_test_project.settings' apium.frameworks.setup()
<|file_name|>ExperimentServiceImpl.java<|end_file_name|><|fim▁begin|>package cn.xmut.experiment.service.impl; import java.util.List; import org.apache.commons.fileupload.FileItem; import cn.xmut.experiment.dao.IExperimentDao; import cn.xmut.experiment.dao.impl.jdbc.ExperimentDaoImpl; import cn.xmut.experimen...
public class ExperimentServiceImpl implements IExperimentService { IExperimentDao experimentDao = new ExperimentDaoImpl();
<|file_name|>ActivityRecognitionProviderWatcher.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2014 The Android Open Source Project * * 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 *
<|file_name|>permissions.py<|end_file_name|><|fim▁begin|>#encoding=utf8 from rest_framework import permissions from django.contrib import messages from copy import deepcopy from rest_framework.permissions import * def own_object_permission(field_name): class P(permissions.BasePermission): def has_object_...
class P(DjangoModelPermissionsOrAnonReadOnly):
<|file_name|>pilfile.py<|end_file_name|><|fim▁begin|>#!/Users/tiradoe/Projects/Giflocker/bin/python3 # # The Python Imaging Library. # $Id$ # # a utility to identify image files # # this script identifies image files, extracting size and # pixel mode information for known file formats. Note that # you don't need the P...
try: im.verify() except:
<|file_name|>split_args_test.go<|end_file_name|><|fim▁begin|>// Copyright (C) 2017 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/LI...
}
<|file_name|>PKIXCertPathBuilderResult.hpp<|end_file_name|><|fim▁begin|>/*================================================================================ code generated by: java2cpp author: Zoran Angelov, mailto://baldzar@gmail.com class: java.security.cert.PKIXCertPathBuilderResult =========================...
<|file_name|>main.js<|end_file_name|><|fim▁begin|>$( document ).ready(function() { <|fim▁hole|> $.getJSON(checkbox.data('link') + '?' + 'status=' + (checkbox.is(':checked') ? 1 : 0) + '&id=' + checkbox.data('id'), function (response) { if (response.result === 'error') { alert(resp...
$('.switch').bootstrapSwitch({onText: 'вкл', offText: 'выкл'}).on('switchChange.bootstrapSwitch', function () { var checkbox = $(this); checkbox.bootstrapSwitch('disabled', true);
<|file_name|>GuiSelect.tsx<|end_file_name|><|fim▁begin|>import * as React from "react"; import * as ReactDom from "react-dom"; import { Component } from "../../CarbonFlux"; import * as cx from "classnames"; import FlyoutButton from '../FlyoutButton'; import ScrollContainer from '../ScrollContainer'; import { FormattedM...
import { IArtboard, IPage } from "carbon-core";
<|file_name|>test_lib_pack.py<|end_file_name|><|fim▁begin|>from helper import unittest, PillowTestCase, py3 <|fim▁hole|> def pack(self): pass # not yet def test_pack(self): def pack(mode, rawmode): if len(mode) == 1: im = Image.new(mode, (1, 1), 1) else...
from PIL import Image class TestLibPack(PillowTestCase):
<|file_name|>E0458.rs<|end_file_name|><|fim▁begin|>#[link(kind = "wonderful_unicorn")] extern "C" {} //~ ERROR E0458 //~| ERROR E0459 fn main() {<|fim▁hole|><|fim▁end|>
}
<|file_name|>nodes_test.go<|end_file_name|><|fim▁begin|>package gateway import ( "strconv" "testing" "time" "github.com/NebulousLabs/Sia/encoding" "github.com/NebulousLabs/Sia/modules" ) const dummyNode = "111.111.111.111:1111" func TestAddNode(t *testing.T) { g := newTestingGateway("TestAddNode", t) defer g...
t.Fatal("removeNode failed:", err) }
<|file_name|>buffer.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 Johannes Köster. // Licensed under the MIT license (http://opensource.org/licenses/MIT) // This file may not be copied, modified, or distributed // except according to those terms. use std::collections::{vec_deque, VecDeque}; use std::mem; use std::...
/// Iterate over records that have been fetched with `fetch`. pub fn iter(&self) -> vec_deque::Iter<Rc<bam::Record>> { self.inner.iter() }
<|file_name|>regex_query.rs<|end_file_name|><|fim▁begin|>use crate::error::TantivyError; use crate::query::{AutomatonWeight, Query, Weight}; use crate::schema::Field; use crate::Searcher; use std::clone::Clone; use std::sync::Arc; use tantivy_fst::Regex; /// A Regex Query matches all of the documents /// containing a ...
.search(&query_matching_zero, &TopDocs::with_limit(2)) .unwrap(); assert!(top_docs.is_empty(), "Expected ZERO document");
<|file_name|>webcomment_templates.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ## Comments and reviews for records. ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of ...
return out
<|file_name|>Opcodes.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2016 Raul Vidal Ortiz. * * This file is part of Assembler. * * Assembler is free software: you can redistribute it and/or modify * it under t...
public final class Opcodes { public static final String nop = "00000000";
<|file_name|>builtin-success-return-val.js<|end_file_name|><|fim▁begin|>// Copyright (C) 2015 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- description: Return value after successful match es6id: 21.2.5.6 info: > [...] 5. Let global be...
20. Let A be ArrayCreate(n + 1). [...] 24. Perform CreateDataProperty(A, "index", matchIndex).
<|file_name|>SimulatorTest.java<|end_file_name|><|fim▁begin|>/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You ...
<|file_name|>for10.py<|end_file_name|><|fim▁begin|>from polyphony import testbench from polyphony import pipelined def pipe10(xs): for i in pipelined(range(len(xs) - 1), ii=-1): v = xs[i] + xs[i + 1] v >>= 1 xs[i] = v @testbench def test(): data = [0, 16, 32, -16, -64] pipe10(dat...
<|file_name|>java.awt.geom.Rectangle2D$Double.d.ts<|end_file_name|><|fim▁begin|>declare namespace java { namespace awt { namespace geom { class Rectangle2D$Double extends java.awt.geom.Rectangle2D implements java.io.Serializable { public x: double public y: double public width: doub...
public constructor(arg0: number | java.lang.Double, arg1: number | java.lang.Double, arg2: number | java.lang.Double, arg3: number | java.lang.Double) public getX(): number public getY(): number public getWidth(): number
<|file_name|>name.js<|end_file_name|><|fim▁begin|>// Copyright (C) 2015 André Bargull. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- esid: sec-%typedarray%.prototype.indexof description: > %TypedArray%.prototype.indexOf.name is "indexOf". info: | %TypedArray%.pro...
Unless otherwise specified, the name property of a built-in Function
<|file_name|>problem.go<|end_file_name|><|fim▁begin|>package main import ( "database/sql" "io/ioutil" "net/http" "os" "path/filepath" "strconv" "github.com/go-martini/martini" "github.com/martini-contrib/render" . "github.com/russross/codegrinder/types" "github.com/russross/meddler" ) // GetProblemTypes ha...
// // If parameter unique=<...> present, results will be filtered by matching Unique field. // If parameter note=<...> present, results will be filtered by case-insensitive substring match on Note field.
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! Persistent datastructure #![deny(missing_docs)] #[macro_use] mod collection; extern crate seahash; #[macro_use] extern crate trait_group; mod stash; mod tree; mod html; mod meta;<|fim▁hole|> trait_group! { /// A value that can be put into a Collection. /// Has to ...
mod ops; use tree::weight::Weight;
<|file_name|>Todo.js<|end_file_name|><|fim▁begin|>import React from 'react'; import PropTypes from 'prop-types'; import './Todo.css'; const ARCHIVE_SHORTCUT_KEY_CODE = 65; // 'a' const onArchiveShortcutPress = (handler, event) => { if(event.keyCode === ARCHIVE_SHORTCUT_KEY_CODE) handler(event); }; const Todo = ({...
c-29.667,0-52.783,23.116-52.783,52.783v38.387v47.981h45.803v491.6c0,29.668,22.679,52.346,52.346,52.346h415.703 c29.667,0,52.782-22.678,52.782-52.346v-491.6h45.366v-47.981v-38.387C693.133,114.286,670.008,91.169,640.35,91.169z M285.713,47.981h202.84v43.188h-202.84V47.981z M599.349,721...
<|file_name|>qnetworkinterface_symbian.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) **<|fim▁hole|>** GNU Les...
** This file is part of the QtNetwork of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$
<|file_name|>issue-13808.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
<|file_name|>config.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #-*- coding: utf-8 -*- LOGIN_EMAIL = 'your@email.here' LOGIN_PASSWORD = 'your_password_here'<|fim▁hole|><|fim▁end|>
SUB_DOMAIN = 'www' DOMAIN = 'your-domain.here'
<|file_name|>qvfb_ru.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="ru"> <context> <name>AnimationSaveWidget</name> <message> <location filename="../tools/qvfb/qvfb.cpp" line="+850"/> <location line="+204"/> <source>Record...
<translation>Загрузить обложку пользователя...</translation> </message>
<|file_name|>ConductorUsageKind.java<|end_file_name|><|fim▁begin|>/** */ package CIM15.IEC61968.AssetModels; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.eclipse.emf.common.util.Enumerator; /** * <!-- begin-user-doc --> * A representation of the literals of the enumerat...
/** * An array of all the '<em><b>Conductor Usage Kind</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc -->
<|file_name|>noteRole.js<|end_file_name|><|fim▁begin|>"use strict"; var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property"); _Object$defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var noteRole = { abstract: false, accessibleNameReq...
requireContextRole: [], requiredContextRole: [], requiredOwnedElements: [], requiredProps: {},
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>""" Django settings for django_engage project. Generated by 'django-admin startproject' using Django 1.8.4. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see<|fim▁hole...
<|file_name|>instancelist-cli.py<|end_file_name|><|fim▁begin|><|fim▁hole|>""" package documentation """ from Automation.instancelist import main if __name__ == '__main__': main()<|fim▁end|>
#!/usr/bin/env python # -*- coding: utf-8 -*-
<|file_name|>ObjectFactory.java<|end_file_name|><|fim▁begin|>package itaf.WsUserTakeDeliveryAddressService; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlElementDecl; import javax.xml.bind.annotation.XmlRegistry; import javax.xml.namespace.QName; /** * This object contains factory methods f...
<|file_name|>cliente.rs<|end_file_name|><|fim▁begin|>use std::cmp::{Ordering, min}; use std::fs::File; use std::io::{BufWriter, Write, Read}; use chrono::{DateTime, NaiveDateTime, Utc}; use serializable::Serializable; use serializable::SerializeError; use byteorder::{ReadBytesExt, WriteBytesExt, BigEndian}; #[deriv...
impl PartialOrd for Cliente {
<|file_name|>test_bgp-community-alias.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2021 by # Donatas Abraitis <donatas.abraitis@gmail.com> # # Permission to use, copy, modify, and/or distribute this software # for any purpose with or without fee is hereby granted, provided # that the above cop...
for routern in range(1, 3): tgen.add_router("r{}".format(routern)) switch = tgen.add_switch("s1")
<|file_name|>models.py<|end_file_name|><|fim▁begin|>"""A collection of ORM sqlalchemy models for Caravel""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import re import functools import json import logging import r...
if granularity:
<|file_name|>localizer.js<|end_file_name|><|fim▁begin|>/** * Created with JetBrains WebStorm. * User: Dieter Beelaert * Date: 23/08/13 * Time: 11:42 * To change this template use File | Settings | File Templates. */ $(document).ready(function(){ localize(); }); function localize(){ $(".newEvent").html(lo...
$(".locUntil").html(localization.locUntil); $(".locLocation").html(localization.locLocation); $(".locOccurrence").html(localization.locOccurrence);
<|file_name|>js_i0lWZY61n-2X7sezox7DfNdyQ2tsrQFGHT9wlJhktj8.js<|end_file_name|><|fim▁begin|>(function ($) { Drupal.viewsSlideshow = Drupal.viewsSlideshow || {}; /** * Views Slideshow Controls */ Drupal.viewsSlideshowControls = Drupal.viewsSlideshowControls || {}; /** * Implement the play hook for con...
$(block).html("<td>"+ text + "</td><td>" + select + "</td><td><a href='' class='remove'>X</a></td>");
<|file_name|>ProtectedSwitch.py<|end_file_name|><|fim▁begin|># Copyright (C) 2010-2011 Richard Lincoln # # 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 without...
for y in value:
<|file_name|>Utils.ts<|end_file_name|><|fim▁begin|>export class Utils { public static isDevMode(): boolean { return process.env.NODE_ENV === 'development'; }<|fim▁hole|><|fim▁end|>
}
<|file_name|>OPaginatedClusterV1.java<|end_file_name|><|fim▁begin|>/* * Copyright 2010-2013 OrientDB LTD (info--at--orientdb.com) * * 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|>extent.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """The Virtual File System (VFS) extent.""" class Extent(object): """Extent. Attributes: extent_type (str): type of the extent, for example EXTENT_TYPE_SPARSE. offset (int): offset of the extent relative from the start of the fil...
<|file_name|>ldap_access.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under ...
<|file_name|>encounters.py<|end_file_name|><|fim▁begin|>from .plots import Plot,PlotError from .. import context from .. import items from .. import maps from .. import waypoints from .. import monsters from .. import dialogue from .. import services from .. import teams from .. import characters import random from .. ...
<|file_name|>0004_alter_tariff_access_zones.py<|end_file_name|><|fim▁begin|><|fim▁hole|> class Migration(migrations.Migration): dependencies = [ ('fares', '0003_auto_20210602_1534'), ] operations = [ migrations.AlterField( model_name='tariff', name='access_zones', ...
# Generated by Django 3.2.5 on 2021-08-17 19:45 from django.db import migrations, models
<|file_name|>WalkingState.rs<|end_file_name|><|fim▁begin|># order is: # Heading # Position # Orientation # Velocity # AngularVelocity # Relative Orientation # Relative Angular Velocity #---------------- # Heading -0.000295 # Root(pelvis) 0 0.943719 0 0.999705 0.001812 0.000000 -0.024203 0.085812 0.0...
0.986009 0.166690 0.000000 0.000000 -0.685415 0.000022 0.000004 # rKnee
<|file_name|>a1.py<|end_file_name|><|fim▁begin|>def b(): print("hooora!") dic1 = {1: 2, 1: 4} for i in dic1.items(): if 'a' == i: b() <|fim▁hole|><|fim▁end|>
else: break print ":("
<|file_name|>organisation_document.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Akvo RSR is covered by the GNU Affero General Public License.<|fim▁hole|># For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. from django.core.exceptions import ValidationError fr...
# See more details in the license.txt file located at the root folder of the Akvo RSR module.
<|file_name|>board.rs<|end_file_name|><|fim▁begin|>use board::chess::board; use board::chess::board::{ChessBoard, Piece, PieceType}; use board::chess::board::PieceType::*; use board::sjadam::mv::{SjadamMove, SjadamReverseMove}; use board::sjadam::move_gen; use chess_bitboard::bitboard::BitBoard; use chess_bitboard::bit...
#[cfg(not(feature = "legacy_sjadam_move_format"))]
<|file_name|>single_trace_analysis.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Single trace Analysis """ __author__ = "Yanlong Yin (yyin2@iit.edu)" __version__ = "$Revision: 1.4$" __date__ = "$Date: 02/08/2014 $" __copyright__ = "Copyright (c) 2010-2014 SCS Lab, IIT" __license__ = "Python" import sys,...
print 'The following signatures are detected:'
<|file_name|>testcrate.rs<|end_file_name|><|fim▁begin|>#![crate_type = "lib"] #[repr(C)]<|fim▁hole|> pub y: T, } pub extern "C" fn foo<T>(ts: TestStruct<T>) -> T { ts.y } #[link(name = "test", kind = "static")] extern "C" { pub fn call(c: extern "C" fn(TestStruct<i32>) -> i32) -> i32; }<|fim▁end|>
pub struct TestStruct<T> { pub x: u8,
<|file_name|>ItemKnife.java<|end_file_name|><|fim▁begin|>package net.einsteinsci.betterbeginnings.items; import net.einsteinsci.betterbeginnings.register.IBBName; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemTool; import java.ut...
res.add("knife");
<|file_name|>cpp_bundle_generator.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be<|fim▁hole|># found in the LICENSE file. import code import cpp_util from model import Platforms from schema_util imp...
<|file_name|>db.js<|end_file_name|><|fim▁begin|>const chalk = require('chalk'); const Sequelize = require('sequelize'); // db server constant(s) const dbName = 'relationshipVisualizer'; // +(process.env.NODE_ENV === 'testing' ? '_test' : '');<|fim▁hole|> // notify the user we're about to do it console.log(chalk.yellow...
const url = process.env.DATABASE_URL || `postgres://localhost:5432/${dbName}`;
<|file_name|>BitmapLruCache.java<|end_file_name|><|fim▁begin|>package com.isme.zteui.cache; import android.graphics.Bitmap; import android.support.v4.util.LruCache; import com.android.volley.toolbox.ImageLoader.ImageCache; /** * Title: Volley 的缓存类</br><br> * Description: </br><br> * Copyright: Copyright(c)2003</...
@Override
<|file_name|>MTGO-scry-bug-test.py<|end_file_name|><|fim▁begin|># Make your image, region, and location changes then change the from-import # to match. from configurables_akeeton_desktop import * import hashlib import java.awt.Toolkit import json import os import shutil import time Settings.ActionLogs = True Set...
TEMP_DIR_PREFIX = time.strftime("MTGO-scry-bug_%Y-%m-%d_%H-%M-%S", time.gmtime())
<|file_name|>dosta_ln_wfp_driver.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python <|fim▁hole|>@file marine-integrations/mi/dataset/driver/dosta_ln/wfp/dosta_ln_wfp.py @author Tapana Gupta @brief Driver for the dosta_ln_wfp instrument Release notes: Initial Release """ from mi.core.log import get_logger from mi...
""" @package mi.dataset.driver.dosta_ln.wfp
<|file_name|>test_prosody.py<|end_file_name|><|fim▁begin|>"""Test cltk.prosody.""" __license__ = 'MIT License. See LICENSE.'<|fim▁hole|>from cltk.prosody.latin.scanner import Scansion as ScansionLatin from cltk.prosody.latin.clausulae_analysis import Clausulae from cltk.prosody.greek.scanner import Scansion as Scansio...
<|file_name|>test_cropper.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from PIL import Image import unittest from pynayzr.cropper import crop, ttv, ftv, sets class TestCropBase(unittest.TestCase): def test_blank_base(self): base = crop.CropBase('base')<|fim▁hole|> self.assertEqual(base....
self.assertEqual(base.name, 'base') self.assertEqual(base.image, None)