prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>// This file is generated. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy)] #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(box_pointers)] #![allow(dead_code)] #![allow(missing_docs)] #![allow...
let (field_number, wire_type) = is.read_tag_unpack()?;
<|file_name|>parse-chromsizes-rows.js<|end_file_name|><|fim▁begin|>/** * Parse an array of chromsizes, for example that result * from reading rows of a chromsizes CSV file. * @param {array} data Array of [chrName, chrLen] "tuples". * @returns {object} Object containing properties<|fim▁hole|> */ function parseChroms...
* { cumPositions, chrPositions, totalLength, chromLengths }.
<|file_name|>build_windows.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- 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. ...
with remember_cwd(): os.chdir(path) logging.info("Generating project with CMake") check_call("cmake \
<|file_name|>kn.js<|end_file_name|><|fim▁begin|>Bridge.merge(new System.Globalization.CultureInfo("kn", true), { englishName: "Kannada", nativeName: "ಕನ್ನಡ", numberFormat: Bridge.merge(new System.Globalization.NumberFormatInfo(), { nanSymbol: "NaN", negativeSign: "-", positiveSign: ...
dateSeparator: "-",
<|file_name|>actions.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Licensed under the GNU General Public License, version 3. # See the file http://www.gnu.org/copyleft/gpl.txt from pisi.actionsapi import autotools from pisi.actionsapi import pisitools from pisi.actionsapi import get #d...
autotools.rawInstall("INSTALL_DIR=%s" % get.installDIR() + "/usr/share/openttd/data")
<|file_name|>6.py<|end_file_name|><|fim▁begin|>import urllib2 import zipfile import re url = "http://www.pythonchallenge.com/pc/def/channel.zip" data = urllib2.urlopen(url).read() file1='ttt.zip' with open(file1,'wb+') as fzip: fzip.write(data) #dd=re.compile(r'[from|is] (\d+$)') dd = re.compile(r'(?<=[from|is]...
cc = dd.search(text) print text
<|file_name|>bfs.go<|end_file_name|><|fim▁begin|>package dao import ( "context" "crypto/hmac" "crypto/sha1" "encoding/base64" "errors" "fmt" "hash" "net/http" "strconv" "strings" "time" "go-common/library/log" "go-common/library/net/trace" ) const ( _uploadURL = "/%s" _family = "http_client" _temp...
} header = resp.Header code = header.Get("Code")
<|file_name|>client_getProductTypes.py<|end_file_name|><|fim▁begin|>#coding=utf-8 #author='Shichao-Dong' import requests def client_getProductTypes(): url="http://172.31.3.73:8888/client/v1/clientAuth.action" headers={"Connection": "keep-alive", # "Referer": "http://172.31.3.73:6020/layout_new/login....
"info.password":"048b62076a732069", "info.appId":"waiqin365@zhangkong", "info.imsi":"X0000000000100X", "info.type":"1",
<|file_name|>sabmark.py<|end_file_name|><|fim▁begin|>import csv<|fim▁hole|>import os import os.path import sys import pybcb.flags as flags __TWILIGHT = 'twi_fp' __SUPERFAMILY = 'sup_fp' def join(*args): flags.assert_flag('sabmark-dir') flags.assert_flag('sabmark-set') if flags.config.sabmark_set == 'tw...
<|file_name|>test_tag_tagvis.py<|end_file_name|><|fim▁begin|>import pytest from cfme.cloud.provider.azure import AzureProvider from cfme.markers.env_markers.provider import ONE_PER_CATEGORY from cfme.networks.views import BalancerView<|fim▁hole|>from cfme.networks.views import SecurityGroupView from cfme.networks.view...
from cfme.networks.views import CloudNetworkView from cfme.networks.views import FloatingIpView from cfme.networks.views import NetworkPortView from cfme.networks.views import NetworkRouterView
<|file_name|>cluster.py<|end_file_name|><|fim▁begin|>import numpy as np import scipy.spatial.distance as dist from matplotlib.backends.backend_pdf import PdfPages import matplotlib.pyplot as plt import matplotlib.lines as mplines import scipy.cluster.hierarchy as clust import os def kabsch(coord, ref,app): C = np.dot...
#k = kabsch(jkm, ikm, jm)
<|file_name|>test_ipc.py<|end_file_name|><|fim▁begin|>#- # Copyright (c) 2014 Robert M. Norton # All rights reserved. # # @BERI_LICENSE_HEADER_START@ # # Licensed to BERI Open Systems C.I.C. (BERI) under one or more contributor # license agreements. See the NOTICE file distributed with this work for # additional infor...
<|file_name|>test_search.py<|end_file_name|><|fim▁begin|>import re from django.core.management import call_command from django_webtest import WebTest from .auth import TestUserMixin from .settings import SettingsMixin from popolo.models import Person from .uk_examples import UK2015ExamplesMixin class TestSearchVie...
<|file_name|>proto.py<|end_file_name|><|fim▁begin|>SD_PROTO_VER = 0x02 SD_SHEEP_PROTO_VER = 0x0a SD_EC_MAX_STRIP = 16 SD_MAX_COPIES = SD_EC_MAX_STRIP * 2 - 1 SD_OP_CREATE_AND_WRITE_OBJ = 0x01 SD_OP_READ_OBJ = 0x02 SD_OP_WRITE_OBJ = 0x03 SD_OP_REMOVE_OBJ = 0x04 SD_OP_DISCARD_OBJ = 0x05 SD_OP_NEW_VD...
SD_RES_NO_TAG = 0x0E # Requested tag is not found
<|file_name|>PropPatchJsonResource.java<|end_file_name|><|fim▁begin|>/* * Copyright 2012 McEvoy Software Ltd. * * 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 <|fim▁hole|> * (at your option) any later version. ...
* the Free Software Foundation, either version 3 of the License, or
<|file_name|>test_lib_trees.py<|end_file_name|><|fim▁begin|>from synapse.tests.common import * import synapse.lib.trees as s_trees<|fim▁hole|>class TreeTest(SynTest): def test_lib_tree_interval(self): ivals = ( ((-30, 50), {'name': 'foo'}), ((30, 100), {'name': 'bar'}), ...
<|file_name|>askpassphrasedialog.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2011-2015 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 "askpassphrasedialog.h" #include "ui_askpassphrase...
edit->clear();
<|file_name|>0_setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # \file 0_setup.py # \brief Setup rbank # \date 2009-03-10-22-43-GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Setup rbank # # NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> # Copyright (C) 2010 Winc...
printLog(log, ">>> Setup export directories <<<") mkPath(log, ExportBuildDirectory + "/" + RBankCmbExportDirectory) mkPath(log, ExportBuildDirectory + "/" + RBankCmbTagExportDirectory)
<|file_name|>error26.C<|end_file_name|><|fim▁begin|>// PR c++/20148<|fim▁hole|>void foo() { if (({int c[2];})) ; // { dg-error "7:ISO C.. forbids" "7" } // { dg-error "7:could not convert" "17" { target *-*-* } .-1 } } void bar() { if (({})); // { dg-error "7:ISO C.. forbids" "7" } // { dg-error "11:could not ...
// { dg-options "-fshow-column -ansi -pedantic-errors -Wno-long-long" }
<|file_name|>InfiniteScroll.js<|end_file_name|><|fim▁begin|>import React from 'react'; import ons from 'onsenui'; import { Page, Toolbar, BackButton, LazyList, ListItem } from 'react-onsenui'; class InfiniteScroll extends React.Component { renderRow(index) { return ( <ListItem key={index}> ...
calculateItemHeight={() => ons.platform.isAndroid() ? 77 : 45} /> </Page> );
<|file_name|>docs.py<|end_file_name|><|fim▁begin|>''' Menu for Community Scripts Author: Christoph Stoettner Mail: christoph.stoettner@stoeps.de Documentation: http://scripting101.stoeps.de Version: 5.0.1 Date: 09/19/2015 License: Apache 2.0 History: Changed by Jan Alderli...
<|file_name|>angular-locale_fi-fi.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:d15be6c4d52831d7f4c20b8f2b461332215072284affcf3ca299ddc2bb812ab0<|fim▁hole|><|fim▁end|>
size 2095
<|file_name|>DbvsFreq-Ampde0.1v-2huequitos.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2.7 import numpy as np import matplotlib.pyplot as plt Freq=np.array([30,40,45,50,53,55,60,65,70,80,90,95,98,100,110,120]) Db=np.array([70.5,78.6,83.2,88.4,87.5,86.7,85.2,83.9,85.1,88,95.7,100.4,100.4,99.2,94.7,94.9]) plt.x...
plt.grid(True) plt.show()
<|file_name|>func.rs<|end_file_name|><|fim▁begin|>//! Module for working with `Function`s //! //! This module contains a type alias for `Rc<Fn(f64) -> f64>`, //! which is used in many other modules, and functions for //! working with the alias. pub use std::rc::Rc; /// Type alias used to represent functions. /// /// ...
<|file_name|>blockCommentCommand.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. ...
if (startTokenIndex !== -1 && endTokenIndex !== -1) { ops = BlockCommentCommand._createRemoveBlockCommentOperations({ startLineNumber: startLineNumber,
<|file_name|>testOLED.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 Adafruit Industries # Author: Tony DiCola # # 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, inc...
# 128x64 display with hardware I2C: # disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST)
<|file_name|>test_symmetry.py<|end_file_name|><|fim▁begin|>from __future__ import annotations import pytest<|fim▁hole|> import scitbx.matrix from cctbx import crystal, sgtbx, uctbx from cctbx.sgtbx import bravais_types from dxtbx.model import Crystal from dials.algorithms.indexing import symmetry @pytest.mark.param...
<|file_name|>install.js<|end_file_name|><|fim▁begin|>const exec = require('child_process').exec const path = require('path') const fs = require('fs') const execPath = process.execPath const binPath = path.dirname(execPath) const dep = path.join(execPath, '../../lib/node_modules/dep') const repository = 'https://github....
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""Support for ADS sensors.""" import logging import voluptuous as vol<|fim▁hole|> from homeassistant.components import ads from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_NAME, CONF_UNIT_OF_MEASUREMENT import homeassi...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python import os import sys from setuptools import setup from setuptools.command.test import test as TestCommand import django_openS3 with open(os.path.join(os.path.dirname(__file__), "README.rst")) as file: README = file.read() with open(os.p...
long_description=README, license=LICENSE,
<|file_name|>extensions.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.org...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>__author__ = 'jdaniel' import argparse from distutils.core import setup, Command import shutil from setuptools import find_packages import os import sys __version__ = "1.0.0"<|fim▁hole|> class Color(object): """ Escape sequences for adding Color to console o...
GAIA_DIR = os.getenv("HOME") + "/Gaia_v" + __version__ #GAIA_DIR = "/my/custom/install/location" + "/Gaia_" + __version__
<|file_name|>html.py<|end_file_name|><|fim▁begin|>"""HTML Exporter class""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import os from traitlets import default, Unicode from traitlets.config import Config from nbconvert.filters.highlight import Highlight2HTML...
<|file_name|>AugmentedParamStore.java<|end_file_name|><|fim▁begin|>/* * Copyright 2013 Google 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/license...
localStore.put(name, valueProvider); return this; }
<|file_name|>test.rs<|end_file_name|><|fim▁begin|>use quickcheck::{TestResult, quickcheck}; use rand::Rng; use super::{integer_value, regex_value}; use expectest::prelude::*; use pact_matching::s; #[test] fn validates_integer_value() { fn prop(s: String) -> TestResult { let mut rng = ::rand::thread_rng(); ...
Ok(_) => TestResult::from_bool(!s.is_empty() && s.chars().all(|ch| ch.is_numeric() )),
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import tempfile from datetime import datetime import flask_testing from flask import url_for import iis from iis.models import User from iis.extensions import db class BaseTestCase(flask_testing.TestCase): DB_FILE = tempfile.mkstemp() SQLALCHEMY_DATABASE_URI...
WTF_CSRF_ENABLED = False USER_ENABLE_LOGIN_WITHOUT_CONFIRM = True def create_app(self):
<|file_name|>ik_solver.py<|end_file_name|><|fim▁begin|>import argparse import sys import rospy from geometry_msgs.msg import ( PoseStamped, Pose, Point, Quaternion, ) from std_msgs.msg import Header from baxter_core_msgs.srv import ( SolvePositionIK, SolvePositionIKRequest, ) def ik_solve(l...
else: print("INVALID POSE - No Valid Joint Solution Found.")
<|file_name|>LoadModelException.java<|end_file_name|><|fim▁begin|>/** * This file is part of FNLP (formerly FudanNLP). * * FNLP is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of ...
public LoadModelException(String msg) {
<|file_name|>application_configuration.py<|end_file_name|><|fim▁begin|># Copyright 2017 The Cobalt 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:/...
self._platform_configuration = platform_configuration
<|file_name|>replacer.py<|end_file_name|><|fim▁begin|><|fim▁hole|>s = re.sub('^([ \t\r\f\v]*)(.+?)\.shape = (.*?), (.*?)$', '\g<1>\g<2> = \g<2>.reshape((\g<3>, \g<4>,)) #replacement for \"\\g<0>\"', s, flags=re.MULTILINE) s = re.sub('^([ \t\r\f\v]*)(.+?)\.shape = (\S+?)$', '\g<1>\g<2> = \g<2>.reshape(\g<3>) #replacemen...
import re s = open("neurolab/tool.py", "r").read()
<|file_name|>mirrorMesh.C<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd ...
-------------------------------------------------------------------------------
<|file_name|>box_blur.rs<|end_file_name|><|fim▁begin|>use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion}; use librsvg::{ surface_utils::shared_surface::{ AlphaOnly, Horizontal, NotAlphaOnly, SharedImageSurface, SurfaceType, Vertical, }, IRect, }; const SURFACE_SIDE: i32 = 512...
criterion_group!(benches, bench_box_blur); criterion_main!(benches);
<|file_name|>removeIndex.js<|end_file_name|><|fim▁begin|>'use strict'; function removeIndex(key, id, callback) { var client = this._; client.del(key + ':' + id + '@index', callback); } <|fim▁hole|><|fim▁end|>
module.exports = removeIndex;
<|file_name|>test.py<|end_file_name|><|fim▁begin|>import unittest <|fim▁hole|>class Tests(unittest.TestCase): def test_main(self): cb.run()<|fim▁end|>
import kata.count_by.main as cb
<|file_name|>budget_schema.js<|end_file_name|><|fim▁begin|>module.exports = ` type SimpleBudgetDetail { account_type: String, account_name: String, fund_name: String, department_name: String, division_name: String, costcenter_name: String, function_name: String, charcode_name: String, organization_nam...
charcode: String,
<|file_name|>helpscreen.js<|end_file_name|><|fim▁begin|>var Screen = require('./basescreen'); var Game = require('../game'); var helpScreen = new Screen('Help'); // Define our winning screen helpScreen.render = function (display) { var text = 'jsrogue help'; var border = '-------------'; var y = 0; display.dr...
//display.drawText(0, y++, '[d] to drop items'); //display.drawText(0, y++, '[e] to eat items');
<|file_name|>PacketFormat.java<|end_file_name|><|fim▁begin|>package freenet.node; import java.util.List; import java.util.Vector; import freenet.io.comm.Peer; public interface PacketFormat { boolean handleReceivedPacket(byte[] buf, int offset, int length, long now, Peer replyTo); /** * Maybe send something. A ...
<|file_name|>HomeApiController.java<|end_file_name|><|fim▁begin|>package org.ngrinder.home.controller; import lombok.RequiredArgsConstructor; import org.ngrinder.common.constant.ControllerConstants; import org.ngrinder.home.model.PanelEntry; import org.ngrinder.home.service.HomeService; import org.ngrinder.infra.confi...
public Map<String, String> getUserDefinedMessageSources(@PathVariable String locale) { return homeService.getUserDefinedMessageSources(locale);
<|file_name|>test.py<|end_file_name|><|fim▁begin|>import pandas array = hash()<|fim▁hole|>array['a']='b'<|fim▁end|>
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-02-17 01:37 from __future__ import unicode_literals<|fim▁hole|>from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] ope...
<|file_name|>20131019235242_migration_1.js<|end_file_name|><|fim▁begin|><|fim▁hole|> t.increments(); t.string('name'); }); }; exports.down = function (knex) { return knex.schema.dropTable('migration_test_trx_1'); };<|fim▁end|>
'use strict'; exports.up = function (knex) { return knex.schema.createTable('migration_test_trx_1', function (t) {
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import {App} from './app.module'; import {ComponentLoader} from './ComponentLoader';<|fim▁hole|>new ComponentLoader({ rootmodule: App, prefix: 'cy' }).init();<|fim▁end|>
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .manager import Manager<|fim▁hole|><|fim▁end|>
__version__ = '0.2.4'
<|file_name|>schedulerNA.py<|end_file_name|><|fim▁begin|># Copyright 2014 Modelling, Simulation and Design Lab (MSDL) at # McGill University and the University of Antwerp (http://msdl.cs.mcgill.ca/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance wi...
# limitations under the License.
<|file_name|>restful_routes.go<|end_file_name|><|fim▁begin|>package main import "net/http" // Route is a sub type that holds the request routes type Route struct { Name string<|fim▁hole|>} // Routes is an array of all the registered routes type Routes []Route var routes = Routes{}<|fim▁end|>
Method string Pattern string HandlerFunc http.HandlerFunc
<|file_name|>testFieldDescFactory.cpp<|end_file_name|><|fim▁begin|>#include "stdio.h" #include "OSGNode.h"<|fim▁hole|>#include "OSGBaseMFields.h" int main (int argc, char **argv) { OSG::osgInit(argc, argv); // fprintf(stderr, "%d field types\n"); for(OSG::UInt32 i = 0; i < OSG::FieldD...
#include "OSGBaseInitFunctions.h" #include "OSGFieldDescFactory.h" #include "OSGBaseSFields.h"
<|file_name|>_fontdata.py<|end_file_name|><|fim▁begin|>#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/pdfbase/_fontdata.py #$Header $ __version__=''' $Id: _fontdata.py 3052 2007-03-07 14:04:49Z rgbe...
'symbol': 'Sy______',
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # pylint: disable=too-many-lines import logging import random import time import gevent from gevent.event import AsyncResult from gevent.queue import Empty, Queue from gevent.timeout import Timeout from random import randint from ethereum imp...
<|file_name|>control.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ''' Tulip routine libraries, based on lambda's lamlib Author Twilight0 License summary below, for more details please read license.txt file This program is free software: you can redistribute it and/or modify ...
transPath = xbmc.translatePath skinPath = xbmc.translatePath('special://skin/') addonPath = xbmc.translatePath(addonInfo('path'))
<|file_name|>IdealTransmitter.cc<|end_file_name|><|fim▁begin|>// // Copyright (C) 2013 OpenSim Ltd. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation; either version 2 // of the Licens...
} const ITransmission *IdealTransmitter::createTransmission(const IRadio *transmitter, const cPacket *macFrame, const simtime_t startTime) const
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- #--------------------------------------------------------------------# # This file is part of Py-notify. # # # # Copyright (C) 2006, 2007, 200...
ClassTypes = (type,) StringType = str else: ClassTypes = (type, types.ClassType)
<|file_name|>ChooseAreaFragment.java<|end_file_name|><|fim▁begin|>package com.veneweather.android; import android.app.Fragment; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view...
}); } });
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-15 08:06 from __future__ import unicode_literals import django.contrib.auth.validators from django.db import migrations, models import users.managers class Migration(migrations.Migration): i...
managers=[ ('objects', users.managers.UserManager()), ],
<|file_name|>environ.go<|end_file_name|><|fim▁begin|>// Copyright 2013, 2014 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package local import ( "fmt" "io/ioutil" "os" "os/exec" "path/filepath" "regexp" "strings" "sync" "syscall" "github.com/juju/errors" "github.com/juju/util...
} // Kill all running instances. This must be done as
<|file_name|>agency.js<|end_file_name|><|fim▁begin|>/*! * Start Bootstrap - Agency Bootstrap Theme (http://startbootstrap.com) * Code licensed under the Apache License v2.0. * For details, see http://www.apache.org/licenses/LICENSE-2.0. */ // jQuery for page scrolling feature - requires jQuery Easing plugin $(func...
});
<|file_name|>angles.rs<|end_file_name|><|fim▁begin|>use std::num::{ Float, cast }; use std::f64; pub use self::Angle::{Deg, Rad, Grad}; pub trait Trigonometry<T>: Sized { fn sin(self) -> T; fn cos(self) -> T; fn tan(self) -> T; } pub enum Angle<T> { Deg(T), Rad(T), Grad(T) } impl<T> ...
fn sin() { assert_eq!(Deg(0.0).sin(), Float::zero()); assert!(Deg(180.0).sin().abs() < f64::EPSILON);
<|file_name|>GroovyMoveStatementTest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2000-2008 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/...
import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.actionSystem.EditorActionHandler; import com.intellij.openapi.editor.actionSystem.EditorActionManager;
<|file_name|>instr_vpmaxsw.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode}; use ::RegType::*; use ::instruction_def::*; use ::Operand::*; use ::Reg::*; use ::RegScale::*; use ::test::run_test; #[test] fn vpmaxsw_1() { run_test(&Instru...
run_test(&Instruction { mnemonic: Mnemonic::VPMAXSW, operand1: Some(Direct(ZMM15)), operand2: Some(Direct(ZMM28)), operand3: Some(Direct(ZMM30)), operand4: None, lock: false, rounding_mode: None, merge_mode: Some(MergeMode::Zero), sae: false, mask: Some(MaskReg::K6), broadcast: None }, &[98, 17, 29, 198, 238, 254],...
<|file_name|>conf.js<|end_file_name|><|fim▁begin|>/**<|fim▁hole|> * https://github.com/norstone-tech/scon * * Copyright (c) BlueStone Technological Enterprises Inc., 2016-2019 * Copyright (c) Norstone Technologies 2021 * Licensed under the GNU GPLv3 license. */ /* eslint-disable no-magic-numbers, no-mixed-operator...
* Swift-Cardinal Object Notation
<|file_name|>zhihu_daily.py<|end_file_name|><|fim▁begin|># !/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Vincent<vincent8280@outlook.com> # http://wax8280.github.io # Created on 18-2-12 上午2:34 # !/usr/bin/env python import datetime import os import re ...
item = [md5string(article_url), title, content, created_time, voteup_count, author_name,
<|file_name|>02.rs<|end_file_name|><|fim▁begin|>use std::fs::File; use std::io::prelude::*; fn get_input() -> std::io::Result<String> { let mut file = File::open("02.txt")?; let mut contents = String::new(); file.read_to_string(&mut contents)?; Ok(contents) } fn run_program(program: &mut Vec<usize>) { let ...
<|file_name|>buildit.py<|end_file_name|><|fim▁begin|>import subprocess import sys import shutil import os import os.path import unittest import json import getpass import requests import zipfile import argparse import io import tempfile import time<|fim▁hole|> OSSPEAK_MAIN_PATH = os.path.join('osspeak', 'main.py') OSS...
import lark from osspeak import version
<|file_name|>demo_pclview.py<|end_file_name|><|fim▁begin|>import numpy as np from OpenGL.GL import * from OpenGL.GLU import * import time import freenect import calibkinect import pykinectwindow as wxwindow # I probably need more help with these! try: TEXTURE_TARGET = GL_TEXTURE_RECTANGLE except: TEXTURE_TARGE...
while 1: cv.ShowImage('hi',get_depth().astype(np.uint8)) cv.WaitKey(10)
<|file_name|>categorical_q_network_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2020 The TF-Agents 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 # # https://...
self.assertAllEqual(logits.shape.as_list(), [batch_size, num_actions, q_network._num_atoms])
<|file_name|>ordereddict.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import six # #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://etetoolkit.org # # ETE is free software: you can...
return len(self)==len(other) and list(self.items()) == list(other.items()) return dict.__eq__(self, other)
<|file_name|>0008_auto_20190411_0806.py<|end_file_name|><|fim▁begin|># Generated by Django 2.1.7 on 2019-04-11 06:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0007_auto_20180526_1702'), ] <|fim▁hole|> model_name='article', ...
operations = [ migrations.AlterField(
<|file_name|>falsy.js<|end_file_name|><|fim▁begin|>"use strict"; var Activity = require("./activity"); var util = require("util"); function Falsy() { Activity.call(this); this.value = false; this.is = true; this.isNot = false; } util.inherits(Falsy, Activity); Falsy.prototype.run = function (callCo...
if (result) { callContext.schedule(this.isNot, "_done"); } else {
<|file_name|>flask_settings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from decouple import config from mongrey.web.settings import Test as BaseTest <|fim▁hole|> 'host': config('MONGREY_DB', 'sqlite:///../mongrey_test.db'), }<|fim▁end|>
class Test(BaseTest): DB_SETTINGS = {
<|file_name|>borrowed-ptr-pattern.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 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...
pub fn main() {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>########################################################################## # # Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios), # its affiliates and/or its licensors. # # Copyright (c) 2010-2012, Image Engine Design Inc. All rights reser...
# require HOM
<|file_name|>templates.py<|end_file_name|><|fim▁begin|>import os def get_template_path(path): file_path = os.path.join(os.getcwd(), path) if not os.path.isfile(file_path): raise Exception("This is not a valid template path %s"%(file_path))<|fim▁hole|> return file_path def get_template(path): file_path = get_temp...
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: windows-1252 -*- import wxversion wxversion.select('2.8') import wx import wx.aui from id import * from model import * from graphic import * from sql import * from django import * import sqlite3 from xml.dom import minidom class MainF...
"""else: dlg = wx.TextEntryDialog(None, "cual entidad quiere modificar?", 'Modificar Entidad', '')
<|file_name|>extra.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/. */ //! Code for managing the layout data in the DOM. use util::{P...
impl<'ln> LayoutAuxMethods for LayoutNode<'ln> { /// Resets layout data and styles for the node. ///
<|file_name|>BfdGlobalToggleFsm.java<|end_file_name|><|fim▁begin|>/* Copyright 2019 Telstra Open Source * * 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|>attachments-test.js<|end_file_name|><|fim▁begin|>import EmberObject from '@ember/object'; import { module, test } from 'qunit'; import { setupTest } from 'ember-qunit'; let testSerializedData = { 'hello.txt': { content_type: 'text/plain', data: 'aGVsbG8gd29ybGQ=', digest: "md5-7mkg+nM0HN26...
length: 11 }, };
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.conf.urls.defaults import patterns, url from . import tasks from . import views urlpatterns = patterns('', url(r'^$', views.index, name='layoutdemo_index'),<|fim▁hole|># Local Variables: # indent-tabs-mode: nil # End: # vim: ai...
)
<|file_name|>ProfileManagerDAO.java<|end_file_name|><|fim▁begin|>package edu.asu.spring.quadriga.dao.profile.impl; import java.util.ArrayList; import java.util.Date; import java.util.List; import org.hibernate.HibernateException; import org.hibernate.Query; import org.hibernate.SessionFactory; import org.springframew...
<|file_name|>amqp_002.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Installs and configures amqp """ import logging import uuid import os from packstack.installer import validators from packstack.installer import processors from packstack.installer import basedefs from packstack.installer import utils ...
group = {"GROUP_NAME": "AMQPAUTH",
<|file_name|>main.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...
}
<|file_name|>autotest.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # APM automatic test suite # Andrew Tridgell, October 2011 import pexpect, os, sys, shutil, atexit import optparse, fnmatch, time, glob, traceback, signal sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), 'pysim')) ...
passed = False failed.append(step) print(">>>> FAILED STEP: %s at %s (%s)" % (step, time.asctime(), msg))
<|file_name|>enocean.py<|end_file_name|><|fim▁begin|>""" Support for EnOcean binary sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.enocean/ """ import logging import voluptuous as vol from homeassistant.components.binary_sensor i...
<|file_name|>config_service_placeholders.d.ts<|end_file_name|><|fim▁begin|>import * as AWS from '../clients/all'; export abstract class ConfigurationServicePlaceholders { acm?: AWS.ACM.Types.ClientConfiguration; apigateway?: AWS.APIGateway.Types.ClientConfiguration; applicationautoscaling?: AWS.ApplicationAutoSca...
sagemakerruntime?: AWS.SageMakerRuntime.Types.ClientConfiguration;
<|file_name|>GetEnvironmentResult.cpp<|end_file_name|><|fim▁begin|>/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/mwaa/model/GetEnvironmentResult.h> #include <aws/core/utils/json/JsonSerializer.h> #include <aws/core/AmazonWebServiceR...
return *this; }
<|file_name|>dummyPlatform.py<|end_file_name|><|fim▁begin|>from hwt.synthesizer.rtlLevel.extract_part_drivers import extract_part_drivers from hwt.synthesizer.rtlLevel.remove_unconnected_signals import removeUnconnectedSignals from hwt.synthesizer.rtlLevel.mark_visibility_of_signals_and_check_drivers import markVisibil...
""" def __init__(self): self.beforeToRtl = []
<|file_name|>configs-force_format_strings-false.rs<|end_file_name|><|fim▁begin|>// rustfmt-force_format_strings: false // rustfmt-format_strings: false // rustfmt-max_width: 50 // rustfmt-error_on_line_overflow: false // Force format strings<|fim▁hole|> fn main() { let lorem = "ipsum dolor sit amet consectetur adip...
<|file_name|>file.routes.ts<|end_file_name|><|fim▁begin|>import * as express from 'express'; import {FileController} from '../controllers/file.controller'; export class FileRoutes { constructor(app: express.Application) { const controller = new FileController(); app.route('/files')<|fim▁hole|> .post(controller....
.get(controller.list)
<|file_name|>gpr1.rs<|end_file_name|><|fim▁begin|>#[doc = "Register `GPR1` reader"] pub struct R(crate::R<GPR1_SPEC>); impl core::ops::Deref for R { type Target = crate::R<GPR1_SPEC>; #[inline(always)] fn deref(&self) -> &Self::Target {<|fim▁hole|>impl From<crate::R<GPR1_SPEC>> for R { #[inline(always)]...
&self.0 } }
<|file_name|>command_executor.py<|end_file_name|><|fim▁begin|>import sublime import os import subprocess import platform from .bootstrapper import get_config from .notifier import log_info, log_error, log_fail from .thread_progress import run_progress_indicator from .command_thread import CommandThread _appbuilder_pa...
<|file_name|>Selectors.java<|end_file_name|><|fim▁begin|>package com.codepoetics.protonpack.selectors; import java.util.Comparator; import java.util.Objects; import java.util.stream.Stream; public final class Selectors { private Selectors() { } public static <T> Selector<T> roundRobin() { return ...
} public static <T extends Comparable<T>> Selector<T> takeMin() { return takeMin(Comparator.naturalOrder());
<|file_name|>TestListIntPoint2D.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2020, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.org). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. ...
* * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software