prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>panaz_test.go<|end_file_name|><|fim▁begin|>package sc
import (
"testing"
)
func TestPanAz(t *testing.T) {
defName := "PanAzTest"<|fim▁hole|> Bus: C(0),
Channels: A(PanAz{
NumChans: 2,
In: DC{In: C(1)}.Rate(AR),
Pos: A(Line{
Start: C(0),
End: C(0.5),
Dur: C(0.1)... |
// Out.ar(0, PanAz.ar(2, DC.ar(1), Line.ar(0, 1/2, 0.1)));
compareAndWriteStructure(t, defName, NewSynthdef(defName, func(p Params) Ugen {
return Out{ |
<|file_name|>submit_v2.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import lib_v2 as lib
import sys
import os
def main(argv=None):<|fim▁hole|> Run from the working dir of the job which must contain (in addition
to the job files) a file named scheduler.conf with scheduler properties for the job.
... | """
Usage is:
submit.py [--account <chargecode>] [--url <url>] -- <commandline> |
<|file_name|>config.js<|end_file_name|><|fim▁begin|>/* eslint-env node*/
var gutil = require('gulp-util')
var paths = {
layouts: {
componentsDir: './app/components/**/*.jade',
src: './app/views/**/*.jade',
dest: './app/public/assets/html/'
},
styles: {
componentsDir: './app/lib/styl... | dest: './app/public/assets/js/'
}
}
|
<|file_name|>ClassLoaderHelper.java<|end_file_name|><|fim▁begin|>package de.newsarea.homecockpit.connector.facade.registration.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import j... | import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List; |
<|file_name|>MenuWindowManager.java<|end_file_name|><|fim▁begin|>package org.jfl2.fx.controller.menu;
import javafx.application.Platform;
import javafx.event.Event;
import javafx.scene.Node;
import javafx.scene.control.RadioButton;
import javafx.scene.input.KeyEvent;
import javafx.scene.input.MouseEvent;
import lombok... | /**
* 選択中のアイテムIndex
*/
private int selected = -1; |
<|file_name|>scheduled.py<|end_file_name|><|fim▁begin|>import json<|fim▁hole|>
import boto3
import hashlib
import jsonpatch
from dart.context.locator import injectable
from dart.model.trigger import TriggerType, TriggerState
from dart.message.call import TriggerCall
from dart.trigger.base import TriggerProcessor, exec... | import logging |
<|file_name|>zone_thousand_needles.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2008-2017 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of ... | }
void JustSummoned(Creature* summoned) override
{ |
<|file_name|>test_affine_channel_op.py<|end_file_name|><|fim▁begin|># Copyright (c) 2018 PaddlePaddle 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... | |
<|file_name|>dfvWindow.tsx<|end_file_name|><|fim▁begin|>import * as React from './dfvReact'
import { dfvFront } from "./dfvFront";
export interface PopWindowPara {
/**
* 是否不覆盖全屏
*/
notCover?: boolean;
/**
* 是否显示红色背景的错误提示框
*/
isErr?: boolean;
/**
* 自动关闭时间,为0则不自动关闭
*/
... | } |
<|file_name|>dapp_id.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity 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 ve... | // You should have received a copy of the GNU General Public License |
<|file_name|>1-2.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import random
import sys
class DayLife:
"""Life in a day."""
def __init__(self, date, life):
"""Set birth datetime and life."""
self.birthdate = date
self.life = life
... | |
<|file_name|>base.py<|end_file_name|><|fim▁begin|>"""
Application level configuration and logging
"""
import os
import global_settings
import sys
from logging.config import dictConfig
from importlib import import_module
import logging
log = logging.getLogger(__name__)
class Settings(object):
"""
Configuratio... | """
settings_module = None |
<|file_name|>formula_debugger.cpp<|end_file_name|><|fim▁begin|>/*
Copyright (C) 2009 - 2015 by Yurii Chernyi <terraninfo@terraninfo.net>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General ... | |
<|file_name|>sqlpoolrecommendedsensitivitylabels.go<|end_file_name|><|fim▁begin|>package synapse
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
//... | |
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, Open Source Business Applications
# Copyright (c) 2015 Odoo S.A. <http://openerp.com>
#
# This program is free software: you can redistribu... | @api.one
def send_to_shipper(self):
res = self.carrier_id.send_shipping(self)[0] |
<|file_name|>handler_proxy.go<|end_file_name|><|fim▁begin|>/*
Copyright 2016 The Kubernetes 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/licenses/LICENSE-2.0
... |
// WithContext creates a shallow clone of the request with the new context. |
<|file_name|>v32.rs<|end_file_name|><|fim▁begin|>//! Internal 32-bit wide vector types
use crate::masks::*;
impl_simd_array!([i8; 4]: i8x4 | i8, i8, i8, i8);<|fim▁hole|>impl_simd_array!([i16; 2]: i16x2 | i16, i16);
impl_simd_array!([u16; 2]: u16x2 | u16, u16);
impl_simd_array!([m16; 2]: m16x2 | i16, i16);<|fim▁end|> | impl_simd_array!([u8; 4]: u8x4 | u8, u8, u8, u8);
impl_simd_array!([m8; 4]: m8x4 | i8, i8, i8, i8);
|
<|file_name|>ddea_cli.py<|end_file_name|><|fim▁begin|>#!/adsc/DDEA_PROTO/bin/python<|fim▁hole|>import traceback
import sys
if __name__ == '__main__':
try:
if 3 <= len(sys.argv):
###urls = open(sys.argv[1]).readlines()
start_time = sys.argv[1]
end_time = sys.argv[2]
... |
from df_data_analysis_ddea import ddea_analysis
from datetime import datetime |
<|file_name|>alias_map.go<|end_file_name|><|fim▁begin|>package changelog
import (
"fmt"
"sort"
"strings"
)
// SectionAliasMap is for associating commit prefixes to a section of the
// changelog
type SectionAliasMap map[string][]string
// NewSectionAliasMap returns the default map
func NewSectionAliasMap() Section... | |
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import sys
import os
<|fim▁hole|> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)<|fim▁end|> | if __name__ == "__main__": |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>pub fn it_works() {<|fim▁hole|>}<|fim▁end|> | println!("This is from lib.rs."); |
<|file_name|>aluminum_testcell.py<|end_file_name|><|fim▁begin|>import numpy as np
import sys
import os
import time
from ase import Atom, Atoms
from ase.visualize import view
from ase.units import Bohr
from ase.structure import bulk
from gpaw import GPAW
from gpaw.atom.basis import BasisMaker
from gpaw.response.df impor... | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod sign;
use world::block::Block;
use shared::Position;
use ecs;
pub fn add_systems(m: &mut ecs::Manager) {
sign::add_systems(m);
}
pub enum BlockEntityType {
Sign
}
impl BlockEntityType {
pub fn get_block_entity(bl: Block) -> Option<BlockEntityType>... | } |
<|file_name|>test_conversions.py<|end_file_name|><|fim▁begin|>import json
import pymarc
from siskin.conversions import (de_listify, imslp_xml_to_marc, osf_to_intermediate)
def test_imslp_xml_to_marc():
example = """<?xml version="1.0"?>
<document docID="imslpvalsskramstadhans">
<localClass localClassN... | "href": "https://api.osf.io/v2/preprints/egcsk/requests/",
"meta": {} |
<|file_name|>client.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Client module for connecting to and interacting with SmartyStreets API
"""
import json
import numbers
import requests
from .data import Address, AddressCollection
from .exceptions import SmartyStreetsError, ERROR_CO... | :return: function f |
<|file_name|>utils.ts<|end_file_name|><|fim▁begin|>import { parse, Url, URL } from 'url';
import { RequestOptions } from 'http';
import { HttpsAgent } from './https-agent';
import { WithUrl } from './request';
import * as zlib from 'zlib';
const socks = require('socks-wrapper');
export function rewrite(url: string): ... | value: string | number
) {
const keyLower = key.toLowerCase();
const header: Header = [key, value]; |
<|file_name|>_font.py<|end_file_name|><|fim▁begin|>from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scatterternary.hoverlabel"
_path_str = "scatter... | |
<|file_name|>chksumtree.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
import sys
import pickle
import os
import hashlib
import pprint
import time
from optparse import OptionParser
VERSION=1.0
def parseOptions():
usage = """
%prog [options]\n
Scrub a given directory by calculating th... | for file in files:
# chomp the full path
if file in [".DS_Store", self.datfile[len(self.path):]]: |
<|file_name|>member-templates.cpp<|end_file_name|><|fim▁begin|>// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
// CHECK: ; ModuleID
struct A {
template<typename T>
A(T);
};
template<typename T> A::A(T) {}
struct B {
template<typename T>
B(T);
};
template<typename T> B::B(T... | // CHECK: define void @_ZN1BC1IiEET_(%struct.B* %this, i32) |
<|file_name|>test_cli.py<|end_file_name|><|fim▁begin|>import io
import sys
import mock
import argparse
from monolith.compat import unittest
from monolith.cli.base import arg
from monolith.cli.base import ExecutionManager
from monolith.cli.base import SimpleExecutionManager
from monolith.cli.base import BaseCommand
from... | |
<|file_name|>stltopology.cpp<|end_file_name|><|fim▁begin|>#include <mystdlib.h>
#include <myadt.hpp>
#include <linalg.hpp>
#include <gprim.hpp>
#include <meshing.hpp>
#include "stlgeom.hpp"
namespace netgen
{
STLTopology :: STLTopology()
: trias(), topedges(), points(), ht_topedges(NULL),
trigsperpoint()... | }
fout2 << GetNT() << endl; |
<|file_name|>admin_template_unittest.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Unit tests for the admin template gatherer.'''
import os
i... | cliques = gatherer.GetCliques()
self.VerifyCliquesFromAdmFile(cliques)
|
<|file_name|>regen.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python -u
# coding=utf-8
"""
Generate certificates via Let's Encrypt
"""
import re
from subprocess import check_output, check_call
from os import path
import click
from colorama import Fore
import pexpect
# Extract the file/challenge from the LetsEncrypt o... | |
<|file_name|>hl_prometheus.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 SONATA-NFV, Thales Communications & Security
# ALL RIGHTS RESERVED.
#<|fim▁hole|>#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is d... | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at |
<|file_name|>ListFonts.java<|end_file_name|><|fim▁begin|><|fim▁hole|>import java.awt.*;
public class ListFonts
{
public static void main(String[] args)
{
String[] fontNames = GraphicsEnvironment
.getLocalGraphicsEnvironment()
.getAvailableFontFamilyNames();
for (int i = 0... | |
<|file_name|>get_room_visibility.rs<|end_file_name|><|fim▁begin|>//! [GET /_matrix/client/r0/directory/list/room/{roomId}](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-directory-list-room-roomid)
use ruma_api::ruma_api;
use ruma_identifiers::RoomId;
use crate::r0::room::Visibility;
<|fim▁hol... | ruma_api! {
metadata { |
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>var Encore = require('@symfony/webpack-encore');
// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfig... | .configureBabelPresetEnv((config) => { |
<|file_name|>1_SetIRTemplatesToManual.py<|end_file_name|><|fim▁begin|>from elan import *
#Set_Location_And_Weather_By_Country_City.py
<|fim▁hole|>Configurator.Start()
Configurator.Wait()
sleep(3)
Configurator.media.Click()
Configurator.interfacetemplates.Click()
for i in range(100):
try:
Configurator.Com... | |
<|file_name|>test_base.py<|end_file_name|><|fim▁begin|>"""
Unit tests for the base mechanism class.
"""
import pytest
from azmq.mechanisms.base import Mechanism
from azmq.errors import ProtocolError
@pytest.mark.asyncio
async def test_expect_command(reader):
reader.write(b'\x04\x09\x03FOOhello')
reader.seek... | reader.seek(0)
|
<|file_name|>fetchProductAndCheckIfFound.js<|end_file_name|><|fim▁begin|>import applicationActions from '../../constants/application';
import productActions from '../../constants/products';<|fim▁hole|>
export default function fetchProductAndCheckIfFound(context, payload, done) {
context.dispatch(productActions.PROD... | |
<|file_name|>content.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | export { default } from 'ember-radical/components/rad-dropdown/content' |
<|file_name|>logs.py<|end_file_name|><|fim▁begin|>import sys
from traceback import format_exception
import colorama
def color(color_, settings):
"""Utility for ability to disabling colored output."""
if settings.no_colors:
return ''
else:
return color_
def exception(title, exc_info, sett... | red=color(colorama.Fore.RED, settings),
reset=color(colorama.Style.RESET_ALL, settings))) |
<|file_name|>_oauth.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
<|fim▁hole|>This module comtains the path hack neccesary for oauthlib to be vendored into requests
while allowing upstream changes.
"""
import os
import sys
try:
from oauthlib.oauth1 import rfc5849
from oauthlib.common import extract_... | """
requests._oauth
~~~~~~~~~~~~~~~
|
<|file_name|>gregorian.js<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
<|fim▁hole|>*/
//>>built
define("dojo/cldr/nls/en-au/gregorian",{"... | |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
<|fim▁hole|>from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages=['lg_builder'],
package_dir={'': 'src'},
scripts=['scripts/lg-ros-build'],
install_r... | |
<|file_name|>play_context.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the ... |
# backwards compatibility fields for sudo/su |
<|file_name|>read_job.py<|end_file_name|><|fim▁begin|># JoeTraffic - Web-Log Analysis Application utilizing the JoeAgent Framework.
# Copyright (C) 2004 Rhett Garber
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by th... | def run(self): |
<|file_name|>union_pooler_test.py<|end_file_name|><|fim▁begin|># ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2015, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software co... | self.assertEquals(len(result), 1)
self.assertEquals(result[0], 4) |
<|file_name|>api.go<|end_file_name|><|fim▁begin|>// Copyright 2015 CoreOS, Inc.
// Copyright 2015 The Go 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.apac... |
func New(opts *Options) (*API, error) {
const endpointPrefix = "https://www.googleapis.com/compute/v1/" |
<|file_name|>iosxr_facts.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The module file for iosxr_facts
"""
from __future__ import absolute_import, division, print_func... | version_added: "2.9" |
<|file_name|>main.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8; -*-
"""
Copyright (C) 2007-2013 Guake authors
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, o... | except ValueError:
print("[ERROR] missing mandatory dependency: Keybinder 3")
missing_deps = True |
<|file_name|>tests_views.py<|end_file_name|><|fim▁begin|>from gevent import monkey
monkey.patch_all()
import pytest
import gevent
import marshmallow
from channelstream.server_state import get_state
from channelstream.channel import Channel
@pytest.mark.usefixtures("cleanup_globals", "pyramid_config")
class TestConn... | connect(dummy_request) |
<|file_name|>TestNativeLog1p.rs<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2016 The Android Open Source Project
*
* 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... | |
<|file_name|>AFTResponse.java<|end_file_name|><|fim▁begin|>package com.ricex.aft.android.request;
import org.springframework.http.HttpStatus;
public class AFTResponse<T> {
/** The successful response from the server */
private final T response;
/** The error response from the server */
private final String er... | |
<|file_name|>_0382LinkedListRandomNode.java<|end_file_name|><|fim▁begin|>import java.util.Random;
public class _0382LinkedListRandomNode {
ListNode head;
Random r;
public _0382LinkedListRandomNode(ListNode head) {
this.head = head;
r = new Random();
}
public int getRandom() {
Lis... | public class ListNode { |
<|file_name|>listing4.01.js<|end_file_name|><|fim▁begin|>/* Get Programming with JavaScript
* Listing 4.01
* Displaying an object's properties on the console
*/
var movie1;
movie1 = {
title: "Inside Out",
actors: "Amy Poehler, Bill Hader",
directors: "Pete Doctor, Ronaldo Del Carmen"
};
console.log("M... | * 2) Create an object to represent a blog post.
*
* 3) Write code to display info about the blog post. |
<|file_name|>defaults.js<|end_file_name|><|fim▁begin|>/*
* measured-elasticsearch
*
* Copyright (c) 2015 Maximilian Antoni <mail@maxantoni.de>
*
* @license MIT
*/
'use strict';
exports.index = 'metrics-1970.01';
exports.timestamp = '1970-01-01T00:00:00.000Z';
function header(type) {
return {
index : {... | exports.headerTimer = header('timer'); |
<|file_name|>flags.go<|end_file_name|><|fim▁begin|>package agent
import (
"flag"
)
func (this *Agent) BindFlags() {
flag.BoolVar(&this.selfRegister, "self_register", true, "Registers self with the registry.")
flag.IntVar(&this.ListenPort, "port", 25657, "Listening port for agent")<|fim▁hole|> flag.StringVar(&this.... | flag.StringVar(&this.StatusPubsubTopic, "status_topic", "", "Status pubsub topic")
flag.BoolVar(&this.EnableUI, "enable_ui", false, "Enables UI")
flag.IntVar(&this.DockerUIPort, "dockerui_port", 25658, "Listening port for dockerui") |
<|file_name|>JTitlePanel.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>com.toedter.components.JTitlePanel
com.toedter.components.JTitlePanel$GradientPanel<|fim▁end|> | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""The function module of dolfin"""<|fim▁hole|>from dolfin.functions import function
from dolfin.functions import constant
from dolfin.functions import expression
from dolfin.functions import specialfunctions
from .multimeshfunction import *... |
from dolfin.functions import multimeshfunction
from dolfin.functions import functionspace |
<|file_name|>test_session.py<|end_file_name|><|fim▁begin|>"""test building messages with streamsession"""
#-------------------------------------------------------------------------------
# Copyright (C) 2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# ... | self.assertEqual(new_msg['buffers'],[b'bar']) |
<|file_name|>WeatherForecasts.ts<|end_file_name|><|fim▁begin|>import { fetch, addTask } from 'domain-task';
import { Action, Reducer, ActionCreator } from 'redux';
import { AppThunkAction } from './';
// -----------------
// STATE - This defines the type of data maintained in the Redux store.
export interface Weather... | forecasts: action.forecasts,
isLoading: false
}; |
<|file_name|>StringChains.java<|end_file_name|><|fim▁begin|>package company;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
public class StringChains {
private int longestChain(String[] words) {
if (words == null || words.length == 0)
ret... | |
<|file_name|>rpcblockchain.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "main.h"
#include ... | {
dDiff *= 256.0; |
<|file_name|>TestASTFilterNormalizationOptimizer.java<|end_file_name|><|fim▁begin|>/**
Copyright (C) SYSTAP, LLC 2006-2015. All rights reserved.
Contact:
SYSTAP, LLC
2501 Calvert ST NW #106
Washington, DC 20008
licenses@systap.com
This program is free software; you can redistribute it and/or mod... | |
<|file_name|>NotificationQueue.cpp<|end_file_name|><|fim▁begin|>//
// NotificationQueue.cpp
//
// $Id: //poco/1.4/Foundation/src/NotificationQueue.cpp#1 $
//
// Library: Foundation
// Package: Notifications
// Module: NotificationQueue
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering Gm... | _waitQueue.push_back(pWI);
}
|
<|file_name|>geo_referencing.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2.7
# encoding: utf-8
from __future__ import division
import numpy as np
# from pyproj import Proj, pj_list, pj_ellps
import cv2
def geo_ref_tracks(tracks, frame, uav, debug=False):
"""
Geo-references tracks'points
:param track... | # print "Choose a coordinate projection from the following list:"
# for key in pj_list:
# print key + ": " + pj_list[key]
# proj = raw_input("Type in the coordinate projection: ") |
<|file_name|>bitcoin_da.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="da" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Saffroncoin</source>... | <location line="+3"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Saffroncoin will not work properly.</source> |
<|file_name|>twig.functions.js<|end_file_name|><|fim▁begin|>// ## twig.functions.js
//
// This file handles parsing filters.
module.exports = function (Twig) {
/**
* @constant
* @type {string}
*/
var TEMPLATE_NOT_FOUND_MESSAGE = 'Template "{name}" is not defined.';
// Determine object type
... | |
<|file_name|>chunk.rs<|end_file_name|><|fim▁begin|>use std::io;
use std::fmt;
use std::ops::{Deref, DerefMut};
use ::aux::ReadExt;
static NAME_LENGTH: u32 = 8;
pub struct Root<R> {
pub name: String,
input: R,
buffer: Vec<u8>,
position: u32,
}
impl<R: io::Seek> Root<R> {
pub fn tell(&mut self) -> ... | &self.buffer
} |
<|file_name|>largereq.js<|end_file_name|><|fim▁begin|>module.exports = {
'name': 'largereq',
'category': 'Operators',
'syntax': [
'x >= y',
'largereq(x, y)'<|fim▁hole|> 'examples': [
'2 > 1+1',
'2 >= 1+1',
'a = 3.2',
'b = 6-2.8',
'(a > b)'
],
'seealso': [
'equal', 'unequal', '... | ],
'description':
'Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.', |
<|file_name|>task_2.py<|end_file_name|><|fim▁begin|>import sys
import math
# dataset_3363_3
name = input().strip() + ".txt"
lines = ''
with open(name, 'r') as r:
for line in r:<|fim▁hole|>
from collections import Counter
result = Counter(string).most_common(1)[0]
#print(result)
output = "output_2.txt"
with o... | lines += line.strip() + " "
string = [i.lower() for i in lines.split()] |
<|file_name|>darwin.js<|end_file_name|><|fim▁begin|>'use strict';
const {app} = require('electron');
const appName = app.getName();
module.exports = {
label: appName,
submenu: [{
label: 'About ' + appName,
role: 'about',
params: {
version: '1.0.0'
}
}, {
type: 'separator'
}, {
label: 'Preferences'... | |
<|file_name|>decompositions.rs<|end_file_name|><|fim▁begin|>use traits::operations::{Transpose, ApproxEq};
use traits::structure::{ColSlice, Eye, Indexable, Diag, SquareMat, BaseFloat};
use traits::geometry::Norm;
use std::cmp::min;
use std::ops::{Mul, Add, Sub};
/// Get the householder matrix corresponding to a refle... | M: Indexable<(usize, usize), N> + SquareMat<N, V> + Add<M, Output = M> +
Sub<M, Output = M> + ColSlice<VS> +
ApproxEq<N> + Copy {
let mut eigenvectors: M = ::one::<M>(); |
<|file_name|>parser.rs<|end_file_name|><|fim▁begin|>extern crate compiler;
use compiler::lexer::tokenize;
use compiler::parser::parse;
#[test]
fn parser_accepts_parameterless_function_with_empty_block() {
let tokens = tokenize("fn func() { }").unwrap();
match parse(tokens) {
Ok(..) => assert!(true),
Err... | |
<|file_name|>bonus.py<|end_file_name|><|fim▁begin|>import os
import common_pygame
import random
pygame = common_pygame.pygame
screen = common_pygame.screen
<|fim▁hole|>class Bonus():
def __init__(self, sounds, menu):
self.menu = menu
self.sounds = sounds
self.bonusType = 0
self.bon... | |
<|file_name|>video.rs<|end_file_name|><|fim▁begin|>use sdl2;
pub fn main() {
sdl2::init(sdl2::InitVideo);
let window = match sdl2::video::Window::new("rust-sdl2 demo: Video", sdl2::video::PosCentered, sdl2::video::PosCentered, 800, 600, sdl2::video::OpenGL) {
Ok(window) => window,
Err(err) => ... | |
<|file_name|>dirichlet.py<|end_file_name|><|fim▁begin|>from __future__ import division
import math
import numpy as np
from time import time
import sympy as sp
import mpmath as mp
from mpmath.ctx_mp_python import mpf
from scipy.misc import factorial
from scipy.special import gamma
precision = 53
mp.prec = precis... | def alternating_series(s, N):
eta = dirichlet_eta(s, N)
denominator = 1 - 2**(1 - s)
zeta = eta / denominator |
<|file_name|>tab_search_item_test.ts<|end_file_name|><|fim▁begin|>// Copyright 2020 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.
import 'chrome://webui-test/mojo_webui_test_support.js';
import {RecentlyClosedTab, Tab... | createTab({
active: true,
isDefaultFavicon: true,
showIcon: true, |
<|file_name|>script26_plot.py<|end_file_name|><|fim▁begin|>from matplotlib import pylab as plt
(x,y,yEA) = in_object
print(in_object)
plt.plot(x,y/y.max(),label="Fully coherent")
plt.plot(x,yEA/yEA.max(),label="Partial coherent")
plt.xlabel("Z [um]")
plt.ylabel("Intensity [Arbitrary Units]")<|fim▁hole|>plt.show()<|fi... | plt.legend()
|
<|file_name|>ProjectAuthorization.java<|end_file_name|><|fim▁begin|>package net.ontrack.core.security;
import lombok.Data;
import net.ontrack.core.model.AccountSummary;
@Data
public class ProjectAuthorization {<|fim▁hole|>
private final int project;
private final AccountSummary account;
private final Proj... | |
<|file_name|>test_http_headers.py<|end_file_name|><|fim▁begin|>import unittest
import copy
from scrapy.http import Headers
class HeadersTest(unittest.TestCase):
def test_basics(self):
h = Headers({'Content-Type': 'text/html', 'Content-Length': 1234})
assert h['Content-Type']
assert h['Cont... | h1['foo'] = 'bar'
h1['foo'] = None |
<|file_name|>loadFile.py<|end_file_name|><|fim▁begin|>import os
import logging
import pandas as pd
from dataactvalidator.app import createApp
from dataactvalidator.scripts.loaderUtils import LoaderUtils
from dataactcore.interfaces.db import GlobalDB
from dataactcore.models.domainModels import CGAC, ObjectClass, Progr... | logging.basicConfig(level=logging.INFO)
|
<|file_name|>channels.js<|end_file_name|><|fim▁begin|>/**
* IRCAnywhere server/channels.js
*
* @title ChannelManager
* @copyright (c) 2013-2014 http://ircanywhere.com
* @license GPL v2
* @author Ricki Hastings
*/
var _ = require('lodash'),
hooks = require('hooks');
/**
* This object is responsibl... | *
* @method updateTopic
|
<|file_name|>rdxml.py<|end_file_name|><|fim▁begin|>try:
from xml.etree import cElementTree as etree
except ImportError:
from xml.etree import ElementTree as etree
import xml2nrn
# module names derived from the namespace. Add new tags in proper namespace
import neuroml
import metadata
import morphml
import biophys... | tag = ns+'.'+tag[1] #namespace.element should correspond to module.func
f = None |
<|file_name|>tabs.py<|end_file_name|><|fim▁begin|>"""
This module is essentially a broker to xmodule/tabs.py -- it was originally introduced to
perform some LMS-specific tab display gymnastics for the Entrance Exams feature
"""
from django.conf import settings
from django.utils.translation import ugettext as _, ugettex... | settings=settings,
is_user_authenticated=user.is_authenticated(), |
<|file_name|>config.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Config file handling module
# Copyright (C) 2014 Yury Gavrilov <yuriy@igavrilov.ru>
# This file is part of VKBuddy.
# VKBuddy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as... | |
<|file_name|>vpcmpub.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode};<|fim▁hole|>use ::RegType::*;
use ::instruction_def::*;
use ::Operand::*;
use ::Reg::*;
use ::RegScale::*;
fn vpcmpub_1() {
run_test(&Instruction { mnemonic: Mnemoni... | |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! `session_types`
//!
//! This is an implementation of *session types* in Rust.
//!
//! The channels in Rusts standard library are useful for a great many things,
//! but they're restricted to a single type. Session types allows one to use a
//! single channel for tran... | let mut sel = $crate::ChanSelect::new(); |
<|file_name|>associated-const-dead-code.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... |
#![feature(associated_consts)]
#![deny(dead_code)]
|
<|file_name|>StreamCollectorsTest.java<|end_file_name|><|fim▁begin|>/**
* JBoss, Home of Professional Open Source.
* Copyright 2014 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except ... |
@Test |
<|file_name|>either.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses... | let result = lefts(input);
assert_eq!(result, ~[10, 12, 14]); |
<|file_name|>formats-data.ts<|end_file_name|><|fim▁begin|>export const FormatsData: {[k: string]: ModdedSpeciesFormatsData} = {
bulbasaur: {
tier: "LC",
},
ivysaur: {
tier: "NFE",
},
venusaur: {
randomBattleMoves: ["curse", "earthquake", "hiddenpowerrock", "leechseed", "sleeppowder", "sludgebomb", "swordsdan... | },
solrock: {
randomBattleMoves: ["earthquake", "explosion", "overheat", "reflect", "rockslide", "shadowball"], |
<|file_name|>0020_userprofile_last_transaction.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0019_auto_20160518_0048'),
]
operations =... | name='last_transaction',
field=models.DateTimeField(null=True, blank=True),
), |
<|file_name|>age.js<|end_file_name|><|fim▁begin|>/**
* Copyright (C) 2017 3D Repo Ltd
*
* 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 (a... | *
* You should have received a copy of the GNU Affero General Public License |
<|file_name|>0027_auto_20180116_1012.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2018-01-16 10:12
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.M... | ]
operations = [
migrations.AddField( |
<|file_name|>test_drivers.py<|end_file_name|><|fim▁begin|>import logging
import os.path
import shutil
import sys
import tempfile
import fiona
def test_options(tmpdir=None):
"""Test that setting CPL_DEBUG=ON works"""
if tmpdir is None:
tempdir = tempfile.mkdtemp()
logfile = os.path.join(tempdir... | assert "Option CPL_DEBUG" in log |
<|file_name|>app.py<|end_file_name|><|fim▁begin|>import os
from dotenv import load_dotenv
dotenv_path = os.path.join(os.path.dirname(__file__), '../.env')
load_dotenv(dotenv_path)
<|fim▁hole|># pylama:ignore=E402
from flask import Flask
from flask.ext.cors import CORS
from flask.ext.session import Session
from werkze... | |
<|file_name|>TestSin.rs<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2014 The Android Open Source Project
*
* 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.... | float3 __attribute__((kernel)) testSinFloat3Float3(float3 in) {
return sin(in);
}
|
<|file_name|>meetup.js<|end_file_name|><|fim▁begin|>var https = require('https'),
q = require('q'),
cache = require('./cache').cache;
var API_KEY = process.env.TF_MEETUP_API_KEY;
var fetch_events = function () {
var deferred = q.defer();
var options = {
host: 'api.meetup.com',
path: '/2/events?&sign... |
module.exports.fetch_events = cache(fetch_events, 10000, true, []); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.