prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>physics_context.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>impl PhysicsContext { pub fn new() -> PhysicsContext { PhysicsContext } } unsafe impl Send for PhysicsContext {} unsafe impl Sync for PhysicsContext {}<|fim▁end|>
pub struct PhysicsContext;
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import base64 from datetime import datetime, timedelta import functools import json import os import time import yaml import jinja2 import jmespath from dateutil import parser from dateutil...
env.filters['get_date_time_delta'] = get_date_time_delta
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.conf import settings from django.contrib.auth import logout from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.utils.translation import ugettext_lazy as _ from django.views.generic.base import View, Templat...
<|file_name|>filesystem.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../typings/node/node.d.ts"/> import Data = require('./data'); import Helpers = require('./utils/helpers'); import Map = require('./utils/map'); import Str = require('./utils/string'); import fs = require('fs'); export interface FileSyste...
}
<|file_name|>atttb.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #!coding=utf-8 from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Table,Column,Integer,String,Numeric,MetaData,DateTime,Date from ._base import BaseInit,Base ''' 員工刷卡原始數據表 ''' class ATTTB(BaseInit,Base): __tabl...
TB007=Column(String(10),default='',doc='員工職務編號') TB008=Column(String(30),default='',doc='員工職務名稱') TB009=Column(String(10),default='',doc='卡鍾代號') TB010=Column(String(30),default='',doc='卡鍾名稱')
<|file_name|>lib.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. */ #![allow(non_camel_case_types)] use std::cell::RefCell; use std::path::Path; use ::revlo...
def headsancestors(&self, revs: Vec<u32>) -> PyResult<Vec<u32>> { let revlog = self.index(py).borrow(); Ok(revlog.headsancestors(revs).map_pyerr(py)?) }
<|file_name|>repo.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import absolute_import import os import time import gzip import tempfile import ConfigParser from cStringIO import StringIO from datetime import datetime from ellen.repo import Jagare from ellen.utils import JagareError from vi...
<|file_name|>beehive.ts<|end_file_name|><|fim▁begin|>import {config} from '../config.ts'; import {Util, Location} from './app.ts'; import {Map} from './map.ts'; import {IHiveOptions, Hive} from './hive.ts'; import * as ko from 'knockout'; import * as _ from 'lodash';<|fim▁hole|> steps: number; leaps: number; } expo...
export interface IBeehiveOptions { map: Map; center: Location;
<|file_name|>htmltableelement.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::utils::{DOMString, null_string, E...
} pub fn Width(&self) -> DOMString { null_string
<|file_name|>message.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 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. '''Handling of the <message> element. ''' from __future__ import print_function import re import ...
''' Returns the concatenation of the parent's node first_id and this node's offset if it has one, otherwise just call the superclass' implementation
<|file_name|>ActivityListViewMultiHolder.java<|end_file_name|><|fim▁begin|>package cn.jzvd.demo; import android.content.Context; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; import android.view.Vie...
}
<|file_name|>server.py<|end_file_name|><|fim▁begin|>import tornado.web import tornado.ioloop import os from handlers import * urls = [ (r'/', IndexHandler), (r'/api/(?P<action>[a-zA-Z0-9-_]+)', ApiServiceHandler), (r'/about', AboutHandler), ] settings = { "static_path" : os.path.join(os.path.di...
application.listen(8080, addr) tornado.ioloop.IOLoop.instance().start()
<|file_name|>IRenderingOption.ts<|end_file_name|><|fim▁begin|>import { DownloadOption } from "./DownloadOption"; <|fim▁hole|>}<|fim▁end|>
export interface IRenderingOption { type: DownloadOption; button: JQuery;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>''' Wrap some important functions in sqlite3 so we can instrument them. ''' <|fim▁hole|>from xrayvision.monkeypatch import mark_patched, is_patched _old_connect = sqlite3.connect def patch(module): module<|fim▁end|>
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># Copyright (c) 2010-2013 OpenStack Foundation # # 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...
region 1 -+---- zone 1 -+---- 192.168.101.1 -+---- device id 0 | | |
<|file_name|>tuple_impl.rs<|end_file_name|><|fim▁begin|>//! Some iterator that produces tuples use std::iter::Fuse; // `HomogeneousTuple` is a public facade for `TupleCollect`, allowing // tuple-related methods to be used by clients in generic contexts, while // hiding the implementation details of `TupleCollect`. //...
<|file_name|>bytenet_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # 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....
<|file_name|>0013_auto_20161216_1359.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-16 12:59 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ...
name='next_exercise', field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='next', to='courses.Exercise'), ),
<|file_name|>_auth.py<|end_file_name|><|fim▁begin|><|fim▁hole|># You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR ...
# Copyright 2016 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.
<|file_name|>test_deprecated.py<|end_file_name|><|fim▁begin|># coding: utf-8 import string import pandas as pd import pandas.util.testing as tm import pandas.util._test_decorators as td import pytest from numpy.random import randn import pandas.tools.plotting as plotting from pandas.tests.plotting.common import Te...
def test_plot_params(self): with tm.assert_produces_warning(FutureWarning): pd.plot_params['xaxis.compat'] = True
<|file_name|>pre_install_app.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import networkx as nx import copy from ryu.base import app_manager from ryu.controller import ofp_event from ryu.controller.handler import CONFIG_DISPATCHER, MAIN_DISPATCHER, DEAD_DISPATCHER from ryu.controller.h...
for i in g.nodes(): for j in g.nodes():
<|file_name|>exporter.py<|end_file_name|><|fim▁begin|># Copyright 2017 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.apache.o...
for node in input_graph_def.node: node.device = '' _ = importer.import_graph_def(input_graph_def, name='')
<|file_name|>user.py<|end_file_name|><|fim▁begin|># User info wrapper object import logging class User(object): """ Wrapper object around an entry in users.json. Behaves like a read-only dictionary if asked, but adds some useful logic to decouple the front end from the JSON structure. """ _NAME_KE...
return profile[self._DEFAULT_IMAGE_KEY]
<|file_name|>test_method_caller_py3.py<|end_file_name|><|fim▁begin|>"""MethodCaller provider traversal tests.""" from dependency_injector import providers def test_traverse(): provider1 = providers.Provider() provided = provider1.provided method = provided.method provider = method.call() all_pro...
<|file_name|>ek-instances.directive.js<|end_file_name|><|fim▁begin|>/* Copyright 2016 ElasticBox 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/licen...
<|file_name|>requiem.py<|end_file_name|><|fim▁begin|>from subprocess import check_call, call, Popen, PIPE import os import textwrap import glob os.putenv("DEBIAN_FRONTEND", "noninteractive") ####### ## Plumbing ####### def get_output(cmd, **kwargs): check = kwargs.pop("check", True) kwargs["stdout"] = PIPE ...
return os.path.exists(path) def nuke(*specs):
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup version = 'y.dev0' long_description = '\n\n'.join([ open('README.rst').read(), open('TODO.rst').read(), open('CREDITS.rst').read(), open('CHANGES.rst').read(), ]) install_requires = [ 'pkginfo', 'setuptools', ...
setup(name='timeseries', version=version, description="Package to implement time series and generic operations on time series.",
<|file_name|>weekend.py<|end_file_name|><|fim▁begin|>from datetime import datetime from grazyna.utils import register @register(cmd='weekend') def weekend(bot): """ Answer to timeless question - are we at .weekend, yet? """ current_date = datetime.now()<|fim▁hole|> answer = "Oczywiście %s - jes...
day = current_date.weekday() nick = bot.user.nick if day in (5, 6):
<|file_name|>punchestableview.cpp<|end_file_name|><|fim▁begin|>#include "punchestableview.h" #include <qf/core/log.h> #include <QDrag> #include <QDragEnterEvent> #include <QMimeData> #include <QPainter> #include <QPixmap> PunchesTableView::PunchesTableView(QWidget *parent) : Super(parent) { setDropIndicatorShown(f...
} return false; }
<|file_name|>estr-uniq.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/licen...
// option. This file may not be copied, modified, or distributed
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand class PyTest(TestCommand): def finalize_options(self): super().finalize_options() self.test_args = [] self.test_suite = True ...
# pathlib is in the stdlib since Python 3.4 requires.append('pathlib >= 1.0.1, < 2.0')
<|file_name|>VAB_massdownload.py<|end_file_name|><|fim▁begin|>import urllib2 import urllib import os, sys from bs4 import * argv = sys.argv[1:] begin = int(argv[0]) count = int(argv[1]) for i in range(begin, begin+count): try: url = 'http://danbooru.donmai.us/posts/' + str(i) request = urllib2.Req...
<|file_name|>restapi.go<|end_file_name|><|fim▁begin|>// Discordgo - Discord bindings for Go // Available at https://github.com/bwmarrin/discordgo // Copyright 2015-2016 Bruce Marriner <bruce@sqls.net>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICEN...
temp := struct { Token string `json:"token"` }{}
<|file_name|>StandardsSubscriptionRequest.cpp<|end_file_name|><|fim▁begin|>/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/securityhub/model/StandardsSubscriptionRequest.h> #include <aws/core/utils/json/JsonSerializer.h> #include <ut...
if(jsonValue.ValueExists("StandardsInput")) {
<|file_name|>customoperation_2.go<|end_file_name|><|fim▁begin|>//This file is generated by btsgen. DO NOT EDIT. //operation sample data for OperationTypeCustom package samples func init() { sampleDataCustomOperation[2] = `{ "data": "466f6f626172",<|fim▁hole|> "asset_id": "1.3.0" }, "id": 16, "payer": "1....
"fee": { "amount": 164678,
<|file_name|>DfIdentityException.java<|end_file_name|><|fim▁begin|>/* $Id$ */ /** * 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 fil...
* 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|>h17d_raw.cpp<|end_file_name|><|fim▁begin|>#include "h17disk.h" #include <stdio.h> static int usage(char *progName) { fprintf(stderr,"Usage: %s old_h17disk_file new_h17disk_file\n",progName); return 1; } int main(int argc, char *argv[]) { H17Disk *image = new(H17Disk); if (argc < 2 || argc > ...
} return 0;
<|file_name|>nibblegen.py<|end_file_name|><|fim▁begin|>''' Nibblegen: A script to convert LaTex text to html usable in Nibbleblog Forked from the latex2wp project (the licenceing for which is below). Copyright (C) 2014 Theodore Jones This program is free software: you can redistribute it and/or modify it unde...
m = Lrest[0]
<|file_name|>admin-date-preview.js<|end_file_name|><|fim▁begin|>/** * Provides live preview facilities for the event date format fields, akin * to (and using the same ajax mechanism as) the date format preview in WP's * general settings screen. */ jQuery( document ).ready( function( $ ) { // Whenever the input fie...
} );
<|file_name|>user.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/ag...
hierarchies = ProjectHierarchy.objects.select_related('root_project')\
<|file_name|>mpi_helper.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import time <|fim▁hole|>from python_compat import range comm = MPI.COMM_WORLD def r_print(*args): """ print message on the root node (rank 0) :param args: :return: """ if comm.rank == 0: pri...
import numpy as np from mpi4py import MPI
<|file_name|>DriverMethods.py<|end_file_name|><|fim▁begin|>from PerfectMatchingData import * from Face import * from Vertex import * from Graph import * from VertexList import * from Output import * from KekuleanMethods import * from Checkers import * from RequiredEdgeMethods import * from Tkinter import * from AppInfo...
if nelsonThm != perfectMatchingThm:
<|file_name|>lint-shorthand-field.rs<|end_file_name|><|fim▁begin|>// Copyright 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.apach...
match (Foo { x: 1, y: 1 }) { Foo { x: x, ..} => {}, _ => {}, }
<|file_name|>Minimap-binding.js<|end_file_name|><|fim▁begin|>LeafletWidget.methods.addMiniMap = function(tilesURL, tilesProvider, position, width, height, collapsedWidth, collapsedHeight , zoomLevelOffset, zoomLevelFixed, centerFixed, zoomAnimation , toggleDisplay, autoToggleDisplay, minimized, aimingRectOption...
(function() { if(this.minimap) { this.minimap.removeFrom( this );
<|file_name|>factory.py<|end_file_name|><|fim▁begin|>"""Session class factory methods."""<|fim▁hole|> import logging from cachecontrol import CacheControlAdapter from cachecontrol.cache import DictCache log = logging.getLogger(__name__) log.addHandler(logging.NullHandler()) def add_cache_control(session, cache_cont...
from __future__ import unicode_literals
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main<|fim▁hole|>import ( "log" "net/http" ) func droneServer(w http.ResponseWriter, req *http.Request) { w.Write([]byte("Built by Drone in Kubernetes!")) } func main() { http.HandleFunc("/", droneServer) err := http.ListenAndServe(":8080"...
<|file_name|>_version.py<|end_file_name|><|fim▁begin|>#! -*- coding: utf-8 -*- """ Retrieval of version number 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 se...
"full": keywords["full"].strip()} def version_from_parentdir(parentdir_prefix, root, verbose=False):
<|file_name|>pilotTools.py<|end_file_name|><|fim▁begin|>######################################################################## # $Id$ ######################################################################## """ A set of common tools to be used in pilot commands """ import sys import time import os import pickle imp...
#Huge success! else:
<|file_name|>QueryEditor.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react'; import * as t from '../types'; import {logger} from '../utils/log'; import {TextEditor} from './TextEditor'; const log = logger('QueryEditor', {count: ['render']}); export interface Props extends React.ClassAttributes<any> { ...
<|file_name|>pymem.rs<|end_file_name|><|fim▁begin|>use libc::{c_void, size_t}; #[cfg_attr(windows, link(name = "pythonXY"))]<|fim▁hole|> pub fn PyMem_Realloc(p: *mut c_void, n: size_t) -> *mut c_void; pub fn PyMem_Free(p: *mut c_void); }<|fim▁end|>
extern "C" { pub fn PyMem_Malloc(n: size_t) -> *mut c_void;
<|file_name|>batch.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2014 Couchbase, 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....
// 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|>application.js<|end_file_name|><|fim▁begin|>// animating the scroll effect $('.screenshots').on('click', function(e){<|fim▁hole|><|fim▁end|>
e.preventDefault(); $("html, body").animate({ scrollTop: "950px", duration: 500 }); });
<|file_name|>TimeTextBox.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2004-2008, The Dojo Foundation All Rights Reserved. Licensed under the Academic Free License version 2.1 or above OR the<|fim▁hole|> modified BSD license. For more information on Dojo licensing, see: http://dojotoolkit.org/book/dojo-book-0...
<|file_name|>General.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2005-2017 Team Kodi * http://kodi.tv * * This Program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version ...
char* Interface_General::get_temp_path(void* kodiBase) {
<|file_name|>BatchFile.cpp<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------------------------* * Copyright (C) 2012 Daniel Bolaños - www.bltek.com - Boulder Language Technologies * * ...
++iLine; }
<|file_name|>RandomUtilTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2018. * J. Melzer */ package com.jmelzer.jitty.utl; import org.junit.Test; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; /** * Created by J. Melzer on 27.03.2018. */ public class RandomUtil...
public void randomIntFromInterval() {
<|file_name|>RequestHelper.java<|end_file_name|><|fim▁begin|>/* * nassh-relay - Relay Server for tunneling ssh through a http endpoint * * Website: https://github.com/zyclonite/nassh-relay * * Copyright 2014-2020 zyclonite networx * http://zyclonite.net * Developer: Lukas Prettenthaler...
} else { return request.host(); } }
<|file_name|>create.js<|end_file_name|><|fim▁begin|>var middleware = require('../../middleware') ; function handler (req, res, next) { var profile = { }; res.send(200, res.profile); next( ); return; } var endpoint = { path: '/users/:user/create' , method: 'get'<|fim▁hole|> , handler: handler }; module....
<|file_name|>fetcher.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015-2019 Jack Morton <jhm@jemscout.com> # # 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, including ...
if value < C.MIN_SEASON or value > C.MAX_SEASON: raise ValueError("Only seasons starting from " + \
<|file_name|>HTMLTableCaptionElement.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 1997 Martin Jones (mjones@kde.org) * (C) 1997 Torben Weis (weis@kde.org) * (C) 1998 Waldo Bastian (bastian@kde.org) * (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivi...
} }
<|file_name|>JustcoinBasePollingService.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2012 - 2014 Xeiam LLC http://xeiam.com * * 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 wit...
return AuthUtils.getBasicAuth(exchangeSpecification.getUserName(), exchangeSpecification.getPassword()); } }
<|file_name|>errors.rs<|end_file_name|><|fim▁begin|>use std::fmt; use std::error::Error; /// Error type returned by _try methods #[derive(Debug,PartialEq)] pub struct PatternError(pub String); impl fmt::Display for PatternError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f,"{}",self.0) } } im...
&self.0 } }
<|file_name|>celleditable.rs<|end_file_name|><|fim▁begin|>// This file is part of rgtk. // // rgtk is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your optio...
}
<|file_name|>collector_region_info.cpp<|end_file_name|><|fim▁begin|>#include "generator/regions/collector_region_info.hpp" #include "generator/feature_builder.hpp" #include "generator/osm_element.hpp" #include "coding/file_writer.hpp" #include "base/assert.hpp" #include "base/logging.hpp" #include "base/macros.hpp" ...
} char const * GetLabel(PlaceLevel level)
<|file_name|>test_medium.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- # vim: ts=4 sw=4 expandtab ai """Test class for Medium CLI""" from ddt import ddt from fauxfactory import gen_string, gen_alphanumeric from robottelo.cli.factory import CLIFactoryError from robottelo.test import CLITestCase from robott...
'id': medium['id'], 'operatingsystem-id': os['id'],
<|file_name|>RGBToHSB.js<|end_file_name|><|fim▁begin|>//This file is automatically rebuilt by the Cesium build process. /*global define*/ define(function() { 'use strict'; return "/**\n\ * Converts an RGB color to HSB (hue, saturation, brightness)\n\ * HSB <-> RGB conversion with minimal branching: {@link htt...
<|file_name|>test_clean_prime_step.py<|end_file_name|><|fim▁begin|># -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016-2018 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published b...
# GNU General Public License for more details. # # You should have received a copy of the GNU General Public License
<|file_name|>InsectNameUserAgentRequestFilter.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2017 Jonas Zeiger <jonas.zeiger@talpidae.net> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Found...
@Provider @Slf4j public class InsectNameUserAgentRequestFilter implements ClientRequestFilter
<|file_name|>multiplexed.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 ...
} }
<|file_name|>models.py<|end_file_name|><|fim▁begin|>import logging from django.db.models import DateTimeField, Model, Manager from django.db.models.query import QuerySet from django.db.models.fields.related import \ OneToOneField, ManyToManyField, ManyToManyRel from django.utils.translation import ugettext_lazy as...
""" _unset_related_objects_relations(self)
<|file_name|>wallet_library.rs<|end_file_name|><|fim▁begin|>// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! The following document is a minimalist version of Diem Wallet. Note that this Wallet does //! not promote security as the mnemonic is stored in unencrypted form. In future ...
return Err(WalletError::DiemWalletGeneric(
<|file_name|>core.rs<|end_file_name|><|fim▁begin|>use std::ffi::OsString; use std::fs; use std::fs::Permissions; use std::io; use std::io::Stderr; use std::io::Stdin; use std::io::Stdout; use std::io::Write; use std::os::unix::fs::PermissionsExt; use std::path::PathBuf; use structopt::StructOpt; use super::Error; use s...
writeln!(self.stdout, r#""{}": mode {}."#, path.display(), msg)?;
<|file_name|>types.rs<|end_file_name|><|fim▁begin|>//! Implementations of `ProtobufType` for all types. #![doc(hidden)] use std::marker; #[cfg(feature = "bytes")] use ::bytes::Bytes; #[cfg(feature = "bytes")] use crate::chars::Chars; use crate::coded_input_stream::CodedInputStream; use crate::coded_output_stream::C...
impl ProtobufType for ProtobufTypeFixed32 { type ProtobufValue = u32;
<|file_name|>test_types.py<|end_file_name|><|fim▁begin|># Python test set -- part 6, built-in types from test_support import * print '6. Built-in types' print '6.1 Truth value testing' if None: raise TestFailed, 'None is true instead of false' if 0: raise TestFailed, '0 is true instead of false' if 0L: raise TestFai...
if min([1,2]) != 1 or max([1,2]) != 2: raise TestFailed, 'min/max list' if 0 in [0,1,2] and 1 in [0,1,2] and 2 in [0,1,2] and 3 not in [0,1,2]: pass
<|file_name|>add_video.py<|end_file_name|><|fim▁begin|># encoding: utf-8 from django.core.management.base import NoArgsCommand from optparse import make_option from video.management.commands.sub_commands.AddVideo import AddVideo class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( ma...
help="list supported video link types and formats"),
<|file_name|>webpack.dev.config.js<|end_file_name|><|fim▁begin|>const path = require('path'); const webpack = require('webpack'); const webpackMerge = require('webpack-merge'); const commonConfig = require('./webpack.common.config.js'); <|fim▁hole|> devtool: 'cheap-module-source-map', // plugins: [ ...
module.exports = function () { return webpackMerge(commonConfig, { watch: true,
<|file_name|>sct_get_centerline_from_labels.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import commands, sys # Get path of the toolbox status, path_sct = commands.getstatusoutput('echo $SCT_DIR') # Append path that contains scripts, to be able to load modules sys.path.append(path_sct + '/scripts') from m...
file_temp = load(list_file[i])
<|file_name|>bool.go<|end_file_name|><|fim▁begin|>package functools //All returns false if any predicate is false. All() is True. func All(bools ...bool) bool { for _, b := range bools { if !b { return false } } return true } //Any returns true if any predicate is true. Any() is False. func Any(bools ...boo...
} return true }
<|file_name|>mem.go<|end_file_name|><|fim▁begin|>/* * MinIO Cloud Storage, (C) 2019 MinIO, 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/L...
import ( "runtime"
<|file_name|>cloudresourcemanager_v3_generated_folders_delete_folder_async.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of...
client = resourcemanager_v3.FoldersAsyncClient() # Initialize request argument(s) request = resourcemanager_v3.DeleteFolderRequest(
<|file_name|>rack.js<|end_file_name|><|fim▁begin|>var hat = require('../'); var assert = require('assert'); exports.rack = function () { var rack = hat.rack(4); var seen = {}; for (var i = 0; i < 8; i++) { var id = rack(); assert.ok(!seen[id], 'seen this id'); seen[id] = true; ...
<|file_name|>defs.py<|end_file_name|><|fim▁begin|>""" x86 definitions. Commonly used definitions. """ from __future__ import absolute_import from cdsl.isa import TargetISA, CPUMode import base.instructions from . import instructions as x86 from base.immediates import floatcc ISA = TargetISA('x86', [base.instructions....
floatcc.ult, floatcc.ule]
<|file_name|>layer_artist.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, division, print_function import numpy as np from matplotlib.colors import Normalize from matplotlib.collections import LineCollection from mpl_scatter_density import ScatterDensityArtist from astropy.visualization impo...
self.scatter_artist.set_offsets(np.zeros((0, 2))) self.density_artist.set_xy([], [])
<|file_name|>mock_test.go<|end_file_name|><|fim▁begin|>// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 /...
// responses to return if err == nil
<|file_name|>main.cc<|end_file_name|><|fim▁begin|>#include "app.h" <|fim▁hole|>int main(int argc, char *argv[]) { return App{}.run(argc, argv); }<|fim▁end|>
<|file_name|>cannabisdarkcoin_bs.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="bs" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About cannabisdarkcoin</source> <translation...
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source> <translation type="unfinished"/> </message>
<|file_name|>messages_spec.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 */ import {findEndOfBlock, parseMessage, parseMetadata, split...
<|file_name|>html.js<|end_file_name|><|fim▁begin|>if(typeof define !== 'function') var define = require('amdefine')(module); define(["require","deep/deep", "./ajax"],function (require, deep, Ajax) { deep.store.jqueryajax = deep.store.jqueryajax || {}; deep.store.jqueryajax.HTML = deep.compose.Classes(Ajax, { head...
deep.store.jqueryajax.HTML.createDefault = function(){ new deep.store.jqueryajax.HTML("html"); }; return deep.store.jqueryajax.HTML;
<|file_name|>AvailabilityNodes.py<|end_file_name|><|fim▁begin|>from Child import Child from Node import Node # noqa: I201 AVAILABILITY_NODES = [ # availability-spec-list -> availability-entry availability-spec-list? Node('AvailabilitySpecList', kind='SyntaxCollection', element='AvailabilityArgument')...
''',
<|file_name|>checks.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 The Kubernetes Authors. 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 ...
} type SystemVerificationCheck struct{}
<|file_name|>searchControllerSpec.js<|end_file_name|><|fim▁begin|>'use strict'; describe('test search controller', function() { beforeEach(module('mapTweetInfoApp'));<|fim▁hole|> beforeEach(module('latLngServices')); describe('searchCtrl', function(){ var scope, ctrl, $httpBackend, $browser, $location; ...
beforeEach(module('twitterSearchServices'));
<|file_name|>level.ts<|end_file_name|><|fim▁begin|>class Level { private game: Phaser.Game; private myInput: Input; public player: Player; private data: LevelData; private sprites: Phaser.Sprite[]; private orderedFadingRenderGroup: Phaser.Group; private floorbodies: Phaser.Group; privat...
<|file_name|>bson_test.go<|end_file_name|><|fim▁begin|>// Copyright 2012, Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package bson import ( "bytes" "testing" "time" "github.com/youtube/vitess/go/bytes2" ) func TestVarie...
Float64: float64(64), String: "string", Bool: true,
<|file_name|>buildings.py<|end_file_name|><|fim▁begin|>import blinker from concurrency.fields import IntegerVersionField from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_save from django.dispatch.dispatcher import receiver from game.apps.core.model...
level = models.IntegerField(default=1) data = JSONField(default={}) planet = models.ForeignKey(Planet, related_name="buildings")
<|file_name|>ping.go<|end_file_name|><|fim▁begin|>// SPDX-License-Identifier: Apache-2.0 // Copyright 2017 Authors of Cilium package cmd import ( "fmt" "github.com/spf13/cobra" ) // pingCmd represents the ping command var pingCmd = &cobra.Command{ Use: "ping", Short: "Check whether the cilium-health API is up...
if err != nil {
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>SECRET_KEY = 'spam' DEBUG = True TEMPLATE_DEBUG = DEBUG ROOT_URLCONF = 'tests.urls' INSTALLED_APPS = ['tests'] DATABASES = {'default': {'NAME': 'db.sqlite', 'ENGINE': 'django.db.backends.sqlite3'}} <|fim▁hole|># Django < 1.8 TEMPLATE_CONTEXT...
<|file_name|>unknown_payment_method.py<|end_file_name|><|fim▁begin|>import braintree from braintree.resource import Resource class UnknownPaymentMethod(Resource):<|fim▁hole|> def image_url(self): return "https://assets.braintreegateway.com/payment_method_logo/unknown.png"<|fim▁end|>
<|file_name|>testjsbeautifier.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import re import unittest import jsbeautifier class TestJSBeautifier(unittest.TestCase): def test_unescape(self): # Test cases contributed by <chrisjshull on GitHub.com> test_fragment = self...
' new Deferred().then(lang.hitch(this, function() {\n' + ' this.salary * 0.25;\n' +
<|file_name|>bootstrap.js<|end_file_name|><|fim▁begin|>/*! * Bootstrap v3.3.5 (http://getbootstrap.com) * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ /*! * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=8a41afce...
var data = $this.data('bs.carousel')
<|file_name|>bewerber.service.ts<|end_file_name|><|fim▁begin|>import {Injectable} from '@angular/core'; import {db, model} from 'baqend'; /** * Dieser Service stellt den Bewerber zum eingeloggten User bereit (z.B. für Bewerber-Profil) */<|fim▁hole|> public getBewerber(): Promise<model.Bewerber> { return d...
@Injectable() export class BewerberService {