prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>pages_6.js<|end_file_name|><|fim▁begin|>var searchData= [ ['revision_20history_20of_20cmsis_2dpack',['Revision History of CMSIS-Pack',['../pack_revisionHistory.html',1,'index']]]<|fim▁hole|><|fim▁end|>
];
<|file_name|>box.py<|end_file_name|><|fim▁begin|>"""Box geometry.""" from __future__ import division from .helpers import poparg class Box(object): """A Box holds the geometry of a box with a position and a size. Because of how it is typically used, it takes a single dictionary of arguments. The dicti...
>>> args = {'foo': 17, 'size': (10, 50), 'left': (100, 200)} >>> b = Box(args)
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import Ember from 'ember'; import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin'; import InfinityRoute from "../../../../mixins/infinity-route"; export default Ember.Route.extend(InfinityRoute, AuthenticatedRouteMixin, { _listName: 'mod...
}, search: function () { this.set('_listName', 'model.content');
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// WARNING: This file is regenerated by the `cargo func new` command. // Only the `azure_functions::export!` macro invocation will be preserved. // Export the modules that define Azure Functions here. azure_functions::export! { greet,<|fim▁hole|><|fim▁end|>
greet_with_json, }
<|file_name|>hq-category-test.js<|end_file_name|><|fim▁begin|>import { moduleForComponent, test<|fim▁hole|>moduleForComponent('hq-category', { // Specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }); test('it renders', function(assert) { assert.expect(2); //...
} from 'ember-qunit';
<|file_name|>volume_axes.py<|end_file_name|><|fim▁begin|>from traits.api import Bool, Float, Tuple from tvtk.api import tvtk from .volume_scene_member import ABCVolumeSceneMember # Convenience for the trait definitions below FloatPair = Tuple(Float, Float) class VolumeAxes(ABCVolumeSceneMember): """ An object w...
# What are the physical value ranges for each axis? visible_axis_ranges = Tuple(FloatPair, FloatPair, FloatPair)
<|file_name|>IlonaPositioningApplicationContext.java<|end_file_name|><|fim▁begin|>package uni.miskolc.ips.ilona.positioning.web; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; i...
registry.addResourceHandler("/fonts/**").addResourceLocations("/fonts/"); }
<|file_name|>amr_corpus_reader.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 from hgraph import Hgraph import amr_graph_description_parser #import tree import re import sys import string from collections import defaultdict as ddict def format_tagged(s): #return [tuple(p.split('/')) for p in s.split()] re...
m = re.match(r'ROOT\s+([^\-]+)\-(\d+)', a) if m:
<|file_name|>IndexHits.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2002-2011 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero Gene...
/** * Closes the underlying search result. This method should be called * whenever you've got what you wanted from the result and won't use it
<|file_name|>GBA.cpp<|end_file_name|><|fim▁begin|>#include <cstdio> #include <cstdlib> #include <cstdarg> #include <cstring> #include "../../Port.h" #include "../../NLS.h" #include "../GBA.h" #include "../GBAGlobals.h" #include "../GBAinline.h" #include "../GBACheats.h" #include "GBACpu.h" #include "../GBAGfx.h" #incl...
<|file_name|>sandbox_stats_beam.go<|end_file_name|><|fim▁begin|>// Code generated by soracom-cli generate-cmd. DO NOT EDIT. package cmd import ( "github.com/spf13/cobra" )<|fim▁hole|>func init() { SandboxStatsCmd.AddCommand(SandboxStatsBeamCmd) } // SandboxStatsBeamCmd defines 'beam' subcommand var SandboxStatsBeam...
<|file_name|>doc.rs<|end_file_name|><|fim▁begin|>use std::cell::{RefCell, UnsafeCell}; use std::collections::HashMap; use std::collections::hash_map::Entry; use std::fmt::{Display, Error, Formatter}; use std::rc::Rc; use super::parser::{Builder, ParserError, ShowType}; pub struct ContainerData { direct_chi...
}
<|file_name|>test_ops.py<|end_file_name|><|fim▁begin|># encoding: utf-8 from __future__ import unicode_literals import operator import pytest from marrow.mongo import Filter from marrow.schema.compat import odict, py3 @pytest.fixture def empty_ops(request): return Filter() @pytest.fixture def single_ops(reques...
def test_ops_iteration(single_ops): assert list(iter(single_ops)) == ['roll']
<|file_name|>MotionTracker.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python ''' This SimpleCV example uses a technique called frame differencing to determine if motion has occured. You take an initial image, then another, subtract the difference, what is left over is what has changed between those two images this are...
now = int(time.time()) #If blobs are found then motion has occured if blobs:
<|file_name|>array.ts<|end_file_name|><|fim▁begin|>import { DataEntity, get, set } from '@terascope/utils'; import { PostProcessConfig, InputOutputCardinality } from '../../../interfaces'; import TransformOpBase from './base';<|fim▁hole|> private fields!: string[]; static cardinality: InputOutputCardinality = '...
export default class MakeArray extends TransformOpBase {
<|file_name|>Bar.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Animated, Easing, View, } from 'react-native'; const INDETERMINATE_WIDTH_FACTOR = 0.3; const BAR_WIDTH_ZERO_POSITION = INDETERMINATE_WIDTH_FACTOR / (1 + INDETERMINATE_WIDTH_FACT...
easing: Easing.linear, isInteraction: false, }).start((endState) => { if (endState.finished) {
<|file_name|>build_standalone.py<|end_file_name|><|fim▁begin|>import os import shutil from subprocess import call def main(): # Clean the build directory if os.path.isdir('./build'): shutil.rmtree('./build') # Freeze it call('python setup.py build') <|fim▁hole|> # Make sure the 7-zip folde...
# Zip it up - 7-zip provides better compression than the zipfile module
<|file_name|>config_test.go<|end_file_name|><|fim▁begin|><|fim▁hole|> "testing" ) func TestLoadConfig(t *testing.T) { c, err := loadConfig("testdata/config.yaml") if err != nil { t.Errorf("failed to load config: %s", err) } expect := config{ Reporter: []string{"hoge", "fuga"}, Noticer: []string{"bar"}, } ...
package horenso import ( "reflect"
<|file_name|>IsOptional.java<|end_file_name|><|fim▁begin|>/* Copyright (C) 2013-2020 Expedia 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....
this.expected = Optional.of(value); this.matcher = Optional.empty(); }
<|file_name|>CheerioPlugins.test.ts<|end_file_name|><|fim▁begin|>// // LESERKRITIKK v2 (aka Reader Critics) // Copyright (C) 2017 DB Medialab/Aller Media AS, Oslo, Norway // https://github.com/dbmedialab/reader-critics/ // // This program is free software: you can redistribute it and/or modify it under // the terms of ...
it('list to Paragraph', function() {
<|file_name|>runtime.js<|end_file_name|><|fim▁begin|>'use strict' require('should') const DummyTransport = require('chix-transport/dummy') const ProcessManager = require('chix-flow/src/process/manager') const RuntimeHandler = require('../lib/handler/runtime') const pkg = require('../package') const schemas = require(...
// trigger component action transport.receive({ protocol: 'runtime',
<|file_name|>bcs.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core'; import { imageApi } from 'app/apis'; import { default as Web3} from 'web3'; import { default as contract } from 'truffle-contract' // Import our contract artifacts and turn them into usable abstractions. impo...
<|file_name|>test_quat.py<|end_file_name|><|fim▁begin|>import unittest import pytk.geo as geo class GeoQuatTest(unittest.TestCase): def test_shape(self): self.assertRaises(geo.GeoException, geo.quat, []) self.assertRaises(geo.GeoException, geo.quat, [0]) self.assertRaises(geo.GeoExceptio...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>"""Data models for referral system.""" from __future__ import unicode_literals from builtins import map from django.db import models from django.core.urlresolvers import reverse from pttrack.models import (ReferralType, ReferralLocation, Note, ...
<|file_name|>ListExecutedCommands.js<|end_file_name|><|fim▁begin|>var fixDate = function(date) { return date.Format('2006-01-02 15:04:05'); }; var entries = executeCommand('getEntries', {}); dbotCommands = []; userCommands = []; for (var i = 0; i < entries.length; i++) { if (typeof entries[i].Contents == 'str...
'Time': fixDate(entries[i].Metadata.Created), 'Entry ID': entries[i].ID,
<|file_name|>test_ujson.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- try: import json except ImportError: import simplejson as json import calendar import datetime import decimal from functools import partial import locale import math import re import time import dateutil import numpy as np import ...
<|file_name|>utils.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 glutin; use servo::ServoCursor; use traits::view::Key; pub...
<|file_name|>pastislib.py<|end_file_name|><|fim▁begin|>""" Module containing useful functions to link PASTIS MCMC posterior samples with the bayev package. """ import os import pickle import importlib import numpy as np import PASTIS_NM import PASTIS_NM.MCMC as MCMC from PASTIS_NM import resultpath, configpath def r...
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
import './Text1';
<|file_name|>CyberArkPAS_test.py<|end_file_name|><|fim▁begin|>import pytest from CyberArkPAS import Client, add_user_command, get_users_command, \ update_user_command, add_safe_command, update_safe_command, get_list_safes_command, get_safe_by_name_command, \ add_safe_member_command, update_safe_member_command,...
}
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! "Strided" data structures mod col; pub mod raw;<|fim▁hole|>pub unsized type Col<T> = raw::Slice<T>;<|fim▁end|>
/// Strided column vector
<|file_name|>NormalAdapter.java<|end_file_name|><|fim▁begin|>package zhou.adapter; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater;<|fim▁hole|>import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import java.util.Li...
<|file_name|>macro-use-bang.rs<|end_file_name|><|fim▁begin|>// build-pass (FIXME(62277): could be check-pass?) // aux-build:test-macros.rs <|fim▁hole|>fn main() { identity!(println!("Hello, world!")); }<|fim▁end|>
#[macro_use] extern crate test_macros;
<|file_name|>test_pipmanager.py<|end_file_name|><|fim▁begin|># Copyright 2015 Facundo Batista, Nicolás Demarchi # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is d...
mgr.install('foo') mock.assert_called_with(['/usr/bin/pip', 'install', 'foo', '--bar', 'baz']) def test_install_with_options_using_equal(self):
<|file_name|>helper.py<|end_file_name|><|fim▁begin|>import codecs import logging import random def import_url(path,lo,hi): with codecs.open(path,encoding='utf-8') as f: string = f.read() arr = string.split('\n') if not lo: lo=0 if not hi: hi=len(arr) arr=arr[lo:hi] url_a...
line=addr+':'+port dic = {} dic['http'] = 'http://' + line
<|file_name|>variant-struct.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 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-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms.
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>'''WARCAT: Web ARChive (WARC) Archiving Tool Tool and library for handling Web ARChive (WARC) files.<|fim▁hole|>''' from .version import *<|fim▁end|>
<|file_name|>opengl_info.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2020-2021 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...
print(f"Shading language version: {vf.glGetString(vf.GL_SHADING_LANGUAGE_VERSION)}")
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! A Collection of Header implementations for common HTTP Headers. //! //! ## Mime //! //! Several header fields use MIME values for their contents. Keeping with the //! strongly-typed theme, the [mime](http://seanmonstar.github.io/mime.rs) crate //! is used, such as `C...
/// Exposes the Authorization header. pub mod authorization;
<|file_name|>lang.rs<|end_file_name|><|fim▁begin|>// 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. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/L...
if use_old_rt {
<|file_name|>mention.py<|end_file_name|><|fim▁begin|>from typing import Optional, Set, Text import re <|fim▁hole|>user_group_mentions = r'(?<![^\s\'\"\(,:<])@(\*[^\*]+\*)' wildcards = ['all', 'everyone'] def user_mention_matches_wildcard(mention: Text) -> bool: return mention in wildcards def extract_name(s: Te...
# Match multi-word string between @** ** or match any one-word # sequences after @ find_mentions = r'(?<![^\s\'\"\(,:<])@(\*\*[^\*]+\*\*|all|everyone)'
<|file_name|>renderer_preferences_util.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 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 "chrome/browser/renderer_preferences_util.h" #include <stdint.h> #in...
#if defined(USE_AURA) && (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) views::LinuxUI* linux_ui = views::LinuxUI::instance();
<|file_name|>TorneoGolfWindow.js<|end_file_name|><|fim▁begin|>function TorneoGolfWindow(Window) { window1 = Titanium.UI.createWindow({ tabBarHidden : true, backgroundColor : "white", width : '100%', height : '100%', layout : 'vertical' }); table = Ti.UI.createTableView({ width : '90%', he...
<|file_name|>01.0_import_su.py<|end_file_name|><|fim▁begin|>import PySeis as ps import numpy as np import pylab #import dataset input = ps.io.su.SU("./data/sample.su") input.read("./data/raw.npy") #initialise dataset #~ data, params = toolbox.initialise("geometries.su") #trim data #~ params['ns'] = 1500 #~ data = to...
<|file_name|>amtrak.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ amtrak Parse a trip itinerary of amtrak services copied into a text file. Running the file will take a trip.txt file and output a .json with one record for each amtrak service in the trip. You can also use the main ...
<|file_name|>phraseview.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the Qt Linguist of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Com...
Phrase *guess = new Phrase(candidate.source, candidate.target, def, n);
<|file_name|>RenderingRequestCaller.java<|end_file_name|><|fim▁begin|><|fim▁hole|> public void available(RenderingRequest request); }<|fim▁end|>
package com.xjt.crazypic.edit.pipeline; public interface RenderingRequestCaller {
<|file_name|>scrape.rs<|end_file_name|><|fim▁begin|>//! Messaging primitives for scraping. use std::borrow::Cow; use std::io::{self, Write}; use bip_util::bt::{self, InfoHash}; use bip_util::convert; use nom::{IResult, Needed, be_i32}; const SCRAPE_STATS_BYTES: usize = 12; /// Status for a given InfoHash. #[derive(...
} impl<'a> Iterator for ScrapeRequestIter<'a> { type Item = InfoHash;
<|file_name|>interlude.cpp<|end_file_name|><|fim▁begin|>#include <cassert> #include <cmath> #include "gtest/gtest.h" #include "interlude.hpp" // defined in the header // #define MAT_SIZE 5 using std::cout; using std::endl; // void matDiagSum(int a[][MAT_SIZE], int rows, int cols){ // } // 1 2 3 4 5 1...
// }
<|file_name|>UpdateBlockEntityCodec.java<|end_file_name|><|fim▁begin|>package net.glowstone.net.codec.play.game; import com.flowpowered.network.Codec; import io.netty.buffer.ByteBuf; import java.io.IOException; import net.glowstone.net.GlowBufUtils; import net.glowstone.net.message.play.game.UpdateBlockEntityMessage; ...
public final class UpdateBlockEntityCodec implements Codec<UpdateBlockEntityMessage> { @Override
<|file_name|>solicit_reviews.py<|end_file_name|><|fim▁begin|>from django.core.management.base import BaseCommand from aspc.courses.models import Schedule from datetime import datetime, timedelta from django.core.mail import EmailMultiAlternatives from django.template.loader import get_template from django.template impo...
html_content = htmly.render(context) user_data = schedule.user.user.all() if user_data and user_data[0].subscribed_email: msg = EmailMultiAlternatives(EMAIL_TITLE, text_content, EMAIL_HOST_USER, [schedule.user.email])
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from .ctp_gateway import CtpGateway<|fim▁end|>
<|file_name|>lib.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/. */ //! This module contains traits in script used generically in the...
MozBrowserEvent::Close => "mozbrowserclose", MozBrowserEvent::Connected => "mozbrowserconnected",
<|file_name|>iterator_self_move_assign_neg.cc<|end_file_name|><|fim▁begin|>// Copyright (C) 2012-2016 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as pub...
// with this library; see the file COPYING3. If not see // <http://www.gnu.org/licenses/>. // // { dg-do run { target c++11 xfail *-*-* } }
<|file_name|>tool_base.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013-2015 MetaMorph Software, Inc # Permission is hereby granted, free of charge, to any person obtaining a # copy of this data, including any software or models in source or binary # form, as well as any drawings, specifications, and documenta...
Optional Keys : 'MSL_version' (str), 'variable_filter' ([str]), 'result_file' (str), 'experiment' ({str})
<|file_name|>test_quadf_coef.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced // at the Lawrence Livermore National Laboratory. All Rights reserved. See files // LICENSE and NOTICE for details. LLNL-CODE-806117. // // This file is part of the MFEM library....
int vdim = quadf_vcoeff.GetVDim();
<|file_name|>test_node.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright 2020 Google LLC. 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.apa...
// tslint:disable-next-line:no-imports-from-dist import * as jasmine_util from '@tensorflow/tfjs-core/dist/jasmine_util'; // tslint:disable-next-line:no-require-imports
<|file_name|>JksHandler.py<|end_file_name|><|fim▁begin|>''' Created on 16 Sep 2016 @author: rizarse ''' import jks, textwrap, base64 from os.path import expanduser import os.path import atexit import shutil from os import makedirs class JksHandler(object): def __init__(self, params): pass @stat...
shutil.rmtree(path)
<|file_name|>loadbalancerloadbalancingrules.go<|end_file_name|><|fim▁begin|>package network // Copyright (c) Microsoft and contributors. 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 co...
// GetResponder handles the response to the Get request. The method always
<|file_name|>impl-wf-cycle-1.rs<|end_file_name|><|fim▁begin|>// Regression test for #79714 trait Baz {} impl Baz for () {} impl<T> Baz for (T,) {} trait Fiz {} impl Fiz for bool {} trait Grault { type A; type B; } impl<T: Grault> Grault for (T,) where Self::A: Baz, Self::B: Fiz, { type A = (); ...
<|file_name|>globals.d.ts<|end_file_name|><|fim▁begin|>/// <reference lib="es2015" /> type StackTraceRecord = { [key: string]: string; } declare class Exception extends Error { name: string; previous?: Exception|Error; code: number; /** * The parsed stack trace for this exception. */ ...
<|file_name|>flasher.py<|end_file_name|><|fim▁begin|>import click import os import os.path import ntpath import serial import sys import prosflasher.ports import prosflasher.upload import prosconfig from proscli.utils import default_cfg, AliasGroup from proscli.utils import get_version @click.group(cls=A...
' (default two times).') @default_cfg # @click.option('-m', '--strategy', default='cortex', metavar='STRATEGY',
<|file_name|>data.rs<|end_file_name|><|fim▁begin|>import!(); requests!(DataQuery, data); impl<'c> DataQuery<'c> { path!(data_bag); path!(item);<|fim▁hole|><|fim▁end|>
acls!(); }
<|file_name|>askpass_client.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- Mode: python -*- # Copyright (c) 2009, Andrew McNabb """Implementation of SSH_ASKPASS to get a password to ssh from pssh. The password is read from the socket specified by the environment variable PSSH_ASKPASS_SOCKET. The other ...
'/usr/libexec/pssh/pssh-askpass',
<|file_name|>cell.js<|end_file_name|><|fim▁begin|>var STATE_START = 0; var STATE_END = 1; var STATE_GROUND = 2; var STATE_FOREST = 3; var STATE_WATER = 4; function Cell(col, row) { this.col = col; this.row = row; this.state = STATE_GROUND; } Cell.prototype.draw = function() { stroke(66); switch (this.state) { ...
default: fill(255, 0, 0);
<|file_name|>AbstractHiloIdGenerator.ts<|end_file_name|><|fim▁begin|>import { IHiloIdGenerator } from "./IHiloIdGenerator"; import { IDocumentStore } from "../../Documents/IDocumentStore"; import { DocumentConventions } from "../../Documents/Conventions/DocumentConventions"; import { IRavenObject } from "../../Types/IR...
return Promise.all(returnPromises)
<|file_name|>RTBench.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2010-11 The AEminium Project (see AUTHORS file) * <|fim▁hole|> * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Plaid Programming Language is distributed in the hope that ...
* This file is part of Plaid Programming Language. * * Plaid Programming Language is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by
<|file_name|>image_provider.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016 PaddlePaddle 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.a...
if settings.color: settings.img_raw_size = settings.img_size * settings.img_size * 3
<|file_name|>startup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # gRefer is a Bibliographic Management System that uses Google Docs # as shared storage. # # Copyright (C) 2011 NigelB # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Gene...
logger.root.setLevel(log.TRACE) from gRefer.filer.systray import run_systray
<|file_name|>coreclrcallbacks.cpp<|end_file_name|><|fim▁begin|>//<|fim▁hole|>// #include "standardpch.h" #include "coreclrcallbacks.h" #include "iexecutionengine.h" typedef LPVOID (__stdcall * pfnEEHeapAllocInProcessHeap)(DWORD dwFlags, SIZE_T dwBytes); typedef BOOL (__stdcall * pfnEEHeapFreeInProcessHeap)(DWORD dwFl...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
<|file_name|>plotLFs-color-mag-trends.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python """ This script produces quality plots to check that the LFs are fine compared to simumlations. """ import sys import os from os.path import join data_dir = os.environ['DATA_DIR'] import glob from lib_plot import * #from lin...
<|file_name|>workspace.rs<|end_file_name|><|fim▁begin|>// use layout::{Layout, LayoutMessage}; use core::Stack; use std::fmt::Debug; /// Represents a single workspace with a `tag` (name), /// `id`, a `layout` and a `stack` for all windows. /// A workspace is in charge of all windows belonging /// to that workspace. At...
Workspace::new(self.id,
<|file_name|>webui.go<|end_file_name|><|fim▁begin|>package corehttp // TODO: move to IPNS const WebUIPath = "/ipfs/QmXc9raDM1M5G5fpBnVyQ71vR4gbnskwnB9iMEzBuLgvoZ" <|fim▁hole|> "/ipfs/QmUnXcWZC5Ve21gUseouJsH5mLAyz5JPp8aHsg8qVUUK8e", "/ipfs/QmSDgpiHco5yXdyVTfhKxr3aiJ82ynz8V14QcGKicM3rVh", "/ipfs/QmRuvWJz1Fc8B9cTsAYANH...
// this is a list of all past webUI paths. var WebUIPaths = []string{ WebUIPath, "/ipfs/QmenEBWcAk3tN94fSKpKFtUMwty1qNwSYw3DMDFV6cPBXA",
<|file_name|>test_game.py<|end_file_name|><|fim▁begin|>from tictactoe import game, player import unittest from unittest import mock class GameTest(unittest.TestCase): def setUp(self): self.num_of_players = 2 self.width = 3 self.height = 3 self.game = game.Game(2, 3, 3) def tes...
<|file_name|>keyboard.rs<|end_file_name|><|fim▁begin|>use alloc::borrow::ToOwned; use alloc::string::String; use alloc::vec::Vec; use hashbrown::HashSet; use d7keymap::{KeyAction, KeyCodes, KeyMap, KeySymbol}; use libd7::ipc::{self, protocol::keyboard::KeyboardEvent}; pub struct Keyboard { keycodes: KeyCodes, ...
<|file_name|>q2_sigmoid.py<|end_file_name|><|fim▁begin|>import numpy as np def sigmoid(x): """ Compute the sigmoid function for the input here. """ x = 1. / (1. + np.exp(-x)) return x def sigmoid_grad(f): """ Compute the gradient for the sigmoid function here. Note that for t...
Use this space to test your sigmoid implementation by running: python q2_sigmoid.py This function will not be called by the autograder, nor will your tests be graded.
<|file_name|>simple-struct.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/l...
// option. This file may not be copied, modified, or distributed // except according to those terms. // xfail-win32 Broken because of LLVM bug: http://llvm.org/bugs/show_bug.cgi?id=16249
<|file_name|>XHRLoader.js<|end_file_name|><|fim▁begin|>/** * @author mrdoob / http://mrdoob.com/ */ THREE.XHRLoader = function ( manager ) { this.cache = new THREE.Cache(); this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager; }; THREE.XHRLoader.prototype = { constructor: THREE.XHR...
}, false );
<|file_name|>test_misc.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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...
with pytest.raises(exception.InternetIsOffline): util.get_api_result("/stats")
<|file_name|>autoderef-method-twice.rs<|end_file_name|><|fim▁begin|>// 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. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apa...
assert_eq!(x.double(), 6);
<|file_name|>generic.py<|end_file_name|><|fim▁begin|># Copyright 2020 Red Hat, Inc. Jake Hunsaker <jhunsake@redhat.com> # This file is part of the sos project: https://github.com/sosreport/sos # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the te...
from sos.cleaner.archives import SoSObfuscationArchive
<|file_name|>game-show.ts<|end_file_name|><|fim▁begin|>import * as Immutable from "immutable"; import * as Command from "../../command"; import * as Game from "../game"; export class State extends Immutable.Record({ command: "", commandPos: 0, commandFocused: false, submittingCommand: false, commandError: u...
| IToggleSubMenu | ICommandFocus | ICommandBlur
<|file_name|>TermSource.java<|end_file_name|><|fim▁begin|>//====================================================================================== // Copyright 5AM Solutions Inc, Yale University // // Distributed under the OSI-approved BSD 3-Clause License. // See http://ncip.github.com/caarray/LICENSE.txt for details....
return this.name; }
<|file_name|>dweet.py<|end_file_name|><|fim▁begin|>""" A component which allows you to send data to Dweet.io. For more details about this component, please refer to the documentation at https://home-assistant.io/components/dweet/ """ import logging from datetime import timedelta import voluptuous as vol from homeassi...
CONFIG_SCHEMA = vol.Schema({ DOMAIN: vol.Schema({ vol.Required(CONF_NAME): cv.string,
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.http import Http404 from django.shortcuts import render_to_response from django.conf import settings from django.template import RequestContext from django.core.cache import parse_backend_uri from django_memcached.util import get_memcached_stats from djang...
<|file_name|>CGGuildApply.cpp<|end_file_name|><|fim▁begin|>#include "stdafx.h" #include "CGGuildApply.h" BOOL CGGuildApply::Read( SocketInputStream& iStream ) { __ENTER_FUNCTION iStream.Read( (CHAR*)(&m_GuildNameSize), sizeof(BYTE) ); if(m_GuildNameSize<MAX_GUILD_NAME_SIZE) { iStream.Read( (CHAR...
<|file_name|>question-form.component.ts<|end_file_name|><|fim▁begin|>import 'rxjs/add/operator/switchMap'; import { Component, OnInit,ElementRef } from '@angular/core'; import { ActivatedRoute ,Router} from '@angular/router'; import { Location } from '@angular/common'; import { Question } from...
<|file_name|>dom_wrapper.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 safe wrapper for DOM nodes that prevents layout fro...
<|file_name|>AbstractDao.java<|end_file_name|><|fim▁begin|>package it.ads.activitiesmanager.model.dao; import java.io.Serializable; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; import org.springframework.stereotype.Reposit...
return em.find(c,id); } public List<T> findAll(){
<|file_name|>PrintMediumSuccess.java<|end_file_name|><|fim▁begin|>package testclasses;<|fim▁hole|>import util.printer.SecurePrinter; public class PrintMediumSuccess { public static void main(String[] args) { String med = "This is medium information"; med = DynamicLabel.makeMedium(med); SecurePrinter.printMedium...
import de.unifreiburg.cs.proglang.jgs.support.DynamicLabel;
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! A simple dsp node for multiplying the amplitude of its inputs by some given multiplier. extern crate dsp; extern crate time_calc as time; /// A simple dsp node for multiplying the amplitude of its inputs by the held multiplier. #[derive(Copy, Clone, Debug)] pub st...
<|file_name|>const_curve25519.rs<|end_file_name|><|fim▁begin|>pub(crate) const D: [i32; 10] = [ -10913610, 13857413, -15372611, 6949391, 114729, -8787816, -6275908, -3247719, -18696448, -12055116, ]; pub(crate) const D2: [i32; 10] = [ -21827239, -5839606, -30745221, 13898782, 229458, 15978800, -12551817, -...
30924417, -8279620, 6359016, -12816335, 16508377, 9071735, -25488601, 15413635, 9524356, -7018878, ],
<|file_name|>Aliases.py<|end_file_name|><|fim▁begin|># Generated from 'Aliases.h' def FOUR_CHAR_CODE(x): return x true = True false = False rAliasType = FOUR_CHAR_CODE('alis') kARMMountVol = 0x00000001 kARMNoUI = 0x00000002 kARMMultVols = 0x00000008 kARMSearch = 0x00000100 kARMSearchMore = 0x00000200 kARMSearchRelFirs...
asiAliasName = 0 asiParentName = 1 kResolveAliasFileNoUI = 0x00000001
<|file_name|>RedundantStringOperationMerger.java<|end_file_name|><|fim▁begin|>// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.siyeh.ig.redundancy; import com.google.common.collect.ImmutableSet; import com.intellij....
<|file_name|>edit.py<|end_file_name|><|fim▁begin|># This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from copy...
from django.utils.encoding import force_text from django.utils.translation import ugettext_lazy as _
<|file_name|>client.go<|end_file_name|><|fim▁begin|>package muduorpc import ( "bufio" "fmt" "io" "net/rpc" "strings" "code.google.com/p/goprotobuf/proto" ) type ClientCodec struct { conn io.ReadWriteCloser r io.Reader payload []byte } func (c *ClientCodec) WriteRequest(r *rpc.Request, body interfa...
return }
<|file_name|>test_submitting_problems.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Integration tests for submitting problem responses and getting grades. """ import json import os from textwrap import dedent from django.conf import settings from django.contrib.auth.models import User from django.core.ur...
self.submit_question_answer('p2', {'2_1': 'Correct'}) self.submit_question_answer('p3', {'2_1': 'Incorrect'})
<|file_name|>fakeipmitool.py<|end_file_name|><|fim▁begin|>import os import time import yaml import random import argparse from rackattack.physical import pikapatch from rackattack.physical.tests.integration.main import useFakeRackConf, useFakeIPMITool intervalRanges = {0: (0.01, 0.05), 0.85: (0.3, 0.6), 0.95: (2, 4)}...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>r""" ================================== Constants (:mod:`scipy.constants`) ================================== .. currentmodule:: scipy.constants Physical and mathematical constants and units. Mathematical constants ====================== ================ =====...
<|file_name|>unsafe_rc.rs<|end_file_name|><|fim▁begin|>use std::cell::UnsafeCell; use std::rc::{Rc, Weak}; use std::ops::{Deref, DerefMut}; use std::hash::{Hash, Hasher}; pub struct UnsafeRc<T> { value: Rc<UnsafeCell<T>> } impl<T> Hash for UnsafeRc<T> { fn hash<H>(&self, state: &mut H) where H: Hasher { self.ptr(...