prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>FbxCameraStereo.java<|end_file_name|><|fim▁begin|>/*
* MIT License
*
* Copyright (c) 2017 Alessandro Arcangeli <alessandroarcangeli.rm@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to... | |
<|file_name|>gettwittermps.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
import urllib2
import csv
import xml.sax
uri = "http://spreadsheets.google.com/tq?tqx=out:csv&key=0AjWA_TWMI4t_dFI5MWRWZkRWbFJ6MVhHQzVmVndrZnc&hl=en_GB"
f = urllib2.urlopen(uri)
csv_data = f.read()
lines = csv_data.split("\n")
rows = csv.re... | |
<|file_name|>project.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/license... | |
<|file_name|>subscriptionservice.js<|end_file_name|><|fim▁begin|>/**
* @ngdoc service
* @name ftepApp.SubscriptionService
* @description
* # SubscriptionService
* Service for subscriptions.
*/
'use strict';
define(['../ftepmodules', 'traversonHal'], function (ftepmodules, TraversonJsonHalAdapter) {
ftepmodu... |
var self = this;
|
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![doc(html_root_url = "http://garrensmith.com/mango_smoothie/")]
//! Mango Smoothie
//! Mango Smoothie is a [CouchDB Mango](http://docs.couchdb.org/en/latest/api/database/find.html) /
//! [Cloudant Query](https://docs.cloudant.com/cloudant_query.html) client library.
/... | //! let doc = &result.docs[0]; |
<|file_name|>has-authority.directive.js<|end_file_name|><|fim▁begin|>(function() {
'use strict';
angular
.module('rtsApp')
.directive('hasAuthority', hasAuthority);
hasAuthority.$inject = ['Principal'];
function hasAuthority(Principal) {
var directive = {
restrict:... | |
<|file_name|>matcher.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: envoy/config/common/matcher/v4alpha/matcher.proto
package envoy_config_common_matcher_v4alpha
import (
_ "github.com/cncf/xds/go/udpa/an... | if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi) |
<|file_name|>socket_common.go<|end_file_name|><|fim▁begin|>// +build !386
package socket
import (
"syscall"
"unsafe"
)<|fim▁hole|> _, _, e1 := syscall.Syscall(syscall.SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = e1
}
return
}
func setsockopt(s int, level int, name int, val unsafe.... |
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { |
<|file_name|>video-modal.component.ts<|end_file_name|><|fim▁begin|>import { Component, ViewChild } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { DoctorsListService } from './doctors-list.service';
import { DoctorDetails } from '../shared/database/doctor-details';
/**
* Compo... | |
<|file_name|>metadef_namespaces.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# 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://ww... | |
<|file_name|>test_foram.py<|end_file_name|><|fim▁begin|>from unittest import TestCase
from pyage.core import inject
from pyage_forams.solutions.foram import Foram
class TestForam(TestCase):
def test_step(self):
inject.config = "pyage_forams.conf.dummy_conf"
foram = Foram(10)<|fim▁hole|><|fim▁end|> | # foram.step() |
<|file_name|>GatewayInclusive.js<|end_file_name|><|fim▁begin|>bpmnGatewayInclusive=function(width,_30ab){
VectorFigure.call(this);
this.stroke =1;
};
bpmnGatewayInclusive.prototype=new VectorFigure;
bpmnGatewayInclusive.prototype.type="bpmnGatewayInclusive";
bpmnGatewayInclusive.prototype.paint=function(){
Vecto... | var x_cir = 15;
var y_cir = 15; |
<|file_name|>addAktModal.component.js<|end_file_name|><|fim▁begin|>class AddAktModalController{
constructor(API, $uibModal, $state,$timeout){
'ngInject';
let vm=this;
vm.API=API;
vm.program=vm.resolve.program;
vm.programs=vm.resolve.programs;
vm.data={
pro... | };
vm.dateOptions = { |
<|file_name|>modpathfile.py<|end_file_name|><|fim▁begin|>"""
Module to read MODPATH output files. The module contains two
important classes that can be accessed by the user.
* EndpointFile (ascii endpoint file)
* PathlineFile (ascii pathline file)
"""
import numpy as np
from ..utils.flopy_io import loadtxt
class... | ----------
Methods |
<|file_name|>adjustment.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>
//! Adjustment — A representation... | |
<|file_name|>query_executor.go<|end_file_name|><|fim▁begin|>package query
import (
"context"
"errors"
"fmt"
"os"
"runtime/debug"
"strconv"
"sync"
"sync/atomic"
"time"
"github.com/influxdata/influxdb/models"
"github.com/influxdata/influxql"
"go.uber.org/zap"
)
var (
// ErrInvalidQuery is returned when ex... |
// send sends a Result to the Results channel and will exit if the query has |
<|file_name|>timeEntry.py<|end_file_name|><|fim▁begin|>### Copyright (C) 2005 Thomas M. Hinkle
### Copyright (C) 2009 Rolf Leggewie
###
### This library 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; eith... | # return
if convert.NUMBER_MATCHER.match(words[-1]): |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import re
from project.models import PageChunk
contacts_map_coordinates = \
re.compile(<|fim▁hole|> r".*"
)
def inject_pagechunks():
chunks = {chunk.name: chunk.text for chunk in PageChunk.query.all()}
return {"pagechunks": chunks}<|fim▁end|> | r".*"
r"@(?P<latitude>\-?[\d\.]+),"
r"(?P<longitude>\-?[\d\.]+),"
r"(?P<zoom>[\d\.]+)z" |
<|file_name|>cgroup_manager_test.go<|end_file_name|><|fim▁begin|>/*
Copyright 2016 The Kubernetes 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... | |
<|file_name|>life.go<|end_file_name|><|fim▁begin|>package state
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/txn"
"launchpad.net/juju-core/trivial"
)
// Life represents the lifecycle state of the entities
// Relation, Unit, Service and Machine.
type Life int8
const (
Alive Life = iota
Dying
Dead
nLife... | Id: id,
Assert: isAliveDoc,
Update: D{{"$set", D{{"life", Dying}}}},
}} |
<|file_name|>growth_errors_nans.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from __future__ import division
from __future__ import print_function
import argparse
import numpy as np
import pandas as pd
import sys
import os
import matplotlib as mpl
#mpl.use('Agg')
from matplotlib import ticker
import matplotl... | ## Compute data increments (changes from one time instant to the other)
arrayStats_increments = np.diff(arrayStats_attractor, axis=0)
# Set first increment equal to the second |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licens... | where F: FnOnce(&Arc<HeaderSliceWithLength<H, [T]>>) -> U |
<|file_name|>CWE127_Buffer_Underread__CWE839_fscanf_83_bad.cpp<|end_file_name|><|fim▁begin|>/* TEMPLATE GENERATED TESTCASE FILE
<|fim▁hole|>Template File: sources-sinks-83_bad.tmpl.cpp
*/
/*
* @description
* CWE: 127 Buffer Underread
* BadSource: fscanf Read data from the console using fscanf()
* GoodSource: ... | Filename: CWE127_Buffer_Underread__CWE839_fscanf_83_bad.cpp
Label Definition File: CWE127_Buffer_Underread__CWE839.label.xml
|
<|file_name|>Tag.js<|end_file_name|><|fim▁begin|>import React from "react";
import PropTypes from "prop-types";
import styled from "styled-components";
const StyledTag = styled.span`
color: ${props => props.color};
background: ${props => props.bgcolor};
padding: ${props => props.padding};
margin: ${props => pr... | bgcolor: "#fafafa", |
<|file_name|>bin2pset.cpp<|end_file_name|><|fim▁begin|>/// @addtogroup homology
/// @{
/////////////////////////////////////////////////////////////////////////////
///
/// @file bin2pset.cpp
///
/// @author Pawel Pilarczyk
///
/////////////////////////////////////////////////////////////////////////////
// Copyright... | catch (const char *msg)
{
sout << "ERROR: " << msg << '\n';
return -1; |
<|file_name|>test_api.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 Rackspace Hosting
# 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:/... | the error_counter so that we can artificially keep track of |
<|file_name|>hard.py<|end_file_name|><|fim▁begin|>""" Curriculum-based course timetabling solver;
solves timetabling problems formulated in .ectt file format (http://tabu.diegm.uniud.it/ctt/)
Copyright (C) 2013 Stephan E. Becker
This program is free software: you can redistribute it and/or modify
it u... | |
<|file_name|>deactivate_placements.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#
# Copyright 2013 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
#
# ... | placement_service, query=query, bind_vars=values)
for placement in placements:
print ('Placement with id \'%s\', name \'%s\', and status \'%s\' will be ' |
<|file_name|>stack.py<|end_file_name|><|fim▁begin|>from functools import partial
from xml.sax.saxutils import quoteattr
from navmazing import NavigateToSibling, NavigateToAttribute
from selenium.common.exceptions import NoSuchElementException
import cfme.fixtures.pytest_selenium as sel
from cfme import web_ui as ui
f... |
def am_i_here(self):
return match_page(summary='Orchestration Stacks') |
<|file_name|>for.cpp<|end_file_name|><|fim▁begin|>#include <iostream>
using namespace std;
#include <omp.h>
#define SIZE 8
int main(void){
int x[SIZE];
int sum=0;
for(int i=0;i<SIZE;i++){<|fim▁hole|> #pragma omp parallel for reduction (+:sum)
for(int i=0;i<SIZE;i++){
sum+=x[i];
}
cout<<sum... | x[i]=i;
} |
<|file_name|>reserve-service.js<|end_file_name|><|fim▁begin|>import axios from 'axios';
import {getAuthInfo} from './firebase-service';
import {VIANCA, CHAN, TOPA, IBA_COLOMBIA} from './service-store';
export const ERROR_RESULT = 'ERROR';
export const RESERVED_RESULT = 'R';
export const INSUFICIENT_RESULT = 'I';
expor... |
function getAirlineUrl(airlineCode) { |
<|file_name|>markdown_it.js<|end_file_name|><|fim▁begin|>import markdownIt from 'markdown-it';
import _ from 'lodash';
import footnotes from 'markdown-it-footnote';
export default function (opts) {
const mergedOpts = _.assign({}, opts, { html: true, linkify: true });<|fim▁hole|> // Remember old renderer, if overr... | const md = markdownIt(mergedOpts).use(footnotes);
if (mergedOpts.openLinksExternally) { |
<|file_name|>fake_kops_client.go<|end_file_name|><|fim▁begin|>/*
Copyright 2017 The Kubernetes 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.... | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use super::core::{
af_array, AfError, Array, BinaryOp, Fromf64, HasAfEnum, RealNumber, ReduceByKeyInput, Scanable,
HANDLE_ERROR,
};
use libc::{c_double, c_int, c_uint};
extern "C" {
fn af_sum(out: *mut af_array, input: af_array, dim: c_int) -> c_int;
fn... | |
<|file_name|>svg.mako.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public<|fim▁hole|>
<%namespace name="helpers" file="/helpers.mako.rs" />
<% data.new_style_struct("SVG", inherited=False, gecko_name="SVGReset") %>
${helpers.single_keyword("dominant-baseline",
... | * 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/. */ |
<|file_name|>apps.py<|end_file_name|><|fim▁begin|>from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _<|fim▁hole|>
class AuthConfig(AppConfig):
name = 'esia_auth'
verbose_name = _('Esia META')<|fim▁end|> | |
<|file_name|>test_graph.py<|end_file_name|><|fim▁begin|>import pytest
# TODO: use same globals for reverse operations such as add, remove
GRAPHS = [
({},
[],
[]),
({'nodeA': {}},
['nodeA'],
[]),
({'nodeA': {'nodeB': 'weight'},
'nodeB': {}},
['nodeA', 'nodeB'],
[('nodeA',... | 'D': {}}, |
<|file_name|>test_executor_check_feed.py<|end_file_name|><|fim▁begin|># Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ... | import paddle.fluid.core as core |
<|file_name|>env_win.cc<|end_file_name|><|fim▁begin|>// This file contains source that originates from:
// http://code.google.com/p/leveldbwin/source/browse/trunk/win32_impl_src/env_win32.h
// http://code.google.com/p/leveldbwin/source/browse/trunk/win32_impl_src/port_win32.cc
// Those files dont' have any explict lice... |
struct WorkItemWrapper |
<|file_name|>collector.py<|end_file_name|><|fim▁begin|><|fim▁hole|>''' TBD '''<|fim▁end|> | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Provides fakes for several of Telemetry's internal objects.
These allow code like story_runner and ... | |
<|file_name|>value.rs<|end_file_name|><|fim▁begin|>use std::cmp::PartialEq;
use std::fmt;
use std::borrow::Cow;
use mime_parse::Mime;
use quoted_string::{self, ContentChars, AsciiCaseInsensitiveEq};
/// a `Value` usable for a charset parameter.
///
/// # Example
/// ```
/// let mime = mime::TEXT_PLAIN_UTF_8;
/// asse... | /// Returns the content of this instance.
///
/// It differs to the representation in that it will remove the
/// quotation marks from the quoted string and will "unquote" |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
mod process;
mod vcpu;
use std::fs::File;
use std::io;
use std::io::Read;
use std::os::unix::net::Uni... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Support for RainMachine devices."""
import asyncio
from datetime import timedelta
import logging
from regenmaschine import Client
from regenmaschine.errors import RainMachineError
import voluptuous as vol
from homeassistant.const import (
ATTR_ATTRIBUTION,
... | """Enable a zone.""" |
<|file_name|>builtin-superkinds-capabilities-transitive.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE ... | |
<|file_name|>InitConfigFileParser.cpp<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free... | as designated in a particular file or component or in included license
documentation. The authors of MySQL hereby grant you an additional
permission to link the program and your derivative works with the |
<|file_name|>package.py<|end_file_name|><|fim▁begin|>##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, t... | |
<|file_name|>magnet_dummy.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
This file contains the dummy for a magnet interface.
Qudi 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... | axis1 = {}
axis1['label'] = self._y_axis.label # that axis label should be obtained from config |
<|file_name|>test_workbook_service.py<|end_file_name|><|fim▁begin|># Copyright 2014 - Mirantis, Inc.
# Copyright 2020 Nokia Software.
#
# 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
... | wf1:
type: direct
output: |
<|file_name|>C.js<|end_file_name|><|fim▁begin|>/**
* +--------------------------------------------------------------------+
* | This HTML_CodeSniffer file is Copyright (c) |
* | Squiz Australia Pty Ltd ABN 53 131 581 247 |
* +-------------------------------------------... | */
register: function() |
<|file_name|>external.go<|end_file_name|><|fim▁begin|>package ca
import (
"bytes"
cryptorand "crypto/rand"
"crypto/tls"
"crypto/x509"
"encoding/hex"
"encoding/json"
"encoding/pem"
"io"
"io/ioutil"
"net/http"
"sync"
"time"
"github.com/cloudflare/cfssl/api"
"github.com/cloudflare/cfssl/config"
"github.co... | // UpdateTLSConfig updates the HTTP Client for this ExternalCA by creating
// a new client which uses the given tlsConfig. |
<|file_name|>basic_token_embedder_test.py<|end_file_name|><|fim▁begin|># pylint: disable=no-self-use,invalid-name
import pytest
import torch
from torch.autograd import Variable
from allennlp.common import Params
from allennlp.common.checks import ConfigurationError
from allennlp.data import Vocabulary
from allennlp.m... | from allennlp.common.testing import AllenNlpTestCase
|
<|file_name|>alert.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "alert.h"
#include "base58.h"... | std::string strCmd = GetArg("-alertnotify", "");
if (strCmd.empty()) return;
|
<|file_name|>bitcoin_cs.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="cs" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Bitcoin</source>
... | <translation>Čas posledního bloku</translation> |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>export * from './MenuButton';<|fim▁hole|><|fim▁end|> | export * from './ScoreRecap.js'; |
<|file_name|>reflect_test.go<|end_file_name|><|fim▁begin|>// Copyright 2012, 2013 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.
package rpc_test
import (
"reflect"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/check.v1"
"github.com/juju/juju/rpc/rpcreflect"
"github.com/juju/ju... | |
<|file_name|>.karma.conf.js<|end_file_name|><|fim▁begin|>// Karma configuration
// Generated on Tue Jan 06 2015 16:30:03 GMT-0800 (PST)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: 'browser',
// frameworks to use... |
// web server port
port: 9876,
|
<|file_name|>config_regression_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""This modules contains regression tests for config API handler."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from absl import app
from grr_response_server.gu... | |
<|file_name|>test_utils.py<|end_file_name|><|fim▁begin|>from numpy.testing import assert_allclose, assert_equal
from . import plt
from .. import utils
def test_path_data():
circle = plt.Circle((0, 0), 1)
vertices, codes = utils.SVG_path(circle.get_path())
assert_allclose(vertices.shape, (25, 2))
asse... | |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>"""Group models."""
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group as AuthGroup, Permission
from django.core.cache import cache
from django.core.exceptions import ValidationError
from django... | |
<|file_name|>SpectrumPalette.story.tsx<|end_file_name|><|fim▁begin|>import React from 'react';
import SpectrumPalette from './SpectrumPalette';
import { withCenteredStory } from '../../util/storybook/withCenteredStory';
import { UseState } from '../../util/storybook/UseState';
import { renderComponentWithTheme } from '... | title: 'Pickers and Editors/ColorPicker/Palettes/SpectrumPalette',
component: SpectrumPalette,
decorators: [withCenteredStory],
parameters: { |
<|file_name|>JsonArray.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 under the... | * @throws ClassCastException if there was a value but didn't match the
* assumed return type.
* @throws NumberFormatException if a String isn't a valid representation of |
<|file_name|>datedetectortestcase.py<|end_file_name|><|fim▁begin|># This file is part of Fail2Ban.
#
# Fail2Ban 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 op... | |
<|file_name|>convert.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 ... | parser = ArgumentParser(description='Convert params from torch to python'
'dict. ')
parser.add_argument("depth", type=int, choices=[121, 169, 201, 161])
parser.add_argument("outfile") |
<|file_name|>uproxy_core.ts<|end_file_name|><|fim▁begin|>/// <reference path='../../../third_party/freedom-typings/port-control.d.ts' />
import diagnose_nat = require('./diagnose-nat');
import globals = require('./globals');
import logging = require('../../../third_party/uproxy-lib/logging/logging');
import loggingTyp... | // 'name', 'NAME_');
// will return: |
<|file_name|>files_service.py<|end_file_name|><|fim▁begin|>import datetime
import os
import shutil
import time
from files_by_date.utils.logging_wrapper import get_logger, log_message
from files_by_date.validators.argument_validator import ArgumentValidator
logger = get_logger(name='files_service')
class FilesServic... | class Count: |
<|file_name|>user.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
gitolite-manager
Author: Tim Henderson
Contact: tim.tadh@gmail.com, tadh@case.edu
Copyright: 2013 All Rights Reserved, see LICENSE
'''
import urllib, re
import cgi
from logging import getLogger
log = getLogger('gm:vie... | ) |
<|file_name|>base.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*-
"""
sleekxmpp.plugins.base
~~~~~~~~~~~~~~~~~~~~~~
This module provides XMPP functionality that
is specific to client connections.
Part of SleekXMPP: The Sleek XMPP Library
:copyright: (c) 2012 Nathanael C. Fritz
... |
if top_level: |
<|file_name|>chained_compiled_file_system.py<|end_file_name|><|fim▁begin|># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from compiled_file_system import CompiledFileSystem
from file_system import FileNot... | slightly different. This makes it possible to reuse cached compiled data in
one of them without recompiling everything that is shared by them.
'''
class Factory(CompiledFileSystem.Factory): |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/stable/config
# -- Path setup ----------... | # |
<|file_name|>grp_roundcube.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
# kate: space-indent on; indent-width 4; mixedindent off; indent-mode python;
roundcube = [
{'name':'common',
'mainpackage':True,
'shortdesc':'Installs the latest version of roundcube',
'description':... | },
{'name':'mysql',
'shortdesc':'Installs roundcube using MySQL database',
'description':'', |
<|file_name|>scheduler.rs<|end_file_name|><|fim▁begin|>use alloc::linked_list::LinkedList;
use alloc::arc::Arc;
use super::bottom_half;
use super::bottom_half::BottomHalfManager;
use super::task::{TID_BOTTOMHALFD, TID_SYSTEMIDLE};
use super::task::{Task, TaskContext, TaskPriority, TaskStatus};
use kernel::kget;
use ... | ));
|
<|file_name|>github-electron-renderer-tests.ts<|end_file_name|><|fim▁begin|>
import {
ipcRenderer,
remote,
webFrame,
clipboard,
crashReporter,
nativeImage,
screen,
shell
} from 'electron';
import * as fs from 'fs';
// In renderer process (web page).
// https://github.com/atom/electron/blob/master/docs/api/ip... |
function getUserMediaError(error: Error) { |
<|file_name|>OpenloadCo.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from module.plugins.internal.XFSAccount import XFSAccount
class OpenloadCo(XFSAccount):
__name__ = "OpenloadCo"
__type__ = "account"
__version__ = "0.02"
__status__ = "testing"
__description__ = """Openload.co... | |
<|file_name|>core.py<|end_file_name|><|fim▁begin|>"""
Handling signals of the `core` app
"""
from django.dispatch import receiver
from core import signals
from reader import actions
@receiver(signals.app_link_ready)<|fim▁hole|><|fim▁end|> | def app_link_ready(sender, **kwargs):
actions.create_app_link() |
<|file_name|>local_file_sync_context_unittest.cc<|end_file_name|><|fim▁begin|>// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/sync_file_system/local/local_file_sync_context.h"
... | const FileSystemURL& url,
SyncStatusCode status) { |
<|file_name|>Operations.java<|end_file_name|><|fim▁begin|>package com.amaze.filemanager.filesystem;
import android.content.Context;
import android.os.AsyncTask;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.v4.provider.DocumentFile;
import com.amaze.filemanager.exceptions.... | cloudStorageGdrive.upload(CloudUtil.stripPath(OpenMode.GDRIVE, file.getPath()), |
<|file_name|>main.module.ts<|end_file_name|><|fim▁begin|>import * as akala from '@akala/core'
import * as ac from '@akala/commands'
import * as web from '@domojs/theme-default'
const deviceMetaContainer: ac.Metadata.Container = require('../../device-commands.json')
const deviceTypeMetaContainer: ac.Metadata.Container =... | export const mdule = akala.module('@domojs/devices', '@domojs/devices/type');
const resolveUrl = mdule.resolve('$resolveUrl');
mdule.register('$resolveUrl', (url: string) =>
{ |
<|file_name|>rd2wgs84_test.go<|end_file_name|><|fim▁begin|>package rd2wgs84
import (
"testing"
)
var parseTests = []struct {<|fim▁hole|>}
func TestConvert(t *testing.T) {
for i, tt := range parseTests {
wgs := Convert(tt.in.X, tt.in.Y)
if wgs.Latitude != tt.out.Latitude || wgs.Longitude != tt.out.Longitude {
... | in RD
out *WGS84
}{
{RD{163835.370083, 446830.763585}, &WGS84{52.00977421758342, 5.515894213047998}}, |
<|file_name|>logistic.py<|end_file_name|><|fim▁begin|>"""
Logistic Regression
"""
# Author: Gael Varoquaux <gael.varoquaux@normalesup.org>
# Fabian Pedregosa <f@bianp.net>
# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Manoj Kumar <manojkumarsivaraj334@gmail.com>
import numbe... | frequencies in the training set.
|
<|file_name|>SearchResultsEntity_viewer.graphql.ts<|end_file_name|><|fim▁begin|>/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ReaderFragment } from "relay-runtime";
import { FragmentRefs } from "relay-runtime";
export type SearchResultsEntity_viewer = {
readonly searchConnection: {
read... | readonly node: { |
<|file_name|>location.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::LocationBindin... | if self.window.has_document() {
// Step 2: If this Location object's relevant Document's origin is not
// same origin-domain with the entry settings object's origin, then
// throw a "SecurityError" DOMException. |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django import forms
from django.contrib.auth.models import User
from django.forms import ModelForm
from django.db import models
# Create your models here.
#EDICION DE MODELO USER
User.add_to_class('usuario_sico', models.CharField(max_length=10, null=False, blan... | model = User
fields = ['username', 'password', 'email', 'first_name', 'last_name', 'usuario_sico', 'contrasenia_sico'] |
<|file_name|>viewport.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 cssparser::Parser;
use euclid::size::TypedSize2D;
use me... | // normal order of appearance |
<|file_name|>verify.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses... | "RBRACE" => RBRACE, |
<|file_name|>qPrefDisplay.cpp<|end_file_name|><|fim▁begin|>// SPDX-License-Identifier: GPL-2.0
#include "core/subsurface-string.h"
#include "qPrefDisplay.h"
#include "qPrefPrivate.h"
#include <QApplication>
#include <QFont>
static const QString group = QStringLiteral("Display");
QPointF qPrefDisplay::st_tooltip_posi... | { |
<|file_name|>unwind-resource.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 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|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http:... | |
<|file_name|>it.js<|end_file_name|><|fim▁begin|>// IT lang variables
tinyMCE.addToLang('',{
bold_desc : 'Grassetto (Ctrl+B)',
italic_desc : 'Corsivo (Ctrl+I)',
underline_desc : 'Sottolineato (Ctrl+U)',
striketrough_desc : 'Barrato',
justifyleft_desc : 'Allinea a sinistra',
justifycenter_desc : 'Allinea al cent... | link_desc : 'Inserisci o modifica link',
unlink_desc : 'Elimina link',
|
<|file_name|>category-form.component.ts<|end_file_name|><|fim▁begin|>import { Component, Input, OnInit } from '@angular/core';
import { FormBuilder, Validators } from '@angular/forms';
import { Response } from '@angular/http';
import { CustomValidators } from 'ng2-validation';
import { MdDialogRef } from '@angular/mat... | |
<|file_name|>SprintMapper.cpp<|end_file_name|><|fim▁begin|>/********************************************************************************
**
** Copyright (C) 2016-2021 Pavel Pavlov.
**
**
** This file is part of SprintTimer.
**
** SprintTimer is free software: you can redistribute it and/or modify
** it under the te... | begin(tags),
[](const auto& elem) { return elem.name(); }); |
<|file_name|>lib.js<|end_file_name|><|fim▁begin|>//Scroll View
function scrollHandler(view, hscrollbar, vscrollbar){
this.view= view;
this.view.addEventListener('DOMMouseScroll', this, false);
this.view.addEventListener('mousewheel', this, false);
this.hListeners= [];
this.vListeners= [];
if (hscrollbar != un... | // event.wheelDelta= ticks*(-120); event.wheelDeltaX= ticksX*(-120); event.wheelDeltaY= ticksY*(-120);
this.scrollWheel(event.wheelDeltaX != 0? 1 : 2, -event.wheelDelta/15);
event.preventDefault(); |
<|file_name|>device_id_fetcher.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/renderer_host/pepper/device_id_fetcher.h"
#include "base/file... | FROM_HERE, |
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>//#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include "inference.hpp"
#include "lbfgs.h"
//#include <boost/random.hpp>
// lbfgsfloatval_t evaluate(void *instance,
// const double * x,
// double *g,
// const int n,
// c... | |
<|file_name|>player.ts<|end_file_name|><|fim▁begin|>import { Suspect } from '../card/suspect/suspect';
<|fim▁hole|>export interface Player {
id: string;
name: string;
order: number;
characterId: number;
character?: Suspect;
cardIds: number[];
}<|fim▁end|> | |
<|file_name|>_mod_clickMenu.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#----------------------------------------------------------------------------
# Menu for quickly adding waypoints when on move
#----------------------------------------------------------------------------
# Copyright 2007-2008, Oliver W... | # m = self.m.get('clickHandler', None)
# if(m != None):
# m.registerXYWH(x+0.25*w,y+0.25*h,w*0.5,h*0.5, "clickMenu:addWaypoint")
|
<|file_name|>gregorian.js.uncompressed.js<|end_file_name|><|fim▁begin|>define(
"dojo/cldr/nls/nb/gregorian", //begin v1.x content
{
"dateFormatItem-Ehm": "E h.mm a",
"days-standAlone-short": [
"sø.",
"ma.",
"ti.",
"on.",
"to.",
"fr.",
"lø."
],
"months-format-narrow": [
"J",
"F",
"M",
"A",
"M... | |
<|file_name|>constants.py<|end_file_name|><|fim▁begin|>"""Constants for CLIFun."""
import click
<|fim▁hole|>from .classes import Context
CONTEXT_SETTINGS = dict(auto_envvar_prefix='PLAY')
PASS_CONTEXT = click.make_pass_decorator(Context, ensure=True)<|fim▁end|> | |
<|file_name|>db.rs<|end_file_name|><|fim▁begin|>use std::{borrow::Cow, cell::RefCell, fmt::Write as FmtWrite};
use futures::{Future, FutureExt};
use nanorand::{WyRand, RNG};
use ntex::util::{Bytes, BytesMut};
use smallvec::SmallVec;
use tokio_postgres::types::ToSql;
use tokio_postgres::{connect, Client, Statement};
us... |
/// Postgres interface |
<|file_name|>platform_matcher.py<|end_file_name|><|fim▁begin|># =============================================================================
# Copyright (c) 2016, Cisco Systems, Inc
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided... | """
|
<|file_name|>machine_windows.go<|end_file_name|><|fim▁begin|>package main
import (
"os"
"fmt"
"path/filepath"
// "launchpad.net/juju-core/agent"
"launchpad.net/juju-core/worker"
// "launchpad.net/juju-core/worker/authenticationworker"
"launchpad.net/juju-core/worker/charmrevisionworker"
... | }
/*
rsyslogMode := rsyslog.RsyslogModeForwarding |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.