prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>AdminObject.java<|end_file_name|><|fim▁begin|>/* *------------------------------------------------------------------------------ * Copyright (C) 2006-2010 University of Dundee. All rights reserved. * * * This program is free software; you can redistribute it and/or modify * it under the terms of t...
while (i.hasNext()) {
<|file_name|>check.go<|end_file_name|><|fim▁begin|>package libgbust <|fim▁hole|>import ( "io/ioutil" "net/http" "net/url" "unicode/utf8" ) // CheckDir is used to execute a directory check func (a *Attacker) CheckDir(word string) *Result { end, err := url.Parse(word) if err != nil { return &Result{ Msg: "[!]...
<|file_name|>persistent_list.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/. */ //! A persistent, thread-safe singly-linked list. us...
<|file_name|>zz_generated_managementpolicies_client.go<|end_file_name|><|fim▁begin|>//go:build go1.16 // +build go1.16 // 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...
} if !runtime.HasStatusCode(resp, http.StatusOK) { return ManagementPoliciesClientCreateOrUpdateResponse{}, runtime.NewResponseError(resp)
<|file_name|>data.py<|end_file_name|><|fim▁begin|>__author__ = 'bett' import MySQLdb as db import pandas.io.sql as psql from config import db_config def getData(symbols,start,end): <|fim▁hole|> return data; if(__name__=='__main__'): getData('000009.sz','2013-1-1','2015-4-8')<|fim▁end|>
database = db.connect(**db_config) data=psql.frame_query("SELECT * FROM tbl_historical where start", database)
<|file_name|>RaceSystem.java<|end_file_name|><|fim▁begin|>/* * Copyright 2014 Erik Wilson <erikwilson@magnorum.com> * * 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 3 of the...
*/ package org.tritania.stables;
<|file_name|>bootstrap.py<|end_file_name|><|fim▁begin|># BlenderBIM Add-on - OpenBIM Blender Add-on # Copyright (C) 2021 Dion Moult <dion@thinkmoult.com> # # This file is part of BlenderBIM Add-on. # # BlenderBIM Add-on is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publ...
if modifier.type == "BOOLEAN" and modifier.object and modifier.object.name == name2: return True assert False, "No boolean found"
<|file_name|>point-mutations.rs<|end_file_name|><|fim▁begin|>extern crate point_mutations as dna; #[test] fn test_no_difference_between_empty_strands() { assert_eq!(dna::hamming_distance("", "").unwrap(), 0); } #[test] #[ignore] fn test_no_difference_between_identical_strands() { assert_eq!(dna::hamming_dista...
} #[test] #[ignore]
<|file_name|>ajax.js<|end_file_name|><|fim▁begin|>jQuery(document).ready(function(){ jQuery("#ResponsiveContactForm").validate({ submitHandler: function(form) { jQuery.ajax({ type: "POST", dataType: "json", url:MyAjax, data:{ action: 'ai_action', fdata : jQuery(document.formValid...
});
<|file_name|>adapter.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License ...
<|file_name|>async-gen-dstr-var-ary-ptrn-rest-id-iter-step-err.js<|end_file_name|><|fim▁begin|>// This file was procedurally generated from the following sources: // - src/dstr-binding-for-await/ary-ptrn-rest-id-iter-step-err.case // - src/dstr-binding-for-await/error/for-await-of-async-gen-var.template /*--- descripti...
ii. Else if lhsKind is varBinding, then [...]
<|file_name|>collect.rs<|end_file_name|><|fim▁begin|>/* Copyright ⓒ 2015 grabbag contributors. Licensed under the MIT license (see LICENSE or <http://opensource.org /licenses/MIT>) or the Apache License, Version 2.0 (see LICENSE of <http://www.apache.org/licenses/LICENSE-2.0>), at your option. All files in the project...
}
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" recursely """ __version__ = "0.1" __description__ = "Recursive importer for Python submodules" __author__ = "Karol Kuczmarski" __license__ = "Simplified BSD" import sys from recursely._compat import IS_PY3 from recursely.importer import RecursiveImporter from...
ih_module = getattr(sys.meta_path[i], '__module__', '')
<|file_name|>5_7_cgi_server.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Python Network Programming Cookbook -- Chapter - 5 # This program requires Python 2.7 or any later version import os import cgi import argparse import BaseHTTPServer import CGIHTTPServer import cgitb cgitb.enable() ## enable CGI erro...
<|file_name|>FactorGraphModel.cpp<|end_file_name|><|fim▁begin|>/* * 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 3 of the License, or * (at your option) any later version. *...
<|file_name|>sqlmap.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import bdb import inspect import logging import os import re import shutil import sys import time import traceback import w...
errMsg = maskSensitiveData(errMsg)
<|file_name|>element.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::types::*; use dom::bindings::utils::{Reflectable, Re...
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Company', ...
('bank', models.CharField(default=b'anz', max_length=100)), ('bank_account_name', models.CharField(max_length=100)),
<|file_name|>settings.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('mean.settings').config(['$stateProvider', function($stateProvider) { var checkLoggedin = function($q, $timeout, $http, $location) { // Initialize a new promise var deferred = $q.defer(); // Make an AJAX call to...
// Authenticated
<|file_name|>document_highlight.rs<|end_file_name|><|fim▁begin|>use languageserver_types::{DocumentHighlight, TextDocumentPositionParams}; use super::*; use crate::completion; pub fn register(io: &mut IoHandler, thread: &RootedThread) { let thread = thread.clone(); let f = move |params: TextDocumentPositionP...
.map(Some) }) .await
<|file_name|>mesos_dns.py<|end_file_name|><|fim▁begin|># Copyright (C) Mesosphere, Inc. See LICENSE file for details. """MesosDNS mock endpoint""" import copy import logging import re from exceptions import EndpointException from mocker.endpoints.recording import ( RecordingHTTPRequestHandler, RecordingTcpIp...
} SCHEDULER_SRV_ALWAYSTHERE_DIFFERENTPORT = {
<|file_name|>pyunit_link_functions_tweedie_basicGLM.py<|end_file_name|><|fim▁begin|>import sys sys.path.insert(1, "../../../") import h2o def link_functions_tweedie_basic(ip,port): # Connect to h2o h2o.init(ip,port) print "Read in prostate data." hdf = h2o.upload_file(h2o.locate("smalldata/prostate/pr...
if __name__ == "__main__": h2o.run_test(sys.argv, link_functions_tweedie_basic)
<|file_name|>0002_auto_20150921_2215.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals <|fim▁hole|> dependencies = [ ('printy', '0001_initial'), ] operations = [ migrations.CreateModel( name='PostItModel', fields=[ ...
from django.db import models, migrations class Migration(migrations.Migration):
<|file_name|>knm_kernel.rs<|end_file_name|><|fim▁begin|>use matrix::{Scalar,Mat,RoCM,Matrix}; use core::{ptr, marker::PhantomData}; use composables::{GemmNode,AlgorithmStep}; use thread_comm::{ThreadInfo}; use typenum::Unsigned; use super::knm_kernel_wrapper::{KnmKernelWrapper,GenericKnmKernelWrapper}; pub struct KnmK...
let ap = a.get_mut_buffer(); let bp = b.get_mut_buffer();
<|file_name|>DrawingShapes-triangle.py<|end_file_name|><|fim▁begin|>from turtle import * shape("turtle") <|fim▁hole|>left(120) forward(100) left(120) forward(100) left(120) done()<|fim▁end|>
forward(100)
<|file_name|>trayicon.py<|end_file_name|><|fim▁begin|>from PyQt5.QtCore import QObject, pyqtSlot, pyqtSignal from PyQt5.Qt import QSystemTrayIcon, QIcon class TrayIcon(QSystemTrayIcon): ActivationReason = ['Unknown', 'Context', 'DoubleClick', 'Trigger', 'MiddleClick'] onactivate = pyqtSignal(int, str) <|f...
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>extern crate amq_protocol; use amq_protocol::codegen::*; use std::collections::BTreeMap; use std::env; use std::fs::File; use std::io::{Read, Write}; use std::path::Path; fn main() { let out_dir = env::var("OUT_DIR").expect("OUT_DIR is not defined"); le...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import { css, StyleSheet } from 'aphrodite/no-important'; import React, { PropTypes } from 'react'; import octicons from './octicons'; import colors from './colors'; import sizes from './sizes';<|fim▁hole|> const classes = StyleSheet.create(styles); // FIXME static o...
import styles from './styles';
<|file_name|>SVGMisc.cpp<|end_file_name|><|fim▁begin|>/* * $Id$ * Copyright (c) 2001 Stephane Conversy, Jean-Daniel Fekete and Ecole des Mines de Nantes. All rights reserved. This software is proprietary information of Stephane Conversy, Jean-Daniel Fekete and Ecole des Mines de Nantes. You shall use it only in ac...
namespace svg { SVGDocument*
<|file_name|>urlfetcher.py<|end_file_name|><|fim▁begin|>############################################################################### # # file: urlfetcher.py # # Purpose: refer to module documentation for details # # Note: This file is part of Termsaver application, and should not be used # or exec...
# Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
<|file_name|>DatabaseException.java<|end_file_name|><|fim▁begin|>package warhammerrpg.database.exception; import warhammerrpg.core.exception.WarhammerRpgException; public class DatabaseException extends WarhammerRpgException { public DatabaseException(Exception originalExceptionObject) { super(originalExc...
<|file_name|>status.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Baruwa - Web 2.0 MailScanner front-end. # Copyright (C) 2010-2015 Andrew Colin Kissa <andrew@topdog.za.net> # vim: ai ts=4 sts=4 et sw=4 "status tasks" import os import datetime import psutil from StringIO import StringIO from pylons im...
net=[], mta=None,
<|file_name|>lr.template.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)] #![allow(unused_mut)] #![allow(unreachable_code)] extern crate onig; #[macro_use] extern crate lazy_static; use onig::{Regex, Syntax, RegexOptions}; use std::collections::HashMap; /** * Stack value. */ enum SV { Undefined, {{{SV...
* from an encoded symbol to table entry (TE).
<|file_name|>monitor.py<|end_file_name|><|fim▁begin|>from datetime import datetime import threading import time from collections import deque import logging logger = logging.getLogger(__name__) class MonitorThread(threading.Thread): """executes a function f with sleep_time intervals in between """ def _...
self.external_callback = callback self.reset_data() def reset_data(self):
<|file_name|>BackendWiki.py<|end_file_name|><|fim▁begin|># -- coding: utf-8 -- ########################################################################### # # # WebText # # ...
"'recherche': ex. 'wiki; Napoleon; recherche'.") bWiki = BackendWiki()
<|file_name|>configure.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """Ninja build configurator for foundation library""" import sys import os import copy sys.path.insert(0, os.path.join('build', 'ninja')) import generator generator = generator.Generator(project = 'rpmalloc', variables = {'bundleidentifie...
bmallocsources += ['Zone.cpp'] bmallocsources = [os.path.join('bmalloc', path) for path in bmallocsources] if not target.is_android():
<|file_name|>Component.js<|end_file_name|><|fim▁begin|><|fim▁hole|> var Component = UIComponent.extend("sap.m.sample.ListDeletion.Component", { metadata : { rootView : { "viewName": "sap.m.sample.ListDeletion.List", "type": "XML", "async": true }, dependencies : { libs : [ "sap.m", ...
sap.ui.define(['sap/ui/core/UIComponent'], function(UIComponent) { "use strict";
<|file_name|>NonNullableCircularDependencyCascadeTest.java<|end_file_name|><|fim▁begin|>/* * Hibernate, Relational Persistence for Idiomatic Java * * Copyright (c) 2011, Red Hat Inc. or third-party contributors as * indicated by the @author tags or express copyright attribution * statements applied by the authors....
* Lesser General Public License, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
<|file_name|>preferences.js<|end_file_name|><|fim▁begin|>var extend = require('node.extend'); var PersistentCollection = require('./persistent-collection'); var preference = require('../model/preference'); var preferences = extend(true, {}, new PersistentCollection(), function() { "use strict"; return { ...
<|file_name|>oculus_stereo.rs<|end_file_name|><|fim▁begin|>//! Post processing effect to support the Oculus Rift. use na::Vector2; use crate::context::Context; use crate::post_processing::post_processing_effect::PostProcessingEffect; use crate::resource::{ AllocationType, BufferType, Effect, GPUVec, RenderTarget,...
verify!(ctxt.bind_texture(Context::TEXTURE_2D, target.texture_id())); self.fbo_texture.upload(&0);
<|file_name|>pages.component.ts<|end_file_name|><|fim▁begin|>import { Component, ViewEncapsulation } from '@angular/core'; @Component({ selector: 'pages', encapsulation: ViewEncapsulation.None, styles: [], template: ` <ba-sidebar></ba-sidebar> <ba-page-top></ba-page-top> <div class="al-main"> ...
<footer class="al-footer clearfix"> </footer>
<|file_name|>e438.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, division import matplotlib import logging from sys import stdout matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from neuralnilm import (Net, RealApplianceSource, BLSTMLayer, Di...
max_diff=200, on_power_thresholds=[5] * 5,
<|file_name|>atom.py<|end_file_name|><|fim▁begin|>from activitystreams import Activity, Object, MediaLink, ActionLink, Link import re import datetime import time class AtomActivity(Activity): pass # This is a weird enum-like thing. class ObjectParseMode(object): def __init__(self, reprstring): sel...
for entry_elem in entry_elems:
<|file_name|>test_queue.py<|end_file_name|><|fim▁begin|>from asynctnt_queue import Queue, Tube from tests import BaseTarantoolTestCase class QueueTestCase(BaseTarantoolTestCase): async def test__queue_create(self): q = Queue(self.conn) self.assertEqual(q.conn, self.conn, 'conn valid') def tes...
self.assertEqual(tube.conn, self.conn, 'conn valid') def test__queue_get_tube_multiple(self): q = Queue(self.conn)
<|file_name|>database_struct.rs<|end_file_name|><|fim▁begin|>use crate::clients::{CollectionStruct, UserStruct}; use crate::traits::*; use crate::{requests, CosmosClient}; use azure_sdk_core::No; use std::borrow::Cow; #[derive(Debug, Clone)] pub struct DatabaseStruct<'a, C> where C: CosmosClient + Clone, { cos...
<|file_name|>literals.rs<|end_file_name|><|fim▁begin|>fn main() { // Suffixed literals, their types are known at initialization let x = 1u8; let y = 2u32;<|fim▁hole|> // Unsuffixed literal, their types depend on how they are used let i = 1; let f = 1.0; // `size_of_val` returns the size of a...
let z = 3f32;
<|file_name|>RedSandstoneStairsMat.java<|end_file_name|><|fim▁begin|>package org.diorite.material.blocks.stony; import java.util.Map; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.diorite.BlockFace; import org.diorite.cfg.magic.MagicNumbers...
public class RedSandstoneStairsMat extends BlockMaterialData implements StairsMat
<|file_name|>GlobalResource.java<|end_file_name|><|fim▁begin|>/*Copyright (C) 2012 Longerian (http://www.longerian.me) 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.or...
<|file_name|>run_test.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
import taxcalc
<|file_name|>c_types.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code, non_camel_case_types)] extern crate libc; use self::libc::{ c_char, c_int, uid_t, time_t }; use self::libc::funcs::posix88::unistd::getgroups; use std::vec::Vec; use std::ptr::read; use std::str::raw::from_c_str; pub struct c_...
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # eppy documentation build configuration file, created by # sphinx-quickstart on Fri Jun 9 13:47:02 2017.<|fim▁hole|># This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration ...
#
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import glob import fnmatch import itertools import logging import os import re import six import sys import yaml from .dockerfile import Dockerfile from .image import ImageBuilder from .config import Config class Builder(object) : def __init__(self, config=No...
# When Dockerfile is provided and globbed, path must not be globbed, both # refers to the current directory path = image.get('path', None)
<|file_name|>device_trigger.py<|end_file_name|><|fim▁begin|>"""Provides device automations for ZHA devices that emit events.""" import voluptuous as vol import homeassistant.components.automation.event as event from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.components.dev...
config = TRIGGER_SCHEMA(config)
<|file_name|>TransactionMediatorOutputConnectorItemSemanticEditPolicy.java<|end_file_name|><|fim▁begin|>package org.wso2.developerstudio.eclipse.gmf.esb.diagram.edit.policies; import java.util.Iterator; import org.eclipse.emf.ecore.EAnnotation; import org.eclipse.gef.commands.Command; import org.eclipse.gmf.runtime.d...
*/
<|file_name|>textAndNumberFilterParameters.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for ag-grid v6.0.1 // Project: http://www.ag-grid.com/ // Definitions by: Niall Crosby <https://github.com/ceolter/> // Definitions: https://github.com/borisyankov/DefinitelyTyped export interface TextAndNumberFilterParamet...
/** What to do when new rows are loaded. The default is to reset the filter, to keep it in line with 'set' filters. If you want to keep the selection, then set this value to 'keep'. */ newRowsAction?: string; }
<|file_name|>awakener.rs<|end_file_name|><|fim▁begin|>pub use self::pipe::Awakener; <|fim▁hole|> /* * * ===== Awakener ===== * */ pub struct Awakener { reader: PipeReader, writer: PipeWriter, } impl Awakener { pub fn new() -> io::Result<Awakener> { ...
/// Default *nix awakener implementation mod pipe { use {io, Evented, EventSet, PollOpt, Selector, Token, TryRead, TryWrite}; use unix::{self, PipeReader, PipeWriter};
<|file_name|>test_docstring_parameters.py<|end_file_name|><|fim▁begin|># TODO inspect for Cython (see sagenb.misc.sageinspect) from __future__ import print_function from nose.plugins.skip import SkipTest from nose.tools import assert_true from os import path as op import sys import inspect import warnings import imp ...
docscrape = None
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import datetime from xml.etree import ElementTree try: from urllib.parse import urlparse, parse_qs except ImportError: # Python 2 from urlparse import urlparse, parse_qs import html5lib import requests from .models import ( Category, SearchSortKey,...
# first, get the total number of pages returned. this findall returns
<|file_name|>DescribeTagsResultStaxUnmarshaller.java<|end_file_name|><|fim▁begin|>/* * Copyright 2010-2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License").<|fim▁hole|> * * http://aws.amazon.com/apache2.0 * * or in the "license" file a...
* You may not use this file except in compliance with the License. * A copy of the License is located at
<|file_name|>test_user_model.py<|end_file_name|><|fim▁begin|>import unittest import time from datetime import datetime from app import create_app, db from app.models import User, AnonymousUser, Role, Permission, Follow class UserModelTestCase(unittest.TestCase): def setUp(self): self.app = create_app('tes...
u2 = User(email='susan@example.org', password='dog')
<|file_name|>E0389.rs<|end_file_name|><|fim▁begin|>struct FancyNum { num: u8, } fn main() { let mut fancy = FancyNum{ num: 5 };<|fim▁hole|> println!("{}", fancy_ref.num); }<|fim▁end|>
let fancy_ref = &(&mut fancy); fancy_ref.num = 6; //~ ERROR cannot assign to `fancy_ref.num`, which is behind a `&` reference
<|file_name|>htmlimageelement.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::attr::Attr; use dom::attr::{AttrHelpers, At...
Ok(image) } }
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for mysite project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os<|fim▁hole|>from django.core.wsgi impor...
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "firstapp.settings")
<|file_name|>ABI39_0_0AccessibilityProps.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "ABI39_0_0AccessibilityProps.h" #include <ABI39...
{})),
<|file_name|>gsub.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2011 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. #include "gsub.h" #include <limits> #include <vector> #include "gdef.h" #include "gpos.h" #include...
return OTS_FAILURE();
<|file_name|>controls.py<|end_file_name|><|fim▁begin|># Name: controls.py # Purpose: Control components # Author: Roman Rolinsky <rolinsky@femagsoft.com> # Created: 31.05.2007 # RCS-ID: $Id: core.py 47823 2007-07-29 19:24:35Z ROL $ from wx.tools.XRCed import component, images, attribute, ...
component.Manager.register(c) component.Manager.setMenu(c, 'button', 'button', 'wxButton', 10) component.Manager.setTool(c, 'Controls', pos=(0,1))
<|file_name|>commands.js<|end_file_name|><|fim▁begin|>/** * System commands * Pokemon Showdown - http://pokemonshowdown.com/ * * These are system commands - commands required for Pokemon Showdown * to run. A lot of these are sent by the client. * * System commands should not be modified, added, or removed. If yo...
},
<|file_name|>preprocessor.go<|end_file_name|><|fim▁begin|>package httpseverywhere import ( "bytes" "encoding/gob" "encoding/xml" "io/ioutil" "path/filepath" "regexp" "github.com/getlantern/golog" ) // Preprocessor is a struct for preprocessing rules into a GOB file. var Preprocessor = &preprocessor{ log: gol...
} p.log.Debugf("Total rule set files: %v", num) p.log.Debugf("Loaded rules with %v rulesets and %v errors", len(rules), errors)
<|file_name|>astropy_models.py<|end_file_name|><|fim▁begin|>try: from astropy.models import ParametricModel,Parameter,_convert_input,_convert_output import numpy as np class PowerLawModel(ParametricModel): param_names = ['scale', 'alpha'] def __init__(self, scale, alpha, param_dim=1): ...
def eval(self, xvals, params): return params[0]*((xvals)**(-params[1]))
<|file_name|>home.js<|end_file_name|><|fim▁begin|>import journey from "lib/journey/journey.js"; import template from "./home.html"; import Ractive from "Ractive.js"; var home = { // this function is called when we enter the route enter: function ( route, prevRoute, options ) { /*%injectPath%*/ // Create our vie...
route.view = new Ractive( {
<|file_name|>reduceVCF.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Sun Mar 10 10:43:53 2019<|fim▁hole|>Description: Reduces a vcf file to meta section and one line for each chromosome number for testing and debugging purposes. """ # Open files to read from and write to vcfpath = open("D:/MG...
@author: Heathro
<|file_name|>Check.js<|end_file_name|><|fim▁begin|>"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProp...
var _a = this.props, isChecked = _a.isChecked, checked = _a.checked; isChecked = isChecked || checked; return (React.createElement("div", { className: Utilities_1.css('ms-Check', styles.root, (_b = {},
<|file_name|>crawler_chuongthieu.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- import io from bs4 import BeautifulSoup from bs4 import SoupStrainer import urllib2 import urlparse from selenium import webdriver from selenium.webdriver.common.keys import Keys import time from selenium.webdriver.support.ui im...
if os.path.isfile(f2name): list_urlchuongthieu = getlisturlchuongthieu(x)
<|file_name|>administration.routes.ts<|end_file_name|><|fim▁begin|>import { AdministrationComponent } from './administration.component'; import { Route } from '@angular/router'; /******************************************************************************************************************* * * @route - Administ...
******************************************************************************************************************/ export const AdministrationRoutes: Route[] = [ {
<|file_name|>url_email.go<|end_file_name|><|fim▁begin|>package builtins import ( "fmt" "net/mail" "net/url" "regexp" "strings" u "github.com/araddon/gou" "github.com/mssola/user_agent" "github.com/araddon/qlbridge/expr" "github.com/araddon/qlbridge/value" "github.com/araddon/qlbridge/vm" ) var _ = u.EMPTY...
func (m *Host) Type() value.ValueType { return value.StringType }
<|file_name|>nullable-pointer-size.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apac...
macro_rules! check_fancy {
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![crate_type = "rlib"] #![feature(linkage)] pub fn foo<T>() -> *const () { extern "C" { #[linkage = "extern_weak"] static FOO: *const (); } unsafe { FOO }<|fim▁hole|>}<|fim▁end|>
<|file_name|>list.go<|end_file_name|><|fim▁begin|>package network import ( "fmt" "os" "text/tabwriter" "github.com/docker/swarmkit/api" "github.com/docker/swarmkit/cmd/swarmctl/common" "github.com/spf13/cobra" ) var ( listCmd = &cobra.Command{ Use: "ls", Short: "List networks", RunE: func(cmd *cobra.C...
) func init() { listCmd.Flags().BoolP("quiet", "q", false, "Only display IDs")
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for lodash-webpack-plugin 0.11 // Project: https://github.com/lodash/lodash-webpack-plugin#readme // Definitions by: Benjamin Lim <https://github.com/bumbleblym> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Vers...
}
<|file_name|>get-local-package-ecma-version-benchmark.js<|end_file_name|><|fim▁begin|>/** * Copyright 2018 Google LLC *<|fim▁hole|> * * 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...
* 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|>hypothesize.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- ## Based on learner.js (by Blake Allen and Michael Becker) import itertools import collections from collections import defaultdict import pdb import phoment class Change(object): def __init__(self, change_...
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use std::fmt; use std::ffi::CString; // **** DEFINE NEW ERRORS HERE **** // STEP 1: create new public static instance of Error, assign it a new unused number and // give it a human readable error message // STEP 2: Add Error to the stat...
let mut m = HashMap::new(); insert_c_message(&mut m, &SUCCESS);
<|file_name|>test.ts<|end_file_name|><|fim▁begin|>/* * @license Apache-2.0 * * Copyright (c) 2021 The Stdlib 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....
// The function returns a number... { realf( new Complex64( 5.0, 3.0 ) ); // $ExpectType number
<|file_name|>plot_somas.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project # All rights reserved. # # This file is part of NeuroM <https://github.com/BlueBrain/NeuroM> # # Redistribution and use in source and binary forms, with or wit...
from pathlib import Path from neurom import load_morphology
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
file_discovery.populate_horizon_config( HORIZON_CONFIG,
<|file_name|>Account.js<|end_file_name|><|fim▁begin|>'use strict'; module.exports = class Account { constructor(name, password, email) { var load = typeof name === 'object'; this._username = load ? name._username : name; this._password = load ? name._password : password; this._ema...
} updateFromPlayer(player) {
<|file_name|>inferTypes1.js<|end_file_name|><|fim▁begin|>//// [inferTypes1.ts] type Unpacked<T> = T extends (infer U)[] ? U : T extends (...args: any[]) => infer U ? U : T extends Promise<infer U> ? U : T; <|fim▁hole|>type T03 = Unpacked<Promise<string>>; // string type T04 = Unpacked<Unpacked<Promise...
type T00 = Unpacked<string>; // string type T01 = Unpacked<string[]>; // string type T02 = Unpacked<() => string>; // string
<|file_name|>0002_auto_20170205_1501.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-05 15:01 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('loginapp', '0001_initial'), ...
operations = [
<|file_name|>PersistFileSourcesStep.java<|end_file_name|><|fim▁begin|>/* * SonarQube, open source software quality management tool. * Copyright (C) 2008-2014 SonarSource * mailto:contact AT sonarsource DOT com * * SonarQube is free software; you can redistribute it and/or * modify it under the terms of the GNU Le...
if (scmReport != null) { readers.add(new ScmLineReader(scmReport)); } if (highlightingIterator != null) {
<|file_name|>switcher.js<|end_file_name|><|fim▁begin|>define(function (require) { 'use strict'; /** * Module dependencies */ var defineComponent = require('flight/lib/component'); /** * Module exports */ return defineComponent(switcher); /** * Module function */ function switcher(...
};
<|file_name|>home.ts<|end_file_name|><|fim▁begin|>import {Component} from 'angular2/core'; @Component({ selector: 'home',<|fim▁hole|>export class HomeCmp { constructor() { // // a must for initiating materialize components // // see: http://materializecss.com/tabs.html $('ul.tabs').tabs(); ...
templateUrl: './components/home/home.html', styleUrls: ['./components/home/home.css'] })
<|file_name|>smu_molecule.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2022 The Google Research 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.apach...
hydrogens_attached.atoms[i]] # With the Hydrogens attached, the number of bonds to each atom.
<|file_name|>opm.py<|end_file_name|><|fim▁begin|>import numpy as np import lxml.etree as ET from ...dates import timedelta from ...orbits import StateVector from ...orbits.man import ImpulsiveMan, ContinuousMan from ...utils import units from ...frames.orient import G50, EME2000, GCRF, MOD, TEME, TOD, CIRF<|fim▁hole|>...
<|file_name|>babi_rnn.py<|end_file_name|><|fim▁begin|>'''Trains two recurrent neural networks based upon a story and a question. The resulting merged vector is then queried to answer a range of bAbI tasks. The results are comparable to those for an LSTM model provided in Weston et al.: "Towards AI-Complete Question An...
QA16 - Basic Induction | 23 | 50.6
<|file_name|>ContainerSCM.java<|end_file_name|><|fim▁begin|>package com.gentasaurus.ubahfood.inventory; <|fim▁hole|>import com.gentasaurus.ubahfood.init.ModBlocks; import com.gentasaurus.ubahfood.item.crafting.SCMCraftingManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.Invent...
<|file_name|>fr.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS><TS version="2.0" language="fr"> <context> <name>Qgeric</name> <message> <source>Selecting...</source> <translation>Sélection...</translation> </message> <message> <source>Pass</so...
<translation>Vaut</translation> </message> <message> <source>Apply</source>
<|file_name|>Requestable.js<|end_file_name|><|fim▁begin|>/** * @file * @copyright 2016 Yahoo Inc. * @license Licensed under {@link https://spdx.org/licenses/BSD-3-Clause-Clear.html BSD-3-Clause-Clear}. * Github.js is freely distributable. */ import axios from 'axios'; import debug from 'debug'; im...
}; log(`${config.method} to ${config.url}`);
<|file_name|>node.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/. */ //! The core DOM types. Defines the basic DOM hierarchy as well ...
<|file_name|>CommandException.java<|end_file_name|><|fim▁begin|>package org.github.sriki77.edgesh.command; public class CommandException extends RuntimeException {<|fim▁hole|> super(message); } }<|fim▁end|>
public CommandException(String message) {
<|file_name|>instantiate.py<|end_file_name|><|fim▁begin|>from libcloud.compute.types import Provider<|fim▁hole|>from libcloud.compute.providers import get_driver cls = get_driver(Provider.AZURE) driver = cls(subscription_id="subscription-id", key_file="/path/to/azure_cert.pem")<|fim▁end|>