prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>account.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity 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 ve...
<|file_name|>github-repo.d.ts<|end_file_name|><|fim▁begin|>declare module GitHubAPI { export interface Owner { login: string; id: number, avatar_url: string; gravatar_id: string; url: string; html_url: string; followers_url: string; following_url: stri...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>//index.js //获取应用实例 let User = new wx.BaaS.TableObject(1997) let user = User.create() var query = new wx.BaaS.Query() var app = getApp() Page({ data: { motto: 'Hello World', userInfo: {}, pages: [ 'logs', 'weatherDemo', 'calculator...
}, saveUserInfo: function(openid) {
<|file_name|>db.py<|end_file_name|><|fim▁begin|># -*- coding: 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 licenses this file # to ...
session.query(DagTag).delete() session.query(DagModel).delete()
<|file_name|>ReqProxyHandler.py<|end_file_name|><|fim▁begin|>######################################################################## # $HeadURL$ # File: ReqProxyHandler.py # Author: Krzysztof.Ciba@NOSPAMgmail.com # Date: 2013/06/04 13:18:41 ######################################################################## """ ...
cachedRequests = len( os.listdir( self.cacheDir() ) ) except OSError, error:
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>prelude!(); use ::vga; use super::pic::{PIC_1, PIC_2}; mod item; pub use self::item::*; mod idt_ptr; pub use self::idt_ptr::*; extern "C" { fn interrupt0(); fn interrupt1(); } extern { fn __kernel_timer_tick(); } const IDT_SIZE: usize = 64; static mut I...
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from .models import Donor from django.forms import ModelForm, TextInput class DonorForm(ModelForm): class Meta: model = Donor fields = [ "email", "donation_date", "phone_number", "address", "observations" ] widgets = { 'donation_date...
'address': TextInput(attrs={'class': 'form-control'}), 'email': TextInput(attrs={'class': 'form-control'}),
<|file_name|>x11_topmost_window_finder_interactive_uitest.cc<|end_file_name|><|fim▁begin|>// Copyright 2014 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 "ui/views/widget/desktop_aura/x11_topmost_window_finder...
// Avoid positioning test windows at 0x0 because window managers often have a // panel/launcher along one of the screen edges and do not allow windows to // position themselves to overlap the panel/launcher.
<|file_name|>zh_CN.tsx<|end_file_name|><|fim▁begin|>export default { cancelText: '取消', okText: '确定',<|fim▁hole|><|fim▁end|>
};
<|file_name|>bitcoin_eo.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="eo" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Litecoin</source> ...
<source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source>
<|file_name|>SmilesGenerator.js<|end_file_name|><|fim▁begin|>Clazz.declarePackage ("J.smiles"); Clazz.load (["java.util.Hashtable", "JU.BS", "J.smiles.VTemp"], "J.smiles.SmilesGenerator", ["JU.List", "$.SB", "J.smiles.InvalidSmilesException", "$.SmilesAromatic", "$.SmilesAtom", "$.SmilesBond", "$.SmilesParser", "$.Smi...
else sb.append (J.smiles.SmilesAtom.getAtomLabel (atomicNumber, isotope, valence, charge, nH, isAromatic, atat != null ? atat : this.checkStereoPairs (atom, atomIndex, stereo, stereoFlag))); sb.appendSB (sMore);
<|file_name|>WatchHTTPManager.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2015 Red Hat, 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...
private static final Logger logger = LoggerFactory.getLogger(WatchHTTPManager.class); private CompletableFuture<HttpResponse<InputStream>> call;
<|file_name|>genbuild.py<|end_file_name|><|fim▁begin|>import os.path, string, posix, pyvms # # IDIR = ['swig_root:[source.swig]', 'swig_root:[source.doh.include]', 'swig_root:[source.include]', 'swig_root:[source.preprocessor]'] def new_file(fg, dirname): global IDIR fn = 'swig_root:[vms.scripts]comp...
if first == 0: end_file(fc) fc.close()
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from flask_wtf import FlaskForm<|fim▁hole|>from wtfrecaptcha.fields import RecaptchaField from flask_wtf.file import FileField, FileAllowed, FileRequired class LoginForm(FlaskForm): email = StringField('Email', validators=[DataRequired(), Email(), Length(min=6, m...
from . import app from wtforms import StringField, PasswordField, SelectField, DateField, IntegerField from wtforms.validators import DataRequired, Length, Email, EqualTo, Optional, NumberRange
<|file_name|>Test.java<|end_file_name|><|fim▁begin|>package com.maximusvladimir.randomfinder; import java.awt.Cursor; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.JFrame; import javax.swing.JLabel; imp...
import javax.swing.Timer; import javax.swing.JTextPane; import java.awt.Font;
<|file_name|>periodic_task.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Licensed under the Apache License, Version 2.0 (the "License"); you may<|fim▁hole|># a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
# not use this file except in compliance with the License. You may obtain
<|file_name|>15.4.4.21-9-c-i-26.js<|end_file_name|><|fim▁begin|>/// Copyright (c) 2012 Ecma International. All rights reserved. /** * @path ch15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-26.js * @description Array.prototype.reduce - This object is the Arguments object which implements its own property get method (numbe...
function testcase() { var testResult = false;
<|file_name|>coordinate.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> pub y: u8, } impl Coordinate { /// If the column has an odd number of slots, `x` must be odd. /// This means that the leftmost column for descent into darkness /// should be x = 1, and for world's wake it should be x = 0. /// /...
#[derive(Hash, Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub struct Coordinate { pub x: u8,
<|file_name|>interface.cpp<|end_file_name|><|fim▁begin|>// Copyright (C) 2015 Dave Griffiths // // 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...
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|>import pytest from tests.base import Author, Post, Comment, Keyword, fake def make_author(): return Author( id=fake.random_int(), first_name=fake.first_name(), last_name=fake.last_name(), twitter=fake.domain_word(), ) def...
<|file_name|>routefilterrules.go<|end_file_name|><|fim▁begin|>package network // Copyright (c) Microsoft and contributors. 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 Lice...
err = autorest.Respond( resp, client.ByInspecting(),
<|file_name|>9. Extract e-mails.js<|end_file_name|><|fim▁begin|>/** Problem 9. Extract e-mails Write a function for extracting all email addresses from given text.<|fim▁hole|>var text='gosho@gmail.com bla bla bla pesho_peshev@yahoo.com bla bla gosho_geshev@outlook.com' function extractEmails(text) { var result=text....
All sub-strings that match the format @… should be recognized as emails. Return the emails as array of strings. */ console.log('Problem 9. Extract e-mails');
<|file_name|>ExpressionUnboundFact.java<|end_file_name|><|fim▁begin|>/* * Copyright 2012 Red Hat, Inc. and/or its affiliates. * * 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 * * ...
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for skeleton project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands disc...
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
<|file_name|>18.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python y = '''75 95 64 17 47 82 18 35 87 10 20 04 82 47 65 19 01 23 75 03 34 88 02 77 73 07 63 67 99 65 04 28 06 16 70 92 41 41 26 56 83 40 80 70 33<|fim▁hole|>70 11 33 28 77 73 17 78 39 68 17 57 91 71 52 38 17 14 91 43 58 50 27 29 48 63 66 04 68 89 53 67 30 7...
41 48 72 33 47 32 37 16 94 29 53 71 44 65 25 43 91 52 97 51 14
<|file_name|>lib.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/. */ #![crate_name = "canvas_traits"] #![crate_type = "rlib"] #![featu...
<|file_name|>AddOnUnitTest.java<|end_file_name|><|fim▁begin|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2012 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may n...
<|file_name|>ApprovalService.java<|end_file_name|><|fim▁begin|>package com.dasa.approval.service; import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.mybatis.spring.support.SqlSessionDaoSupport; import org.springframework...
import com.dasa.approval.vo.ApprovalVo;
<|file_name|>script.js<|end_file_name|><|fim▁begin|>var path = require('path'); var cmd = require('cmd-util'); var ast = cmd.ast; var iduri = cmd.iduri; exports.init = function(grunt) { var exports = {}; exports.jsConcat = function(fileObj, options) { var data = grunt.file.read(fileObj.src); var meta = ...
<|file_name|>AutoUpdateService.java<|end_file_name|><|fim▁begin|>package android.coolweather.com.coolweather.service; import android.app.AlarmManager; import android.app.PendingIntent; import android.app.Service;<|fim▁hole|>import android.coolweather.com.coolweather.util.Utility; import android.os.IBinder; import andr...
import android.content.Intent; import android.content.SharedPreferences; import android.coolweather.com.coolweather.gson.Weather; import android.coolweather.com.coolweather.util.HttpUtil;
<|file_name|>test_gcp_bigtable_operator.py<|end_file_name|><|fim▁begin|># -*- coding: 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 ...
NODES = 5 TABLE_ID = 'test-table-id' INITIAL_SPLIT_KEYS = [] # type: List EMPTY_COLUMN_FAMILIES = {} # type: Dict
<|file_name|>test_sql_update_strategy.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from unittest.mock import patch from testil import eq from corehq.util.soft_assert.core import SoftAssert from casexml.apps.case.exceptions import ReconciliationError from casexml.apps.case.xml.parser import CaseUpdateAction, KNOWN_PROPE...
from django.test import TestCase from freezegun import freeze_time
<|file_name|>bandit.rs<|end_file_name|><|fim▁begin|>use env::{Env, EnvConvert, EnvRepr, Action, DiscreteAction, Response, HorizonAveraged}; use rng::xorshift::{Xorshiftplus128Rng}; use rand::{Rng, thread_rng}; use rand::distributions::{IndependentSample}; use rand::distributions::range::{Range}; use std::f32::consts:...
} #[derive(Clone, Copy, Default)] struct BanditState {
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! 32-bit specific definitions for linux-like values pub type c_long = i32; pub type c_ulong = u32; pub type clock_t = i32; pub type time_t = i32; pub type suseconds_t = i32; pub type ino_t = u32; pub type off_t = i32; pub type blkcnt_t = i32; pub type __fsword_t = i32...
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
<|file_name|>pathChunkingPlugin.js<|end_file_name|><|fim▁begin|>const minimatch = require( "minimatch" ); const webpack = require( "webpack" ); const _ = require( "lodash" ); <|fim▁hole|>module.exports = function( options ) { function isMatchingModule( mod ) { return mod.resource && _.some( options.paths, path => mi...
<|file_name|>encargo.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { Http, Response, URLSearchParams, BaseRequestOptions } from '@angular/http'; import { Observable } from 'rxjs/Rx'; import { Encargo } from './encargo.model'; import { DateUtils } from 'ng-jhipster'; @Inject...
<|file_name|>angular-sortable.js<|end_file_name|><|fim▁begin|>/* jQuery UI Sortable plugin wrapper @param [ui-sortable] {object} Options to pass to $.fn.sortable() merged onto ui.config */ angular.module('ui.sortable', []) .value('uiSortableConfig',{}) .directive('uiSortable', [ 'uiSortableConfig', ...
function combineCallbacks(first,second){ if( second && (typeof second === "function") ){ return function(e,ui){
<|file_name|>test_nn_autotune.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys from os.path import * import os from pyflann import * from copy import copy from numpy import * from numpy.random import * import unittest class Test_PyFLANN_nn(unittest.TestCase): def setUp(self): self.nn = FLA...
perm = permutation(N)
<|file_name|>field_type_enum.py<|end_file_name|><|fim▁begin|># Copyright (C) 2016 Statoil ASA, Norway. # # This file is part of ERT - Ensemble based Reservoir Tool. # # ERT 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 Sof...
ECLIPSE_PARAMETER = None GENERAL = None
<|file_name|>btp_function_declaration246.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tec...
@staticmethod def openapi_types(): """
<|file_name|>structscannerOLD.cpp<|end_file_name|><|fim▁begin|>/* This source file is a part of the GePhex Project. Copyright (C) 2001-2004 Georg Seidel <georg@gephex.org> Martin Bayer <martin@gephex.org> Phillip Promesberger <coma@gephex.org> This program is free software; you can redistribute it and/or mo...
if (pos2 == std::string::npos) return s.substr(pos,s.length()); return s.substr(pos,pos2);
<|file_name|>type_variable.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/l...
let index = self.values.push(TypeVariableData {
<|file_name|>service.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.models import User from game.models import Point, Team def addPoint(blame_username, fixer_username): blame = User.objects.get(username=blame_username) fixer = User.objects.get(username=fixer_username) point = Point() point.blame = blame ...
<|file_name|>980_unique_paths_III.py<|end_file_name|><|fim▁begin|>class Solution: def uniquePathsIII(self, grid: 'List[List[int]]') -> 'int': self.res = 0 R, C, E = len(grid), len(grid[0]), 1 for i in range(R): for j in range(C): if grid[i][j] == 1: x,y = (i, j)<|...
<|file_name|>ttt.py<|end_file_name|><|fim▁begin|># old single process tictactoe game to be rewritten.... import numpy import os class TicTacToePlayer: def __init__(self, playerType, playerName, ttt_game_settings): if playerType not in ['AI', 'Terminal']: raise(ValueError()) self.type=playerType self.name=p...
if 1+num_SE + num_NW == self.win_length:
<|file_name|>pair_coul_cut_soft.cpp<|end_file_name|><|fim▁begin|>/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (...
void PairCoulCutSoft::read_restart_settings(FILE *fp)
<|file_name|>ref.py<|end_file_name|><|fim▁begin|># This file is part of OpenStack Ansible driver for Kostyor. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, o...
<|file_name|>project.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 frappe from frappe.utils import flt, getdate from frappe import _ from erpnext.utilities...
<|file_name|>servicehost.js<|end_file_name|><|fim▁begin|>import {normalize, resolve} from "path"; import {existsSync, readFileSync} from "fs"; import {sys, ScriptSnapshot, resolveModuleName, getDefaultLibFilePath} from "typescript"; export function createServiceHost(options, filenames, cwd) { const normalizePath = ...
return f.snap; },
<|file_name|>local.py<|end_file_name|><|fim▁begin|># Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com><|fim▁hole|># Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms ...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2018 ACSONE SA/NV<|fim▁hole|>from . import test_accounting from . import test_donation<|fim▁end|>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
<|file_name|>addComment.js<|end_file_name|><|fim▁begin|>Template.addComment.events({ // press enter on input 'keyup #addcomment': function(event) { if (event.which === 13) { event.stopPropagation(); const comment = event.target.value; if (comment) { event.target.value = ''; ...
Meteor.call('addComment', comment, userName, pageId, function(err, res) { if (err) { alert(err);
<|file_name|>capsule.rs<|end_file_name|><|fim▁begin|>//! Work wih Python capsules //! use libc::c_void; use std::ffi::{CStr, CString, NulError}; use std::mem; use super::object::PyObject; use crate::err::{self, PyErr, PyResult}; use crate::ffi::{PyCapsule_GetPointer, PyCapsule_Import, PyCapsule_New};<|fim▁hole|>/// Ca...
use crate::python::{Python, ToPythonPointer};
<|file_name|>drop_out.py<|end_file_name|><|fim▁begin|>from quex.engine.generator.languages.address import Address from quex.blackboard import E_EngineTypes, E_AcceptanceIDs, E_StateIndices, \ E_TransitionN, E_PostContextIDs, E_PreC...
<|file_name|>mange_access.manifest.js<|end_file_name|><|fim▁begin|>'use strict'; const periodic = require('periodicjs'); const capitalize = require('capitalize'); const pluralize = require('pluralize'); const reactappLocals = periodic.locals.extensions.get('periodicjs.ext.reactapp'); const reactapp = reactappLocal...
}
<|file_name|>write_batch_test.go<|end_file_name|><|fim▁begin|>package gorocksdb import ( "testing" "github.com/facebookgo/ensure" ) func TestWriteBatch(t *testing.T) { db := newTestDB(t, "TestWriteBatch", nil) defer db.Release() var ( givenKey1 = []byte("key1") givenVal1 = []byte("val1") givenKey2 = []by...
v1, err := db.Get(ro, givenKey1)
<|file_name|>test_dhcp.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import unittest from nose.tools import ok_, eq_, assert_equal, assert_false, assert_true, assert_raises # noinspection PyUnresolvedReferences from .._tins import EthernetII, HWAddress, PDU, IP, TCP, RAW, PDUNotFound, UDP, ICMP, OptionNotFou...
def test_broadcast_opt(self): dhcp = DHCP()
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from pprint import pprint from django import forms from base.forms.custom import O2BaseForm from base.forms.fields import ( O2FieldCorForm, O2FieldModeloForm, O2FieldRefForm, ) class InfAdProdForm(forms.Form): pedido = forms.CharField( label...
<|file_name|>example_python_operator.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # 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 # #...
# distributed under the License is distributed on an "AS IS" BASIS,
<|file_name|>icmp.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # # 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...
""" _PACK_STR = '!xBH'
<|file_name|>handshake.rs<|end_file_name|><|fim▁begin|>use crate::{ compat::{AllowStd, SetWaker}, WebSocketStream, }; use log::*; use std::{ future::Future, io::{Read, Write}, pin::Pin, task::{Context, Poll}, }; use tokio::io::{AsyncRead, AsyncWrite}; use tungstenite::{ handshake::{ ...
enum StartedHandshake<Role: HandshakeRole> { Done(Role::FinalResult), Mid(WsHandshake<Role>),
<|file_name|>0007_retweet.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('twit', '0006_auto_20160419_0248'), ] operations = [ migrations.Cre...
fields=[
<|file_name|>ios_static_route.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published...
result['commands'] = commands if commands:
<|file_name|>tcuX11.hpp<|end_file_name|><|fim▁begin|>#ifndef _TCUX11_HPP #define _TCUX11_HPP /*------------------------------------------------------------------------- * drawElements Quality Program Tester Core * ---------------------------------------- * * Copyright 2014 The Android Open Source Project * * Lice...
bool getVisualInfo (VisualID visualID, XVisualInfo& dst); void processEvents (void); void processEvent (XEvent& event);
<|file_name|>StandardModuleTestCaseConverter.java<|end_file_name|><|fim▁begin|>package de.simonscholz.junit4converter.converters; import org.eclipse.jdt.core.dom.AST; import org.eclipse.jdt.core.dom.MethodDeclaration; import org.eclipse.jdt.core.dom.SimpleType; import org.eclipse.jdt.core.dom.Type; import org.ec...
for (MethodDeclaration method : methods) { String methodName = method.getName().getFullyQualifiedName();
<|file_name|>adapt.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ This progam (as part of SHEAR) searches adapter sequences and generates an adapter file for use with SHEAR/Scythe. """ import sys import os import argparse import re import gzip _LICENSE = """ SHEAR: Simple Handler f...
self.endmers[endmer] = self.endmers.get(endmer, 0) + 1 return ''
<|file_name|>mouse.rs<|end_file_name|><|fim▁begin|>// The MIT License (MIT) // // Copyright (c) 2014 Jeremy Letang // // 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, i...
//
<|file_name|>website-redirect.service.js<|end_file_name|><|fim▁begin|>import { escapeFormat } from '../../core/badge-urls/path-helpers.js' import { redirector } from '../index.js' function escapeFormatSlashes(t) { return ( escapeFormat(t) // Double slash .replace(/\/\//g, '/') ) } /* Old documenta...
</td></tr> <tr><td> Slashes <code>//</code> </td><td> → </td><td> <code>/</code> Slash <br/>
<|file_name|>util.py<|end_file_name|><|fim▁begin|>#Interphase - Copyright (C) 2009 James Garnon <http://gatc.ca/> #Released under the MIT License <http://opensource.org/licenses/MIT> from __future__ import division import os from env import engine __docformat__ = 'restructuredtext' class Text(object): """ R...
else:
<|file_name|>flow.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/. */ //! Servo's experimental layout system builds a tree of `Flow` a...
match self.class() { FlowClass::TableRow | FlowClass::TableRowGroup | FlowClass::TableColGroup | FlowClass::TableCaption => true,
<|file_name|>arraylist-filter-min.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:8b2c75ae8236614319bbfe99cee3dba6fa2183434deff5a3dd2f69625589c74a<|fim▁hole|><|fim▁end|>
size 391
<|file_name|>endpoint.go<|end_file_name|><|fim▁begin|>// Copyright 2012 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. package ipv4 import ( "net" "time" "golang.org/x/net/internal/socket" ) // BUG(mikio): On Windows, t...
// Close closes the endpoint. func (c *PacketConn) Close() error {
<|file_name|>csb_19.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2006 ACYSOS S.L. (http://acysos.com) All Rights Reserved. # Pedro Tarrafeta ...
txt_remesa += self._total_general_19(cr,uid)
<|file_name|>cluster.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)] use super::bit_cost::BrotliPopulationCost; use super::histogram::{CostAccessors, HistogramSelfAddHistogram, HistogramAddHistogram, HistogramClear}; use super::util::FastLog2; use super::util::brotli_min_size_t; use alloc; u...
/* Reorders elements of the out[0..length) array and changes values in
<|file_name|>api.py<|end_file_name|><|fim▁begin|>import psutil from ajenti.api import * from ajenti.ui import * @plugin class NetworkManager (BasePlugin): def get_devices(self): return psutil.net_io_counters(pernic=True).keys() @interface class INetworkConfig (object): interfaces = {} @propert...
self.name = '' self.devclass = ''
<|file_name|>TemplateExAdapter.java<|end_file_name|><|fim▁begin|>package com.mybatistemplate.adapter; import com.mybatistemplate.core.GeneratorIdSqlCallback; import com.mybatistemplate.core.IdGeneratorType; import org.apache.ibatis.mapping.MappedStatement; import org.apache.ibatis.mapping.ResultMap; /** * Cr...
public void updateBatch(MappedStatement ms, ResultMap resultMap, String table, Class entity) throws Exception{
<|file_name|>useFragmentNode.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails oncall+relay * @flow strict-local * @format */ // flowli...
const mustResubscribeGenerationRef = useRef(0); const shouldUpdateGenerationRef = useRef(0);
<|file_name|>FamilyCounter.py<|end_file_name|><|fim▁begin|>from __future__ import print_function <|fim▁hole|> def __init__(self, use=True): self.use = use def transform(self, features_raw, **transform_params): if self.use: features = features_raw.copy(deep=True) family =...
import pandas as pd from sklearn.base import TransformerMixin class FamilyCounter(TransformerMixin):
<|file_name|>2.cc<|end_file_name|><|fim▁begin|>// 2000-08-02 bkoz // Copyright (C) 2000-2021 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published b...
#include <iostream>
<|file_name|>common.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # File: common.py # Author: Yuxin Wu <ppwwyyxxc@gmail.com> import random<|fim▁hole|>import multiprocessing import numpy as np from tqdm import tqdm from six.moves import queue from tensorpack import * from tensorpack.util...
import time import threading
<|file_name|>test_md5py.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import unittest<|fim▁hole|>class TddInPythonExample(unittest.TestCase): def test_object_program(self): m = MD5() m.update("1234") hexdigest = m.hexdigest() self.assertEqual("81dc9bdb52d04dc20036dbd8313ed0...
from app.md5py import MD5
<|file_name|>postgre.ts<|end_file_name|><|fim▁begin|>import Compiler from '../compiler' import { isEmpty, first } from 'lodash' export default class extends Compiler {<|fim▁hole|> public compileInsertStatement ({ results }: IStatement): string { return this.appendReturningClause(super.compileInsertStatement(argum...
protected get placeholder () { return '$' + this.bindings.length }
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url from .views import (homepage, aboutpage, newspage, gallerypage, hellopage, embedpage, widgetpage, newsdetailpage, apps_landing_page, border_adjustment_plot, docspage, gettingstartedpage) urlpatte...
name='border_adjustment'),
<|file_name|>recover.py<|end_file_name|><|fim▁begin|># This file is part of VoltDB. # Copyright (C) 2008-2014 VoltDB Inc. # # This file contains original code and/or modifications of original code. # Any modifications made by VoltDB Inc. are licensed under the following # terms and conditions: # # Permission is hereby...
# without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions:
<|file_name|>date.format.js<|end_file_name|><|fim▁begin|>/* * Date Format 1.2.3 * (c) 2007-2009 Steven Levithan <stevenlevithan.com> * MIT license * * Includes enhancements by Scott Trenda <scott.trenda.net> * and Kris Kowal <cixar.com/~kris.kowal/> * * Accepts a date, a mask, or a date and a mask. * Returns a...
// Internationalization strings dateFormat.i18n = { dayNames: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
<|file_name|>BrixPageParameters.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 requir...
} } return true;
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; // Imports for the fake backend. import {InMemoryWebApiModule} from 'ang...
RegisterFormComponent, BookmarkEditComponent, BookmarkViewComponent ],
<|file_name|>example_scraper.py<|end_file_name|><|fim▁begin|># Note: you must have `flac` and `metaflac` available in your path <|fim▁hole|> all_files = os.listdir(".") all_files = [f_name for f_name in all_files if "wav" in f_name] my_scraper = SillyBeatportScraper() print("{} file(s) to scrape".format(len(all_files...
from silly_beatport_scraper import * import os import subprocess import urllib
<|file_name|>clustertree.py<|end_file_name|><|fim▁begin|># #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://etetoolkit.org # # ETE is free software: you can redistribute it and/or modify it # under the term...
tree.set_distance_function(my_dist_fn)
<|file_name|>middleware.py<|end_file_name|><|fim▁begin|>import time import re from django.http import HttpResponseRedirect from django.core.cache import cache from django.core.urlresolvers import reverse from django.conf import settings # In-memory caches are used since different processes do not necessarily # exhibi...
<|file_name|>43df309dbf3f_extend_base_image_id_to_100_chars.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 ...
type_=sa.String(length=36),
<|file_name|>ServiceHasResource.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ The MIT License (MIT) Copyright (c) 2017 LeanIX GmbH 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 with...
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
<|file_name|>bayes.py<|end_file_name|><|fim▁begin|># __author__ = MelissaChan # -*- coding: utf-8 -*- # 16-2-14 下午4:37 # 词表转换向量 # 创建词汇表 def createVocabList(dataSet): vocabSet = set([]) for document in dataSet: vocabSet = vocabSet | set(document) return list(vocabSet) # 转换为向量 def setOfWords2Vec(voca...
for i in range(10): spamTest()
<|file_name|>test_london_underground.py<|end_file_name|><|fim▁begin|>import astar import os import sys import csv import math from difflib import SequenceMatcher import unittest class Station: <|fim▁hole|> self.id = id self.name = name self.position = position self.links = [] def build...
def __init__(self, id, name, position):
<|file_name|>jackal-mqtt.js<|end_file_name|><|fim▁begin|>(function (angular) { // Create all modules and define dependencies to make sure they exist // and are loaded in the correct order to satisfy dependency injection // before all nested files are concatenated by Gulp // Config angular ...
// Modules
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2016-2017 Chef Software Inc. and/or applicable contributors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // htt...
fn id(&self) -> &str { &self.id
<|file_name|>aboutSomething.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core'; @Component({ moduleId: module.id, templateUrl: 'aboutSomething.component.html' }) export class AboutSomethingComponent implements OnInit { constructor() { } <|fim▁hole|>}<|fim▁end|>
ngOnInit() { }
<|file_name|>line_reader.rs<|end_file_name|><|fim▁begin|>use std::io::{self, Read}; use std::str::{self, Utf8Error}; #[derive(Debug)] struct ReaderBuf { vec: Vec<u8>, msg_start: usize, write_loc: usize } impl ReaderBuf { pub fn new(buffer_size: usize) -> ReaderBuf { let mut vec = Vec::with_cap...
pub fn read<T: Read>(&mut self, reader: &mut T) -> io::Result<usize> { let bytes_read = try!(reader.read(&mut self.buf.vec[self.buf.write_loc..])); self.buf.write_loc += bytes_read;
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Twitter...
<|file_name|>mongodb.go<|end_file_name|><|fim▁begin|>package main import ( "encoding/json" "flag" "fmt" "os" "reflect" "strconv" "strings"<|fim▁hole|> mp "github.com/mackerelio/go-mackerel-plugin-helper" "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" ) var graphdef = map[string](mp.Graphs){ "mongodb.background_f...