prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>app.js<|end_file_name|><|fim▁begin|>var express = require('express'); var bodyParser = require('body-parser'); var path = require('path'); var url = require('url'); var log4js = require('log4js'); var stashBoxConfig = require('./lib/config'); var pkg = require('./package.json'); var proxy = require('expr...
else { res.send(contents); }
<|file_name|>GNSS_RealTimeIntegrityReq.java<|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 // // http://www.apache.org/lice...
* */ public class GNSS_RealTimeIntegrityReq extends Asn1Sequence {
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>from os.path import expanduser ###################### # Common project files ###################### # These are files, packages, and folders that will be copied from the # development folder to the destination obfuscated project. ###################### # Python p...
'migrations', 'platform_api', 'tests',
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>"""superlists URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpat...
urlpatterns = [ url(r'^$', list_views.home_page, name='home'), url(r'^lists/', include(list_urls)), # url(r'^admin/', include(admin.site.urls)),
<|file_name|>mailbody.js<|end_file_name|><|fim▁begin|>"use strict"; // Mail Body Parser var logger = require('./logger'); var Header = require('./mailheader').Header; var utils = require('./utils'); var events = require('events'); var util = require('util'); var Iconv = require('./mailheader').Iconv; var attstr = r...
<|file_name|>test_cisco_fc_zone_client_cli.py<|end_file_name|><|fim▁begin|># (c) Copyright 2014 Cisco Systems 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 L...
def test__parse_ns_output(self): return_wwn_list = [] expected_wwn_list = ['20:1a:00:05:1e:e8:e3:29']
<|file_name|>SineWavePointOptimizer.py<|end_file_name|><|fim▁begin|>from neurotune.controllers import SineWaveController import sys from neurotune import evaluators from neurotune import optimizers from neurotune import utils <|fim▁hole|> showPlots = not ("-nogui" in sys.argv) verbose = not ("-silent" in sys....
if __name__ == "__main__":
<|file_name|>list_box.rs<|end_file_name|><|fim▁begin|>#![allow(non_snake_case,dead_code,unused_variables,unused_imports)] use atl::{CWindow,NULL_HWND}; use winapi::*; //use user32::*; use super::consts::*; use wtl::ToCU16Str; use std::ops::{Deref,DerefMut}; /* (1) ^\t(\w+)\s+(\w+)\((.*)\)\s+\{ => \tpub fn ...
} impl Deref for CListBox { type Target = CWindow;
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>"""Utility methods for flake8.""" import collections import fnmatch as _fnmatch import inspect import io import logging import os import platform import re import sys import tokenize from typing import Callable, Dict, Generator, List, Optional, Pattern from typing impo...
_Token = collections.namedtuple("Token", ("tp", "src")) _CODE, _FILE, _COLON, _COMMA, _WS = "code", "file", "colon", "comma", "ws"
<|file_name|>task.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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/licen...
if i == 0 { tx.send(());
<|file_name|>MessageAware.java<|end_file_name|><|fim▁begin|><|fim▁hole|> * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"...
/* * Licensed to the Apache Software Foundation (ASF) under one
<|file_name|>environment.js<|end_file_name|><|fim▁begin|>// The file contents for the current environment will overwrite these during build. <|fim▁hole|>export var environment = { production: false }; //# sourceMappingURL=C:/Old/Hadron/HadronClient/src/environments/environment.js.map<|fim▁end|>
// The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --env=prod` then `environment.prod.ts` will be used instead. // The list of which env maps to which file can be found in `angular-cli.json`. // The file contents for the current environment will overwrite thes...
<|file_name|>unreachable_rule.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 Chao Lin & William Sergeant (Sorbonne 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 // htt...
{ fn expr_by_index(&self, index: usize) -> Expression { self.grammar.expr_by_index(index).clone() }
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for Meteor 1.4 // Project: http://www.meteor.com/ // Definitions by: Alex Borodach <https://github.com/barbatus> // Dave Allen <https://github.com/fullflavedave> // Olivier Refalo <https://github.com/orefalo> // ...
/// <reference path="./session.d.ts" />
<|file_name|>testPrediction.py<|end_file_name|><|fim▁begin|>############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This pr...
sys.argv.append("--nocapture") # Don't set the logging level to DEBUG. Leave it alone.
<|file_name|>base.py<|end_file_name|><|fim▁begin|>""" Contains base level parents that aren't to be used directly. """ from twisted.internet.defer import inlineCallbacks, returnValue from fuzzywuzzy.process import QRatio from fuzzywuzzy import utils as fuzz_utils from src.daemons.server.ansi import ANSI_HILITE, ANSI_...
<|file_name|>normalDate.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # normalDate.py - version 1.0 - 20000717 #hacked by Robin Becker 10/Apr/2001 #major changes include # using Types instead of type(0) etc # BusinessDate class # __radd__, __rsub__ methods # formatMS stuff # derived from an original ve...
daysByMonth = _daysInMonthNormal
<|file_name|>ArticlesFixture.ts<|end_file_name|><|fim▁begin|>export const ArticlesFixture = { id: "pablo-picasso", articlesConnection: { pageInfo: { hasNextPage: true, endCursor: "YXJyYXljb25uZWN0aW9uOjk=" }, pageCursors: { around: [ { cursor: "YXJyYXljb25uZWN0aW9uOi0x", page: 1, isCurrent: tr...
href: "/article/artsy-editorial-2018-picassos-billion-dollar-year", thumbnail_title: "Why 2018 Could Be Picasso’s Billion Dollar Year", author: { name: "Artsy Editorial",
<|file_name|>EggPlant.java<|end_file_name|><|fim▁begin|>/** * Created by yangge on 1/29/2016.<|fim▁hole|>public class EggPlant extends Veggies { }<|fim▁end|>
*/
<|file_name|>public-api.ts<|end_file_name|><|fim▁begin|>/* * Public API Surface of ngx-page-scroll<|fim▁hole|> */ export { NgxPageScrollModule } from './lib/ngx-page-scroll.module'; export { NgxPageScrollDirective } from './lib/ngx-page-scroll.directive';<|fim▁end|>
<|file_name|>mount.go<|end_file_name|><|fim▁begin|>// Copyright © 2017, 2018 Genome Research Limited // Author: Sendu Bala <sb10@sanger.ac.uk>. // // This file is part of wr. // // wr is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published b...
default: die("'%s' did not start with c or u", simple) }
<|file_name|>reallyClick.js<|end_file_name|><|fim▁begin|>angular.module('app').directive('ngReallyClick', [function() { return { restrict: 'A', link: function(scope, element, attrs) { element.bind('click', function() { var message = attrs.ngReallyMessage; ...
scope.$apply(attrs.ngReallyClick); } }); }
<|file_name|>root2.js<|end_file_name|><|fim▁begin|>var root2 = { "name": "flare", "children": [ { "name": "analytics", "children": [ { "name": "cluster", "children": [ {"name": "AgglomerativeCluster", "size": 3938}, {"name": "CommunityStructure", "size": 3812}, {"nam...
}
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2014-2015 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...
// FIXME 16351: add a sane default search path?
<|file_name|>coherence_copy_like_err_fundamental_struct_ref.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APA...
// Test that we are able to introduce a negative constraint that // `MyType: !MyTrait` along with other "fundamental" wrappers. // aux-build:coherence_copy_like_lib.rs
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>var requireDir = require('require-dir') <|fim▁hole|>requireDir('./gulp/tasks')<|fim▁end|>
<|file_name|>registry.go<|end_file_name|><|fim▁begin|>package registry import ( "crypto/tls" "fmt" "log" "net/http" "strings" ) type LogfCallback func(format string, args ...interface{}) /* * Discard log messages silently. */ func Quiet(format string, args ...interface{}) { /* discard logs */ } /* * Pass l...
*/ func New(registryURL, username, password string) (*Registry, error) { transport := http.DefaultTransport
<|file_name|>models.py<|end_file_name|><|fim▁begin|>import datetime from django.db import models from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType <|fim▁hole|>from simple_history.models import HistoricalRecords from adesao.middleware import get_...
<|file_name|>resource_aws_autoscaling_lifecycle_hook.go<|end_file_name|><|fim▁begin|>package aws import ( "fmt" "log" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/autoscaling" "github.com/hashicorp/terraform-plugin-sdk/helper/resour...
return &schema.Resource{ Create: resourceAwsAutoscalingLifecycleHookPut, Read: resourceAwsAutoscalingLifecycleHookRead,
<|file_name|>increase_in_window.rs<|end_file_name|><|fim▁begin|>use crate::client::types::ClientTypes; use crate::common::increase_in_window_common::IncreaseInWindowCommon; use crate::server::types::ServerTypes; enum Impl { Client(IncreaseInWindowCommon<ClientTypes>), Server(IncreaseInWindowCommon<ServerTypes>...
} /// Utility to tell the peer that it can send more data.
<|file_name|>accountlist.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Nicolas Duhamel # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Softwar...
class AccountList(BasePage):
<|file_name|>LaserArgument.java<|end_file_name|><|fim▁begin|>package io.izenecloud.larser.framework; import io.izenecloud.conf.Configuration; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.Set; import org.apache.hadoop.fs.FileSystem; import...
<|file_name|>handle_ssm.ts<|end_file_name|><|fim▁begin|>import { Secret } from '@aws-cdk/cdk' import { config, SSM } from 'aws-sdk' import * as lib from '../lib' import { TokenParams } from '../types' /** * method to create and/or retrieve an SSM secret from aws. * * @param params can be either a new token from co...
<|file_name|>_express_route_circuit_peerings_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 licens...
resource_group_name: str,
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod credential; pub mod credential_attr_tag_policy; pub mod credential_definition; pub mod credential_for_proof_request; pub mod credential_offer; pub mod credential_request; pub mod proof; pub mod proof_request; pub mod requested_credential; pub mod revocation_regis...
pub mod revocation_registry;
<|file_name|>ux-tree-view.ts<|end_file_name|><|fim▁begin|>import { customElement, bindable, useView, PLATFORM, processContent, ViewCompiler, ViewResources, BehaviorInstruction, inject, Optional, Container, ViewFactory, TaskQueue } from 'aurelia-framework'; import { INode } from './i-node'; imp...
<|file_name|>test_structures.py<|end_file_name|><|fim▁begin|>import unittest from ctypes import * from struct import calcsize import _testcapi class SubclassesTest(unittest.TestCase): def test_subclass(self): class X(Structure): _fields_ = [("a", c_int)] class Y(X): _fields...
# XXX Should raise ValueError?, not RuntimeError
<|file_name|>queue.py<|end_file_name|><|fim▁begin|>from stormed.util import WithFields class Declare(WithFields): _name = "queue.declare" _class_id = 50 _method_id = 10 _sync = True _content = False _fields = [ ('ticket' , 'short'), ('queue' ...
_class_id = 50
<|file_name|>github.js<|end_file_name|><|fim▁begin|>'use strict'; /** * Module dependencies. */ var passport = require('passport'), url = require('url'), config = require('../../config'), GitHubStrategy = require('passport-github').Strategy; module.exports = function() { // Use github strategy passport.use...
}); } ));
<|file_name|>hooks.py<|end_file_name|><|fim▁begin|># Copyright 2019 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from odoo.tools import convert_file <|fim▁hole|> filenames = ['data/res.better.zip.csv'] for filename in filenames: convert_file( cr, 'l10n_ch_zip'...
def import_csv_data(cr, registry): """Import CSV data as it is faster than xml and because we can't use noupdate anymore with csv"""
<|file_name|>gendy3.go<|end_file_name|><|fim▁begin|>package sc // Gendy3 is a dynamic stochastic synthesis generator. // See Gendy1 for background. // This variant of GENDYN normalises the durations in each period // to force oscillation at the desired pitch. // The breakpoints still get perturbed as in Gendy1. // The...
// in the code so don't worry too much if you want to modulate!).
<|file_name|>dashboards.py<|end_file_name|><|fim▁begin|>""" Module where admin tools dashboard classes are defined. """ from django.template.defaultfilters import slugify try: from importlib import import_module except ImportError: # Django < 1.9 and Python < 2.7 from django.utils.importlib import import_m...
<|file_name|>0011_resultevent_post_new.py<|end_file_name|><|fim▁begin|>from django.db import migrations, models class Migration(migrations.Migration):<|fim▁hole|> ] operations = [ migrations.AddField( model_name="resultevent", name="post_new", field=models.ForeignKe...
dependencies = [ ("popolo", "0002_update_models_from_upstream"), ("results", "0010_resultevent_winner_party_new"),
<|file_name|>mean_level_spacing_test.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, division import sys,os qspin_path = os.path.join(os.getcwd(),"../") sys.path.insert(0,qspin_path) # from quspin.operators import hamiltonian # Hamiltonians and operators from quspin.basis import spin_basis_1d # ...
L=12 # syste size
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#coding:utf8 from django.core.cache import caches def get_cache(alias): return caches[alias] def get_redis_connection(alias='default', write=True): """ Helper used for obtain a raw redis client. """ <|fim▁hole|> cache = get_cache(alias) ...
<|file_name|>arm.py<|end_file_name|><|fim▁begin|>#====================== BEGIN GPL LICENSE BLOCK ====================== # # 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 2 # o...
'max_y' : 1.05, 'owner_space' : 'LOCAL' })
<|file_name|>uninstall.rs<|end_file_name|><|fim▁begin|>use cargo::ops; use cargo::util::{CliResult, Config}; #[derive(RustcDecodable)] pub struct Options { flag_bin: Vec<String>, flag_root: Option<String>, flag_verbose: u32, flag_quiet: Option<bool>, flag_color: Option<String>, flag_frozen: boo...
<|file_name|>iter.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/licenses/L...
<|file_name|>BenchmarkTest17998.java<|end_file_name|><|fim▁begin|>/** * OWASP Benchmark Project v1.1 * * This file is part of the Open Web Application Security Project (OWASP) * Benchmark Project. For details, please see * <a href="https://www.owasp.org/index.php/Benchmark">https://www.owasp.org/index.php/Benchmark</a>...
}
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>"""Copyright 2008 Orbitz WorldWide 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 requir...
<|file_name|>test_views.py<|end_file_name|><|fim▁begin|># coding: UTF-8 """ Tests for support views. """ import itertools import json import re<|fim▁hole|>import pytest from django.contrib.auth.models import User from django.urls import reverse from django.db.models import signals from nose.plugins.attrib import attr ...
from datetime import datetime, timedelta import ddt
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The GLFW-RS Developers. For a full listing of the authors, // refer to the AUTHORS file at the top-level directory of this distribution. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compli...
<|file_name|>CfgVehicles.hpp<|end_file_name|><|fim▁begin|>class CBA_Extended_EventHandlers; class CfgVehicles { // Static weapons class LandVehicle; class StaticWeapon: LandVehicle { GVAR(canCarry) = 1; GVAR(carryPosition)[] = {0,1.2,0}; GVAR(carryDirection) = 0; GVAR(canDr...
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; };
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ flask.ext.babelex ~~~~~~~~~~~~~~~~~ Implements i18n/l10n support for Flask applications based on Babel. :copyright: (c) 2013 by Serge S. Koval, Armin Ronacher and contributors. :license: BSD, see LICENSE for more det...
babel = ctx.app.extensions.get('babel')
<|file_name|>learning.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Defines the core learning framework. The framework defined by `score`, `predict`, and `SGD` is defined in section 3.2 of the paper. See `evenodd.py` for a simple example (corresponding to table 3). This core framework is also all that is...
<|file_name|>DebugTag.java<|end_file_name|><|fim▁begin|>package org.anodyneos.xp.tag.core; import javax.servlet.jsp.el.ELException; import org.anodyneos.xp.XpException; import org.anodyneos.xp.XpOutput; import org.anodyneos.xp.tagext.XpTagSupport; import org.xml.sax.SAXException; /** * @author jvas */ public class...
<|file_name|>json-schema-file.service.spec.ts<|end_file_name|><|fim▁begin|>import { inject, TestBed } from "@angular/core/testing"; import { JsonSchemaFileService } from "./json-schema-file.service"; describe("JsonSchemaFileService", () => { beforeEach(() => { TestBed.configureTestingModule({ providers: [...
<|file_name|>mock-project.js<|end_file_name|><|fim▁begin|>'use strict'; var Project = require('ember-cli/lib/models/project'); function MockProject() { var root = process.cwd();<|fim▁hole|>MockProject.prototype.require = function(file) { if (file === './server') { return function() { return { li...
var pkg = {}; Project.apply(this, [root, pkg]); }
<|file_name|>rwmutex_test.go<|end_file_name|><|fim▁begin|>// Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // GOMAXPROCS=10 go test // This is a copy of sync/rwmutex_test.go rewritten to test the // runtime r...
foo++ if foo%writeRatio == 0 { rwm.Lock()
<|file_name|>HistoryApiSpec.js<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2017 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Fou...
const grader = '22'; const url = `/api/v1/audit/grade_change/courses/${this.courseId}/graders/${grader}`; HistoryApi.getGradebookHistory(this.courseId, { grader }); strictEqual(this.getStub.callCount, 1);
<|file_name|>xmlparser.py<|end_file_name|><|fim▁begin|># Copyright (C) 2009 by Ning Shi and Andy Pavlo # Brown University # # 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...
from cStringIO import StringIO as _StringIO except: from StringIO import StringIO as _StringIO
<|file_name|>test_intg_system_Atom_setLoc.py<|end_file_name|><|fim▁begin|>''' SASMOL: Copyright (C) 2011 Joseph E. Curtis, Ph.D. 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, eithe...
<|file_name|>preferences.py<|end_file_name|><|fim▁begin|># =============================================================================== # Copyright 2014 Jake Ross # # 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 ...
class ExperimentDashboardClientPreferencesPane(PreferencesPane):
<|file_name|>cookies.py<|end_file_name|><|fim▁begin|># Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os from http.cookiejar import LWPCookieJar from pants.process.lock import OwnerPrintingInterProcessFileLock from pants.subsyste...
<|file_name|>main.js<|end_file_name|><|fim▁begin|>// test/main.js var Parser = require('../src/markdown-parser'); var parser = new Parser(); var parserOptions = new Parser(); var assert = require("assert"); describe('tests', function() { describe('parsing', function() { it('bold', function(done) { parser...
<|file_name|>authorization.rs<|end_file_name|><|fim▁begin|>use std::any::Any; use std::fmt::{self, Display}; use std::str::{FromStr, from_utf8}; use std::ops::{Deref, DerefMut}; use serialize::base64::{ToBase64, FromBase64, Standard, Config, Newline}; use header::{Header, HeaderFormat}; /// `Authorization` header, def...
fn header_name() -> &'static str { "Authorization" }
<|file_name|>ecom_products.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012-2015 Netforce Co. Ltd. # # 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 withou...
print("get_categs") res=get_model("product").read_group(["categ_id"],condition=condition) categ_nums={}
<|file_name|>3D.py<|end_file_name|><|fim▁begin|>""" 3D.py is the interface for plotting Skeleton Wireframes in a 3D perspective using matplotlib """ # 3D Plotting tool from matplotlib import pyplot as plt from matplotlib import animation from mpl_toolkits.mplot3d import Axes3D # PyKinect XEF modules import C...
# Performance data
<|file_name|>keywords_header.py<|end_file_name|><|fim▁begin|># vim:fileencoding=utf-8 # Copyright 2001-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 __all__ = ['keywords_header'] from portage import settings as ports from portage.output import colorize from display_pretty i...
# % are used as separators for further split so we wont loose spaces and coloring
<|file_name|>VeehdCom.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*-<|fim▁hole|> class VeehdCom(Hoster): __name__ = 'VeehdCom' __type__ = 'hoster' __pattern__ = r'http://veehd\.com/video/\d+_\S+' __config__ = [ ('filename_spaces', 'bool', "Allow spaces in filename...
import re from module.plugins.Hoster import Hoster
<|file_name|>ogrgeometryfactory.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************** * * Project: OpenGIS Simple Features Reference Implementation * Purpose: Factory for converting geometry to and from well known binary * format. * Author: F...
poRet->assignSpatialReference(poGeom->getSpatialReference()); delete poPoly; return forceTo(poRet, eTargetType, papszOptions); }
<|file_name|>semverCompare.test.js<|end_file_name|><|fim▁begin|>import { expect } from 'chai'; import semverCompare from './semverCompare'; describe('semverCompare', () => { const chaos = [ '2.5.10.4159', '0.5', '0.4.1', '1', '1.1', '2.5.0', '2', '2.5.10', '10.5', '1.25.4', ...
'0.5', '1', '1.1', '1.2.15',
<|file_name|>SpUtils.java<|end_file_name|><|fim▁begin|>package com.lfk.justweengine.Utils.tools; import android.content.Context; import android.content.SharedPreferences; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.lang.reflect.InvocationTargetException; import jav...
@SuppressWarnings({"unchecked", "rawtypes"}) private static Method findApplyMethod() {
<|file_name|>renderer.cpp<|end_file_name|><|fim▁begin|>#include "renderer.h" #include "controller.h" #include "renderableobject.h" #include <QtQuick/qquickwindow.h> #include <QtGui/QOpenGLShaderProgram> #include <QtGui/QOpenGLContext> #include <QGLFormat> #include <QOpenGLContext> #include <iostream> #include <cmath> ...
QOpenGLFramebufferObject *Renderer::createFramebufferObject(const QSize &size) { QOpenGLFramebufferObjectFormat format; format.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil);
<|file_name|>providerOperations.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect...
options = null; } if (!optionalCallback) { return new Promise((resolve, reject) => {
<|file_name|>ekwg.js<|end_file_name|><|fim▁begin|>/* concatenated from client/src/app/js/globals.js */ (function () { if (!window.console) { window.console = {}; } var m = [ "log", "info", "warn", "error", "debug", "trace", "dir", "group", "groupCollapsed", "groupEnd", "time", "timeEnd", "profile", "...
return MemberService.all(); }
<|file_name|>update_compute_image_capability_schema_details.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016, 2018, 2020, Oracle and/or its affiliates. All rights reserved. // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or ...
for k, v := range model.SchemaData {
<|file_name|>test5.py<|end_file_name|><|fim▁begin|>import unittest from y2017.day5 import * <|fim▁hole|> self.assertEqual(jump_increment('0\n3\n0\n1\n-3\n'), 5) def test_part_B(self): self.assertEqual(jump_conditional_increment('0\n3\n0\n1\n-3\n'), 10)<|fim▁end|>
class TestDay5(unittest.TestCase): def test_part_A(self):
<|file_name|>profile_extras.py<|end_file_name|><|fim▁begin|># This file is part of OpenHatch. # Copyright (C) 2010 Parker Phinney # Copyright (C) 2009, 2010 OpenHatch, Inc. # Copyright (C) 2010 John Stumpo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Ge...
if type(value) == str: # Django 2.6 sometimes gives us the empty string as '', not u''. # Are there other cases where we do get a byte string, not a Unicode string?
<|file_name|>pe56.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- <|fim▁hole|>class Solution(Problem): def solve(self, input_): numberLargest = 0 for a in range(1, 100): if a % 10 != 0: for b in range(1, 100): num_pow = ...
from base import Problem
<|file_name|>bad-mid-path-type-params.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.a...
<|file_name|>s1c7.rs<|end_file_name|><|fim▁begin|>extern crate matasano; use matasano::set1::challenge1::base64_to_hex; use matasano::set1::challenge7::Aes128Ecb; use matasano::set1::shared::{bytes_to_string, hex_string_to_bytes}; use std::error::Error; use std::fs::read_to_string; <|fim▁hole|> println!("found {} b...
fn main() -> Result<(), Box<Error>> { let data = read_to_string("./data/s1c7.txt")?; let hex = base64_to_hex(&data.replace("\n", "")); let bytes = hex_string_to_bytes(&hex).ok_or("Could not convert to hex")?;
<|file_name|>monetary.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:ac03974d85317d75edc2dc62eb1c40e9514aae0dcfe5e69e3a62c6d419484632<|fim▁hole|><|fim▁end|>
size 887
<|file_name|>GoogleDistances.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import json import urllib import time import datetime <|fim▁hole|>#Function to get distance between 2 points from google maps. By default route is by car, distance is given in miles and time in minutes. def Calc...
#From PatMap by Jason Young, available on GitHub at github.com/JasYoung314/PatMap
<|file_name|>data-share-a.component.ts<|end_file_name|><|fim▁begin|>import { AfterViewChecked, Component, ElementRef, OnDestroy, OnInit } from '@angular/core'; // subscribe を保持するための Subscription を import import { Subscription } from 'rxjs'; // サービスを登録するための import // アプリ全体でのサービスの共有、コンポーネント単位でのサービスの共有に関わらず、ここの import は...
<|file_name|>db.go<|end_file_name|><|fim▁begin|>package main import ( "encoding/json" "fmt" "log" "time" "github.com/boltdb/bolt" ) type Entry struct { Id string `json:"id"` Url string `json:"url"` Subreddit string `json:"subreddit"` } //InitDB initializes the BoltDB instance a...
<|file_name|>adaptation.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provid...
<|file_name|>oestexturefloatlinear.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */<|fim▁hole|>use super::{constants as webgl, WebG...
<|file_name|>common.rs<|end_file_name|><|fim▁begin|>//! The module contains some common utilities for `solicit::http` tests. use std::io::Write; use crate::solicit::frame::pack_header; use crate::solicit::frame::FrameHeader; use crate::solicit::frame::RawFrame; /// Creates a new `RawFrame` from two separate parts: t...
<|file_name|>message.js<|end_file_name|><|fim▁begin|>var Message = function() { this._data = { 'push_type': 1, 'android': { 'doings': 1 } }; return this; }; /* * Notification bar上显示的标题 * 必须 */ Message.prototype.title = function(title) { return this.setAndroid('notification_title', title); ...
/* * 用户自定义 dict * "extras":{"season":"Spring", "weather":"raining"}]
<|file_name|>SpanFirstQueryBuilder.java<|end_file_name|><|fim▁begin|>/* * Licensed to ElasticSearch and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. ElasticSearch licenses this<|fim▁hole|>...
* file to you 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|>unexpand.rs<|end_file_name|><|fim▁begin|>#![crate_name = "unexpand"] /* * This file is part of the uutils coreutils package. * * (c) Virgile Andreani <virgile.andreani@anbuco.fr> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source ...
}
<|file_name|>jquery-steps-tests.ts<|end_file_name|><|fim▁begin|>/// <reference path="../jquery/jquery.d.ts" /> /// <reference path="jquery-steps.d.ts" /> var labels: JQuerySteps.LabelSettings = { cancel: 'Cancel', current: 'Current:', pagination: 'Paging', finish: 'Done', next: 'Next >', previo...
enableKeyNavigation: false,
<|file_name|>jquery.jaoselect.js<|end_file_name|><|fim▁begin|>(function($) { "use strict"; /** * Main controller class for jaoselect input * @param {Object} settings for widget * @param {JQuery} model initial <select> element, we hide it and use like a "model" layer */ var JaoSelect = function(settings, mod...
this.block.data('jaoselect', this); // Event handlers
<|file_name|>lab.js<|end_file_name|><|fim▁begin|>"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const path = require("path"); const cordova_config_1 = require("../utils/cordova-config"); function LabAppView(req, res) { return res.sendFile('index.html', { root: path.join(__dirna...
}
<|file_name|>csharp_reference.py<|end_file_name|><|fim▁begin|>class CSharpReference(): def __init__(self,): self.reference_object = None self.line_in_file = -1<|fim▁hole|><|fim▁end|>
self.file_name = ''
<|file_name|>ahah.js<|end_file_name|><|fim▁begin|>// $Id: ahah.js,v 1.1.2.1 2009/03/21 19:43:51 mfer Exp $ /** * Provides AJAX-like page updating via AHAH (Asynchronous HTML and HTTP). * * AHAH is a method of making a request via Javascript while viewing an HTML * page. The request returns a small chunk of H...
// Disable the element that received the change. $(this.element).addClass('progress-disabled').attr('disabled', true); // Insert progressbar or throbber.
<|file_name|>rst2xml.py<|end_file_name|><|fim▁begin|>#!/var/www/horizon/.venv/bin/python # $Id: rst2xml.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing Docuti...
description = ('Generates Docutils-native XML from standalone ' 'reStructuredText sources. ' + default_description)
<|file_name|>expand.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
assert!(!fail);
<|file_name|>graphviz.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/licens...
// as well. let mut last_two: Vec<_> = s.as_slice().chars().rev().take(2).collect(); last_two.reverse();