prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>database.js<|end_file_name|><|fim▁begin|>intelli.database = [];
$(function()
{
if ($('#query_out').text())
{
setTimeout( (function(){ $('#query_out').height(window.screen.height - $('#query_out').offset().top - 300) }), 1000);
}
$('a', '.js-selecting').on('click', function(e)
{
e.preventDefault(... | });
function focusCampo(id) |
<|file_name|>font.rs<|end_file_name|><|fim▁begin|>pub struct FontDefinition {
pub image_path: &'static str,<|fim▁hole|> pub width: u32,
pub height: u32,
pub padding: u32,
pub transparent: bool,
}<|fim▁end|> | |
<|file_name|>Params.js<|end_file_name|><|fim▁begin|>export function searchToObject(search) {
const params = {};
if (search) {
search.slice(1).split('&').forEach((param) => {
const [name, value] = param.split('=');
params[name] = decodeURIComponent(value);
});
}
return params;
}
export funct... |
// export function replaceLocationParams (params) {
// const search = Object.keys(params) |
<|file_name|>RdsDisplay.py<|end_file_name|><|fim▁begin|>from enigma import iPlayableService, iRdsDecoder
from Screens.Screen import Screen
from Components.ActionMap import NumberActionMap
from Components.ServiceEventTracker import ServiceEventTracker
from Components.Pixmap import Pixmap
from Components.Label impor... | def countAvailSubpages(self, page, masks):
mask = self.getMaskForPage(page, masks)
|
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# # -*- coding: utf-8 -*-
"""
title : __main__.py
description : entry point for core sira component
usage : python sira [OPTIONS]
-h Display this usage message
-d [input_directory]... | config.RAW_OUTPUT_DIR, 'pe_sys_cpfailrate.npy')
elif infrastructure.system_class.lower() in existing_models: |
<|file_name|>progressPie.cpp<|end_file_name|><|fim▁begin|>/*
* qrest
*
* Copyright (C) 2008-2012 - Frédéric CORNU
*
* 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 vers... | |
<|file_name|>shared.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { CommonModule, DecimalPipe } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
// MaterialUI modules
import { MatBadgeMod... | import { MatBottomSheetModule } from '@angular/material/bottom-sheet'; |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals
"""
This module abstracts all the bytes<-->string conversions so that the python 2
and 3 code everywhere else is similar. This also has a few simple functions
that deal with the fact that bytes are different between the 2 versi... | |
<|file_name|>disasm.py<|end_file_name|><|fim▁begin|>from miasm2.core.asmblock import disasmEngine
from miasm2.arch.msp430.arch import mn_msp430
<|fim▁hole|>class dis_msp430(disasmEngine):
def __init__(self, bs=None, **kwargs):
super(dis_msp430, self).__init__(mn_msp430, None, bs, **kwargs)<|fim▁end|> | |
<|file_name|>crew.rs<|end_file_name|><|fim▁begin|>use std::path::PathBuf;
use std::sync::{Mutex,Condvar,Arc};
use std::io::{Read,Write};
use std::thread;
use std::fs::{File,read_dir,symlink_metadata};
use std::os::unix::fs::FileTypeExt;
type Messages = Arc<Mutex<Vec<String>>>;
struct WorkItem {
path: PathBuf,
... | {
// keep doing work until all is finished
loop { |
<|file_name|>common.py<|end_file_name|><|fim▁begin|>#
# common.py
#
# Copyright (C) 2009 Justin Noah <justinnoah@gmail.com>
#
# Basic plugin template created by:
# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com>
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2009 Damien Churchill... | #
# You should have received a copy of the GNU General Public License
# along with deluge. If not, write to:
# The Free Software Foundation, Inc., |
<|file_name|>test_dict.py<|end_file_name|><|fim▁begin|>import unittest
from test import support
import collections, random, string
import collections.abc
import gc, weakref
import pickle
class DictTest(unittest.TestCase):
def test_invalid_keyword_arguments(self):
class Custom(dict):
pass
... | d[X()] = 4
d[X()] = 5 |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
setup(name='portopy',
version='0.1',<|fim▁hole|> url='https://github.com/yandex/porto',
author='marchael',
author_email='marchael@yandex-team.ru',
... | description='Python API for porto',
long_description=readme(), |
<|file_name|>db.go<|end_file_name|><|fim▁begin|>/*
Package db holds the service-wide database configuration functionality.
It mostly calls into other <package>/db/ methods.
*/
package db
import (
"errors"
apiDB "spaciblo.org/api/db"
"spaciblo.org/be"
)
<|fim▁hole|> dbInfo, err := be.InitDB()
if err != nil {
re... | /*
InitDB sets up a be.DBInfo and migrates the api, sim, and ws tables
*/
func InitDB() (*be.DBInfo, error) { |
<|file_name|>create_corpus_yso_finna.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
from SPARQLWrapper import SPARQLWrapper, JSON
import requests
import re
import os
import os.path
import time
import sys
FINTO_ENDPOINT='http://api.dev.finto.fi/sparql'
FINNA_API_SEARCH='https://api.finna.fi/v1/search'
lang = ... | |
<|file_name|>ItemColorButton.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2013-2014 Alexander Sedov <imp@schat.me>
*
* 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 versi... | |
<|file_name|>test_data.py<|end_file_name|><|fim▁begin|>"""
Test data sources
"""
from nose.tools import ok_, eq_
from carousel.tests import logging
from carousel.core import UREG
from carousel.core.data_sources import DataSource, DataParameter
from carousel.core.data_readers import XLRDReader
from carousel.tests impor... | })
module = DataParameter(**{
"description": "PV module", |
<|file_name|>options_helpers.py<|end_file_name|><|fim▁begin|>"""Provides helper classes for testing option handling in pip
"""
import os
from pip._internal.cli import cmdoptions
from pip._internal.cli.base_command import Command
from pip._internal.commands import commands_dict
class FakeCommand(Command):
name =... |
class AddFakeCommandMixin(object):
def setup(self): |
<|file_name|>pipeline.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2.5
#
# Copyright 2010 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/license... | |
<|file_name|>lengjing.config.js<|end_file_name|><|fim▁begin|>/**
* @file 棱镜配置文件
*/
var pkg = require('./package.json');
module.exports = {
appid: pkg.appid,
name: pkg.name,
desc: pkg.description,
host: `https://${pkg.appid}.h5app.alipay.com/www/`,
pages: [
{
entry: 'index.html',<|fim▁hole|> ... | |
<|file_name|>fix_employee_user_id.py<|end_file_name|><|fim▁begin|>import frappe
from frappe.utils import get_fullname
def execute():
for user_id in frappe.db.sql_list("""select distinct user_id from `tabEmployee`
where ifnull(user_id, '')!=''
group by user_id having count(name) > 1"""):
<|fim▁hole|> where us... | fullname = get_fullname(user_id)
employee = frappe.db.get_value("Employee", {"employee_name": fullname, "user_id": user_id})
if employee:
frappe.db.sql("""update `tabEmployee` set user_id=null |
<|file_name|>http.js<|end_file_name|><|fim▁begin|>module.exports = {<|fim▁hole|> listen: jest.fn(),
}),
};<|fim▁end|> | Server: app => ({
app, |
<|file_name|>DOMErrorImpl.java<|end_file_name|><|fim▁begin|>/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you unde... | fType = type;
fException = exception;
fRelatedData = relatedData;
fLocation = location; |
<|file_name|>BallSpawningBrick.py<|end_file_name|><|fim▁begin|>import pygame<|fim▁hole|>from Game.Bricks import Brick
from Game.Ball import Ball
class BallSpawningBrick(Brick):
def __init__(self, position, game, points=400, color=(150, 150, 150),
sprite=pygame.Surface(GameConstants.BRICK_SIZE)):
... | from Game.Shared import GameConstants |
<|file_name|>NhcMessageBase.java<|end_file_name|><|fim▁begin|>/**
* Copyright (c) 2010-2018 by the respective copyright holders.
*<|fim▁hole|> * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.htm... | * All rights reserved. This program and the accompanying materials |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | export { default } from "./useProcessingMenu"; |
<|file_name|>bulk_compile_all_java.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python -tt
import commands
import re
import sys
def aray__to_string(ar):
array_string=""
for item in ar:
array_string += " "+item
array_string=array_string.replace(ar[0],"")
return array_string.rstrip().lstrip()
def get_class_path(... | f.close() |
<|file_name|>mdns_provider.go<|end_file_name|><|fim▁begin|>// Package mdns provides node discovery via mDNS.
package mdns
import (
"fmt"
"io/ioutil"
"log"
"net"
"strconv"
"time"
m "github.com/hashicorp/mdns"
)
// Provider implements the Provider interface.
type Provider struct{}
// Help returns help informat... | |
<|file_name|>alert.ts<|end_file_name|><|fim▁begin|>import { Component, ElementRef, Renderer2, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
import { NglCommonNotify } from '../common/notify/notify';
@Component({
selector: 'ngl-alert',
templateUrl: './alert.html',
changeDetection: ChangeDetec... | } |
<|file_name|>0003_citation_page_name.py<|end_file_name|><|fim▁begin|># Generated by Django 3.0.3 on 2020-08-20 16:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('common', '0002_citation'),
]
operations = [
migrations.AddField(
... | ] |
<|file_name|>state_impl.go<|end_file_name|><|fim▁begin|>/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache Lice... | stateImpl.lastComputedCryptoHash = stateImpl.computeRootNodeCryptoHash()
stateImpl.recomputeCryptoHash = false
} else {
logger.Debug("Returing existing crypto-hash as recomputation not required") |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>
/**
* Wraps a History Driver to add "click capturing" functionality.
*
* If you want to intercept and handle any click event that leads to a link,
* like on an `<a>` element, you pass your existing driver (e.g. created from
* `makeHistoryDriver()`) as... | export {Location, History} from 'history';
export * from './types'; |
<|file_name|>replace-by-fee.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test replace by fee code
#
from test_fra... | |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>fn main() {
// ANCHOR: here
let x = Some(5);
let y = 10;
match x {
Some(50) => println!("Got 50"),<|fim▁hole|> println!("at the end: x = {:?}, y = {:?}", x, y);
// ANCHOR_END: here
}<|fim▁end|> | Some(y) => println!("Matched, y = {:?}", y),
_ => println!("Default case, x = {:?}", x),
}
|
<|file_name|>TransformUI.py<|end_file_name|><|fim▁begin|>##########################################################################
#
# Copyright (c) 2013-2014, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided ... | ( "Object", GafferScene.Transform.Space.Object ),
) |
<|file_name|>0008_vm_system.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-04-26 12:53
from __future__ import unicode_literals<|fim▁hole|>
class Migration(migrations.Migration):
dependencies = [
('admin', '0007_vm_user'),
]
operations = [
migra... |
from django.db import migrations, models |
<|file_name|>product.js<|end_file_name|><|fim▁begin|>require.register("scripts/product", function(exports, require, module) {
var req = require('scripts/req');
AddStyleTagToItemVM = function(user, styletag_repo) {
// this is very similar to AddItemToCollectionVM - yet different.
var self = this... | if (!_.contains(self.target_item().styletags(), self.selected_styletag())) {
var success = function() {
self.target_item().styletags.push(self.selected_styletag().name); |
<|file_name|>sync-username-and-names.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# Copyright 2020 The Wazo Authors (see the AUTHORS file)<|fim▁hole|>import sys
from wazo_auth_client import Client as AuthClient
from wazo_confd_client import Client as ConfdClient
from xivo.chain_map import ChainMap
from xivo... | # SPDX-License-Identifier: GPL-3.0+
|
<|file_name|>gcp_compute_ssl_policy_facts.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
... | in the `customFeatures` field. |
<|file_name|>patterns.go<|end_file_name|><|fim▁begin|>// Deprecated: use github.com/multiformats/go-multiaddr-fmt instead.
package mafmt
import (
nmafmt "github.com/multiformats/go-multiaddr-fmt"
)
// Deprecated: use github.com/multiformats/go-multiaddr-fmt instead.
var IP = nmafmt.IP
// Deprecated: use github.com/... |
// Deprecated: use github.com/multiformats/go-multiaddr-fmt instead. |
<|file_name|>navigatorinfo.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::str::DOMString;
use util::opts;
pub... | }
#[cfg(any(target_os = "android", target_os = "linux"))] |
<|file_name|>actionTypes.js<|end_file_name|><|fim▁begin|>"use strict";
let keyMirror = require('react/lib/keyMirror');
module.exports = keyMirror({
INITIALIZE: null,
<|fim▁hole|> CREATE_AUTHOR: null,
UPDATE_AUTHOR: null,
DELETE_AUTHOR: null
});<|fim▁end|> | |
<|file_name|>dlsurvey.py<|end_file_name|><|fim▁begin|>"""
DataLab survey class. Gets data from any survey
available through the NOAO datalab-client.
"""
import pdb
import numpy as np
import warnings
from astropy.table import Table
from astropy import units
import warnings
import sys, os
try:
from dl import queryC... |
Args: |
<|file_name|>evpkdf-profile-tests.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../yui/yui.d.ts" />
/// <reference path="../cryptojs.d.ts" />
YUI.add('algo-evpkdf-profile', function (Y) {
var C = CryptoJS;
//Profiler is removed in YUI 3.10.2
//@see http://www.yuiblog.com/blog/2013/06/04/yui-3-10... | |
<|file_name|>model.py<|end_file_name|><|fim▁begin|># -*- coding:UTF-8 -*-
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation
from keras.layers import Embedding
from keras.layers import LSTM,Flatten
import numpy as np
import loadpkl
(X_train, y_train),(X_test, y_test) = loadpkl.loa... | #model.add(Activation('tanh'))
#model.add(Dense(20))
#model.add(Activation('tanh'))
#model.add(Dense(6)) |
<|file_name|>unused-macro-rules.rs<|end_file_name|><|fim▁begin|>#![deny(unused_macros)]
// Most simple case
macro_rules! unused { //~ ERROR: unused macro definition
() => {};
}
// Test macros created by macros
macro_rules! create_macro {
() => {
macro_rules! m { //~ ERROR: unused macro definition<|fim... | |
<|file_name|>moment.hpp<|end_file_name|><|fim▁begin|>///////////////////////////////////////////////////////////////////////////////
// moment.hpp
//
// Copyright 2005 Eric Niebler. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org... | #include <boost/mpl/int.hpp>
#include <boost/mpl/assert.hpp> |
<|file_name|>probability.py<|end_file_name|><|fim▁begin|>from .base import ItemCollector
class BaseProbabilityCollector(ItemCollector):
# result_dependencies = (*CountCollector, *FrequencyCollector)
def __init__(self, previous_collector_set):
super().__init__(previous_collector_set)<|fim▁hole|> self.__cached... | |
<|file_name|>loader.js<|end_file_name|><|fim▁begin|>import header from 'head';
class Loader {
constructor () {
// Singleton Object
if(window.CM == null){
window.CM = {};
}
window.CM.Loader = this;
let scope = this;
head.ready(document, function() {
head.load([ "/assets/css/app.css",
"/as... | } |
<|file_name|>google_analytics.py<|end_file_name|><|fim▁begin|>"""
Google Analytics template tags and filters.
"""
from __future__ import absolute_import
import re
from django.template import Library, Node, TemplateSyntaxError
from templatetags.utils import is_internal_ip, disable_html, get_required_setting
SCOPE_V... |
register = Library()
|
<|file_name|>abstract_control_directive.ts<|end_file_name|><|fim▁begin|>/**
* @license<|fim▁hole|> *
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {Observable} from 'rxjs';
import {AbstractControl} from '../model';
impo... | * Copyright Google Inc. All Rights Reserved. |
<|file_name|>disabled-option.js<|end_file_name|><|fim▁begin|>export default {
data () {<|fim▁hole|> return {
selected: null,
options: [
{ id: 1, label: 'Richard Hendricks' },
{ id: 2, label: 'Bertram Gilfoyle' },
{ id: 3, label: 'Dinesh ... | |
<|file_name|>cpuspeed.py<|end_file_name|><|fim▁begin|>"""
Support for displaying the current CPU speed.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.cpuspeed/
"""
import logging
import voluptuous as vol
from homeassistant.components.sensor imp... | |
<|file_name|>estimator_checks.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import types
import warnings
import sys
import traceback
import pickle
from copy import deepcopy
import numpy as np
from scipy import sparse
from scipy.stats import rankdata
import struct
from sklearn.externals.six.mov... | |
<|file_name|>depth.js<|end_file_name|><|fim▁begin|>var allcoin = require('..');
var api = allcoin.PublicApi;<|fim▁hole|><|fim▁end|> |
api.depth('mona_btc').then(console.log); |
<|file_name|>music.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from .subject import Subject
class Music(Subject):
target = 'music'
def __repr__(self):<|fim▁hole|><|fim▁end|> | return '<DoubanAPI Music>' |
<|file_name|>sandbox.go<|end_file_name|><|fim▁begin|>// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/cri-o/cri-o/internal/lib/sandbox (interfaces: NamespaceIface)
// Package sandboxmock is a generated GoMock package.
package sandboxmock
import (
sandbox "github.com/cri-o/cri-o/internal/lib/sandbox"
... | return ret0
}
|
<|file_name|>models.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#
# Copyright 2010 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... | |
<|file_name|>BNVMAPI_Util.py<|end_file_name|><|fim▁begin|>from tools import *
from default_record import *
from xen.xend import uuid
from xen.xend import XendDomain, XendNode
from xen.xend import BNVMAPI, BNStorageAPI
from xen.xend.server.netif import randomMAC
from xen.xend.ConfigUtil import getConfigVar
from x... | memory_size = memory_size * MB
vm_rec = dict(VM_default)
|
<|file_name|>info.js<|end_file_name|><|fim▁begin|>var infoCtrl = require('../controllers/infoCtrl.js');
module.exports = [
{
method: 'GET',
path: '/info/all',
config: {<|fim▁hole|>];<|fim▁end|> | handler: infoCtrl.getAll
}
} |
<|file_name|>rolling_updater_test.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... | oldRc: &api.ReplicationController{
ObjectMeta: api.ObjectMeta{
Name: "foo",
}, |
<|file_name|>RackspaceLocators.py<|end_file_name|><|fim▁begin|>__author__ = 'Arunkumar Eli'
__email__ = "elrarun@gmail.com"
from selenium.webdriver.common.by import By
class DigitalOceanLocators(object):
ACCESS_KEY_INPUT = (By.ID, 'accessKey')
SECRET_KEY_INPUT = (By.ID, 'secretKey')
NEXT_BTN = (By.CSS_SEL... | HOST_DESC_INPUT = (By.ID, "description") |
<|file_name|>schema_v1.py<|end_file_name|><|fim▁begin|>from sqlalchemy.schema import (
Table,
Column,
MetaData,
ForeignKey)
from sqlalchemy.types import (
Text,
JSON,
DateTime,
Integer,
String)
from collections import defaultdict
from uuid import uuid4
import datetime
class SchemaS... | tables.append(Table(
"mailbox", metadata,
Column('id', Integer, primary_key=True), |
<|file_name|>c_order_assist.cpp<|end_file_name|><|fim▁begin|>//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#include "cbase.h"
#include "c_order_assist.h"
IMPLEMENT_CLI... |
Q_snprintf( pDest, bufferSize, "Assist %s", targetDesc );
} |
<|file_name|>PropertyLine.ts<|end_file_name|><|fim▁begin|>module INSPECTOR {
export class PropertyFormatter {
/**
* Format the value of the given property of the given object.
*/
public static format(obj: any, prop: string): string {
// Get original value;
... | // if (arrayName) {
|
<|file_name|>password.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 Google LLC
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
//! Password verification.
/// The scrypt password hashing function.
///
/// scryp... | hash.params.p,
SCRYPT_MAX_MEM,
&mut out_hash,
) |
<|file_name|>keysgeneratorwidget.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2014 - Center of Excellence in Information Assurance
*
* 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... | QWidget(parent), ui(new Ui::KeysGeneratorWidget)
{
ui->setupUi(this); |
<|file_name|>scheduler.rs<|end_file_name|><|fim▁begin|>// The MIT License (MIT)
// Copyright (c) 2015 Rustcc Developers
// 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 restrictio... |
let hdl = Processor::current().handle();
let stealer = Processor::current().stealer();
for neigh in guard.iter() { |
<|file_name|>species.js<|end_file_name|><|fim▁begin|>// species_data_url, previously_selected_species_ids, and species_options come in via django and must be set before including this file
var species_counter = 0; // This is the counter to make new species elements so that we don't have to worry about array splicing ... | |
<|file_name|>StepTwo.js<|end_file_name|><|fim▁begin|>import React from 'react';
import Wrapper, {
Header,
Content,
Footer,
Sidebar,
SidebarItem,
MainContent,
MainItem,
} from '../components/common/layouts/Container/Container';
import Menu from '../components/Menu/Menu';
import Filter from '../components/... | |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# uFlash documentation build configuration file, created by
# sphinx-quickstart on Thu Dec 17 19:01:47 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possi... | # source_suffix = ['.rst', '.md']
source_suffix = ".rst"
# The encoding of source files. |
<|file_name|>BitextLoader.java<|end_file_name|><|fim▁begin|>package com.transmem.doc;
import java.io.IOException;
import java.io.File;
import java.io.PrintWriter;
import java.io.FileReader;
import java.io.BufferedReader;
import java.util.ArrayList;
import java.util.logging.Logger;
import java.sql.SQLException;
/**
*... | }
reader1.close();
reader2.close(); |
<|file_name|>ui_mayaviviewerwidget.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mayaviviewerwidget.ui'
#
# Created: Mon Nov 11 18:02:00 2013
# by: pyside-uic 0.2.13 running on PySide 1.1.0
#
# WARNING! All changes made in this file will be lost!
fr... | sizePolicy.setHeightForWidth(self.closeButton.sizePolicy().hasHeightForWidth()) |
<|file_name|>mysql.py<|end_file_name|><|fim▁begin|># stdlib
import re
import traceback
from contextlib import closing, contextmanager
from collections import defaultdict
# 3p
import pymysql
try:
import psutil
PSUTIL_AVAILABLE = True
except ImportError:
PSUTIL_AVAILABLE = False
# project
from config import... | cursor.execute(sql_query_schema_size) |
<|file_name|>utils.js<|end_file_name|><|fim▁begin|>define(function () {
var exports = {};
/**
* Hashes string with a guarantee that if you need to hash a new string
* that contains already hashed string at it's start, you can pass only
* added part of that string along with the hash of already computed pa... | haveChanges = true; |
<|file_name|>routes.js<|end_file_name|><|fim▁begin|>/**
* Module dependencies.
*/
var api = require('lib/db-api');
var config = require('lib/config');
var express = require('express');
var jwt = require('lib/jwt');
var passport = require('passport');
var log = require('debug')('democracyos:auth:facebook:routes');
va... | User.findByProvider(profile, function (err, user) {
if (err) {
return log('Error looking for user with facebook id "%s".', userFacebookId); |
<|file_name|>MasterJurnal.java<|end_file_name|><|fim▁begin|>package com.ocams.andre;
import javax.swing.table.DefaultTableModel;
public class MasterJurnal extends javax.swing.JFrame {
public MasterJurnal() {
initComponents();
}
/**
* This method is called from within the constructor to initiali... | .addGroup(layout.createSequentialGroup()
.addContainerGap() |
<|file_name|>convolutional_test.py<|end_file_name|><|fim▁begin|># Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://ww... | pointwise_constraint=p_constraint,
bias_constraint=b_constraint)
inputs = random_ops.random_uniform((5, 3, 3, 5), seed=1) |
<|file_name|>AuthInfoFragment.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2013 Joseph Mansfield
*
* 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
... | |
<|file_name|>number.py<|end_file_name|><|fim▁begin|>def bytes_to_long(foo):
return 0
def long_to_bytes(foo):<|fim▁hole|><|fim▁end|> | return '\0' |
<|file_name|>patch-csproj.py<|end_file_name|><|fim▁begin|>import sys
import os.path
from xml.etree import ElementTree as et
if len(sys.argv) != 3:
raise Exception("Expected at least 2 args, {} given!".format(len(sys.argv) - 1))
version = sys.argv[1]
csprojPath = sys.argv[2]
if not os.path.isfile(csprojPath):
... | versionLeaf.text = version
tree.write(csprojPath) |
<|file_name|>test-bend90a.py<|end_file_name|><|fim▁begin|>#
# pyfeyner - a simple Python interface for making Feynman diagrams.
# Copyright (C) 2005-2010 Andy Buckley, Georg von Hippel
# Copyright (C) 2013 Ismo Toijala
#
# pyfeyner is free software; you can redistribute it and/or modify
# it under the terms of the GNU ... | # the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# |
<|file_name|>test_order.py<|end_file_name|><|fim▁begin|># coding: utf-8
"""
DeliveryHub
DeliveryHub API
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file ... | unittest.main() |
<|file_name|>issue-23311.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 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... |
// run-pass |
<|file_name|>ResourceView.js<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) IBM Corp. 2009 All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
... | * @extends {WebInspector.SourceFrame}
* @constructor |
<|file_name|>selinux_unsupported.go<|end_file_name|><|fim▁begin|>// +build !linux
/*
Copyright 2014 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.or... | return "", nil
}
|
<|file_name|>0005_auto_20150802_0303.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('imager_profile', '0004_auto_20150802_0153'),
]
operations = [
... | ),
migrations.AlterField(
model_name='imagerprofile',
name='website_url', |
<|file_name|>vec.py<|end_file_name|><|fim▁begin|>import array
class vec(object):
@staticmethod
def sized(size, type='d'):
return vec([0] * size, type)
@staticmethod
def of(content, type='d'):
return vec(content, type)
def __init__(self, content, type='d'):
self.size = len(... | result.array[i] = self.array[i] + other.array[i] |
<|file_name|>submissions.js<|end_file_name|><|fim▁begin|>$(function() {
var search = $("#search");
var submissions = $("#submissions tbody tr");<|fim▁hole|> var $elem = $(elem);
$elem.toggle($elem.data("student").indexOf(filter) !== -1);
});
})
});<|fim▁end|> | search.on('keyup', function(event) {
var filter = search.val();
submissions.each(function(index, elem) { |
<|file_name|>exec.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 Google Inc.
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
use std::error::Error;
use std::ffi::OsString;
use std::io::{stderr, Write};
use std::p... | match command.status() {
Ok(status) => status.success(),
Err(e) => {
writeln!(&mut stderr(), "Failed to run {}: {}", self.executable, e).unwrap(); |
<|file_name|>TrashJPanel.java<|end_file_name|><|fim▁begin|>/*
===========================================================================
Copyright 2002-2010 Martin Dvorak
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You m... | |
<|file_name|>topology.go<|end_file_name|><|fim▁begin|>package main
import "math/rand"
type Rule struct {
From string
To string
}
func fullMesh(hosts []string) []Rule {
rules := []Rule{}
for _, from := range hosts {
for _, to := range hosts {
if from == to {
continue
}
rules = append(rules, Rul... | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod authenticator;
pub mod auth_type;<|fim▁hole|>pub mod create_st3;
pub mod error_type;
pub mod handle_type;
pub mod instance;
pub mod key_buffer;
pub mod kv_buffer_type;
pub mod operation;
pub mod response;
// pub use self::authenticator::Authenticator;
pub use se... | pub mod callback_type;
pub mod cmd;
pub mod contiguous_buffer;
pub mod create_st; |
<|file_name|>test_interaction.py<|end_file_name|><|fim▁begin|>"""Test interact and interactive."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function
from collections import OrderedDict
import nose.tools as nt
import IPython.tes... | w.value = (.5, .6) #upper non-overlapping range
check_widget(w, cls=frsw, value=(.5, .6), min=0., max=.6)
w.value = (-.1, .4) #semi out-of-range
check_widget(w, cls=frsw, value=(0., .4), min=0., max=.6) |
<|file_name|>TiempoBusException.java<|end_file_name|><|fim▁begin|>/**
* TiempoBus - Informacion sobre tiempos de paso de autobuses en Alicante
* Copyright (C) 2012 Alberto Montiel
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License ... | public TiempoBusException() { |
<|file_name|>Slide.ts<|end_file_name|><|fim▁begin|>import { uniqueId } from 'lodash';
import { SlideType } from './SlideType';
import { TransitionType } from './TransitionType';
export class Slide {
constructor(public contentFile: string,
public type: SlideType,<|fim▁hole|> public i... | public transition: TransitionType, |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import logging
import datetime
import mediacloud.api
import re
from server import mc
from server.auth import is_user_logged_in
from server.util.csv import SOURCE_LIST_CSV_METADATA_PROPS
<|fim▁hole|>TOPIC_MEDIA_PROPS = ['story_count', 'media_inlink_count', 'inlink_... | logger = logging.getLogger(__name__)
TOPIC_MEDIA_INFO_PROPS = ['media_id', 'name', 'url']
|
<|file_name|>keyboard.d.ts<|end_file_name|><|fim▁begin|>import { Observable } from 'rxjs/Observable';
/**
* @name Keyboard
* @description
* @usage
* ```typescript
* import { Keyboard } from 'ionic-native';
*
*
*
* ```
*/
export declare class Keyboard {
/**
* Hide the keyboard accessory bar with the n... | */
static show(): void;
/**
* Close the keyboard if open. |
<|file_name|>index_spec.js<|end_file_name|><|fim▁begin|>/**
* @Author: Yingya Zhang <zyy>
* @Date: 2016-07-08 11:29:00
* @Email: zyy7259@gmail.com
* @Last modified by: zyy
* @Last modified time: 2016-07-10 22:18:85
*/
import {
notexist,
isEmpty
} from 'type'
import {
calcHeight,
remove,
dataset
} from ... | |
<|file_name|>baseModules.ts<|end_file_name|><|fim▁begin|>import * as _ from 'lodash';
import DateHelper from "../helpers/DateHelper";
export module Enums {
export enum GroupSearchType {
Groups = 0,
Companies = 1,
Teams = 2
}
export enum DateInterval {
Second = 0,
Minut... | ArchivedAddresses: Array<Dezrez.Location.Command.ContactAddressSaveCommandDataContract>; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.