prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>classifiedReleaseOrder.model.js<|end_file_name|><|fim▁begin|>import mongoose, { Schema } from 'mongoose'
import auditingSchema from '../../core/base.model'
import mongoosePaginate from 'mongoose-paginate'
import uniqueValidator from 'mongoose-unique-validator'
const ClassifiedReleaseOrderSchema = new audi... | export default mongoose.model( |
<|file_name|>core_view.js<|end_file_name|><|fim▁begin|>import {
ActionHandler,
Evented,
FrameworkObject,
deprecateUnderscoreActions
} from 'ember-runtime';
import { initViewElement } from '../system/utils';
import { cloneStates, states } from './states';
/**
`Ember.CoreView` is an abstract class that exists ... | Unless you have specific needs for `CoreView`, you will use `Ember.Component` |
<|file_name|>wiki_model.py<|end_file_name|><|fim▁begin|>import numpy
from wiki_scraper import (
parse_html_simple,
crawl_page)
import pickle
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.naive_bayes import MultinomialNB
import os.path
from parallel_webscrape import scrape_wikipedia
P... | # make some dictionaries to preprocess the words |
<|file_name|>circ_id_complete.js<|end_file_name|><|fim▁begin|>/*
* This file is part of Invenio.
* Copyright (C) 2015 CERN.
*
* Invenio is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of... | var res = [];
$(data).each(function(i, val) { |
<|file_name|>controlserver.py<|end_file_name|><|fim▁begin|>import logging
from queue import Queue
from gi.repository import GObject
from lib.commands import ControlServerCommands
from lib.tcpmulticonnection import TCPMultiConnection
from lib.response import NotifyResponse
class ControlServer(TCPMultiConnection):
... | for line in lines[:-1]:
self.log.debug("got line: %r", line) |
<|file_name|>generate_std_names.py<|end_file_name|><|fim▁begin|># (C) British Crown Copyright 2010 - 2014, Met Office
#
# This file is part of Iris.
#
# Iris 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 Foundati... |
import argparse
import pprint |
<|file_name|>InterfaceWithLambda.java<|end_file_name|><|fim▁begin|>// Copyright 2016 The Bazel 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:... | |
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import os
from glob import glob
from pyramid.path import AssetResolver
from reportlab.lib.units import mm
from reportlab.pdfgen import canvas
from ..models import generate_random_digest
__all__ = [
'generate_random_filename',
'delete_files',
'NumberedCanva... | if files:
os.remove(*files)
|
<|file_name|>interfaces.py<|end_file_name|><|fim▁begin|>#
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################<|fim▁hole|># WARNING #
##############... | |
<|file_name|>process_test.go<|end_file_name|><|fim▁begin|>package gophpfpm_test
import (
"os"
"path"
"testing"
"time"
"github.com/yookoala/gophpfpm"
)
var username, basepath, pathToPhpFpm string
func init() {
var err error<|fim▁hole|> basepath = path.Join(basepath, "_test")
// defined in environment
pathTo... | basepath, err = os.Getwd()
if err != nil {
panic(err)
} |
<|file_name|>version.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | __version__ = "master" |
<|file_name|>input.rs<|end_file_name|><|fim▁begin|>use super::errors::{Error, Result};
use super::system::System;
use super::window::Window;
use crate::internal_derive::DependenciesFrom;
use glium::glutin::event::{
DeviceEvent, ElementState, Event, KeyboardInput, StartCause, VirtualKeyCode, WindowEvent,
};
use math... | } |
<|file_name|>multiples_of_3_and_5.py<|end_file_name|><|fim▁begin|>#Kunal Gautam
#Codewars : @Kunalpod
#Problem name: Multiples of 3 and 5<|fim▁hole|>def solution(number):
return sum([x for x in range(3,number) if x%3==0 or x%5==0])<|fim▁end|> | #Problem level: 6 kyu
|
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>// webpack.config.js
module.exports = {
module: {<|fim▁hole|> use: [
'vue-style-loader',
{
loader: 'css-loader',
options: { importLoaders: 1 }
},
'postcss-loader'
]
}
]
... | rules: [
{
test: /\.css$/, |
<|file_name|>issue-32995.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... |
#![allow(unused)] |
<|file_name|>event_service_config.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.16.0
// source: envoy/api/v2/core/event_service_config.proto
package envoy_api_v2_core<|fim▁hole|> proto "github.com/golang/protobuf/proto"
... |
import (
_ "github.com/cncf/xds/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate" |
<|file_name|>basic_block.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/lic... | |
<|file_name|>q_networks.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
import numpy as np
import os
import sys
from keras.layers import Activation, Dense, Input
from keras.layers.normalization import BatchNormalization
from keras.models import Model, Sequential
from keras.optimizers import RMSprop
N... | TARGETNET_NAME = 'target_network'
TAU = 0.0001 # soft update / low pass filter
|
<|file_name|>test_base.py<|end_file_name|><|fim▁begin|>from django.core.serializers import json
from django.http import HttpResponseNotFound, HttpResponse
from django.views.generic import View
from rest_test_data.models import Simple
from rest_test_data.views import BaseTestDataRestView
from nose.tools import assert_... |
@patch.object(BaseTestDataRestView, 'get_object') |
<|file_name|>identity_map.py<|end_file_name|><|fim▁begin|>import uuid
def is_username(val):
"""
If the value parses as a UUID, then it's an ID, not a username.
If it does not parse as such, then it must be a username.
"""
try:
uuid.UUID(val)
return False
except ValueError:
... |
# internally handles the KeyError and returns the default value
record = idmap.get("no-such-valid-id@example.org", None)
username = record["username"] if record is not None else "NO_SUCH_IDENTITY" |
<|file_name|>uCM.cpp<|end_file_name|><|fim▁begin|>//----------------------------------------------------------------------------
#pragma hdrstop
#include <stdio.h>
#include <memory>
#include "uCM.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma class... | //--------------------------------------------------------------------------- |
<|file_name|>package-info.java<|end_file_name|><|fim▁begin|><|fim▁hole|> * by the <a target="_top" href="https://github.com/tail-f-systems/JNC">JNC</a> plugin of <a target="_top" href="http://code.google.com/p/pyang/">pyang</a>.
* The generated classes may be used to manipulate pieces of configuration data
* with NET... | /**
* This class hierarchy was generated from the Yang module hcta-epc |
<|file_name|>cloud_storage_test_base.py<|end_file_name|><|fim▁begin|># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Base classes for a test and validator which upload results
(reference images, error i... | |
<|file_name|>myNN.py<|end_file_name|><|fim▁begin|># References:
#
# https://www.tensorflow.org/guide/low_level_intro
#
# only needed for python 2.7
# from __future__ import absolute_import
# from __future__ import division
# from __future__ import print_function
import numpy as np
from numpy import array
from numpy i... | [0, 0, 1],
[0, 0, 1],
[1, 0, 0],
[0, 1, 0], |
<|file_name|>command.js<|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.
/**
* @fileoverview A command is an abstraction of an action a user can do in the
* UI.
*
* W... | /**
* Executes the command by dispatching a command event on the given element. |
<|file_name|>crypto_box.rs<|end_file_name|><|fim▁begin|>// crypto_box.h
pub const crypto_box_SEEDBYTES: usize = crypto_box_curve25519xsalsa20poly1305_SEEDBYTES;
pub const crypto_box_PUBLICKEYBYTES: usize = crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES;
pub const crypto_box_SECRETKEYBYTES: usize = crypto_box_cur... | #[test]
fn test_crypto_box_primitive() { |
<|file_name|>needless_range_loop2.rs<|end_file_name|><|fim▁begin|>#![warn(clippy::needless_range_loop)]
fn calc_idx(i: usize) -> usize {
(i + i + 20) % 4
}
fn main() {
let ns = vec![2, 3, 5, 7];
for i in 3..10 {
println!("{}", ns[i]);
}
for i in 3..10 {
println!("{}", ns[i % 4]);... | let g = vec![1, 2, 3, 4, 5, 6];
let glen = g.len();
for i in 0..glen {
let x: u32 = g[i + 1..].iter().sum(); |
<|file_name|>test_enum.rs<|end_file_name|><|fim▁begin|>use bindgen::BindgenOptions;
use support::assert_bind_eq;
fn default_without_rust_enums() -> BindgenOptions {
BindgenOptions { rust_enums: false, .. Default::default() }
}
#[test]
fn with_simple_enum() {
assert_bind_eq(Default::default(), "headers/enum.h"... | const BAP_ARM: Enum_Foo = 9698489;
const BAP_X86: Enum_Foo = 11960045;
const BAP_X86_64: Enum_Foo = 3128633167; |
<|file_name|>Example_Dudko_Fit.py<|end_file_name|><|fim▁begin|># force floating point division. Can still use integer with //
from __future__ import division
# This file is used for importing the common utilities classes.
import numpy as np
import matplotlib.pyplot as plt
import sys
sys.path.append("../../../../../")... | |
<|file_name|>map3d_population3.js<|end_file_name|><|fim▁begin|>$.ajax({
url: './data/population.json',
success: function (data) {
var max = -Infinity;
data = data.map(function (item) {
max = Math.max(item[2], max);
return {
geoCoord: item.slice(0, 2),
... | });
myChart.setOption({
title : { |
<|file_name|>types.ts<|end_file_name|><|fim▁begin|>import Emitter, { Handler } from "../emmett";
const emitterNames = new Map();
const handler1: Handler = function(event) {
console.log("Received event:", event.type);
console.log(" - Data:", event.data);
console.log(" - Target:", emitterNames.get(event.target))... | console.log("");
emitter2.once("eventA", handler1);
emitter2.once(["eventB", "eventC"], handler1);
emitter2.once(/eventD/, handler2); |
<|file_name|>devConfigTemplate.py<|end_file_name|><|fim▁begin|>'''
Created on Sep 22, 2016
@author: rtorres
'''
import os
from flaskiwsapp.settings.baseConfig import BaseConfig
<|fim▁hole|> DEBUG_TB_ENABLED = True
SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/example'
AUTH0_CALLBACK_URL = 'http://loca... | class DevConfig(BaseConfig):
"""Development configuration"""
ENV = 'dev'
DEBUG = True |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 Virgil Dupras
//
// This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
// which should be included with this package. The terms are also available at
// http://www.gnu.org/licenses/gpl-3.0.html
//
use std::path::Pa... | game.new_turn();
loop { |
<|file_name|>ancestorscombinators.rs<|end_file_name|><|fim▁begin|>/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/
/// Union and intersection can be made more efficient if the streams are ... | self.update_generation();
}
}
} |
<|file_name|>toolbar-state.state-node.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core';
import { StateNode } from 'microedge-rxstate/dist';
import { ListToolbarStateModel } from './toolbar-state.model';<|fim▁hole|>
@Injectable()
export class ListToolbarState extends StateNode<ListToolbarStateM... | import { ListToolbarStateDispatcher } from './toolbar-state.rxstate';
import { ListToolbarConfigOrchestrator } from './config/config.orchestrator'; |
<|file_name|>SplashActivity.java<|end_file_name|><|fim▁begin|>package com.xidian.yetwish.reading.ui;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import com.xidian.yetwish.reading.R;
import com.xidian.yetwish.reading.fra... | |
<|file_name|>faux-editor.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# Ansible 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 versi... | __metaclass__ = type
import sys
import time |
<|file_name|>medicine.py<|end_file_name|><|fim▁begin|>class Medicine(object):
def __init__(self, name):
self.name = name
self.prescriptions = []<|fim▁hole|><|fim▁end|> |
def add_prescription(self, prescription):
self.prescriptions.append(prescription) |
<|file_name|>rents.js<|end_file_name|><|fim▁begin|>'use strict';
angular.module('dashboardApp')
.controller('RentsCtrl', function ($scope, Rents, $location, $routeParams, Auth, rents) {
$scope.rents = rents;
$scope.returnBook = function(rent){
Rents.returnBook({'rentId': rent.rentId}, function(res){
con... | |
<|file_name|>zte_mf180.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2011-2012 Vodafone España, S.A.
# Author: Andrew Bird
#
# 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 Found... |
conntype = WADER_CONNTYPE_USB
|
<|file_name|>SchemaTest.java<|end_file_name|><|fim▁begin|>/*
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreemen... | *
* You should have received a copy of the GNU Lesser General Public License
|
<|file_name|>DependencyInjector.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright (c) 2014 Open Door Logistics (www.opendoorlogistics.com)
* All rights reserved. This program and the accompanying materials
* are made available under the ter... | ODLGeom calculateRouteGeom(DistancesConfiguration request, LatLong from, LatLong to);
void addInstructionDependencies(String instructionId, DataDependencies dependencies);
void submitControlLauncher(String instructionId,ODLComponent component,ODLDatastore<? extends ODLTable> parametersTableCopy, String reportTopL... |
<|file_name|>response.py<|end_file_name|><|fim▁begin|>import re
<|fim▁hole|> # There are three possible server completion responses
OK = "OK" # indicates success
NO = "NO" # indicates failure
BAD = "BAD" # indicates a protocol error
class ListResponse(object):
def __init__(self, list_response):... | list_re = re.compile(r'\((.*)\) \"(.*)\" \"(.*)\"')
class Response(object): |
<|file_name|>mathml_store_rules.js<|end_file_name|><|fim▁begin|>// Copyright 2013 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... | defineRule(
'mtd', 'default.short', |
<|file_name|>tex_utils.py<|end_file_name|><|fim▁begin|>import re
simple_cmd_match = re.compile(r'\\([^\\]+?)\{(.*?)\}')
graphics_cmd_match = re.compile(r'\\includegraphics\[.*?\]?\{(.*?)\}')
begin_cmd_match = re.compile(r'\\begin{([^}]+?)}(?:(?:\[([^\]]+?)\])|.*)')
newcmd_match = re.compile(r'\\.+?\{(.*?)\}\{(.*)\}')
... |
def get_vars(line):
res = list()
open_braces = 0 |
<|file_name|>helpers.py<|end_file_name|><|fim▁begin|># Helper functions for the Maine Legislature project
import app_config
import collections
import copytext
import re
import json
import numbers
from unicodedata import normalize
from operator import itemgetter
CACHE = {}
def get_copy():
"""
Thank you Ryan f... | |
<|file_name|>build.py<|end_file_name|><|fim▁begin|>#
# This file is part of Mapnik (c++ mapping toolkit)
#
# Copyright (C) 2013 Artem Pavlenko
#
# Mapnik is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; ... | #
# |
<|file_name|>ModAction.java<|end_file_name|><|fim▁begin|>package stream.flarebot.flarebot.mod.modlog;
public enum ModAction {
BAN(true, ModlogEvent.USER_BANNED),
SOFTBAN(true, ModlogEvent.USER_SOFTBANNED),
FORCE_BAN(true, ModlogEvent.USER_BANNED),
TEMP_BAN(true, ModlogEvent.USER_TEMP_BANNED),
UNBA... | public ModlogEvent getEvent() {
return event; |
<|file_name|>transactionBuilderFactory.ts<|end_file_name|><|fim▁begin|>import should from 'should';
import { register } from '../../../../src/index';
import { KeyPair, TransactionBuilderFactory } from '../../../../src/coin/cspr/';
import * as testData from '../../../resources/cspr/cspr';
import { Transaction } from '..... |
const builder2 = factory.from(tx.toBroadcastFormat());
const tx2 = (await builder2.build()) as Transaction;
const tx2Json = tx2.toJson(); |
<|file_name|>TwitterComponentConfiguration.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_name|>normalizeFiles.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: UTF-8 -*-
# Normalize soundfiles in a folder, and write them to a new folder
# called normalized/
# Import Python modules
import contextlib
import os
import shutil
import sys
import wave
# Import user modules
def normalize():
... | argValues = sys.argv |
<|file_name|>0004_photo_rover.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-20 05:49
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
<|fim▁hole|>
dependencies = [
('photos', '0003_rover'),
... |
class Migration(migrations.Migration): |
<|file_name|>test_utils.py<|end_file_name|><|fim▁begin|>from maskgen.jpeg import utils
import unittest
from test_support import TestSupport
class TestJpegUtils(TestSupport):
def test_load(self):
self.assertEqual(91,utils.estimate_qf(self.locateFile('tests/images/test_project1.jpg')))<|fim▁hole|> unittest.... |
if __name__ == '__main__': |
<|file_name|>fastslim.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# This program processes an address trace generated by the Valgrind lackey tool
# to create a reduced trace according to the Fastslim-Demand algorithm
# described in "FastSlim: prefetch-safe trace reduction for I/O cache
# simulation" by Wei Jin... | def emit_marked_in_ts_order(): |
<|file_name|>non-legacy-modes.rs<|end_file_name|><|fim▁begin|>// run-pass
struct X {
repr: isize
}
fn apply<T, F>(x: T, f: F) where F: FnOnce(T) {
f(x);
}
fn check_int(x: isize) {
assert_eq!(x, 22);
}
fn check_struct(x: X) {
check_int(x.repr);
}<|fim▁hole|> apply(X {repr: 22}, check_struct);
}<|f... |
pub fn main() {
apply(22, check_int); |
<|file_name|>TreeBlockContext.java<|end_file_name|><|fim▁begin|>package antlr;
/* ANTLR Translator Generator
* Project led by Terence Parr at http://www.cs.usfca.edu
* Software rights: http://www.antlr.org/license.html
*
* $Id: //depot/code/org.antlr/release/antlr-2.7.7/antlr/TreeBlockContext.java#2 $
*/
/**The ... | } |
<|file_name|>db.cpp<|end_file_name|><|fim▁begin|>/**
* db.hpp
*
* Database abstraction part of Disc Data Base.
*
* Copyright (c) 2010-2011 Wincent Balin
*
* Based upon ddb.pl, created years before and serving faithfully until today.
*
* Uses SQLite database version 3.
*
* Published under MIT license. S... | }
void |
<|file_name|>base.py<|end_file_name|><|fim▁begin|>"""
============================
Base RPC Handler for Tornado
============================
This is a basic server implementation, designed for use within the
Tornado framework. The classes in this library should not be used
directly, but rather though the XML or JSON RP... | |
<|file_name|>pythonutil.py<|end_file_name|><|fim▁begin|>from socket import inet_ntoa
from struct import pack
def calcDottedNetmask(mask):
bits = 0
for i in xrange(32 - mask, 32):
bits |= (1 << i)<|fim▁hole|><|fim▁end|> | packed_value = pack('!I', bits)
addr = inet_ntoa(packed_value)
return addr |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from .xanim import Anim
from .sanim import SiegeAnim
version = (0, 3, 0) # Version specifier for PyCoD<|fim▁end|> | # <pep8 compliant>
from .xmodel import Model
|
<|file_name|>TrackedEntityRegistrationSMSListener.java<|end_file_name|><|fim▁begin|>package org.hisp.dhis.sms.listener;
/*
* Copyright (c) 2004-2018, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that ... | Date date = SmsUtils.lookForDate( message );
String senderPhoneNumber = StringUtils.replace( sms.getOriginator(), "+", "" );
|
<|file_name|>scrape_mbz_instruments.py<|end_file_name|><|fim▁begin|># !/usr/local/bin/python3.4.2
# ----Copyright (c) 2017 Carnegie Hall | The MIT License (MIT)----
# ----For the full license terms, please visit https://github.com/CarnegieHall/linked-data/blob/master/LICENSE----
##needs further refinement to eliminate... | import sys
from bs4 import BeautifulSoup
mbz_instDict = {} |
<|file_name|>test_swe_lun_eclipse.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import swisseph as swe
import unittest
class TestSweLunEclipse(unittest.TestCase):
@classmethod
def setUpClass(cls):
swe.set_ephe_path()
def test_01(self):
jd = 2454466.5
... | t1 = (2454695.3820517384, 0.0, 2454695.316710297, 2454695.447390333,
0.0, 0.0, 2454695.2672055247, 2454695.496797575, 0.0, 0.0)
for i in range(10):
self.assertAlmostEqual(tret[i], t1[i]) |
<|file_name|>CompositeShortNamesCache.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* 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.... | merger.add(cache.getAllMethodNames());
}
String[] result = merger.getResult();
return result != null ? result : ArrayUtil.EMPTY_STRING_ARRAY; |
<|file_name|>bam_conversion.py<|end_file_name|><|fim▁begin|>"""Converting BAM to BEDPE and normalized BigWig files."""
import os
from resolwe.process import (
Cmd,
DataField,
FileField,
FloatField,
Process,
SchedulingClass,
StringField,
)
class BamToBedpe(Process):
"""Takes in a BAM f... | out_file = f"{name}.SInorm.bigwig" |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .dual_structured_quad import (
DualRectilinearGraph,
DualStructuredQuadGraph,
DualUniformRectilinearGraph,
)
from .structured_quad import (
RectilinearGraph,
StructuredQuadGraph,
UniformRectilinearGraph,
)<|fim▁hole|> "RectilinearGrap... |
__all__ = [
"StructuredQuadGraph", |
<|file_name|>classes_a.js<|end_file_name|><|fim▁begin|>var searchData=
[
['screeningsolver',['ScreeningSolver',['../classhdim_1_1internal_1_1_screening_solver.html',1,'hdim::internal']]],
['sgd',['SGD',['../classhdim_1_1hdim_1_1_s_g_d.html',1,'hdim::hdim']]],
['sgd_5fsr',['SGD_SR',['../classhdim_1_1hdim_1_1_s_g_d... | ['subgradientsolver',['SubGradientSolver',['../classhdim_1_1ocl_1_1internal_1_1_sub_gradient_solver.html',1,'hdim::ocl::internal']]],
['supportsift',['SupportSift',['../structhdim_1_1_support_sift.html',1,'hdim']]], |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![feature(plugin)]
#![feature(test)]
#![plugin(peg_syntax_ext)]
#[macro_use]
extern crate nom;
extern crate clap;
extern crate termion;
extern crate byteorder;
extern crate env_logger;
extern crate vec_map;
extern crate tempdir;
#[macro_use]
extern crate log;
mod ... | if let Err(x) = fs::create_dir(dbdir) { |
<|file_name|>sim_state.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import functools
import itertools
import contextlib
import weakref
import logging
l = logging.getLogger("angr.sim_state")
import claripy
import ana
from archinfo import arch_from_id
from .misc.ux import deprecated
def arch_overrideable(f):... | |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LI... | |
<|file_name|>DetuneStereoParser.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2012 Carl Green
*
* 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 the License, ... | */
public class DetuneStereoParser { |
<|file_name|>enter.rs<|end_file_name|><|fim▁begin|>use crate::errors::Result;
use crate::kernel::execve;
use crate::kernel::groups::syscall_group_from_sysnum;
use crate::kernel::groups::SyscallGroup::*;
use crate::kernel::heap::*;
use crate::kernel::ptrace::*;
use crate::kernel::socket::*;
use crate::kernel::standard::... | PivotRoot => pivot_root::enter(),
Ptrace => ptrace::enter(),
ReadLink => dir_link_attr::enter(tracee),
ReadLinkAt => unlink_mkdir_at::enter(tracee), |
<|file_name|>TLDList.cpp<|end_file_name|><|fim▁begin|>// $Id$
// QtLobby released under the GPLv3, see COPYING for details.
#include "TLDList.h"
QMap<QString, QString>* TLDList::TLDMap;
TLDList::TLDList( QObject* parent) : QObject(parent){
if ( TLDMap == NULL ) {
TLDMap = new QMap<QString, QString>;
... | "GN:Guinea\n"
"GOV:Government\n"
"GP:Guadeloupe (French)\n"
"GQ:Equatorial Guinea\n" |
<|file_name|>Account.cpp<|end_file_name|><|fim▁begin|>/*
* Account.cpp
*
* Created on: 20 March 2015
* Author: cyosp
*/
#include <com/cyosp/mpa/core/Account.hpp>
namespace mpa
{
bool Account::isAccountAlreadyExisting( string accountName )
{
bool ret = false;
// TODO : try to use BDD facilities
// Get ... | {
}
|
<|file_name|>cell_renderer_toggle.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2015, The Rust-GNOME Project Developers.
// See the COPYRIGHT file at the top-level directory of this distribution.
// Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT>
//! Renders a toggle bu... | use glib::{to_bool, to_gboolean};
|
<|file_name|>playvideo.py<|end_file_name|><|fim▁begin|>import urlparse
import sys,urllib
import xbmc, xbmcgui, xbmcaddon, xbmcplugin
import urlresolver
base_url = sys.argv[0]
addon_handle = int(sys.argv[1])
args = urlparse.parse_qs(sys.argv[2][1:])
_addon = xbmcaddon.Addon()
_icon = _addon.getAddonInfo('icon')
... | # addon kicks in
|
<|file_name|>test_comment.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import unittest
import pykintone
from pykintone.model import kintoneModel
import tests.envs as envs
class TestAppModelSimple(kintoneModel):
def __init__(self):
super(TestAppModelSimple, self).__init__()
self.my_key ... | for c in comments: |
<|file_name|>appNotifications.ts<|end_file_name|><|fim▁begin|>export interface AppNotification {
id: string;
severity: AppNotificationSeverity;
icon: string;
title: string;
text: string;
component?: React.ReactElement;
timeout: AppNotificationTimeout;
}
export enum AppNotificationSeverity {<|fim▁hole|> ... | Success = 'success', |
<|file_name|>groups.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# author: @netmanchris
# This section imports required libraries
import requests
import json
from pyhpeimc.plat.device import *
HEADERS = {'Accept': 'application/json', 'Content-Type':
'application/json', 'Accept-encoding': 'application/... | return r.status_code
except requests.exceptions.RequestException as e: |
<|file_name|>DCHLog.java<|end_file_name|><|fim▁begin|><|fim▁hole|>
import org.apache.logging.log4j.Level;
import cpw.mods.fml.relauncher.FMLRelaunchLog;
/**
* Created by christopher on 02/08/15.
*/
public class DCHLog {
public static final FMLRelaunchLog INSTANCE = FMLRelaunchLog.log;
private DCHLog(){
... | package com.digitalcraftinghabitat.forgemod.util;
|
<|file_name|>linechart_module.py<|end_file_name|><|fim▁begin|>from modules.chart_module import ChartModule
import tornado.web
import logging
class LineChartModule(ChartModule):
def render(self, raw_data, keys, chart_id="linechart"):
self.chart_id = chart_id
self.chart_data = self.overtime_linecha... | 'percent_c': True, |
<|file_name|>ppmatlab.py<|end_file_name|><|fim▁begin|>## Automatically adapted for numpy.oldnumeric Apr 14, 2008 by -c
from builtins import range
def writeMeshMatlabFormat(mesh,meshFileBase):
"""
build array data structures for matlab finite element mesh representation
and write to a file to view and play... |
########################################################################
if __name__ == '__main__':
import os,shelve |
<|file_name|>ex20.py<|end_file_name|><|fim▁begin|>from sys import argv
script, input_file = argv
def print_all(f):
print f.read()
def rewind(f):
f.seek(0)
def print_a_line(line_count, f):
print line_count, f.readline()
current_file = open(input_file)
print "First let's print the whole file:\n"
print_... | print_a_line(current_line, current_file)
current_line = current_line + 1 |
<|file_name|>normalization_test.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://ww... |
@combinations.generate(combinations.combine(mode=['graph', 'eager']))
def test_layernorm_weights(self): |
<|file_name|>MiningDurationRoleBonus.java<|end_file_name|><|fim▁begin|>package fr.guiguilechat.jcelechat.model.sde.attributes;
import fr.guiguilechat.jcelechat.model.sde.IntAttribute;
/**
*
*/
public class MiningDurationRoleBonus
extends IntAttribute
{
public static final MiningDurationRoleBonus INSTANCE ... | @Override
public boolean getPublished() { |
<|file_name|>const.py<|end_file_name|><|fim▁begin|>"""Constants for the Vilfo Router integration."""
from __future__ import annotations
from dataclasses import dataclass
from homeassistant.components.sensor import SensorEntityDescription
from homeassistant.const import DEVICE_CLASS_TIMESTAMP, PERCENTAGE
DOMAIN = "vi... | |
<|file_name|>azure_hl.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/.
//! High-level bindings to Azure.
pub use AzColor as Color;
pu... | impl FilterInput for SourceSurface {
fn set(&self, filter: &FilterNode, index: u32) { |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>from django.conf import settings
from . import defaults
__title__ = 'fobi.contrib.plugins.form_elements.fields.' \
'select_multiple_with_max.conf'
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__copyright__ = '2014-2017 Artur Barseghyan'
__l... |
If override is not None, it will be used instead of the setting.
:param setting: String with setting name |
<|file_name|>AbstractFactory.java<|end_file_name|><|fim▁begin|>/*
* WorldEdit, a Minecraft world manipulation toolkit
* Copyright (C) sk89q <http://www.sk89q.com>
* Copyright (C) WorldEdit team and contributors
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GN... | * @param worldEdit the WorldEdit instance
*/ |
<|file_name|>account_journal.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can red... | if journal_id and isinstance(journal_id, int):
journal_id = [journal_id]
if period_id and isinstance(period_id, int):
period_id = [period_id] |
<|file_name|>javascript-types-spec.js<|end_file_name|><|fim▁begin|>describe('Testing JavaScript types', function() {
// we will use jQuery to manipulate HTML for testing...
beforeEach(function() {
// empty for now...
});
describe('Testing JavaScript numbers', function() {
/**
... |
/**
* test the divide
*/ |
<|file_name|>iscroll.js<|end_file_name|><|fim▁begin|>/*!
* iScroll v4.1.8 ~ Copyright (c) 2011 Matteo Spinelli, http://cubiq.org
* Released under MIT license, http://cubiq.org/license
*/
(function(){
var m = Math,
vendor = (/webkit/i).test(navigator.appVersion) ? 'webkit' :
(/firefox/i).test(navigator.userAgent)... |
that.refresh();
that._bind(RESIZE_EV, window); |
<|file_name|>uart.js<|end_file_name|><|fim▁begin|>'use strict';
var fs = require('fs'),
util = require('util'),
Duplexify = require('duplexify'),
_ = require('lodash'),
su = require('bindings')('serialutil.node'),
fsu = require('./fsutil'),
pins = require('./pins'),
Dto = require('./dto'),
dto = new Dt... | if (uart._rxfd === -1 && uart._txfd === -1) {
setImmediate(function () {
uart.emit('close'); |
<|file_name|>test_universe_create.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
This pretty much just tests creating a user, a universe, a planet, a building type name, a building
type, and a building.
"""
import os
import sys
import sqlalchemy
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dir... | "rhr_active": 0,
"rhr_destructive": 0,
"build_resource_reqs": 500, |
<|file_name|>issue-18532.rs<|end_file_name|><|fim▁begin|>// Test that overloaded call parameter checking does not ICE
// when a type error or unconstrained type variable propagates
// into it.
fn main() {
(return)((),()); //~ ERROR expected function, found `!`<|fim▁hole|>}<|fim▁end|> | |
<|file_name|>_text.py<|end_file_name|><|fim▁begin|># This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, an... | 'surrogate_then_replace'))
|
<|file_name|>page.ts<|end_file_name|><|fim▁begin|>/**
* Created by d.d on 25/07/2017.
*/
export interface ITitle {
image: string;
title: string;
subtitle?: string;<|fim▁hole|><|fim▁end|> | } |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate chrono;
extern crate csv;
#[macro_use]
extern crate lazy_static;
extern crate regex;
extern crate safe_unwrap;
extern crate term_painter;
extern crate term_size;
extern crate textwrap;
extern crate try_from;
pub mod err;
mod regexes;
use chrono::{NaiveDate... | |
<|file_name|>set_insert.rs<|end_file_name|><|fim▁begin|>use crate::{cmd, Command};<|fim▁hole|>
pub trait Arg {
fn arg(self) -> cmd::Arg<()>;
}
impl Arg for Command {
fn arg(self) -> cmd::Arg<()> {
Self::new(TermType::SetInsert).with_arg(self).into_arg()
}
}<|fim▁end|> | use ql2::term::TermType; |
<|file_name|>plot_directive.py<|end_file_name|><|fim▁begin|>"""
A directive for including a matplotlib plot in a Sphinx document.
By default, in HTML output, `plot` will include a .png file with a
link to a high-res .png and .pdf. In LaTeX output, it will include a
.pdf.
The source code for the plot may be included ... | config = document.settings.env.config
nofigs = options.has_key('nofigs')
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.