prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>extension_toolbar_model_factory.cc<|end_file_name|><|fim▁begin|><|fim▁hole|>// Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/extension_toolbar_model_factory.h" #include "chrome/browser/extensions/extension_toolbar_...
// Copyright 2013 The Chromium Authors. All rights reserved.
<|file_name|>Uuid.cpp<|end_file_name|><|fim▁begin|>/** * Orthanc - A Lightweight, RESTful DICOM Store * Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics * Department, University Hospital of Liege, Belgium * * This program is free software: you can redistribute it and/or * modify it under the terms of th...
* * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages with open('readme.rst') as reader: long_description = reader.read() setup(nam...
author="russell", platforms=['linux'], url = '', author_email="necromuralist@gmail.com",
<|file_name|>Rectangle.py<|end_file_name|><|fim▁begin|>#################################################################################################### # # Patro - A Python library to make patterns for fashion design # Copyright (C) 2017 Fabrice Salvaire # # This program is free software: you can redistribute it an...
Segment2D(p2, p3), Segment2D(p3, p0), )
<|file_name|>window.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::callba...
// exits. Without this, those remaining objects try to
<|file_name|>CommonConstants.java<|end_file_name|><|fim▁begin|>/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package king.flow.common; import com.google.common.collect.ImmutableLis...
<|file_name|>LineBrushComponent.cpp<|end_file_name|><|fim▁begin|>#include "gamelib/components/editor/LineBrushComponent.hpp" #include "gamelib/components/geometry/Polygon.hpp" #include "gamelib/components/rendering/MeshRenderer.hpp" #include "gamelib/core/ecs/Entity.hpp" #include "gamelib/properties/PropComponent.hpp" ...
return _linewidth; }
<|file_name|>createorganization.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('angularPHP') .controller('CreateorganizationCtrl', function ($scope, Session, Organizations, $timeout, $location) { Session.require(); $scope.name = ""; $scope.msg = ""; $scope.error = ""; $scope.create ...
$timeout(function(){
<|file_name|>decorator_utils.py<|end_file_name|><|fim▁begin|># Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.a...
import sys def get_qualified_name(function):
<|file_name|>tasks.js<|end_file_name|><|fim▁begin|>import axios from 'axios' import pipelineApi from './api' import { addMessage } from '../../../client/utils/flash-messages' import { transformValueForAPI } from '../../../client/utils/date' function transformValuesForApi(values, oldValues = {}) { const data = { ...
? !!existingValue.length : !!existingValue if (hasExistingValue || (Array.isArray(value) ? value.length : value)) {
<|file_name|>email_nag.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ A script for automated nagging emails based on passed in queries These can be collated into several 'queries' through the use of multiple query files with a 'query_name' param set eg: 'Bugs tracked for Firefox Beta (13)' Once the bugs hav...
parser.add_argument("-e", "--email-cc-list", dest="email_cc_list", action="append", help="email addresses to include in cc when sending mail") parser.add_argument("-q", "--query", dest="queries",
<|file_name|>CT_When.go<|end_file_name|><|fim▁begin|>// Copyright 2017 Baliance. All rights reserved. // // DO NOT EDIT: generated by gooxml ECMA-376 generator // // Use of this source code is governed by the terms of the Affero GNU General // Public License version 3.0 as published by the Free Software Foundation and ...
m.LayoutNode = append(m.LayoutNode, tmp) case xml.Name{Space: "http://schemas.openxmlformats.org/drawingml/2006/diagram", Local: "choose"}: tmp := NewCT_Choose()
<|file_name|>api.go<|end_file_name|><|fim▁begin|>package ram /* ringtail 2016/1/19 All RAM apis provided */ type RamClientInterface interface { //ram user CreateUser(user UserRequest) (UserResponse, error) GetUser(userQuery UserQueryRequest) (UserResponse, error) UpdateUser(newUser UpdateUserRequest) (UserRespo...
SetPasswordPolicy(passwordPolicy PasswordPolicyRequest) (PasswordPolicyResponse, error)
<|file_name|>future.py<|end_file_name|><|fim▁begin|><|fim▁hole|> class FuturePricer(EquityPricer): def __init__(self): super(FuturePricer,self).__init__()<|fim▁end|>
from equity import EquityPricer
<|file_name|>namespace.py<|end_file_name|><|fim▁begin|><|fim▁hole|>LEXINFO = Namespace("http://www.lexinfo.net/ontology/2.0/lexinfo#") DECOMP = Namespace("http://www.w3.org/ns/lemon/decomp#") ISOCAT = Namespace("http://www.isocat.org/datcat/") LIME = Namespace("http://www.w3.org/ns/lemon/lime#")<|fim▁end|>
# -*- coding: utf-8 -*- from rdflib import Namespace ONTOLEX = Namespace("http://www.w3.org/ns/lemon/ontolex#")
<|file_name|>xmlgen.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************** * * Copyright (C) 1997-2013 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public...
t << " bodystart=\"" << cd->getStartBodyLine() << "\" bodyend=\"" << cd->getEndBodyLine() << "\""; }
<|file_name|>textdecoder.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::TextDecoder...
label: DOMString, options: &TextDecoderBinding::TextDecoderOptions, ) -> Fallible<DomRoot<TextDecoder>> { let encoding = match Encoding::for_label_no_replacement(label.as_bytes()) {
<|file_name|>test_VerticalPerspective.py<|end_file_name|><|fim▁begin|># Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """Unit tests for the :class:`iris.coord_systems.Vertical...
class Test(tests.IrisTest): def setUp(self): self.latitude_of_projection_origin = 0.0 self.longitude_of_projection_origin = 0.0
<|file_name|>_CommandFemMaterialMechanicalNonlinear.py<|end_file_name|><|fim▁begin|># *************************************************************************** # * * # * Copyright (c) 2016 - Bernd Hahnebach <bernd@bimstatik.org> * # ...
for o in FreeCAD.ActiveDocument.Objects: if hasattr(o, "Proxy") and o.Proxy is not None and o.Proxy.Type == "FemMaterialMechanicalNonlinear" and o.LinearBaseMaterial == lin_mat_obj:
<|file_name|>google_analytics.go<|end_file_name|><|fim▁begin|>package collectors import ( "bytes" "encoding/base64" "encoding/gob" "fmt" "net/http" "strconv" "time" analytics "google.golang.org/api/analytics/v3" "bosun.org/cmd/scollector/conf" "bosun.org/metadata" "bosun.org/opentsdb" "golang.org/x/net/c...
for _, row := range data.Rows { // key will always be an string of the dimension we care about. // For example, 'Chrome' would be a key for the 'browser' dimension.
<|file_name|>netutils_test.go<|end_file_name|><|fim▁begin|>package netutils import ( . "launchpad.net/gocheck" "net/http" "net/url" "testing" ) func TestUtils(t *testing.T) { TestingT(t) } type NetUtilsSuite struct{} var _ = Suite(&NetUtilsSuite{}) // Make sure parseUrl is strict enough not to accept total gar...
<|file_name|>ruleset.ts<|end_file_name|><|fim▁begin|>export class Ruleset { constructor(private movesPerTurn: number) {}<|fim▁hole|> public getMovesPerTurn = (): number => this.movesPerTurn; }<|fim▁end|>
<|file_name|>pair_lj_cut_coul_cut_omp.cpp<|end_file_name|><|fim▁begin|>/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov This ...
else eval<1,1,0>(ifrom, ito, thr); } else { if (force->newton_pair) eval<1,0,1>(ifrom, ito, thr); else eval<1,0,0>(ifrom, ito, thr);
<|file_name|>bug4337.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2012-2016 André Bargull * Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms. * * <https://github.com/anba/es6draft> */ const { assertSame } = Assert; // Annex E: Completion reform changes // https://bugs.ecmasc...
// Switch-Statement completion value assertSame(1, eval(`switch (0) { case 0: 1; case 1: }`));
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod random_player; mod legal_player; mod comp_delib_player; mod minimax_player; mod alpha_beta_player; mod mcs_player; <|fim▁hole|>pub use self::legal_player::LegalPlayer; pub use self::comp_delib_player::CompDelibPlayer; pub use self::minimax_player::MinimaxPlayer; pub ...
pub use self::random_player::RandomPlayer;
<|file_name|>post_to_twitter.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (c) 2009 Arthur Furlan <arthur.furlan@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundati...
except AttributeError: text = unicode(instance)
<|file_name|>listadapter.py<|end_file_name|><|fim▁begin|>''' ListAdapter ================= .. versionadded:: 1.5 .. warning:: This code is still experimental, and its API is subject to change in a future version. A :class:`ListAdapter` is an adapter around a python list. Selection operations are a main con...
not set, the default value is -1, meaning that no limit will be enforced. :attr:`selection_limit` is a :class:`~kivy.properties.NumericProperty` and defaults to -1 (no limit).
<|file_name|>CategorySelect.js<|end_file_name|><|fim▁begin|>import React from 'react' import { Component } from 'react' import Select from 'react-select' import './CategorySelect.scss' export default class CategorySelect extends Component { render() { const {categories, value, onChange, handleBeingTouched...
<div className='category-select-container'> <label className='category-select-label ncss-label'>Category</label> <Select
<|file_name|>vec-res-add.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/lic...
#[deriving(Show)] struct r { i:int
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate px8; extern crate sdl2; extern crate time; extern crate rand; #[macro_use] extern crate log; extern crate fern; extern crate nalgebra; use std::sync::{Arc, Mutex}; use px8::px8::math; use px8::frontend; use px8::gfx; use px8::cartridge; use px8::px8::Rust...
} fn draw(&mut self, screen: Arc<Mutex<gfx::Screen>>) -> f64 { screen.lock().unwrap().cls();
<|file_name|>promise-separate.js<|end_file_name|><|fim▁begin|>'use strict'; const Q = require('q'); function getPromise(){ let deferred = Q.defer(); //Resolve the promise after a second setTimeout(() => { deferred.resolve('final value'); }, 1000); return deferred.promise; } let promise = getPromise();...
});
<|file_name|>t.js<|end_file_name|><|fim▁begin|>/* */ define(['exports', './i18n', 'aurelia-event-aggregator', 'aurelia-templating', './utils'], function (exports, _i18n, _aureliaEventAggregator, _aureliaTemplating, _utils) { 'use strict'; exports.__esModule = true; var _createClass = (function () { function de...
setTimeout(function () {
<|file_name|>last_added_table.js<|end_file_name|><|fim▁begin|><script> $(document).ready(function() { $("#jobs_table").DataTable({ "ajax": { 'type': 'POST',<|fim▁hole|> {"data": "name"}, {"data": "last_build.status", "defaultContent": "None" }, {"data": "releas...
'url': "{{ url_for('api.jobs', query_str=query_str) }}", }, "columns": [
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate chrono; #[macro_use] extern crate hyper; extern crate hyper_native_tls; extern crate serde; extern crate serde_json; #[macro_use] extern crate serde_derive; pub mod account;<|fim▁hole|>pub mod client; pub mod instrument;<|fim▁end|>
<|file_name|>btn.js<|end_file_name|><|fim▁begin|>/** * 指示按钮 */ Banner.prototype.btn = function() { var s = this, o = this.option, $banner = this.$banner, $btn; for (var i = 0, item = ''; i < s.len; i++) { item += '<a></a>'; } $banner.append($('<div class="tb-btn"/>').append(item)); s.$btn =...
}); }, 0); if (!Util.IS_MOBILE) {
<|file_name|>test_db_types.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright 2015 Simone Campagna # # 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...
self.assertIs(StrList.db_to(None), None) self.assertEqual(StrList.db_to(["alpha", "beta", "10.3", "gamma"]), "alpha,beta,10.3,gamma")
<|file_name|>choose-file.js<|end_file_name|><|fim▁begin|>(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'objec...
} } }
<|file_name|>oauth.py<|end_file_name|><|fim▁begin|>from rauth import OAuth1Service, OAuth2Service from flask import current_app, url_for, request, redirect, session import json class OAuthSignIn(object): providers = None def __init__(self, provider_name): self.provider_name = provider_name cre...
<|file_name|>api.js<|end_file_name|><|fim▁begin|>import Telescope from 'meteor/nova:lib'; import Posts from "meteor/nova:posts"; import Comments from "meteor/nova:comments"; import Users from 'meteor/nova:users'; serveAPI = function(terms){ var posts = []; var parameters = Posts.parameters.get(terms); const po...
var comments = [];
<|file_name|>multiple-macro-registrars.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. //<|fim▁hole|>// except according to those terms. // error-pattern: multiple macro re...
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed
<|file_name|>service.py<|end_file_name|><|fim▁begin|><|fim▁hole|> # Panopticon 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 License, or # (at your option) any later version. # Panop...
# service.py is part of Panopticon.
<|file_name|>unknown_user_apply_for_membership_unit.py<|end_file_name|><|fim▁begin|>from rest_framework import generics from django.utils.translation import ugettext_lazy as _ from django.utils import timezone from aklub.models import UserProfile, AdministrativeUnit from oauth2_provider.contrib.rest_framework import...
<|file_name|>text_input.ts<|end_file_name|><|fim▁begin|>import {InputWidget, InputWidgetView} from "./input_widget" import {input} from "core/dom" import * as p from "core/properties" import {bk_input} from "styles/widgets/inputs" export class TextInputView extends InputWidgetView { model: TextInput protected i...
placeholder: [ p.String, "" ], }) } }
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/* Periodically crawl web pages and alert the user of changes * Copyright (C) 2016 Owen Stenson * * 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 ...
* Checks frequently, but there's not a lot there to mess up.
<|file_name|>presidentielcoin_sv.ts<|end_file_name|><|fim▁begin|><TS language="sv" version="2.1"> <context> <name>AcceptandPayOfferListPage</name> <message> <source>Pay Offer</source> <translation>pay erbjudande</translation> </message> <message> <source>Offer ID:</source> ...
<source>Price</source> <translation>Pris</translation>
<|file_name|>ie_history.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2011 Google Inc. All Rights Reserved. """Parser for IE index.dat files. Note that this is a very naive and incomplete implementation and should be replaced with a more intelligent one. Do not implement anything based on this cod...
logging.error("Invalid index.dat file %s", self._file) return
<|file_name|>query_result_window.py<|end_file_name|><|fim▁begin|>from PyQt4.QtGui import * class QueryResultWindow: def __init__(self): self.__create_window_widget() self.__create_ui() def __create_window_widget(self): self.__qt_widget_object = QWidget() self.__qt_widget_object.resize(800, 600) self.__qt_...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from os.path import join, isfile from os import walk import io import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command def read_file(filename): with open(filename) as fp: ...
python_requires=REQUIRES_PYTHON, url=URL, packages=find_packages(exclude=('tests',)), install_requires=REQUIRED,
<|file_name|>theme.js<|end_file_name|><|fim▁begin|>/** * Copyright 2015 IBM Corp. * * 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 * * U...
if (settings.editorTheme) { var theme = settings.editorTheme;
<|file_name|>kqueue.rs<|end_file_name|><|fim▁begin|>use std::{cmp, fmt, ptr}; use std::os::raw::c_int; use std::os::unix::io::RawFd; use std::collections::HashMap; use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT}; use std::time::Duration; use libc::{self, time_t}; use {io, Ready, PollOpt, Token}; use...
return Err(::std::io::Error::from_raw_os_error(changes[0].data as i32));
<|file_name|>ColumnNames.java<|end_file_name|><|fim▁begin|>package com.xinqihd.sns.gameserver.admin.i18n; import java.util.HashMap; public class ColumnNames { private static HashMap<String, String> map = new HashMap<String, String>(); static { map.put("profile" , "profile"); map.put("vip" , "vip"); map.put...
map.put("isHotSale" , "是否热卖"); map.put("month" , "月");
<|file_name|>taskTemplate.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file '.\taskTemplate.ui' # # Created: Thu Oct 08 16:48:34 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, ...
except AttributeError: def _fromUtf8(s): return s
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for hackathon project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_w...
application = get_wsgi_application()
<|file_name|>instr_cmovns.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode}; use ::RegType::*; use ::instruction_def::*; use ::Operand::*; use ::Reg::*; use ::RegScale::*; use ::test::run_test; #[test] fn cmovns_1() { run_test(&Instruct...
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import sys import os os.environ['DJANGO_SETTINGS_MODULE'] = 'gae.settings.settings' # =========== # Add any python 3rd party module that doesnt exist at # https://developers.google.com/appengine/docs/python/tools/libraries27 # =========== sys.path.append(os.path.join(o...
<|file_name|>ze_generated_example_galleryimageversions_client_test.go<|end_file_name|><|fim▁begin|>//go:build go1.16 // +build go1.16 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // Code generated by Microso...
<|file_name|>meta.js<|end_file_name|><|fim▁begin|>module.exports = { // meta<|fim▁hole|> /** * The banner is the comment that is placed at the top of our compiled * source files. It is first processed as a Grunt template, where the `<%=` * pairs are evaluated based on this very configuration object. ...
<|file_name|>test_agnos_updater.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import json import os import unittest import requests AGNOS_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__))) MANIFEST = os.path.join(AGNOS_DIR, "agnos.json") class TestAgnosUpdater(unittest.TestCase): def test_man...
r.raise_for_status() self.assertEqual(r.headers['Content-Type'], "application/x-xz")
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import os <|fim▁hole|>from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.bcrypt import Bcrypt from flask_sockets import Sockets app = Flask(__name__, static_folder="../static/dist", template_folder="../static") if os.environ.get('PRODUCTION'): app.conf...
from flask import Flask
<|file_name|>generic-extern-mangle.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.apac...
fn main() { assert_eq!(99u8, foo(255u8, 100u8)); assert_eq!(99u16, foo(65535u16, 100u16));
<|file_name|>basic.rs<|end_file_name|><|fim▁begin|>#[cfg(all(feature = "std_rng", feature = "default_dictionary"))] use petname::petname; use petname::Petnames; use rand::rngs::mock::StepRng; #[test] #[cfg(feature = "default_dictionary")] fn default_petnames_has_adjectives() { let petnames = Petnames::default(); ...
#[test] #[cfg(feature = "default_dictionary")]
<|file_name|>ssh_connection.py<|end_file_name|><|fim▁begin|># Copyright 2016 Isotoma Limited # # 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 #...
def check_channel_request(self, kind, chanid): return paramiko.OPEN_SUCCEEDED
<|file_name|>rpc.go<|end_file_name|><|fim▁begin|>package dcr import ( "context" "io/ioutil" "sync" "time" "github.com/Shopify/sarama" "github.com/decred/dcrd/rpc/jsonrpc/types" "github.com/decred/dcrd/rpcclient/v4" "github.com/golang/glog" ) func rpcGetWork(wg *sync.WaitGroup, client *rpcclient.Client, workC...
<|file_name|>XSSHttpServletRequestWrapper.java<|end_file_name|><|fim▁begin|>package org.butioy.framework.security; import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; ...
}
<|file_name|>human_boolean.go<|end_file_name|><|fim▁begin|>package values <|fim▁hole|>const ( YesHumanBoolean HumanBoolean = "yes" NoHumanBoolean = "no" )<|fim▁end|>
type HumanBoolean string
<|file_name|>_backported.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 # -*- coding: utf-8 -*- # # Copyright (c) 2009 Raymond Hettinger # # 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 ...
return not self == other
<|file_name|>store.js<|end_file_name|><|fim▁begin|>import lowerCaseFirst from 'lower-case-first'; import {handles} from 'marty'; import Override from 'override-decorator'; function addHandlers(ResourceStore) { const {constantMappings} = this; return class ResourceStoreWithHandlers extends ResourceStore { @Ove...
<|file_name|>MBSUPR.C<|end_file_name|><|fim▁begin|>/*** *mbsupr.c - Convert string upper case (MBCS) * * Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved. * *Purpose: * Convert string upper case (MBCS) * ****************************************************************************...
#if defined (_WIN32) int retval;
<|file_name|>authenticator.js<|end_file_name|><|fim▁begin|>// Copyright 2014 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. /** * @fileoverview An UI component to authenciate to Chrome. The component hosts * IdP web p...
<|file_name|>meg_csar_create.rs<|end_file_name|><|fim▁begin|>extern crate megam_api; extern crate rand; extern crate rustc_serialize; extern crate term_painter; extern crate yaml_rust; extern crate toml; use std::path::Path; use util::parse_csar::CConfig; use self::term_painter::ToStyle; use self::term_painter::Color...
pub file: String,
<|file_name|>FindDomain.ts<|end_file_name|><|fim▁begin|>// import { Domain } from '../Domain'; // import { GetDomain } from './GetDomain'; // // /** // * Find domain from object or type // */ // export function FindDomain(target: Function | object): Domain | undefined { // let prototype; // if (typeof target === ...
// prototype = target.prototype; // } else {
<|file_name|>basic_types.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 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, eithe...
// along with Parity. If not, see <http://www.gnu.org/licenses/>. //! Ethcore basic typenames.
<|file_name|>ObjectFactory.java<|end_file_name|><|fim▁begin|>package eu.europa.echa.iuclid6.namespaces.flexible_record_estimatedquantities._6; import java.math.BigDecimal; import java.math.BigInteger; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlElementDecl; import javax.xml.bind.annotation.X...
* */ public FLEXIBLERECORDEstimatedQuantities.DataProtection.Legislation createFLEXIBLERECORDEstimatedQuantitiesDataProtectionLegislation() { return new FLEXIBLERECORDEstimatedQuantities.DataProtection.Legislation();
<|file_name|>BadgeUtils.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2016-2021 David Rubio Escares / Kodehawa * * Mantaro 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...
avatar = ImageIO.read(new ByteArrayInputStream(avatarBytes)); badge = ImageIO.read(new ByteArrayInputStream(badgeBytes)); } catch (IOException impossible) { throw new AssertionError(impossible);
<|file_name|>inotify.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com> # Copyright 2012 Google, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lic...
inotify(7)-based event emitter.
<|file_name|>event_client_impl.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 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 "ash/wm/event_client_impl.h" #include "ash/session/session_state_delegate.h"<...
<|file_name|>delete_task_parameters.go<|end_file_name|><|fim▁begin|>package tasks // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "net/http" "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "git...
o.ID = value
<|file_name|>archive.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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...
args: &str, cwd: Option<&Path>, paths: &[&Path]) -> ProcessOutput {
<|file_name|>FiscalService.js<|end_file_name|><|fim▁begin|>(function () { 'use strict'; angular .module('tierraDeColoresApp') .service('fiscalService', fiscalService); fiscalService.$inject = ['$q', '$http', 'cookieService', 'BaseURL', 'toaster', '$rootScope']; function fiscalSe...
fs.unlink('FILE.ans', function (err) {
<|file_name|>translation.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE TS> <TS> <context> <name>design/eziog/comment/view</name> <message> <source>Avatar</source> <translation></translation> </message> <message> <source>Edit</source> <translat...
<name>design/eziog/edit/comment</name>
<|file_name|>window.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/. */ //! A windowing implementation using glutin. use compositing:...
fn set_favicon(&self, _: Url) {
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use std::str::FromStr; use std::collections::HashMap; use std::ops::{BitAnd, BitOr, Shl, Shr, Not}; const DATA: &'static str = include_str!("input.txt"); pub fn main() -> Vec<String> { let s1 = run_circuit(DATA, "a").unwrap(); let s2 = part2(DATA, "a", "b", 956...
} }
<|file_name|>SelfDefendingRule.ts<|end_file_name|><|fim▁begin|>import { TOptionsNormalizerRule } from '../../types/options/TOptionsNormalizerRule'; import { IOptions } from '../../interfaces/options/IOptions'; /** * @param {IOptions} options * @returns {IOptions} */ export const SelfDefendingRule: TOptionsNormaliz...
selfDefending: true }; }
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>var gulp = require('gulp'); var to5 = require('gulp-6to5'); var concat = require('gulp-concat'); var order = require('gulp-order'); var watch = require('gulp-watch'); var connect = require('gulp-connect'); gulp.task('6to5', function () { return gulp.src('src/js/*...
<|file_name|>process.cc<|end_file_name|><|fim▁begin|>// Copyright 2006-2009 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LIC...
} // namespace omaha
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate rand;<|fim▁hole|>use std::cmp::Ordering; fn main() { let secret_number: u32 = rand::thread_rng().gen_range(1, 101); //println!("The secret number is {}", secret_number); println!("Guess the number!"); loop { println!("Please ente...
use std::io; use rand::Rng;
<|file_name|>UDP.py<|end_file_name|><|fim▁begin|># UDP code taken from < https://pymotw.com/2/socket/udp.html > import socket, time, fcntl, struct def udpBeacon(): # Create a UDP socket sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) sock...
try: # Send data print('sending broadcast: "%s"' % message)
<|file_name|>facebook.js<|end_file_name|><|fim▁begin|>'use strict'; module.exports = config => [{ name: 'facebook-app_id',<|fim▁hole|> when: require('./when')('facebook', config) }, { name: 'facebook_api-api_version', message: 'version of facebook api', store: true, when: require('./when')('facebook_api', c...
message: 'app id of facebook', store: true,
<|file_name|>PortletMoveStatisticsController.java<|end_file_name|><|fim▁begin|>/** * Licensed to Jasig under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. * Jasig licenses this file to you under the Apache Lic...
<|file_name|>odometry.cpp<|end_file_name|><|fim▁begin|>/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2013, PAL Robotics, S.L. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * m...
, heading_(0.0) , linearX_(0.0) , linearY_(0.0) , angular_(0.0)
<|file_name|>01 Environment Setup.js<|end_file_name|><|fim▁begin|>scaffolder: https://github.com/coryhouse/react-slingshot ^we wont use this though well use: https://github.com/coryhouse/pluralsight-redux-starter Our dev environment: 1. Automated Testign 2. Linting 3. Minification 4. Bundling 5. JSXCompilation 6. ES6...
its a babel preset that wraps up a number of other libraries and settings in a single prest It works by wrapping your components in a custom proxy using Babel.
<|file_name|>NetworkManagerMixin.java<|end_file_name|><|fim▁begin|>/* * This file is part of Sponge, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy<|...
* of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
<|file_name|>Concator.java<|end_file_name|><|fim▁begin|>package railo.runtime.search.lucene2.query; import railo.commons.lang.StringUtil; public final class Concator implements Op {<|fim▁hole|> private Op left; private Op right; public Concator(Op left,Op right) { this.left=left; this.right=right; } @Over...
<|file_name|>rhnAuthPAM.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2008--2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS ...
# # Red Hat trademarks are not licensed under GPLv2. No permission is
<|file_name|>bitv.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/licen...
}
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>use std::path::Path; use std::sync::{Arc, Mutex}; use std::{fs::create_dir_all, path::PathBuf}; use anyhow::{bail, Result}; use crossbeam_channel::{unbounded, Sender}; use log::{error, warn}; use pueue_lib::network::certificate::create_certificates; use pueue_lib::netw...
orig_hook(panic_info);
<|file_name|>errors.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2020 Google LLC All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. use { proc_macro2::{Span, TokenStream}, quote::ToTokens, std::cell::RefCell, }; /// A type for c...
<|file_name|>slot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- class Slot(object): """ To use comb, you should create a python module file. we named *slot*. A legal slot must be named 'Slot' in your module file and it must be at least contain four method: * `initialize` initial resour...
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # # # copyright Kevin Walchko # # Basically a rostopic from __future__ import print_function import argparse import time # from pygecko import TopicSub from pygecko.transport import zmqTCP, GeckoCore from pygecko.multiprocessing import GeckoPy f...
# # shutdown the processes # p.join(0.1)
<|file_name|>factory.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Gfx-rs Developers. // // 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/LICE...