prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>PeopleYouMayKnow.java<|end_file_name|><|fim▁begin|>package com.linkedin.automation; import java.util.List; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; impor...
driver.get("http://www.linkedin.com/mynetwork/"); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); int count = 0;
<|file_name|>WorkflowReplacementComponent.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react' import { WorkflowReplacementModel, WorkflowReplacementItemEmbedded, CaseActivityEntity, WorkflowOperation, NewTasksEmbedded } from '../Signum.Entities.Workflow' import { TypeContext } from '@framework/Lines' imp...
<|file_name|>constraints.py<|end_file_name|><|fim▁begin|>from math import sqrt import gtk from gettext import gettext as _ from ase.gui.widgets import pack, Help class Constraints(gtk.Window): def __init__(self, gui): gtk.Window.__init__(self) self.set_title(_('Constraints')) vbox = gtk....
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from __future__ import absolute_import import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "service.settings") from django.core.management import execute_from_command_line<|fim▁hole|> exec...
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bmport settings # -*- coding: utf-8 -*- from django import http from django.shortcuts import render from main import models from main import myforms from main import cfg from main import tools from main import data_render from main import database_manager from...
def err(request):
<|file_name|>render.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from cStringIO import StringIO from amoco.logger import Log logger = Log(__name__) import re try: from pygments.token import Token from pygments.style import Style from pygments.lexer import RegexLexer from pygments.formatte...
Token.Constant: '#f30', #Token.Prefix: '#fff', Token.Mnemonic: 'bold',
<|file_name|>path.py<|end_file_name|><|fim▁begin|># -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ------------------...
make_dirs(result)
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (C) 2013 LiuLang <gsushzhsosgsu@gmail.com> # Use of this source code is governed by GPLv3 license that can be found # in the LICENSE file. from distutils.core import setup from distutils.core import Command from distutils.command.c...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|># Copyright 2014 Open vStorage NV # # 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...
<|file_name|>attendance-week-dashboard.component.spec.ts<|end_file_name|><|fim▁begin|>import { ComponentFixture, TestBed, waitForAsync } from "@angular/core/testing"; import { AttendanceWeekDashboardComponent } from "./attendance-week-dashboard.component"; import { RouterTestingModule } from "@angular/router/testing";...
{ provide: AttendanceService, useValue: mockAttendanceService }, ], }).compileComponents();
<|file_name|>test_rerun.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- from mock import Mock, patch from psutil import AccessDenied, TimeoutExpired from thefuck.output_readers import rerun class TestRerun(object): def setup_method(self, test_method): self.patcher = patch('thefuck.output_reade...
assert not rerun._wait_output(Mock(), False) kill_process_mock.assert_called_once_with(self.proc_mock) @patch('thefuck.output_readers.rerun._kill_process')
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! The runtime for writing applications for [Ice](https://github.com/losfair/IceCore), //! an efficient, reliable and asynchronous platform for building modern backend applications //! in WebAssembly. //! //! At a high level, `ia` (which stands for "Ice App") provides a...
//! fn handle_connection(incoming: TcpConnection) -> IoResult<()> { //! #[async]
<|file_name|>smoke.rs<|end_file_name|><|fim▁begin|>use futures::StreamExt; use opentelemetry::global::shutdown_tracer_provider; use opentelemetry::trace::{Span, SpanKind, Tracer}; use opentelemetry_otlp::WithExportConfig; use opentelemetry_proto::tonic::collector::trace::v1::{ trace_service_server::{TraceService, T...
#[tokio::test(flavor = "multi_thread")]
<|file_name|>expr-if-box.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...
assert_eq!(rs, ~"happy"); } pub fn main() { test_box(); test_str(); }
<|file_name|>bench.rs<|end_file_name|><|fim▁begin|>#![feature(test)] extern crate lib; extern crate test; use lib::find_similar; use test::Bencher; #[bench] fn measure_find_similar_usr_bin(b: &mut Bencher) { let files = (0..128).map(|_| { (0..128).map(|_| 'a' as char).collect()<|fim▁hole|> b.iter(...
}).collect();
<|file_name|>klondike.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2018 Erik Nordstrøm <erik@nordstroem.no> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appea...
impl_cardstack!(FoundationSlot, FoundationSlotArray, 13);
<|file_name|>board-size.js<|end_file_name|><|fim▁begin|>'use strict' const { lt, inRange } = require('lodash') module.exports = boardSize => { if (lt(boardSize, 70)) return '<70l' if (inRange(boardSize, 70, 80)) return '70l to 80l' if (inRange(boardSize, 80, 90)) return '80l to 90l' if (inRange(boardSize, 90,...
if (inRange(boardSize, 120, 130)) return '120l to 130l' return '>130l' }
<|file_name|>env.py<|end_file_name|><|fim▁begin|># -*- mode: python; coding: utf-8 -*- # Copyright 2016 the HERA Collaboration # Licensed under the 2-clause BSD License. """This script is some boilerplate needed by Alembic to do its fancy database migration stuff. """ # A hack so that we can get the librarian_server...
""" url = app.config['SQLALCHEMY_DATABASE_URI'] context.configure(
<|file_name|>03_closures.go<|end_file_name|><|fim▁begin|>package main import "fmt" // returns a function that returns an int func fibonacci() func() int { old_fib :=-1 fib := 1 return func() int {<|fim▁hole|>} func main() { f := fibonacci() for i := 0; i < 10; i++ { fmt.Println(f()) } }<|fim▁end|>
fib, old_fib = fib + old_fib, fib return fib }
<|file_name|>kube2sky.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 The Kubernetes 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.org/license...
func watchPods(kubeClient *kclient.Client, ks *kube2sky) kcache.Store {
<|file_name|>test_functional.py<|end_file_name|><|fim▁begin|>import os import json import six from ddt import ddt, data, file_data, is_hash_randomized from nose.tools import assert_equal, assert_is_not_none, assert_raises @ddt class Dummy(object): """ Dummy class to test the data decorator on """ @...
created_tests = set([ "test_something_again_{0}_{1}".format(index + 1, name) for index, name in enumerate(test_data.keys())
<|file_name|>GradeBookEntryMeta.java<|end_file_name|><|fim▁begin|>/* * Copyright 2012-2013 inBloom, Inc. and its affiliates. * * 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://...
<|file_name|>next.rs<|end_file_name|><|fim▁begin|>#![feature(core, unboxed_closures)] extern crate core; #[cfg(test)] mod tests { use core::iter::Iterator; use core::iter::FlatMap; struct A<T> { begin: T, end: T } macro_rules! Iterator_impl { ($T:ty) => { impl Iterator for A<$T> { type ...
assert_eq!(flat_map.next(), None::<Item>); } }
<|file_name|>view_utils.py<|end_file_name|><|fim▁begin|>class AjaxTemplateMixin(object): ajax_template_name = '' template_name = '' def dispatch(self, request, *args, **kwargs): if not hasattr(self, 'ajax_template_name'): split = self.template_name.split('.html') split[-1] =...
<|file_name|>types.rs<|end_file_name|><|fim▁begin|>use std::cell::RefCell; use std::collections::{HashMap, VecDeque}; use std::ops::Deref; use std::rc::Rc; use crate::ast::expressions; use crate::interpreter::environment; use crate::utils; pub enum Type { Nil, Boolean(bool),<|fim▁hole|> Reference(Rc<RefCel...
Number(f64), String(String), /// Reference to an existing value
<|file_name|>framework.ts<|end_file_name|><|fim▁begin|>import { templates } from "./templates"; import { tools } from "./tools"; import { DB, STORE, DBVERSION, OptionTypes, m } from "./schema"; import { store } from "./storage"; import { controls } from "./controls"; import { routing } from "./routing"; import { web } ...
<|file_name|>run.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright Contributors to the Open Shading Language project. # SPDX-License-Identifier: BSD-3-Clause # https://github.com/AcademySoftwareFoundation/OpenShadingLanguage command = testshade("-g 128 128 -od uint8 -o Cout out.tif test")<|fim▁hole|><...
outputs = [ "out.txt", "out.tif" ]
<|file_name|>ParamRoute.java<|end_file_name|><|fim▁begin|>package org.giwi.geotracker.routes.priv; import io.vertx.core.Vertx; import io.vertx.ext.web.Router; import io.vertx.ext.web.RoutingContext; import org.giwi.geotracker.annotation.VertxRoute; import org.giwi.geotracker.beans.AuthUtils; import org.giwi.geotracker...
<|file_name|>group.py<|end_file_name|><|fim▁begin|>"""Describe group states.""" from homeassistant.components.group import GroupIntegrationRegistry from homeassistant.const import STATE_OK, STATE_PROBLEM from homeassistant.core import HomeAssistant, callback @callback def async_describe_on_off_states( hass: Hom...
"""Describe group on off states.""" registry.on_off_states({STATE_PROBLEM}, STATE_OK)
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for beeper 1.1 // Project: https://github.com/sindresorhus/beeper#readme // Definitions by: BendingBender <https://github.com/BendingBender> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped <|fim▁hole|>declare function beeper(mel...
export = beeper; declare function beeper(count?: number, cb?: () => void): void;
<|file_name|>ember-validation-error-list.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export { default } from 'ember-validation/components/ember-validation-error-list';
<|file_name|>column.test.cpp<|end_file_name|><|fim▁begin|>#include <string> #include <bandit/bandit.h> #include "db.test.h" #include "record.h" #include "sqlite/column.h" using namespace bandit; using namespace std; using namespace coda::db; using namespace snowhouse; column get_user_column(const string &name) { ...
u.set("dval", 123.321); int *value = new int;
<|file_name|>test_orm.py<|end_file_name|><|fim▁begin|>from collections import defaultdict from openerp.tools import mute_logger from openerp.tests import common UID = common.ADMIN_USER_ID class TestORM(common.TransactionCase): """ test special behaviors of ORM CRUD functions TODO: use real Exception...
self.assertEqual(sorted_by_id(results), sorted_by_id([ {'id': ids[0], 'name': 'foo'},
<|file_name|>inversedocumentfrequencyvectorcreator.py<|end_file_name|><|fim▁begin|>import math from ..df import DocumentFrequencyVectorCreator from . import InverseDocumentFrequencyVector class InverseDocumentFrequencyVectorCreator(DocumentFrequencyVectorCreator): """Creates inverse-document-frequency vectors ...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![cfg_attr(feature="clippy", feature(plugin))] #![cfg_attr(feature="clippy", plugin(clippy))] <|fim▁hole|><|fim▁end|>
pub mod second;
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------...
fd.read(), re.MULTILINE).group(1) if not version: raise RuntimeError('Cannot find version information')
<|file_name|>ocsp.go<|end_file_name|><|fim▁begin|>// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package ocsp parses OCSP responses as specified in RFC 2560. OCSP responses // are signed messages attestin...
func (r ResponseStatus) String() string { switch r { case Success: return "success"
<|file_name|>Event.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 10/13/15 smokey <sparkoneits420@live.com> * <p> * 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 3 of...
* <p> * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
<|file_name|>WeatherActivity.java<|end_file_name|><|fim▁begin|>package com.coolweather.android; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; import android.os.Build; import android.preference.PreferenceManager; import android.support.v4.view.GravityCompat; imp...
String weatherId = getIntent().getStringExtra("weather_id");
<|file_name|>models.py<|end_file_name|><|fim▁begin|>""" KAIST 단일인증서비스 모델. """ from django.db import models from django.utils.translation import ugettext_lazy as _ class PortalInfoManager(models.Manager): """ :class:`PortalInfo` 에 대한 커스텀 매니저. KAIST 단일인증서비스를 통해 최초 로그인 한 사용자는 자신의 정보를 총학생회에 제공하는 것에 동의해야...
<|file_name|>firstRun.js<|end_file_name|><|fim▁begin|>{ document.getElementsByClassName('close')[0].addEventListener('click', function() { window.close();<|fim▁hole|><|fim▁end|>
}); }
<|file_name|>lint-forbid-cmdline.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...
// except according to those terms. // compile-flags: -F experimental
<|file_name|>test_fail_valid.rs<|end_file_name|><|fim▁begin|>#![feature(plugin, custom_attribute)] #![plugin(rustproof)]<|fim▁hole|> // Used to test the tester // Condition is invalid, and function name indicates "valid", so should be detected as a mismatch #[condition(pre="x: i32 <= i32::MAX - 4i32", post="return: i3...
#![allow(dead_code)] #![allow(unused_attributes)] fn main() { }
<|file_name|>mapObjIndexed.js<|end_file_name|><|fim▁begin|>var assert = require('assert'); var R = require('..'); describe('mapObjIndexed', function() { var times2 = function(x) {return x * 2;}; var addIndexed = function(x, key) {return x + key;}; var squareVowels = function(x, key) { var vowels = ['a', 'e...
<|file_name|>cohort_analysis_function.py<|end_file_name|><|fim▁begin|>import pandas as pd import numpy as np from dateutil.relativedelta import relativedelta #### Utilities def get_first_visit_date(data_patient): ''' Determines the first visit for a given patient''' #IDEA Could be parallelized in Dask dat...
reference_date = pd.to_datetime(reference_date) if type(date_analysis) is str: date_analysis = pd.to_datetime(date_analysis) report_data = subset_analysis_data(data, date_analysis)
<|file_name|>ssr_params.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ############################################################################ # # MODULE: ssr_params.py # AUTHOR: Collin Bode, UC Berkeley # # PURPOSE: Consolidate parameters for all SSR scripts and to provide some ...
cansource = '' # If you do not have a canopy raster, leave this empty '' and ssr_lidar.py will create it automatically.
<|file_name|>webpack.ts<|end_file_name|><|fim▁begin|>import { HMR_PATH } from '../config/constants'; function webpackMiddleware(): object[] { const middleware: object[] = []; if (BalmJS.webpackCompiler) { middleware.push( require('webpack-dev-middleware')( BalmJS.webpackCompiler, Object....
publicPath: BalmJS.file.publicUrlOrPath, stats: false })
<|file_name|>functional_load.py<|end_file_name|><|fim▁begin|>from collections import defaultdict from math import log2 as log from gui.transcriptions import STANDARD_SYMBOLS from imports import (QDialog, QHBoxLayout, QVBoxLayout, QGroupBox, QRadioButton, QButtonGroup, QPushButton, QStackedWidget, QW...
slot = 3 elif duction == 'Index/Middle':
<|file_name|>extract.ts<|end_file_name|><|fim▁begin|>import * as fs from 'fs'; import { Storage, RowFunction } from './database/Storage'; import { RowExtractor } from './extractors/RowExtractor'; import { parseISOLocal } from './helpers/DateHelper'; const args = process.argv.slice(2); if (args.length !== 3) { console...
const storage = new Storage(false); const extractor = new RowExtractor('./reports/custom/'); extractor.setReader((callback: RowFunction, endCb: Function) => storage.readInterval(startDate, endDate, false, callback, endCb)); extractor.setColumnNames('Timestamp UTC', 'Timestamp', 'Value', 'Source', 'Measurement', 'Unit')...
<|file_name|>hdf.py<|end_file_name|><|fim▁begin|>"""Functions for accessing HDF5 files.""" from __future__ import division from __future__ import print_function import re import h5py as h5 import numpy as np import six from six.moves import range from ..utils import filter_regex, to_list def _ls(item, recursive=F...
return keys
<|file_name|>backendcontentiframe.js<|end_file_name|><|fim▁begin|>/** * This file is part of the TYPO3 CMS project. * * It is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License, either version 2 * of the License, or any later version. * * For the full copy...
TYPO3.backendContentIframePanel = Ext.extend(TYPO3.iframePanel ,{ setUrl: function(source) {
<|file_name|>origin.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 std::sync::Arc; use url::{Host, Url}; use url::Origin as U...
pub fn new(url: &Url) -> Origin {
<|file_name|>geographichierarchies.go<|end_file_name|><|fim▁begin|>package trafficmanager // 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 Microsoft (R) AutoRest Code Generator. // Change...
"github.com/Azure/go-autorest/tracing" "net/http" )
<|file_name|>sized-borrowed-pointer.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// // 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...
// 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.
<|file_name|>explicit_instantiation.cc<|end_file_name|><|fim▁begin|>// { dg-options "-std=gnu++11" } // { dg-do compile } // 2007-05-02 Benjamin Kosnik <bkoz@redhat.com> // Copyright (C) 2007-2014 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you...
// NB: This file is for testing type_traits with NO OTHER INCLUDES. #include <type_traits>
<|file_name|>module.js<|end_file_name|><|fim▁begin|>import { history } from 'byebye'; import React from 'react'; import AltContainer from 'alt-container'; import { MANUAL_LOGOUT } from 'app-constants'; import { loginIfAuthorized as autoFacebookLogin } from 'managers/facebook'; import Analytics from 'instances/analytics...
} throw err; });
<|file_name|>udpserver.cpp<|end_file_name|><|fim▁begin|>#include <stdio.h> #include <unistd.h> #include <sys/socket.h> #include <sys/types.h> #include <arpa/inet.h> #include <netinet/in.h> #include <string.h> #define BUFFER_SIZE 1024 int main() { int socketfd; int port = 2047; struct sockaddr_in server_i...
return -2;
<|file_name|>example1.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python import yaml def main(): #f = open("data.yaml", "r") f = open("data2.yaml", "r") yd = yaml.load(f) #print "YAML Data: %s" % str(yd) for key in yd: print "%s" % key print "Type: %s" % str(type(yd[key])) ...
def yaml_test(): #f = open("data.yaml", "r")
<|file_name|>ast.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 Pierre Talbot (IRCAM) // 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 ...
}
<|file_name|>WebDriverUtils.java<|end_file_name|><|fim▁begin|>package com.epam.jdi.uitests.mobile.appium.driver; /* * Copyright 2004-2016 EPAM Systems * * This file is part of JDI project. * * JDI is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License...
import static com.epam.commons.TryCatchUtil.tryGetResult;
<|file_name|>badges.js<|end_file_name|><|fim▁begin|>class AchievementEvt { constructor(subType, payload) { this.type = 'achievements'; this.subType = subType; this.payload = payload; } }; /** * generate PageVisitEvt * @param {string} * @returns {AchievementEvt} */ export class PageV...
super('page-visited', pageName); } };
<|file_name|>api.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -- Content-Encoding: UTF-8 -- """ Cohorte Debug REST API :authors: Bassem Debbabi :copyright: Copyright 2015, isandlaTech :license: Apache Software License 2.0 """ # iPOPO decorators from pelix.ipopo.decorators import ComponentFactory, Provides, Pr...
response.send_content(status, data, "text/plain") def bad_request(self, request, response, in_data, out_data):
<|file_name|>gen_firewall.py<|end_file_name|><|fim▁begin|>template = """# Generated on {{dt}} *filter :INPUT DROP :FORWARD ACCEPT :OUTPUT ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -i eth1 -m state --state RELATED,...
<|file_name|>EndocastExtractor.hpp<|end_file_name|><|fim▁begin|>#ifndef ENDOCAST_EXTRACTOR_HPP #define ENDOCAST_EXTRACTOR_HPP 1 #include <mi/VolumeData.hpp> <|fim▁hole|>public: EndocastExtractor ( void ) ; ~EndocastExtractor ( void ) ; bool extract ( mi::VolumeData<float>& distData, mi::V...
class EndocastExtractor { private:
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from supervisorclusterctl import __version__, __author__, __programm_name__, __programm_description__ import os import sys try: from setuptools import setup, find_packages except ImportError: print "supervisorclust...
<|file_name|>application.js<|end_file_name|><|fim▁begin|>// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plu...
function initializeDatePicker() { $('input.date_picker').datepicker({ autoclose: true, todayHighlight: true,
<|file_name|>0006_auto__add_field_reference_year.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Reference.year' ...
'author': ('django.db.models.fields.CharField', [], {'max_length': '512'}),
<|file_name|>taskwork.go<|end_file_name|><|fim▁begin|>// // Task worker. // Connects PULL socket to tcp://localhost:5557<|fim▁hole|>// Connects PUSH socket to tcp://localhost:5558 // Sends results to sink via that socket // package main import ( zmq "github.com/pebbe/zmq3" "fmt" "strconv" "time" ) func main...
// Collects workloads from ventilator via that socket
<|file_name|>DevSerial.cpp<|end_file_name|><|fim▁begin|>/* $Id: DevSerial.cpp 56292 2015-06-09 14:20:46Z vboxsync $ */ /** @file * DevSerial - 16550A UART emulation. * (taken from hw/serial.c 2010/05/15 with modifications) */ /* * Copyright (C) 2006-2015 Oracle Corporation * * This file is part of VirtualBox Ope...
)) { AssertMsgFailed(("serialConstruct Invalid configuration values\n")); return VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES;
<|file_name|>sautils.py<|end_file_name|><|fim▁begin|># This file is part of Buildbot. Buildbot 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 2. # # This program is distributed in the hope that it wi...
#
<|file_name|>style-utils.js<|end_file_name|><|fim▁begin|>import {Map} from 'immutable'; export function getInteractiveLayerIds(mapStyle) { let interactiveLayerIds = []; if (Map.isMap(mapStyle) && mapStyle.has('layers')) {<|fim▁hole|> .toJS(); } else if (Array.isArray(mapStyle.layers)) { interactiveLaye...
interactiveLayerIds = mapStyle.get('layers') .filter(l => l.get('interactive')) .map(l => l.get('id'))
<|file_name|>video.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright(C) 2010 Roger Philibert # # 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, version 3 of the License. # # T...
return video
<|file_name|>mock_camera.py<|end_file_name|><|fim▁begin|><|fim▁hole|> def pc_filter(topic, datatype, md5sum, msg_def, header): if datatype == 'sensor_msgs/PointCloud2': return True return False class MockCamera(object): """A MockCamera reads saved point clouds. """ def __init__(self): ...
import rosbag from sensor_msgs.msg import PointCloud2
<|file_name|>set.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LI...
/// /// # Examples
<|file_name|>pass.cpp<|end_file_name|><|fim▁begin|>#include <stdio.h> #include <stdlib.h> #include <string.h> int main(){ char text[40], text2[40]; printf("necesito una buena palabra: "); gets(text); printf("voy a necesitar otra palabra, si es la misma sorpresa... \n"); gets(text2); if (strcmp(text, text2) ==0...
<|file_name|>render.rs<|end_file_name|><|fim▁begin|>// Copyright: Ankitects Pty Ltd and contributors // License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html use super::{CardTemplate, NoteType, NoteTypeKind}; use crate::{ card::{Card, CardID}, collection::Collection, err::{AnkiError,...
) -> Result<Card> { // fetch existing card if let Some(ord) = template_ord {
<|file_name|>models.py<|end_file_name|><|fim▁begin|>import logging from django.conf import settings from django.db import models from mkt.site.mail import send_mail from mkt.site.models import ModelBase from mkt.users.models import UserProfile from mkt.webapps.models import Webapp from mkt.websites.models import Webs...
report.website = obj
<|file_name|>linalg.py<|end_file_name|><|fim▁begin|>"""Linear Algebra Helper Routines.""" from warnings import warn import numpy as np from scipy import sparse from scipy.sparse.linalg import aslinearoperator from scipy.linalg import lapack, get_blas_funcs, eig, svd from .params import set_tol def norm(x, pnorm='2...
<|file_name|>test_container_registry_client.py<|end_file_name|><|fim▁begin|># coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ from datetime import datetime from azure.core import credentials import pytest...
for repo in repositories: count += 1
<|file_name|>home.js<|end_file_name|><|fim▁begin|><|fim▁hole|> // Hide GNU-cat $('#loading').hide(); // jQuery cycle plugin usage for screenshot slideshow $('.slideshow').cycle({ fx: 'fade', speed: 1000, timeout: 6000, }); // Show GNU-cat when the submit button ...
$(document).ready(function() {
<|file_name|>synthesizer.py<|end_file_name|><|fim▁begin|>import logging import sys import traceback from collections import namedtuple import numpy as np import pandas as pd from scipy.stats import chisquare from . import categorizer as cat from . import draw from .ipf.ipf import calculate_constraints from .ipu.ipu i...
'FitQuality', ('people_chisq', 'people_p')) BlockGroupID = namedtuple(
<|file_name|>controller.go<|end_file_name|><|fim▁begin|>package controller import ( "fmt" "github.com/deesims/ps_web_0/db" "github.com/deesims/ps_web_0/models" "github.com/deesims/ps_web_0/view" "gopkg.in/nullbio/null.v6" "io" "log" "net/http" "os" "time" "github.com/gorilla/mux" ) type ResumeReviewView s...
user := db.FindUserFromUsername(currentUser.Username)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""""" from __future__ import annotations from flask import Flask from .criterion import TagCriterion from .extension import TagsExtension __all__ = ["TagsExtension", "TagCriterion"] <|fim▁hole|> def register_plugin(app: Flask): TagsExtension(app)<|fim▁end|>
<|file_name|>scene_ops.py<|end_file_name|><|fim▁begin|># ##### BEGIN GPL LICENSE BLOCK ##### # # JewelCraft jewelry design toolkit for Blender. # Copyright (C) 2015-2019 Mikhail Rachinskiy # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licens...
class SCENE_OT_jewelcraft_scene_units_set(Operator): bl_label = "Set Units" bl_description = "Set optimal unit settings for jewelry modelling" bl_idname = "scene.jewelcraft_scene_units_set"
<|file_name|>SaxParser.ts<|end_file_name|><|fim▁begin|>/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ */ import Schema ...
if (attrValue === '{$uid}') { attrValue = 'mce_' + idCount++; }
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Pontoon documentation build configuration file, created by # sphinx-quickstart on Thu Jun 4 21:51:51 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration valu...
# Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
<|file_name|>misc.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2013-2016) # # This file is part of GWSumm # # GWSumm 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, e...
url = url.split('/'); url.pop(); window.location = url.join('/'); }""", type="text/javascript")
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (c) 2016-2017 Ircam # Copyright (c) 2016-2017 Guillaume Pellerin # Copyright (c) 2016-2017 Emilie Zawadzki # This file is part of mezzanine-organization. # This program is free software: you can redistribute it and/or modify #...
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details.
<|file_name|>lockss-manifest-validate.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python """ This is a tool to verify checksum hashes produced by LOCKSS against hashes provided by a BagIt manifest document. Invoke with -h for usage help. Written by Stephen Eisenhauer At University of North Texas Libraries On 2013-04-...
args = parser.parse_args() hascus_path = os.path.abspath(args.HashCUS)
<|file_name|>BuiltinConstructor.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) André Bargull * Alle Rechte vorbehalten / All Rights Reserved. Use is subject to license terms. * * <https://github.com/anba/es6draft> */ package com.github.anba.es6draft.runtime.types.builtins; import java.lang.invoke.MethodHa...
try { Method method = getClass().getDeclaredMethod("construct", ExecutionContext.class, Constructor.class,
<|file_name|>AddAppReportRequest.java<|end_file_name|><|fim▁begin|>package apache.org.google; import android.content.Context; import android.util.Log; import cs.entity.AdBasicInfo; import cs.entity.AdStatus; import cs.gson.Gson; import cs.network.configs.Config; import cs.network.request.PageAbleRequest; impo...
Log.i("msgg", "---->AdStatus.展示"); } if(i==1)
<|file_name|>SortRegisterComparator.java<|end_file_name|><|fim▁begin|>/** * * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. * * 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 F...
<|file_name|>AppleReporter.py<|end_file_name|><|fim▁begin|>from subprocess import * import gzip import string import os import time import ApplePythonReporter class ApplePythonReport: vendorId = YOUR_VENDOR_ID userId = 'YOUR_ITUNES_CONNECT_ACCOUNT_MAIL' password = 'ITUNES_CONNECT_PASSWORD' account = 'A...
<|file_name|>topic_notification.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from django.conf import settings from django.utils import timezone from django.db import IntegrityErro...
<|file_name|>test_filediff.py<|end_file_name|><|fim▁begin|>"""Unit tests for reviewboard.diffviewer.models.filediff.""" from itertools import chain from reviewboard.diffviewer.models import DiffSet, FileDiff from reviewboard.diffviewer.tests.test_diffutils import \ BaseFileDiffAncestorTests from reviewboard.testi...
if minimal: ids = minimal_ids
<|file_name|>CoachMarkPixelInfo.java<|end_file_name|><|fim▁begin|>package com.myntra.coachmarks.builder; import android.graphics.Rect; import android.os.Parcelable; import com.google.auto.value.AutoValue; @AutoValue public abstract class CoachMarkPixelInfo implements Parcelable { public static CoachMarkPixelInf...
} }
<|file_name|>assembler.js<|end_file_name|><|fim▁begin|>/** * External dependencies */<|fim▁hole|>import camelCase from 'lodash/string/camelCase'; import merge from 'lodash/object/merge'; /** * Internal dependencies */ import i18n from 'lib/mixins/i18n'; import sortProducts from 'lib/products-values/sort'; functio...
<|file_name|>no_method_suggested_traits.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...
fn method3(&self) {}
<|file_name|>models.py<|end_file_name|><|fim▁begin|># Case Conductor is a Test Case Management system. # Copyright (C) 2011 uTest Inc. # # This file is part of Case Conductor. # # Case Conductor is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published...
entries = fields.List(fields.Object(CodeValue))
<|file_name|>helpers.py<|end_file_name|><|fim▁begin|>import sys def dictContains(D, key): if sys.version_info[0] == 2: return D.has_key(key) elif sys.version_info[0] == 3: return key in D<|fim▁hole|> raise Exception("No support for self.__dictContains for python major " + ...
else: