prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>config.js<|end_file_name|><|fim▁begin|>/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here.
// Fo... | |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export default LoaderWorker;<|fim▁end|> | import * as LoaderWorker from 'worker-loader!./loader.worker'; |
<|file_name|>webpresence.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
For the moment we're not using this, but it would be nice to do so
at some point. It isn't really relevant to the researcher RDF export, the
idea would be to export details of a web-presence, to compile a complete directory
of websites ... | standardWebmaster = 'webmaster@medsci.ox.ac.uk'
|
<|file_name|>ResponseFactory.java<|end_file_name|><|fim▁begin|>package org.zentaur.core.http;
/*
* Copyright 2012 The Zentaur Server Project
*
* 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... | } |
<|file_name|>Compiler.java<|end_file_name|><|fim▁begin|>package compiler;
import checker.Checker;
import checker.SemanticException;
import encoder.Encoder;
import parser.Parser;
import parser.SyntacticException;
import scanner.LexicalException;
import util.FileException;
import util.AST.Programa;
/**
* C... | |
<|file_name|>area.js<|end_file_name|><|fim▁begin|>(function (window, $, _, Concrete) {
'use strict';
/**
* Area object, used for managing areas
* @param {jQuery} elem The area's HTML element
* @param {EditMode} edit_mode The EditMode instance
*/
var Area = Concrete.Area = functio... | my.setDragAreas(_(my.getDragAreas()).without(drag_area));
}
if (!my.getTotalBlocks()) { |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use std::fmt;
use std::str::FromStr;
use model::Strand;
use util;
#[derive(Clone,Debug)]
pub enum GtfFeature {
StartCodon, StopCodon, Exon, CDS, Intron, Gene, Transcript
}
#[derive(Clone,Debug,PartialEq)]
pub enum GtfAnnotation {
GeneId(String),
TranscriptId(String)... | |
<|file_name|>action.js<|end_file_name|><|fim▁begin|>/**
@module ember
@submodule ember-routing-htmlbars
*/
import Ember from "ember-metal/core"; // Handlebars, uuid, FEATURES, assert, deprecate
import { uuid } from "ember-metal/utils";
import run from "ember-metal/run_loop";
import { readUnwrappedModel } from "ember-v... | actionName = actionNameOrStream;
}
run(function runRegisteredAction() { |
<|file_name|>main_test.go<|end_file_name|><|fim▁begin|>// Copyright 2019 Istio 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.org/licenses/LICENS... | cfg.Values["nodeagent.env.VAULT_ADDR"] = vaultAddr |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (c) Mathias Kaerlev 2012.
# This file is part of Anaconda.
# Anaconda is free software: you can redistribute it and/or modify<|fim▁hole|># the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Anacon... | # it under the terms of the GNU General Public License as published by |
<|file_name|>Pyrite Colosseum.tsx<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="UTF-8"?><|fim▁hole|> <tileset name="Pyrite Colosseum" firstgid="1" tilewidth="16" tileheight="16">
<image source="Pyrite Colosseum.png" trans="000000"/>
</tileset><|fim▁end|> | |
<|file_name|>0001_squashed_0_2_9.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
import djangobmf.storage
import djangobmf.fields.file
import django.utils.timezone
... | |
<|file_name|>Inject.ts<|end_file_name|><|fim▁begin|>export function Inject(type: any) {
function decorator(target: any, property: string) {<|fim▁hole|> target[property] = new type();
}
return decorator;
}<|fim▁end|> | |
<|file_name|>idgenerator.js<|end_file_name|><|fim▁begin|>// Copyright 2008 The Closure Library 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
//
// htt... | goog.ui.IdGenerator = function() {
};
goog.addSingletonGetter(goog.ui.IdGenerator);
|
<|file_name|>common_test.go<|end_file_name|><|fim▁begin|>// Copyright 2013 Jérôme Renard. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package fs
import (
. "launchpad.net/gocheck"
"os"
)
type CommonTestSuite struct{}
var _ = Suite(&C... | func (s *CommonTestSuite) TestRmDir_NonRecursive(c *C) {
tmpDir := c.MkDir() + "/foo"
err := MkDir(tmpDir, false, 0755) |
<|file_name|>widgets.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from itertools import chain
from django.contrib.sites.models import Site
from django.core.urlresolvers import NoReverseMatch, reverse_lazy
from django.forms.widgets import Select, MultiWidget, TextInput
from django.utils.encoding import forc... | Return True if data differs from initial.
"""
# For purposes of seeing whether something has changed, None is
# the same as an empty string, if the data or inital value we get |
<|file_name|>SetupStore.ts<|end_file_name|><|fim▁begin|>import alt, { AbstractStoreModel } from '../alt';
import * as _ from 'lodash';
import connections from '../data-sources/connections';
import { DataSourceConnector, IDataSourceDictionary } from '../data-sources';
import SetupActions from '../actions/SetupActions';... | load(setupConfig: ISetupConfig) { |
<|file_name|>util.py<|end_file_name|><|fim▁begin|>#
# Copyright (C) 2012-2013 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
import codecs
from collections import deque
import contextlib
import csv
from glob import iglob as std_iglob
import io
import json
import logging
import os
import py_co... | """
Return an iterator for the subscribers for an event.
:param event: The event to return subscribers for.
""" |
<|file_name|>test__threading_patched_local.py<|end_file_name|><|fim▁begin|>from gevent import monkey; monkey.patch_all()
import threading
localdata = threading.local()
localdata.x = "hello"
assert localdata.x == 'hello'
success = []
def func():
try:
localdata.x
raise AssertionError('localdata.x m... | success.append(1)
t = threading.Thread(None, func) |
<|file_name|>parser_test.go<|end_file_name|><|fim▁begin|>package parser_test
import (
"fmt"
"testing"
"github.com/ngdinhtoan/hari/parser"
)
func TestParse(t *testing.T) {
data := []byte(`
{
"name": "Toan",
"age": 30,
"active": true,
"children": [{
"name": "Hachi",
"age": 3
},
... | errs := make(chan error)
done := make(chan bool)
go parser.Parse("Person", data, rs, errs, done) |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)]
mod gbm;
#[macro_use]
pub mod formats;
pub use self::gbm::*;
#[cfg(test)]
mod tests {
#[test]
fn macro_test() {<|fim▁hole|> assert!(__gbm_fourcc_code!(0xFF, 0x00, 0xFF, 0x00) == 0x00FF00FF);
}
}<|fim▁end|> | assert!(__gbm_fourcc_code!('X', 'R', '2', '4') == 0x34325258);
assert!(__gbm_fourcc_code!('\0', '\0', '\0', '\0') == 0); |
<|file_name|>main.js<|end_file_name|><|fim▁begin|>define(function(require) {
var test = require('../../../test')
var count = 0
require.async('./a', function(a) {
test.assert(a.name === 'a', 'load CMD module file')
done()
})
require.async('./b.js', function() {
test.assert(global.SPECS_MODULES_... | |
<|file_name|>SpellInfo.js<|end_file_name|><|fim▁begin|>import SPELLS from 'common/SPELLS/index';<|fim▁hole|> * int: spell scales with Intellect
* crit: spell scales with (is able to or procced from) Critical Strike
* hasteHpm: spell does more healing due to Haste, e.g. HoTs that gain more ticks
* hasteHpct: spell ca... |
/*
* Fields: |
<|file_name|>test_topper.py<|end_file_name|><|fim▁begin|>from unittest import TestCase
import pandas as pd
import pandas.util.testing as tm
import numpy as np
import trtools.core.topper as topper
import imp
imp.reload(topper)
arr = np.random.randn(10000)
s = pd.Series(arr)
df = tm.makeDataFrame()
class TestTopper(T... | |
<|file_name|>lt.js<|end_file_name|><|fim▁begin|>'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _functionalCurry = require('../functional/curry');
var lt = (0, _functionalCurry.curry)(function (a, b) {<|fim▁hole|><|fim▁end|> | return a < b;
});
exports.lt = lt; |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Layman is a complete library for the operation and maintainance
on all gentoo repositories and overlays
"""
import sys
try:
from layman.api import LaymanAPI
from layman.config import BareConfig
from layman.... | |
<|file_name|>0002_ingredientflavorcompound_score.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 = [
('chef_buddy', '0001_initial'),
]
operations = [<|fim... | migrations.AddField(
model_name='ingredientflavorcompound',
name='score',
field=models.FloatField(default=1.0), |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
This module contains input, output and algorithms for creating<|fim▁hole|>"""<|fim▁end|> | texture atlases. |
<|file_name|>compat.py<|end_file_name|><|fim▁begin|>try:
from urllib.parse import urljoin
<|fim▁hole|>
try:
import cPickle as pickle
except ImportError:
import pickle
# Handle the case where the requests module has been patched to not have
# urllib3 bundled as part of its source.
try:
fro... | except ImportError:
from urlparse import urljoin
|
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from app import app, grabber, merge, segment
from flask import render_template, request, url_for, jsonify
import cv2
import numpy as np
import os, re
def rm(dir, pattern):
for f in os.listdir(dir):
if re.search(pattern, f):
os.remove(os.path.jo... | |
<|file_name|>register.go<|end_file_name|><|fim▁begin|>package github
import (
"github.com/drone/config"
"github.com/armab/drone/plugin/remote"
)
var (
// GitHub cloud configuration details
githubClient = config.String("github-client", "")<|fim▁hole|> githubSecret = config.String("github-secret", "")
githubOrgs ... | |
<|file_name|>trace_pid.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Simone Margaritelli <evilsocket at gmail dot com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributio... | print "@ Injection into PID %d starting ..." % pid
|
<|file_name|>rss.py<|end_file_name|><|fim▁begin|>import os, sys
import random
import time
import feedparser
import itertools
import HTMLParser
from feed import Feed
if os.getcwd().rstrip(os.sep).endswith('feeds'):
os.chdir('..')
sys.path.insert(0, os.getcwd())
from gui_client import new_rpc
import web
import... |
self.urls = set() |
<|file_name|>ufoai_filters.cpp<|end_file_name|><|fim▁begin|>/*
This file is part of GtkRadiant.
GtkRadiant 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 the License, or
(at your option) any ... | void filter_nodraw (void)
{
if (nodraw_active) { |
<|file_name|>cell.rs<|end_file_name|><|fim▁begin|>// Lumol, an extensible molecular simulation engine
// Copyright (C) Lumol's contributors — BSD license
use std::fs::File;
use std::io::{self, BufWriter};
use std::io::prelude::*;
use std::path::{Path, PathBuf};
use log::error;
use super::Output;
use lumol_core::Syst... | |
<|file_name|>solution1.py<|end_file_name|><|fim▁begin|># Python - 2.7.6
<|fim▁hole|><|fim▁end|> | to_freud = lambda sentence: ' '.join(['sex'] * len(sentence.split(' '))) |
<|file_name|>AWTconvertTable.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# convertAWT.py - Mass Table Conversion Utility
import os
massFile = 'AWTMass-2003.dat'
newFile = os.path.join('..', 'nmrfreq', 'masstable.py')
def main():
with open(massFile, 'r') as file:
massDict = extractMasses(file)... |
def getValuesFrom(splitline):
isotope = '{0}{1}'.format(splitline[2], splitline[1]) |
<|file_name|>zepto.js<|end_file_name|><|fim▁begin|>/* Zepto v1.1.4 - zepto event ajax form ie - zeptojs.com/license */
var Zepto = (function() {
var undefined, key, $, classList, emptyArray = [], slice = emptyArray.slice, filter = emptyArray.filter,
document = window.document,
elementDisplay = {}, classCache... | .bind('MSGestureEnd', function(e){
var swipeDirectionFromVelocity =
e.velocityX > 1 ? 'Right' : e.velocityX < -1 ? 'Left' : e.velocityY > 1 ? 'Down' : e.velocityY < -1 ? 'Up' : null; |
<|file_name|>enable_stratagem_button.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2020 DDN. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
use crate::{
components::{
font_awesome_outline,
stratagem::{Command, Stratage... | use seed::{prelude::*, *};
|
<|file_name|>VirtualKeyboard.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General... | |
<|file_name|>type.rs<|end_file_name|><|fim▁begin|>// rustfmt-normalize_comments: true
fn types() {
let x: [Vec<_>] = [];
let y: *mut [SomeType; konst_funk()] = expr();
let z: (// #digits
usize,
// exp
i16) = funk();
let z: (usize /* #digits */, i16 /* exp */) = funk()... | |
<|file_name|>list.rs<|end_file_name|><|fim▁begin|>//! Tests for the list channel flavor.
use std::any::Any;
use std::sync::atomic::AtomicUsize;
use std::sync::atomic::Ordering;
use std::thread;
use std::time::Duration;
use crossbeam_channel::{select, unbounded, Receiver};
use crossbeam_channel::{RecvError, RecvTimeou... | if i % 2 == 0 {
thread::sleep(ms(50));
}
s.send(i).unwrap(); |
<|file_name|>conditional_euclidean_clustering.hpp<|end_file_name|><|fim▁begin|>/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2009, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or with... | #ifndef PCL_SEGMENTATION_IMPL_CONDITIONAL_EUCLIDEAN_CLUSTERING_HPP_ |
<|file_name|>test_callbacks.py<|end_file_name|><|fim▁begin|>import pytest
from collections import namedtuple
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_less
from skopt import dummy_minimize
from skopt.benchmarks import bench1
from skopt.callbacks import TimerCallback
from... | |
<|file_name|>errors.py<|end_file_name|><|fim▁begin|>#
# Copyright 2013 Quantopian, 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/LICENSE-2.0
#
# ... | |
<|file_name|>FaviconColumnManager.js<|end_file_name|><|fim▁begin|>/*
Copyright 2008-2015 Clipperz Srl
This file is part of Clipperz, the online password manager.
For further information about its features and functionalities please
refer to http://www.clipperz.com.
* Clipperz is free software: you can redistribute i... |
*/
|
<|file_name|>Movable.java<|end_file_name|><|fim▁begin|>package com.example;
/**<|fim▁hole|> * Created by Nish on 2/21/15.
*/
public interface Movable {
public void moveLeft();
public void moveRight();
}<|fim▁end|> | |
<|file_name|>test_database.py<|end_file_name|><|fim▁begin|>import os
from unittest import TestCase
from mock import patch
from os.path import exists
import shutil
from carbon.tests.util import TestSettings
from carbon.database import WhisperDatabase, CeresDatabase
class WhisperDatabaseTest(TestCase):
def setUp(... | |
<|file_name|>journals.py<|end_file_name|><|fim▁begin|>from django.http import Http404
from django.shortcuts import get_object_or_404
from django.urls.base import reverse_lazy as reverse
from django.utils.translation import ugettext_lazy as _
from ..forms.journals import JournalEntryForm, JournalForm, JournalLeaderEntr... | return ( |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
# All Rights Reserved
############... | # (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
<|file_name|>mod.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... | assert!(match region {
ty::ReLateBound(..) => false,
_ => true |
<|file_name|>TargetManagementSearchTest.java<|end_file_name|><|fim▁begin|>/**
* Copyright (c) 2015 Bosch Software Innovations GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distri... | |
<|file_name|>sprites.py<|end_file_name|><|fim▁begin|>import time
import pygame
import colors
class Spritesheet():
surface = None
size = (0, 0)
def __init__(self, surface, size):
self.surface = surface
self.size = size
def get(self, x, y):
surf = pygame.Surface(self.size, py... | return Animation(self.frames, self.fps)
|
<|file_name|>base.py<|end_file_name|><|fim▁begin|>"""
This file contains the DynamicsValidator class for validating component
:copyright: Copyright 2010-2017 by the NineML Python team, see AUTHORS.
:license: BSD-3, see LICENSE for details.
"""
from builtins import object
from nineml.visitors.validators import NoDuplic... | |
<|file_name|>nodes.py<|end_file_name|><|fim▁begin|>"""
@name: Modules/Computer/Nodes/nodes.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: (c) 2014-2030 by D. Brian Kimmel
@license: MIT License
@note: Created on Mar 6, 2014
@summary: This module does everything for nodes.
N... | __version_info__ = (20, 1, 24)
__version__ = '.'.join(map(str, __version_info__))
|
<|file_name|>login.test.js<|end_file_name|><|fim▁begin|>import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import fetchMock from 'fetch-mock';
import {
fetchLogin,
testing,
} from './login';
const mockStore = configureMockStore([thunk]);
beforeEach(() => {
fetchMock.restore();
... | fetchMock.post(`${testing.base_url}/auth/login/`, {
status: 200,
body: {success: true},
}); |
<|file_name|>lximage-qt_cs.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="cs">
<context>
<name>HiddenShortcutsDialog</name>
<message>
<location filename="../shortcuts.ui" line="14"/>
<source>Hidden Shortcuts</source>
<tran... | <location filename="../mainwindow.ui" line="690"/>
<source>Copy Pa&th</source> |
<|file_name|>NotFoundPageContainer.tsx<|end_file_name|><|fim▁begin|>import { connect } from 'react-redux';
import { Dispatch } from 'redux';
import NotFoundPage from './NotFoundPage';
import { State } from '../../redux-data/state';
import { setCurrentPath } from '../../redux-data/actions/currentPathActions';
const ma... | };
const mapDispatchToProps = (dispatch: Dispatch<State>) => {
return { |
<|file_name|>structCO__config__t.js<|end_file_name|><|fim▁begin|>var structCO__config__t =
[
[ "CNT_NMT", "structCO__config__t.html#aeef814580eb5ece5156e63bfc1b490c9", null ],
[ "ENTRY_H1017", "structCO__config__t.html#ad17f77b55de3d90ec983fcac49eeab6d", null ],<|fim▁hole|> [ "CNT_EM", "structCO__config__t.h... | [ "CNT_HB_CONS", "structCO__config__t.html#a0031fc8f80e95f8480c918dbf8289671", null ],
[ "ENTRY_H1016", "structCO__config__t.html#a0af4cf7d0355861e7f60206d794d6a91", null ], |
<|file_name|>base_module.py<|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 Apa... | Usually involves switching bucket and reshaping.
For modules that contain `row_sparse` parameters in KVStore,
it prepares the `row_sparse` parameters based on the sparse_row_id_fn.
|
<|file_name|>engine.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::fmt::Debug;
use std::os::unix::io::RawFd;
use std::path:... | /// Get all the filesystems belonging to this pool as mutable references.
fn filesystems_mut(&mut self) -> Vec<(Name, FilesystemUuid, &mut Filesystem)>; |
<|file_name|>mapgen.py<|end_file_name|><|fim▁begin|>import pygame
import random
import item
import mob
import tile
class Mapgen(object):
def __init__(self, level):
self.xsiz = 10
self.ysiz = 10
self.biome = "random"
self.procedure = 0
self.zone = []
self.level = leve... | for location in place.neighbors:
if location.flavnum in excepts:
pass |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2014 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licens... | "membership": membership
} |
<|file_name|>array_comment.rs<|end_file_name|><|fim▁begin|>// Issue 2842
// The comment should not make the last line shorter
static XXX: [i8; 64] = [
1, // Comment
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
];
static XXX: [i8; 64] = [
1, // Comment
1,... | ];
static XXX: [i8; 64] = [ |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2018 Google Inc. 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
#<|fim▁hole|># Unless required by appli... | # http://www.apache.org/licenses/LICENSE-2.0
# |
<|file_name|>VersionCheckUtil.java<|end_file_name|><|fim▁begin|>package com.zimbra.cs.versioncheck;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import java.util.Date;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.Parse... | VersionUpdate update = iter.next();
String critical;
if(update.isCritical()) {
critical = "critical"; |
<|file_name|>paper-item.js<|end_file_name|><|fim▁begin|>/**
* @module ember-paper
*/
import Ember from 'ember';
import RippleMixin from '../mixins/ripple-mixin';
import ProxyMixin from 'ember-paper/mixins/proxy-mixin';
const {
get,
set,
isEmpty,
computed,
run,
Component
} = Ember;
/**
* @class PaperIte... | this.sendAction('onClick', ev);
}, |
<|file_name|>OrderItemTypeCell.tsx<|end_file_name|><|fim▁begin|><|fim▁hole|> ({
Create: translate('Create'),
Update: translate('Update'),
Terminate: translate('Terminate'),
}[row.type]);<|fim▁end|> | import { translate } from '@waldur/i18n';
export const OrderItemTypeCell = ({ row }) => |
<|file_name|>nova.py<|end_file_name|><|fim▁begin|># Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 OpenStack Foundation
# Copyright 2012 Nebula, Inc.
# Copyright (c) 2012 X.commerce, a business... | return marker |
<|file_name|>all.js<|end_file_name|><|fim▁begin|>import { setData } from '@progress/kendo-angular-intl';
setData({
name: "pt-CH",
identity: {
language: "pt",
territory: "CH"
},
territory: "CH",
numbers: {
symbols: {
decimal: ",",
group: " ",
... | symbol: "SOS" |
<|file_name|>test_tune_server.py<|end_file_name|><|fim▁begin|>import os
import requests
import socket
import subprocess
import unittest
import json
import ray
from ray.rllib import _register_all
from ray.tune.trial import Trial, Resources
from ray.tune.web_server import TuneClient
from ray.tune.trial_runner import Tri... | |
<|file_name|>StorageTierAssocTest.java<|end_file_name|><|fim▁begin|>/*
* The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
* (the "License"). You may not use this work except in compliance with the License, which is
* available at www.apache.org/licenses/LICENSE-2.0
*
* This soft... | *
* See the NOTICE file distributed with this work for information regarding copyright ownership. |
<|file_name|>writer.rs<|end_file_name|><|fim▁begin|>use schema::{Schema, Field, Document};
use fastfield::FastFieldSerializer;
use std::io;
use schema::Value;
use DocId;
use schema::FieldType;
use common;
use common::VInt;
use common::BinarySerializable;
/// The fastfieldswriter regroup all of the fast field writers.
... | .enumerate()
.flat_map(|(field_id, field_entry)| { |
<|file_name|>bootstrap.js<|end_file_name|><|fim▁begin|>/* ===================================================
* bootstrap-transition.js v2.0.1
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under t... | |
<|file_name|>kooli-xbmc-service.py<|end_file_name|><|fim▁begin|>'''
qobuz.extension.kooli.script.kooli-xbmc-service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<|fim▁hole|>from os import path as P
import SocketServer
import socket
import sys
import threading
import time
base_path = P.abspath(P.dirname(__fi... | :part_of: kodi-qobuz
:copyright: (c) 2012-2018 by Joachim Basmaison, Cyril Leclerc
:license: GPLv3, see LICENSE for more details.
''' |
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|>import os
import pytest
from datetime import time
from sport_systems import stats
BASE_DIR = os.path.dirname(__file__)
@pytest.fixture
def response_1():
path = os.path.join(BASE_DIR, 'response-1.xml')
with open(path, 'rb') as fin:
data = fin.rea... | @pytest.fixture
def results_1():
return [ |
<|file_name|>load-balancer-weighted-target.ts<|end_file_name|><|fim▁begin|>/*
* Copyright 2020 gRPC 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.a... |
this.updateState();
|
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
from nagu import (get_color, pack_color, pack, reset,
sequence, parse_line, html)
def test_get_color():
"""
>>> assert get_color(0) == ""
>>> assert get_color(13) == "color: #ff0;"
>>> assert get_color... | >>> line = ''.join([x for x in parse_line(string)])
>>> assert line == result
>>> reset() |
<|file_name|>types.d.ts<|end_file_name|><|fim▁begin|>export declare type DHOptions = {<|fim▁hole|> closeClass?: string;
html?: (data: DHOptions) => string;
};<|fim▁end|> | title?: string;
headerClass?: string;
titleRowClass?: string;
labelClass?: string; |
<|file_name|>Curses-GoL-0.9.py<|end_file_name|><|fim▁begin|>import curses
import sys
import time
import os.path
import random
import pickle
from curses import wrapper
gamedims = [5,22]
currPos = [10,10]
currPosList = [1,3]
def main(stdscr):#{
curses.start_color()
curses.init_pair(1, curses.COLOR_WHITE, curses.COLO... | print ('1') |
<|file_name|>Snow2.rube-scriptLog-150421-151103.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>//Restarted script log at 04/21/15 15:11:03<|fim▁end|> | |
<|file_name|>market_evaluator.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2015 Cryptonomex, Inc., and contributors.
*
* The MIT License
*
* 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... | d.cancel_order(*_order, false /* don't create a virtual op*/);
// Possible optimization: order can be called by canceling a limit order iff the canceled order was at the top of the book. |
<|file_name|>ScoreNotification.java<|end_file_name|><|fim▁begin|>package com.thebluealliance.androidclient.gcm.notifications;
import android.app.Notification;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.support.v4.app.NotificationCompat;
import an... | |
<|file_name|>material.hpp<|end_file_name|><|fim▁begin|>//
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2004-2015 Steve Baker <sjbaker1@airmail.net>
// Copyright (C) 2010-2015 Steve Baker, Joerg Henrichs
//
// This program is free software; you can redistribute it and/or
// modify it under the ... | /** Returns the zipper parametersfor the current material. */
void getZipperParameter(float *zipper_max_speed_increase, |
<|file_name|>ReclassifyPanel.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Subclass of wx.Panel"""
#-----------------------------------------------------------------------------------------
#Import
try:
#wxPython
import wx
import wx.grid
import wx.lib.scrolledpanel
... | self.__buildButtonPanel() |
<|file_name|>outfits.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
def outfit():
collection = []
for _ in range(0, 5):
collection.append("Item{}".format(_))
return {
"data": collection,
}<|fim▁hole|>
api = [
('/outfit', 'outfit', outfit),
]<|fim▁end|> | |
<|file_name|>toxml.rs<|end_file_name|><|fim▁begin|>// This file is part of rss.
//
// Copyright © 2015-2017 The rust-syndication Developers
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the MIT License and/or Apache 2.0 License.
use std::io::Write;
use quick_xml::... | |
<|file_name|>Vo.java<|end_file_name|><|fim▁begin|>package tk.teemocode.module.base.vo;
import java.io.Serializable;
public class Vo implements Serializable, Cloneable {
private Long id;
private String uuid;
private Integer tag;
public Long getId() {
return id;
<|fim▁hole|> this.id = id;
}
... | }
public void setId(Long id) {
|
<|file_name|>PresetMerge.cpp<|end_file_name|><|fim▁begin|>#include "PresetMerge.hpp"
#include <iostream>
void PresetMerger::MergePresets(PresetOutputs & A, PresetOutputs & B, mathtype ratio, int gx, int gy)
{
mathtype invratio = mathval(1.0f) - ratio;
//Merge Simple Waveforms
//
// All the mess is because of... | A.mv_b = mathmul(A.mv_b, invratio) + mathmul(B.mv_b, ratio);
A.mv_l = mathmul(A.mv_l, invratio) + mathmul(B.mv_l, ratio);
A.mv_x = mathmul(A.mv_x, invratio) + mathmul(B.mv_x, ratio);
A.mv_y = mathmul(A.mv_y, invratio) + mathmul(B.mv_y, ratio); |
<|file_name|>MenuSection.java<|end_file_name|><|fim▁begin|>package com.sind.projectx.domain.food.menu;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;
import java.util.ArrayList;<|fim▁hole|>import java.util.List;
/**
* @author Dmytro Bekuzarov
*/
public cl... | |
<|file_name|>auth.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""Request handler for authentication."""
from __future__ import unicode_literals
import logging
import random
import string
import time
from builtins import range
import jwt
from medusa import app, helpers, notifiers
from medusa.logger.adapters.style ... | """Auth request handler."""
|
<|file_name|>country-list-sort.component.spec.ts<|end_file_name|><|fim▁begin|>import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CountryListSortComponent } from './country-list-sort.component';
<|fim▁hole|>
beforeEach(async(() => {
TestBed.configureTestingModule({
declaratio... | describe('CountryListSortComponent', () => {
let component: CountryListSortComponent;
let fixture: ComponentFixture<CountryListSortComponent>; |
<|file_name|>group___s_t_m32_f4xx___h_a_l___driver.js<|end_file_name|><|fim▁begin|>var group___s_t_m32_f4xx___h_a_l___driver =
[
[ "CRC", "group___c_r_c.html", "group___c_r_c" ],
[ "GPIOEx", "group___g_p_i_o_ex.html", "group___g_p_i_o_ex" ],
[ "AHB3 Peripheral Clock Enable Disable", "group___r_c_c_ex___a_h_... | [ "TIM", "group___t_i_m.html", "group___t_i_m" ],
[ "TIMEx", "group___t_i_m_ex.html", "group___t_i_m_ex" ],
[ "UART", "group___u_a_r_t.html", "group___u_a_r_t" ], |
<|file_name|>carousel.ngfactory.ts<|end_file_name|><|fim▁begin|>/**
* This file is generated by the Angular 2 template compiler.
* Do not edit.
*/
/* tslint:disable */
import * as import0 from '@angular/core/src/linker/ng_module_factory';
import * as import1 from '../../../components/carousel/carousel';
import * a... | return this.__NgLocalization_4; |
<|file_name|>test-0002.js<|end_file_name|><|fim▁begin|>/*
comment
*/<|fim▁hole|>*//1+g+"\/*"/i, x = 3,
a = 2/1/g, b = (i)/i/i/*
*/, s = 'aaa\
bbb\
ccc'; var z = 1;<|fim▁end|> | var g = 1, i = 2, j = 2/* |
<|file_name|>Transformer.java<|end_file_name|><|fim▁begin|>package net.tqft.iterables.interfaces;
<|fim▁hole|>public interface Transformer<S, T> {
public abstract T evaluate(S s);
}<|fim▁end|> | |
<|file_name|>test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from django.test import TestCase<|fim▁hole|>from django.core.urlresolvers import reverse
class TestHomePage(TestCase):
def test_uses_index_template(self):
response = self.client.get(reverse("home"))
self.assertTemplateUs... | |
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from flask_wtf import Form
from flask_wtf.file import FileRequired, FileAllowed, FileField
from wtforms import StringField, BooleanField, PasswordField, TextAreaField
from wtforms.validators import DataRequired, Email, Length
class SignUpForm(Form):
username = St... |
class PostForm(Form): |
<|file_name|>indexes.py<|end_file_name|><|fim▁begin|># Copyright 2013 Donald Stufft
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | |
<|file_name|>submission_page.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import time
import curses
from . import docs
from .content import SubmissionContent, SubredditContent
from .page import Page, PageController, logged_in
from .objects import Navigator, Color, Co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.