prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>color.rs<|end_file_name|><|fim▁begin|>use crate::color::{self, Component, IntoLinSrgba, LinSrgba}; use crate::math::num_traits::Float; /// A **Srgba** type with the default Scalar. pub type DefaultSrgba = color::Srgba<color::DefaultScalar>; /// A **LinSrgba** type with the default Scalar. pub type Defaul...
{ /// Provide a mutable reference to the RGBA field which can be used for setting colors. fn rgba_mut(&mut self) -> &mut Option<LinSrgba<S>>;
<|file_name|>db.go<|end_file_name|><|fim▁begin|>package main import ( "encoding/json" "fmt" "io/ioutil" "os" "sort" "strings" "golang.org/x/crypto/openpgp" ) // // Password keeps login, password and other // this should be called Entry. // type Password struct { Key string Login string Passwo...
// // Get retrieves entry if any otherwise returns nil. //
<|file_name|>environment.py<|end_file_name|><|fim▁begin|>from steps.bdd_test_util import cli_call def after_scenario(context, scenario): if 'doNotDecompose' in scenario.tags: print("Not going to decompose after scenario {0}, with yaml '{1}'".format(scenario.name, context.compose_yaml)) else: if 'compose_yaml' in...
context.compose_output, context.compose_error, context.compose_returncode = \ cli_call(context, ["docker", "rm", containerId], expect_success=True)
<|file_name|>plot_msg_minus_cosmo.py<|end_file_name|><|fim▁begin|>from __future__ import division from __future__ import print_function #!/usr/bin/python # program to plot SEVIRI observations # usage from command line # $ python plot_msg.py # # pass arguments to overwrite time, rgb, area given in the script # ...
cosmo_input_file="input_cosmo_cronjob.py"
<|file_name|>classifier_mpdsvm_modular.py<|end_file_name|><|fim▁begin|>from tools.load import LoadMatrix lm=LoadMatrix() traindat = lm.load_numbers('../data/fm_train_real.dat') testdat = lm.load_numbers('../data/fm_test_real.dat') label_traindat = lm.load_labels('../data/label_train_twoclass.dat') parameter_list = [[...
def classifier_mpdsvm_modular (fm_train_real=traindat,fm_test_real=testdat,label_train_twoclass=label_traindat,C=1,epsilon=1e-5): from shogun.Features import RealFeatures, BinaryLabels
<|file_name|>no-arguments-on-generators.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. //<|fim▁hole|>// option. This file may not be copied, modified, or distributed // exc...
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
<|file_name|>render.py<|end_file_name|><|fim▁begin|>from dataclasses import dataclass import io import typing as T import numpy as np @dataclass(frozen=True) class PolygonShape: vertices: T.Tuple[T.Tuple[float]] color: T.Text @dataclass(frozen=True) class Body: x: float y: float angle: float<|f...
shapes: T.Tuple[PolygonShape]
<|file_name|>test_command.py<|end_file_name|><|fim▁begin|># Copyright 2014 Google Inc. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/license...
<|file_name|>money_transfere.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe.utils....
dummy_from = frappe.db.get_values("Account", {"name": "حساب ارسال الي"+" - "+self.to_company + " - "+self.abbr, "company": self.from_company, "parent_account":"حساب ارسال"+" - "+self.abbr }) self.dummy_from=dummy_from[0][0]
<|file_name|>netlist.py<|end_file_name|><|fim▁begin|>import gdsfactory as gf yaml = """<|fim▁hole|> settings: width_mmi: 4.5 length_mmi: 10 mmi2: component: mmi1x2 settings: width_mmi: 4.5 length_mmi: 5 straight: component: straight placements: mmi...
instances: mmi1: component: mmi1x2
<|file_name|>admin_practitioners.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### ## ## ## Copyright 2010-2012, Neil Wallace <neil@ope...
<|file_name|>script.js<|end_file_name|><|fim▁begin|>// Scroll to the very bottom to see the stuff we wrote, the big giant blocks are: // froogaloop // and // fitvid.js ;(function( $ ){ 'use strict'; $.fn.fitVids = function( options ) { var settings = { customSelector: null, ignore: null }; ...
if(!$this.attr('id')){
<|file_name|>report.py<|end_file_name|><|fim▁begin|>""" report.py Functions to create various reports. project : pf version : 0.0.0 status : development modifydate : createdate : website : https://github.com/tmthydvnprt/pf author : tmthydvnprt email : tim@tmthydvnprt.com maintainer : tmthydvnprt...
credits :
<|file_name|>LayoutBase.js<|end_file_name|><|fim▁begin|>/** * LayoutBase * A Mithril component Base class for Layouts, e.g. HorizontalLayout and * CircosLayout. */ import {Bounds} from '../../model/Bounds'; export class LayoutBase { // constructor() - prefer do not use in mithril components /** * mithril ...
oninit(vnode) { this.appState = vnode.attrs.appState;
<|file_name|>Base_Logging.py<|end_file_name|><|fim▁begin|>"""<|fim▁hole|>import pytest,logging from loguru import logger from pytest_reportportal import RPLogger, RPLogHandler class Base_Logging(): "A plug-n-play class for logging" def __init__(self,log_file_name=None,level="DEBUG",format="{time:YYYY-MM-DD HH:...
Qxf2 Services: A plug-n-play class for logging. This class wraps around Python's loguru module. """ import os, inspect
<|file_name|>BookListServiceImpl.java<|end_file_name|><|fim▁begin|>package com.twu.biblioteca.service.impl; import com.twu.biblioteca.mapper.BookListMapper; import com.twu.biblioteca.mapper.MyBatisUtil; import com.twu.biblioteca.model.Book; import com.twu.biblioteca.service.BookListService; import org.apache.ibatis.se...
private SqlSession sqlSession; private BookListMapper bookListMapper;
<|file_name|>compile.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import argparse import os import logging import cdec.configobj import cdec.sa<|fim▁hole|>import sys MAX_PHRASE_LENGTH = 4 def precompute(f_sa, max_len, max_nt, max_size, min_gap, rank1, rank2, tight_phrases): lcp = cdec.sa.LCP(f_sa) sta...
from cdec.sa._sa import monitor_cpu
<|file_name|>ArrayHashMultiMap.java<|end_file_name|><|fim▁begin|>/* * This file is part of the Cliche project, licensed under MIT License. See LICENSE.txt file in root folder of Cliche * sources. */ package net.dudehook.cliche2.util; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap...
putAll(map); } public void put(K key, V value)
<|file_name|>5de499ab5b62_cascade_useraffiliation_deletes.py<|end_file_name|><|fim▁begin|>"""Cascade UserAffiliation deletes Revision ID: 5de499ab5b62 Revises: 14f51f27a106 Create Date: 2016-12-13 00:21:39.842218 """ # revision identifiers, used by Alembic. revision = '5de499ab5b62' down_revision = '14f51f27a106' br...
<|file_name|>extern-call-indirect.rs<|end_file_name|><|fim▁begin|>// run-pass // ignore-wasm32-bare no libc to test ffi with #![feature(rustc_private)] extern crate libc; mod rustrt { extern crate libc; #[link(name = "rust_test_helpers", kind = "static")] extern "C" { pub fn rust_dbg_call( ...
extern "C" fn cb(data: libc::uintptr_t) -> libc::uintptr_t { if data == 1 { data } else { fact(data - 1) * data } }
<|file_name|>SynblkClass.java<|end_file_name|><|fim▁begin|>// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation ...
*
<|file_name|>SchedulerService.java<|end_file_name|><|fim▁begin|><|fim▁hole|>package com.stech.meetat.service; public interface SchedulerService { }<|fim▁end|>
<|file_name|>util.ts<|end_file_name|><|fim▁begin|>import {provide, Provider, Component} from 'angular2/core'; import {Type, isBlank} from 'angular2/src/facade/lang'; import {BaseException} from 'angular2/src/facade/exceptions'; import { ComponentFixture, AsyncTestCompleter, TestComponentBuilder, beforeEach, ...
template: string = "<router-outlet></router-outlet>") {
<|file_name|>layout_optimizer_test.py<|end_file_name|><|fim▁begin|># Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:/...
nodes = [] num_transposes = 0
<|file_name|>common.go<|end_file_name|><|fim▁begin|>package domain import ( "fmt" "regexp" )<|fim▁hole|> NameRegex = "^[A-Za-z0-9]+$" URLRegex = `^((ftp|http|https):\/\/)?(\S+(:\S*)?@)?((([1-9]\d?|1\d\d|2[01]\d|22[0-3])(\.(1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.([0-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|((www\.)?)?(([a-z\x{0...
const (
<|file_name|>algorithm_to_midi_test.py<|end_file_name|><|fim▁begin|>from player import Player import pandas as pd import time import asyncio from midiutil import MIDIFile PATTERNS = [[0, 0, 0, 0, 0, 0, 0, 0], #0 [1, 0, 0, 0, 0, 0, 0, 0], #1 [1, 0, 0, 0, 1, 0, 0, 0], #2 [1, 0, 1, 0, 1, 0, 0, 0], #3 ...
'''DATA PROCESSING'''
<|file_name|>alsace20.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Catch-up TV & More Copyright (C) 2019 SylvainCecchetto This file is part of Catch-up TV & More. Catch-up TV & More is free software; you can redistribute it and/or modify it under the terms of the GNU General Public...
You should have received a copy of the GNU General Public License along with Catch-up TV & More; if not, write to the Free Software Foundation,
<|file_name|>plots.py<|end_file_name|><|fim▁begin|># Copyright 2020 Department of Computational Biology for Infection Research - Helmholtz Centre for Infection Research # # 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 F...
plt.gca().set_visible(False) fig.savefig(os.path.join(output_dir, 'heatmap_bar.pdf'), dpi=100, format='pdf', bbox_inches='tight')
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for c2asm project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ """ <|fim▁hole|>import os from django.core.wsgi impo...
<|file_name|>checksum.cpp<|end_file_name|><|fim▁begin|>#include "util/checksum.hpp" namespace trillek { namespace util { namespace algorithm { static uint32_t crc32_table[256]; static bool crc32_table_computed = false; static void GenCRC32Table() { uint32_t c; uint32_t i; int k; for(i = 0; i < 256; i...
uint32_t limit = ADLER_LIMIT / 16; while(limit--) { c1 += d[n ]; c2 += c1; c1 += d[n+ 1]; c2 += c1; c1 += d[n+ 2]; c2 += c1; c1 += d[n+ 3]; c2 += c1;
<|file_name|>ex31.py<|end_file_name|><|fim▁begin|>print "You enter a dark room with two doors. Do you go through door #1 or door #2?" door = raw_input("> ") if door == "1": print "There`s a giant bear here eating a chees cake. What do you do?" print "1. Take the cake." print "2. Scream at the bear." bear = raw_...
<|file_name|>autoderef-method-priority.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....
}
<|file_name|>devtools.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 https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::CSSStyleDeclar...
use ipc_channel::ipc::IpcSender; use js::jsval::UndefinedValue; use js::rust::wrappers::ObjectClassName;
<|file_name|>filltypespersp.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "gm.h" #include "SkGradientShader.h" namespace skiagm { class FillTypePerspGM : public GM { SkPath f...
<|file_name|>S15.8.2.13_A13.js<|end_file_name|><|fim▁begin|>// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /** * If x is -Infinity and y>0 and y is an odd integer, Math.pow(x,y) is -Infinity * * @path ch15/15.8/15.8.2/15.8.2.13/S15...
y[0] = 1; y[1] = 111; y[2] = 111111; ynum = 3;
<|file_name|>DynamicGraphTestFrame.java<|end_file_name|><|fim▁begin|>package com.googlecode.blaisemath.graph.test; /* * #%L * BlaiseGraphTheory * -- * Copyright (C) 2009 - 2021 Elisha Peterson * -- * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance...
} // Variables declaration - do not modify//GEN-BEGIN:variables
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![allow(non_camel_case_types)] // See https://jansson.readthedocs.io/ for API documentation. use std::os::raw::{c_char, c_int, c_longlong, c_void}; /// The type of a JSON value. #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum json_type { J...
json_object_set_new(x, cstr!("c"), json_false()); json_object_set_new(x, cstr!("d"), json_integer(42)); json_object_set_new(x, cstr!("e"), json_real(1.25));
<|file_name|>ClientAuthHelper.java<|end_file_name|><|fim▁begin|>package org.orchestra.client; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java...
if(apikey == null || secret == null) return null; cache.put(username, apikey); cache.put(apikey, secret);
<|file_name|>controlgroup-f525e8d53867db2d7a4e30c79b5d800b.js<|end_file_name|><|fim▁begin|>( function( factory ) { if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. define( [ "jquery" ], factory ); } else { // Browser globals factory( jQuery ); } } ( function( $ )...
that.element
<|file_name|>validateDni.ts<|end_file_name|><|fim▁begin|>export class ValidateDni implements ng.IDirective{ public link: (scope: angular.IScope , elem: ng.IAugmentedJQuery, attrs: angular.IAttributes, ngModel: angular.INgModelController) => void; restrict ='A'; require = 'ngModel'; constructor(scope: angular....
directive['$inject'] = ['$log'];
<|file_name|>logger.js<|end_file_name|><|fim▁begin|>"use strict"; const bunyan = require("bunyan") , bformat = require("bunyan-format") , config = require("config") ; const log_level = process.env.LOG_LEVEL || (config.has('app.log_level') ? config.get('app.log_level') : "info"); const formatOut = bforma...
] });
<|file_name|>todo.spec.ts<|end_file_name|><|fim▁begin|>import {it, describe, expect, inject, beforeEachProviders} from 'angular2/testing'; import {Todo} from '../../../src/scripts/todo/todo'; describe('Todo', () => { let todo: Todo; beforeEach(() => { todo = new Todo(); }); it('should instantiate with no...
});
<|file_name|>group.rs<|end_file_name|><|fim▁begin|>#![deny(warnings)] #![cfg_attr(feature = "cargo-clippy", allow(many_single_char_names))] extern crate mpi; use mpi::traits::*; use mpi::topology::{SystemGroup, GroupRelation, Rank}; fn main() { let universe = mpi::initialize().unwrap(); let world = universe.w...
// inverting rank mappings let rev: Vec<Rank> = (0..g.size()).rev().collect(); let r = g.include(&rev[..]);
<|file_name|>0005_auto__del_field_billstage_stage.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models <|fim▁hole|> def forwards(self, orm): # Deleting field 'BillStage.stage' db.delete_colu...
class Migration(SchemaMigration):
<|file_name|>HomeRoute.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react' import { observer } from 'mobx-react' import styled from 'styled-components' export interface IHomeRouteProps { className: string } @observer class HomeRoute extends React.Component<IHomeRouteProps, {}> { render() { const {...
}
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>extern crate std; use std::sync::{ Arc, Future, Mutex }; use std::rc::Rc; use threaded_executer::CommandsThread; use std::string::String; #[allow(dead_code)] mod libglfw3; mod window; pub struct GLContext { window: Mutex<window::Window> } impl GLContext { pub fn ne...
} pub fn exec<T:Send>(&self, f: proc(): Send -> T) -> Future<T> {
<|file_name|>capsulated.js<|end_file_name|><|fim▁begin|><|fim▁hole|> var mtests = capsule.tests.modules; var thsocket = capsule.tests.modules.transport.http.socket_srv; // mtests.http_responder.test(capsule); // thsocket.test({ 'url' : 'http://localhost:8810/sockethh.js'}, capsule); var tht...
exports.main = function(env){ var capsule = env.capsule;
<|file_name|>lexer.py<|end_file_name|><|fim▁begin|>""" `GrammarLexer` is compatible with Pygments lexers and can be used to highlight the input using a regular grammar with token annotations. """ from __future__ import unicode_literals from pygments.token import Token from prompt_toolkit.layout.lexers import Lexer fro...
if trailing_input: for i in range(trailing_input.start, trailing_input.stop): characters[i][0] = Token.TrailingInput
<|file_name|>TagComponent.java<|end_file_name|><|fim▁begin|>// Copyright 2000-2020 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.intellij.ide.plugins.newui; import com.intellij.ide.IdeBundle; import com.intellij.ui.JBColor; import com....
}
<|file_name|>gost4401_81.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ * Partial implementation of standard atmospheric model as described in <|fim▁hole|> * sensors. * * Supported modelling of temperature and pressure over the altitude span from * 0 up to 51km. * * algorithm by Oleg Kochetov <ok@n...
* GOST 4401-81 useful for processing of data from meteorological balloon
<|file_name|>main.js<|end_file_name|><|fim▁begin|>$(function(){ BrowserDetect.init(); $('.minifyme').on("navminified", function() { // $('td.expand,th.expand').toggle(); }); // Activate all popovers (if NOT mobile) if ( !BrowserDetect.isMobile() ) { $('[data-toggle="popover"]').popover(); ...
{ string: navigator.userAgent, subString: "Chrome", identity: "Chrome" }, { string: navigator.userAgent, subString: "MSIE", identity: "Explorer" }, { string: navigator.userAgent, subString: "Firefox", identity: "Firefox" },
<|file_name|>ipynb.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright © 2013-2015 Damián Avila, Chris Warrick and others. # Permission is hereby granted, free of charge, to any # person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the # Software ...
self.logger = get_logger('compile_ipynb', STDERR_HANDLER) super(CompileIPynb, self).set_site(site)
<|file_name|>makeAllOligos.py<|end_file_name|><|fim▁begin|>''' Designs oligos for a pre RNA-seq selection method ''' ### imports ### import sys import os import numpy as np def readFastaFile(fastaFilePath): ''' Given a path to a multiline fasta file, reads the file, returning two lists - one containing the sequenc...
outputs: writes the designed oligos to a Fasta file '''
<|file_name|>data_analysis.py<|end_file_name|><|fim▁begin|>from pyelectro import analysis as pye_analysis<|fim▁hole|> file_name = "100pA_1a.csv" t, v = pye_analysis.load_csv_data(file_name) analysis_var = { "peak_delta": 0.1, "baseline": 0, "dvdt_threshold": 2, "peak_threshold": 0, } analysis = pye_an...
from matplotlib import pyplot
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>from players.models import Player from rest_framework import serializers from teams.models import Team class PlayerTeamSerializer(serializers.ModelSerializer): """Serializer for nesting a Team object inside a Player""" url = serializers.HyperlinkedIdent...
)
<|file_name|>provider_command.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 th...
<|file_name|>simpleMsg.go<|end_file_name|><|fim▁begin|>package utils import ( "encoding/binary" ) const ( MaxMsgLen = 65536 ) //信息,一个简单的[]byte信息结构 限制最大长度65536 type SimpleMsg struct { MsgSize uint32 MsgSender uint32 MsgReceiver uint32 // 0:broadcast MsgBody []byte //原始数据,用于转发 } //创建一条信息 //1.[]byte格式:...
<|file_name|>test_ptp_clock_cdc_64.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Copyright (c) 2019 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,...
<|file_name|>test_update_statement.py<|end_file_name|><|fim▁begin|># Copyright DataStax, 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 # ...
self.assertEqual(us.get_context(), {'4': 'b', '5': 'd', '3': 'x'}) def test_additional_rendering(self): us = UpdateStatement('table', ttl=60)
<|file_name|>test_query.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # =============================================================================== # Copyright (c) 2014 Geoscience Australia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are pe...
<|file_name|>test8.cpp<|end_file_name|><|fim▁begin|>//----------------------------------------------------------------------------- // boost-libs variant/test/test8.cpp header file // See http://www.boost.org for updates, documentation, and revision history. //-----------------------------------------------------------...
// Eric Friedman, Itay Maman
<|file_name|>PythonVM.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 * * ...
* Unless required by applicable law or agreed to in writing, software
<|file_name|>grid-columns.js<|end_file_name|><|fim▁begin|>describe("grid-columns", function() { function createSuite(buffered) { describe(buffered ? "with buffered rendering" : "without buffered rendering", function() { var defaultColNum = 4, totalWidth = 1000, gr...
}]);
<|file_name|>ast.rs<|end_file_name|><|fim▁begin|>use std::cell::Cell; use std::fmt; use std::vec::Vec; pub type Var = String; pub type Atom = String; pub enum TopLevel { Fact(Term), Query(Term) } #[derive(Clone, Copy)] pub enum Level { Shallow, Deep } impl fmt::Display for Level { fn fmt(&self, f: ...
pub enum TermRef<'a> { Atom(Level, &'a Cell<usize>, &'a Atom), Clause(Level, &'a Cell<usize>, &'a Atom, &'a Vec<Box<Term>>),
<|file_name|>RoutingResult.java<|end_file_name|><|fim▁begin|>package org.spincast.core.routing; import java.util.List; import org.spincast.core.exchange.RequestContext; /**<|fim▁hole|> * The result of the router, when asked to find matches for * a request. */ public interface RoutingResult<R extends RequestContex...
<|file_name|>if-without-else-result.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...
// option. This file may not be copied, modified, or distributed // except according to those terms. fn main() {
<|file_name|>time-frame.controller.js<|end_file_name|><|fim▁begin|>(function() { 'use strict'; angular .module('sentryApp') .controller('TimeFrameController', TimeFrameController); TimeFrameController.$inject = ['$scope', '$state', 'TimeFrame', 'ParseLinks', 'AlertService', 'paginationCons...
} return result; }
<|file_name|>CanvasD2D.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2013 Rainmeter Project Developers * * This Source Code Form is subject to the terms of the GNU General Public * License; either version 2 of the License, or (at your option) any later * version. If a copy of the GPL was not distributed wit...
&rSrc);
<|file_name|>wflow_w3ra_new.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python """ Definition of the wflow_W3RA model. --------------------------------------- The model is modified from the Australian Water Resources Assessment Landscape (AWRA-L) model version 0.5 W3RA is documented in van Dijk et al. (2013), Water Res...
) # already in W m-2 s-1; set minimum of 0.01 to avoid numerical problems Ta = self.TMIN + pcr.scalar(0.75) * (self.TMAX - self.TMIN) # T in degC
<|file_name|>test_slurm_queues_getter_with_props.py<|end_file_name|><|fim▁begin|><|fim▁hole|>#!/usr/bin/env python import pytest from pyxenon_snippets import slurm_queues_getter_with_props def test_slurm_queues_getter_with_props(): slurm_queues_getter_with_props.run_example()<|fim▁end|>
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models SETTING_NAME = ( ('conf_space', 'Confluence Space Key'), ('conf_page', 'Confluence Page'), ('jira_project', 'JIRA Project Code Name'), ('github_project', 'GitHub Project'), )<|fim▁hole|> primary_key=True, ...
class AppSettings(models.Model): name = models.CharField(max_length=50,
<|file_name|>createWhiteningValues.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 import collections import os from loranode import RN2483Controller # from ../_examplify.py import Examplify import os os.sys.path.append(os.path.dirname(os.path.abspath('.'))) from _examplify import Examplify import lora, pmt, osmo...
def captureSequence(self, inputFile):
<|file_name|>CommitSequenceTest.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 to You ...
* limitations under the License. */ package gobblin.runtime.commit;
<|file_name|>DataManager.java<|end_file_name|><|fim▁begin|>package dk.itu.pervasive.mobile.data; import android.app.Activity; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.preference.PreferenceManager; import android.provider.MediaStore; import android.util.Log;...
private Activity _context;
<|file_name|>test_classify_documents.py<|end_file_name|><|fim▁begin|>from flask import json from unittest.mock import patch, Mock from urbansearch.gathering.indices_selector import IndicesSelector from urbansearch.server.main import Server from urbansearch.server import classify_documents from urbansearch.server.class...
<|file_name|>SimpleForm.js<|end_file_name|><|fim▁begin|>import React from 'react'; import PropTypes from 'prop-types'; import { reduxForm } from 'redux-form'; import { connect } from 'react-redux'; import compose from 'recompose/compose'; import getDefaultValues from './getDefaultValues'; import FormField from './FormF...
const enhance = compose( connect((state, props) => ({ initialValues: getDefaultValues(state, props),
<|file_name|>lc0100_same_tree.py<|end_file_name|><|fim▁begin|>"""Leetcode 100. Same Tree Easy URL: https://leetcode.com/problems/same-tree/ Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally identical and the nodes have the...
<|file_name|>parser.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ COHORTE configuration file parser: converts a parsed configuration file to beans :author: Thomas Calmant :license: Apache Software License 2.0 .. Copyright 2014 isandlaTech Licensed under the Apache...
return Bundle(name, filename, properties, version, getattr(bundle, 'optional', False))
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># portage.py -- core Portage functionality # Copyright 1998-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 VERSION="HEAD" # =========================================================================== # START OF IMPORTS --...
<|file_name|>envelope-square.d.ts<|end_file_name|><|fim▁begin|>// TypeScript Version: 2.1 import * as React from 'react';<|fim▁hole|><|fim▁end|>
import { IconBaseProps } from 'react-icon-base'; export default class FaEnvelopeSquare extends React.Component<IconBaseProps, any> { }
<|file_name|>manifestation.rs<|end_file_name|><|fim▁begin|>//! Maintains a Rust installation by installing individual Rust //! platform components from a distribution server. use config::Config; use manifest::{Component, Manifest, TargetedPackage}; use dist::{download_and_check, DownloadCfg, TargetTriple, DEFAULT_DIST...
<|file_name|>phonegap.min.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node /*! * Module dependencies. */ var CLI = require('../lib/cli'), argv = require('optimist').boolean('d') .boolean('device') .boolean('e')<|fim▁hole|> ...
.boolean('emulator')
<|file_name|>wire.py<|end_file_name|><|fim▁begin|># Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """Implement standard (and unused) TCP protocols. These protocols are either provided by inetd, or are not provided at all. """ from __future__ import absolute_import, division import time impor...
if _PY3: __all3__ = ["Echo"]
<|file_name|>observers.ts<|end_file_name|><|fim▁begin|>import { ModelData, ModelReference } from './dataTypes'; import { Plump } from './plump'; import { Observable } from 'rxjs'; import * as deepEqual from 'deep-equal';<|fim▁hole|> o: Observable<ModelData>, attr: string, ): Observable<T> { return o .filter(v ...
export function observeAttribute<T>(
<|file_name|>validate.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import absolute_import from math import isinf, isnan from warnings import warn NOT_MASS_BALANCED_TERMS = {"SBO:0000627", # EXCHANGE "SBO:0000628", # DEMAND "SBO:000062...
(met.id, met.formula)) return errors
<|file_name|>TwitchFollowedStreamsResponse.java<|end_file_name|><|fim▁begin|><|fim▁hole|>import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @JsonIgnoreProperties(ignoreUnknown = true) public class TwitchFollowedStreamsResponse { private TwitchStream[] streams; public TwitchStream[] getStreams() { ...
package com.derpgroup.livefinder.manager; import java.util.Arrays;
<|file_name|>core.py<|end_file_name|><|fim▁begin|>from abc import ABCMeta, abstractmethod, abstractproperty from contextlib import contextmanager from functools import wraps import gzip from inspect import getargspec from itertools import ( combinations, count, product, ) import operator import os from os.p...
) sessions = trading_calendar.sessions_in_range(first_session, last_session)
<|file_name|>PartitionAlloc.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2013 Google Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code mus...
bool returnNull = flags & PartitionAllocReturnNull; if (UNLIKELY(partitionBucketIsDirectMapped(bucket))) {
<|file_name|>md5s3stash.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ md5s3stash content addressable storage in AWS S3 """ from __future__ import unicode_literals import sys import os import argparse import tempfile import urllib2 import urllib import urlparse import base64 import logging import hashlib...
# return urllib2.urlopen(req) return opener.open(req)
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from pyramid.view import view_config<|fim▁hole|>import logging import pysite.resmgr L = logging.getLogger('PySite') @view_config( name='', context=pysite.plugins.models.Node, renderer='pysite:plugins/templates/index.mako', p...
<|file_name|>tool_bar.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2015, The Rust-GNOME Project Developers. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT> //! Create bars of buttons and othe...
unsafe { ffi::gtk_toolbar_set_show_arrow(GTK_TOOLBAR(self.pointer), to_gboolean(show_arrow)); } }
<|file_name|>models.py<|end_file_name|><|fim▁begin|># encoding: utf-8 from __future__ import absolute_import, unicode_literals from apiview.model import AbstractUserMixin, BaseModel from django.contrib.auth.base_user import AbstractBaseUser from django.db import models class User(AbstractUserMixin, BaseModel, Abstra...
username = models.CharField('用户名', unique=True, max_length=64, editable=False, null=False, blank=False) password = models.CharField('密码', max_length=128, unique=True, editable=False, null=False, blank=True) nickname = models.CharField('昵称', unique=True, max_length=64, editable=False, null=False, blank=False...
<|file_name|>SimpleBinaryTree.py<|end_file_name|><|fim▁begin|># simple binary tree # in this implementation, a node is inserted between an existing node and the root class BinaryTree(): def __init__(self,rootid): self.left = None self.right = None self.rootid = rootid def getLeftChil...
<|file_name|>smc2psmc.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import numpy as np import argparse from smcpp.estimation_tools import load_data if __name__ == "__main__": parser = argparse.ArgumentParser( description='Convert SMC++-formatted data set into PSMCfa-style data.') parser....
Lp = len(code) // 79 if Lp > 0:
<|file_name|>introductions_spec.js<|end_file_name|><|fim▁begin|><|fim▁hole|> cy.login(); cy.createContact('John', 'Doe', 'Man'); cy.createContact('Jane', 'Doe', 'Woman'); cy.createContact('Joe', 'Shmoe', 'Man'); }); it('lets you fill first met without an introducer', function () { cy.url().shoul...
describe('Introduction', function () { beforeEach(function () {
<|file_name|>effect-transfer.min.js<|end_file_name|><|fim▁begin|>/*! * jQuery UI Effects Transfer 1.11.1 * http://jqueryui.com<|fim▁hole|> * http://jquery.org/license * * http://api.jqueryui.com/transfer-effect/ */ !function(a){"function"==typeof define&&define.amd?define(["jquery","./effect"],a):a(jQuery)}(functi...
* * Copyright 2014 jQuery Foundation and other contributors * Released under the MIT license.
<|file_name|>FeijianCode.java<|end_file_name|><|fim▁begin|>package com.gulj.common.util; import java.io.UnsupportedEncodingException; public enum FeijianCode { SAVE_SUCCESS("0001","保存成功"), SAVE_ERROR("0002","保存失败"), UPDATE_SUCCESS("0003","修改成功"), UPDATE_ERROR("0004","修改失败"), DELET...
<|file_name|>quicksort.js<|end_file_name|><|fim▁begin|>const Comparator = require('../../util/comparator'); /** * Swaps two elements in the array */ const swap = (array, x, y) => { const tmp = array[y]; array[y] = array[x]; array[x] = tmp; }; /** * Chooses a pivot and makes every element that is * lower tha...
<|file_name|>BayesInference.py<|end_file_name|><|fim▁begin|>__author__ = 'Varun Nayyar' from Utils.MFCCArrayGen import emotions, speakers, getCorpus from MCMC import MCMCRun from emailAlerter import alertMe def main2(numRuns = 100000, numMixtures = 8, speakerIndex = 6): import time for emotion in emot...
message += "\nEmotion: {}, speaker:{}\n".format(emotion, speakers[speakerIndex])
<|file_name|>stock.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core'; import {ModalController} from 'ionic-angular'; import {RawMaterial, RawMaterialProvider} from "../../providers/raw-material/raw-material"; import {Observable} from "rxjs/Observable"; import {NewStockPage} from "../new-stock/ne...
@Component({ selector: 'page-stock', templateUrl: 'stock.html',