prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>test_tegile.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 by Tegile Systems, Inc. # 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 # # ...
test_volume = {'host': 'node#testPool',
<|file_name|>installer.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 The Kubernetes 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 Unle...
}
<|file_name|>frontdesk.py<|end_file_name|><|fim▁begin|>from django import template from django.template.defaultfilters import stringfilter register = template.Library() STATUS_COLORS = { 'default': 'blue', 'queued': 'blue', 'undetermined': 'blue', 'infected': 'red', 'uninfected': 'green', 'dep...
if len(xmls['invalid']) > 0:
<|file_name|>osutil.py<|end_file_name|><|fim▁begin|># Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import errno import logging import os import posix from functools import reduce from typing import Optional, Set logger = logging.getLo...
# [ESRCH] No process or process group can be found corresponding to that specified by pid. #
<|file_name|>FixedDistanceBuffer.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ *************************************************************************** FixedDistanceBuffer.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Em...
* * * This program is free software; you can redistribute it and/or modify *
<|file_name|>execute.py<|end_file_name|><|fim▁begin|># coding=utf-8 import os def run(cmd, decoding = None, clean = False): if cmd: result = [] output = os.popen(cmd).readlines() for line in output: if decoding: line = line.decode(decoding) <|fim▁hole|...
if clean: line = line.strip() if line and line != '': result.append(line)
<|file_name|>0039_auto__chg_field_region_region_code.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): ...
<|file_name|>0295_doc_tslug.py<|end_file_name|><|fim▁begin|># Generated by Django 2.2 on 2019-06-20 09:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('scoping', '0294_titlevecmodel'), ] <|fim▁hole|> migrations.AddField( model_n...
operations = [
<|file_name|>factory.py<|end_file_name|><|fim▁begin|>__author__ = 'adalekin' import re import requests import hashlib from PIL import Image, ImageOps from cStringIO import StringIO from xparse.parser import * from xparse.utils import get_in_dict, set_in_dict class URLExtractor(object): def __init__(self, regex...
self._download_image(get_in_dict(video, image_field)))
<|file_name|>conversationtask.cpp<|end_file_name|><|fim▁begin|>/* ScummVM - Graphic Adventure Engine * * ScummVM is the legal property of its developers, whose names * are too numerous to list here. Please refer to the COPYRIGHT * file distributed with this source distribution. * * This program is free software; ...
break; case SAYING_QUESTION: { const ConversationLineList &responseList = getTaskManager()->getGame().getAssets().getResponseList();
<|file_name|>TimerThread.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************** tag: Peter Soetens Wed Apr 17 16:01:31 CEST 2002 TimerThread.cpp TimerThread.cpp - description ------------------- begin ...
// Logger::log() << Logger::Error << "beginAfter resize :"<< tasks.size() << Logger::endl; break; // This is our exit condition !
<|file_name|>womble.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 S...
ci = self._parseItem(item)
<|file_name|>regions-ref-in-fn-arg.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.apac...
fn arg_item(~ref x: ~int) -> &'static int { x //~^ ERROR borrowed value does not live long enough
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 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/...
// option. This file may not be copied, modified, or distributed // except according to those terms.
<|file_name|>IPRB.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """Mendel's First Law Usage: IPRB.py <input> IPRB.py (--help | --version) Options: -h --help show this help message and exit -v --version show version and exit """ problem_description = """Mendel's First...
kk = k / first_pop * (k - 1) / second_pop km = k / first_pop * (m) / second_pop + m / first_pop * (k) / second_pop
<|file_name|>rbm.py<|end_file_name|><|fim▁begin|>""" A module of restricted Boltzmann machine (RBM) modified from the Deep Learning Tutorials (www.deeplearning.net/tutorial/). Copyright (c) 2008-2013, Theano Development Team All rights reserved. Modified by Yifeng Li CMMT, UBC, Vancouver Sep 23, 2014 Contact: yifeng....
<|file_name|>base.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 The Kubernetes 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 <|fim▁hole|>WITHOUT WARRANTIES OR COND...
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,
<|file_name|>TestRepositoryImpl.java<|end_file_name|><|fim▁begin|>/* * ************************************************************************************* * Copyright (C) 2008 EsperTech, Inc. All rights reserved. * * http://esper.codehaus.org ...
// Lookup from s0 Cursor cursors[] = read(repository.getCursors(0));
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>#### PATTERN | NL | PARSER COMMAND-LINE ################################## # Copyright (c) 2010 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). # http://www.clips.ua.ac.be/pages/pattern<|fim▁hole...
########################################################################## # In Python 2.7+ modules invoked from the command line will look for a
<|file_name|>xmlrpc.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2013,2014, Oracle and/or its affiliates. All rights reserved. # # 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; version 2 of...
self.__handlers.append(https_handler) self.__scheme = 'https' else:
<|file_name|>clean-repo.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf8 -*- # # Python script to compile and compare locally installed programs with files listed in the repository # If the file doesn't exist in the repository, delete it, or move it to another folder # import os import platfor...
<|file_name|>default_exts.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import json from axe.http_exceptions import BadJSON def get_request(request): return request def get_query(request): return request.args def get_form(request): return request.form def get_body(request): return request...
def get_headers(request):
<|file_name|>sha2.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.org/licen...
let mut sh = Sha256::new();
<|file_name|>database.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from celery import current_app from celery.backends.base import BaseDictBackend from celery.utils.timeutils import maybe_timedelta from ..models import TaskMeta, TaskSetMeta class DatabaseBackend(BaseDictBackend): """Th...
<|file_name|>augment_test.py<|end_file_name|><|fim▁begin|># Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # ...
self.get_images('input_', self.input_augment_lt),
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import sys from PyQt4 import QtGui from dependence_repo_manager.core.manager import RepoManager from dependence_repo_manager.core.main_window import MainWindow <|fim▁hole|>if __name__ == '__main__': app = QtGui.QApplication(sys.argv) manager = RepoManager() ...
<|file_name|>clientService.js<|end_file_name|><|fim▁begin|>import { Client, ClientDao } from '../database/clientDao'; const dao = new ClientDao(); export default class ClientService { static save(accessToken, refreshToken, profile, done) { process.nextTick(() => { let client = new Client(); ...
<|file_name|>arc.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.org/licens...
let w = a.downgrade(); assert!(strong_count(&a) == 1); assert!(weak_count(&a) == 1);
<|file_name|>racingkings.py<|end_file_name|><|fim▁begin|>""" The Racing Kings Variation""" from pychess.Utils.const import RACINGKINGSCHESS, VARIANTS_OTHER_NONSTANDARD, \ A8, B8, C8, D8, E8, F8, G8, H8 from pychess.Utils.Board import Board RACINGKINGSSTART = "8/8/8/8/8/8/krbnNBRK/qrbnNBRQ w - - 0 1" RANK8 = (A8,...
"""
<|file_name|>helpersAOHtargetFinalCueLocatn.py<|end_file_name|><|fim▁begin|>from __future__ import print_function from __future__ import division __author__ = """Alex "O." Holcombe""" ## double-quotes will be silently removed, single quotes will be left, eg, O'Connor import numpy as np import itertools #to calculate al...
thisLine = visual.Circle(myWin, radius=lineWidth, pos=(x,y), fillColor=lineColor, lineColor=None, autoLog=autoLogging) lines.append(thisLine) #CREATING CUE TEXTURE
<|file_name|>data.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
var data = {videos-content: {}}
<|file_name|>vector10.hpp<|end_file_name|><|fim▁begin|>// Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector10...
<|file_name|>0026_preprintservice_license.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-12-09 21:59 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion <|fim▁hole|> dependencies = [ ('osf', '0025_prepri...
class Migration(migrations.Migration):
<|file_name|>TaskDeployer.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to y...
st.init(getSynapseEnvironment()); if (log.isDebugEnabled()) { log.debug("Initialized the StartupTask : " + st.getName()); }
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>/* Imagine v0.1 [main] Copyright (c) 2020-present, Hugo (hrkz) Frezat */ //! @see wiki /// http://imagine-research.org<|fim▁hole|>}<|fim▁end|>
use imagine::prelude::*; fn main() { println!("Hello Imagine! Currently ver. 0/1, or {:?}...", Number::Q(Rational::new(0, 1)).trivial());
<|file_name|>karma.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for karma v0.13.9 // Project: https://github.com/karma-runner/karma // Definitions by: Tanguy Krotoff <https://github.com/tkrotoff> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// <reference path="../bluebird/bluebird.d.ts"...
* If the basePath configuration is a relative path then it will be resolved to
<|file_name|>bounding_box.rs<|end_file_name|><|fim▁begin|>use crate::cube::Cube; use glium; use glium::{Display, Program, Surface, implement_vertex}; use glium::index::{IndexBuffer, PrimitiveType}; use std::rc::Rc; pub fn solid_fill_program(display: &Display) -> Program { let vertex_shader_src = include_str!("shad...
impl BoundingBox { pub fn new(display: &Display, c: &Cube, program: Rc<Program>) -> BoundingBox { let vertex_data = [
<|file_name|>interface.py<|end_file_name|><|fim▁begin|>#coding:utf-8 from typing import Any, Tuple, List, Iterable, Callable, Union, IO, Optional as Opt import pickle from time import time from numpy import ndarray from torch import autograd, nn, optim, from_numpy, stack from torch.nn.modules import loss from torch.nn...
result = nn_method(obj, *args, **kwargs) obj.set_mode(False) return result return method
<|file_name|>UnnecessaryParenthesesCheckTest.java<|end_file_name|><|fim▁begin|>//////////////////////////////////////////////////////////////////////////////// // checkstyle: Checks Java source code for adherence to a set of rules. // Copyright (C) 2001-2013 Oliver Burn // // This library is free software; you can red...
<|file_name|>common.go<|end_file_name|><|fim▁begin|>package main import ( "crypto/sha1" "fmt" "os" "time" "github.com/op/go-logging" ) type Pinger interface { Id() string Ping() } type Radio struct { Name string Uri string } type Server struct {<|fim▁hole|> Port int Internal bool LastPing int64 Ra...
Name string Host string
<|file_name|>appoinment.spec.js<|end_file_name|><|fim▁begin|>'use strict'; require('./connectionHelper'); const expect = require('chai').expect; const supertest = require('supertest'); const app = require('../app.js'); const Appointment = require('../models/appointment'); const agent = supertest(app); describe('appoi...
let appointment = {}; beforeEach(function(done) {
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>// 0.096s on A4-5000 (1.5 GHz) extern crate permutohedron; use std::collections::HashMap; fn main() { let input = include_str!("input.txt"); // Obtain locations and route possibilities let mut locations: Vec<&str> = Vec::new(); let mut routes: HashMap<...
<|file_name|>jquery.resss.js<|end_file_name|><|fim▁begin|>/* * Responsive Slideshow - jQuery plugin * * Copyright (c) 2010-2012 Roland Baldovino * * Project home: * https://github.com/junebaldovino/jquery.resss.plugin * * Version: 0.1 * */ (function($){ var _this,settings; var methods = { init : funct...
settings = $.extend( {
<|file_name|>driver.py<|end_file_name|><|fim▁begin|>""" @package mi.instrument.mclane.driver @file marine-integrations/mi/instrument/mclane/driver.py @author Dan Mergens @brief Driver base class for McLane instruments Release notes: initial version """ import datetime __author__ = 'Dan Mergens' __license__ = 'Apache ...
return return_list
<|file_name|>TemplateDAOJpa.java<|end_file_name|><|fim▁begin|>package eu.atos.sla.dao.jpa; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.EntityNotFoundException; import javax.persistence.NoResultException; import j...
}
<|file_name|>json.py<|end_file_name|><|fim▁begin|>import importlib from flask import render_template import lib.es as es def get(p): # get data source definiton query = 'name:{}'.format(p['nav'][3]) p['ds'] = es.list(p['host'], 'core_data', 'datasource', query)[0] # load service path = "web.module...
return mod.execute(p)
<|file_name|>fc_zone_manager.py<|end_file_name|><|fim▁begin|># (c) Copyright 2014 Brocade Communications Systems Inc. # All Rights Reserved. # # Copyright 2014 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with th...
return class_._instance
<|file_name|>root.js<|end_file_name|><|fim▁begin|>import React, {PropTypes} from "react"; import {Provider} from "react-redux"; import {Router} from "react-router"; import {getRoutes} from "./routes"; export default function Root({history, store}) { return ( <Provider store={store}> <Router his...
} Root.propTypes = {
<|file_name|>test_raw_messages_2.py<|end_file_name|><|fim▁begin|>__author__ = 'Ostico <ostico@gmail.com>' import sys import os import unittest from pyorient.exceptions import * from pyorient import OrientSocket from pyorient.messages.database import * from pyorient.messages.commands import * from pyorient.messages.cl...
# ################## msg = DbOpenMessage( connection )
<|file_name|>simple_tests.py<|end_file_name|><|fim▁begin|>from hiveplotter import HivePlot from networkx import nx import random from unittest import TestCase<|fim▁hole|> SEED = 1 NTYPES = ['A', 'B', 'C'] class SimpleCase(TestCase): def make_graph(self): G = nx.fast_gnp_random_graph(30, 0.2, seed=SEED) ...
<|file_name|>time_test.go<|end_file_name|><|fim▁begin|>package decoders import ( "testing" "time" "github.com/stretchr/testify/require"<|fim▁hole|>func TestParseTimeErrorParsing(t *testing.T) { r := require.New(t) _, err := parseTime([]string{"this is sparta"}) r.Error(err) } func TestParseTime(t *testing.T) ...
)
<|file_name|>index.tsx<|end_file_name|><|fim▁begin|>import React from 'react'; import ReactDOM from 'react-dom'; import { BrowserRouter } from "react-router-dom"; import App, {serviceWorkCallbacks} from './App'; import Globals from './Globals'; import * as serviceWorker from './serviceWorkerRegistration'; // Enable at...
onSuccess: (registration: ServiceWorkerRegistration) => { console.log('Precache app loaded!'); serviceWorkCallbacks.onSuccess(registration); }, onUpdate: (registration: ServiceWorkerRegistration) => { console.log('Found app updated!'); serviceWorkCallbacks.onUpdate(registration); }, });
<|file_name|>malioglasi.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 -tt # Author: Milos Buncic # Date: 29.06.2014 # Description: Search for specific article on the specific web page and send an email if you found something import os import sys import re import json import smtplib import requests from telegram i...
if re.search(keyword, text, re.IGNORECASE):
<|file_name|>test_jenkins_configuration.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2016 Mirantis, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; eit...
def setup_method(self, method): self.runner = CliRunner() def teardown_method(self, method):
<|file_name|>IAffichage.java<|end_file_name|><|fim▁begin|>/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package consolefps.views; import consolefps.models.elements.Elements; /** * * @author krilivye<|fim▁hole|> public String afficher(Elements element); }<|fim▁...
*/ public interface IAffichage {
<|file_name|>secure.js<|end_file_name|><|fim▁begin|>'use strict'; module.exports = { port: 443, db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://root:root@ds125481.mlab.com:25481/clubs-manager', assets: { lib: { css: [ 'public/lib/bootstrap/dist/css/bootstrap.min.css', 'public/lib/...
'public/lib/angular/angular.min.js', 'public/lib/angular-resource/angular-resource.min.js', 'public/lib/angular-animate/angular-animate.min.js', 'public/lib/angular-ui-router/release/angular-ui-router.min.js',
<|file_name|>memoryblock.hpp<|end_file_name|><|fim▁begin|>//===========================================================================// // File: memblock.hh // // Contents: Interface specification of the memory block class // //--------------------...
void* New();
<|file_name|>crypt.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python from base64 import b64encode, b64decode from Crypto import Random from Crypto.Cipher import AES, PKCS1_OAEP from Crypto.Hash import SHA256 from Crypto.PublicKey import RSA from Crypto.Random import random from Crypto.Signature import PKCS1_v1_5 pri...
padding_size = (16 - len(data) % 16) - 1 # Minus 1 byte for hex-encoded padding size padded_data = "%x%s" % (padding_size, data.rjust(len(data) + padding_size, pad_char)) aes_cipher = AES.new(aes_key, AES.MODE_CBC, aes_iv)
<|file_name|>getting_started.py<|end_file_name|><|fim▁begin|>from dcgpy import expression_gdual_double as expression from dcgpy import kernel_set_gdual_double as kernel_set from pyaudi import gdual_double as gdual # 1- Instantiate a random expression using the 4 basic arithmetic operations ks = kernel_set(["sum", "dif...
print("Expression:", ex(in_sym)[0])
<|file_name|>spamassassin.js<|end_file_name|><|fim▁begin|>// Call spamassassin via spamd var sock = require('./line_socket'); var prettySize = require('./utils').prettySize; var defaults = { spamd_socket: 'localhost:783', max_size: 500000, old_headers_action: "rename", subject_prefix: "*** SPAM **...
connection.transaction.notes.spamassassin = spamd_response;
<|file_name|>match-vec-mismatch-2.rs<|end_file_name|><|fim▁begin|>fn main() { match () { [()] => { } //~ ERROR mismatched types: expected `()` but found a vector pattern<|fim▁hole|><|fim▁end|>
} }
<|file_name|>solution_comparator.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- # Copyright (c) 2015 b<>com # # Authors: Jean-Emile DARTOIS <jean-emile.dartois@b-com.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Y...
<|file_name|>App.tsx<|end_file_name|><|fim▁begin|>import React, { useState } from "react"; import { Localized } from "@fluent/react"; import { FluentDateTime } from "@fluent/bundle"; import { Hello } from "./Hello"; import { SignIn } from "./SignIn"; export function App() { let [date] = useState(() => new Date());...
<p> {"Today is {$date}."}
<|file_name|>test_counter.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, unicode_literals from datetime import datetime, timedelta import time import unittest from DenyHosts.counter import Counter, CounterRecord class CounterRecordTest(unittest.TestCase): def test_init(self): c = ...
c = CounterRecord(count=count, date=date) string = '%d:%s' % (count, date) self.assertEqual(str(c), string)
<|file_name|>simple_array_sum.py<|end_file_name|><|fim▁begin|>#!/bin/python3 import sys <|fim▁hole|>n = int(input().strip()) arr = [int(arr_temp) for arr_temp in input().strip().split(' ')] total = sum(arr) print(total)<|fim▁end|>
<|file_name|>generate_ast.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # PLASMA : Generate an indented asm code (pseudo-C) with colored syntax. # Copyright (C) 2015 Joel # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publ...
return get_first_addr(par.nodes[i])
<|file_name|>macro_simple.rs<|end_file_name|><|fim▁begin|>macro_rules! list_of_nothing { ( $( $x:expr ),* ) => { { }<|fim▁hole|><|fim▁end|>
}; }
<|file_name|>interests.routing.ts<|end_file_name|><|fim▁begin|>import { Routes, RouterModule } from '@angular/router'; import { interestsComponent } from './interests.component';<|fim▁hole|> const routes: Routes = [ { path: '', component: interestsComponent } ]; export const routing = RouterModule.forChi...
<|file_name|>parser.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, absolute_import import re class CNFParser(object): """Stream parser for DIMACS format""" def __init__(self, file_object): self.file_object = file_object self.var_count = 0 self.clauses = [] ...
<|file_name|>binary.rs<|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 under the Apach...
field_type: TType::I64, id: Some(20), }; // no name
<|file_name|>map.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- <|fim▁hole|> gmaps = GoogleMaps() address = u'東京' lat, lng = gmaps.address_to_latlng(address.encode('utf-8')) print lat, lng<|fim▁end|>
from googlemaps import GoogleMaps
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Signal pattern matching.""" import re from typing import Union class PatternError(Exception): """Pattern error.""" class Pattern: """Signal pattern representation.""" PATTERN_REGEX = re.compile(r"[01xX]+") PATTERN_REGEX_BYTES = re.compile(b"...
self._pattern = pattern
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* * Copyright 2015-2019 Ben Ashford * * 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<|fim▁hole|> * Unless required by applicable law or a...
* * http://www.apache.org/licenses/LICENSE-2.0 *
<|file_name|>bebi103.py<|end_file_name|><|fim▁begin|>""" Utilities for Caltech BE/Bi 103. Author: Justin Bois """ import collections import random import warnings import numbers import matplotlib.path as path import numpy as np import pandas as pd import scipy.odr import scipy.stats as st import statsmodels.tools.nu...
n_temps, n_walkers, n_dim = p0.shape if p_dict is not None:
<|file_name|>array_primitive.rs<|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 unde...
v / MILLISECONDS,
<|file_name|>items.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html from scrapy.item import Item, Field class DmmJokeItem(Item): # define the fields for your item here like: #...
img_url = Field() img_desc = Field() price = Field()
<|file_name|>landoblog.go<|end_file_name|><|fim▁begin|>// Copyright 2013 Landon Wainwright. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Starts up the blog system using the default values package main import ( "flag" "log" "os" "ti...
}, }
<|file_name|>register.py<|end_file_name|><|fim▁begin|># pyOCD debugger # Copyright (c) 2016-2020 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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...
def read_core_registers_raw(self, reg_list): # Invalidate the cache. If the core is still running, just read directly from it. if self._check_cache():
<|file_name|>cfg.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.org/li...
Args: cfg_node: A CfgNode instance.
<|file_name|>lib.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/. */ #![feature(box_syntax)] #![feature(conservative_impl_trait)] #![f...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// +--------------------------------------------------------------------------+ // | Copyright 2016 Matthew D. Steele <mdsteele@alum.mit.edu> | // | | // | This file is part of Syste...
save_data: &mut SaveData, ) -> Mode { let view = {
<|file_name|>fuzz.py<|end_file_name|><|fim▁begin|>from random import randint <|fim▁hole|>overflowstrings = ["A" * 255, "A" * 256, "A" * 257, "A" * 420, "A" * 511, "A" * 512, "A" * 1023, "A" * 1024, "A" * 2047, "A" * 2048, "A" * 4096, "A" * 4097, "A" * 5000, "A" * 10000, "A" * 20000, "A" * 32762, "A" * 32763, "A" * 3276...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup setup( name='pymail365', version='0.1',<|fim▁hole|> author_email='mikko@aino.se', license='BSD', url='https://github.com/aino/pymail365', packages=['pymail365'], zip_safe=False, classifiers=[ 'Develo...
description='A python client for sending mail using Microsoft Office 365 rest service.', long_description=open('README.rst').read(), author='Mikko Hellsing',
<|file_name|>XMLSerializable.java<|end_file_name|><|fim▁begin|>/* * Javolution - Java(TM) Solution for Real-Time and Embedded Systems * Copyright (C) 2007 - Javolution (http://javolution.org/) * All rights reserved. * * Permission to use, copy, modify, and distribute this software is * freely granted, provided t...
// No method. Tagging interface.
<|file_name|>get_killmails_killmail_id_killmail_hash_internal_server_error.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ EVE Swagger Interface An OpenAPI for EVE Online OpenAPI spec version: 0.4.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pfo...
} self.attribute_map = {
<|file_name|>matmul_op_test.py<|end_file_name|><|fim▁begin|># Copyright 2015 Google Inc. 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/lic...
x = self._randMatrix(n, k, np.complex64) y = self._randMatrix(k, m, np.complex64) self._testCpuMatmul(x, y)
<|file_name|>export_channel_selector.cc<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2008-2013 Sakari Bergen <sakari.bergen@beatwaves.net> * Copyright (C) 2008-2016 Paul Davis <paul@linuxaudiosystems.com> * Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net> * Copyright (C) 2009-2012 David Robillard <d@dr...
it->set_value (route_cols.get_channel (n_channels).label, label); it->set_value (route_cols.get_channel (n_channels).port, boost::weak_ptr<AudioPort> ());
<|file_name|>associated-types-in-ambiguous-context.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 //...
fn main() {
<|file_name|>list.js<|end_file_name|><|fim▁begin|>// Dependencies let builder = require('focus').component.builder; let React = require('react'); let checkIsNotNull = require('focus').util.object.checkIsNotNull; let type = require('focus').component.types; let find = require('lodash/collection/find'); // Mixins let ...
<|file_name|>treegen.py<|end_file_name|><|fim▁begin|>### Use pydoc.render_doc(<mod>) to output contents of generated help to a string ### import sys import os import glob from os.path import join, getsize import re import json def is_pkg(path_parts, files): return "__init__.py" in files def count_class_refs(clas...
curr_node = pkg_tree for p in pkg_node_path: if p not in curr_node:
<|file_name|>capturing-logging.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.o...
#![allow(unknown_features)] #![feature(box_syntax)]
<|file_name|>util.js<|end_file_name|><|fim▁begin|>(function () { module.exports = { error: function () { console.error.apply(console,arguments) } }<|fim▁hole|>})()<|fim▁end|>
<|file_name|>dyndiscbayesiannetwork.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012, CyberPoint International, LLC # 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|>merge-path.d.ts<|end_file_name|><|fim▁begin|>import Graph from 'graphology-types';<|fim▁hole|><|fim▁end|>
export default function mergePath(graph: Graph, nodes: Array<unknown>): void;
<|file_name|>e7.py<|end_file_name|><|fim▁begin|>print ''' By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10,001st prime number? ''' <|fim▁hole|> while limit != 10001: x += 1 if isprime(x): limit += 1 print x problem()<|fim▁en...
def problem(): x,limit = 1,0
<|file_name|>issue-3184.rs<|end_file_name|><|fim▁begin|>/*/ struct Error{ message: String,<|fim▁hole|><|fim▁end|>
} */
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export * from './label-demo.component';
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Baobab documentation build configuration file, created by # sphinx-quickstart on Tue Dec 7 00:44:28 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values ...
<|file_name|>environment.hpp<|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 und...
<|file_name|>export_to_three.js.py<|end_file_name|><|fim▁begin|>''' author : "George Profenza" url : ("disturb", "disturbmedia.com/blog","My blog, http://tomaterial.blogspot.com") Export meshes the three.js 3D Engine by mr.doob's et al. More details on the engine here: https://github.com/mrdoob/three.js Currently...