prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>urls.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^(\d+)/$', 'onpsx.gallery.views.index'),
(r'^$', 'onpsx.gallery.views.index'),
)<|fim▁end|> | |
<|file_name|>cli.ts<|end_file_name|><|fim▁begin|>import * as yargs from "yargs";
<|fim▁hole|>import { IRawConversionSettings, parseSettings } from "./settingsParser";
import { StatusCode } from "./statusCode";
const rawConversionSettings: IRawConversionSettings = yargs
.usage("Usage: $0 --csproj <csproj> --target ... | import { Runner } from "./runner"; |
<|file_name|>create_model.py<|end_file_name|><|fim▁begin|>import argparse
import pandas as pd
from sklearn.linear_model import LogisticRegression
from sklearn.feature_selection import RFECV
from sklearn.ensemble import RandomForestClassifier
from beveridge.models import ModelStorage
import pickle
parser = argparse.Arg... | #Create DataFrame in Pandas |
<|file_name|>indexed.rs<|end_file_name|><|fim▁begin|>use std::ops::{Index, IndexMut};
struct Image<P> {
width: usize,
pixels: Vec<P>,<|fim▁hole|>impl<P: Default + Copy> Image<P> {
fn new(width: usize, height: usize) -> Image<P> {
Image {
width,
pixels: vec... |
/// [Cache state](https://fetch.spec.whatwg.org/#concept-response-cache-state)
#[derive(Clone, Debug, Deserialize, Serialize, HeapSizeOf)] |
<|file_name|>main.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 Mirantis 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
#
# Unle... | |
<|file_name|>test_gaux.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# HiPart is a program to analyze the electronic structure of molecules with
# fuzzy-atom partitioning methods.
# Copyright (C) 2007 - 2012 Toon Verstraelen <Toon.Verstraelen@UGent.be>
#
# This file is part of HiPart.
#
... | # HiPart is distributed in the hope that it will be useful, |
<|file_name|>config_perm_provider.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Copyright (C) 2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http:... | |
<|file_name|>api.py<|end_file_name|><|fim▁begin|>from django.core.urlresolvers import reverse
from tastypie import authorization
from tastypie.authentication import MultiAuthentication
from crits.events.event import Event
from crits.events.handlers import add_new_event
from crits.core.api import CRITsApiKeyAuthenticat... | content['id'] = result.get('id', '')
if result.get('id'): |
<|file_name|>login.component.ts<|end_file_name|><|fim▁begin|>import { Component, Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { FormUserLogin } from './forms/userLogin.component';
import { SessionService } from './services/sessionService.ts';
@Component({
templateUrl: "login.... | }) |
<|file_name|>ja_dlg.js<|end_file_name|><|fim▁begin|>tinyMCE.addI18n('ja.emotions_dlg',{
title:"\u30B9\u30DE\u30A4\u30EA\u30FC\u306E\u633F\u5165",
desc:"\u30B9\u30DE\u30A4\u30EA\u30FC",
cool:"Cool",
cry:"Cry",
embarassed:"Embarassed",
foot_in_mouth:"Foot in mouth",
frown:"Frown",
innocent:"Innocent",
kiss:"Kiss... | money_mouth:"Money mouth",
sealed:"Sealed",
smile:"Smile",
surprised:"Surprised",
|
<|file_name|>setupTests.ts<|end_file_name|><|fim▁begin|>import * as Enzyme from 'enzyme';
import * as Adapter from 'enzyme-adapter-react-16';
<|fim▁hole|>Enzyme.configure({ adapter: new Adapter() });<|fim▁end|> | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Home Assistant command line scripts."""
from __future__ import annotations
import argparse
import asyncio
import importlib
import logging
import os
import sys
from typing import Sequence
from homeassistant import runner
from homeassistant.bootstrap import async... | |
<|file_name|>itemrecv.cpp<|end_file_name|><|fim▁begin|>/*
* The ManaPlus Client
* Copyright (C) 2004-2009 The Mana World Development Team
* Copyright (C) 2009-2010 The Mana Developers
* Copyright (C) 2011-2018 The ManaPlus Developers<|fim▁hole|> *
* This program is free software; you can redistribute it an... | *
* This file is part of The ManaPlus Client. |
<|file_name|>resource_digitalocean_droplet.go<|end_file_name|><|fim▁begin|>package digitalocean
import (
"fmt"
"log"
"strings"
"time"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/helper/schema"
"github.com/pearkes/digitalocean"
)
func resourceDigitalOceanDroplet() *schema.R... |
if err != nil { |
<|file_name|>resets.js<|end_file_name|><|fim▁begin|>import when from 'when';
import { post } from 'utils/http';
import baseUrl from 'utils/baseUrl';
export function requestPasswordReset( email ) {
return when(
post( baseUrl( 'auth/reset_password' ), {
params: {
email
... | export function verifyResetPasswordToken( token, password) {
return when( |
<|file_name|>result-info-native-replay-summary.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Copyright (c) 2016, Daniel Liew
# This file is covered by the license in LICENSE-SVCB.txt<|fim▁hole|>from load_klee_runner import add_KleeRunner_to_module_search_path
from load_klee_analysis import add_kleeanalysis_to... | # vim: set sw=4 ts=4 softtabstop=4 expandtab:
"""
Read a result info describing a set of KLEE test case replays.
""" |
<|file_name|>app.py<|end_file_name|><|fim▁begin|>import sys
sys.path.append("helper")
import web
from helper import session
web.config.debug = False
urls = (
"/", "controller.start.index", <|fim▁hole|>
app = web.application(urls, globals())
sessions = session.Sessions()
if __name__ == "__main__":
app.run()<|fim... | "/1", "controller.start.one",
"/2", "controller.start.two",
)
|
<|file_name|>security_saml_sp_modify_parameters.go<|end_file_name|><|fim▁begin|>// Code generated by go-swagger; DO NOT EDIT.
package security
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
<|fim▁hole|> "context"
"net/http"
"time"... | import ( |
<|file_name|>OperationFilterHelper.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2010-2013 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/
package com.evolveum.midpoint.notifications.impl.helpers;
i... |
for (EventOperationType eventOperationType : eventHandlerType.getOperation()) { |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># created based on
# https://python-packaging.readthedocs.io/en/latest/minimal.html
# But instead of python setup.py register sdist upload,
# use https://pypi.org/p/twine/
#
from setuptools import setup
import sys
import os
import re
sys.path.append("src")
def rea... | ], |
<|file_name|>generation.rs<|end_file_name|><|fim▁begin|>use std::sync::Arc;
use cge::{Network, Activation};
use rand::thread_rng;
use rand::distributions::{IndependentSample, Range};
use crate::utils::Individual;
use crate::cge_utils::Mutation;
use crate::NNFitnessFunction;
// Creates a generation of random, minimal... | genome: Vec::new(), |
<|file_name|>test-nodes.cc<|end_file_name|><|fim▁begin|>#define BOOST_TEST_MODULE TEST_NODES
#include <dynet/functors.h>
#include <dynet/dynet.h>
#include <dynet/expr.h>
#include <dynet/grad-check.h>
#include <boost/test/unit_test.hpp>
#include "test.h"
#include <stdexcept>
using namespace dynet;
using namespace std;... | BOOST_AUTO_TEST_CASE( cmult_broadcast3_gradient ) {
Dim dim_permutations[] = {Dim({3,3,3},1), Dim({3,3,1},3), Dim({1,3,3},3), Dim({9,3,1},1), Dim({1,3,9},1), Dim({1,3,1},9)}; |
<|file_name|>sanitise_text.py<|end_file_name|><|fim▁begin|>import unicodedata
class SanitiseText:
ALLOWED_CHARACTERS = set()
REPLACEMENT_CHARACTERS = {
'–': '-', # EN DASH (U+2013)
'—': '-', # EM DASH (U+2014)
'…': '...', # HORIZONTAL ELLIPSIS (U+2026)
'‘': '\'', # LEFT SI... | |
<|file_name|>compiler.py<|end_file_name|><|fim▁begin|>""" Notices indicate how a regulation has changed since the last version. This
module contains code to compile a regulation from a notice's changes. """
from bisect import bisect
from collections import defaultdict
import copy
import itertools
import logging
from ... | elif change['action'] == 'RESERVE':
node = dict_to_node(change['node'])
reg.reserve(label, node) |
<|file_name|>removed-syntax-extern-const.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 or
// http://ww... |
extern { |
<|file_name|>no_0064_minimum_path_sum.rs<|end_file_name|><|fim▁begin|>struct Solution;
impl Solution {
pub fn min_path_sum(grid: Vec<Vec<i32>>) -> i32 {
if grid.is_empty() {<|fim▁hole|> return 0;
}
let (m, n) = (grid.len(), grid[0].len());
let mut arr = vec![std::i32::MAX;... | |
<|file_name|>arc065c.cpp<|end_file_name|><|fim▁begin|>#include <bits/stdc++.h>
using namespace std;
void solve() {
string s; cin >> s;
reverse(s.begin(), s.end());
vector<string> pre = {"dream", "dreamer", "erase", "eraser"};
for (auto& x: pre) {
reverse(x.begin(), x.end());
}
int i =... |
int main() { |
<|file_name|>overlay_nested2.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import warnings as _warnings
_warnings.resetwarnings()
_warnings.filterwarnings('error')
from tdi import html
template = html.from_string("""
<node tdi="item">
<znode tdi="nested" tdi:overlay="foo">
<ynode tdi="subnested"><... | def render_nested(self, node):
node['been'] = u'here'
|
<|file_name|>db_update.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import argparse
import sys
import re
import settings
import psycopg2
import imp
########################################################################################
class UpdSource():
def __init__(self,in_source,last_update):
self... | else:
try:
cur.execute(stmt)
cur.execute(settings.confirm_stmt,(number,stmt)) |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>"""course_discovery URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to u... | if settings.DEBUG and os.environ.get('ENABLE_DJANGO_TOOLBAR', False): # pragma: no cover
import debug_toolbar # pylint: disable=import-error
urlpatterns.append(url(r'^__debug__/', include(debug_toolbar.urls))) |
<|file_name|>FilterSetUnit.test.tsx<|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 ... | onDelete: jest.fn(),
onEdit: jest.fn(), |
<|file_name|>proxy.go<|end_file_name|><|fim▁begin|>package proxy
import (
"context"
"net"
"net/http"
"strings"
"time"
gmux "github.com/gorilla/mux"
v3 "github.com/rancher/rancher/pkg/generated/controllers/management.cattle.io/v3"
managementv3 "github.com/rancher/rancher/pkg/generated/norman/management.cattle.... | |
<|file_name|>restore.py<|end_file_name|><|fim▁begin|>import os<|fim▁hole|>from archie import helpers
def find_backup(cfg):
files = []
rcfiles = cfg.options('rcfiles')
for rc in rcfiles:
backup = helpers.get_backupfile(cfg, rc)
rcfile = helpers.get_rcfile(cfg, rc)
if os.path.lexists(... | import tarfile
from contextlib import closing |
<|file_name|>dynamic.js<|end_file_name|><|fim▁begin|>import React from 'react';
import Sortable from '../../src/';
import DemoItem from '../components/DemoItem';
export default class Dynamic extends React.Component {
constructor() {
super();
this.state = {
arr: [998, 225, 13]
};<|fim▁hole|> ar... | }
handleSort(sortedArray) {
this.setState({ |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3<|fim▁hole|># for more info, see github.com/qguv/loadaverage
from load.loadaverage import main<|fim▁end|> | |
<|file_name|>person-editor.component.ts<|end_file_name|><|fim▁begin|>import {Component, OnInit, Input, OnChanges} from '@angular/core';
import {Validators, FormControl, FormGroup, FormBuilder} from '@angular/forms';
import {Location} from '@angular/common';
import {Message} from 'primeng/components/common/api';
import ... | this.location.back(); |
<|file_name|>test_wizard_param_service.js<|end_file_name|><|fim▁begin|>'use strict';
concertoPanel.service('TestWizardParam', ["$filter",
function ($filter) {
this.getTypeName = function (type) {
switch (parseInt(type)) {
case 0:
return Trans.TEST_WIZARD_PARA... | return "";
switch (parseInt(param.type)) { |
<|file_name|>MenuMapper.java<|end_file_name|><|fim▁begin|>package com.jflyfox.dudu.module.system.dao;
<|fim▁hole|>import com.jflyfox.util.StrUtils;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.jdbc.SQL;
import java.util.List;
/**
* 菜单 数据层
*
* @author flyfox 369191470@qq.com on 2017... | import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.jflyfox.dudu.component.model.Query;
import com.jflyfox.dudu.module.system.model.SysMenu; |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from flask import render_template, flash, request, redirect, url_for
from flask_login import login_required
from kernel import agileCalendar
from kernel.DataBoard import Data
from kernel.NM_Aggregates import WorkBacklog, DevBacklog, RiskBacklog
from kconfig import coor... |
return render_template('coordination/issues.html', |
<|file_name|>cover.py<|end_file_name|><|fim▁begin|>"""Support for ISY994 covers."""<|fim▁hole|>from pyisy.constants import ISY_VALUE_UNKNOWN
from homeassistant.components.cover import (
ATTR_POSITION,
DOMAIN as COVER,
SUPPORT_CLOSE,
SUPPORT_OPEN,
SUPPORT_SET_POSITION,
CoverEntity,
)
from homeas... | from __future__ import annotations
from typing import Any
|
<|file_name|>rpcwallet.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/assign/list_of.... | |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>import operator
from turbion.bits.antispam import Filter
urlpatterns = reduce(
operator.add,
[filter.urlpatterns for name, filter in Filter.manager.all() if hasattr(filter, 'urlpatterns')],
[]<|fim▁hole|><|fim▁end|> | ) |
<|file_name|>appfwlearningsettings.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2008-2015 Citrix Systems, 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.a... | """
try :
return self._starturlpercentthreshold |
<|file_name|>dont_promote_unstable_const_fn.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 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
//... | // 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|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin
# Register your models here.
from .models import Environment,EnvironmentAdmin,Component,ComponentAdmin,Environment_property,Environment_propertyAdmin,Component_attribute,Component_attributeAdmin
admin.site.register(Environment,Enviro... | admin.site.register(Component,ComponentAdmin) |
<|file_name|>profit_and_loss_statement.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _<|fim▁hole|>
def execute(filters=None):
period... | from frappe.utils import flt
from erpnext.accounts.report.financial_statements import (get_period_list, get_columns, get_data) |
<|file_name|>series-combo.js<|end_file_name|><|fim▁begin|>YUI.add('series-combo', function (Y, NAME) {
/**
* Provides functionality for creating a combo series.
*
* @module charts
* @submodule series-combo
*/
/**
* The ComboSeries class renders a combination of lines, plots and area fills in a single series.
* ... | drawSeries: function()
{
if(this.get("showAreaFill")) |
<|file_name|>DetachStaticIpResultJsonUnmarshaller.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2014-2019 Amazon.com, Inc. or its affiliates. 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. A copy of the ... | import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*; |
<|file_name|>models.py<|end_file_name|><|fim▁begin|># coding=utf-8
import datetime
from django.db import models
from django.conf import settings
from django.contrib.auth.models import User
from django.core.signing import Signer
from djorm_pgfulltext.models import SearchManager
from djorm_pgfulltext.fields import Vector... | approved = models.BooleanField(default=False) |
<|file_name|>0009_auto_20160828_1131.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-08-28 18:31<|fim▁hole|>
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('benchmark', '0008_benchmarkdefinition_commit_keyword_... | from __future__ import unicode_literals |
<|file_name|>units.rs<|end_file_name|><|fim▁begin|>// Lumol, an extensible molecular simulation engine
// Copyright (C) Lumol's contributors — BSD license
//! This module allow to convert from and to the internal unit system.
//!
//! Internal units are:
//!
//! - Angstrom (A) for distances;
//! - femtosecond (fs) fo... | /// |
<|file_name|>ng_module_integration_spec.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {ANALYZE_FOR_ENTRY_COMPONENTS, CUSTOM... | it('should provide the module', |
<|file_name|>wifi_data_provider.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 "services/device/geolocation/wifi_data_provider.h"
#include "base/bind.h"
#inclu... |
void WifiDataProvider::RunCallbacks() {
client_task_runner_->PostTask(
FROM_HERE, base::BindOnce(&WifiDataProvider::DoRunCallbacks, this)); |
<|file_name|>test_certificates.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*-
"""
Certificates Tests.
"""
import itertools
import json
import ddt
import mock
import six
from django.conf import settings
from django.test.utils import override_settings
from opaque_keys.edx.keys import AssetKey
from six.moves i... | CourseModeFactory.create(course_id=self.course.id, mode_slug='audit')
response = self.client.get_html( |
<|file_name|>RuleAdministratorImpl.java<|end_file_name|><|fim▁begin|>package com.zxinsight.classifier.ruleengine.admin;
import java.rmi.RemoteException;
import java.util.Map;
import javax.rules.admin.LocalRuleExecutionSetProvider;
import javax.rules.admin.RuleAdministrator;
import javax.rules.admin.RuleExecutionSet;
... | |
<|file_name|>test_errors.py<|end_file_name|><|fim▁begin|>from django.test import TestCase
from corehq.apps.receiverwrapper import submit_form_locally
from couchforms.models import XFormError
class CaseProcessingErrorsTest(TestCase):
def test_no_case_id(self):
"""
submit form with a case block that... | <case case_id="">
<update><foo>bar</foo></update>
</case> |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>"""Copyright 2008 Orbitz WorldWide<|fim▁hole|>
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
Unl... | |
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "remakery.settings")
from django.core.management import execute_from_command_line
<|fim▁hole|> execute_from_command_line(sys.argv)<|fim▁e... | |
<|file_name|>qgsrendercontext.cpp<|end_file_name|><|fim▁begin|>/***************************************************************************
qgsrendercontext.cpp
--------------------
begin : March 16, 2008
copyright : (C) 2008 by M... | }
void QgsRenderContext::setFlags( QgsRenderContext::Flags flags )
{ |
<|file_name|>SimpleObjectRepository.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 fil... | ServiceRegistry2 serviceRegistry; |
<|file_name|>PersistenceResourcePostReturn.js<|end_file_name|><|fim▁begin|>"use strict";
tutao.provide('tutao.entity.base.PersistenceResourcePostReturn');
/**
* @constructor
* @param {Object=} data The json data to store in this entity.
*/
tutao.entity.base.PersistenceResourcePostReturn = function(data) {
if (da... | _format: this.__format,
generatedId: this._generatedId, |
<|file_name|>attr.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 dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen:... | }
|
<|file_name|>findAllRefsForObjectLiteralProperties.ts<|end_file_name|><|fim▁begin|>/// <reference path='fourslash.ts'/>
////var x = {
//// [|{| "isWriteAccess": true, "isDefinition": true |}property|]: {}
////};
////
////x.[|property|];
<|fim▁hole|>////
////let {[|property|]: pVar} = x;
verify.singleRefer... | |
<|file_name|>TrafficManager.java<|end_file_name|><|fim▁begin|>package com.mapswithme.maps.maplayer.traffic;
import androidx.annotation.MainThread;
import androidx.annotation.NonNull;
import com.mapswithme.util.log.Logger;
import com.mapswithme.util.log.LoggerFactory;
import java.util.ArrayList;
import java.util.List... | |
<|file_name|>bufferstream.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for bufferstream v0.6.2
// Project: https://github.com/dodo/node-bufferstream
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../no... | /*
immediately call disable |
<|file_name|>v-mask.js<|end_file_name|><|fim▁begin|>(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.VueMask = {}));
}(this, function ... | return new RegExp("/[".concat(escapeIfNeeded(char), "]/"));
}; |
<|file_name|>transformed_distribution_test.py<|end_file_name|><|fim▁begin|># Copyright 2015 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
#
# ... | dtypes.int32, name="dynamic_batch_shape")
event_shape_pl = array_ops.placeholder(
dtypes.int32, name="dynamic_event_shape") |
<|file_name|>gotoDefinitionInObjectBindingPattern2.ts<|end_file_name|><|fim▁begin|>/// <reference path='fourslash.ts' />
//// var p0 = ({a/*1*/a}) => {console.log(aa)};
//// function f2({ a/*a1*/1, b/*b1*/1 }: { /*a1_dest*/a1: number, /*b1_dest*/b1: number } = { a1: 0, b1: 0 }) {}
verify.goToDefinition("1", []);<|fim... | |
<|file_name|>vcx.rs<|end_file_name|><|fim▁begin|>use utils::version_constants;
use libc::c_char;
use utils::cstring::CStringUtils;
use utils::libindy::{wallet, pool};
use utils::error;
use settings;
use std::ffi::CString;
use utils::threadpool::spawn;
use error::prelude::*;
/// Initializes VCX with config settings
///... | |
<|file_name|>IsProcessValid.cpp<|end_file_name|><|fim▁begin|>#include <windows.h>
#include "NativeCore.hpp"
bool RC_CallConv IsProcessValid(RC_Pointer handle)
{
if (handle == nullptr)
{
return false;<|fim▁hole|> }
const auto retn = WaitForSingleObject(handle, 0);
if (retn == WAIT_FAILED)
{
return false;
}
... | |
<|file_name|>logger.rs<|end_file_name|><|fim▁begin|>extern crate env_logger;
extern crate log_panics;
extern crate log;
#[cfg(target_os = "android")]
extern crate android_logger;
extern crate libc;
use self::env_logger::Builder as EnvLoggerBuilder;
use self::log::{LevelFilter, Level};
use std::env;
use std::io::Write;... | Default,
Custom |
<|file_name|>logIn.js<|end_file_name|><|fim▁begin|>/*jslint browser: true*/
/*global $, jQuery, alert*/
<|fim▁hole|> dateFormat: 'yy-mm-dd',
inline: true,
showOtherMonths: true
});
});
$(document).ready(function () {
$("input[name='rep_password']").focus... | (function ($) {
"use strict";
$(document).ready(function () {
$("input[name=dob]").datepicker({
|
<|file_name|>itemdemo.js<|end_file_name|><|fim▁begin|>import * as React from 'react';
import {Row,Col,Table,Code,Items,Item} from 'yrui';
import thead from './thead';
let items=[{
key:'style',
expr:'设置items样式',
type:'object',
values:'-',
default:'-',
}];
let item=[{
key:'border',
expr:'设置border样式',
ty... | |
<|file_name|>AssetRoleManagerTest.java<|end_file_name|><|fim▁begin|>package org.tll.canyon.service;
import java.util.List;
import java.util.ArrayList;
import org.jmock.Mock;
import org.springframework.orm.ObjectRetrievalFailureException;
import org.tll.canyon.dao.AssetRoleDao;
import org.tll.canyon.model.AssetRole;
... | public void testGetAssetRole() throws Exception {
// set expected behavior on dao |
<|file_name|>vcardupdate.cpp<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2006-2009 by Jakob Schroeter <js@camaya.net>
This file is part of the gloox library. http://camaya.net/gloox
This software is distributed under a license. The full license
agreement can be found in the file LICENSE in this distribution.... | return 0; |
<|file_name|>tally-frontend.go<|end_file_name|><|fim▁begin|>package main
import (
"flag"
"log"
"net/http"
"os"
"path"
"time"
"github.com/emef/tally/frontend"
)
func main() {
defaultStaticDir := path.Join(
os.Getenv("GOPATH"), "src/github.com/emef/tally/frontend/static")
staticDir := flag.String(
"static... | Addr: *port,
WriteTimeout: 15 * time.Second,
ReadTimeout: 15 * time.Second}
|
<|file_name|>menus.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from gluon import current
from s3 import *
from s3layouts import *
try:
from .layouts import *
except ImportError:
pass
import s3menus as default
red_cross_filter = {"organisation.organisation_type_id$name" : "Red Cross / Red Crescent"... | |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from app import db
class Alternative(db.Model):
id = db.Column(db.Integer, primary_key=True)
experiment = db.Column(db.String(500), unique=True)
copy = db.Column(db.String(2500))
def __init__(self, id, experiment, copy):<|fim▁hole|> self.id =... | |
<|file_name|>Help.cpp<|end_file_name|><|fim▁begin|>#include "stdafx.h"
#include "Help.h"
namespace LiteCppDB_Console_Commands
{
DataAccess Help::getAccess() noexcept
{
return DataAccess::None;
}
bool Help::IsCommand(LiteCppDB::StringScanner& s) noexcept
{
return s.Scan("help[[:s:]]*").length() > 0;
}
void... | |
<|file_name|>toaiff.py<|end_file_name|><|fim▁begin|>"""Convert "arbitrary" sound files to AIFF (Apple and SGI's audio format).
Input may be compressed.
Uncompressed file type may be AIFF, WAV, VOC, 8SVX, NeXT/Sun, and others.
An exception is raised if the file is not of a recognized type.
Returned filename is either t... | |
<|file_name|>network.py<|end_file_name|><|fim▁begin|>import requests
from PIL import Image
from course import *
<|fim▁hole|>from io import BytesIO
url_course = 'https://wx.idsbllp.cn/redapi2/api/kebiao'
url_stu_info = 'https://we.cqu.pt/api/others/student.php?key='
url_photo = 'https://we.cqu.pt/api/others... | from utils import is_on_time, get_week
|
<|file_name|>block_volume_entry.go<|end_file_name|><|fim▁begin|>//
// Copyright (c) 2017 The heketi Authors
//
// This file is licensed to you under your choice of the GNU Lesser
// General Public License, version 3 or any later version (LGPLv3 or
// later), or the GNU General Public License, version 2 (GPLv2), in all
... |
if req.Name == "" {
vol.Info.Name = "blockvol_" + vol.Info.Id
} else { |
<|file_name|>string.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Daniel P. Clark & array_tool Developers
//
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your optio... | |
<|file_name|>chordangle.rs<|end_file_name|><|fim▁begin|>/*
Copyright 2015 Google Inc. All rights reserved.
Copyright 2017 Jihyun Yu. 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... | /// value. This method assumes the ChordAngles are not special.
fn sub(self, other: ChordAngle) -> Self::Output {
if other.0 == 0.0 {
self |
<|file_name|>Raspistill.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import sys
import time
from subprocess import call
#add the project folder to pythpath
sys.path.append('../../')
from library.components.SensorModule import SensorModule as Sensor
from library.components.MetaData import MetaData as MetaDa... | iso400MetaData = MetaData('ISO400')
iso400MetaData.setValueCallback(self.getIso400)
iso400MetaData.setUnitCallback(self.getUnit) |
<|file_name|>filelog.go<|end_file_name|><|fim▁begin|>// Copyright (C) 2010, Kyle Lemons <kyle@kylelemons.net>. All rights reserved.
package log4go
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"<|fim▁hole|>
// This log writer sends output to a file
type FileLogWriter struct {
rec chan *LogRecord
rot chan bool
... | "sort"
"strings"
"time"
) |
<|file_name|>isup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|>import re
import sys
from urllib import urlopen
def isup(domain):
resp = urlopen("http://www.isup.me/%s" % domain).read()
return "%s" % ("UP" if re.search("It's just you.", resp,
re.DOTALL) else "DOWN")
if __name__ =... | |
<|file_name|>PlotTools.java<|end_file_name|><|fim▁begin|>package edu.indiana.soic.spidal.dapwc;
public class PlotTools
{
// TODO - fix PlotTools
/* public static void CreatePlotWithCenters(String centerFile, String pointsFile, String clusterNumberFile, int numberOfCenterPointsToIncludeInEachCenterType, String cent... | String source = ""; |
<|file_name|>test_idct.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License ... | |
<|file_name|>scrollable.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license<|fim▁hole|>import {
getRtlScrollAxisType,
RtlScrollAxisType,
... | */
import {Directionality} from '@angular/cdk/bidi'; |
<|file_name|>utils.js<|end_file_name|><|fim▁begin|>export function pluralize(count, word) {
return count === 1 ? word : word + 's';
}<|fim▁hole|> // based on https://github.com/JedWatson/classnames
let classes = '';
args.forEach(arg => {
if (arg) {
const argType = typeof arg;
if (argType === 's... |
export function classNames(...args) { |
<|file_name|>accountEditor_en.js<|end_file_name|><|fim▁begin|>Brick.util.Language.add('en',{'mod': {'{C#MODNAME}':{
'accounteditor': {
'widget': {
'1': 'Add account'
},
'editor': {
'1': 'Edit account',
'2': 'Create account',
'3': 'Save',
'4': 'Cancel',
'5': 'Close'
},
'row': {
'1': 'Remo... | '3': 'Account type',
'4': 'Title',
'5': 'Remark',
'6': 'Opening balance', |
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2014 by SiegeLord
//
// All rights reserved. Distributed under ZLib. For full terms see the file LICENSE.
use std::env::var;
fn main()
{<|fim▁hole|> if var("CARGO_FEATURE_LINK_NONE").is_ok()
{
return;
}
let debug = match var("CARGO_FEATURE_LINK... | |
<|file_name|>xcrate-issue-43189-a.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 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.apach... | #![crate_type="lib"] |
<|file_name|>project.ts<|end_file_name|><|fim▁begin|>import { Language } from './language.ts';
import { ProjectType } from './projecttype.ts';
export class Project {
id_question_project: number;
description: string;
name: string;
active: number ;<|fim▁hole|> end_date: string;
end_text: string;
... | create_date: string; |
<|file_name|>set-uuid.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
# requirements: partition /dev/sdc1 with swap
from storage import *
from storageitu import *
<|fim▁hole|>environment = Environment(False)
storage = Storage(environment)
storage.probe()
staging = storage.get_staging()
print(staging)
sdc1 = B... |
set_logger(get_logfile_logger())
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#coding: latin1
label = 'Prototyp einer Homepage für den V.O.R.'
def populate(db):
import vor1<|fim▁hole|><|fim▁end|> | vor1.populate(db) |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>try:
from setuptools import setup
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
import sys
test_suite = "tests"
tests_require = ["mongo-orchestration >= 0.2, < 0.4", "requests >= 2.5.1"]
if sys.... | platforms=['any'],
author='anna herlihy',
author_email='mongodb-user@googlegroups.com',
url='https://github.com/mongodb-labs/hzkgelastic2-doc-manager', |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import sys
from . import (
utils, env, defs, context, layers, parser, preprocessor, loader, analyzer,
generator)
LAYERS = (
(parser.Parser, "parse"),
(preprocessor.Preprocessor, "transform_ast"),
(loader.Loader, "expand_ast"),
(analyzer.An... | return {**context.modified_context_args(), **{"env": env.Env()}}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.