prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>ddl_worker_test.go<|end_file_name|><|fim▁begin|>// Copyright 2015 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICEN...
// Schema ID is wrong. doDDLJobErr(c, -1, 1, model.ActionAddIndex, nil, ctx, d)
<|file_name|>pMidiToFrequency.cpp<|end_file_name|><|fim▁begin|>#include "pMidiToFrequency.h" #include "../pObjectList.hpp" #include "../../dsp/math.hpp" using namespace YSE::PATCHER; #define className pMidiToFrequency CONSTRUCT() { midiValue = 0.f; ADD_IN_0; REG_FLOAT_IN(SetMidi); REG_INT_IN(SetMidiInt);...
}
<|file_name|>cg.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use darling::{FromDeriveInput, FromField, FromVariant}; use proc_...
*camel_case = &camel_case[end_position..]; Some(result)
<|file_name|>route_bsd.go<|end_file_name|><|fim▁begin|>// Copyright 2011 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 darwin dragonfly freebsd netbsd openbsd rumprun package syscall import ( "runtime" "unsafe"...
b = b[any.Msglen:] continue }
<|file_name|>base.py<|end_file_name|><|fim▁begin|>""" Project main settings file. These settings are common to the project if you need to override something do it in local.pt """ from sys import path # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os # PATHS # Path containing the djang...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>"""URL routes for the sample app.""" from django.conf.urls import include, url from django.views.generic import TemplateView<|fim▁hole|> router = DefaultRouter() router.register(r'users', UserViewSet) router.register(r'questions', QuestionViewSet) router.register(r'choi...
from rest_framework.routers import DefaultRouter from .viewsets import ChoiceViewSet, QuestionViewSet, UserViewSet
<|file_name|>http_test.go<|end_file_name|><|fim▁begin|>package agent import ( "bytes" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/http/httptest" "os" "path/filepath" "strconv" "testing" "time" "github.com/hashicorp/consul/consul/structs" "github.com/hashicorp/consul/testutil" ) func makeHTTP...
<|file_name|>issue-3021.rs<|end_file_name|><|fim▁begin|>trait SipHash { fn reset(&self); } fn siphash(k0 : u64) { struct SipState { v0: u64, } impl SipHash for SipState { fn reset(&self) { self.v0 = k0 ^ 0x736f6d6570736575; //~ ERROR can't capture dynamic environment ...
panic!();
<|file_name|>disasm_demangler.py<|end_file_name|><|fim▁begin|># Copyright 2016 MongoDB 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<|fim▁hole|> # Unless required by applicable law or a...
# http://www.apache.org/licenses/LICENSE-2.0
<|file_name|>event.js<|end_file_name|><|fim▁begin|>'use strict'; var mongoose = require('mongoose'), Schema = mongoose.Schema; var Event = new Schema({ name: String, description: String, sport: String, place: { name: String, coords: { longitude: { type: Number }, ...
comment: String, commented_on: Date, by: {type: Schema.ObjectId, ref: 'User'}
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.conf import settings from django.contrib.auth.models import User from django.db import models class QuestionSet(models.Model): ''' Тест. Состоит из нескольких вопросов ''' author = models.ForeignKey(User, on_d...
<|file_name|>login.component.spec.ts<|end_file_name|><|fim▁begin|>/* tslint:disable:no-unused-variable */ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { DebugElement } from '@angular/core';<|fim▁hole|>import { LoginComponent } from './l...
<|file_name|>main_result.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
fn main() -> Result<(), Box<dyn std::error::Error>> { Ok(()) }
<|file_name|>response.py<|end_file_name|><|fim▁begin|>from datetime import datetime import hashlib from extractor import Ways from date import way_date class Helpers: ''' ''' @staticmethod def make_id(website, timestamp): '''<|fim▁hole|> return m.hexdigest() class WayDefault: '''...
''' m=hashlib.md5() m.update(''.join([website, timestamp]).encode())
<|file_name|>jquery.elevatezoom.js<|end_file_name|><|fim▁begin|>vti_encoding:SR|utf8-nl vti_timelastmodified:TW|14 Aug 2014 13:36:46 -0000 vti_extenderversion:SR|12.0.0.0 vti_author:SR|Office-PC\\Rafael vti_modifiedby:SR|Office-PC\\Rafael vti_timecreated:TR|01 Nov 2014 09:10:51 -0000 vti_backlinkinfo:VX| vti_nexttolast...
vti_syncofs_mydatalogger.de\:22/%2fvar/www/vhosts/s16851491.onlinehome-server.info/kaufreund.de:TW|14 Aug 2014 13:36:46 -0000 vti_syncwith_mydatalogger.de\:22/%2fvar/www/vhosts/s16851491.onlinehome-server.info/kaufreund.de:TW|03 Nov 2015 21:10:29 -0000
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3<|fim▁hole|>if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "arsoft.web.ddns.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)<|fim▁end|>
import os import sys
<|file_name|>aes256.hpp<|end_file_name|><|fim▁begin|>/* ANCH Framework: ANother C++ Hack is a C++ framework based on C++11 standard Copyright (C) 2012 Vincent Lachenal This file is part of ANCH Framework. ANCH Framework is free software: you can redistribute it and/or modify it under the terms of the GNU Le...
#include "crypto/padding/pkcs5Padding.hpp" #include "crypto/padding/zeroPadding.hpp" namespace anch {
<|file_name|>test_smbfs.py<|end_file_name|><|fim▁begin|># Copyright 2014 Cloudbase Solutions Srl # # 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/li...
_FAKE_SHARE = '//1.2.3.4/share1'
<|file_name|>observation_fields.js<|end_file_name|><|fim▁begin|>$.fn.observationFieldsForm = function(options) { $(this).each(function() { var that = this $('.observation_field_chooser', this).chooser({ collectionUrl: '/observation_fields.json', resourceUrl: '/observation_fields/{{id}}.json', ...
<|file_name|>cli.ts<|end_file_name|><|fim▁begin|>import * as fs from "fs"; import * as path from "path"; import * as commander from "commander"; import { ConsoleLogger } from "@akashic/akashic-cli-commons"; import { promiseExportHTML } from "./exportHTML"; import { promiseExportAtsumaru } from "./exportAtsumaru"; inte...
cwd: commander["cwd"],
<|file_name|>grid.js<|end_file_name|><|fim▁begin|>(function() { 'use strict'; /* * This feature allows you to specify a grid over a portion or the entire chart area. * * @name grid */ d4.feature('grid', function(name) { var xAxis = d3.svg.axis(); var yAxis = d3.svg.axis(); return { ...
var gridX = d4.appendOnce(grid, 'g.x.grid.' + name); var gridY = d4.appendOnce(grid, 'g.y.grid.' + name);
<|file_name|>ProjectItem.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react'; class ProjectItem extends Component { render() { return ( <<|fim▁hole|> < strong > { this.props.project.title } < /strong> - {this.props.project.category} < / li > ); } } ex...
li className = "Project" >
<|file_name|>upload_latest.rs<|end_file_name|><|fim▁begin|>use crate::{api_client::{self, Client}, common::ui::{Status, UIWriter, UI}, error::{Error, Result}, PRODUCT, VERSION};...
return Err(Error::APIClient(e));
<|file_name|>daemon.go<|end_file_name|><|fim▁begin|>package daemon import ( "fmt" "io" "io/ioutil" "os" "path" "regexp" "runtime" "strings" "sync" "time" "github.com/docker/libcontainer/label" "github.com/docker/docker/archive" "github.com/docker/docker/daemon/execdriver" "github.com/docker/docker/daem...
return nil, fmt.Errorf("Error getting container rootfs %s from driver %s: %s", container.ID, container.daemon.driver, err) }
<|file_name|>add.rs<|end_file_name|><|fim▁begin|>use std::string::{String}; use std::sync::{Arc}; use std::ops::{Mul, Add}; use math::{Vec2}; use node::{Node, Graph}; use tensor::{Tensor}; fn operation<T>(vec: Vec<Tensor<T>>) -> Tensor<T> where T: Copy + Mul<Output=T> + Add<Output=T> { let Vec2(x1, y1) = vec[0].di...
} else {
<|file_name|>match-tag-nullary.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.o...
enum b { B, } fn main() { let x: a = a::A; match x { b::B => { } } }
<|file_name|>skirmishpreparationplayeroptions.hpp<|end_file_name|><|fim▁begin|>#ifndef QRW_SKIRMISHPREPARATIONPLAYEROPTIONS_HPP #define QRW_SKIRMISHPREPARATIONPLAYEROPTIONS_HPP #include <string> #include "gui/ng/window.hpp" namespace namelessgui { class LineInput; } namespace qrw {<|fim▁hole|> SkirmishPreparationPl...
class SkirmishPreparationPlayerOptions : public namelessgui::Window { public:
<|file_name|>element.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::types::*; use dom::bindings::codegen::*; use dom::bi...
generate_traceable!(HTMLObjectElement) generate_cacheable_wrapper!(HTMLOListElement, HTMLOListElementBinding::Wrap)
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// TODO: work with sfackler and rust-openssl to get this here <|fim▁hole|><|fim▁end|>
pub mod probe;
<|file_name|>config.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # codimension - graphics python two-way code editor and analyzer # Copyright (C) 2010-2017 Sergey Satskiy <sergey.satskiy@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Gen...
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<|file_name|>utility_positional.py<|end_file_name|><|fim▁begin|>import numpy as np import cv2 import math # Calculates rotation matrix to euler angles # The result is the same as MATLAB except the order # of the euler angles ( x and z are swapped ). def rot_vec_to_euler(r): # Rotate around x axis by 180 degrees t...
]) for i in range(5, self.model_points.shape[0], 2): self.model_points[i, 0] = -self.model_points[i + 1, 0]
<|file_name|>wire.rs<|end_file_name|><|fim▁begin|>// Copyright lowRISC contributors. // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 // This file was forked from https://github.com/lowRISC/manticore. //! Wire format traits. //! //! This module provide...
<|file_name|>coverage2text.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys from coverage import coverage from coverage.results import Numbers from coverage.summary import SummaryReporter from twisted.python import usage # this is an adaptation of the code behind "coverage report", modified to # disp...
class Options(usage.Options): optParameters = [ ("sortby", "s", "uncovered", "how to sort: uncovered, covered, name"),
<|file_name|>csp_font-src_cross-origin_allowed-manual.py<|end_file_name|><|fim▁begin|>def main(request, response): import simplejson as json f = file('config.json') source = f.read() s = json.JSONDecoder().decode(source) url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1]) _CSP = "fon...
font-family: Canvas; } </style>
<|file_name|>config.py<|end_file_name|><|fim▁begin|>""" config.py """ import os from flask import Flask from peewee import MySQLDatabase, SqliteDatabase #------------------------------------------------------------------------------- # Environment #---------------------------------------------------------------------...
HOST = os.environ.get('TOAST_HOST', None) USER = os.environ.get('TOAST_USER', None) PASSWD = os.environ.get('TOAST_PASSWD', None) LOG_PATH = os.environ.get('TOAST_LOG_PATH', './')
<|file_name|>dynamo-store-doc.js<|end_file_name|><|fim▁begin|>module.exports = function (seneca, util) {<|fim▁hole|> //var Joi = util.Joi }<|fim▁end|>
<|file_name|>test_sympify.py<|end_file_name|><|fim▁begin|>from __future__ import with_statement from sympy import Symbol, exp, Integer, Float, sin, cos, log, Poly, Lambda, \ Function, I, S, sqrt, srepr, Rational, Tuple, Matrix, Interval from sympy.abc import x, y from sympy.core.sympify import sympify, _sympify, Sy...
f1_1c = F1_1c() assert sympify(i5) == 5
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import codecs import os import re import sys from setuptools import setup root_dir = os.path.abspath(os.path.dirname(__file__)) def get_version(package_name): version_re = re.compile(r"^__version__ = [\"']([\w_.-]+...
classifiers=[ "Development Status :: 5 - Production/Stable",
<|file_name|>SpecParser.py<|end_file_name|><|fim▁begin|>from JumpScale import j # from SpecModelactorsGenerator import SpecModelactorsGenerator class Specbase(j.tools.code.classGetBase()): def __init__(self, linenr): self.name = "" self.description = "" self.tags = "" self.comment...
<|file_name|>mod.rs<|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 L...
// specific language governing permissions and limitations // under the License. pub mod maintenance_facility;
<|file_name|>ref_lrn.hpp<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright 2019 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 obtai...
&& utils::everyone_is( data_type, desc()->data_desc.data_type) && attr()->has_default_values()
<|file_name|>rarbg-get.py<|end_file_name|><|fim▁begin|>#!env /usr/bin/python3<|fim▁hole|> import sys import urllib.parse import urllib.request def main(): search = sys.argv[1] url = 'http://rarbg.to/torrents.php?order=seeders&by=DESC&search=' url = url + search print(url) req = urllib.request.Reque...
<|file_name|>trace.java<|end_file_name|><|fim▁begin|>public class trace { public void mnonnullelements(int[] a) { int i = 0; //@ assert i == 0 && \nonnullelements(a); <|fim▁hole|> public void mnotmodified(int i) { //@ assert \not_modified(i); i = 4; //@ a...
return ; }
<|file_name|>imagescale-c.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright © 2012-13 Qtrac Ltd. All rights reserved. # This program or module 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 Foundatio...
<|file_name|>parser.rs<|end_file_name|><|fim▁begin|>use crate::prelude::*; use num_bigint::{BigInt, ToBigInt}; use num_traits::{One, Zero}; use byteorder::{BigEndian, ReadBytesExt}; use encoding::all::ISO_8859_1; use encoding::{DecoderTrap, Encoding}; pub type ParserNext = fn(&mut BertParser) -> Option<Result<BertT...
actual: magic, });
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2015 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/LICENS...
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express # or implied. See the License for the specific language governing permissions and limitations under # the License.
<|file_name|>ImageTextView.java<|end_file_name|><|fim▁begin|>package com.dodola.animview; import android.content.Context; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.os.AsyncTask; import android.text.Html; import android.uti...
@Override protected CharSequence doInBackground(String... params) { Html.ImageGetter imageGetter = new Html.ImageGetter() { @Override
<|file_name|>dsm.js<|end_file_name|><|fim▁begin|>module.exports = { // Scale for HTML Canvas (1=2kx2k, 2=1kx1k, 4=500x500, ...) scaleFactor: 4, <|fim▁hole|><|fim▁end|>
};
<|file_name|>login_details.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ### # (C) Copyright (2012-2017) Hewlett Packard Enterprise Development LP #<|fim▁hole|># of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation th...
# Permission is hereby granted, free of charge, to any person obtaining a copy
<|file_name|>pat-lt-bracket-2.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<|fim▁hole|>// http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://ww...
<|file_name|>const-autoderef.rs<|end_file_name|><|fim▁begin|>// run-pass const A: [u8; 1] = ['h' as u8]; const B: u8 = (&A)[0]; const C: &'static &'static &'static &'static [u8; 1] = & & & &A; const D: u8 = (&C)[0]; pub fn main() {<|fim▁hole|>}<|fim▁end|>
assert_eq!(B, A[0]); assert_eq!(D, A[0]);
<|file_name|>test_blackjack.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Test code for blackjack game. Tests can be run with py.test or nosetests """ from __future__ import print_function from unittest import TestCase from card_games import blackjack from card_games.blackjack import BlackJack print(black...
self.assertEqual(len(mygame.player_hand), 2) # Initial hand for Player self.assertEqual(len(mygame.dealer_hand), 2) # Initial hand for Dealer
<|file_name|>dsytrd2_gpu.cpp<|end_file_name|><|fim▁begin|>/* -- MAGMA (version 2.1.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date August 2016 @author Raffaele Solca @author Stan Tomov @author Mark Gates @gen...
/* Copy superdiagonal elements back into A, and diagonal
<|file_name|>houzz.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty....
'g',
<|file_name|>particleProperties_py.cc<|end_file_name|><|fim▁begin|>#include "particleProperties_py.h" #include "stlContainers_py.h" namespace bp = boost::python; namespace { struct particlePropertiesWrapper : public rpwa::particleProperties, bp::wrapper<rpwa::particleProp...
bp::throw_error_already_set();
<|file_name|>GroupHeader41.go<|end_file_name|><|fim▁begin|>package iso20022 // Set of characteristics shared by all individual transactions included in the message. type GroupHeader41 struct { // Point to point reference, as assigned by the instructing party, and sent to the next party in the chain to unambiguously ...
<|file_name|>sturm_equation.cpp<|end_file_name|><|fim▁begin|>// implementation for sturm_equation.h #include <cmath> #include <algorithm> #include <list> #include <utils/array1d.h> #include <algebra/vector.h> #include <algebra/sparse_matrix.h> #include <numerics/eigenvalues.h> #include <numerics/gauss_data.h> names...
++lambda; } #else
<|file_name|>app.libraries.js<|end_file_name|><|fim▁begin|>import angular from 'angular'; import uiRouter from 'angular-ui-router'; import uiBoostrap from 'angular-ui-bootstrap'; import angularJwt from 'angular-jwt'; let librariesModules = angular.module('app.libraries', [ uiRouter, uiBoostrap,<|fim▁hole|...
angularJwt
<|file_name|>dispatcher.py<|end_file_name|><|fim▁begin|>"""Offers a simple XML-RPC dispatcher for django_xmlrpc Author:: Graham Binns Credit must go to Brendan W. McAdams <brendan.mcadams@thewintergrp.com>, who posted the original SimpleXMLRPCDispatcher to the Django wiki: http://code.djangoproject.com/wiki/XML-R...
* Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
<|file_name|>home.component.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core'; import { Router } from '@angular/router'; import { AuthService } from '../auth/auth.service'; @Component({ selector: 'app-home', templateUrl: './home.component.html', styleUrls: ['./home.component.css'] }) <|fi...
<|file_name|>enum_map.cpp<|end_file_name|><|fim▁begin|>#if BUILD_UNIT_TESTS #include "augs/misc/enum/enum_map.h" #include <Catch/single_include/catch2/catch.hpp> TEST_CASE("EnumMap") { enum class tenum { _0, _1, _2, _3, _4, COUNT }; augs::enum_map<tenum, int> mm; mm[tenum::_0] = 0; mm[tenum::_1] = 1;...
}
<|file_name|>tree.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # tree.py # # (c) D.C.-G. 2014 # # Tree widget for albow # from albow.widget import Widget from albow.menu import Menu from albow.fields import IntField, FloatField, TextFieldWrapped from albow.controls import CheckBox, AttrRef, Label, Button f...
width = self.width data = row_data[i] yield i, x + m, width - d, None, data
<|file_name|>offset.js<|end_file_name|><|fim▁begin|>define([ "./core", "./core/access", "./var/document", "./var/documentElement", "./css/var/rnumnonpx", "./css/curCSS", "./css/addGetHookIf", "./css/support", "./core/init", "./css", "./selector" // contains ], function( jQuery, access, document, documentEle...
<|file_name|>Mesure_test.cpp<|end_file_name|><|fim▁begin|>// //#include "Mesure.h" // <|fim▁hole|>//{ // //} // //void loop() //{ // m = new Mesure(13,20,4,4); // m->addNote(Note_E,4,NOIR); // m->addNote(Note_E,4,NOIR); // m->addNote(Note_E,4,NOIR); // m->addNote(Note_C,4,NOIR); // m->play(); // // m = n...
//Mesure *m; // //void setup()
<|file_name|>ProofPreferencesPanelPluginLoader.java<|end_file_name|><|fim▁begin|>package org.liveontologies.protege.justification.proof.preferences; /*- * #%L * Protege Proof Justification * $Id:$ * $HeadURL:$ * %% * Copyright (C) 2016 - 2017 Live Ontologies Project * %% * Licensed under the Apache License, Ve...
<|file_name|>djb2.rs<|end_file_name|><|fim▁begin|>use redox::hash::Hasher; pub struct Djb2 { state: u64, } impl Djb2 { /// Create new DJB2 hasher pub fn new() -> Self { Djb2 { state: 5381, } } } impl Hasher for Djb2 { fn finish(&self) -> u64 { self.state } ...
}
<|file_name|>ageondate.py<|end_file_name|><|fim▁begin|># # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2007-2008 Brian G. Matherly # Copyright (C) 2009 Douglas S. Blank # # This program is free software; you can redistribute it and/or modify # it...
document.has_data = matches > 0 sdoc.paragraph(_("\n%d matches.\n") % matches) stab.write(sdoc)
<|file_name|>dumpStream.hh<|end_file_name|><|fim▁begin|>//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // // This file is part of Libmoleculizer // // Copyright (C) 2001-2009 The Molecular Sciences Institute. // //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::...
<|file_name|>lexer.js<|end_file_name|><|fim▁begin|>/*! * Jade - Lexer * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ /** * Initialize `Lexer` with the given `str`. * * Options: * * - `colons` allow colons for attr delimiters * * @param {String} str * @param {Object} options * ...
* @api private
<|file_name|>PropertiesDTO.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2013-2014, Arjuna Technologies Limited, Newcastle-upon-Tyne, England. All rights reserved. */ package com.arjuna.databroker.control.comms; import java.io.Serializable; import java.util.Map; public class PropertiesDTO implements Seriali...
<|file_name|>control_flow_grad.py<|end_file_name|><|fim▁begin|># Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www...
if not isinstance(grad, (ops.IndexedSlices, sparse_tensor.SparseTensor)): raise TypeError("Type %s not supported" % type(grad)) grad_ctxt.AddName(grad.values.name)
<|file_name|>testutil.py<|end_file_name|><|fim▁begin|>import unittest import tempfile import os from os.path import join import zipfile from git import * from shutil import rmtree from gitbranchhealth.branchhealth import BranchHealthConfig class GitRepoTest(unittest.TestCase): def setUp(self): self.__mOriginTem...
repo.heads.master.checkout() def __findTestDir(self): # Find the file called 'testrepo.zip', starting at the current dir
<|file_name|>test_cookie.py<|end_file_name|><|fim▁begin|># Simple test suite for Cookie.py from test.test_support import verify, verbose, run_doctest import Cookie import warnings warnings.filterwarnings("ignore",<|fim▁hole|># Currently this only tests SimpleCookie cases = [ ('chips=ahoy; vienna=finger', {'chips...
".* class is insecure.*", DeprecationWarning)
<|file_name|>BrokerConfig.java<|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 ...
this.traceOn = traceOn; } public long getStartAcceptSendRequestTimeStamp() {
<|file_name|>config.py<|end_file_name|><|fim▁begin|>"""Module to help with parsing and generating configuration files.""" import asyncio import logging import os import shutil from types import MappingProxyType # pylint: disable=unused-import from typing import Any, Tuple # NOQA import voluptuous as vol from homeas...
if CONF_TIME_ZONE in config:
<|file_name|>Buginese-code-points.js<|end_file_name|><|fim▁begin|>// All code points in the Buginese block as per Unicode v5.1.0: [ 0x1A00, 0x1A01, 0x1A02, 0x1A03, 0x1A04, 0x1A05, 0x1A06, 0x1A07, 0x1A08, 0x1A09, 0x1A0A, 0x1A0B, 0x1A0C, 0x1A0D, 0x1A0E, 0x1A0F, 0x1A10, 0x1A11, 0x1A12, 0x1A13, 0x1A14,...
0x1A15, 0x1A16,
<|file_name|>attr_wrong_item.rs<|end_file_name|><|fim▁begin|>use juniper::graphql_object; #[graphql_object] enum Character {} <|fim▁hole|><|fim▁end|>
fn main() {}
<|file_name|>client.go<|end_file_name|><|fim▁begin|>// Package logic implements the Azure ARM Logic service API version 2016-06-01. // // REST API for Azure Logic Apps. package logic // Copyright (c) Microsoft and contributors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License");...
// You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0
<|file_name|>gal-file.py<|end_file_name|><|fim▁begin|>import pandas as pd<|fim▁hole|>import os # -*- coding: utf-8 -*- from flutype.data_management.fill_master import Master import numpy as np def print_full(x): pd.set_option('display.max_rows', len(x)) print(x) pd.reset_option('display.max_rows') def ext...
<|file_name|>my_exception.py<|end_file_name|><|fim▁begin|>class NoResultScraped(Exception):<|fim▁hole|> class NotCompleteParse(Exception): pass class CouldNotAuthorize(Exception): pass<|fim▁end|>
pass
<|file_name|>eval.rs<|end_file_name|><|fim▁begin|>use libc::c_int; use crate::object::PyObject; #[cfg_attr(windows, link(name = "pythonXY"))] extern "C" { pub fn PyEval_EvalCode( arg1: *mut PyObject, arg2: *mut PyObject, arg3: *mut PyObject, ) -> *mut PyObject; pub fn PyEval_EvalCo...
argc: c_int, kwds: *const *mut PyObject,
<|file_name|>TokenAction.java<|end_file_name|><|fim▁begin|>package pipe.actions.gui; import pipe.controllers.PetriNetController; import pipe.controllers.PlaceController; import uk.ac.imperial.pipe.models.petrinet.Connectable; import uk.ac.imperial.pipe.models.petrinet.Place; import java.awt.event.MouseEvent; import j...
public TokenAction(String name, String tooltip, int key, int modifiers, PipeApplicationModel applicationModel) {
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # 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...
# latex_font_size = '10pt'
<|file_name|>code.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- '''Created on 2014-8-7 @author: Administrator ''' from sys import path as sys_path if not '..' in sys_path:sys_path.append("..") #用于import上级目录的模块 import web #早起的把一个文件分成多个文件,再把class导入 from login.login import (index,login,loginCheck,In,re...
from download.download import download_app from meeting.meeting import meeting_app
<|file_name|>htmlinputelement.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::activation::Activatable; use dom::attr::{At...
<|file_name|>checkbutton.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # example checkbutton.py import pygtk pygtk.require('2.0') import gtk <|fim▁hole|>class CheckButton: # Our callback. # The data passed to this method is printed to stdout def callback(self, widget, data=None): print "%s...
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # uzmq documentation build configuration file, created by # sphinx-quickstart on Wed Nov 7 00:32:37 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible ...
# add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.'))
<|file_name|>bloomierHasher.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <locale> #include <sstream> #include "hash.h"<|fim▁hole|>using namespace std; namespace bloomier { void BloomierHasher::getNeighborhood(string key, unsigned char result[]) { Hash::getHash(key, hashSeed, m, k, result); //...
#include "bloomierHasher.h"
<|file_name|>tree_sortable.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (5c017c9) from gir-files (71d73f0) // DO NOT EDIT use TreeModel; use ffi; use glib; use glib::object::Downcast; use glib::object::IsA; use glib::signal::connect; use glib::translate::*; use glib_ffi; use std::boxed::Box as Box...
let f: Box_<Box_<Fn(&Self) + 'static>> = Box_::new(Box_::new(f)); connect(self.to_glib_none().0, "sort-column-changed", transmute(sort_column_changed_trampoline::<Self> as usize), Box_::into_raw(f) as *mut _)
<|file_name|>Options.java<|end_file_name|><|fim▁begin|>package edu.stanford.nlp.parser.lexparser; import edu.stanford.nlp.trees.CompositeTreeTransformer; import edu.stanford.nlp.trees.TreebankLanguagePack; import edu.stanford.nlp.trees.TreeTransformer; import edu.stanford.nlp.util.Function; import edu.stanford.nlp.uti...
*/ public boolean smartMutation = false; /**
<|file_name|>Battery20Rounded.js<|end_file_name|><|fim▁begin|>import React from 'react';<|fim▁hole|> <React.Fragment><path fill="none" d="M0 0h24v24H0V0z" /><g><path d="M7 17v3.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V17H7z" /><path fillOpacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V3c0-.55-.45-1-1-1h-...
import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(
<|file_name|>columnWidget.js<|end_file_name|><|fim▁begin|>import React from 'react'; import PropTypes from 'prop-types'; import ColumnChart from './columnChart'; import Tooltip from './../tooltip/tooltip'; import {dateFormats} from './../../utils/displayFormats'; import './columnWidget.css'; const ColumnWidget = (...
displayHighContrast, }) => { return (
<|file_name|>discover.py<|end_file_name|><|fim▁begin|>'''Find valid tags and usernames. The file will contain things like: tag:12345:romance ''' import gzip import re import requests import string import sys import time import random DEFAULT_HEADERS = {'User-Agent': 'ArchiveTeam'} class FetchError(Exception): ...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Defines the trait implemented by all textured values use std::ops::{Add, Mul}; use film::Colorf; pub use self::image::Image; pub use self::animated_image::AnimatedImage; pub mod image; pub mod animated_image; /// scalars or Colors can be computed on some image t...
pub struct ConstantColor {
<|file_name|>9_billion_names_of_god_the_integer.rs<|end_file_name|><|fim▁begin|>// http://rosettacode.org/wiki/9_billion_names_of_God_the_integer extern crate num; use std::cmp::min; use num::{BigUint, Zero, One}; pub struct Solver { // The `cache` is a private implementation detail, // it would be an improv...
fn cumulative(&mut self, idx: usize) -> &[BigUint] { for l in self.cache.len()..idx + 1 { let mut r : Vec<BigUint> = vec![Zero::zero()];
<|file_name|>BenchmarkTest08472.java<|end_file_name|><|fim▁begin|>/** * OWASP Benchmark Project v1.1 * * This file is part of the Open Web Application Security Project (OWASP) * Benchmark Project. For details, please see * <a href="https://www.owasp.org/index.php/Benchmark">https://www.owasp.org/index.php/Benchmark</a>...
<|file_name|>bitcoin_eo.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="eo" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About BitTor</source> ...
<|file_name|>GenomeAFS.py<|end_file_name|><|fim▁begin|>''' Copyleft Feb 11, 2017 Arya Iranmehr, PhD Student, Bafna Lab, UC San Diego, Email: airanmehr@gmail.com ''' import numpy as np; np.set_printoptions(linewidth=200, precision=5, suppress=True) import pandas as pd; pd.options.display.max_rows = 20; pd.options.dis...
import Utils.Estimate as est import Utils.Plots as pplt import Scripts.KyrgysHAPH.Utils as kutl
<|file_name|>network.cpp<|end_file_name|><|fim▁begin|>// // // #include "network.hpp" #include "session.hpp" namespace led_d { network_t::network_t (asio::io_service &io_service, core::port_t::value_t port, queue_t &queue) : m_acceptor (io_service, asio::ip::tcp::...
<|file_name|>VarsHistory.ts<|end_file_name|><|fim▁begin|>// Copyright 2017 David Holmes. All Rights Reserved. // Copyright 2016 Erik Neumann. 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...
// // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software