prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>apps.rs<|end_file_name|><|fim▁begin|>use crate::scope::Scope; #[derive(Debug, Clone, PartialEq)] pub struct App { pub client_name: String, pub redirect_uris: String, pub scopes: Scope, pub website: Option<String>, } #[derive(Default, Builder, Debug, Clone, PartialEq, Serialize)] #[builder...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup <|fim▁hole|> author='Neil Newman, Jonathan Marini', author_email='nnewman2@albany.edu, jmarini@ieee.org', packages=...
setup( name='pyapi-emergence', url='',
<|file_name|>tweeter.rs<|end_file_name|><|fim▁begin|>extern crate irc; use std::default::Default; use std::sync::Arc; use std::thread::{sleep_ms, spawn}; use irc::client::prelude::*; fn main() { let config = Config { nickname: Some(format!("pickles")), server: Some(format!("irc.fyrechat.net")), ...
}; let server = Arc::new(IrcServer::from_config(config).unwrap());
<|file_name|>sync.rs<|end_file_name|><|fim▁begin|>use core::ops::{Deref, DerefMut}; use kernel::sched::{task_locked, task_unlocked}; use arch::int::{disable_interrupts, enable_interrupts}; use spin::{Mutex as M, MutexGuard as MG}; pub struct Mutex<T> { l: M<T>, } pub struct MutexGuard<'a, T: ?Sized + 'a> { g:...
impl<T> Mutex<T> {
<|file_name|>contours.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ''' This program illustrates the use of findContours and drawContours. The original image is put up along with the image of drawn contours. Usage: contours.py A trackbar is put up which controls the contour level from -3 to 3 ''' # Pytho...
import sys PY3 = sys.version_info[0] == 3
<|file_name|>borrowck-move-out-of-struct-with-dtor.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>struct S {f:~str} impl Drop for S { fn drop(&mut self) { println(self.f); } } fn move_in_match() { match S {f:~"foo"} { S {f:_s} => {} //~^ ERROR cannot move out of type `S`, which defines the `Drop` ...
<|file_name|>checks.py<|end_file_name|><|fim▁begin|>import json import time import git import discord import os import aiohttp from cogs.utils.dataIO import dataIO from urllib.parse import quote as uriquote try: from lxml import etree except ImportError: from bs4 import BeautifulSoup from urllib.p...
# @common.deprecation_warn() def load_optional_config(): with open('settings/optional_config.json', 'r') as f:
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import copy import sys from functools import update_wrapper from django.utils.six.moves import zip import django.db.models.manager # Imported to register signal handler. from django.conf import settings from django.core.excepti...
The 'force_insert' and 'force_update' parameters can be used to insist that the "save" must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
<|file_name|>package.py<|end_file_name|><|fim▁begin|>############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, t...
# This program is free software; you can redistribute it and/or modify
<|file_name|>service.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 or ag...
def get_all_by_args(cls, context, host, binary, topic): return cls._from_db_objects( context,
<|file_name|>ScriptLoader.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2005-2012 MaNGOS <http://www.getmangos.com/> * Copyright (C) 2008-2012 Trinity <http://www.trinitycore.org/> * Copyright (C) 2010-2012 Project SkyFire <http://www.projectskyfire.org/> * Copyright (C) 2011-2012 Darkpeninsula Project <http:...
<|file_name|>open.go<|end_file_name|><|fim▁begin|>// Copyright 2012, 2013 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package state import ( "fmt" "strings" "github.com/juju/errors" "github.com/juju/names" "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/txn" "github.com/juju/juju/constraint...
handle("allenvwatcher backing", st.allEnvWatcherBacking.Release()) } st.session.Close() st.mu.Unlock()
<|file_name|>offline-pin-sharp.js<|end_file_name|><|fim▁begin|>import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon';<|fim▁hole|>export default createSvgIcon(h("path", { d: "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm5 16H7v-2h10v2zm-6.7-4L7 10.7l1.4-1.4 1.9 1.9 5.3-5.3L17 7.3 ...
<|file_name|>component-helpers.ts<|end_file_name|><|fim▁begin|>export interface DragDelta { x: number y: number<|fim▁hole|> let targets: HTMLElement[] = [] export function getDragDeltas ( onDragDelta: (d: DragDelta) => void, onMouseDown?: (e?: MouseEvent) => void ) { let oldX = 0 let oldY = 0 let target: HTMLE...
}
<|file_name|>0015_auto_20161111_0313.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-11 03:13 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.M...
dependencies = [ ('administration', '0014_auto_20161111_0255'), ]
<|file_name|>optimize_grid.py<|end_file_name|><|fim▁begin|># Explore some possibilities for optimizing the grid. from __future__ import print_function from . import (paver,trigrid,orthomaker) from ..spatial import field import sys import numpy as np # from numpy import * from scipy.linalg import norm # from pylab i...
starting_worst = self.cell_scores(cells).min() worst = starting_worst
<|file_name|>characters.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals # Character ranges of letters letters = 'a-zA-Z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u0103\u0106\u0107\ \u010c-\u010f\u0112-\u0115\u011a-\u012d\u0131\u0141\u0142\u0147\u0148\ \u015...
'goO': '\uF798', 'goP': '\uF799', 'goQ': '\uF79A', 'goR': '\u211C',
<|file_name|>AtomicTool.cpp<|end_file_name|><|fim▁begin|>// // Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved // LICENSE: Atomic Game Engine Editor and Tools EULA // Please see LICENSE_ATOMIC_EDITOR_AND_TOOLS.md in repository root for // license information: https://github.com/AtomicGameEngine/Atom...
DEFINE_APPLICATION_MAIN(AtomicTool::AtomicTool);
<|file_name|>index.js<|end_file_name|><|fim▁begin|>function example(name, deps) { console.log('This is where fpscounter plugin code would execute in the node process.');<|fim▁hole|>module.exports = example;<|fim▁end|>
}
<|file_name|>ElasticJobSnapshotServiceConfigurationTest.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF li...
import org.apache.shardingsphere.elasticjob.lite.spring.boot.job.fixture.EmbedTestingServer;
<|file_name|>atmega16hvb.js<|end_file_name|><|fim▁begin|>module.exports = { "name": "ATmega16HVB", "timeout": 200, "stabDelay": 100, "cmdexeDelay": 25, "syncLoops": 32, "byteDelay": 0, "pollIndex": 3, "pollValue": 83, "preDelay": 1, "postDelay": 1, "pgmEnable": [172, 83, 0, 0], "erase": { "c...
"poll2": 0, "poll1": 0, "size": 512,
<|file_name|>AbstractChannel.js<|end_file_name|><|fim▁begin|>var KevoreeEntity = require('./KevoreeEntity'); /** * AbstractChannel entity * * @type {AbstractChannel} extends KevoreeEntity */ module.exports = KevoreeEntity.extend({ toString: 'AbstractChannel', construct: function () { this.remoteNodes = {}...
addInternalInputPort: function (port) { this.inputs[port.getName()] = port; }
<|file_name|>0046_element_tags.py<|end_file_name|><|fim▁begin|># Generated by Django 3.1.7 on 2021-02-28 19:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('siteapp', '0041_project_tags'), ('controls', '0045_auto_20210228_1431'), ] op...
model_name='element', name='tags',
<|file_name|>Building.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017 Red Hat, Inc. and/or its affiliates. * * 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.apac...
* limitations under the License.
<|file_name|>confversion.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (c) 2010-2010 by drubin <drubin at smartcube.co.za> # # 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 Foundatio...
<|file_name|>tabs.py<|end_file_name|><|fim▁begin|># Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, V...
floating_ips.tables import FloatingIPsTable from openstack_dashboard.dashboards.project.access_and_security.\ keypairs.tables import KeypairsTable from openstack_dashboard.dashboards.project.access_and_security.\
<|file_name|>comment.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-APACHE or // http://www.apache.org/license...
struct CharClasses<T> where T: Iterator, T::Item: RichChar,
<|file_name|>BasicInstructionPropertyDumper.cpp<|end_file_name|><|fim▁begin|>//===--- BasicInstructionPropertyDumper.cpp -------------------------------===// // // This source file is part of the Swift.org open source project //<|fim▁hole|>// // See http://swift.org/LICENSE.txt for license information // See http://swi...
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception
<|file_name|>ClientSecretDto.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2018 the original author or authors. * * This file is part of jBB Application Project. * * Licensed under the Apache License, Version 2.0 (the "License"); * You may obtain a copy of the License at * http://www.apache.org/l...
private String clientSecret;
<|file_name|>position.py<|end_file_name|><|fim▁begin|>from django import forms from faculty.event_types.base import BaseEntryForm from faculty.event_types.base import CareerEventHandlerBase from faculty.event_types.choices import Choices from faculty.event_types.base import TeachingAdjust from faculty.event_types.fiel...
<|file_name|>shader_param.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Gfx-rs Developers. // // 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...
<|file_name|>duck_test.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python class Duck: """ this class implies a new way to express polymorphism using duck typing. This class has 2 functions: quack() and fly() consisting no parameter. """ def quack(self): print("Quack, quack!"...
# passing object to in_the_forest() function
<|file_name|>import_vosa.py<|end_file_name|><|fim▁begin|>import csv from datetime import datetime from django.conf import settings from django.core.management import BaseCommand from bustimes.utils import download_if_changed from ...models import Licence, Registration, Variation def parse_date(date_string): if da...
# previous_line = None # cardinals = set()
<|file_name|>watchLoginStatus.tsx<|end_file_name|><|fim▁begin|>import type { TRPGMiddleware } from '@redux/types/__all__'; import constants from '../constants/index'; import type { UserInfo } from '@redux/types/user'; const { LOGIN_SUCCESS, LOGIN_TOKEN_SUCCESS, LOGIN_FAILED } = constants; /** * 监听登录状态的变更 * 将其登录结果发送到...
<|file_name|>TeamRepository.ts<|end_file_name|><|fim▁begin|>import Team = require('./Team');<|fim▁hole|> private teams:Team[] = [] teamExists(teamID:string, successCallBack:Function, failCallBack:Function) { var team:Team = this.getTeam(teamID); (team != null) ? successCallBack(team) : failCall...
class TeamRepository {
<|file_name|>test-extensions.test.ts<|end_file_name|><|fim▁begin|>/* eslint-disable no-console */ import assert from "assert"; import * as fs from "fs"; import * as os from "os"; import * as asyncio from "@azure-tools/async-io"; import * as tasks from "@azure-tools/tasks"; import { ExtensionManager, InvalidPackageIdent...
<|file_name|>datatype-date-format_fr.js<|end_file_name|><|fim▁begin|>/*<|fim▁hole|>Copyright 2012 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add("lang/datatype-date-format_fr",function(a){a.Intl.add("datatype-date-format","fr",{"a":["dim.","lun.","mar.","mer."...
YUI 3.5.0 (build 5089)
<|file_name|>provision.test.tsx<|end_file_name|><|fim▁begin|>/* eslint-env jest */ /* import * as RPCTypes from '../../constants/types/rpc-gen' import * as Constants from '../../constants/provision' import * as Tabs from '../../constants/tabs' import * as ProvisionGen from '../provision-gen' import * as RouteTreeGen fr...
<|file_name|>messageAction.js<|end_file_name|><|fim▁begin|>import { Template } from 'meteor/templating'; Template.messageAction.helpers({ isButton() { return this.type === 'button'; }, areButtonsHorizontal() { return Template.parentData(1).button_alignment === 'horizontal'; }, jsActionButtonClassname(processi...
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|>import { AppHeader, AppFooter } from "../App"; import config from "../../../config"; import { fromJS } from "immutable"; import Spinner from "react-spinner"; import { PlaylistNavBar } from "../../components/PlaylistNavBar"; export class LoadingMoment exten...
import React, { Component } from "react";
<|file_name|>google-cloud-spanner.d.ts<|end_file_name|><|fim▁begin|>/* Copyright 2017 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unl...
<|file_name|>email_mirror.py<|end_file_name|><|fim▁begin|>"""Cron job implementation of Zulip's incoming email gateway's helper for forwarding emails into Zulip. https://zulip.readthedocs.io/en/latest/production/email-gateway.html The email gateway supports two major modes of operation: An email server (using postfix...
Run this in a cronjob every N minutes if you have configured Zulip to poll an external IMAP mailbox for messages. The script will then
<|file_name|>test_xlog_cleanup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the under the Apache License, Version 2.0 (the "License"); you may not use this file except in co...
results = curs.fetchall() if (int(results[0][0]) == 0): break;
<|file_name|>multihmatrix.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # coding: utf-8 import os,sys import ctypes import numpy as np from .hmatrix import _C_HMatrix, HMatrix class _C_MultiHMatrix(ctypes.Structure): """Holder for the raw data from the C++ code.""" pass class AbstractMultiHMatrix: ...
Parameters ---------- getcoefs: Callable A function evaluating an array of matrices at given coordinates.
<|file_name|>ali_alert_get_db_metric.cc<|end_file_name|><|fim▁begin|>#include <stdio.h> #include "ali_api_core.h" #include "ali_string_utils.h" #include "ali_alert.h" #include "json/value.h" #include "json/reader.h" using namespace aliyun; namespace { void Json2Type(const Json::Value& value, std::string* item)...
void Json2Type(const Json::Value& value, AlertGetDBMetricResponseType* item); template<typename T>
<|file_name|>parse-line-number-range.js<|end_file_name|><|fim▁begin|>const rangeParser = require(`parse-numeric-range`) module.exports = language => { if (!language) { return `` } if (language.split(`{`).length > 1) { let [splitLanguage, ...options] = language.split(`{`) let highlightLines = [], ...
<|file_name|>analyze_gsimg-newauth.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 # # http://apache.org/licenses/LICENSE-2.0 # ...
import os import webbrowser
<|file_name|>P1011_test.py<|end_file_name|><|fim▁begin|>import P1011 import unittest class test_phylab(unittest.TestCase): def testSteelWire_1(self): m = [10.000,12.000,14.000,16.000,18.000,20.000,22.000,24.000,26.00] C_plus = [3.50, 3.81, 4.10, 4.40, 4.69, 4.98, 5.28, 5.59, 5....
l = [34.92, 6.02, 33.05] T2 = [[13.07,13.07,13.07,13.07,13.06],[16.86,16.86,16.88,16.87,16.88], [21.79,21.82,21.83,21.84,21.84],[27.28,27.28,27.29,27.27,27.27],
<|file_name|>promise-utils.ts<|end_file_name|><|fim▁begin|>module formFor { /** * Supplies $q service with additional methods. * * <p>Intended for use only by formFor directive; this class is not exposed to the $injector. */ export class PromiseUtils implements ng.IQService { private $q_:ng.IQServ...
* @inheritDoc */ when<T>(value:T):ng.IPromise<T> { return this.$q_.when(value);
<|file_name|>SewerRule.java<|end_file_name|><|fim▁begin|>package net.anthavio.sewer.test; import net.anthavio.sewer.ServerInstance; import net.anthavio.sewer.ServerInstanceManager; import net.anthavio.sewer.ServerMetadata; import net.anthavio.sewer.ServerMetadata.CacheScope; import net.anthavio.sewer.ServerType; impo...
}
<|file_name|>test_views.py<|end_file_name|><|fim▁begin|>from django.core.urlresolvers import resolve from django.template.loader import render_to_string from django.test import TestCase from django.http import HttpRequest from django.utils.html import escape from unittest import skip from lists.views import home_page...
class HomePageTest(TestCase):
<|file_name|>repl.js<|end_file_name|><|fim▁begin|>/* * repl.js * Copyright (C) 2015 Kovid Goyal <kovid at kovidgoyal.net> * * Distributed under terms of the BSD license. */ "use strict"; /*jshint node:true */ var fs = require('fs'); var path = require('path'); var vm = require('vm'); var util = require('util'); ...
try { toplevel = RapydScript.parse(source, { 'filename':'<repl>', 'basedir': process.cwd(),
<|file_name|>_9001_developer.py<|end_file_name|><|fim▁begin|># Copyright 2015 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE...
DISABLED = False
<|file_name|>compute_rigid_transform.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding: utf-8 """ Author: Isabel Restrepo August 12, 2012 Compute rigid transformation between two point clounds using feature correspondances """ import os import sys import glob import time from optparse import OptionParser...
if not verbose: vpcl_batch.set_stdout("./logs/log_" + descriptor_type + 'percetile' + str(percentile) +'.log')
<|file_name|>tmedia_session_jsep.js<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2012-2018 Doubango Telecom <http://www.doubango.org> * License: BSD * This file is part of Open Source sipML5 solution <http://www.sipml5.org> */ // http://tools.ietf.org/html/draft-uberti-rtcweb-jsep-02 // JSEP00: webkitPeerConnection...
/* Remove 'video' media if not enabled (bug in chrome: doesn't honor 'has_video' parameter) */ if (!(this.e_type.i_id & tmedia_type_e.VIDEO.i_id)) { this.o_sdp_lo.remove_media("video");
<|file_name|>sv.js<|end_file_name|><|fim▁begin|>OC.L10N.register( "files", { "Storage is temporarily not available" : "Lagring är tillfälligt inte tillgänglig", "Storage invalid" : "Lagring ogiltig", "Unknown error" : "Okänt fel", "File could not be found" : "Fil kunde inte hittas", "Move or...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 LE GOFF Vincent # 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 source code must retain the abov...
# without specific prior written permission. #
<|file_name|>pairtree_revlookup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- """ FS Pairtree storage - Reverse lookup ==================================== Conventions used: From http://www.cdlib.org/inside/diglib/pairtree/pairtreespec.html version 0.1 This is an implementation of a reve...
<|file_name|>Logs.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import os,re,traceback,sys from waflib import Utils,ansiterm if not os.environ.get('NOSYNC',False): if sys.stdout.isatty()and id(sys.stdout)==id(sys...
colors_lst['USE']=use try: get_term_cols=ansiterm.get_term_cols except AttributeError:
<|file_name|>home.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('myApp.home', ['ngRoute']) // Declared route .config(['$routeProvider', function($routeProvider) {<|fim▁hole|>}]) // Home controller .controller('HomeCtrl', [function() { }]);<|fim▁end|>
$routeProvider.when('/home', { templateUrl: 'views/home/home.html', controller: 'HomeCtrl' });
<|file_name|>test_figure.py<|end_file_name|><|fim▁begin|>from __future__ import (absolute_import, division, print_function, unicode_literals) import six from six.moves import xrange from nose.tools import assert_equal, assert_true from matplotlib.testing.decorators import image_comparison, cle...
assert axes[-1, -1] not in fig.axes
<|file_name|>wiki.js<|end_file_name|><|fim▁begin|>// Runs the wiki on port 80<|fim▁hole|> var server = require('./server'); server.run(80);<|fim▁end|>
<|file_name|>test_extensions.py<|end_file_name|><|fim▁begin|># Copyright 2012 OpenStack Foundation # 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 # # ...
<|file_name|>dialogues.py<|end_file_name|><|fim▁begin|>""" EDENetworks, a genetic network analyzer Copyright (C) 2011 Aalto University 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 ...
w.pack(side=LEFT,padx=5,pady=5)
<|file_name|>ProfileService_WinRT.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) Microsoft Corporation // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "pch.h" #include "ProfileService_winrt.h" #include "Utils_WinRT.h" using namespace pplx; using namesp...
<|file_name|>main.py<|end_file_name|><|fim▁begin|># This file is part of Parti. # Copyright (C) 2008 Nathaniel Smith <njs@pobox.com> # Parti is released under the terms of the GNU GPL v2, or, at your option, any # later version. See the file COPYING for details. import gobject import sys import os import socket import...
"local": True,
<|file_name|>const_FRAC_1_PI.rs<|end_file_name|><|fim▁begin|>#![feature(core)]<|fim▁hole|>extern crate core; #[cfg(test)] mod tests { use core::f32::consts::FRAC_1_PI; // 1.0/pi // pub const FRAC_1_PI: f32 = 0.318309886183790671537767526745028724_f32; #[test] fn frac_1_pi_test1() { let mut value...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>__version__ = '0.4' __author__ = 'Martin Natano <natano@natano.net>' _repository = None _branch = 'git-orm' _remote = 'origin' class GitError(Exception): pass def set_repository(value): from pygit2 import discover_repository, Repository global _reposito...
return _branch
<|file_name|>Setup.py<|end_file_name|><|fim▁begin|>"""In the case that the Setup.py file fails to execute, please manually install the following packages, or execute the requirements.sh script.""" # Installing Requirements: # # pip install git+https://github.com/pwaller/py...
)
<|file_name|>elixirSenseSignatureHelpProvider.ts<|end_file_name|><|fim▁begin|>import { join, sep } from 'path'; import * as vscode from 'vscode'; import { ElixirSenseClient } from './elixirSenseClient'; import { checkElixirSenseClientInitialized, checkTokenCancellation } from './elixirSenseValidations'; function valid...
resolve(signatureHelper); })
<|file_name|>core.js<|end_file_name|><|fim▁begin|>/** * Fac.js * (c) 2017 Owen Luke * https://github.com/tasjs/fac * Released under the MIT License. */ var copy = require('./copy'); var chain = require('./chain'); var super_ = require('./super'); var core = { new: function(options){ typeof options === 'string...
isAncestorOf: function(obj){ return chain.isAncestorOf(obj, this);
<|file_name|>excel_importer.py<|end_file_name|><|fim▁begin|>from corehq.util.spreadsheets.excel import WorkbookJSONReader from soil import DownloadBase class UnknownFileRefException(Exception): pass class ExcelImporter(object): """ Base class for `SingleExcelImporter` and `MultiExcelImporter`. This ...
""" Manage importing from an excel file with multiple
<|file_name|>while-with-break.rs<|end_file_name|><|fim▁begin|>// -*- rust -*- pub fn main() {<|fim▁hole|> while i < 100 { info!(i); i = i + 1; if i == 95 { let _v: ~[int] = ~[1, 2, 3, 4, 5]; // we check that it is freed by break info!("breaking"); ...
let mut i: int = 90;
<|file_name|>models.py<|end_file_name|><|fim▁begin|># Define a custom User class to work with django-social-auth from django.db import models from django.contrib.auth.models import User class Task(models.Model): name = models.CharField(max_length=200) owner = models.ForeignKey(User) finished ...
created = models.DateTimeField(auto_now_add=True, editable=False) creator = models.ForeignKey(User, related_name="friendship_creator_set")
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>VERSION = (1, 2, 21) def get_version():<|fim▁hole|> return '%d.%d.%d'%VERSION __author__ = 'Marinho Brandao' #__date__ = '$Date: 2008-07-26 14:04:51 -0300 (Ter, 26 Fev 2008) $'[7:-2] __license__ = 'GNU Lesser General Public License (LGPL)' __url__ = 'http://dja...
<|file_name|>CompareDump.cpp<|end_file_name|><|fim▁begin|>/* --------------------------------------------------------------------------- Open Asset Import Library (assimp) --------------------------------------------------------------------------- Copyright (c) 2006-2016, assimp team All rights reserved. Redistribut...
{ ctx.push_elem(msg); }
<|file_name|>services.go<|end_file_name|><|fim▁begin|>package services import ( "fmt" "net" "net/url" "github.com/tolivb/scf/pkg/config" ) // Services interface type Services interface { Start() error } // Syslog service responsible for receiving log messages type Syslog struct { cfg *config.Config conn ...
<|file_name|>point_to_point_communication.py<|end_file_name|><|fim▁begin|>import chainer from chainer import cuda import chainer.utils class Send(chainer.Function): """Send elements to target process.""" def __init__(self, comm, peer_rank, peer_tag): chainer.utils.experimental('chainermn.functions.Se...
""" chainer.utils.experimental('chainermn.functions.send') if rank == communicator.rank:
<|file_name|>Stump.java<|end_file_name|><|fim▁begin|>package uk.co.edgeorgedev.lumber; /** * Root of Logging interface * @author edgeorge<|fim▁hole|> */ public interface Stump { /** Log a verbose message */ void v(Class<?> clazz, String message); void v(Class<?> clazz, Throwable th); //v,d,i,w,e,wtf ...
* @version 1.0 * @since 2014-06-23
<|file_name|>Util.js<|end_file_name|><|fim▁begin|>'use strict'; define([],<|fim▁hole|> var Util = class { static charToLineCh(string, char) { var stringUpToChar = string.substr(0, char); var lines = stringUpToChar.split("\n"); return { line: lines.length - 1, ch: lines[lines.length - 1].len...
function($) {
<|file_name|>show_posts.rs<|end_file_name|><|fim▁begin|>extern crate diesel_demo; extern crate diesel; use self::diesel_demo::*; use self::diesel_demo::models::*; use self::diesel::prelude::*; fn main() {<|fim▁hole|> .limit(5) .load::<Post>(&connection) .expect("Error loading posts"); prin...
use diesel_demo::schema::posts::dsl::*; let connection = establish_connection(); let results = posts.filter(published.eq(true))
<|file_name|>_uirevision.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="bar", **kwargs): super(UirevisionValidator, self).__init__( plotly_name=p...
edit_type=kwargs.pop("edit_type", "none"),
<|file_name|>notificator.js<|end_file_name|><|fim▁begin|>$(function () { 'use strict'; const notificationType = { success: 'Success', error: 'Error', info: 'Info' }, notificationTypeClass = { success: 'toast-success', info: 'toast-info', ...
if (type === notificationType.success) { Materialize.toast(message, dellay, notificationTypeClass.success)
<|file_name|>pubsub.py<|end_file_name|><|fim▁begin|># Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
for topic_name in topics_to_create: topic = Topic(topic_name) topic.create()
<|file_name|>skipUntil.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>Observable.prototype.skipUntil = skipUntil; declare module '../../Observable' { interface Observable<T> { skipUntil: SkipUntilSignature<T>; } }<|fim▁end|>
import {Observable} from '../../Observable'; import {skipUntil, SkipUntilSignature} from '../../operator/skipUntil';
<|file_name|>_ticklen.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="treemap.marker.colorbar", **kwargs ): super(TicklenValidator, self).__init__( ...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in com...
# Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS,
<|file_name|>border-left-radius.js<|end_file_name|><|fim▁begin|>/** * Border Left Radius */ module.exports = function (decl, args) { var radius = args[1] || '3px'; decl.replaceWith({ prop: 'border-bottom-left-radius', value: radius, source: decl.source }, { prop: 'border-t...
source: decl.source });
<|file_name|>worker.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/. */<|fim▁hole|>use dom::bindings::codegen::Bindings::EventHandlerBi...
use dom::bindings::codegen::Bindings::WorkerBinding; use dom::bindings::codegen::Bindings::WorkerBinding::WorkerMethods;
<|file_name|>factory.py<|end_file_name|><|fim▁begin|>value_None = object() class FactoryException(Exception): pass class Factory: class Item: def __init__(self, factory, i): self.factory = factory self.i = i @property def value(self): return self....
<|file_name|>confirm-dialog.component.spec.ts<|end_file_name|><|fim▁begin|>import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { AppModule } from '../../../../app.module'; import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material'; import { ConfirmDialogComponent } from '....
let component: ConfirmDialogComponent; let dialog: MatDialog; let fixture: ComponentFixture<ConfirmDialogComponent>;
<|file_name|>Path.cpp<|end_file_name|><|fim▁begin|>/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- * 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...
*
<|file_name|>bazel_windows_cpp_test.py<|end_file_name|><|fim▁begin|># Copyright 2017 The Bazel 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....
# Auto-generating DEF file should be disabled when custom DEF file specified exit_code, _, stderr = self.RunBazel([ 'build', '//:lib', '-s', '--output_groups=dynamic_library', '--features=windows_export_all_symbols'
<|file_name|>pieceTreeTextBuffer.ts<|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. ...
public createSnapshot(preserveBOM: boolean): ITextSnapshot {
<|file_name|>server.cpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2012-2014 The SSDB 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 "server.h" #include "../util/strings.h" #include "../util/file.h" #include "../util/config....
return NULL; }
<|file_name|>pRunoff.py<|end_file_name|><|fim▁begin|>from numpy import zeros from gwlfe.Memoization import memoize from gwlfe.MultiUse_Fxns.Runoff.RurQRunoff import RurQRunoff from gwlfe.MultiUse_Fxns.Runoff.RurQRunoff import RurQRunoff_f from gwlfe.Output.Loading.PConc import PConc from gwlfe.Output.Loading.PConc imp...
@memoize
<|file_name|>gmock-internal-utils.cc<|end_file_name|><|fim▁begin|>// Copyright 2007, 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 source code m...
// Returns the global failure reporter. Will create a // GoogleTestFailureReporter and return it the first time called. GTEST_API_ FailureReporterInterface* GetFailureReporter() { // Points to the global failure reporter used by Google Mock. gcc
<|file_name|>TodoItem.tsx<|end_file_name|><|fim▁begin|>import * as React from "react" import { Component } from "react" interface TodoProps { onClick: () => void, completed: boolean, text: string } export class TodoItem extends Component<TodoProps, void> { public render() { return ( <li onCl...
}} > {this.props.text}
<|file_name|>internal_unstable.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-APACHE or // http://www.apache.o...
() => { $crate::unstable() } }
<|file_name|>ff_select_support_class_tests.py<|end_file_name|><|fim▁begin|># Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # ...
def teardown_module(module): FirefoxSelectElementHandlingTests.driver.quit()