prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>cls_plan_BDI.py<|end_file_name|><|fim▁begin|># cls_plan_BDI.py
import datetime
class Plan_BDI(object):
"""
class for handling various plans for AIKIF using
Belief | Desires | Intentions
"""
def __init__(self, name, dependency):
self.name = name
self.id = 1
... | |
<|file_name|>resource_aws_licensemanager_license_configuration_test.go<|end_file_name|><|fim▁begin|>package aws
import (
"fmt"
"log"
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/licensemanager"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terr... | return nil
} |
<|file_name|>console.d.ts<|end_file_name|><|fim▁begin|>export declare class Console {
private static quiet;
private static debug;
private static verbose;
static Log(text: any): void;
private static readonly Timestamp;
static Debug(text: any): void;
static Verbose(text: any): void;
static... | static Exit(reason: any): void;
} |
<|file_name|>TrainedModelAllocationClusterServiceTests.java<|end_file_name|><|fim▁begin|>/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elasti... |
private static DiscoveryNode buildOldNode(String name, boolean isML, long nativeMemory) { |
<|file_name|>bigquery_operator.py<|end_file_name|><|fim▁begin|>import logging
from airflow.contrib.hooks.bigquery_hook import BigQueryHook
from airflow.models import BaseOperator
from airflow.utils import apply_defaults
class BigQueryOperator(BaseOperator):
"""
Executes BigQuery SQL queries in a specific BigQ... | |
<|file_name|>containerlogs.go<|end_file_name|><|fim▁begin|>package containerinstance
// Copyright (c) Microsoft and contributors. 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 t... | if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/ContainerLogsClient.List") |
<|file_name|>condvar.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/license... | ///
/// thread::spawn(move|| { |
<|file_name|>map.js<|end_file_name|><|fim▁begin|>// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided ... |
/** |
<|file_name|>bootstrap.js<|end_file_name|><|fim▁begin|>// listen and handle messages from the content script
// via the background script
import { addStackingContext } from "./actions/stacking-context";
function connectToInspectedWindow({ dispatch }) {
browser.runtime.onMessage.addListener((request, sender, sendResp... | }
}); |
<|file_name|>htmls2csvs.py<|end_file_name|><|fim▁begin|># pylint: disable = C0301
from bs4 import BeautifulSoup
from urllib2 import urlopen
import pandas as pd
pos_idx_map = {
'qb': 2,
'rb': 3,
'wr': 4,
'te': 5,
}
def make_url(pos, wk):
ii = pos_idx_map[pos]
fstr = "http://fantasydata.com/nfl... | dflist = []
for ii in range(1, 17): |
<|file_name|>pack_file.rs<|end_file_name|><|fim▁begin|>use std::io::fs::File;
static EXTENDED_BIT_FLAG: &'static u8 = &0u8;
static COMMIT_BIT_FLAG: &'static u8 = &1u8;
static TREE_BIT_FLAG: &'static u8 = &2u8;<|fim▁hole|>static TAG_BIT_FLAG: &'static u8 = &4u8;
static RESERVED_BIT_FLAG: &'static u8 = &5u8;
static OFFS... | static BLOB_BIT_FLAG: &'static u8 = &3u8; |
<|file_name|>LinuxIntelELF32.py<|end_file_name|><|fim▁begin|>'''
Author Joshua Pitts the.midnite.runr 'at' gmail <d ot > com
Copyright (C) 2013,2014, Joshua Pitts
License: GPLv3
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public... | |
<|file_name|>model.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/. */
//! Borders, padding, and margins.
#![deny(unsafe_code)]
use ... | /// given minimum and the preferred is the sum of the current preferred and the given |
<|file_name|>regress-96526-noargsub.js<|end_file_name|><|fim▁begin|>/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "Licen... | |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.db.models import Count
from dcim.models import Device, Interface
from extras.api.views import CustomFieldModelViewSet
from utilities.api import FieldChoicesViewSet, ModelViewSet
from utilities.utils import get_subquery
from virtualization import filters
fr... | """
Select the specific serializer based on the request context. |
<|file_name|>paths.py<|end_file_name|><|fim▁begin|>#
# Copyright (C) 2012 Stanislav Bohm
#
# This file is part of Kaira.
#
# Kaira 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, version 3 of th... | KAIRA_CONFIG_INI = os.path.join(KAIRA_ROOT, "build", "config.ini") |
<|file_name|>test_dhcp_for_vpcrouter_cidr.py<|end_file_name|><|fim▁begin|>'''
1.create private vpc router network with cidr
2.check dhcp ip address
@author Antony WeiJiang
'''
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.test_state as test_state
import zstackwoodpecker.test_util as test_util
i... | private_vpcnetwork.set_ipVersion(ip_Version[0])
private_vpcnetwork.create_l3uuid(l3_name) |
<|file_name|>cubecolourdialog.py<|end_file_name|><|fim▁begin|># --------------------------------------------------------------------------- #
# CUBECOLOURDIALOG Widget wxPython IMPLEMENTATION
#
# Python Code By:
#
# Andrea Gavana, @ 16 Aug 2007
# Latest Revision: 14 Apr 2010, 12.00 GMT
#
#
# TODO List
#
# 1. Find A Way... | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod game_over_state;<|fim▁hole|>pub mod menu_state;
pub mod play_state;
pub mod shared;
use crate::states::intro_state::IntroState;
use ggez::event::{Axis, Button, EventHandler, Keycode, Mod, MouseButton, MouseState};
use ggez::{audio, graphics, timer, Context, Game... | pub mod intro_state; |
<|file_name|>types.rs<|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 Apac... | } |
<|file_name|>TelegramPanel.java<|end_file_name|><|fim▁begin|>package com.gotcreations.emojilibrary.controller;
import android.animation.Animator;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Handler;
import androidx.annotation.DrawableRes;
im... | |
<|file_name|>gann.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, getopt
from datetime import datetime
import math
from gann import *
def print_usage():
print """
classic Gann square: gann.py -o <output file name> -s <square size>
Gann square based on... | |
<|file_name|>jquery-json.d.ts<|end_file_name|><|fim▁begin|>interface JQueryStatic {
//This method is added by the jquery-json plugin.
toJSON: (data: any) => string;<|fim▁hole|><|fim▁end|> | } |
<|file_name|>ShouldBeBeforeYear_create_Test.java<|end_file_name|><|fim▁begin|>/*
* 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 re... | " 2011-01-01T00:00:00.000 (java.util.Date)%n" +
"to be strictly before year:%n" + |
<|file_name|>mobx.umd.js<|end_file_name|><|fim▁begin|>/** MobX - (c) Michel Weststrate 2015 - 2020 - MIT Licensed */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(gl... | enumerable: false, |
<|file_name|>IrcEndpointTest.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 Yo... | public class IrcEndpointTest {
private IrcComponent component;
|
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redis... | |
<|file_name|>primes.rs<|end_file_name|><|fim▁begin|>//! Functions involving primes without dependencies.
//!
//!
//! # Examples
//!
//! ```
//! use euler_library::primes as eu_primes;
//!
//! assert_eq!(eu_primes::prime_factors(84), [2, 2, 3, 7]);
//! assert_eq!(eu_primes::prime_factors_unique(84), [2, 3, 7]);
//!
//! ... | ///
pub fn prime_factors_unique(n: usize) -> Vec<usize> {
let mut xs = prime_factors(n); |
<|file_name|>status_reporter.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 crate::{
errors::{BuildProjectError, Error},
source_for_... | |
<|file_name|>DU_ABPTableRCut1SIO.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
DU task for ABP Table: doing jointly row BIESO and horizontal cuts
block2line edges do not cross another block.
The cut are based on baselines of text blocks.
- the labels of horizontal cuts are SIO ... | print("--- After filtering: %d edges" % len(lEdge))
lSortedEdge = sorted(lEdge, key=lambda x: x.A.domid)
print(len(lSortedEdge)) |
<|file_name|>resources.py<|end_file_name|><|fim▁begin|>from import_export import fields, resources
class GamesPlayedResource(resources.Resource):<|fim▁hole|>
game = fields.Field(attribute='game__name', column_name='game')
time = fields.Field(attribute='time', column_name='time (hours)')
num_players = fiel... | |
<|file_name|>reporter.go<|end_file_name|><|fim▁begin|>/*
Copyright 2018 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
Unles... | // TODO(fejta): cannot vote below previous vote after merge
switch { |
<|file_name|>client_config.go<|end_file_name|><|fim▁begin|>/*
Copyright 2014 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
... | // getDefaultServer returns a default setting for DefaultClientConfig |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|># -*- coding: utf-8 -*-
__version__ = '0.1.3'<|fim▁end|> | #!/usr/bin/env python |
<|file_name|>IconElement.js<|end_file_name|><|fim▁begin|>/**
* IconElement is often mixed into other classes to generate an icon.
* Icons are graphics, about the size of normal text. They are used to aid the user
* in locating a control or to convey information in a space-efficient way. See the
* [OOUI documentatio... | */
OO.ui.mixin.IconElement.prototype.getIcon = function () { |
<|file_name|>cecog.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Methods for working with cecog
Copyright 2010 University of Dundee, Inc. All rights reserved.
Use is subject to license terms supplied in LICENSE.txt
"""
import os
import re
import sys
from omero.cli import... | 1 10 6 lateana 1119 41 76.8253796095 \
54.9305640673 |
<|file_name|>interfaces.py<|end_file_name|><|fim▁begin|>###########################################################################
#
# Copyright (C) 2012 Zenoss Inc.
#
###########################################################################
from Products.Zuul.form import schema
from Products.Zuul.utils import Zuul... | """
|
<|file_name|>TestNativeRsqrt.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... | #pragma version(1) |
<|file_name|>MachinePoolPredicates.java<|end_file_name|><|fim▁begin|>package brooklyn.location.jclouds.pool;
import java.util.Map;
import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.compute.domain.Processor;
import org.jclouds.domain.Location;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
... |
// common hardware parameters
|
<|file_name|>ClientProxy.java<|end_file_name|><|fim▁begin|>package net.kyau.darkmatter.proxy;
import java.util.Random;
import java.util.logging.Level;
import java.util.logging.LogManager;
import net.kyau.darkmatter.client.gui.GuiHUD;
import net.kyau.darkmatter.client.gui.GuiVoidJournal;
import net.kyau.darkmatter.cli... | // NOOP
} |
<|file_name|>DialogStandardButtons.js<|end_file_name|><|fim▁begin|>import React from 'react';
import _ from 'lodash';
import { FlatButton, RaisedButton } from 'material-ui';
const DialogStandardButtons = ({
handleCancel,
handleConfirm,
submitLabel = 'Confirm',
cancelLabel = 'Cancel',
inverted,
disabled,
... | |
<|file_name|>parsing.rs<|end_file_name|><|fim▁begin|>//! Utility functions for Header implementations.
use language_tags::LanguageTag;<|fim▁hole|>use url::percent_encoding;
use header::shared::Charset;
/// Reads a single raw string when parsing a header.
pub fn from_one_raw_str<T: str::FromStr>(raw: &[Vec<u8>]) -> :... | use std::str;
use std::str::FromStr;
use std::fmt::{self, Display}; |
<|file_name|>waterline_1_tux.py<|end_file_name|><|fim▁begin|>import ocl
import camvtk
import time
import vtk
import datetime
import math
if __name__ == "__main__":
print ocl.revision()
myscreen = camvtk.VTKScreen()
#stl = camvtk.STLSurf("../../stl/demo.stl")
stl = camvtk.STLSurf("../../stl/gn... | |
<|file_name|>test_generator.py<|end_file_name|><|fim▁begin|>import unittest
from vsvbp.container import Item, Bin, Instance
from vsvbp.generator import generator
class ItemBinTestCase(unittest.TestCase):
def setUp(self):
self.i1 = Item([1,2,9]); self.i2 = Item([4,5,3])
self.i3 = Item([0,1,0]); sel... | |
<|file_name|>common.py<|end_file_name|><|fim▁begin|>team_mapping = {
"SY": "Sydney",
"WB": "Western Bulldogs",
"WC": "West Coast",
"HW": "Hawthorn",
"GE": "Geelong",
"FR": "Fremantle",
"RI": "Richmond",
"CW": "Collingwood",<|fim▁hole|> "CA": "Carlton",
"GW": "Greater Western Sydne... | |
<|file_name|>rom.rs<|end_file_name|><|fim▁begin|>use std::io::Write;
use std::fs::File;
#[allow(dead_code)]
pub struct INesFile {
magic: [u8; 4],
has_trainer: bool,
pub mapper: u8,
pub prg_rom_cnt: u8,
prg_rom_size: u32,
chr_rom_size: u32,
prg_ram_size: u32,
flags6: u8,... |
let mapper = (flags7 & 0xF0) | ((flags6 & 0xF0) >> 4); |
<|file_name|>RequestCompletionHandler.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... | */
public interface RequestCompletionHandler { |
<|file_name|>udp6.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2016, The OpenThread Authors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code m... | } |
<|file_name|>smd.py<|end_file_name|><|fim▁begin|>import numpy as np
import sys
from trw_utils import *
from heterogenous_crf import inference_gco
from pyqpbo import binary_general_graph
from scipy.optimize import fmin_l_bfgs_b
def trw(node_weights, edges, edge_weights, y,
max_iter=100, verbose=0, tol=1e-3,
... | new_unaries[:,1] = node_weights[:,k] + x |
<|file_name|>test_between_time.py<|end_file_name|><|fim▁begin|>from datetime import (
datetime,
time,
)
import numpy as np
import pytest
from pandas._libs.tslibs import timezones
import pandas.util._test_decorators as td
from pandas import (
DataFrame,
Series,
date_range,
)
import pandas._testing... | df = DataFrame(np.random.randn(len(index), 5), index=index)
bkey = slice(time(13, 0, 0), time(14, 0, 0)) |
<|file_name|>ClassifyLayer.cpp<|end_file_name|><|fim▁begin|>#include "../../../corpuslib_headers.h"
#include "ClassifyLayer.h"
namespace Corpus
{
namespace Tokenisation
{
namespace Layers
{
boost::shared_ptr<SPretoken> CClassifyLayer::GetNext()
{
// fetch next
boost::shared_ptr<SPretoke... | }
return current;
|
<|file_name|>test_group_proxy_extension.py<|end_file_name|><|fim▁begin|># 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
#
# Un... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#<|fim▁hole|># ... | |
<|file_name|>issue-17718-patterns.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apach... | }
} |
<|file_name|>gdocsbackend.py<|end_file_name|><|fim▁begin|># -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright 2011 Carlos Abalde <carlos.abalde@gmail.com>
#
# This file is part of duplicity.
#
# Duplicity is free software; you can redistribute it and/or modify it
# under the terms of the GNU General ... | # Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
# |
<|file_name|>deploy.go<|end_file_name|><|fim▁begin|>// Copyright 2013 tsuru authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package api
import (
"encoding/json"
"fmt"
"net/http"
"strconv"<|fim▁hole|> "github.com/tsuru/tsuru/app"... | "time"
|
<|file_name|>widget_services_storage_mock.js<|end_file_name|><|fim▁begin|>/**
* Copyright 2016 aixigo AG
* Released under the MIT license.
* http://laxarjs.org/license
*/
/**
* Allows to instantiate a mock implementations of {@link AxStorage}, compatible to the "axStorage" injection.
*
* @module widget_services... | const local = globalStorageMock.getLocalStorage( namespace );
const session = globalStorageMock.getSessionStorage( namespace );
|
<|file_name|>evt_form_docente_cca.js<|end_file_name|><|fim▁begin|>$(function() {
$( "#save" ).click(function(){
bval = true;
bval = bval && $( "#nombres" ).required();
bval = bval && $( "#apellidop" ).required();
bval = bval && $( "#apellidom" ).required();
... | });
}); |
<|file_name|>elem.js<|end_file_name|><|fim▁begin|>!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Ele... | props: props,
__innerComponents: __innerComponents
}); |
<|file_name|>ConnectedInput.js<|end_file_name|><|fim▁begin|>import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import getIn from '@mzvonar/getin';
import isEvent from './../utils/isEvent';
import getPath from './../utils/getPath';
import deepEqual from 'react-fast-compar... | const input = componentProps.input;
// const value = componentProps.value;
deleteChildren(componentProps, [ |
<|file_name|>challenge47_48.rs<|end_file_name|><|fim▁begin|>use crate::errors::*;
use rsa::Rsa;
use bignum::OpensslBigNum as BigNum;
use bignum::{BigNumExt, BigNumTrait};
use rand::Rng;
use std::cmp;
struct Server {
rsa: Rsa<BigNum>,
}
// We do not need an oracle which checks for full PKCS#1v1.5 conformance.
... | si = &si + &_1;
}
} else {
// Step 2.c |
<|file_name|>item.rs<|end_file_name|><|fim▁begin|>use std::any::Any;
use std::any::TypeId;
use std::fmt;
use std::str::from_utf8;
use typeable::Typeable;
use super::cell::{OptCell, PtrMapCell};
use header::{Header, HeaderFormat};
#[derive(Clone)]
pub struct Item {
raw: OptCell<Vec<Vec<u8>>>,
typed: PtrMapCe... | |
<|file_name|>x_movement.rs<|end_file_name|><|fim▁begin|>use piston::input::{
Button,
Key,
};
use player::{
Player,<|fim▁hole|>};
#[derive(Debug)]
pub enum XMovement {
Left,
Right,
Static,
}
impl TimeChange for XMovement {
fn handle_time_change(player: &mut Player, dt: f64) {
let x... | ButtonInteraction,
TimeChange, |
<|file_name|>211_add_and_search_word-data_structure_design.py<|end_file_name|><|fim▁begin|>"""
Design a data structure that supports the following two operations:
void addWord(word)
bool search(word)
search(word) can search a literal word or a regular expression string containing
only letters a-z or .. A . me... | return False
elif c in loc.leaves:
loc = loc.leaves[c] |
<|file_name|>118A.cpp<|end_file_name|><|fim▁begin|>//{
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double lf;
typedef pair<ll,ll> ii;
#define REP(i,n) for(ll i=0;i<n;i++)
#define FILL(i,n) memset(i,n,sizeof i)
#define X first
#define Y second
#define SZ(_a) (int)_a.size()
#define ALL(_a) ... | #ifdef brian |
<|file_name|>bitcoin_kk_KZ.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="kk_KZ" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Mysticoin</source>
<translation type="unf... | <message>
<location line="+9"/> |
<|file_name|>babyNameUpvote.js<|end_file_name|><|fim▁begin|>var doc = require('dynamodb-doc');
var dynamodb = new doc.DynamoDB();
exports.handler = function(event, context) {
console.log(JSON.stringify(event, null, ' '));
var bname = event.name.replace(/\W/g, '');
bname = bname.charAt(0).toUpperCase(... | });
}; |
<|file_name|>models.rs<|end_file_name|><|fim▁begin|>use rocket::serde::{Deserialize, Serialize};
use sqlx::FromRow;
#[derive(Serialize)]
pub struct Message {
pub message: &'static str,
}
#[allow(non_snake_case)]
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize, FromRow)]
#[serde(crate = "rocket::serde")]
... |
#[allow(non_snake_case)] |
<|file_name|>ResolutionSelection.py<|end_file_name|><|fim▁begin|>from Screen import Screen
from Screens.ChoiceBox import ChoiceBox
class ResolutionSelection(Screen):
def __init__(self, session, infobar=None):
Screen.__init__(self, session)
self.session = session
xresString = open("/proc/stb/vmpeg/0/xres", "r")... | if isinstance(Resolution[1], str):
if Resolution[1] == "exit": |
<|file_name|>StoriesParser.java<|end_file_name|><|fim▁begin|>package net.spy.digg.parsers;
import java.io.IOException;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import net.spy.digg.Story;
/**
* Parse a stories response.<|fim▁hole|> protected String getRootElementNam... | */
public class StoriesParser extends TimePagedItemParser<Story> {
@Override |
<|file_name|>scheduleexceptions.py<|end_file_name|><|fim▁begin|>from eisoil.core.exception import CoreException
class ScheduleException(CoreException):
def __init__(self, desc):
self._desc = desc
def __str__(self):
return "Schedule: %s" % (self._desc,)<|fim▁hole|>
class ScheduleOverbook... | |
<|file_name|>recipe-577031.py<|end_file_name|><|fim▁begin|>"""
Author: Lloyd Moore <lloyd@workharderplayharder.com>
Usage:
print perm("01", 2)
> ["00", "01", "10", "11"]
print perm("abcd", 2)
> [ 'aa', 'ab', 'ac', 'ad',
'ba', 'bb', 'bc', 'bd',
'ca', 'cb', 'cc', 'cd',
'da', 'db', 'dc', 'dd' ]
"""
def pe... | if type(w) == type(""): wrds.append(w)
return wrds |
<|file_name|>osUtils.ts<|end_file_name|><|fim▁begin|>// Copied from https://github.com/fwcd/vscode-kotlin-ide and edited.
//
// Originaly licensed:
//
// The MIT License (MIT)
//
// Copyright (c) 2016 George Fraser
// Copyright (c) 2018 fwcd
//
// Permission is hereby granted, free of charge, to any person obtaining a ... | return binname + (process.platform === "win32" ? ".exe" : "");
}
|
<|file_name|>common.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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/lic... | |
<|file_name|>htmlolistelement.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 dom::bindings::codegen::HTMLOListElementBinding;... | }
|
<|file_name|>editor_plugin_src.js<|end_file_name|><|fim▁begin|><|fim▁hole|> * @author Moxiecode
* @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
*/
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('nonbreaking');
var TinyMCE_NonBreakingPlugin = {
getInfo : f... | /**
* $Id$
* |
<|file_name|>TitaniumGeneraton.java<|end_file_name|><|fim▁begin|>package org.venice.venicemod.generations;
import java.util.Random;
import org.venice.venicemod.VeniceMod;
import cpw.mods.fml.common.IWorldGenerator;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
public class Titan... | this.setMaxVienSize( 15 );
} |
<|file_name|>metastore.py<|end_file_name|><|fim▁begin|><|fim▁hole|># distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. Yo... | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file |
<|file_name|>clangextractor.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*-
import os
from clang.cindex import Config, Index, TypeKind
class ClangExtractor(object):
def __init__(self, libclang_path, srcdir):
if Config.library_file != libclang_path:<|fim▁hole|> def extract(self):
protos ... | Config.set_library_file(libclang_path)
self.srcdir = srcdir
|
<|file_name|>HelloWorldScene.cpp<|end_file_name|><|fim▁begin|>#include "HelloWorldScene.h"
#include ".\Scene\LevelScene.h"
#include ".\Entity\Umbrella.h"
#include "SimpleAudioEngine.h"
#include ".\Scene\SceneManager.h"
USING_NS_CC;
Scene* HelloWorld::createScene()
{
// 'scene' is an autorelease object
auto sc... | // 2. add a menu item with "X" image, which is clicked to quit the program
// you may modify it.
// add a "close" icon to exit the progress. it's an autorelease object |
<|file_name|>iaf_psc_alpha_presc.cpp<|end_file_name|><|fim▁begin|>/*
* iaf_psc_alpha_presc.cpp
*
* This file is part of NEST.
*
* Copyright (C) 2004 The NEST Initiative
*
* NEST is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*... | |
<|file_name|>panelSlider.js<|end_file_name|><|fim▁begin|>$.widget( "alexandra.panelSlider", {
options: {
currentView: null, // The panel currently in focus
panels:[] // All panels added to the navigation system
},
//The constructor of the panelSLide widget
_create: function() {
... | |
<|file_name|>mpi_helloworld.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.<|fim▁hole|># Unless required by applicable law or agreed to in writing, sof... | # You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
# |
<|file_name|>_wav.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""WAV file IO functions
"""
import numpy as np
from scipy.io import wavfile
from os import path as op
import warnings
from .._utils import verbose_dec, logger, _has_scipy_version
@verbose_dec
def read_wav(fname, verbose=None):
"""Read in... | data = (data * max_val).astype(dtype) |
<|file_name|>github_repository.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2016-Today: Odoo Community Association (OCA)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from openerp import model... | #### # Delete all issues versions # TODO |
<|file_name|>core.js<|end_file_name|><|fim▁begin|>define(["jquery", "underscore", "backbone"], function ($,_,Backbone) {
/* *****************************************************************************************************************
Prototype Inheritance
*******************************************************... |
/**
Uses a curried fn() to replace key/values in options{} |
<|file_name|>0005_application_new_att.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-03-11 11:56
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('equinox_api', '0004_ope... | field=models.BooleanField(default=True), |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
Provides functionality to interact with hvacs.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/hvac/
"""
import logging
import os
from homeassistant.helpers.entity_component import EntityComponen... | ATTR_SWING_LIST = "swing_list" |
<|file_name|>builder.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/. */
//! Helper module to build up a selector safely and efficient... | spec.0 |= HAS_SLOTTED_BIT; |
<|file_name|>basicserver.py<|end_file_name|><|fim▁begin|>#/usr/bin/env python
#Base Server -Chapter three -basicserver.py
import socket, traceback
host=''
port=8080
s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind((host, port))
print "Waiting for connec... | except:
traceback.print_exc() |
<|file_name|>tower_job_launch.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.com>
#
# This module 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 F... | |
<|file_name|>dromedary.ts<|end_file_name|><|fim▁begin|>import { Camel } from "../camel";
import { IAttackPerformer } from "../../abilities/attack-performer";<|fim▁hole|>
constructor(turboBoost: IBooster,
weapon: IAttackPerformer,
strength = 0,
positionAtLane = 0) {
super(... | import { IBooster } from "../../abilities/booster";
export class Dromedary extends Camel { |
<|file_name|>Slider.js<|end_file_name|><|fim▁begin|>/**************************************
{
x:0, y:0, width:433,
min:1, max:25, step:1,
message: "rules/turns"
}
**************************************/
function Slider(config){
var self = this;
self.id = config.id;
// Create DOM
var dom = document.createElemen... | unlisten(self); |
<|file_name|>studio_locale.js<|end_file_name|><|fim▁begin|>var appLocale = {lc:{"ar":function(n){
if (n === 0) {
return 'zero';
}
if (n == 1) {
return 'one';
}
if (n == 2) {
return 'two';
}
if ((n % 100) >= 3 && (n % 100) <= 10 && n == Math.floor(n)) {
return 'few';
}
if ((n % 100) >= ... | "setSpriteSpeedVerySlow":function(d){return "to a very slow speed"},
"setSpriteSpeedSlow":function(d){return "to a slow speed"}, |
<|file_name|>docker_build_context_test.py<|end_file_name|><|fim▁begin|># Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from textwrap import dedent
import pytest
from pants.backend.docker.subsystems.... | |
<|file_name|>bestpractice.py<|end_file_name|><|fim▁begin|>from docutils.parsers.rst import Directive, directives
from docutils import nodes
from docutils.parsers.rst.directives.admonitions import BaseAdmonition
from sphinx.util import compat
compat.make_admonition = BaseAdmonition
from sphinx import addnodes
from sph... | required_arguments = 0 |
<|file_name|>jquery-functions.js<|end_file_name|><|fim▁begin|>// JavaScript Document
$(document).ready(function() {
$('form input[type="file"]').change(function() {
var filename = $(this).val();
$(this).prev('i').text(filename);
});
$('.input-file').click(function() {
$(this).find('input').click();
});
/... | var ori_text = $(this).prev('li').find('a').text();
$(this).prev('li').find('a').html(ori_text+'<span class="fa ellipsis"></span>');
});
|
<|file_name|>SettingsServices.js<|end_file_name|><|fim▁begin|>'use strict';
angular.module('myApp.setting')
.factory('SettingServices', ['$http', '$q', '$timeout',
function ($http, $q, $timeout) {
var obj = {};
obj.getMyCfg = function() {
var srvUrl;
... | }
return obj;
}]) |
<|file_name|>userconfirmationpassword.go<|end_file_name|><|fim▁begin|>package apimanagement
// 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.
// Chan... | return |
<|file_name|>metrics.go<|end_file_name|><|fim▁begin|>// Copyright 2018 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
/... | prometheus.MustRegister(SessionRetryErrorCounter) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.