prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>elements.py<|end_file_name|><|fim▁begin|>import struct from common import * from objects import ObjectAppType from bcddevice import BCDDevice # element types: # X X ???? XX # class format subtype # class: # 1 = Library # 2 = Application # 3 = Device # format: # 0 = Unknown # 1 = Device # 2 = Strin...
0x0E0: (5, 'bootstatuspolicy', enum('DisplayAllFailures', 'IgnoreAllFailures', 'IgnoreShutdownFailures', 'IgnoreBootFailures')), 0x0F0: (5, 'hypervisorlaunchtype', enum('Off', 'Auto')), 0x0F1: (2, 'hypervisorpath'), 0x0F2: (6, 'hypervisordebug'),
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![recursion_limit = "256"] //! This module provides the render environment. //! //! OrbTk has choosen the [tinyskia] crate to handle all 2D rendering //! tasks. Implemented as wrapper functions, it consumes the native //! rendering functions provided from tinyskia. //!...
} impl PartialEq for Box<dyn PipelineTrait> {
<|file_name|>BlendModeScope.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2013-2014 by Kristina Simpson <sweet.kristas@gmail.com> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Per...
static BlendMode res = BlendMode();
<|file_name|>metainfo_by_fieldpath.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache....
"js_validation_rule": {
<|file_name|>exercice1.py<|end_file_name|><|fim▁begin|>#Initialisation from time import sleep from NaoCommunication import * nao=NaoControle(Nao()) # 1 - Decrire le resultat de ce morceau de code # ... for a in range(16): if a%2==0: nao.reglerCouleur(a,a*15,50,50) else : nao.reglerCouleur(a,255...
<|file_name|>pyunit_automl_regression.py<|end_file_name|><|fim▁begin|>from __future__ import print_function from __future__ import print_function import sys, os sys.path.insert(1, os.path.join("..","..","..","..")) import h2o from h2o.automl import H2OAutoML from tests import pyunit_utils as pu from _automl_utils imp...
max_runtime_secs=60,
<|file_name|>removec.js<|end_file_name|><|fim▁begin|>// Sanity test for removing documents with adjacent index keys. SERVER-2008 t = db.jstests_removec; t.drop(); t.ensureIndex({a: 1}); <|fim▁hole|> ret.push(i + j); } return ret; } // Insert some documents with adjacent index keys. for (i = 0; i < 110...
/** @return an array containing a sequence of numbers from i to i + 10. */ function runStartingWith(i) { ret = []; for (j = 0; j < 11; ++j) {
<|file_name|>sessions.module.ts<|end_file_name|><|fim▁begin|>// (C) Copyright 2015 Moodle Pty Ltd. // // 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...
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models imp...
'group_read': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
<|file_name|>private_unused.rs<|end_file_name|><|fim▁begin|>// compile-pass #[deny(warnings)]<|fim▁hole|>trait Bar<T> {} impl Bar<Empty> for () {} fn boo() -> impl Bar<Empty> {} fn main() { boo(); }<|fim▁end|>
enum Empty { }
<|file_name|>0019_sitemode.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import datetime import caching.base class Migration(migrations.Migration): dependencies = [ ('opendebates', '0018_flag_note'), ] op...
('show_question_votes', models.BooleanField(default=True)), ('show_total_votes', models.BooleanField(default=True)),
<|file_name|>md5.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 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/LI...
<|file_name|>_version.py<|end_file_name|><|fim▁begin|># This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) wi...
rendered = pieces["closest-tag"] if pieces["distance"] or pieces["dirty"]: rendered += ".post%d" % pieces["distance"] if pieces["dirty"]:
<|file_name|>parametric_system.py<|end_file_name|><|fim▁begin|>import floq.core.fixed_system as fs import floq.evolution as ev import floq.errors as er import floq.helpers.index as h class ParametricSystemBase(object): """ Base class to specify a physical system that still has open parameters, such as the...
<|file_name|>promise-fs.spec.ts<|end_file_name|><|fim▁begin|>import * as modPath from "path"; import * as modFS from "fs"; import * as modPFS from "../promise-fs"; import * as modLog from "../log"; import * as modUtil from "./helper"; const getFixturePath = modUtil.getFixturePath; const normalizePath = modUtil.normali...
modPFS.getAccessible(paths) .then(existingPaths => {
<|file_name|>fake_tridentbackend.go<|end_file_name|><|fim▁begin|>// Copyright 2021 NetApp, Inc. All Rights Reserved. // Code generated by client-gen. DO NOT EDIT. package fake import ( "context" netappv1 "github.com/netapp/trident/persistent_store/crd/apis/netapp/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" la...
list := &netappv1.TridentBackendList{ListMeta: obj.(*netappv1.TridentBackendList).ListMeta}
<|file_name|>baseUniq.js<|end_file_name|><|fim▁begin|>/** * Lo-Dash 2.4.1 (Custom Build) <http://lodash.com/> * Build: `lodash modularize modern exports="node" -o ./modern/` * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/> * Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE> * Cop...
? !index || seen[seen.length - 1] !== computed : indexOf(seen, computed) < 0 ) { if (callback || isLarge) {
<|file_name|>admin.py<|end_file_name|><|fim▁begin|><|fim▁hole|>.. module:: admin """ from django.contrib import admin from apps.volontulo.models import Offer from apps.volontulo.models import Organization from apps.volontulo.models import UserProfile admin.site.register(Offer) admin.site.register(Organization) admi...
# -*- coding: utf-8 -*- """
<|file_name|>grid.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/. */ //! CSS handling for the computed value of //! [grids](https://d...
if CustomIdent::from_ident((&*ident).into(), &["span"]).is_err() { return Err(StyleParseError::UnspecifiedError.into()) }
<|file_name|>test_run_finemap.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Boocock James <james.boocock@otago.ac.nz> # Author: Boocock James <james.boocock@otago.ac.nz> # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "S...
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so,
<|file_name|>warship.ts<|end_file_name|><|fim▁begin|>/// <reference path="jquery.d.ts" /> /// <reference path='jqueryui.d.ts' /> class Cell { shipIndex: number; hasHit: boolean; element: HTMLElement; constructor (public row: number, public column: number) { this.element = $("<div clas...
<|file_name|>spread-err-sngl-err-obj-unresolvable.js<|end_file_name|><|fim▁begin|>// This file was procedurally generated from the following sources: // - src/spread/sngl-err-obj-unresolvable.case // - src/spread/error/array.template /*--- description: Object Spread operator results in error when using an unresolvable ...
assert.throws(ReferenceError, function() { [{...unresolvableReference}];
<|file_name|>spdiagview_bones.hpp<|end_file_name|><|fim▁begin|>// Copyright (C) 2015 Conrad Sanderson // Copyright (C) 2015 NICTA (www.nicta.com.au) // // 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 o...
template<typename T1> inline void operator= (const SpBase<eT,T1>& x); template<typename T1> inline void operator+=(const SpBase<eT,T1>& x); template<typename T1> inline void operator-=(const SpBase<eT,T1>& x); template<typename T1> inline void operator%=(const SpBase<eT,T1>& x);
<|file_name|>webkit_patch.py<|end_file_name|><|fim▁begin|># Copyright (c) 2010 Google Inc. All rights reserved. # Copyright (c) 2009 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
def handle_global_options(self, options): self.initialize_scm(options.patch_directories) def should_execute_command(self, command):
<|file_name|>crypto_setup_client.go<|end_file_name|><|fim▁begin|>package handshake import ( "bytes" "crypto/rand" "crypto/tls" "encoding/binary" "errors" "fmt" "io" "sync" "time" "github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/quic/gquic-go/internal/crypto" "github.com/Psiphon-Labs/psiphon-tunn...
<|file_name|>CWE23_Relative_Path_Traversal__char_connect_socket_w32CreateFile_66a.cpp<|end_file_name|><|fim▁begin|>/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE23_Relative_Path_Traversal__char_connect_socket_w32CreateFile_66a.cpp Label Definition File: CWE23_Relative_Path_Traversal.label.xml Template File: sourc...
if (replace) { *replace = '\0';
<|file_name|>1021.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- def calc_note(count, value): qnt = 0 if count >= value: qnt = int(count) / value print '%d nota(s) de R$ %d.00' % (qnt, value) return count - qnt * value n = float(raw_input()) print 'NOTAS:' n = calc_note(n, 100) n =...
<|file_name|>ceres_costs_utils_test.hpp<|end_file_name|><|fim▁begin|>/* * Software License Agreement (Apache License) * * Copyright (c) 2014, Southwest Research Institute * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You m...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// The MIT License (MIT) // Copyright (c) 2016 Connor Hilarides // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software // and associated documentation files (the "Software"), to deal in the Software without // restriction, in...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! A 'simple' ARM emulator. //! //! At the moment the emulator only has support for a handful of THUMB-2 instructions /// and no ARM-mode support. use super::*; pub use self::memory_tree::MemoryTree; pub use self::ram::RAM; pub use self::emu::SimpleEmulator; pub use s...
<|file_name|>SingleChoiceFragment.java<|end_file_name|><|fim▁begin|>/* * Copyright 2013 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *<|fim▁hole|> * distributed under the...
* http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
module.exports = require('./lib/knox');
<|file_name|>Initialization.cc<|end_file_name|><|fim▁begin|>/* Copyright (C) 2016, 2017 PISM Authors * * This file is part of PISM. * * PISM is free software; you can redistribute it and/or modify it under the<|fim▁hole|> * version. * * PISM is distributed in the hope that it will be useful, but WITHOUT ANY * WA...
* terms of the GNU General Public License as published by the Free Software * Foundation; either version 3 of the License, or (at your option) any later
<|file_name|>test_setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # system import os import sys dir = os.path.split(os.path.split(os.path.split(os.path.realpath(__file__))[0])[0])[0] sys.path.append(os.path.join(dir, 'scripts')) # testing import mock import unittest from mock import pa...
# # Global variables.
<|file_name|>test_redis_url.py<|end_file_name|><|fim▁begin|>import redis_url import unittest class RedisUrlTestSuite(unittest.TestCase): def test_redis_parse_localhost(self): self.assertEqual( redis_url.parse('redis://localhost:6379/0?cluster=false'), { 'host': 'lo...
)
<|file_name|>2_.py<|end_file_name|><|fim▁begin|>from numpy import * from cmlib import showMatr A = matrix([[1, 2, 0], [0, 2, 2]]) <|fim▁hole|>B = matrix([[3, -1], [-1, 3], [1, 0]]) res = (A * B).T showMatr(array(res))<|fim▁end|>
<|file_name|>DataDriver.py<|end_file_name|><|fim▁begin|>from datetime import datetime import time import json from Commit import Commit; import Constant; import collections from yattag import Doc def generateHTML(commits, projectName, commitData, fileExtensionMap): totalAuthors = len(commitData) generateBestAu...
dateKey = int(commit.date.strftime("%s")) * 1000 filesDiff = commit.filesAdded - commit.filesDeleted; totalFiles = totalFiles + filesDiff
<|file_name|>gfks_helptext.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*- logger.info("Loading 5 objects to table gfks_helptext...") # fields: id, content_type, field, help_text loader.save(create_gfks_helptext(1,contacts_Partner,u'language',u'Die Sprache, in der Dokumente ausgestellt werden sollen.')) loader....
loader.flush_deferred_objects()
<|file_name|>autocomplete_attributes.js<|end_file_name|><|fim▁begin|>(function($) { module("autocomplete: options"); test('setAttributes', function() { var source = $('#autocomplete').autocomplete("option", "source");<|fim▁hole|> var autoFocus = $('#autocomplete').autocomplete("option", "autoFocus"); equals(au...
equals(source.join(','), ['ActionScript','AppleScript','Asp','BASIC','C','C++','Clojure','COBOL','ColdFusion','Erlang','Fortran','Groovy','Haskell','Java','JavaScript','Lisp','Perl','PHP','Python','Ruby','Scala','Scheme'].join(','), 'Array property');
<|file_name|>image.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/. */ //! Generic types for the handling of [images]. //! //! [images...
WebKit,
<|file_name|>test_config.js<|end_file_name|><|fim▁begin|>const fs = require('fs'); const p = require('path'); // walk $PATH to find bin const which = (bin) => { const path = process.env.PATH.split(p.delimiter); let file = ''; path.find((v) => { const testPath = v + p.sep + bin; if (fs.exis...
clamscan: { path: which('clamscan'), // required for testing }, clamdscan: {
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import { AzureFunction, Context } from '@azure/functions' import { performance } from 'perf_hooks' import { ListSchoolsService } from './list-schools-service' import { IFunctionTimer } from '../../azure/functions' const functionName = 'ps-report-1-list-schools' const...
context.log.error(`${functionName}: ERROR: ${error.message}`)
<|file_name|>commands.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from .database import BaseMessage from .records import RecordUpdateMessage, RecordDeleteMessage, RecordCreateMessage from ..exceptions import PyOrientBadMethodCallException from ..constants import COMMAND_OP, FIELD_BOOLEAN, FIELD_BYTE, FIELD_...
pass
<|file_name|>mercurial.py<|end_file_name|><|fim▁begin|>from mercurial import cmdutil _hgignore_content = """\ syntax: glob *~ *.pyc *.pyo *.bak cache/* databases/* sessions/* errors/* """ def commit(): app = request.args[0] path = apath(app, r=request) uio = ui.ui() uio.quiet = True if not os.e...
os.environ['HGUSER'] = 'web2py@localhost' try: r = hg.repository(ui=uio, path=path) except:
<|file_name|>test_pqkmeans.py<|end_file_name|><|fim▁begin|>import unittest import pqkmeans import numpy import collections import pickle class TestPQKMeans(unittest.TestCase): def data_source(self, n: int): for i in range(n): yield [i * 100] * 6 def setUp(self): # Train PQ encoder...
<|file_name|>server.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export * from "./index" export { buildServerApp, ServerAppResolve } from "./buildServerApp"
<|file_name|>0002_notification_queued.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-04 12:05 from __future__ import unicode_literals <|fim▁hole|> class Migration(migrations.Migration): dependencies = [ ('main', '0001_initial'), ] operations = [ ...
from django.db import migrations, models
<|file_name|>partner-alias-selection.js<|end_file_name|><|fim▁begin|>$(function() { /* ------------ 合作伙伴信息 ------------ */ $( "#partner_id" ).combobox( { url : ksa.buildUrl( "/data/combo", "bd-partner-all" ), onSelect : function( record ) { $grid.datagrid( "load", { id :...
<|file_name|>view.py<|end_file_name|><|fim▁begin|>#---------------------------------------------------------------------- # Copyright 2012, 2013 Arndt Droullier, Nive GmbH. All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licens...
except Unauthorized:
<|file_name|>command.rs<|end_file_name|><|fim▁begin|>use std::fmt::{Debug, Formatter, Error}; use std::path::{PathBuf, Path}; use std::process::{Command, Output}; use std::{env, str}; pub struct TestCommand { cwd: PathBuf, args: Vec<String>, env_vars: Vec<(String, String)>, } impl TestCommand { pub fn...
self
<|file_name|>expressroutecircuitauthorizations.go<|end_file_name|><|fim▁begin|>package network // Copyright (c) Microsoft and contributors. 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...
queryParameters := map[string]interface{}{ "api-version": APIVersion, }
<|file_name|>ledger.js<|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 strict' /* brave ledger integration for the brave browse...
var updateLedgerInfo = () => { var info = ledgerInfo._internal.paymentInfo var now = underscore.now()
<|file_name|>v1_group_version_for_discovery.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codeg...
groupVersion specifies the API group and version in the form \"group/version\"
<|file_name|>thread.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 std::borrow::ToOwned; use util::thread::spawn_named; <|fim...
#[test]
<|file_name|>data_migrations.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- from __future__ import unicode_literals import collections from django.db import models from django.utils import six from django.utils.six.moves import zip from yepes.contrib.datamigrations.exceptions import ( UnableToCreateErro...
super(ModelMigration, self).__init__(model, use_base_manager, ignore_missing_foreign_keys) if not fields:
<|file_name|>relays.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import logging from flask import request from flask import render_template from relay import app from relay.decorators import jsonify from relay.decorators import session_required from relay.decorators import sanitize_user from relay.models...
@jsonify @sanitize_user @session_required
<|file_name|>uuid.hpp<|end_file_name|><|fim▁begin|>#ifndef UUIDS_UUID_HPP #define UUIDS_UUID_HPP #include <algorithm> #include <iomanip> #include <iosfwd> #include <cctype> #include <cstring> #include <string> #include <cstdint> #include <iterator> namespace uuids { namespace detail { template <typename T> struct h...
} template <typename InIter, typename Pred> constexpr inline bool static_all_of(InIter first, InIter last, Pred pr)
<|file_name|>log_setup.py<|end_file_name|><|fim▁begin|>import logging class BorgSingleton: _shared_state = {}<|fim▁hole|> self.__dict__ = self._shared_state class LoggerSetup(BorgSingleton): """Logger setup convenience class""" DEFAULT_FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message...
def __init__(self):
<|file_name|>mozambique.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # python-holidays # --------------- # A fast, efficient Python library for generating country, province and state # specific sets of holidays on the fly. It aims to make determining whether a # specific date is a holiday as fast and f...
if year > 1974: self[date(year, 1, 1)] = "Ano novo" e = easter(year)
<|file_name|>template.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ flango.template ~~~~~~~~~~~~~~ template module provide a simple template system that compiles templates to Python code which like django and tornado template modules. Usage ----- Well, you can view the t...
... self.a = a ... self.b = b ...
<|file_name|>pipelines.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html # import codecs # import json # class stokeScrapyPipeline(object): # ...
#MongoDBPipeline class MongoDBPipeline( object ):
<|file_name|>handlers.py<|end_file_name|><|fim▁begin|>import logging from event_consumer.conf import settings from event_consumer.errors import PermanentFailure from event_consumer.handlers import message_handler _logger = logging.getLogger(__name__) class IntegrationTestHandlers(object): """ Basic message...
@staticmethod def py_integration_raise_permanent(body): """
<|file_name|>0005_auto_20160512_0713.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-12 07:13<|fim▁hole|>from django.db import migrations import wagtail.core.fields class Migration(migrations.Migration): dependencies = [ ('home', '0004_auto_20160511_0845'), ...
from __future__ import unicode_literals
<|file_name|>Batchlet.java<|end_file_name|><|fim▁begin|>// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vIBM 2.2.3-11/28/2011 06:21 AM(foreman)- // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will ...
* &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence>
<|file_name|>RuntimeDyldCOFF.cpp<|end_file_name|><|fim▁begin|>//===-- RuntimeDyldCOFF.cpp - Run-time dynamic linker for MC-JIT -*- C++ -*-==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apac...
LLVM_DEBUG({ dbgs() << "Creating entry at " << formatv("{0:x16} + {1:x8} ( {2:x16} )", Sec.getLoadAddress(),
<|file_name|>WebServer.py<|end_file_name|><|fim▁begin|># coding=utf-8 import threading server = None web_server_ip = "0.0.0.0" web_server_port = "8000" web_server_template = "www" def initialize_web_server(config): ''' Setup the web server, retrieving the configuration parameters and starting the web ser...
web_server_port = compositeWebServerAddress[1] else:
<|file_name|>invokespecial.go<|end_file_name|><|fim▁begin|>package references import ( "github.com/zxh0/jvm.go/instructions/base" "github.com/zxh0/jvm.go/rtda" "github.com/zxh0/jvm.go/rtda/heap" ) // Invoke instance method;<|fim▁hole|>type InvokeSpecial struct{ base.Index16Instruction } func (instr *InvokeSpecial...
// special handling for superclass, private, and instance initialization method invocations
<|file_name|>main.js<|end_file_name|><|fim▁begin|>/* ======================================================================== * DOM-based Routing<|fim▁hole|> * * .noConflict() * The routing is enclosed within an anonymous function so that you can * always reference jQuery with $, even when in .noConflict() mode. *...
* Based on http://goo.gl/EUTi53 by Paul Irish * * Only fires on body classes that match. If a body class contains a dash, * replace the dash with an underscore when adding it to the object below.
<|file_name|>operations.py<|end_file_name|><|fim▁begin|>from django.contrib.gis.db.models import GeometryField from django.contrib.gis.db.models.functions import Distance from django.contrib.gis.measure import ( Area as AreaMeasure, Distance as DistanceMeasure, ) from django.db.utils import NotSupportedError from d...
disallowed_aggregates = ()
<|file_name|>util.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ General utilities. """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import collections import sys import logging import multiprocessing # Third-party import numpy as np __all__...
<|file_name|>daily_attendance_plot_presenter.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Time-sheet Analyser: Python library which allows to analyse time-sheets. # Copyright (C) 2017 Carlos Serra Toro. # # This program is free software: you can redistribute it and/or modify # it u...
<|file_name|>xudy.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- <|fim▁hole|> return len(split_str[-1]) if __name__ == '__main__': result = length_of_last_word("hello world") print(result)<|fim▁end|>
def length_of_last_word(str_): split_str = str_.split(" ") if not split_str: return 0
<|file_name|>url.js<|end_file_name|><|fim▁begin|>// Copyright 2008 The Closure Library 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 (parts[ComponentIndex.PATH][0] == '/') {
<|file_name|>test_spiderForPEDAILY.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Copyright (C) 2015, MuChu Hsu Contributed by Muchu Hsu (muchu1983@gmail.com) This file is part of BSD license<|fim▁hole|>import unittest import logging from cameo.spiderForPEDAILY import SpiderForPEDAILY """ 測試 抓取 PEDAILY """...
<https://opensource.org/licenses/BSD-3-Clause> """
<|file_name|>LineFormat.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2001-2020 by RapidMiner and the contributors * * Complete list of developers available at our web site: * * http://rapidminer.com * * This program is free software: you can redistribute it and/or modify it under the terms of ...
l.lineFormatChanged(e);
<|file_name|>compat.py<|end_file_name|><|fim▁begin|>"""Provides compatibility with first-generation host delegation options in ansible-test.""" from __future__ import annotations import argparse import dataclasses import enum import os import types import typing as t from ..constants import ( CONTROLLER_PYTHON_VE...
# These changes are due to ansible-test now maintaining consistency between its own Python and that of controller Python subprocesses. # # 1) The `--python-interpreter` option (if different from sys.executable) now affects controller subprocesses and triggers re-execution of ansible-test.
<|file_name|>uac-srtp-sdes-reinv-dtls.py<|end_file_name|><|fim▁begin|># $Id$<|fim▁hole|> PJSUA = ["--null-audio --max-calls=1 --auto-answer=200 --no-tcp --srtp-secure 0 --use-srtp 2 --srtp-keying=0"] PJSUA_EXPECTS = [[0, "SRTP uses keying method SDES", ""], [0, "SRTP uses keying method DTLS-SRTP", ""] ]<|fim▁end|...
# import inc_const as const
<|file_name|>dircmpdel.py<|end_file_name|><|fim▁begin|>import os import errno def delete_file(file_name, dry=False): if dry: print(' DRY DELETED: {}'.format(file_name)) else: os.remove(file_name) try: dirname = os.path.dirname(file_name) os.rmdir(dirname) ...
<|file_name|>mod.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.apache.org/licens...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls.defaults import * urlpatterns = patterns('', # Examples: # url(r'^$', 'myblog.views.home', name='home'), url(r'^login/$', 'reg.views.loginView'), url(r'^logout/$', 'reg.views.logoutView'),<|fim▁hole|><|fim▁end|>
)
<|file_name|>FEDiffuseLighting.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> * Copyright (C) 2005 Eric Seidel <eric@webkit.org> * Copyright (C) 2013 Google Inc. All rights reserved. * * This lib...
* You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA.
<|file_name|>Dead.java<|end_file_name|><|fim▁begin|>package GlidersGrid; import java.util.Iterator; import repast.simphony.context.Context; import repast.simphony.engine.schedule.ScheduledMethod; import repast.simphony.query.space.grid.MooreQuery; import repast.simphony.space.grid.Grid; import repast.simphony.space.g...
} } }
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ use std::error; use std::fmt::Display; use std::fmt::{self}; use std::io; use std::str; ...
pub fn new<T: Display>(msg: T) -> Self { Error { msg: msg.to_string(), }
<|file_name|>main.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Odoo, an open source suite of business apps<|fim▁hole|># This module copyright (C) 2015 bloopark systems (<http://bloopark.de>). # # This program is free software:...
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from django import forms from django.contrib.auth.models import User from sample.models import (Doctor, Worker, Patient, SpecialtyType, TimeSlot, Case, Comment, CommentGroup, Scan) class searchDoctor(admin.ModelAdmin): lis...
class searchSpeciality(admin.ModelAdmin): search_fields = ['name']
<|file_name|>bitcoin_hu.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="hu" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Mercury</source> <translation>A Mercury-ról</tr...
<|file_name|>joiner.rs<|end_file_name|><|fim▁begin|>use std::os; use std::io::File; //use std::ops::BitXor; fn main() { let args: ~[~str] = os::args(); if args.len() != 3 { println!("Usage: {:s} <intputfile>", args[0]); } else { let fname_a = args[1].clone(); let path_a = Path::new(fname_a.clone()); le...
<|file_name|>Ui_SearchWidget.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file './QScintilla/SearchWidget.ui' # # Created: Tue Nov 18 17:53:58 2014 # by: PyQt5 UI code generator 5.3.2 # # WARNING! All changes made in this file will be lost! from PyQt5 im...
<|file_name|>_subscriptions_operations.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ...
subscription_id=subscription_id, content_type=content_type,
<|file_name|>main.js<|end_file_name|><|fim▁begin|>// get params function getParams() { var params = { initial_amount: parseInt($('#initial_amount').val(), 10) || 0, interest_rate_per_annum: parseFloat($('#interest_rate_per_annum').val()) / 100 || 0, monthly_amount: parseFloat($('#monthly_amount').val()), num_m...
.append($('<td />').text(data.months[idx].remainder.toFixed(2))) .addClass(is_new_year ? 'jan' : '')
<|file_name|>production.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ''' Production Configurations - Use djangosecure - Use Amazon's S3 for storing static files and uploaded media - Use sendgrid to send emails - Use MEMCACHIER on Heroku ''' from configurations import values # See: http://django-storages.re...
# See: https://docs.djangoproject.com/en/dev/ref/settings/#template-dirs TEMPLATE_LOADERS = ( ('django.template.loaders.cached.Loader', ( 'django.template.loaders.filesystem.Loader',
<|file_name|>ActionGraph.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|>std::shared_ptr<ActionGraphInterface> ActionGraphInterface::c_graphImp = nullptr; std::weak_ptr<ActionGraphInterface> ActionGraphInterface::Get() { // if it`s not init, just crash. check(c_graphImp != nullptr); return c_graphImp; } void ActionGr...
#include "Core.h" #include "Async/ActionGraph.h" #include "ActionGraphImplementation.h"
<|file_name|>pshb.py<|end_file_name|><|fim▁begin|># Copyright 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
# limitations under the License. import logging import urllib
<|file_name|>DeleteEventActionRequest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. 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. A copy of the License is l...
<|file_name|>omaha.go<|end_file_name|><|fim▁begin|>// Copyright 2017 CoreOS, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // /...
import ( "github.com/coreos/go-omaha/omaha"
<|file_name|>index.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from flask import Blueprint, render_template from flask.ext.security import current_user mod = Blueprint('documentation', __name__) @mod.route('/documentation') @mod.route('/documentation/index') def doc_index():<|fim▁hole|> return render_t...
<|file_name|>clock.py<|end_file_name|><|fim▁begin|>"""Clock/event scheduler. This is a Pygame implementation of a scheduler inspired by the clock classes in Pyglet. """ import heapq from weakref import ref from functools import total_ordering from types import MethodType __all__ = [ 'Clock', 'schedule', 'schedul...
continue if ev.repeat is not None:
<|file_name|>records.controller.js<|end_file_name|><|fim▁begin|>/** * @package omeka * @subpackage neatline * @copyright 2014 Rector and Board of Visitors, University of Virginia * @license http://www.apache.org/licenses/LICENSE-2.0.html */ Neatline.module('Editor.Exhibit.Records', function(Records) { ...
init: function() { this.router = new Records.Router();
<|file_name|>print_once.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright 2021 Stanford University # # 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....
# distributed under the License 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|>MultiCalendarBase.js<|end_file_name|><|fim▁begin|>/** * @author Matthew Foster * @date December 27th 2007 */ var MultiCalendarBase = Class.create(); Object.extend(Object.extend(MultiCalendarBase.prototype, EventDispatcher.prototype), { buildInterface : function(container){ ...
} catch(e){