prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>validate_examples.py<|end_file_name|><|fim▁begin|>import os import sys import yaml import re from subprocess import Popen, PIPE, call from random import randrange from threading import Thread import SocketServer import struct import pdb sys.path.insert(0, '/usr/local/lib/python2.6/dist-packages/rethinkdb'...
if 'commands' in docs: commands.extend(docs['commands'])
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export { fadeInAnimation } from './fade-in.animation'; export { routerTransition } from './router-transition.animation';
<|file_name|>hello_world.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Sifer Aseph """Prints a "hello world" statement.""" def main(): """Utterly standard."""<|fim▁hole|> main()<|fim▁end|>
print("Hello cruel world.") if __name__ == "__main__":
<|file_name|>custom_derive_partial_eq.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.a...
extern crate syntax; extern crate syntax_ext;
<|file_name|>system_info.py<|end_file_name|><|fim▁begin|>"""This module implements functions for querying properties of the operating system or for the specific process the code is running in. """ import os import sys import re import multiprocessing import subprocess try: from subprocess import check_output as ...
try: rusage = resource.getrusage(resource.RUSAGE_SELF)
<|file_name|>country.component.spec.ts<|end_file_name|><|fim▁begin|>import { it, describe, async, inject, beforeEach, addProviders, TestComponentBuilder } from '@angular/core/testing';<|fim▁hole|>import { Observable } from 'rxjs'; import { ActivatedRoute } from '@angular/router'; describe('ArticleComponent', () => { ...
import { MockCommonDependency } from '../../app/common-mocks/mocked.services'; import { CountryComponent } from '../../../src/country/country.component';
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import API from './api';<|fim▁hole|>export { API, }<|fim▁end|>
<|file_name|>issue-14456.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
#![feature(phase)]
<|file_name|>ui_setup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/krl1to5/Work/FULL/Sequence-ToolKit/2016/resources/ui/genrep/dialogs/setup.ui' # # Created by: PyQt5 UI code generator 5.5.1 # # WARNING! All changes made in this file will be lost! ...
self.verticalLayout_5.addItem(spacerItem12) self.verticalLayout_6.addWidget(self.axis_values_area_2)
<|file_name|>export_import.rs<|end_file_name|><|fim▁begin|>use std::io; use std::io::{BufReader, BufWriter, Read, Write}; use std::time::{SystemTime, UNIX_EPOCH}; use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt}; use rmp_serde; use domain::wallet::export_import::{EncryptionMethod, Header, Record}; use domai...
<|file_name|>dupe-symbols-4.rs<|end_file_name|><|fim▁begin|>// build-fail // // error-pattern: symbol `fail` is already defined #![crate_type="rlib"] #![allow(warnings)] pub trait A { fn fail(self); } struct B;<|fim▁hole|>struct C; impl A for B { #[no_mangle] fn fail(self) {} } impl A for C { #[no...
<|file_name|>CliExpExchange.cpp<|end_file_name|><|fim▁begin|>/********************************************************************** // @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work f...
// we do not use bulk move for copying.
<|file_name|>ShouldOnlyHaveFields_create_Test.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 ...
String message = factory.create(new TextDescription("Test"), new StandardRepresentation());
<|file_name|>GuiConfig.js<|end_file_name|><|fim▁begin|>define([ 'gui/GuiTR' ], function (TR) { 'use strict'; var GuiConfig = function (guiParent, ctrlGui) { this._ctrlGui = ctrlGui; this._menu = null; // ui menu this.init(guiParent); }; GuiConfig.prototype = { /** Initialize */ init: fu...
this._menu.addCombobox('', this._langs.indexOf(TR.select), this.onLangChange.bind(this), this._langs); }, onLangChange: function (value) {
<|file_name|>converter.py<|end_file_name|><|fim▁begin|># # Copyright 2014 Telefonica Investigacion y Desarrollo, S.A.U # # 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 copyrig...
'userName': ref.get('name', None),
<|file_name|>eventloop.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013-2015 clowwindy # # 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...
self._control(fd, self._fds[fd], select.KQ_EV_DELETE) del self._fds[fd]
<|file_name|>delete.js<|end_file_name|><|fim▁begin|>$(function(){<|fim▁hole|> startDelay: 150, attr: 'placeholder', backSpeed: 100, backDelay: 500, loop: true, showCursor: false, contentType: 'html', }); });<|fim▁end|>
$('#theInput').typed({ strings: ["type a word (e.g. 'website')", "type a word (e.g. 'grammar')", "type a word (e.g. 'paper')"], typeSpeed: 50,
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>pub mod fetch;<|fim▁end|>
pub mod vm;
<|file_name|>CompositeValuesComparator.java<|end_file_name|><|fim▁begin|>/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * th...
*/ void setTop(Comparable<?>[] values) { assert values.length == arrays.length;
<|file_name|>zsyscall_nacl_386.go<|end_file_name|><|fim▁begin|>// mksyscall.pl -l32 -nacl syscall_nacl.go syscall_nacl_386.go // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // +build 386,nacl package syscall import "unsafe" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func naclClose(fd ...
_p0 = unsafe.Pointer(&b[0])
<|file_name|>helpers.py<|end_file_name|><|fim▁begin|>import functools import os import sys import unittest from contextlib import contextmanager from cloudbridge.cloud.factory import CloudProviderFactory from cloudbridge.cloud.interfaces import InstanceState from cloudbridge.cloud.interfaces import TestMockHelperMixi...
def create_test_network(provider, name):
<|file_name|>timestamp.go<|end_file_name|><|fim▁begin|>package clockService // Timestamp is one of most important feature in distributed system. // It helps remote nodes to know what event happens first, or how should they // order the events. // The usage of timestamp is highly related with the Clock Service built //...
// @param: input: another timestamp // @return: an integer indicating which one is smaller, notice
<|file_name|>t_TruncatedNormalFactory_std.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python from openturns import * TESTPREAMBLE() RandomGenerator().SetSeed(0) try : mu = NumericalPoint(4, 0.0) sigma = NumericalPoint(4, 1.0) a = NumericalPoint(4) b = NumericalPoint(4) a[0] = -4.0 b[0] = ...
import sys print "t_TruncatedNormalFactory_std.py", sys.exc_type, sys.exc_value
<|file_name|>fs.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; const fs = jest.genMockFromModule('fs'); cons...
<|file_name|>test_trix_markdown.py<|end_file_name|><|fim▁begin|>from django.test import TestCase from trix.trix_core import trix_markdown class TestTrixMarkdown(TestCase): def test_simple(self): self.assertEqual( trix_markdown.assignment_markdown('# Hello world\n'),<|fim▁hole|> self.as...
'<h1>Hello world</h1>') def test_nl2br(self):
<|file_name|>array.js<|end_file_name|><|fim▁begin|>import Ember from 'ember'; import DS from 'ember-data'; export default DS.Transform.extend({ deserialize: function(serialized) { return (Ember.typeOf(serialized) == "array") ? serialized : [];<|fim▁hole|> if (type == 'array') { return deserialized }...
}, serialize: function(deserialized) { var type = Ember.typeOf(deserialized);
<|file_name|>dstr-obj-id-init-assignment-missing.js<|end_file_name|><|fim▁begin|>// This file was procedurally generated from the following sources: // - src/dstr-assignment/obj-id-init-assignment-missing.case // - src/dstr-assignment/default/assignment-expr.template /*--- description: If the Initializer is present and...
3. ReturnIfAbrupt(rval). 4. Return the result of performing BindingInitialization for BindingPattern passing rval and undefined as arguments.
<|file_name|>shihuo.py<|end_file_name|><|fim▁begin|># -*-coding=utf-8-*- __author__ = 'Rocky' # -*-coding=utf-8-*- from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart import smtplib from email import encoders, utils import urllib.request, urllib.error, urllib.parse import time import re ...
send_kindle.sendMail(sender,receiver,subject,html)
<|file_name|>helper.py<|end_file_name|><|fim▁begin|>""" Helper module for Python version 3.0 and above - Ordered dictionaries - Encoding/decoding urls - Unicode/Bytes (for sending/receiving data from/to socket, base64) - Exception handling (except Exception as e) """ import base64 from urllib.parse import unquote, quo...
return isinstance(string, str) and string.isdigit()
<|file_name|>15.9.3.1-2.js<|end_file_name|><|fim▁begin|>/* -*- Mode: C++; tab-width: 2; 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://mozi...
<|file_name|>test_init.py<|end_file_name|><|fim▁begin|>"""Tests for the init module.""" import asyncio from asynctest import Mock, patch from pyheos import CommandError, const import pytest from homeassistant.components.heos import ( ControllerManager, async_setup_entry,<|fim▁hole|> DATA_SOURCE_MANAGER, ...
async_unload_entry, ) from homeassistant.components.heos.const import ( DATA_CONTROLLER_MANAGER,
<|file_name|>ProximityPlacementGroupListResult.java<|end_file_name|><|fim▁begin|>// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.compute.models; import com.azure.core.annotatio...
/**
<|file_name|>0019_auto_20160229_0921.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.db import migrations, models from django.conf import settings import editorsnotes.main.fields class Migration(migrations.Migration): dependencies = [ ('main', '0018_auto_20151019_1331'), ] ...
migrations.AlterField( model_name='topicassignment', name='created',
<|file_name|>frmt.go<|end_file_name|><|fim▁begin|>/* Ql builtin and external frmt command. format text */ package frmt import ( "clive/cmd" "clive/cmd/opt" "clive/nchan" "clive/zx" "errors" "fmt" "io" "strings" "unicode" ) type parFmt { rc chan string ec chan bool } func startPar(out io.Writer, indent0...
} func tabsOf(s string) int { for i := 0; i < len(s); i++ {
<|file_name|>server.js<|end_file_name|><|fim▁begin|>/* eslint-disable */ "use strict"; var express = require("express"), path = require("path"), webpack = require("webpack"), config = require("./examples.config"); config.module.loaders[0].query = {presets: ["react-hmre"]}; config.entry.unshift("webpack-ho...
var app = express(); var compiler = webpack(config);
<|file_name|>api.py<|end_file_name|><|fim▁begin|># coding=utf-8 """ An API used by the UI and RESTful API. """ from bson import ObjectId __author__ = 'tmetsch' import collections import json import pika import pika.exceptions as pikaex import uuid from suricate.data import object_store from suricate.data import str...
""" RPC call to interact with an notebook's intepreter.
<|file_name|>bibauthorid_prob_matrix.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011, 2012 CERN. ## ## Invenio 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 Sof...
if save_cache: update_status(1., "saving...") self._bib_matrix.store(cluster_set.last_name, creation_time)
<|file_name|>controller.py<|end_file_name|><|fim▁begin|>from logging import getLogger from ckan.lib.base import request, BaseController, abort, json, c from ckan.plugins import toolkit import ckan.plugins as p import json import pylons.config as config import subprocess import shlex import os, sys log = getLogger(__...
if job_name == '': log.info("API harvest - error detected, need job_name param in get parameter") abort(400, 'Bad Request, need job_name param')
<|file_name|>ga.js<|end_file_name|><|fim▁begin|>function ga() {}<|fim▁hole|><|fim▁end|>
var _gaq = []
<|file_name|>content_type.rs<|end_file_name|><|fim▁begin|>use std::collections::hash_map::{HashMap, Entry}; use std::ops::{Deref, DerefMut}; use std::fmt; use codegen::Path; use StrTendril; ///Logic expressions. #[derive(Debug)] pub enum Logic { ///a and b and ... And(Vec<Logic>), ///a or b or ... Or(...
n.push_str(&property); n.into() });
<|file_name|>XHoldSubscriptionStatus.java<|end_file_name|><|fim▁begin|>package com.xsolla.android.sdk.data.model; import java.util.List; public class XHoldSubscriptionStatus { private String status; private List<XMessage> errors; private XApi api; public String getStatus() { return status;...
public List<XMessage> getErrors() {
<|file_name|>issue-88071.rs<|end_file_name|><|fim▁begin|>// check-pass //<|fim▁hole|>// regression test for #88071 #![feature(const_btree_new)] #![feature(const_fn_trait_bound)] use std::collections::BTreeMap; pub struct CustomMap<K, V>(BTreeMap<K, V>); impl<K, V> CustomMap<K, V> where K: Ord, { pub const f...
<|file_name|>self-without-lifetime-constraint.rs<|end_file_name|><|fim▁begin|>use std::error::Error; use std::fmt; #[derive(Copy, Clone, Debug, PartialEq)] pub enum ValueRef<'a> { Null, Integer(i64), Real(f64), Text(&'a [u8]), Blob(&'a [u8]), } impl<'a> ValueRef<'a> { pub fn as_str(&self) -> F...
<|file_name|>test_server_rescue.py<|end_file_name|><|fim▁begin|># Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
<|file_name|>test_connected_graph.py<|end_file_name|><|fim▁begin|>import unittest<|fim▁hole|> from .connected_graph import Node class TestConnectedGraph(unittest.TestCase): def test_acyclic_graph(self): """Example graph from https://upload.wikimedia.org/wikipedia/commons/0/03/Directed_acyclic_graph_2.svg"...
<|file_name|>Parameter.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2013-2017 52°North Initiative for Geospatial Open Source * Software GmbH * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published * by the Free ...
* version 2 and the aforementioned licenses. *
<|file_name|>example.py<|end_file_name|><|fim▁begin|>import scrapy from congress.items import Article class Example(scrapy.Spider): '''Modeled after scrapy tutorial here: https://doc.scrapy.org/en/latest/intro/tutorial.html ''' # spider name should be name of website/source name = 'example' ...
# now we create our article item for a list of available fields see items.py article = Article( # Required fields
<|file_name|>globals.py<|end_file_name|><|fim▁begin|>""" Various global variables """ import os PROG_NAME = "gBuilder" PROG_VERSION = "2.0.0" environ = {"os":"Windows", "path":os.environ["GINI_HOME"]+"/", "remotepath":"./", "images":os.environ["GINI_HOME"]+"/share/gbuilder/images/",<...
"config":os.environ["GINI_HOME"]+"/etc/", "sav":os.environ["GINI_HOME"]+"/sav/", "tmp":os.environ["GINI_HOME"]+"/tmp/",
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export * from "./adapter" export * from "./request" export * from "./response"<|fim▁end|>
<|file_name|>methods.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 blob_loader::load_blob_sync; use connector::Connector; us...
}
<|file_name|>test_auth_admin.py<|end_file_name|><|fim▁begin|>from django import forms from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test import TestCase from django.test.client import RequestFactory from djadmin2.site import djadmin2_site from ..admin2 import User...
<|file_name|>rank_quotes.py<|end_file_name|><|fim▁begin|>from django.core.management.base import BaseCommand, CommandError from quotes_app.tasks import rank_all import logging <|fim▁hole|> help = 'Runs reranking algorithms on the Quotes.' def handle(self, *args, **options): logger.info('Running {0} mana...
logger = logging.getLogger(__name__) class Command(BaseCommand):
<|file_name|>Manifest.py<|end_file_name|><|fim▁begin|>files = [ "cocotb_prio3.vhd", "cocotb_prio2.vhd", "cocotb_wb_loopback.vhd", <|fim▁hole|><|fim▁end|>
]
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import { Model } from "chomex"; import catalog from "./catalog"; export interface DeckCaptureLike { _id: any; title: string; row: number; col: number; page: number; cell: { x: number; y: number; w: number, h: number; }; protected?: boolean; } /** * 編成キャプチャ...
} static listObj(): DeckCaptureLike[] {
<|file_name|>dao.go<|end_file_name|><|fim▁begin|>// // Copyright (c) 2018 Red Hat, 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...
func (d *Dao) SetRaw(key string, val string) error { _, err := d.kapi.Set(context.Background(), key, val /*opts*/, nil) return err }
<|file_name|>db.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ######################################################################### ## This scaffolding model makes your app work on Google App Engine too ## File is released under public domain and you can use without limitations ##########################...
## configure email mail = auth.settings.mailer mail.settings.server = 'logging' if request.is_local else myconf.get('smtp.server')
<|file_name|>card.py<|end_file_name|><|fim▁begin|>class Card: """ Static class that handles cards. We represent cards as 32-bit integers, so there is no object instantiation - they are just ints. Most of the bits are used, and have a specific meaning. See below: Card...
@staticmethod def new(string): """
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
# Pylot
<|file_name|>sized-borrowed-pointer.rs<|end_file_name|><|fim▁begin|>// run-pass #![allow(dead_code)] // Possibly-dynamic size of typaram should be cleared at pointer boundary. <|fim▁hole|>fn foo<T>() { bar::<&T>() } pub fn main() { }<|fim▁end|>
// pretty-expanded FIXME #23616 fn bar<T: Sized>() { }
<|file_name|>en.js<|end_file_name|><|fim▁begin|>// UK lang variables tinyMCE.addI18n('en.pastecode',{ paste_code_desc : _('Insert HTML code as text'), paste_code_title : _('Use CTRL+V on your keyboard to paste the code into the window.'), paste_html_desc : _('Paste HTML fragment (embed code)'), paste_html_title : _('Us...
language_missing : _('Please select a language'), not_defined : _('-- Not Set --'), markup : _('Markup (HTML, etc.)'), c_type : _('C type'),
<|file_name|>testexample.py<|end_file_name|><|fim▁begin|># vim: set fileencoding=utf-8 : """ This is a example of a unittest module<|fim▁hole|>""" import unittest class TestExample(unittest.TestCase): """ Test of test """ def test_one(self): """ This is a example of a unittest ...
<|file_name|>document_attributes.rs<|end_file_name|><|fim▁begin|>use azure_sdk_core::errors::AzureError; use azure_sdk_core::prelude::IfMatchCondition; use http::HeaderMap; #[derive(Default, Serialize, Deserialize, Debug, Clone, PartialEq)] pub struct DocumentAttributes { #[serde(rename = "_rid")] pub rid: Str...
pub fn set_attachments<T>(&mut self, value: T)
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>"""SocialNewspaper URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to ...
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """
<|file_name|>expansion-harness-example.spec.ts<|end_file_name|><|fim▁begin|>import {ComponentFixture, TestBed} from '@angular/core/testing'; import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed'; import {MatAccordionHarness, MatExpansionPanelHarness} from '@angular/material/expansion/testing'; import {...
it('should be able to toggle expansion state of panel', async () => { const panel = await loader.getHarness(MatExpansionPanelHarness); expect(await panel.isExpanded()).toBe(false); await panel.toggle();
<|file_name|>test_Navigation.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Module: Navigation # Author: asciidisco # Created on: 11.10.2017 # License: MIT https://goo.gl/5bMj3H """Tests for the `Navigation` module""" import unittest import mock from resources.lib.Navigation import Navigation<|fim▁hole|><|...
class NavigationTestCase(unittest.TestCase): pass
<|file_name|>python_plot_parameteric_study.py<|end_file_name|><|fim▁begin|>import scipy as sp import numpy as np import matplotlib.pyplot as plt import matplotlib import sys import matplotlib.lines as lines import h5py from matplotlib.font_manager import FontProperties import matplotlib.ticker as ticker from scipy....
<|file_name|>cheader.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # The MIT License (MIT) # # Copyright (c) 2015 Stany MARCEL <stanypub@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # ...
ast.LtE : op.le, ast.Gt : op.gt, ast.GtE : op.ge,
<|file_name|>StyleFormats.ts<|end_file_name|><|fim▁begin|>/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ */ import { To...
onDone(); } }); };
<|file_name|>match_args.rs<|end_file_name|><|fim▁begin|>use std::os; fn increase(number: i32) { println!("{}", number + 1); } fn decrease(number: i32) { println!("{}", number - 1); } <|fim▁hole|>fn help() { println!("usage: match_args <string> Check whether given string is the answer. match_args {{inc...
<|file_name|>set_map_velocity.rs<|end_file_name|><|fim▁begin|>use specs::{ReadStorage, System, WriteStorage}; use crate::campaign::components::MapIntent; use crate::campaign::components::map_intent::{MapCommand, XAxis, YAxis}; use crate::combat::components::{Velocity}; pub struct SetMapVelocity; impl<'a> System<'a> ...
velocity.x = 0; velocity.y = 0; }
<|file_name|>rustproto.rs<|end_file_name|><|fim▁begin|>// This file is generated by rust-protobuf 3.0.0-alpha.8. Do not edit // .proto file is parsed by protoc --rust-out=... // @generated // https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes...
<|file_name|>ext-lang-zh_CN.js<|end_file_name|><|fim▁begin|>/* * Ext JS Library 1.1 * Copyright(c) 2006-2007, Ext JS, LLC. * licensing@extjs.com * * http://www.extjs.com/license */ /* * Simplified Chinese translation * By DavidHu * 09 April 2007 */ Ext.UpdateManager.defaults.indicatorText = '...
];
<|file_name|>stack.rs<|end_file_name|><|fim▁begin|>use std::{ fmt, marker::PhantomData, ops::{Deref, DerefMut, Index, IndexMut, Range, RangeFrom, RangeFull, RangeTo}, }; use crate::base::{pos::Line, symbol::Symbol}; use crate::{ gc::{self, CloneUnrooted, CopyUnrooted, GcPtr, Trace}, types::VmIndex...
} fn to_state(&self) -> gc::Borrow<State> {
<|file_name|>relationships.py<|end_file_name|><|fim▁begin|>from crits.vocabulary.vocab import vocab class RelationshipTypes(vocab): """ Vocabulary for Relationship Types. """ COMPRESSED_FROM = "Compressed From" COMPRESSED_INTO = "Compressed Into" CONNECTED_FROM = "Connected From" CONNECT...
<|file_name|>20140402160700-migration-from-0.0.3-to-0.0.4.js<|end_file_name|><|fim▁begin|>/* Places, Copyright 2014 Ansamb. This file is part of Places By Ansamb. Places By Ansamb is free software: you can redistribute it and/or modify it under the terms of the Affero GNU General Public License as publish...
*/ module.exports = {
<|file_name|>numpy_example.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This is a doctest example with Numpy arrays. For more information about doctest, see https://docs.python.org/3/library/doctest.html (reference)<|fim▁hole|> To run doctest, execute this script (thanks to the `...
and www.fil.univ-lille1.fr/~L1S2API/CoursTP/tp_doctest.html (nice examples in French).
<|file_name|>game.js<|end_file_name|><|fim▁begin|>var Game = { map: { width: 980, height: 62 * 12 }, tiles: { size: 62, count: [100, 12] }, sprite: { 8: 'LAND_LEFT', 2: 'LAND_MID', 10: 'LAND_RIGHT', 9: 'LAND', 5: 'WATER_TOP', 12: 'WATER', 4: 'STONE_WITH_MONEY', ...
};
<|file_name|>CT_PivotSource.go<|end_file_name|><|fim▁begin|>// Copyright 2017 Baliance. All rights reserved. // // DO NOT EDIT: generated by gooxml ECMA-376 generator // // Use of this source code is governed by the terms of the Affero GNU General // Public License version 3.0 as published by the Free Software Foundati...
} m.ExtLst = append(m.ExtLst, tmp) default: log.Printf("skipping unsupported element on CT_PivotSource %v", el.Name)
<|file_name|>list.js<|end_file_name|><|fim▁begin|>function GCList(field, multipleSelection, uploadFile, refreshParent = false) { this.field = field; this.multipleSelection = multipleSelection; this.uploadFile = uploadFile; this.refreshParent = refreshParent; this.dialogId = 'list_dialog'; ...
<|file_name|>ClientInvoker.java<|end_file_name|><|fim▁begin|>package org.jboss.resteasy.client.core; import org.jboss.resteasy.client.ClientExecutor; import org.jboss.resteasy.client.ClientRequest; import org.jboss.resteasy.client.ClientResponse; import org.jboss.resteasy.client.ProxyConfig; import org.jboss.res...
import org.jboss.resteasy.client.core.marshallers.ClientMarshallerFactory; import org.jboss.resteasy.client.core.marshallers.Marshaller; import org.jboss.resteasy.client.exception.mapper.ClientExceptionMapper;
<|file_name|>aarch64.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 cty::{c_int}; use {VarArg}; use core::{mem, ptr}; use core::...
<|file_name|>check.go<|end_file_name|><|fim▁begin|>package dao import ( "context" "database/sql" "fmt" "go-common/library/log" ) const ( _queryBvcResource = "select id from %s where svid = %d" _queryCoverResource = "select cover_url,cover_width,cover_height from video_repository where svid = ?" ) //CheckSVRe...
cW int64
<|file_name|>deep_mlp_model.py<|end_file_name|><|fim▁begin|># Copyright 2016 Euclidean Technologies Management 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 # # ...
""" self._num_unrollings = num_unrollings self._num_inputs = num_inputs
<|file_name|>encryption_session.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity.<|fim▁hole|>// (at your option) any later version. // Parity is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warra...
// Parity is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or
<|file_name|>pool.py<|end_file_name|><|fim▁begin|># sqlalchemy/pool.py # Copyright (C) 2005-2011 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Connection pooling for DB-API...
"""
<|file_name|>test_strain_design_heuristics.py<|end_file_name|><|fim▁begin|># Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU. # # 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 Lic...
model=model,
<|file_name|>version.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|>"""#Versión de la calculadora.""" version = '1.0.0'<|fim▁end|>
<|file_name|>variant_struct.rs<|end_file_name|><|fim▁begin|>// @has variant_struct.json "$.index[*][?(@.name=='EnumStruct')].visibility" \"public\" // @has - "$.index[*][?(@.name=='EnumStruct')].kind" \"enum\"<|fim▁hole|> VariantS { x: u32, y: String, }, }<|fim▁end|>
pub enum EnumStruct { // @has - "$.index[*][?(@.name=='VariantS')].inner.variant_kind" \"struct\" // @has - "$.index[*][?(@.name=='x')]" // @has - "$.index[*][?(@.name=='y')]"
<|file_name|>context.py<|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 licenses this file to You under the Apache L...
system or HDFS, HTTP, HTTPS, or FTP URLs. @param environment: A dictionary of environment variables to set on
<|file_name|>sanity_test.spec.ts<|end_file_name|><|fim▁begin|>describe('sanity checks', () => { it('should also be able to test', () => { expect(true).toBe(true);<|fim▁hole|><|fim▁end|>
}); });
<|file_name|>ReadFileError.js<|end_file_name|><|fim▁begin|>// Generated by CoffeeScript 1.12.0 <|fim▁hole|>/* ExternalEditor Kevin Gravier <kevin@mrkmg.com> MIT */ (function() { var ReadFileError, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = pare...
<|file_name|>gateway.js<|end_file_name|><|fim▁begin|>// ********************************************************************************** // Websocket backend for the Raspberry Pi IoT Framework // ********************************************************************************** // Modified from the Moteino IoT Fra...
//if UI removes an event, it needs to be cancelled from here as well; // if UI adds a scheduled event it needs to be scheduled and added here also
<|file_name|>nl.js<|end_file_name|><|fim▁begin|>/** * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ <|fim▁hole|> * @fileOverview Defines the {@link CKEDITOR.lang} object for the * Dutch language. */ /**#@+ ...
/**
<|file_name|>metric.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # f...
<|file_name|>MenuPrincipal.java<|end_file_name|><|fim▁begin|>package com.programandoapasitos.facturador.gui; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JMenuBar; import javax.swing.JMenu; import javax.swing.JMenuItem; import javax.swing.JLabel; import java.awt.event.ActionListe...
<|file_name|>helpers.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from __future__ import unicode_literals import os from compose.config.config import ConfigDetails from compose.config.config import ConfigFile from compose.config.config import load def build_config(contents, **kwargs): ...
def create_host_file(client, filename): dirname = os.path.dirname(filename) with open(filename, 'r') as fh:
<|file_name|>funcs.py<|end_file_name|><|fim▁begin|># emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ''' Processor functions for images ''' import numpy as np def squeeze_image(img): ''' Return image, remove axes length 1 at end of image shape Fo...
Examples
<|file_name|>UnionType.java<|end_file_name|><|fim▁begin|>/* Copyright 2010, Object Management Group, Inc. * Copyright 2010, PrismTech, Inc. * Copyright 2010, Real-Time Innovations, Inc. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in...
// Properties // ----------------------------------------------------------------------- @ID(MemberId.MEMBER_UNIONTYPE_MEMBER_ID)
<|file_name|>xmlhttprequest.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 document_loader::DocumentLoader; use dom::bindings...
<|file_name|>StorageManager.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright 2009 Regents of the University of Minnesota. All rights * reserved. * Copyright 2009 Mayo Foundation for Medical Education and Research. * All rights reserved. ...
public long getDateModified() { return dateModified; }