prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
__all__ = ["pval_task", "annotation_task"]
<|file_name|>db.go<|end_file_name|><|fim▁begin|>// Copyright 2016 PingCAP, 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 // // ...
LOOP: for i := 0; i < retryCount; i++ { if i > 0 { log.Warnf("exec sql retry %d - %v - %v", i, sqls, args)
<|file_name|>BottomSheet.js<|end_file_name|><|fim▁begin|>/* @flow */ import React from "react"; import PropTypes from "prop-types"; import { Text, TouchableOpacity, Platform, StyleSheet, ScrollView, PixelRatio, View } from "react-native"; import Modal from "react-native-modalbox"; type Props = { styl...
<|file_name|>update_listed_companies.py<|end_file_name|><|fim▁begin|>import logging from datetime import datetime from django.conf import settings from django.core.management.base import BaseCommand, CommandError import requests from companies.models import Company logger = logging.getLogger('jobs.management.comman...
<|file_name|>rate_collection.py<|end_file_name|><|fim▁begin|>"""A collection of classes and methods to deal with collections of rates that together make up a network.""" # Common Imports import warnings import functools import math import os from operator import mul from collections import OrderedDict from ipywidget...
ax.spines['top'].set_visible(False)
<|file_name|>upgrade-before.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # This is run by Travis-CI before an upgrade to load some data into the # database. After the upgrade is complete, the data is verified by # upgrade-after.py to make sure that the upgrade of the database went smoothly. # import logging...
sys.path.insert(0, '../nipap')
<|file_name|>parameters.js<|end_file_name|><|fim▁begin|>// getPostsParameters gives an object containing the appropriate find and options arguments for the subscriptions's Posts.find() getPostsParameters = function (terms) { var maxLimit = 200; // console.log(terms) // note: using jquery's extend() wi...
case 'admin': find = adminMongoQuery;
<|file_name|>WeatherDao.java<|end_file_name|><|fim▁begin|>package com.wearit.shike.web.model.dao.weather; import java.util.List; import com.wearit.shike.web.model.weather.TrackWeather; import com.wearit.shike.web.model.weather.Weather; public interface WeatherDao {<|fim▁hole|> * Weather. * * @return */ publi...
/** * Metodo che viene usato per elencare tutti i record appartenenti alla tabella
<|file_name|>TDAnnotationDecl.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2015-2016 Didier Villevalois. * * This file is part of JLaTo. * * JLaTo is free software: you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the * Free Software Foun...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url from externals.views import ( PartnerVendorNumberAPIView, PartnerExternalDetailsAPIView, PartnerBasicInfoAPIView, ) urlpatterns = [ url(r'^vendor-number/partner/$', PartnerVendorNumberAPIView.as_view(), name="vendor-nu...
]
<|file_name|>incr_transfer_tree.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from __future__ import print_function import argparse import os import subprocess import sys from test_util import TestFailedError, run_command, \ serializeIncrParseMarkupFile <|fim▁hole|> formatter_class=argparse.RawDes...
def main(): parser = argparse.ArgumentParser(
<|file_name|>Grid.js<|end_file_name|><|fim▁begin|>/** * @jsx React.DOM * @copyright Prometheus Research, LLC 2014 */ "use strict"; var React = require('react/addons'); var PropTypes = React.PropTypes; var Header = require('./Header'); var Viewport = require('./Vie...
componentDidUpdate() { this._onScroll(); },
<|file_name|>version.js<|end_file_name|><|fim▁begin|>/** * Created by Guoliang Cui on 2015/5/5. */ var utility=require('../lib/utility');<|fim▁hole|> var resultObj; resultObj=utility.jsonResult(false,"OK",{version:ConfigInfo.basicSettings[params.key]}); res.send(resultObj); }<|fim▁end|>
var ConfigInfo=require("../../config/baseConfig") exports.getVersion=function(req,res){ var params=utility.parseParams(req).query;
<|file_name|>loading.js<|end_file_name|><|fim▁begin|>import './chunk-1fafdf15.js'; import { merge } from './helpers.js'; import { V as VueInstance } from './chunk-bd4264c6.js'; import { r as registerComponent, a as registerComponentProgrammatic, u as use } from './chunk-cca88db8.js'; import './chunk-b9bdb0e4.js'; impor...
var propsData = merge(defaultParam, params); var vm = typeof window !== 'undefined' && window.Vue ? window.Vue : localVueInstance || VueInstance; var LoadingComponent = vm.extend(Loading);
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url from dojo.engagement import views urlpatterns = [ # engagements and calendar url(r'^calendar$', views.engagement_calendar, name='calendar'), url(r'^calendar/engagements$', views.engagement_calendar, name='engagement_calend...
url(r'^engagement$', views.engagement, name='engagement'), url(r'^engagement/new$', views.new_engagement, name='new_eng'),
<|file_name|>actual.js<|end_file_name|><|fim▁begin|>declare class X {<|fim▁hole|><|fim▁end|>
a: number; static b: number; c: number; }
<|file_name|>pad-string.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export default function padString(input: string): string;<|fim▁end|>
<|file_name|>logging_test.py<|end_file_name|><|fim▁begin|>from pathlib import Path import pytest from loguru import logger from libretime_shared.logging import ( DEBUG, INFO, create_task_logger, level_from_name, setup_logger, ) @pytest.mark.parametrize( "name,level_name,level_no", [ ...
], )
<|file_name|>RemoveDuplicatesfromSortedList.java<|end_file_name|><|fim▁begin|>package remove_duplicates_from_sorted_list; import common.ListNode; public class RemoveDuplicatesfromSortedList { public class Solution { public ListNode deleteDuplicates(ListNode head) { if (head != null) { ...
<|file_name|>labeledStatementWithLabel.ts<|end_file_name|><|fim▁begin|>// @lib: es2015 label: function fn() { } label: function* gen() { } label: async function gen1() { } label: enum E {} label: interface I {} label: class C { } label: var a = 1; label: let b = 1; label: const c = 1; label: module M { }<|fim▁hole|><...
label: namespace N {} label: type T = {}
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render, redirect, get_object_or_404 from django.views.generic import TemplateView from farxiv.forms import * class Index(TemplateView): template_name = 'index.html' def get_context_data(self, **kwargs): context = super(Temp...
template_name='farticle.html'
<|file_name|>ElementLoader.go<|end_file_name|><|fim▁begin|>package loaders import ( "encoding/json" "io/ioutil" "github.com/ftcjeff/ConfigurationProcessor/logger" "github.com/ftcjeff/ConfigurationProcessor/types" ) func ElementLoader(id int, fileName string, channel chan types.ElementChannel) { defer logger.Tra...
panic(err) }
<|file_name|>tanh.rs<|end_file_name|><|fim▁begin|>#![feature(test)] extern crate test; extern crate collenchyma as co; extern crate collenchyma_nn as co_nn; extern crate rand; use test::Bencher; use co::prelude::*; use co_nn::*; use rand::{thread_rng, Rng}; fn backend() -> Backend<Native> { Backend::<Native>::d...
#[bench] fn bench_10_tanh_grad_10000_native(b: &mut Bencher) { let backend = backend(); let (mut x, mut dx, mut out, mut dout) = arguments_grad(&backend, 10000);
<|file_name|>create_signercert.go<|end_file_name|><|fim▁begin|>package admin import ( "errors" "fmt" "github.com/golang/glog" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/openshift/origin/pkg/cmd/server/crypto" ) type CreateSignerCertOptions struct { CertFile string KeyFile string Ser...
if o.Overwrite {
<|file_name|>options.rs<|end_file_name|><|fim▁begin|>//! This module contains the configuration of the application. //! //! All options are passed individually to each function and are not bundled //! together. //! //! # Examples //! //! ```no_run //! # use doh::Options; //! let options = Options::parse(); //! println!...
let u = matches.value_of("URL").unwrap();
<|file_name|>value.rs<|end_file_name|><|fim▁begin|>use std::ffi::CString; use std::{fmt, mem, ptr}; use std::ops::{Deref, Index}; use libc::{c_char, c_int, c_uint}; use ffi::core; use ffi::prelude::LLVMValueRef; use ffi::LLVMAttribute; use ffi::core::{ LLVMConstStringInContext, LLVMConstStructInContext, LLVMConstVe...
} }
<|file_name|>FormRecordLoaderTask.java<|end_file_name|><|fim▁begin|>package org.commcare.tasks; import android.content.Context; import android.text.TextUtils; import android.text.format.DateUtils; import android.util.Pair; import org.commcare.CommCareApplication; import org.commcare.models.AndroidSessionWrapp...
public boolean registerPriority(FormRecord record) { synchronized (priorityQueue) {
<|file_name|>is_pricelist_item.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from openerp import tools from openerp import models,fields,api from openerp.tools.translate import _ class is_pricelist_item(models.Model): _name='is.pricelist.item' _order='pricelist_name,price_version_id,sequen...
moule = fields.Char('Moule ou Dossier F') sequence = fields.Integer('Sequence')
<|file_name|>policy.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 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 #...
"""Implements the "not" logical operator.
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # conf.py """ Loading a configuration ~~~~~~~~~~~~~~~~~~~~~~~ Various aspects of PyPhi's behavior can be configured. When PyPhi is imported, it checks for a YAML file named ``pyphi_config.yml`` in the current directory a...
VALIDATE_CONDITIONAL_INDEPENDENCE = Option(
<|file_name|>client.py<|end_file_name|><|fim▁begin|># This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # T...
from suds.properties import Unskin
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod bencode;<|fim▁hole|><|fim▁end|>
pub mod convert; pub mod dict; pub mod list;
<|file_name|>OCNMapService.java<|end_file_name|><|fim▁begin|>package tc.oc.api.ocn; import java.util.Collection; import javax.inject.Singleton;<|fim▁hole|>import com.google.common.util.concurrent.ListenableFuture; import tc.oc.api.docs.MapRating; import tc.oc.api.docs.virtual.MapDoc; import tc.oc.api.docs.virtual.User...
<|file_name|>astpprint.py<|end_file_name|><|fim▁begin|>"""Python AST pretty-printer. Copyright(C) 2007, Martin Blais <blais@furius.ca> This module exports a function that can be used to print a human-readable version of the AST. This code is downloaded verbatim from: http://code.activestate.com/recipes/533146/ <...
""" __author__ = 'Martin Blais <blais@furius.ca>'
<|file_name|>include_dirs.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
var path = require('path'); console.log(path.join(path.relative('.', __dirname),'include'));
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright (C) 2020 Natanael Mojica <neithanmo@gmail.com> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of ...
// This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
<|file_name|>marking.rs<|end_file_name|><|fim▁begin|>use crate::gc::root::Slot; use crate::gc::{Address, Region}; pub fn start(rootset: &[Slot], heap: Region, perm: Region) {<|fim▁hole|> for root in rootset { let root_ptr = root.get(); if heap.contains(root_ptr) { let root_obj = root_p...
let mut marking_stack: Vec<Address> = Vec::new();
<|file_name|>describe.py<|end_file_name|><|fim▁begin|># Copyright 2014 Google Inc. All Rights Reserved. """Command for describing target HTTPS proxies.""" from googlecloudsdk.compute.lib import base_classes class Describe(base_classes.GlobalDescriber): """Display detailed information about a target HTTPS proxy.""" ...
<|file_name|>framerate.rs<|end_file_name|><|fim▁begin|>//! Framerate control use libc; use libc::{c_void, size_t}; use std::mem; use ::get_error; use sys::gfx; /// Structure holding the state and timing information of the framerate controller. pub struct FPSManager { raw: *mut gfx::framerate::FPSmanager, } impl ...
unsafe { let size = mem::size_of::<gfx::framerate::FPSmanager>() as size_t; let raw = libc::malloc(size) as *mut gfx::framerate::FPSmanager; gfx::framerate::SDL_initFramerate(raw);
<|file_name|>SplinterLogTest.java<|end_file_name|><|fim▁begin|>package com.splinter.graphing; import org.junit.Assert; import org.junit.Test; import java.util.HashMap; import java.util.Map; public class SplinterLogTest { @Test public void testDisableLogs() { try { SLog.setEnabled(false); ...
.withUserData("size", "large") .withInstrumentationOverride(0, null) .toString());
<|file_name|>optimizer.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/. */ //! Transforms a display list to produce a visually-equival...
where I: Iterator<Item=&'a DisplayItem> { for display_item in display_items {
<|file_name|>na.rs<|end_file_name|><|fim▁begin|>use failure::Error; use regex::Captures; use crate::captures::CapturesExt; use crate::details::Details;<|fim▁hole|>pub(crate) fn na_handler( popularity: &mut Popularity, sink: &mut Vec<Details>, captures: Captures, ) -> Result<(), Error> { let point = usi...
use crate::pool::Popularity;
<|file_name|>wicked.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################################### # # MediaPortal for Dreambox OS # # Coded by MediaPortal Team (c) 2013-2017 # # This plugin is open source but it is NOT free software. # # ...
<|file_name|>ModelBuildPath.java<|end_file_name|><|fim▁begin|>/* * #%~ * org.overture.ide.core * %% * Copyright (C) 2008 - 2014 Overture * %% * 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 Foundati...
{ srcPaths.add(getDefaultModelSrcPath());
<|file_name|>get_users_emails.py<|end_file_name|><|fim▁begin|>from settings.secure import OAUTH_TOKEN, CANVAS_URL from canvas_sdk.methods import courses from canvas_sdk.utils import get_all_list_data from canvas_sdk import RequestContext import sys # Get the course ID from the command line course_id = None if len(sys....
# Print the names and emails in CSV foramt for idx, user in enumerate(users): print "%s,%s" % user
<|file_name|>gtc_noise.cpp<|end_file_name|><|fim▁begin|>#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtc/noise.hpp> #include <glm/gtc/type_precision.hpp> #include <glm/gtx/raw_data.hpp> int test_simplex() { int Error = 0; glm::u8vec4 const PixelSimplex2D(glm::byte(glm::abs(glm::simplex(glm::vec2(0.f, 0.f)...
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>/* Copyright 2017 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by a...
export { EditUsers } from './EditUsers';
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from django.views.generic import *
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup setup( name='g1.databases', packages=[ 'g1.databases', ], install_requires=[ 'SQLAlchemy', 'g1.bases', ], extras_require={ 'parts': [ 'g1.apps',<|fim▁hole|> ], ...
<|file_name|>Elements.ts<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2017 ~ present NAVER Corp. * billboard.js project is licensed under the MIT license */ // @ts-nocheck import CLASS from "./classes"; import {getCentroid, isString, parseDate} from "./util"; /** * Stanford diagram plugin element class * @cla...
yvCustom(d, xyValue): number { const $$ = this; const yScale = d.axis && d.axis === "y2" ? $$.scale.y2 : $$.scale.y;
<|file_name|>init.py<|end_file_name|><|fim▁begin|># # Copyright (C) 2008 The Android Open Source Project # # 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|>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 the Apache ...
# Prefer safe by default if "check" not in kwargs: kwargs["check"] = True
<|file_name|>test_context.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Unit tests of context.py. """ from datetime import datetime import unittest from pystache.context import _NOT_FOUND, _get_value, KeyNotFoundError, ContextStack from pystache.tests.common import AssertIsMixin, AssertStringMixin, AssertExce...
self.assertEqual(_get_value(item1, 'upper'), 'ABC') self.assertNotFound(item2, 'upper')
<|file_name|>myjQuery.js<|end_file_name|><|fim▁begin|><|fim▁hole|>/** * Created by zhang on 16/5/19. */ $.myjq = function () { alert("hello my jQuery") }; //js的扩展 $.fn.myjq=function(){ $(this).text("hello") };<|fim▁end|>
<|file_name|>12148_Electricity.py<|end_file_name|><|fim▁begin|># Problem name: 12148 Electricity # Problem url: https://uva.onlinejudge.org/external/121/12148.pdf # Author: Andrey Yemelyanov import sys import math import datetime def readline(): return sys.stdin.readline().strip() def main(): while True: ...
meter_readings = [] for i in range(n_readings): reading = [int(x) for x in readline().split()]
<|file_name|>test_storage_queue.py<|end_file_name|><|fim▁begin|># coding: utf-8 #------------------------------------------------------------------------- # Copyright (c) Microsoft. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complian...
# Asserts self.assertIsNotNone(result)
<|file_name|>f2p.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import os import re import itertools from functools import reduce from .version import __version__ sep_regex = re.compile(r'[ \-_~!@#%$^&*\(\)\[\]\{\}/\:;"|,./?`]') def get_portable_filename(filename): path, _ = os.path.split(__file__) ...
return results def f2p(phrase, max_word_size=15, cutoff=3):
<|file_name|>parser.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from .record import ( Metadata, Record, ) __all__ = ['Parser'] class Parser: def __init__(self, store): self.store = store def parse_record(self, metadata, line): factors = line.split('|') if len(fa...
return return Record(metadata, start, type_, value, cc)
<|file_name|>Program.java<|end_file_name|><|fim▁begin|>package pp.iloc.model; import java.util.ArrayList; import java.util.Collections; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; import pp.iloc.model.Num.NumKind; import pp.iloc.mo...
}
<|file_name|>MessageUtil.java<|end_file_name|><|fim▁begin|>package com.weixin.util; import java.io.IOException; import java.io.InputStream; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.dom4j.DocumentE...
<|file_name|>estimator.py<|end_file_name|><|fim▁begin|># Copyright 2016 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://www.apache....
Args: name: string or a list of string, name of the tensor. Returns:
<|file_name|>session_handler.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding: UTF-8 """ This file is part of Commix Project (http://commixproject.com). Copyright (c) 2014-2017 Anastasios Stasinopoulos (@ancst). This program is free software: you can redistribute it and/or modify it under the terms of...
output = None conn = sqlite3.connect(settings.SESSION_FILE)
<|file_name|>action.py<|end_file_name|><|fim▁begin|># Copyright (C) 2014 Linaro Limited # # Author: Neil Williams <neil.williams@linaro.org> # # This file is part of LAVA Dispatcher. # # LAVA Dispatcher is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
""" structure = OrderedDict()
<|file_name|>bleachchar.py<|end_file_name|><|fim▁begin|>from django.db import models<|fim▁hole|> class BleachCharField(BleachField, models.CharField): def pre_save(self, model_instance, add): new_value = getattr(model_instance, self.attname) clean_value = self.clean_text(new_value) setattr(...
from .bleachfield import BleachField
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render from django.http import HttpResponseRedirect from django.template import loader from django.views import generic from .scripts.vagrant_boxes import _box_list, _global_status, _deps_versions class IndexView(generic.ListView): te...
return render(request, self.template_name, {'all_boxes': vboxes, 'all_envs': venvs, 'versions': versions, })
<|file_name|>lower_array_len.rs<|end_file_name|><|fim▁begin|>// compile-flags: -Z mir-opt-level=4 // EMIT_MIR lower_array_len.array_bound.NormalizeArrayLen.diff // EMIT_MIR lower_array_len.array_bound.SimplifyLocals.diff // EMIT_MIR lower_array_len.array_bound.InstCombine.diff pub fn array_bound<const N: usize>(index:...
} else { 42 }
<|file_name|>STMcmc.py<|end_file_name|><|fim▁begin|># This is STMcmc, for super tree mcmc. # Started 18 March 2011, first commit 22 March 2011. import pf,func from Var import var import math,random,string,sys,time,copy,os,cPickle,types,glob<|fim▁hole|>from Tree import Tree import datetime import itertools try: im...
import numpy as np from Glitch import Glitch from TreePartitions import TreePartitions from Constraints import Constraints
<|file_name|>input_output.rs<|end_file_name|><|fim▁begin|>//! This module contains code to equate the input/output types appearing //! in the MIR with the expected input/output types from the function //! signature. This requires a bit of processing, as the expected types //! are supplied to us before normalization and...
Locations::All(output_span),
<|file_name|>unique-in-vec-copy.rs<|end_file_name|><|fim▁begin|>// run-pass #![feature(box_syntax)] pub fn main() { let mut a: Vec<Box<_>> = vec![box 10]; let b = a.clone(); assert_eq!(*a[0], 10); assert_eq!(*b[0], 10); // This should only modify the value in a, not b *a[0] = 20; assert_...
}
<|file_name|>enclaveapi.rs<|end_file_name|><|fim▁begin|>// 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 option. // All files in the project carrying such notice may not ...
lpBuffer: LPCVOID,
<|file_name|>seqpeek_view.py<|end_file_name|><|fim▁begin|># # Copyright 2015-2019, Institute for Systems Biology # # 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/l...
<|file_name|>consts.rs<|end_file_name|><|fim▁begin|>use Pixel; pub const ALICE_BLUE: Pixel = Pixel { r: 240, g: 248, b: 255, }; pub const ANTIQUE_WHITE: Pixel = Pixel { r: 250, g: 235, b: 215, }; pub const AQUA: Pixel = Pixel { r: 0, g: 255, b: 255, }; pub const AQUAMARINE: Pixel = ...
r: 0, g: 191, b: 255,
<|file_name|>adt-brace-structs.rs<|end_file_name|><|fim▁begin|>// Unit test for the "user substitutions" that are annotated on each // node. struct SomeStruct<T> { t: T } fn no_annot() { let c = 66; SomeStruct { t: &c }; } fn annot_underscore() { let c = 66; SomeStruct::<_> { t: &c }; } fn annot_ref...
fn annot_reference_named_lifetime<'a>(_d: &'a u32) {
<|file_name|>views.py<|end_file_name|><|fim▁begin|>""" flask.ext.restless.views ~~~~~~~~~~~~~~~~~~~~~~~~ Provides the following view classes, subclasses of :class:`flask.MethodView` which provide generic endpoints for interacting with an entity of the database: :class:`flask.ext.restless.views...
response.headers[key] = value
<|file_name|>graphmap.rs<|end_file_name|><|fim▁begin|>#![cfg(feature = "graphmap")] extern crate petgraph; use std::collections::HashSet; use std::fmt; use petgraph::prelude::*; use petgraph::visit::Walker; use petgraph::algo::dijkstra; use petgraph::dot::{Config, Dot}; #[test] fn simple() { //let root = Typed...
<|file_name|>dJSON.spec.js<|end_file_name|><|fim▁begin|>describe('dJSON', function () { 'use strict'; var chai = require('chai'); var expect = chai.expect; var dJSON = require('../lib/dJSON'); var path = 'x.y["q.{r}"].z'; var obj; beforeEach(function () { obj = { x: {<|fim▁hole|> y: { ...
<|file_name|>anonymize.cpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2009-2010 Satoshi Nakamoto Copyright (c) 2009-2012 The Bitcoin developers Copyright (c) 2013-2014 The StealthCoin/StealthSend Developers */ /* Copyright (c) 2014-2015, Triangles Developers */ /* See LICENSE for licensing information */ #inc...
new boost::unique_lock<boost::mutex>( initializing )
<|file_name|>remove_duplicates.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # from https://github.com/mapillary/mapillary_tools/ # The MIT License (MIT) # # Copyright (c) 2014 Mapillary AB # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated docum...
the given exif is the data from the get_exif_data function. """ latlong = exif_reader.get_lat_lon()
<|file_name|>server.py<|end_file_name|><|fim▁begin|>from flask import Flask import numerals app = Flask("Numerical converter") @app.route("/") def home(): return "Hello from converter" <|fim▁hole|> @app.route("/<arabic>/roman") def to_roman(arabic): print("Converting {} to roman".format(arabic)) converte...
<|file_name|>json.js<|end_file_name|><|fim▁begin|>var send = require("./index") module.exports = sendJson /* sendJson := (HttpRequest, HttpResponse, Value | { body: Value, headers?: Object<String, String>, statusCode?: Number }) */ function sendJson(req, res, value, replacer, space) { ...
send(req, res, value)
<|file_name|>misc.ts<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ export const halfPI = Math.PI / 2; export const PiDiv180 = Math.PI / 180; export function degToRad(deg:...
<|file_name|>gen_test.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, division, print_function, with_statement import contextlib import datetime import functools import sys import textwrap import time import platform import weakref from tornado.concurrent import return_future, Future from torn...
def function_with_stack_context(self, callback):
<|file_name|>bound.js<|end_file_name|><|fim▁begin|>'use strict';<|fim▁hole|>// List is in format of {LB:lb,UB:ub} var months = ['JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC']; function getMonth(dateString) { var m = parseInt(dateString.split('-')[1])-1; return months[m]; } module.exports...
// Given a bound list and the time steps, // return the LB and UB at each timestep.
<|file_name|>CommentElement.ts<|end_file_name|><|fim▁begin|>import runTest = require("../TestRunner"); import ExpectElementStart = require("../ExpectedCallbacks/ExpectElementStart");<|fim▁hole|>describe("Comments", () => { runTest({ name: "Single Element with nested comment", input: "<dimension><!-...
import ExpectElementEnd = require("../ExpectedCallbacks/ExpectElementEnd"); import ExpectComment = require("../ExpectedCallbacks/ExpectComment");
<|file_name|>main.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core' import { fromEvent as observableFromEvent } from 'rxjs' import { Router, RouterEvent, NavigationStart, NavigationEnd, NavigationCancel, NavigationError } from '@angular/router' import { ToastrService } from 'ng...
<|file_name|>linear.py<|end_file_name|><|fim▁begin|>from sklearn import datasets from sklearn.linear_model import LinearRegression import matplotlib.pyplot as plt loaded_data = datasets.load_boston() data_X = loaded_data.data data_y = loaded_data.target model = LinearRegression() model.fit(data_X, data_y) print(mode...
#plt.show()
<|file_name|>line_nav_iframes_in_inline_block.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python """Test of line navigation output of Firefox.""" from macaroon.playback import * import utils sequence = MacroSequence() #sequence.append(WaitForDocLoad()) sequence.append(PauseAction(5000)) # Work around some new quirk...
" VISIBLE: 'Line 1', cursor=1",
<|file_name|>login.service.ts<|end_file_name|><|fim▁begin|>import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { UserRoutes } from '@shared/routes/user.routes'; import { LoginViewModel } from '@shared/view-models/create-user/login.view-model'; import { TokenViewModel } ...
constructor(private http: HttpClient) { } login(viewModel: LoginViewModel): Promise<TokenViewModel | null> {
<|file_name|>config.rs<|end_file_name|><|fim▁begin|>use rocket::config::ConfigError; use rocket::Config; use std::path::{Path, PathBuf}; #[derive(Debug)] pub struct MoMMIConfig { /// Address, Password commloop: Option<(String, String)>, github_key: Option<String>, changelog_repo_path: Option<PathBuf>, ...
let ssh_key = match config.get_str("ssh-key") {
<|file_name|>index.js<|end_file_name|><|fim▁begin|>require('dotenv').config({ silent: true });<|fim▁hole|>var Express = require('express'); var path = require('path'); var fs = require('fs'); var merge = require('lodash/merge'); var proxy = require('proxy-middleware'); var ejs = require('ejs'); var config = require('....
<|file_name|>angle.rs<|end_file_name|><|fim▁begin|>/* Copyright (c) 2015, 2016 Saurav Sachidanand 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, including without limitation ...
let degree = deg as i64; let minutes = (deg - (degree as f64)) * 60.0;
<|file_name|>attributes.py<|end_file_name|><|fim▁begin|># Copyright 2017, OpenCensus 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.apache.org/licenses/LICENSE-2.0...
attributes_json[key] = value result = {
<|file_name|>browse.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2009-2012 Joshua Hughes <kivhift@gmail.com> # import webbrowser<|fim▁hole|>class BrowseCommand(qmk.Command): '''Open the supplied URL in the default web browser.''' def __init__(self): self._name = 'browse' self._help = self._...
import qmk
<|file_name|>engine.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # This file is part of the Horus Project __author__ = 'Jesús Arroyo Torrens <jesus.arroyo@bq.com>' __copyright__ = 'Copyright (C) 2014-2016 Mundo Reader S.L.' __license__ = 'GNU General Public License v2 http://www.gnu.org/licenses/gpl2.html' ...
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals import logging import click import socket from mkdocs import __version__ from mkdocs import utils from mkdocs import exceptions from mkdocs import config from mkdocs.commands import buil...
commit_message_help = ("A commit message to use when commiting to the " "Github Pages remote branch")
<|file_name|>service.rs<|end_file_name|><|fim▁begin|>// This file is generated. Do not edit // @generated #![allow(dead_code)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(unused_imports)] use protobuf::Message as Message_imported_for_functions; use protobuf::Pr...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>#![ warn( missing_docs ) ] #![ warn( missing_debug_implementations ) ] // #![ feature( type_name_of_val ) ] // #![ feature( trace_macros ) ] //! //! Former - variation of builder pattern. //! //! # Sample //! ``` //! use former::Former; //! //! #[derive( Debug, PartialE...
//! int_optional_1 : core::option::Option< i32 >,
<|file_name|>bitcoin_ca.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ca" version="2.0"> <context> <name>AboutDialog</name> <message> <source>About Latinumcoin Core</source> <translation type="unfinished"/> </message> <message> <source>&lt;b&gt;...
<|file_name|>test_basic.py<|end_file_name|><|fim▁begin|>import warnings from sqlalchemy.testing import eq_, is_, assert_raises, assert_raises_message from sqlalchemy import * from sqlalchemy import exc as sa_exc, util, event from sqlalchemy.orm import * from sqlalchemy.orm.util import instance_str from sqlalchemy.orm i...
a1, b1, c1 = A(id=1), B(id=2), C(cid=1, id=3) s.add_all([a1, b1, c1])
<|file_name|>memory_stats_test.js<|end_file_name|><|fim▁begin|>'use strict'; var MemoryStats = require('../../src/models/memory_stats')<|fim▁hole|> , chaiAsPromised = require('chai-as-promised'); chai.use(chaiAsPromised); describe('MemoryStats', function() { describe('.constructor', function() { it('returns a...
, SQliteAdapter = require('../../src/models/sqlite_adapter') , chai = require('chai') , expect = chai.expect