prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>defaults.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The GLFW-RS Developers. For a full listing of the authors,
// refer to the AUTHORS file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in co... | }
|
<|file_name|>shortcuts.py<|end_file_name|><|fim▁begin|># Copyright (c) 2008 Mikeal Rogers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICE... | #
# Unless required by applicable law or agreed to in writing, software |
<|file_name|>ewk_history.cpp<|end_file_name|><|fim▁begin|>/*
Copyright (C) 2009-2010 ProFUSION embedded systems
Copyright (C) 2009-2010 Samsung Electronics
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published ... | Eina_List* result = 0;
unsigned int size;
size = coreItems.size(); |
<|file_name|>redis_storage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
import log... |
from json import loads, dumps
from datetime import datetime, timedelta
|
<|file_name|>DefaultPage.tsx<|end_file_name|><|fim▁begin|>import { useState } from "react";
import logo from "../logo.svg";
import { css, keyframes } from "@emotion/react";
import { Tooltip } from "../components/Tooltip";
import { Barrier } from "../infrastructures/Barrier";
import { Button } from "../components/Button... | `} |
<|file_name|>AssemblyVisitorAdapter.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2009, Rickard Öberg. 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|>index.js<|end_file_name|><|fim▁begin|>// Xiongxiong
// Bearer token codec
// AGPLv3 or later
// Copyright (c) 2014, 2015 Genome Research Limited
var crypto = require('crypto');
module.exports = function(/* privateKey, lifetime, algorithm OR hash */) {
var privateKey, lifetime, algorithm,
xiongxi... | |
<|file_name|>core.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu>
#
# 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
#
# h... | mathematically on integers. |
<|file_name|>DefaultTrainingPlanService.java<|end_file_name|><|fim▁begin|>package org.apache.rave.portal.service.impl;
import org.apache.rave.model.ExcercicesHasTrainingPlan;
import org.apache.rave.model.Serie;
import org.apache.rave.model.TrainingPlan;
import org.apache.rave.portal.repository.ExcercicesHasTrainingPla... | import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; |
<|file_name|>oauth2.go<|end_file_name|><|fim▁begin|>package integrations
import (
"fmt"
"os"
"github.com/cloudfoundry-community/go-cfenv"
)
//New - create a new oauth2 integration wrapper
func (s *MyOAuth2) New(appEnv *cfenv.App) *MyOAuth2 {
oauth2ServiceName := os.Getenv("OAUTH2_SERVICE_NAME")
clientIdName := ... | s.ID = oauth2Service.Credentials[clientIdName] |
<|file_name|>python.py<|end_file_name|><|fim▁begin|>""" Python test discovery, setup and run of test functions. """
import re
import fnmatch
import functools
import py
import inspect
import sys
import pytest
from _pytest.mark import MarkDecorator, MarkerError
from py._code.code import TerminalRepr
try:
import enum... | "imported module %r has this __file__ attribute:\n"
" %s\n" |
<|file_name|>debug.js<|end_file_name|><|fim▁begin|>'use strict';
var fs = require('fs');
var path = require('path');
var util = require('util');
var dbg = require('debug');
// process.env.TABTAB_DEBUG = process.env.TABTAB_DEBUG || '/tmp/tabtab.log';
var out = process.env.TABTAB_DEBUG ? fs.createWriteStream(process.e... | } |
<|file_name|>5ab66e956c6b_osversion_osmajor_id_non_nullable.py<|end_file_name|><|fim▁begin|># 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 2 of the License, or
# (at your option)... | |
<|file_name|>coala.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import os
import shutil
import sys
import dirtyjson as json
from ..decorators import linter
from ..parsers.base import ParserBase
@linter(
name="coala",
install=[
["pi... | if not any(
dotfile.strip() in os.listdir(os.getcwd())
for dotfile in self.config.get("dotfiles") |
<|file_name|>ui.rs<|end_file_name|><|fim▁begin|>//
// imag - the personal information management suite for the commandline
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
//<|fim▁hole|>// This library is free software; you can redistribute it and/or
// modify it under the terms of th... | |
<|file_name|>ReportConfigController.js<|end_file_name|><|fim▁begin|>/**
* Genji Scrum Tool and Issue Tracker
* Copyright (C) 2015 Steinbeis GmbH & Co. KG Task Management Solutions
* <a href="http://www.trackplus.com">Genji Scrum Tool</a>
*
* This program is free software: you can redistribute it and/or modify
* ... | |
<|file_name|>test_counts.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
from django.db import models
from django.test import TestCase
from django.utils import timezone
from analytics.lib.counts import CountStat, COUNT_STATS, process_count_stat, \
zerver_count_user_by_realm, zerver_count_me... | # messages_* CountStats |
<|file_name|>round_to_multiple.rs<|end_file_name|><|fim▁begin|>use malachite_base::num::arithmetic::traits::{RoundToMultiple, RoundToMultipleAssign};
use malachite_base_test_util::bench::{run_benchmark, BenchmarkType};
use malachite_base_test_util::generators::common::{GenConfig, GenMode};
use malachite_base_test_util:... | } |
<|file_name|>test_notebook.py<|end_file_name|><|fim▁begin|>#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#--------... | |
<|file_name|>app.py<|end_file_name|><|fim▁begin|>import flask
import json<|fim▁hole|>import sys
from fontana import twitter
import pymongo
DEFAULT_PORT = 2014
DB = 'fontana'
connection = pymongo.Connection("localhost", 27017)
db = connection[DB]
latest_headers = {}
MODERATED_SIZE = 40
class MongoEncoder(json.JSO... | import bson
import os
from flask import request, redirect |
<|file_name|>usb_policy_allowed_devices.cc<|end_file_name|><|fim▁begin|>// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/usb/usb_policy_allowed_devices.h"
#include <string>
#inc... | parsed_set.insert(std::move(origin));
} |
<|file_name|>p05_remove_search_criteria_reports.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
def execute():
try:
webnotes.conn.sql("""delete f... | except Exception, e: |
<|file_name|>wrap-layout.d.ts<|end_file_name|><|fim▁begin|>declare module "ui/layouts/wrap-layout" {
import layout = require("ui/layouts/layout-base");
import dependencyObservable = require("ui/core/dependency-observable");
/**
* WrapLayout position children in rows or columns depending on orientation... | public static orientationProperty: dependencyObservable.Property;
/**
* Represents the observable property backing the itemWidth property of each WrapLayout instance. |
<|file_name|>test_worker_medium.py<|end_file_name|><|fim▁begin|># -*- Mode: Python; test-case-name:flumotion.test.test_worker_worker -*-
# vi:si:et:sw=4:sts=4:ts=4
# Flumotion - a streaming media server
# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L.
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All... |
def setUp(self):
self.realm = TestWorkerRealm()
|
<|file_name|>variables_2.js<|end_file_name|><|fim▁begin|>var searchData=
[
['slot_5fcount',['SLOT_COUNT',['../classmastermind_1_1_mastermind.html#ad4cfc8127641ff8dfe89d65ae232331c',1,'mastermind::Mastermind']]]<|fim▁hole|><|fim▁end|> | ]; |
<|file_name|>test_closeness_centrality.py<|end_file_name|><|fim▁begin|>"""
Tests for closeness centrality.
"""
import pytest
import networkx as nx
from networkx.testing import almost_equal
class TestClosenessCentrality:
@classmethod
def setup_class(cls):
cls.K = nx.krackhardt_kite_graph()
cls.... | # Tests for incremental closeness centrality.
# |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | import { isTypedArray } from "../index";
export = isTypedArray; |
<|file_name|>plotting.py<|end_file_name|><|fim▁begin|>import numpy as np
import matplotlib.pyplot as plt
from stimulus import *
from myintegrator import *
from functions import *
import matplotlib.gridspec as gridspec
import cPickle as pickle
#-------------------------------------------------------------------
#-------... | ax2B.set_title('(B)',x=1.028,y=1.04) |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import Y... | "generated-type": """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="ip", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='leafr... |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![crate_type="staticlib"]
#![feature(alloc)]
#![feature(allocator)]
#![feature(arc_counts)]
#![feature(augmented_assignments)]
#![feature(asm)]
#![feature(box_syntax)]
#![feature(collections)]
#![feature(const_fn)]
#![feature(core_intrinsics)]
#![feature(core_str_ext)]... | /// Take regs for kernel calls and exceptions
pub extern "cdecl" fn kernel(interrupt: usize, mut regs: &mut Regs) {
macro_rules! exception_inner {
($name:expr) => ({ |
<|file_name|>types.py<|end_file_name|><|fim▁begin|>from typing import Any, Dict, List, Union
from flask import abort, flash, g, render_template, url_for
from flask_babel import format_number, lazy_gettext as _
from werkzeug.utils import redirect
from werkzeug.wrappers import Response
from openatlas import app
from op... | from openatlas.util.util import link, required_group, sanitize
def walk_tree(nodes: List[int]) -> List[Dict[str, Any]]: |
<|file_name|>prob11_DiamondInTheRough-lee.js<|end_file_name|><|fim▁begin|>// Diamond-in-the-Rough
// Code Wars program written in JavaScript for the RingoJS environment
//
<|fim▁hole|>// The MIT License (MIT)
//
// Copyright (c) 2015 Lee Jenkins
//
// Permission is hereby granted, free of charge, to any person ob... | |
<|file_name|>LintabDevice.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright (C) 2010 Lucas Madar and Peter Brewer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public Lice... | }
|
<|file_name|>test.spec.js<|end_file_name|><|fim▁begin|>describe('Home Page', () => {<|fim▁hole|> it('Should load correctly', () => {
cy.visit('/')
cy.get('div.marketing-content')
.should('contain', 'Real-time Retrospectives')
});
it('Should login and write a post', () => {
cy.get('.MuiButton-... | |
<|file_name|>repl.rs<|end_file_name|><|fim▁begin|>use commands;
use error::*;
use std::io::{self, Write};
use std::path::Path;
use std::u64;
pub fn run<P>(path: P) -> Result<()>
where P: AsRef<Path>
{
let path = path.as_ref();
io::stdout().write(b"\n>>> ")?;
io::stdout().flush()?;
loop {
... | |
<|file_name|>plot_throughput_factor_experiment.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-<|fim▁hole|># All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistribu... | # Simple script which takes a file with one packet latency (expressed as a
# signed integer) per line and plots a trivial histogram.
# Copyright (c) 2015, Malte Schwarzkopf |
<|file_name|>other.py<|end_file_name|><|fim▁begin|>""" Contains functions to fetch info from different simple online APIs."""
import util.web
def urbandictionary_search(search):
"""
Searches urbandictionary's API for a given search term.
:param search: The search term str to search for.
:return: defen... | You must have a working API key to be able to use this function.
|
<|file_name|>Tests.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2011-2016 The Flericoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "Globals.h"
#include "CryptoNoteCore/Account.h"
#include "Crypt... | consilium.subscribeAll(); |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, include, url
from django.contrib import admin
import views
urlpatterns = patterns('',
url(r'^add_model_abox', 'tadaa.views.add_model_abox'),
url(r'^add_model', 'tadaa.views.add_model'),
url(r'^list_models', 'tadaa.view... | url(r'^home', 'tadaa.views.home'),
url('', 'tadaa.views.home'),
) |
<|file_name|>Mp4AudioHeader.java<|end_file_name|><|fim▁begin|>package org.jaudiotagger.audio.mp4;
import org.jaudiotagger.audio.generic.GenericAudioHeader;
import org.jaudiotagger.audio.mp4.atom.Mp4EsdsBox;
/**
* Store some additional attributes not available for all audio types
*/
public class Mp4AudioHeader exten... | return (Mp4EsdsBox.AudioProfile) content.get(FIELD_PROFILE);
}
|
<|file_name|>firebase.py<|end_file_name|><|fim▁begin|>try:
import urlparse
except ImportError:
#py3k
from urllib import parse as urlparse
import json
from .firebase_token_generator import FirebaseTokenGenerator
from .decorators import http_connection
from .multiprocess_pool import process_pool
from .json... | |
<|file_name|>platformstyle.js<|end_file_name|><|fim▁begin|>// Copyright (C) 2015 Sam Parkinson
// This program is free software; you can redistribute it and/or
// modify it under the terms of the The GNU Affero General Public
// License as published by the Free Software Foundation; either
// version 3 of the License, ... | |
<|file_name|>plotf.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
import sys
import numpy as np
from spc import SPC
import matplotlib.pyplot as plt
def plot(files, fac=1.0):
for f in files:
if f.split('.')[-1] == 'xy':
td = np.loadtxt(f)
plt.plot(td[:, 0], np.log(1. / td[:, 1]) * fac... | #!/usr/bin/env python3 |
<|file_name|>gen_utils.py<|end_file_name|><|fim▁begin|>import json
import shutil
import sys
import warnings
from itertools import zip_longest
import s3fs
from smart_open import open
from tqdm import tqdm
def session_type():
if 'IPython' not in sys.modules:
# IPython hasn't been imported, definitely not
... | with open(path, 'wb', transport_params=transport_params) as fout:
shutil.copyfileobj(fin, fout)
|
<|file_name|>D3Utils.d.ts<|end_file_name|><|fim▁begin|>import { IDataType } from 'phovea_core';<|fim▁hole|> static transform(x?: number, y?: number, rotate?: number, scaleX?: number, scaleY?: number): d3.Transform;
/**
* utility function to handle selections
* @param data
* @param $data
* @pa... | import * as d3 from 'd3';
export declare class D3Utils { |
<|file_name|>hashmap-lifetimes.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.o... | let mut my_stuff = std::collections::HashMap::new();
my_stuff.insert(0i, 42i);
|
<|file_name|>gizmos.py<|end_file_name|><|fim▁begin|># BlenderBIM Add-on - OpenBIM Blender Add-on
# Copyright (C) 2020, 2021 Maxim Vasilyev <qwiglydee@gmail.com>
#
# This file is part of BlenderBIM Add-on.
#
# BlenderBIM Add-on is free software: you can redistribute it and/or modify
# it under the terms of the GNU Gener... | |
<|file_name|>styles.js<|end_file_name|><|fim▁begin|>import { StyleSheet } from 'react-native'
const s = StyleSheet.create({
flexRowAround: {
flexDirection: 'row',
justifyContent: 'space-around',
},
dot: {
height: 7,
width: 7,
borderRadius: 3.5,
},
green: {
color: '#50d2c2',
},
fle... | },
activeMonth:{
backgroundColor: '#50d2c2',
borderRadius: 5 |
<|file_name|>pnl_mrf_example.cpp<|end_file_name|><|fim▁begin|>//#include "stdafx.h"
#include <pnl_dll.hpp>
#include <boost/smart_ptr.hpp>
#include <iostream>
namespace {
namespace local {
// [ref] testGetFactorsMRF2() in ${PNL_ROOT}/c_pgmtk/tests/src/AGetParametersTest.cpp
<|fim▁hole|> const int numNodeType... | pnl::CMRF2 * create_simple_pairwise_mrf()
{
const int numNodes = 7;
|
<|file_name|>make_bb_spectrum_plot.py<|end_file_name|><|fim▁begin|>import ROOT
from math import pi, sqrt, pow, exp
import scipy.integrate
import numpy
from array import array
alpha = 7.2973e-3
m_e = 0.51099892
Z_Xe = 54
Q = 2.4578
def F(Z, KE):
E = KE + m_e
W = E/m_e
Z0 = Z + 2
if W <= 1:
W... | E2 = 0.5*(K+D) + 1
|
<|file_name|>Geo.tsx<|end_file_name|><|fim▁begin|>import {getConfig} from "../../helpers/getConfig";
import {Post} from "../facebook/Post";
import {getQuestionTitleByType} from "../../helpers/getQuestionTitleByType";
import * as Model from "../../../common/models/questions/geolocation/Marker";
import {Button} from "rea... | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Intecture Developers.
//
// Licensed under the Mozilla Public License 2.0 <LICENSE or
// https://www.tldrlegal.com/l/mpl-2.0>. This file may not be copied,
// modified, or distributed except according to those terms.
//! OS abstractions for `Telem... | pub use self::debian::Debian; |
<|file_name|>collection-versions.js<|end_file_name|><|fim▁begin|>const jwt = require("jwt-simple");
const co = require('co');
const config = require('../config');
const dbX = require('../db');
const coForEach = require('co-foreach');
<|fim▁hole|> let token = socket.handshake.query.token;
// let isReconnect = s... | module.exports = (io) => {
const collectionVersionsNS = io.of('/collectionVersions');
collectionVersionsNS.use((socket, next) => { |
<|file_name|>0003_convert_recomended_articles.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from molo.core.models import ArticlePage, ArticlePageRecommendedSections
from wagtail.wagtailcore.blocks import StreamValue
def create_recomen... | ] |
<|file_name|>noParameterPropertiesRule.d.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright 2013 Palantir Technologies, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.<|fim▁hole|> * Unless required by applicable law... | * You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* |
<|file_name|>server.js<|end_file_name|><|fim▁begin|>var util = require('util');
var async = require('async');
var path = require('path');
var Router = require('../utils/router.js');
var sandboxHelper = require('../utils/sandbox.js');
// Private fields
var modules, library, self, private = {}, shared = {};
private.loa... | res.status(500).send({success: false, error: "Blockchain is loading"}); |
<|file_name|>notifications.rs<|end_file_name|><|fim▁begin|>use std::path::Path;
use std::fmt::{self, Display};
use url::Url;
use notify::NotificationLevel;
#[derive(Debug)]
pub enum Notification<'a> {
CreatingDirectory(&'a str, &'a Path),
LinkingDirectory(&'a Path, &'a Path),
CopyingDirectory(&'a Path, &... | CreatingDirectory(name, path) => {
write!(f, "creating {} directory: '{}'", name, path.display()) |
<|file_name|>planetName.py<|end_file_name|><|fim▁begin|>def get_planet_name(id):
switch = {
1: "Mercury",<|fim▁hole|> 6: "Saturn",
7: "Uranus" ,
8: "Neptune"}
return switch[id]<|fim▁end|> | 2: "Venus",
3: "Earth",
4: "Mars",
5: "Jupiter", |
<|file_name|>footer.component.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core';
import { TodoStore } from '../shared/services/todo.store';
import { EmitterService } from '../shared/services/emitter.service';
import {
LogMethod,
LogProperty,
LogPropertyWithArgs,
LogClass,
... | /**
* The footer component |
<|file_name|>Image.py<|end_file_name|><|fim▁begin|># coding: utf-8
#
# Copyright 2014 The Oppia 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://w... | class Image(base.BaseRichTextComponent):
"""A rich-text component representing an inline image.""" |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>"""config URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatter... | url(r'^stats/', include('stats.urls'))
] |
<|file_name|>htmlappletelement.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::codegen::HTMLAppletElementBindin... | |
<|file_name|>Channeling.ts<|end_file_name|><|fim▁begin|>import SPELLS from 'common/SPELLS';
import { AbilityEvent, Ability, CastEvent, EndChannelEvent } from 'parser/core/Events';
import { Options } from 'parser/core/Module';
import CoreChanneling from 'parser/shared/modules/Channeling';
import Penance from '../spells... | // If a channeling spell is "canceled" it was actually just ended, so if it looks canceled then instead just mark it as ended
debug &&
this.debug(
'Marking', |
<|file_name|>gregorian.js.uncompressed.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1
oid sha256:07e25b6c05d06d085c2840d85f2966476dc38544be904c978d7c66dbe688decb<|fim▁hole|><|fim▁end|> | size 4672 |
<|file_name|>dev.ts<|end_file_name|><|fim▁begin|>'use strict';
import { readFileAsString } from '../helpers/readFileAsString';
(function () {
const JavaScriptObfuscator: any = require('../../index');<|fim▁hole|> {
identifierNamesGenerator: 'mangled',
compact: false,
stri... | const code: string = readFileAsString(__dirname + '/../functional-tests/javascript-obfuscator/fixtures/custom-nodes-identifier-names-collision.js');
let obfuscationResult = JavaScriptObfuscator.obfuscate(
code, |
<|file_name|>vmhc.py<|end_file_name|><|fim▁begin|>import sys
import os
import commands
import nipype.pipeline.engine as pe
import nipype.algorithms.rapidart as ra
import nipype.interfaces.fsl as fsl
import nipype.interfaces.io as nio
import nipype.interfaces.utility as util
from utils import *
from CPAC.vmhc import *
f... | ''' |
<|file_name|>html_diff.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
from typing import Callable, Tuple, Text
from django.conf import settings
from diff_match_patch import diff_match_patch
import platform
import logging
# TODO: handle changes in link hrefs
def highlight_with_class(klass, t... | |
<|file_name|>triggers.py<|end_file_name|><|fim▁begin|>from django.db import transaction
from denorm.db import base
class RandomBigInt(base.RandomBigInt):
def sql(self):
return '(9223372036854775806::INT8 * ((RANDOM()-0.5)*2.0) )::INT8'
class TriggerNestedSelect(base.TriggerNestedSelect):
def sql(se... | 'EXCEPTION WHEN unique_violation THEN -- do nothing\n'
'END\n'
) % locals() |
<|file_name|>get_landmines.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This file emits the list of reasons why a particular build needs to be... | print 'Moar clobbering...'
print 'Remove build/android.gypi'
print 'Cleanup after windows ninja switch attempt.'
print 'Switching to pinned msvs toolchain.' |
<|file_name|>AuthWrapper.jest.tsx<|end_file_name|><|fim▁begin|>import React from "react"
import { mount } from "enzyme"<|fim▁hole|>
jest.mock("sharify")
jest.mock("querystring", () => ({
parse: jest.fn().mockReturnValue({}),
}))
jest.mock("desktop/components/cookies/index.coffee", () => ({
get: jest.fn(),
set: je... | import { AuthWrapper } from "../AuthWrapper"
import sharify, { data as sd } from "sharify"
import * as helpers from "desktop/lib/openAuthModal" |
<|file_name|>wizardcontroller.rs<|end_file_name|><|fim▁begin|>use super::Wizard;
use super::prelude::*;<|fim▁hole|> fn reset(&mut self) {}
}<|fim▁end|> |
pub trait WizardController {
fn choose_spell<'a>(&mut self, wizard: &'a Wizard) -> Option<&'a Spell>; |
<|file_name|>cssCode.directive.spec.js<|end_file_name|><|fim▁begin|>'use strict';
describe('Directive: cssCode', function () {
// load the directive's module and view
beforeEach(module('googleWebfontsHelperApp'));
beforeEach(module('app/cssCode/cssCode.html'));
var element, scope;
beforeEach(inject(functi... | scope.$apply();
expect(element.text()).toBe('this is the cssCode directive'); |
<|file_name|>assertStatement.go<|end_file_name|><|fim▁begin|>package source
//
// An AssertionStatement declares the existence of a class or instance.
//
type AssertionStatement struct {
fields AssertionFields
source Code
}<|fim▁hole|>type AssertionFields struct {
Owner string // base type or class
Called strin... | |
<|file_name|>deep_copy_generated.go<|end_file_name|><|fim▁begin|>/*
Copyright 2015 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.... | if err := deepCopy_v1_RBDVolumeSource(*in.RBD, out.RBD, c); err != nil {
return err
} |
<|file_name|>math.rs<|end_file_name|><|fim▁begin|>// Copyright 2021 TiKV Project Authors. Licensed under Apache-2.0.
use std::sync::{
atomic::{AtomicU32, Ordering},
Mutex,
};
struct MovingAvgU32Inner {
buffer: Vec<u32>,
current_index: usize,
sum: u32,
}
pub struct MovingAvgU32 {
protected: Mu... | } else {
assert_eq!(avg.fetch(), (i * (i + 1) / 10));
}
} |
<|file_name|>weighted.rs<|end_file_name|><|fim▁begin|>//! "Weighted" graph types
use std;
use std::ops::{Deref,DerefMut};
use smallvec::SmallVec;<|fim▁hole|>// Edge
/// Weighted edge type.
#[derive(Debug)]
pub struct Edge<T, I: Id> {
source: I,
target: I,
data: T
}
impl<T, I: Id> Clone for Edge<T, I>
... |
use super::interface::{self, Id};
// ---------------------------------------------------------------- |
<|file_name|>triggerPhotons.py<|end_file_name|><|fim▁begin|>from matplotlib import rcParams, rc
import numpy as np
import sys
from fitFunctions import gaussian
import scipy.interpolate
import scipy.signal
from baselineIIR import IirFilter
import pickle
import smooth
# common setup for matplotlib
params = {'savefig.dpi... | initSigmaThresh - sigma threshold to use when constructing initial
pulse height histogram
tailSlack - amount (in same units as data) to relax trigger threshold |
<|file_name|>trigger.py<|end_file_name|><|fim▁begin|>from abc import ABCMeta,abstractmethod
from my_hue import *
# Would dynamically choose a trigger based on trigger type
def trigger_factory(trigger_type):
return None
class Trigger(object):
__metaclass__ = ABCMeta
def __init__(self):
self.action... | button = 'a'
if button == 'a': |
<|file_name|>UserItem.java<|end_file_name|><|fim▁begin|>package org.iatoki.judgels.jerahmeel.user.item;
public final class UserItem {
private final String userJid;
private final String itemJid;
private final UserItemStatus status;<|fim▁hole|> public UserItem(String userJid, String itemJid, UserItemStat... | |
<|file_name|>os-spawn-example-2.py<|end_file_name|><|fim▁begin|>'''
spawn º¯Êý»¹¿ÉÓÃÓÚÔÚºǫ́ÔËÐÐÒ»¸ö³ÌÐò. ÏÂÀýÖÐ ¸ø run º¯ÊýÌí¼ÓÁËÒ»¸ö¿ÉÑ¡µÄ mode ²ÎÊý;
µ±ÉèÖÃΪ os.P_NOWAIT ʱ, Õâ¸ö½Å±¾²»»áµÈ´ý×Ó³ÌÐò½áÊø, ĬÈÏÖµ os.P_WAIT ʱ spawn »áµÈ´ý×Ó½ø³Ì½áÊø.
ÆäËüµÄ±êÖ¾³£Á¿»¹ÓÐ os.P_OVERLAY ,ËüʹµÃ spawn µÄÐÐΪºÍ exec ÀàËÆ, ÒÔ¼° ... | import string
def run(program, *args, **kw): |
<|file_name|>ec2_ami_find.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2
#pylint: skip-file
#
# This file is part of Ansible
#
# 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... | module.fail_json(msg='boto required for this module, install via pip or your package manager')
|
<|file_name|>crazy.py<|end_file_name|><|fim▁begin|>import random
# CoRe
def turn(board, symbol):
while 1:
x = random.choice(range(8))
y = random.choice(range(8))<|fim▁hole|> if getboard(board,x,y) == '#': return (x,y)<|fim▁end|> | |
<|file_name|>ProspectiveLineItem.java<|end_file_name|><|fim▁begin|>// Copyright 2021 Google LLC
//
// 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... | * computed for the subject, predicting what would happen |
<|file_name|>transport-negotiation-request.component.ts<|end_file_name|><|fim▁begin|>/*
* Copyright 2020
* SRDC - Software Research & Development Consultancy; Ankara; Turkey
In collaboration with
* SRFG - Salzburg Research Forschungsgesellschaft mbH; Salzburg; Austria
Licensed under the Apache License, Version... | case "special-terms": |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
#[doc = r" Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::F4R1 {
#[doc = r" Modifies the contents of the register"]
#[inline(always)]
pub fn modify<F>(&sel... | pub fn bit(&self) -> bool {
self.bits |
<|file_name|>SpringSoyViewBaseConfig.java<|end_file_name|><|fim▁begin|>package pl.matisoft.soy.config;
import com.google.template.soy.jssrc.SoyJsSrcOptions;
import com.google.template.soy.tofu.SoyTofuOptions;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;... | public class SpringSoyViewBaseConfig {
@Value("${soy.hot.reload.mode:false}") |
<|file_name|>static-function-pointer-xc.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http:... |
// ignore-fast
// aux-build:static-function-pointer-aux.rs
extern crate aux = "static-function-pointer-aux"; |
<|file_name|>test_memcache.py<|end_file_name|><|fim▁begin|># Copyright (c) 2010-2012 OpenStack Foundation
#
# 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... | with open(proxy_config_path, 'w') as f:
f.write(dedent(proxy_config))
memcache_config = """ |
<|file_name|>0002_auto_20161003_1842.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|>from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('groups', '0001_initial'),
]
operations = [
migrations.AddField(
model_nam... | # Generated by Django 1.10.dev20160107235441 on 2016-10-03 18:42
from __future__ import unicode_literals
|
<|file_name|>cistern.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-gogo.
// source: cistern.proto
// DO NOT EDIT!
/*
Package binlog is a generated protocol buffer package.
It is generated from these files:
cistern.proto
It has these top-level messages:
DumpBinlogReq
DumpBinlogResp
Dum... | return 0, ErrIntOverflowCistern |
<|file_name|>burst_plot.py<|end_file_name|><|fim▁begin|># encoding: utf-8
#
# FRETBursts - A single-molecule FRET burst analysis toolkit.
#
# Copyright (C) 2013-2016 The Regents of the University of California,
# Antonino Ingargiola <tritemio@gmail.com>
#
"""
This module defines all the plotting functions... | print('Fit Integral:', np.trapz(scale*y, x))
ax2.axvline(d.E_fit[i], lw=3, color=red, ls='--', alpha=0.6) |
<|file_name|>file_upload_test.go<|end_file_name|><|fim▁begin|>package grequests
import "testing"
<|fim▁hole|>func TestErrorOpenFile(t *testing.T) {
fd, err := FileUploadFromDisk("file", "I am Not A File")
if err == nil {
t.Error("We are not getting an error back from our non existent file: ")
}
if fd != nil {
... | |
<|file_name|>broadcast.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python3
"""
Broadcast a message, with or without a price.
Multiple messages per block are allowed. Bets are be made on the 'timestamp'
field, and not the block index.
An address is a feed of broadcasts. Feeds may be locked with a broadcast whose
text... | # Cancel Open Bets? |
<|file_name|>Mon_ToBeads_3.py<|end_file_name|><|fim▁begin|>import sys
# where RobotControl.py, etc lives
sys.path.append('/home/pi/Desktop/ADL/YeastRobot/PythonLibrary')
from RobotControl import *
#################################
### Define Deck Layout
#################################
deck="""\
DW96P DW96P DW96... | InitializeRobot()
CurrentTipPosition = 1
|
<|file_name|>lint-stability.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache... |
stable();
foo.method_stable();
Foo::method_stable(&foo); |
<|file_name|>multi_cycle_lr.py<|end_file_name|><|fim▁begin|># ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2020, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code,... | 0, "MultiCycleLR: Prevent LR scheduler from being constructed") |
<|file_name|>importotp.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# 2017-01-23 Cornelius Kölbel <cornelius.koelbel@netknights.it>
# Avoid XML bombs
# 2016-07-17 Cornelius Kölbel <cornelius.koelbel@netknights.it>
# Add GPG encrpyted import
# 2016-01-16 Cornelius Kölbel <corneliu... |
If now public ID or serial is given, we can not import the token, as the |
<|file_name|>pages.js<|end_file_name|><|fim▁begin|>'use strict';
var React = require('react');
var PureRenderMixin = require('react-addons-pure-render-mixin');
var SvgIcon = require('../../svg-icon');
var SocialPages = React.createClass({
displayName: 'SocialPages',
mixins: [PureRenderMixin],
render: function... | |
<|file_name|>MovementGenerator.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
* Copyright (C) 2009-2011 MaNGOSZero <https://github.com/mangos/zero>
* Copyright (C) 2011-2016 Nostalrius <https://nostalrius.org>
* Copyright (C) 2016-2017 Elysium Project <https://github.co... | * You should have received a copy of the GNU General Public License |
<|file_name|>app.py<|end_file_name|><|fim▁begin|>import os
from flask import Flask, url_for, request, render_template, jsonify, send_file
from werkzeug.utils import secure_filename
import deepchem as dc
import subprocess
from shutil import copyfile
import csv
import rdkit
from rdkit import Chem
from rdkit.Chem import A... | os.mkdir(UPLOAD_DIR)
print("Created data directory")
# serve ngl webapp clone |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.