prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>location-detail-unwrap-no-file.rs<|end_file_name|><|fim▁begin|>// run-fail // check-run-results // compile-flags: -Zlocation-detail=line,column <|fim▁hole|> opt.unwrap(); }<|fim▁end|>
fn main() { let opt: Option<u32> = None;
<|file_name|>SvnFileContentRetriever.java<|end_file_name|><|fim▁begin|>package org.codeandmagic.affected.svn; <|fim▁hole|> /** * @param project * the svn project object * @param filePath * the path to the file whose content we want * @param targetRevision * the revision of ...
// @affects: SvnProjectProcessor /** Retrieves the content of a file from the svn. */ public interface SvnFileContentRetriever {
<|file_name|>commands.py<|end_file_name|><|fim▁begin|>import unittest from chat.commands.commandlist import CommandList from chat.command import Command<|fim▁hole|> class TestCommands(unittest.TestCase): def setUp(self): self.chat = DummyChat() def test_get(self): command = CommandList.get('he...
from tests.structs.dummychat import DummyChat
<|file_name|>ifcr.rs<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2017 AltOS-Rust Team * * 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, or * (at your option)...
let mut ifcr = IFCR(0); ifcr.channel_transfer_complete_clear(DMAChannel::Two);
<|file_name|>brick_status_event_handler.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # brick_status_event_handler.py Event handler for Brick status # Service. Reschedules the check for volume status service whenever a # brick status changes. # Copyright (C) 2014 Red Hat Inc # # This program is free software; you c...
command = "SCHEDULE_SVC_CHECK"
<|file_name|>ui_list_editor.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/Users/ckla/Documents/workspace/opus_trunk/opus_gui/main/views/list_editor.ui' # # Created: Sun May 10 00:57:43 2009 # by: PyQt4 UI code generator 4.4.4 # # WARNING! All change...
self.le_value.setObjectName("le_value") self.horizontalLayout.addWidget(self.le_value) self.tb_change = QtGui.QToolButton(ListEditor) self.tb_change.setObjectName("tb_change")
<|file_name|>result-list.js<|end_file_name|><|fim▁begin|>'use strict'; import ResponseHandler from './response-handler'; import retrieve from './retrieve'; class ResultList { constructor(search, options, onSuccess, onFailure) { this._search = search; this._options = options; this._onSuccess = onSuccess...
_get() { const page = this._options.page;
<|file_name|>snippet.rs<|end_file_name|><|fim▁begin|>// # Snippet example // // This example shows how to return a representative snippet of // your hit result. // Snippet are an extracted of a target document, and returned in HTML format. // The keyword searched by the user are highlighted with a `<b>` tag. // --- //...
for fragment_range in snippet.highlighted() { result.push_str(&snippet.fragment()[start_from..fragment_range.start]); result.push_str(" --> ");
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2022 The TensorFlow Datasets Authors. #<|fim▁hole|># You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 *-* import os import subprocess import sys try: from setuptools import setup except ImportError: from distribute_setup import use_setuptools use_setuptools() from setuptools import setup from distutils.cmd import Command with ope...
<|file_name|>Page.java<|end_file_name|><|fim▁begin|>package com.facetime.spring.support; import java.util.ArrayList; import java.util.List; import com.facetime.core.conf.ConfigUtils; import com.facetime.core.utils.StringUtils; /** * 分页类 * * @author yufei * @param <T> */ public class Page<T> { private static i...
public void setParams(List<T> paramsValue) {
<|file_name|>mailer.js<|end_file_name|><|fim▁begin|>'use strict'; var env = process.env.NODE_ENV || 'development', config = require('./config'), B = require('bluebird'), _ = require('underscore'), L = require('./logger'), S = require('underscore.string'), nodemailer = require('nodemailer'), ...
var that = this;
<|file_name|>StartActivity.java<|end_file_name|><|fim▁begin|>package org.crazyit.activity; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; /** * Description: * <br/>site: <a href="...
{ //´´½¨ÐèÒªÆô¶¯µÄActivity¶ÔÓ¦µÄIntent
<|file_name|>desktop.py<|end_file_name|><|fim▁begin|># coding=utf-8 from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "module_name": "Item", "_doctype": "Item", "color": "#f39c12", "icon": "octicon octicon-package", "type": "link", "link": "List/Item" }, ...
},
<|file_name|>z.ajm.str-format-phone-ex.20151024.py<|end_file_name|><|fim▁begin|>phone = "315-555-2955" print "Area Code: {0}".format(phone[0:3])<|fim▁hole|><|fim▁end|>
print "Local: {0}".format(phone[4:]) print "Different format: ({0}) {1}".format(phone[0:3], phone[4:])
<|file_name|>TransformerIsNumber.java<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * Copyright (c) 2015 TextGlass * * 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|>listen.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Listentypen: # 1. Die Liste: # Eine Liste ist eine beliebig lange Folge von beliebigen Objekten # Eine Liste wird mit Hilfe von eckigen Klammern definiert. liste = [0, "foo"] # type: list print(liste) # Mit list() lässt sich bspw. ein St...
# Ist kein Index angegeben lösht pop() das letzte Element liste.pop() print(liste)
<|file_name|>zh-tw_dlg.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:81e9c9e173a9043e925313a488beecd37914141528b2ccf21df1fc5620343cb8<|fim▁hole|><|fim▁end|>
size 2512
<|file_name|>os.hpp<|end_file_name|><|fim▁begin|>// ===================================================================================== // // Filename: os.hpp // // Description: kernel dependend // // Version: 1.0 // Created: 03/27/2016 12:36:24 PM // Revision: none // Compiler...
extern "C" void __cxa_pure_virtual(); // {} typedef void( *constructor )();
<|file_name|>test_state.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Test gui.""" #------------------------------------------------------------------------------ # Imports #------------------------------------------------------------------------------ import logging import os import shutil from ..stat...
#------------------------------------------------------------------------------
<|file_name|>upgrade_policy_py3.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Cod...
_attribute_map = { 'mode': {'key': 'mode', 'type': 'UpgradeMode'},
<|file_name|>encoder_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 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 agreed to...
Licensed under the Apache License, Version 2.0 (the "License");
<|file_name|>log.go<|end_file_name|><|fim▁begin|>package log import ( "io" "github.com/sirupsen/logrus" ) type Fields logrus.Fields type Level uint8 var DebugLevel = Level(logrus.DebugLevel) var InfoLevel = Level(logrus.InfoLevel) var WarnLevel = Level(logrus.WarnLevel) var ErrorLevel = Level(logrus.ErrorLevel) ...
<|file_name|>setup-win.py<|end_file_name|><|fim▁begin|>from setuptools import setup import py2exe import os import glob __import__('gtk') __import__('jinja2') __import__('docutils') setup_dict = dict( name='regenerate', version='1.0.0', license='License.txt', author='Donald N. Allingham', au...
'py2exe': { 'includes' : 'cairo, pango, pangocairo, atk, gobject, gio, gtk.keysyms, jinja2', 'skip_archive' : True,
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![feature(io)] use std::io; use std::io::Read; fn main() { let mut cnt = 0; let mut pos_in_input = 1; let mut entered_basement_at_pos = -1; for wrapped_ch in io::stdin().chars() { <|fim▁hole|> let ch = wrapped_ch.unwrap(); if ch == '...
<|file_name|>base.py<|end_file_name|><|fim▁begin|># Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 # ...
import abc
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2018, Nils Asmussen <nils@os.inf.tu-dresden.de> * Economic rights: Technische Universitaet Dresden (Germany) * * This file is part of M3 (Microkernel-based SysteM for Heterogeneous Manycores). * * M3 is free software: you can redistribute it and/...
} }) }
<|file_name|>SettingsWrapperTest.js<|end_file_name|><|fim▁begin|>import React from 'react'; import test from 'ava'; import { shallow } from 'enzyme'; import SettingsWrapper from '../SettingsWrapper'; test('renders if isEnabled', (t) => { const wrapper = shallow(<SettingsWrapper isEnabled />); t.true(wrapper.matc...
test('renders with settings if visible and settings component is provided', (t) => { const settings = () => <div>Settings</div>; const wrapper = shallow(<SettingsWrapper isEnabled isVisible Settings={settings} />);
<|file_name|>test_handler.py<|end_file_name|><|fim▁begin|>__author__ = 'mengpeng' import os from unittest import TestCase from pycrawler.scraper import DefaultScraper from pycrawler.handler import Handler from pycrawler.utils.tools import gethash from test_scraper import SpiderTest class TestTempHandler(TestCase): ...
<|file_name|>GBRT_Luroeykalven_manual_FCLS.py<|end_file_name|><|fim▁begin|># GBRT for Luroeykalven case study site # Training data: manually digitized training areas, including water pixels # Predictors: results of FCLS spectral unmixing # Authors: Stefan Blumentrath import numpy as np import matplotlib.pyplot as plt ...
<|file_name|>io.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 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/LIC...
* `f32`s are 4 byte, IEEE754 single-precision floating point numbers. * * # Examples *
<|file_name|>candidates_create_csv.py<|end_file_name|><|fim▁begin|>from collections import defaultdict from django.core.files.storage import DefaultStorage from django.core.management.base import BaseCommand, CommandError from candidates.csv_helpers import list_to_csv, memberships_dicts_for_csv from elections.models ...
Use Django's storage backend to write the CSV file to the MEDIA_ROOT.
<|file_name|>test_form_helper.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import re import django, logging, warnings from django import forms from django.conf import settings from django.core.urlresolvers import reverse from django.forms.models import formset_factory from django.middleware.csrf import _get...
""")
<|file_name|>evenly_discretized.py<|end_file_name|><|fim▁begin|># The Hazard Library # Copyright (C) 2012-2014, GEM Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either ver...
return self.min_mag, self.min_mag + self. bin_width * ( len(self.occurrence_rates) - 1) def modify_set_mfd(self, min_mag, bin_width, occurrence_rates):
<|file_name|>data.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/. */ //! Per-node data used in style calculation. use context::{Shar...
// array types assumes the value inside is `Copy`. impl Clone for EagerPseudoArray { fn clone(&self) -> Self {
<|file_name|>stratum.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 ver...
let timer_svc = server.clone(); let timer_stop = service_stop.clone();
<|file_name|>prepare.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of kwalitee # Copyright (C) 2014, 2015 CERN. # # kwalitee 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; eith...
title = message.split('\n')[0] try: component, title = title.split(":", 1)
<|file_name|>convert.js<|end_file_name|><|fim▁begin|>/** * Copyright 2004-present Facebook. All Rights Reserved. * */ /* eslint-disable sort-keys */ const fs = require('fs'); const os = require('os'); const path = require('path'); const glob = require('glob'); const mkdirp = require('mkdirp'); const toSlug = requi...
function splitHeader(content) { const lines = content.split(os.EOL); let i = 1; for (; i < lines.length - 1; ++i) {
<|file_name|>InvocationManager.cpp<|end_file_name|><|fim▁begin|>/* * TestProxy.cpp * * Created on: Sep 6, 2013 * Author: penrique */ #include "InvocationManager.h" #include <bb/system/CardDoneMessage> #include <bb/system/InvokeRequest> // to send number data while invoking phone application #include <bb/P...
request.setUri(
<|file_name|>engine.js<|end_file_name|><|fim▁begin|>/* * DaTtSs: engine.js * * (c) Copyright Teleportd Labs 2013. All rights reserved. * * @author: n1t0 * * @log: * 2013-04-22 n1t0 Creation */ var fwk = require('fwk'); var factory = require('../factory.js').factory; // // ### @PUT /agg // Aggregates valu...
return res.ok(); } var favorite = req.param('favorite');
<|file_name|>AudioRecorder.java<|end_file_name|><|fim▁begin|>package edu.kit.tm.pseprak2.alushare.view; import android.media.MediaPlayer; import android.media.MediaRecorder; import android.os.Environment; import android.util.Log; import java.io.IOException; /** * Represent the AudioRecorder of the ChatActivity. * ...
}
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from rest_framework import status, views from rest_framework.response import Response from waldur_core.core.utils import get_lat_lon_from_address from . import serializers class GeocodeViewSet(views.APIView): def get(self, request): serializer = seriali...
return Response(
<|file_name|>DefaultLayout.js<|end_file_name|><|fim▁begin|>import React from 'react' const DefaultLayout = ({ children }) => { return ( <div className="layout" style={{ width: '100%', height: '100%' }}> {children} </div> ) }<|fim▁hole|> export default DefaultLayout<|fim▁end|>
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2006 Lukáš Lalinský # # 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 ...
_pages.register(page_class.__module__, page_class)
<|file_name|>ngx-clipboard.service.spec.ts<|end_file_name|><|fim▁begin|>import { inject, TestBed } from '@angular/core/testing'; import { BrowserModule } from '@angular/platform-browser'; import { ClipboardService } from './ngx-clipboard.service'; describe('Service: Clipboard', () => { beforeEach(() => { ...
<|file_name|>lowercase.ts<|end_file_name|><|fim▁begin|>import Validator from '../Validator'; Validator.registerNormalizer('lowercase', (value: any) => { return value.toLowerCase(); }, {<|fim▁hole|> depends: { toString: true }, });<|fim▁end|>
<|file_name|>TractDensity.cpp<|end_file_name|><|fim▁begin|>/*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distribut...
std::string reference_image = ""; if (parsedArgs.count("reference_image"))
<|file_name|>require-line-feed-at-file-end.js<|end_file_name|><|fim▁begin|>var assert = require('assert'); module.exports = function() {}; module.exports.prototype = { configure: function(requireLineFeedAtFileEnd) { assert( typeof requireLineFeedAtFileEnd === 'boolean', 'requireLi...
} };
<|file_name|>comp-3684.component.ts<|end_file_name|><|fim▁begin|>/** * @license<|fim▁hole|> * 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 { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-comp-36...
* Copyright Google Inc. All Rights Reserved. *
<|file_name|>connectivity.test.ts<|end_file_name|><|fim▁begin|>import Client from '@bugsnag/core/client' import _NetInfo, { NetInfoState } from '@react-native-community/netinfo' import plugin from '../' jest.mock('@react-native-community/netinfo', () => ({ addEventListener: jest.fn() })) const NetInfo = _NetInfo as...
<|file_name|>base58.py<|end_file_name|><|fim▁begin|>''' Yescoin base58 encoding and decoding. Based on https://yescointalk.org/index.php?topic=1026.0 (public domain) ''' import hashlib # for compatibility with following code... class SHA256: new = hashlib.sha256 if str != bytes: # Python 3.x def ord(c): ...
def b58decode_chk(v): """decode a base58 string, check and remove checksum"""
<|file_name|>f2_bad.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
I am a bad file that should not pass compileall.
<|file_name|>pasterapp.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import logging import os import pkg_resources import sys import ConfigParser from paste.deploy import loadapp, loadwsgi SERVER = loadws...
self.app = app self.callable = None gcfg = gcfg or {}
<|file_name|>test_searchuser.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- import test_core import sys import demjson test_core.title("搜索用户") f = open("testconfig.json", 'r') lines = f.read() f.close() jsonfiledata = demjson.decode(lines) if jsonfiledata["url"] == "": test_core.terr("错误: 'testconfig.json' ...
<|file_name|>main.py<|end_file_name|><|fim▁begin|>""" Algorithmic Thinking 1 wk 4 Aplication #2 Questions """ # imports import urllib2 import random import time import math import UPATrial import numpy from collections import deque import matplotlib.pyplot as plt #####################################...
# first create a list of neighbor nodes to visit for removal of edges neighbors = bfs_visited(ugraph, target) # then visit each neighbor, removing target from its list of neighbors for neighbor in neighbors:
<|file_name|>errorsTest.ts<|end_file_name|><|fim▁begin|>/********************************************************************************************************************** * @license *<|fim▁hole|> * ...
* Copyright 2017 Coinbase, Inc. *
<|file_name|>raw.rs<|end_file_name|><|fim▁begin|>extern crate libsqlite3_sys as ffi; extern crate libc; use std::ffi::{CString, CStr}; use std::io::{stderr, Write}; use std::{ptr, str};<|fim▁hole|>use result::Error::DatabaseError; #[allow(missing_debug_implementations, missing_copy_implementations)] pub struct RawCon...
use result::*;
<|file_name|>hir_wf_check.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>use crate::collect::ItemCtxt; use rustc_hir as hir; use rustc_hir::intravisit::{self, NestedVisitorMap, Visitor}; use rustc_hir::HirId; use rustc_infer::infer::TyCtxtInferExt; use rustc_infer::traits::TraitEngine; use rustc_infer::traits::{Obligation...
<|file_name|>region_instances_client_example_test.go<|end_file_name|><|fim▁begin|>// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache...
ctx := context.Background() c, err := compute.NewRegionInstancesRESTClient(ctx) if err != nil { // TODO: Handle error.
<|file_name|>issue-23433.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 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/lic...
// except according to those terms. // Don't fail if we encounter a NonZero<*T> where T is an unsized type
<|file_name|>under2space.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python -u """ This script replaces underscores with spaces (%20) Project: https://github.com/LagrangianPoint/Apache-Rewrite-Maps-Python/ http://httpd.apache.org/docs/current/rewrite/rewritemap.html http://fragmentsofcode.wordpress.com/2009/02/04/pyt...
RewriteEngine On RewriteLogLevel 9 RewriteLog /var/log/apache2/rewrite.log
<|file_name|>logger.go<|end_file_name|><|fim▁begin|>package conf import ( "github.com/sirupsen/logrus" ) // Logger is a configuration struct to define logger's behaviour type Logger struct { Level string `yaml:"level" default:"info"` Format string `yaml:"format" default:"text"` } // Configure takes the configura...
}
<|file_name|>conf.py<|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 Apache Licens...
'**': ['localtoc.html', 'relations.html', 'sourcelink.html'], }
<|file_name|>allowedaddresspairs.py<|end_file_name|><|fim▁begin|># Copyright 2013 VMware, 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<|fim▁hole|># # http://www.apache.org/li...
# a copy of the License at
<|file_name|>client.py<|end_file_name|><|fim▁begin|># Copyright 2019, 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.org/licenses/LI...
Returns: A future instance that can be used to manage the background stream. """
<|file_name|>storage.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::StorageBinding; use dom...
fn get_storage_task(&self) -> StorageTask { let global_root = self.global.root(); let global_ref = global_root.r();
<|file_name|>ckernel_impls.py<|end_file_name|><|fim▁begin|>""" Lift ckernels to their appropriate rank so they always consume the full array arguments. """ from __future__ import absolute_import, division, print_function from pykit.ir import transform, Op #------------------------------------------------------------...
return op
<|file_name|>nivopro.js<|end_file_name|><|fim▁begin|>var UniteNivoPro = new function() { var t = this; var containerID = "slider_container"; var container, arrow_left, arrow_right, bullets_container; var caption_back, caption_text; var bulletsRelativeY = ""; /** * show slider view error, ...
<|file_name|>defaultConfig.js<|end_file_name|><|fim▁begin|>module.exports = {<|fim▁hole|> models: { file: "node_modules/snowboy/resources/snowboy.umdl", sensitivity: "0.5", hotwords: "snowboy" }, detector: { resource: "node_modules/snowboy/resources/common.res", audioGain: 2.0 ...
snowboy: {
<|file_name|>transform.py<|end_file_name|><|fim▁begin|>import math from autoprotocol import UserError from modules.utils import * def transform(protocol, params): # general parameters constructs = params['constructs'] num_constructs = len(constructs) plates = list(set([construct.container for constru...
# kan "ki17rs7j799zc2"
<|file_name|>test.js<|end_file_name|><|fim▁begin|>'use strict'; /** @namespace chas2.test * Тесты */ chas2.test = { /** @namespace chas2.test._ * Функционал, используемый только внутри модуля chas2.test * @private */ _ : {}, /** @function chas2.test.testTemplates * Проверить шаблоны в текущем наборе *...
} infoFunc('\tПроверка категории ' + category + ' закончена c ' + errCountPerCat + ' ошибками'); } infoFunc('Проверка шаблонов в наборе "' + nabor.adres + '" закончена с ' + errCount + ' ошибками');
<|file_name|>snapshot.py<|end_file_name|><|fim▁begin|>from copy import copy import numpy as np from .fortranio import FortranFile from .snapview import SnapshotView class SnapshotIOException(Exception): """Base class for exceptions in the the snapshot module.""" def __init__(self, message): super(Sna...
# Given dtype does not correspond to a numpy dtype. message = "Data type for header element '%s' is invalid." % name raise SnapshotIOException(message)
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 TiKV Project Authors. Licensed under Apache-2.0. //! Storage Transactions pub mod commands; pub mod sched_pool; pub mod scheduler; mod actions; pub use actions::{ acquire_pessimistic_lock::acquire_pessimistic_lock, cleanup::cleanup, comm...
<|file_name|>manifold_test.go<|end_file_name|><|fim▁begin|>// Copyright 2015 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package apicaller_test import ( "github.com/juju/errors" "github.com/juju/testing" jc "github.com/juju/testing/checkers" gc "gopkg.in/check.v1" worker "gopkg.in/...
NewConnection: func(a agent.Agent, apiOpen api.OpenFunc) (api.Connection, error) {
<|file_name|>customer-list.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('sbAdminApp') .controller('CustomerListCtrl', function ($scope, $http, $rootScope, $stateParams, $location) { $scope.page = {itemsPerPage: 20}; $scope.iForm = {pageSize : $scope.page.itemsPerPage}; $sc...
$http.get("/org/customer/status-enumeration") .success(function (data) {
<|file_name|>production.js<|end_file_name|><|fim▁begin|>'use strict'; module.exports = { db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://localhost/friend-around', assets: { lib: { css: [<|fim▁hole|> 'public/lib/bootstrap/dist/css/bootstrap-theme.min.css', ], js: [ 'public/lib/...
'public/lib/bootstrap/dist/css/bootstrap.min.css',
<|file_name|>issue-19244-2.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 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...
}
<|file_name|>BaseDAO.java<|end_file_name|><|fim▁begin|>package com.common.dao; import java.sql.PreparedStatement; <|fim▁hole|>import java.util.logging.Logger; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.PersistenceException; /** * La Clase B...
import java.sql.SQLException;
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.http import HttpResponse from django.core.cache import cache<|fim▁hole|> ''' This view provides the final result requested from the exercise. It first looks for it in the cache; if the result is not there, it calls the class "EventWithSubscriptions" in orde...
from EventSubscriptions.models import EventWithSubscriptions import requests
<|file_name|>sync.js<|end_file_name|><|fim▁begin|>/* * linksync commander -- Command line interface to LinkSync * Copyright (C) 2016 Andrew Duncan * * This package is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * found in the file LICENSE that should...
<|file_name|>TgOrgUnit3.java<|end_file_name|><|fim▁begin|>package ua.com.fielden.platform.sample.domain; import ua.com.fielden.platform.entity.AbstractEntity; import ua.com.fielden.platform.entity.DynamicEntityKey; import ua.com.fielden.platform.entity.annotation.CompanionObject; import ua.com.fielden.platform.entity....
<|file_name|>kalman_pigeon.py<|end_file_name|><|fim▁begin|>from bzrc import BZRC, Command import math, numpy, argparse from numpy import dot from random import randint from time import sleep desc=''' Example: python kalman_pigeon.py -p localhost -s 57413 -t [1, 2, 3] ''' class Point(): def __init__(self, ...
if not isinstance(other, Point): # print "I DID FALSE!" return False
<|file_name|>0011_auto_20150223_0442.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('builds', '0010_merge'), ] operations = [ migrations.Alt...
model_name='project', name='approved', field=models.BooleanField(default=False, db_index=True),
<|file_name|>errorHandler.js<|end_file_name|><|fim▁begin|>/** * error handling middleware loosely based off of the connect/errorHandler code. This handler chooses * to render errors using Jade / Express instead of the manual templating used by the connect middleware * sample. This may or may not be a good idea :-) ...
// defaults var showStack = options.showStack || options.stack
<|file_name|>constellation_msg.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/. */ //! The high-level interface from script to constel...
}
<|file_name|>split.js<|end_file_name|><|fim▁begin|>'use strict';<|fim▁hole|> .factory('split', function ($q) { return { execute: execute }; function execute (url, swagger) { var deferred = $q.defer(); if (swagger && swagger.swagger && !swagger.tags) { ...
angular.module('sw.plugin.split', ['sw.plugins'])
<|file_name|>src-links-external.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Rust Project Developers. See the COPYRIGHT<|fim▁hole|>// // 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/l...
// file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT.
<|file_name|>color.js<|end_file_name|><|fim▁begin|>var ctx,canvasWidth,canvasHeight; var img_pyr; var img_ryp; var lowpass1, lowpass2; function demo_app(videoWidth, videoHeight) { savnac.width = canvas.width = videoWidth savnac.height = canvas.height = videoHeight vidWidth = videoWidth vidHeight = v...
for(var i = 1; i < chan.levels; i++){ jsfeat.imgproc.pyrup(schan.data[i], chan.data[i - 1])
<|file_name|>startAlbumsSharingService.js<|end_file_name|><|fim▁begin|>import { all, takeEvery } from 'redux-saga/effects'; import actions from '#actions'; import handleShareFormChange from './startAlbumsSharingService/handleShareFormChange'; import handleShareFormSubmit from './startAlbumsSharingService/handleShareF...
takeEvery(actions.uiShareFormChanged, handleShareFormChange, apis),
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages from codecs import open import os def read(*paths): """Build a file path from *paths* and return the contents.""" with open(os.path.join(*paths), 'r') as f: return f.read() setup( name='transposer', ...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages setup( name = 'django-dzenlog', version = __import__('django_dzenlog').__version__, description = '''Django Dzenlog is a set of models and templates, which can be ''' '''used to create blogs wit...
is to define two models: `TextPost` and `LinkPost`. Each of these
<|file_name|>sogal_base.py<|end_file_name|><|fim▁begin|>#-*- coding:utf-8 -*- ''' ==================================================================================== Copyright 2013, 2014 Windy Darian (大地无敌), Studio "Sekai no Kagami" (世界之镜制作组) of Seven Ocean Game Arts (七海游戏文化社 , 北京航空航天大学学生七海游戏文化社) @ ht...
self.supportedResolutions.append((di.getDisplayModeWidth(index), di.getDisplayModeHeight(index)))
<|file_name|>manhole.py<|end_file_name|><|fim▁begin|># This file is part of Buildbot. Buildbot 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. # # This program is distributed in the hope that it wi...
c = conchc.UNIXPasswordDatabase # getpwnam() (probably /etc/passwd)
<|file_name|>Vtf.py<|end_file_name|><|fim▁begin|>## @file # process VTF generation #<|fim▁hole|># which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php # # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WA...
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License
<|file_name|>GridAnalysis_Vorticity.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt import numpy as np import os.path as op import util import yt import MPI_taskpull2 import logging logging.getLogger('yt').setLevel(logging.ERROR) # Scan...
<|file_name|>impl_max_min.rs<|end_file_name|><|fim▁begin|>// Copyright 2019 TiKV Project Authors. Licensed under Apache-2.0. use std::cmp::Ordering; use std::convert::TryFrom; use tidb_query_codegen::AggrFunction; use tidb_query_common::Result; use tidb_query_datatype::codec::collation::Collator; use tidb_query_datat...
state.push_result(&mut ctx, &mut result).unwrap(); assert_eq!(result[0].to_int_vec(), &[None]);
<|file_name|>run_tests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source cod...
test = base + line.strip()
<|file_name|>process_sqlite.js<|end_file_name|><|fim▁begin|>/** * process_sqlite.js */ var fs = require('fs-extra') var debug = require('debug')('hostview') var async = require('async') var sqlite = require('sqlite3') var utils = require('./utils') /** * Process a single sqlite file from Hostview. * * We assume...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, includin...
def verbose(self):
<|file_name|>config.py<|end_file_name|><|fim▁begin|><|fim▁hole|> # Ubuntu Tweak - PyGTK based desktop configure tool # # Copyright (C) 2007-2008 TualatriX <tualatrix@gmail.com> # # Ubuntu Tweak is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by...
#!/usr/bin/python