prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>struct_tuple_visual.rs<|end_file_name|><|fim▁begin|>// rustfmt-normalize_comments: true // rustfmt-wrap_comments: true // rustfmt-error_on_line_overflow: false // rustfmt-struct_lit_style: Visual fn foo() { Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(f(), b()); Foo...
<|file_name|>unboxed-closure-sugar-not-used-on-fn.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 // ...
<|file_name|>util.py<|end_file_name|><|fim▁begin|><|fim▁hole|> try: int(nr) return True except ValueError: return False<|fim▁end|>
def is_integer(nr):
<|file_name|>FreakshareCom.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import re from module.plugins.Hoster import Hoster from module.plugins.internal.CaptchaService import ReCaptcha class FreakshareCom(Hoster): __name__ = "FreakshareCom" __type__ = "hoster" __pattern__ ...
<|file_name|>regions-borrow-uniq.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modi...
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. //
<|file_name|>pawn.py<|end_file_name|><|fim▁begin|>""" Just a purple sphere """ from vapory import * objects = [ # SUN LightSource([1500,2500,-2500], 'color',1), # SKY Sphere( [0,0,0],1, 'hollow', Texture( Pigment( 'gradient', [0,1,0], ...
<|file_name|>typecheck.ts<|end_file_name|><|fim▁begin|>/* import * as copy from 'cerebral-addons/copy' import { debounce } from '../../Utils' import { source } from './source'<|fim▁hole|>import { update } from '../../Data/actions/update' export const typecheck: SignalType = [ debounce ( 500 ) // Wait before we do anyt...
import { SignalType } from '../../context.type' import { sourceAction } from '../actions/sourceAction' import * as unset from 'cerebral-addons/unset'
<|file_name|>redis_sensor.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Modified 30-Oct-2013 # tng@chegwin.org # Retrieve: # 1: current temperature from a TMP102 sensor # 2: Send to redis import sys,time from sys import path import datetime from time import sleep import re import redis time_to_live = 3600 #####...
def readRawTemp(self): "Reads the raw (uncompensated) temperature from the sensor" self.i2c.write8(0, 0x00) # Set temp reading mode raw = self.i2c.readList(0,2)
<|file_name|>epiceditor.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for EpicEditor 0.2 // Project: http://epiceditor.com/ // Definitions by: Boris Yankov <https://github.com/borisyankov> // Definitions: https://github.com/borisyankov/DefinitelyTyped interface EpicEditorOptions { container?: any; tex...
}; string?: { togglePreview: string; toggleEdit: string;
<|file_name|>JavaParticipantManager.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2007, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the ...
<|file_name|>issue-22992-2.rs<|end_file_name|><|fim▁begin|>// run-pass struct A(B); struct B; use std::ops::Deref; impl Deref for A { type Target = B; fn deref(&self) -> &B { &self.0 } } impl B {<|fim▁hole|>fn main() { A(B).foo(); }<|fim▁end|>
fn foo(&self) {} }
<|file_name|>http.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import Cookie import copy import threading import time import urllib import urlparse from email.utils import parsedate_tz, formatdate, mktime_tz import netlib from netlib import http, tcp, odict, utils from netlib.http import cook...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// ================================================================= // // * WARNING * // // This file is generated! // // Changes made to this file will be overwritten. If changes are // required to the generated code, the ...
pub use custom::*; pub use generated::*;
<|file_name|>Filler.java<|end_file_name|><|fim▁begin|>package jp.ac.keio.bio.fun.xitosbml.image; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map.Entry; import ij.ImagePlus; import ij.ImageStack; import ij.process.ByteProcessor; /** * T...
invert[d * lheight * lwidth + h * lwidth + w] = 1;
<|file_name|>ws_FourClass_100_AdaBoostClassifier_db2_code_gen.py<|end_file_name|><|fim▁begin|>from sklearn2sql_heroku.tests.classification import generic as class_gen<|fim▁hole|><|fim▁end|>
class_gen.test_model("AdaBoostClassifier" , "FourClass_100" , "db2")
<|file_name|>mbmalloc.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2014 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the ...
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import re from datetime import datetime from markdown import Markdown from flask import render_template, redirect, request, g, url_for, Markup, abort, flash, escape from flask.ext.lastuser import LastUser from flask.ext.lastuser.sqlalchemy imp...
try: proposal_id = int(slug.split('-')[0]) except ValueError:
<|file_name|>commander.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- import sys import config ,util ,logging ,log,downloader import xiami as xm import netease import re from threadpool import ThreadPool from time import sleep from os import path from threadpool import Terminate_Watcher from proxypool import P...
LOG.warning(u' 没有可下载任务,自动退出.')
<|file_name|>ChartStatementDisclaimer.tsx<|end_file_name|><|fim▁begin|>import React from 'react'; import FormExplain from '../common/FormExplain'; import Spacer from '../common/Spacer'; import { useSessionBatch } from '../stores/editor-store'; import AlertIcon from 'mdi-react/AlertCircleOutlineIcon'; function ChartSta...
<> <div style={{ display: 'flex', alignItems: 'center' }}>
<|file_name|>readable_serial.js<|end_file_name|><|fim▁begin|><|fim▁hole|> function ReadableSerial(list, iterator, callback) { if (!(this instanceof ReadableSerial)) { return new ReadableSerial(list, iterator, callback); } ReadableSerial.super_.call(this, {objectMode: true}); this._start(serial, l...
/* */ (function(process) { var serial = require('../serial'); module.exports = ReadableSerial;
<|file_name|>IntegrationTest.cpp<|end_file_name|><|fim▁begin|>// // Licensed to Green Energy Corp (www.greenenergycorp.com) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. Green Enery Corp licenses this ...
mLocalFDO.Update(this->RandomCounter(), i); } }
<|file_name|>MessageHeader.js<|end_file_name|><|fim▁begin|>import cx from 'classnames' import _ from 'lodash' import React, { PropTypes } from 'react' import { createShorthandFactory, customPropTypes, getElementType, getUnhandledProps, META, } from '../../lib' /** * A message can contain a header. */ func...
/** Primary content. */ children: PropTypes.node, /** Additional classes. */
<|file_name|>cmp.py<|end_file_name|><|fim▁begin|>import subprocess as sp import sys <|fim▁hole|>for toks in (l.rstrip().split("\t") for l in open(goleft_bed)): cmd = "samtools depth -a -Q 1 -r '%s:%d-%s' %s | awk '{s+=$3}END{if(NR==0){print 0}else{print s/%d}}'" % (toks[0], int(toks[1]) + 1, toks[2], bam, int(toks[...
goleft_bed = sys.argv[1] bam = sys.argv[2]
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup setup( name = 'nicknester', version = '1.3.0', py_modules = ['nester'], author = 'htýthon', author_email = 'hfpython@headfirstlabs.com', url = 'http://www.headfirstlabs....
description = 'A simple printer of nested list', )
<|file_name|>NormalMappingShader.java<|end_file_name|><|fim▁begin|>package net.seabears.game.entities.normalmap; import static java.util.stream.IntStream.range; import java.io.IOException; import java.util.List; import org.joml.Matrix4f; import org.joml.Vector3f; import org.joml.Vector4f; import net.seabears.game.e...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)] #![allow(non_camel_case_types)] extern crate libc; use libc::{c_char, c_int, c_void, c_uint}; use libc::types::os::arch::c95::size_t; pub static MDB_FIXEDMAP : c_uint = 0x01; pub static MDB_NOSUBDIR : c_uint = 0x4000; pub static MD...
<|file_name|>engine.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
additional_jars = ",".join(paths)
<|file_name|>ObjectPolicyType.java<|end_file_name|><|fim▁begin|>/* * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * publis...
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details.
<|file_name|>precisionoptics.ts<|end_file_name|><|fim▁begin|>import throat from 'throat' import { scrape, Info, Selectors } from '../common' import * as helpers from '../../helpers' import { ItemType, IItemListing } from '../../graphql-types' import { PRECISION_OPTICS } from '../../vendors' export function precisionO...
case ItemType.centerfire: return Promise.all([].map((t) => throttle(() => work(t)))).then(helpers.combineResults) case ItemType.rimfire:
<|file_name|>IconServlet.java<|end_file_name|><|fim▁begin|>package com.dotmarketing.servlets; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Calendar; import java.util.Date; import java.util.Locale; import java.util.TimeZone; impor...
Date ifModifiedSinceDate = httpDate.parse(ifModifiedSince); if(_lastModified.getTime() <= ifModifiedSinceDate.getTime()){ response.setStatus(HttpServletResponse.SC_NOT_MODIFIED ); return;
<|file_name|>widget.rs<|end_file_name|><|fim▁begin|>extern crate nanovg; extern crate sdl2; extern crate sdl2_sys; use std::fmt; use std::rc::{Rc, Weak}; use std::cell::RefCell; use self::sdl2::keyboard::{Mod, Scancode}; use self::sdl2::mouse::Mouse; use self::sdl2_sys::keycode::SDL_Keymod; use common::Cursor; use the...
fn set_size(&mut self, s: (u32, u32)) { self.size = s; }
<|file_name|>instance_image_action.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 '''------------------------------------------------------------------------- Copyright IBM Corp. 2015, 2015 All Rights Reserved Licensed under the Apache License, Version 2.0 (the "License"); you may not...
<|file_name|>adapter.rs<|end_file_name|><|fim▁begin|>use api::{ Error, Operation, User }; use channel::Channel; use io::*; use services::*; use values::*; use transformable_channels::mpsc::*; use std::collections::HashMap; use std::sync::Arc; pub type ResultMap<K, T, E> = HashMap<K, Result<T, E>>; /// A witness tha...
/// Request values from a group of channels.
<|file_name|>p035.rs<|end_file_name|><|fim▁begin|>//! [Problem 35](https://projecteuler.net/problem=35) solver. #![warn(bad_style, unused, unused_extern_crates, unused_import_braces, unused_qualifications, unused_results)] #[macro_use(problem)] extern crate common; extern crate integer; extern crate p...
let circ = Integer::from_digits(buf.iter().map(|&x| x), radix); if !ps.contains(circ) { return false;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
__all__ = ["Initiator","Simulator","Evaluator","Modelator","Validator"]
<|file_name|>fr.py<|end_file_name|><|fim▁begin|># coding: utf8 { '!langcode!': 'fr', '!langname!': 'Français', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez me...
'Access Control': "Contrôle d'accès", 'Administrative Interface': "Interface d'administration", 'Administrative interface': "Interface d'administration", 'Ajax Recipes': 'Recettes Ajax',
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|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" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ex...
# 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|>FormRoleList.java<|end_file_name|><|fim▁begin|>/* Copyright 2016 Goldman Sachs. 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 applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
<|file_name|>WintersChill.js<|end_file_name|><|fim▁begin|>import React from 'react'; import Analyzer from 'parser/core/Analyzer'; import EnemyInstances from 'parser/shared/modules/EnemyInstances'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import SpellLink from 'common/SpellLink'; im...
<SpellIcon id={SPELLS.FROSTBOLT.id} /> {formatPercentage(this.hardcastUtil, 0)}% <small>Pre-casts shattered</small> </BoringSpellValueText> </Statistic> );
<|file_name|>regions-variance-invariant-use-covariant.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT<|fim▁hole|>// // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or h...
// file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT.
<|file_name|>OutgoingConnectionFactory.java<|end_file_name|><|fim▁begin|>// ********************************************************************** // // Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in thi...
{ callback.setException(ex);
<|file_name|>test_edf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|># Alan Leggitt <alan.leggitt@ucsf.edu> # Alexandre Barachant <alexandre.barachant@gmail.com> # Stefan Appelhoff <stefan.appelhoff@mailbox.org> # Joan Massich <mailsik@gmail.com> # # License: BSD ...
# Authors: Teon Brooks <teon.brooks@gmail.com> # Martin Billinger <martin.billinger@tugraz.at>
<|file_name|>REThread.py<|end_file_name|><|fim▁begin|>'''Enhanced Thread with support for return values and exception propagation.''' # Copyright (C) 2007 Canonical Ltd. # Author: Martin Pitt <martin.pitt@ubuntu.com> # # This program is free software; you can redistribute it and/or modify it # under the terms of the ...
'''exc_raise() raises caught thread exception.''' t = REThread(target=div, args=(1, 0)) t.start()
<|file_name|>functions_8.js<|end_file_name|><|fim▁begin|>var searchData= [ ['setdebugflags',['setDebugFlags',['../dwarfDbgDebugInfo_8c.html#ab42dd1f5e0f83cb14eed0902aa036a95',1,'dwarfDbgDebugInfo.c']]],<|fim▁hole|> ['showcontents',['showContents',['../dwarfDbgLocationInfo_8c.html#af177f930f13d0122065173a8bfbd0317',1...
['showchildren',['showChildren',['../dwarfDbgDieInfo_8c.html#a7e7301f838fc67cbb4555c6c250c2dc0',1,'dwarfDbgDieInfo.c']]],
<|file_name|>testThread.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtCore import numpy from ilastik.core import dataImpex import shlex from ilastik.core.listOfNDArraysAsNDArray import ListOfNDArraysAsNDArray from ilastik.core.overlays.selectionOverlay import SelectionAccessor from subprocess import Popen, PIPE i...
cl = "h5diff -cv '" + file1 + "' '" + file2 + "'"
<|file_name|>checksum_comparator.py<|end_file_name|><|fim▁begin|>""" Helcio Macedo Checksum Verifier v1.0 https://github.com/neomacedo/ScriptsUteis ----------------------------------------------------------- Script used to compare if local file its the same as remote. """ import hashlib import urllib2 import optparse ...
remote_url = 'https://raw.githubusercontent.com/neomacedo/Area51/master/arquivo_teste.txt' # Local address to the file local_url = '../../GitHub/Area51/arquivo_teste.txt'
<|file_name|>artifact_utils.py<|end_file_name|><|fim▁begin|># Copyright 2021 The Kubeflow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICEN...
return
<|file_name|>0007_auto_20160418_0959.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-04-18 07:59 from __future__ import unicode_literals<|fim▁hole|>from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('primus', '0006...
<|file_name|>ema.py<|end_file_name|><|fim▁begin|>"""! @brief Cluster analysis algorithm: Expectation-Maximization Algorithm for Gaussian Mixture Model. @details Implementation based on paper @cite article::ema::1. @authors Andrei Novikov (pyclustering@yandex.ru) @date 2014-2020 @copyright BSD-3-Clause """ ...
<|file_name|>BasicSprite.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # n...
self.__class__.allsprites.append(self)
<|file_name|>get_initial_tokens.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import sys def tokens(nodes): for i in range(0, nodes): print (i * (2 ** 127 - 1) / nodes)<|fim▁hole|><|fim▁end|>
tokens(int(sys.argv[1]))
<|file_name|>Vector2.cpp<|end_file_name|><|fim▁begin|>#include <tuple> #include "Vector2.h" Vector2::Vector2(void) { } Vector2::Vector2(float X, float Y) { this->X = X; this->Y = Y; } // Returns the length of the vector float Vector2::Magnitude() { return sqrt(X * X + Y * Y); } // Returns the length of the vect...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>import datetime from django.db import models from django.core.exceptions import ValidationError def validate_year(year): if year is None: return # Years can be null if year < 1800 or year > datetime.datetime.now().year: raise ValidationErro...
date_collected_str.short_description = "Date Collected"
<|file_name|>cmdexc.py<|end_file_name|><|fim▁begin|># vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU...
Defined here to avoid circular dependency hell. """
<|file_name|>01-mahout-test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this f...
# action status=completed on success if (result['status'] != "completed"): self.fail('Mahout smoke-test failed: %s' % result)
<|file_name|>MemoryUsageSupportChromium.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2012 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of sou...
return WebKit::Platform::current()->lowMemoryUsageMB(); } int MemoryUsageSupport::highMemoryUsageMB()
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for GoodDog 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.10/howto/deployment/wsgi/ """<|fim▁hole|>from django.core.wsgi import get_wsg...
import os
<|file_name|>it.py<|end_file_name|><|fim▁begin|># coding: utf8 { '!=': '!=', '!langcode!': 'it', '!langname!': 'Italiano', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" è un\'espressione opzionale come "campo1=\'nuovo valore\'". Non si può ...
'Clear': 'Resetta', 'Clear CACHE?': 'Resetta CACHE?', 'Clear DISK': 'Resetta DISK', 'Clear RAM': 'Resetta RAM',
<|file_name|>controlrenderer_test.js<|end_file_name|><|fim▁begin|>// Copyright 2008 The Closure Library Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // //...
} function testSetAriaStatesDecorate_ariaStateSelected() { control.setSupportedState(goog.ui.Component.State.SELECTED, true);
<|file_name|>GaussianModelInferencerTest.java<|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...
import com.github.thorbenlindhauer.test.util.TestConstants; import com.github.thorbenlindhauer.variable.ContinuousVariable; /**
<|file_name|>test_eq.py<|end_file_name|><|fim▁begin|>from typing import Any import pytest from permutation import Permutation EQUIV_CLASSES = [ [ Permutation(), Permutation(1), Permutation(1, 2), Permutation(1, 2, 3, 4, 5), Permutation.cycle(), Permutation.from_cycle...
assert p != x assert not (p == x)
<|file_name|>tweet.py<|end_file_name|><|fim▁begin|># Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/lazylibrarian/ # # This file is part of Sick Beard. # # Sick Beard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the...
if lazylibrarian.TWITTER_NOTIFY_ONDOWNLOAD: self._notifyTwitter(common.notifyStrings[common.NOTIFY_DOWNLOAD]+': '+title)
<|file_name|>simple.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses...
<|file_name|>WikiwhoRelationships.py<|end_file_name|><|fim▁begin|>''' Created on Feb 20, 2013 @author: Maribel Acosta @author: Fabian Floeck ''' from wmf import dump from difflib import Differ from time import time from structures.Revision import Revision from structures.Paragraph import Paragraph from structures....
text = [] authors = []
<|file_name|>authorization_interceptor.js<|end_file_name|><|fim▁begin|>/** * @license Copyright (c) 2012, Viet Trinh All Rights Reserved. * Available via MIT license. */ /** * An authorizeation interceptor used to determine if the user can access the given resource. */ define([ 'framework/controller/interceptor/i...
<|file_name|>beholder.py<|end_file_name|><|fim▁begin|># Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
self.PLUGIN_LOGDIR,
<|file_name|>TimeFilter.spec.js<|end_file_name|><|fim▁begin|>describe('TimeFilter', function () { beforeEach(module('ngMovies')); var TimeFilter; beforeEach(inject(function ($filter) { TimeFilter = $filter('TimeFilter'); })); it('should be a filter', function () { expect(TimeFilter).not.toBe(undef...
});
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>try: from setuptools import setup except ImportError: from distutils.core import setup setup(name='agarnet', packages=['agarnet'], py_modules=['agarnet'], version='0.2.4', description='agar.io client and connection toolkit', insta...
'Topic :: Games/Entertainment', ], )
<|file_name|>touchserialquery.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2021 KylinSoft Co., Ltd. * * 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 of the License, or ...
ret = Success;
<|file_name|>allergies_test.py<|end_file_name|><|fim▁begin|>import unittest from allergies import Allergies # Python 2/3 compatibility if not hasattr(unittest.TestCase, 'assertCountEqual'): unittest.TestCase.assertCountEqual = unittest.TestCase.assertItemsEqual # Tests adapted from `problem-specifications//cano...
<|file_name|>PopulationDensity_preprocess_gen_tmcf.py<|end_file_name|><|fim▁begin|># Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/l...
_OUTPUT_COLUMNS = [ 'Date',
<|file_name|>EqualsHashcodeIT.java<|end_file_name|><|fim▁begin|>package com.buschmais.xo.neo4j.test.id; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; import java.util.Collection; import com.buschmais.xo.api.XOManager; import com.buschmais.xo.api.bootstrap.XOUnit; i...
public void equalsHashcode() { XOManager xoManager = getXOManager(); xoManager.currentTransaction().begin(); A a = xoManager.create(A.class);
<|file_name|>Scrub.js<|end_file_name|><|fim▁begin|>/** * @fileoverview Utility to detect and address folder and file sharing which is broader than intended * Removes overly broad permissions at folder level * Notifies specified email of breaches */ function main() { var user = Session.getActiveUser().getEmail();...
validatePermissions_(hostDomain, isFolder, folder, 'EDITOR', userArr, permittedDomainArr, notificationObj); //validate file permissions
<|file_name|>trees.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Модуль с преднастроенными панелями-деевьями """ from __future__ import absolute_import from m3.actions.urls import get_url from m3_ext.ui import containers from m3_ext.ui import controls from m3_ext.ui import menus from m3_ext.ui import render_com...
icon_cls='refresh-icon-16', handler='topBarRefresh'
<|file_name|>perf_plots.py<|end_file_name|><|fim▁begin|>import argparse import os import sys import numpy as np import matplotlib.pyplot as plt from perf.errsim import * def plot_x_vs_pmf(params, show=True, fpath=None): def plot(ax, x, param, **plotargs): if param['pb'] is None: param['pb'] = p...
else:
<|file_name|>backup_unittest.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Copyright (C) 2013 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of sourc...
# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
<|file_name|>archive_link.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at ht...
<|file_name|>arview.js<|end_file_name|><|fim▁begin|>"use strict"; define(["lib/three.min"], function() { var Reality = function(sourceCanvas){ // Create a default camera and scene. var camera = new THREE.Camera(); var scene = new THREE.Scene(); // Create a plane geometry to hold t...
// Create a canvas which will be used for WebGL var glCanvas = document.createElement('canvas'); // Initialize the renderer and attach it to the canvas
<|file_name|>serialize_helper.rs<|end_file_name|><|fim▁begin|>/// Generates serialization code for tuple struct (currently used for DockHandler, SplitHandler) macro_rules! gen_handle { ($name:expr, $type_name:ident, $visitor:ident) => { impl serde::ser::Serialize for $type_name { fn serialize<S>...
<|file_name|>databasehelper.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import sqlite3 VERBOSE = 0 CTABLE_DOMAIN = ''' CREATE TABLE IF NOT EXISTS Domains( did INTEGER PRIMARY KEY AUTOINCREMENT, domain VARCHAR(64) UNIQUE, indegree INTEGER, outdegree INTEGER )''' CTABLE_WEBSITE = ''' CREATE TABLE IF N...
self.conn.commit() def robotsrulesetOfDomain(self, domain):
<|file_name|>jscompiler_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2013 The Closure Library Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Li...
def testGetJavaVersion(self): def assertVersion(expected, version_string):
<|file_name|>WidgetBuilderContext.java<|end_file_name|><|fim▁begin|>package com.odcgroup.page.transformmodel.ui.builder; import org.eclipse.core.runtime.Assert; import com.odcgroup.mdf.ecore.util.DomainRepository; import com.odcgroup.page.metamodel.MetaModel; import com.odcgroup.page.metamodel.util.MetaModelRegistry;...
* @return CorporateDesign The corporate design attached to this builder */ public final CorporateDesign getCorporateDesign() {
<|file_name|>transformers.js<|end_file_name|><|fim▁begin|>var _ = require('lodash'), fs = require('fs'), path = require('path'), through = require('through'), filesize = require('file-size'); function browserify(file, options) { var source = []; function write(data) { source.push(data); }; ...
var result = '', prependHeader = renderTemplate(options, stats); try {
<|file_name|>PersonName.go<|end_file_name|><|fim▁begin|>package arn // PersonName represents the name of a person. type PersonName struct { English Name `json:"english" editable:"true"` Japanese Name `json:"japanese" editable:"true"` } // String returns the default visualization of the name. func (name *PersonName...
return name.English.String() }
<|file_name|>evtpub.py<|end_file_name|><|fim▁begin|>'''Publish sensor events to MQTT broker.''' import logging<|fim▁hole|> class MqttPublisher(): '''Publish sensor events to an MQTT broker.''' def __init__(self, broker, topic_prefix='/sensors'): '''Initialize a MqttPublisher instance.''' sel...
import paho.mqtt.publish as mqtt_pub import paho.mqtt.client as mqtt import socket
<|file_name|>config.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 applicable law o...
help="Catalog type of the clustering service."), cfg.IntOpt("wait_timeout", default=60,
<|file_name|>sql_tests.py<|end_file_name|><|fim▁begin|># Copyright 2015 Google Inc. All rights reserved. #<|fim▁hole|># 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/lic...
<|file_name|>json_viewer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 __author__ = "Ashwin Nanjappa" # GUI viewer to view JSON data as tree. # Ubuntu packages needed: # python3-pyqt5 # Std import argparse import collections import json import sys # External from PyQt5 import QtCore from PyQt5 import QtGui...
layout.addWidget(find_button) return layout
<|file_name|>reference_util.cc<|end_file_name|><|fim▁begin|>/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/...
CHECK_EQ(dnums.output_spatial_dimensions_size(), 1); // Reuse the code for Array4D-convolution by extending the 3D input into a 4D // array by adding a fourth dummy dimension of size 1 without stride, padding // and dilation.
<|file_name|>mod_luaeval.cpp<|end_file_name|><|fim▁begin|>/* meowbot Copyright (C) 2008-2009 Park Jeong Min <pjm0616_at_gmail_d0t_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 vers...
#include "defs.h"
<|file_name|>interfacesgroup.go<|end_file_name|><|fim▁begin|>package network // 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 i...
return }
<|file_name|>archive.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/li...
}
<|file_name|>button.spec.ts<|end_file_name|><|fim▁begin|>import {async, ComponentFixture, TestBed} from '@angular/core/testing'; import {Component, DebugElement} from '@angular/core'; import {By} from '@angular/platform-browser'; import {ViewportRuler} from '@angular/cdk/scrolling'; import {FakeViewportRuler} from '@an...
describe('button[md-mini-fab]', () => {
<|file_name|>angular-locale_chr-us.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; $provide.value("$locale", { "DATETIME_FORMATS": { "AMPMS": [ ...
"shortTime": "h:mm a" }, "NUMBER_FORMATS": {
<|file_name|>EntityTestSupport.java<|end_file_name|><|fim▁begin|>package org.helianto.core.test; import org.helianto.core.domain.Entity; import java.util.ArrayList; import java.util.List; /** * Class to support <code>Entity</code> tests. * * @author Mauricio Fernandes de Castro */ public class EntityTestSuppor...
* Test support method to create a <code>Entity</code> list. * * @param entityListSize */
<|file_name|>index.js<|end_file_name|><|fim▁begin|>it("should load the component from container", () => { return import("./App").then(({ default: App }) => { const rendered = App(); expect(rendered).toBe(<|fim▁hole|> "App rendered with [This is react 2.1.0] and [ComponentA rendered with [This is react 2.1.0]] an...
<|file_name|>2.py<|end_file_name|><|fim▁begin|># # Written by Luke Kenneth Casson Leighton <lkcl@lkcl.net> # This theme is demonstrates how to #this import statement allows access to the karamba functions import karamba drop_txt = None #this is called when you widget is initialized def initWidget(widget): # ...
# file (see 2.theme) and then call getIncomingData() in here.
<|file_name|>addContentEditorWebPart.d.ts<|end_file_name|><|fim▁begin|>import { IContentEditorWebPart } from "../webpart"; <|fim▁hole|> * Adds a content editor webpart to a page. * @category Helper * @param url The relative url of the page. * @param wpProps The webpart properties. * @returns A promise is returned. ...
/**
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), "download-atom-shell": {<|fim▁hole|> }); grunt.loadNpmTasks('grunt-download-atom-shell'); };<|fim▁end|>
version: "0.23.0", outputDir: "./atom-shell", rebuild: true }
<|file_name|>simple_goods.go<|end_file_name|><|fim▁begin|>/** * Copyright 2015 @ z3q.net. * name : simple_goods.go * author : jarryliu * date : 2015-08-18 09:24 * description : * history : */<|fim▁hole|> // 简单商品信息 type SimpleGoods struct{ GoodsId int `json:"id"` GoodsImage string `json:"img"` Name string `...
package sale