prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>historyserver.py<|end_file_name|><|fim▁begin|>""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache ...
env.set_params(status_params) if status_params.security_enabled: expectations = {}
<|file_name|>collect_ppa_autopkgtests_results.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2017 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licen...
def format_results(dest_dir, distros, day): subprocess.check_call(
<|file_name|>flatpickr.js<|end_file_name|><|fim▁begin|>/* flatpickr v4.6.0, @license MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = global || self, globa...
};
<|file_name|>decision.py<|end_file_name|><|fim▁begin|>"""The decision module handles the three planning levels Currently, only pre-specified planning is implemented. The choices made in the three planning levels influence the set of interventions and assets available within a model run. The interventions available i...
<|file_name|>BaseProperty.java<|end_file_name|><|fim▁begin|>/* * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published ...
if ((this.object == null) || ((BaseProperty) el).getObject() == null) { return (hashCode() == el.hashCode()); }
<|file_name|>bindings_serialization.cc<|end_file_name|><|fim▁begin|>// Copyright 2013 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. #include "mojo/public/cpp/bindings/lib/bindings_serialization.h" #include "mojo/publi...
void EncodeHandle(Handle* handle, std::vector<Handle>* handles) {
<|file_name|>utils.js<|end_file_name|><|fim▁begin|>"use strict"; var _slicedToArray = function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { var _arr = []; for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) { _arr.push(_step.value); if...
<|file_name|>pyHeekGame.cpp<|end_file_name|><|fim▁begin|>/*==LICENSE==* CyanWorlds.com Engine - MMOG client, server and tools Copyright (C) 2011 Cyan Worlds, 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 Softwar...
14617 N Newport Hwy Mead, WA 99021 *==LICENSE==*/
<|file_name|>fact.rs<|end_file_name|><|fim▁begin|>#[allow(non_snake_case)] #[derive(RustcDecodable, RustcEncodable, Debug, Clone)] pub struct ExprItem { pub data: Option<String>, // pub type: Option<String>, } #[derive(RustcDecodable, RustcEncodable, Debug, Clone)] pub struct FactcContent { pub expr: Option<Ve...
} #[derive(RustcDecodable, RustcEncodable, Debug, Clone)]
<|file_name|>Remove _Resources.py<|end_file_name|><|fim▁begin|>import os, shutil, xbmc, xbmcgui pDialog = xbmcgui.DialogProgress() dialog = xbmcgui.Dialog() Game_Directories = [ "E:\\Games\\", "F:\\Games\\", "G:\\Games\\", "E:\\Applications\\", "F:\\Applications\\", "G:\\Applications\\", "E:\\Homebrew\\", "F:\\Homeb...
print "Cannot find: " + _Resources if os.path.isfile(DefaultTBN): os.remove(DefaultTBN) else:
<|file_name|>test_reports.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redi...
os.close(fd)
<|file_name|>UniqueRoleNameValidator.java<|end_file_name|><|fim▁begin|>package org.carlspring.strongbox.validation; import javax.inject.Inject; import javax.validation.ConstraintValidator; import javax.validation.ConstraintValidatorContext; import org.carlspring.strongbox.authorization.service.AuthorizationConfigServ...
<|file_name|>vpHinkley.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** * * $Id: vpHinkley.cpp 4056 2013-01-05 13:04:42Z fspindle $ * * This file is part of the ViSP software. * Copyright (C) 2005 - 2013 by INRIA. All rights reserved. * * This softwa...
if ((Tk - Nk) > alpha) jump = upwardJump; #ifdef VP_DEBUG
<|file_name|>gene_enumerations.py<|end_file_name|><|fim▁begin|>#Aditya Joshi #Enumerating Oriented Gene Ordering from itertools import permutations,product from math import fabs n = int(raw_input()) def make_set(n): set = [] for x in range(1,n+1): set += [x] return set def plusAndM...
<|file_name|>plot.py<|end_file_name|><|fim▁begin|>import scipy as sp import matplotlib import matplotlib.pyplot as plt def simple_log_qqplot(quantiles_list, png_file=None, pdf_file=None, quantile_labels=None, line_colors=None, max_val=5, title=None, text=None, plot_label=None, ax=None, **kwargs): store...
def simple_qqplot(quantiles_list, png_file=None, pdf_file=None, quantile_labels=None, line_colors=None, title=None, text=None, ax=None, plot_label=None, **kwargs):
<|file_name|>asyncGeneratorsTest.js<|end_file_name|><|fim▁begin|>const assert = require("assert"); describe("chain of iterators", function() { it("should conform to ES", function() { let finallyCalledSrc = 0; let finallyCalled1 = 0; let finallyCalled2 = 0; let cb; let p1 = new Promise(i => (cb = ...
} finally { finallyCalledSrc++; } }
<|file_name|>Binary Tree Inorder Traversal.py<|end_file_name|><|fim▁begin|># /** # * Definition for a binary tree node. # * public class TreeNode { # * int val; # * TreeNode left; # * TreeNode right; # * TreeNode(int x) { val = x; } # * } # */ # public class Solution { # public List<Integer>...
node = stack.pop() res.append(node.val)
<|file_name|>home.py<|end_file_name|><|fim▁begin|>__author__ = 'had' # The MIT License (MIT) # Copyright (c) [2015] [Houtmann Hadrien] # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the Aidez-moi), to deal # in the Software without ...
.order_by('-created')[:10:1] ticket_incomplete = Tickets.objects.filter(complete=0).count()
<|file_name|>template_url_service_factory.cc<|end_file_name|><|fim▁begin|>// Copyright 2015 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. #include "ios/chrome/browser/search_engines/template_url_service_factory.h" #in...
TemplateURLServiceFactory::GetDefaultFactory() { return base::BindRepeating(&BuildTemplateURLService); }
<|file_name|>nicovideo.js<|end_file_name|><|fim▁begin|>"use strict"; //////////////////////////////////////////////////////////////////////////////// // ニコニコ動画再生 //////////////////////////////////////////////////////////////////////////////// Contents.nicovideo = function( cp ) { var p = $( '#' + cp.id ); var cont =...
//////////////////////////////////////////////////////////// this.start = function() { cont.activity( { color: '#ffffff' } );
<|file_name|>index.js<|end_file_name|><|fim▁begin|>module.exports = require("./mime-functions");<|fim▁hole|><|fim▁end|>
module.exports.contentTypes = require("./content-types");
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|>from exceptions import DropPage, AbortProcess<|fim▁end|>
<|file_name|>vm.rs<|end_file_name|><|fim▁begin|>use crate::{builder, ffi, util, Value}; use std; use std::fmt; use libc; use std::sync::Mutex; /// A Ruby virtual machine. pub struct VM; /// We only want to be able to have one `VM` at a time. static mut VM_EXISTS: bool = false; lazy_static! { static ref ACTIVE_...
VM(String), /// An exception was thrown.
<|file_name|>relappro.js<|end_file_name|><|fim▁begin|>/** * Copyright 2020 The AMP HTML 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://ww...
*/
<|file_name|>whoami.rs<|end_file_name|><|fim▁begin|>use irc::{IrcMsg, server}; use command_mapper::{ RustBotPlugin, CommandMapperDispatch, IrcBotConfigurator, Format, Token, }; const CMD_WHOAMI: Token = Token(0); const CMD_WHEREAMI: Token = Token(1); pub struct WhoAmIPlugin; impl WhoAmIPlugin {...
<|file_name|>terminal.rs<|end_file_name|><|fim▁begin|>#![macro_use] use io::display; use io::pio::*; use core::fmt; use spin::Mutex; pub struct Terminal { writer: display::Writer, color: u8, x: usize, y: usize, } pub static TERM: Mutex<Terminal> = Mutex::new(Terminal { writer: display::Writer { p...
color: display::Color::new(display::Color::White, display::Color::Black),
<|file_name|>cdecl.py<|end_file_name|><|fim▁begin|>#----------------------------------------------------------------- # pycparser: cdecl.py # # Example of the CDECL tool using pycparser. CDECL "explains" C type # declarations in plain English. # # The AST generated by pycparser from the given declaration is traversed #...
if len(sys.argv) > 1: c_decl = sys.argv[1] else:
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>from copy import copy import json from cnxepub.utils import squash_xml_to_text from cnxml.parse import parse_metadata as parse_cnxml_metadata from cnxtransforms import cnxml_abstract_to_html from lxml import etree __all__ = ( 'convert_to_model_compat_metadata', ...
ACTORS_MAPPING_KEYS = ( # (<litezip name>, <cnx-epub name>),
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #-*- coding: utf-8 -*- from django.http import HttpResponse import service.api def api_available(request):<|fim▁hole|> return HttpResponse(service.api.get_proxy()) def hello(request): return HttpResponse("Hello world!")<|fim▁end|>
<|file_name|>test_relu.py<|end_file_name|><|fim▁begin|># Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apach...
dtype=dtype,
<|file_name|>ipam.py<|end_file_name|><|fim▁begin|># Copyright 2015 Metaswitch Networks # # 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 # # U...
address) # Try to assign. Throws exception if already assigned -- let it.
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate rand; use rand::{thread_rng, Rng}; use std::io::stdin; const LOWEST: isize = 1; const HIGHEST: isize = 100; fn main() { let mut rng = thread_rng(); loop { let number: isize = rng.gen_range(LOWEST, HIGHEST + 1); let mut num_guesse...
let mut line = String::new(); let res = stdin().read_line(&mut line); let input: Option<isize> = res.ok().and_then(|_| line.trim().parse().ok());
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import logging from typing import Union, cast import great_expectations.exceptions as ge_exceptions from great_expectations.data_context.store import ( CheckpointStore, ConfigurationStore, StoreBackend, ) from great_expectations.data_context.types.base impo...
def save_config_to_store_backend(
<|file_name|>upload.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2009, 2010 Google Inc. All rights reserved. # Copyright (c) 2009 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following cond...
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Prabhu Gurumurthy <pgurumur@users.noreply.github.com> # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice...
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for Texas LAN Web project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands...
<|file_name|>nullable.js<|end_file_name|><|fim▁begin|>const _ = require('lodash'); const en = { modifiers: require('../../res/en').modifiers }; const Types = require('../../lib/types'); const optional = { optional: true }; const repeatable = { repeatable: true }; const nullableNumber = { type: Types....
description: 'number', modifiers: { nullable: en.modifiers.extended.nullable,
<|file_name|>client.go<|end_file_name|><|fim▁begin|>package hdfs import ( "context" "errors" "io" "io/ioutil" "net" "os" "os/user" "strings" "github.com/colinmarc/hdfs/v2/hadoopconf" hdfs "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_hdfs" "github.com/colinmarc/hdfs/v2/internal/rpc" krb "gopkg.in...
NamenodeDialFunc func(ctx context.Context, network, addr string) (net.Conn, error) // DatanodeDialFunc is used to connect to the datanodes. If nil, then // (&net.Dialer{}).DialContext is used.
<|file_name|>ConfirmDialog.js<|end_file_name|><|fim▁begin|>'use strict'; let {ko, Helper} = require('../common'), DialogManager = require('../DialogManager'), DEFAULT_WIDTH = 530, TEMPLATES = { DEFAULT: 'confirmDialogTpl' }, instance, getInstance = function(confirmCallback, optionalTemp...
instance.setTemplateName(optionalTemplateName); instance.setContextVars(optionalContextVars); instance.settings.modalWidth = (TEMPLATES.REVERT_ENTRY === optionalTemplateName) ? 550 : DEFAULT_WIDTH;
<|file_name|>006_counter_volume_is_float.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright 2013 eNovance SAS <licensing@enovance.com><|fim▁hole|># # 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 c...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate protobuf; extern crate grpc; extern crate futures; extern crate futures_cpupool; pub mod message; pub mod message_grpc; <|fim▁hole|>#[test] fn it_works() {}<|fim▁end|>
<|file_name|>About_author.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- import sys from PyQt4 import QtGui,QtCore from Ui_about_author import Ui_About _IME = "<p>Author: Bojan Ili""&#263;</p>" _FAKULTET = "Faculty of Electrical Engineering, University of Belgrade - ETF" _MAI...
self.ui=Ui_About()
<|file_name|>setup.py<|end_file_name|><|fim▁begin|><|fim▁hole|> def readme(): with open('README.md','r') as fr: return fr.read() setup(name='docker_machinator', version='0.1', description='A tool for managing docker machines from multiple' 'workstations', long_descripti...
from setuptools import setup # Based on # https://python-packaging.readthedocs.io/en/latest/minimal.html
<|file_name|>ScalableLinearLayout.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2015. Vin @ vinexs.com (MIT License) * * 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...
<|file_name|>HiddenPyiImports.py<|end_file_name|><|fim▁begin|>from m1 import <error descr="Cannot find reference 'foo' in 'm1.pyi'">foo</error> from m1 import <error descr="Cannot find reference 'bar' in 'm1.pyi'">bar</error><|fim▁hole|>print(foo, bar, bar_imported, m2, m2_imported)<|fim▁end|>
from m1 import bar_imported from m1 import <error descr="Cannot find reference 'm2' in 'm1.pyi'">m2</error> from m1 import m2_imported
<|file_name|>parserMethodSignature4.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>}<|fim▁end|>
interface I { D?<T>();
<|file_name|>LinearBreadcrumb.java<|end_file_name|><|fim▁begin|>package com.afollestad.breadcrumb; import android.annotation.TargetApi; import android.app.Activity; import android.content.Context; import android.graphics.RectF; import android.graphics.drawable.Drawable; import android.os.Build; import android.support....
} else { ViewCompat.setAlpha(view, alpha); }
<|file_name|>DecoderPro.py<|end_file_name|><|fim▁begin|>import jmri.jmrit.jython.Jynstrument as Jynstrument import jmri.jmrit.catalog.NamedIcon as NamedIcon import jmri.jmrit.symbolicprog.tabbedframe.PaneOpsProgAction as PaneOpsProgAction import javax.swing.JButton as JButton class DecoderPro(Jynstrument): def get...
<|file_name|>DBPoolManager.ts<|end_file_name|><|fim▁begin|>export declare function require(name: string): any let pg = require("pg") import { CannotCreateInstanceError, SqlExecFailError, TableNotFoundError } from "../define/Error" import Table, {Record} from "../model/db/table/Table" import Column from "../model/db/c...
}
<|file_name|>PersistentTable.hh<|end_file_name|><|fim▁begin|>/* * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood * 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 ...
{ public:
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.core.urlresolvers import reverse from django.template import RequestContext, loader from django.views.decorators.csrf import csrf_exempt<|fim▁hole|> def index(req...
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from accounts.models import Profile from django import forms from django.conf import settings from django.contrib.auth.forms import AuthenticationForm, UserCreationForm from django.contrib.auth.models im...
<|file_name|>cam4.py<|end_file_name|><|fim▁begin|>''' Ultimate Whitecream Copyright (C) 2016 mortael 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 3 of the Licens...
utils.addDownLink(name, videourl, 282, img, '', noDownload=True)
<|file_name|>struct_l_p_c___r_t_c___type_def.js<|end_file_name|><|fim▁begin|>var struct_l_p_c___r_t_c___type_def = [ [ "ALDOM", "struct_l_p_c___r_t_c___type_def.html#aae1199a3f1f40f90aba18aee4d6325fd", null ], [ "ALDOW", "struct_l_p_c___r_t_c___type_def.html#a5f56710f005f96878defbdb8ef1333c2", null ], [ "AL...
<|file_name|>testeditor.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Amara, universalsubtitles.org # # Copyright (C) 2013 Participatory Culture Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by...
:param completed: simulate the completed checkbox being set :param save_for_later: simulate the save for later button
<|file_name|>man_pages.rs<|end_file_name|><|fim▁begin|>use crate::types; /// Print the given help if the -h or --help argument are found pub fn check_help(args: &[types::Str], man_page: &'static str) -> bool { for arg in args { if arg == "-h" || arg == "--help" { println!("{}", man_page); ...
// function when combined with the 'end' keyword. Functions can have type // hints, to tell ion to check the type of a functions arguments. An error will // occur if an argument supplied to a function is of the wrong type.
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
pub mod io; pub mod solutions;
<|file_name|>ShapefileLoader.java<|end_file_name|><|fim▁begin|>package lejos.robotics.mapping; import java.io.*; import java.util.ArrayList; import lejos.geom.Line; import lejos.geom.Rectangle; /* * WARNING: THIS CLASS IS SHARED BETWEEN THE classes AND pccomms PROJECTS. * DO NOT EDIT THE VERSION IN pccomms...
<|file_name|>right_margin.py<|end_file_name|><|fim▁begin|>""" Minimal example showing the use of the AutoCompleteMode. """ import logging logging.basicConfig(level=logging.DEBUG) import sys from pyqode.qt import QtWidgets from pyqode.core.api import CodeEdit from pyqode.core.backend import server from pyqode.core.mode...
if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv)
<|file_name|>vote.py<|end_file_name|><|fim▁begin|>""" Controller for voting related requests. """ import webapp2 from models.vote import VoteHandler from models.vote_.cast_ballot import BallotHandler from models.vote_.view_results import ResultsHandler app = webapp2.WSGIApplication([ ('/vote', VoteHandler),<|fim...
<|file_name|>DictController.java<|end_file_name|><|fim▁begin|>package com.siqisoft.stone.admin.dict.controller; import java.util.List; import org.siqisource.stone.dict.model.Dict; import org.siqisource.stone.dict.service.DictService; import org.siqisource.stone.orm.condition.Condition; import org.siqisource.st...
@RequestMapping("/dict/dictDelete.do") @ResponseBody public AjaxResponse delete(String[] codeList, Model model) {
<|file_name|>random_trees.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from optparse import make_option import random import math from django.contrib.gis.geos import Point from treemap.models impo...
action='store',
<|file_name|>scripts.js<|end_file_name|><|fim▁begin|>$(function(){ $('.home .bxslider').bxSlider({ auto: true, mode: 'fade' }); /** * QUICK REFERENCE */ // check if the window bindings should be applied (only if the element is present) var $reference = $('.reference-wrap'); if($reference.length > 0){ ...
if (document.cookie.length > 0) {
<|file_name|>show_rack_rack.py<|end_file_name|><|fim▁begin|># -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2013 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except ...
# You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #
<|file_name|>passthrough.hpp<|end_file_name|><|fim▁begin|>/* * Software License Agreement (BSD License) * * Point Cloud Library (PCL) - www.pointclouds.org * Copyright (c) 2010-2012, Willow Garage, Inc. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modif...
<|file_name|>0163_auto__add_field_userinfo_avatar.py<|end_file_name|><|fim▁begin|># encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'UserInfo.avatar'...
'contenttypes.contenttype': {
<|file_name|>base.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Misc stuff also needed for core imports and monkey patching """ import numpy as np from .core import (RVector3, R3Vector, RMatrix) def isScalar(v, val=None): """Check if v is scalar, i.e. int, float or complex. Optional compare wi...
<|file_name|>rclups0.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python desc="""Report distance matrix between proteins. Dependencies: - Biopython, numpy & scipy """ epilog="""Author: l.p.pryszcz@gmail.com Bratislava, 28/04/2016 """ import os, sys, gzip import numpy as np from datetime import datetime from Bio im...
case {'A'} uA(i)=1;
<|file_name|>swagger-oauth.js<|end_file_name|><|fim▁begin|>var appName; var popupMask; var popupDialog; var clientId; var realm; var redirect_uri; var clientSecret; var scopeSeparator; var additionalQueryStringParams; function handleLogin() { var scopes = []; var auths = window.swaggerUi.api.authSchemes || window...
} } });
<|file_name|>issue46.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright 2010-2021 Google LLC # 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/licens...
def Next(self, solver): for interval in self.__intervals:
<|file_name|>devdiv.js<|end_file_name|><|fim▁begin|>"use strict"; devdiv.directive('devDiv', [function () { return { restrict: 'E', link: function (scope, iElement, iAttrs) {<|fim▁hole|> iElement.addClass("row"); } }; }]) devdiv.controller('NameCtrl', function ($scope, $watch) { });<|fim▁end|>
iElement.addClass("dev-div");
<|file_name|>msgpack_protocol.go<|end_file_name|><|fim▁begin|>package protocol import ( "context" "github.com/coffeehc/logger" "github.com/coffeehc/netx" "github.com/ugorji/go/codec" ) type msgpackProtocol struct { hander *codec.MsgpackHandle interf func() interface{} } //NewMsgpackProcotol cteate a Msgpack P...
func (mp *msgpackProtocol) DecodeDestroy() {}
<|file_name|>Composite.d.ts<|end_file_name|><|fim▁begin|>import Layer from '../layer/Layer'; import { Pixel } from '../pixel';<|fim▁hole|> export default class CompositeMapRenderer extends MapRenderer { constructor(map: PluggableMap); dispatchRenderEvent(type: EventType, frameState: FrameState): void; forEa...
import PluggableMap, { FrameState } from '../PluggableMap'; import EventType from '../render/EventType'; import Source from '../source/Source'; import MapRenderer from './Map';
<|file_name|>dir_2e0ad737c5a35fd799870b9d14d04fcf.js<|end_file_name|><|fim▁begin|>var dir_2e0ad737c5a35fd799870b9d14d04fcf =<|fim▁hole|> [ "main.cpp", "TestOpenGl_2TestOpenGl_2main_8cpp.html", "TestOpenGl_2TestOpenGl_2main_8cpp" ], [ "objloader.cpp", "objloader_8cpp.html", null ], [ "objloader.h", "objloader...
[
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import unittest import logging import logging.config import sys import argparse DESCRIPTION=""" Harness for tests in the cloaca/tests/ directory. Run all tests with '--all' or provide a list dotted names of specific tests (eg. legionary.TestLegi...
if __name__ == '__main__':
<|file_name|>loader.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from asyncore import write import serial import sys import time import strutils from datafile import DataFile __author__ = 'Trol' # Установка: # python -m pip install pyserial def _bytes(i): return divmod(i, 0x100) class Bootloader...
print "Can't connect to bootloader" sys.exit(-1) about = self.dev.get_about()
<|file_name|>declarations.d.ts<|end_file_name|><|fim▁begin|>/* Declaration files are how the Typescript compiler knows about the type information(or shape) of an object. They're what make intellisense work and make Typescript know all about your code. A wildcard module is declared below to allow third party libra...
*/
<|file_name|>store.js<|end_file_name|><|fim▁begin|>import { compose, combineReducers, createStore } from 'redux'; import { devTools } from 'redux-devtools'; import twist from './reducers/twist'; import form from './reducers/form'; const twister = combineReducers({ twist, form });<|fim▁hole|><|fim▁end|>
const finalCreateStore = compose(devTools())(createStore); export default finalCreateStore(twister);
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import family_aux_mass_edit from . import family_associate_to_family_aux<|fim▁hole|>from . import family_aux...
<|file_name|>images.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding: utf-8 import argparse import cmd import os import shlex import sys from tabulate import tabulate import time from talus_client.cmds import TalusCmdBase import talus_client.api import talus_client.errors as errors from talus_client.m...
self.err("You must specify the os") error = True
<|file_name|>footy.py<|end_file_name|><|fim▁begin|>T = input() while(T): T -= 1 buff = [] a,b = [int(i) for i in raw_input().split()] buff.append(b) pt = 0 while(a): a -= 1 c = [i for i in raw_input().split()]<|fim▁hole|> buff.append(c[1]) #pt = len(b...
if len(c)==2: c[1] = int(c[1]) if c[0] == "P":
<|file_name|>packagetools.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # JDownloader/src/jd/controlling/LinkGrabberPackager.java import re from urlparse import urlparse def matchFirst(string, *args): """ matches against list of regexp and returns first match""" for patternlist in args: for p...
if r is not None: name = r.group(1) # remove part and cd pattern
<|file_name|>1_5_migrating_work_u_1212f113f03b.py<|end_file_name|><|fim▁begin|>"""1.5 : Migrating work unity Revision ID: 1212f113f03b Revises: 1f07ae132ac8 Create Date: 2013-01-21 11:53:56.598914 """ # revision identifiers, used by Alembic. revision = '1212f113f03b' down_revision = '1f07ae132ac8' from alembic impo...
DBSESSION().merge(line) def downgrade():
<|file_name|>issue-3556.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...
Partial(String, String, String),
<|file_name|>LatestNoYoYoValidatedPonderationRule.java<|end_file_name|><|fim▁begin|>/** * Premium Markets is an automated stock market analysis system. * It implements a graphical environment for monitoring stock markets technical analysis * major indicators, for portfolio management and historical data charting. *...
* the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. *
<|file_name|>doc.go<|end_file_name|><|fim▁begin|><|fim▁hole|>// +k8s:defaulter-gen=TypeMeta // +k8s:defaulter-gen-input=../../../../../../../../github.com/openshift/api/template/v1 // +groupName=template.openshift.io // Package v1 is the v1 version of the API. package v1<|fim▁end|>
// +k8s:conversion-gen=github.com/openshift/openshift-apiserver/pkg/template/apis/template // +k8s:conversion-gen-external-types=github.com/openshift/api/template/v1
<|file_name|>volunteer.app.js<|end_file_name|><|fim▁begin|>/***************************************************** * Copyright (c) 2014 Colby Brown * * This program is released under the MIT license. * * For more information about the MIT license, * * visit http://opensource.org/licens...
<|file_name|>js_kJRR2EPkdTyr2CIdeTvE1Z1h-ltSkNI_HTuwHAsTNDE.js<|end_file_name|><|fim▁begin|>(function($) { Drupal.wysiwyg.editor.init.ckeditor = function(settings) { window.CKEDITOR_BASEPATH = settings.global.editorBasePath + '/'; CKEDITOR.basePath = window.CKEDITOR_BASEPATH; // Drupal.wysiwyg.editor['initialized...
<|file_name|>typescript.rs<|end_file_name|><|fim▁begin|>// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::common; use diem_types::transaction::{ArgumentABI, ScriptABI, TypeArgumentABI}; use move_core_types::language_storage::TypeTag; use serde_generate::{ indent::{Indent...
<|file_name|>test_fd.py<|end_file_name|><|fim▁begin|>import facedetect import cv2 def test_fd(): image = cv2.imread('abba.jpg') print image.shape<|fim▁hole|> print FD.features if __name__ == '__main__': test_fd()<|fim▁end|>
FD = facedetect.FeatureDetect(image) FD.detectEyes() FD.detectFace()
<|file_name|>karma.conf.js<|end_file_name|><|fim▁begin|>// Karma configuration // Generated on Wed Feb 17 2016 10:45:47 GMT+0100 (CET) <|fim▁hole|> // base path that will be used to resolve all patterns (eg. files, exclude) basePath: './', // frameworks to use // available frameworks: ht...
module.exports = function(config) { config.set({
<|file_name|>places_item.js<|end_file_name|><|fim▁begin|>/** * Created by lee on 10/13/17. */ import React, { Component } from 'react'; export default class PlacesItem extends Component { constructor(props) { super(props); this.config = this.config.bind(this); this.rateStars = this.rat...
<|file_name|>malwebsites.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python import subprocess import sys, threading, Queue import os import string from time import gmtime, strftime import urllib2 import urllib import re, time import urlparse import os.path import logging #from google import search import scan imp...
file1.close()
<|file_name|>debug_events_monitors_test.py<|end_file_name|><|fim▁begin|># Copyright 2020 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 # # h...
execution = debug_events_reader.Execution(
<|file_name|>content_view.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright 2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABI...
<|file_name|>notify.py<|end_file_name|><|fim▁begin|>"""Support for Matrix notifications.""" import voluptuous as vol from homeassistant.components.notify import ( ATTR_DATA, ATTR_MESSAGE, ATTR_TARGET, PLATFORM_SCHEMA, BaseNotificationService, ) import homeassistant.helpers.config_validation as cv<|...
<|file_name|>event-debug.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 2.5.0 */ /** * The CustomEvent class lets you define events for your application * that can be subscribed to by one...
n.doScroll('left'); clearInterval(EU._dri);
<|file_name|>frames.rs<|end_file_name|><|fim▁begin|>/* Copyright (C) 2017-2021 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free * Software Foundation. * * This program is distributed in...
#[repr(C)]
<|file_name|>examples-curves-surfaces.py<|end_file_name|><|fim▁begin|># Name: Examples for using conditioning number finders for curves and surfaces # Description: Contains some examples with descriptions of how to use the functions # Created: 2016-08-18 # Author: Janis Lazovskis # Navigate to the conditioning directo...
# This will raise an error because the curve is not smooth cnumsurface(x)
<|file_name|>PrairieDraw.js<|end_file_name|><|fim▁begin|>define(['sylvester', 'sha1', 'PrairieGeom'], function (Sylvester, Sha1, PrairieGeom) { var $V = Sylvester.Vector.create; var Vector = Sylvester.Vector; var Matrix = Sylvester.Matrix; /**********************************************************************...
); inc = inc + spacing;