prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>AlienContainer.java<|end_file_name|><|fim▁begin|>/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package consolealiensgame;
import alieninterfaces.*;
import java.lang.re... |
this.alien = a;
} |
<|file_name|>DeleteManager.java<|end_file_name|><|fim▁begin|>/**
* Licensed to Apereo under one or more contributor license
* agreements. See the NOTICE file distributed with this work
* for additional information regarding copyright ownership.
* Apereo licenses this file to you under the Apache License,
* Version... | * This method is solely for convenience so that we don't have to keep
* calling UserLayoutStoreFactory and casting the resulting class.
*/
private static IUserLayoutStore getDLS() |
<|file_name|>pypowerscout.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# from http://homepage.hispeed.ch/py430/python/daemon.py
###########################################################################
# configure these paths:
LOGFILE = '/var/log/powerscout.log'
PIDFILE = '/var/run/po... | #print "Daemon PID %d" % pid
open(PIDFILE,'w').write("%d"%pid) |
<|file_name|>NullValueProvider.java<|end_file_name|><|fim▁begin|>package com.fasterxml.jackson.databind.deser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.util.AccessPattern;
/**
* Helper interface imp... | |
<|file_name|>l-calc_fr_CA.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="fr_CA">
<context>
<name>mainUI</name>
<message>
<location filename="../mainUI.ui" line="14"/>
<location filename="../mainUI.cpp" line="53"/>
<source>... | <source>Logarithm %1</source>
<translation type="unfinished"></translation>
</message> |
<|file_name|>lv.js<|end_file_name|><|fim▁begin|>(function() {
// numeral.js locale configuration
// locale : Latvian (lv)
// author : Lauris Bukšis-Haberkorns : https://github.com/Lafriks
return {
delimiters: {
thousands: String.fromCharCode(160),
decimal: ','
},... | }; |
<|file_name|>issue-4020.rs<|end_file_name|><|fim▁begin|>// rustfmt-wrap_comments: true
/** foobar */
const foo1: u32 = 0;
/**
* foobar
*/<|fim▁hole|><|fim▁end|> | const foo2: u32 = 0; |
<|file_name|>task_01.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Contains expectations."""
import inquisition
<|fim▁hole|>print FISHY<|fim▁end|> | FISHY = inquisition.SPANISH
FISHY = FISHY.replace('surprise', 'haddock')
|
<|file_name|>AuthError.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2015 Apptik Project<|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 copy of the License at
*
* http://www.apache.or... | * Copyright (C) 2014 Kalin Maldzhanski
* Copyright (C) 2011 The Android Open Source Project |
<|file_name|>reminders.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from utils import *
commands = [
'^remindme',
'^reminder',
'^remind$',
'^r '
]
parameters = (
('delay', True),
('message', True),
)
description = 'Set a reminder for yourself. First argument is delay... | for id, reminder in reminders.items():
|
<|file_name|>test_models.py<|end_file_name|><|fim▁begin|>import os
from tsc.models import *
<|fim▁hole|> Schedule(1, datetime.datetime(2015, 11, 1, 22, 00), ScheduleStatus.reservable),
Schedule(1, datetime.datetime(2015, 11, 1, 23, 00), ScheduleStatus.reservable),
]
new = [
Schedule(1, ... | def test_get_new_reservable_schedules():
old = [ |
<|file_name|>font_context.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 font::UsedFontStyle;
use platform::font::FontHandle;... | |
<|file_name|>pxl_sprite.py<|end_file_name|><|fim▁begin|>from pxl_object import PxlObject<|fim▁hole|>from pxl_vector import PxlVector
class PxlSprite(PxlObject):
def __init__(self, size, position):
pass<|fim▁end|> | |
<|file_name|>calendarHelper.js<|end_file_name|><|fim▁begin|>'use strict';
angular
.module('reflect.calendar')
.factory('calendarHelper', function(moment, calendarConfig) {
function eventIsInPeriod(eventStart, eventEnd, periodStart, periodEnd) {
eventStart = moment(eventStart);
eventEnd = moment(e... | event.height = moment(event.endsAt).diff(diffStart, 'minutes') * hourHeightMultiplier;
}
|
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#######################################################################
#
# VidCutter - media cutter & joiner
#
# copyright © 2018 Pete Alexandrou
#
# This program is free software: you can redistribute it and/or modif... | % qApp.applicationName().lower()),
maxBytes=1000000, backupCount=1),
self.consoleLogger]
if self.parser.isSet(self.debug_option) or self.verboseLogs: |
<|file_name|>Client.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 Ap... | bookStore.addBook(new Book("Camel User Guide", 123L)); |
<|file_name|>apps.py<|end_file_name|><|fim▁begin|>from importlib import import_module
from django.apps import AppConfig as BaseAppConfig
<|fim▁hole|>
name = "portal"
def ready(self):
import_module("portal.receivers")<|fim▁end|> |
class AppConfig(BaseAppConfig): |
<|file_name|>f8.cc<|end_file_name|><|fim▁begin|>#include "intfile.hh"
dcmplx Pf8(const double x[], double es[], double esx[], double em[], double lambda, double lrs[], double bi) {
double x0=x[0];
double x1=x[1];
double x2=x[2];
dcmplx y[149];
dcmplx FOUT;
dcmplx MYI(0.,1.);
y[1]=1./bi;
y[2]=em[0];
y[3]=x0*x0;
y[4]=em... | y[119]=x0*x1*y[11]*y[22]*y[25]*y[46]*y[55]*y[56]*y[69];
y[120]=-(lambda*MYI*x1*y[11]*y[20]*y[46]*y[94]);
y[121]=y[119]+y[120]; |
<|file_name|>test_registro.py<|end_file_name|><|fim▁begin|>import unittest
from unittest import skip
from decimal import Decimal
from cnab240 import errors
from cnab240.bancos import itau
from tests.data import get_itau_data_from_file
class TestRegistro(unittest.TestCase):
def setUp(self):
itau_data = ... | self.assertEqual(self.header_arquivo.controle_banco, 5)
|
<|file_name|>main.go<|end_file_name|><|fim▁begin|>// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// godoc: Go Documentation Server
// Web server tree:
//
// http://godoc/ main landing page
// http://godoc/... | // HTTP server mode.
var handler http.Handler = http.DefaultServeMux
if *verbose { |
<|file_name|>ForEachCommandTest.java<|end_file_name|><|fim▁begin|><|fim▁hole|>package xcordion.impl.command;
import junit.framework.TestCase;
import junit.framework.Assert;
import org.junit.Test;
import org.junit.Ignore;
public class ForEachCommandTest {
@Test
@Ignore
public void testPlaceholder() {
... | |
<|file_name|>bitcoin_th_TH.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="th_TH">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Gridcoin</source><|fim▁hole|> ... | <translation type="unfinished"></translation>
</message>
<message> |
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "labs_django.settings")<|fim▁hole|> from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)<|fim... | |
<|file_name|>RadioButtonAssertTest.java<|end_file_name|><|fim▁begin|>package info.novatec.testit.webtester.support.assertj;
import static info.novatec.testit.webtester.support.assertj.WebTesterAssertions.assertThat;
import static org.mockito.Mockito.doReturn;
import org.junit.Before;
import org.junit.Test;
import org... | |
<|file_name|>gradients.py<|end_file_name|><|fim▁begin|>from sys import *
from pdflib_py import *
p = PDF_new()
PDF_open_file(p, "gradients.pdf")
PDF_set_parameter(p, "usercoordinates", "true")
PDF_set_value(p, "compress", 0)
PDF_set_info(p, "Author", "pdflib")
PDF_set_info(p, "Creator", "pdflib_py")
PDF_set_info(p... | pattern = PDF_shading_pattern(p,shading,"")
PDF_setcolor(p, "fill", "pattern", pattern,0,0,0) |
<|file_name|>map.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/. */
#![forbid(unsafe_code)]
use fxhash::FxHashMap;
use malloc_size_... | |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate clap;
extern crate colored;
extern crate lockchain_core as lockchain;
extern crate question;
extern crate rpassword;
extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate toml;
// #[macro_use]
// extern crate human_panic;
mod cli;
mod ... | .to_str() |
<|file_name|>macros.rs<|end_file_name|><|fim▁begin|>/// Define a trait as usual, and a macro that can be used to instantiate
/// implementations of it.
///
/// There *must* be section markers in the trait definition:
/// @section type for associated types
/// @section self for methods
/// @section nodelegate for arbitr... | fn $method_name:ident(self $(: $self_selftype:ty)* $(,$marg:ident : $marg_ty:ty)*) $(-> $mret:ty)?;
)+
)*
// Arbitrary tail that is ignored when forwarding. |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from loading import load_plugins, register_plugin<|fim▁hole|>__author__ = 'Matti Gruener'
__email__ = 'matti@mistermatti.com'
__version__ = '0.1.5'
__ALL__ = [load_plugins, register_plugin, StandardPluginType, PluginTypeBase]<|fim▁end|> | from plugz import PluginTypeBase
from plugintypes import StandardPluginType
|
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/* ================================================================
* startserver by xdf(xudafeng[at]126.com)
*<|fim▁hole|> *
* ================================================================
* Copyright 2013 xdf
*
* Licensed under the MIT License
* You may not... | * first created at : Mon Jun 02 2014 20:15:51 GMT+0800 (CST) |
<|file_name|>AppearanceSettingsWizard.java<|end_file_name|><|fim▁begin|>package org.multibit.hd.ui.views.wizards.appearance_settings;
<|fim▁hole|>import com.google.common.base.Optional;
import org.multibit.hd.ui.views.wizards.AbstractWizard;
import org.multibit.hd.ui.views.wizards.AbstractWizardPanelView;
import java.... | |
<|file_name|>admin.dev.js<|end_file_name|><|fim▁begin|>(function( $ ) {
/**
* Activity reply object for the activity index screen
*
* @since 1.6
*/
var activityReply = {
/**
* Attach event handler functions to the relevant elements.
*
* @since 1.6
*/
init : function() {
$(document).on( 'click', '.row-... | // Grab the nonce
var reply = {};
reply['_ajax_nonce-bp-activity-admin-reply'] = $( '#bp-activities-container input[name="_ajax_nonce-bp-activity-admin-reply"]' ).val();
|
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>use std::io::ErrorKind;
use std::net::Ipv4Addr;
use std::net::TcpStream;
use spaceapi_server::api;
use spaceapi_server::{SpaceapiServer, SpaceapiServerBuilder};
/// Create a new status object containing test data.
fn get_status() -> api::Status {
api::StatusBuilder... | .build() |
<|file_name|>VP8Decoder.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2017 The WebRTC 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 in the root of the source
* tree. An additional intellectual property rights ... | |
<|file_name|>maskSpec.js<|end_file_name|><|fim▁begin|>xdescribe('uiMask', function () {
var inputHtml = "<input ui-mask=\"'(9)9'\" ng-model='x'>";
var $compile, $rootScope, element;
beforeEach(module('ui.directives'));
beforeEach(inject(function (_$rootScope_, _$compile_) {
$rootScope = _$rootScope_;
$... | });
it('should wipe out ui on invalid model value', function () { |
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>import re
from django.conf import settings
from rest_framework import exceptions, serializers
from olympia import amo
from olympia.accounts.serializers import BaseUserSerializer
from olympia.amo.templatetags.jinja_helpers import absolutify
from olympia.amo.url... | # 99% of the cases there will only be one result, since most
# language packs are automatically uploaded for a given app |
<|file_name|>IGMScript.d.ts<|end_file_name|><|fim▁begin|>import IGMResource from "./IGMResource";
import GMSubscript from "./GMSubscript";
export default interface IGMScript extends IGMResource {
/**
* The file location of the GML file
*/
readonly filepath: string;
<|fim▁hole|> subScripts(gmlText: string)... |
/**
* Returns an iterator with each SubScript in this script
*/
|
<|file_name|>dst-coerce-rc.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/l... | let b: Rc<Baz> = a.clone();
assert_eq!(b.get(), 42);
let _c = b.clone(); |
<|file_name|>game070.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import classes.level_controller as lc
import classes.game_driver as gd
import classes.extras as ex
import classes.board
import random
import pygame
class Board(gd.BoardGame):
def __init__(self, mainloop, speaker, config, screen_w, scre... | elif event.type == pygame.KEYDOWN and event.key == pygame.K_DOWN: |
<|file_name|>zz_read_gen.go<|end_file_name|><|fim▁begin|>// Copyright 2017-2021 The Usacloud Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licen... | |
<|file_name|>App.js<|end_file_name|><|fim▁begin|>'use strict';
const {Application} = require('backbone.marionette');
const Geppetto = require('backbone.geppetto');
const debug = require( 'debug' )( 'dpac:app', '[Context]' );
const eventLog = require( 'debug' )( 'dpac:core.events', '\u2709' );
const app = module.export... | event ){
eventLog( eventName );
} );
|
<|file_name|>RemoteSceneActionTest.cpp<|end_file_name|><|fim▁begin|>//******************************************************************
//
// Copyright 2016 Samsung Electronics All Rights Reserved.
//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
//
// Licensed under the Apache License, Version 2.... | &RemoteSceneActionTest::onRemoteSceneCollectionCreated, this,
placeholders::_1, placeholders::_2));
waitForCallback(); |
<|file_name|>config.py<|end_file_name|><|fim▁begin|># Config.py file for motion-track.py
# Display Settings<|fim▁hole|>diff_window_on = False # Show OpenCV image difference window
thresh_window_on = False # Show OpenCV image Threshold window
SHOW_CIRCLE = True # show a circle otherwise show bounding rectancle on wi... | debug = True # Set to False for no data display
window_on = False # Set to True displays opencv windows (GUI desktop reqd) |
<|file_name|>PragmaticClassifier.java<|end_file_name|><|fim▁begin|>package classifiers;
import java.io.File;
import java.io.PrintWriter;
import Utils.Utilities;
import stats.Statistics;
import tablInEx.Table;
import weka.classifiers.misc.InputMappedClassifier;
import weka.core.Attribute;
import weka.core.De... | Instances Instances = new Instances("Rel", fvWekaAttributes, 0);
|
<|file_name|>benefit-owner.js<|end_file_name|><|fim▁begin|>const UrlPathValidator = require('../../../services/validators/url-path-validator')
const referenceIdHelper = require('../../helpers/reference-id-helper')
const BenefitOwner = require('../../../services/domain/benefit-owner')
const ValidationError = require('..... |
router.post('/apply/:claimType/new-eligibility/benefit-owner', function (req, res, next) {
UrlPathValidator(req.params)
const isValidSession = SessionHandler.validateSession(req.session, req.url) |
<|file_name|>PluggableTaskBL.java<|end_file_name|><|fim▁begin|>/*
* JBILLING CONFIDENTIAL
* _____________________
*
* [2003] - [2012] Enterprise jBilling Software Ltd.
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Enterprise jBilling Software.
*... | // loop through the descriptions of parameters
|
<|file_name|>sequence_queueing_state_saver.py<|end_file_name|><|fim▁begin|># Copyright 2016 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
#
# ... | input_key: A string scalar `Tensor`, the **unique** key for the given |
<|file_name|>getaddons.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'designer/getaddons.ui'
#
# Created: Fri Aug 22 00:57:31 2014
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore,... | def retranslateUi(self, Dialog):
Dialog.setWindowTitle(_("Install Add-on")) |
<|file_name|>organization.actions.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core';
import { Store } from '@ngrx/store';
import { type } from '../../utils';
import { createAction } from '../create-action';
import { AppState } from '../../models';
@Injectable()
export class OrganizationAction... |
static FETCH = type('[Organization] Fetch'); |
<|file_name|>capabilities.cpp<|end_file_name|><|fim▁begin|>#include "wrapper_common.h"
#include "cblas.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*
Capability is supported if >0
Actual number can be increased over time to indicate
extensions/revisions (that do not break compatibility)
*/
D... | }
|
<|file_name|>as_string_op.cc<|end_file_name|><|fim▁begin|>/* Copyright 2016 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/li... | |
<|file_name|>OpenGL.cpp<|end_file_name|><|fim▁begin|>#ifndef NO_OGL
//OpenGL library
#pragma comment( lib, "OpenGL32" )
// MFC
#include "stdafx.h"
//GUI
#include "MainWnd.h"
#include "FullscreenSettings.h"
// Internals
#include "../System.h"
#include "../gba/GBA.h"
#include "../gba/Globals.h"
#include "../Util.h"
#... | }
//main render func |
<|file_name|>parser.rs<|end_file_name|><|fim▁begin|>use std::str;
use std::io::prelude::*;
use std::fs::File;
use std::str::from_utf8;
use nom::*;
use error::*;
named!(string_between_quotes, delimited!(char!('\"'), is_not!("\""), char!('\"')));
named!(get_cell, take_while!(is_not_cell_end));
named!(consume_useless_c... | )
} |
<|file_name|>common.js<|end_file_name|><|fim▁begin|>( function( exports ) {
/**
* @class
* @param params
* @constructor
*/
function BulkLoader( params ) {
this.params = params;
this._ids = [];
this.results = {};
this._objects = []; // GC対策
... | }
|
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>//!
//! Edgequest Season 2
//!
//! Edgequest is a roguelike that probably won't ever be finished due to the scope
//! of things I want to be in the game, but so far it's a pretty great tech demo of
//! interesting modern roguelike mechanics.
//!
//! The overarching d... | |
<|file_name|>lib.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/. */<|fim▁hole|>mod time;<|fim▁end|> |
#![cfg(test)]
|
<|file_name|>l10n_ro_intrastat.py<|end_file_name|><|fim▁begin|># © 2008-2020 Dorin Hongu <dhongu(@)gmail(.)com
# See README.rst file on addons root folder for license details
from odoo import fields, models
class IntrastatTransaction(models.Model):
_name = "l10n_ro_intrastat.transaction"
_description = "Int... | _sql_constraints = [
("l10n_ro_intrastat_trcodeunique", "UNIQUE (code)", "Code must be unique."),
] |
<|file_name|>member.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from frappe.model.document import Document
from frappe.contacts.address_and_contact ... | |
<|file_name|>ReflectDataMapper.java<|end_file_name|><|fim▁begin|>package io.github.notsyncing.lightfur.integration.jdbc;
import io.github.notsyncing.lightfur.annotations.entity.Column;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.sql.ResultSet;
import java.sql.SQLException;
import ja... | .forEach(f -> {
f.setAccessible(true); |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>__author__ = 'mpetyx'
from django.db import models
from OPENiapp.APIS.Context.models import OpeniContextAwareModel
class OpeniCard(OpeniContextAwareModel):<|fim▁hole|> object_type = models.TextField()
service = models.TextField()
From = models.TextField... | # id is missing because it is the default
url = models.TextField() |
<|file_name|>mem_map.rs<|end_file_name|><|fim▁begin|>const BOOT_ROM_START: u16 = 0x0000;
const BOOT_ROM_END: u16 = 0x00FF;
const CART_ROM_START: u16 = 0x0000;
const CART_ROM_END: u16 = 0x7FFF;
const CART_ENTRY_POINT: u16 = 0x0100;
const CART_HEADER_START: u16 = 0x0100;
const CART_HEADER_END: u16 = 0x014F;
const CART... | 0x01 => "64KByte (4 banks)",
0x02 => "128KByte (8 banks)",
0x03 => "256KByte (16 banks)", |
<|file_name|>main.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, include, url
from django.contrib import admin
import urls
from apps.blog import views
<|fim▁hole|>
# url(r'^admin/', include(admin.site.urls)),
url(r'^$', views.Index.as_view(), name='index'),
url(r'^signup', views.Sign... | urlpatterns = patterns('',
# Examples:
# url(r'^$', 'gigsblog.views.home', name='home'),
# url(r'^blog/', include('blog.urls')), |
<|file_name|>packages.py<|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/.
WINDOWS_MSVC = {
"cmake": "3.7.2",
"llvm": "6.0.0",
"m... | "ninja": "1.7.1",
"openssl": "1.1.0e-vs2015", |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import chimera.auth as auth
from chimera.auth import User
from flask import Blueprint, abort, redirect, render_template, request, flash, json, url_for
module = Blueprint('users', __name__, template_folder='templates')
def make_json(data, status=200, headers={}):
... | @auth.permission_required('users:delete')
def delete(id):
return "delete "+id |
<|file_name|>yasp_util.py<|end_file_name|><|fim▁begin|>import ConfigParser
import json
def get_player_id():
config = ConfigParser.ConfigParser()<|fim▁hole|> config = ConfigParser.ConfigParser()
config.read('yasp.cfg')
return config.get('yasp', 'hero_id')
def get_hero_data():
file = open("heroes.json")
data... | config.read('yasp.cfg')
return config.get('yasp', 'player_id')
def get_hero_id(): |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import CCDroplet
import CC_params<|fim▁hole|>import LiquidVaporEq<|fim▁end|> | import CC_out |
<|file_name|>TransitionImpl.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2012 International Business Machines Corp.
*
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. Licensed under the Apache License,
* Version 2.0 (the "License"); you may not use ... | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ |
<|file_name|>Question.js<|end_file_name|><|fim▁begin|>import { connect } from 'react-redux';
import get from 'lodash.get';
import { QuestionView } from '../../components/Questions';
import { openEditQuestionForm, deleteQuestion } from '../../actions';
const mapStateToProps = (state, ownProps) => {
const { isAdmin, ... | export { Question }; |
<|file_name|>index-page.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// 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/LICENSE-2.0> or the MIT license
// <LICENSE-MIT ... | // Copyright 2018 The Rust Project Developers. See the COPYRIGHT |
<|file_name|>pit.rs<|end_file_name|><|fim▁begin|>//! Programmable Interval Timer
//! Generates interrupts
prelude!();<|fim▁hole|>use ::ioports::*;
use ::interrupts::pic;
static mut COMMAND_PORT: IOPort<(), u8> = IOPort::new(0x43);
static mut DATA_PORT: IOPort<(), u8> = IOPort::new(0x40);
pub unsafe fn start_periodic... | |
<|file_name|>fake_sync_manager.cc<|end_file_name|><|fim▁begin|>// 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.
#include "sync/internal_api/public/test/fake_sync_manager.h"
#include <cstddef>
#incl... | }
UserShare* FakeSyncManager::GetUserShare() {
return test_user_share_.user_share(); |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
use common::SourceLocationKey;
use fixture_tests::Fixture;
use graphql_ir::{buil... | use graphql_syntax::parse_executable;
use relay_codegen::{print_fragment, print_operation, JsModuleFormat};
use relay_config::ProjectConfig;
use relay_test_schema::TEST_SCHEMA; |
<|file_name|>outputview.py<|end_file_name|><|fim▁begin|>"""
"""
import traceback
from AnyQt.QtWidgets import QWidget, QPlainTextEdit, QVBoxLayout, QSizePolicy
from AnyQt.QtGui import QTextCursor, QTextCharFormat, QFont
from AnyQt.QtCore import Qt, QObject, QCoreApplication, QThread, QSize
from AnyQt.QtCore import pyqt... | def flush(self):
self.flushed.emit()
|
<|file_name|>configuration.rs<|end_file_name|><|fim▁begin|>//! Konfiguration Datei Managment
//!
use errors::*;
use std::fs::File;
use std::path::Path;
use std::io::Read;
pub struct Configuration;
impl Configuration {
/// Liest die Konfiguration
///
/// # Return values
///
/// Diese Funktion lief... | Path::new("xMZ-Mod-Touch.json"),
];
|
<|file_name|>test_split_modulestore.py<|end_file_name|><|fim▁begin|>'''
Created on Mar 25, 2013
@author: dmitchell
'''
import datetime
import subprocess
import unittest
import uuid
from importlib import import_module
from xblock.fields import Scope
from xmodule.course_module import CourseDescriptor
from xmodule.modul... | Course CRUD operation tests
'''
def test_get_courses(self): |
<|file_name|>template.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# pylint: disable-msg=W0104,E0602,W0613,R0201
"""
Abstract classes and utilities for template engines
"""
from hyde._compat import with_metaclass
from hyde.exceptions import HydeException
import abc
from commando.util import getLoggerWithNu... |
@abc.abstractproperty |
<|file_name|>discriminant_value-wrapper.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... |
enum ADT { |
<|file_name|>lst.go<|end_file_name|><|fim▁begin|>package main<|fim▁hole|>import "fmt"
func main() {
slice_1 := make([]float64, 0)
fmt.Println("Slice 1: ", slice_1)
fmt.Println("Len: ", len(slice_1))
slice_1 = append(slice_1, 10)
fmt.Println("Slice 1: ", slice_1)
fmt.Println("Len: ", len(slice_1... | |
<|file_name|>result.rs<|end_file_name|><|fim▁begin|>use std::{
convert::Infallible,
iter::FromIterator,
ops::{ControlFlow, FromResidual, Try},
};
use super::value::Value;
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum DiscoverResult<T = Value> {
Value(T),
Panic(Value),
DependsOnParamete... | } |
<|file_name|>DoctorConst.java<|end_file_name|><|fim▁begin|>package com.ts.util.doctor;
import java.util.HashMap;
import java.util.Map;
public class DoctorConst {
public static Map<String,String> rstypeMap = new HashMap<String,String>();
static{
rstypeMap.put("diaginfo","禁");
rstypeMap.put("dosage","法"... | rstypeColorMap.put("iv_effect","btn-grey");
rstypeColorMap.put("side","btn-danger");
rstypeColorMap.put("administrator","btn-info");
|
<|file_name|>mod.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/. */
//! Specified values.
//!
//! TODO(emilio): Enhance docs.
use Na... | |
<|file_name|>sidebar-filter.tsx<|end_file_name|><|fim▁begin|>import { autoBindMethodsForReact } from 'class-autobind-decorator';
import { HotKeyRegistry } from 'insomnia-common';
import React, { PureComponent } from 'react';
import { AUTOBIND_CFG, DEBOUNCE_MILLIS, SortOrder } from '../../../common/constants';
import {... | onChange={this._handleOnChange}
/>
{filter && ( |
<|file_name|>ping.js<|end_file_name|><|fim▁begin|>/**
* The main purpose of this in my mind is for navigation
* this way when this route is entered either via direct url
* or by a link-to etc you send a ping so that nav can be updated
* in the hierarchy.
*
* curious about feedback. I have used something similar ... | * without tightly coupling things together or at least that is my |
<|file_name|>ffi.rs<|end_file_name|><|fim▁begin|>// The MIT License (MIT)
//
// Copyright (c) 2016 Vladislav Nikonov
//
// 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,... | extern "C" { |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | pub mod common; |
<|file_name|>nmap_scanner.py<|end_file_name|><|fim▁begin|># region Description
"""
nmap_scanner.py: Scan local network with NMAP
Author: Vladimir Ivanov
License: MIT
Copyright 2020, Raw-packet Project
"""
# endregion
# region Import
from raw_packet.Utils.base import Base
import xml.etree.ElementTree as ET
import subpr... | exit_on_failure: bool = True,
quiet: bool = False) -> Union[None, List[NamedTuple]]: |
<|file_name|>py_bridge.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
Bridges calls made inside of a Python environment to the Cmd2 host app
while maintaining a reasonable degree of isolation between the two.
"""
import sys
from contextlib import (
redirect_stderr,
redirect_stdout,
)
from typing import (
... | |
<|file_name|>help.rs<|end_file_name|><|fim▁begin|>use super::{cd, ls, echo};
pub fn exec(args: Vec<String>) {
if args.len() > 0 {
match args[0].as_ref() {
"cd" => cd::help(),
"ls" => ls::help(),<|fim▁hole|> }
} else {
println!("
I wrote this program to learn Ru... | "echo" => echo::help(),
_ => println!("Command not found") |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
<|fim▁hole|><|fim▁end|> | (r'^profiles/', include('easy_profiles.urls')),
(r'^admin/', include(admin.site.urls)),
) |
<|file_name|>test_setup_wizard.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
from django.core.urlresolvers import reverse
from django.core.cache import cache
from sentry.testutils import PermissionTestCase
from sentry.api.endpoints.setup_wizard import SETUP_WIZARD_CACHE_KEY
class SetupWizard(PermissionTestCase):
... | from __future__ import absolute_import |
<|file_name|>test.rs<|end_file_name|><|fim▁begin|>mod common;
use common::init_logger;
use serde::Deserialize;
use serde_xml_rs::{from_str, Deserializer};
#[derive(Debug, Deserialize, PartialEq)]
struct Item {
name: String,
source: String,
}
#[test]
fn simple_struct_from_attributes() {
init_logger();
... |
init_logger();
let in_xml = r#" |
<|file_name|>firefox_history.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the Mozilla Firefox history database plugin."""
import collections
import unittest
from plaso.lib import definitions
from plaso.parsers.sqlite_plugins import firefox_history
from tests.parsers.sql... | expected_event_values = {
'data_type': 'firefox:places:page_visited',
'date_time': '2011-07-01 11:16:21.371935',
'host': 'news.google.com', |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | # Unit3 - Lessons 3 and 4 folder |
<|file_name|>NamedNodeMap.js<|end_file_name|><|fim▁begin|>/**
* Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in ... | }
function add(_this, node, old) { |
<|file_name|>sys.go<|end_file_name|><|fim▁begin|>// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build darwin || dragonfly || freebsd || netbsd || openbsd
// +build darwin dragonfly freebsd netbsd openbs... | |
<|file_name|>IEffectOtherBlur.java<|end_file_name|><|fim▁begin|>package photoeffect.effect.otherblur;
import java.awt.image.BufferedImage;
import measure.generic.IGenericWorkload;<|fim▁hole|>
}<|fim▁end|> |
public interface IEffectOtherBlur extends IGenericWorkload<BufferedImage>
{ |
<|file_name|>closing-spawned-feed.rs<|end_file_name|><|fim▁begin|>use futures::{StreamExt, TryStreamExt};
use futures_timer::Delay;
use log::error;
use reql::r;
use serde_json::Value;
use std::time::Duration;
// We are using `tokio` here as an example but you can use this crate
// with any runtime
#[tokio::main]
async... | |
<|file_name|>math.rs<|end_file_name|><|fim▁begin|>use libc::c_ulong;
use mpfr_sys::*;
use {BigFloat, grnd};
pub trait Math {
type Output;
fn sqr(self) -> Self::Output;
fn sqrt(self) -> Self::Output;
fn sqrt_rec(self) -> Self::Output;
fn cbrt(self) -> Self::Output;
fn root(self, k: u32) -> Se... | $(
fn $meth(mut self, $($p: $t),*) -> BigFloat { |
<|file_name|>http_auth_manager_unittest.cc<|end_file_name|><|fim▁begin|>// 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.
#include <memory>
#include <utility>
#include <vector>
#include "base/feature... | ASCIIToUTF16("1234")))
.Times(filling_enabled); |
<|file_name|>smbios.js<|end_file_name|><|fim▁begin|>/*
Copyright 2018 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requir... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.