prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>vscode.d.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.
*---------... | */
readonly onDidReceiveMessage: Event<any>;
/** |
<|file_name|>game013.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import random
import sys
import pygame
import classes.board
import classes.extras as ex
import classes.game_driver as gd
import classes.level_controller as lc
class Board(gd.BoardGame):
def __init__(self, mainloop, speaker, config, scr... | self.board.all_sprites_list.move_to_front(self.board.units[i])
self.board.add_unit(0, 2, x, 1, classes.board.Obstacle, "", color0) |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Support for Roku API emulation."""
import voluptuous as vol
from homeassistant import config_entries, util
from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv
from .binding import EmulatedRoku
from .config_flow import ... | }, extra=vol.ALLOW_EXTRA)
|
<|file_name|>ConfirmSubscription.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
###############################################################################
#
# ConfirmSubscription
# Verifies that the endpoint owner wishes to receive messages by verifying the token sent during the Subscribe action.
#
# Pyt... | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# |
<|file_name|>DeferredVectorBuilder.java<|end_file_name|><|fim▁begin|>package org.renjin.invoke.codegen;
import com.google.common.collect.Lists;
import com.sun.codemodel.*;
import org.apache.commons.math.complex.Complex;
import org.renjin.invoke.annotations.PreserveAttributeStyle;
import org.renjin.invoke.model.JvmMeth... | |
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin<|fim▁hole|>class AccountFilterAdmin(admin.ModelAdmin):
list_display = ('location', 'include_users', 'exclude_users')
ordering = ('location',)
admin.site.register(AccountFilter, AccountFilterAdmin)<|fim▁end|> |
from panoptes.tracking.models import AccountFilter
|
<|file_name|>new-entity.component.ts<|end_file_name|><|fim▁begin|>import { Component, HostListener, Inject } from '@angular/core';
import { MdlDialogReference } from '@angular-mdl/core';
import * as _ from 'lodash';
@Component({
selector: 'app-new-entity',
templateUrl: './new-entity.component.html',
styleUrls:... | { label: 'Javascript', value: 'JAVASCRIPT' }, |
<|file_name|>resource.rs<|end_file_name|><|fim▁begin|>use alloc::boxed::Box;
use system::error::{Error, Result, EBADF};
use system::syscall::Stat;
/// Resource seek
#[derive(Copy, Clone, Debug)]
pub enum ResourceSeek {
/// Start point
Start(usize),
/// Current point
Current(isize),<|fim▁hole|>/// A sy... | /// End point
End(isize),
}
|
<|file_name|>test_constructions.py<|end_file_name|><|fim▁begin|>from collections import OrderedDict
import pytest
from ucca import textutil
from ucca.constructions import CATEGORIES_NAME, DEFAULT, CONSTRUCTIONS, extract_candidates
from .conftest import PASSAGES, loaded, loaded_valid, multi_sent, crossing, discontiguo... | |
<|file_name|>issue-4252.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 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/lice... | // xfail-test |
<|file_name|>jimp.ts<|end_file_name|><|fim▁begin|>import * as jimp from "jimp"
type ResizeProps = {
width: number
mime: "image/jpeg" | "image/png" | "image/webp" | "image/avif"
options: {
background?: string
rotate: number
quality: number
progressive?: boolean
}
}
class JimpAdapter {
readIma... | .clone() |
<|file_name|>ruby_requirements.py<|end_file_name|><|fim▁begin|># Copyright 2016 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
#<|fim▁hole|># distributed und... | # http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software |
<|file_name|>tarfile_getmember.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2009 Doug Hellmann All rights reserved.
#
"""
"""
__version__ = "$Id$"
#end_pymotw_header<|fim▁hole|>t = tarfile.open('example.tar', 'r')
for filename in [ 'README.txt', 'notthere.txt' ]:
try:
... |
import tarfile
import time
|
<|file_name|>oxm_fields.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013-2015 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2013-2015 YAMAMOTO Takashi <yamamoto at valinux co jp>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with t... | |
<|file_name|>04_methodDecorators.ts<|end_file_name|><|fim▁begin|>// Method Decorator (WORK IN PROGRESS)
function editable(value: boolean) {
return function (target: any, propName: string, descriptor: PropertyDescriptor) {
descriptor.writable = value;
}
}
class CoffeeBean {
name: string;
const... | */ |
<|file_name|>demo.py<|end_file_name|><|fim▁begin|>"""
Demo platform for the cover component.
For more details about this platform, please refer to the documentation
https://home-assistant.io/components/demo/
"""
from homeassistant.components.cover import CoverDevice
from homeassistant.helpers.event import track_utc_ti... | self._listen_cover() |
<|file_name|>lu.cc<|end_file_name|><|fim▁begin|>#include "math/lu.hh"
#include <cassert>
#include <cmath>
#include "math/vlist.hh"
LU::lu_t LU::lu(const Matrix& a)
{
assert(a.rows() == a.cols());
std::size_t n = a.rows();
auto l = Matrix::id(n);
auto u = a;
for (std::size_t j = 0; j < n; ++j)
for (std::... | if (std::abs(u.at(i, j)) > std::abs(u.at(imax, j)))
imax = i; |
<|file_name|>creatureDB.py<|end_file_name|><|fim▁begin|>'''A module containing a class for storing Creature objects in a
SQLite database.'''
import csv
import sqlite3
__all__ = ['CreatureDB']
class CreatureDB(object):
'''Class for storing Creature objects in a SQLite database.'''
def __init__(self, ... | if self.is_creature_in_db(creature):
return |
<|file_name|>editor_plugin.js<|end_file_name|><|fim▁begin|>(function() {
var preview = true;
var themeShortcuts = {
insert: function(where) {
switch(where) {
case 'st_button_more':
var href = jQuery("#btn_more_src").val();
var what = '[st_button_more href="'+href+'"]';
break;
... | },
|
<|file_name|>d1_sbl_recon.py<|end_file_name|><|fim▁begin|>import re
import sqlite3
import csv
import ast
import os
import sys
import fnmatch
import datetime
import xlrd
import win32com.client
def question_marks(st):
question_marks = '?'
for i in range(0, len(st.split(','))-1):
question_marks = question_marks + ",?... | return question_marks
def xlsx_to_arr(xlsx_file, worksheet=0, row_start=0, col_start=0, row_end=-1, col_end=-1):
arr = [] |
<|file_name|>cursor.js<|end_file_name|><|fim▁begin|>"use strict";
var inherits = require('util').inherits
, f = require('util').format
, formattedOrderClause = require('./utils').formattedOrderClause
, handleCallback = require('./utils').handleCallback
, ReadPreference = require('./read_preference')
, MongoE... | |
<|file_name|>InfoBar.py<|end_file_name|><|fim▁begin|>from Tools.Profile import profile
from Tools.BoundFunction import boundFunction
# workaround for required config entry dependencies.
import Screens.MovieSelection
from Components.PluginComponent import plugins
from Plugins.Plugin import PluginDescriptor
from Screens... | return True
else:
print("[MoviePlayer] audio track is current selected track: " + str(x)) |
<|file_name|>OpenXML4JRuntimeException.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 info... | } |
<|file_name|>RedisProtocol.java<|end_file_name|><|fim▁begin|>package com.ctrip.xpipe.redis.core.protocal;
/**
* @author wenchao.meng
*<|fim▁hole|> int REDIS_PORT_DEFAULT = 6379;
int KEEPER_PORT_DEFAULT = 6380;
int RUN_ID_LENGTH = 40;
String CRLF = "\r\n";
String OK = "OK";
String KEEPER_ROLE_PREFIX = "keep... | * 2016年3月24日 下午6:27:48
*/
public interface RedisProtocol {
|
<|file_name|>codelab_template.go<|end_file_name|><|fim▁begin|>package main
import (
"html/template"
"io/ioutil"
"os"
"path"
"sort"
"strconv"
"strings"
"time"
"github.com/peterebden/go-cli-init/v5/flags"
)
// TODO(jpoole): maybe we should just have an order field in the MD?
var categoryOrder = map[string]int... | s := strings.Split(line, ": ")
key, value := strings.TrimSpace(s[0]), strings.TrimSpace(s[1]) |
<|file_name|>abi.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... |
pub static slice_elt_base: uint = 0u;
pub static slice_elt_len: uint = 1u; |
<|file_name|>pyoptic.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui, QtCore
import numpy as np
import csv, gzip, os
from pyqtgraph import Point
class GlassDB:
"""
Database of dispersion coefficients for Schott glasses
+ Corning 7980
"""
... | """Represents a single straight segment of a ray"""
sigStateChanged = QtCore.Signal()
|
<|file_name|>api.py<|end_file_name|><|fim▁begin|>##
# api.py
#
# This file is the workhorse for the the entire web application.
# It implements and provides the API required for the iOS portion
# of the project as well as interacting with Google's datastore
# for persistent storage of our models.
##
# for sending mai... | ##
# UTILITY METHODS |
<|file_name|>Number.isInteger.js<|end_file_name|><|fim▁begin|><|fim▁hole|>if (!Number.isInteger) {
Number.isInteger = function(value) {
return typeof value === 'number'
&& isFinite(value)
&& Math.floor(value) === value;
};
}<|fim▁end|> | |
<|file_name|>cloudstack.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# (c) 2015, René Moser <mail@renemoser.net>
#
# This file is part of Ansible,
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by... | except ImportError:
print("Error: CloudStack library must be installed: pip install cs.",
file=sys.stderr)
sys.exit(1) |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render,HttpResponse
from .models import Employee
from .models import Record
import datetime
import calendar
def wage_list(request):
return render(request,'app/wage_list.html',{})
def get_data(request):
date_from_user = str(request.POS... | |
<|file_name|>FormLoader.java<|end_file_name|><|fim▁begin|>import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class FormLoader {
public static String connectionString = "jdbc:hsqldb:file:db-data/teamsandplayers";
static Connection con;
public static void main(String[] ... | |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>pub fn abbreviate(text: &str) -> String {
let mut acronym = text.chars().nth(0).unwrap().to_string();
let mut prev = text.chars().nth(0).unwrap();
for c in text.chars().skip(1) {
if c.is_uppercase() && !prev.is_uppercase() ||
prev.is_whites... | acronym.to_uppercase()
} |
<|file_name|>bitcoin_zh_TW.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_TW" version="2.0">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Bitcoin</source>
<translation>關於位元幣</tran... | |
<|file_name|>pde.rs<|end_file_name|><|fim▁begin|>use ndarray::*;
use ndarray_linalg::*;
use std::f64::consts::PI;
use std::iter::FromIterator;
use eom::pde::*;
#[test]
fn pair_r2c2r() {
let n = 128;
let a: Array1<f64> = random(n);
let mut p = Pair::new(n);
p.r.copy_from_slice(&a.as_slice().unwrap());
... | let k0 = 2.0 * PI / n as f64; |
<|file_name|>start.js<|end_file_name|><|fim▁begin|>//repl read eval print loop<|fim▁hole|><|fim▁end|> | console.log('start'); |
<|file_name|>issue-16256.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/lic... | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
|
<|file_name|>test_volume_backup.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*-
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_lib as test_lib
volume = test_lib.lib_get_specific_stub('e2e_mini/volume', 'volume')
volume_ops = None
vm_ops = None
volume_name = 'volume-' + volume.get_... | |
<|file_name|>all_a.js<|end_file_name|><|fim▁begin|>var searchData=
[
['database',['Database',['../namespace_pontikis_1_1_database.html',1,'Pontikis']]],<|fim▁hole|> ['prepared_5fstatements_5fquestion_5fmark',['PREPARED_STATEMENTS_QUESTION_MARK',['../class_pontikis_1_1_database_1_1_dacapo.html#a63dd2d4d612585c42c7e53... | ['pg_5fsequence_5fname_5fauto',['PG_SEQUENCE_NAME_AUTO',['../class_pontikis_1_1_database_1_1_dacapo.html#aef46219ed4c7133e99979e0d3aa5cd86',1,'Pontikis::Database::Dacapo']]],
['pontikis',['Pontikis',['../namespace_pontikis.html',1,'']]],
['prepared_5fstatements_5fnumbered',['PREPARED_STATEMENTS_NUMBERED',['../cla... |
<|file_name|>trello.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
''' Interact with Trello API as a CLI or Sopel IRC bot module '''
import argparse
from datetime import date
from email.mime.text import MIMEText
import json
import os
import re
import smtplib
import sys
# sopel is only for IRC bot installation... | print(err.read())
result = None
else:
result = json.loads(response.read().decode('utf-8')) |
<|file_name|>func_net_basic_test.py<|end_file_name|><|fim▁begin|>#
# Copyright 2016-2017 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at... |
@attr(type='functional', switch='legacy')
class NetworkBasicLegacyTest(NetworkBasicTemplate): |
<|file_name|>TestRandIndex.java<|end_file_name|><|fim▁begin|>package personifiler.cluster;
import static org.junit.Assert.*;<|fim▁hole|>
/**
* Tests for {@link RandIndex}
*
* @author Allen Cheng
*/
public class TestRandIndex
{
/**
* Tests that the rand index of a cluster is between 0.0 and 1.0
*/
@Test
pu... |
import org.junit.Test;
import personifiler.util.TestUtils; |
<|file_name|>viewzodb.py<|end_file_name|><|fim▁begin|>##########################################################
# view the person ZODB database in PyForm's FormGui;
# FileDB maps indexing to db root, close does commit;
# caveat 1: FormGui doesn't yet allow mixed class types;
# caveat 2: FormGui has no way to call ... | dbtable = Table(FileDB(filename), InstanceRecord(Person))
|
<|file_name|>TransitionExampleGroupExplorer.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react'
import { Form, Grid, Image, Transition } from 'shengnian-ui-react'
const transitions = [
'scale',
'fade', 'fade up', 'fade down', 'fade left', 'fade right',
'horizontal flip', 'vertical flip',
'... | <Form.Button content={visible ? 'Unmount' : 'Mount'} onClick={this.handleVisibility} />
</Grid.Column> |
<|file_name|>custom.js<|end_file_name|><|fim▁begin|>// Can also be used with $(document).ready()
jQuery(window).load(function() {<|fim▁hole|>});<|fim▁end|> | jQuery('.flexslider').flexslider({
animation: "slide"
}); |
<|file_name|>Partition.java<|end_file_name|><|fim▁begin|>/**
* Copyright (C) 2001-2016 by RapidMiner and the contributors
*
* Complete list of developers available at our web site:
*
* http://rapidminer.com
*
* This program is free software: you can redistribute it and/or modify it under the terms of the
... | private int[] lastElementIndex;
/**
* Maps every example index to the true index of the data row in the example table.
|
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict';
<|fim▁hole|> // forget to provide E1, that nobody is consuming
return {
// E1: function() {},
E2: function() {}
};
}<|fim▁end|> | module.exports = function setup(options, imports) { |
<|file_name|>at2om.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# 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... | |
<|file_name|>msvst_starlet.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# References:
# [1] Jean-Luc Starck, Fionn Murtagh & Jalal M. Fadili
# Sparse Image and Signal Processing: Wavelets, Curvelets, Morphological Diversity
# Section 3.5, 6.6
#
# Credits:
# [1] https://github... | """
self.boundary = boundary |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::env;
use std::fs::File;
use std::io::Read;
use std::path::Path;
enum Lang {
Python,
Unknown,
}
struct CommentDelimiters {
begin: &'static str,
end: &'static str,
}
fn main() {
let fname = env::args().nth(1).unwrap();
let lang = lang_g... | fn reduce_to_comments(s: String, ds: CommentDelimiters) -> Vec<String> {
vec![]
} |
<|file_name|>get_pushrule_enabled.rs<|end_file_name|><|fim▁begin|>//! [GET /_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}/enabled](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-pushrules-scope-kind-ruleid-enabled)
use ruma_api::ruma_api;
use super::RuleKind;
ruma_api! {
metadata {
... |
response {
/// Whether the push rule is enabled or not.
pub enabled: bool |
<|file_name|>domtokenlist.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::dom::attr::Attr;
use crate::dom::bindings::c... | |
<|file_name|>directiondictionaries.py<|end_file_name|><|fim▁begin|>from direction import Direction, Pivot
XMovement = {
Direction.left: -1,
Direction.up: 0,
Direction.right: 1,
Direction.down: 0,
Direction.up_left: -1,
Direction.up_right: 1,
Direction.down_left: -1,
Direction.down_right... | Direction.up_left: Direction.up,
Direction.up_right: Direction.right,
Direction.down_left: Direction.left,
Direction.down_right: Direction.down |
<|file_name|>xmlhttprequesteventtarget.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public<|fim▁hole|> * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
use dom::bindings::code... | * License, v. 2.0. If a copy of the MPL was not distributed with this |
<|file_name|>triangulation.rs<|end_file_name|><|fim▁begin|>//! Methods for converting shapes into triangles.
use ImageSize;
use interpolation::lerp;
use types::{
Line,
SourceRectangle,
Polygon,
Polygons,
Radius,
Rectangle,
Resolution,
};
use math::{
multiply,
orient,
translate,
... | i += 1;
// Set next current edge. |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description =... | description='A decision-tree based conditional independence test',
long_description=long_description,
# The project's main homepage. |
<|file_name|>rpi_io.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import RPi.GPIO as GPIO
from models import session
from models import Device
from models import Module
from models import Event_Log
from time import sleep
from sys import stdout
# Modules pins and description
M1A = session.query(Module).filter... | try:
GPIO.setup(pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) |
<|file_name|>arg-is-one.js<|end_file_name|><|fim▁begin|>// Copyright 2015 Microsoft Corporation. All rights reserved.
// This code is governed by the license found in the LICENSE file.
/*---
description: Math.acosh(1) returns +0
es6id: 20.2.2.3
info: |
Math.acosh ( x )
- If x is 1, the result is +0.
---*/
<|fim▁h... | |
<|file_name|>url-domains.go<|end_file_name|><|fim▁begin|>package kiwitaxi
type UrlDomain struct {
Id int `csv:"id" json:"id" bson:"id"`
Locale string `csv:"locale" json:"locale" bson:"locale"`<|fim▁hole|>}
func (a *KiwitaxiApi) UrlDomains() (urlDomains []*UrlDomain, err error) {
err = a.getCsv("services/dat... | Value string `csv:"value" json:"value" bson:"value"` |
<|file_name|>order_leg.py<|end_file_name|><|fim▁begin|>from kaleidoscope.globals import SecType
class OrderLeg(object):
def __init__(self, quantity, contract):
"""
This class is an abstraction of an order leg of an option strategy. It holds the information
for a single order leg as part of... | def reverse(self): |
<|file_name|>GotoLineCol.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Script: GotoLineCol.py
Utility: 1. Moves the cursor position to the specified line and column for a file in Notepad++.
Especially useful for inspecting data files in fixed-width record formats.
2. ... | # Obtain current caret style to restore it later on
currCS = editor.getCaretStyle() |
<|file_name|>beer.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from 'angular2/core'
import { Http, Response } from 'angular2/http';
import { Beer } from './beer'
import 'rxjs/Rx';
@Injectable()
export class BeerService {
private _breweryDbKey = '2d18b2531035b441a50dddc3aed32a1b';
private _beerUrl ... | })
.catch((err: Response) => console.log(err)); |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># -*- coding=utf-8 -*-<|fim▁hole|>
version = get_version()
setup(name='edem.content.logo',
version=version,
description="Logos for forums.e-democracy.org",
long_description=open("README.txt").read() + "\n" +
open(os.path.join("docs", ... | import os
from setuptools import setup, find_packages
from version import get_version |
<|file_name|>MainActivity.java<|end_file_name|><|fim▁begin|>package com.reactnativeexample;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import java.util.Arrays;
import java.util.List;
public class MainActivity extends ReactActivit... | return Arrays.<ReactPackage>asList(
new MainReactPackage() |
<|file_name|>fund.go<|end_file_name|><|fim▁begin|>package main
import (
"context"
"fmt"
"log"
"net/http"
"strconv"
"strings"
"time"
"github.com/PuerkitoBio/goquery"
)
const (
userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36"
... | fund := Fund{
Code: code,
Name: fundName, |
<|file_name|>ToolConstants.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 information
* regarding copyright ownership. The ASF licenses this file
* to you un... | |
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|>#-*- coding: UTF-8 -*-
from django.db.models import F
from celery.task import *
from datetime import timedelta, datetime
from app.models import CustomUser
from django.utils.translation import activate,deactivate
"""
Note: the api of twitter retards 1 minute (more or le... | for user in users:
logger.info("User %s, act: %d, mail: %d, lu: %s - [%s]" % (user.username, user.activity_interval, user.mail_interval, user.last_update, datetime.now()))
#Get the last update date for the user |
<|file_name|>pconvert.cpp<|end_file_name|><|fim▁begin|>/******************************************************************************
*
* MantaFlow fluid solver framework
* Copyright 2011 Tobias Pfaff, Nils Thuerey
*
* This program is free software, distributed under the terms of the
* GNU General Public Licens... | errMsg("argument is not a double"); |
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin
from puzzle_captcha.models import Puzzle, PuzzlePiece
class PuzzlePieceInline(admin.StackedInline):
model = PuzzlePiece
readonly_fields = ('key', 'image', 'order')
can_delete = False
extra = 0
class PuzzleAdmin(admin.M... | model = Puzzle
inlines = [
PuzzlePieceInline,
] |
<|file_name|>optimized.py<|end_file_name|><|fim▁begin|>from feature import *
from pymongo import MongoClient
from bson.binary import Binary as BsonBinary
import pickle
import os
from operator import itemgetter
import time
import sys
imagelocation = "" #Input Image path
indir = "" #Directory Path
client = MongoClient(... | maxilocsim = np.absolute((vectormax-img.llfeature).sum())
maxiglosim = np.logical_xor(gridmax,img.glfeature).sum()
processed_time = time.time()
|
<|file_name|>speedway.py<|end_file_name|><|fim▁begin|># Copyright 2011 Google Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");<|fim▁hole|># http://www.apache.org/licenses/LICENSE-2.0
#
# unless required by applicable law or agreed to in writing, software
# distributed unde... | # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# |
<|file_name|>testLauncher.js<|end_file_name|><|fim▁begin|>/**
* Macchiato : Mobile and Web application offloading Copyright (C) 2013 Nicolas
* Petitprez
*
* 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... | require('../../main/javascript/macchiato-eb.js');
|
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LI... | |
<|file_name|>review_group_user.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from django.utils import six
from djblets.util.decorators import augment_method_from
from djblets.webapi.decorators im... | if (not group_resource.has_access_permissions(request, group) or
not self.has_modify_permissions(request, group, username,
local_site)): |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from . import darknet53, efficientnet, xception<|fim▁end|> | """Kerasの各種モデル。"""
# pylint: skip-file
# flake8: noqa
|
<|file_name|>amqp-connection-manager-tests.ts<|end_file_name|><|fim▁begin|>import * as amqp from "amqplib";
import * as amqpConMgr from 'amqp-connection-manager';
// from README.md
const connection = amqpConMgr.connect(['amqp://localhost']);
const channelWrapper: amqpConMgr.ChannelWrapper = connection.createChannel({
... | heartbeatIntervalInSeconds: 123
});
amqpConMgr.connect(["foo", "bar"], { |
<|file_name|>TestType.java<|end_file_name|><|fim▁begin|>package edu.harvard.fas.rbrady.tpteam.tpbridge.hibernate;
// Generated Nov 10, 2006 5:22:58 PM by Hibernate Tools 3.2.0.beta8
import java.util.HashSet;
import java.util.Set;
/**
* TestType generated by hbm2java
*/
public class TestType implements ja... | |
<|file_name|>fixture.rs<|end_file_name|><|fim▁begin|>/// `fixture`'s related data and parsing
use syn::{
parse::{Parse, ParseStream},
parse_quote,
visit_mut::VisitMut,
Expr, FnArg, Ident, ItemFn, Token,
};
use super::{
extract_argument_attrs, extract_default_return_type, extract_defaults, extract_f... | #[derive(PartialEq, Debug)]
pub(crate) enum FixtureItem {
Fixture(Fixture),
ArgumentValue(Box<ArgumentValue>), |
<|file_name|>fabfile.py<|end_file_name|><|fim▁begin|>from fabric.api import *
import fabric.contrib.project as project
import os
import shutil
import sys
import SocketServer
from pelican.server import ComplexHTTPRequestHandler
# Local path configuration (can be absolute or relative to fabfile)
env.deploy_path = 'outp... | |
<|file_name|>public_domain.py<|end_file_name|><|fim▁begin|>from typing import Dict, List
from service.ws_re.register._base import Register
from service.ws_re.register.author import Author
from service.ws_re.register.authors import Authors
from service.ws_re.register.lemma import Lemma
from service.ws_re.register.regis... | |
<|file_name|>misc.py<|end_file_name|><|fim▁begin|>from __future__ import division
import numpy as np
from chainer.backends import cuda<|fim▁hole|>
from chainercv import transforms
exp_clip = np.log(1000 / 16)
def smooth_l1(x, t, beta):
return F.huber_loss(x, t, beta, reduce='no') / beta
# to avoid out of me... | import chainer.functions as F |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*-
from django.conf.urls import url
from . import views
app_name = "perso"
urlpatterns = [
url(r'^$', views.main, name='main'),
url(r'^(?P<pageId>[0-9]+)/?$', ... | url(r'^publication/(?P<slug>[-a-zA-Z0-9_]+)/?$', views.publication, name='publication'),
url(r'^tag/(?P<slug>[-a-zA-Z0-9_]+)/?$', views.tag, name='tag'),
] |
<|file_name|>nil.rs<|end_file_name|><|fim▁begin|>use lua::{Index, ToLua, FromLua, State};<|fim▁hole|>use types::{LuaStackable};
/// Represents a nil value on the Lua stack
pub struct LuaNil {
index: Index
}
impl LuaNil {
/// Create a new LuaNil given an index
pub fn new(i: Index) -> LuaNil {
LuaNi... | |
<|file_name|>select.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1
oid sha256:0f088644576fe6fee42bb3ce7f1d056f5db1079bf284c312f2acb895c5510851<|fim▁hole|><|fim▁end|> | size 11112 |
<|file_name|>test_mapping.py<|end_file_name|><|fim▁begin|>import unittest
from fam.tests.models.test01 import Dog, Cat, Person, JackRussell, Monarch
from fam.mapper import ClassMapper
class MapperTests(unittest.TestCase):
def setUp(self):<|fim▁hole|>
def tearDown(self):
pass
def test_sub_clas... | self.mapper = ClassMapper([Dog, Cat, Person, JackRussell, Monarch])
|
<|file_name|>term.js<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> *
* 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, including without limitation the rights
* to use, c... | * Javascript terminal
*
* Copyright (c) 2011 Fabrice Bellard |
<|file_name|>adl_defines.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 by Mark Visser <mjmvisser@gmail.com>
#
# 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, inclu... | ADL_DL_DISPLAYCONFIG_CONTYPE_HDMI_TYPE_A = 8 # ADL_SDK_3.0/include/adl_defines.h:923
ADL_DL_DISPLAYCONFIG_CONTYPE_HDMI_TYPE_B = 9 # ADL_SDK_3.0/include/adl_defines.h:924
ADL_DL_DISPLAYCONFIG_CONTYPE_DISPLAYPORT = 10 # ADL_SDK_3.0/include/adl_defines.h:925
ADL_DISPLAY_DISPLAYINFO_DISPLAYCONNECTED = 1 # A... |
<|file_name|>getVariableQueryEditor.test.tsx<|end_file_name|><|fim▁begin|>import { VariableSupportType } from '@grafana/data';
import { getVariableQueryEditor, StandardVariableQueryEditor } from './getVariableQueryEditor';
import { LegacyVariableQueryEditor } from './LegacyVariableQueryEditor';
describe('getVariableQu... |
describe('when called with a data source with legacy variable support', () => {
it('then it should return correct editor', async () => {
const editor: any = StandardVariableQueryEditor; |
<|file_name|>105c1c44ff70_login_is_not_nullabl.py<|end_file_name|><|fim▁begin|>"""login is not nullable
Revision ID: 105c1c44ff70
Revises: 2003c675a267
Create Date: 2013-12-09 10:52:50.646000
"""
# revision identifiers, used by Alembic.
revision = '105c1c44ff70'
down_revision = '2003c675a267'
from alemb... | def downgrade():
|
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 TiKV Project Authors. Licensed under Apache-2.0.
//! This crate stores data types which used by other tidb query related crates.
#![feature(proc_macro_hygiene)]
#![feature(min_specialization)]
#![feature(test)]
#![feature(decl_macro)]
#![feature(str_i... | |
<|file_name|>fflat.cc<|end_file_name|><|fim▁begin|><|fim▁hole|> * 2005 Alan West <alan@alanz.com>
*/
/* This file is part of Ragel.
*
* Ragel 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... | /*
* Copyright 2004-2006 Adrian Thurston <thurston@complang.org>
* 2004 Erich Ocean <eric.ocean@ampede.com> |
<|file_name|>c-style-enum.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.o... | static mut MANUAL_ONE: ManualDiscriminant = OneHundred;
static mut MANUAL_TWO: ManualDiscriminant = OneHundred; |
<|file_name|>ShippingRequest.java<|end_file_name|><|fim▁begin|>package in.clayfish.printful.models;
import java.io.Serializable;
import java.util.List;
import in.clayfish.printful.models.info.AddressInfo;
import in.clayfish.printful.models.info.ItemInfo;
/**
* @author shuklaalok7
* @since 24/12/2016
*/
public cla... |
} |
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import json
import logging
import os
import sys
from datetime import datetime, timedelta, timezone
from signal import signal, SIGINT, SIGTERM, SIGUSR1
from typing import Optional
from apscheduler.schedulers import SchedulerNotRunningError
from dateutil.parser import is... | |
<|file_name|>htmltitleelement.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::bindings::codegen::Bindings::HTMLTitleEleme... | htmlelement: HTMLElement, |
<|file_name|>config.py<|end_file_name|><|fim▁begin|>#
# This is the configuration file for the RPi environd
#
### Presentation - General
# All datetime stamps use typical strftime codes: https://docs.python.org/2/library/datetime.html#strftime-strptime-behavior
# The date/time stamp of the last (most current) readin... | # The date/time stamp on the x-axis |
<|file_name|>JsonRawProvider.java<|end_file_name|><|fim▁begin|>package com.devicehive.client.impl.rest.providers;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.devicehive.client.impl.Constants;
import com.devicehive.c... | |
<|file_name|>jasmine-this.test.ts<|end_file_name|><|fim▁begin|>/* eslint-env jest */
import chalk from 'chalk'
import { wrapPlugin } from '../utils/test-helpers'
import plugin from './jasmine-this'
chalk.level = 0
const wrappedPlugin = wrapPlugin(plugin)
function expectTransformation(source, expectedOutput, options ... | this.timeout(500);
this.slow(100);
this.retries(2);
this.skip(); |
<|file_name|>layout_optimizer_test.py<|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:/... | nodes = []
num_transposes = 0 |
<|file_name|>typeGuardFunctionOfFormThis.js<|end_file_name|><|fim▁begin|>//// [typeGuardFunctionOfFormThis.ts]
class RoyalGuard {
isLeader(): this is LeadGuard {
return this instanceof LeadGuard;
}
isFollower(): this is FollowerGuard {
return this instanceof FollowerGuard;
}
}
<|fim▁hol... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.