prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>mac_tray.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # coding:utf-8 import os import sys current_path = os.path.dirname(os.path.abspath(__file__)) helper_path = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir, os.pardir, 'data', 'launcher', 'helper')) if __name__ == "__main__"...
elif proxy_setting == "disable": helperDisableAutoProxy(currentService)
<|file_name|>productIdentification-edit.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnDestroy, OnInit, Self, Inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { Subscription, combineLatest } from 'rxjs'; import { switchMap, map } from 'rxjs...
const { m, pull, x } = this.metaService; this.subscription = combineLatest(this.refreshService.refresh$)
<|file_name|>rsd.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2.7 ''' RSD: The reciprocal smallest distance algorithm. Wall, D.P., Fraser, H.B. and Hirsh, A.E. (2003) Detecting putative orthologs, Bioinformatics, 19, 1710-1711. Original author: Dennis P. Wall, Department of Biological Sciences, Stanford Univ...
for divEvalue, swappedOrthologs in swappedDivEvalueToOrthologs.items(): orthologs = [(query, subject, distance) for subject, query, distance in swappedOrthologs]
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Unit test suite for the models of the application.""" from nose.tools import eq_ from tg2express.model import DBSession from tg2express.tests import load_app from tg2express.tests import setup_db, teardown_db __all__ = ['ModelTest'] de...
obj = DBSession.query(self.klass).one()
<|file_name|>frontend.rs<|end_file_name|><|fim▁begin|>use std::io::{Read, Write, Stdin, stdin, Stdout, stdout}; use std::ops::Drop; use termion; use termion::{clear, color}; use termion::raw::IntoRawMode; use left_pad::leftpad; use cursor::Cursor; // The Frontend is responsible for rendering the state of the editor //...
termion::cursor::Left(1), termion::clear::UntilNewline).unwrap(); self.flush();
<|file_name|>user.py<|end_file_name|><|fim▁begin|>from rest_framework import status from rest_framework.decorators import detail_route, list_route from sigma_core.views.sigma_viewset import SigmaViewSet from sigma_core.importer import Sigma, load_ressource User = load_ressource("User") from django.core.mail import se...
# mail = reset_mail.copy() # mail['recipient_list'] = [user.email] # mail['message'] = mail['message'].format(email=user.email, password=password, name=user.get_full_name()) # send_mail(**mail)
<|file_name|>logger.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2014 Xiaomi.com, Inc. All Rights Reserved // @file logger.go // @author 王靖 (wangjing1@xiaomi.com) // @date 14-11-25 20:02:50 // @version $Revision: 1.0 $ // @brief package log import ( "crypto/rand" "fmt" "math/big" "path/filepath" "runt...
<|file_name|>tools.py<|end_file_name|><|fim▁begin|>''' base tools ''' # -*- coding: utf-8 -*- import re def is_ipv4(ip) : pattern = r'^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$' matcher = re.match(pattern, ip) if matcher is not None : return ...
def is_domain(domain) : pattern = r'[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?' matcher = re.match(pattern, domain) if matcher is not None :
<|file_name|>config.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- version=0.2 visitedVersion=0.2 enableNotification=True isFirstStart=True countClickUp=0 langList=['English','Russian'] searchEngines=['Google','Bing','Yahoo','Yandex'] defaultSearchEngine=0 defaultLangFrom='Auto' defaultLangTo='Russian' useCont...
'ko ':'Korean', 'ko-kr':'Korean (Korea)', 'nb-no':'Norwegian (Norway)', 'nl':'Dutch',
<|file_name|>checkbox.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../node_modules/forms-js/dist/forms-js.d.ts" /> /// <reference path="../utils/input-helpers.ts" /> module adaptor.directives { export function CheckboxDirective($log:ng.ILogService):ng.IDirective { <|fim▁hole|> templateUrl: '/templat...
return { require: '^fjsForm', restrict: 'EA',
<|file_name|>range.rs<|end_file_name|><|fim▁begin|>use std::borrow::Borrow; use std::collections::HashSet; use enums::Direction; use structs::Point; use traits::travel::Travel; use traits::range::Base; /// Trait wrapping range implementation pub trait Range: Borrow<Point> { /// Find the points within the provided m...
assert!(set.contains(&Point(2, 1, 5))); assert!(set.contains(&Point(1, 2, 4))); assert!(set.contains(&Point(1, 2, 6)));
<|file_name|>create_db.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. import sys import os.path import re import operator <|fim▁hole|>import digits from digits import utils from digits.utils import subclass, override from digits.task import Task # NOTE: Increment ...
<|file_name|>angular-mocks.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for Angular JS 1.3 (ngMock, ngMockE2E module) // Project: http://angularjs.org // Definitions by: Diego Vilar <http://github.com/diegovilar>, Tony Curtis <http://github.com/daltin> // Definitions: https://github.com/DefinitelyTyped/Definit...
<|file_name|>GSPoints_Distances.cpp<|end_file_name|><|fim▁begin|>/********************************************************** * Version $Id: GSPoints_Distances.cpp 1921 2014-01-09 10:24:11Z oconrad $ *********************************************************/ ///////////////////////////////////////////////////////////...
);
<|file_name|>TestProtocolBuffersDeserializers.java<|end_file_name|><|fim▁begin|>package org.jsense.serialize; import com.google.common.collect.ImmutableList; import org.joda.time.Instant; import org.joda.time.ReadableInstant; import org.jsense.AccelerometerEvent; import org.jsense.ModelFactory; import org.junit.Before...
<|file_name|>ident.rs<|end_file_name|><|fim▁begin|>use super::error::TomlHelper; use log::error; use regex::Regex; use std::fmt; use toml::Value; #[derive(Clone, Debug)] pub enum Ident { Name(String), Pattern(Box<Regex>), } impl fmt::Display for Ident { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Re...
.map(Box::new)
<|file_name|>run_qap_func.py<|end_file_name|><|fim▁begin|>""" run quality assurance measures on functional data """ import sys,glob sys.path.append('/corral-repl/utexas/poldracklab/software_lonestar/quality-assessment-protocol') import os import numpy from run_shell_cmd import run_shell_cmd from compute_fd import comp...
mean_func_data = calc_mean_func(func_file) func_mask = load_mask(mask_file)
<|file_name|>DurationRangeJsonUnmarshaller.java<|end_file_name|><|fim▁begin|>/* * Copyright 2014-2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License...
private static DurationRangeJsonUnmarshaller instance;
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/*! * Normalization processes a parse tree until it is in suitable form to * be converted to the more canonical form. This is done as a series of * passes, each contained in their own module below. */ use grammar::parse_tree as pt; use grammar::repr as r; pub type ...
<|file_name|>CoordinateMap.java<|end_file_name|><|fim▁begin|>// Copyright 2012 Google Inc. All Rights Reserved. //<|fim▁hole|>// // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS...
// 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|>tell.py<|end_file_name|><|fim▁begin|>import re from .. import irc, var, ini from ..tools import is_identified # Require identification with NickServ to send messages. def ident (f): def check (user, channel, word): if is_identified(user): f(user, channel, word) else: irc.msg(channel, "{}: Iden...
if len(word) < 3: irc.msg(channel, "{}: Wrong syntax. Check .help".format(user)) return
<|file_name|>pagers.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # 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 # # http://www.apache.org/licenses/...
<|file_name|>getifaddrs.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 MaidSafe.net limited. // // This SAFE Network Software is licensed to you under (1) the MaidSafe.net Commercial License, // version 1.0 or later, or (2) The General Public License (GPL), version 3, depending on which // licence you accepted on in...
<|file_name|>TextArea.tsx<|end_file_name|><|fim▁begin|>import React from 'react'; import { TMemo } from '@shared/components/TMemo'; import { Input, Form } from 'antd'; import type { FastFormFieldComponent } from '@shared/components/FastForm/field'; import { getValidateStatus } from '../utils'; export const FastFormTex...
}); FastFormTextArea.displayName = 'FastFormTextArea';
<|file_name|>CommentDialog.java<|end_file_name|><|fim▁begin|>package com.malalaoshi.android.ui.dialogs; import android.content.Context; import android.os.Bundle; import android.support.annotation.NonNull; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; import android.view....
@Bind(R.id.et_comment_dialog_input)
<|file_name|>users.py<|end_file_name|><|fim▁begin|>""" :synopsis: user-centric views for askbot This module includes all views that are specific to a given user - his or her profile, and other views showing profile-related information. Also this module includes the view listing all forum users. """ import calendar im...
<|file_name|>grid.locale-da.js<|end_file_name|><|fim▁begin|>;(function($){ /** * jqGrid Danish Translation * Aesiras A/S * http://www.aesiras.dk * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html **/ $.jgrid = $.jgrid || {}; ...
caption: "Vis/skjul kolonner",
<|file_name|>ru_bcv_parser.js<|end_file_name|><|fim▁begin|>// Generated by CoffeeScript 1.9.1 (function() { var bcv_parser, bcv_passage, bcv_utils, root, hasProp = {}.hasOwnProperty; root = this; bcv_parser = (function() { bcv_parser.prototype.s = ""; bcv_parser.prototype.entities = []; bcv_pa...
if (s6 === peg$FAILED) { s6 = peg$parsebc_title(); if (s6 === peg$FAILED) { s6 = peg$parseps151_bcv();
<|file_name|>whois_ati_tn.py<|end_file_name|><|fim▁begin|>from .base import ScannerBase class WhoisAtiTnScanner(ScannerBase): def __init__(self, *args): super(WhoisAtiTnScanner, self).__init__(*args) self._tokenizer += [ 'skip_empty_line', 'scan_available', 'sca...
self._ast['status:available'] = True return True def scan_disclaimer(self):
<|file_name|>ArtistIDsOptionsScreen.tsx<|end_file_name|><|fim▁begin|>import { StackScreenProps } from "@react-navigation/stack" import { ArtworkFilterNavigationStack } from "app/Components/ArtworkFilter" import { ArtworksFiltersStore } from "app/Components/ArtworkFilter/ArtworkFilterStore" import React from "react" imp...
if (filterType === "saleArtwork") {
<|file_name|>Main.java<|end_file_name|><|fim▁begin|>package be.kwakeroni.workshop.java9.solution; import java.io.IOException; import java.io.UncheckedIOException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Arrays; import java.util.List; public class Main { public static void main(Str...
new Main().handleFiles(args);
<|file_name|>manage.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "QiuDaBao.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)<|fim▁end|>
#!/usr/bin/env python
<|file_name|>car.js<|end_file_name|><|fim▁begin|>/* Um carro, e só */ class Car { constructor(posx, posy, width, height, lifeTime, color) { <|fim▁hole|> this.width = width; this.height = height; this.im = new Image(); this.im.src = carSprite.src; } draw(ctx) { ...
this.x = posx; this.y = posy; this.lifeTime = lifeTime; this.color = color;
<|file_name|>camera3.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python3 import asyncio import subprocess import numpy as np import time comm = None class Camera: def __init__(self, notify): self._process = None self._now_pos = np.array([0., 0., 0.]) self._running = False self...
stdout=asyncio.subprocess.PIPE )
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # MDAnalysis --- https://www.mdanalysis.org # Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors # (see the file AU...
It allows one to read molecular dynamics trajectories and access the
<|file_name|>ListMapper.java<|end_file_name|><|fim▁begin|>package jkanvas.table; import java.util.Objects; import jkanvas.animation.GenericPaintList; /** * Maps rows of tables to shapes. * * @author Joschi <josua.krause@gmail.com> * @param <T> The list of shapes. */ public abstract class ListMapper<T extends G...
private T fillList() { final T res = createList();
<|file_name|>nexthop_gendecoder.go<|end_file_name|><|fim▁begin|>// Code generated - DO NOT EDIT. package topology import ( "github.com/skydive-project/skydive/graffiti/getter" "strings" ) func (obj *NextHop) GetFieldBool(key string) (bool, error) { return false, getter.ErrFieldNotFound } func (obj *NextHop) GetF...
<|file_name|>list.controller.ts<|end_file_name|><|fim▁begin|>class ListController implements ng.IComponentController { private itemsList: Array<any>; private sortType: string; private sortReverse: Boolean; constructor($stateParams) { console.log('list controller'); console.log("this.ite...
ListController.$inject = ['$stateParams'];
<|file_name|>TirageModele.py<|end_file_name|><|fim▁begin|>from google.appengine.ext import ndb class Tirage(ndb.Model):<|fim▁hole|><|fim▁end|>
nomtirage = ndb.StringProperty() datecreation = ndb.DateTimeProperty(auto_now_add=True)
<|file_name|>complete_byte_raw_string_quotes.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>fn main() { br###<caret> }<|fim▁end|>
<|file_name|>set.cc<|end_file_name|><|fim▁begin|>// Copyright (C) 2003-2015 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library 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 Soft...
<|file_name|>p4.cpp<|end_file_name|><|fim▁begin|>#include <set> #include <map> #include <string> #include <vector> #include <queue> #include <stack> #include <cmath> #include <list> #include <cassert> #include <climits> #include <cstring> #include <cstdio> #include <cstdlib> #include <cctype> #include <fstream> #includ...
typedef vector<VI> VVI; typedef vector<LL> VLL;
<|file_name|>string.cpp<|end_file_name|><|fim▁begin|>#include <string.hpp> #include "yatf/include/yatf.hpp" using namespace yacppl; TEST(string, can_be_created) { string str; REQUIRE(str == ""); REQUIRE(str.empty()); REQUIRE_EQ(str.length(), 0u); REQUIRE_EQ(str.size(), 0u); REQUIRE_FALSE(str =...
REQUIRE(str == "some"); str = string("some very, very, very long string"); REQUIRE(str == "some very, very, very long string");
<|file_name|>DbC_methods_with_both_pre_and_post.py<|end_file_name|><|fim▁begin|># coding:ascii """ Example usage of DbC (design by contract) In this example we show you how to use pre- and post-condition checkers decorating the same function. """ import os import sys sys.path.insert(0, os.path.abspath('..')) import ...
try: # negative pairoff(4,2, -1,2) except AssertionError as e:
<|file_name|>resnet_model_fast.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2022 The Google Research 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....
_BATCH_NORM_DECAY = 0.9 _BATCH_NORM_EPSILON = 1e-5 DEFAULT_VERSION = 2 DEFAULT_DTYPE = tf.float32
<|file_name|>anpa_formatter.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at ...
anpa.append((b'\x20' + take_key) if len(take_key) > 0 else b'') anpa.append(b'\x0D\x0A')
<|file_name|>stars.py<|end_file_name|><|fim▁begin|># x = [4, 6, 1, 3, 5, 7, 25] # def stars (a): # i = 0 # while (i < len(a)): # print '*' * a[i] # i += 1 # stars(x) <|fim▁hole|> i = 0 while (i < len(a)): if type(a[i]) is int: print '*' * a[i] i+=1 else: temp = a[i] temp = temp.lower() print...
x = [4, "Tom", 1, "Michael", 5, 7, "Jimmy Smith"] def stars (a):
<|file_name|>Footer.js<|end_file_name|><|fim▁begin|>/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import...
<|file_name|>steps.py<|end_file_name|><|fim▁begin|># This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will...
<|file_name|>stylist.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/. */ //! Selector matching. use {Atom, LocalName, Namespace}; use...
true }
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>use std::env; use std::path::PathBuf; fn main() { let target = env::var("TARGET").unwrap(); if target.contains("pc-windows") { let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()); let mut lib_dir = manifest_dir.clone(); ...
dll_dir.push("gnu-mingw"); } lib_dir.push("lib"); dll_dir.push("dll");
<|file_name|>DropdownAction.ts<|end_file_name|><|fim▁begin|>import ActionInterface from "@enhavo/app/action/ActionInterface"; import AbstractAction from "@enhavo/app/action/model/AbstractAction";<|fim▁hole|>{ items: ActionInterface[]; closeAfter: boolean; execute(): void { } }<|fim▁end|>
export default class DropdownAction extends AbstractAction
<|file_name|>test_types.py<|end_file_name|><|fim▁begin|># Copyright 2011 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 of the License at # # http:...
id=42, )
<|file_name|>extern-fail.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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.or...
}
<|file_name|>explicit_self_xcrate.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.apach...
// option. This file may not be copied, modified, or distributed // except according to those terms. pub trait Foo {
<|file_name|>test_structural.py<|end_file_name|><|fim▁begin|>""" Tests for structural time series models Author: Chad Fulton License: Simplified-BSD """ from __future__ import division, absolute_import, print_function import numpy as np import pandas as pd import os import warnings from statsmodels.datasets import m...
def test_local_linear_deterministic_trend():
<|file_name|>test_s3_file_transform.py<|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 ...
@mock_s3 def test_execute_with_transform_script_args(self, mock_popen): self.mock_process(mock_popen, process_output=[b"Foo", b"Bar", b"Baz"])
<|file_name|>galleries.js<|end_file_name|><|fim▁begin|>const keystone = require('keystone'); const Types = keystone.Field.Types; const Gallery = new keystone.List('Gallery', { autokey: { path: 'slug', from: 'title', unique: true }, map: { name: 'title' }, defaultSort: 'order' }); Gallery.add({ title: ...
<|file_name|>blob.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ //! Support for converting Mononoke data structures into in-memory blobs. use anyhow::Re...
<|file_name|>contact_me.js<|end_file_name|><|fim▁begin|>$(function() { $("input,textarea").jqBootstrapValidation({ preventSubmit: true, submitError: function($form, event, errors) { // additional error messages or events }, submitSuccess: function($form, event) { ...
<|file_name|>cycle_basis.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ cycle_basis.py functions for calculating the cycle basis of a graph """ from numpy import * import networkx as nx import matplotlib import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.path import Path if...
(Areas of other connected components) This assumes that the cycle is one large cycle containing
<|file_name|>win_file.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licens...
# You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
<|file_name|>Assertion.js<|end_file_name|><|fim▁begin|>if (typeof parseRegExp === 'undefined') quit(); load(libdir + "regexp_parse.js"); test_mix("^", no_multiline_flags, Assertion("START_OF_INPUT")); test_mix("^", multiline_flags, Assertion("START_OF_LINE")); test_mix("$", no_multiline_flags, ...
test_mix("\\b", all_flags, Assertion("BOUNDARY"));
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Openslide(AutotoolsPackage): """OpenS...
depends_on('cairo+pdf') depends_on('gdk-pixbuf')
<|file_name|>simulationCanvas.py<|end_file_name|><|fim▁begin|>from kivy.uix.floatlayout import FloatLayout from kivy.properties import NumericProperty, ObjectProperty from kivy.graphics import Color, Ellipse, Line from kivy.graphics.transformation ...
<|file_name|>feature_column.py<|end_file_name|><|fim▁begin|># Copyright 2015 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.ap...
trainable=True, output_rank=2): if output_rank != 2: raise ValueError("BucketizedColumn currently only supports output_rank=2")
<|file_name|>Explorer.java<|end_file_name|><|fim▁begin|>/* */ package com.webbuilder.interact; /* */ /* */ import com.webbuilder.controls.Query; /* */ import com.webbuilder.utils.CompressUtil; /* */ import com.webbuilder.utils.DateUtil; /* */ import com.webbuilder.utils.DbUtil; /* */ ...
/* 737 */ String dir = StringUtil.replace(file.getAbsolutePath(), "\\", "/"); /* 738 */ if (StringUtil.isEmpty(name))
<|file_name|>cargo_rerast_tests.rs<|end_file_name|><|fim▁begin|>use assert_cmd::prelude::*; use predicates::prelude::*; use std::process::Command; fn cargo_rerast(crate_root: &str) -> Command { // We can't use Assert.current_dir, because then Assert::cargo_binary doesn't work, instead we // pass the crate root...
let mut cmd = Command::cargo_bin("cargo-rerast").unwrap(); cmd.arg("rerast").arg("--crate_root").arg(crate_root); cmd
<|file_name|>howto-logging.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import time,os,re,csv,sys,uuid,joblib from datetime import date import numpy as np from sklearn import svm from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report...
return(y_pred) if __name__ == "__main__":
<|file_name|>geometry.rs<|end_file_name|><|fim▁begin|>use byteorder::{ReadBytesExt, LittleEndian}; use super::{Section, Struct, Result, Error, ReadExt, Stream}; use super::{Vec3, Uv, Sphere, Rgba}; use super::{Material, MaterialList, Extension}; use std::rc::Rc; /// Holds a list of `Geometry`s to be passed around. #[...
Ok(Geometry {
<|file_name|>DestroyEntitiesMessage.java<|end_file_name|><|fim▁begin|>package net.glowstone.net.message.play.entity; import com.flowpowered.network.Message; import java.util.List; import lombok.Data; <|fim▁hole|>public final class DestroyEntitiesMessage implements Message { private final List<Integer> ids; }<|fi...
@Data
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.urlresolvers import reverse from django.db import models, transaction, DatabaseError from django.template.defaultfilters import slugify from django.utils.encoding import python_2_unicode...
from pybb.profiles import PybbProfile from pybb.util import unescape, FilePathGenerator, _get_markup_formatter from annoying.fields import AutoOneToOneField
<|file_name|>packet.rs<|end_file_name|><|fim▁begin|>//! SIMD intersection result use crate::geometry::{f32xN, m32xN, V3DxN}; use crate::intersection::Isect; /// Intersection result #[derive(Copy, Clone, Debug)] pub struct IsectxN { pub t: f32xN, pub p: V3DxN, pub n: V3DxN, pub hit: m32xN, } <|fim▁hole...
impl Default for IsectxN { #[inline] fn default() -> Self { Self {
<|file_name|>VBoxGuest-win.cpp<|end_file_name|><|fim▁begin|>/* $Id: VBoxGuest-win.cpp $ */ /** @file * VBoxGuest - Windows specifics. */ /* * Copyright (C) 2010-2015 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free ...
/** * One DPC latency sample.
<|file_name|>main.js<|end_file_name|><|fim▁begin|>angular.module('editor', [ 'ui.router', 'editor.conf.persistence', 'editor.conf.loadingbar', 'editor.views.recipes', 'editor.views.recipes.recipe', 'editor.views.recipes.sheet', 'editor.views.ingredients', 'editor.views.equipments', 'editor.views.equip...
$urlMatcherFactoryProvider.strictMode(false); }]);
<|file_name|>userController.js<|end_file_name|><|fim▁begin|>var express = require('express'); var userRouter = express.Router(); var passport = require('passport'); var Model = require('../models/user'); var authenticate = require('./auth'); <|fim▁hole|> /* GET all the users */ exports.getAll = function(req, res, next)...
<|file_name|>test_api.py<|end_file_name|><|fim▁begin|><|fim▁hole|> def test_api_endpoint_existence(todolist_app): with todolist_app.test_client() as client: resp = client.get('/tasks') assert resp.status_code == 200 def test_task_creation(todolist_app): with todolist_app.test_client() as client: resp = client....
import requests import json
<|file_name|>prev-button.js<|end_file_name|><|fim▁begin|>import React from 'react'; import cn from 'classnames'; import keyboardJS from 'keyboardjs'; import ReactTooltip from 'react-tooltip'; import sendToAddon from '../client-lib/send-to-addon'; export default class PrevButton extends React.Component { constructor(...
// in history. Resets when timeout wears out.
<|file_name|>TestProject.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (C) 2007, Robin Rosenberg <robin.rosenberg@dewire.com> * Copyright (C) 2006, Shawn O. Pearce <spearce@spearce.org> * * All rights reserved. This program and the acc...
buf.toString(), false, null);
<|file_name|>settings.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
CONGRESS_API_KEY = ""
<|file_name|>0079_convert_species_null_values_to_empty_strings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): for field in ('species', '...
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
<|file_name|>AssetLoader.java<|end_file_name|><|fim▁begin|>package com.slicer.utils; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.audio.Sound; import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.Texture; public class AssetLoader { public static Texture bgGame, bgGameOver, bgFinish,...
bgGame = new Texture(Gdx.files.internal("data/images/bg1.jpeg"));
<|file_name|>swarmingserver_bot_fake.py<|end_file_name|><|fim▁begin|># Copyright 2014 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import base64 import copy import json import os import sys import threading ...
"""Flatten a list of task updates into a single result. This is more or less the equivalent of what task_scheduler.bot_update_task() would do after all the bot API calls.
<|file_name|>events.py<|end_file_name|><|fim▁begin|>from flask import g from flask.ext.restplus import Namespace, reqparse, marshal from app.api.attendees import TICKET from app.api.microlocations import MICROLOCATION from app.api.sessions import SESSION from app.api.speakers import SPEAKER from app.api.sponsors impor...
return BaseDAO.update(self, event_id, payload, validate=False) LinkDAO = SocialLinkDAO(SocialLinkModel, SOCIAL_LINK_POST)
<|file_name|>bitcoin_et.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="et" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="14"/> <source>About Bitcoin</source> ...
<location filename="../forms/verifymessagedialog.ui" line="20"/> <source>Enter the message and signature below (be careful to correctly copy newlines, spaces, tabs and other invisible characters) to obtain the Bitcoin address used to sign the message.</source>
<|file_name|>test_setup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Setup/installation tests for this package.""" from ade25.assetmanager.testing import IntegrationTestCase from plone import api class TestInstall(IntegrationTestCase): """Test installation of ade25.assetmanager into Plone.""" ...
# browserlayer.xml
<|file_name|>vec3.rs<|end_file_name|><|fim▁begin|>// vec3.rs fn main() { let mut v1 = vec![10,20,30,40]; v1.pop(); let mut v2 = Vec::new(); v2.push(10); v2.push(20); v2.push(30); assert_eq!(v1,v2); <|fim▁hole|> assert_eq!(v2,&[10,20,30,0,1]); }<|fim▁end|>
v2.extend(0..2);
<|file_name|>photometry.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import numpy as np from astropy.io import fits import scipy.ndimage import scipy.fftpack import scipy.optimize def getcentroid(coordinates, values): """ Image centroid from image points im that match with a 2-d array pos, which ...
eroded_signal = binary_erosion(signal) signal = binary_propagation(eroded_signal,mask=signal)
<|file_name|>FaultLocalizationTransitionRelation.java<|end_file_name|><|fim▁begin|>package bixie.checker.transition_relation; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import bixie.boogie.controlflow.AbstractControlFlowFactory; import bixie.boo...
/**
<|file_name|>loginEvent.py<|end_file_name|><|fim▁begin|>import userHelper import serverPackets import exceptions import glob import consoleHelper import bcolors import locationHelper import countryHelper import time import generalFunctions import channelJoinEvent def handle(flaskRequest): # Data to return responseTo...
print("> Processing login request for {}...".format(loginData[0])) try:
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>class MiddlewareMixin(object): def __init__(self, get_response=None):<|fim▁hole|><|fim▁end|>
super(MiddlewareMixin, self).__init__()
<|file_name|>MainActivity.java<|end_file_name|><|fim▁begin|>package com.ticktick.testimagecropper; <|fim▁hole|>import java.io.FileNotFoundException; import java.io.InputStream; import com.ticktick.imagecropper.CropImageActivity; import com.ticktick.imagecropper.CropIntent; import android.app.Activity; import android....
import java.io.File;
<|file_name|>Track.py<|end_file_name|><|fim▁begin|>from src.deenuxapi.deezer.Model import Model from src.deenuxapi.deezer.model.Artist import Artist class Track(Model): """ Contains information about a track. """ def __init__(self, id: int, title: str, artist: Artist, duration: int = -1): ""...
@property def duration(self):
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-2013 Elanz (<http://www.openelanz.fr>). # # This program is free software: you can redis...
############################################################################## import wizard
<|file_name|>impl.go<|end_file_name|><|fim▁begin|>/* Copyright IBM Corp. 2016 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/LI...
func (cu *cursor) ReadyChan() <-chan struct{} {
<|file_name|>model_control_one_enabled_Integration_MovingAverage_Seasonal_WeekOfYear_AR.py<|end_file_name|><|fim▁begin|>import tests.model_control.test_ozone_custom_models_enabled as testmod <|fim▁hole|><|fim▁end|>
testmod.build_model( ['Integration'] , ['MovingAverage'] , ['Seasonal_WeekOfYear'] , ['AR'] );
<|file_name|>consistency_check.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 TiKV Project Authors. Licensed under Apache-2.0. use std::cmp::Ordering; use std::convert::TryInto; use std::marker::PhantomData; use std::sync::atomic::{AtomicU64, Ordering as AtomicOrdering}; use std::sync::Arc; use crate::storage::mvc...
fn on_write(&mut self, key: &[u8], value: &[u8]) -> Result<bool> { let (prefix, commit_ts) = box_try!(Key::split_on_ts_for(key));
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Validators for wx widgets. Copyright (c) Karol Będkowski, 2006-2013 This file is part of wxGTD This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by th...
<|file_name|>np_array_ops.py<|end_file_name|><|fim▁begin|># Copyright 2020 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.apac...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from base import ChoicesEnum<|fim▁hole|>from _version import __version__<|fim▁end|>