prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>htmlcanvaselement.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 https://mozilla.org/MPL/2.0/. */ use crate::dom::attr::Attr; use crate::dom::bindin...
.map(AttrValue::as_uint_px_dimension)
<|file_name|>cli.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright (C) 2009-2020 the sqlparse authors and contributors # <see AUTHORS file> # # This module is part of python-sqlparse and is released under # the BSD License: https://opensource.org/licenses/BSD-3-Clause """Module that contains the comm...
group.add_argument( '-k', '--keywords',
<|file_name|>mallinson.py<|end_file_name|><|fim▁begin|>"""Calculate exact solutions for the zero dimensional LLG as given by [Mallinson2000] """ from __future__ import division from __future__ import absolute_import from math import sin, cos, tan, log, atan2, acos, pi, sqrt import scipy as sp import matplotlib.pyplot...
<|file_name|>command.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Gfx-rs Developers. // // 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/LICE...
<|file_name|>regie.py<|end_file_name|><|fim▁begin|>from .base import BaseInterface import eventlet from watchdog.observers import Observer from watchdog.events import PatternMatchingEventHandler from flask import Flask, render_template, session, request, send_from_directory from flask_socketio import SocketIO, emit, jo...
# self.regieinterface.log('requesting index') return send_from_directory(www_path, 'index.html') @app.route('/<path:path>')
<|file_name|>decorators.py<|end_file_name|><|fim▁begin|>import base64 try: from functools import wraps except ImportError: from django.utils.functional import wraps # Python 2.3, 2.4 fallback. from django import http, template from django.conf import settings from django.contrib.auth.models import User from d...
if '@' in username: # Mistakenly entered e-mail address instead of username? Look it up. users = list(User.all().filter('email =', username)) if len(users) == 1 and users[0].check_password(password):
<|file_name|>event_manager_spec.ts<|end_file_name|><|fim▁begin|>import { describe, ddescribe, it, iit, xit, xdescribe, expect, beforeEach, el } from 'angular2/testing_internal'; import {EventManager, EventManagerPlugin} from 'angular2/platform/common_dom'; import {DomEventsPlugin} from 'angular2/src/p...
<|file_name|>ElasticServiceManagerOptions.java<|end_file_name|><|fim▁begin|>/* * Copyright 2006-2007 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 * *...
options.setUseScript(useScript); if (overrideVmInputArguments) {
<|file_name|>test_plugin_utils.py<|end_file_name|><|fim▁begin|>import sys import unittest from streamlink.plugin.api.utils import itertags def unsupported_versions_1979(): """Unsupported python versions for itertags 3.7.0 - 3.7.2 and 3.8.0a1 - https://github.com/streamlink/streamlink/issues/1979 ...
def test_itertags_single_text(self):
<|file_name|>trace_visualiser.py<|end_file_name|><|fim▁begin|>from tkinter.scrolledtext import ScrolledText import tkinter as tk from trace_json import traceparse from parsley_json import jsonGrammar jsonData = open('337141-steamcube.json').read() class Tracer(object): def __init__(self, grammarWin, inputWin, ...
_, trace = traceparse(jsonData)
<|file_name|>read_test.go<|end_file_name|><|fim▁begin|>package msgp import ( "bytes" "github.com/stretchr/testify/assert" "testing" ) func TestReadInt64Bytes(t *testing.T) { //Negative fixed int obtained, rest, err := ReadInt64Bytes([]byte{0xff}) expected := int64(-1) assert.Equal(t, nil, err) assert.Equal(t...
//Positive fixed int
<|file_name|>7985203_AC_250MS_7460K.cpp<|end_file_name|><|fim▁begin|>/******************************************************************************* * Online Judge : POJ * Problem Title : Remmarguts' Date * Problem URL : http://acm.pku.edu.cn/JudgeOnline/problem?id=2449 * ID : 2449...
<|file_name|>licensor.py<|end_file_name|><|fim▁begin|>from django.db import models class Licensor(models.Model): name = models.CharField(max_length=255, unique=True) def __unicode__(self): return self.name <|fim▁hole|><|fim▁end|>
class Meta: ordering = ['name']
<|file_name|>test_dumper.py<|end_file_name|><|fim▁begin|>import io import shutil import pytest from unittest import mock <|fim▁hole|>from mitmproxy.test import tutils from mitmproxy.addons import dumper from mitmproxy import exceptions from mitmproxy import http def test_configure(): d = dumper.Dumper() with...
from mitmproxy.test import tflow from mitmproxy.test import taddons
<|file_name|>control.js<|end_file_name|><|fim▁begin|>var Util = require( 'findhit-util' ); // ----------------------------------------------------------------------------- // Data handles wizard data into session function Data ( route ) { var session = route.req[ route.router.options.reqSessionKey ]; // If t...
// Otherwise, lets set it!
<|file_name|>ITagBusiness.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../dependencies.ts" /> /** * Business layer for tags */ interface ITagBusiness { isValueValid(value : string) : boolean; // compare(newLabel : string, exisitingLabel : string) : boolean; add(tag : Tag, callback? : Action<Tag>, err...
<|file_name|>store.rs<|end_file_name|><|fim▁begin|>/* * Created on Tue Oct 19 2021 * * Copyright (c) storycraft. Licensed under the MIT Licence. */ use std::sync::Arc; use font_kit::{ canvas::{Canvas, Format, RasterizationOptions}, hinting::HintingOptions, }; use pathfinder_geometry::transform2d::Transfor...
texture::{resources::TextureResources, Texture2D}, unit::{PixelUnit, WgpuUnit}, wgpu::{Queue, TextureFormat}, };
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>#coding=utf-8 from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ # Register your models here. class RegisterForm(forms.Form): username=forms.CharField(label=_(u"昵称"),max_length=20,widget=f...
<|file_name|>match.py<|end_file_name|><|fim▁begin|># Portions Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. # match.py - filename matching # # Copyright 2008, 2009 Matt Mackall <mpm@selenic.com> and ...
normalized and rooted patterns and with listfiles expanded."""
<|file_name|>create_plants2table.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import os import sys import math import glob import sql import process_xls as p_xls """ Change to whatever is needed. """ DEFAULT_DATE_STR = '' DB_NAME = 'trost_prod' TABLE_NAME = 'plants2' TABLE = [ 'id INT(11) AUTO_INCREMENT',...
if __name__ == '__main__': main(sys.argv[1:])
<|file_name|>test_db_plugin.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may ...
<|file_name|>div.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright 2020 Google LLC. 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.or...
<|file_name|>CpiConfig.go<|end_file_name|><|fim▁begin|>package ConsumablePriceIndex import ( "github.com/crowdmob/goamz/aws" "os" "crypto/aes" "crypto/cipher" "encoding/base64" "crypto/sha256" "time" "fmt" "github.com/bkirkby/ConsumablePriceIndex/data" "github.com/bkirkby/propfile" "strconv" "s...
<|file_name|>issue-46727.rs<|end_file_name|><|fim▁begin|>// compile-flags: -Cmetadata=aux pub trait Foo {} pub struct Bar<T> { x: T }<|fim▁hole|>impl<T> Foo for Bar<[T; 1 + 1 + 1]> {}<|fim▁end|>
<|file_name|>l-calc_lt.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="lt_LT"> <context> <name>mainUI</name> <message> <location filename="../mainUI.ui" line="14"/> <location filename="../mainUI.cpp" line="53"/> <source>Cal...
<source>Hyperbolic Sine %1</source>
<|file_name|>messages.py<|end_file_name|><|fim▁begin|>from edx_ace import MessageType # This code also exists in the Credentials app `messages.py` file. Any changes here should be duplicated there as well # until we can come back around and create a common base Messaging class that the Credentials and Records app wil...
<|file_name|>enemies.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # File: enemy.py # Author: Casey Jones # # Created on July 20, 2009, 4:48 PM # # This file is part of Alpha Beta Gamma (abg). # # ABG is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Lic...
<|file_name|>budgets.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012-2021, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from .aws import Action as BaseAction from .aws import BaseARN service_name = "AWS Budget Service" prefix = "budgets" <|fim▁hole|> def __init__(se...
class Action(BaseAction):
<|file_name|>structured_data_annotator.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from __future__ import absolute_import from .annotator import Annotator, AnnoTier, AnnoSpan import re import pyparsing as pypar def word_token_regex(disallowed_delimiter): return pypar.Regex(r"[^\s\n" + re.escape(disallow...
def annotate(self, doc): doc_text_len = len(doc.text)
<|file_name|>kodi.py<|end_file_name|><|fim▁begin|>""" SALTS XBMC Addon Copyright (C) 2015 tknorris This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License,...
q[key] = queries[key][0]
<|file_name|>mul.rs<|end_file_name|><|fim▁begin|>#![feature(core, core_simd)] extern crate core; #[cfg(test)] mod tests { use core::simd::u64x2; // #[simd] // #[derive(Copy, Clone, Debug)] // #[repr(C)] // pub struct u64x2(pub u64, pub u64); #[test] fn mul_test1() { let x: u64x2 = u64x2(...
let y: u64x2 = u64x2( 2, 2
<|file_name|>24.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export { MicrophoneFilled24 as default } from "../../";<|fim▁end|>
<|file_name|>where_op_test.py<|end_file_name|><|fim▁begin|># Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
def benchmarkBatchSelect(self): for (m, n, use_gpu) in itertools.product([1000, 10000, 100000],
<|file_name|>exptemplate.js<|end_file_name|><|fim▁begin|>var exptemplate = require('../prepublic/javascripts/exptemplate');<|fim▁hole|><|fim▁end|>
module.exports = exptemplate;
<|file_name|>json.go<|end_file_name|><|fim▁begin|>package utils<|fim▁hole|><|fim▁end|>
type Map map[string]interface{}
<|file_name|>generate_tests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2017 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....
container['args'].append('--timeout=%d' % (timeout + 20)) container['args'].extend(k8s_version.get('args', [])) container['args'].append('--root=/go/src')
<|file_name|>intravisit.rs<|end_file_name|><|fim▁begin|>//! HIR walker for walking the contents of nodes. //! //! **For an overview of the visitor strategy, see the docs on the //! `super::itemlikevisit::ItemLikeVisitor` trait.** //! //! If you have decided to use this visitor, here are some general //! notes on how to...
} PatKind::Binding(_, _hir_id, ident, ref optional_subpattern) => {
<|file_name|>task_queue_manager.py<|end_file_name|><|fim▁begin|># (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Found...
# dictionaries to keep track of failed/unreachable hosts self._failed_hosts = dict() self._unreachable_hosts = dict()
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main // safe -- 15.9ns/op // unsafe -- 1.6ns/op<|fim▁hole|> "unsafe" ) // can we unsafe cast to unwrap all the interface layers? Or is the value in // memory different now? No! We have a new layer of indirection... func unsafeErr(err error) uintptr { if er...
import ( "fmt" "syscall"
<|file_name|>MinStack.java<|end_file_name|><|fim▁begin|>import org.junit.Test; import java.util.Stack; import static junit.framework.Assert.assertEquals; /** * https://leetcode.com/problems/min-stack/ */ public class MinStack { class StackItem { int value; int min; StackItem(int value,...
<|file_name|>chembl_graph_conv.py<|end_file_name|><|fim▁begin|>""" Script that trains graph-conv models on ChEMBL dataset. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals import numpy as np np.random.seed(123) import tensorflow as tf tf.set_random_seed(...
print("Evaluating model")
<|file_name|>layoutselect.js<|end_file_name|><|fim▁begin|>/** * Layout Select UI * * @package zork * @subpackage form * @author Kristof Matos <kristof.matos@megaweb.hu> */ ( function ( global, $, js ) { "use strict"; if ( typeof js.layoutSelect !== "undefined" ) { return; } js.requi...
} }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from .pg import PatternGenerator from .selector import Selector PatternGenerator('') Selector('')<|fim▁end|>
from . import meta_selector # noqa
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- __author__ = "Ildar Bikmamatov" __email__ = "vistoyn@gmail.com"<|fim▁hole|>from . import log from .lib import * from .error import * from .colors import colorf from .datelib import *<|fim▁end|>
__copyright__ = "Copyright 2016" __license__ = "MIT" __version__ = "1.0.1"
<|file_name|>renderingController.js<|end_file_name|><|fim▁begin|>/** * Created by Primoz on 20.7.2016. */ let renderingController = function($scope, SettingsService, InputService, TaskManagerService, Annotations, PublicRenderData, SharingService) { // Context let self = this; // Required programs th...
TaskManagerService.addResultCallback("MHDLoader", PublicRenderData.replaceRenderContent); // endregion
<|file_name|>scrape-multi.js<|end_file_name|><|fim▁begin|>const SELECTOR_BOOK_IMAGE = '#default > div > div > div > div > section > div:nth-child(2) > ol > li:nth-child(1) > article > div.image_container > a > img'; const puppeteer = require('puppeteer'); let scrapeSite1 = async (browser) => { const page = await bro...
scrapeSite1(browser), scrapeSite1(browser), scrapeSite1(browser),
<|file_name|>Stacked100.js<|end_file_name|><|fim▁begin|>/** * 100% stacked area are multi-series area charts where categories are stacked (percentage * values) on top of each other, with an additional category 'Others' that is used to sum * up the various categories for each series to a perfect 100%. */ Ext.define(...
{ text: 'Month', dataIndex: 'month', renderer: Ext.identityFn }, { text: 'IE', dataIndex: 'data1' }, { text: 'Firefox', dataIndex: 'data2' }, { text: 'Chrome', dataIndex: 'data3' },
<|file_name|>steadystatetest.cc<|end_file_name|><|fim▁begin|>#include "steadystatetest.hh" #include <models/REmodel.hh> #include <models/LNAmodel.hh> #include <models/IOSmodel.hh> #include <models/sseinterpreter.hh> #include <models/steadystateanalysis.hh><|fim▁hole|>#include <parser/sbml/sbml.hh> using namespace iNA...
#include <eval/jit/engine.hh>
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>"""Conditional import for Chipsec. Only Linux is supported at this stage."""<|fim▁end|>
#!/usr/bin/env python
<|file_name|>all_62.js<|end_file_name|><|fim▁begin|>var searchData= [ ['backtrace',['backtrace',['../class_logger.html#a5deb9b10c43285287a9113f280ee8fab',1,'Logger']]],<|fim▁hole|> ['basic_2ephp',['Basic.php',['../_paginator_2_basic_8php.html',1,'']]], ['basic_2ephp',['Basic.php',['../_auth_2_basic_8php.html',1,''...
['baseexception',['BaseException',['../class_base_exception.html',1,'']]], ['baseexception_2ephp',['BaseException.php',['../_base_exception_8php.html',1,'']]], ['basic_2ephp',['Basic.php',['../_menu_2_basic_8php.html',1,'']]],
<|file_name|>run_asterois.py<|end_file_name|><|fim▁begin|><|fim▁hole|> error = True while error: error = False try: subprocess.check_call("./asteroids -hostAt=\":10034\" &> /dev/null", shell=True) except subprocess.CalledProcessError: error = True if __name__ == "__main__": main()<|fim▁end|>
import subprocess def main():
<|file_name|>escape-html.pipe.ts<|end_file_name|><|fim▁begin|>import { Pipe, PipeTransform } from '@angular/core'; import { DomSanitizer } from '@angular/platform-browser'; @Pipe({ name: 'keepHtml', pure: false }) export class EscapeHtmlPipe implements PipeTransform {<|fim▁hole|> transform(content) { return this....
constructor(public sanitizer: DomSanitizer) { }
<|file_name|>hello.py<|end_file_name|><|fim▁begin|>def hello_again():<|fim▁hole|><|fim▁end|>
print("hello again")
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for optboard project. It exposes the WSGI callable as a module-level variable named ``application``.<|fim▁hole|>For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi im...
<|file_name|>dompointreadonly.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/. */ use dom::bindings::codegen::Bindings::DOMPointReadOn...
// https://dev.w3.org/fxtf/geometry/Overview.html#dom-dompointreadonly-x fn X(&self) -> f64 { self.x.get() }
<|file_name|>create-handle-group.d.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright (c) 2017 Google Inc. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * Code distributed by Google as part of this project is also * subject to...
import { Strategy } from '../strategizer.js'; export declare class CreateHandleGroup extends Strategy { generate(inputParams: any): any; }
<|file_name|>mod.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 version...
impl str::FromStr for Algorithm {
<|file_name|>tdf92611.py<|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/.<|fim▁hole|># from uitest.framework import UITestCase import time...
<|file_name|>additional.py<|end_file_name|><|fim▁begin|>from contextlib import contextmanager from functools import wraps from werkzeug.local import LocalProxy, LocalStack _additional_ctx_stack = LocalStack() __all__ = ("current_additions", "Additional", "AdditionalManager") @LocalProxy def current_additions(): ...
rv = _additional_ctx_stack.pop()
<|file_name|>issue-36936.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// check that casts are not being treated as lexprs. fn main() { let mut a = 0i32; let b = &(a as i32); a = 1; assert_ne!(&a as *const i32, b as *const i32); assert_eq!(*b, 0); assert_eq!(issue_36936(), 1); } struct A(u32);...
// run-pass
<|file_name|>kindck-inherited-copy-bound.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://ww...
let x = box 3; let y = &x; let z = &x as &Foo; //~ ERROR `core::marker::Copy` is not implemented }
<|file_name|>concurrent.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2012 Facebook # # 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...
import sys from tornado.log import app_log from tornado.stack_context import ExceptionStackContext, wrap
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ import datetime # for checking renewal date range class RenewBookForm(forms.Form): renewal_date = forms.DateField(help_text="Ente...
<|file_name|>Toolbar.tsx<|end_file_name|><|fim▁begin|>import React, { Fragment, FunctionComponent } from 'react'; import { styled } from '@storybook/theming'; import { window } from 'global'; import { FlexBar } from '../bar/bar'; import { Icons } from '../icon/icon'; import { IconButton } from '../bar/button'; interf...
key="zoomout" onClick={e => { e.preventDefault(); zoom(1.25);
<|file_name|>it.js<|end_file_name|><|fim▁begin|>tinymce.addI18n('it',{ "Cut": "Taglia", "Heading 5": "Intestazione 5", "Header 2": "Header 2", "Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Il tuo browser non supporta l'accesso diretto negli Appu...
"Cell": "Cella", "Middle": "In mezzo", "Cell type": "Tipo di Cella", "Copy row": "Copia Riga",
<|file_name|>minimum_spanning_tree_kruskal2.py<|end_file_name|><|fim▁begin|>from __future__ import annotations from typing import Generic, TypeVar T = TypeVar("T") class DisjointSetTreeNode(Generic[T]): # Disjoint Set Node to store the parent and rank def __init__(self, data: T) -> None: self.data =...
Details: https://en.wikipedia.org/wiki/Kruskal%27s_algorithm
<|file_name|>ExpressionService.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2004-2022, University of Oslo * 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 ...
* those found in data element operands. Returns an empty set if the given * expression is null.
<|file_name|>ImagePagerActivity.java<|end_file_name|><|fim▁begin|>package com.example.cdm.huntfun.activity; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerA...
<|file_name|>BookController.java<|end_file_name|><|fim▁begin|>package com.jim.portal.controller; import com.jim.portal.entity.BooksEntity; import com.jim.portal.hibernate.BookManagementRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import or...
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>""" Django settings for paulpruitt_net project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths...
# Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ # SECURITY WARNING: don't run with debug turned on in production!
<|file_name|>TickerFetchIntegration.java<|end_file_name|><|fim▁begin|>package org.knowm.xchange.bitstamp.service.marketdata; import static org.fest.assertions.api.Assertions.assertThat; import org.junit.Test; import org.knowm.xchange.Exchange; import org.knowm.xchange.ExchangeFactory; import org.knowm.xchange.bitsta...
import org.knowm.xchange.dto.marketdata.Ticker; import org.knowm.xchange.service.polling.marketdata.PollingMarketDataService;
<|file_name|>tool_densfilter.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Density Filter Tool Created on Thu May 11 11:03:05 2017 @author: cheny """ from arcpy import Parameter import arcpy from section_cpu import dens_filter_cpu from multiprocessing import cpu_count class DensFilterTool(object): ...
paramdistthrs.value=100.0 #8 paramdensthrs= Parameter(
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate ncurses; mod messages; mod display; mod feature; mod gamestate; use ncurses::*; use std::sync::mpsc::{channel, Sender}; use std::thread; use std::time::Duration; use messages::*; use gamestate::{State,Story}; fn countdown(tx: Sender<MainLoopMsg>) { ...
// we want to get full commands now, while updating display, so we need to use halfdelay+echo display::change_input_mode();
<|file_name|>MembraneDesign_100Wafer_v1.1.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Fri Dec 18 14:11:31 2015 @author: Martin Friedl """ from datetime import date import numpy as np from Patterns.GrowthTheoryCell import make_theory_cell from Patterns.GrowthTheoryCell_100_3BranchDevices i...
block.add(tem_membranes2, origin=(center_x, center_y + 2000))
<|file_name|>tx_processor.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 Mozilla // // 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 // Unless re...
pub struct Processor {}
<|file_name|>plot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Contains functions to plot the results of the dustydiffusion test. @author: ibackus """ import matplotlib.pyplot as plt import numpy as np import pynbody import diskpy #sim, epsEstimator, ts, runpars = analyze.loadSim(simdir) def crossSect...
# Make lines and points the same color line[0].set_color(scatter[0].get_color())
<|file_name|>ed_handler.py<|end_file_name|><|fim▁begin|># Copyright (c) 2001-2015, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.can...
ed_db_params = docker_ed.get_db_params()
<|file_name|>orchard-tinymce.js<|end_file_name|><|fim▁begin|>tinyMCE.init({ theme: "advanced", mode: "specific_textareas", editor_selector: "tinymce", plugins: "fullscreen,autoresize,searchreplace,mediapicker,inlinepopups", theme_advanced_toolbar_location: "top", theme_advanced_toolbar_al...
<|file_name|>network.py<|end_file_name|><|fim▁begin|>import ipaddress import docker.types def init(): pass def get_next_cidr(client): networks = client.networks.list() last_cidr = ipaddress.ip_network("10.0.0.0/24") for network in networks: if (network.attrs["IPAM"] and network.attrs["IPAM"]...
network.remove() ipam_pool = docker.types.IPAMPool(subnet=cidr.exploded, gateway=(cidr.network_address + 1).exploded)
<|file_name|>html.js<|end_file_name|><|fim▁begin|>/* eslint-disable no-cond-assign, no-param-reassign */ import voidElements from "void-elements"; function isVoidElement(tag) { const tagName = tag.match(/<([^\s>]+)/); return Boolean(tagName) && voidElements[tagName[1].toLowerCase()] === true; } export default { ...
} return tags;
<|file_name|>logging_test.py<|end_file_name|><|fim▁begin|># Copyright 2015 Google Inc. All Rights Reserved.<|fim▁hole|># 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 # # Unless required by applicable law or ...
# # Licensed under the Apache License, Version 2.0 (the "License");
<|file_name|>xhr.js<|end_file_name|><|fim▁begin|>'use strict'; /*global ActiveXObject:true*/ var defaults = require('./../defaults'); var utils = require('./../utils'); var buildUrl = require('./../helpers/buildUrl'); var cookies = require('./../helpers/cookies'); var parseHeaders = require('./../helpers/parseHeaders...
statusText: request.statusText, headers: responseHeaders, config: config };
<|file_name|>evaluete.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from __future__ import print_function import sys, os, yaml, glob import subprocess import pandas as pd import re import shutil import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from nougat import common, a...
outfile = os.path.join("contig_stats", "contiguity.out") if not os.path.exists("contig_stats"):
<|file_name|>IdentifierUtils.cpp<|end_file_name|><|fim▁begin|>// Copyright (C) 2011, 2012 Google Inc. // // This file is part of ycmd. // // ycmd 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 versio...
namespace YouCompleteMe {
<|file_name|>ForgotPasswordCtrl.js<|end_file_name|><|fim▁begin|>angular.module('app.controllers.ForgotPasswordCtrl', ['ngRoute']) .controller('ForgotPasswordCtrl', ['$scope', '$http', '$modalInstance', 'forgotPasswordService', function($scope, $http, $modalInstance, forgotPasswordService) { $scope.forgot_...
$scope.ok = function () { forgotPasswordService.save($scope.forgot_data); $modalInstance.close($scope.forgot_data.email); };
<|file_name|>config.ts<|end_file_name|><|fim▁begin|>import { browser, Config } from 'protractor'; import { reporter } from './helpers/reporter'; export const config: Config = { framework: 'jasmine', SELENIUM_PROMISE_MANAGER: true, specs: ['../test/**/*.spec.js'], noGlobals: true, onPrepare: () => { browser.m...
chromeOptions: { args: ['disable-infobars=true --window-size=800,600'], prefs: { credentials_enable_service: false } }
<|file_name|>test_pdfbase_encodings.py<|end_file_name|><|fim▁begin|>from reportlab.test import unittest from reportlab.test.utils import makeSuiteForClasses, outputfile, printLocation, NearTestCase from reportlab.pdfgen.canvas import Canvas from reportlab.pdfbase import pdfmetrics from reportlab.pdfbase.ttfonts import...
<|file_name|>protocol.py<|end_file_name|><|fim▁begin|># Copyright 2009-2011 Klas Lindberg <klas.lindberg@gmail.com> # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. import sys import...
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from datetime import date, datetime, timedelta from itertools import chain from operator import attrgetter from django.conf import settings from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured from django.core.urlresolvers import reverse from dj...
except ObjectDoesNotExist: raise Http404 else: group = None
<|file_name|>GravatarTool.java<|end_file_name|><|fim▁begin|>/* * This file is part of the OTHERobjects Content Management System. * * Copyright 2007-2009 OTHER works Limited. * * OTHERobjects is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as publis...
} } catch (UnsupportedEncodingException e) {
<|file_name|>chatRoom.py<|end_file_name|><|fim▁begin|>import logging from errbot import BotPlugin, botcmd, SeparatorArgParser, ShlexArgParser from errbot.backends.base import RoomNotJoinedError log = logging.getLogger(__name__) class ChatRoom(BotPlugin): connected = False def callback_connect(self): ...
return f'Joined the room {room_name}.'
<|file_name|>sessionmanagerserver.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2014 InfiniDB, 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; version 2 of the License. This ...
try { stmp = conf->getConfig("SessionManager", "MaxConcurrentTransactions");
<|file_name|>faq.js<|end_file_name|><|fim▁begin|>/** * Interaction for the faq module * * @author Annelies Van Extergem <annelies@netlash.com> * @author Jelmer Snoeck <jelmer.snoeck@netlash.com> * @author Thomas Deceuninck <thomas@fronto.be> */ jsFrontend.faq = { // init, something like a constructor init: func...
<|file_name|>config.py<|end_file_name|><|fim▁begin|># Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. # Originally contributed by Check Point Software Technologies, Ltd. import ConfigParser class Conf...
setattr(self, name, value)
<|file_name|>399106d8a6ad_.py<|end_file_name|><|fim▁begin|>"""empty message <|fim▁hole|>Revises: None Create Date: 2015-03-06 03:55:19.157958 """ # revision identifiers, used by Alembic. revision = '399106d8a6ad' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands au...
Revision ID: 399106d8a6ad
<|file_name|>solution.py<|end_file_name|><|fim▁begin|>def solution(s): i = 0 j = len(s) - 1 while i < j: if s[i] == s[j]: i += 1 j -= 1 else: t = s[i + 1:j + 1] if t == t[::-1]: return i else: r...
testCount = int(input()) for testId in range(testCount): s = input().strip()
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Sends an email using the client use std::string::String; use std::net::{SocketAddr, ToSocketAddrs}; use openssl::ssl::{SslContext, SslMethod}; use transport::error::{EmailResult, Error}; use transport::smtp::extension::{Extension, ServerInfo}; use transport::smtp:...
<|file_name|>run_lstm.py<|end_file_name|><|fim▁begin|>import os import sys import numpy as np sys.path.insert(0, os.getcwd() + '/../../tools/') import lstm import wb import wer def rescore_all(workdir, nbestdir, config): for tsk in ['nbestlist_{}_{}'.format(a, b) for a in ['dt05', 'et05'] for b in ['real', 'simu...
<|file_name|>PreparedStatementTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2012-2015 DataStax 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...
session.executeAsync(bs); } finally { otherCluster.close(); }
<|file_name|>Loader.js<|end_file_name|><|fim▁begin|>function Loader() { var self = this; self.cache = {}; // Filename -> {Geometry, Material, [callbacks]} self.textureCache = {}; // Filename -> Texture self.loader = new THREE.JSONLoader(); } Loader.prototype.loadTexture = function(filename, callback) {...