prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>UserAgent.java<|end_file_name|><|fim▁begin|>package com.yh.admin.bo;
import java.util.Date;
import com.yh.platform.core.bo.BaseBo;
public class UserAgent extends BaseBo {
private static final long serialVersionUID = 2715416587055228708L;
private Long userAgentOid;
private Long systemPositionO... | |
<|file_name|>GAPhysicsBaseTemp.cpp<|end_file_name|><|fim▁begin|>#include "GAPhysicsBaseTemp.h"
//------------------------------GAPhysicsBase------------------------------------------
GAPhysicsBase::GAPhysicsBase()
{
}
int GAPhysicsBase::testCollideWith(GAPhysicsBase* object2,GAVector3& collidePoint)
{
return 0;
}
... | {
return 0; |
<|file_name|>KubernetesModelUtil.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2017 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/license... | * limitations under the License. |
<|file_name|>codes.js<|end_file_name|><|fim▁begin|>// This module is compiled away!
//
// micromark works based on character codes.
// This module contains constants for the ASCII block and the replacement
// character.
// A couple of them are handled in a special way, such as the line endings
// (CR, LF, and CR+LF, co... | exports.digit1 = 49 // `1`
exports.digit2 = 50 // `2`
exports.digit3 = 51 // `3`
exports.digit4 = 52 // `4` |
<|file_name|>goldsaxenginestart.py<|end_file_name|><|fim▁begin|><|fim▁hole|>/*email to provide support at vancekingsaxbe@powerdominionenterprise.com, businessaffairs@powerdominionenterprise.com, For donations please write to fundraising@powerdominionenterprise.com*/<|fim▁end|> | /*Owner & Copyrights: Vance King Saxbe. A.*/from GoldSaxEngineChinaMarkets import goldsaxenginechinamarkets
goldsaxenginechinamarkets.start()
|
<|file_name|>analytics.py<|end_file_name|><|fim▁begin|>import asyncio
import collections
import logging
import aiohttp
import typing
from lbry import utils
from lbry.conf import Config<|fim▁hole|>from lbry.extras import system_info
ANALYTICS_ENDPOINT = 'https://api.segment.io/v1'
ANALYTICS_TOKEN = 'Ax5LZzR1o3q3Z3WjATA... | |
<|file_name|>resetpassword.js<|end_file_name|><|fim▁begin|>var mysql = require('mysql');
var bcrypt = require('bcryptjs');
var connection = mysql.createConnection({
host: process.env.FOLIO_HOST,
user: process.env.FOLIO_USER,
database: process.env.FOLIO_DATABASE,
password: process.env.FOLIO_PASSWORD
});
console.log... | console.log("\t[>] Password hash: " + passwordhash);
connection.query("INSERT INTO users(username, passwordhash) values('admin', '" + passwordhash + "');"); |
<|file_name|>MediaTypeCache.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 ... | }
|
<|file_name|>group-forms-csv.component.ts<|end_file_name|><|fim▁begin|>import { Breadcrumb } from './../../shared/_components/breadcrumb/breadcrumb.component';
import { Component, OnInit, AfterViewInit, ElementRef, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Grou... | |
<|file_name|>asyncio.py<|end_file_name|><|fim▁begin|># -*- coding: iso-8859-1 -*-
ur"""AsyncIO objects wrap the Win32 Overlapped API. They are instantiated by
passing a handle which has been opened for Overlapped IO. They can be waited
on by the functions in the :mod:`ipc` module and are True when complete,
False o... | |
<|file_name|>HeapPerformanceTest.java<|end_file_name|><|fim▁begin|>/*
* This file is part of ELKI:
* Environment for Developing KDD-Applications Supported by Index-Structures
*
* Copyright (C) 2019
* ELKI Development Team
*
* This program is free software: you can redistribute it and/or modify
* it under the te... | pq.add(elements.get(i));
} |
<|file_name|>config.py<|end_file_name|><|fim▁begin|>import os
basedir = os.path.abspath(os.path.dirname(__file__))
WTF_CSRF_ENABLED = True
SECRET_KEY = '33stanlake#'
DEBUG = True
APP_TITLE = 'Cloud of Reproducible Records API'
VERSION = '0.1-dev'<|fim▁hole|> 'db': 'corr-production',
'host': '0.0.0.0',
'p... |
MONGODB_SETTINGS = { |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>module.exports = function(sails) {
var Agenda = require('agenda'),
util = require('util'),
_ = require('lodash'),
os = require("os"),
agenda = new Agenda()
agenda.sails = sails;
var stopServer = function() {
agenda.stop(function(... | // Find all jobs
var jobs = require('include-all')({ |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from action import *
from conn import *
from logic import *
from log import *
from protocol import *
from schedule import *
from server import *<|fim▁hole|><|fim▁end|> | from util import * |
<|file_name|>deployment.go<|end_file_name|><|fim▁begin|>package context
import (
"github.com/Everlane/evan/common"
"github.com/satori/go.uuid"
)
// Stores state relating to a deployment.
type Deployment struct {
uuid uuid.UUID
application common.Application
environment string
strategy common.Strategy... |
preconditions := deployment.strategy.Preconditions()
for _, precondition := range preconditions {
err := precondition.Status(deployment) |
<|file_name|>testing-topo.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
"Assignment 5 - This defines a topology for running a firewall. It is not \
necessarily the topology that will be used for grading, so feel free to \
edit and create new topologies and share them."
from mininet.topo import Topo
from m... | | | |
\ | /
firwall (s1)
/ | \ |
<|file_name|>4chan.py<|end_file_name|><|fim▁begin|>import re
import json
import requests<|fim▁hole|>
from util import irc
from util.handler_utils import cmdhook, authenticate, get_target
from qtbot3_common.types.message import Message
def scrape(board: str, filtertext: str):
try:
data = requests.get("htt... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2016 Amazon Web Services, Inc. or its affiliates. All Rights Reserved.
# This file is licensed to you under the AWS Customer Agreement (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is loca... | json_responseBody = json.dumps(responseBody)
print "Response body:\n" + json_responseBody
|
<|file_name|>Heap.py<|end_file_name|><|fim▁begin|>class Heap(object):
def __init__(self, data=[]):
if len(data) == 0:
self.data = [None] * 100
else:
self.data = data
self.__size = sum([1 if item is not None else 0 for item in self.data])
self.__heapify()
... | h = 1
current_index = i
while self.__has_parent(current_index):
current_index = ((i + 1) >> h) - 1 |
<|file_name|>gridMaterial.ts<|end_file_name|><|fim▁begin|>import { serializeAsTexture, serialize, expandToProperty, serializeAsColor3, SerializationHelper } from "babylonjs/Misc/decorators";
import { Matrix, Vector4, Vector3 } from "babylonjs/Maths/math.vector";
import { Color3 } from "babylonjs/Maths/math.color";
i... | |
<|file_name|>remutex.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 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... | let m2 = m.clone();
let lock = m.lock().unwrap();
let child = thread::spawn(move || {
let lock = m2.lock().unwrap(); |
<|file_name|>Palindrome.py<|end_file_name|><|fim▁begin|><|fim▁hole|> return str[:1]
assert(firstCharacter("abc") is "a")
def lastCharacter(str):
return str[-1:]
assert(lastCharacter("abc") is "c")
def middleCharacters(str):
return str[1:-1]
assert(middleCharacters("abc") == "b")
assert(middleCharacter... | def firstCharacter(str): |
<|file_name|>resource_alicloud_mns_topic_subscription_test.go<|end_file_name|><|fim▁begin|>package alicloud
import (
"fmt"
"testing"
"github.com/alibaba/terraform-provider/alicloud/connectivity"
"github.com/dxh031/ali_mns"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terrafor... | default = "tf-testAccMNSTopicConfig"
}
variable "subscriptionName" { |
<|file_name|>extract_translator_comments.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
import re
source_files = {}
comment_re = re.compile(r'\s+#\s+T:\s+(.+)\s*$')
def get_file(file):
if not file in source_files:
#~ print 'Extracting comments from', file
source_files[file] = open(file).readlines()
source... | break
else:
match = comment_re.search(lines[i])
if match: |
<|file_name|>lt.rs<|end_file_name|><|fim▁begin|>#![feature(core)]
extern crate core;
#[cfg(test)]
mod tests {
// pub trait FixedSizeArray<T> {
// /// Converts the array to immutable slice
// fn as_slice(&self) -> &[T];
// /// Converts the array to mutable slice
// fn as_mut_slice(&m... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from todoman import version # type: ignore<|fim▁hole|>
__version__ = version.version
__documentation__ = "https://todoman.rtfd.org/en/latest/"<|fim▁end|> | |
<|file_name|>etcd.go<|end_file_name|><|fim▁begin|><|fim▁hole|> metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
apirequest "k8s.io/apiserver/pkg/endpoints/request"
"k8s.io/apiserver/pkg/registry/generic"
"k8s.io/apiserver/pkg/registry/generic/registry"
"k8s.io/apiserver/pkg/registry/... | package etcd
import ( |
<|file_name|>process-one-mail.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python -S
#
# Copyright 2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
<|fim▁hole|>import sys
from lp.services.config import config
from lp.services.mail.helpers impo... | """Process one email message, read from stdin."""
import _pythonpath
|
<|file_name|>resources.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.7.1)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x05\x96\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x... | \x99\x31\x39\xf3\xe3\x71\x7c\x7c\xde\xec\x39\x73\x74\x21\x29\xff\
\x6f\xb7\x96\xb5\xbf\x65\x4f\xcb\x42\x2c\x2b\x90\x1b\x92\xe1\x69\
\x09\x00\x5c\xba\x7a\xf7\xf7\xc1\x41\x00\x69\xcc\x1c\x93\xd2\xa6\ |
<|file_name|>open.rs<|end_file_name|><|fim▁begin|>use editor::Editor;
use std::fs::File;
use std::io::Read;
use std::collections::VecDeque;
pub enum OpenStatus {
Ok,
NotFound,
}
impl Editor {
/// Open a file
pub fn open(&mut self, path: &str) -> OpenStatus {
self.status_bar.file = path.to_stri... | }
} |
<|file_name|>test_common.py<|end_file_name|><|fim▁begin|># vim: fileencoding=UTF-8:expandtab:autoindent:ts=4:sw=4:sts=4
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
# To import from calibre, some things need to be a... | |
<|file_name|>test_tab.py<|end_file_name|><|fim▁begin|>"""
Tests for wiki views.
"""
from django.conf import settings
from django.test.client import RequestFactory
from lms.djangoapps.courseware.tabs import get_course_tab_list
from common.djangoapps.student.tests.factories import AdminFactory, UserFactory
from xmodul... | the public. |
<|file_name|>editor.js<|end_file_name|><|fim▁begin|>//= require ./ace/ace
//= require ./ace/mode-ruby
//= require ./ace/theme-tomorrow
//= require ./ace/ext-whitespace
$(function() {<|fim▁hole|> editor.getSession().setTabSize(2);
editor.getSession().setUseSoftTabs(true);
$("form").submit(function() {
$("#con... | var editor = ace.edit("editor");
editor.setTheme("ace/theme/tomorrow");
editor.getSession().setMode("ace/mode/ruby"); |
<|file_name|>ThirdBit.js<|end_file_name|><|fim▁begin|><|fim▁hole|>function solve(args) {
var $number = +args[0];
var $significantBit = $number => (($number >> 3) & 1);
console.log($significantBit($number));
}
solve(['15']);
solve(['1024']);<|fim▁end|> | 'use strict';
|
<|file_name|>configuration.go<|end_file_name|><|fim▁begin|>package conf
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"github.com/BurntSushi/toml"
"github.com/ottom8/hadoop-ottom8r/logger"
"github.com/ottom8/hadoop-ottom8r/util"
)
const (
authConfigFile = "auth.toml"
encryptKey = "H@d00pS3cret3ncryptK3yS3cur3RlLg... | logger.Fatal(fmt.Sprint(err))
}
logger.Info("Wrote new auth config file.") |
<|file_name|>reordersam.py<|end_file_name|><|fim▁begin|>import os
from pypers.core.step import CmdLineStep
class ReorderSam(CmdLineStep):
spec = {
"version": "0.0.1",
"descr": [
"Runs ReorderSam to reorder chromosomes into GATK order"
],
"args":
{
"in... | }, |
<|file_name|>stitch_imgs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import argparse
import Image, ImageDraw, ImageChops
import os
import sys
import util
# stitches a bunch of images together into a grid
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argu... | max_imgs = 0
assert len(opts.dirs) == X * Y, opts.dirs
for directory in opts.dirs: |
<|file_name|>preview.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This helps you preview the apps and extensions docs.
#
# ./preview.py --h... | '''
def do_GET(self):
# Sanitize path to guarantee that it stays within the server.
if not posixpath.abspath(self.path.lstrip('/')).startswith( |
<|file_name|>copyable.js<|end_file_name|><|fim▁begin|>/**
@module ember
@submodule ember-runtime
*/
import { get } from "ember-metal/property_get";
import { set } from "ember-metal/property_set";
import { required } from "ember-metal/mixin";
import { Freezable } from "ember-runtime/mixins/freezable";
import { Mixin }... | since a freezable object can simply return itself without actually
consuming more memory. |
<|file_name|>SolrPing.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 under the ... | * health-check file for the Solr core. For Solr server version 4.0 and later.
*
* @return this
*/ |
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from django.db import migrations, models
import django.db.models.deletion<|fim▁hole|>from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_... | |
<|file_name|>bitcoin_es_CL.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="es_CL" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About EverGreenCoin</source>
<translation type=... | |
<|file_name|>LatitudePlot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# LatitudePlot.py
# Created 30 July 2013
# Created by snowdonjames@googlemail.com
import os, time, math
from datetime import datetime
from time import mktime
import xml.etree.ElementTree as ET
from PIL import Image, ImageDraw
def GetKmlF... | |
<|file_name|>build.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import logging
import os
from django.conf import settings
from django.core.management import BaseCommand
from django.apps import apps
from django.core.management import CommandError
from django.template.defaultfilters import slugify
from django... | |
<|file_name|>cfg.rs<|end_file_name|><|fim▁begin|>extern crate cargo;
extern crate cargotest;
extern crate hamcrest;
use std::str::FromStr;
use std::fmt;
use cargo::util::{Cfg, CfgExpr};
use cargotest::{is_nightly, rustc_host};
use cargotest::support::registry::Package;
use cargotest::support::{project, execs};
use ha... | Ok(c) => c,
Err(e) => panic!("failed to parse `{}`: {}", s, e), |
<|file_name|>fc_scan.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
# encoding: utf-8<|fim▁hole|>import re
from waflib import Utils,Task,TaskGen,Logs
from waflib.TaskGen import feature,before_method,after_method,extension
from waflib.Configure import conf
INC_REGEX="""(?:^|['">]\s*;)\s*(?:|#\s*)INCLUDE\s+(?:\w+... | # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
|
<|file_name|>result.cc<|end_file_name|><|fim▁begin|>#include "protagonist.h"
#include "SerializeResult.h"
#include "v8_wrapper.h"
#include "snowcrash.h"
using namespace v8;
using namespace protagonist;
Result::Result()
{
}
Result::~Result()
{
}
Nan::Persistent<Function> Result::constructor;
void Result::Init(Handl... | }
v8::Local<v8::Object> Result::WrapResult(snowcrash::ParseResult<snowcrash::Blueprint>& parseResult, |
<|file_name|>preprocessor_tests.rs<|end_file_name|><|fim▁begin|>// Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
use crate::{
errors::*,
preprocessor::{build_transactions, extract_global_config, split_input},
};
fn parse_input(input: &str) -> Result<()> {
let config = ext... | fn parse_input_no_transactions() {
parse_input("").unwrap_err();
} |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2020 DDN. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
use future::BoxFuture;
use futures::{future, FutureExt, TryFutureExt};
use iml_postgres::{
alert,
sqlx::{self,... | fn get_item_after<'a>(s: &'a str, after: &str) -> Option<&'a str> {
let sub = s.find(after)? + after.len();
let l = s[sub..].find(' ')?; |
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>import { NgModule, ErrorHandler } from "@angular/core";
import { RouterModule } from "@angular/router";
import { FormsModule } from "@angular/forms";
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platf... | PatientEndpoint, |
<|file_name|>eucopyright.js<|end_file_name|><|fim▁begin|>/* jshint strict: true, quotmark: false, es3: true */
/* global $: false, JSZip: false, odtprocessor: false */
var EUCopyright = EUCopyright || {};
EUCopyright.settings = EUCopyright.settings || {};
EUCopyright.settings.defaultToNoOpinion = EUCopyright.settings.... | }
if (answer.explanation) { |
<|file_name|>test_run.py<|end_file_name|><|fim▁begin|>import argparse
from getpass import getpass
import json
import sys
import textwrap
import zmq
import colorama
from colorama import Fore
def execute(code):
ctx = zmq.Context.instance()
ctx.setsockopt(zmq.LINGER, 50)
repl_in = ctx.socket(zmq.PUSH)
r... | print('--- other msg ---') |
<|file_name|>gif.js<|end_file_name|><|fim▁begin|>var gif_bgs = [];
var gif_center = [];
var length_bgs = 0;
var length_center = 0;
var timer;
var duration = 4000;
var loaded = 0;
var next_bg;
var next_center;
var audio = document.getElementById("sound");
var muted = false;
function next(e){
clearInterval(timer);... | $("#sound-btn").addClass('muted');
}
|
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>pub mod feed;
pub mod link_checking;
pub mod sass;
pub mod sitemap;
pub mod tpls;
use std::collections::HashMap;
use std::fs::remove_dir_all;
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex, RwLock};
use lazy_static::lazy_static;
use rayon::prelude::*;
use t... | }
start = log_time(start, "Cleaned folder"); |
<|file_name|>flash_tune.py<|end_file_name|><|fim▁begin|>'''
main tuning script, LCLS
'''
import numpy as np
from ocelot.mint.mint import Optimizer, Action
from ocelot.mint.flash1_interface import FLASH1MachineInterface, FLASH1DeviceProperties, TestInterface
<|fim▁hole|>
mi = FLASH1MachineInterface()
dp = FLASH1Devic... | |
<|file_name|>l10n-fetch-po-files.py<|end_file_name|><|fim▁begin|>import os
import re
import subprocess
# Copied from Trojita
"""Fetch the .po files from KDE's SVN for GCompris
Run me from GCompris's top-level directory.
"""
SVN_PATH = "svn://anonsvn.kde.org/home/kde/trunk/l10n-kf5/"
SOURCE_PO_PATH = "/messages/kder... | |
<|file_name|>bayes.py<|end_file_name|><|fim▁begin|>"""
Various bayesian regression
"""
from __future__ import print_function
# Authors: V. Michel, F. Pedregosa, A. Gramfort
# License: BSD 3 clause
from math import log
import numpy as np
from scipy import linalg
from .base import LinearModel
from ..base import Regres... |
Examples
--------
>>> from sklearn import linear_model |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Maked by Mr. Have fun! Version 0.2
# Shadow Weapon Coupons contributed by BiTi for the Official L2J Datapack Project
# Visit http://forum.l2jdp.com for more details
import sys
from com.l2scoria.gameserver.model.quest import State
from com.l2scoria.gameserver.model... | elif npcId == 30412 and st.getInt("cond")!=0 and st.getQuestItemsCount(BROKEN_BRONZE_MIRROR)!=0 and st.getQuestItemsCount(WIND_FEATHER)!=0 :
#Talking to the Wind Sylph with cond != 0 |
<|file_name|>generic.py<|end_file_name|><|fim▁begin|># (void)walker CPU architecture support
# Copyright (C) 2013 David Holm <dholmster@gmail.com>
# 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<|fim▁hole|># This program is d... | # the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# |
<|file_name|>virt_pool.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Maciej Delmanowski <drybjed@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass_... | else: |
<|file_name|>postProcessor.py<|end_file_name|><|fim▁begin|># Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#... |
# see if we can find the name with a TVDB lookup
for cur_name in name_list:
try: |
<|file_name|>template.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import re
class Templates:
TOKENS = re.compile('([A-Za-z]+|[^ ])')
SIMPLE = {
'l': '_n.l.ptb()',
'r': '_n.r.ptb()',
'<': 'addr(_n)',
'>': 'addl(_n)',
}
def compile(self, template):
python = self.parse(self.TOKENS.... | tokens.pop(0)
return args
args.append(self.parse(tokens))
raise SyntaxError, "missing closing '%s'" % delimiter |
<|file_name|>error.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>//
// Caribon is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 2.1 of the License, or
// (at your option) any later version... | // Copyright (C) 2015 Élisabeth HENRY.
//
// This file is part of Caribon. |
<|file_name|>metadados.js<|end_file_name|><|fim▁begin|>'use strict';
module.exports = {
controller: function (args) {
this.config = _.merge({
salvar: _.noop,
publicar: _.noop,
descartar: _.noop,
visualizar: _.noop,
editar: _.noop
}, args);
},
view: function (ctrl) {
va... | return m('#metadados', [ |
<|file_name|>spawn.js<|end_file_name|><|fim▁begin|>'use strict'
const { spawn } = require('@malept/cross-spawn-promise')
const which = require('which')
function updateExecutableMissingException (err, hasLogger) {
if (hasLogger && err.code === 'ENOENT' && err.syscall === 'spawn mono') {
let installer
let pkg... | })
} |
<|file_name|>bcm_host.py<|end_file_name|><|fim▁begin|># vim: set et sw=4 sts=4 fileencoding=utf-8:
#
# Python header conversion
# Copyright (c) 2013,2014 Dave Hughes <dave@waveform.org.uk>
#
# Original headers
# Copyright (c) 2012, Broadcom Europe Ltd
# All rights reserved.
#
# Redistribution and use in source and bina... | graphics_get_display_size = _lib.graphics_get_display_size
graphics_get_display_size.argtypes = [ct.c_uint16, ct.POINTER(ct.c_uint32), ct.POINTER(ct.c_uint32)]
graphics_get_display_size.restype = ct.c_int32 |
<|file_name|>borrowck-anon-fields-variant.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<|fim▁hole|>// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
... | |
<|file_name|>PeristentBibTexEntry.java<|end_file_name|><|fim▁begin|>/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package de.comci.bigbib;
import com.mongodb.BasicDBObject;
import com.mongodb.DBObject;
import java.util.HashMap;
import java.util.Map;
import java.uti... | @JsonProperty("type")
@XmlElement(name="type") |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![feature(plugin, asm)]
#![no_std]
#![plugin(macro_zinc)]
extern crate zinc;
use zinc::hal::mem_init::{init_data, init_stack};
#[zinc_main]
fn run() {
init_data();<|fim▁hole|>}<|fim▁end|> | init_stack();
unsafe { asm!("nop") } |
<|file_name|>openssl_certificate.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016-2017, Yanis Guenane <yanis+ansible@guenane.org>
# Copyright: (c) 2017, Markus Teufelberger <mteufelberger+ansible@mgit.at>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.... | description:
- The I(extended_key_usage) extension field must contain all these values. |
<|file_name|>bitcoin_it.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="it" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About MyBroCoin</source>
... | <location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>Il portamonete è <b>cifrato</b> e attualmente <b>bloccato</b></translation> |
<|file_name|>LogEntryView.js<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright 2015 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
*
* http... | max-width: 35px; |
<|file_name|>FirstBlockLinePhylipFault.java<|end_file_name|><|fim▁begin|><|fim▁hole|>
import org.jiserte.bioformats.readers.faults.AlignmentReadingFault;
public class FirstBlockLinePhylipFault extends AlignmentReadingFault {
public FirstBlockLinePhylipFault() {
super();
this.setMessage("Sequences in the firs... | package org.jiserte.bioformats.readers.phylip; |
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|><|fim▁hole|>It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Courseware.set... | """
WSGI config for Courseware project.
|
<|file_name|>sans_serif_italic.rs<|end_file_name|><|fim▁begin|>/// Transform a character to it's mathematical sans-serif italic
/// equivalent.
pub fn math_sans_serif_italic(c: char) -> Option<char> {
match c {
// Latin capital letters.
'A' => Some('𝘈'),
'B' => Some('𝘉'),
'C' => So... | 'e' => Some('𝘦'),
'f' => Some('𝘧'),
'g' => Some('𝘨'), |
<|file_name|>test_qt3dinput.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
import pytest
from qtpy import PYQT5, PYSIDE2
@pytest.mark.skipif(not (PYQT5 or PYSIDE2), reason="Only available in Qt5 bindings")
def test_qt3dinput():
"""Test the qtpy.Qt3DInput namespace"""
Qt3DInput = pytest... | assert Qt3DInput.QAbstractPhysicalDevice is not None
assert Qt3DInput.QAxisSetting is not None |
<|file_name|>api.py<|end_file_name|><|fim▁begin|>from django.shortcuts import get_object_or_404<|fim▁hole|>from apps.canvas_auth.models import User
from canvas.api_decorators import api_decorator
from canvas.metrics import Metrics
from canvas.models import Comment
from canvas.view_guards import require_user
urlpattern... | |
<|file_name|>metro.py<|end_file_name|><|fim▁begin|>#####################################################################
#
# metro.py
#
# Copyright (c) 2016, Eran Egozy
#
# Released under the MIT License (http://opensource.org/licenses/MIT)
#
#####################################################################
from c... | if self.playing:
return
self.playing = True |
<|file_name|>SpaceScene.go<|end_file_name|><|fim▁begin|>package game
import (
"fmt"
"github.com/vova616/GarageEngine/engine"
//"github.com/vova616/GarageEngine/engine/audio"
//"github.com/vova616/GarageEngine/engine/audio/ibxm"
//"github.com/vova616/GarageEngine/engine/audio/wav"
"github.com/vova616/GarageEngine... | |
<|file_name|>syntax-extension-source-utils.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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
... | include_str!("syntax-extension-source-utils-files/includeme.\
fragment").to_string() |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![feature(globs)]
extern crate graphics;
extern crate piston;
// extern crate sdl2_game_window;
extern crate glfw_game_window;
// use Window = sdl2_game_window::GameWindowSDL2;
use Window = glfw_game_window::GameWindowGLFW;
use piston::{
Game,
GameIteratorSet... | |
<|file_name|>test_hashes.py<|end_file_name|><|fim▁begin|>import json
import argparse
import logging
import glob
# Logging Information
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
<|fim▁hole|>formatter = logging.Formatter('%(levelname)s: %(message)s')
fh = logging.FileHandler('test_hashes.log')
... | |
<|file_name|>fix_agmethods2.py<|end_file_name|><|fim▁begin|>'''
run with: python ten2eleven.py -f agmethods2 test_dummy_old_MDA_code.py
Author: Tyler Reddy
'''
from lib2to3.fixer_base import BaseFix
from lib2to3.fixer_util import Name, Call, LParen, RParen, ArgList, Dot
from lib2to3 import pytree
class FixAgmethods... |
PATTERN = """
power< head =any+
trailer< dot = '.' method=('bond'|'angle'|'torsion'| |
<|file_name|>product_store.go<|end_file_name|><|fim▁begin|>package postgres
import "github.com/shijuvar/gokit/examples/http-app/pkg/domain"
// ProductStore provides persistence logic for "products" table
type ProductStore struct {
Store DataStore
}
// ToDO: Write CRUD operations here
// Create creates a new Product... | // ToDo: Write the code here |
<|file_name|>escape.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# 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/LI... | |
<|file_name|>translation-service-tests.ts<|end_file_name|><|fim▁begin|>/// <reference path="../include.d.ts" />
import * as should from "should";
import * as mockFs from "mock-fs";
import { TranslationService } from "../../src/services/translation-service";
describe('TranslationService', function() {<|fim▁hole|> ... | |
<|file_name|>styles.py<|end_file_name|><|fim▁begin|>"""
InaSAFE Disaster risk assessment tool developed by AusAid **Messaging styles.**
Contact : ole.moller.nielsen@gmail.com
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as pub... | SUGGESTION_STYLE = {
'level': 5,
'icon': 'icon-comment icon-white', |
<|file_name|>hot-keyword-api.service.spec.ts<|end_file_name|><|fim▁begin|>/* tslint:disable:no-unused-variable */
import { TestBed, async, inject } from '@angular/core/testing';
import { HotKeywordApiService } from './hot-keyword-api.service';
describe('HotKeywordApiService', () => {
beforeEach(() => {
TestBed.... | });
});
it('should ...', inject([HotKeywordApiService], (service: HotKeywordApiService) => { |
<|file_name|>problem1.rs<|end_file_name|><|fim▁begin|>/* Enun
If we list all the natural numbers below 10 that are multiples of 3 or 5,
we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
*/
fn main(){
let mut s = 0;
for i in (1..1000).filter(|x| (x%3... | }
println!("sum:{}", s); |
<|file_name|>node.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Helper classes.
"""
"""
Pynu - Python Node Utilities
Copyright (c) 2014 Juho Vepsäläinen
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to de... | Single argument, multiple results
>>> assert node3.parents.find(value=13) == [node1, node4]
|
<|file_name|>rewriter.cc<|end_file_name|><|fim▁begin|>// Copyright 2012 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/parsing/rewriter.h"
#include "src/ast/ast.h"
#include "src/ast/scopes.h"
#include "... | Processor(Isolate* isolate, DeclarationScope* closure_scope, Variable* result,
AstValueFactory* ast_value_factory)
: result_(result), |
<|file_name|>unique-fn-ret.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/l... | }
pub fn main() { |
<|file_name|>base.py<|end_file_name|><|fim▁begin|>"""
Django settings for lwc project.
Generated by 'django-admin startproject' using Django 1.9.7.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproj... | |
<|file_name|>BoundSheetRecord.cpp<|end_file_name|><|fim▁begin|>// Generated from /POI/java/org/apache/poi/hssf/record/BoundSheetRecord.java
#include <org/apache/poi/hssf/record/BoundSheetRecord.hpp>
#include <java/lang/ArrayStoreException.hpp>
#include <java/lang/NullPointerException.hpp>
#include <java/lang/String.hp... | void poi::hssf::record::BoundSheetRecord::serialize(::poi::util::LittleEndianOutput* out)
{
npc(out)->writeInt(getPositionOfBof());
npc(out)->writeShort(field_2_option_flags); |
<|file_name|>videojs_languages.js<|end_file_name|><|fim▁begin|>'use strict';
var path = require('path');
var util = require('util');
module.exports = function(grunt) {
grunt.registerMultiTask('vjslanguages', 'A Grunt plugin for compiling VideoJS language assets.', function() {
var createLanguageFile = function... | var languageName, languageData, jsFilePath;
// Multiple Files Case |
<|file_name|>CopyProgressDlg.cpp<|end_file_name|><|fim▁begin|>/*____________________________________________________________________________
ExifPro Image Viewer
Copyright (C) 2000-2015 Michael Kowalski
____________________________________________________________________________*/
// CopyProgressDlg.cpp... | {
|
<|file_name|>two_gram_model.py<|end_file_name|><|fim▁begin|># ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software co... | from nupic.data import fieldmeta
from nupic.frameworks.opf import model
from nupic.frameworks.opf import opfutils
from opfutils import InferenceType |
<|file_name|>core.rs<|end_file_name|><|fim▁begin|>use std::cmp::min;
use crate::direction::Orientation;
use crate::event::{AnyCb, Event, EventResult, Key, MouseButton, MouseEvent};
use crate::printer::Printer;
use crate::rect::Rect;
use crate::theme::ColorStyle;
use crate::view::{ScrollStrategy, Selector, SizeCache};
... | scrollbar_padding: V,
) -> Self {
self.with(|s| s.set_scrollbar_padding(scrollbar_padding)) |
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>import {NgModule, ErrorHandler} from '@angular/core';
import {IonicApp, IonicModule, IonicErrorHandler} from 'ionic-angular';
import {MyApp} from './app.component';
import {Home} from '../pages/Home/Home';
import {GamingPage} from '../pages/gaming/gaming';
import ... | MyApp, |
<|file_name|>txn.go<|end_file_name|><|fim▁begin|>// @author Couchbase <info@couchbase.com>
// @copyright 2014 Couchbase, 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
//
// ht... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.