prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>phonopy.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # @Author: YangZhou # @Date: 2017-06-16 20:09:09 # @Last Modified by: YangZhou # @Last Modified time: 2017-06-27 16:02:34 from aces.tools import mkdir, mv, cd, cp, mkcd, shell_exec,\ exists, write, passthru, toString, pwd, debug, ls, ...
files = map(lambda x: x.replace('dir_', ''), files) # when the number of files >1000, the order is wrong ,POSCAR-001,
<|file_name|>config.ts<|end_file_name|><|fim▁begin|><|fim▁hole|> function config($stateProvider, $urlRouterProvider) { $urlRouterProvider.otherwise('/'); $stateProvider .state('root', { url: "/", views: { header: { templateUrl: 'view/header.html', ...
import {name as headerControlledName} from './controller/HeaderController';
<|file_name|>Worker.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) Martin Kinkelin * * See the "License.txt" file in the root directory for infos * about permitted and prohibited uses of this code. */ #include <algorithm> #include <iostream> #include <locale> #include "Worker.h" #include "StringUt...
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>/* * grunt-simple-templates * https://github.com/jclem/grunt-simple-templates<|fim▁hole|> * Licensed under the MIT license. */ 'use strict'; module.exports = function(grunt) { // Project configuration. grunt.initConfig({ jshint: { all: [ ...
* * Copyright (c) 2013 Jonathan Clem
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var through = require('through2'); var escapeStr = require('js-string-escape'); var STYLE_HEADER = '!function(){var a="'; var STYLE_FOOTER = '",b=document.createElement("style");b.type="text/css",b.styleSheet?b.styleSheet.cssText=a:b.appendChild(document.createTextN...
return through.obj(transform); }
<|file_name|>rsqrt.rs<|end_file_name|><|fim▁begin|>#![feature(cfg_target_feature, link_llvm_intrinsics, platform_intrinsics, simd_ffi, test)] extern crate hagane_simd; extern crate test; use hagane_simd::*; use test::*; #[cfg(target_feature = "sse")] extern "platform-intrinsic" { fn x86_mm_sqrt_ps(x: float4) -> fl...
#[cfg(target_feature = "sse")] #[bench]
<|file_name|>ShipDamageDiff.ts<|end_file_name|><|fim▁begin|>/// <reference path="BaseBattleDiff.ts"/> module TK.SpaceTac { /** * A ship takes damage (to hull or shield) * * This is only informative, and does not apply the damage on ship values (there are ShipValueDiff for this). */ export ...
this.shield = shield;
<|file_name|>test_executor.py<|end_file_name|><|fim▁begin|>import daisychain.steps.input from daisychain.executor import Executor, Execution, ExecutorAborted, ConsoleInput, CheckStatusException from . import test_step from mock import patch import py3compat if py3compat.PY2: input_function = 'daisychain.steps.inpu...
return responses[times_called - 1]
<|file_name|>v1_1_0.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:2e4cfe75feb71c39771595f8dea4f59e216650e0454f3f56a2a5b38a062b94cf<|fim▁hole|><|fim▁end|>
size 1360
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>## All rights reserved ## ############################################# from pyxer.base import * @controller def index(): return "/index"<|fim▁end|>
# -*- coding: UTF-8 -*- ############################################# ## (C)opyright by Dirk Holtwick, 2008 ##
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>extern crate gcc; <|fim▁hole|>fn main () { println!("cargo:rustc-flags=-lstdc++"); }<|fim▁end|>
<|file_name|>Main.js<|end_file_name|><|fim▁begin|>// @Bind #menu1.#menuItem2.onClick !function() { dorado.MessageBox.alert("Dorado7.0 快速入门"); }; // @Bind #tree1.onDataRowClick !function(self) { // 定义Tab变量 var tab = {}; // self 代表事件所属的控件,此处指 Tree对象 // self.get("currentNode")表示获取当前被点击的节点。 with (self.get...
tab = addTab(tab); } // 设定当前的Tab为制定的tab set("currentTab", tab);
<|file_name|>test_users.py<|end_file_name|><|fim▁begin|>""" Tests for the LTI user management functionality """ import string from django.contrib.auth.models import User from django.core.exceptions import PermissionDenied from django.test import TestCase from django.test.client import RequestFactory from mock import ...
user = users.LtiBackend().get_user(-1) self.assertIsNone(user)
<|file_name|>mem.go<|end_file_name|><|fim▁begin|>package capn import ( "bytes" "encoding/binary" "errors" "io" "math" ) var ( errBufferCall = errors.New("capn: can't call on a memory buffer") ErrInvalidSegment = errors.New("capn: invalid segment id") ErrTooMuchData = errors.New("capn: too much data in ...
}
<|file_name|>fs.ts<|end_file_name|><|fim▁begin|>export interface FS {<|fim▁hole|> existsSync: (filepath: string) => boolean; /** read a file asynchronously */ readFile: (filepath: string) => Promise<string>; /** read a file synchronously */ readFileSync: (filepath: string) => string; /** resolve a file again...
/** check if a file exists asynchronously */ exists: (filepath: string) => Promise<boolean>; /** check if a file exists synchronously */
<|file_name|>FakeQuantWithMinMaxVars.java<|end_file_name|><|fim▁begin|>package org.nd4j.linalg.api.ops.impl.transforms.custom; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.autodiff.samediff.SameDiff; import org.nd4j.base.Preconditions; import org.nd4j.linalg.api.buffer.DataType; import org.nd4j.linalg...
<|file_name|>coerce-date-property.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google LLC All Rights Reserved.<|fim▁hole|> */ import {DateAdapter} from '@angular/material/core'; /** * Function that attempts to coerce a value to a date using a DateAdapter. Date instances, null, * and undefined will ...
* * 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
<|file_name|>TextRank4Keyword.py<|end_file_name|><|fim▁begin|>#-*- encoding:utf-8 -*- ''' Created on Nov 30, 2014 @author: letian ''' import networkx as nx from Segmentation import Segmentation import numpy as np class TextRank4Keyword(object): def __init__(self, stop_words_file = None, delimiters = '?!;?!。;...
<|file_name|>test.py<|end_file_name|><|fim▁begin|>from test_support import * <|fim▁hole|>prove_all(prover=["plop"], opt=["--why3-conf=test.conf"])<|fim▁end|>
# this test calls a prover which is correctly configured but whose execution # gives an error (here: the prover executable doesn't exist). The intent is to # test the output of gnatprove in this specific case
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::fs::File; use std::io::{Read, Write}; use system::scheme::{Packet, Scheme}; extern crate system; <|fim▁hole|>} fn main() { //In order to handle example:, we create :example let mut scheme = File::create(":example").unwrap(); loop { let mut pa...
struct ExampleScheme; impl Scheme for ExampleScheme {
<|file_name|>LightAttribute.java<|end_file_name|><|fim▁begin|>package es.upm.oeg.farolapi.model; import lombok.Data; import lombok.ToString; import java.util.Arrays; import java.util.List; /** * Created on 23/05/16: * * @author cbadenes */ @Data @ToString (callSuper = true) public class LightAttribute extends At...
} }
<|file_name|>test_filters.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.models import User from django.test import TestCase from dcim.choices import * from dcim.filters import * from dcim.models import ( Cable, ConsolePort, ConsolePortTemplate, ConsoleServerPort, ConsoleServerPortTemplate, Device, Devic...
<|file_name|>tags.py<|end_file_name|><|fim▁begin|>from django.test import TestCase from score.templatetags.score_tags import display_score <|fim▁hole|> def test_none(self): assert "?" in display_score(None) def test_danger(self): assert "danger" in display_score("30") def test_warning(sel...
class TestDisplayScore(TestCase): def test_string(self): assert "?" in display_score("")
<|file_name|>GR32_RepaintOpt.cpp<|end_file_name|><|fim▁begin|>//unit GR32_RepaintOpt; #include "stdafx.h" #include "GR32_RepaintOpt.h" void InflateArea(var Area: TRect; Dx, Dy: Integer); { if Area.Left > Area.Right then Dx := -Dx; if Area.Top > Area.Bottom then Dy := -Dy; Dec(Area.Left,...
<|file_name|>util.js<|end_file_name|><|fim▁begin|>/** * Module util.js * Its static common helpers methods */ (function (window) { if (!Array.isArray) { Array.isArray = function (arg) { return Object.prototype.toString.call(arg) === '[object Array]'; }; } var util = {}; ...
var dx = point2.x - point1.x; var dy = point2.y - point1.y;
<|file_name|>queue.rs<|end_file_name|><|fim▁begin|>use collections::vec::Vec; /// A FIFO Queue pub struct Queue<T> { /// The queue as a vector pub vec: Vec<T>, } impl<T> Queue<T> { /// Create new queue pub fn new() -> Self { Queue { vec: Vec::new() } } /// Push element to queue pu...
} }
<|file_name|>Cleaner.py<|end_file_name|><|fim▁begin|># vim: ts=4:sw=4:expandtab # BleachBit # Copyright (C) 2008-2017 Andrew Ziem # https://www.bleachbit.org # # 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 Softwa...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub use self::circular::Circular2d;<|fim▁hole|>pub use self::sunflower::SunflowerSeed2d; mod circular; mod sunflower;<|fim▁end|>
<|file_name|>newTests.js<|end_file_name|><|fim▁begin|>"use strict" const should = require('should') const rewire = require('rewire') const IC = rewire('../commands/new.js') describe('New command',() => { let mockFS = { outputFile : (filename,content) => { console.log(`mock writing to ${filename}`); ...
<|file_name|>BasicAuthCallBackHandler.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. *...
import javax.servlet.http.HttpServletRequest;
<|file_name|>function-declaration.js<|end_file_name|><|fim▁begin|>function foo() { console.log('foo');<|fim▁hole|><|fim▁end|>
}
<|file_name|>protocol.py<|end_file_name|><|fim▁begin|><|fim▁hole|>__params__ = {'la': 32, 'lb': 32, 'da': 10} def protocol(client, server, params): la = params['la'] lb = params['lb'] da = params["da"] server.a = UnsignedVec(bitlen=la, dim=da).input(src=driver, desc="a") server.b = Unsigned(bitlen...
# -*- coding: utf-8 -*-
<|file_name|>assign_wizard.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################### # # ODOO (ex OpenERP) # Open Source Management Solution # Copyright (C) 2001-2015 Micronaet S.r.l. (<https://micronaet.com>) # Developer: ...
#
<|file_name|>PathDressupDogbone.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> * # * ...
if d > 0: return Side.Right # at this point the only direction left is backwards
<|file_name|>JoinGame.java<|end_file_name|><|fim▁begin|>package edu.hm.gamedev.server.packets.client2server; import org.codehaus.jackson.annotate.JsonCreator; import org.codehaus.jackson.annotate.JsonProperty; import edu.hm.gamedev.server.packets.Packet; import edu.hm.gamedev.server.packets.Type; public class JoinGa...
} if (!super.equals(o)) { return false;
<|file_name|>ex_1.rs<|end_file_name|><|fim▁begin|>/* Copyright © 2013 Free Software Foundation, Inc See licensing in LICENSE file File: examples/ex_1.rs Author: Jesse 'Jeaye' Wilkerson Description: Simple "Hello, world" example. */ extern crate ncurses;<|fim▁hole|>fn main() { /* If your lo...
use ncurses::*;
<|file_name|>test_views.py<|end_file_name|><|fim▁begin|>""" Tests for Calendar Sync views. """ import ddt from django.test import TestCase from django.urls import reverse from openedx.features.calendar_sync.api import SUBSCRIBE, UNSUBSCRIBE from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCas...
super(TestCalendarSyncView, cls).setUpClass() cls.course = CourseFactory.create()
<|file_name|>auth.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # @first_date 20160129 # @date 20160129 # @version 0.0 """auth for Users API """ from flask import abort from flask.views import MethodView from flask.ext.login import login_required, current_user from...
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License");<|fim▁hole|>You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softw...
you may not use this file except in compliance with the License.
<|file_name|>Main.js<|end_file_name|><|fim▁begin|>Ext.define('CustomIcons.view.Main', { extend: 'Ext.tab.Panel', xtype: 'main', requires: [ 'Ext.TitleBar', 'Ext.Video' ], config: { tabBarPosition: 'bottom', items: [ { title: 'Welcome', ...
{ xtype: 'video', url: 'http://av.vimeo.com/64284/137/87347327.mp4?token=1330978144_f9b698fea38cd408d52a2393240c896c', posterUrl: 'http://b.vimeocdn.com/ts/261/062/261062119_640.jpg'
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls.defaults import * from django_de.apps.authors.models import Author urlpatterns = patterns('django.views.generic.list_detail', (r'^$', 'object_list', dict( queryset = Author.objects.order_by('name', 'slug'), temp...
),
<|file_name|>watch-tree-unix.js<|end_file_name|><|fim▁begin|>var path = require("path"); var fs = require("fs"); var wt = require("./walk-tree"); function createEvent(dirs, event, dir, fileName) { var fullPath = path.join(dir, fileName); var exists = dirs.some(function (d) { return d === fullPath; }); var ...
return { end: function () { state.watches.forEach(function (w) { w.close(); });
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>/* Package scope provides context objects for the sharing of scope across goroutines. This context object provides a number of utilities for coordinating concurrent work, in addition to sharing data. Lifecycle Contexts are nodes in a tree. A context is born either by f...
} }
<|file_name|>TCPSerServer.java<|end_file_name|><|fim▁begin|>// Week 5 - Task 7 import java.io.PrintWriter; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; import java.io.*; public class TCPSerServer { private static ...
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011, 2012, 2014, 2015 CERN. # # Invenio 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 Founda...
# along with Invenio; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
<|file_name|>net_vlan.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # th...
description:
<|file_name|>AgendamentoResource.java<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> */ package br.com.stylehair.servicos; import br.com.stylehair.dao.AgendamentoDAO; import br.com.stylehair.entity.Agendamento; import com.google.gson.Gson; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; i...
* To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor.
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import subprocess import sys import setup_util import os <|fim▁hole|> try: subprocess.check_call("mvn clean compile assembly:single", shell=True, cwd="netty", stderr=errfile, stdout=logfile) subprocess.Popen("java -jar netty-example-0.1-jar-with-dependencies.j...
def start(args, logfile, errfile):
<|file_name|>ParamsUserNew.java<|end_file_name|><|fim▁begin|>package com.syncano.android.lib.modules.users; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import com.syncano.android.lib.modules.Params; import com.syncano.android.lib.modules.Response; /** * Params to cre...
<|file_name|>stats.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either versi...
Some(Histogram { bucket_bounds: vec_into![1, 4, 7], counts: vec![2, 1] }) ); }
<|file_name|>reboot_cam.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys def usage(): print "{0} <feed>".format(os.path.basename(__file__)) if __name__ == '__main__': kmotion_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) sys.path.append(kmotion_dir) ...
feed = '' if len(sys.argv) > 1: feed = sys.argv[1]
<|file_name|>aws-ecs-service_deploymentconfiguration.go<|end_file_name|><|fim▁begin|>package cloudformation // AWSECSService_DeploymentConfiguration AWS CloudFormation Resource (AWS::ECS::Service.DeploymentConfiguration) // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-service-d...
}
<|file_name|>feed_parse_extractTranslasiSanusiMe.py<|end_file_name|><|fim▁begin|>def extractTranslasiSanusiMe(item): ''' Parser for 'translasi.sanusi.me' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap ...
('PRC', 'PRC', 'translated'),
<|file_name|>ws.go<|end_file_name|><|fim▁begin|>package ui import ( "io" "net/http" "path" "sync" "github.com/gorilla/websocket" ) const ( // Determines the chunking size of messages used by gorilla MaxMessageSize = 1024 ) var ( upgrader = &websocket.Upgrader{ReadBufferSize: 1024, WriteBufferSize: MaxMessag...
if err := ws.Close(); err != nil {
<|file_name|>car.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*- import pigpio class Car(object): PINS = ['left_pin', 'right_pin', 'forward_pin', 'backward_pin', 'enable_moving', 'enable_turning'] def __init__(self, left_pin, right_pin, forward_pin, backward_pin, enable_m...
self._start_moving_pwm() def faster(self, change_value=15):
<|file_name|>gobgp.go<|end_file_name|><|fim▁begin|>// -*- coding: utf-8 -*- // Copyright (C) 2019 Nippon Telegraph and Telephone Corporation. // // 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...
func (c *GobgpCmd) createConf(playbookName string) error { if err := c.mkDirAll(playbookName); err != nil { return err
<|file_name|>AmazonHoneycodeClientBuilder.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017-2022 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 ...
* {@link com.amazonaws.regions.DefaultAwsRegionProviderChain} chain
<|file_name|>test_gridmap0.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Unit tests for gridmap classed""" # ---------------------------------- # Bjørn Ådlandsvik <bjorn@imr.no> # Institute of Marine Research # ---------------------------------- import sys from math import pi import unittest import nump...
self.assertEqual((x1, y1), (self.xp, self.yp)) def test_north_pole_backward(self): """Longitude is not defined at the North Pole"""
<|file_name|>CoreutilsLimits.java<|end_file_name|><|fim▁begin|>/* * Core Utils - Common Utilities. * Copyright 2015-2016 GRyCAP (Universitat Politecnica de Valencia) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may ob...
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # EForge project management system, Copyright © 2010, Element43 # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this pe...
<|file_name|>reader.hpp<|end_file_name|><|fim▁begin|>#ifndef OSMIUM_IO_READER_HPP #define OSMIUM_IO_READER_HPP /* This file is part of Osmium (http://osmcode.org/libosmium). Copyright 2013-2015 Jochen Topf <jochen@topf.org> and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 Permissio...
m_read_future(std::async(std::launch::async, detail::ReadThread(m_input_queue, m_decompressor.get(), m_input_done))), m_input(osmium::io::detail::InputFormatFactory::instance().create_input(m_file, m_read_which_entities, m_input_queue)) { }
<|file_name|>Event.ts<|end_file_name|><|fim▁begin|>//////////////////////////////////////////////////////////////////////////////////////<|fim▁hole|>// Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistri...
// // Copyright (c) 2014-2015, Egret Technology Inc. // All rights reserved.
<|file_name|>BootState.js<|end_file_name|><|fim▁begin|>var Phaser = Phaser || {}; var Mst = Mst || {}; Mst.BootState = function () { "use strict"; Phaser.State.call(this); }; Mst.prototype = Object.create(Phaser.State.prototype); Mst.prototype.constructor = Mst.BootState; Mst.BootState.prototype.init = function (m...
this.game.state.start("LoadingState", true, false, core_data, map_data, root_data, quest_data);
<|file_name|>player.rs<|end_file_name|><|fim▁begin|>// MIT License // // Copyright (c) 2017 Franziska Becker, René Warking // // 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 restri...
/// Create a new black player
<|file_name|>lda_preprocessing.py<|end_file_name|><|fim▁begin|>from optparse import OptionParser import re import os import sys import numpy as np from ..util import dirs from ..util import file_handling as fh from ..preprocessing import data_splitting as ds from ..feature_extractors.vocabulary_with_counts import Vo...
<|file_name|>backend.js<|end_file_name|><|fim▁begin|>'use strict'; describe('Service: backend', function () { // load the service's module beforeEach(module('yeomanIonicAngularPhonegapSeedApp')); // instantiate service var backend; beforeEach(inject(function(_backend_) { backend = _backend_; })); ...
expect(!!backend).toBe(true); });
<|file_name|>IntegrationEngine.java<|end_file_name|><|fim▁begin|>package pt.uminho.sysbio.biosynthframework.integration.model; import pt.uminho.sysbio.biosynth.integration.io.dao.neo4j.MetaboliteMajorLabel; <|fim▁hole|>}<|fim▁end|>
public interface IntegrationEngine { public IntegrationMap<String, MetaboliteMajorLabel> integrate(IntegrationMap<String, MetaboliteMajorLabel> imap);
<|file_name|>Frames.py<|end_file_name|><|fim▁begin|>from pyjamas.ui.Sink import Sink, SinkInfo from pyjamas.ui.Frame import Frame class Frames(Sink): def __init__(self): Sink.__init__(self) self.frame=Frame(self.baseURL() + "rembrandt/LaMarcheNocturne.html") self.frame.setWidth("100%") ...
def init(): text="If you need to include multiple pages of good ol' static HTML, it's easy to do using the <code>Frame</code> class."
<|file_name|>crawl.py<|end_file_name|><|fim▁begin|>from scrapy.commands.crawl import Command from scrapy.exceptions import UsageError class CustomCrawlCommand(Command): def run(self, args, opts): if len(args) < 1: raise UsageError() elif len(args) > 1: raise UsageError("run...
spname = args[0]
<|file_name|>DedicatedServer.java<|end_file_name|><|fim▁begin|>package net.minecraft.server.dedicated; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.io.File; import java.io.IOException; import java.net.InetAddress; import java.util.ArrayList; import java.util.Collections; im...
public int func_71327_a(String p_71327_1_, int p_71327_2_) { return this.field_71340_o.func_73669_a(p_71327_1_, p_71327_2_);
<|file_name|>http404check.js<|end_file_name|><|fim▁begin|>angular.module('piwikApp').factory('http404CheckInterceptor', function($q) { function isClientError(rejection) { if (rejection.status === 500) { return true; } return rejection.status >= 400 && rejection.status < 408...
'responseError': function(rejection) { if (rejection && isClientError(rejection) && rejection.config &&
<|file_name|>researchoutcomeindicatorviews.py<|end_file_name|><|fim▁begin|>from csacompendium.indicators.models import ResearchOutcomeIndicator from csacompendium.utils.pagination import APILimitOffsetPagination from csacompendium.utils.permissions import IsOwnerOrReadOnly from csacompendium.utils.viewsutils import Det...
from rest_framework.generics import CreateAPIView, ListAPIView from rest_framework.permissions import IsAuthenticated, IsAdminUser from .filters import ResearchOutcomeIndicatorListFilter from csacompendium.indicators.api.serializers import research_outcome_indicator_serializers
<|file_name|>connect_nodes_response.rs<|end_file_name|><|fim▁begin|>use libflo_action_std::{ Action, action_str_id, NumberOrString }; use string; #[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] pub struct ConnectNodesResponse { #[serde(rename = "type")] pub action_type: NumberOrString, pub s...
finish_connector_index: finish_connector_index, }
<|file_name|>string-matches-pattern.test.ts<|end_file_name|><|fim▁begin|>import { expect } from 'chai'; import stringMatchesPattern, { _convertPatternToRegExpString } from '../../src/utils/string-matches-pattern'; describe('_convertPatternToRegExpString', () => { function test(rawPattern: string, expected: string):...
it('returns true for * matches at the end of the string', () => { expect(stringMatchesPattern('/var/log/*', '/var/log/folder/something.log')).to.eql(true);
<|file_name|>fold-navigator.js<|end_file_name|><|fim▁begin|>'use babel'; //showSearch import FoldNavigatorView from './fold-navigator-view'; import fuzzaldrinPlus from 'fuzzaldrin-plus'; import _ from 'lodash'; import { CompositeDisposable } from 'atom'; export default { config: { autofold: { ...
<|file_name|>queue_alt.rs<|end_file_name|><|fim▁begin|>/*! Heterogeneous Queue (alternative) This version is hand-written (no macros) but has a simpler architecture that allows implicit consumption by deconstruction on assignment. # Example ```rust use heterogene::queue_alt::{Q0,Q1,Q2}; let q = (); ...
fn append<T3>(self, t3: T3) -> (T1,(T2,(T3,()))) {
<|file_name|>database.py<|end_file_name|><|fim▁begin|>#!/bin/env python # -*- coding: utf-8; -*- # # (c) 2016 FABtotum, http://www.fabtotum.com # # This file is part of FABUI. #<|fim▁hole|># (at your option) any later version. # # FABUI is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; with...
# FABUI 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, or
<|file_name|>dockerhub_adapter.go<|end_file_name|><|fim▁begin|>// // Copyright (c) 2017 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/licens...
<|file_name|>0003_alter_email_max_length.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import models, migrations from social.utils import setting_name EMAIL_LENGTH = getattr(settings, setting_name('EMAIL_LENGTH'), 254) ...
operations = [ migrations.AlterField( model_name='code',
<|file_name|>requirement_configuration.py<|end_file_name|><|fim▁begin|># Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import from pex.fetcher import URLFetcher from pex.network_configuration import Netw...
parsed_requirements.extend(parse_requirement_strings(self.requirements)) if self.requirement_files: fetcher = URLFetcher(network_configuration=network_configuration) for requirement_file in self.requirement_files:
<|file_name|>handshake.py<|end_file_name|><|fim▁begin|># This file is part of Scapy # Copyright (C) 2007, 2008, 2009 Arnaud Ebalard # 2015, 2016, 2017 Maxence Tury # This program is published under a GPLv2 license """ TLS handshake fields & logic. This module covers the handshake TLS subprotocol, except...
if connection_end == "server": shts = s.tls13_derived_secrets["server_handshake_traffic_secret"] s.pwcs.tls13_derive_keys(shts)
<|file_name|>fonts.js<|end_file_name|><|fim▁begin|>'use strict'; // ================================== // // Load modules. // // ================================== var config = require('../config.js'); var gulp = require('gulp'); // ================================== // // Fonts // // ===============================...
<|file_name|>latentsemantic.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2019 David Arroyo Menéndez # Author: David Arroyo Menéndez <davidam@gnu.org><|fim▁hole|> # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Pu...
# Maintainer: David Arroyo Menéndez <davidam@gnu.org>
<|file_name|>core.rs<|end_file_name|><|fim▁begin|>// TODO: drop all fail! use std::u32; use std::cast; use std::str::from_utf8_owned; use std::rt::io::*; use misc::*; use zigzag::*; pub mod wire_format { pub static TAG_TYPE_BITS: u32 = 3; pub static TAG_TYPE_MASK: u32 = (1 << TAG_TYPE_BITS) - 1; #[deriv...
fn check_initialized(&self) {
<|file_name|>RecordTimer.py<|end_file_name|><|fim▁begin|>import os from enigma import eEPGCache, getBestPlayableServiceReference, \ eServiceReference, iRecordableService, quitMainloop, eActionMap from Components.config import config from Components.UsageConfig import defaultMoviePath from Components.TimerSanityCheck ...
# name (title) # description (description) # event data (ONLY for time adjustments etc.)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
__author__ = 'mdavid'
<|file_name|>reducer_warehouses.js<|end_file_name|><|fim▁begin|>import { GET_WAREHOUSES_FULL_LIST, GET_WAREHOUSE, GET_COMPANIES, GET_SUPERVISORS } from '../actions/warehouses'; import humanize from 'humanize'; import Moment from 'moment'; const INITIAL_STATE = { warehousesList: [], warehouseDetail: {}, warehouse...
telephone: warehouse.telephone, address: warehouse.address, contact_name: warehouse.contact_name,
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """The setup and build script for the python-telegram-bot library.""" import codecs import os from setuptools import setup, find_packages def requirements(): """Build the requirements list for this project""" requirements_list = [] ...
packages = find_packages(exclude=['tests*'])
<|file_name|>test_commands.py<|end_file_name|><|fim▁begin|># coding: utf-8 from django import VERSION from django.core.management import call_command from ._compat import patch CELERYD_COMMAND = 'djcelery.management.commands.celeryd.Command.handle' def test_celeryd_command(): if VERSION >= (1, 10): tra...
handle.assert_called_with(
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from datetime import timedelta import logging import os import re import time from django.conf import settings from django.db import models from django.db.models import Q from django.utils.crypto import get_random_string from ...
objects = ServiceTicketManager()
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol ...
# GNU Affero General Public License for more details. # # # # You should have received a copy of the GNU Affero General Public License #
<|file_name|>resnet.py<|end_file_name|><|fim▁begin|># Copyright 2021 DeepMind Technologies Limited. 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.apa...
out = self.se(out) * out # Get average residual standard deviation for reporting metrics. res_avg_var = jnp.mean(jnp.var(out, axis=[0, 1, 2])) return out + shortcut, res_avg_var
<|file_name|>slice-panic-1.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. //<|fim▁hole|>// except according to those terms. // Test that if a slicing expr[..] fails, the c...
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed
<|file_name|>nds-NL.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/g...
<|file_name|>server.rs<|end_file_name|><|fim▁begin|>use super::ResponseInfo; use std::net::SocketAddr; use xml_rpc::{self, rouille, Value}; use super::{Response, ResponseError}; pub struct Server { server: xml_rpc::Server, } impl Default for Server { fn default() -> Self { let mut server = xml_rpc::S...
let info = ResponseInfo::from_response_error(error_message); info.into() }
<|file_name|>environment.py<|end_file_name|><|fim▁begin|># Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> import threading from ggrc import db from ggrc.app import app from ggrc.models import create_db, drop_db from wsgiref.simple_server import make_server...
def after_all(context):
<|file_name|>timezone_request.cc<|end_file_name|><|fim▁begin|>// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/chromeos/timezone/timezone_request.h" #include <string> #include ...
struct StatusString2Enum { const char* string; TimeZoneResponseData::Status value;
<|file_name|>configurable_component.rs<|end_file_name|><|fim▁begin|>use crate::components::ComponentInner; impl<M, E> printspool_config_form::Configurable<M> for ComponentInner<M, E> where M: printspool_config_form::Model, E: Default, {<|fim▁hole|> fn model(&self) -> &M { &self.model } fn m...
fn id(&self) -> async_graphql::ID { format!("component-{}", self.id).into() }
<|file_name|>state_script.rs<|end_file_name|><|fim▁begin|>use crate::state::*; use std; use std::process::Command; struct StateScript { script_path: String, shared_state: SharedState, state_observer: StateObserver, } impl StateScript { fn new(script_path: &str, shared_state: SharedState) -> StateScrip...
.status();
<|file_name|>data-gift-service.js<|end_file_name|><|fim▁begin|>(function () { 'use strict'; angular .module("myApp.presents") .factory("dataGiftService", dataGiftService);<|fim▁hole|> var dataGiftService = { notification: notification, pleaseWaitDialog: pleaseWaitD...
function dataGiftService($mdToast, $mdDialog) {