prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
#![forbid(unsafe_code)]
//! Standalone server for socket_bench
//! ========================================
//!
//! You can run `socket_bench` across a real network by running this benc... | //! `RUSTFLAGS="-Ctarget-cpu=skylake -Ctarget-feature=+aes,+sse2,+sse4.1,+ssse3" TCP_ADDR=/ip6/::1/tcp/12345 cargo x bench -p network remote_tcp` |
<|file_name|>test_vumi_app.py<|end_file_name|><|fim▁begin|>import base64
import json
from twisted.internet.defer import inlineCallbacks, DeferredQueue, returnValue
from twisted.web.http_headers import Headers
from twisted.web import http
from twisted.web.server import NOT_DONE_YET
from vumi.config import ConfigContex... | |
<|file_name|>move_data.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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/... | */
|
<|file_name|>test_extensions.py<|end_file_name|><|fim▁begin|>import argparse
import sys
import pytest
from pyscaffold import extensions
from pyscaffold.exceptions import ErrorLoadingExtension
from .extensions import __name__ as test_extensions_pkg
from .extensions.helpers import make_extension
if sys.version_info[:... | extension2.augment_cli(parser)
opts = vars(parser.parse_args(["--my-extension2"]))
assert opts["extensions"] == [extension1, extension2]
|
<|file_name|>thrift_build.rs<|end_file_name|><|fim▁begin|>// @generated by autocargo
use std::env;
use std::fs;
use std::path::Path;
use thrift_compiler::Config;
#[rustfmt::skip]
fn main() {
// Rerun if this gets rewritten.
println!("cargo:rerun-if-changed=thrift_build.rs");
let out_dir = env::var_os("OU... | // TODO: replace canonicalize() with std::path::absolute() when
// https://github.com/rust-lang/rust/pull/91673 is available (~Rust 1.60)
// and remove this block. |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod fast_math;<|fim▁hole|>mod tests;<|fim▁end|> |
#[allow(unused_imports)]
#[cfg(test)] |
<|file_name|>behaviour.js<|end_file_name|><|fim▁begin|>/*
Behaviour v1.1 by Ben Nolan, June 2005. Based largely on the work
of Simon Willison (see comments by Simon below).
Small fixes by J.Dobrowolski for Front Accounting May 2008
Description:
Uses css selectors to apply javascript behaviours to e... | |
<|file_name|>campaigns.py<|end_file_name|><|fim▁begin|># Copyright (c) 2020, DjaoDjin inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the abo... | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""PySnapSync client.
This package implements the pysnapsync client.
The package exports the following modules:
o `snapsync` main backup script.
See the module doc strings for more information.
"""
from __future__ import absolute_import
from __f... | |
<|file_name|>DictLearner.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Created on Thu Aug 20 12:01:18 2015
@author: Eric Dodds
Abstract dictionary learner.
Includes gradient descent on MSE energy function as a default learning method.
"""
import numpy as np
import pickle
# the try/except bloc... | self.theta = theta
self.moving_avg_rate = moving_avg_rate
self.initialize_stats()
self.store_every = store_every
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2015-2020 The Wazo Authors (see the AUTHORS file)
# SPDX-License-Identifier: GPL-3.0-or-later
from wazo_auth.interfaces import (
BaseAuthenticationBackend,
BaseMetadata,
DEFAULT_XIVO_UUID,<|fim▁hole|>__all__ = [
'BaseAuthenticationBacke... | )
|
<|file_name|>output.d.ts<|end_file_name|><|fim▁begin|>import { Data } from 'fake-types-lib-2/data';
<|fim▁hole|>
export {};<|fim▁end|> | export declare type MyData = Data | string; |
<|file_name|>histogram.ts<|end_file_name|><|fim▁begin|>import {JobState} from "../api/prow";
export class JobHistogram {
public start: number;
public end: number;
private data: JobSample[];
constructor() {
this.data = [];
this.start = Number.MAX_SAFE_INTEGER;
this.end = 0;
}
// add adds ... | |
<|file_name|>settingsView.py<|end_file_name|><|fim▁begin|>#!/usr/local/bin/python
# -*-coding:Utf-8 -*
import os
import math
def GA_settings():
"""Provides the view for the user setting of the GA experiments and returns the settings set"""
options = {}
os.system("clear")
print('===== OPTIONS =====\n... | elif options['recombinationMode'] == 2: |
<|file_name|>permissions.ts<|end_file_name|><|fim▁begin|>import intersection from 'lodash/intersection';
import moment from 'moment';
import * as _ from 'underscore';
import { getSchema } from'../utils/getSchema';
class Group {
actions: Array<string>
constructor() {
this.actions = [];
}
can(actions: stri... | }
|
<|file_name|>application_test.go<|end_file_name|><|fim▁begin|>package zabbix_test
import (
"fmt"
"math/rand"
"reflect"
"testing"
. "."
)<|fim▁hole|> err := getAPI(t).ApplicationsCreate(apps)
if err != nil {
t.Fatal(err)
}
return &apps[0]
}
func DeleteApplication(app *Application, t *testing.T) {
err := ge... |
func CreateApplication(host *Host, t *testing.T) *Application {
apps := Applications{{HostId: host.HostId, Name: fmt.Sprintf("App %d for %s", rand.Int(), host.Host)}} |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>def uniquer(seq, idfun=None):
if idfun is None:
def idfun(x): return x
seen = {}<|fim▁hole|> marker = idfun(item)
if marker in seen: continue
seen[marker] = 1
result.append(item)
return result<|fim▁end|> | result = []
for item in seq: |
<|file_name|>SchemaTest.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2010, PostgreSQL Global Development Group
* See the LICENSE file in the project root for more information.
*/
package org.postgresql.test.jdbc4.jdbc41;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
imp... | |
<|file_name|>limit.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core';
@Component({
selector: 'demo-pagination-limit',<|fim▁hole|>})
export class DemoPaginationLimitComponent {
public maxSize:number = 5;
public bigTotalItems:number = 175;
public bigCurrentPage:number = 1;
public numPag... | templateUrl: './limit.html' |
<|file_name|>highlight.py<|end_file_name|><|fim▁begin|># Portions Copyright (c) Facebook, Inc. and its affiliates.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2.
# highlight.py - highlight extension implementation file
#
# Copyright 2007-2009 Adam H... | tmpl.filters["colorize"] = lambda x: next(coloriter) |
<|file_name|>MainTestingWeightedHistograms.py<|end_file_name|><|fim▁begin|># force floating point division. Can still use integer with //
from __future__ import division
# This file is used for importing the common utilities classes.
import numpy as np
import matplotlib.pyplot as plt
import sys<|fim▁hole|>from FitUtil.... |
sys.path.append("../../../../../../")
from Util import Test
from Util.Test import _f_assert,HummerData,load_simulated_data |
<|file_name|>test_tokenizer.py<|end_file_name|><|fim▁begin|>import sys
import os
import unittest
import cStringIO
import warnings
import re
try:
import json
except ImportError:
import simplejson as json
from support import html5lib_test_files
from html5lib.tokenizer import HTMLTokenizer
from html5lib import c... | def capitalize(s):
s = s.lower()
s = _capitalizeRe(_doCapitalize, s) |
<|file_name|>meta.js<|end_file_name|><|fim▁begin|>var model = require('model');
var adapter = require('./..').adapter;
var Issue = function () {
this.adapter = adapter;
this.property('assignees','string');
this.property('htmlUrl','string');
this.property('number','number');
this.property('state','string');
... | this.property('labels','object');
this.property('assignee','object');
this.property('milestone','object'); |
<|file_name|>FullPushThroughReportV05.go<|end_file_name|><|fim▁begin|>package tsmt
import (
"encoding/xml"
"github.com/fgrid/iso20022"
)
type Document01800105 struct {
XMLName xml.Name `xml:"urn:iso:std:iso:20022:tech:xsd:tsmt.018.001.05 Document"`
Message *FullPushThroughReportV05 `xml:"FullPus... |
// Person to be contacted in the seller's bank.
SellerBankContactPerson []*iso20022.ContactIdentification1 `xml:"SellrBkCtctPrsn,omitempty"` |
<|file_name|>server-tcp.py<|end_file_name|><|fim▁begin|>import socket
import threading
bind_ip = ""
bind_port = 60007
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind((bind_ip, bind_port))<|fim▁hole|>print("[*] Listening on %s:%d" % (bind_ip, bind_port))
def handle_client(client_socket):
... | server.listen(5)
|
<|file_name|>Esempio.java<|end_file_name|><|fim▁begin|>package lambda;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
public class Esempio extends JFrame {
public Esempio()
{
init();<|fim▁hole|> priva... |
}
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2019 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/LICENSE-2.0
#
# Unles... | |
<|file_name|>FCTRL2.py<|end_file_name|><|fim▁begin|>from sys import stdin as sin
list_index=[]
list=dict()<|fim▁hole|> f=1
#check if a value less that that has already been calculated
for i in range(1,n+1):
f*=i
return f
t=int(input())
for i in range(t):
n=int(sin.readline().rstrip())
... | def fn(n): |
<|file_name|>readlog.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import os<|fim▁hole|>import time
if len(sys.argv) < 2:
print("Please provide a server argument")
sys.exit(1)
def siginthandler(signum, stackframe):
sys.exit(-1)
signal.signal(signal.SIGINT, siginthandler)
logpath="/log"
if len(sys.argv)... | import sys
import etcd
import subprocess
import signal |
<|file_name|>cross_crate.rs<|end_file_name|><|fim▁begin|>// aux-build:const_evaluatable_lib.rs
// run-pass
#![feature(generic_const_exprs)]
#![allow(incomplete_features)]
extern crate const_evaluatable_lib;
fn user<T>() where [u8; std::mem::size_of::<T>() - 1]: Sized {
assert_eq!(const_evaluatable_lib::test1::<T>(... | }
fn main() {
assert_eq!(const_evaluatable_lib::test1::<u32>(), [0; 3]); |
<|file_name|>workflow-type.get.js<|end_file_name|><|fim▁begin|><import resource="classpath:alfresco/site-webscripts/org/alfresco/components/workflow/workflow.lib.js">
var workflowDefinitions = getWorkflowDefinitions(),
filters = [];
if (workflowDefinitions)
{
for (var i = 0, il = workflowDefinitions.length; i < i... | }
}
model.filters = filters; |
<|file_name|>closure.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/license... | let proj_bounds = object_type.projection_bounds_with_self_ty(fcx.tcx(),
fcx.tcx().types.err);
let sig = proj_bounds.iter() |
<|file_name|>modernizr.js<|end_file_name|><|fim▁begin|>/**
* # wrap/modernizr
*
* Wrap global instance for use in RequireJS modules
*
* > http://draeton.github.io/stitches<br/>
* > Copyright 2013 Matthew Cobbs<br/>
* > Licensed under the MIT license.
*/<|fim▁hole|>define(function () {
"use strict";
return Mod... | |
<|file_name|>xinerama.rs<|end_file_name|><|fim▁begin|>/*
* This file generated automatically from xinerama.xml by r_client.py.
* Edit at your peril.
*/
//Make the compiler quiet
#![allow(unused_imports)]
#![allow(unused_unsafe)]
use std;
use libc::*;
use std::{mem,num,ptr,str};
use ffi::base::*;
use base;
use base:... | |
<|file_name|>pulseaudiomixer.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright 2013-2014 Giulio Camuffo <giuliocamuffo@gmail.com>
*
* This file is part of Orbital
*
* Orbital 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 So... | }
PulseAudioMixer *PulseAudioMixer::create(Mixer *mixer)
{ |
<|file_name|>ActivityWithRemarks.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { classes } from '@framework/Globals'
import { Lite } from '@framework/Signum.Entities'
import { CaseActivityMessage, CaseNotificationEntity, CaseN... | initiallyFocused: true
|
<|file_name|>using_pageobjects.py<|end_file_name|><|fim▁begin|>from behave import then, when
from bs4 import BeautifulSoup
from bs4.element import Tag
from pageobjects.pages import About, Welcome
@when(u'I instantiate the Welcome page object')
def new_pageobject(context):
context.page = Welcome(context)
@then(u... | @then(u'get_link() returns the link subdocument')
def getlink_subdocument(context): |
<|file_name|>crunchtime.js<|end_file_name|><|fim▁begin|>$.ajax({
async: false,
url: "http://api.visalus.com/ITReporting/SalesAnalytics/GetDataBySP/?SPName=usp_PROMO_ViCrunch3FF_JSON&?",
type: 'GET',
dataType: 'jsonp',
success: function (data) {
... | },
|
<|file_name|>search-model.ts<|end_file_name|><|fim▁begin|>export class SearchModel {<|fim▁hole|> }
public SearchField: string;
public SearchValue: string;
}<|fim▁end|> | constructor(key: string, value: string) {
this.SearchField = key;
this.SearchValue = value; |
<|file_name|>sig_key_pair.rs<|end_file_name|><|fim▁begin|>use super::{super::{hash,
PUBLIC_KEY_SUFFIX,
PUBLIC_SIG_KEY_VERSION,
SECRET_SIG_KEY_SUFFIX,
SECRET_SIG_KEY_VERSION},
get_key_revisions,
mk_key_filename,
... | -> Result<(Self, PairType)> {
let (pair_type, name_with_rev, _) = super::parse_key_str(content)?; |
<|file_name|>EventListActivity.java<|end_file_name|><|fim▁begin|>package epsi.md4.com.epsicalendar.activities;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
imp... |
@Override |
<|file_name|>test_603_vec2.py<|end_file_name|><|fim▁begin|># Copyright (c) 2019-2020 Manfred Moitzi
# License: MIT License
import pytest
import math
import pickle
# Import from 'ezdxf.math._vector' to test Python implementation
from ezdxf.math._vector import Vec2, Vec3
from ezdxf.acc import USE_C_EXT
all_vec_classes ... | assert v3 == (1, 2, 0)
def test_round(vec2): |
<|file_name|>idea.js<|end_file_name|><|fim▁begin|>var keystone = require('keystone'),
async = require('async');
exports = module.exports = function(req, res) {
var view = new keystone.View(req, res),
locals = res.locals;
// Init locals
locals.section = 'ideas';
locals.page.title = 'Ideas - Evilcome';
local... | view.on('init', function(next) {
var q = keystone.list('Post').model.find().where('state', 'published').sort('-publishedDate').populate('author categories'); |
<|file_name|>3fab9480c190_professor_instructor.py<|end_file_name|><|fim▁begin|>"""professor => instructor
Revision ID: 3fab9480c190
Revises: 31ded1f6ad6
Create Date: 2014-02-17 00:56:12.566690
"""
# revision identifiers, used by Alembic.
revision = '3fab9480c190'
down_revision = '31ded1f6ad6'
from alembic import op... | |
<|file_name|>fortios_system_replacemsg_traffic_quota.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Lice... | #!/usr/bin/python |
<|file_name|>GeoFenceService.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2015 Thomas Hoffmann
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/license... |
import android.app.IntentService;
import android.content.Intent; |
<|file_name|>ClassVirtualFieldExpr.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 1998-2012 Caucho Technology -- all rights reserved
*
* This file is part of Resin(R) Open Source
*
* Each copy or derived work must preserve the copyright notice and this
* notice unmodified.
*
* Resin Open Source is free so... | import com.caucho.quercus.parser.QuercusParser;
import com.caucho.util.L10N;
/** |
<|file_name|>test.py<|end_file_name|><|fim▁begin|>import sys,os
os.environ["EPICS_CA_ADDR_LIST"] = "192.168.82.10"
os.environ["EPICS_CA_MAX_ARRAY_BYTES"] = "100000000"
<|fim▁hole|>a = VIMC.velaINJMagnetController(True,False)
a.switchONpsu('SOL')
#print(a.isON('HVCOR'))
print(a.getRI('SOL'))
#print(a.getILockStates('H... | import velaINJMagnetControl as VIMC
|
<|file_name|>Fn_execConvPrint.js<|end_file_name|><|fim▁begin|>(function() {
var AS = this, Fn = AS.Fn;
// assign
$.extend(Fn, {
execConvPrint: execConvPrint
});
return;
function execConvPrint() {
var b_FPR = AS.Bo.FPR;
var fn = null;
try {
if(b_FPR.Value('convfn') == "function(i, f... | |
<|file_name|>spline.py<|end_file_name|><|fim▁begin|>import numpy as np
# f(x) = a*x*x*x + b*x*x + c*x + d
# f'(x) = 3*a*x*x + 2*b*x + c
#
# d = x0
# c = dx0
# a + b + c + d = x1<|fim▁hole|># a = x1 - x0 - dx0 - b
#
# 3*a + 2*b + dx0 = dx1
# 3*a + 2*b = dx1 - dx0
# 3*(x1 - x0 - dx0 - b) + 2*b = dx1 - dx0
# -3*b + 2*b =... | # 3*a + 2*b + c = dx1
#
# a + b + dx0 + x0 = x1
# a + b = x1 - x0 - dx0 |
<|file_name|>PILTest.py<|end_file_name|><|fim▁begin|>'''
Created on May 21, 2016
@author: zlp
'''
# import Image
hello = 100
class PILTest(object):
hello = 200
def __init__(self, name):
self._name = name
def printName(self):
print self._name
def printHelloInCl... | # print t2.name2
# t1.name = 'HEIHEI!'
# print t1.name |
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#coding:utf-8
import requests
url="http://sendcloud.sohu.com/webapi/mail.send.json"
#files={ "file1": (u"1.pdf", open(u"1.pdf", "rb")),
# "file2": (u"2.pdf", open(u"2.pdf", "rb"))}
# 不同于登录SendCloud站点的帐号,您需要登录后台创建发信子帐号,使用子帐号和密码才可以进行邮件的发送。
param... | "fromname" : "SendCloud测试邮件", \
"subject" : "来自SendCloud的第一封邮件!", \ |
<|file_name|>tabs.component.js<|end_file_name|><|fim▁begin|>(function () {
'use strict';
angular.module('components.tabs')
.component('tabs', {
templateUrl: 'components/tabs/tabs.html',
controller: 'TabsController',
bindings: {
classes: '@?',
selected: '<?'
},
tran... | templateUrl: 'components/tabs/tab.html', |
<|file_name|>mockfileinfo.go<|end_file_name|><|fim▁begin|>/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
U... | }
func (_mr *_MockFileInfoRecorder) Size() *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Size") |
<|file_name|>test_random.py<|end_file_name|><|fim▁begin|>import unittest
import unittest.mock
import random
import time
import pickle
import warnings
from functools import partial
from math import log, exp, pi, fsum, sin
from test import support
class TestBasicOps:
# Superclass with tests common to all generators.... | perms = {} |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>"""tictactoe URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:<|fim▁hole|>Class-based views
1. Add an import: from other_app.views import Home
2... | Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home') |
<|file_name|>pipeline.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 compositing::CompositionPipeline;
use compositing::Compo... | Ok((pipeline, child_process))
}
fn new(id: PipelineId, |
<|file_name|>spell.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (c) 2010-2017 Tuukka Turto
#
# 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, incl... | |
<|file_name|>attribution.py<|end_file_name|><|fim▁begin|>from kik.resource import Resource
class Attribution(Resource):
"""
Parent class for all attribution types
"""
pass
class CustomAttribution(Attribution):
"""
Attribution class for custom attributions, as documented at `<https://dev.kik.... | :class:`VideoMessage <kik.messages.VideoMessage>`.
|
<|file_name|>conf.py<|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 required by applicable law or agre... | |
<|file_name|>RenderOverlayHandler.java<|end_file_name|><|fim▁begin|>package TFC.Handlers.Client;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.cl... | //Draw Health
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
//GL11.glBindTexture(GL11.GL_TEXTURE_2D, Minecraft.getMinecraft().renderEngine.getTexture("/bioxx/icons.png"));
|
<|file_name|>test_util.py<|end_file_name|><|fim▁begin|>##
# Copyright (c) 2006-2013 Apple 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/l... | data = {
"" : ("", ""),
"unquoted" : ("unquoted", ""), |
<|file_name|>misc.py<|end_file_name|><|fim▁begin|>'''
Created on 21.04.2015
@author: marscher
'''
from __future__ import absolute_import
"""Miscellaneous classes/functions/etc."""
import os
import struct
import ctypes
if os.name != 'nt':
import fcntl
import termios
else:
import ctypes.wintypes
DEFAULT_... |
@staticmethod
def _define_csbi(): |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#[macro_use]
extern crate serde_derive;
use std::collections::VecDeque;
use std::env;
use std::fs::File;
use std::io::{BufReader, Read};
use std::sync::{Arc, Mutex};
use std::thread::{self, sleep};
use std::time::Duration;
use std::time::{SystemTime, UNIX_EPOCH};
use ... | if is_chain_bootstrap_required(&config).await? { |
<|file_name|>JDBCFeeder.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2014 Jörg Prante
*
* 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/LI... | |
<|file_name|>bottomSheet.js<|end_file_name|><|fim▁begin|>/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.1-master-f6dedff
*/
(function( window, angular, undefined ){
"use strict";
/**
* @ngdoc module
* @name material.components.bottomSheet
* @description
* BottomSheet... | // Slow down drag when trying to drag up, and stop after PADDING |
<|file_name|>acl.go<|end_file_name|><|fim▁begin|>// Copyright 2018 The LUCI 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/LICENSE-2.0
... | package repo
|
<|file_name|>demo1_8.py<|end_file_name|><|fim▁begin|>from callback_event import *
def getOddNumber(k,getEvenNumber): return 1+getEvenNumber(k)
def main():
k=1
i=getOddNumber(k,double);
print(i)
i=getOddNumber(k,quadruple);
print(i)<|fim▁hole|>if __name__=="__main__":main()<|fim▁end|> | i=getOddNumber(k,lambda x:x*8)
print(i)
|
<|file_name|>view.rs<|end_file_name|><|fim▁begin|>// +--------------------------------------------------------------------------+
// | Copyright 2016 Matthew D. Steele <mdsteele@alum.mit.edu> |
// | |
// | This file is part of Syst... | game: &mut Game, |
<|file_name|>CustomizationPolicy.java<|end_file_name|><|fim▁begin|>// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.vmwarecloudsimple.models;
import com.azure.resourcemanager.vm... | /**
* Gets the name property: Customization policy name. |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>pub mod intel;<|fim▁end|> | |
<|file_name|>test_user.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*-
"""Test class for Users UI
:Requirement: User
:CaseAutomation: Automated
:CaseLevel: Acceptance
:CaseComponent: UI
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
import random
from fauxfactory import gen_string
from ... | 10. Wait for successful Discovery Status on bare metal host
11. In Hosts -> Discovered Hosts, find the above discovered
host |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models
class Snippet(models.Model):<|fim▁hole|>
class Meta:
pass
def __unicode__(self):
return self.snippet<|fim▁end|> | """A text snippet. Not meant for use by anyone other than a designer"""
name = models.CharField(max_length=255)
snippet = models.TextField(blank=True) |
<|file_name|>entity-action.ts<|end_file_name|><|fim▁begin|>import { BreezeEnum} from './enum';
/** EntityAction is an 'Enum' containing all of the valid actions that can occur to an 'Entity'.
*/
export class EntityAction extends BreezeEnum {
/** Entity was attached via an AttachEntity call. */
static Attach ... | /** Is this a 'modification' operation? ( PropertyChange, MergeOnQuery, MergeOnSave, MergeOnImport, RejectChanges) */
isModification() {
return !!this._isModification; |
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>"""
WSGI config for jobboardscraper project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
"""<|fim▁hole|>
from django.core.wsgi impor... |
import os |
<|file_name|>balancer_conn_wrappers_test.go<|end_file_name|><|fim▁begin|>/*
*
* Copyright 2019 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.apache.... | }
|
<|file_name|>SleepingSplitterTest.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2020 The BtrPlace Authors. All rights reserved.
* Use of this source code is governed by a LGPL-style
* license that can be found in the LICENSE.txt file.
*/
package org.btrplace.scheduler.runner.disjoint.splitter;
import gnu.trov... | |
<|file_name|>x86.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LI... | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | pub mod vga; |
<|file_name|>server.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# encoding: utf-8
#
# 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 licen... | def extract_entity_names(t, label):
entity_names = [] |
<|file_name|>CallLogListItemHelper.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2011 The Android Open Source 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 License at
*
* ht... |
// Get the time/date of the call
final CharSequence timeOfCall = mPhoneCallDetailsHelper.getCallDate(details);
|
<|file_name|>edit.go<|end_file_name|><|fim▁begin|>/*
Copyright 2015 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless re... | that contains your unapplied changes. The most common error when updating a resource
is another editor changing the resource on the server. When this occurs, you will have
to apply your changes to the newer version of the resource, or update your temporary
saved copy to include the latest resource version.`)) |
<|file_name|>db.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
# Gregory Starck, g.starck@gmail.com
# Hartmut Goebel, h.goebel@goebel-consult.de
#
# This file is part ... | props_str = u' ('
values_str = u' (' |
<|file_name|>mailer.js<|end_file_name|><|fim▁begin|>// mailer.js
var nodemailer = require('nodemailer');
var smtpTransport = nodemailer.createTransport("SMTP", {
service: "Mandrill",
debug: true,
auth: {
user: "evanroman1@gmail.com",
pass: "k-AdDVcsNJ9oj8QYATVNGQ"
}
});
exports.sendEmail... | |
<|file_name|>ZoomToSelectedFeatures.js<|end_file_name|><|fim▁begin|>/**
* Copyright (c) 2008-2011 The Open Planning Project
*
* Published under the BSD license.
* See https://github.com/opengeo/gxp/raw/master/license.txt for the full text
* of the license.
*/
/**
* @requires plugins/ZoomToExtent.js
*/
/** ap... | |
<|file_name|>TrafficRoutingType.cpp<|end_file_name|><|fim▁begin|>/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codedeploy/model/TrafficRoutingType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <a... | |
<|file_name|>LexToken.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013 Michael Biggs. See the COPYING file at the top-level
# directory of this distribution and at http://shok.io/code/copyright.html
# Tokens that come from the Lexer are either pairs or tuples:
# colno:type
# colno:type:value<|fim▁hole|> ttyp... | class LexToken:
colno = 0 |
<|file_name|>FeatureTestObject2.java<|end_file_name|><|fim▁begin|>package org.elasticsearch.painless;
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with<|fim▁hole|> * this work for additional information regarding copyright
* ownership. Elasticsea... | |
<|file_name|>sniff.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python
__author__="kebo"
__date__ ="$2009-11-5 11:15:55$"
import pcap
import sys
import string
import time
import socket
import struct
import getopt
protocols={socket.IPPROTO_TCP:'tcp',
socket.IPPROTO_UDP:'udp',
socket.IPPROTO_ICMP:'i... | |
<|file_name|>classes_4.js<|end_file_name|><|fim▁begin|>var searchData=
[
['fan2para',['Fan2Para',['../classrisa_1_1cuda_1_1_fan2_para.html',1,'risa::cuda']]],
['filter',['Filter',['../classrisa_1_1cuda_1_1_filter.html',1,'risa::cuda']]]<|fim▁hole|><|fim▁end|> | ]; |
<|file_name|>rollingupdatecluster.go<|end_file_name|><|fim▁begin|>/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENS... | for _, i := range r.Ready {
if i.Node != nil {
nodes = append(nodes, i.Node) |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Zeobuilder is an extensible GUI-toolkit for molecular model construction.
# Copyright (C) 2007 - 2012 Toon Verstraelen <Toon.Verstraelen@UGent.be>, Center
# for Molecular Modeling (CMM), Ghent University, Ghent, Belgium; all rights
# reserv... | # This file is part of Zeobuilder.
#
# Zeobuilder is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License |
<|file_name|>text.py<|end_file_name|><|fim▁begin|>Skip to content
Search or jump to…
Pull requests
Issues<|fim▁hole|>9
3028PacktPublishing/Intelligent-Projects-Using-Python
Code Issues 0 Pull requests 0 Wiki Security Insights
Intelligent-Projects-Using-Python/Chapter02/TransferLearning.py
@santanupattanayak santanupa... | Marketplace
Explore
@zhejoe |
<|file_name|>fetch.py<|end_file_name|><|fim▁begin|>import re
from time import sleep
from .settings import settings
def get_parsed_mentions(raw_text):
regex = re.compile(r"@([\w\.]+)")
regex.findall(raw_text)
return regex.findall(raw_text)
def get_parsed_hashtags(raw_text):
regex = re.compile(r"#(\w... | el_see_likes = browser.find_one(".vcOH2")
if el_see_likes is not None:
el_plays = browser.find_one(".vcOH2 > span") |
<|file_name|>nico.js<|end_file_name|><|fim▁begin|>var path = require('path');
var package = require('./package');
var webpack = require('webpack');
var ProgressPlugin = require('webpack/lib/ProgressPlugin');
var inspect = require('util').inspect;
var Busboy = require('busboy');
var chalk = require('chalk');
var webpack... | handler = handler || webpackMiddleware(webpackCompiler, {
publicPath: '/dist/',
lazy: false, |
<|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... | //~^ WARNING use of unstable library feature
foo.method_deprecated_unstable(); //~ ERROR use of deprecated item
//~^ WARNING use of unstable library feature |
<|file_name|>1243.py<|end_file_name|><|fim▁begin|>from typing import List<|fim▁hole|> def transformArray2(self, arr: List[int]) -> List[int]:
while True:
arr2 = [a for a in arr]
changed = 0
for id in range(1, len(arr) - 1):
l = arr[id - 1]
r... |
class Solution: |
<|file_name|>builtin_compare.go<|end_file_name|><|fim▁begin|>// Copyright 2017 PingCAP, 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/LICEN... | type builtinIntervalIntSig struct {
baseBuiltinFunc |
<|file_name|>digraph.rs<|end_file_name|><|fim▁begin|>use std::fmt;
use super::{HashSet, HashMap};
use super::{Node, NodeIndex, NodeIndexSet, NodeIndices, Graph, GraphError, GraphResult};
/// Directed graph. Allows loops.
pub struct Digraph<T> {
nodes: HashMap<NodeIndex, Node<T>>,
in_adj: HashMap<NodeIndex, Nod... | |
<|file_name|>video.rs<|end_file_name|><|fim▁begin|>// This file is part of zinc64.
// Copyright (c) 2016-2019 Sebastian Jastrzebski. All rights reserved.
// Licensed under the GPLv3. See LICENSE file in the project root for full license text.
#![cfg_attr(feature = "cargo-clippy", allow(clippy::transmute_ptr_to_ptr))]
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.