prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>qgsalgorithmlayouttopdf.cpp<|end_file_name|><|fim▁begin|>/***************************************************************************
qgsalgorithmlayouttopdf.cpp
---------------------
begin : June 2020
copyright : (C) 2020 ... | // no meaning for PDF exports, will not be encountered
break;
} |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url
from api import views
urlpatterns = [
url(r'stations/$', views.get_stations, name='api_stations'),
url(r'entry/(?P<station_id>\d+)/$', views.make_entry, name='api_entry'),
url(r'new/$', views.add_station, name='api_add_stat... | |
<|file_name|>resolved_type_def_function.rs<|end_file_name|><|fim▁begin|>#![allow(
dead_code,
non_snake_case,
non_camel_case_types,
non_upper_case_globals
)]
pub type FuncType = ::std::option::Option<unsafe extern "C" fn()>;
extern "C" {
pub fn Func();<|fim▁hole|><|fim▁end|> | } |
<|file_name|>mrtrix.py<|end_file_name|><|fim▁begin|>##
# Copyright 2009-2020 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https:/... | super(EB_MRtrix, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands) |
<|file_name|>events.js<|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.
* ------------... | */
get: function () { |
<|file_name|>ec2_asg.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your ... | |
<|file_name|>slide4.py<|end_file_name|><|fim▁begin|>__author__ = 'ramuta'
a = 1
b = 2
if a < b:
a = b
print a
print b
"""
Java equivalent
if (a < b) {
a = b;
}
If you delete parenthesis, brackets and semicolons you get python.
<|fim▁hole|><|fim▁end|> | """ |
<|file_name|>mpstest7.py<|end_file_name|><|fim▁begin|>"""
mpstest7.py
A test of manipulating matrix product states with numpy.
2014-08-25
"""<|fim▁hole|>import matplotlib.pyplot as plt
from cmath import *
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
def main():
test3()
def test3():
""" Te... |
import numpy as np |
<|file_name|>ExtendedListFragment.java<|end_file_name|><|fim▁begin|>/**
* ownCloud Android client application
*
* @author Mario Danic
* Copyright (C) 2017 Mario Danic
* Copyright (C) 2012 Bartek Przybylski
* Copyright (C) 2012-2016 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or ... | |
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>#[macro_use]
extern crate clap;
#[allow(dead_code)]
#[path = "src/app.rs"]
mod app;
use clap::Shell;
<|fim▁hole|> let outdir = concat!(env!("CARGO_MANIFEST_DIR"), "/scripts/completion");
std::fs::create_dir_all(&outdir).unwrap();
let mut app = app::build(... | fn main() { |
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Peter Atashian
// Licensed under the MIT License <LICENSE.md><|fim▁hole|>}<|fim▁end|> | fn main() {
println!("cargo:rustc-flags=-l icm32"); |
<|file_name|>motiondetect.py<|end_file_name|><|fim▁begin|>import os #for OS program calls
import sys #For Clean sys.exit command
import time #for sleep/pause
import RPi.GPIO as io #read the GPIO pins
io.setmode(io.BCM)
pir_pin = 17<|fim▁hole|>screen_saver = False
io.setup(pir_pin, io.IN)
while True:
if screen_sa... | |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate FizzBuzz;
fn main() {<|fim▁hole|> println!("{}", r);
}
}<|fim▁end|> | for r in (1..101).map(FizzBuzz::fizz_buzz) { |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>/**<|fim▁hole|> * It doesn't matter if you export `.ios` or `.android`, either one but only one.
*/
export * from "./local-notifications.ios";
// Export any shared classes, constants, etc.
export * from "./local-notifications-common";<|fim▁end|> | * iOS and Android apis should match. |
<|file_name|>diff.py<|end_file_name|><|fim▁begin|>import logging
from .. import exceptions
from ..plan import COMPLETE, Plan
from ..status import NotSubmittedStatus, NotUpdatedStatus
from . import build
import difflib
import json
logger = logging.getLogger(__name__)
def diff_dictionaries(old_dict, new_dict):
""... | new_params = dict() |
<|file_name|>convert.py<|end_file_name|><|fim▁begin|>from flatten import *
POS_SIZE = 2**23 - 1
NEG_SIZE = -2**23
OPTIMIZE = True
OPTIMIZERS = {
'set': 'SET',
'setglobal': 'SET_GLOBAL',
'local': 'SET_LOCAL',
'get': 'GET',
'getglobal': 'GET_GLOBAL',
'return': 'RETURN',
'recurse': 'RECURSE',
'drop': 'DROP',
'd... | try: |
<|file_name|>keyboard-navigable-list-test.js<|end_file_name|><|fim▁begin|>import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('keyboard-navigable-list', 'Integration | Component | keyboard navigable list', {
integration: true
});
test('if passed i... | this.render(hbs`{{keyboard-navigable-list contentArray=theArray objectKey="name" linkDirection='people.show'}}`);
|
<|file_name|>mask_test.go<|end_file_name|><|fim▁begin|>package tests
import (
"log"
"reflect"
"time"
"github.com/deepglint/streamtools/st/blocks"
"github.com/deepglint/streamtools/test_utils"
. "launchpad.net/gocheck"
)
type MaskSuite struct{}
var maskSuite = Suite(&MaskSuite{})
func (s *MaskSuite) TestMask(... | ch.AddChan <- &blocks.AddChanMsg{Route: "1", Channel: outChan}
queryOutChan := make(blocks.MsgChan) |
<|file_name|>InputAdornment.d.ts<|end_file_name|><|fim▁begin|>import * as React from 'react';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
export interface InputAdornmentTypeMap<P = {}, D extends React.ElementType = 'div'> {
props: P & {
/**
* The content of the component, ... | */
disableTypography?: boolean;
/**
* The position this adornment should appear relative to the `Input`. |
<|file_name|>functions_74.js<|end_file_name|><|fim▁begin|>var searchData=
[
['tester',['tester',['../classcontrol_vue.html#a92d898224293b741e5c6d3a3576a2193',1,'controlVue']]],
['testerappuyer',['testerAppuyer',['../class_vue.html#a7fb0d20950a6596a3eef78e244628682',1,'Vue']]],
['testerdossier',['testerDossier',['... | |
<|file_name|>dialogs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# 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 ver... |
def __init__(self, text): |
<|file_name|>get_data.py<|end_file_name|><|fim▁begin|>import os
import urllib
from glob import glob
import dask.bag as db
import numpy as np
import zarr
from dask.diagnostics import ProgressBar
from netCDF4 import Dataset
def download(url):
opener = urllib.URLopener()
filename = os.path.basename(url)
pat... | |
<|file_name|>footerfolder.ts<|end_file_name|><|fim▁begin|>import Folder = require('../../folder');
import Message = require('../../message');
import React = require('react');
import Core = require('../common/core');
import Div = Core.Div;
import Span = Core.Span;
interface FooterFolderProps extends React.Props<any> {... | {
const folders = props.folders;
const activeFolder = props.activeFolder;
const numFolders = folders.length; |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate regex;
extern crate fall_tree;
extern crate fall_parse;
mod rust;
pub use self::rust::language as lang_rust;
pub use self::rust::{
WHITESPACE,
LINE_COMMENT,
BLOCK_COMMENT,
UNION,
AS,
CRATE,
EXTERN,
FN,
LET,
PUB,
... | MATCH,
RETURN,
CONTINUE, |
<|file_name|>CircleShape.cpp<|end_file_name|><|fim▁begin|>#include "Extensions.hpp"
#include "Extensions.inl"
#include <Math/Rect.hpp>
#include <Math/Vector.hpp>
#include <Script/ScriptExtensions.hpp>
#include <SFML/Graphics/CircleShape.hpp>
#include <angelscript.h>
#include <cassert>
namespace
{
void create_Ci... | |
<|file_name|>compare_shuffled.py<|end_file_name|><|fim▁begin|>import sys
q_to_time = {}
i = 0
for line in open(sys.argv[1]):
try:
line = line.strip()
cols = line.split('\t')
q_to_time[cols[0]] = [(int(cols[2].split(' ')[0]), i)]
i += 1
except ValueError:
continue
i = 0... | larger = float(v[1][0])
else:
smaller = float(v[1][0]) |
<|file_name|>event-name.decorator.spec.ts<|end_file_name|><|fim▁begin|>// std
import { strictEqual, throws } from 'assert';
// 3p
import 'reflect-metadata';
// FoalTS
import { EventName } from './event-name.decorator';
describe('EventName', () => {
it('should define the metadata websocket-event-name=${eventName} ... | new Error('@EventName does not support empty names.') |
<|file_name|>ArtworkModel.java<|end_file_name|><|fim▁begin|>package com.simplecity.amp_library.model;
import android.content.Context;
import com.simplecity.amp_library.R;
import java.io.File;
<|fim▁hole|>public class ArtworkModel {
private static final String TAG = "ArtworkModel";
@ArtworkProvider.Type
p... | |
<|file_name|>JobRestartForceTest.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2015-2017 EMBL - European Bioinformatics Institute
*
* 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
*
*... | Thread.sleep(WAIT_FOR_JOB_TO_END);
ManageJobsUtils.markLastJobAsFailed(getJobRepository(), job.getName(), new JobParameters());
jobExecution = launchJob(jobLauncherTestUtils);
Thread.sleep(WAIT_FOR_JOB_TO_END); |
<|file_name|>fortwrangler.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# Fortwrangler is a tool that attempts to resolve issues with fortran lines over standard length.
# Global libraries
import sys
# Global variables
# Strings inserted for continuation
CONTINUATION_ENDLINE = "&\n"
CONTINUATION_STARTLINE ... | for line in infile:
if len(line) > maxlength + 1: |
<|file_name|>position.mako.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/. */
<%! from data import to_rust_ident %>
<%namespace name=... | extra_gecko_values="normal",
gecko_constant_prefix="NS_STYLE_ALIGN",
animatable=False)}
|
<|file_name|>Mapper_WinUPnP.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2001-2015 Jacek Sieka, arnetheduck on gmail point com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; ... | |
<|file_name|>test_spec.py<|end_file_name|><|fim▁begin|>import json
from tempfile import mkdtemp
from os.path import join, basename
from shutil import rmtree
from distutils.dir_util import copy_tree
from twisted.trial import unittest
from twisted.internet.defer import inlineCallbacks
from slyd.projectspec import create_... | {
"exclude_patterns": [],
"follow_patterns": [ |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import os
from setuptools import setup
from distutils.cmd import Command
import django_auth_iam
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
setup(
name='django-auth-iam',
version=django... | 'Programming Language :: Python',
'Topic :: Security', |
<|file_name|>ChildWatch.spec.ts<|end_file_name|><|fim▁begin|>import {assert} from 'chai';
import {Job} from '../Job';
import {BlockIO} from '../BlockProperty';
describe('Block Child Watch', function () {
it('basic', function () {
let job = new Job();
<|fim▁hole|> let watchLog: any[] = [];
let watch = {
... | |
<|file_name|>dvp_demo.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2009-2011 Texas Instruments, 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/... | i++; |
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># AWX settings file
import os
def get_secret():
if os.path.exists("/etc/tower/SECRET_KEY"):
return open('/etc/tower/SECRET_KEY', 'rb').read().strip()
ADMINS = ()
STATIC_ROOT = '/var/lib/awx/public/static'
PROJECTS_ROOT = '/var/lib/awx/projects'
A... | LOGGING['loggers']['awx.isolated.manager.playbooks']['handlers'] = ['console']
LOGGING['handlers']['callback_receiver'] = {'class': 'logging.NullHandler'} |
<|file_name|>extend_corpora.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2018 Deyan Ginev. See the LICENSE
// file at the top-level directory of this distribution.
//
// Licensed under the MIT license <LICENSE-MIT or http://opensource.org/licenses/MIT>.
// This file may not be copied, modified, or distributed
// e... | println!(
"-- Service registration on corpus {:?} took {:?}ms",
corpus.name, register_duration
); |
<|file_name|>11057.cpp<|end_file_name|><|fim▁begin|>#include <algorithm>
#include <cassert>
#include <cmath>
#include <iostream>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
int main() {
while (true) {
int N, M;
cin >> N;<|fim▁hole|> break;
multiset<int> prices;
fo... | if (!cin) |
<|file_name|>resource_task.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 task that takes a URL and streams back the binary... | pub fn start_sending_opt(start_chan: LoadConsumer, metadata: Metadata) -> Result<ProgressSender, ()> { |
<|file_name|>package-info.java<|end_file_name|><|fim▁begin|>/**
* Michael' (The non-Asian one's) librarys.<br><|fim▁hole|> * Thank you for the help!
* @author Michael [???]
*
*/
package com.shadow53.libs;<|fim▁end|> | |
<|file_name|>util.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>use ethereum_types::H256;
use hmac::{Hmac, Mac, NewMac};
use secp256k1::PublicKey;
use sha2::Sha256;
use sha3::{Digest, Keccak256};
use std::fmt::{self, Formatter};
pub fn keccak256(data: &[u8]) -> H256 {
H256::from(Keccak256::digest(data).as_ref())
}
... | use crate::types::*; |
<|file_name|>issue-17718-const-borrow.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.a... | |
<|file_name|>0002_auto_20190430_1520.py<|end_file_name|><|fim▁begin|># Generated by Django 2.1.7 on 2019-04-30 13:20
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [<|fim▁hole|> fie... | migrations.AlterField(
model_name='publishablemodel',
name='id', |
<|file_name|>SpongeSignaledOutputData.java<|end_file_name|><|fim▁begin|>/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a c... | * copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions: |
<|file_name|>Alignment.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# ZetCode PyGTK tutorial
#
# This example shows how to use
# the Alignment widget
#
# author: jan bodnar
# website: zetcode.com
# last edited: February 2009
import gtk
import gobject
class PyApp(gtk.Window):
def __init__(self):<|fim▁ho... | super(PyApp, self).__init__()
self.set_title("Alignment")
self.set_size_request(260, 150) |
<|file_name|>curved.cpp<|end_file_name|><|fim▁begin|>// This file is part of Hermes2D.
//
// Hermes2D is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) a... | fi = l11(x);
break;
}
switch (j + 2) |
<|file_name|>test_designate_client.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
#
# Unles... | |
<|file_name|>FormatIndentDecrease.js<|end_file_name|><|fim▁begin|>import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "M11 17h10v-2H11v2zm-8-5 4 4V8l-4 4zm0 9h18v-2H3v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H... | |
<|file_name|>config_parser.py<|end_file_name|><|fim▁begin|>import configparser
CONFIG_PATH = 'accounting.conf'
class MyConfigParser():
def __init__(self, config_path=CONFIG_PATH):
self.config = configparser.ConfigParser(allow_no_value=True)
self.config.read(config_path)
def config_section_m... | # getint(section, option)
# getboolean(section, option) |
<|file_name|>px.rs<|end_file_name|><|fim▁begin|>use crate::formats;
pub use rgb::alt::Gray;
pub use rgb::RGB;
pub use rgb::RGBA;
/// Use [`Pixel`](crate::Pixel) presets to specify pixel format.
///
/// The trait represents a temporary object that adds pixels together.
pub trait PixelFormat {
/// Pixel type in the ... | /// Create new floating-point pixel
fn new() -> Self::Accumulator;
/// Add new pixel with a given weight (first axis)
fn add(&self, acc: &mut Self::Accumulator, inp: Self::InputPixel, coeff: f32); |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | import purchase_requisition |
<|file_name|>ParallelBeamBlobKernelProjector2D.cpp<|end_file_name|><|fim▁begin|>/*
-----------------------------------------------------------------------
Copyright: 2010-2018, imec Vision Lab, University of Antwerp
2014-2018, CWI, Amsterdam
Contact: astra@astra-toolbox.com
Website: http://www.astra-toolbox... | |
<|file_name|>canvas_data.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 azure::azure::AzFloat;
use azure::azure_hl::{Antialia... | source_rect: Rect<f64>, |
<|file_name|>pubsublite_v1_generated_topic_stats_service_compute_time_cursor_async.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2022 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... | from google.cloud import pubsublite_v1
|
<|file_name|>updates.js<|end_file_name|><|fim▁begin|>// telegram.link
// Copyright 2014 Enrico Stara 'enrico.stara@gmail.com'
// Released under the MIT License
// http://telegram.link
// Dependencies:
var api = require('../api');
var utility = require('../utility');
// ***<|fim▁hole|>// This module ... | |
<|file_name|>secrets.py<|end_file_name|><|fim▁begin|>from key_vault_agent import KeyVaultAgent
<|fim▁hole|> def get_secret(self):
self.data_client.restore_secret()
pass<|fim▁end|> |
class SecretsAgent(KeyVaultAgent): |
<|file_name|>get_thumbnails.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
"""
Author: Gary Foreman
Created: August 6, 2016
This script scrapes thumbnail images from thread links in the For Sale: Bass
Guitars forum at talkbass.com
"""
from __future__ import print_function
from glob import glob
import os
impor... | """
filename: a string with the name to a locally stored image file
Crops image at filename to 128 x 128 pixels and overwrites original |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
r"""
.. _SoftiMAX:
SoftiMAX at MAX IV
------------------
The images below are produced by scripts in
``\examples\withRaycing\14_SoftiMAX``.
The beamline will have two branches:
- STXM (Scanning Transmission X-ray Microscopy) and
- CXI (Coh... | | exit slit | |st_hES2b| | |st_hES4| |
+-----------+--------------------+--------------------+
| sample | |st_hS2b| | |st_hS4| | |
<|file_name|>SlotBackpack.java<|end_file_name|><|fim▁begin|>package com.darkona.adventurebackpack.inventory;
import com.darkona.adventurebackpack.common.IInventoryAdventureBackpack;
import com.darkona.adventurebackpack.init.ModBlocks;
import com.darkona.adventurebackpack.item.ItemAdventureBackpack;
import com.darkona.... | |
<|file_name|>step3_load_model.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Author: Shao Zhang and Phil Saltzman
# Last Updated: 2015-03-13
#
# This tutorial is intended as a initial panda scripting lesson going over
# display initialization, loading models, placing objects, and the scene graph.
#
# Step 3: ... | # This is the initialization we had before
self.title = OnscreenText( # Create the title
text="Panda3D: Tutorial 1 - Solar System", |
<|file_name|>UltimateGoalInsights.ts<|end_file_name|><|fim▁begin|>import Insights from '../Insights';
import Match from '../Match';
import {ISerializable} from '../ISerializable';
export default class UltimateGoalInsights extends Insights implements ISerializable {
private _autoAverageRingsScoredHigh: number;
priv... | |
<|file_name|>tshirt-outline.js<|end_file_name|><|fim▁begin|>import React from 'react'
import Icon from 'react-icon-base'
const IoTshirtOutline = props => (
<Icon viewBox="0 0 40 40" {...props}>
<g><path d="m11.4 6.7l-8.1 2.4 0.8 2.5 3.1-0.3 3-0.4-0.2 3-1.1 19.9h17.2l-1.1-19.9-0.2-3 3 0.4 3.1 0.3 0.8-2.5-8.... | </Icon>
)
export default IoTshirtOutline |
<|file_name|>test_weights.py<|end_file_name|><|fim▁begin|># Copyright 2011-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
#
# ... | if weight_properties is None:
weight_properties = {}
return self.weight_handler.get_weighed_objects(self.weight_classes,
hosts, weight_properties)[0] |
<|file_name|>factory.js<|end_file_name|><|fim▁begin|>/**
* @license Apache-2.0
*
* Copyright (c) 2020 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apa... | * @returns {Function} CDF
* |
<|file_name|>console.py<|end_file_name|><|fim▁begin|>"""a readline console module (unix only).
maxime.tournier@brain.riken.jp
the module starts a subprocess for the readline console and
communicates through pipes (prompt/cmd).
the console is polled through a timer, which depends on PySide.
"""
from select import s... | |
<|file_name|>ipmitool.py<|end_file_name|><|fim▁begin|># coding=utf-8
# Copyright 2012 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2012 NTT DOCOMO, INC.
# Copyright 2014 International Business Machines Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License")... | 'ipmi_address': _("IP address or hostname of the node. Required.")
}
OPTIONAL_PROPERTIES = {
'ipmi_password': _("password. Optional."), |
<|file_name|>smtp_notification.py<|end_file_name|><|fim▁begin|>import requests
import json
import time
import subprocess
import re
import os
from collections import OrderedDict
from test_framework.test_framework import OpenBazaarTestFramework, TestFailure
from test_framework.smtp_server import SMTP_DUMPFILE
class SM... | |
<|file_name|>ThrMmt.java<|end_file_name|><|fim▁begin|>package org.cloudbus.cloudsim.examples.power.steady;
import java.io.IOException;
/**
* A simulation of a heterogeneous power aware data center that applies the
* Static Threshold (THR) VM allocation policy and Minimum Migration Time (MMT)
* VM selection ... | * and Computation: Practice and Experience (CCPE), Volume 24, Issue 13, Pages:
* 1397-1420, John Wiley & Sons, Ltd, New York, USA, 2012
|
<|file_name|>cloudresourcemanager_v3_generated_tag_keys_get_tag_key_async.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2022 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 ... | # See the License for the specific language governing permissions and |
<|file_name|>redis.py<|end_file_name|><|fim▁begin|>from stream_framework.tests.feeds.base import TestBaseFeed, implementation
from stream_framework.feeds.redis import RedisFeed
from stream_framework.activity import Activity
from stream_framework.utils import datetime_to_epoch
class CustomActivity(Activity):
@pro... | def test_custom_activity(self):
assert self.test_feed.count() == 0 |
<|file_name|>client.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// 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 vers... | let result = rx.recv().unwrap(); |
<|file_name|>setplot.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
from __future__ import print_function
import os
import numpy
import matplotlib.pyplot as plt
import datetime
import clawpack.visclaw.colormaps as colormap
import clawpack.visclaw.gaugetools as gaugetools
import clawpack.clawu... | plt.subplots_adjust(left=0.12, bottom=0.06, right=0.97, top=0.97)
surge_afteraxes(cd) |
<|file_name|>account_move.py<|end_file_name|><|fim▁begin|># License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class AccountMove(models.Model):
_inherit = "account.move"
pricelist_id = fields.Many2one(
comodel_n... | |
<|file_name|>index.tsx<|end_file_name|><|fim▁begin|>import React, { useState } from 'react';
import { StyleSheet, ImageStyle, LayoutChangeEvent } from 'react-native';
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
import Animated, {
useAnimatedStyle,
useDerivedValue,
useSharedValue,
wi... | const headOffset = chatHeadsOffsets[idx];
if (idx === 0) { |
<|file_name|>custom.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
from django import template
from django.utils.unittest import TestCase
from .templatetags import custom
class CustomFilterTests(TestCase):
def test_filter(self):
t = template.Template("{% load custom %}{{ string|t... | t = template.Template('{% load custom %}{% inclusion_one_default_from_template 37 42 %}')
self.assertEqual(t.render(c), u'inclusion_one_default_from_template - Expected result: 37, 42\n')
t = template.Template('{% load custom %}{% inclusion_unlimited_args_from_template 37 %}') |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>def reference_case_attachment_view(request, domain, case_id, attachment_id):<|fim▁hole|><|fim▁end|> | raise NotImplemented("This view is to be overrided by the specific implementations for retrieving case attachments") |
<|file_name|>NewRoomInfo.js<|end_file_name|><|fim▁begin|>import { Template } from 'meteor/templating';
import { Academy } from '/imports/api/databasedriver.js';
import { Challenges } from '/imports/api/databasedriver.js';
import { Rooms } from '/imports/api/databasedriver.js';
import { Badges } from '/imports/api/datab... | |
<|file_name|>CUnmannedTraderGroupDivisionVersionInfo.hpp<|end_file_name|><|fim▁begin|>// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
#include <std__vector.hpp>
<|fim▁hole|>
START_ATF_NAMESPACE
#pragma pack(push, 8... | |
<|file_name|>QSourceLocation.hpp<|end_file_name|><|fim▁begin|>/****************************************************************************
**
** Copyright (C) 2014-2015 Dinu SV.
** (contact: mail@dinusv.com)
** This file is part of C++ Snippet Assist application.
**
** GNU General Public License Usage
**
** This file... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
__author__ = 'Yacine Haddad'<|fim▁hole|>__version__ = '2.0.0'<|fim▁end|> | __email__ = 'yhaddad@cern.ch' |
<|file_name|>TestSourceModelPackageImpl.java<|end_file_name|><|fim▁begin|>/**
* <copyright>
* </copyright>
*
* $Id$
*/
package de.hub.specificmodels.tests.testsourcemodel.impl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.e... | /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated |
<|file_name|>common_objects.py<|end_file_name|><|fim▁begin|>import os
import sys
import string
import random
import math
#################################################
# State
balance = 0
def deposit(amount):
global balance
balance += amount
return balance
def withdraw(amount):
global balance
... | return self.balance
|
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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 th... | BASE_DIR = os.path.dirname(os.path.abspath(__file__))
REQUIREMENTS_FILE = os.path.join(BASE_DIR, "requirements.txt")
|
<|file_name|>polytope.py<|end_file_name|><|fim▁begin|>#!python
import math
import fractions
import pygame
import argparse
import os.path
import sys
import subprocess
import time
from itertools import combinations,islice
from ntracer import NTracer,Material,ImageFormat,Channel,BlockingRenderer,CUBE
from ntracer.pygame_... |
while True:
e = pygame.event.wait() |
<|file_name|>router.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for Angular v2.0.0-alpha.35
// Project: http://angular.io/
// Definitions by: angular team <https://github.com/angular/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// **********************************************************... | /**
* A router outlet is a placeholder that Angular dynamically fills based on the application's route. |
<|file_name|>meteor-methods.js<|end_file_name|><|fim▁begin|>import { Class as Model } from 'meteor/jagi:astronomy';
import * as Errors from './errors.js';
export function init(config) {
config.collection = new Mongo.Collection(config.collectionName);
config.model = Model.create({
name: config.modelNam... | |
<|file_name|>StatefulOperatorSpec.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 licenses this file
* t... | * http://www.apache.org/licenses/LICENSE-2.0 |
<|file_name|>parter.hpp<|end_file_name|><|fim▁begin|>#ifndef NT2_GALLERY_INCLUDE_FUNCTIONS_SCALAR_PARTER_HPP_INCLUDED
#define NT2_GALLERY_INCLUDE_FUNCTIONS_SCALAR_PARTER_HPP_INCLUDED
<|fim▁hole|>
#endif<|fim▁end|> | #include <nt2/gallery/functions/parter.hpp> |
<|file_name|>dir_40645110f4b881381ac11b52da3dfc1e.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | var dir_40645110f4b881381ac11b52da3dfc1e =
[
[ "provider", "dir_9a95dbcede8719bb251f64fc00e6b0a1.html", "dir_9a95dbcede8719bb251f64fc00e6b0a1" ]
]; |
<|file_name|>test_append.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pytest
import time
import sys
import cPickle as pickle
from test_base_class import TestBaseClass
aerospike = pytest.importorskip("aerospike")
try:
from aerospike.exception import *
except:
print "Please install aerospike py... | |
<|file_name|>externalMissingOnBase.ts<|end_file_name|><|fim▁begin|>import 'apollo-server-env';<|fim▁hole|>/**
* All fields marked with @external must exist on the base type
*/
export const externalMissingOnBase: PostCompositionValidator = ({ schema }) => {
const errors: GraphQLError[] = [];
const types = schema.... | import { isObjectType, GraphQLError } from 'graphql';
import { logServiceAndType, errorWithCode, getFederationMetadata } from '../../utils';
import { PostCompositionValidator } from '.';
|
<|file_name|>httpdatehelper.py<|end_file_name|><|fim▁begin|>"""
httpdatehelper
==============
:Module: pyfileserver.httpdatehelper
:Author: Ho Chun Wei, fuzzybr80(at)gmail.com
:Project: PyFileServer, http://pyfilesync.berlios.de/
:Copyright: Lesser GNU Public License, see LICENSE file attached with package
H... | Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
|
<|file_name|>io.py<|end_file_name|><|fim▁begin|>## begin license ##
#
# "Weightless" is a High Performance Asynchronous Networking Library. See http://weightless.io
#
# Copyright (C) 2012-2013, 2017, 2020-2021 Seecr (Seek You Too B.V.) https://seecr.nl
#
# This file is part of "Weightless"
#
# "Weightless" is free soft... | |
<|file_name|>functions.py<|end_file_name|><|fim▁begin|>from django.utils.importlib import import_module
<|fim▁hole|> m = import_module(module)
return getattr(m, func)<|fim▁end|> | def function_from_string(string):
module, func = string.rsplit(".", 1) |
<|file_name|>import6.rs<|end_file_name|><|fim▁begin|>// run-pass
#![allow(unused_imports)]
use foo::zed;
use bar::baz;<|fim▁hole|> pub fn baz() { println!("baz"); }
}
}
mod bar {
pub use foo::zed::baz;
}
pub fn main() { baz(); }<|fim▁end|> |
mod foo {
pub mod zed { |
<|file_name|>hwmp-protocol.cc<|end_file_name|><|fim▁begin|>/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2008,2009 IITP RAS
*
* 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... | //freshInfo = false;
if((m_routingType==1)||(m_routingType==2))
{
NS_LOG_ROUTING("checking prev " << i->bPrim << " " << i->gammaPrim << " " << i->totalE << " " << preq.GetBPrim () << " " << preq.GetGammaPrim () << " " << (int)preq.GetTotalE () << " " << (int... |
<|file_name|>reactor_factory.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2017, Baidu.com, 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.a... | if (!ms_reactors.empty())
return;
ReactorPtr reactor; |
<|file_name|>mysql_daemon.go<|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
Unless requir... | |
<|file_name|>urls.rs<|end_file_name|><|fim▁begin|>/* vim: set et: */
use url;
use hyper;
use types::FolderId;
use types::ProgramId;
use std::fmt;
pub enum EVUrl {
Login,
Folder(FolderId),
Program(ProgramId),
Move(ProgramId, FolderId)
}
impl hyper::client::IntoUrl for EVUrl {
fn into_url(self) -> ... | }
}
impl fmt::Display for EVUrl { |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.