prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>debugger.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
# -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of Ope... |
merged_menage_data_frame = merge( |
<|file_name|>plugin.py<|end_file_name|><|fim▁begin|>###
# Copyright (c) 2015, KG-Bot
# 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 code must retain the above co... | return "Error" |
<|file_name|>hr_plan_wizard.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 HrPlanWizard(models.TransientModel):
_name = 'hr.plan.wizard'
_description = 'Plan Wizard'
plan_id = f... | for activity_type in self.plan_id.plan_activity_type_ids: |
<|file_name|>rscope.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... | -> OptVec<ty::Region> {
assert!(defs.iter().all(|def| def.def_id.crate == ast::LOCAL_CRATE));
defs.iter().enumerate().map( |
<|file_name|>faIntersection.js<|end_file_name|><|fim▁begin|>'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var prefix = 'fas';
var iconName = 'intersection';
var width = 384;
var height = 512;
var ligatures = [];
var unicode = 'f668';
var svgPathData = 'M166.74 33.62C69.96 46.04 0 133.11 0... | height,
ligatures,
unicode, |
<|file_name|>animation.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/. */
//! CSS transitions and animations.
// NOTE(emilio): This... | &before_change_style,
after_change_style,
self, |
<|file_name|>service.go<|end_file_name|><|fim▁begin|>package udp
import (
"errors"
"log"
"net"
"strings"
"sync"
"github.com/influxdata/influxdb/models"
"github.com/influxdata/kapacitor"
"github.com/influxdata/kapacitor/expvar"
)
const (
UDPPacketSize = 65536
)
// statistics gathered by the UDP package.
con... |
// Configure expvar monitoring. It's OK to do this even if the service fails to open and
// should be done before any data could arrive for the service. |
<|file_name|>IterableComponentTypeMacro.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* 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.apach... | }
return new PsiTypeResult(parameterType, project); |
<|file_name|>log.go<|end_file_name|><|fim▁begin|>package main
import (
"fmt"
"io"
"log"
"net/http"
"os"
"time"
"github.com/elazarl/goproxy"
)
const (
AppendLog int = iota
ReopenLog int = iota
)
var (
emptyResp = &http.Response{}
emptyReq = &http.Request{}
)
type LogData struct {
action int
req *ht... | |
<|file_name|>demo_motion_correction_nonrigid.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 21 15:53:15 2016
@author: agiovann
"""
from __future__ import division
from __future__ import print_function
#%%
from builtins import zip
from builtins import str
from bui... | for fr, fr1, fr0 in zip(m.resize(1, 1, .2), m1.resize(1, 1, .2), m0.resize(1, 1, .2)):
count += 1
print(count)
|
<|file_name|>template.py<|end_file_name|><|fim▁begin|>from ..baseapi import BaseApi
class Template(BaseApi):
def __init__(self, *args, **kwargs):<|fim▁hole|> self.endpoint = 'templates'
self.list_id = None
def all(self):
"""
returns a list of available templates.
"""
... | super(Template, self).__init__(*args, **kwargs) |
<|file_name|>(6 kyu) Multiples of 3 or 5.rs<|end_file_name|><|fim▁begin|>// #1
// fn solution(num: i32) -> i32 {
// let mut result = 0;
// for i in 1..num {
// result += if 0 == i % 3 || 0 == i % 5 {i} else {0}
// }
// result<|fim▁hole|> (1..num).filter(|i| 0 == i % 3 || 0 == i % 5).sum()
}<|fim▁end|> | // }
// #2
fn solution(num: i32) -> i32 { |
<|file_name|>todo.component.ts<|end_file_name|><|fim▁begin|>import { Component, Input } from '@angular/core';
import { Todo } from '../../shared/models/todo.model';
<|fim▁hole|> * The todo component
*/
@Component({
selector: 'todo',
templateUrl: './todo.component.html'
})
export class TodoComponent {
/**
... | import { TodoStore } from '../../shared/services/todo.store';
/** |
<|file_name|>oversized_pancake_flipper.cpp<|end_file_name|><|fim▁begin|>#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> pii;
string sub() {
string s;
int k;
cin >> s >> k;
int cnt = 0;
for (int i = 0; i < (int)s.size(); i++) {
if (s[i] == ... | for (int z = i; z < i + k; z++)
if (s[z] == '+')
s[z] = '-';
else |
<|file_name|>driver.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|>noUndecoratedClassWithNgFieldsRule.ts<|end_file_name|><|fim▁begin|>import * as Lint from 'tslint';
import * as ts from 'typescript';
const RULE_FAILURE = `Undecorated class defines fields with Angular decorators. Undecorated ` +
`classes with Angular fields cannot be extended in Ivy since no definition ... | const moduleImport = this._getModuleImportOfIdentifier(d.expression.expression);
return moduleImport ? moduleImport.startsWith('@angular/core') : false;
}); |
<|file_name|>ejemplo04model.js<|end_file_name|><|fim▁begin|>var mongoose = require("mongoose");
// definicion del esquema
var Schema = mongoose.Schema;
var LibroSchema = new Schema({
titulo: String,
autor: String,
campos_biblioteca: {
ejemplares: Number,
ultima_reserva: Date
}
})<|fim▁ho... | var ReservaSchema = new Schema({});
module.exports = { |
<|file_name|>list.py<|end_file_name|><|fim▁begin|># Copyright 2012 Rackspace
#
# 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 t... | client = get_client(parsed_args) |
<|file_name|>test.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | declare var test: number; |
<|file_name|>change-tracker.js<|end_file_name|><|fim▁begin|>/*
* Keeps track of items being created or deleted in a list
* - emits events about changes when .poll is called
* - events are: delete, create
*
* Usage:
*
* var tracker = changeTracker.create(updateItems, items);
*
* - updateItems is a function ... | instance.updateItems = updateItems;
instance.items = items;
return instance; |
<|file_name|>inquest_server.rs<|end_file_name|><|fim▁begin|>extern crate docopt;
extern crate grpc;
extern crate inquest;
extern crate rustc_serialize;
use std::collections::{BinaryHeap, HashMap, BTreeMap};
use std::collections::hash_map::DefaultHasher;
use std::hash::{Hash, Hasher};
use std::sync::{Arc, Mutex, RwLock... | } |
<|file_name|>submitServiceDescription.py<|end_file_name|><|fim▁begin|>import urllib, urllib2, sys, httplib
url = "/MELA/REST_WS"
HOST_IP="109.231.126.217:8180"
#HOST_IP="localhost:8180"<|fim▁hole|> connection = httplib.HTTPConnection(HOST_IP)
description_file = open("./costTest.xml", "r")
body_content... |
if __name__=='__main__': |
<|file_name|>search_near_title.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Copyright (c) 2014, Kersten Doering <kersten.doering@gmail.com>, Bjoern Gruening <bjoern.gruening@gmail.com>
"""
#Kersten Doering 16.06.2014
#check http://xapian.org/docs/queryparser.html for syntax and... |
print "search query: ", title_q |
<|file_name|>introspection.py<|end_file_name|><|fim▁begin|># coding=utf-8
import logging; logger = logging.getLogger("robots.introspection")
import threading
introspection = None
# disable introspection for now
if False:
try:
import Pyro4
import Pyro4.errors
uri = "PYRONAME:robots.introspec... | except ImportError:
pass |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os, io
from setuptools import setup
from SVNOnline.SVNOnline import __version__
here = os.path.abspath(os.path.dirname(__file__))
README = io.open(os.path.join(here, 'README.rst'), encoding='UTF-8').read()
CHANGES = io.open(os.path.join(... | url='https://github.com/sintrb/SVNOnline',
classifiers=[
'Intended Audience :: Developers', |
<|file_name|>check_new_bsd_license.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import sys
bsd = '''
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 above copyri... | result += filename + "AUTOFIXED"
print result
|
<|file_name|>PositionBoTest.java<|end_file_name|><|fim▁begin|>/**
* Copyright 2004-2014 The Kuali Foundation
*
* Licensed under the Educational Community 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://w... |
// this is simply to prevent invocations of refresh reference
bo2.getRequiredQualList().get(0).setOwner(classificationBo);
|
<|file_name|>rcu.rs<|end_file_name|><|fim▁begin|>/*******************************************************************************
*
* kit/kernel/sync/rcu.rs
*
* vim:ft=rust:ts=4:sw=4:et:tw=80
*
* Copyright (C) 2015-2021, Devyn Cairns
* Redistribution of this file is permitted under the terms of the simplified
*... | |
<|file_name|>step7_quote.rs<|end_file_name|><|fim▁begin|>#![feature(exit_status)]
extern crate mal;
use std::collections::HashMap;
use std::env as stdenv;
use mal::types::{MalVal, MalRet, MalError, err_str};
use mal::types::{symbol, _nil, string, list, vector, hash_map, malfunc};
use mal::types::MalError::{ErrString... | |
<|file_name|>segmentation.py<|end_file_name|><|fim▁begin|>import os
import re
import string
from itertools import chain
from .detector_morse import Detector
from .detector_morse import slurp
# from .penn_treebank_tokenizer import word_tokenize
import nlup
from pug.nlp.constant import DATA_PATH
from pug.nlp.util impor... | [('goodbye',), ('cruel',), ('world',), ('goodbye', 'cruel'), ('cruel', 'world')]
>>> list_ngram_range('goodbye cruel world'.split(), 0, 2, join='|')
['goodbye', 'cruel', 'world', 'goodbye|cruel', 'cruel|world'] |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from flask import render_template, flash, redirect, url_for, request
from flask_login import login_required, current_user
from ..models import User, Sensors, Sensor_data
from . import chart
from pytz import timezone
# import pygal
from pyecharts import Line
import os
f... | if form.validate_on_submit(): |
<|file_name|>memory.go<|end_file_name|><|fim▁begin|>package store
import (
"errors"
"fmt"
"runtime"
"strconv"
"strings"
"sync"
"time"
"github.com/docker/go-events"
"github.com/docker/swarmkit/api"
pb "github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/manager/state"
"github.com/docker/swarmkit/ma... | }
|
<|file_name|>test-viewport.js<|end_file_name|><|fim▁begin|>/**
* Copyright 2015 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http... | |
<|file_name|>page.tsx<|end_file_name|><|fim▁begin|>/*
* SonarQube
* Copyright (C) 2009-2019 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Softwar... | }); |
<|file_name|>batch-history.component.ts<|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 req... | | Protected Variables
|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |
<|file_name|>guard-module.ts<|end_file_name|><|fim▁begin|>import {join} from 'path';
import {ng} from '../../../utils/process';
import {expectFileToMatch} from '../../../utils/fs';
export default function() {
const modulePath = join('src', 'app', 'app.module.ts');
<|fim▁hole|> return ng('generate', 'guard', 'test-... | |
<|file_name|>Switch.tsx<|end_file_name|><|fim▁begin|>import classNames from 'classnames'
import ReactSwitch from 'react-switch'
type Props = {
ariaLabel: string
checked?: boolean<|fim▁hole|>
return (
<div className='switch'>
<ReactSwitch
aria-label={ariaLabel}
checked={checked}
... | onChange: any
}
export const Switch = ({ ariaLabel, checked, onChange }: Props) => {
const switchClass = classNames(checked ? 'is-on' : 'is-off') |
<|file_name|>Client.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Yann GUIBET <yannguibet@gmail.com>
# See LICENSE for details.
import sys, os
from gevent import select, monkey, spawn, Greenlet, GreenletExit, sleep, socket
from base64 import b64encode
from hashli... | def connect(self, host, port, pubkey): |
<|file_name|>test_amazon.py<|end_file_name|><|fim▁begin|>import os
import sys
import shutil
import unittest
import tempfile
import time
<|fim▁hole|>sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "ms3"))
from ms3.testing import MS3Server
from s3ffs_server import s3ffsServer, wait_until
class Amaz... | |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages
setup(name='monsql',
version='0.1.7',
packages = find_packages(),
author='firstprayer',
author_email='zhangty10@gmail.com',
description='MonSQL - Mongodb-style way for using mysql.',<|fim▁hole|>... | url='https://github.com/firstprayer/monsql.git',
install_requires=[
'MySQL-python'
], |
<|file_name|>angular-protractor.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for Angular Protractor 1.5.0
// Project: https://github.com/angular/protractor
// Definitions by: Bill Armstrong <https://github.com/BillArmstrong>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path=".... | /**
* Creates a new deferred object. |
<|file_name|>class_method.rs<|end_file_name|><|fim▁begin|>// Copyright 2016-17 Alexander Reece
//
// 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 ma... | has_lifetimes: bool, |
<|file_name|>encryption.rs<|end_file_name|><|fim▁begin|>mod builder_key;
mod message;
mod origin_key;
mod service_key;
mod user_key;
pub use builder_key::{generate_builder_encryption_key,
BuilderSecretEncryptionKey,
BUILDER_KEY_NAME};
pub use message::{AnonymousBox,
... | /// The suffix on the end of a secret encryption key file
const SECRET_BOX_KEY_SUFFIX: &str = "box.key";
/// Format version identifier for public encryption keys.
const PUBLIC_BOX_KEY_VERSION: &str = "BOX-PUB-1"; |
<|file_name|>evaluate.go<|end_file_name|><|fim▁begin|>package main
import (
"github.com/robertkrimen/otto"
)
func evaluateScript(src string, payload []FinalInput) (string, error) {<|fim▁hole|> javaScript.Set("eval", func(call otto.FunctionCall) otto.Value {
evalFunc = call.Argument(0)
return otto.UndefinedValue(... | javaScript := otto.New()
var evalFunc otto.Value |
<|file_name|>GreeterPrivate.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2013 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; version 3.
*
* This program is distr... | * GNU General Public License for more details.
* |
<|file_name|>ng2-header.component.ts<|end_file_name|><|fim▁begin|>import { Component, EventEmitter, Output, trigger, state, transition, style, animate, OnInit } from '@angular/core';
import { Observable } from 'rxjs/Observable';
@Component({
selector: 'ng2-header',
styleUrls: ['./ng2-header.scss'],
templateUrl... | transition('0 => 1', animate('100ms ease-in')),
transition('1 => 0', animate('100ms ease-out'))
])
] |
<|file_name|>AddLink.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react';
import styles from './AddLink.module.scss';
import { IAddLinkProps } from './IAddLinkProps';<|fim▁hole|>import {
Stack,
TextField,
Dialog,
DialogType,
DialogFooter,
PrimaryButton,
DefaultButton,
} from 'office-ui-fabric-react';... | import { IAddLinkState } from './IAddLinkState'; |
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|>def pytest_addoption(parser):
parser.addoption('--jenkins-docker', action='store',<|fim▁hole|><|fim▁end|> | default='jenkins/jenkins',
help='The Jenkins Docker container to launch') |
<|file_name|>_tickvals.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators
class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator):<|fim▁hole|> def __init__(self, plotly_name="tickvals", parent_name="mesh3d.colorbar", **kwargs):
super(TickvalsValidator, self).__init__(
... | |
<|file_name|>portal_wizard.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>).
#
# This program is free software: you... |
%(welcome_message)s
-- |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from orangecontrib.recommendation.tests.coverage.base_tests \<|fim▁hole|><|fim▁end|> | import TestRatingModels, TestRankingModels |
<|file_name|>Broadcasts.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2016-2019 Projekt Substratum
* This file is part of Substratum.
*
* SPDX-License-Identifier: GPL-3.0-Or-Later
*/
package projekt.substratum.common;
import android.content.BroadcastReceiver;
import android.content.Context;
import android... | LocalBroadcastManager.getInstance(context).sendBroadcast(intent);
}
/** |
<|file_name|>cube_to_png.py<|end_file_name|><|fim▁begin|>#!bpy
"""
to run:
(aAtually I have not been able to run this from command line - the thing
exits without rendering. If I add bpy.ops.render, it alwys renders layers, rather
then compositing output)
blender -b --python this_fnm.py
"""
import bpy
from math impor... | mesh = obj.data
bpy.ops.object.editmode_toggle()
# show mesh as smooth
for p in mesh.polygons: |
<|file_name|>bitcoin_ur_PK.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ur_PK" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About ShadowCoin</source>
<translation type="un... | </message>
<message> |
<|file_name|>mininode.py<|end_file_name|><|fim▁begin|># mininode.py - Sscoin P2P network half-a-node
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# This python code was modified from ArtForz' public domain half-a-node, ... | r = b""
r += struct.pack("<Q", self.nServices) |
<|file_name|>issue-66286.rs<|end_file_name|><|fim▁begin|>// force-host
// no-prefer-dynamic
#![crate_type = "proc-macro"]
extern crate proc_macro;<|fim▁hole|>#[proc_macro_attribute]
pub fn vec_ice(_attr: TokenStream, input: TokenStream) -> TokenStream {
// This redundant convert is necessary to reproduce ICE.
... |
use proc_macro::TokenStream;
|
<|file_name|>zz_edit_gen.go<|end_file_name|><|fim▁begin|>// Copyright 2017-2021 The Usacloud 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/licen... | Title: "Zone options",
Flags: fs, |
<|file_name|>sum-children.test.js<|end_file_name|><|fim▁begin|>'use strict';
var path = require('path')
, chai = require('chai')
, expect = chai.expect
, sumChildren = require(path.join(__dirname, '..', 'lib', 'util', 'sum-children'))
;
describe("simplifying timings lists", function... | intervals.push([ 0, 33]);
expect(sumChildren(intervals)).equal(33);
});
|
<|file_name|>ColEmiMatDAO.java<|end_file_name|><|fim▁begin|>//Copyright (c) 2011 Municipalidad de Rosario and Coop. de Trabajo Tecso Ltda.
//This file is part of SIAT. SIAT is licensed under the terms
//of the GNU General Public License, version 3.
//See terms in COPYING file or <http://www.gnu.org/licenses/gpl.txt>
p... | }
|
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase
from models import Project<|fim▁hole|>class ProjectsTest(TestCase):
fixtures = ['test_data.json']
def test_project_listing(self):
... | |
<|file_name|>run.py<|end_file_name|><|fim▁begin|>import sys
import os
import numpy as np<|fim▁hole|>sys.path.append(os.path.join(os.getcwd(), ".."))
from run_utils import run_kmc, parse_input
from ParameterJuggler import ParameterSet
def main():
controller, path, app, cfg, n_procs = parse_input(sys.argv)
a... | |
<|file_name|>test_eigb.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, absolute_import, division
import sys
sys.path.append('../')
import numpy as np
import tt
from tt.eigb import *
import time
""" This code computes many eigenvalus of the Laplacian operator """
d = 8
f = 8
A = tt.qlaplace_dd([... | |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|><|fim▁hole|>#
# Wokkel documentation build configuration file, created by
# sphinx-quickstart on Mon May 7 11:15:38 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present ... | # -*- coding: utf-8 -*- |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url
from fir_artifacts import views
app_name='fir_artifacts'<|fim▁hole|> url(r'^(?P<artifact_id>\d+)/correlations/$', views.artifacts_correlations, name='correlations'),
url(r'^files/(?P<content_type>\d+)/upload/(?P<object_id>\d+)/$... |
urlpatterns = [
url(r'^(?P<artifact_id>\d+)/detach/(?P<relation_name>\w+)/(?P<relation_id>\d+)/$', views.detach_artifact, name='detach'), |
<|file_name|>mnemonic.cpp<|end_file_name|><|fim▁begin|>#include <iostream>
#include <boost/algorithm/string.hpp>
#include <bitcoin/bitcoin.hpp>
#include <wallet/wallet.hpp>
using namespace bc;
using namespace libwallet;
int display_help()
{
puts("Usage:");
puts("");
puts(" mnemonic <<< \"[WORD1] [WORD2] ... | boost::algorithm::trim(data);
string_list words;
boost::split(words, data, boost::is_any_of("\n\t ")); |
<|file_name|>cinder_250.py<|end_file_name|><|fim▁begin|>"""
Installs and configures Cinder
"""
import os
import re
import uuid
import logging
from packstack.installer import exceptions
from packstack.installer import processors
from packstack.installer import validators
from packstack.installer import basedefs
from ... | "PRE_CONDITION" : check_lvm_options,
"PRE_CONDITION_MATCH" : True,
"POST_CONDITION" : False, |
<|file_name|>build.js<|end_file_name|><|fim▁begin|>'use strict';
<|fim▁hole|> .require(require.resolve('./main'), { entry: true })
.bundle({ debug: true });
};
// Test
if (!module.parent) {
go().pipe(process.stdout);
}<|fim▁end|> | var browserify = require('browserify');
var go = module.exports = function () {
return browserify() |
<|file_name|>group-detail.component.ts<|end_file_name|><|fim▁begin|>import {Component, Input} from '@angular/core';
import {Title} from '@angular/platform-browser';
import {RouteParams, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from '@angular/router-deprecated';
import {TaxonImage} from './taxon-image';
import {Taxon} from... | </tr>
</table>
|
<|file_name|>lib_entity.py<|end_file_name|><|fim▁begin|>"""
syntax
entity ::= {id(utc millisecond), type, id_from, id_to, status, data, source, note}
data example1: search wikipedia
{ "id":1378327851001,
"type":"name-name",
"id-from":"MIT",
"id-to":"Massachusetts Institute of Technology",
"status":"... | pass1: remove obsoleted relation r1 where r1.id_from=r2.id_from and r1.created<r2.created
alternatively, use a hashtable with keys {type, id-from}
* find(id_from, type, recursive=False)
* add(record) |
<|file_name|>table_edit.js<|end_file_name|><|fim▁begin|>function loadText()
{
var txtLang = document.getElementsByName("txtLang");
txtLang[0].innerHTML = "St\u00F8rrelse";
txtLang[1].innerHTML = "Egenskaber";
txtLang[2].innerHTML = "Typografi";
txtLang[3].innerHTML = "Bredde";
txtLang... | |
<|file_name|>processor.py<|end_file_name|><|fim▁begin|>import re
import copy
import logging
import datetime
import objectpath
from indra.statements import *
logger = logging.getLogger(__name__)
class EidosProcessor(object):
"""This processor extracts INDRA Statements from Eidos JSON-LD output.
Parameters
... | neg_texts = [neg['text'] for neg in negs]
return neg_texts
|
<|file_name|>GitHubCommit.ts<|end_file_name|><|fim▁begin|>module OctoBoot.model {
export interface GitHubCommit {
url: string,
sha: string,
html_url: string,
comments_url: string,
commit: {
url: string,
author: {
name: string,
emai... | },
message: string, |
<|file_name|>RuleRemovalContext.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2008 JBoss 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/... | |
<|file_name|>with_asan.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env vpython
# Copyright 2019 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 argparse
import contextlib
import logging
import os
import subprocess
i... | |
<|file_name|>formatter-mode.ts<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2016-2016 Codenvy, S.A.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.e... | * @author Florent Benoit
*/
export type FormatterMode = 'MODERN' | 'CSV' |
<|file_name|>ProfilesPanel.js<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2008 Apple Inc. 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 must retain ... | return view;
}, |
<|file_name|>test_grids.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
from __future__ import print_function, division
import numpy as np
from sht.grids import standard_grid, get_cartesian_grid
def test_grids():
L = 10
thetas, phis = standard_grid(L)
# Can't really test much here
assert thet... | grid = get_cartesian_grid(thetas, phis) |
<|file_name|>cleanup-shortcircuit.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... | // of the code had a problem that the cleanup scope for this
// expression was the end of the `if`, and as the `"signal".to_string()` |
<|file_name|>bitcoin_eu_ES.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="eu_ES" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Crunchcoin</so... | |
<|file_name|>settings.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SettingsComponent } from './settings/settings.component';<|fim▁hole|>import { SharedModule} from '../../shared/shared.module';
import { ModalModule } f... | |
<|file_name|>cursor.rs<|end_file_name|><|fim▁begin|>//! Cursor movement.
use std::fmt;
use std::ops;
use std::io::{self, Write, Error, ErrorKind, Read};
use async::async_stdin_until;
use std::time::{SystemTime, Duration};
use raw::CONTROL_SEQUENCE_TIMEOUT;
use numtoa::NumToA;
derive_csi_sequence!("Hide the cursor.", ... | |
<|file_name|>fileserve.go<|end_file_name|><|fim▁begin|>package main
import (
"net/http"
"os"
"path"
"strings"
"github.com/zenazn/goji/web"
)
func fileServeHandler(c web.C, w http.ResponseWriter, r *http.Request) {
fileName := c.URLParams["name"]
filePath := path.Join(Config.filesDir, fileName)
if !fileExist... | }
func fileExistsAndNotExpired(filename string) bool { |
<|file_name|>app.js<|end_file_name|><|fim▁begin|>$('.counter').countTo({
formatter: function (value, options) {
return value.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,').slice(0,-3);
}
});
function updateCount(to)
{
$('.counter').countTo({
from: parseInt($('.counter').html().replace(/,/... | |
<|file_name|>ignore.hpp<|end_file_name|><|fim▁begin|>/*=============================================================================
Copyright (c) 2001 Doug Gregor
Copyright (c) 1999-2003 Jaakko Jarvi
Copyright (c) 2001-2011 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See... | // Swallows any assignment (by Doug Gregor) |
<|file_name|>FWTCBFbC.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>pub fn count_characters(words: Vec<String>, chars: String) -> i32 {
use std::collections::{HashMap, HashSet};
let char_set = {
let mut char_table = HashMap::new();
for c in chars.chars() {
*char_table.entry(c).or_inser... | |
<|file_name|>ibg.py<|end_file_name|><|fim▁begin|># Copyright 2017 QuantRocket - All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICE... | |
<|file_name|>guestagent_utils.py<|end_file_name|><|fim▁begin|># Copyright 2015 Tesora Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://w... | pattern = re.compile(r'^(\d+)([K,M,G]{1})$') |
<|file_name|>nir_opt_algebraic.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
#
# Copyright (C) 2014 Intel Corporation
#
# 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 restri... | (('ieq', 'a@bool', 0), ('inot', 'a')), |
<|file_name|>test.profile.js<|end_file_name|><|fim▁begin|>var fs = require("fs");
var path = require("path");
var _ = require("underscore");
var chai = require("chai");
var expect = chai.expect;
var profile = require("../../lib/profile");
var PREFS = require("../../data/preferences");
var simpleXpiPath = path.join(__d... | |
<|file_name|>lookups.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Doqu is a lightweight schema/query framework for document databases.
# Copyright © 2009—2010 Andrey Mikhaylenko
#
# This file is part of Docu.
#
# Doqu is free software: you can redistribute it and/or modify
# it under the ... | |
<|file_name|>queue_test.go<|end_file_name|><|fim▁begin|>package gq
import (
"testing"
"time"
)
var count int
type WorkerTest struct {
Delay time.Duration
}
func (w WorkerTest) Work() {
count++<|fim▁hole|>
func (w WorkerTest) Data() string {
return ""
}
func (w WorkerTest) DelayTime() time.Duration {
return w... | } |
<|file_name|>authtest.go<|end_file_name|><|fim▁begin|>package resource
import (
"github.com/gbl08ma/sqalx"
"github.com/yarf-framework/yarf"
)
// AuthTest composites resource
type AuthTest struct {
resource
}
// WithNode associates a sqalx Node with this resource
func (r *AuthTest) WithNode(node sqalx.Node) *AuthT... | pair, err := r.AuthenticateClient(c)
if err != nil {
RenderUnauthorized(c) |
<|file_name|>res_partner.py<|end_file_name|><|fim▁begin|># Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
_allowed_inactive_link_models = ["res.partner"]
_inactive_cas... | domain = [(field, "=", self.id)] |
<|file_name|>insert_sbench.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2013 Couchbase, 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-... | |
<|file_name|>check_syscall.py<|end_file_name|><|fim▁begin|># Rekall Memory Forensics
# Copyright (C) 2007-2013 Volatility Foundation
# Copyright 2013 Google Inc. All Rights Reserved.
#
# This file is part of Rekall Memory Forensics.
#
# Rekall Memory Forensics is free software; you can redistribute it and/or
# modify i... | ]
func = None
tables = set() |
<|file_name|>RootlessHgCommand.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright (c) 2005-2010 VecTrace (Zingo Andersen) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of ... | /**
* @see com.vectrace.MercurialEclipse.commands.AbstractShellCommand#customizeCommands(java.util.List)
*/ |
<|file_name|>confirm-toolbar.js<|end_file_name|><|fim▁begin|>import log from 'log';
import Ember from 'ember';
import {registerComponent} from 'ember-utils';<|fim▁hole|>export var RheaConfirmToolbar = Ember.Component.extend({
layout,
tagName: '',
actions: {
confirm: function(opID) {
this.sendAction('co... |
import layout from './confirm-toolbar.hbs!';
|
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod options;
pub mod compiler;
pub mod errors;
mod parser;<|fim▁hole|><|fim▁end|> | mod lexer;
mod modulebuilder; |
<|file_name|>darwinvpnlauncher.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# darwinvpnlauncher.py
# Copyright (C) 2013 LEAP
#
# 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 v... |
:param eipconfig: eip configuration object |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict';
/**
* NetSuite Records<|fim▁hole|>
Records.RecordRef = require('./recordRef');<|fim▁end|> | * @return {Records}
*/
var Records = module.exports = {}; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.