prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>setup_basic.py<|end_file_name|><|fim▁begin|>from akara.dist import setup
setup(name="basic",<|fim▁hole|><|fim▁end|> | version="1.0",
akara_extensions=["blah.py"]
) |
<|file_name|>webglprogram.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://www.khronos.org/registry/webgl/specs/latest/... |
shader_slot.set(Some(shader)); |
<|file_name|>kaltura.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals
import re
import base64
from .common import InfoExtractor
from ..compat import (
compat_urlparse,
compat_parse_qs,
)
from ..utils import (
clean_html,
ExtractorError,
int_or_none,
unsmu... | for f in flavor_assets:
# Continue if asset is not ready
if f.get('status') != 2:
continue |
<|file_name|>RoomCollectionView.java<|end_file_name|><|fim▁begin|>package com.github.cypher.gui.root.roomcollection;<|fim▁hole|>
public class RoomCollectionView extends FXMLView {
}<|fim▁end|> |
import com.airhacks.afterburner.views.FXMLView; |
<|file_name|>BaseSchedulingAlgorithm.java<|end_file_name|><|fim▁begin|>/**
* Copyright 2012-2013 University Of Southern California
*
* 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... | * @param list
*/
@Override |
<|file_name|>SubCommand.java<|end_file_name|><|fim▁begin|>/*
* _____ _ _ _____ _
* | __ \| | | | / ____| | |
* | |__) | | ___ | |_| (___ __ _ _ _ __ _ _ __ ___ __| |
* | ___/| |/ _ \| __|\___ \ / _` | | | |/ _` |... | * Copyright (C) 2021 IntellectualSites
* |
<|file_name|>woeidfromquery.py<|end_file_name|><|fim▁begin|>import MySQLdb
import urllib2, urllib, re, sys
import xml
from datetime import datetime
## gets woeid from query -helper function
def getwoeid(searchstring):
try:
import xml.etree.ElementTree as ET
namespaces = {'yweather': 'http://www.yahooapis.com/v1/b... | f = urllib2.urlopen(url)
xmldata = f.read() |
<|file_name|>metric-collection.py<|end_file_name|><|fim▁begin|># !/usr/bin python
"""
#
# data-collect.py contain the python program to gather Metrics from vROps. Before you run this script
# set-config.py should be run once to set the environment
# Author Sajal Debnath <sdebnath@vmware.com>
#
"""
# Importing the Mod... | # Getting the metric data for all the resources which match the criteria
alldata = get_metric_data(resourceknd,adapter,key,sampleno )
# Creating final parameters for output JSON file |
<|file_name|>decorators.ts<|end_file_name|><|fim▁begin|>import {
ComponentAnnotation,
DirectiveAnnotation,
ComponentArgs,
DirectiveArgs
} from './annotations';
import {ViewAnnotation, ViewArgs} from './view';
import {AttributeAnnotation, QueryAnnotation} from './di';
import {makeDecorator, makeParamDecorator, T... | export var Attribute = makeParamDecorator(AttributeAnnotation);
export var Query = makeParamDecorator(QueryAnnotation); |
<|file_name|>webpack.test.config.js<|end_file_name|><|fim▁begin|>'use strict';
// This is the webpack config used for JS unit tests
const Encore = require('@symfony/webpack-encore');
const encoreConfigure = require('./webpack.base.config');
const webpackCustomize = require('./webpack.customize');
// Initialize Encore... | if ((plugin instanceof ManifestPlugin) && plugin.opts) {
plugin.opts.writeToFileEmit = false; |
<|file_name|>lexical_syntactic_featurizer.py<|end_file_name|><|fim▁begin|>from __future__ import annotations
import logging
from collections import OrderedDict
import scipy.sparse
import numpy as np
from typing import (
Any,
Dict,
Text,
List,
Tuple,
Callable,
Set,
Optional,
Type,
... | self._feature_config = self._config[FEATURES]
self._set_feature_to_idx_dict( |
<|file_name|>0006_scheduleexperience.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('schedules', '0005_auto_20171010_1722'),
]
oper... | fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), |
<|file_name|>stackoverflow.py<|end_file_name|><|fim▁begin|>"""
Stackoverflow OAuth2 backend, docs at:
https://python-social-auth.readthedocs.io/en/latest/backends/stackoverflow.html
"""
from .oauth import BaseOAuth2
class StackoverflowOAuth2(BaseOAuth2):
"""Stackoverflow OAuth2 authentication backend"""
n... | ACCESS_TOKEN_METHOD = 'POST' |
<|file_name|>find-remaining-departures-for-stop.test.ts<|end_file_name|><|fim▁begin|>import {findRemainingDeparturesForStop} from '../find-remaining-departures-for-stop'
import {getScheduleForNow} from '../get-schedule-for-now'
import {getCurrentBusIteration} from '../get-current-bus-iteration'
import {processBusSched... | |
<|file_name|>posix_libentry.cpp<|end_file_name|><|fim▁begin|>/******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2016-2019 Baldur Karlsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and a... | RenderDoc::Inst().SetCaptureFileTemplate(capturefile);
}
std::string curfile; |
<|file_name|>bitcoin_fi.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="fi" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About AlessioCoin</source>
<translation>Tietoa Alessi... | <location line="+81"/>
<source>The entered address does not refer to a key.</source> |
<|file_name|>node_plug_timeline.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
author: sanja7s
---------------
plot the distribution
"""
import os
import datetime as dt
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from collections import ... | """
|
<|file_name|>write.go<|end_file_name|><|fim▁begin|>// Copyright 2017 ETH Zurich
// Copyright 2018 ETH Zurich, Anapaya Systems
//
// 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:... | var err error
var lastNextHdr *uint8
offset := 0
|
<|file_name|>Provider.spec.js<|end_file_name|><|fim▁begin|>/*eslint-disable react/prop-types*/
import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import { createStore } from 'redux'
import { Provider, connect, ReactReduxContext } from '../../src/index.js'
import * as rtl from '@testing-library/r... | |
<|file_name|>metadata.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licens... | #[derive(PartialEq, Deserialize, Serialize)]
pub struct ErrorLocation {
pub filename: String, |
<|file_name|>main.py<|end_file_name|><|fim▁begin|>from couchpotato import get_session
from couchpotato.api import addApiView
from couchpotato.core.event import addEvent, fireEvent, fireEventAsync
from couchpotato.core.helpers.encoding import simplifyString, toUnicode
from couchpotato.core.helpers.request import jsonifi... |
name = nzb['name']
size = nzb.get('size', 0)
nzb_words = re.split('\W+', simplifyString(name)) |
<|file_name|>Markers.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the Clear BSD license.
* See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @... | moveTo:function(bounds, zoomChanged, dragging) {
OpenLayers.Layer.prototype.moveTo.apply(this, arguments);
if (zoomChanged || !this.drawn) {
|
<|file_name|>fft3d.cpp<|end_file_name|><|fim▁begin|>// clang-format off
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyr... | flag = 0;
else |
<|file_name|>VerifyPreorderSequenceinBinarySearchTree.py<|end_file_name|><|fim▁begin|>__source__ = 'https://leetcode.com/problems/verify-preorder-sequence-in-binary-search-tree/description/'
# https://github.com/kamyu104/LeetCode/blob/master/Python/verify-preorder-sequence-in-binary-search-tree.py
# Time: O(n)
# Space... | # means that we are still traversing to the left subtree,
# if we find out the current index is bigger than the previous one we traverse it
# means that we are on the right subtree or the right hand side of the bst |
<|file_name|>block_limits.rs<|end_file_name|><|fim▁begin|>extern crate blockstack_lib;
extern crate serde_json;
use blockstack_lib::{
chainstate::stacks::index::storage::{TrieFileStorage},
chainstate::burn::BlockHeaderHash,
vm::types::{QualifiedContractIdentifier},
vm::database::{MarfedKV, NULL_HEADER_... | use std::fmt::Write; |
<|file_name|>UriEncoderTest.java<|end_file_name|><|fim▁begin|>/**
* Copyright (c) 2008-2011, http://www.snakeyaml.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
*
* htt... | public class UriEncoderTest extends TestCase {
|
<|file_name|>phonon_calculator.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import shutil
import time
import subprocess
import numpy as np
from .phonopy_conf_creator import PhonopyConfCreator
from vasp.poscar import Poscar
from autotools i... | self._variables = None
self._home = os.path.expanduser("~") |
<|file_name|>calculations_and_variables.py<|end_file_name|><|fim▁begin|>print("-------------- assigning numbers -----------")
fred =100
print(fred)<|fim▁hole|>
fred = 200
print(fred)
print(fred)
john = fred
fred = john
print("-------------- assigning letters -----------")
adam = "jj"
print(adam)
print("------------... | print(fred) |
<|file_name|>preview_measure.py<|end_file_name|><|fim▁begin|>import re
import sys
import requests
from django.conf import settings
from django.core.management import BaseCommand
from requests.exceptions import InvalidJSONError, RequestException
from .import_measures import BadRequest
from .import_measures import Comm... | ) |
<|file_name|>scope.rs<|end_file_name|><|fim▁begin|>use std::any::Any;
use std::marker::PhantomData;
use std::sync::atomic::{AtomicPtr, Ordering};
use std::sync::Arc;
use std::{mem, ptr};
use super::job::HeapJob;
use super::latch::{CountLatch, Latch};
use super::scheduler::{Scheduler, WorkerThread};
use super::unwind;
... | |
<|file_name|>graphModel.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""<|fim▁hole|>
from protoExt.utils.utilsBase import Enum, getClassName
from protoExt.utils.utilsConvert import slugify2
class GraphModel():
def __init__(self):
self.tblStyle = False
self.dotSource = 'digraph S... | Prototype to DOT (Graphviz) converter by Dario Gomez
Table format from django-extensions
""" |
<|file_name|>gajim-remote.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*-
## src/gajim-remote.py
##
## Copyright (C) 2005-2006 Dimitur Kirov <dkirov AT gmail.com>
## Nikos Kouremenos <kourem AT gmail.com>
## Copyright (C) 2005-2014 Yann Leboulanger <asterix AT lagaule.org>
## Copyright (C... | Return help message for a given command
""" |
<|file_name|>crypto.rs<|end_file_name|><|fim▁begin|>use gcrypt;
use gcrypt::mpi;
use gcrypt::sexp;
use gcrypt::digest;
<|fim▁hole|>
#[cfg(feature = "keybase")]
use gcrypt::kdf;
use pgp;
pub type Token = gcrypt::Token;
pub type Result<T> = gcrypt::error::Result<T>;
pub struct PubKey {
key: sexp::SExpression,
... | #[cfg(feature = "keybase")]
use gcrypt::mac; |
<|file_name|>Run_456570_Score_100_Date_2014-02-05.cpp<|end_file_name|><|fim▁begin|>#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
const int maxn = 100005, MOD = 99999997, inf = ~0u<<1;
int a[maxn], b[maxn], c[maxn], n, L[maxn], R[maxn], ans;
int find(int l, int r, int key) {
... | int m = (l+r) >> 1;
merge_sort(arr, l, m);
merge_sort(arr, m, r);
int i, j;
|
<|file_name|>test_connection_schema.py<|end_file_name|><|fim▁begin|># Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you un... | 'port': None, |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>"use strict";
exports.__esModule = true;
exports.default = void 0;
var React = _interopRequireWildcard(require("react"));
var _createElement = _interopRequireDefault(require("../createElement"));
var _css = _interopRequireDefault(require("../StyleSheet/css"));
var... | disabled: true,
importantForAccessibility: true,
nativeID: true, |
<|file_name|>namespace_resolver.py<|end_file_name|><|fim▁begin|># Copyright 2016 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 os
from cpp_namespace_environment import CppNamespaceEnvironment
from model import Mo... | '''Returns the model.Namespace object where the type with the given |
<|file_name|>event_type.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class EventType(models.Model):
_inherit = "event.type"
community_menu = fields.Boolean(
"Community Menu", co... | help="Display community tab on website")
|
<|file_name|>stepper-demo.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {Component, OnInit} from '@angular/core';
import {Th... |
steps = [ |
<|file_name|>stack.rs<|end_file_name|><|fim▁begin|>// This file is part of libfringe, a low-level green threading library.
// Copyright (c) Nathan Zadoks <nathan@nathan7.eu>
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or<|fim▁hole|>// http://opensource.org/licenses/MIT>, at your option. This file... | // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or |
<|file_name|>stringer.go<|end_file_name|><|fim▁begin|>// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Stringer is a tool to automate the creation of methods that satisfy the fmt.Stringer
// interface. Give... | j++
}
} |
<|file_name|>align.PE.py<|end_file_name|><|fim▁begin|>import sys
import os
import re<|fim▁hole|>bowtie2_logfh = open(prefix+'.bowtie2.log','w')
bamfile = prefix+'.bam'
bowtie2_cmd = ['bowtie2', '-x', db, '-1', fq1, '-2', fq2]
samtools_view = ['samtools', 'view', '-bhS', '-']
samtools_sort = ['samtools', 'sort', '-', pr... | from subprocess import PIPE, Popen, call
fq1, fq2, db, prefix = sys.argv[1:] |
<|file_name|>virus_clean.py<|end_file_name|><|fim▁begin|># clean sequences after alignment, criteria based on sequences
# make inline with canonical ordering (no extra gaps)
import os, datetime, time, re
from itertools import izip
from Bio.Align import MultipleSeqAlignment<|fim▁hole|>class virus_clean(object):
"""doc... | from Bio.Seq import Seq
from scipy import stats
import numpy as np
|
<|file_name|>scrollspy.js<|end_file_name|><|fim▁begin|>require('./navbar-list');
class ScrollSpy {
/**
* @param {NavBarList} navBarList
* @param {number} offset
*/
constructor (navBarList, offset) {
this.navBarList = navBarList;
this.offset = offset;
}
scrollEventListene... | |
<|file_name|>jquery_http.js<|end_file_name|><|fim▁begin|>// Copyright 2011 Splunk, 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.... | dataType: "json",
success: utils.bind(this, function(data, error, res) { |
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
flags "github.com/jessevdk/go-flags"
"code.xoeb.us/cryptdo/cryptdo"
"code.xoeb.us/cryptdo/cryptdo/internal/flag"
)
var opts struct {
Old string `short:"o" long:"old-passphrase" description:"... | |
<|file_name|>pr42760.C<|end_file_name|><|fim▁begin|>// PR middle-end/42760<|fim▁hole|>template <typename T>
struct A
{
static T b (T it) { return it; }
};
template <typename T, typename U>
static U
baz (T x, T y, U z)
{
for (long n = y - x; n > 0; --n)
{
*z = *x;
++z;
}
};
template <typename T... | // { dg-do compile }
|
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#[derive(Debug, PartialEq)]
pub struct Clock {
hours: i16,
minutes: i16,
}
impl Clock {<|fim▁hole|>
pub fn add_minutes(mut self, n: i16) -> Self {
self.minutes += n;
self.normalize()
}
pub fn to_string(&self) -> String {
form... | pub fn new(hours: i16, minutes: i16) -> Self {
Clock { hours, minutes }.normalize()
} |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/*
* Copyright (c) Meta Platforms, Inc. and affiliates.<|fim▁hole|> * GNU General Public License version 2.
*/
//! # configmodel
//!
//! Provides a trait definition for config reading.
pub mod config;
pub mod convert;
pub mod error;
pub use config::Config;
pub use c... | *
* This software may be used and distributed according to the terms of the |
<|file_name|>admin_connection.py<|end_file_name|><|fim▁begin|>__author__ = "Konstantin Osipov <kostja.osipov@gmail.com>"
# 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 must retain t... | # validate yaml by parsing it
try:
yaml.load(res)
finally: |
<|file_name|>crateresolve3.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.
//<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or... | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or |
<|file_name|>Frete.java<|end_file_name|><|fim▁begin|>/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.freteplanejado.entity;
/**
*
* @author 43596980895
*/
public class... | |
<|file_name|>message_blockdata.rs<|end_file_name|><|fim▁begin|>// Rust Bitcoin Library
// Written in 2014 by
// Andrew Poelstra <apoelstra@wpsoftware.net>
//
// To the extent possible under law, the author(s) have dedicated all
// copyright and related and neighboring rights to this software to
// the public domain... | version: constants::PROTOCOL_VERSION,
locator_hashes: locator_hashes.clone(),
stop_hash: stop_hash |
<|file_name|>designators.rs<|end_file_name|><|fim▁begin|>use parser::ArgumentSplitter;
use shell::Shell;
use std::{borrow::Cow, str};
bitflags! {
struct Flags: u8 {
const DQUOTE = 1;
const SQUOTE = 2;
const DESIGN = 4;
}
}
#[derive(Debug)]
enum Token<'a> {
Designator(&'a str),
... | b'"' if !self.flags.contains(Flags::SQUOTE) => self.flags ^= Flags::DQUOTE,
b'\'' if !self.flags.contains(Flags::DQUOTE) => self.flags ^= Flags::SQUOTE, |
<|file_name|>font_cache_thread.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use font_template::{FontTemplate, FontTemplateDescr... | if maybe_template.is_some() {
return maybe_template;
} |
<|file_name|>inspector_qt.py<|end_file_name|><|fim▁begin|># -*- Mode:Python -*-
##########################################################################
# #
# This file is part of AVANGO. #
# ... | def updateFieldModel(self,index):
print "activate index: " + str(index.row()) + " " + str(index.data()) |
<|file_name|>angular-loading-bar.js<|end_file_name|><|fim▁begin|>/*!
* angular-loading-bar v0.8.0
* https://chieffancypants.github.io/angular-loading-bar
* Copyright (c) 2015 Wes Cruver
* License: MIT
*/
/*<|fim▁hole|> * intercepts XHR requests and creates a loading bar.
* Based on the excellent nprogress work b... | * angular-loading-bar
* |
<|file_name|>extreme_exc.py<|end_file_name|><|fim▁begin|># test some extreme cases of allocating exceptions and tracebacks
import micropython
# Check for stackless build, which can't call functions without
# allocating a frame on the heap.
try:
def stackless():<|fim▁hole|> micropython.heap_lock()
stackles... | pass
|
<|file_name|>NFSServer.java<|end_file_name|><|fim▁begin|>package org.anarres.qemu.qapi.api;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;<|fim▁hole|>import edu.umd.cs.findbugs.annotations.SuppressFBWarnings... | import com.fasterxml.jackson.annotation.JsonUnwrapped; |
<|file_name|>MethodParser.java<|end_file_name|><|fim▁begin|>package the.bytecode.club.bytecodeviewer.util;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.regex.Pattern;
/***************************************************************************
* Byt... | |
<|file_name|>registry.py<|end_file_name|><|fim▁begin|># This file is part of the GOsa framework.
#
# http://gosa-project.org
#
# Copyright:
# (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de
#
# See the LICENSE file in the project's top-level directory for details.
import pkg_resources
from gosa.common.compone... | backends = {} |
<|file_name|>arrow.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use ArrowType;
use Buildable;
use Misc;
use ShadowType;
use Widget;
use ffi;
use glib::StaticType;
use glib::Value;
use glib::objec... | use glib::signal::SignalHandlerId;
use glib::signal::connect_raw;
use glib::translate::*; |
<|file_name|>pages.py<|end_file_name|><|fim▁begin|>from django.conf import settings
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.contrib.auth import authenticate, login, logout
from django.core.context_processors import csrf
from skilltreeapp.forms import LoginF... | notification.user = request.user |
<|file_name|>game.rs<|end_file_name|><|fim▁begin|>use time;
use std::rand;
use std::rand::Rng;
use std::mem;
use cgmath::point::{Point2};
use cgmath::vector::{Vec2};
use cgmath::aabb::{Aabb2};
use color::rgb::consts::*;
use calx::app::App;
use calx::app;
use calx::renderer::Renderer;
use calx::renderer;
use calx::rec... |
pub fn attack(&mut self, _agent_idx: uint, target_idx: uint) {
// TODO: More interesting logic.
//self.mobs.remove(target_idx); |
<|file_name|>RecordStats.java<|end_file_name|><|fim▁begin|>package bamboo.crawl;
import java.util.Date;
import java.util.concurrent.TimeUnit;
public class RecordStats {
private static final Date MAX_TIME = new Date(System.currentTimeMillis() + TimeUnit.DAYS.toMillis(900));
private static final Date MIN_TIME =... | ", recordBytes=" + recordBytes +
", startTime=" + startTime + |
<|file_name|>dictionary.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
def get_comma_split_names( name ):
split_name_list = [name]
if ',' in name:
split_name_list = name.split(",")
elif ';' in name:
split_name_list = name.split(";")
for i in r... | for value in values:
|
<|file_name|>Layout.tsx<|end_file_name|><|fim▁begin|>import Colors from "v2/Assets/Colors"
import { avantgarde } from "v2/Assets/Fonts"
import { Component } from "react";
import styled from "styled-components"
import MultiStateButton, {
MultiButtonState,
} from "../../Buttons/MultiStateButton"
import { media } from "... | |
<|file_name|>initial.rs<|end_file_name|><|fim▁begin|>use git::Config;
use helpers;
use author::Author;
use author_selection::AuthorSelection;
use xdg::BaseDirectories;
use Result;
use CannotProcede;
pub fn initial() -> Result<Config> {
let xdg_dirs = BaseDirectories::with_prefix("partners")?;
let config_path ... | helpers::query_optional("Email").ok().and_then(|v| v)
});
|
<|file_name|>PlatformBinder.java<|end_file_name|><|fim▁begin|>package com.benjaminsproule.platform.binder;<|fim▁hole|>
public class PlatformBinder extends AbstractBinder {
@Override
protected void configure() {
bind(Properties.class).to(Properties.class);
}
}<|fim▁end|> |
import com.benjaminsproule.platform.Properties;
import org.glassfish.hk2.utilities.binding.AbstractBinder; |
<|file_name|>encodedword.py<|end_file_name|><|fim▁begin|># coding:utf-8
import logging
import regex as re
import email.quoprimime
import email.base64mime
from base64 import b64encode
from flanker.mime.message import charsets, errors
log = logging.getLogger(__name__)
#deal with unfolding
foldingWhiteSpace = re.comp... | # no match? append the remainder |
<|file_name|>urpc_test.go<|end_file_name|><|fim▁begin|>// Copyright 2018 The gVisor 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/LICEN... | }
func TestSendFile(t *testing.T) {
c, err := testClient() |
<|file_name|>LunchAudioTrack.java<|end_file_name|><|fim▁begin|>package org.schabi.newpipe.player;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.AsyncTask;
import android.preference.PreferenceManager;
import android.support.annot... | }
public void retrieveBitmap(final Runnable callback) {
hasLoadBitmap = true; |
<|file_name|>embedded_worker_devtools_agent.cc<|end_file_name|><|fim▁begin|>// Copyright 2014 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 "content/renderer/service_worker/embedded_worker_devtools_agent.h"
#... | |
<|file_name|>load.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Created on Sun Jan 8 14:45:26 2017
@author: leonidas
"""
import numpy as np
import operator
def classify(inputPoint,dataSet,labels,k):
dataSetSize = dataSet.shape[0]
diffMat = np.tile(inputPoint,(dataSetSize,1))-dataSet
s... | voteIlabel = labels[ sortedDistIndicies[i] ] |
<|file_name|>EnumHealth.go<|end_file_name|><|fim▁begin|>// Code generated by msgraph.go/gen DO NOT EDIT.
package msgraph
// HealthState undocumented
type HealthState string
const (
// HealthStateVUnknown undocumented
HealthStateVUnknown HealthState = "unknown"
// HealthStateVHealthy undocumented
HealthStateVHeal... | HealthStateVUnhealthy HealthState = "unhealthy" |
<|file_name|>hex.py<|end_file_name|><|fim▁begin|>r"""
Examples
--------
::
* - *
/ \ / \
* - * - *
/ \ / \ / \
* - * - * - *
\ / \ / \ /
* - * - *
\ / \ /
* - *
>>> from landlab.graph import TriGraph
>>> graph = TriGraph((5, 2), node_layout="hex", sort=True)
>>... | n_cols // 2,
)
@staticmethod |
<|file_name|>tags.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2011 Jaap Karssenberg <jaap.karssenberg@gmail.com>
import tests
import gtk
import pango
from zim.index import Index, IndexPath, IndexTag
from zim.notebook import Path
from zim.gui.pageindex import FGCOLOR_COL, \
EMPTY_COL, NAME_C... | # Explicitly don't import * from pageindex, make clear what we re-use
from zim.config import ConfigDict
from zim.plugins.tags import *
|
<|file_name|>webhooklog.routes.ts<|end_file_name|><|fim▁begin|>import { MongoQuery } from '@andes/core';
import { ResourceBase } from '@andes/core';
import { WebHookLog } from './webhooklog.schema';
<|fim▁hole|> Model = WebHookLog;
resourceName = 'log';
keyId = '_id';
searchFileds = {
url: Mongo... | class WebhookLogResource extends ResourceBase { |
<|file_name|>partial_cmp.rs<|end_file_name|><|fim▁begin|>#![feature(core)]
extern crate core;
// macro_rules! e {
// ($e:expr) => { $e }
// }
// macro_rules! tuple_impls {
// ($(
// $Tuple:ident {
// $(($idx:tt) -> $T:ident)+
// }
// )+) => {
... | {
let left: ($($T,)+) = ($($T::default() + 1 as $T,)+); |
<|file_name|>awscreds-custom.py<|end_file_name|><|fim▁begin|>#!/usr/local/bin/python3
import sys
import boto3
import os
from botocore.exceptions import ClientError
import json
import argparse
from botocore.utils import InstanceMetadataFetcher
from botocore.credentials import InstanceMetadataProvider
import platform
r... | |
<|file_name|>adjancency_list.rs<|end_file_name|><|fim▁begin|>extern crate fasttrack;
use fasttrack::adjancency_list;
use fasttrack::edge::Edge;
use fasttrack::route_node::RouteNode;
#[test]
fn adjancency_list_is_built_correctly() {
let mut routes:Vec<RouteNode> = Vec::new();
routes.push(RouteNode{from: 0, to: 0... |
assert_eq!(3, adj_list.len());
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import platform
from .clipboard import Clipboard
__version__ = '1.0.0'
def get_clipboard(handle=None):
system = platform.system().lower()
if 'windows' == system:
from . import win_clipboard
clip = win_clipboard.WinClipboard(handle)
e... | raise NotImplementedError("Clipboard not available for MacOS yet")
|
<|file_name|>closure-substs.rs<|end_file_name|><|fim▁begin|>#![feature(nll)]
// Test that we enforce user-provided type annotations on closures.
fn foo<'a>() {
// Here `x` is free in the closure sig:
|x: &'a i32| -> &'static i32 {
return x; //~ ERROR lifetime may not live long enough
};
}
fn foo1... | // Here `x` is bound in the closure sig: |
<|file_name|>response.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import json
import datetime
import mimetypes
import os
import frappe
from frappe import _
import frappe.model.document
import... | |
<|file_name|>sweep copie.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3.6
# -*- coding: utf-8 -*-
"""
Application ...
"""
# Copyright (C) 2017 by
# Emmanuel Desmontils <emmanuel.desmontils@univ-nantes.fr>
# Patricia Serrano-Alvarado <patricia.serrano-alvarado@univ-nantes.fr>
# All rights reserved.
#... | |
<|file_name|>SelectionModeAdapterItem.java<|end_file_name|><|fim▁begin|>package com.github.programmerr47.chords.representation.adapter.item;
/**
* Simple expansion of interface {@link AdapterItem} for organization of
* "selection mode".
*
* @author Michael Spitsin
* @since 2014-10-08
*/
public abstract class Sel... | * |
<|file_name|>services.ts<|end_file_name|><|fim▁begin|>import fs = require('fs');
import mySql = require('mysql');
import nodemailer = require('nodemailer');
// Choose config file
var args = process.argv.slice(2);
if (args[0] == 'dev') {
var configFile = __dirname + '/config/dev.json';
} else {<|fim▁hole|>
// Defi... | var configFile = __dirname + '/config/config.json';
} |
<|file_name|>PROC_O_IBK_WSYH_ECACCT.py<|end_file_name|><|fim▁begin|>#coding=UTF-8
from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext
from pyspark.sql.types import *
from datetime import date, datetime, timedelta
import sys, re, os
st = datetime.now()
conf = SparkConf().setAppName('PROC_O_IBK_WSY... |
#F_CI_WSYH_ECACCT = sqlContext.read.parquet(hdfs+'/F_CI_WSYH_ECACCT/*') |
<|file_name|>euclid.rs<|end_file_name|><|fim▁begin|>// Copyright 2019 The Servo 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... | } |
<|file_name|>cgram.rs<|end_file_name|><|fim▁begin|>//! CGRAM definitions and methods
use super::SnesRgb;
/// Color RAM size in Bytes
pub const CGRAM_SIZE: usize = 512;
byte_array!(pub Cgram[CGRAM_SIZE] with u16 indexing, save state please);
impl Cgram {
/// Looks up a color in CGRAM and returns the RGB color va... | |
<|file_name|>selector-css2.js<|end_file_name|><|fim▁begin|>/* YUI 3.9.0pr1 (build 202) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */
YUI.add('selector-css2', function (Y, NAME) {
/**
* The selector module provides helper methods allowing CSS2 Selectors to be used with DOM elements.
* @module dom
* @s... | |
<|file_name|>taginfolist.py<|end_file_name|><|fim▁begin|>from operator import itemgetter
from typing import Optional, cast
from libsyntyche.widgets import HBoxLayout, Label, Stretch, mk_signal1
from PyQt5 import QtGui, QtWidgets
from PyQt5.QtCore import Qt
from ..common import Settings
class TagInfoList(QtWidgets.Q... | self.percentage = percentage |
<|file_name|>IRequestHandler.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2016, baihw (javakf@163.com).
*
* 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... | |
<|file_name|>PlistReporter.cpp<|end_file_name|><|fim▁begin|>//===--- PlistReporter.cpp - ARC Migrate Tool Plist Reporter ----*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache... | |
<|file_name|>main.py<|end_file_name|><|fim▁begin|>"""
File Adapter Module
"""
import time
import uuid
from flask import request, jsonify
from ..base import BaseAdapter
class FileAdapter(BaseAdapter):
""" File Adapter Class """
def create_routes(self, app, mongo):
""" Routes Creator """
@app... | mongo.save_file(filename, request.files['file'], base = "datas")
return jsonify(filename)
|
<|file_name|>bigip_dns_cache_resolver.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metacl... | - To remove all forward zones, specify a value of C(none).
suboptions:
name: |
<|file_name|>selector-set.next.d.ts<|end_file_name|><|fim▁begin|>declare module 'selector-set/selector-set.next' {
interface ISelectorSetIndex {
name: string;
selector: (selector: string) => string | void;
element: (el: Element) => Array<string> | void;
}
class SelectorSet<T> {
size: number;
... | } |
<|file_name|>nb_header_footer.cpp<|end_file_name|><|fim▁begin|>#include "cbase.h"
#include "nb_header_footer.h"
#include "vgui_controls/Label.h"
#include "vgui_controls/ImagePanel.h"
#include <vgui/ISurface.h>
#include "vgui_hudvideo.h"
//#include "sdk_video.h"
#include "VGUIMatSurface/IMatSystemSurface.h"
#include "hl... | |
<|file_name|>functions_6.js<|end_file_name|><|fim▁begin|><|fim▁hole|> ['operator_5e',['operator^',['../class_complex.html#a952d42791b6b729c16406e21f9615f9f',1,'Complex']]]
];<|fim▁end|> | var searchData=
[
['operator_2a',['operator*',['../class_complex.html#a789de21d72aa21414c26e0dd0966313a',1,'Complex']]],
['operator_2b',['operator+',['../class_complex.html#a5a7bc077499ace978055b0e6b9072ee9',1,'Complex']]], |
<|file_name|>Category.java<|end_file_name|><|fim▁begin|>package es.task.switcher.model.entities;
import com.mobandme.ada.Entity;<|fim▁hole|>import com.mobandme.ada.annotations.TableField;
@Table(name = "Category")
public class Category extends Entity{
@TableField(name = "name", datatype = DATATYPE_STRING, maxLength... | import com.mobandme.ada.annotations.Table; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.