prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>line_echo.rs<|end_file_name|><|fim▁begin|>// notty is a new kind of terminal emulator.
// Copyright (C) 2015 without boats
//
// 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 Fo... | Command { |
<|file_name|>test_sgpr_regression.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
import os
import random
import unittest
import warnings
from math import exp, pi
import gpytorch
import torch
from gpytorch.distributions import MultivariateNormal
from gpytorch.kernels import InducingPointKernel, RBFKernel, Scal... | warnings.simplefilter("ignore", NumericalWarning) |
<|file_name|>filtered_record_array_test.js<|end_file_name|><|fim▁begin|>var Model;
module("Ember.FilteredRecordArray", {
setup: function() {
Model = Ember.Model.extend({
id: Ember.attr(),
name: Ember.attr()
});
Model.adapter = Ember.FixtureAdapter.create();
Model.FIXTURES = [
{id: ... | stop();
});
|
<|file_name|>plugin.py<|end_file_name|><|fim▁begin|>import glob, imp
import events
class EventManager:
def __init__(self):
self.Chat_Message_Event = events.ChatMessageEventHandler()
self.Player_Join_Event = events.PlayerJoinEventHandler()
self.Player_Leave_Event = events.PlayerLeaveEventHan... | |
<|file_name|>roman_numerals.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified,... | // 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.
// |
<|file_name|>user.service.ts<|end_file_name|><|fim▁begin|>export class UserService {
static store(user: any) {
localStorage.setItem('currentUser', user.UserToken);
localStorage.setItem('currentUserDetail', JSON.stringify(user));
}
static token() {
return localStorage.getItem('currentUser');
}
s... | |
<|file_name|>maximum_matching.py<|end_file_name|><|fim▁begin|>"""Weighted maximum matching in general graphs.
The algorithm is taken from "Efficient Algorithms for Finding Maximum
Matching in Graphs" by Zvi Galil, ACM Computing Surveys, 1986.
It is based on the "blossom" method for finding augmenting paths and
the "pr... | expandBlossom(s, endstage) |
<|file_name|>list_volume_groups_request_response.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache Lice... | Items []VolumeGroup `presentIn:"body"`
// For list pagination. When this header appears in the response, additional pages
// of results remain. For important details about how pagination works, see |
<|file_name|>runner.py<|end_file_name|><|fim▁begin|>"""
Run hugs pipeline.
"""
from __future__ import division, print_function
import os, shutil
from time import time
import mpi4py.MPI as MPI
import schwimmbad
from hugs.pipeline import next_gen_search, find_lsbgs
from hugs.utils import PatchMeta
import hugs
def ing... | |
<|file_name|>ia64-linux.py<|end_file_name|><|fim▁begin|>## Copyright 2001-2007 Virtutech AB
##
## The contents herein are Source Code which are a subset of Licensed
## Software pursuant to the terms of the Virtutech Simics Software
## License Agreement (the "Agreement"), and are being distributed under
## the Ag... | 1161 : [ "sched_setparam", ""],
1162 : [ "sched_getscheduler", ""],
1163 : [ "sched_setscheduler", ""], |
<|file_name|>_helpers.py<|end_file_name|><|fim▁begin|># Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#<|fim▁ho... | # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and |
<|file_name|>98.py<|end_file_name|><|fim▁begin|>test = "test of the localtime() function"
import time
times = [ 0, 100000, int (time.time()) ]
filedata = """
{$
for (i, %(times)s) {
locals { v : localtime(i) }
print ("${v[0]} ${v[1]} ${v[2]} ${v[3]} ${v[4]} ");
}
$}
""" % { "times" : times }
# i... | outcome_v += [ lt.tm_year, lt.tm_mon, lt.tm_mday, lt.tm_hour, lt.tm_min ]
|
<|file_name|>dom_html_html_element.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.git)
// DO NOT EDIT
use crate::DOMElement;
use crate::DOMEventTarget;
use crate::DOMHTMLElement;
use crate::DOMNode;
use crate::DOM... | impl<O: IsA<DOMHTMLHtmlElement>> DOMHTMLHtmlElementExt for O { |
<|file_name|>array_strings_are_equal.py<|end_file_name|><|fim▁begin|>from typing import List
class Solution:
def arrayStringsAreEqualV1(self, word1: List[str], word2: List[str]) -> bool:
return "".join(word1) == "".join(word2)
def arrayStringsAreEqualV2(self, word1: List[str], word2: List[str]) -> bo... | if c1 != c2:
return False |
<|file_name|>AgreeItem.web.js<|end_file_name|><|fim▁begin|>'use strict';
Object.defineProperty(exports, "__esModule", {
value: true<|fim▁hole|>
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
var _classCallCheck3 = _interopR... | });
exports["default"] = undefined;
var _defineProperty2 = require('babel-runtime/helpers/defineProperty'); |
<|file_name|>LoginActivity.java<|end_file_name|><|fim▁begin|>package com.habitrpg.android.habitica.ui.activities;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import andr... | } catch (Exception e) {
e.printStackTrace(); |
<|file_name|>u8.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/LIC... | use string::String;
|
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import numpy as np
import torch
import time
from torch.autograd import Variable
'''
fast beam search
'''
def repackage_hidden(h):
"""Wraps hidden states in new Variables, to detach them from their history."""
if type(h) == Variable:
return Variable(h.da... | beam_size, |
<|file_name|>models.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
def __init__(self, id_zone, name, region, description):
self.id = id_zone
self.name = name
self.region = region
self.description = description<|fim▁end|> | class Zone: |
<|file_name|>FilterByProbe.cpp<|end_file_name|><|fim▁begin|>#include "FilterByProbe.h"
#include "ProbeEvents.h"
#include "ProbeGlCalls.h"
#include "mmcore/CoreInstance.h"
#include "mmcore/EventCall.h"
#include "mmcore_gl/FlagCallsGL.h"
#include "mmcore_gl/utility/ShaderSourceFactory.h"
#include "probe/CallKDTree.h"
#i... |
// TODO set flags |
<|file_name|>angular-desktop-notification-tests.ts<|end_file_name|><|fim▁begin|>import * as angular from 'angular';
angular
.module('app', ['ngDesktopNotification'])
.config(['desktopNotificationProvider', (desktopNotificationProvider: angular.desktopNotification.IDesktopNotificationProvider) => {
desk... | // Request permission |
<|file_name|>issue-5521.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/lice... |
pub type map = Gc<HashMap<uint, uint>>; |
<|file_name|>0042_auto_20170507_2352.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-05-07 23:52
from __future__ import unicode_literals<|fim▁hole|>from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tableaubord', '... |
import datetime |
<|file_name|>bitcoin_lt.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="lt" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About GlobalDenomination</... | <location line="-217"/> |
<|file_name|>kmers.go<|end_file_name|><|fim▁begin|>// Copyright © 2018-2021 Wei Shen <shenwei356@gmail.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, includin... | }
|
<|file_name|>BuildMetadataServiceException.java<|end_file_name|><|fim▁begin|>package org.flysnow.cloud.buildmeta.ui.resteasy.exception;
import java.io.Serializable;
public class BuildMetadataServiceException extends RuntimeException implements Serializable {
private static final long serialVersionUID = 7786141544419... | }
public BuildMetadataServiceException(Throwable cause){
super(cause); |
<|file_name|>project.py<|end_file_name|><|fim▁begin|># Copyright 2014 Dietrich Epp.
# This file is part of SGLib. SGLib is licensed under the terms of the
# 2-clause BSD license. For more information, see LICENSE.txt.
import uuid as uuid_module
import xml.etree.ElementTree as etree
from ..util import indent_xml
from ... | if os.path.splitext(path)[1] != '.vcxproj':
raise UserError('invalid Visual Studio project extension')
with open(path, 'rb') as fp:
doc = etree.parse(fp) |
<|file_name|>gps_l1_ca_kf_tracking.cc<|end_file_name|><|fim▁begin|>/*!
* \file gps_l1_ca_kf_tracking.cc
* \brief Implementation of an adapter of a DLL + Kalman carrier
* tracking loop block for GPS L1 C/A signals
* \author Javier Arribas, 2018. jarribas(at)cttc.es
* \author Jordi Vila-Valls 2018. jvila(at)cttc.es
... | #include <glog/logging.h>
|
<|file_name|>invenio_2013_06_24_new_bibsched_status_table.py<|end_file_name|><|fim▁begin|><|fim▁hole|># Copyright (C) 2012 CERN.
#
# Invenio 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 ... | # -*- coding: utf-8 -*-
#
# This file is part of Invenio. |
<|file_name|>sim.py<|end_file_name|><|fim▁begin|>""" Pymulator simulation objects """
import json
import datetime
from .serialize import PandasNumpyEncoderMixIn, hook
def importmodel(s):
"""
Import model from string s specifying a callable. The string has the
following structure:
package[.packa... |
def loads(self, s):
return json.loads(s, hook=hook)
|
<|file_name|>App.js<|end_file_name|><|fim▁begin|>// App.js
import React from 'react';
import { browserHistory } from 'react-router';
// import components
import NavBar from './navbar/components/NavBar';
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {}
... | this.checkUser = this.checkUser.bind(this);
this.sendComponentsToStore = this.sendComponentsToStore.bind(this); |
<|file_name|>generate.py<|end_file_name|><|fim▁begin|>import resume.models as rmod
import random
import logging
from django.http import HttpResponse
from datetime import date
logger = logging.getLogger('default')
def generate(request):
cs_objs = rmod.Department.objects.filter(shortname='cs')
if len(cs_objs) == 0:... | |
<|file_name|>letter_count.py<|end_file_name|><|fim▁begin|>def LetterCount(str):
words = str.split(" ")
result_word = ""<|fim▁hole|> for word in words:
word_map = {}
for ch in word:
if ch in word_map:
word_map[ch] += 1
else:
word_map[ch]... | letter_count = 0 |
<|file_name|>16_gzip.go<|end_file_name|><|fim▁begin|>package main
import (
"compress/gzip"
"fmt"
"io/ioutil"
"os"
)
func main() {
fpath := "test.tar.gz"
if err := toGzip("Hello World!", fpath); err != nil {
panic(err)
}
if tb, err := toBytes(fpath); err != nil {
panic(err)
} else {
fmt.Println(fpath, "... | f, err := os.OpenFile(fpath, os.O_RDWR|os.O_TRUNC, 0777)
if err != nil {
f, err = os.Create(fpath) |
<|file_name|>rte.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_HTTPError
from ..utils import (
float_or_none,
parse_iso8601,
str_or_none,
try_get,
unescapeHTML,
url_or_none,
ExtractorError,
)
cla... | |
<|file_name|>tag.go<|end_file_name|><|fim▁begin|>package models
import (
"github.com/coopernurse/gorp"
"time"
)
type Tag struct {
Id int `db:"id"`
<|fim▁hole|>}
func (this *Tag) PreInsert(s gorp.SqlExecutor) error {
this.CreatedTime = time.Now()
return nil
}<|fim▁end|> | Name string `db:"name"`
Count int `db:"count"`
CreatedTime time.Time `db:"created_time"`
|
<|file_name|>core.py<|end_file_name|><|fim▁begin|>"""
#;+
#; NAME:
#; galaxy.core
#; Version 1.0
#;<|fim▁hole|>#;-
#;------------------------------------------------------------------------------
"""
from __future__ import print_function, absolute_import, division, unicode_literals
import os, copy, sys
import nu... | #; PURPOSE:
#; Core routines for galaxy analysis
#; 29-Nov-2014 by JXP |
<|file_name|>make.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
import subprocess
import os
import time
import platform
import glob
import shutil
import csbuild
from csbuild import log
csbuild.Toolchain("gcc").Compiler().SetCppStandard("c++11")
csbuild.Toolchain("gcc").SetCxxCommand("clang++")
csbuild.Toolchain... |
if csbuild.GetOption("no_exceptions"):
csbuild.Toolchain("gcc", "ios", "android").AddCompilerFlags("-fno-exceptions")
else: |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/
use std::marker::PhantomData;
use std::sync::Arc;
use async_trait::async_trait;
use edena... | ///
/// ```rust,ignore
/// let store = EdenApiStore::<File>::new(edenapi); |
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import abc
import datetime
import decimal
import functools
import json
import uuid
import pytz
import msgpack
import six
from lymph.utils import Undefined
@six.add_metaclass(abc.ABCMeta)
class ExtensionTypeSerializer(object):
@abc.abstractmethod
def serializ... | |
<|file_name|>expanded_signature.rs<|end_file_name|><|fim▁begin|>/// Docs
#[cfg(test)]
/// More Docs
pub const unsafe extern "C" fn foo<T, U, V>(
x: T,
y: u32,
z: u64
) -> (
u32,
u64,
u64
) where T: Clone,<|fim▁hole|>{
92
}
fn main() {
<caret>foo()
}<|fim▁end|> | U: Debug,
V: Display |
<|file_name|>spf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# tests/spf.py
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the... | |
<|file_name|>parse_clipped_alignment.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import sys
from modules.ClipRead import *
import os
if __name__ == '__main__':
from optparse import OptionParser
usage = "usage: ./%prog [options] data_file"
parser = OptionParser(usage=usage)
parser.add... | ClipReads.getNextRead() |
<|file_name|>expr-copy.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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/... | assert_eq!(x.a, 100); |
<|file_name|>directions.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Lars Tingelstad
# All rights reserved.
#
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source... | DirectionVector, DirectionBivector, DirectionTrivector) |
<|file_name|>PartialDSLContentAssistParser.java<|end_file_name|><|fim▁begin|>/*
* generated by Xtext
*/
package co.edu.uniandes.mono.gesco.ui.contentassist.antlr;<|fim▁hole|>
import java.util.Collection;
import java.util.Collections;
import org.eclipse.xtext.AbstractRule;
import org.eclipse.xtext.ui.codetemplates.ui... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2009 Shikhar Bhushan
#
# 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... | 'RPC', |
<|file_name|>coverers.py<|end_file_name|><|fim▁begin|>"""
Coverers of the filtrated space
"""
from __future__ import print_function
from sklearn.base import BaseEstimator, TransformerMixin
import numpy as np
class HyperRectangleCoverer(BaseEstimator, TransformerMixin):
""" Covers the space using overlapping hyp... | Boolean matrix of sample membership to each partition
|
<|file_name|>header.js<|end_file_name|><|fim▁begin|>angular.module('mean.system').controller('HeaderController', ['$scope', 'Global', function ($scope, Global) {
$scope.global = Global;
$scope.menu = [<|fim▁hole|> "title": "buckets",
"link": "buckets"
},
{
"title": "users",
... | { |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import redirect
from django.shortcuts import render
from django.views.decorators.cache import never_cache
from django.contrib.auth.decorators import permission_required
from django.contrib.auth.decorators import login_required
from registration.ba... | }) |
<|file_name|>app.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*-
import os
import os.path
import flask
import flask_assets
import flask_sqlalchemy
from .cross_domain_app import CrossDomainApp
from zeeguu.util.configuration import load_configuration_or_abort
import sys
if sys.version_info[0] < 3:
raise "Must... | |
<|file_name|>bitcoin_be_BY.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="be_BY" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Shopzcoin</source>
<translation type="unf... | <translation type="unfinished"/>
</message>
<message> |
<|file_name|>scheduler_bind.cc<|end_file_name|><|fim▁begin|>#include <luabind/luabind.hpp>
#include "scheduler.h"
namespace graphic
{
void Scheduler::bind(lua_State *L)
{
using namespace luabind;
module_(L, "graphic")<|fim▁hole|> .def("flush", &Scheduler::flush)
.def("get_visible_calls_count", &Scheduler::get_v... | [
class_<Scheduler, SchedulerPtr >("Scheduler")
.def(constructor<RendererPtr const &>())
.def("add", &Scheduler::add) |
<|file_name|>ig-client.error.ts<|end_file_name|><|fim▁begin|>import { CustomError } from 'ts-custom-error';
export class IgClientError extends CustomError {
constructor(message = 'Instagram API error was made.') {
super(message);
// Fix for ts-custom-error. Otherwise console.error will show JSON instead of j... | Object.defineProperty(this, 'name', { |
<|file_name|>logger.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
import logging
import logging.handlers
def setupLogger(log_path, verbose):
logger = logging.getLogger('hive')
logger.setLevel(logging.DEBUG)
logger.propagate = False
fh = logging.handlers.TimedRotatingFileHandler(log_path, ... |
# create formatter and add it to the handlers
|
<|file_name|>MySQLScriptExecuteWizard.java<|end_file_name|><|fim▁begin|>/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
* Copyright (C) 2011-2012 Eugene Fradkin (eugene.fradkin@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* ... | @Override
protected List<String> getCommandLine(MySQLCatalog arg) throws IOException
{
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .lattice import default_optics_mode
from .lattice import energy
from .accelerator import default_vchamber_on
from .accelerator import default_radiation_on
from .accelerator import accelerator_data
from .accelerator import create_accelerator<|fim▁hole|>from .fa... |
from .families import get_family_data
from .families import family_mapping |
<|file_name|>macro-repeat.rs<|end_file_name|><|fim▁begin|>macro_rules! mac {
( $($v:tt)* ) => {
$v
//~^ ERROR still repeating at this depth
//~| ERROR still repeating at this depth
};<|fim▁hole|> mac!(1);
}<|fim▁end|> | }
fn main() {
mac!(0); |
<|file_name|>script.py<|end_file_name|><|fim▁begin|>"""
Name : Stegano Extract and Read File From Image
Created By : Agus Makmun (Summon Agus)
Blog : bloggersmart.net - python.web.id
License : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
Documentation : https://github.com... | new_img = raw_input("[+] Type Image that will going to Extract all files.\n[+] >>> ")
mome._openScure(new_img) |
<|file_name|>unittestbase.py<|end_file_name|><|fim▁begin|># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import mock
import os
from configman import ConfigurationMana... |
from socorro.external.elasticsearch import crashstorage
from socorro.middleware.middleware_app import MiddlewareApp |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>"""
.. module: lemur.authorizations.models
:platform: unix
:copyright: (c) 2018 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details.
.. moduleauthor:: Netflix Secops <secops@netflix.com>
"""
from sqlalchemy import Column, I... |
from lemur.plugins.base import plugins
|
<|file_name|>0007_robouser_magnetic.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
<|fim▁hole|>
class Migration(migrations.Migration):
dependencies = [
('robocrm', '0006_auto_20141005_1800'),
]
operations = ... | |
<|file_name|>github-profile.actions.ts<|end_file_name|><|fim▁begin|>import { GithubUserDto } from 'api/github/github-api.types'
import { action, ActionsUnion } from 'common/redux/action-utils'
export const githubProfileActions = {
loadStart: action('@githubProfile.loadStart').withPayload<{
username: string... | }>(),
loadSuccess: action('@githubProfile.loadSuccess').withPayload<GithubUserDto>(), |
<|file_name|>proxysocket.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
Un... | |
<|file_name|>CompositeModelSelectionListener.java<|end_file_name|><|fim▁begin|>/* ###
* IP: GHIDRA
* REVIEWED: YES
*
* 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... | public interface CompositeModelSelectionListener {
/**
* Called to indicate the model's component selection has changed.
*/ |
<|file_name|>BuiltInCallable.java<|end_file_name|><|fim▁begin|>package com.stuffwithstuff.magpie.interpreter.builtin;
import com.stuffwithstuff.magpie.interpreter.Interpreter;
import com.stuffwithstuff.magpie.interpreter.Obj;<|fim▁hole|>public interface BuiltInCallable {
Obj invoke(Interpreter interpreter, Obj thisO... | |
<|file_name|>test_hive_stats.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 under t... | mock_mysql_hook.return_value.insert_rows.assert_called_once_with(
table='hive_stats',
rows=rows,
target_fields=[ |
<|file_name|>test_ioctl.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)]
// Simple tests to ensure macro generated fns compile
ioctl!(do_bad with 0x1234);
ioctl!(none do_none with 0, 0);
ioctl!(read read_test with 0, 0; u32);
ioctl!(write write_test with 0, 0; u64);
ioctl!(readwrite readwrite_test with 0, 0; u64);... | assert_eq!(ior!(b'z', 10, (1 as u64) << 32), 0x40007A0A);
} |
<|file_name|>titanium_hu.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="hu" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Titanium</source>
... | <source>Debug log file</source> |
<|file_name|>flowlabel.py<|end_file_name|><|fim▁begin|># Copyright 2014 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");<|fim▁hole|># You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | # you may not use this file except in compliance with the License. |
<|file_name|>machine_configuration.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0<Paste>
use super::super::VmmAction;
use crate::parsed_request::{method_to_error, Error, ParsedRequest};
use crate::request::{Body, Method}... | assert!(parse_patch_machine_config(&Body::new(body)).is_err());
#[cfg(target_arch = "x86_64")]
assert!(parse_patch_machine_config(&Body::new(body)).is_ok());
|
<|file_name|>content_type.rs<|end_file_name|><|fim▁begin|>use mime::Mime;
header! {
/// `Content-Type` header, defined in
/// [RFC7231](http://tools.ietf.org/html/rfc7231#section-3.1.1.5)
///
/// The `Content-Type` header field indicates the media type of the
/// associated representation: either t... | /// within the scope of the received message semantics, after any content
/// codings indicated by Content-Encoding are decoded. |
<|file_name|>about.js<|end_file_name|><|fim▁begin|>'use strict';
/**<|fim▁hole|> * @ngdoc function
* @name liteAppManagesystemApp.controller:AboutCtrl
* @description
* # AboutCtrl
* Controller of the liteAppManagesystemApp
*/
angular.module('liteAppManagesystemApp')
.controller('AboutCtrl', function ($scope) {
... | |
<|file_name|>regions-pattern-typing-issue-19997.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
// ht... | match (&a1,) { |
<|file_name|>billing-info.js<|end_file_name|><|fim▁begin|>Template.billingInfo.helpers({
expMonth: function() {
return [
'01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'
]<|fim▁hole|> var yearsArray = [];
for (i = 0; i < 10; i++) {
yearsArray.push(parseInt(curYear)+i);... | },
expYear: function() {
var curYear = moment().format('YYYY'); |
<|file_name|>coluslife.js<|end_file_name|><|fim▁begin|>'use strict';
/**
* Created by zhaoxueyong on 2017/1/14.
*/
angular.module('browserApp').
controller('ColuslifeCtrl', function ($scope, $http) {
$scope.countryName = "China";<|fim▁hole|> level: 7,
building: false,
point: false
... | var mapObj = null;
$scope.init_map = function(){
console.log("init map now");
mapObj = new AMap.Map("mapbody", { |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate rand;
use std::io;
use std::io::Write;
use std::cmp::Ordering;
use rand::Rng;
fn main() {
println!("Zahlenraten!");
println!("============");
let secret = rand::thread_rng().gen_range(1, 101);
//println!("Die Geheimzahl lautet: {}", secr... | match guess.cmp(&secret) {
Ordering::Less => { |
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#Copyright (C) 2011 Seán Hayes
#Python imports
import logging
import pdb
#Django imports
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.db import models, IntegrityError
from django.db.mode... | |
<|file_name|>fixedsizelist.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | import { BaseVector } from './base';
import { DataType, FixedSizeList } from '../type';
export declare class FixedSizeListVector<T extends DataType = any> extends BaseVector<FixedSizeList<T>> {
} |
<|file_name|>okc_scraper_no_q.py<|end_file_name|><|fim▁begin|>"""okc_scraper includes all the functions needed to scrape profiles from
OKCupid"""
import requests
import cPickle as pickle
import time
from BeautifulSoup import BeautifulSoup
def authorize(username, password):
"""Log into OKCupid to scrape profiles"... | users = soup.findAll("div", {"class": "user_info"})
return (["https://www.okcupid.com" +
user.find("a")["href"].replace("?cf=regular", "")
for user in users], soup) |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages
setup(name='gelato.models',
version='0.1.2',
description='Gelato models',
namespace_packages=['gelato'],
long_description='',
author='',
author_email='',
license='',
url='',
... | install_requires=['django', 'tower']) |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import abc
try:
import collections.abc as collectionsabc
except ImportError:
import collections as collectionsabc
import decimal
import io
import json
import locale
import os
import os.path
import subprocess
import threading
import time
def parse_version_st... | |
<|file_name|>decimal.js.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for decimal.js
// Project: http://mikemcl.github.io/decimal.js
// Definitions by: Joseph Rossi <http://github.com/musicist288>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare var Decimal: decimal.IDecimalStatic;
// Su... | * The performance of this method degrades exponentially with increasing digits. For non-integer exponents in particular, the performance of this method may not be adequate.
*/
toPower(n: number | string | Decimal, base?: number): Decimal; |
<|file_name|>tri10.rs<|end_file_name|><|fim▁begin|>use russell_lab::{Matrix, Vector};
/// Defines a triangle with 10 nodes (cubic edges; interior node)
///
/// # Local IDs of nodes
///
/// ```text
/// s
/// |
/// 2, (0,1)
/// | ',
/// | ',
/// 5 7,
/// | ',
/// | ',
/// 8 9 4,
/// | ... | /// ``` |
<|file_name|>Main.java<|end_file_name|><|fim▁begin|>public class Main {
public static void main(String[] args) {
ProdutoContext manga = new ProdutoContext();
System.out.println("Quantia: " + manga.getQuantia());
manga.fazerCompra(5);
manga.reestocar(5);
manga.fazerCompra(5);
manga.reestocar(15);
System.... | }
} |
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>/*global module */
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
//define the string to go between each file in the concat'd... | grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'compass']);
}; //exports |
<|file_name|>send.py<|end_file_name|><|fim▁begin|># Copyright (C) 2009, 2010 Canonical Ltd
#
# 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, or
# (at your option... | and body is not None):
raise errors.BzrCommandError(gettext(
'Mail client "%s" does not support specifying body') %
mail_client.__class__.__name__) |
<|file_name|>joystick.cpp<|end_file_name|><|fim▁begin|>/*
* E-UAE - The portable Amiga Emulator
*
* BeOS joystick driver
*
* (c) Richard Drummond 2005
*/
extern "C" {
#include "sysconfig.h"
#include "sysdeps.h"
#include "options.h"
#include "memory_uae.h"
#include "custom.h"
#include "inputdevice.h"
}
#incl... | /*
* The BJoystick class can't make up its mind whether it represents a joystick
* port or the device attached to a port.
* |
<|file_name|>ConfigExtension.java<|end_file_name|><|fim▁begin|>/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
*
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Publi... | |
<|file_name|>range.py<|end_file_name|><|fim▁begin|># Copyright 2013, Michael H. Goldwasser
#
# Developed for use with the book:
#
# Data Structures and Algorithms in Python
# Michael T. Goodrich, Roberto Tamassia, and Michael H. Goldwasser
# John Wiley & Sons, 2013
#
# This program is free software: you can re... | # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
<|file_name|>Ti_Data.cpp<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> *
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2013 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#include "Ti_D... | * Ti_Data.cpp |
<|file_name|>test_flask_ext.py<|end_file_name|><|fim▁begin|>"""
"""
import logging
import time
import hiro
import mock
from flask import Flask, request
from werkzeug.exceptions import BadRequest
from flask_limiter.extension import C, Limiter
from flask_limiter.util import get_remote_address
def test_reset(extensio... | |
<|file_name|>book.model.ts<|end_file_name|><|fim▁begin|>export class Book {
id: number;
name: string;
isbn: string;
description: string;
category: string;
writer: string;
price: number;
picture_path: string;
status: string;
created: string;<|fim▁hole|><|fim▁end|> | modified: any;
constructor() {
}
} |
<|file_name|>htmlmodelement.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::Bindings::HTMLModElementBi... | HTMLModElement {
htmlelement: HTMLElement::new_inherited(HTMLElementTypeId::HTMLModElement, localName, prefix, document)
}
} |
<|file_name|>GroovyScript.java<|end_file_name|><|fim▁begin|>package org.devocative.demeter.service.template;<|fim▁hole|>import groovy.lang.Script;
import org.devocative.demeter.iservice.template.BaseStringTemplate;
import java.util.Map;
public class GroovyScript extends BaseStringTemplate<Script> {
private Script sc... |
import groovy.lang.Binding; |
<|file_name|>commwidgets.py<|end_file_name|><|fim▁begin|>#
# Moisture control - Serial communication widgets
#
# Copyright (c) 2013 Michael Buesch <m@bues.ch>
#
# 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 Softwa... | for node in devNodes:
name = node.fileName()
if not name.startswith("ttyS") and\
not name.startswith("ttyUSB"): |
<|file_name|>borderLayout.ts<|end_file_name|><|fim▁begin|>import {Utils as _} from '../utils';
export class BorderLayout {
private eNorthWrapper: any;
private eSouthWrapper: any;
private eEastWrapper: any;
private eWestWrapper: any;
private eCenterWrapper: any;
private eOverlayWrapper: any;
... | if (content.isLayoutPanel) { |
<|file_name|>Lepton.py<|end_file_name|><|fim▁begin|>import numpy as np
import ctypes
import struct
import time
# relative imports in Python3 must be explicit
from .ioctl_numbers import _IOR, _IOW
from fcntl import ioctl
SPI_IOC_MAGIC = ord("k")
SPI_IOC_RD_MODE = _IOR(SPI_IOC_MAGIC, 1, "=B")
SPI_IOC_WR_MOD... |
@staticmethod
def capture_segment(handle, xs_buf, xs_size, capture_buf): |
<|file_name|>VecbosModule_initializeTalkTo.cc<|end_file_name|><|fim▁begin|>//--------------------------------------------------------------------------
// Description:
// Belongs to class VecbosModule
//
// Wed Jul 11 16:09:46 CDT 2001, G.Velev fix a bug with W or Z selection and
// ... | |
<|file_name|>main.js<|end_file_name|><|fim▁begin|>requirejs.config({
"paths": {
"jquery": "https://code.jquery.com/jquery-1.11.3.min",
"moment": "../../moment",
"daterangepicker": "../../daterangepicker"
}
});
requirejs(['jquery', 'moment', 'daterangepicker'] , function ($, moment) {
... | }); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.