prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>borrowck-borrow-from-expr-block.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:...
<|file_name|>Tab.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) 2010 CENATIC: Centro Nacional de Referencia de # Aplicacion de las TIC basadas en Fuentes Abiertas, Spain. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the fol...
<|file_name|>main.ts<|end_file_name|><|fim▁begin|>import { enableProdMode } from '@angular/core';<|fim▁hole|> import { AppModule } from './app/app.module'; import { environment } from './environments/environment'; if (environment.production) { enableProdMode(); // GA tracking document.write('<script async src...
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
<|file_name|>eventlistener_test.go<|end_file_name|><|fim▁begin|>package eventlistener import ( "testing" "github.com/docker/docker/api/types" "golang.org/x/net/context" "fmt" "time" "github.com/docker/docker/api/types/events" ) //We simulate docker die event and expect to get the die container id in ...
<|file_name|>HdfsTargetConfigBean.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017 StreamSets Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
}
<|file_name|>get_words.py<|end_file_name|><|fim▁begin|># get_words.py # returns a list of words from the relevant lines of a speech # J. Hassler Thurston # RocHack Hackathon December 7, 2013 import csv import nltk def get_words(line_list): sentences = parse_to_sentences(line_list) #print sentences words = [nltk.wo...
<|file_name|>image_text_model.py<|end_file_name|><|fim▁begin|># Copyright 2019 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/LICENSE-2.0 #...
return tf.sqrt(x1_square - 2 * tf.matmul(x1, tf.transpose(x2)) + x2_square + 1e-4)
<|file_name|>postgres_storage.rs<|end_file_name|><|fim▁begin|>extern crate owning_ref; extern crate sodiumoxide; extern crate r2d2; extern crate r2d2_postgres; use postgres; use self::r2d2_postgres::{TlsMode, PostgresConnectionManager}; use serde_json; use self::owning_ref::OwningHandle; use std::rc::Rc; use std::tim...
<|file_name|>DPEigenbackgroundBGS.cpp<|end_file_name|><|fim▁begin|>#include "DPEigenbackgroundBGS.h" DPEigenbackgroundBGS::DPEigenbackgroundBGS() : firstTime(true), frameNumber(0), showOutput(true), threshold(225), historySize(20), embeddedDim(10) { std::cout << "DPEigenbackgroundBGS()" << std::endl; } DPEigenbackg...
highThresholdMask = cvCreateImage(cvSize(width, height), IPL_DEPTH_8U, 1); highThresholdMask.Ptr()->origin = IPL_ORIGIN_BL;
<|file_name|>graph.go<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2015 Red Hat, Inc. * * 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 l...
return nil } func (e *Edge) GetParent() Identifier {
<|file_name|>glyph-vector.py<|end_file_name|><|fim▁begin|># ----------------------------------------------------------------------------- # # FreeType high-level python API - Copyright 2011 Nicolas P. Rougier # Distributed under the terms of the new BSD license. # # ---------------------------------------------------...
codes.append(Path.CURVE3) VERTS.extend(verts) CODES.extend(codes) start = end+1
<|file_name|>githubpages_settings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Production settings file for project 'project' """ from project.settings import * <|fim▁hole|>SITE_DOMAIN = 'sveetch.github.io/Sveetoy' # Directory where all stuff will be builded PUBLISH_DIR = os.path.join(PROJECT_DIR, '../d...
DEBUG = False
<|file_name|>test_browser_charm_details.js<|end_file_name|><|fim▁begin|><|fim▁hole|>environments within a graphical interface (https://launchpad.net/juju-gui). Copyright (C) 2012-2013 Canonical Ltd. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public...
/* This file is part of the Juju GUI, which lets users view and manage Juju
<|file_name|>UsernameSecurityTokenImpl.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 ...
this.createdTime = createdTime; this.nonce = nonce;
<|file_name|>event.py<|end_file_name|><|fim▁begin|>from builtins import object import abc<|fim▁hole|>class Event(object): @abc.abstractmethod def trigger(self, *args, **kwargs): pass<|fim▁end|>
<|file_name|>pattern_matching.rs<|end_file_name|><|fim▁begin|>#![feature(test)] extern crate test; extern crate bio; use test::Bencher; use bio::pattern_matching::shift_and::ShiftAnd; use bio::pattern_matching::bndm::BNDM; use bio::pattern_matching::kmp::KMP; use bio::pattern_matching::bom::BOM; use bio::pattern_matc...
AAACGAAAGTTTAACTAAGCTATACTAACCCCAGGGTTGGTCAATTTCGTGCCAGCCACCGCGGTCACACGATTAACCC\
<|file_name|>plugin.py<|end_file_name|><|fim▁begin|>import StringIO class Plugin(object): ANGULAR_MODULE = None JS_FILES = [] CSS_FILES = [] @classmethod def PlugIntoApp(cls, app): pass @classmethod def GenerateHTML(cls, root_url="/"): out = StringIO.StringIO() f...
root_url, css_file))
<|file_name|>util.py<|end_file_name|><|fim▁begin|># Copyright 2013-2021 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
def is_int(x): try: int(x)
<|file_name|>Simple Pig Latin.py<|end_file_name|><|fim▁begin|>def pig_it(text): return ' '.join([x[1:]+x[0]+'ay' if x.isalpha() else x for x in text.split()]) # 其实就是2个字符串过滤拼接,比移动方便多了,思路巧妙 <|fim▁hole|> x[1:]+x[0]+'ay' else x return ...
# a if xx else b, 单行判断处理异常字符,xx为判断,标准套路 for x in text.split() if x.isalpha()
<|file_name|>code.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, OnDestroy } from '@angular/core'; import { Http } from '@angular/http'; import { Router, ActivatedRoute } from '@angular/router'; import { Observable, Subject, Subscription } from 'rxjs'; import { CodeLayer } from '../core/model/cod...
@Component({ selector: 'app-code', templateUrl: './code.component.html'
<|file_name|>test_models.py<|end_file_name|><|fim▁begin|>from models.team import Team from models.tournament import Tournament from models.tree import ProbableTournamentTree import unittest import pdb class TestTeam(unittest.TestCase): def setUp(self): self.tournament = Tournament() self.teams = s...
opp = self.tree.get_opponent_at_stage(mexico, 0)
<|file_name|>test_volume_types_extra_specs.py<|end_file_name|><|fim▁begin|># Copyright (c) 2011 Zadara Storage Inc. # Copyright (c) 2011 OpenStack Foundation # Copyright 2011 University of Southern California # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in c...
expected_specs = self.vol_type1_specs.copy()
<|file_name|>Euler_Problem-075.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # transpiled with BefunCompile v1.3.0 (c) 2017 import sys import zlib, base64 _g = ("Ah+LCAAAAAAABACT7+ZgAAEWhre3/LNvG0iwP1i/yPTlUbXVqdvzlJoi+a3Lj8v6RJl1JZacmaK7/Otuf07ZXEnrN/zZZ+cdV4iexrfrz59Tftsevr0tcO7wz0oLK678" + "PLvaHVX/Lff8K...
sa(v0) sa(v1) sa(tm(sr(),gr(2,0))) v0=sp()
<|file_name|>snigate_test.go<|end_file_name|><|fim▁begin|>// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2....
gateK8S := mesh.New()
<|file_name|>RepositoryInfo.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2013-2013, KNOPFLERFISH project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following * conditions are met: * * - Redistributions of ...
} }
<|file_name|>StageProfiPlugin.cpp<|end_file_name|><|fim▁begin|>/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version...
<|file_name|>pnp.js<|end_file_name|><|fim▁begin|>/** * sp-pnp-js v2.0.6-beta.1 - A JavaScript library for SharePoint development. * MIT (https://github.com/SharePoint/PnP-JS-Core/blob/master/LICENSE) * Copyright (c) 2017 Microsoft * docs: http://officedev.github.io/PnP-JS-Core * source: https://github.com/SharePoi...
/** * Removes the cross-site group with the specified name from the collection
<|file_name|>resource_manager.py<|end_file_name|><|fim▁begin|>from framework.db import models from framework.config import config from framework.dependency_management.dependency_resolver import BaseComponent from framework.dependency_management.interfaces import ResourceInterface from framework.lib.general import cprin...
logging.info("Loading Resources from: " + file_path + " ..") resources = self.GetResourcesFromFile(file_path) # Delete all old resources which are not edited by user
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|> __version__ = '1.1.0' default_app_config = 'ipware.apps.AppConfig'<|fim▁end|>
# -*- coding: utf-8 -*-
<|file_name|>ImmutableAnalysis.java<|end_file_name|><|fim▁begin|>/* * Copyright 2016 The Error Prone Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache....
info = checkSuper(immutableTyParams, type);
<|file_name|>main1.cpp<|end_file_name|><|fim▁begin|>class Solution { public: int minCut(string s) { if (s.size() < 2) { return 0; } int len = s.size(); vector<int> cut(len + 1, 0); // cut[i] : s[0..i-1] min cut for (int i = 0; i <= len; i++) { cut[i] = i - 1; } for (int i = 0...
return cut[len]; } };
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url, patterns from data import views <|fim▁hole|>urlpatterns = patterns("data.views", url(r"^$", views.IndexView.as_view()), url(r"^a/(?P<application_external_id>[^/]{,255})\.json$", views.ApplicationInstanceListView.as_view()), ...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate getopts; extern crate image; use getopts::{optopt,getopts}; use std::default::Default; use std::io::fs::File; use std::os::args; mod css; mod dom; mod html; mod layout; mod style; mod painting; #[allow(unstable)] fn main() { // Parse command-line opt...
// Save an image:
<|file_name|>express-cfg.js<|end_file_name|><|fim▁begin|>// ============================================================================= // Module to configure an ExpressJS web server<|fim▁hole|> // Requires // { // "express": "4.13.3", // "cookie-parser": "1.4.0", // "morgan": "1.6.1", // "body-parser" : ...
// =============================================================================
<|file_name|>bind_test.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2015, Jean Niklas L'orange // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must ...
<|file_name|>test_recordview.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from __future__ import absolute_import, division, print_function """ Tests for RecordView module and view Note: this module tests for rendering specifically for RecordView values, using view description sitedata files...
<|file_name|>tableBody.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = undefined; var _style = require('antd/lib/icon/style'); var _icon = require('antd/lib/icon'); var _icon2 = _interopRequireDefault(_icon); var _extends2 = require('...
} (0, _createClass3.default)(TBody, [{
<|file_name|>DynamicAttributes.java<|end_file_name|><|fim▁begin|>/** * Copyright 2014 Jordan Zimmerman * * 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/license...
public interface DynamicAttributes { public String getAttribute(String key);
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># flake8: noqa # There's no way to ignore "F401 '...' imported but unused" warnings in this # module, but to preserve other warnings. So, don't check this module at all. # Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache Licen...
<|file_name|>tv.py<|end_file_name|><|fim▁begin|># Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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 Softw...
ep_string += other_ep._format_string(ep_format.upper(), other_ep._replace_map()) if anime_type != 3:
<|file_name|>0002_comment.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('blogg', '0001_initial'), ]<|fim▁hole|> migrations.CreateModel( ...
operations = [
<|file_name|>ContentDbDict.py<|end_file_name|><|fim▁begin|>import time import os import ContentDb from Debug import Debug from Config import config class ContentDbDict(dict): def __init__(self, site, *args, **kwargs): s = time.time() self.site = site self.cached_keys = [] self.log...
self.addCachedKey(key) self.checkLimit() size = self.getItemSize(key)
<|file_name|>_private.py<|end_file_name|><|fim▁begin|>from optparse import make_option from django.core.management.base import BaseCommand, CommandError from django.core.validators import URLValidator from django.core.exceptions import ValidationError class ADBaseCommand(BaseCommand): option_list = BaseCommand.o...
def valid_url(self, url):
<|file_name|>variant-size-differences.rs<|end_file_name|><|fim▁begin|>#![deny(variant_size_differences)] <|fim▁hole|> V0(u8), VBig([u8; 1024]), //~ ERROR variant is more than three times larger } fn main() {}<|fim▁end|>
enum _En {
<|file_name|>log.py<|end_file_name|><|fim▁begin|># The absolute import feature is required so that we get the root celery # module rather than `amo.celery`. from __future__ import absolute_import from inspect import isclass from celery.datastructures import AttributeDict from tower import ugettext_lazy as _ __all__...
id = 32 action_class = 'edit'
<|file_name|>BlockFilter.java<|end_file_name|><|fim▁begin|>package org.saga.shape; import org.bukkit.Material; import org.bukkit.block.Block; import java.util.HashSet; public class BlockFilter implements ShapeFilter { /** * Materials. */ private HashSet<Material> materials = new HashSet<>(); /** * If true...
return materials.contains(block.getType());
<|file_name|>WHO.js<|end_file_name|><|fim▁begin|>{ "translatorID": "cd587058-6125-4b33-a876-8c6aae48b5e8", "label": "WHO", "creator": "Mario Trojan, Philipp Zumstein", "target": "^http://apps\\.who\\.int/iris/", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, ...
<|file_name|>borrowck-return-variable-on-stack-via-clone.rs<|end_file_name|><|fim▁begin|>// Check that when we clone a `&T` pointer we properly relate the // lifetime of the pointer which results to the pointer being cloned. // Bugs in method resolution have sometimes broken this connection. // Issue #19261. <|fim▁hole...
fn leak<'a, T>(x: T) -> &'a T { (&x).clone() //~ ERROR cannot return value referencing function parameter `x` }
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var express = require('express') var app = module.exports = express() <|fim▁hole|><|fim▁end|>
app.get('/404', require('lib/site/layout')) app.get('*', function (req, res) { res.redirect('/404') })
<|file_name|>PhRequest.ts<|end_file_name|><|fim▁begin|>import { PaymentHighwayUtility } from '../../PaymentHighwayUtility';<|fim▁hole|> public requestId: string; constructor() { this.requestId = PaymentHighwayUtility.createRequestId(); } }<|fim▁end|>
export class Request {
<|file_name|>joins.py<|end_file_name|><|fim▁begin|>from enum import Enum from typing import Union, List, Optional from .space2d import * from .space3d import * class JoinTypes(Enum): """ Enumeration for Line and Segment type. """ START_START = 1 # start point coincident with start point START_E...
"""
<|file_name|>kailua-check-test.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate log; extern crate env_logger; extern crate clap; extern crate kailua_test; extern crate kailua_env; extern crate kailua_diag; extern crate kailua_syntax; extern crate kailua_types; extern crate kailua_check; use std::str; use std:...
Err(e) => {
<|file_name|>cambridgeaudio.py<|end_file_name|><|fim▁begin|>""" Discover Cambridge Audio StreamMagic devices. """ from . import SSDPDiscoverable class Discoverable(SSDPDiscoverable): """Add support for discovering Cambridge Audio StreamMagic devices.""" def get_entries(self): """Get all Cambridge Aud...
"manufacturer": "Cambridge Audio", "deviceType": "urn:schemas-upnp-org:device:MediaRenderer:1"
<|file_name|>tableDetail.js<|end_file_name|><|fim▁begin|>/* * Copyright 2017-present Open Networking Foundation * * 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.apach...
$log.debug('options are', opts); // TODO use panel service to create base panel
<|file_name|>client.go<|end_file_name|><|fim▁begin|>// Copyright Project Harbor Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0...
ListAllArtifacts(project, repository string) ([]*modelsv2.Artifact, error)
<|file_name|>closing-channels.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" ) func main() { jobs := make(chan int, 5)<|fim▁hole|> for { j, more := <-jobs if more { fmt.Println("received job", j) } else { fmt.Println("received all jobs") done <- true return } } }() fo...
done := make(chan bool) go func() {
<|file_name|>sparsemax.py<|end_file_name|><|fim▁begin|># Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache....
from __future__ import absolute_import from __future__ import division
<|file_name|>package.py<|end_file_name|><|fim▁begin|>############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, t...
class Fastqvalidator(MakefilePackage): """The fastQValidator validates the format of fastq files."""
<|file_name|>EventInSFImage.java<|end_file_name|><|fim▁begin|>package vrml.external.field; import vrml.external.field.FieldTypes; import vrml.external.Browser; import java.awt.*; import java.math.BigInteger; public class EventInSFImage extends EventIn { public EventInSFImage() { EventType = FieldTypes.SFIMAGE; } ...
for (count = 0; count < pixcount; count++) { xx[1] = pixels[count];
<|file_name|>spread.js<|end_file_name|><|fim▁begin|>// function add(a, b){ // return a+b; // } // // console.log(add(3,1)); // // var toAdd = [9, 5]; // console.log(add(...toAdd)); // var groupA = ['Jen', 'Cory']; // var groupB = ['Vikram'];<|fim▁hole|>// console.log(...final); var person = ['Andew', 25]; var person...
// var final = [...groupB, 3, ...groupA];
<|file_name|>vis.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:467bccdb74ef62e6611ba27f338a0ba0c49ba9a90ef1facb394c14de676318cf<|fim▁hole|><|fim▁end|>
size 1150464
<|file_name|>icmp_exfiltration.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import os import sys import zlib import time import datetime<|fim▁hole|>from impacket import ImpactPacket """ Constants """ READ_BINARY = "rb" WRITE_BINARY = "wb" READ_FROM_SOCK = 7000 ICMP_HEADER_SIZE = 27 DATA_SEPARATOR ...
import base64 from socket import *
<|file_name|>bitcoin_ca_ES.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ca_ES" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Bitcoin</sourc...
</message>
<|file_name|>VirtualMachineMonitorAgent.py<|end_file_name|><|fim▁begin|>""" VirtualMachineMonitorAgent plays the role of the watch dog for the Virtual Machine """ import os import time import glob # DIRAC from DIRAC import S_OK, S_ERROR, gConfig, rootPath from DIRAC.ConfigurationSys...
result = self.__declareInstanceRunning() if not result[ 'OK' ]: self.log.error( "Could not declare instance running", result[ 'Message' ] ) self.__haltInstance()
<|file_name|>DomRootInvocationHandler.java<|end_file_name|><|fim▁begin|>package com.intellij.util.xml.impl; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.util.NullableFactory; import com.intellij.openapi.util.text.StringUtil; import com.intellij.psi.XmlElementFactory; import com.intellij.p...
<|file_name|>FontAwesomeIcon.tsx<|end_file_name|><|fim▁begin|>'use strict'; import React = require('react'); export class FontAwesomeIcon extends React.Component<{ path?: string }, {}> { // NOTES: SVG path data was obtained from: https://github.com/encharm/Font-Awesome-SVG-PNG/tree/master/black/svg // ...
<|file_name|>base.py<|end_file_name|><|fim▁begin|>""" Base classes for writing management commands (named commands which can be executed through ``tipi.py``). """ import os import sys from ConfigParser import ConfigParser from optparse import make_option, OptionParser from virtualenv import resolve_interpreter class...
<|file_name|>Message.js<|end_file_name|><|fim▁begin|>DS.classes.Message = function(create){ var relations = []; //check check(create, { time: DS.classes.Time, data: Match.Optional(Object) }); //create _.extend(this, create); //add relations<|fim▁hole|> this.addRelation...
<|file_name|>Compare.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
com.hackoeur.jglm.support.Compare
<|file_name|>PlyVertexDataType.java<|end_file_name|><|fim▁begin|>package com.ripplargames.meshio.meshformats.ply; import com.ripplargames.meshio.vertices.VertexType; public class PlyVertexDataType { private final VertexType vertexType;<|fim▁hole|> public PlyVertexDataType(VertexType vertexType, PlyDataType ply...
private final PlyDataType plyDataType;
<|file_name|>DatePicker.js<|end_file_name|><|fim▁begin|>/* This file is part of Ext JS 4.2 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software ...
bodyPadding: 0, // remove the body padding from the datepicker menu item so it looks like 3.3 items: Ext.applyIf({ cls: Ext.baseCSSPrefix + 'menu-date-item', margin: 0,
<|file_name|>models.py<|end_file_name|><|fim▁begin|>import sklearn.cross_validation as cv import sklearn.dummy as dummy from sklearn.mixture import GMM from sklearn.hmm import GMMHMM from sklearn import linear_model, naive_bayes import collections import itertools import pandas as pd from testResults import TestResult...
printCondDictProbDist(counter.getCombinedEmissionProb()) return Hmm.Parameters(
<|file_name|>import_ie_naptan_xml.py<|end_file_name|><|fim▁begin|>"""Import an Irish NaPTAN XML file, obtainable from https://data.dublinked.ie/dataset/national-public-transport-nodes/resource/6d997756-4dba-40d8-8526-7385735dc345 """ import warnings import zipfile import xml.etree.cElementTree as ET from django.contri...
longitude_element = location_element.find('naptan:Longitude', self.ns) latitude_element = location_element.find('naptan:Latitude', self.ns)
<|file_name|>_a4c_tomcat_install.py<|end_file_name|><|fim▁begin|>from cloudify import ctx from cloudify.exceptions import NonRecoverableError from cloudify.state import ctx_parameters as inputs import subprocess import os import re import sys import time import threading import platform from StringIO import StringIO fr...
if has_attribute_mapping(entity, attribute_name): # First check if any mapping exist for attribute mapped_value = process_attribute_mapping(entity, attribute_name, get_attribute)
<|file_name|>test-aggregate-pipeline.js<|end_file_name|><|fim▁begin|>var insert = require('./insert') var concat = require('concat-stream') insert('aggregate', [{ name: 'Squirtle', type: 'water' }, { name: 'Starmie', type: 'water' }, { name: 'Charmander', type: 'fire' }, { name: 'Lapras', type: 'water' }], fun...
<|file_name|>client.go<|end_file_name|><|fim▁begin|>package client import ( "context" "net/http" "github.com/tidepool-org/platform/errors" "github.com/tidepool-org/platform/page" "github.com/tidepool-org/platform/platform" "github.com/tidepool-org/platform/request" structureValidator "github.com/tidepool-org/p...
<|file_name|>ItemValueBuilder.java<|end_file_name|><|fim▁begin|>package com.amee.domain.data.builder.v2; import com.amee.base.utils.XMLUtils; import com.amee.domain.Builder; import com.amee.domain.ItemBuilder; import com.amee.domain.ItemService; import com.amee.domain.TimeZoneHolder; import com.amee.domain.item.BaseIt...
public class ItemValueBuilder implements Builder {
<|file_name|>nsiqcppstyle_unittestbase.py<|end_file_name|><|fim▁begin|># Copyright (c) 2009 NHN Inc. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must reta...
import nsiqcppstyle_reporter import nsiqcppstyle_state
<|file_name|>cmake_unittest.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012 Intel Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the abo...
])
<|file_name|>anagram_solver.py<|end_file_name|><|fim▁begin|>#!/usr/local/bin/python3.5 import itertools import sys from .stuff import word_set<|fim▁hole|> def find_possible(lst): """ Return all possible combinations of letters in lst @type lst: [str] @rtype: [str] """ returned_list = [] f...
__version__ = "1.1.0"
<|file_name|>DashboardManagerImpl.java<|end_file_name|><|fim▁begin|>/* * NOTE: This copyright does *not* cover user programs that use HQ * program services by normal system calls through the application * program interfaces provided as part of the Hyperic Plug-in Development * Kit or the Hyperic Client Development ...
@Transactional(readOnly = true) public ConfigResponse getRssUserPreferences(String user, String token) throws LoginException { ConfigResponse preferences;
<|file_name|>multiple-trait-bounds.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|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://...
//
<|file_name|>test_db_backend.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals import unittest from django.test import TestCase <|fim▁hole|>from .test_backends import BackendTests class TestDBBackend(BackendTests, TestCase): backend_path = 'wagtail.wagtailsearch.backends.d...
from wagtail.tests.search import models
<|file_name|>var.rs<|end_file_name|><|fim▁begin|>//! Intermediate representation of variables. use super::super::codegen::MacroTypeVariation; use super::context::{BindgenContext, TypeId}; use super::dot::DotAttributes; use super::function::cursor_mangling; use super::int::IntKind; use super::item::Item; use super::ty:...
Ok(ParseResult::New(
<|file_name|>lib.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/licenses/LI...
f: |BlockedTask| -> Result<(), BlockedTask>);
<|file_name|>MaxArithmeticProgression.py<|end_file_name|><|fim▁begin|>''' Created on May 20, 2012 @author: Jason Huang ''' <|fim▁hole|>#The sequence S1, S2, ¡­, Sk is called an arithmetic progression if #Sj+1 ¨C Sj is a constant if __name__ == '__main__': pass<|fim▁end|>
#Given an array of integers A, give an algorithm to find the longest Arithmetic progression in it, i.e find a sequence i1 < i2 < ¡­ < ik, such that #A[i1], A[i2], ¡­, A[ik] forms an arithmetic progression, and k is the largest possible.
<|file_name|>RunProcessCommand.java<|end_file_name|><|fim▁begin|>/* * Copyright 2012-2018 the original author or 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:...
RunProcessCommand(String... command) { super(null, null); this.command = command; }
<|file_name|>options.js<|end_file_name|><|fim▁begin|>angular.module('Reader.services.options', []) .factory('options', function($rootScope, $q) { var controllerObj = {}; options.onChange(function (changes) { $rootScope.$apply(function () { for (var property in changes) { controll...
set: function (values) { options.set(values); },
<|file_name|>processor.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- __license__ = 'GPL v3' __copyright__ = '2009, John Schember <john@nachtimwald.com>' __docformat__ = 'restructuredtext en' ''' Read content from txt file. ''' import os, re from calibre import prepare_string_for_xml, isbytestring from c...
if not disable_toc: extensions.append('toc') md = markdown.Markdown(
<|file_name|>game.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
//= require phaser
<|file_name|>observableview.ts<|end_file_name|><|fim▁begin|>/** * mobservable * (c) 2015 - Michel Weststrate * https://github.com/mweststrate/mobservable */ namespace mobservable { export namespace _ { export function throwingViewSetter() { throw new Error(`[mobservable.view '${this.context...
if (logLevel > 0) console.error(`[mobservable.view '${this.context.name}'] Rethrowing caught exception to observer: ${this._value}${(<any>this._value).cause||''}`); throw this._value; }
<|file_name|>functions.py<|end_file_name|><|fim▁begin|># twitter/functions.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- import tweepy import wevote_functions.admin from config.base import get_environment_variable from exception.models import handle_exception from wevote_functions.functions import ...
<|file_name|>checkFile.ts<|end_file_name|><|fim▁begin|>const fileTypeExts = { pdf: ['pdf'], image: ['jpg', 'jpeg', 'png'], pdfImage: ['pdf', 'jpg', 'jpeg', 'png'], }; const fileTypeAlerts = { pdf: 'Please choose a pdf document', image: 'Please choose an image file', pdfImage: 'Please choose a pdf document ...
inputFiles[0] && inputFiles[0].size > (maxKb || 500) * 1000
<|file_name|>2PopDNAnorec_1_76.js<|end_file_name|><|fim▁begin|>USETEXTLINKS = 1 STARTALLOPEN = 0 WRAPTEXT = 1 PRESERVESTATE = 0 HIGHLIGHT = 1 ICONPATH = 'file:////Users/eric/github/popgenDB/sims_for_structure_paper/2PopDNAnorec_0.5_1000/' //change if the gif's folder is a subfolder, for example: 'images/' foldersTr...
insDoc(aux1, gLnk("R", "Settings", "2PopDNAnorec_1_76.xml#31_07_18at17_02_31_run_information")) aux2 = insFld(aux1, gFld("Genetic structure (samp=pop)", "2PopDNAnorec_1_76.xml#31_07_18at17_02_31_pop_gen_struct"))
<|file_name|>0001_squashed_0020_add_app_permissions.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-12-09 00:06 from __future__ import unicode_literals from django.conf import settings import django.core.files.storage from django.db import migrations, models import django....
name="comment", field=models.TextField(blank=True, default=""), preserve_default=False, ),
<|file_name|>grcontext_for_webgraphicscontext3d.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "webkit/common/gpu/grcontext_for_webgraphicscontext3d.h" #in...
<|file_name|>marsdb.react.js<|end_file_name|><|fim▁begin|>(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(type...
parentContext = parentContext || _ExecutionContext2.default.getCurrentContext(); (0, _invariant2.default)(parentContext, 'getFragment(...): must be invoked within some context'); var childContext = parentContext.createChildContext();
<|file_name|>FlutterMutatorViewTest.java<|end_file_name|><|fim▁begin|>package io.flutter.embedding.engine.mutatorsstack; import static junit.framework.TestCase.*; import static org.mockito.Mockito.*; import android.graphics.Matrix; import android.view.MotionEvent; import io.flutter.embedding.android.AndroidTouchProce...
<|file_name|>RecordHandlerImpl.java<|end_file_name|><|fim▁begin|>package fw.db.connection.impl; import fw.common.util.CE; import fw.common.util.LE; import fw.db.connection.DBException; import fw.db.connection.RecordHandler; import java.sql.ResultSet; import java.sql.ResultSetMetaData; /** * 通用的EntityBean查询映射处理类<br...
//propNames =LE.getPropertyNames(classOfT);
<|file_name|>multiply_list_by_integer_with_restrictions.py<|end_file_name|><|fim▁begin|>from operator import mul<|fim▁hole|><|fim▁end|>
def multiply(n, l): return map(lambda a: mul(a, n), l)