prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>hessian_identity_list.py<|end_file_name|><|fim▁begin|>from dolfin import * from dolfin_adjoint import * parameters["adjoint"]["cache_factorizations"] = True mesh = UnitSquareMesh(3, 3) V = FunctionSpace(mesh, "R", 0) test = TestFunction(V) trial = TrialFunction(V) def main(m): u = interpolate(Const...
F = inner(sin(u)*u*u*trial, test)*dx - inner(u**4, test)*dx
<|file_name|>shard.go<|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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by a...
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<|file_name|>treeshaking_spec.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import '@angular/compiler'; import * as fs from 'fs'; ...
}); });
<|file_name|>app.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../src/bobril.d.ts"/> /// <reference path="../../src/bobril.mouse.d.ts"/> module MouseOwnerApp { var button: IBobrilComponent = { init(ctx: any, me: IBobrilNode): void { ctx.backColor = "#f0f0f0"; }, render...
return true; } };
<|file_name|>evernote_exporter.py<|end_file_name|><|fim▁begin|>from fnmatch import fnmatch import os from sys import exit import html2text import re import urllib import shutil import logging import sqlite3 from sys import stdout logging.basicConfig(filename='error_log.log', filemode='a') class BackupEvernote(objec...
self.output_dir = output_dir def _counter(self, ind, msg): stdout.write('\r' + '\t%s: %s' % (msg, ind))
<|file_name|>nvp_qos_queue.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Nicira 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 co...
<|file_name|>page-two.component.ts<|end_file_name|><|fim▁begin|>import {Component, OnInit} from '@angular/core'; @Component({ selector: 'test-page-two', templateUrl: './page-two.component.html', styleUrls: [ './page-two.component.scss' ] }) export class PageTwoComponent implements OnInit { message: stri...
<|file_name|>types_swagger_doc_generated.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 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...
return map_RuleWithOperations } var map_ServiceReference = map[string]string{
<|file_name|>FormDialog.messages.js<|end_file_name|><|fim▁begin|>import { defineMessages } from 'react-intl'; export default defineMessages({ save: { id: 'cboard.components.FormDialog.save', defaultMessage: 'Save' }, cancel: { id: 'cboard.components.FormDialog.cancel',<|fim▁hole|><|fim▁end|>
defaultMessage: 'Cancel' } });
<|file_name|>linearDirection.H<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-201...
//- Destructor
<|file_name|>worker.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2013 ASMlover. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributio...
<|file_name|>single_server_kill_reconnect.js<|end_file_name|><|fim▁begin|>var mongodb = process.env['TEST_NATIVE'] != null ? require('../../lib/mongodb').native() : require('../../lib/mongodb').pure(); var testCase = require('../../deps/nodeunit').testCase, debug = require('util').debug, inspect = require('util')....
// Kill server instance serverManager.stop(9, function(err, result) {
<|file_name|>mdProject.cpp<|end_file_name|><|fim▁begin|>/////////////////////////////////////////////////////////////////////////////// // // // // /////////////////////////////////////////////////////////////////////////////// // Includes #include "include/mdShared.h" #include "include/mdBreakPoint.h" #include "incl...
<|file_name|>mock_registry.go<|end_file_name|><|fim▁begin|>// Copyright 2015 flannel 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/LICEN...
}, nil }
<|file_name|>binary-tree-tilt.py<|end_file_name|><|fim▁begin|># Time: O(n) # Space: O(n) # Given a binary tree, return the tilt of the whole tree. # # The tilt of a tree node is defined as the absolute difference # between the sum of all left subtree node values and # the sum of all right subtree node values. Null no...
# Example:
<|file_name|>trobador.py<|end_file_name|><|fim▁begin|>from gi.repository import GObject, Gtk, Gtranslator, PeasGtk from panel import Panel import sys from gettext import _ class TrobadorPlugin(GObject.Object, Gtranslator.TabActivatable, PeasGtk.Configurable): __gtype_name__ = "TrobadorPlugin" tab = GObject.p...
self.version_entry.set_text(TrobadorPlugin.version) #save_button = Gtk.Button(label="Guardar")
<|file_name|>ResponseError-test.js<|end_file_name|><|fim▁begin|>/* describe, it, afterEach, beforeEach */<|fim▁hole|>import chai from 'chai'; import chaiAsPromised from 'chai-as-promised'; chai.use(chaiAsPromised); let expect = chai.expect; import config from '../config'; import util from './util'; import ResponseErr...
import './snoocore-mocha';
<|file_name|>CourseResult.java<|end_file_name|><|fim▁begin|>package bms.player.beatoraja.result; import static bms.player.beatoraja.ClearType.*; import static bms.player.beatoraja.skin.SkinProperty.*; import java.util.*; import java.util.logging.Logger; import bms.player.beatoraja.input.KeyCommand; import com.badlog...
}
<|file_name|>simp_test.cpp<|end_file_name|><|fim▁begin|>/* * sample program to write out the calibration table and then * reload it again, verify that the data is in fact reversed * * * */ #include <aiousb.h> #include <stdio.h> #include <unistd.h> #include <exception> #include <iostream> #include "TestCaseSet...
} catch ( Error &e ) { std::cout << "Errors" << e.what() << std::endl;
<|file_name|>is_IS.tsx<|end_file_name|><|fim▁begin|>import isIS from '../../date-picker/locale/is_IS'; <|fim▁hole|>export default isIS;<|fim▁end|>
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.conf import settings from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigured <|fim▁hole|> FREEZE_ROOT = getattr(settings, 'FREEZE_ROOT', os.path.abspath(os.path.join(settings.MEDIA_RO...
import os
<|file_name|>issue-65041-empty-vis-matcher-in-enum.rs<|end_file_name|><|fim▁begin|>// check-pass // Here we check that a `:vis` macro matcher subsititued for the empty visibility // (`VisibilityKind::Inherited`) is accepted when used before an enum variant. fn main() {} macro_rules! mac_variant { ($vis:vis MARKE...
} mac_variant!(MARKER);
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import re from setuptools import setup, find_packages __version__ = re.search(r"__version__.*\s*=\s*[']([^']+)[']", open('dateparser/__init__.py').read()).group(1) introduction = re.sub(r':members:.+|..\sautomodule::.+|:class:|:func:|:ref:', ...
'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6',
<|file_name|>DatabaseSchemaExplorerView.java<|end_file_name|><|fim▁begin|>/* * Copyright 2016 Red Hat, Inc. and/or its affiliates. * * 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 * * ...
interface Handler { void onOpen( String schemaName ); }
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import { useContext } from '../ContextProvider'; import { UseVariablesResult } from './types'; function useVariables(): UseVariablesResult { const { search: { variables }, } = useContext(); return { variables }; }<|fim▁hole|><|fim▁end|>
export default useVariables; export * from './types';
<|file_name|>ButtonProperty.java<|end_file_name|><|fim▁begin|>/* * Freeplane - mind map editor * Copyright (C) 2008 Joerg Mueller, Daniel Polansky, Christian Foltin, Dimitry Polivaev * * This file is modified by Felix Natter in 2013. * * This program is free software: you can redistribute it and/or modify * ...
*/ public ButtonProperty(final String name, JButton button) { super(name);
<|file_name|>IdempotentPredicate.java<|end_file_name|><|fim▁begin|>/* * JBoss, Home of Professional Open Source. * Copyright 2014 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in...
}
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![crate_id = "oauth"] #![crate_type="lib"] //! A gated server request handler //! //! All requests will be passed through a basic oAuth 'gate' //! before being allowed to see the request handler. // This allows for debug macros // Use the macros by setting your RUST_L...
<|file_name|>generic.py<|end_file_name|><|fim▁begin|>""" Custom Authenticator to use generic OAuth2 with JupyterHub """ import base64 import os from urllib.parse import urlencode from jupyterhub.auth import LocalAuthenticator from tornado.httpclient import AsyncHTTPClient from tornado.httpclient import HTTPRequest fro...
<|file_name|>YearItemType.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2016, The National Archives <pronom@nationalarchives.gsi.gov.uk> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following * condition...
@XmlElement(required = true) protected BigDecimal totalFileSize;
<|file_name|>bootstrap-formhelpers-countries.en_US.js<|end_file_name|><|fim▁begin|>/* ========================================================== * bootstrap-formhelpers-countries.en_US.js * https://github.com/vlamanna/BootstrapFormHelpers * ========================================================== * Copyright 2012...
'TP': 'East Timor', 'EC': 'Ecuador', 'EG': 'Egypt',
<|file_name|>BanquetController.java<|end_file_name|><|fim▁begin|><|fim▁hole|>package com.jerry.controller; import com.jerry.model.TBanquet; import com.jerry.service.BanquetService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.sprin...
<|file_name|>bpf.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2014 Robert Clipsham <robert@octarineparrot.com> // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // ...
} #[cfg(not(windows))] extern {
<|file_name|>new.js<|end_file_name|><|fim▁begin|><p><|fim▁hole|><p> <form method="POST" action="/quizzes/<%=quiz.id%>/comments/"> <input type="text" id="comment" name="comment[text]" value="" placeholder="Comentario" /> <p> <button type="submit">Enviar</button> </form> </p><|fim▁end|>
Añadir nuevo comentario: </p>
<|file_name|>gaussian.py<|end_file_name|><|fim▁begin|>import numpy as np def gauss(win, sigma): x = np.arange(0, win, 1, float) y = x[:,np.newaxis] x0 = y0 = win // 2 g=1/(2*np.pi*sigma**2)*np.exp((((x-x0)**2+(y-y0)**2))/2*sigma**2) return g <|fim▁hole|> x0 = y0 = win // 2 ...
def gaussx(win, sigma): x = np.arange(0, win, 1, float) y = x[:,np.newaxis]
<|file_name|>docker.rs<|end_file_name|><|fim▁begin|>use std::io; use std::io::prelude::*; use std::mem; use std::process::{Output, Command, Stdio, ExitStatus}; use std::sync::{Arc, Mutex}; use std::thread; use std::time::{Duration, Instant}; use wait_timeout::ChildExt; pub struct Container { id: String, } impl C...
pub fn run(&self,
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>} #[cfg(not(feature = "mockbuild"))] pub fn non_sysroot_api() { core::custom_api(); alloc::custom_api(); }<|fim▁end|>
#[cfg(feature = "mockbuild")] pub fn custom_api() {
<|file_name|>legend_highlighter.py<|end_file_name|><|fim▁begin|># proxy module<|fim▁hole|>from chaco.tools.legend_highlighter import *<|fim▁end|>
from __future__ import absolute_import
<|file_name|>DeckModule.ts<|end_file_name|><|fim▁begin|>import * as _ from 'lodash'; import Vuex from 'vuex'; import {Deck} from '../models/Deck' import DeckState from '../models/state/DeckState' const store = { state: new DeckState(), mutations: { addToDeck(state, card) { if ...
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|># Licensed under a 3-clause BSD style license - see LICENSE.rst # This file is the main file used when running tests with pytest directly, # in particular if running e.g. ``pytest docs/``. from importlib.util import find_spec import os import pkg_resources import ...
os.environ['XDG_CONFIG_HOME'] = tempfile.mkdtemp('astropy_config') os.environ['XDG_CACHE_HOME'] = tempfile.mkdtemp('astropy_cache')
<|file_name|>test_token.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ JWT tokens (for web interface, mostly, as all peer operations function on public key cryptography) JWT tokens can be one of:<|fim▁hole|>* Invalid And granting them should not take database access. They are meant ...
* Good * Expired
<|file_name|>fileTransform.js<|end_file_name|><|fim▁begin|>'use strict'; const path = require('path'); <|fim▁hole|> process(src, filename) { const assetFilename = JSON.stringify(path.basename(filename)); if (filename.match(/\.svg$/)) { return `const React = require('react'); module.exports = { ...
// This is a custom Jest transformer turning file imports into filenames. // https://facebook.github.io/jest/docs/en/webpack.html module.exports = {
<|file_name|>make-sim-options.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python #This script create simulation and reconstruction options import os import sys import re <|fim▁hole|> HOME_DIR = os.environ['HOME'] JPSIKKROOT_DIR = os.environ['JPSIKKROOT'] SHARE_DIR = os.path.join(JPSIKKROOT_DIR, "share") TEMPLATE_DIR = ...
if len(sys.argv)<4: print "Usage: make-sim-options.py <decay_file> <output_prefix> <event_number>" exit(1)
<|file_name|>Game.cpp<|end_file_name|><|fim▁begin|>//-------------------------------------------------------------------------------------- // File: Game.cpp // // Developer unit test for DirectXTK GamePad // // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. // // http://go.microsoft.com/fwlink...
{ m_found[size_t(j)] = true;
<|file_name|>testbindingpairiterable.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/. */ // check-tidy: no specs after this line use ...
pub fn Constructor(global: GlobalRef) -> Fallible<Root<TestBindingPairIterable>> { Ok(TestBindingPairIterable::new(global))
<|file_name|>KnowledgeAddController.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('wsapp') .controller('KnowledgeAddController', function ($scope, knowledgeService, $location, $state) { $scope.data={}; $scope.program = function(){ alertify.success("Test"); ...
} ,function(response){
<|file_name|>objects.py<|end_file_name|><|fim▁begin|>from datetime import datetime import uuid class Torrent(object): def __init__(self): self.tracker = None self.url = None self.title = None self.magnet = None self.seeders = None self.leechers = None self.si...
<|file_name|>team-test.js<|end_file_name|><|fim▁begin|>import { moduleForModel, test } from 'ember-qunit' moduleForModel('team', { needs: [ 'model:user' , 'model:project' , 'model:assignment' , 'model:attendance' ] }) test('it exists', function(assert) { var model = this.subject() // var store = thi...
})
<|file_name|>test_util.py<|end_file_name|><|fim▁begin|>import unittest from common import TestCase import pyuv class UtilTest(TestCase): def test_hrtime(self): r = pyuv.util.hrtime() self.assertTrue(r) def test_freemem(self): r = pyuv.util.get_free_memory() self.assertTrue(r...
r = pyuv.util.cpu_info() self.assertTrue(r)
<|file_name|>qm8_tf_model.py<|end_file_name|><|fim▁begin|>""" Script that trains Tensorflow multitask models on QM8 dataset. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals import os import deepchem as dc import numpy as np from qm8_datasets import load...
train_dataset, valid_dataset, test_dataset = datasets fit_transformers = [dc.trans.CoulombFitTransformer(train_dataset)]
<|file_name|>mpl_package.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 Mirantis, 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/lice...
with open(full_path) as stream: self._raw_ui_cache = stream.read()
<|file_name|>datacatalog_entry_factory.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Copyright 2020 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.apac...
import pandas as pd
<|file_name|>task.js<|end_file_name|><|fim▁begin|>"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const options_1 = require("./options"); class TslintFixTask { constructor(configOrPath, options) { if (options) { this._configOrPath = configOrPath; this._op...
}
<|file_name|>intervalTime.js<|end_file_name|><|fim▁begin|>'use strict'; module.exports = function intervalTime(startIntervalTime){ return function(done){ var endTime = Date.now(); var runTime = endTime - startIntervalTime; done(null,{'intervalTime': runTime});<|fim▁hole|><|fim▁end|>
}; };
<|file_name|>mailer.py<|end_file_name|><|fim▁begin|># coding: utf-8 import datetime from django.core.management.base import BaseCommand # from django.template.loader import render_to_string from django.db.models import Count from scheduler.models import Need from shiftmailer.models import Mailer from shiftmailer.ex...
<|file_name|>segment_allocations.py<|end_file_name|><|fim▁begin|># Copyright 2013 Openstack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ...
} def is_valid_strategy(self, strategy_name): if strategy_name in self.strategies:
<|file_name|>ExpressRouteCircuitSku.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */ package com.micros...
<|file_name|>StreamTests.java<|end_file_name|><|fim▁begin|>/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache Licen...
assertEquals(list.get(index).v2(), entry.getValue()); index++; }
<|file_name|>packr.go<|end_file_name|><|fim▁begin|><|fim▁hole|>package packr import ( "encoding/json" "sync" ) var gil = &sync.Mutex{} var data = map[string]map[string][]byte{} // PackBytes packs bytes for a file into a box. func PackBytes(box string, name string, bb []byte) { gil.Lock() defer gil.Unlock() if _...
<|file_name|>RDNBuilder.java<|end_file_name|><|fim▁begin|>package org.safehaus.penrose.ldap; import java.util.Map;<|fim▁hole|> */ public class RDNBuilder { public Map<String,Object> values = new TreeMap<String,Object>(); public RDNBuilder() { } public boolean isEmpty() { return values.isEmpt...
import java.util.TreeMap; /** * @author Endi S. Dewata
<|file_name|>method-ufcs-2.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/l...
<_ as Bazoom<&'a u32>>::method(a, &b, c); //~ ERROR
<|file_name|>stripcomments.py<|end_file_name|><|fim▁begin|>import fileinput for line in fileinput.input(): _line = line.strip() # super dumb... if _line.startswith('//') or _line.startswith('/*') or _line.startswith('*') or _line.startswith('*/'): continue<|fim▁hole|> print line.rstrip()<|fim▁en...
<|file_name|>theming.py<|end_file_name|><|fim▁begin|>from django import template # from kilonull.conf import BlogConf from kilonull.models import Menu, MenuItem from kilonull.settings import SETTINGS import re register = template.Library() @register.simple_tag def blog_title(): return SETTINGS['BLOG_TITLE'] # ...
match = path.match(item.link_url) if match and match.group(1) == curr_page: html += " class='active'"
<|file_name|>bitcoin_es.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="es" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About GoldDiggerCoin</sour...
</message>
<|file_name|>generate_unexpire_flags_unittests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2020 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. import generate_unexpire_flags import os import unittest...
class TestUnexpireGenerator(unittest.TestCase):
<|file_name|>api.js<|end_file_name|><|fim▁begin|>import apiConfig from './MovieDBConfig'; import TmdbApi from 'moviedb-api'; var api = new TmdbApi({ consume: false, apiKey: apiConfig.apiKey }); const makeAndList = (list) => { return list.map(item => item.value).join(); }; export const getGenres = (input='', c...
"release_date.gte": minYear, "release_date.lte": maxYear, page
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.contrib.auth.models import User from datetime import date # Create your models here. class Genre(models.Model): """ Model representing a book genre (e.g. Science Fiction, Non Fiction). """ name = models.CharFi...
<|file_name|>matrix-sqrt.py<|end_file_name|><|fim▁begin|>""" https://en.wikipedia.org/wiki/Square_root_of_a_matrix B is the sqrt of a matrix A if B*B = A """ import numpy as np from scipy.linalg import sqrtm from scipy.stats import special_ortho_group def denman_beaver(A, n=50): Y = A Z = np.eye(len(A)) ...
<|file_name|>run_tests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """Execute the tests for the samcat program. The golden test outputs are generated by the script generate_outputs.sh. You have to give the root paths to the source and the binaries as arguments to the program. These are the paths to the dir...
ph.outFile('ex1_merged.bam'), "gunzip")]) conf_list.append(conf)
<|file_name|>audio_utilities.py<|end_file_name|><|fim▁begin|>import scipy.io.wavfile from os.path import expanduser import os import array from pylab import * import scipy.signal import scipy import wave import numpy as np import time import sys import math import matplotlib import subprocess # Author: Brian K. Vogel ...
Returns: The STFT. The rows are the time slices and columns are the frequency bins. """
<|file_name|>defaultfilters.py<|end_file_name|><|fim▁begin|>"""Default variable filters.""" import re from decimal import Decimal, InvalidOperation, ROUND_HALF_UP import random as random_module try: from functools import wraps except ImportError: from django.utils.functional import wraps # Python 2.4 fallback...
value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore')
<|file_name|>root.rs<|end_file_name|><|fim▁begin|>// check-pass #![feature(register_tool)]<|fim▁hole|>mod submodule; fn main() { submodule::foo(); }<|fim▁end|>
#![register_tool(tool)]
<|file_name|>Sections.js<|end_file_name|><|fim▁begin|>import SectionUtilities from '../../transform/SectionUtilities' /** * Hide or unhide a section. * @param {!string} sectionId * @param {?boolean} hidden * @return {void} */ const setHidden = (sectionId, hidden) => { if (!document) { return } SectionUt...
setHidden }
<|file_name|>db.js<|end_file_name|><|fim▁begin|>// Compiled by ClojureScript 1.9.946 {} goog.provide('eckersdorf.window.db'); goog.require('cljs.core'); goog.require('re_frame.core'); eckersdorf.window.db.window_state = new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword("window","height","window/height",1...
//# sourceMappingURL=db.js.map?rel=1510703504091
<|file_name|>sb-1.3.0.js<|end_file_name|><|fim▁begin|>/** * * Spacebrew Library for Javascript * -------------------------------- * * This library was designed to work on front-end (browser) envrionments, and back-end (server) * environments. Please refer to the readme file, the documentation and examples to ...
options.reconnect = server.reconnect || false;
<|file_name|>jsonschema.d.ts<|end_file_name|><|fim▁begin|>interface jsonschema { id?: string $schema?: string type?: string title?: string<|fim▁hole|> default?: any format?: string | Object enum?: any[] definitions?: { [index: string]: jsonschema } allOf?: jsonschema[] anyOf?: js...
description?: string
<|file_name|>sync_users.py<|end_file_name|><|fim▁begin|>import logging from django.core.management.base import BaseCommand from waldur_rancher.utils import SyncUser logger = logging.getLogger(__name__) class Command(BaseCommand): help = """Sync users from Waldur to Rancher.""" <|fim▁hole|> def handle(self, ...
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#Ensure there is an exceptional edge from the following case def f2(): b, d = Base, Derived try: class MyNewClass(b, d): pass except: e2 def f3(): sequence_of_four = a_global try: a, b, c = sequence_of_four ...
local()
<|file_name|>profiles.py<|end_file_name|><|fim▁begin|># vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL 3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from itertools import izip from calibre.customize import...
fbase = 12 fsizes = [7.5, 9, 10, 12, 15.5, 20, 22, 24] unsupported_unicode_chars = [u'\u201f', u'\u201b']
<|file_name|>node.hpp<|end_file_name|><|fim▁begin|>// -*- C++ -*- // Copyright (C) 2005, 2006 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms // of the GNU General Public License as published ...
<|file_name|>search-context.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { Router} from '@angular/router'; import { Store, ActionReducer, Action} from '@ngrx/store'; import { Observable } from 'rxjs/Rx'; const initSearchContext: any = { q: null, i: 1,<|fim▁hole|> sort...
n: 100,
<|file_name|>provider.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2.5 """A test provider for the stress testing.""" # change registry this often [msec] registryChangeTimeout = 2017 from ContextKit.flexiprovider import * import gobject import time<|fim▁hole|> t = time.time() dt = int(1000*(t - round(...
import os def update():
<|file_name|>BaselineSelection.cc<|end_file_name|><|fim▁begin|>//# BaselineSelection.cc: Class to handle the baseline selection //# Copyright (C) 2012 //# ASTRON (Netherlands Institute for Radio Astronomy) //# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands //# //# This file is part of the LOFAR software suite. //# The L...
handleCorrType (selectBL); } if (! itsRangeBL.empty()) {
<|file_name|>raw.py<|end_file_name|><|fim▁begin|>""" Export to RAW/RPL file format Based on: http://www.nist.gov/lispix/doc/image-file-formats/raw-file-format.htm """ # Standard library modules. import os # Third party modules. # Local modules. from pyhmsa.fileformat.exporter.exporter import _Exporter, _ExporterTh...
raise ValueError('Datafile must contain at least one ' + \ 'AnalysisList2D, ImageRaster2D or ' + \ 'ImageRaster2DSpectral datum')
<|file_name|>HostOperationFailureException.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../../node.d.ts" /> <|fim▁hole|> import HttpServiceUnavailableException = require('../../errors/HttpServiceUnavailableException'); 'use strict'; /** * サービスが利用できません。サーバの操作に失敗しました。このエラーが繰り返し発生する場合は、メンテナンス情報、サポートサイトをご確認くだ...
export = HostOperationFailureException;
<|file_name|>configuration.rs<|end_file_name|><|fim▁begin|>use clingo::*; use std::env; fn print_prefix(depth: u8) { println!(); for _ in 0..depth { print!(" "); } } // recursively print the configuartion object fn print_configuration(conf: &Configuration, key: Id, depth: u8) { // get the typ...
} }
<|file_name|>test06.java<|end_file_name|><|fim▁begin|>package com.fqc.jdk8; import java.util.ArrayList; import java.util.Arrays;<|fim▁hole|>import java.util.Set; import java.util.stream.Collectors; public class test06 { public static void main(String[] args) { int[] arr = {1, 2, 3, 4, 5}; ArrayLis...
import java.util.Map;
<|file_name|>Frame-onPop-generators-01.js<|end_file_name|><|fim▁begin|>// |jit-test| error: StopIteration // Returning {throw:} from an onPop handler when yielding works and // does closes the generator-iterator.<|fim▁hole|>var dbg = new Debugger; var gw = dbg.addDebuggee(g); dbg.onDebuggerStatement = function handleDe...
load(libdir + "asserts.js"); var g = newGlobal();
<|file_name|>placement_rule_test.go<|end_file_name|><|fim▁begin|>// Copyright 2020 PingCAP, 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/L...
}, output: []*placement.Rule{ {
<|file_name|>Client.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved. #<|fim▁hole|># ICE_LICENSE file included in this distribution. # # *********************************************...
# This copy of Ice is licensed to you under the terms described in the
<|file_name|>dashboard_apis.go<|end_file_name|><|fim▁begin|>// Copyright 2014 Wandoujia Inc. All Rights Reserved. // Licensed under the MIT (MIT-LICENSE.txt) license. package main import ( "encoding/json" "fmt" "net/http" "strconv" "time" "github.com/go-martini/martini" "github.com/wandoulabs/go-zookeeper/zk...
func apiRemoveServerFromGroup(server models.Server, param martini.Params) (int, string) { groupId, _ := strconv.Atoi(param["id"]) lock := utils.GetZkLock(safeZkConn, globalEnv.ProductName())
<|file_name|>MarcaVO.java<|end_file_name|><|fim▁begin|>package br.com.dlp.jazzav.produto; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import br.com.dlp.jazzav.AbstractLogEntityVO; /** * * @author darcio * */ @Ent...
<|file_name|>Cache.js<|end_file_name|><|fim▁begin|>/** * An ES6 screeps game engine. * * An attempt to conquer screeps, the first MMO strategy sandbox * game for programmers! * * @author Geert Hauwaerts <geert@hauwaerts.be> * @copyright Copyright (c) Geert Hauwaerts * @license MIT License */ /** * Cache...
this.cache[table][key] = value; }
<|file_name|>interface.py<|end_file_name|><|fim▁begin|>import random import json from django.db import connection from django.conf import settings from sitemodel.interface import SiteInterface, SiteModel, random_str from django.core.files import File from server.models import Site, TextUpload, BinaryUpload from sit...
<|file_name|>length.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/. */ //! [Length values][length]. //! //! [length]: https://drafts...
<|file_name|>AdMob.java<|end_file_name|><|fim▁begin|>package com.agamemnus.cordova.plugin; import com.google.android.gms.ads.AdListener; import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.AdSize; import com.google.android.gms.ads.AdView; import com.google.android.gms.ads.InterstitialAd; imp...
interstitialAd.setAdListener (new InterstitialListener()); delayCallback.success ();
<|file_name|>interval_relu.py<|end_file_name|><|fim▁begin|>""" relu where each channel has a different leak rate """<|fim▁hole|>import theano import theano.tensor as T import treeano import treeano.nodes as tn fX = theano.config.floatX @treeano.register_node("interval_relu") class IntervalReLUNode(treeano.NodeImpl):...
import numpy as np
<|file_name|>UI.py<|end_file_name|><|fim▁begin|>from tkinter import * from tkinter import ttk from tkinter import filedialog from tkinter import messagebox from PDFManager.PDFMangerFacade import PDFMangerFacade class PDFManager_UI: def __init__(self): self.i= -1; self.files=[] self.root =...
self.files.append(file) split = file.split("/").pop() self.list_file.insert("",self.i,text=split,values=(PDFMangerFacade.pagescount(file)))
<|file_name|>step4.rs<|end_file_name|><|fim▁begin|>println!("14. Issuer (Trust Anchor) is creating a Credential Offer for Prover"); let cred_offer_json = anoncreds::issuer_create_credential_offer(wallet_handle, &cred_def_id).wait().unwrap(); println!("15. Prover creates Credential Request"); let (cred_req_json, cred_r...
println!("18. Close pool and delete pool ledger config"); pool::close_pool_ledger(pool_handle).wait().unwrap();
<|file_name|>JsonConfigReader.ts<|end_file_name|><|fim▁begin|>let fs = require('fs'); import { ConfigParams } from './ConfigParams'; import { IConfigurable } from './IConfigurable'; import { FileConfigReader } from './FileConfigReader'; import { ConfigException } from '../errors/ConfigException' import { FileExc...
* @param correlationId unique business transaction id to trace calls across components. * @param parameters used to parameterize the reader.