prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>player.js<|end_file_name|><|fim▁begin|>let html_audio = document.getElementById("audio-source"); let html_open_button = document.getElementById("open-button"); //Setup the audio graph and context let audioContext = new window.AudioContext(); let audioSource = audioContext.createMediaElementSource($("#aud...
$("#audio-info").css("opacity", 1.0); $("#audio-info").css("top", "30px"); }
<|file_name|>AntRenameHandler.java<|end_file_name|><|fim▁begin|>/* * Copyright 2000-2010 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.org/lice...
<|file_name|>settings_devel_fast.py<|end_file_name|><|fim▁begin|># Settings for running unittests. These are optimized for speed. from .settings_devel import * # noqa <|fim▁hole|> "weight": "healthmonitor.migrations_not_used_in_tests" }<|fim▁end|>
COMPRESS_ENABLED = False COMPRESS_PRECOMPILERS = [] MIGRATION_MODULES = {
<|file_name|>i18n.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Various i18n functions. Helper functions for both the internal translation system and for TranslateWiki-based translations. By default messages are assumed to reside in a package called 'scripts.i18n'. In pywikibot 2.0, that package is no...
if code in ['io', 'nov']: return ['eo'] # Spanish if code in ['an', 'arn', 'ast', 'ay', 'ca', 'ext', 'lad', 'nah', 'nv', 'qu',
<|file_name|>expressions-bitwise-xor-assignment.js<|end_file_name|><|fim▁begin|>let a = 5; // 00000000000000000000000000000101 a ^= 3; // 00000000000000000000000000000011 console.log(a); // 00000000000000000000000000000110<|fim▁hole|><|fim▁end|>
// expected output: 6
<|file_name|>0002_auto_20170413_1633.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-13 16:33 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): <|fim▁hole|> ('posts', '0001_initial'), ] operati...
dependencies = [
<|file_name|>Impl_0.java<|end_file_name|><|fim▁begin|>package issues.issue130; public class Impl_0 { public int a = 0; protected void printMe(String s) {<|fim▁hole|> System.out.println(s); } }<|fim▁end|>
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import React from 'react'; import { TypeChooser } from 'react-stockcharts/lib/helper' import Chart from './Chart' import { getData } from './util'; class ChartComponent extends React.Component { componentDidMount () { getData().then(data => { this.setStat...
</div> } return (
<|file_name|>user.ts<|end_file_name|><|fim▁begin|>import { ValidationError, ValidationCode } from './validation-error'; export function validateUsername({ id }): boolean { if (id.length < 3 || id.length > 32) { throw new ValidationError({ code: ValidationCode.ID, message: 'User ID must be between 3 a...
<|file_name|>UnZip.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import with_statement import os import sys import zipfile from pyload.plugin.Extractor import Extractor, ArchiveError, CRCError, PasswordError from pyload.utils import fs_encode <|fim▁hole|> __version = "1.12" __descr...
class UnZip(Extractor): __name = "UnZip" __type = "extractor"
<|file_name|>volume_cubic_inches_to_metric_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the<|fim▁hole|># AUTHORS and LICENSE files distributed ...
<|file_name|>conference-data.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; import { UserData } from './user-data'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/map'; import 'rxjs/add/observable/of'; @Injectable() export ...
processData(data: any) { // just some good 'ol JS fun with objects and arrays
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-20 19:37 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [...
<|file_name|>_dsymatrix-calc.hpp<|end_file_name|><|fim▁begin|>//=============================================================================<|fim▁hole|> WARNING_REPORT; std::cerr << "This function call has no effect since the matrix is symmetric." << std::endl; #endif//CPPL_DEBUG return mat; } //=============...
/*! return transposed _dsymatrix */ inline _dsymatrix t(const _dsymatrix& mat) {CPPL_VERBOSE_REPORT; #ifdef CPPL_DEBUG
<|file_name|>progress-bar.component.spec.ts<|end_file_name|><|fim▁begin|>import { TestBed, ComponentFixture, waitForAsync } from '@angular/core/testing'; import { ProgressBarComponent } from './progress-bar.component'; describe('ProgressBarComponent', () => { let fixture: ComponentFixture<ProgressBarComponent>; le...
// provide our implementations or mocks to the dependency injector beforeEach(() => { TestBed.configureTestingModule({
<|file_name|>get_intra_predictor.cpp<|end_file_name|><|fim▁begin|>/*! * \copy * Copyright (c) 2009-2013, Cisco Systems * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:...
pFuncList->pfGetChromaPred[C_PRED_H] = WelsIChromaPredH_mmx;
<|file_name|>RSAKeyValueType.java<|end_file_name|><|fim▁begin|>// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilat...
* allowed object is
<|file_name|>xian.js<|end_file_name|><|fim▁begin|>var $box = $('.box'); var F = {}; F.getMousePos = function(e, $relaveDom) { var x = 0; var y = 0; if (!e) { var e = window.event; } if (e.pageX || e.pageY) { x = e.pageX; y = e.pageY; } else if (e.clientX || e.clie...
ctx.textAlign = 'center'; ctx.fillStyle = self.color.black; ctx.fillText(this.timeScale[i], (2 * i + 1)* each_width, 20); }
<|file_name|>struct_failed_image.go<|end_file_name|><|fim▁begin|>package mts<|fim▁hole|> //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 // //Unl...
<|file_name|>rules.py<|end_file_name|><|fim▁begin|># Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import itertools import logging from collections import defaultdict from dataclasses import dataclass from typing import Iterable, Option...
if f.endswith(".pyi"):
<|file_name|>run-tests-spec.ts<|end_file_name|><|fim▁begin|>import Omni = require('../../lib/omni-sharp-server/omni'); import {Observable, CompositeDisposable} from "rx"; import {setupFeature, restoreBuffers, openEditor} from "../test-helpers"; describe('Run Tests', () => { setupFeature(['features/run-tests']); ...
<|file_name|>handlers.rs<|end_file_name|><|fim▁begin|>use x11::xlib; use window_system::WindowSystem; use libc::{c_ulong}; pub struct KeyPressedHandler; pub struct MapRequestHandler; fn create_some_window(window_system: &WindowSystem, width: u32, height: u32, x: i32, y: i32) -> c_ulong { let border_width = 2; ...
let frame = create_some_window(window_system, width, height, x, y);
<|file_name|>infoblox.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # (c) 2018, Red Hat, Inc. # # 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 versi...
] def parse_args():
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod config; mod node; mod step; mod token; <|fim▁hole|>pub use self::config::dump_config; pub use self::node::dump_bare_node; pub use self::node::dump_node; pub use self::step::dump_step; pub use self::token::dump_token;<|fim▁end|>
<|file_name|>unlit_vertex.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>#[derive(Copy, Clone)] pub struct UnlitVertex { pub position: [f32; 3], pub color: [f32; 3], } implement_vertex!(UnlitVertex, position, color);<|fim▁end|>
<|file_name|>notetranslator_tests.py<|end_file_name|><|fim▁begin|>from nose.tools import * from DeckMaker.notetranslator import NoteTranslator def setup(): print "SETUP!" def teardown(): print "TEAR DOWN!" def test_basic(): t = NoteTranslator() assert_equal(t.GetMidiCodeForHumans("E5"),64) a...
assert_equal(t.GetHexString(t.GetMidiCodeForHumans("E5")),"40") assert_equal(t.GetHexString(t.GetMidiCodeForHumans("C1")),"c") assert_equal(t.GetHexString(t.GetMidiCodeForHumans("Ab6")),"50")
<|file_name|>zmqabstractnotifier.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2015-2017 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <zmq/zmqabstractnotifier.h> #include <util.h> CZ...
<|file_name|>set_scheduling.py<|end_file_name|><|fim▁begin|># Copyright 2014 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 # # http://www.apache.org/lice...
<|file_name|>KafkaKey.java<|end_file_name|><|fim▁begin|>package org.apache.hadoop.hive.kafka.camus; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.MapWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.io.UTF8; import org.apache.hadoop.io.Writable; import org.apache.hadoop.io.Wr...
out.writeLong(this.time); out.writeUTF(this.server); // left for legacy out.writeUTF(this.service); // left for legacy
<|file_name|>roman-numerals-macro.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.apach...
<|file_name|>he_dlg.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
MODX Evolution 1.1 = 6c5e02783a79b572e09102b05854077e
<|file_name|>CommentAdapter.java<|end_file_name|><|fim▁begin|>package gitmad.bitter.ui; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import gitmad.bitter.R; import gitmad....
private Comment[] comments;
<|file_name|>TestTimeCollectionTest.java<|end_file_name|><|fim▁begin|>package ru.job4j; <|fim▁hole|>import org.junit.Test; import java.util.*; /** * Класс для тестирования. * @author agavrikov * @since 13.07.2017 * @version 1 */ public class TestTimeCollectionTest { /** * Тестирование метода добавления...
<|file_name|>p2p_disconnect_ban.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test node disconnect and ban behavior""...
self.nodes[1].setban(subnet="127.0.0.1", command="add") wait_until(lambda: len(self.nodes[1].getpeerinfo()) == 0, timeout=10) assert_equal(len(self.nodes[1].getpeerinfo()), 0) # all nodes must be disconnected at this point
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (c) 2019, NVIDIA Corporation. All rights reserved. # # This work is made available under the Nvidia Source Code License-NC. # To view a copy of this license, visit # https://nvlabs.github.io/stylegan2/license.html from . import submission <|fim▁hole|>fr...
from .submission.run_context import RunContext
<|file_name|>client.cpp<|end_file_name|><|fim▁begin|>/* * Copyright © 2017 papamitra * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitatio...
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
<|file_name|>channel_1000_uvplot.py<|end_file_name|><|fim▁begin|>import os import matplotlib.pyplot as plt import numpy as np from plotting_styles import onecolumn_figure, default_figure from paths import paper1_figures_path ''' Make a UV plot of the 1000th HI channel. ''' uvw = np.load("/mnt/MyRAID/M33/VLA/14B-088/...
plt.ylabel("V (m)") plt.xlim([-3200, 3500])
<|file_name|>request_forwarding_service.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-go. // source: request_forwarding_service.proto // DO NOT EDIT! /* Package vault is a generated protocol buffer package. It is generated from these files: request_forwarding_service.proto It has these top-leve...
}
<|file_name|>_calculate_exchange_operations.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license informatio...
raw_result = await self._post_initial( body=body, cls=lambda x,y,z: x, **kwargs
<|file_name|>GPUComputationRenderer.js<|end_file_name|><|fim▁begin|>/** * @author yomboprime https://github.com/yomboprime * * GPUComputationRenderer, based on SimulationRenderer by zz85 * * The GPUComputationRenderer uses the concept of variables. These variables are RGBA float textures that hold 4 floats * for ...
this.createRenderTarget = function ( sizeXTexture, sizeYTexture, wrapS, wrapT, minFilter, magFilter ) {
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>SECRET_KEY = 'not-anymore' LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC'<|fim▁hole|>USE_I18N = True USE_L10N = True USE_TZ = False DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', } } INSTALLED_APPS = [ 'reverse_unique', 'rev...
<|file_name|>selective-preloading-strategy.service.spec.ts<|end_file_name|><|fim▁begin|>import { TestBed, inject } from '@angular/core/testing'; import { SelectivePreloadingStrategyService } from './selective-preloading-strategy.service'; describe('SelectivePreloadingStrategyService', () => { beforeEach(() => { ...
<|file_name|>tf_export_test.py<|end_file_name|><|fim▁begin|># Copyright 2017 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://www.ap...
<|file_name|>Main.java<|end_file_name|><|fim▁begin|>package me.giantcrack.gs; import me.giantcrack.eco.BalanceCmd; import me.giantcrack.eco.BuyCmd; import me.giantcrack.eco.EcoFile; import me.giantcrack.eco.EconomyCmd; import me.giantcrack.eco.SellCmd; import me.giantcrack.eco.ValueCmd; import org.bukkit.Buk...
*2.Test *3.Do lava plugin */
<|file_name|>train.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from transH import TransH import pickle import numpy as np import sys<|fim▁hole|> def main(): if len(sys.argv) != 3: print '[Usage] python train.py train_data validation_data' exit(0) train_data, valid_data = sys.argv[1:] X, E, R = loa...
<|file_name|>issue-64391.rs<|end_file_name|><|fim▁begin|>// Regression test for Issue #64391. The goal here is that this // function compiles. In the past, due to incorrect drop order for<|fim▁hole|>// `drop-order/drop-order-for-temporary-in-tail-return-expr.rs`. // // check-pass // edition:2018 async fn add(x: u32, y...
// temporaries in the tail expression, we failed to compile this // example. The drop order itself is directly tested in
<|file_name|>cd8b0318-8942-4a64-b2c9-ee7c253d6b7d-1445822636718.js<|end_file_name|><|fim▁begin|>jQuery("#simulation") .on("click", ".s-cd8b0318-8942-4a64-b2c9-ee7c253d6b7d .click", function(event, data) { var jEvent, jFirer, cases; if(data === undefined) { data = event; } jEvent = jimEvent(event); jFi...
}, "exectype": "serial",
<|file_name|>objectclick2.py<|end_file_name|><|fim▁begin|>from server.util import ScriptManager <|fim▁hole|>def objectClick2_11758(player, obId, obX, obY): player.getPA().openUpBank()<|fim▁end|>
def objectClick2_2213(player, obId, obX, obY): player.getPA().openUpBank()
<|file_name|>SystemsList.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react'; import classnames from 'classnames'; import withStyles from 'isomorphic-style-loader/lib/withStyles'; import LinearProgress from 'material-ui/LinearProgress'; import history from '../../core/history'; import Link from '.....
}
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from . import geodis_api_ws from . import geodis_api_find_localite_ws from . import geodis_api_edi from . import geodis_api_rest_ws from . import geodis_encoder_ws from . import geodis_encoder_edi from . import geodis_encoder_rest_ws from . import geodis...
from . import geodis from . import geodis_common_ws
<|file_name|>ip.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/LIC...
<|file_name|>extension_sync_event_observer.cc<|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. #include "chrome/browser/extensions/api/sync_file_system/extension_sync_eve...
event_router->BroadcastEvent(event.Pass());
<|file_name|>schema2.rs<|end_file_name|><|fim▁begin|>use types::{ColumnType}; pub trait Schema { fn len(&self) -> usize; fn name(&self, index: usize) -> &str; fn ctype(&self, index: usize) -> ColumnType; fn nullable(&self, index: usize) -> bool; } #[derive(Clone)] pub struct Schema2 { pub names: V...
self.types[index]
<|file_name|>actions.ts<|end_file_name|><|fim▁begin|>import { Observable } from 'rxjs/Observable'; import { Store } from '../types'; import { REHYDRATE } from 'redux-persist/constants'; import 'rxjs/operator/map'; export const appError = (error: any): Store.Action => ({ type: 'APP_ERROR', payload: { error },<|...
}); export const appOnline = (online: boolean): Store.Action => ({ type: 'APP_ONLINE',
<|file_name|>jabbersearch.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.0"> <context> <name>JabberSearch</name> <message> <location filename="../../plugins/jabbersearch/jabbersearch.cpp" line="32"/> <location filename="../../plugins/jabbersearch/jabbersearch....
<|file_name|>commands.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https:...
<|file_name|>randomUtils.py<|end_file_name|><|fim▁begin|># Copyright 2017 Battelle Energy Alliance, 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/LICE...
<|file_name|>vis_eye_video_overlay.py<|end_file_name|><|fim▁begin|>''' (*)~--------------------------------------------------------------------------- Pupil - eye tracking platform Copyright (C) 2012-2017 Pupil Labs Distributed under the terms of the GNU Lesser General Public License (LGPL v3.0). See COPYING and COPY...
eye_video_path = os.path.join(g_pool.rec_dir,'eye0.*'),os.path.join(g_pool.rec_dir,'eye1.*') eye_timestamps_path = os.path.join(g_pool.rec_dir,'eye0_timestamps.npy'),os.path.join(g_pool.rec_dir,'eye1_timestamps.npy')
<|file_name|>keras_future.py<|end_file_name|><|fim▁begin|>import keras import keras.layers import keras.models def concatenate(x): if hasattr(keras.layers, 'Concatenate'): return keras.layers.Concatenate()(x) else: return keras.layers.merge(x, mode='concat') def add(x): if hasattr(keras....
<|file_name|>AzureStore.ts<|end_file_name|><|fim▁begin|>/* Copyright (C) 2017 Cloudbase Solutions SRL<|fim▁hole|>License, or (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 MERCHANTABILITY or FITNESS FOR ...
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the
<|file_name|>resize_gcp.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node const fs = require('fs'); const Gcp = require('../static/app/js/classes/Gcp'); const argv = process.argv.slice(2); function die(s){ console.log(s); process.exit(1); } if (argv.length != 2){ die(`Usage: ./resize_gcp.js <path/to/gcp_file.txt>...
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import { FormatLong } from '../../../types' import buildFormatLongFn from '../../../_lib/buildFormatLongFn/index' const dateFormats = { full: 'EEEE, do MMMM, y', // CLDR #1787 long: 'do MMMM, y', // CLDR #1788 medium: 'd MMM, y', // CLDR #1789 short: 'dd/MM/yy...
short: 'h:mm a', // CLDR #1794 } const dateTimeFormats = {
<|file_name|>fontselect.py<|end_file_name|><|fim▁begin|># AnalogClock's font selector for setup dialog # E. A. Tacao <e.a.tacao |at| estadao.com.br> # http://j.domaindlx.com/elements28/wxpython/ # 15 Fev 2006, 22:00 GMT-03:00 # Distributed under the wxWidgets license. import wx from wx.lib.newevent import...
size=size) self.SetBezelWidth(1)
<|file_name|>solvers.py<|end_file_name|><|fim▁begin|>""" This module contain solvers for all kinds of equations, algebraic or transcendental. """ import warnings from collections import defaultdict from types import GeneratorType from ..core import (Add, Dummy, E, Equality, Expr, Float, Function, Ge, I, ...
if lhs.is_Add: terms = defaultdict(list) for a in lhs.args: i, d = a.as_independent(*symbols)
<|file_name|>random.cpp<|end_file_name|><|fim▁begin|>/************************************************************************* > File Name: random.cpp > Author: qiaoyihan > Email: yihqiao@126 > Created Time: Sun May 15 11:20:00 2016 ********************************************************************...
{
<|file_name|>security.go<|end_file_name|><|fim▁begin|>package security import ( "crypto/md5" "fmt" "golang.org/x/crypto/blowfish" "log" "bytes" "crypto/rand" "crypto/rsa" "os" "encoding/gob" "encoding/pem" "crypto/x509" "time" "math/big" "crypto/x509/pkix" ) func Md5Hash(str string) { hash := md5.New(...
fmt.Println("Public key exponent", publicKey.E) }
<|file_name|>xqueue.py<|end_file_name|><|fim▁begin|>""" Fixture to configure XQueue response. """ import json import requests from common.test.acceptance.fixtures import XQUEUE_STUB_URL class XQueueResponseFixtureError(Exception): """ Error occurred while configuring the stub XQueue. """ pass cl...
if not response.ok:
<|file_name|>DevelopmentLoaderConfig.java<|end_file_name|><|fim▁begin|>/* * 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 re...
public DevelopmentLoaderConfig setPlugins(List<String> plugins) {
<|file_name|>PlayerController.py<|end_file_name|><|fim▁begin|>import json from urllib.parse import unquote from gi.repository import Totem from Controllers.BaseController import BaseController from OpenSubtitleHasher import * class PlayerController(BaseController): def __init__(self, server, request): Bas...
def actionForward(self):
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.contrib.admin import site as admin_site class Language(models.Model): """ Language model """ name = models.CharField(max_length=64) code = models.CharField(max_length=6, db_column='shortcut') visible =...
def __str__(self):
<|file_name|>chat.ts<|end_file_name|><|fim▁begin|>// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. // See the LICENCE file in the repository root for full licence text. import { PresenceJSON, SendToJSON } from 'chat/chat-api-responses'; import MainView from 'chat...
} else if (hasPmChannels) { initialChannel = dataStore.channelStore.pmChannels[0].channelId; } }
<|file_name|>cpu.rs<|end_file_name|><|fim▁begin|>use void::Void; use io::{self, Write}; pub use cpu::*; use arch::keyboard::Keyboard; static DEFAULT_KEYBOARD: Keyboard = Keyboard { callback: ::put_char, control_port: Port(0x64), data_port: Port(0x60), }; pub unsafe fn init() { set_gdt(&*GDT); //...
<|file_name|>instance_nexus.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it * under the terms of th...
void Load(const char *chrIn) { if (!chrIn)
<|file_name|>parallel.rs<|end_file_name|><|fim▁begin|>//! Functions for parallel processing of record sets and records. //! //! Sequences are read and processed in batches (`RecordSet`) because sending //! data across channels has a performance impact. The process works as follows: //! //! * Sequence parsing is done in...
<|file_name|>ExOh.py<|end_file_name|><|fim▁begin|>def ExOh(str): temp = list(str) xcount = 0 ocount = 0 for c in temp: if c == "x": xcount += 1 if c == "o": ocount += 1 if xcount == ocount: print "true" elif xcount != ocount: print "false" <|fim▁hole|><|fim▁end|>
ExOh(raw_input())
<|file_name|>tests.options.compilers.js<|end_file_name|><|fim▁begin|>import path from 'path' <|fim▁hole|> context.it = function (name, callback) { if (callback) { return it(...arguments); } else { callback = name name = path.basename(file, '.js') } }<|fim▁end|>
let { context, file, mocha, options } = module.parent.context let { it } = context
<|file_name|>constant.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _rest = require('./internal/rest'); var _rest2 = _interopRequireDefault(_rest); var _initialParams = require('./internal/initialParams'); var _initialParams2 = _interopRequireD...
* } * //... * ], callback);
<|file_name|>ModStatsDumper.java<|end_file_name|><|fim▁begin|>package mezz.texturedump.dumpers; import com.google.gson.stream.JsonWriter; import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraftforge.fml.ModList; import net.minecraftforge.fml.StartupMessageManager; import net.minecraftforge.forg...
StartupMessageManager.addModMessage("Dumping Mod TextureMap Statistics"); FileWriter fileWriter = new FileWriter(output.toFile()); fileWriter.write("var modStatistics = \n//Start of Data\n");
<|file_name|>without_loop_counters.rs<|end_file_name|><|fim▁begin|>#![warn(clippy::needless_range_loop, clippy::manual_memcpy)] const LOOP_OFFSET: usize = 5000;<|fim▁hole|> for i in 0..src.len() { dst[i] = src[i]; } // dst offset memcpy for i in 0..src.len() { dst[i + 10] = src[i]; ...
pub fn manual_copy(src: &[i32], dst: &mut [i32], dst2: &mut [i32]) { // plain manual memcpy
<|file_name|>test.rs<|end_file_name|><|fim▁begin|>use std::thread::{self, sleep_ms}; use std::sync::{Arc}; use std::sync::atomic::{AtomicUsize}; use std::sync::atomic::Ordering::{SeqCst}; use spsc::unbounded::{new}; use super::{Select, Selectable}; fn ms_sleep(ms: i64) { sleep_ms(ms as u32); } #[test] fn no_wait...
let (send1, recv1) = new();
<|file_name|>types.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 Apache Licen...
] class Provider(object):
<|file_name|>musicabstractfloatwidget.cpp<|end_file_name|><|fim▁begin|>#include "musicabstractfloatwidget.h" MusicAbstractFloatWidget::MusicAbstractFloatWidget(QWidget *parent) : QLabel(parent) { m_animation = new QPropertyAnimation(this, "geometry", this); m_animation->setDuration(500); m_blockAnimati...
void MusicAbstractFloatWidget::leaveEvent(QEvent *event) {
<|file_name|>reference-link-dialog.js<|end_file_name|><|fim▁begin|>/*! * Reference link dialog plugin for Editor.md * * @file reference-link-dialog.js * @author pandao * @version 1.2.1 * @updateTime 2015-06-09 * {@link https://github.com/pandao/editor.md} * @license MIT */ (function...
<|file_name|>multiwindow.rs<|end_file_name|><|fim▁begin|>#[cfg(target_os = "android")] #[macro_use] extern crate android_glue; extern crate glutin; use std::thread; mod support; #[cfg(target_os = "android")] android_start!(main); #[cfg(not(feature = "window"))] fn main() { println!("This example requires glutin to...
let _ = t1.join();
<|file_name|>base.ts<|end_file_name|><|fim▁begin|>import { RegistrationType, IDynamicDependency, Factory, Initializer, Disposer } from './common' import { IContainer } from '../../build' import { OwnerType, ScopeType } from '../../common' export interface IRegistrationBase { id: st...
<|file_name|>util_bsd.go<|end_file_name|><|fim▁begin|>// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build darwin dragonfly freebsd netbsd openbsd<|fim▁hole|>import "golang.org/x/sys/unix" const ioctlRe...
package terminal
<|file_name|>MainActivity.java<|end_file_name|><|fim▁begin|>/* * The MIT License (MIT) * * Copyright (c) 2015 Curt Binder * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without rest...
Toolbar toolbar, int openDrawerContentDescRes, int closeDrawerContentDescRes) {
<|file_name|>0006_scheduleexperience.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models<|fim▁hole|> class Migration(migrations.Migration): dependencies = [ ('schedules', '0005_auto_20171010_1722'), ] operations ...
<|file_name|>fix_intern.py<|end_file_name|><|fim▁begin|># Copyright 2006 Georg Brandl. # Licensed to PSF under a Contributor Agreement. """Fixer for intern(). intern(s) -> sys.intern(s)""" # Local imports <|fim▁hole|>from ..fixer_util import Name, Attr, touch_import class FixIntern(fixer_base.BaseFix): ...
from .. import pytree from .. import fixer_base
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>from model.group_address import Address_data import random import string import os.path import jsonpickle import getopt import sys try: opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["number of groups", "file"]) except getopt.GetoptError as err: getopt.u...
home_page="www.page.com") ]
<|file_name|>BenchmarkTest12371.java<|end_file_name|><|fim▁begin|>/** * OWASP Benchmark Project v1.1 * * This file is part of the Open Web Application Security Project (OWASP) * Benchmark Project. For details, please see * <a href="https://www.owasp.org/index.php/Benchmark">https://www.owasp.org/index.php/Benchmark</a>...
<|file_name|>dataTables.fixedHeader.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * Yo...
* Returns: int: sum * Inputs: node:n - node to consider
<|file_name|>longbeach_crime_stats.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Sat Feb 22 12:07:53 2014 @author: Gouthaman Balaraman """ import requests import pandas as pd from bs4 import BeautifulSoup import re import numpy as np import os #################################################...
nextdat['left'] = int(v[1])if k[1] == 'left' else int(v[0]) #if (ddict['left']<lftmrkr) and (ddict['content']!= 'RD'): # currrd = ddict['content'] #ddict['rd'] = currrd
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import os from djangomaster.core import autodiscover from djangomaster.sites import mastersite def get_version(): path = os.path.dirname(os.path.abspath(__file__)) path = os.path.join(path, 'version.txt') return open(path).read().strip()<|fim▁hole|> _...
<|file_name|>collada_dom.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2.4 # Copyright 2009, Google Inc. # All rights reserved. #<|fim▁hole|># met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binar...
# Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are
<|file_name|>plots.py<|end_file_name|><|fim▁begin|>import matplotlib.pyplot as plt import numpy as np import scalpplot from scalpplot import plot_scalp from positions import POS_10_5 from scipy import signal def plot_timeseries(frames, time=None, offset=None, color='k', linestyle='-'): frames = np.asarray(frames) ...
''' scalps = np.asarray(scalps) assert scalps.ndim == 2
<|file_name|>use.py<|end_file_name|><|fim▁begin|>############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamb...
<|file_name|>input_handler_proxy.cc<|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. #include "content/renderer/input/input_handler_proxy.h" #include "base/auto_reset.h" #in...
WebFloatPoint velocity(current_fling_velocity_.x(), current_fling_velocity_.y());
<|file_name|>flshinc.py<|end_file_name|><|fim▁begin|>"""Tool to loop over fls_h.inc files. Based on nens/asc.py and NumPy masked arrays. Stripped out all unnecessary flexibility. Usage: # Opens zipfile if path ends with zip; inside it opens the only file, # or raises ValueError if there are several. Currently we need...
return self._header
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # __author__ = 'Marek Stępniowski, <marek@stepniowski.com>'<|fim▁hole|><|fim▁end|>
__version__ = '0.1'