prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
__author__ = 'Steven Brien'
__email__ = 'sbrien@hlkagency.com'<|fim▁hole|><|fim▁end|> | __version__ = '0.1.0' |
<|file_name|>country_codes.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
SFDC_COUNTRIES = {
'af': 'Afghanistan',
'ax': 'Aland Islands',
'al': 'Albania',
'dz': 'Algeria',
'as': 'American Samoa',
'ad': 'Andorra',
'ao': 'Angola',
'ai': 'Anguilla',
'aq': 'Antarctica',
'ag': 'Antigua and Barbu... | 'ge': 'Georgia',
'de': 'Germany', |
<|file_name|>post-processor_test.go<|end_file_name|><|fim▁begin|>package vagrant
import (
"github.com/mitchellh/packer/packer"
"testing"
)
func testConfig() map[string]interface{} {
return map[string]interface{}{}
}
func TestPostProcessor_ImplementsPostProcessor(t *testing.T) {
var raw interface{}
raw = &PostPr... | } |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|># All Rights Reserved.
#
# 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 the Free Software Foundation, either version 3 of the License, or
... | # -*- coding:utf-8 -*-
#
#
# Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. |
<|file_name|>SHA1_Data.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... | |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>import csv
import time
from datetime import timedelta
from django.shortcuts import render, redirect
from django.http import Http404, HttpResponse, HttpResponseForbidden, JsonResponse
from django.conf import settings
from django.core.exceptions import ValidationError
f... |
if request.method == "POST": |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod log;
mod peer;
mod state_machine;
mod state_file;
use capnp;
use rand;
use raft_capnp::{append_entries, append_entries_reply,
request_vote, request_vote_reply,
client_request, entry};
use capnp::message;
use capnp::serialize_packed;
... | |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>struct Foo<'a> {
x: &'a i32,
}
impl<'a> Foo<'a> {
fn x(&self) -> &'a i32 { self.x }
}
fn main() {<|fim▁hole|> println!("{}", f.x());
// static lifetime
let x: &'static str = "Hello";
{
let x: &'static str = "Hello, World!";
}
... | let y = &5;
let f = Foo { x: y };
println!("{}", f.x); |
<|file_name|>crew.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Gang } from '../models/gang';
import { Session } from '../models/session';
import { CREW_2_ROUTE } from '../../app/app.routes.model';
import { HttpClient } from '@... | this.crewTwo = this.getCrew('assassins2');
}
return this.crewTwo;
} |
<|file_name|>test_class_2_find_the_torsional_angle.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# https://www.hackerrank.com/challenges/class-2-find-the-torsional-angle
import io
import math
import sys
import unittest
class Vector:
def __init__(self, x, y, z):
self.x = x
self.y = y
... | def torsional_angle(a, b, c, d):
ab = a.subtract(b)
bc = b.subtract(c) |
<|file_name|>benchmark.py<|end_file_name|><|fim▁begin|>"""
A script for testing / benchmarking HMM Implementations
"""
import argparse
import collections
import logging
import time
import hmmlearn.hmm
import numpy as np
import sklearn.base
LOG = logging.getLogger(__file__)
class Benchmark:
def __init__(self,... | [0, .5]],
[[0.5, 0],
[0, 0.5]], |
<|file_name|>packet.rs<|end_file_name|><|fim▁begin|>use serde::{de,Serialize,Serializer,Deserialize,Deserializer};
#[derive(Copy,Clone,Debug,Eq,PartialEq)]
pub struct ProtocolId;
impl Serialize for ProtocolId{
#[inline]
fn serialize<S>(&self,serializer: &mut S) -> Result<(),S::Error>
where S: Serializer
{
seria... | |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | export {LoadingPane} from './LoadingPane' |
<|file_name|>resource_aws_nat_gateway_test.go<|end_file_name|><|fim▁begin|>package aws
import (
"fmt"
"log"
"strings"
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
"github.co... | }
return nil |
<|file_name|>subprocess_py27.py<|end_file_name|><|fim▁begin|># This file is part of the Python 2.7 module subprocess.py, included here
# for compatibility with Python 2.6.
#
# It is still under the original, very open PSF license, see the original
# copyright message included below.
#
# subprocess - Subprocesses with a... | # Licensed to PSF under a Contributor Agreement.
# See http://www.python.org/2.4/license for licensing details. |
<|file_name|>client_cli.go<|end_file_name|><|fim▁begin|>package codegen
import (
"fmt"
"path/filepath"
"goa.design/goa/v3/codegen"
"goa.design/goa/v3/codegen/cli"
"goa.design/goa/v3/expr"
)
// commandData wraps the common CommandData and adds HTTP-specific fields.
type commandData struct {
*cli.CommandData
//... | Subcommands []*subcommandData
// NeedStream if true initializes the websocket dialer.
NeedStream bool |
<|file_name|>Function.cpp<|end_file_name|><|fim▁begin|>#include "Function.h"
#include "Entry.h"
namespace instance {
auto Function::lookupParameter(NameView name) const -> OptParameterView {
auto r = parameterScope[name];
<|fim▁hole|> return &r.frontValue().get(meta::type<Parameter>);
}
} // namesp... | if (!r.single()) return {};
|
<|file_name|>test_exhibits.py<|end_file_name|><|fim▁begin|>import os
import unittest
from mock import patch, Mock
from tests.utils import (
FakedCache,
ObjectWithSignals,
setup_test_env,
)
setup_test_env()
from softwarecenter.db.database import StoreDatabase
from softwarecenter.ui.gtk3.views import lobb... | |
<|file_name|>HelloWorld.js<|end_file_name|><|fim▁begin|>function Greeter(person) {<|fim▁hole|>}
var RandomGuy = "Random Dude";
alert(Greeter(RandomGuy));
//# sourceMappingURL=HelloWorld.js.map<|fim▁end|> | return "Hello, " + person; |
<|file_name|>idmrpt2_t1_amps.cc<|end_file_name|><|fim▁begin|>/*
* @BEGIN LICENSE
*
* Psi4: an open-source quantum chemistry software package
*
* Copyright (c) 2007-2019 The Psi4 Developers.
*
* The copyrights for code used from other parties are included in
* the corresponding files.
*
* This file is part of ... | * - \sum_{M} t_M^A(\mu) \mathcal{F}_{MI}(\mu)
* + \sum_{uv} t_{uI}^{vA}(\mu) \mathcal{F}_{uv}(\mu)
* + \sum_{UV} t_{IU}^{AV}(\mu) \mathcal{F}_{UV}(\mu) |
<|file_name|>streaming.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
/***************************************************************************
Client for streaming based WPS.
It exploits asynchronous capabilities of WPS and QGIS for visualizing
intermediate results from a WPS
... | # Check if there is redirection |
<|file_name|>PostgreSQL95ArrayDialect.java<|end_file_name|><|fim▁begin|>package com.vladmihalcea.book.hpjp.hibernate.type.array;
import org.hibernate.dialect.PostgreSQL95Dialect;
import java.sql.Types;
<|fim▁hole|> */
public class PostgreSQL95ArrayDialect extends PostgreSQL95Dialect {
public PostgreSQL95ArrayDia... | /**
* @author Vlad Mihalcea |
<|file_name|>ejercicio6.py<|end_file_name|><|fim▁begin|>#Calculen el área de un rectángulo (alineado con los ejes x e y) dadas sus coordenadas x1,x2,y1,y2.
from math import pi
print 'Ejercicio 6'
print '-'*60
x1 = float(raw_input('Introduce x1: '))
x2 = float(raw_input('Introduce x2: '))
y1 = float(raw_input('Introdu... | |
<|file_name|>port_status_update.py<|end_file_name|><|fim▁begin|># Copyright (c) 2017 OpenStack Foundation
# 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
#
# ... | from neutron_lib import worker
from oslo_log import log |
<|file_name|>rest-api.service.ts<|end_file_name|><|fim▁begin|>import * as angular from 'angular';<|fim▁hole|>export class RestApiService {
static $inject: string[] = ['$http', 'sessionService'];
constructor(private $http: angular.IHttpService, private sessionService: SessionService) { }
get<T>(url: string, data?... |
import { SessionService } from '../session.service';
|
<|file_name|>Other.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1<|fim▁hole|><|fim▁end|> | oid sha256:2dedd72ad88f001dd7d65d94d327a0ea91999927a59d328fa4a7628fbb4c81f3
size 4281 |
<|file_name|>bitcoin_id_ID.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="id_ID" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About XDE2</source>
<translation>Tentang XDE2</... | <translation type="unfinished"/> |
<|file_name|>file.py<|end_file_name|><|fim▁begin|>from collections import namedtuple
import fcntl
import os
import shutil
from pcs.common.tools import format_os_error
# TODO add logging (logger / debug reports ?) to the RawFile class; be aware
# the class is used both in pcs.cli and pcs.lib packages
FileMetadata = n... | ACTION_CHOWN = "chown" |
<|file_name|>FCSBModCreativeTab.java<|end_file_name|><|fim▁begin|>package Yogibear617.mods.FuturisticCraft.CreativeTabs;
<|fim▁hole|>import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
public class FCSBModCreativeTab extends CreativeTabs {
public ... | import cpw.mods.fml.relauncher.Side; |
<|file_name|>channel-permissions.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export const COMMUNITY_CHANNEL_PERMISSIONS_ACTION_POSTING = 'posting';
export class CommunityChannelPermissions {
allPermissions = false;
noPermissions = false;
perms?: Record<string, boolean>;
constructor(input: any) {
if (!input) {
... | |
<|file_name|>test_multinic.py<|end_file_name|><|fim▁begin|># Copyright 2011 OpenStack Foundation
# 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
#
# ht... |
body = dict(remove_fixed_ip=dict()) |
<|file_name|>api-actions.js<|end_file_name|><|fim▁begin|>/**
* @overview
* API handler action creator
* Takes a key-value -pair representing the event to handle as key and its respective
* handler function as the value.<|fim▁hole|> *
* Event-to-URL mapping is done in {@link ApiEventPaths}.
*
* @since 0.2.0
... | |
<|file_name|>14.codec.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env mocha -R spec
var assert = require("assert");
var msgpackJS = "../index";
var isBrowser = ("undefined" !== typeof window);
var msgpack = isBrowser && window.msgpack || require(msgpackJS);
var TITLE = __filename.replace(/^.*\//, "");
var HAS_UINT8ARR... | it("createCodec()", function() {
var codec = msgpack.createCodec(); |
<|file_name|>DesktopSessionLauncher.cpp<|end_file_name|><|fim▁begin|>/*
* DesktopSessionLauncher.cpp
*
* Copyright (C) 2009-11 by RStudio, Inc.
*
* This program is licensed to you under the terms of version 3 of the
* GNU Affero General Public License. This program is distributed WITHOUT
* ANY EXPRESS OR IMPLIED... | namespace desktop { |
<|file_name|>Plot.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | #Scripts to plot the data, currently only in the context of Q&A communites. |
<|file_name|>addLists.py<|end_file_name|><|fim▁begin|>class ListNode:
def __init__(self, x):
self.val = x
self.next = None
def display(self):
node = self
while node is not None:
print(node.val, end="->")<|fim▁hole|> print()
"""
class SLinkedList:
def __in... | node = node.next |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod n64;<|fim▁hole|>mod memory_map;
mod interface;
mod cpu;
pub use self::n64::N64;<|fim▁end|> | mod bus; |
<|file_name|>ProcessResource.test.ts<|end_file_name|><|fim▁begin|>import {ActuatorRestService} from '../../../src/service/ActuatorRestService';
import {EndPointService} from '../../../src/service/EndPointService';
const request = require('supertest');
import {expect} from 'chai';
import {MetricsConstants, ProcessEndPo... |
});
}); |
<|file_name|>keyvaultInfrastructure.ts<|end_file_name|><|fim▁begin|>import * as CommonUtilities from "./common-utilities";
import * as data from "./data";
import * as IInfrastructure from "./IInfrastructure";
import KeyVault from "./keyvault";
import PromiseGate from "./promiseGate";
import * as Resource from "./resour... | }
public async hydrate(resourcesInEnvironment: Resource.Resource[], |
<|file_name|>messages.rs<|end_file_name|><|fim▁begin|>// This file is generated. Do not edit
// @generated
// https://github.com/Manishearth/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy)]
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(non_camel_case_types... | let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}; |
<|file_name|>effects.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/. */
//! Generic types for CSS values related to effects.
use std... | |
<|file_name|>core.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# 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 required by... | response = self.app.get(url + "&confirmed=true") |
<|file_name|>filter.py<|end_file_name|><|fim▁begin|>from ctypes import Structure, c_int16, c_uint16
<|fim▁hole|> _fields_ = [("categoryBits", c_uint16),
("maskBits", c_uint16),
("groupIndex", c_int16)]
def __init__(self, categoryBits=0x1, maskBits=0xFFFF, grou... |
class Filter(Structure):
""" Represents a Fixture filter """
|
<|file_name|>test_base.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
from __future__ import unicode_literals<|fim▁hole|>from django.test import TestCase
from django.test.client import Client
from webhook.base import WebhookBase
class TestIntegration(TestCase):
def setUp(self):
"... |
import json
|
<|file_name|>MenuExecutor.java<|end_file_name|><|fim▁begin|>package com.catglo.dashplaygroundfree;
import java.util.LinkedList;
import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graph... | import android.view.SurfaceView;
import android.view.View;
|
<|file_name|>jquery.nivo.slider.js<|end_file_name|><|fim▁begin|>/*
* jQuery Nivo Slider v2.3
* http://nivo.dev7studios.com
*
* Copyright 2010, Gilbert Pellegrom
* Free to use and abuse under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* May 2010 - Pick random effect from spe... | slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
|
<|file_name|>trackTimeOnSite.js<|end_file_name|><|fim▁begin|>import { bind, unbind } from '@segmentstream/utils/eventListener'
import listenEvents from './listenEvents'
import Storage from '../Storage'
const timeout = 10 // 10 seconds
let interval = null
let hasActive = false
let events = []
const storagePrefix = 'tim... | })
}
const incActiveTime = () => { |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# tritonschedule documentation build configuration file, created by
# sphinx-quickstart on Wed Jun 22 11:40:06 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not a... | |
<|file_name|>0005_auto__add_action.py<|end_file_name|><|fim▁begin|># -*- coding: 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 model 'Action'
db.create_table('... | |
<|file_name|>quic_crypto_framer_parse_message_fuzzer.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 <stddef.h>
#include <stdint.h>
#include "base/strings/strin... | // Entry point for LibFuzzer.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
<|file_name|>test_zbeacon.py<|end_file_name|><|fim▁begin|>import unittest
import zmq
import struct
import uuid
import socket
from pyre.zactor import ZActor
from pyre.zbeacon import ZBeacon
class ZBeaconTest(unittest.TestCase):
def setUp(self, *args, **kwargs):
ctx = zmq.Context()
ctx = zmq.Con... |
def test_recv_beacon1(self):
self.node1.send_unicode("PUBLISH", zmq.SNDMORE) |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use gl;
use gl::types::*;
use glutin;
use glutin::GlContext;
use game_state;
use game_state::state::SceneGraph;
use game_state::winit;
use game_state::Renderer;
use game_state::input;
use std::sync::{Arc, Mutex};
use game_state::thing::CameraFacet;
use game_state::I... |
use std::collections::VecDeque; |
<|file_name|>syscoin_hu.ts<|end_file_name|><|fim▁begin|><TS language="hu" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>A cím vagy címke szerkeszteséhez kattintson a jobb gombbal</translation>
</message>
... | </context>
<context>
<name>AskPassphraseDialog</name>
<message> |
<|file_name|>triListOpt.cpp<|end_file_name|><|fim▁begin|>//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "... | }
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------ |
<|file_name|>codegen.rs<|end_file_name|><|fim▁begin|>//! Various helpers for code-generation.
use std::io;
#[cfg(feature = "pattern_class")] use std::cmp;
use std::char;
use std::iter;
use std::usize;
#[cfg(all(test, feature = "pattern_class"))]
use std::iter::FromIterator;
#[cfg(feature = "pattern_class")]
use super... | Ok(i) |
<|file_name|>BaseServerFlags.java<|end_file_name|><|fim▁begin|>// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you ... | |
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|># coding=utf-8
<|fim▁hole|>from tagsplorer import tp
tp.Main().parse_and_run()<|fim▁end|> | ''' tagsPlorer package entry point (C) 2021-2021 Arne Bachmann https://github.com/ArneBachmann/tagsplorer '''
|
<|file_name|>sevenzip.py<|end_file_name|><|fim▁begin|>import re
from versions.software.utils import get_command_stdout, get_soup, \
get_text_between<|fim▁hole|>
def name():
"""Return the precise name for the software."""
return '7-Zip'
def installed_version():
"""Return the installed version of 7-Zi... | |
<|file_name|>widget_list.cpp<|end_file_name|><|fim▁begin|>/******************************************************************************
* Wormux is a convivial mass murder game.
* Copyright (C) 2001-2007 Wormux Team.
*
* This program is free software; you can redistribute it and/or modify
* it under the term... | keyboard_selection = NULL;
}
lastMousePosition = mousePosition;
} |
<|file_name|>morphology.py<|end_file_name|><|fim▁begin|>import numpy as np
import scipy.interpolate as interp
import warnings
from astropy.io import fits
def concentration(radii, phot, eta_radius=0.2, eta_radius_factor=1.5, interp_kind='linear', add_zero=False):
"""
Calculates the concentration parameter
C... | |
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import sys
def row_matrix_to_col_matrix(row_matrix):
col_matrix = []
for c in range(len(row_matrix)): col_matrix.append([])
for r in range(len(row_matrix)):
for c in range(len(row_matrix)):
col_matrix[c].append(row_matrix[r][c])
ret... | row_matrix = [] |
<|file_name|>microphone-outline.js<|end_file_name|><|fim▁begin|>import React from 'react'
import Icon from 'react-icon-base'
const TiMicrophoneOutline = props => (
<Icon viewBox="0 0 40 40" {...props}>
<g><path d="m20 26.7c-3.7 0-6.7-3-6.7-6.7v-10c0-3.7 3-6.7 6.7-6.7s6.7 3 6.7 6.7v10c0 3.7-3 6.7-6.7 6.7z m... | </Icon>
)
|
<|file_name|>siema.py<|end_file_name|><|fim▁begin|># Flask modules
from flask import (
Blueprint,
render_template,
redirect,
url_for,<|fim▁hole|> flash,
current_app,
g,
)
# FLask Login
from flask_login import (
current_user,
)
# WTForms
from flask_wtf import Form
from wtforms import (
... | request, |
<|file_name|>pulsar.py<|end_file_name|><|fim▁begin|>"""
Basic pulsar-related functions and statistics.
"""
import functools
from collections.abc import Iterable
import warnings
from scipy.optimize import minimize, basinhopping
import numpy as np
import matplotlib.pyplot as plt
from .fftfit import fftfit as taylor_fft... | if g1 > stop_time:
# If the end of the fold is inside a gti, end there
g1 = stop_time
length = g1 - g0 |
<|file_name|>plot_holoviews.py<|end_file_name|><|fim▁begin|># Use holoviews to plot the particle distribution at given time
from pathlib import Path
import numpy as np
import xarray as xr
import holoviews as hv
from postladim import ParticleFile
hv.extension("bokeh")
# --- Settings ---
tstep = 40 # Time step to sh... |
pf = ParticleFile(particle_file)
X, Y = pf.position(tstep)
|
<|file_name|>icon_content.py<|end_file_name|><|fim▁begin|>'''
Created on August 19, 2013
@package: livedesk-sync
@copyright: 2013 Sourcefabric o.p.s.
@license: http://www.gnu.org/licenses/gpl-3.0.txt
@author: Martin Saturka
Content for icons of collaborators of chained blogs.
'''
import socket
import logging
from ur... | ''' |
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Copyright 2015, Foxugly. All rights reserved.
#
# 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
# the Free Software Foundation, either versi... |
def confirm_remove(request, patient_id, slot_id): |
<|file_name|>task_5_6.py<|end_file_name|><|fim▁begin|># Задача 5. Вариант 6.
# Напишите программу, которая бы при запуске случайным образом отображала название одного из двух спутников Марса.<|fim▁hole|>print("\nназвание одного из двух спутников Марса:")
import random
satellite=["Фобос", "Деймос"]
s=random.choice(sate... |
# Velyan A. S.
# 27.05.2016 |
<|file_name|>borrowck-loan-rcvr-overloaded-op.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... |
q.x += 1;
} |
<|file_name|>errors.rs<|end_file_name|><|fim▁begin|>use next_swc::{
disallow_re_export_all_in_page::disallow_re_export_all_in_page, next_dynamic::next_dynamic,
};
use std::path::PathBuf;
use swc_common::FileName;
use swc_ecma_transforms_testing::test_fixture_allowing_error;
use swc_ecmascript::parser::{EsConfig, Sy... | let output = input.parent().unwrap().join("output.js");
test_fixture_allowing_error( |
<|file_name|>lint-qualification.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.<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT ... | //
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or |
<|file_name|>_wizard.js<|end_file_name|><|fim▁begin|>var f = require('fs');
var _ = require('underscore');
var r = {};
var cr = require('../config.json').resources;
var k = require('../config.json').plugins;
var b = require('../config.json').APIVARS.PLUGINS;
var n = __dirname.replace('/autoform', b.DIR);
var w = ['toke... | if(f.existsSync(p)){
t = f.readdirSync(p);
t = _.map(t, c); |
<|file_name|>RadioButton-test.js<|end_file_name|><|fim▁begin|>import React from 'react';
import RadioButton from '../RadioButton';
import { mount } from 'enzyme';
const render = (props) => mount(
<RadioButton
{...props}
className="extra-class"
name="test-name"
value="test-value"
/>
);
describe('Ra... | expect(input.props().defaultChecked).toEqual(true); |
<|file_name|>tempdirtest.py<|end_file_name|><|fim▁begin|># -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright 2002 Ben Escoto <ben@emerose.org>
# Copyright 2007 Kenneth Loafman <kenneth@loafman.com>
#
# This file is part of duplicity.
#
# Duplicity is free software; you can redistribute it and/or modi... | |
<|file_name|>plotsServices.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import datetime as dt
import numpy as np
import matplotlib.pyplot as plt
#import matplotlib.dates as mdates
#import matplotlib.cbook as cbook
#from matplotlib import pyplot as plt
from matplotlib.dates import date2num
from statsmodels.d... | ax1.set_title('Management Services Frequency')
xTickMarks1 = [str(i) for i in types1]
ax1.set_xticks(ind1 + width) |
<|file_name|>ratesbean.java<|end_file_name|><|fim▁begin|>/*
* The MIT License
*
* Copyright 2014 Sebastian Russ <citeaux at https://github.com/citeaux/JAHAP>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to... | public ratesbean(){ |
<|file_name|>ChapterListSearchDocumentListener.java<|end_file_name|><|fim▁begin|>package de.andreasgiemza.mangadownloader.gui.chapter;
import de.andreasgiemza.mangadownloader.MangaDownloader;
import de.andreasgiemza.mangadownloader.helpers.RegexHelper;
import javax.swing.JTable;
import javax.swing.JTextField;
im... | |
<|file_name|>admin_form_part.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__... | template_name="shoop/admin/discount_pricing/form_part.jinja",
required=False,
kwargs={"product": self.object} |
<|file_name|>environment.js<|end_file_name|><|fim▁begin|>exports.platform = function () {
switch(process.platform){
case 'win32':<|fim▁hole|> break;
case 'linux':
case 'mac':
dep=process.platform;
}
return 'node-' + dep;
};<|fim▁end|> | dep='win'; |
<|file_name|>core.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013-2016 Jeffrey Pfau
#
# 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/.
from ._pylib import ffi, lib
f... | self._core.runFrame(self._core) |
<|file_name|>bootstrap-affix.js<|end_file_name|><|fim▁begin|>/* ==========================================================
* bootstrap-affix.js v2.2.2
* http://twitter.github.com/bootstrap/javascript.html#affix
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* License... | , data = $spy.data()
data.offset = data.offset || {} |
<|file_name|>installation.js<|end_file_name|><|fim▁begin|>import { installation as ActionTypes, extension as ExtensionActionTypes } from "constants/actionTypes";
import { InstallationService } from "services";
const installationActions = {
parsePackage(file, callback, errorCallback) {
return (dispatch) => {... | PackageType,
FileName
}
}); |
<|file_name|>IDashboardFolderFactory.java<|end_file_name|><|fim▁begin|>package com.cognizant.cognizantits.qcconnection.qcupdation;
import com4j.DISPID;<|fim▁hole|>public abstract interface IDashboardFolderFactory
extends IBaseFactoryEx
{
@DISPID(9)
@VTID(17)
public abstract IList getChildPagesWithPrivateItems(... | import com4j.IID;
import com4j.VTID;
@IID("{B739B750-BFE1-43AF-8DD7-E8E8EFBBED7D}") |
<|file_name|>bitmap.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os
from collections import namedtuple
from copy import copy
Colour = namedtuple('Colour', 'r,g,b')
Colour.copy = lambda self: copy(self)
black = Colour(0, 0, 0)<|fim▁hole|>white = Colour(255, 255, 255) # Colour ranges are not enforc... | |
<|file_name|>babylon.convolutionPostProcess.ts<|end_file_name|><|fim▁begin|>module BABYLON {
export class ConvolutionPostProcess extends PostProcess{
constructor(name: string, public kernel: number[], options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?:... | } |
<|file_name|>test_rule_001.py<|end_file_name|><|fim▁begin|>import os
import unittest
from vsg.rules import package
from vsg import vhdlFile
from vsg.tests import utils
sTestDir = os.path.dirname(__file__)
lFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_001_test_input.vhd'))
dIndentMap = util... | |
<|file_name|>idol_bkup.py<|end_file_name|><|fim▁begin|>#Idol Mech Logic
__author__="jim"
__date__ ="$Dec 22, 2010 3:01:06 PM$"
import procgame
import locale
import logging
from procgame import *
base_path = config.value_for_key_path('base_path')
game_path = base_path+"games/indyjones/"
speech_path = game_path +"spee... | def sw_wheelPosition2_active(self, sw):
if self.game.switches.wheelPosition1.is_inactive() and self.game.switches.wheelPosition3.is_active():
self.position =1 |
<|file_name|>cnos_factory.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
#
# Copyright (C) 2017 Lenovo, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or mo... | password = module.params['password']
enablePassword = module.params['enablePassword']
cliCommand = "save erase \n"
outputfile = module.params['outputfile'] |
<|file_name|>default_test.js<|end_file_name|><|fim▁begin|><|fim▁hole|> browser.get("build/docs/examples/example-example60/index.html");
});
it('should check ng-bind', function() {
var nameInput = element(by.model('name'));
expect(element(by.binding('name')).getText()).toBe('Whirled');
nameInput.cl... | describe("", function() {
var rootEl;
beforeEach(function() {
rootEl = browser.rootEl;
|
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>module.exports = {
entry: {
'public/js/bundle.js': ['./index.js'],
},
output: {
filename: '[name]',
},
devtool: 'eval',
module: {
loaders: [
{
test: /.js$/,
exclude: /node_modules/,
loaders: ['babel'],<|fim... | }
]
}
} |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Combined renderers
pub mod conrod;
<|fim▁hole|><|fim▁end|> | pub mod sprites; |
<|file_name|>memory_logger.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from tempfile import TemporaryFile, SpooledTemporaryFile
import os, sys, re, socket, time, pickle, csv, uuid, subprocess, argparse, decimal, select, platform
class LLDB:
def __init__(self):
self.debugger = lldb.SBDebugger.Create()
... | if platform.platform(0, 1).split('-')[:-1][0].find('Darwin') != -1:
try:
import lldb |
<|file_name|>button-toggle.js<|end_file_name|><|fim▁begin|>var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typ... | |
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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.... | return None
def _update_src_manifest(self, data, src_dir): |
<|file_name|>errors.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 Jonas mg
// See the 'AUTHORS' file at the top-level directory for a full list of authors.
//
// 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 c... | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
AsciiError::ControlChar(pos) => write!(f, "{} at position {}", self.description(), pos), |
<|file_name|>configurations.py<|end_file_name|><|fim▁begin|># This file is part of JST.
#
# JST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ... | TEMPROARY_REGISTER_SET = mr.T_REGISTERS |
<|file_name|>store_module.ts<|end_file_name|><|fim▁begin|>import {NgModule} from '@angular/core';
import {StoreModule} from '@ngrx/store';
import {commonDataStoreReducer} from 'org_xprof/frontend/app/store/common_data_store/reducers';
import {COMMON_DATA_STORE_KEY} from 'org_xprof/frontend/app/store/common_data_store/s... | StoreModule.forFeature(TENSORFLOW_STATS_STORE_KEY, tensorFlowStatsReducer),
StoreModule.forRoot({}), |
<|file_name|>user_command.js<|end_file_name|><|fim▁begin|>// Generated by CoffeeScript 1.4.0
(function() {
"use strict";
var UserCommand, exports, _ref,
__slice = [].slice;
var exports = (_ref = window.chat) != null ? _ref : window.chat = {};
/*
* Represents a user command, like /kick or /say.
*/
... | |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate atkin;
use atkin::sieve::SieveOfAtkin;
fn main() {
let args: Vec<String> = std::env::args().collect();
if args.len() < 2 {
println!("An argument for the sieve limit is required.");
return;
}
let n: u64 = match args[1].... | for prime in &sieve.get_results() {
print!("{}\t", prime);
}
println!(); |
<|file_name|>base.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*-
"""
Django settings for login project.
"""
from django.core.urlresolvers import reverse_lazy
DEBUG = True
TESTING = False
SESSION_COOKIE_SECURE = False
CSRF_COOKIE_SECURE = False
# We use the 'SITE_NAME' for the name of the database and the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.