prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>cpp_code_generator.rs<|end_file_name|><|fim▁begin|>use crate::config::Config; use crate::cpp_checks::Condition; use crate::cpp_ffi_data::{ CppFfiArgumentMeaning, CppFfiFunctionKind, CppFfiType, CppFieldAccessorType, CppToFfiTypeConversion, QtSignalWrapper, QtSlotWrapper, }; use crate::cpp_ffi_data:...
impl Generator<'_> {
<|file_name|>ethiopic.js.uncompressed.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:f09386339b7a083e92b706c491817eb6f328805c49481a614f996a194d761fdc<|fim▁hole|><|fim▁end|>
size 1848
<|file_name|>angular-locale_wae-ch.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module("ngLocale", [], ["$provide", function ($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i ...
"WEEKENDRANGE": [ 5, 6 ],
<|file_name|>limit_offset_clause.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> /// A helper query node that contains both limit and offset clauses /// /// This type is only relevant for implementing custom backends #[derive(Debug, Clone, Copy, QueryId)] pub struct LimitOffsetClause<Limit, Offset> { /// The limit cla...
use super::QueryFragment; use crate::query_builder::QueryId;
<|file_name|>macro_crate_test.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apac...
macro_rules! unexported_macro (() => (3i))
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * @license Apache-2.0 * * Copyright (c) 2018 The Stdlib Authors. *<|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 appli...
* Licensed under the Apache License, Version 2.0 (the "License");
<|file_name|>main.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
mod foo;
<|file_name|>flow-stats-in.cc<|end_file_name|><|fim▁begin|>#include "flow-stats-in.hh" <|fim▁hole|>Flow_stats::Flow_stats(const ofp_flow_stats* ofs) { *(ofp_flow_stats*) this = *ofs; const ofp_action_header* headers = ofs->actions; size_t n_actions = (ntohs(ofs->length) - sizeof *ofs) / sizeof *headers; ...
namespace vigil {
<|file_name|>diagnostic.rs<|end_file_name|><|fim▁begin|>// Copyright (C) 2013-2020 Blockstack PBC, a public benefit corporation // Copyright (C) 2020 Stacks Open Internet Foundation // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as publ...
impl Diagnostic { pub fn err(error: &dyn DiagnosableError) -> Diagnostic {
<|file_name|>SnapshotAction.java<|end_file_name|><|fim▁begin|>/* Copyright 2005,2006 Sven Reimers, Florian Vogler<|fim▁hole|> * * The Software Quality Environment Project 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...
* * This file is part of the Software Quality Environment Project.
<|file_name|>envelope_editor.rs<|end_file_name|><|fim▁begin|>use { Backend, Circle, Color, Colorable, Direction, Edge, Frameable, FramedRectangle, FontSize, IndexSlot, Labelable, Mouse, NodeIndex, Point, PointPath, Positionable, Scalar, Sizeable, ...
} }
<|file_name|>fulfillQueryTest.js<|end_file_name|><|fim▁begin|>import fulfillQuery from '../../../src/webserver/db/fulfillQuery' // eslint-disable-line<|fim▁hole|> describe('webserver/db/fulfillQuery', () => { it('should work') })<|fim▁end|>
<|file_name|>loopsource0.rs<|end_file_name|><|fim▁begin|>fn main() { let mut count = 0u32; println!("Comptons jusqu'à l'infini!"); // Boucle infinie. loop {<|fim▁hole|> // Ignore le reste de l'itération. continue; } println!("{}", count); if count == 5...
count += 1; if count == 3 { println!("trois");
<|file_name|>test_static_actions.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016 Mirantis, Inc. # Copyright (c) 2016 AT&T Corp # # 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...
"methodName": None } req = self._post('/actions', jsonutils.dump_as_bytes(request_data))
<|file_name|>StickerPayLoad.java<|end_file_name|><|fim▁begin|>package es.npatarino.android.gotchallenge.chat.message.viewmodel; import android.net.Uri; import es.npatarino.android.gotchallenge.chat.message.model.Payload; public class StickerPayLoad implements Payload { private String stickerFilePath; public Sti...
return Uri.parse(stickerFilePath); } }
<|file_name|>RPSOM_animal.py<|end_file_name|><|fim▁begin|>#!/usr/local/bin python # -*- coding: utf-8 -*- <|fim▁hole|>if __name__=='__main__': # learning rate alpha setup alpha_max = [0.1, 0.5, 0.7] alpha_min = [0.01, 0.1, 0.2] # neighborhood radius sigma setup sigma_max = [5, 7, 10] sigma_min = [1, 2, 3] epochs...
from RPSOM import Model from RPSOM.transition_graph import output_graph
<|file_name|>compat.py<|end_file_name|><|fim▁begin|>from django.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ImproperlyConfigured from django.utils import six from django.utils.html import conditional_escape from django.utils.safestring import mark_safe from six.mo...
<|file_name|>parameter_value_expression.cpp<|end_file_name|><|fim▁begin|>//===----------------------------------------------------------------------===// // // Peloton // // parameter_value_expression.cpp // // Identification: src/backend/expression/parameter_value_expression.cpp // // Copyright...
<|file_name|>authenticationpolicylabel.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2008-2015 Citrix Systems, 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://w...
def get_filtered(cls, client, filter_) :
<|file_name|>test.go<|end_file_name|><|fim▁begin|>// Copyright 2015 Dmitry Vyukov. All rights reserved. // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. package test import ( "bytes" ) func Fuzz(data []byte) int { if len(data) == 1 { if data[0] == '!' || data[0] =...
func IsInf(x float64, v int) bool { return x != 0 }
<|file_name|>class_passed_message.js<|end_file_name|><|fim▁begin|>var class_passed_message = [ [ "direction_t", "class_passed_message.html#a11c83e74aa007c495b32ec3ed4953a50", [ [ "INCOMING", "class_passed_message.html#a11c83e74aa007c495b32ec3ed4953a50a43c42d4afa45cd04736e0d59167260a4", null ], [ "OUTGOI...
[ "UPPER_DATA", "class_passed_message.html#a7738b6f08855f784d1012de87fbfd9e6adf76d3ca7bb9a62bed70965639d59859", null ], [ "UPPER_CONTROL", "class_passed_message.html#a7738b6f08855f784d1012de87fbfd9e6aea991e99dac6c91c9e3e89f902f1075d", null ], [ "LOWER_DATA", "class_passed_message.html#a7738b6f08855f78...
<|file_name|>gcp_compute_ssl_certificate.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # #...
<|file_name|>eq.rs<|end_file_name|><|fim▁begin|>#![feature(core)] extern crate core; #[cfg(test)] mod tests { use core::cmp::PartialEq; struct A<T> { value: T } struct B<T> { value: T } impl PartialEq<B<T>> for A<T> { fn eq(&self, other: &B<T>) -> bool { self.value == other.value } ...
<|file_name|>CommonFileUtil.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- ' module description' import os __author__ = 'Andrew Wen' def file_extension(filename): """ 获取文件后缀名 :param path: :return:<|fim▁hole|><|fim▁end|>
""" #return os.path.splitext(path)[1] return filename.rsplit('.', 1)[1].lower()
<|file_name|>test_yearmonth.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import pytest from tableschema import types from tableschema.config import ERROR # T...
assert types.cast_yearmonth(format, value) == result
<|file_name|>tests_DelSlugView.py<|end_file_name|><|fim▁begin|>from django.test import TestCase from django.urls import reverse from .utils import add_default_data <|fim▁hole|> class DelSlugViewTest(TestCase): """Test del_slug view""" @classmethod def setUpTestData(cls): add_default_data() de...
from petition.models import PytitionUser, Permission, Organization, Petition
<|file_name|>Decompressor.hpp<|end_file_name|><|fim▁begin|>#ifndef DECOMPRESSOR_HPP #define DECOMPRESSOR_HPP #include <unordered_map> #include <queue> // #include <memory> #include <iostream> #include <fstream> #include <cassert> #include <queue> // #include "InputBuffer.hpp" #include "OffsetsStream.hpp" #include "E...
int offset, int ref_id,
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from importlib import import_module from django.core.urlresolvers import (RegexURLPattern, RegexURLResolver, LocaleRegexURLResolver) from django.core.exceptions import ImproperlyConfigured from django.utils import six __all__ = ['handler400', 'handler403', 'h...
return RegexURLPattern(regex, view, kwargs, name)
<|file_name|>LocalFileStorage.test.js<|end_file_name|><|fim▁begin|>const errors = require('@tryghost/errors'); const should = require('should'); const sinon = require('sinon'); const fs = require('fs-extra'); const moment = require('moment'); const Promise = require('bluebird'); const path = require('path'); const Loca...
}); it('should copy temp file to new location', function (done) { localFileStore.save(image).then(function () {
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution<|fim▁hole|># # This program is free software: you can redistribute it and/or modify # it under the terms...
# # Copyright (C) 2014 Didotech srl (<http://www.didotech.com>). # # All Rights Reserved
<|file_name|>check_button.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (b7f5189) from gir-files (71d73f0) // DO NOT EDIT use Actionable; use Bin; use Button; use Container; use ToggleButton; use Widget; use ffi; use glib::object::Downcast; use glib::object::IsA; use glib::translate::*; glib_wrapp...
impl<O: IsA<CheckButton>> CheckButtonExt for O {}
<|file_name|>test_instance_models.py<|end_file_name|><|fim▁begin|># Copyright 2014 Rackspace Hosting # Copyright 2014 Hewlett-Packard Development Company, L.P. # 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 ...
image_id=str(uuid.uuid4()),
<|file_name|>pornovoisines.py<|end_file_name|><|fim▁begin|># coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, float_or_none, unified_strdate, ) class PornoVoisinesIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?...
'title': title, 'description': description, 'thumbnail': thumbnail,
<|file_name|>village_manager.rs<|end_file_name|><|fim▁begin|>use village::*; use village_mind::*; pub struct VillageManager { pub village: VillageRef, pub village_mind: VillageMind,<|fim▁hole|>}<|fim▁end|>
<|file_name|>CSL.cpp<|end_file_name|><|fim▁begin|>#include<iostream> template<classy T> class CSL // CommaSeparatedList { private: int size; public: CSL(T *d, int s); void showList(); }; CSL<T>::CSL(T *d, int s): data(s),size(d) template<typename T> void CSL<T>::showList() { cout<<"Comma separated list...
someCustomers[2].setCustomer("Fine",333.88); someCustomers[3].setCustomer("Torrence",123.99); someCustomers[4].setCustomer("Richard",20.06); someCustomers[4].setCustomer("Curtin",56999.19);
<|file_name|>start.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import yikbot import time # Latitude and Longitude of location where bot should be localized yLocation = pyak.Location("42.270340", "-83.742224") yb = yikbot.YikBot("yikBot", yLocation) print "DEBUG: Registered yikBot with handle %s and id %s" % (yb.handl...
import pyak
<|file_name|>port.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from .util import Spec class Port(Spec): STATES = [ "listening", "closed", "open", "bound_to", "tcp", "tcp6", "udp" ] def __init__(self, portnumber): self.portnumber = portnumber self.get_sta...
} def _make_sure(self, x, y): if x == y:
<|file_name|>issue-1696.rs<|end_file_name|><|fim▁begin|>// xfail-fast // 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....
use std::hashmap::HashMap; use std::str;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|> from . import res_partner<|fim▁end|>
# See README.rst file on addon root folder for license details
<|file_name|>0019_algorithmtagproposal_difficultyproposal.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2019-06-24 23:35 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class M...
<|file_name|>system_dic.py<|end_file_name|><|fim▁begin|># Copyright 2022 moco_beta # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
<|file_name|>FileSaver.js<|end_file_name|><|fim▁begin|>/* FileSaver.js * A saveAs() & saveTextAs() FileSaver implementation. * 2014-06-24 * * Modify by Brian Chen * Author: Eli Grey, http://eligrey.com * License: X11/MIT * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md */ /*global ...
<|file_name|>feedback.js<|end_file_name|><|fim▁begin|>var util = require('../../../utils/util.js'); var check = require('../../../utils/check.js'); var api = require('../../../config/api.js'); var app = getApp(); Page({ data: { array: ['请选择反馈类型', '商品相关', '功能异常', '优化建议', '其他'], index: 0, content: '', ...
<|file_name|>global_defaults.py<|end_file_name|><|fim▁begin|>__author__ = 'brianoneill' <|fim▁hole|>from log_calls import log_calls global_settings = dict( log_call_numbers=True, log_exit=False, log_retval=True, ) log_calls.set_defaults(global_settings, args_sep=' $ ')<|fim▁end|>
<|file_name|>config.py<|end_file_name|><|fim▁begin|>import os import json import logging _DEFAULT_CONFIG_DIR = "config" _DEFAULT_CONFIG_NAME = "config.json" _DEFAULT_LOG_CONFIG_NAME = "default_log.json" ###################################################################################################### def load(p...
<|file_name|>tween.js<|end_file_name|><|fim▁begin|>/** * @author sole / http://soledadpenades.com * @author mrdoob / http://mrdoob.com * @author Robert Eisele / http://www.xarg.org * @author Philippe / http://philippe.elsass.me * @author Robert Penner / http://www.robertpenner.com/easing_terms_of_use.html * @auth...
<|file_name|>PulseSignal.cpp<|end_file_name|><|fim▁begin|>/******************************************************************************* File: PulseSignal.cpp Project: OpenSonATA Authors: The OpenSonATA code is the result of many programmers over many years Copyright 2011 The SETI Institute OpenS...
PulseSignal::getConfirmationStats() { return (&signal->cfm);
<|file_name|>ko.withfirst.js<|end_file_name|><|fim▁begin|>define([ 'knockout' ],function( ko ){ ko.bindingHandlers.withfirst = { 'init' : function(element, valueAccessor, allBindings, viewModel, bindingContext) { var savedNodes; ko.computed(function() { var dataValue = ko.utils.unwrapObser...
} });
<|file_name|>dz.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. 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 */ // THIS CODE IS GENERATED - DO NOT MODIFY // See angular/tools/gulp-...
'ཟླ་བཅུ་གཅིག་པ་', 'ཟླ་བཅུ་གཉིས་པ་' ] ],
<|file_name|>fileslist.js<|end_file_name|><|fim▁begin|>import PropTypes from 'prop-types' import React from 'react' import { List } from 'immutable' import Modal from './warningmodal.js' import Path from 'path' const FilesList = ({ folders, folderPathToRemove, actions }) => { const addStorageLocation = () => actions...
onClick={onResizeStorageLocationClick(folder)} >
<|file_name|>show_test.go<|end_file_name|><|fim▁begin|>package command import ( "encoding/json" "fmt" "io/ioutil" "os" "path/filepath" "strings" "testing" "github.com/google/go-cmp/cmp" "github.com/hashicorp/terraform/internal/addrs" "github.com/hashicorp/terraform/internal/configs/configschema" "github.co...
View: view, }, }
<|file_name|>ve.dm.TransactionProcessor.test.js<|end_file_name|><|fim▁begin|>/*! * VisualEditor DataModel TransactionProcessor tests. * * @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt * @license The MIT License (MIT); see LICENSE.txt */ QUnit.module( 've.dm.TransactionProcessor' ); /* Tests ...
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># Utilities ------------------------------------------------------------------ # import math def clamp(val, min, max): if val <= min: return min elif val >= max: return max return val def fixAngle(angle): while angle > 180.0:<|fim▁ho...
angle -= 360.0 while angle < -180.0: angle += 360.0
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>extern crate combine; use self::combine::*; use self::combine::combinator::{Many, SepBy}; use self::combine::primitives::{Consumed, Stream}; use std::collections::HashMap; #[derive(Debug, PartialEq, Eq)] pub enum Object { IntObject(i32), Boolean(bool), Stri...
test( struct_parser , "{col1, col2 1, 2
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* Copyright (C) 2015 Yutaka Kamei */ #![feature(test)] extern crate urlparse; extern crate test; use urlparse::*; use test::Bencher; #[bench] fn bench_quote(b: &mut Bencher) { b.iter(|| quote("/a/テスト !/", &[b'/'])); } #[bench] fn bench_quote_plus(b: &mut Benche...
<|file_name|>ast_util.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/l...
}
<|file_name|>scan-gspread-targets.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # A python script to take targets from a google spreadsheet and run a # Nessus vulnerability scan. import json import gspread from oauth2client.service_account import ServiceAccountCredentials from nessrest import ness6rest import...
# Login with your Google account's API key scopes = ['https://spreadsheets.google.com/feeds']
<|file_name|>16853_H1.rs<|end_file_name|><|fim▁begin|>Per(s)PSA @ damp 02% PSA @ damp 05% PSA @ damp 07% PSA @ damp 10% PSA @ damp 20% PSA @ damp 30% (m/s/s) 0.000 9.4427940E-002 9.4423000E-002 9.4423000E-002 9.4423000E-002 9.4423000E-002 9.4423000E-002 0.010 9.5077590E-002 9.4428840E-002 9.4429890E-002 9.4431070E-00...
0.150 1.2498645E-001 1.0674112E-001 1.0796427E-001 1.0857921E-001 1.0699045E-001 1.0436486E-001 0.160 1.3663658E-001 1.2576041E-001 1.1889431E-001 1.1454626E-001 1.0941206E-001 1.0585318E-001
<|file_name|>DataTreeBean.java<|end_file_name|><|fim▁begin|>package com.lami.tuomatuo.mq.zookeeper.server; import com.lami.tuomatuo.mq.zookeeper.jmx.ZKMBeanInfo; /** * This class implements the data tree MBean * * Created by xujiankang on 2017/3/19. */ public class DataTreeBean implements DataTreeMXBean, ZKMBean...
return dataTree.approximateDataSize(); } @Override
<|file_name|>helper_stub_test.go<|end_file_name|><|fim▁begin|>// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows<|fim▁hole|> r...
package ipv4_test func protocolNotSupported(err error) bool {
<|file_name|>issue-3136-a.rs<|end_file_name|><|fim▁begin|>trait x { fn use_x<T>(&self); } struct y(()); impl x for y { fn use_x<T>(&self) { struct foo { //~ ERROR quux i: () } fn new_foo<T>(i: ()) -> foo { foo { i: i } }<|fim▁hole|>}<|fim▁end|>
}
<|file_name|>bitcoin_ja.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ja" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About AngelCoin</source> <translation>ブラックコインについて</tr...
<translation>今年</translation>
<|file_name|>InterbankNetwork.java<|end_file_name|><|fim▁begin|>/* * This file is part of CRISIS, an economics simulator. * * Copyright (C) 2015 Victor Spirin * * CRISIS is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Fre...
if (!adj.containsKey(a)) addNode(a);
<|file_name|>xiajuxu441.py<|end_file_name|><|fim▁begin|><|fim▁hole|> ''' @author: sheng @license: ''' SPELL=u'xiàjùxū' CN=u'下巨虚' NAME=u'xiajuxu441' CHANNEL='stomach' CHANNEL_FULLNAME='StomachChannelofFoot-Yangming' SEQ='ST39' if __name__ == '__main__': pass<|fim▁end|>
#!/usr/bin/python #coding=utf-8
<|file_name|>JsonResolver.cc<|end_file_name|><|fim▁begin|>// Copyright 2016 lyobzik // // 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 //...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from setuptools import setup import re import platform import os import sys install_requires = ["bottle>=0.11", "requests>=1.1.0", "pyyaml>=0.0", "czipfile>=1.0.0", ...
author_email="mjdorma+reststore@gmail.com", url="https://github.com/provoke-vagueness/reststore", description="RESTful datastore. A simple way to store large amounts of average sized files.", long_description=open('README.rst').read(),
<|file_name|>branchmodel.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid com...
{ return children.count(); }
<|file_name|>flex-item.directive.ts<|end_file_name|><|fim▁begin|>import {Directive, Input, HostBinding, ElementRef} from "@angular/core"; /** * A directive to control flex items layout properties. */ @Directive({ selector: '[flex]' }) export class FlexItemDirective{ /** * Controls the flex-basis proper...
<|file_name|>find_warcs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 from sfmutils.api_client import ApiClient import argparse import logging import sys log = logging.getLogger(__name__) def main(sys_argv): # Arguments parser = argparse.ArgumentParser(description="Return WARC filepaths for passing...
warc_filepaths = set()
<|file_name|>endtoend_test.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package asm import ( "bufio" "bytes" "fmt" "io/ioutil" "os" "path/filepath" "regexp" "sort" ...
printed = strings.TrimSpace(parts[1])
<|file_name|>units.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np <|fim▁hole|> def quantity_support(format='latex_inl...
__doctest_skip__ = ['quantity_support']
<|file_name|>FedoraHttpConfiguration.java<|end_file_name|><|fim▁begin|>/* * Copyright 2015 DuraSpace, 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...
private boolean putRequiresIfMatch; /**
<|file_name|>warnd.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import getopt import sys import os Options = { 'daemon': False, 'fifo': os.environ['HOME'] + '/warnd_fifo', 'log': [], 'time': 2, 'size': 54, 'wrap': 0, } State = { 'currentlog': 0, } USAGE = '\n'.join([ 'Usage...
sys.argv[1:], 'hf:l:t:s:w:', ['help', 'fifo', 'log', 'wrap'])
<|file_name|>parsing_types.rs<|end_file_name|><|fim▁begin|>#[derive(Debug, PartialEq)] pub struct RawHashlineParseData { pub(super) indent_depth: usize, pub(super) name: String, pub(super) opts: String, pub(super) args: String, pub(super) comment: String, } #[derive(Debug, PartialEq)] pub struct Ra...
Hashline::OpenEnv(Environment {
<|file_name|>px_update_git_header.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from __future__ import print_function <|fim▁hole|>import argparse import os import sys import subprocess import re parser = argparse.ArgumentParser(description="""Extract version info from git and generate a version header file. Th...
<|file_name|>cfg.unpack.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: UTF-8, tab-width: 4 -*- # Python Coding Style: http://docs.python.org/tutorial/controlflow.html#intermezzo-coding-style # Command Line Arguments Parser: http://docs.python.org/library/argparse.html from __future__ import division ...
def main(invocation, *cli_args): HEIDI_CHARSET = 'UTF-8' INI_CHARSET = 'UTF-8-sig'
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # import json from django.contrib.contenttypes.models import ContentType from rest_framework import serializers from . import models from pdc.apps.common....
serializer = ArchiveSerializer(data=data, context={'request': request}) if serializer.is_valid(): archive = serializer.save()
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use system::OS; mod manager; pub mod scoped; // #[macro_use]mod local; // pub use self::local::{LocalKey, LocalKeyState}; /// Cooperatively gives up a timeslice to the OS scheduler. pub fn yield_now() { OS::yield_thread() } /// Blocks unless or until the current ...
/// See the [module documentation][thread] for more detail. ///
<|file_name|>PaymentProcessingViewModel.js<|end_file_name|><|fim▁begin|><|fim▁hole|> 'model': 'PaymentProcessingModel' });<|fim▁end|>
Ext.define('Onlineshopping.onlineshopping.shared.shop.viewmodel.retail.PaymentProcessingViewModel', { 'extend': 'Ext.app.ViewModel', 'alias': 'viewmodel.PaymentProcessingViewModel',
<|file_name|>Test.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2016 Intel Corporation * * 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...
<|file_name|>stream.rs<|end_file_name|><|fim▁begin|>//! The Stream type. //! //! Streams provide a composable way to handle events that's focused on data instead of callbacks. //! You can think of it as a data processing pipeline. Streams do all their work on the sender side, //! so they're "eager". //! //! A stream ch...
impl<T: Clone + Send + 'static> Stream<T> { /// Creates a Signal that holds the last value sent to this stream. #[inline]
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-01-20 03:46 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): ...
<|file_name|>views.py<|end_file_name|><|fim▁begin|>import requests from allauth.socialaccount import app_settings from allauth.socialaccount.providers.jupyterhub.provider import ( JupyterHubProvider, ) from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2L...
request, user_profile
<|file_name|>find_bar.py<|end_file_name|><|fim▁begin|>from kivy.uix.stacklayout import StackLayout from kivy.uix.behaviors import DragBehavior from kivy.uix.modalview import ModalView from kivy.core.window import Window from kivy.uix.button import Button from kivy.uix.label import Label from kivy.lang import Builder fr...
class FindBar(StackLayout, StencilView): def __init__(self, **kwargs): super(FindBar, self).__init__(**kwargs)
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub type __priority_which_t = ::c_uint; s! { pub struct aiocb { pub aio_fildes: ::c_int, pub aio_lio_opcode: ::c_int, pub aio_reqprio: ::c_int, pub aio_buf: *mut ::c_void, pub aio_nbytes: ::size_t, pub aio_sigevent: ::...
pub msg_name: *mut ::c_void, pub msg_namelen: ::socklen_t, pub msg_iov: *mut ::iovec, pub msg_iovlen: ::size_t,
<|file_name|>callee.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...
match arg_expr.node { ast::expr_loop_body(
<|file_name|>exception.py<|end_file_name|><|fim▁begin|>""" sentry.interfaces.exception ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import __all__ = ('Exception',) from django....
def to_string(self, event, is_public=False, **kwargs): if not self.values:
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! Code for calculating hamming distances and bitwise hamming distances <|fim▁hole|>pub mod hamming_distance; pub mod bitwise_hamming_distance;<|fim▁end|>
<|file_name|>neshareclientthreads.cpp<|end_file_name|><|fim▁begin|>/* NEshare is a peer-to-peer file sharing toolkit. Copyright (C) 2001, 2002 Neill Miller This file is part of NEshare. NEshare is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as p...
/*
<|file_name|>SVGClipPainter.cpp<|end_file_name|><|fim▁begin|>// Copyright 2015 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. #include "core/paint/SVGClipPainter.h" #include "core/dom/ElementTraversal.h" #include "core...
<|file_name|>apps.py<|end_file_name|><|fim▁begin|><|fim▁hole|> name = 'traveller'<|fim▁end|>
from django.apps import AppConfig class TravellerConfig(AppConfig):
<|file_name|>util.ts<|end_file_name|><|fim▁begin|>export interface Dictionary<TValue> { [key : string] : TValue; } export function camelCase(s : string) : string { switch (s.length) { case 0: return ''; case 1: return s.toLowerCase(); default: ...
array.forEach(item => d[keyFn(item)] = item); return d;
<|file_name|>string_repalce_by_resub.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- <|fim▁hole|> ''' 如何调整字符串的文本格式 ''' # 将日志文件中的日期格式转变为美国日期格式mm/dd/yyyy # 使用正则表达式模块中的sub函数进行替换字符串 with open("./log.log","r") as f: for line in islice(f,0,None): #print sub("(\d{4})-(\d{2})-(\d{2})",r"\2/\3/\1",line) ...
from re import sub from itertools import islice
<|file_name|>0006_auto_20160410_1530.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-04-10 10:00 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ...
field=models.ForeignKey(default=False, on_delete=django.db.models.deletion.CASCADE, related_name='head_of_dept', to='Profiler.Faculty'),
<|file_name|>imports-blacklist.go<|end_file_name|><|fim▁begin|>package rule import ( "fmt" "github.com/mgechev/revive/lint" ) // ImportsBlacklistRule lints given else constructs. type ImportsBlacklistRule struct { blacklist map[string]bool } // Apply applies the rule to given file. func (r *ImportsBlacklistRule)...
<|file_name|>diff_physics.C<|end_file_name|><|fim▁begin|>// The libMesh Finite Element Library. // Copyright (C) 2002-2020 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as publ...
<|file_name|>0208_create_role_executive.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-11-22 07:11 from __future__ import unicode_literals from django.core.management.sql import emit_post_migrate_signal from django.db import migrations def add_executive_group(apps, schem...
Group = apps.get_model('auth', 'Group')
<|file_name|>updater.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ kintone上のデータを、バックアップを取ってから一括アップデートするスクリプト オプション指定なし→ローカルキャッシュを用いてDry Run -r(--real) →最新のデータを取得してバックアップし、更新 -f(--from-backup) →-rで問題が起きたとき用。バックアップを指定して、そのデータを元に更新する。 """ from cache import get_all, get_app import time import argparse from ...
<|file_name|>views.py<|end_file_name|><|fim▁begin|>import datetime import time import calendar from django.core.urlresolvers import reverse from django.http import Http404 from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.http import Http404 from django.s...
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import math def get_direction(src, target): diff = map(lambda a, b: a - b, target, src) mag = math.sqrt(sum(map(lambda a: a ** 2, diff))) if mag == 0: return [0, 0] return map(lambda a: a / mag, diff) def distance(pos1, pos2): return math.s...