prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>// main.rs use std::error::Error; mod server; #[tokio::main]<|fim▁hole|><|fim▁end|>
async fn main() -> Result<(), Box<dyn Error>> { server::serve().await?; Ok(()) }
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # BayesPy documentation build configuration file, created by # sphinx-quickstart on Mon Aug 27 12:22:11 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values...
#html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True
<|file_name|>variable.py<|end_file_name|><|fim▁begin|>import collections import ctypes import hashlib import os import platform import random import re import string import sys import traceback from couchpotato.core.helpers.encoding import simplifyString, toSafeString, ss, sp from couchpotato.core.logger import CPLog ...
s = os.statvfs(folder)
<|file_name|>categoryParser.js<|end_file_name|><|fim▁begin|>function parseCategory(aCategory, aFunction) { if(document.location.host == '' || document.location.host == 'localhost' ) var url = 'test.html'; else var url = categoryGetURLPrivate(aCategory); $.ajax({ type: "GET", url: url, dataType:'h...
aData.editors = []; aData.moz = ''; var tmp = 0;
<|file_name|>Ul.java<|end_file_name|><|fim▁begin|>package pl.idedyk.japanese.dictionary.web.html; import java.util.List; public class Ul extends HtmlElementCommon { public Ul() { super(); } public Ul(String clazz) { super(clazz); } public Ul(String clazz, String style) { super(clazz, style); } <...
@Override protected String getTagName() { return "ul";
<|file_name|>default.py<|end_file_name|><|fim▁begin|>from django.conf import settings from django.test.client import Client from .base import BaseRenderer from django_perseus.exceptions import RendererException import logging import mimetypes import os<|fim▁hole|>logger = logging.getLogger('perseus') class DefaultR...
<|file_name|>parser.js<|end_file_name|><|fim▁begin|>"use strict"; var types = require('./types'); var Tree = require('./tree'); var Rule = require('./rule'); var Principle = require('./principle'); var Lexicon = require('./lexicon'); var Nothing = types.Nothing; var eq = types.eq; var normalize = types.normalize; fu...
p.n++; }; function parse ( p, sentence ) {
<|file_name|>image_ops.js<|end_file_name|><|fim▁begin|>"use strict"; /** * @license * Copyright 2018 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 * * ...
}; var res = engine_1.ENGINE.runKernelFunc(forward, { x: batchImages }, backward, 'ResizeBilinear', { alignCorners: alignCorners, newHeight: newHeight, newWidth: newWidth }); if (reshapedTo4D) {
<|file_name|>core.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # core.py # aoneill - 04/10/17 import sys import random import time import pauschpharos as PF import lumiversepython as L SEQ_LIM = 200 def memoize(ignore = None): if(ignore is None): ignore = set() def inner(func): ...
def fireplace(rig): # Warm up cache
<|file_name|>_setup_util.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following condi...
lines += find_env_hooks(environ, CMAKE_PREFIX_PATH) print('\n'.join(lines))
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># based on https://github.com/pypa/sampleproject/blob/master/setup.py # see http://packaging.python.org/en/latest/tutorial.html#creating-your-own-project from setuptools import setup, find_packages from setuptools.command.install import install as stdinstall import...
author_email='prechelt@inf.fu-berlin.de',
<|file_name|>0002_add_error_description_field.py<|end_file_name|><|fim▁begin|># Generated by Django 2.2.12 on 2020-04-29 05:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('edxval', '0001_squashed_0016_add_transcript_credentials_model'), ] <|fim▁h...
operations = [ migrations.AddField( model_name='video',
<|file_name|>promiseIdentityWithAny2.js<|end_file_name|><|fim▁begin|>//// [promiseIdentityWithAny2.ts] interface IPromise<T, V> { then<U, W>(callback: (x: T) => IPromise<U, W>): IPromise<U, W>; } interface Promise<T, V> { then(callback: (x: T) => Promise<any, any>): Promise<any, any>; } // Error because type p...
// Error because type parameter arity doesn't match var x; var x; // Error because string and any don't match
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.conf import settings from django.contrib.auth.models import User from django.contrib.postgres.search import SearchVector, SearchQuery, SearchRank from django.core.urlresolvers import reverse from django.db import models from github import UnknownObjectExce...
g = get_github(user) grepo = g.get_repo(self.full_name) guser = g.get_user(user.username)
<|file_name|>unique.js<|end_file_name|><|fim▁begin|>/* Copyright Ben Trask and other contributors. All rights reserved. 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, includin...
IN THE SOFTWARE. */ module.exports = unique; function unique(array) {
<|file_name|>options.js<|end_file_name|><|fim▁begin|>require('./options-styles'); var CodeMirror = require('codemirror'); require('codemirror/addon/fold/foldcode'); require('codemirror/addon/fold/foldgutter'); require('codemirror/addon/fold/brace-fold'); require('codemirror/mode/javascript/javascript'); require('codemi...
document.addEventListener("DOMContentLoaded", onLoaded, false);
<|file_name|>kendo.culture.ur-PK.js<|end_file_name|><|fim▁begin|>(function( window, undefined ) { kendo.cultures["ur-PK"] = { name: "ur-PK", numberFormat: { pattern: ["-n"], decimals: 2, ",": ",", ".": ".", groupSize: [3], perc...
symbol: "%" }, currency: {
<|file_name|>scheduledprogram.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016 Sebastian Kanis # This file is part of pi-led-control. # pi-led-control 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, eithe...
def run(self): now = datetime.datetime.now() secondsInCurrentDay = now.hour * 3600 + now.minute * 60 + now.second
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>import re from django import forms from django.core.urlresolvers import reverse from django.contrib.formtools.wizard import FormWizard from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.utils.translation import uge...
alias = self.cleaned_data["alias"].strip() if re.match("^([\w\d_]+)$", alias) is None:
<|file_name|>xcrate-address-insignificant.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 // htt...
pub fn main() { assert_eq!(foo::foo::<f64>(), foo::bar()); }
<|file_name|>SCMMaterialSource.java<|end_file_name|><|fim▁begin|>/* * Copyright 2022 ThoughtWorks, 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/li...
@Autowired public SCMMaterialSource(GoConfigService goConfigService, SystemEnvironment systemEnvironment,
<|file_name|>builders.rs<|end_file_name|><|fim▁begin|>use std::fmt; use std::rc::Rc; use quire::validate as V; use serde::de::{self, Deserializer, Deserialize, EnumAccess, VariantAccess, Visitor}; use serde::ser::{Serializer, Serialize}; use crate::build_step::{Step, BuildStep}; use crate::builder::commands as cmd; ...
pip::Py2Install, pip::Py2Requirements, pip::Py3Install,
<|file_name|>gmock_main.cc<|end_file_name|><|fim▁begin|>// Copyright 2008, Google Inc.<|fim▁hole|>// Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyr...
// All rights reserved. //
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! [Experimental] Generic programming with SIMD #![cfg_attr(test, feature(test))] #![cfg_attr(test, plugin(quickcheck_macros))] #![deny(missing_docs)] #![deny(warnings)] #![feature(core)] #![feature(plugin)] #![feature(simd)] <|fim▁hole|> use traits::Simd; #[cfg(test)...
#[cfg(test)] extern crate test as stdtest; #[cfg(test)] extern crate approx; #[cfg(test)] extern crate quickcheck; #[cfg(test)] extern crate rand;
<|file_name|>form_codec_test.go<|end_file_name|><|fim▁begin|>package codec import ( "net/url" "testing" ) func TestForm(t *testing.T) { var ( data = "a=aaa&b=2&c=ccc1&c=ccc2&d=4&d=44" c = new(FormCodec) ) var v1 url.Values err := c.Unmarshal([]byte(data), &v1) if err != nil { t.Fatal(err) } t.Logf(...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
<|file_name|>filebuf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- r""" # .---. .----------- # / \ __ / ------ # / / \( )/ ----- (`-') _ _(`-') <-. (`-')_ # ////// '\/ ` --- ( OO).-/( (OO ).-> .-> \( OO) ) .-> # ////...
def mark_diff(self): """
<|file_name|>test-expose-bson-types.js<|end_file_name|><|fim▁begin|>var test = require('./tape')<|fim▁hole|>test('should export bson types', function (t) { t.ok(mongojs.Binary) t.ok(mongojs.Code) t.ok(mongojs.DBRef) t.ok(mongojs.Double) t.ok(mongojs.Long) t.ok(mongojs.MinKey) t.ok(mongojs.MaxKey) t.ok(m...
var mongojs = require('../index')
<|file_name|>window.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 app_units::Au; use devtools_traits::{ScriptToDevtoolsContr...
ReflowReason::StylesheetLoaded => "\tStylesheetLoaded", ReflowReason::ImageLoaded => "\tImageLoaded",
<|file_name|>tls_handshakes.js<|end_file_name|><|fim▁begin|>import TLSFingerprints from "./models/TLSFingerprints"; import FingerPrintsTemplate from "./templates/Fingerprints.html"; import FingerPrintTemplate from "./templates/Fingerprint.html"; import FingerPrintDialogContent from "./templates/FingerPrintDialogContent...
'description': description } },
<|file_name|>defs.rs<|end_file_name|><|fim▁begin|>//! Various definitions of types, constants, traint, ... related to network use core::fmt::{ Binary, Octal, LowerHex, UpperHex, Debug, Display, Formatter, Error }; use core::str::FromStr; use vec::Vec; use num::PrimInt; <|fim▁hole|> /...
use net::Packet;
<|file_name|>aggregator.go<|end_file_name|><|fim▁begin|>// Copyright 2015, 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. // // Copyright (c) XeLabs // BohuTANG package sqltypes import ( "bytes" ) // Operator used to do the ag...
if bytes.Compare(x.([]uint8), y.([]uint8)) < 0 { v = y } }
<|file_name|>index.test-d.ts<|end_file_name|><|fim▁begin|>import {expectType} from 'tsd'; import xdgTrashdir = require('.'); expectType<Promise<string>>(xdgTrashdir()); expectType<Promise<string>>(xdgTrashdir(__filename));<|fim▁hole|>expectType<Promise<string[]>>(xdgTrashdir.all());<|fim▁end|>
<|file_name|>setup_py3.py<|end_file_name|><|fim▁begin|>import subprocess def start(args, logfile, errfile): subprocess.Popen( "$PY3_GUNICORN --pid=gunicorn.pid hello.wsgi:application -c gunicorn_conf.py --env DJANGO_DB=mysql", cwd="django", shell=True, stderr=errfile, stdout=logfile) return 0 ...
return 0
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>/** * @source: https://github.com/jnetterf/satie/ * * @license * (C) Josh Netterfield <joshua@nettek.ca> 2015. * Part of the Satie music engraver <https://github.com/jnetterf/satie>. * * This program is free software: you can redistribute it and/or modify * it ...
<|file_name|>knobEnabled.tsx<|end_file_name|><|fim▁begin|>import React from 'react';<|fim▁hole|> export function Example() { return ( <Badge colorScheme={text('colorScheme', 'success')} variant={select('variantType', ['outline', 'solid', 'subtle'], 'solid')} > NATIVEBASE </Badge> ); }<...
import { Badge } from 'native-base'; import { select, text } from '@storybook/addon-knobs';
<|file_name|>test_address.py<|end_file_name|><|fim▁begin|>"""Address model tests.""" from core.models import Address from core.factory import AddressFactory from tests.utils import ModelTestCase class AddressTest(ModelTestCase): """Test the Address model.""" model = Address field_tests = { 'line...
'verbose_name': 'ligne 1', 'blank': False, 'max_length': 300, },
<|file_name|>DataEndpointConfiguration.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. *...
<|file_name|>rebuild_thumbnails.py<|end_file_name|><|fim▁begin|>""" Custom management command to rebuild thumbnail images - May be required after importing a new dataset, for example """ import os import logging from PIL import UnidentifiedImageError from django.core.management.base import BaseCommand from django.c...
try: model.image.render_variations(replace=False) except FileNotFoundError: logger.error(f"ERROR: Image file '{img}' is missing")
<|file_name|>ListVPCAssociationAuthorizationsRequest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2012-2017 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 t...
<|file_name|>gateway.go<|end_file_name|><|fim▁begin|>package main import ( "emersyx.net/emersyx/api" "github.com/BurntSushi/toml" goirc "github.com/fluffle/goirc/client" ) // The ircGateway struct defines the implementation of an IRC receptor and resource. The struct implements the // api.IRCGateway and api.Recept...
// initialize callbacks gw.initCallbacks()
<|file_name|>nil2.go<|end_file_name|><|fim▁begin|>package main func test() error { return nil } func main() { if err := test(); nil == err { println("err is nil") }<|fim▁hole|> // Output: // err is nil<|fim▁end|>
}
<|file_name|>libSetNativeMethodPrefix002Main.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the...
<|file_name|>validator.py<|end_file_name|><|fim▁begin|>import socket import re from xii import error, util # sample validator # keys = Dict( # [ # RequiredKey("foo", String(), desc="A string to manipulate something"), # Key("bar", String(), desc="something usefull") # ], # desc="Implement...
<|file_name|>detail-small.js<|end_file_name|><|fim▁begin|>/************************************************************************ * This file is part of EspoCRM. * * EspoCRM - Open Source CRM application. * Copyright (C) 2014-2021 Yurii Kuznietsov, Taras Machyshyn, Oleksii Avramenko * Website: https://www.espocr...
* In accordance with Section 7(b) of the GNU General Public License version 3, * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ Espo.define('views/record/detail-small', 'views/record/detail', function (Dep) {
<|file_name|>websingleton.py<|end_file_name|><|fim▁begin|>import web import time import timeit from collections import deque<|fim▁hole|>import math import os localport = os.environ.get('PORT', 8080) from cStringIO import StringIO clock = timeit.default_timer; web.config.debug = False; urls = ( '/u','controller', ...
from sys import exit, exc_info, argv
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render from rest_framework import generics, serializers from beacon.models import Inquiry, Reply class InquirySerializer(serializers.ModelSerializer): class Meta: model = Inquiry class ReplySerializer(serializers.ModelSeria...
return super().dispatch(request,*args,**kwargs) class ReplyListAPIView(generics.RetrieveAPIView):
<|file_name|>SASE_plain.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python2.5 # -*- coding: latin-1 -*- import axiom_rules import fact_groups import instantiate import pddl import sas_tasks import simplify import sys import PrecosatSolver import copy import os import SASE_helper import SolverAdapter from SASE_help...
<|file_name|>bookmark.py<|end_file_name|><|fim▁begin|>class BookmarkData: def __init__(self, _id, _title, _url, _parent, _type): self.mId = _id self.mTitle = _title self.mUrl = _url self.mParent = _parent self.mType = _type def dump(self, _intent=' '): print "%s-> %d, %s, %s, %d, %d" % (_intent, self...
self.populate()
<|file_name|>protocol.rs<|end_file_name|><|fim▁begin|>use std::convert::{From, Into}; use std::fmt; use self::OpCode::*; /// Operation codes as part of rfc6455. #[derive(Debug, Eq, PartialEq, Clone, Copy)] pub enum OpCode { /// Indicates a continuation frame of a fragmented message. Continue, /// Indicates...
Abnormal,
<|file_name|>recordVideo.js<|end_file_name|><|fim▁begin|>/** * Created by chenjianjun on 16/2/25. */ var env=require("../../config"); var type=env.Thinky.type; /* { "success": true, "message": null, "data": [ { "id": 227, "recordVideoId": 9, "createTime": "2016-01-21 17:31:09", "updateTi...
coverUrlApp: type.string(), // 分季ID seasonId: type.number(),
<|file_name|>planning.js<|end_file_name|><|fim▁begin|>/* global FullCalendar, FullCalendarLocales, FullCalendarInteraction */ var GLPIPlanning = { calendar: null, dom_id: "", all_resources: [], visible_res: [], drag_object: null, last_view: null, display: function(params) { ...
url: CFG_GLPI.root_doc+"/ajax/planning.php", type: 'POST', data: {
<|file_name|>inverted_grid_model.py<|end_file_name|><|fim▁begin|>import logging<|fim▁hole|> from pyface.ui.wx.grid.inverted_grid_model import *<|fim▁end|>
logger = logging.getLogger(__name__) logger.warning('DEPRECATED: pyface.grid, use pyface.ui.wx.grid instead.')
<|file_name|>underscore_const_names.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2018 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://ww...
check_impl!(Str, Trt); check_impl!(Str, Trt);
<|file_name|>Esx.py<|end_file_name|><|fim▁begin|>########################################################################### # # This program is part of Zenoss Core, an open source monitoring platform. # Copyright (C) 2009, Zenoss Inc. # # This program is free software; you can redistribute it and/or modify it # under ...
""" import Globals from Products.DataCollector.plugins.CollectorPlugin \
<|file_name|>iot.py<|end_file_name|><|fim▁begin|># Copyright 2016 Capital One Services, 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 # # http://www.apache.org/licenses/LICENSE-2.0 #<|f...
<|file_name|>BSDFViewer.py<|end_file_name|><|fim▁begin|>from falcor import * def render_graph_BSDFViewer():<|fim▁hole|> g.addPass(BSDFViewer, "BSDFViewer") AccumulatePass = createPass("AccumulatePass") g.addPass(AccumulatePass, "AccumulatePass") g.addEdge("BSDFViewer.output", "AccumulatePass.input") ...
g = RenderGraph("BSDFViewerGraph") loadRenderPassLibrary("AccumulatePass.dll") loadRenderPassLibrary("BSDFViewer.dll") BSDFViewer = createPass("BSDFViewer")
<|file_name|>tf1.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import re from streamlink.plugin import Plugin<|fim▁hole|>from streamlink.stream import HDSStream from streamlink.stream import HLSStream class TF1(Plugin): url_re = re.compile(r"https?://(?:www\.)?(?:tf1\.fr/(\w+)/direct|(lci...
from streamlink.plugin.api import http, useragents
<|file_name|>DefaultNativeList.java<|end_file_name|><|fim▁begin|>/* * BridJ - Dynamic and blazing-fast native interop for Java. * http://bridj.googlecode.com/ * * Copyright (c) 2010-2015, Olivier Chafik (http://ochafik.com/) * All rights reserved. * * Redistribution and use in source and binary forms, with or wi...
<|file_name|>test_element_axis_03.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- __author__= "Luis C. Pérez Tato (LCPT) and Ana Ortega (AOO)" __copyright__= "Copyright 2015, LCPT and AOO" __license__= "GPL" __version__= "3.0" __email__= "l.pereztato@gmail.com" import xc_base import geom import xc from soluti...
Iz= (1/12.0*b*h**3) # Cross section moment of inertia (m4) J= 0.721e-8 # Cross section torsion constant (m4) L= 1 # Element length expressed in meters. F= 1.0e3 # Load magnitude (kN)
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|>import webapp2 from google.appengine.api import taskqueue from util import (datetime_now, parse_timestamp, domain_from_url, datetuple_to_string) from cleaner import get_feeditem_model from models import (FeedModel, FeedItemModel, ...
<|file_name|>createPostGraphQLHttpRequestHandler-test.js<|end_file_name|><|fim▁begin|>jest.mock('send') import { GraphQLSchema, GraphQLObjectType, GraphQLString } from 'graphql' import { $$pgClient } from '../../../postgres/inventory/pgClientFromContext' import createPostGraphQLHttpRequestHandler, { graphiqlDirectory ...
pgClient.query.mockClear() pgClient.release.mockClear()
<|file_name|>stat_qq.py<|end_file_name|><|fim▁begin|>import numpy as np import pandas as pd from scipy.stats.mstats import plotting_positions from ..mapping.evaluation import after_stat from ..doctools import document from ..exceptions import PlotnineError from .distributions import get_continuous_distribution from .s...
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import typing import anyio from starlette.requests import Request from starlette.responses import Response, StreamingResponse from starlette.types import ASGIApp, Receive, Scope, Send RequestResponseEndpoint = typing.Callable[[Request], typing.Awaitable[Response]] Di...
) -> Response:
<|file_name|>infinite-tag-type-recursion.rs<|end_file_name|><|fim▁begin|>enum MList { Cons(isize, MList), Nil } //~^ ERROR recursive type `MList` has infinite size //~| ERROR cycle detected when computing drop-check constraints for `MList` <|fim▁hole|>fn main() { let a = MList::Cons(10, MList::Cons(11, MList::Nil)); }<...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (C) Collabora Limited 2017,2019 # Author: Guillaume Tucker <guillaume.tucker@collabora.com> # Author: dcz-collabora <dorota.czaplejewicz@collabora.co.uk> # # Copyright (C) Linaro Limited 2015,2016,2017,2018,2019 # Author: Matt Hart <matthew.hart@linaro.o...
# like git tree, git commit... # Since, at the moment, we do not have the metadata file at the job # level we need to pick one from the build documents, and extract some # values.
<|file_name|>cli.js<|end_file_name|><|fim▁begin|>/** * This cli.js test file tests the `gnode` wrapper executable via * `child_process.spawn()`. Generator syntax is *NOT* enabled for these * test cases. */ var path = require('path'); var assert = require('assert'); var semver = require('semver'); var spawn = requi...
describe('command line interface', function () {
<|file_name|>CWE415_Double_Free__new_delete_long_41.cpp<|end_file_name|><|fim▁begin|>/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE415_Double_Free__new_delete_long_41.cpp Label Definition File: CWE415_Double_Free__new_delete.label.xml Template File: sources-sinks-41.tmpl.cpp */ /* * @description * CWE: 415 ...
analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */
<|file_name|>gnoominit.py<|end_file_name|><|fim▁begin|>import os import sys import time import numpy as np import bge.logic as GameLogic import settings import nicomedilib as ncl import arduino_serial import serial import xinput import random import copy from PIL import Image import gnoomcomm as gc import gnoomio as ...
gc.spawn_process("\0lickpiezosocket", ['python3', '%s/py/licksensorpiezo.py' % blenderpath,]) connlickpiezo.send(blenderpath.encode('latin-1'))
<|file_name|>AtomicLongArray.java<|end_file_name|><|fim▁begin|>/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundati...
<|file_name|>deferred.js<|end_file_name|><|fim▁begin|>/* * deferred.js * * Copyright 2011, HeavyLifters Network Ltd. All rights reserved. */ ;(function() { var DeferredAPI = { deferred: deferred, all: all, Deferred: Deferred, DeferredList: DeferredList, wrapResult: wrapResult, ...
this._canceller = canceller // If this Deferred is cancelled and the creator of this Deferred // didn't cancel it, then they may not know about the cancellation and
<|file_name|>loggers.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ @Author: yyg @Create: 2016MMDD @LastUpdate: 2016-12-15 HH:MM:SS @Version: 0.0 """ from json import load from logging import (Formatter, _defaultFormatter, exception, ...
def print_func(anything_str):
<|file_name|>plot_missing_values.py<|end_file_name|><|fim▁begin|>""" ==================================================== Imputing missing values before building an estimator ==================================================== Missing values can be replaced by the mean, the median or the most frequent value using the...
# plot boston results ax2 = plt.subplot(122) for j in xval:
<|file_name|>api_metadata.py<|end_file_name|><|fim▁begin|># Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file exc...
# # Unless required by applicable law or agreed to in writing, software
<|file_name|>dst-deref-mut.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.apache.org/l...
<|file_name|>unittest.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # ***** BEGIN LICENSE BLOCK ***** # 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/. # ***** END...
levels=TBPL_WORST_LEVEL_TUPLE) # I have to put this outside of parse_single_line because this checks not
<|file_name|>aggKeyToInner.ts<|end_file_name|><|fim▁begin|>export default function(field, bucketKey) { switch (field) { case 'average_rating': return {<|fim▁hole|> 1: '★☆☆☆☆', 2: '★★☆☆☆', 3: '★★★☆☆', 4: '★★★★☆', 5: '★★★★★', }[bucketKey]; case 'completion_date...
0: '☆☆☆☆☆',
<|file_name|>AlexBearTest.py<|end_file_name|><|fim▁begin|>from bears.natural_language.AlexBear import AlexBear from tests.LocalBearTestHelper import verify_local_bear good_file = "Their network looks good." bad_file = "His network looks good." AlexBearTest = verify_local_bear(AlexBear,<|fim▁hole|> ...
<|file_name|>callgrindtool.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** L...
// navigation QAction *m_goBack;
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import { EventEmitter } from 'events' import path from 'path' import type { URL } from 'url' import { URLFactory } from './factory' import logger from '@wdio/logger' import { transformCommandLogResult } from '@wdio/utils' import type { Options } from '@wdio/types' im...
<|file_name|>bounding_sphere_segment.rs<|end_file_name|><|fim▁begin|>use crate::bounding_volume; use crate::bounding_volume::{BoundingSphere, HasBoundingVolume}; use crate::math::Isometry; use crate::shape::Segment; use na::RealField; impl<N: RealField> HasBoundingVolume<N, BoundingSphere<N>> for Segment<N> { #[in...
let pts = [self.a, self.b]; let (center, radius) = bounding_volume::point_cloud_bounding_sphere(&pts[..]); BoundingSphere::new(center, radius)
<|file_name|>TestRintRelaxed.rs<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www...
* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS,
<|file_name|>refactorConvertArrowFunctionOrFunctionExpression_Availability_Anon_FnArgument.ts<|end_file_name|><|fim▁begin|>/// <reference path='fourslash.ts' /> //// function foo(a){} //// /*z*/f/*y*/oo/*x*/(/*w*//*v*/f/*u*/unction/*t*/(/*s*//*r*/b/*q*/,c){/*p*/r/*o*/eturn 42;}) goTo.select("z", "y"); verify.no...
verify.not.refactorAvailable("Convert arrow function or function expression", "Convert to named function"); verify.not.refactorAvailable("Convert arrow function or function expression", "Convert to anonymous function");
<|file_name|>file-lines-item.rs<|end_file_name|><|fim▁begin|>// rustfmt-file_lines: [{"file":"tests/source/file-lines-item.rs","range":[6,8]}] use foo::{c, b, a}; use bar; fn foo() { bar(); } impl Drop for Context {<|fim▁hole|>} impl Bar for Baz { fn foo() { bar( baz, // Who knows? ...
fn drop(&mut self) { }
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import React from 'react' import GenericField from './genericfield' import {object_is_equal, map_drop} from 'app/utils' import PropTypes from 'prop-types' import uuid4 from 'uuid/v4' class GenericForm extends React.Component{ constructor(props){ super(props) ...
} getInitialState(props){ props = props || this.props
<|file_name|>prepare.js<|end_file_name|><|fim▁begin|>const path = require('path'); const inquirer = require('inquirer'); const yargs = require('yargs'); const { sanitizeArgs, ui, invalidGitRepo, ingredients, addIngredients, promiseTimeout } = require('../common'); const { cloneRepo, deleteGitFolder, ...
<|file_name|>custom_import.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ ***************************** NOTE that this is a modified version from web2py 2.8.2. For full details on what has changed, see https://github.com/OpenTreeOfLife/opentree/commits/master/custom_import.py This ...
<|file_name|>robot.py<|end_file_name|><|fim▁begin|># vi: ts=8 sts=4 sw=4 et # # robot.py: web robot detection # # This file is part of Draco2. Draco2 is free software and is made available # under the MIT license. Consult the file "LICENSE" that is distributed # together with this file for the exact licensing terms. # ...
logger.debug('Reloaded robot signatures (change detected).')
<|file_name|>regex_remap.cc<|end_file_name|><|fim▁begin|>/** @file ATS plugin to do (simple) regular expression remap rules @section license License Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work f...
now[strlen(now) - 1] = '\0';
<|file_name|>SlotSynthesisBag.java<|end_file_name|><|fim▁begin|>package uk.co.wehavecookies56.kk.common.container.slot; import net.minecraft.item.ItemStack; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.SlotItemHandler; import uk.co.wehavecookies56.kk.common.item.ItemSynthesisBagS; impo...
public class SlotSynthesisBag extends SlotItemHandler { public SlotSynthesisBag (IItemHandler inventory, int index, int x, int y) {
<|file_name|>fdentry.rs<|end_file_name|><|fim▁begin|>use crate::host; use std::fs::File; use std::os::unix::prelude::{FileTypeExt, FromRawFd, IntoRawFd, RawFd}; use std::path::PathBuf; #[derive(Debug)] pub struct FdEntry { pub fd_object: FdObject, pub rights_base: host::__wasi_rights_t, pub rights_inheriti...
host::__WASI_FILETYPE_SOCKET_DGRAM, host::RIGHTS_SOCKET_BASE,
<|file_name|>s1level32b.py<|end_file_name|><|fim▁begin|>import sys sys.path.append('../..') import codestudio a = codestudio.load('s1level32') a.speed = 'fastest' for count in range(360):<|fim▁hole|><|fim▁end|>
a.move_backward(1) a.left(1) a.check()
<|file_name|>run.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"; var path = require("path"); var fs = require("fs");...
if (err) {
<|file_name|>MainFrame.cpp<|end_file_name|><|fim▁begin|>/***************************************************************************** Project: CEDAR Logic Simulator Copyright 2006 Cedarville University, Benjamin Sprague, Matt Lewellyn, and David Knierim All rights reserved. For li...
EVT_TOOL(Tool_ZoomIn, MainFrame::OnZoomIn) EVT_TOOL(Tool_ZoomOut, MainFrame::OnZoomOut) EVT_SCROLL(MainFrame::OnTimeStepModSlider) EVT_TOOL(Tool_Lock, MainFrame::OnLock)
<|file_name|>MapTranscoder.java<|end_file_name|><|fim▁begin|>package net.catchpole.B9.codec.transcoder; import net.catchpole.B9.codec.stream.BitInputStream; import net.catchpole.B9.codec.stream.BitOutputStream; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Set; class Ma...
Map value = new HashMap(); for (int x=0;x<all.length;x+=2) { value.put(all[x],all[x+1]); }
<|file_name|>main.py<|end_file_name|><|fim▁begin|>''' Controller for the application ''' import logging import sys import traceback import forms from models import Settings from flask import Flask, render_template from google.appengine.api import app_identity # pylint: disable=E0401 from google.appengine.api import mai...
''' Authentication required page ''' user = users.get_current_user()
<|file_name|>SedaInOutWithErrorDeadLetterChannelTest.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 ...
protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() {
<|file_name|>modals.component.ts<|end_file_name|><|fim▁begin|>import { Component,ViewChild } from "@angular/core"; import { ModalDirective } from "ng2-bootstrap"; import "style-loader!./modals.scss"; @Component({ selector:"app-ui-modal", templateUrl:"./modals.html" }) export class Modals{ <|fim▁hole|> showChil...
@ViewChild("childModal") childModal:ModalDirective;
<|file_name|>fast-memoize_v2.x.x.js<|end_file_name|><|fim▁begin|>declare module 'fast-memoize' { declare type Cache<K, V> = { get: (key: K) => V, set: (key: K, value: V) => void, has: (key: K) => boolean }<|fim▁hole|> serializer?: (...args: any[]) => any; strategy?: <T>(fn: T, options?: Options)...
declare type Options = { cache?: Cache<*, *>;
<|file_name|>cindex.py<|end_file_name|><|fim▁begin|>#===- cindex.py - Python Indexing Library Bindings -----------*- python -*--===# # # The LLVM Compiler Infrastructure # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # #===----------...
c_object_p),