prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>issue_5844_aux.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or d... | // 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 |
<|file_name|>drawing_area.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use Buildable;
use Widget;
use ffi;
use glib::object::Downcast;
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
use s... | use std::ptr;
|
<|file_name|>concepts.py<|end_file_name|><|fim▁begin|>import sys
import codecs
from textblob import Blobber
from textblob.wordnet import Synset
from textblob.en.np_extractors import ConllExtractor
from collections import Counter
import re
from nltk.corpus import wordnet as wn
from nltk.corpus.reader import NOUN
import ... | |
<|file_name|>packet.rs<|end_file_name|><|fim▁begin|>use std::io;
use protocol::raknet::{NetworkSerializable, NetworkDeserializable, NetworkSize};
use protocol::raknet::types;
use byteorder::{ReadBytesExt, WriteBytesExt};
pub trait Packet: NetworkSerializable + NetworkDeserializable + NetworkSize {
fn packet_id(&s... | |
<|file_name|>E0602.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 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/... |
fn main() {} |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>'''
@author: Team Alpha, <aa5186@nyu.edu><|fim▁hole|>
from customer import Customer<|fim▁end|> |
Name: Customer Model
Purpose: This library is part of the customer REST API for the ecommerce website
''' |
<|file_name|>tokenrefresh.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2015 OpenMarket Ltd
#
# 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... |
def register_servlets(hs, http_server): |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>from PyQt4.QtCore import QSize
from PyQt4.QtGui import QVBoxLayout
# This is really really ugly, but the QDockWidget for some reason does not notice when
# its child widget becomes smaller...
# Therefore we manually set its minimum size when our own minimum size chan... | QVBoxLayout.__init__(self, parent)
self._last_size = QSize(0, 0)
def setGeometry(self, r): |
<|file_name|>bitcoin_nb.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="nb" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Shiacoin</source>
... | |
<|file_name|>server.rs<|end_file_name|><|fim▁begin|>extern crate env_logger;
/// Simple WebSocket server with error handling. It is not necessary to setup logging, but doing
/// so will allow you to see more details about the connection by using the RUST_LOG env variable.
extern crate ws;
use ws::listen;
fn main() {
... | println!("Server got message '{}'. ", msg);
|
<|file_name|>configure-store.js<|end_file_name|><|fim▁begin|>import { createStore, compose, applyMiddleware } from "redux";
import { routerMiddleware } from "react-router-redux";
import createSagaMiddleware from "redux-saga";
import createLogger from "redux-logger";
import rootReducer from "../reducers";
import rootSag... | logger
);
} |
<|file_name|>jdk_override.py<|end_file_name|><|fim▁begin|>"""
The MIT License (MIT)
Copyright (c) 2016 Louis-Philippe Querel l_querel@encs.concordia.ca
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 Soft... | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
<|file_name|>htmlbaseelement.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::attr::Attr;
use dom::bindings::codegen::Bind... | use dom::htmlelement::HTMLElement; |
<|file_name|>RocketmqEventMessageOrderlyHandler.java<|end_file_name|><|fim▁begin|><|fim▁hole|>import org.apache.rocketmq.spring.boot.event.RocketmqEvent;
import org.apache.rocketmq.spring.boot.handler.AbstractRouteableMessageHandler;
import org.apache.rocketmq.spring.boot.handler.MessageOrderlyHandler;
import org.ap... | package org.apache.rocketmq.spring.boot.handler.impl;
import org.apache.rocketmq.client.consumer.listener.ConsumeOrderlyContext;
import org.apache.rocketmq.common.message.MessageExt;
|
<|file_name|>app-store.purchase-handler.ts<|end_file_name|><|fim▁begin|>import {PurchaseHandler} from "./purchase-handler";
import {ProductData, productDataMap} from "./products";
import * as appleReceiptVerify from "node-apple-receipt-verify";
import {APP_STORE_SHARED_SECRET} from "./constants";
import {IapRepository}... | ): Promise<boolean> { |
<|file_name|>manage.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ludacity.settings")
from django.core.management import execute_from_command_line<|fim▁hole|><|fim▁end|> |
execute_from_command_line(sys.argv) |
<|file_name|>controller.js<|end_file_name|><|fim▁begin|>var Model = require('./beer');
var Controller = {
create: function(req, res) {
var dados = req.body;
var model = new Model(dados);
model.save(function (err, data) {
if (err){
console.log('Erro: ', err);
res.json('Erro: ' +... | |
<|file_name|>Modal.js<|end_file_name|><|fim▁begin|>/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
function Modal(title, name, place) {
this.self;
this.name = name;
this... | this.self.find(".modal-footer").append(footer); |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>#[cfg(any(feature = "dist-client", feature = "dist-server"))]
use sccache::config::HTTPUrl;
use sccache::dist::{self, SchedulerStatusResult, ServerId};
use sccache::server::ServerInfo;
#[cfg(feature = "dist-server")]
use std::env;
use std::fs;
use std::io::Write;
use std... | |
<|file_name|>AbstractRollingTestCase.java<|end_file_name|><|fim▁begin|>/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the ... | import org.elasticsearch.test.rest.ESRestTestCase; |
<|file_name|>Priority.go<|end_file_name|><|fim▁begin|>package jiradata
/////////////////////////////////////////////////////////////////////////
// This Code is Generated by SlipScheme Project:
// https://github.com/coryb/slipscheme
//
// Generated with command:
// slipscheme -dir jiradata -pkg jiradata -overwrite sch... | |
<|file_name|>fadecandy.py<|end_file_name|><|fim▁begin|>"""Contains code for an FadeCandy hardware for RGB LEDs."""
from typing import List
import logging
import json
import struct
from mpf.core.utility_functions import Util
from mpf.platforms.openpixel import OpenPixelClient
from mpf.platforms.openpixel import Openpi... | "!BBHHH", 0x00, 0xFF, len(msg) + 4, 0x0001, 0x0001) + bytes(msg, 'UTF-8'))
|
<|file_name|>15.3.2.1-11-8-s.js<|end_file_name|><|fim▁begin|>/// Copyright (c) 2012 Ecma International. All rights reserved.
/// Ecma International makes this code available under the terms and conditions set
/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
/// "Use Terms"). Any redist... |
function testcase() {
"use strict";
|
<|file_name|>hikashop.js<|end_file_name|><|fim▁begin|>/**
* @package HikaShop for Joomla!
* @version 2.3.0
* @author hikashop.com
* @copyright (C) 2010-2014 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
function tableOrdering( order, dir, task... | if( d.attachEvent )
d.attachEvent('on' + e, f);
else if (d.addEventListener) |
<|file_name|>razor-autosuspend_es_VE.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="es_VE" version="2.0">
<context>
<name>Battery</name>
<message>
<source>No battery!</source>
<translation>Falta la bateria!</translation>
</message>
<message>
<sou... | <source>Sleeping in %1 seconds</source> |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/**
* @param {string} s
* @return {boolean}
*/
const checkValidString = function (s) {
let leftCount = 0, rightCount = 0, starCount = 0;
let idx = 0;
while (idx < s.length) {
let ch = s[idx++];
if (ch === '(') {
++leftCount;
... | |
<|file_name|>bitcoin_af_ZA.ts<|end_file_name|><|fim▁begin|><TS language="af_ZA" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Regs-klik om die adres of etiket te wysig</translation>
</message>
<message>
... | </message>
<message> |
<|file_name|>ember-redux.js<|end_file_name|><|fim▁begin|>import Ember from 'ember';
export default Ember.Mixin.create({
reduxStore: Ember.inject.service(),
dispatch(action) {
return this.get('reduxStore').dispatch(action);
},
dispatchAction(actionName, ...args) {
return this.dispatch(this.action(acti... | },
|
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::thread;<|fim▁hole|>use std::time::Duration;
use std::sync::{Mutex, Arc};
struct Philosopher {
name: String,
left: usize,
right: usize,
}
impl Philosopher {
fn new(name: &str, left: usize, right: usize) -> Philosopher {
Philosopher {
... | |
<|file_name|>prepare_receptor.py<|end_file_name|><|fim▁begin|>import ConfigParser as configparser
import os
import sys
from pyspark import SparkContext, SparkConf, SparkFiles
from pyspark.sql import SQLContext, Row
from datetime import datetime
from os_utils import make_directory, preparing_path, time_execution_log, ch... | pdbqt_receptor_path = sc.broadcast(pdbqt_receptor_path)
|
<|file_name|>page-skipper.directive.js<|end_file_name|><|fim▁begin|>'use strict';
angular.module('ldrWebApp')<|fim▁hole|> * @type element
* @description Skip to page directive
* @requires $scope
*/
.directive('pageSkipper', function () {
return {
restrict: 'E',
te... | /**
* @name pageSkipper
* @param config
* @param pages |
<|file_name|>rm.go<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2018 VMware, 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/licenses/LICENSE-2.0
... | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import numpy as np
import scipy.cluster.hierarchy as hr
import scipy.spatial as spa
import clustering
import matplotlib.pyplot as plt
from sklearn.cluster import AgglomerativeClustering
import filter
class textMiningEac:
def __init__(self,k,N,low,high=0):
... | Metodo de prueba
Calcula una precision de acierto. No es fiable.
|
<|file_name|>padding.cc<|end_file_name|><|fim▁begin|>/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/license... | //
// base area: ------------------------
// kernel at left: 123456
// kernel at right: 123456 |
<|file_name|>test_views.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 a... | ]
assert form_class.calls == [
pretend.call(pyramid_request.POST, user_service=user_service), |
<|file_name|>Main.js<|end_file_name|><|fim▁begin|>import store from '../store'
import { mapState } from 'vuex'
import { Scroller, Example } from 'components'
export default {
name: 'Main',
store,
computed: mapState({
name: state => state.name
}),<|fim▁hole|> <Scroller>
... | render() {
const { name } = this
return ( |
<|file_name|>0028_dancepieces_to_works.py<|end_file_name|><|fim▁begin|># Generated by Django 2.0 on 2018-02-08 11:45
from django.db import migrations<|fim▁hole|>def forwards(apps, schema_editor):
"""
Change all DancePiece objects into Work objects, and their associated
data into WorkRole and WorkSelection ... | |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/* global ga */
import 'core-js/fn/array/find-index'
import 'core-js/fn/string/starts-with'
import './index.css'
import '../node_modules/md-components/style.css'
import React from 'react'
import ReactDOM from 'react-dom'
import {Route, NavLink, HashRouter} from 'reac... | |
<|file_name|>dataset.py<|end_file_name|><|fim▁begin|># coding=utf-8
# Copyright 2022 The Google Research 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... | """ |
<|file_name|>PropertyLinkDefinitionVector2f.pypp.hpp<|end_file_name|><|fim▁begin|>// This file has been generated by Py++.
#ifndef PropertyLinkDefinitionVector2f_hpp__pyplusplus_wrapper
#define PropertyLinkDefinitionVector2f_hpp__pyplusplus_wrapper
void register_PropertyLinkDefinitionVector2f_class();
<|fim▁hole|><|f... | #endif//PropertyLinkDefinitionVector2f_hpp__pyplusplus_wrapper |
<|file_name|>storage.js<|end_file_name|><|fim▁begin|>import modules from 'ui/modules';
import angular from 'angular';
function Storage(store) {
let self = this;
self.store = store;
self.get = function (key) {
try {
return JSON.parse(self.store.getItem(key));
} catch (e) {
return null;
}
... | };
}
|
<|file_name|>query.state.ts<|end_file_name|><|fim▁begin|>import { Query } from "../services";<|fim▁hole|> queries?: Query[];
loading?: boolean;
error?: String;
visibilityFilter?: string;
}<|fim▁end|> |
export interface QueryState { |
<|file_name|>loggers.rs<|end_file_name|><|fim▁begin|>use log::{LogRecord, LogLevel, LogMetadata, Log};
#[allow(dead_code)]
pub struct DefaultLogger;
#[allow(dead_code)]
pub struct DebugLogger;
<|fim▁hole|> }
fn log(&self, record: &LogRecord) {
if self.enabled(record.metadata()) {
println!("... | impl Log for DefaultLogger {
fn enabled(&self, metadata: &LogMetadata) -> bool {
metadata.level() <= LogLevel::Info |
<|file_name|>DownloaderConstants.py<|end_file_name|><|fim▁begin|><|fim▁hole|>DOWNLOADER_LOG_COUNT = 10
DOWNLOADER_LOG_FORMAT = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
DOWNLOADER_REQUIREMENTS_PATH = "requirements.txt"<|fim▁end|> | # -*- coding: UTF-8 -*-
DOWNLOADER_VERSION = "0.0.1"
DOWNLOADER_LOG_FILE = "downloader.log"
DOWNLOADER_LOG_SIZE = 10485760 |
<|file_name|>model_store.py<|end_file_name|><|fim▁begin|># Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apa... | Parameters |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import do
import setvar
import sys
import show
import getvalue
lines = 0
baseVariables = {
"URL":None,
"TMPCOOKIE":None,
"COOKIE":None,
"HTML":None,
"POSTDATA":None,
"USERAGENT":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64;... | |
<|file_name|>ViewAlunoCandidatou.java<|end_file_name|><|fim▁begin|>package br.ifrn.meutcc.visao;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.... | import br.ifrn.meutcc.modelo.Aluno;
import br.ifrn.meutcc.modelo.Orientador;
@WebServlet("/ViewAlunoCandidatou") |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from mock import Mock
from django.test import TestCase
from opbeat.events import Message
class MessageTest(TestCase):
def test_to_string(self):
unformatted_message = 'My message from %s about %s'
client = Mock()
... | data = { |
<|file_name|>util.py<|end_file_name|><|fim▁begin|>"""Zwave util methods."""
import logging
from . import const
_LOGGER = logging.getLogger(__name__)
def check_node_schema(node, schema):
"""Check if node matches the passed node schema."""
if (const.DISC_NODE_ID in schema and
node.node_id not in s... | |
<|file_name|>sample-configuration.js<|end_file_name|><|fim▁begin|>//// Copyright (c) Microsoft Corporation. All rights reserved
(function () {
"use strict";
var sampleTitle = "Adaptive Streaming";
var scenarios = [
{ url: "/html/scenario1.html", title: "Basic HLS/DASH Playback" },
{ url:... | WinJS.Namespace.define("SdkSample", {
sampleTitle: sampleTitle, |
<|file_name|>data_tree.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)]
use std::{iter::Iterator, result::Result, slice};
#[derive(Debug, Eq, PartialEq)]
pub enum DataTree<'a> {
Internal {
type_name: &'a str,
ident: Option<&'a str>,
children: Vec<DataTree<'a>>,
byte_offset: usi... | #[test]
fn iter_2() {
let dt = DataTree::from_str( |
<|file_name|>AuthCodes.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/>
*
* 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 versi... | typedef std::map<int, RealmBuildInfo*> RealmBuildContainer;
namespace AuthHelper
{ |
<|file_name|>dosbox_fs.py<|end_file_name|><|fim▁begin|>import sys
from fsgamesys.plugins.pluginmanager import PluginManager
"""
DOSBox-FS launcher script used for testing.
"""<|fim▁hole|>def app_main():
executable = PluginManager.instance().find_executable("dosbox-fs")
process = executable.popen(sys.argv[1:])... | |
<|file_name|>decoder.go<|end_file_name|><|fim▁begin|>package drum
<|fim▁hole|>import (
"fmt"
"os"
)
// DecodeFile decodes the drum machine file found at the provided path
// and returns a pointer to a parsed pattern which is the entry point to the
// rest of the data.
func DecodeFile(path string) (*Pattern, error) {... | |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, include, url<|fim▁hole|>urlpatterns = patterns('',
url(r'^', include('ebets.urls')),
url(r'^admin/', include(admin.site.urls)),
)<|fim▁end|> | from django.contrib import admin
admin.autodiscover()
|
<|file_name|>UploadImageToGlanceTask.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright (c) Intel Corporation
* Copyright (c) 2017
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in co... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>KEYWORDS = ['resin', ]<|fim▁hole|><|fim▁end|> | def rules(head='',context='',ip='',port='',productname={},keywords='',hackinfo=''):
return False |
<|file_name|>tzone.py<|end_file_name|><|fim▁begin|><|fim▁hole|> dt: datetime
offset: default 8 china time
"""
import datetime
def toLocal(dt, offset = 8):
localDateTime = dt + datetime.timedelta(hours=offset)
return localDateTime
if __name__ == '__main__':
now = datetime.datetime.utcnow()
print now
print toLo... | """
def toLocal(dt, offset = 8): |
<|file_name|>ExampleUnitTest.java<|end_file_name|><|fim▁begin|>package com.concavenp.nanodegree.shared;
import org.junit.Test;
import static org.junit.Assert.*;<|fim▁hole|>
/**
* To work on unit tests, switch the Test Artifact in the Build Variants view.
*/
public class ExampleUnitTest {
@Test
public void a... | |
<|file_name|>simple_incremental_bootstrap.js<|end_file_name|><|fim▁begin|>/**
* This pagination style shows Previous/Next buttons, and page numbers only
* for "known" pages that are visited at least once time using [Next>] button.
* Initially only Prev/Next buttons are shown (Prev is initially disabled).
*
* [<P... | *
* Key benefit: This pagination supports usual pagination pattern and does not |
<|file_name|>edit.controller.js<|end_file_name|><|fim▁begin|>'use strict';
angular.module('impactApp')
.controller('PartenairesEditCtrl', function($scope, $state, partenaire) {
$scope.partenaire = partenaire;
$scope.update = function() {
$scope.partenaire.$save(function() {
$state.go('^', {}, ... |
$scope.delete = function() { |
<|file_name|>copyData.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python<|fim▁hole|>import urllib2, base64
import shutil
import json
import json
import argparse
import os
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='''
This script will copy the step/jobentry images from a running carte (... | |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup
<|fim▁hole|> description='A command line utility for downloading songs from SoundCloud.',
author='Jeremy McKibben-Sanders',
author_email='jmckib2+soundcurl@gmail.com',
url='https://github.com/jmckib/soundcurl',
package_di... | setup(
name='soundcurl',
version='0.1.0', |
<|file_name|>test_benchmark.py<|end_file_name|><|fim▁begin|>###################################################################################
#
# Copyright (c) 2017-2019 MuK IT GmbH.
#
# This file is part of MuK Documents Access
# (see https://mukit.at).
#
# This program is free software: you can redistr... | # |
<|file_name|>virtualhelix.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# encoding: utf-8
from cadnano.cnproxy import ProxyObject, ProxySignal
import cadnano.util as util
from cadnano.enum import StrandType
from cadnano.cnproxy import UndoStack, UndoCommand
from cadnano.strandset import StrandSet
from .remo... | virtualHelixNumberChangedSignal = ProxySignal(ProxyObject, int, name='virtualHelixNumberChangedSignal') #pyqtSignal(QObject, int) # self, num
### SLOTS ###
|
<|file_name|>translation_construction.rs<|end_file_name|><|fim▁begin|>#[cfg(feature = "arbitrary")]
use crate::base::storage::Owned;
#[cfg(feature = "arbitrary")]
use quickcheck::{Arbitrary, Gen};
use num::{One, Zero};
use rand::distributions::{Distribution, Standard};
use rand::Rng;
use simba::scalar::ClosedAdd;
us... | |
<|file_name|>test_views.py<|end_file_name|><|fim▁begin|>from io import StringIO
import csv
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from django.core.files.base import ContentFile
from django.test import TestCase
from django.urls import reverse
from dj... |
def test_delete_actually_deletes(self):
"""Ensure delete works as advertised""" |
<|file_name|>telemetryIpc.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.
*-----... | return Promise.resolve(null);
}
}
|
<|file_name|>try_block.rs<|end_file_name|><|fim▁begin|>// rustfmt-edition: 2018
fn main() -> Result<(), !> {
let _x: Option<_> = try {
4
};
try {}
}
fn baz() -> Option<i32> {
if (1 == 1) {
return try {
5
};
}
// test
let x: Option<()> = try {
/... | |
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*-
##############################################################################
#
# 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
# ... | # |
<|file_name|>test_nested_function.py<|end_file_name|><|fim▁begin|>def f2():
def f3():
print("f3")
f3()<|fim▁hole|><|fim▁end|> | f2() |
<|file_name|>rgb2vxp.py<|end_file_name|><|fim▁begin|>#!/usr/env python
# Change this stuff:
name='Light Blue Fun Timexxxx'
author='Travis Wells'
shortname='litebluebg' # out file will be shortname with a 'vxp' extension
color=(155,204,224) # Set to the Red,Green,Blue of the color you want.
uniqueid=0 # Set to 0 if yo... | from pygame.constants import * |
<|file_name|>tools.py<|end_file_name|><|fim▁begin|>"""
Collection of tools for the IQTools library
Xaratustrah
2017
"""
import os
import logging as log
from scipy.signal import hilbert
from scipy.io import wavfile
import xml.etree.ElementTree as et
import numpy as np
import types
import uproot3
import uproot3_method... | if file_extension.lower() == '.tdms':
log.info('This is a TDMS file.') |
<|file_name|>Timezones.py<|end_file_name|><|fim▁begin|>import xml.etree.cElementTree
from os import environ, unlink, symlink, path
from Tools.Directories import SCOPE_SKIN, resolveFilename
import time
from Tools.StbHardware import setRTCoffset
class Timezones:
def __init__(self):
self.timezones = []<|fim▁hole|>
d... | self.readTimezonesFromFile() |
<|file_name|>fetch_currencies.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import json
import re
import unicodedata
import string
from urllib import urlencode
from requests import get
languages = {'de', 'en', 'es', 'fr', 'hu', 'it', 'nl', 'jp'}
url_template = 'https://www.wikidata.org/w/api.php?action=wb... | fetch_data(wikidata_ids) |
<|file_name|>GamePanel.java<|end_file_name|><|fim▁begin|>package agaroyun.view;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.util.ArrayList;
import javax.swing.JPanel;
import agaroyun.Model.GameObject;
import agaroyun.Model.Playe... |
}
|
<|file_name|>versioning.go<|end_file_name|><|fim▁begin|>/*
Copyright 2014 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
Unl... | // avoid conversion roundtrip if GVK is the right one already or is empty (yes, this is a hack, but the old behaviour we rely on in kubectl)
objGVK := obj.GetObjectKind().GroupVersionKind()
if len(objGVK.Version) == 0 {
return c.encoder.Encode(obj, w) |
<|file_name|>GGobjectlist.py<|end_file_name|><|fim▁begin|>'''
Created on 17 Dec 2013
@author: tore<|fim▁hole|>
class ObjectList(object):
def __init__(self):
self.objectlist = []
self.windowlist = []
def addObject(self, listobject):
self.objectlist.append(listobject)
def removeOb... | '''
|
<|file_name|>_colorsrc.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators
class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="colorsrc", parent_name="scattercarpet.marker", **kwargs
):<|fim▁hole|> parent_name=parent_name,
... | super(ColorsrcValidator, self).__init__(
plotly_name=plotly_name, |
<|file_name|>data_test.go<|end_file_name|><|fim▁begin|>package meta_test
import (
"reflect"
"testing"
"time"
"github.com/archsaber/influxdb/influxql"
"github.com/archsaber/influxdb/services/meta"
)
func Test_Data_DropDatabase(t *testing.T) {
data := &meta.Data{
Databases: []meta.DatabaseInfo{
{Name: "db0... | t.Fatal(err)
}
// Revoke remaining admin. |
<|file_name|>rary.rs<|end_file_name|><|fim▁begin|>pub fn public_function() {
println!("called rary's `public_function()`");
}
fn private_function() {
println!("called rary's `private_function()`");
}
pub fn indirect_access() {
print!("called rary's `indirect_access()`, that\n>");<|fim▁hole|> private_fu... | |
<|file_name|>sub.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.apache.org/licenses/LI... | use super::InferCtxt;
use super::lub::Lub;
use super::{TypeTrace, Subtype};
use super::type_variable::{SubtypeOf, SupertypeOf}; |
<|file_name|>location.rs<|end_file_name|><|fim▁begin|>header! {
/// `Location` header, defined in
/// [RFC7231](http://tools.ietf.org/html/rfc7231#section-7.1.2)
///
/// The `Location` header field is used in some responses to refer to a
/// specific resource in relation to the response. The type o... | } |
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>from celery.schedules import crontab
import djcelery
from django.conf.global_settings import EMAIL_BACKEND
import os, sys, logging
import subprocess
###############################
# MISC #
##############################
ROOT_PATH = os.path.... | PAYMENT_RETRY_SCHEDULE = [1, 3, 7]
JUMOEIN = ""
|
<|file_name|>fvcSpreadPluginFunction.H<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\
## #### ###### |
## ## ## | Copyright: ICE Stroemungsfoschungs GmbH
## ## #### |
## ## ## | http://www.ice-sf.at
## #### ... | {
//- Disallow default bitwise assignment
void operator=(const fvcSpreadPluginFunction &); |
<|file_name|>config.ts<|end_file_name|><|fim▁begin|><|fim▁hole|> BOT_TOKEN: process.env.BOT_TOKEN,
MONGOLAB_URI: process.env.MONGOLAB_URI,
PORT: process.env.PORT,
ADMINS: process.env.ADMINS,
SUPER_ADMIN: process.env.SUPER_ADMIN,
HEROKU_URL: process.env.HEROKU_URL
}<|fim▁end|> | const dotenv = require('dotenv')
dotenv.config({allowEmptyValues: true})
export const CONFIG = { |
<|file_name|>ffi.rs<|end_file_name|><|fim▁begin|>#![allow(missing_copy_implementations)]
use libc::{c_char, c_int, c_uint};
pub enum QrsEngine {}
pub enum QrsMetaObject {}
pub enum QObject {}
pub enum QQmlEngine {}
pub enum QJSEngine {}
pub enum QVariant {}
pub enum QVariantList {}
#[repr(C)]
#[derive(Eq, PartialEq,... | |
<|file_name|>callMe.py<|end_file_name|><|fim▁begin|>'''
The following is from http://stackoverflow.com/a/2022629
Thanks to Longpoke
'''
import types
class Event(list):
"""Event subscription.
A list of callable objects. Calling an instance of this will cause a
call to each item in the list in ascending ord... | if "listeners" in self:
self['listeners'](event, *args, **kwargs)
def __add__(self, listener): |
<|file_name|>typeahead-utils.ts<|end_file_name|><|fim▁begin|>import { latinMap } from './latin-map';
export class TypeaheadUtils {
static latinMap:any = latinMap;
public static latinize(str:string) {
return str.replace(/[^A-Za-z0-9\[\] ]/g, function (a) {
return TypeaheadUtils.latinMap[a] || a;<|fim▁hol... | });
}
|
<|file_name|>models.py<|end_file_name|><|fim▁begin|># Copyright 2009 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/licenses/LICENSE-2.0
#
# Unless ... | created_at = properties.DateTimeProperty(auto_now_add=True) |
<|file_name|>FontWarnings.js<|end_file_name|><|fim▁begin|>/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/*************************************************************
*
* MathJax/localization/fi/FontWarnings.js
*<|fim▁hole|> *
* Licensed under the Apa... | * Copyright (c) 2009-2013 The MathJax Consortium |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|># Copyright (c) 2012-2014 Butiá Team butia@fing.edu.uy
# Butia is a free and open robotic platform
# www.fing.edu.uy/inco/proyectos/butia
# Facultad de Ingeniería - Universidad de la República - Uruguay
#
# This program is free software; you can redistri... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012-2014 Alan Aguiar alanjas@hotmail.com |
<|file_name|>position.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/. */
//! CSS handling for the specified value of
//! [`position`]... | space_at_last = true; |
<|file_name|>test_idaho.py<|end_file_name|><|fim▁begin|>'''
Authors: Donnie Marino, Kostas Stamatiou
Contact: dmarino@digitalglobe.com
Unit tests for the gbdxtools.Idaho class
'''
from gbdxtools import Interface
from gbdxtools.idaho import Idaho
from auth_mock import get_mock_gbdx_session
import vcr
from os.path impo... | |
<|file_name|>base.py<|end_file_name|><|fim▁begin|>"""
Base/mixin classes for the spatial backend database operations and the
`SpatialRefSys` model the backend.
"""
import re
from django.contrib.gis import gdal
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
class BaseSpatia... | # How the geometry column should be selected.
select = None |
<|file_name|>virtual-repeat-next.js<|end_file_name|><|fim▁begin|>define(['exports', 'aurelia-templating'], function (exports, _aureliaTemplating) {
'use strict';
Object.defineProperty(exports, "__esModule", {<|fim▁hole|>
var _dec, _class;
var VirtualRepeatNext = exports.VirtualRepeatNext = (_dec = (0, _aur... | value: true
});
exports.VirtualRepeatNext = undefined;
|
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import os
import sys
def main():
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sflindy.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
<|fim▁hole|> main()<|fim▁en... | if __name__ == "__main__": |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# pymfe documentation build configuration file, created by
# sphinx-quickstart on Wed Nov 11 12:35:11 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values... | u'Michael J. Ireland', 'manual'), |
<|file_name|>controller.py<|end_file_name|><|fim▁begin|>import os
import json
from base import BaseController
from nqueens.models import Piece, Panel, Meta
class NQueensController(BaseController):
def __init__(self, view):
super(NQueensController, self)
self._piece_data = None
self._piece... | return True |
<|file_name|>region.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/lic... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.