prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>xmlrpcapi.py<|end_file_name|><|fim▁begin|># # SFA XML-RPC and SOAP interfaces # import string import xmlrpclib # SOAP support is optional try: import SOAPpy from SOAPpy.Parser import parseSOAPRPC from SOAPpy.Types import faultType from SOAPpy.NS import NS from SOAPpy.SOAPBuilder impor...
# Parse request into method name and arguments try:
<|file_name|>mutations.js<|end_file_name|><|fim▁begin|>const mutations = { SET_ACTIVE_TAB(state, tab){ state.activeTab = tab; }, SET_DATA_ACTIVE_TAB(state, tab){ state.hubActiveTab = tab; }, SET_PROXY_STATE(state, proxy){ state.proxy_switch = proxy; }, SET_INIT_INFO(state, info){ _.extend(...
export default mutations;
<|file_name|>demo1.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # _*_ coding:utf-8 _*-_ ############################ # File Name: demo.py # Author: lza # Created Time: 2016-08-30 16:29:35 ############################ <|fim▁hole|>import dns.resolver domain = raw_input ('Please input an domain: ') #输入域名地址 ...
<|file_name|>factual_driver_test.go<|end_file_name|><|fim▁begin|>package factual import ( "fmt" "strings" "testing" ) func TestToken(t *testing.T) { fR := NewToken("Pbu7jRdBErgLW07g9c25JtGcwwt1KmpoxRTfFL3x", "vC4AgocPBhxe0GFkTsetoiuEAJEgqz6MCbAnXEoO") <|fim▁hole|> fmt.Println(err) return } nR.AddQuery("pizz...
nR, err := NewRead(fR, "restaurants-us") if err != nil {
<|file_name|>maquette.d.ts<|end_file_name|><|fim▁begin|>/** * Welcome to the API documentation of the **maquette** library. * * [[http://maquettejs.org/|To the maquette homepage]] */ /** * A virtual representation of a DOM Node. Maquette assumes that [[VNode]] objects are never modified externally. * Instances of...
* A transition strategy to invoke when enterAnimation and exitAnimation properties are provided as strings.
<|file_name|>services_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2012 Google Inc. All Rights Reserved. """Tests for grr.lib.flows.general.services.""" from grr.lib import aff4 from grr.lib import rdfvalue from grr.lib import test_lib class ServicesTest(test_lib.FlowTestsBaseclass): ...
class ClientMock(object): def EnumerateRunningServices(self, _): service = rdfvalue.Service(label="org.openbsd.ssh-agent", args="/usr/bin/ssh-agent -l")
<|file_name|>mut_exclusive_violation1.rs<|end_file_name|><|fim▁begin|>fn demo_mut_advanced_unique(our: &mut i32) -> i32 { unknown_code_1(&*our); // This "re-asserts" uniqueness of the reference: After writing, we know // our tag is at the top of the stack. *our = 5; unknown_code_2(); // We know this will...
static mut LEAK: *mut i32 = ptr::null_mut();
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, include, url from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'schwag.views.h...
url(r'^bmx/$', 'schwag.views.bmx', name='bmx'),
<|file_name|>lub-glb-with-unbound-infer-var.rs<|end_file_name|><|fim▁begin|>// run-pass // Test for a specific corner case: when we compute the LUB of two fn // types and their parameters have unbound variables. In that case, we<|fim▁hole|>// wind up relating those two variables. This was causing an ICE in an // in-pro...
<|file_name|>TouchEvent.d.ts<|end_file_name|><|fim▁begin|>import { Event } from './Event'; import { Layer } from '../display/Layer'; export declare class TouchEvent extends Event { /** @event touchStart */ static readonly TOUCH_START: string; /** @event touchMove */ static readonly TOUCH_MOVE: string; ...
stageX: number; stageY: number;
<|file_name|>audioApp.py<|end_file_name|><|fim▁begin|>from flask import (Flask, session, render_template, request, redirect, url_for, make_response, Blueprint, current_app) import requests import json from datetime import datetime, timedelta from flask.ext.cors import CORS, cross_origin bp = Bluepri...
<|file_name|>collections.py<|end_file_name|><|fim▁begin|>def _iter(target, method, key): iterable = target if method is None else getattr(target, method)() iterator = iter(iterable) if key is None: return iterator if not callable(key):<|fim▁hole|> return (each for each in iterator if key(ea...
raise TypeError('{!r} is not callable'.format(type(key).__name__))
<|file_name|>etl.py<|end_file_name|><|fim▁begin|># File: etl.py # Purpose: To do the `Transform` step of an Extract-Transform-Load. # Programmer: Amal Shehu # Course: Exercism # Date: Thursday 22 September 2016, 03:40 PM def transform(words): new_words = dict() for point, letters in wo...
for letter in letters:
<|file_name|>mfcc_ops_test.py<|end_file_name|><|fim▁begin|># Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apa...
def test_unknown_shape(self): """A test that the op runs when shape and rank are unknown.""" with spectral_ops_test_util.fft_kernel_label_map(): with self.session(use_gpu=True):
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" support for presenting detailed information in failing assertions. """ import py import sys import pytest from _pytest.monkeypatch import monkeypatch from _pytest.assertion import util def pytest_addoption(parser): group = parser.getgroup("debugconfig") ...
# this hook is only called when test modules are collected
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User TRANSACTION_STATUS = ( ('P', _('pending')), ('F', _('failed')), ('C', _('complete')), )<|fim▁hole|> class Transaction(model...
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { BrainSocketService } from './services/brain-socket.service'; import { StatusComponent } from './status/sta...
providers: [ BrainSocketService
<|file_name|>BaseExample.java<|end_file_name|><|fim▁begin|>package sdk.chat.demo.examples.api; import io.reactivex.functions.Consumer; import sdk.guru.common.DisposableMap; public class BaseExample implements Consumer<Throwable> { // Add the disposables to a map so you can dispose of them all at one time pro...
}
<|file_name|>pressure.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys import time from envirophat import light, weather, motion, analog def write(): try: p = round(weather.pressure(),2) c = light.light() print('{"light": '+str(c)+', "pressure": '+str(p)+' }') except KeyboardInterrupt:<|fim▁...
pass
<|file_name|>CircleImpl.cpp<|end_file_name|><|fim▁begin|>/* * Beautiful Capi generates beautiful C API wrappers for your C++ classes * Copyright (C) 2015 Petr Petrovich Petrov *<|fim▁hole|> * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Beautiful Capi...
* This file is part of Beautiful Capi. * * Beautiful Capi is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by
<|file_name|>freeze.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import logging import re import pip from pip.req import InstallRequirement from pip.req.req_file import COMMENT_RE from pip.utils import get_installed_distributions from pip._vendor import pkg_resources from pip._vendor.packagi...
)
<|file_name|>cellbuffer.rs<|end_file_name|><|fim▁begin|>use std::ops::{Index, IndexMut, Deref, DerefMut}; use core::position::{Pos, Size, HasSize}; // I tried really hard to implement Index + IndexMut directly in the trait, but I coudn't get it // to compile... pub trait CellAccessor: HasSize { fn cellvec(&self)...
/// /// `Attr::Default` represents no attribute. ///
<|file_name|>arachnid.cpp<|end_file_name|><|fim▁begin|>// license:BSD-3-Clause // copyright-holders:Jim Stolis /* Arachnid - English Mark Darts Driver by Jim Stolis. --- Technical Notes --- Name: English Mark Darts Company: Arachnid, Inc. Year: 1987/88/89/90 --- Hardware --- A 6...
MACHINE_START( arachnid ) -------------------------------------------------*/
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from tornado.web import RequestHandler class BaseHandler(RequestHandler): def initialize(self): _settings = self.application.settings <|fim▁hole|> self.log = _settings["log"]<|fim▁end|>
self.db = self.application.db #self.redis = _settings["redis"]
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|>from django.utils import translation from django.conf import settings from froide.celery import app as celery_app from froide.foirequest.models import FoiRequest from .models import FoiRequestFollower from .utils import run_batch_update<|fim▁hole|> @celery_app.task d...
<|file_name|>filterGroup.service.ts<|end_file_name|><|fim▁begin|>import { Observable } from 'rxjs'; import { each, filter, has, isUndefined, isFunction } from 'lodash'; import { IFilter, Filter } from '../filter'; export interface IFilterGroupSettings<TItemType> { label: string; type: string; options: IFilterOptio...
export interface IFilterGroup<TItemType> extends IFilter<TItemType, any> {
<|file_name|>Python_tutorial.py<|end_file_name|><|fim▁begin|># PPPPPPPP # PP PP t hh # PP - PP tt hh # PP PP yy...
x = y + z # No need to declare y, z: LEGB rule
<|file_name|>dialogs.module.ts<|end_file_name|><|fim▁begin|>import { Type } from '@angular/core'; import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { MatDialogModule } from '@angular/material/dialog'; import { MatInputModule }...
imports: [
<|file_name|>text.py<|end_file_name|><|fim▁begin|>import nltk class Text: def __init__(self, raw_text):<|fim▁hole|> sentences = nltk.sent_tokenize(self.raw_text) tokens = [nltk.word_tokenize(sentence) for sentence in sentences] self.tagged_sentences = [self.tag(words) for words in tokens] ...
self.raw_text = raw_text def parse(self):
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>from rest_framework import serializers class AttachmentSerializer(serializers.Serializer):<|fim▁hole|>// As of 2017-06-13, up to 38 attachments can be worn per agent // max of 328 bytes per attach point (if name and description are maxed out). // x38 = 12464...
pass """ //*
<|file_name|>or.rs<|end_file_name|><|fim▁begin|>use super::{ToSharedPredicate}; #[derive(Clone)]<|fim▁hole|>} pub trait ToOrPredicate { fn or(&self, val: super::SharedPredicate) -> super::SharedPredicate; } impl super::Predicate for OrPredicate { } impl ToOrPredicate for super::SharedPredicate { fn or(&self...
pub struct OrPredicate { pub left: super::SharedPredicate, pub right: super::SharedPredicate
<|file_name|>misc.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2015, The Gtk-rs 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> use libc::{c_float, c_int}; use cast::GTK_M...
fn get_padding(&self) -> (i32, i32) { let mut x: c_int = 0;
<|file_name|>notebook.py<|end_file_name|><|fim▁begin|>#! /usr/bin/ python # -*- coding: utf-8 -*- # Copyright (C) 2013 Deepin, Inc. # 2013 Hailong Qiu # # Author: Hailong Qiu <356752238@qq.com> # Maintainer: Hailong Qiu <356752238@qq.com> # # This program is free software: you can redistribute it and...
| gdk.LEAVE_NOTIFY_MASK
<|file_name|>parsing_logs_arun.py<|end_file_name|><|fim▁begin|>import re def check_patterns(): patterns_list = [] #Read patterns file with open("patterns.txt") as patterns1: for line in patterns1: line = line.rstrip("\n") patterns_list.append(line) print(patterns_li...
<|file_name|>utils_lib.py<|end_file_name|><|fim▁begin|># Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache....
] remove_undocumented(__name__, allowed_exception_list=_allowed_symbols)
<|file_name|>compute_user_popularity.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # compute the times of action(rec|click|msg) for each user from math import sqrt def getActionScore(action): if action == "rec": return 0 elif action == "click" : return 1 else: return 2 def co...
lineNum += 1
<|file_name|>_tarantula.py<|end_file_name|><|fim▁begin|># Copyright 2018-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos 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 ...
<|file_name|>transaction.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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 Softw...
for item in self.inputs: addr = item.get('address')
<|file_name|>unsized5.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/licens...
V1(X, int), //~ERROR `core::marker::Sized` is not implemented }
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.administrator_page), url(r'^new_jd/$', views.new_jd_page), url(r'^test_data/refresh/$', views.test_data_refresh), url(r'^jd/(?P<jd_id>\d+)/delete/', views.delete_jd), ...
url(r'^new_ssh_key/$', views.new_ssh_key_page),
<|file_name|>views.py<|end_file_name|><|fim▁begin|># views # Routes for the ELMR web application # # Author: Benjamin Bengfort <benjamin@bengfort.com> # Created: Thu Apr 09 09:13:29 2015 -0400 # # Copyright (C) 2015 University of Maryland # For license information, see LICENSE.txt # # ID: views.py [] benjamin@bengfo...
class GeoDatasetsView(Resource):
<|file_name|>filters.py<|end_file_name|><|fim▁begin|>import django_filters from django_filters import rest_framework as filters<|fim▁hole|> from django_rv_apps.apps.believe_his_prophets.models.book import Book from django_rv_apps.apps.believe_his_prophets.models.bible_read import BibleRead from django_rv_apps.apps....
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|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 # # Unless required by appli...
# coding=utf-8 # Copyright 2022 The TensorFlow Datasets Authors. #
<|file_name|>analysis.py<|end_file_name|><|fim▁begin|># # Copyright (C) 2013 Stanislav Bohm # # This file is part of Kaira. # # Kaira 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, version 3 of...
if inscription.is_collective(): continue # Collective operations cannot use token reusage token_uid = variable_sources.get(inscription.expr) if token_uid is None or token_uid in used_tokens:
<|file_name|>createSections.js<|end_file_name|><|fim▁begin|>'use strict'; var path = require('path'); var fs = require('fs'); module.exports = function(gen,cb) { var sections; if (gen.config.get('framework')==='bigwheel') { var model = require(path.join(process.cwd(),'src/model/index.js')); sections = ['Pre...
});
<|file_name|>AudioElement.js<|end_file_name|><|fim▁begin|>/* global PropertyFactory, extendPrototype, RenderableElement, BaseElement, FrameElement */ function AudioElement(data, globalData, comp) { this.initFrame(); this.initRenderable(); this.assetData = globalData.getAssetData(data.refId); this.initBas...
} }
<|file_name|>closure.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/li...
ty::ty_fn_args(function_type), ty::ty_fn_ret(function_type),
<|file_name|>ovfenvelope.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated Fri Dec 2 15:05:18 2011 by generateDS.py version 2.7b. # import sys import getopt import re as re_ etree_ = None Verbose_import_ = False ( XMLParser_import_none, XMLParser_import_lxml, XMLParse...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>use anyhow::{Context, Error}; use next_swc::{custom_before_pass, TransformOptions}; use once_cell::sync::Lazy; use std::sync::Arc; use swc::{config::JsMinifyOptions, try_with_handler, Compiler}; use swc_common::{FileName, FilePathMapping, SourceMap}; use swc_ecmascript::...
<|file_name|>test_array.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import print_function from __future__ import absolute_import import os import sys import tempfile import warnings import numpy from numpy import testing as npt import tables from tables import Atom, ClosedNodeError, NoS...
if nparr.dtype.byteorder in ('>', '<'):
<|file_name|>0003_auto_20160317_1521.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-17 19:21 from __future__ import unicode_literals from django.db import migrations <|fim▁hole|> ('tilecache', '0002_auto_20160317_1519'), ] operations = [ migration...
class Migration(migrations.Migration): dependencies = [
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub use self::error404::*; pub use self::render::*; pub use self::validator::*; pub use self::db::*; mod error404; mod render; mod validator; mod db; <|fim▁hole|><|fim▁end|>
mod validator_test;
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from Weather.models import * from Weather.util import updateForecast def update_forecast(modeladmin, request, queryset): for forecast in queryset: updateForecast(forecast) <|fim▁hole|> actions = [update_forecast] clas...
update_forecast.short_description = "Force forecast update from NWS" class forecastAdmin(admin.ModelAdmin):
<|file_name|>inherited_text.mako.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ <%namespace name="helpers" file="/helpers.mako.rs...
match *self {
<|file_name|>lib.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/. */ #![cfg_attr(test, feature(net, alloc, path, io))] extern crate n...
#[cfg(test)] mod data_loader; #[cfg(test)] mod mime_classifier; #[cfg(test)] mod resource_task;
<|file_name|>dialog.service.ts<|end_file_name|><|fim▁begin|>import {Injectable} from 'angular2/core'; /** * Async modal dialog service * DialogService makes this app easier to test by faking this service. * TODO: better modal implemenation that doesn't use window.confirm */<|fim▁hole|> * Ask user to confirm an ac...
@Injectable() export class DialogService { /**
<|file_name|>soln.py<|end_file_name|><|fim▁begin|>from typing import List class Solution:<|fim▁hole|> for i in range(0, 26): c = chr(97+i) lastPos[c] = S.rfind(c) for i, c in enumerate(S): # Encounter new index higher than currMax if i > currMax: ...
def partitionLabels(self, S: str) -> List[int]: lastPos, seen, currMax = {}, set(), -1 res = []
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .create2 import * from .factory import *<|fim▁hole|><|fim▁end|>
__all__ = ["FactoryCreate", "FactorySimulation"]
<|file_name|>LoadStatisticsTest.java<|end_file_name|><|fim▁begin|>/* * The MIT License * * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to ...
@Override
<|file_name|>OrbeonForms.js<|end_file_name|><|fim▁begin|>$identify("org/mathdox/formulaeditor/OrbeonForms.js"); $require("org/mathdox/formulaeditor/FormulaEditor.js"); var ORBEON; $main(function(){ if (ORBEON && ORBEON.xforms && ORBEON.xforms.Document) { /** * Extend the save function of the formula edi...
$extend(org.mathdox.formulaeditor.FormulaEditor, { save : function() {
<|file_name|>rpc_apis.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either ve...
<|file_name|>tsigkeys.py<|end_file_name|><|fim▁begin|># Copyright 2015 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <kiall@hpe.com> # # 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 t...
tsigkey = DesignateAdapter.parse('API_v2', body, TsigKey())
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>/* * @license Apache-2.0 * * Copyright (c) 2019 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apac...
<|file_name|>FindPhoneInterface.java<|end_file_name|><|fim▁begin|>package com.mc.phonefinder.usersettings; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.preference.PreferenceManager; import android.support.v7.app.ActionBarActivity; import android.os.Bun...
locPrefs_check.set(objects.get(0).getBoolean("location")); Log.i(TAG, "Inner class neary by " + String.valueOf(nearByUserSetting_check.get())); Log.i(TAG,"Inner class Location pref "+ (String.valueOf(locPrefs_check.get())));
<|file_name|>react-bootstrap-typeahead.js<|end_file_name|><|fim▁begin|>(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom')) : typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-dom'], factor...
function getBordersSize(styles, axis) { var sideA = axis === 'x' ? 'Left' : 'Top'; var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
<|file_name|>test_forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.test import TestCase from ..forms import QuoteForm<|fim▁hole|>class TestQuoteForm(TestCase): def setUp(self): pass def test_validate_emtpy_quote(self):...
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for csso 3.5 // Project: https://github.com/css/csso // Definitions by: Christian Rackerseder <https://github.com/screendriver> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.6 declare namespace csso {...
* @default true */ restructure?: boolean;
<|file_name|>pass-by-copy.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/li...
}
<|file_name|>t0288.cc<|end_file_name|><|fim▁begin|>// t0288.cc // "ambiguous function template instantiation" // 2005-08-03: This appears to be fixed by the switch to // the new mtype module. namespace std { template < class _CharT > struct char_traits; } typedef int ptrdiff_t; extern "C" { typedef struct __local...
{ }; } }
<|file_name|>file.go<|end_file_name|><|fim▁begin|>package fs import ( "errors" "os" "strings" "io/ioutil" "path/filepath" ) func IsSymLink(m os.FileMode) bool { return (m & os.ModeSymlink) == os.ModeSymlink } func buildCheckSuffix(suffix string) func(string) bool { suffix = strings.ToUpper(suffix) //忽略后缀匹配的大...
if !checkSuffix(filename) { return nil }
<|file_name|>list.js<|end_file_name|><|fim▁begin|>"use strict"; var Construct = require("can-construct"); var define = require("can-define"); var make = define.make; var queues = require("can-queues"); var addTypeEvents = require("can-event-queue/type/type"); var ObservationRecorder = require("can-observation-recorder...
}; } //!steal-remove-end
<|file_name|>plot_kmeans_digits.py<|end_file_name|><|fim▁begin|>""" =========================================================== A demo of K-Means clustering on the handwritten digits data =========================================================== In this example with compare the various initialization strategies for ...
<|file_name|>socket.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import errno import json import logging import threading import time ...
<|file_name|>Header.spec.js<|end_file_name|><|fim▁begin|>import React from 'react' import { Header } from 'components/Header/Header' import { IndexLink, Link } from 'react-router' import { shallow } from 'enzyme' describe('(Component) Header', () => { let _wrapper beforeEach(() => { _wrapper = shallow(<Header...
<|file_name|>confirmbox.js<|end_file_name|><|fim▁begin|>/** * This file is part of "PCPIN Chat 6". * * "PCPIN Chat 6" is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the Li...
break;
<|file_name|>delete-link-handler.ts<|end_file_name|><|fim▁begin|>// (C) Copyright 2015 Moodle Pty Ltd. // // 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/lice...
// Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<|file_name|>EnergyConsumer.py<|end_file_name|><|fim▁begin|># Copyright (C) 2010-2011 Richard Lincoln # # 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 ...
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE.
<|file_name|>scheduler.py<|end_file_name|><|fim▁begin|># Copyright (c) Mathias Kaerlev 2012. # This file is part of pyspades. # pyspades 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...
def loop_call(self, delay, func, *arg, **kw):
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django.forms import ModelForm from django import forms from crispy_forms import layout from crispy_forms.layout import Layout, HTML from hs_core.forms import BaseFormHelper, Helper from hs_core.hydroshare import users from hs_modelinstance.models import ...
# ModelOutput element forms class ModelOutputFormHelper(BaseFormHelper): def __init__(self, allow_edit=True, res_short_id=None, element_id=None, element_name=None,
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>#![allow(unused)] use std::env; use std::fs::File; use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; fn wasi_sdk() -> PathBuf { Path::new(&env::var("WASI_SDK").unwrap_or("/opt/wasi-sdk".to_owned())).to_path_buf() } fn wasi_sysroot() -> PathBuf ...
.arg(r#"s/U?INT[0-9]+_C\(((0x)?[0-9]+)\)/\1/g"#) .arg(wasi_sysroot_core_h)
<|file_name|>mlp_learn.py<|end_file_name|><|fim▁begin|>__author__ = 'USER' from learning.mlp.neuralnetwork import NeuralNetwork from learning.mlp import learning number_of_layers = 3 size_array = [2, 2, 1] learning_rate = 0.3 momentum = 0.1 bnn = NeuralNetwork(number_of_layers, size_array, learning_rate, momentum) <...
xor_in = [
<|file_name|>listener.py<|end_file_name|><|fim▁begin|># # Copyright 2015 IBM Corp. # # 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...
DEFAULT_POOL_ID_ATTR: attributes.Schema( _('ID of the default pool this listener is associated to.'), type=attributes.Schema.STRING )
<|file_name|>realness_tests.py<|end_file_name|><|fim▁begin|># coding: utf-8 from __future__ import print_function from __future__ import unicode_literals import re import poetryutils2 # this is all for use within ipython def sample_words(): lines = poetryutils2.utils.debug_lines() words = list() for l i...
# parser = argparse.ArgumentParser() # parser.add_argument('arg1', type=str, help="required argument")
<|file_name|>SettingsTest.java<|end_file_name|><|fim▁begin|>/* * Sonar, open source software quality management tool. * Copyright (C) 2008-2012 SonarSource * mailto:contact AT sonarsource DOT com * * Sonar is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Publi...
<|file_name|>corpscore.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|>import csv import json import sys import click def score(company, sexbiases): """ Given a company record with board of directors and executive names, return our guess of the % of governance that is male. Since na...
<|file_name|>conversions.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/. */ //! Conversions of Rust values to and from `JSVal`. //! /...
<|file_name|>test_igorio.py<|end_file_name|><|fim▁begin|>""" Tests of neo.io.igorproio """ import unittest try: import igor HAVE_IGOR = True except ImportError: HAVE_IGOR = False from neo.io.igorproio import IgorIO from neo.test.iotest.common_io_test import BaseTestIO @unittest.skipUnless(HAVE_IGOR, "r...
if __name__ == "__main__":
<|file_name|>UserAccountPlace.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2010, 2012 Tasktop Technologies * Copyright (c) 2010, 2011 SpringSource, a division of VMware * * All rights reserved. This program and the accompanying m...
<|file_name|>issue-16922.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 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/lic...
fn main() { let _ = foo(&5); }
<|file_name|>alerts.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import copy import datetime import json import logging import subprocess import sys import warnings from email.mime.text import MIMEText from email.utils import formatdate from smtplib import SMTP from smtplib import SMTP_SSL from smtplib impor...
<|file_name|>align_return_type.rs<|end_file_name|><|fim▁begin|>fn foo(x: i32, y: String) -> String {<|fim▁hole|>fn foo(x: i32, y: String) -> String { y + x.to_string() } fn foo( x: i32, y: String) -> String { y + x.to_string() } fn foo( x: i32, y: String ) -> ...
y + x.to_string() }
<|file_name|>L2LoginClient.java<|end_file_name|><|fim▁begin|>/* * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; either version 2, or (at your option) any later version. This * program is dis...
import org.slf4j.Logger; import org.slf4j.LoggerFactory;
<|file_name|>script.py<|end_file_name|><|fim▁begin|># Orca # # Copyright 2006-2009 Sun Microsystems Inc. # Copyright 2010 Joanmarie Diggs # # This library 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 Foundation;...
# Java's SpinButtons are the most caret movement happy thing # I've seen to date. If you Up or Down on the keyboard to # change the value, they typically emit three caret movement # events, first to the beginning, then to the end, and then
<|file_name|>qtmailwindow.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** This file is part of the Qtopia Opensource Edition Package. ** ** Copyright (C) 2008 Trolltech ASA. ** ** Contact: Qt Extended Information (info@qtextended.org) ** ** This file ...
{
<|file_name|>core.js<|end_file_name|><|fim▁begin|>var request = require('request'); module.exports = function(args) { var opts = { API_URL:'http://en.wikipedia.org/w/api.php', RATE_LIMIT:false, RATE_LIMIT_MIN_WAIT:false, RATE_LIMIT_LAST_CALL:false, USER_AGENT:'wikipedia (https://github.com/meadowstream/wiki...
<|file_name|>holdings.py<|end_file_name|><|fim▁begin|>from libraries import JSONDictionary holdingsData = { 'defense': { 'superiorCastle': 50, 'castle': 40, 'smallCastle': 30, 'hall': 20, 'tower': 10 }, 'influence': { 'firstBorn': 20, 'secondBorn': 10...
influenceTotal -= influenceDict['secondBorn']
<|file_name|>tests.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import unittest import slopos class TestTagger(unittest.TestCase): def setUp(self): slopos.load_from_path("slopos/sl-tagger.pickle") def testSentenceTagging(self): tagged = slopo...
if __name__ == "__main__": unittest.main()
<|file_name|>ProtocolEncoder.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2013 OpenJST Project * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the Licen...
protected Object encode(final ChannelHandlerContext ctx, final Channel channel, final Object msg) throws Exception {
<|file_name|>aliased.rs<|end_file_name|><|fim▁begin|>use backend::Backend; use expression::{Expression, NonAggregate, SelectableExpression}; use query_builder::*; use query_builder::nodes::{Identifier, InfixNode}; use query_source::*; #[derive(Debug, Clone, Copy)] pub struct Aliased<'a, Expr> { expr: Expr, ali...
} }
<|file_name|>AnimDownloadProgressButton.java<|end_file_name|><|fim▁begin|>package com.xiaochen.progressroundbutton; import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.TimeInterpolator; import android.animation.ValueAnimator; import android.annotation.TargetApi; import and...
private void initAttrs(Context context, AttributeSet attrs) { TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.AnimDownloadProgressButton); int bgColor = a.getColor(R.styleable.AnimDownloadProgressButton_progressbtn_backgroud_color, Color.parseColor("#6699ff"));