prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2017 Atsushi Miyake // // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or http://apache.org/licenses/LICENSE-2.0> // or the MIT license <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. // This file may not be copied...
mod router_manager; mod reflector; mod plugboard; mod alphabets;
<|file_name|>recipe-137551.py<|end_file_name|><|fim▁begin|>RegObj.dll is an ActiveX server--and, hence, has an automation interface--that is available with documentation in the distribution file known as RegObji.exe, from the following page: http://msdn.microsoft.com/vbasic/downloads/addins.asp To provide ea...
>>> HKCR = regobj.RegKeyFromHKey ( HKEY_CLASSES_ROOT ) >>> PythonFileKey = HKCR.ParseKeyName('Python.File\Shell\Open\command') >>> PythonFileKey.Value
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Support for Hangouts.""" import logging from hangups.auth import GoogleAuthError import voluptuous as vol from homeassistant import config_entries from homeassistant.components.conversation.util import create_matcher from homeassistant.config_entries import Con...
<|file_name|>animation.py<|end_file_name|><|fim▁begin|>"""Animation. Animation is set of keyframes. Value of selected attribute changes in time. Keyframe: (time, value) Objects have animation manager which manages animation graph and switching.""" from operator import itemgetter from eaf import Timer from xoinv...
float(second[0]), float(current_time), )
<|file_name|>postgres.js<|end_file_name|><|fim▁begin|>var _ = require('lodash') var assert = require('assert') var common = require('./common') module.exports = function() { var adapter = { wrap: column => `"${column}"` } adapter.createTimestamps = function(data, options) { options = options || {} v...
<|file_name|>iconListInfo.js<|end_file_name|><|fim▁begin|>// JSON Object of all of the icons and their tags export default { apple : { name : 'apple', color: '#be0000', image : 'apple67.svg', tags: ['apple', 'fruit', 'food'], categories: ['food', 'supermarket'] }, bread : { name : 'bread'...
shopping : {
<|file_name|>test_metadata.py<|end_file_name|><|fim▁begin|>import os from shutil import copyfile from photomanip.metadata import ImageExif, SetExifTool from nose import tools ORIGINAL_IMAGE_FILENAME = 'photomanip/tests/turd_ferguson.jpeg' TEST_IMAGE_FILENAME = 'photomanip/tests/image_exif_test.jpg' ORIGINAL_PHOTO_F...
with SetExifTool() as et:
<|file_name|>GameScreen.java<|end_file_name|><|fim▁begin|>package com.cardshifter.gdx.screens; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Screen; import com.badlogic.gdx.math.Rectangle; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d....
table.row(); holders.put(i + name, container);
<|file_name|>social-register.controller.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('friendflixApp') .controller('SocialRegisterController', function ($scope, $filter, $stateParams) { $scope.provider = $stateParams.provider; $scope.providerLabel = $filter('capitalize')($scope.provi...
$scope.success = $stateParams.success;
<|file_name|>About.js<|end_file_name|><|fim▁begin|>import React, {Component} from 'react'; import MiniInfoBar from '../components/MiniInfoBar'; export default class About extends Component { state = { showKitten: false } handleToggleKitten() { this.setState({showKitten: !this.state.showKitten}); } ...
<button className={'btn btn-' + (showKitten ? 'danger' : 'success')} style={{marginLeft: 50}}
<|file_name|>format.js<|end_file_name|><|fim▁begin|>var cssbeautify = require('gulp-cssbeautify'); var gulp = require('gulp'); var imagemin = require('gulp-imagemin'); var jsprettify = require('gulp-jsbeautifier'); var path = require('path'); var pngcrush = require('imagemin-pngcrush'); var ROOT = path.join(__dirname,...
progressive: true, svgoPlugins: [{ removeViewBox: false
<|file_name|>sns.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf8 -*- from pprint import pprint import sys,os import random import json import gzip import random import boto3 session = boto3.Session( region_name='cn-north-1', aws_access_key_id='xxxxxxxxxxxxxx', aws_secret_access_key...
sns = session.resource('sns') sns_client = session.client('sns')
<|file_name|>tok.py<|end_file_name|><|fim▁begin|>class Token: """ Class representing a token. kind: the kind of token, e.g. filename, number, other value: specific instance value, e.g. "/tmp/foo.c", or 5 offset: byte offset from start of parse string """ def __init__(self, kind, value=None, ...
return self.format(line_prefix=indent, sib_num=sib_num)
<|file_name|>create-group.ts<|end_file_name|><|fim▁begin|>import { getEmailTransport, initializeAdminApp } from './_internal'; import * as functions from 'firebase-functions'; import { District, GroupCreateInput, RepresentativeCreateInput } from '@civ/city-council'; import { createRandomString } from './utils'; const...
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># Copyright (C) 2009-2013 Roman Zimbelmann <hut@lepus.uberspace.de> # This software is distributed under the terms of the GNU GPL version 3. from inspect import isfunction from ranger.ext.signals import SignalDispatcher, Signal from ranger.core.shared import FileM...
return self._tagsettings[tag][name] if name in self._settings: return self._settings[name] else:
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models import datetime from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from iati_synchroniser.dataset_syncer import DatasetSyncer from iati_synchroniser.codelist_importer import CodeListImport...
<|file_name|>qgsogcutils.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************** qgsogcutils.cpp --------------------- begin : March 2013 copyright : (C) 2013 by Martin Dobias email : wonder dot sk at gmai...
break;
<|file_name|>stats.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Mon May 16 17:14:41 2016 @author: sdemyanov """ import numpy as np from sklearn import metrics def get_prob_acc(probs, labels): return np.mean(np.argmax(probs, axis=1) == labels) def get_auc_score(scores, labels): fpr, tp...
def get_prob_confmat(probs, labels): classnum = probs.shape[1] mat = np.zeros((classnum, classnum), dtype=int)
<|file_name|>lineCounterTest.js<|end_file_name|><|fim▁begin|>/** * Created by ozgur on 24.07.2017. */ var assert = require('assert'); var fs = require("fs"); var path = require("path"); var LineCounter = require("../lib/LineCounter"); var ExtensionsFactory = require("../lib/Extensions"); var Rules = require("../lib/...
<|file_name|>tocfilter.py<|end_file_name|><|fim▁begin|>import os import finder import re<|fim▁hole|>def makefilter(name, xtrapath=None): typ, nm, fullname = finder.identify(name, xtrapath) if typ in (finder.SCRIPT, finder.GSCRIPT, finder.MODULE): return ModFilter([os.path.splitext(nm)[0]]) if typ ==...
import sys
<|file_name|>pbs_testlib.py<|end_file_name|><|fim▁begin|># coding: utf-8 # Copyright (C) 1994-2016 Altair Engineering, Inc. # For more information, contact Altair at www.altair.com. # # This file is part of the PBS Professional ("PBS Pro") software. # # Open Source License Information: # # PBS Pro is free software. Yo...
if c:
<|file_name|>get.js<|end_file_name|><|fim▁begin|>var clusterpost = require("clusterpost-lib"); var path = require('path'); var Promise = require('bluebird'); var argv = require('minimist')(process.argv.slice(2)); const os = require('os'); const fs = require('fs'); var agentoptions = { rejectUnauthorized: false } ...
}
<|file_name|>metrics_pb2.py<|end_file_name|><|fim▁begin|># Generated by the protocol buffer compiler. DO NOT EDIT! # source: chromiumos/metrics.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import ...
], serialized_options=None,
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import res_company # WARNING: Order of imports matters on this module, so don't put res_company # below the other modules since it will lead to a missing column error when # the module is initia...
# default values wich refer to this new res.company field. from . import event
<|file_name|>test_azure_blobs.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 A...
headers = {} headers['etag'] = '0x8CFB877BB56A6FB' headers['content-md5'] = 'd4fe4c9829f7ca1cc89db7ad670d2bbd'
<|file_name|>deprecation.py<|end_file_name|><|fim▁begin|>import warnings<|fim▁hole|> def __new__(cls, value, *args, **kwargs): return super(DeprecatedCallableStr, cls).__new__(cls, value) def __init__(self, value, warning, warning_cls): self.warning, self.warning_cls = warning, warning_cls ...
class DeprecatedCallableStr(str): do_no_call_in_templates = True
<|file_name|>openacademy_course.py<|end_file_name|><|fim▁begin|>''' This module is to create model of Course ''' from openerp import api, fields, models, _ class Course(models.Model): ''' This class create model of Course ''' _name = 'openacademy.course' # Model odoo name name = fields.Char(st...
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export { FilterDisableHiddenStateComponent } from './filter-disable-hidden-state.component';
<|file_name|>status.cpp<|end_file_name|><|fim▁begin|>/*************************************************************** * * Copyright (C) 1990-2007, Condor Team, Computer Sciences Department, * University of Wisconsin-Madison, WI. * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use...
extern void setType (const char *, int, const char *); extern void setMode (Mode, int, const char *);
<|file_name|>DeleteOptionsUI.py<|end_file_name|><|fim▁begin|>########################################################################## # # Copyright (c) 2014, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided t...
# Metadata ########################################################################## Gaffer.Metadata.registerNode(
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding: utf-8 import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read()<|fim▁hole|>setup( name="cubehelix", version="0.1.0", author="James Davenport", # au...
<|file_name|>test_playaudio.py<|end_file_name|><|fim▁begin|>from nose.tools import assert_equal, assert_greater, assert_greater_equal, assert_less, assert_raises import time import numpy as np import audioio.playaudio as ap import audioio.audiomodules as am def test_beep(): am.enable_module() print() prin...
am.enable_module() def test_downsample():
<|file_name|>translation.py<|end_file_name|><|fim▁begin|>import unittest import requests class TranslationTests(unittest.TestCase): def setUp(self): self.url = 'http://127.0.0.1/api/translate' def test_given_words(self): """Should pass for the basic test cases provided""" test_words =...
def test_sentences(self): """Should translate sentences with preserved punctuation"""
<|file_name|>group.py<|end_file_name|><|fim▁begin|>from model.group import Group class GroupHelper: def __init__(self, app): self.app = app def open_groups_page(self): wd = self.app.wd if not (wd.current_url.endswith("/group.php") and len(wd.find_elements_by_name("new")) > 0): ...
# submit group creation wd.find_element_by_name("submit").click() self.return_to_groups_page()
<|file_name|>wtf-app.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # coding=utf8 from flask import Flask, render_template from flask.ext.jqueryuibootstrap import JqueryUiBootstrap from flask.ext.wtf import ( Form, RecaptchaField, ) from wtforms import ( TextField, HiddenField, Valida...
return "PASSED" return render_template('example.html', form=form)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Sylvain Afchain <sylvain.afchain@enovance.com> #<|fim▁hole|># a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
# 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
<|file_name|>locales.js<|end_file_name|><|fim▁begin|>SirTrevor.Locales = { en: { general: { 'delete': 'Delete?', 'drop': 'Drag __block__ here', 'paste': 'Or paste URL here', 'upload': '...or choose a file', 'close': 'close', ...
'title': "Tweet", 'fetch_error': "There was a problem fetching your tweet" },
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|> store: require('./store'), task: require('./task') };<|fim▁end|>
module.exports = { error: require('./error'),
<|file_name|>TestMergeTracker.py<|end_file_name|><|fim▁begin|>''' Unit tests for MergeTracker.py Verification tracking of which comps have been merged already works as expected and produces valid models. ''' import numpy as np import unittest from bnpy.learnalg import MergeTracker class TestMergeTracker(unittest....
pass def test_recordMergeResult_assertRaisesOnRepeatPair(self): MT = MergeTracker(4)
<|file_name|>rbf.py<|end_file_name|><|fim▁begin|>import numpy as np import tensorflow as tf from .module import Module class RBFExpansion(Module): def __init__(self, low, high, gap, dim=1, name=None): self.low = low self.high = high<|fim▁hole|> self.centers = np.linspace(low, high, int(np....
self.gap = gap self.dim = dim xrange = high - low
<|file_name|>Study.js<|end_file_name|><|fim▁begin|>"use strict"; /* istanbul ignore file */ /* tslint:disable */<|fim▁hole|><|fim▁end|>
/* eslint-disable */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=Study.js.map
<|file_name|>setup_win.py<|end_file_name|><|fim▁begin|>from distutils.core import setup import py2exe import os, sys from glob import glob import PyQt5 data_files=[('',['C:/Python34/DLLs/sqlite3.dll','C:/Python34/Lib/site-packages/PyQt5/icuuc53.dll','C:/Python34/Lib/site-packages/PyQt5/icudt53.dll','C:/Python34/Lib/si...
('platforms',['C:/Python34/Lib/site-packages/PyQt5/plugins/platforms/qminimal.dll','C:/Python34/Lib/site-packages/PyQt5/plugins/platforms/qoffscreen.dll','C:/Python34/Lib/site-packages/PyQt5/plugins/platforms/qwindows.dll']) ]
<|file_name|>parser.rs<|end_file_name|><|fim▁begin|>use std::mem; use std::collections::HashMap; use super::lexer::{Lexer, LexError}; use super::token::{TokenSpan, Token, Lit}; use super::ast::*; // TODO: remove * import pub struct Parser<'a> { lexer: Lexer<'a>, curr: Option<TokenSpan>, last: Option<Toke...
fn parse_select(&mut self) -> Result<Query, ParserError> { let mut cols = Vec::new();
<|file_name|>config.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2018 Cisco 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: // // http://www.apache.or...
type Config struct { // Custom polling interval, default value is 30s PollingInterval time.Duration `json:"polling-interval"`
<|file_name|>test_split_partition.py<|end_file_name|><|fim▁begin|>from datetime import datetime import numpy as np import pytest import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, Series, _testing as tm, ) def test_split(any_string_dtype): values = Series(["a_b_c", "c_d_e...
<|file_name|>priorutils.py<|end_file_name|><|fim▁begin|>#significant input and copied functions from T. Morton's VESPA code (all mistakes are my own) #coords -- RA and DEC of target in degrees. Needed for GAIA querying. # Degrees, 0-360 and -90 to +90. List format [RA,DEC]. import numpy as np import pandas ...
<|file_name|>ClearLogAction.java<|end_file_name|><|fim▁begin|>package com.reason.ide.console; import com.intellij.execution.ui.ConsoleView; import com.intellij.icons.AllIcons; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.ed...
private final ConsoleView m_console;
<|file_name|>ch4_ex4.1.4.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Created by Samvel Khalatyan on Mar 23, 2014<|fim▁hole|># Copyright (c) 2014 Samvel Khalatyan. All rights reserved # # Use of this source code is governed by a license that can be found in # the LICENSE file. import random import unittes...
<|file_name|>Element.ts<|end_file_name|><|fim▁begin|>/// <reference path="./../Element.ts" /> /// <reference path="./../../../elements/bdo/IElement.ts" /> /// <reference path="./../../../elements/bdo/IOptions.ts" /> module xlib.ui.element.adapters.browser.bdo { import IEvent = elements.IEvent; export class Eleme...
public attributesDeny(): string[] { // todo: adjust xml:lang
<|file_name|>windowing.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/. */ //! Abstract windowing methods. The concrete implementation...
/// Spins the event loop and returns the next event. fn recv(&self) -> WindowEvent;
<|file_name|>app.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from flask import request class View(object): def __init__(self, core): self.core = core<|fim▁hole|> def __call__(self, *args, **kwargs): method = request.method.lower() handler = getattr(self, method, None) ...
<|file_name|>ElementShapeableTest.java<|end_file_name|><|fim▁begin|>package com.github.bachelorpraktikum.visualisierbar.model; import com.github.bachelorpraktikum.visualisierbar.model.Element.State; import com.github.bachelorpraktikum.visualisierbar.model.Element.Type; public class ElementShapeableTest extends Shapea...
<|file_name|>hello_2_2.js<|end_file_name|><|fim▁begin|>console.log('argv[0]: '+process.argv[0]); <|fim▁hole|><|fim▁end|>
console.log('argv[1]: '+process.argv[1]);
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>export * from './map-config.service';<|fim▁hole|>export * from './map-loader.service';<|fim▁end|>
export * from './esri-module-provider';
<|file_name|>knock-rgb-led-smd.py<|end_file_name|><|fim▁begin|>import RPi.GPIO as GPIO KnockPin = 11 LedPin = 12 Led_status = 1 def setup(): GPIO.setmode(GPIO.BOARD) # Numbers GPIOs by physical location GPIO.setup(LedPin, GPIO.OUT) # Set LedPin's mode is output GPIO.setup(KnockPin, GPIO.IN, pull_up_down=...
if __name__ == '__main__': # Program start from here
<|file_name|>fibonacci.js<|end_file_name|><|fim▁begin|><|fim▁hole|>/** * 斐波那契数列 */ export default function fibonacci(n){ if(n <= 2){ return 1; } let n1 = 1, n2 = 1, sn = 0; for(let i = 0; i < n - 2; i ++){ sn = n1 + n2; n1 = n2; n2 = sn; } return sn; }<|fim▁end|>
<|file_name|>Concentration.js<|end_file_name|><|fim▁begin|>/* * Version 0.1.14 * Made By Robin Kuiper * Skype: RobinKuiper.eu * Discord: Atheos#1095 * My Discord Server: https://discord.gg/AcC9VME * Roll20: https://app.roll20.net/users/1226016/robin * Roll20 Wiki: https://wiki.roll20.net/Script:Concentration * ...
<|file_name|>requirements.js<|end_file_name|><|fim▁begin|>'use strict'; /** * The basic http module, used to create the server. * * @link http://nodejs.org/api/http.html */ alchemy.use('http', 'http'); /** * This module contains utilities for handling and transforming file paths. * Almost all these methods pe...
* * @link http://nodejs.org/api/fs.html
<|file_name|>issue-65846-rollback-gating-failing-matcher.rs<|end_file_name|><|fim▁begin|>// run-pass // Test that failing macro matchers will not cause pre-expansion errors // even though they use a feature that is pre-expansion gated. macro_rules! m { ($e:expr) => { 0 }; // This fails on the input below due to `...
($e:expr,) => { 1 }; // This also fails to match due to `foo`.
<|file_name|>playground-empty.rs<|end_file_name|><|fim▁begin|>#![crate_name = "foo"] #![doc(html_playground_url = "")] // compile-flags:-Z unstable-options --playground-url https://play.rust-lang.org/ <|fim▁hole|>//! ``` //! println!("Hello, world!"); //! ``` // @!has foo/index.html '//a[@class="test-arrow"]' "Run"<...
//! module docs //!
<|file_name|>gnu.py<|end_file_name|><|fim▁begin|>from __future__ import division, absolute_import, print_function import re import os import sys import warnings import platform import tempfile from subprocess import Popen, PIPE, STDOUT from numpy.distutils.fcompiler import FCompiler from numpy.distutils.exec_command ...
m = TARGET_R.search(output)
<|file_name|>treenode.spec.js<|end_file_name|><|fim▁begin|>var TreeNode = require('../dist/treenode').TreeNode; describe("TreeNode Class", function() { var tree; var data = [ { name: 'I am ROOT', status: 'initial' }, { name: 'Node 1', stat...
expect(tree.find(data[2]).data).toEqual(data[2]);
<|file_name|>hero.service.ts<|end_file_name|><|fim▁begin|>import {Injectable} from '@angular/core'; //import {HEROES} from './mock-heroes'; import {Http,Headers} from '@angular/http'; import 'rxjs/add/operator/toPromise'; import {Hero} from './model/Hero'; @Injectable() export class HeroService { private hero:...
return this.http .put(url, JSON.stringify(hero), {headers: this.headers})
<|file_name|>input.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from nodes import Node class Input(Node): char = "z" args = 0 results = 1<|fim▁hole|> return input() or Input.contents<|fim▁end|>
contents = "" def func(self): """input() or Input.contents"""
<|file_name|>confParser.py<|end_file_name|><|fim▁begin|>import string from pyparsing import ( Literal, White, Word, alphanums, CharsNotIn, Forward, Group, SkipTo, Optional, OneOrMore, ZeroOrMore, pythonStyleComment) class Parser(object): left_bracket = Literal("{").suppress() right_bracket = Literal(...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ /// A random number generator which shares one instance of an `O...
fn next_u32(&mut self) -> u32 { self.rng.next_u32() }
<|file_name|>test_propagation.py<|end_file_name|><|fim▁begin|>import numpy as np from dipy.data import default_sphere from dipy.tracking.propspeed import ndarray_offset, eudx_both_directions from numpy.testing import (assert_array_almost_equal, assert_equal, assert_raises, run_module_suite)...
# Make a version of `arr_1d` which is not contiguous return np.vstack((arr_1d, arr_1d)).ravel(order='F')[::2]
<|file_name|>fmt_tbl.rs<|end_file_name|><|fim▁begin|>// SPDX-License-Identifier: MIT // Copyright wtfsckgh@gmail.com // Copyright iced contributors use super::super::super::data_reader::DataReader; use super::super::super::iced_constants::IcedConstants; use super::super::pseudo_ops::get_pseudo_ops; use super::super::s...
v2 = reader.read_compressed_u32(); Box::new(SimpleInstrInfo_er::new(v, s, s2, v2)) }
<|file_name|>issue-23968-const-not-overflow.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>const U16_MAX_HALF: u16 = !0u16 / 2; const U32_MAX_HALF: u32 = !0u32 / 2; const U64_MAX_HALF: u64 = !0u64 / 2; fn main() { assert_eq!(U8_MAX_HALF, 0x7f); assert_eq!(U16_MAX_HALF, 0x7fff); assert_eq!(U32_MAX_HALF, 0x7fff...
// run-pass const U8_MAX_HALF: u8 = !0u8 / 2;
<|file_name|>useBlockingPaginationFragment-with-suspense-transition-test.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails oncall+relay * ...
last: null, isViewerFriendLocal: false, orderby: ['name'],
<|file_name|>admin.py<|end_file_name|><|fim▁begin|># encoding: utf-8 """ Admin interface for the sphinxdoc app. <|fim▁hole|> class ProjectAdmin(admin.ModelAdmin): """Admin interface for :class:`~sphinxdoc.models.Project`.""" list_display = ('name', 'path',) prepopulated_fields = {'slug': ('name',)} class...
""" from django.contrib import admin from sphinxdoc.models import Project, Document
<|file_name|>library.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Alex Meade # Copyright (c) 2015 Rushil Chugh # Copyright (c) 2015 Navneet Singh # Copyright (c) 2015 Yogesh Kshirsagar # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file e...
def _get_volume(self, uid): label = utils.convert_uuid_to_es_fmt(uid)
<|file_name|>primitive.rs<|end_file_name|><|fim▁begin|>use core::*; use walker::*; macro_rules! unwrap_text { ($s:ident, $e:expr) => {{ match *$e.1 { Epiq::Text(ref t) => t, _ => { let from = $s.printer_printed($e.0); panic!("{}からtextは取り出せません", from);...
<|file_name|>SeattleExpressLanesView.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2014 Washington State Department of Transportation * * 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...
* GNU General Public License for more details. * * You should have received a copy of the GNU General Public License
<|file_name|>ConverterFactoryLoader.java<|end_file_name|><|fim▁begin|>package kikaha.urouting; import java.util.*; import java.util.function.Function; import javax.annotation.PostConstruct; import javax.enterprise.inject.Produces; import javax.enterprise.inject.*; import javax.inject.*; import kikaha.core.util.Lang; ...
); } }
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models import datetime def get_choices(lst): return [(i, i) for i in lst] # # Person # pprint_pan = lambda pan: "%s %s %s" % (pan[:5], pan[5:9], pan[9:]) class Person(models.Model): name = models.CharField(max_length=255, db_index=Tr...
<|file_name|>tk.py<|end_file_name|><|fim▁begin|># Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICEN...
self.master = master self.options = options self.resource_dir = os.path.dirname(os.path.dirname(__file__))
<|file_name|>segmentation_smoothing.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright 2021 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 * * h...
tf.sub(prevMask, newMask), tf.mul(uncertainty, config.combineWithPreviousRatio))); });
<|file_name|>DictionaryWriter.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2013 The Android Open Source Project * * 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://...
*/
<|file_name|>UsernameFinder.java<|end_file_name|><|fim▁begin|>/* * Licensed to Apereo under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. * Apereo licenses this file to you under the Apache License, * Version...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 from setuptools import setup, find_packages version = '0.2.4' setup( name='lolbuddy', version=version, description='a cli tool to update league of legends itemsets and ability order from champion.gg', author='Cyrus Roshan', ...
'console_scripts': [ 'lolbuddy=lolbuddy:main', ], },
<|file_name|>node.py<|end_file_name|><|fim▁begin|># 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 applicable law or ag...
try:
<|file_name|>Fantasma.java<|end_file_name|><|fim▁begin|>package jrpsoft; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Point; import java.awt.geom.Ellipse2D; import java.util.Random; public class Fantasma extends Actor { protected static final int FANTASMA_SPEED = 1; public boolean up, down, ri...
break;
<|file_name|>test_iam2_project_vpc_cascade_delete.py<|end_file_name|><|fim▁begin|>''' @auther:fangxiao ''' import apibinding.api_actions as api_actions import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_state as test_state import zstackwoodpecker...
if l3_vpc_network_uuid: net_ops.delete_l3(l3_vpc_network_uuid)
<|file_name|>test_group.py<|end_file_name|><|fim▁begin|>""" Test for the bandicoot.helper.group module. """ import bandicoot as bc from bandicoot.core import Record, Position import unittest import datetime from bandicoot.tests.generate_user import random_burst from bandicoot.helper.group import group_records from ban...
def test_statistics_bad_aggregated(self):
<|file_name|>sr-latn.min.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:a396601eca15b0c281513d01941cfd37300b927b32a1bb9bb6e708a9910f1b49<|fim▁hole|><|fim▁end|>
size 2712
<|file_name|>calibrated_image.py<|end_file_name|><|fim▁begin|>"""calibrated_image.py was written by Ryan Petersburg for use with fiber characterization on the EXtreme PREcision Spectrograph """ import numpy as np from .base_image import BaseImage from .numpy_array_handler import filter_image, subframe_image cla...
Returns
<|file_name|>interface.rs<|end_file_name|><|fim▁begin|>/** * Websocket implementation taken from https://github.com/nbaksalyar/mio-websocket */ /// High-level WebSocket library interface use std::net::SocketAddr; use std::thread; use std::sync::mpsc; use std::time::Duration; use mio::{Token, EventLoop, EventSet, P...
}
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for readbacks project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ <|fim▁hole|> from django.core.wsgi import get_...
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "readbacks.settings")
<|file_name|>evidenceScore.py<|end_file_name|><|fim▁begin|>from contentbase.upgrader import upgrade_step @upgrade_step('evidenceScore', '1', '2') def evidenceScore_1_2(value, system): # https://github.com/ClinGen/clincoded/issues/1507 # Add affiliation property and update schema version<|fim▁hole|><|fim▁end|>
return
<|file_name|>eth.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...
seed_compute: Mutex<SeedHashCompute>,
<|file_name|>PSBuildReferenceTaxonomyUtils.java<|end_file_name|><|fim▁begin|>package org.broadinstitute.hellbender.tools.spark.pathseq; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.io.Output; import htsjdk.samtools.SAMSequenceRecord; import org.apache.commons.compress.archivers.tar.TarArchiv...
/**
<|file_name|>wss.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import socket import re import binascii import struct import time import sys import random from base64 import b64encode from hashlib import sha1 from thread import * events = "/var/www/map/eventstream" with open(events) as f: content = f.read().split...
length = len(line)
<|file_name|>bitcoin_es_DO.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="es_DO" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About DarkChain</source> <translation type="unf...
<source>%1/unconfirmed</source> <translation>%1/no confirmado</translation> </message> <message>
<|file_name|>InformixUniqueDelegate.java<|end_file_name|><|fim▁begin|>/* * Hibernate, Relational Persistence for Idiomatic Java * * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.h...
<|file_name|>mrp_production.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publis...
class MrpProduction(models.Model):
<|file_name|>photo_loader_tests.py<|end_file_name|><|fim▁begin|># coding=utf-8 from elections.tests import VotaInteligenteTestCase as TestCase from elections.models import Election from django.core.urlresolvers import reverse from candideitorg.models import Candidate from django.core.management import call_command cl...
<|file_name|>helper.js<|end_file_name|><|fim▁begin|>var is_touch; function is_touch_device() { return 'ontouchstart' in window // works on most browsers || navigator.maxTouchPoints; // works on IE10/11 and Surface } <|fim▁hole|>})();<|fim▁end|>
(function() { is_touch = is_touch_device();
<|file_name|>lock.py<|end_file_name|><|fim▁begin|>"""holds locking functionality that works across processes""" from __future__ import absolute_import, unicode_literals from contextlib import contextmanager import py from filelock import FileLock, Timeout from tox.reporter import verbosity1 @contextmanager def hol...
continue winner = path.join("{}{}{}".format(prefix, max_value + 1, suffix)) winner.ensure(dir=0)
<|file_name|>GrantType.java<|end_file_name|><|fim▁begin|>/* * Copyright 2016 Yu Sheng. 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/license...
PASSWORD, CLIENT_CREDENTIALS }