prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>Topography.py<|end_file_name|><|fim▁begin|># import system modules
import arcpy
<|fim▁hole|># Set environment settings
env.workspace = "C:\Users\Ewan\Desktop\SFTPDST5\MapFiles"
try:
# Set the local variable
in_Table = "Topography.csv"
x_coords = "x"
y_coords = "y"
out_Layer = ... | from arcpy import env
|
<|file_name|>0025_default_rain_irrigation_to_null.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from decimal import Decimal
import django.core.validators
class Migration(migrations.Migration):
dependencies = [
('f... | name='irrigation',
field=models.DecimalField(decimal_places=2, validators=[django.core.validators.MinValueValidator(Decimal('0'))], max_digits=4, blank=True, null=True, verbose_name=b'Irrigation in inches'),
preserve_default=True,
), |
<|file_name|>LVHDoFCoESR.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#
# Copyright (C) Citrix Systems Inc.
#
# 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; version 2.1 only.
#
# Th... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, absolute_import, division
from .project import Project<|fim▁hole|><|fim▁end|> | from .builder import ProjectBuilder, FahProjectBuilder |
<|file_name|>app.routing.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import { Routes, RouterModule } from '@angular/router';
import { DashboardComponent } from "./Dashboard/dashboard.component";
const appRoutes: Routes = [
{
path: '',
redirectTo: '/dashboard',
pathMatch: 'full'
},
{
path: 'dashboard',
co... | |
<|file_name|>issue-2311-2.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/li... | pub fn bar<B,C:clam<A>>(&self, c: C) -> B {
fail!(); |
<|file_name|>MessageBox.py<|end_file_name|><|fim▁begin|>from Screen import Screen
from Components.ActionMap import ActionMap
from Components.Label import Label
from Components.Pixmap import Pixmap
from Components.Sources.StaticText import StaticText
from Components.MenuList import MenuList
from enigma import eTimer
cl... | |
<|file_name|>comment.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
github3.gists.comment
---------------------
Module containing the logic for a GistComment
"""
from __future__ import unicode_literals
from ..models import BaseComment
from ..users import User
class GistComment(BaseComment):
"""Th... | c1 == c2 |
<|file_name|>activity_list_resources.py<|end_file_name|><|fim▁begin|># Django specific
from django.db.models import Q
# Tastypie specific
from tastypie import fields
from tastypie.constants import ALL
from tastypie.resources import ModelResource
from tastypie.serializers import Serializer
# Data specific
from iati.mo... | activity_status = fields.ForeignKey(ActivityViewActivityStatusResource, 'activity_status', full=True, null=True)
countries = fields.ToManyField(OnlyCountryResource, 'recipient_country', full=True, null=True)
regions = fields.ToManyField(OnlyRegionResource, 'recipient_region', full=True, null=True)
secto... |
<|file_name|>test_submit_alpgen.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import sys,logging,optparse
from AlpgenArgoJob import AlpgenArgoJob
sys.path.append('/users/hpcusers/balsam/argo_deploy/argo_core')
from MessageInterface import MessageInterface<|fim▁hole|> parser = optparse.OptionParser(descriptio... |
def main(): |
<|file_name|>send_to_cgd.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
### <command interpreter="python">send_to_cgd.py
### $pipeline_output $endpoint $cgd_url $output $runid $barcodeid $qcversion
### </command>
### Galaxy wrapper for cgd_client.jar.
### CGD_CLIENT is hard coded, but this is not expected... | cmd.append("-v")
cmd.append(args.qcversion)
cmd.append("-d") |
<|file_name|>ConfigureServiceBrokerWithRouteServiceTest.java<|end_file_name|><|fim▁begin|>/*
* *
* * Copyright (C) 2015 Orange
* * 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
* ... | import com.tngtech.jgiven.junit.SimpleScenarioTest; |
<|file_name|>motivato.py<|end_file_name|><|fim▁begin|>from .provider_base import ExternalPaymentProvider
from tapiriik.database import db
from tapiriik.settings import MOTIVATO_PREMIUM_USERS_LIST_URL
import requests
class MotivatoExternalPaymentProvider(ExternalPaymentProvider):
ID = "motivato"
def RefreshPaymentSt... | users = list(db.users.find({"ConnectedServices.ID": {"$in": [x._id for x in connections]}}))
payments = []
# Pull relevant payment objects and associate with users |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import React from 'react'
import Button from 'components/Button'
import Flex from 'components/Flex'
import { Explanation, TextStep, Buttons } from '../styles'
import explanation from 'images/bearing-explanation.svg'
export class Step extends React.Component {
ren... | </TextStep>
)
} |
<|file_name|>05_destroy_byid_pos.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# Copyright (C) International Business Machines Corp., 2005
# Author: Woody Marvel <marvel@us.ibm.com>
# Li Ge <lge@us.ibm.com>
# Positive Test:
# Test Description:
# 1. Create a domain
# 2. Destroy the domain by id
import sys
impo... | print "Failed to create test domain because:"
print e.extra
FAIL(str(e))
|
<|file_name|>const_.py<|end_file_name|><|fim▁begin|>from java.lang import Long, Object
from clamp import clamp_base, Constant
TestBase = clamp_base("org")
<|fim▁hole|>
class ConstSample(TestBase, Object):
myConstant = Constant(Long(1234), Long.TYPE)<|fim▁end|> | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|># Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Ide... | |
<|file_name|>ThrowingErrorListener.java<|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.<|fim▁hole|>import org.antlr.v4.runtime.RecognitionException;
import or... | */
package basicintast.util;
import org.antlr.v4.runtime.BaseErrorListener; |
<|file_name|>test_transforms.py<|end_file_name|><|fim▁begin|>from __future__ import (absolute_import, division, print_function,
unicode_literals)
from six.moves import zip
import unittest
import numpy as np
from numpy.testing import (assert_allclose, assert_almost_equal,
... | # self.stack1.write_graphviz(file('stack1.dot', 'w'))
# self.stack2.write_graphviz(file('stack2.dot', 'w'))
# self.stack2_subset.write_graphviz(file('stack2_subset.dot', 'w'))
|
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url, include
from django.conf import settings
from paying_for_college.views import LandingView
from django.contrib import admin
# from django.conf.urls.static import static
urlpatterns = [<|fim▁hole|> url(r'^compare-financial-aid-and-col... | # url(r'^admin/', include(admin.site.urls)),
url(r'^$',
LandingView.as_view(), name='pfc-landing'), |
<|file_name|>loader_test.go<|end_file_name|><|fim▁begin|>package server
import (
"os/exec"
"path/filepath"
"github.com/go-git/go-git/v5/plumbing/transport"
"github.com/go-git/go-git/v5/storage/memory"
. "gopkg.in/check.v1"
)
type LoaderSuite struct {
RepoPath string
}
var _ = Suite(&LoaderSuite{})
func (s *... |
func (s *LoaderSuite) TestLoadNonExistent(c *C) { |
<|file_name|>dialog.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (b7f5189) from gir-files (71d73f0)
// DO NOT EDIT
use Bin;
use Box;
use Container;
use Object;
use Widget;
use Window;
use ffi;
#[cfg(feature = "v3_12")]
use glib::Value;
use glib::object::Downcast;
use glib::object::IsA;
use glib::s... | //pub fn new_with_buttons<'a, 'b, T: Into<Option<&'a str>>, U: IsA<Window>, V: Into<Option<&'b str>>>(title: T, parent: Option<&U>, flags: DialogFlags, first_button_text: V, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> Dialog {
// unsafe { TODO: call ffi::gtk_dialog_new_with_buttons() }
... |
<|file_name|>issue-6815.ts<|end_file_name|><|fim▁begin|>import {expect} from "chai";
import {Connection} from "../../../src/connection/Connection";
import {EntityManager} from "../../../src/entity-manager/EntityManager";
import {
createTestingConnections,
closeTestingConnections,
reloadTestingDatabases,
} f... | |
<|file_name|>novprog_pt.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="pt">
<context>
<name>Bar</name>
<message numerus="yes">
<source>%Ln word(s)</source>
<translation>
<numerusform>%Ln palavra</numerusform>
... | </message>
<message>
<source>Note</source>
<translation>Nota</translation> |
<|file_name|>ExamplesOpNoState.py<|end_file_name|><|fim▁begin|>"""This module contains examples of the op() function
where:
op(f,x) returns a stream where x is a stream, and f
is an operator on lists, i.e., f is a function from
a list to a list. These lists are of lists of arbitrary
objects other than streams and agent... | |
<|file_name|>actions.js<|end_file_name|><|fim▁begin|>import Client from '../../../api';
import { AsyncActionStatus } from '../../../const/AsyncActionStatus';
import { getCurrency, getNobtName, getPersonNames } from './selectors';
export const UPDATE_CREATE_NOBT_STATUS = 'NewNobt.UPDATE_CREATE_NOBT_STATUS';
export con... |
export function removePerson(name) { |
<|file_name|>BaseService.java<|end_file_name|><|fim▁begin|>package com.baobaotao.transaction.nestcall;
public class BaseService {<|fim▁hole|><|fim▁end|> |
} |
<|file_name|>ConfluenceSpaceToIndexFieldMapping.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. 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. A copy of the Li... | }
/** |
<|file_name|>request_context.rs<|end_file_name|><|fim▁begin|>/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/
use gotham::state::{FromState, State};
use gotham_derive::StateData;
use hyper... | use std::sync::Arc;
use context::{CoreContext, SessionContainer};
use fbinit::FacebookInit; |
<|file_name|>bitcoin_sl_SI.ts<|end_file_name|><|fim▁begin|><TS language="sl_SI" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Desni klik za urejanje naslovov ali oznak</translation>
</message>
<message>
... | <source>Copy amount</source> |
<|file_name|>__manifest__.py<|end_file_name|><|fim▁begin|>{
"name": "Delivery Sequence",
"vesion": "12.0.1.0.0",
"author": "IT-Projects LLC, Ivan Yelizariev",
"license": "LGPL-3",
"category": "Custom",
"website": "https://yelizariev.github.io",
"depends": ["delivery"],
"data": ["views.xm... | } |
<|file_name|>promise.ts<|end_file_name|><|fim▁begin|>'use strict';
import { CancellationToken } from 'vscode';
export namespace Promises {
export function cancellable<T>(promise: Promise<T>, token: CancellationToken): Promise<T | undefined> {
return new Promise<T | undefined>((resolve, reject) => {
token.onCance... | |
<|file_name|>update_campaign.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# htt... | |
<|file_name|>digiListI.go<|end_file_name|><|fim▁begin|>package chunks
// xlProtocol_go/chunks/digiListI.go
import ()
type DigiListI interface {
<|fim▁hole|> // There may be a requirement that this interface be called in order,
// beginning at zero, without skipping any items. It might be an error
// to call this ... | // Return the SHA hash of the Nth item in the DigiList. Return an
// error if there is no such item.
// |
<|file_name|>debuginfo.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/... | |
<|file_name|>nnet.py<|end_file_name|><|fim▁begin|>import tensorflow as tf
from tensorflow.contrib.rnn import LSTMCell, GRUCell, MultiRNNCell, DropoutWrapper
from tqdm import tqdm
from decoder import pointer_decoder
import dataset
import matplotlib.pyplot as plt
# TODO
"""
Michel:
____________________... |
def build_reward(self):
|
<|file_name|>gumbel_cdf_test.hpp<|end_file_name|><|fim▁begin|>// Arguments: Doubles, Doubles, Doubles
#include <stan/math/prim/scal.hpp>
using std::vector;
using std::numeric_limits;
using stan::math::var;
class AgradCdfGumbel : public AgradCdfTest {
public:
void valid_values(vector<vector<double> >& parameters,
... | param[1] = 1.9; // mu |
<|file_name|>Paint_setTextScaleX.cpp<|end_file_name|><|fim▁begin|>#if 0 // Disabled until updated to use current API.
// Copyright 2019 Google LLC.
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#include "tools/fiddle/examples.h"
// HASH=a75bbdb8bb866b125c4c1dd5e96... | SkDebugf("text scale %s-a-number\n", SkScalarIsNaN(paint.getTextScaleX()) ? "not" : "is");
}
} // END FIDDLE |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from setuptools import setup
from setuptools.command.sdist import sdist as _sdist<|fim▁hole|>import sys
import time
import codecs
import subprocess
if sys.version < "2.2.3":
from distutils.dist import DistributionMetadata
DistributionMeta... | import re |
<|file_name|>DummyPlaceholderGatkTool.java<|end_file_name|><|fim▁begin|>package org.broadinstitute.hellbender.engine;
import org.broadinstitute.barclay.argparser.CommandLineProgramProperties;
import org.broadinstitute.hellbender.cmdline.TestProgramGroup;
/**
* A Dummy / Placeholder class that can be used where a {@l... | |
<|file_name|>test_hdfs_multi_copies.py<|end_file_name|><|fim▁begin|>import unittest, time, sys
sys.path.extend(['.','..','../..','py'])
import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i
class Basic(unittest.TestCase):
def tearDown(self):
h2o.check_sandbox_for_errors()
@classmethod
def setU... |
@classmethod
def tearDownClass(cls): |
<|file_name|>dir_449a8fc0a8176498514757a163fc6e60.js<|end_file_name|><|fim▁begin|>var dir_449a8fc0a8176498514757a163fc6e60 =
[
[ "SensorBarControl.g.cs", "_a_r_m_2_debug_2_controls_2_sensor_bar_2_sensor_bar_control_8g_8cs.html", [
[ "SensorBarControl", "class_x_labs_1_1_forms_1_1_controls_1_1_sensor_bar_contr... | ] ],
[ "SensorBarControl.g.i.cs", "_a_r_m_2_debug_2_controls_2_sensor_bar_2_sensor_bar_control_8g_8i_8cs.html", [ |
<|file_name|>TopicManager.java<|end_file_name|><|fim▁begin|>package com.cngu.androidfun.main;
import android.content.Context;<|fim▁hole|>import android.view.LayoutInflater;
import com.cngu.androidfun.R;
import com.cngu.androidfun.data.ActionTopic;
import com.cngu.androidfun.data.MenuTopic;
import com.cngu.androidfun.... | import android.os.Bundle; |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 Pants project contributors (see CONTRIBUTORS.md).
// Licensed under the Apache License, Version 2.0 (see LICENSE).
#![deny(warnings)]
// Enable all clippy lints except for many of the pedantic ones. It's a shame this needs to be copied and pasted acros... | #![allow(clippy::match_ref_pats)]
// Subjective style.
#![allow(
clippy::len_without_is_empty, |
<|file_name|>rabbit.py<|end_file_name|><|fim▁begin|>import gevent
import socket
<|fim▁hole|>from vnc_api.vnc_api import *
from cfgm_common.vnc_kombu import VncKombuClient
from config_db import *
from cfgm_common.dependency_tracker import DependencyTracker
from reaction_map import REACTION_MAP
import svc_monitor
class ... | |
<|file_name|>_color.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(<|fim▁hole|> self, plotly_name="color", parent_name="heatmapgl.hoverlabel.font", **kwargs
):
super(ColorValidator, self).__init... | |
<|file_name|>resource_printer.go<|end_file_name|><|fim▁begin|>/*
Copyright 2014 The Kubernetes 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... | } else { |
<|file_name|>datatransfer_pb2_grpc.py<|end_file_name|><|fim▁begin|># Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from google.cloud.bigquery_datatransfer_v1.proto import datatransfer_pb2 as google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2
from google... | """
context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
<|file_name|>bomb_enemy.py<|end_file_name|><|fim▁begin|>"""
Given a 2D grid, each cell is either a wall 'W',
an enemy 'E' or empty '0' (the number zero),
return the maximum enemies you can kill using one bomb.
The bomb kills all the enemies in the same row and column from
the planted point until it hits the wall since ... | return num
|
<|file_name|>depcheck.go<|end_file_name|><|fim▁begin|>/*
Copyright 2020 The Knative 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... | func (g graph) contains(name string) bool {
_, ok := g[name]
return ok |
<|file_name|>FUNCTION_MODIFIER_MODEL.cpp<|end_file_name|><|fim▁begin|>// This file was generated using Parlex's cpp_generator
#include "FUNCTION_MODIFIER_MODEL.hpp"
#include "plange_grammar.hpp"
#include "parlex/detail/document.hpp"
#include "FUNCTION_MODIFIER_CALLING_CONVENTION.hpp"
#include "ICR.hpp"
plc::FUNCTI... | auto v1 = parlex::detail::document::element<erased<FUNCTION_MODIFIER_CALLING_CONVENTION>>::build(&*children[1], w);
return field_1_t_1_t(std::move(v0), std::move(v1)); |
<|file_name|>results.rs<|end_file_name|><|fim▁begin|>pub use super::errors::CabotError;
/// Result used by method that can failed.<|fim▁hole|><|fim▁end|> | pub type CabotResult<T> = Result<T, CabotError>; |
<|file_name|>devfilters.py<|end_file_name|><|fim▁begin|>from django import template
from django.utils.safestring import mark_safe
from mezzanine.conf import settings
from mezzanine_developer_extension.utils import refactor_html
<|fim▁hole|># Checking settings.TEMPLATE_STYLE.
# Possible values are:
# - mezzanine_de... | register = template.Library()
|
<|file_name|>BackgroundLocationMapScreen.tsx<|end_file_name|><|fim▁begin|>import FontAwesome from '@expo/vector-icons/build/FontAwesome';
import MaterialIcons from '@expo/vector-icons/build/MaterialIcons';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { useFocusEffect } from '@react-navig... | isTracking: false,
savedLocations: [],
activityType: null,
accuracy: Location.Accuracy.High, |
<|file_name|>post-robot.js<|end_file_name|><|fim▁begin|>!function(root, factory) {
"object" == typeof exports && "object" == typeof module ? module.exports = factory() : "function" == typeof define && define.amd ? define("postRobot", [], factory) : "object" == typeof exports ? exports.postRobot = factory() : root.p... | }, (function(_ref2) {
var source = _ref2.source, origin = _ref2.origin, data = _ref2.data;
var id = data.id, name = data.name; |
<|file_name|>JmeWaterFilter.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2009-2010 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of ... | }
} |
<|file_name|>common.py<|end_file_name|><|fim▁begin|># Copyright (C) 2021 NEC Corp
# 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... | elif '>' == op:
query = query.filter(column_attr > value) |
<|file_name|>RedissonReactiveStreamCommands.java<|end_file_name|><|fim▁begin|>/**
* Copyright (c) 2013-2021 Nikita Koksharov
*
* 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... | Assert.notNull(command.getKey(), "Key must not be null!");
Assert.notNull(command.getBody(), "Body must not be null!"); |
<|file_name|>JaaroverzichtDomain.java<|end_file_name|><|fim▁begin|>package main.java.meterstanden.domain;
import java.io.IOException;
import java.util.List;
import javax.persistence.Query;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import ... | */
@WebServlet(
description = "Get the yearly overview", |
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [<|fim▁hole|> name='Item',
fields=[
... | migrations.CreateModel( |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from extractor import Extractor
from parambfs import ParamExtractor<|fim▁end|> | from edges import EdgeExtractor |
<|file_name|>recipe-286155.py<|end_file_name|><|fim▁begin|>from Tkinter import *
from ScrolledText import ScrolledText
from unicodedata import lookup
import os
class Diacritical:
"""Mix-in class that adds keyboard bindings for accented characters, plus
other common functionality.
An inheriting class m... | frame.mainloop()
if __name__ == "__main__":
test() |
<|file_name|>recursiveMods.ts<|end_file_name|><|fim▁begin|>// @allowUnreachableCode: true
// @module: commonjs
export module Foo {
export class C {}
}
export module Foo {
function Bar() : C {
if (true) { return Bar();}
return new C();
}
function Baz() : C {
var c = Baz();
return Bar();
... | var c : C = Baz();
return;
|
<|file_name|>glint_git_setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
glint_lib_directory='/var/lib/glint'
horizon_git_repo='https://github.com/rd37/horizon.git'
glint_git_repo='https://github.com/hep-gc/glint.git'
glint_inst_type='default'
horizon_inst_type='default'
glint_server='django'
glint_horizon_serve... | |
<|file_name|>longest_increasing_subsequence_nlogn.py<|end_file_name|><|fim▁begin|>import unittest
"""
Given an unordered array of integers, find the length of longest increasing subsequence.
Input: 0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15
Output: 6 (0, 2, 6, 9, 11, 15)
"""
"""
A great explanation of the ap... | |
<|file_name|>AbstractParser-Mark.cpp<|end_file_name|><|fim▁begin|>// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (C) 2019 The MMapper Authors
#include "abstractparser.h"
#include <map>
#include <memory>
#include <optional>
#include <ostream>
#include <sstream>
#include <vector>
#include "../configuration/... | std::ostream &ArgMarkClass::virt_to_stream(std::ostream &os) const
{
return os << "<class>";
} |
<|file_name|>test_transport.py<|end_file_name|><|fim▁begin|>import unittest
from node.openbazaar_daemon import OpenBazaarContext
import mock
from node import transport
def get_mock_open_bazaar_context():
return OpenBazaarContext.create_default_instance()
class TestTransportLayerCallbacks(unittest.TestCase):
... |
def test_callbacks(self):
self.transport_layer.trigger_callbacks('section_one', None) |
<|file_name|>drain.rs<|end_file_name|><|fim▁begin|>use std::mem;
use pin_project_lite::pin_project;
use tokio::sync::watch;
use super::{task, Future, Pin, Poll};
pub(crate) fn channel() -> (Signal, Watch) {
let (tx, rx) = watch::channel(());
(Signal { tx }, Watch { rx })
}
pub(crate) struct Signal {
tx:... | |
<|file_name|>mixin.js<|end_file_name|><|fim▁begin|>/**
* Simple wrapper for lang.hitch to make it into an easy function
*/
define(['dojo/_base/lang'], function (lang) {
var l = {
_mixin: function(dest, source, copyFunc){
// summary:
// Copies/adds all properties of source to des... | |
<|file_name|>nics.go<|end_file_name|><|fim▁begin|>package egoscale
import (
"net"
)
// Nic represents a Network Interface Controller (NIC)
//
// See: http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/latest/networking_and_traffic.html#configuring-multiple-ip-addresses-on-a-single-nic
type Nic s... |
// Response returns the struct to unmarshal
func (AddIPToNic) Response() interface{} {
return new(AsyncJobResult) |
<|file_name|>htmlmediaelement.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 https://mozilla.org/MPL/2.0/. */
use crate::compartments::InCompartment;
use crate::... | // Step 2
self.internal_pause_steps();
}
|
<|file_name|>else-if.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/license... | } else { if 2i == 1 { assert!((false)); } else { assert!((false)); } } |
<|file_name|>send_key.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 ~ 2014 Andy Stewart
#
# Author: Andy Stewart <lazycat.manatee@gmail.com>
# Maintainer: Andy Stewart <lazycat.manatee@gmail.com>
#
# This program is free software: you can redistribute it and/... | |
<|file_name|>cli.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Zappa CLI
Deploy arbitrary Python programs as serverless Zappa applications.
"""
from __future__ import unicode_literals
from __future__ import division
import argcomplete
import argparse
import base64
import pkgutil... | # Create the zip file(s)
if self.stage_config.get('slim_handler', False):
# Create two zips. One with the application and the other with just the handler. |
<|file_name|>test_edit_recipe.py<|end_file_name|><|fim▁begin|>from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from .base import FunctionalTest
class RecipeEditTest(FunctionalTest):
def test_can_add_a_recipe(self):
# Ben goes to the recipe website homepage
self.brows... | |
<|file_name|>player.rs<|end_file_name|><|fim▁begin|>use graphics::{Context, Polygon, Transformed};
use opengl_graphics::GlGraphics;
use rand::Rng;
use drawing::{color, Point, Size};
use super::Vector;
use traits::{Advance, Collide, Position};
/// The `Player` is the rocket controlled by the user
#[derive(Def... | [0.0, -8.0],
[20.0, 0.0],
[0.0, 8.0]
];
|
<|file_name|>test_qgsatlascomposition.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
'''
test_qgsatlascomposition.py
--------------------------------------
Date : Oct 2012
Copyright : (C) 2012 by Dr. Hugo Mercier
email... | self.mLabel1.adjustSizeToText()
checker = QgsCompositionChecker('atlas_filtering%d' % (i + 1), self.mComposition) |
<|file_name|>IHolder.java<|end_file_name|><|fim▁begin|>package jef.common.wrapper;
import java.io.Serializable;
public interface IHolder<T> extends Serializable{<|fim▁hole|><|fim▁end|> | T get();
void set(T obj);
} |
<|file_name|>parse_dna.hpp<|end_file_name|><|fim▁begin|>/* This file is part of Jellyfish.
Jellyfish 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, or
(at your o... | have_seam(false), buffer_data(buffer_size * nb_buffers), canonical(false), |
<|file_name|>HNU001.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*-
import scrapy
from report_crawler.spiders.__Global_function import get_localtime
from report_crawler.spiders.__Global_variable import now_time, end_time
class HNU001_Spider(scrapy.Spider):
name = 'HNU001'
start_urls = ['http://csee.hnu.edu.c... |
return {'text': messages, 'number': response.meta['number'], 'organizer': u"湖南大学大学信息科学与工程学院",
'faculty': self.name, 'link': response.meta['link'], 'publication': response.meta['publication'], |
<|file_name|>Parser.py<|end_file_name|><|fim▁begin|># This module file is for parsing the github project.
from AutoDoApp.parser.ParserCommunicator import ParserCommunicator
import os
import codecs
import git
import stat
from django.conf import settings
class Parser(ParserCommunicator):
def __init__(self):
... | if len(tokens) > 1 and "." in tokens[1]:
method_name = tokens[1].split(".")[0].strip()
method_name = method_name.split("(")[0] |
<|file_name|>Gulpfile.js<|end_file_name|><|fim▁begin|>var packageInfo = require('./package.json');
var taskList = [{name:'default'},{name:'delete'},{name:'build'},{name:'copy'},{name:'minify'}];
var gulpTalk2me = require('gulp-talk2me');
var talk2me = new gulpTalk2me(packageInfo,taskList);
var del = require('del');
va... | function genTemplateStream () { |
<|file_name|>DocumentRegisterFilter.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2016
* Ubiquitous Knowledge Processing (UKP) Lab
* Technische Universität Darmstadt
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may... | |
<|file_name|>get_completions_test.py<|end_file_name|><|fim▁begin|># coding: utf-8
#
# Copyright (C) 2015 ycmd contributors
#
# This file is part of ycmd.
#
# ycmd 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... | |
<|file_name|>datos_total_fase1v3-mod.py<|end_file_name|><|fim▁begin|>## Copyright (C) 2017 Oscar Diaz Barriga
## This file is part of Comp-Process-STPatterns.
## 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 So... | b_data = None |
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import sublime
if int(sublime.version()) < 3000:
import ghci
import ghcmod
import haskell_docs
import hdevtools
import sublime_haskell_common as common
import symbols
else:
import SublimeHaskell.ghci as ghci
import SublimeHaskell.ghcmod ... | if decl.location: |
<|file_name|>task_run.py<|end_file_name|><|fim▁begin|># Copyright (C) British Crown (Met Office) & Contributors.
# This file is part of Rose, a framework for meteorological suites.
#
# Rose is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# t... | usage='rose task-run [OPTIONS] [--] [APP-COMMAND ...]',
description=''' |
<|file_name|>configure_test.cc<|end_file_name|><|fim▁begin|>#include "configure.h"
#include "gtest/gtest.h"
TEST(Configure, addItem)
{
Configure *pc = new Configure();
ASSERT_TRUE(pc != NULL);
pc->AddItem("A");
pc->AddItem("B");
pc->AddItem("C");
pc->AddItem("A");
EXPECT_EQ(pc->Size(), ... | EXPECT_EQ(pc->GetItem(2), "C"); |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub use self::main_dialog::MainDlgHandler;
pub use self::rc::{RcFile,RcRoot};
<|fim▁hole|><|fim▁end|> | mod main_dialog;
mod rc; |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import glob
from pythonforandroid.toolchain import (
CythonRecipe,
Recipe,
current_directory,
info,
shprint,
)
from os.path import join
import sh
class TwistedRecipe(CythonRecipe):
version = '17.9.0'
url = 'https://github.com/twisted/tw... | recipe = TwistedRecipe() |
<|file_name|>staribuscrc.py<|end_file_name|><|fim▁begin|>__author__ = 'mark'
# StarinetPython3Logger a data logger for the Beaglebone Black.
# Copyright (C) 2015 Mark Horn
#
# This file is part of StarinetPython3Logger.
#
# StarinetPython3Logger is free software: you can redistribute it and/or modify
# it under the te... | # later version.
# |
<|file_name|>xBlog.cpp<|end_file_name|><|fim▁begin|>/*
* ----------------------------------------------------------------------------
* Copyright (c) 2012-2013, xSky <guozhw at gmail dot com>
* All rights reserved.
* Distributed under GPL license.
* ------------------------------------------------------------... | |
<|file_name|>gen_es31_wrapper.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#-------------------------------------------------------------------------
# drawElements Quality Program utilities
# --------------------------------------
#
# Copyright 2015 The Android Open Source Project
#
# Licensed under the Ap... | genES31WrapperFuncs(getGLRegistry()) |
<|file_name|>LanguageViewModel.js<|end_file_name|><|fim▁begin|>Ext.define('Zenws.zenws.shared.com.zen.viewmodel.location.LanguageViewModel', {
"extend": "Ext.app.ViewModel",<|fim▁hole|> "alias": "viewmodel.LanguageViewModel",
"model": "LanguageModel",
"data": {}
});<|fim▁end|> | |
<|file_name|>level_view_model.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2021 Timothée Lecomte
# This file is part of Friture.
#
# Friture is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as publ... | def level_data_slow(self):
return self._level_data_slow |
<|file_name|>02-glob.ts<|end_file_name|><|fim▁begin|>/*@ global glob :: posint */
let glob = 12;
<|fim▁hole|> return;
}
export function zoo() {
bar();
assert(glob > 0);
}
}<|fim▁end|> | module A {
function bar() {
glob = 7; |
<|file_name|>ITraqQuantitationAnalysisService.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright 2009 Regents of the University of Minnesota. All rights
* reserved.
* Copyright 2009 Mayo Foundation for Medical Education and Research.
* All ... | * distributed under the License is distributed on an "AS IS" BASIS, |
<|file_name|>operations.py<|end_file_name|><|fim▁begin|>import re
from decimal import Decimal
from django.conf import settings
from django.contrib.gis.db.backends.base import BaseSpatialOperations
from django.contrib.gis.db.backends.util import SpatialOperation, SpatialFunction
from django.contrib.gis.db.backends.post... | """
Return the database field type for the given geometry field.
Typically this is `None` because geometry columns are added via
the `AddGeometryColumn` stored procedure, unless the field |
<|file_name|>sweep.py<|end_file_name|><|fim▁begin|># coding=utf-8
# Copyright 2018 The DisentanglementLib 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
#
# ... | lambda_od = h.sweep("dip_vae.lambda_od",
h.discrete([1., 2., 5., 10., 20., 50.]))
lambda_d_factor = h.fixed("dip_vae.lambda_d_factor", 10.)
dip_type = h.fixed("dip_vae.dip_type", "i") |
<|file_name|>TestStatefulConnManagement.java<|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 ... | this.count = 0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.