prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>wsgi_server.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
"""
WSGI stack, common code.
"""
import httplib
import urllib
import xmlrpclib
import StringIO
import errno
import logging
import platform
import socket
import... | else: |
<|file_name|>bitcoin_tr.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="tr" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="14"/>
<source>About Etercoin</source>
... | </message> |
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Bml(CMakePackage):
"""The basic matri... | |
<|file_name|>ROM_ANSSI_64.go<|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<|fim▁hole|>
http://www.a... | to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at |
<|file_name|>array_const_index-1.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... | #![allow(dead_code)]
#![allow(stable_features)]
|
<|file_name|>test_unparse.py<|end_file_name|><|fim▁begin|>"""Tests for the unparse.py script in the Tools/parser directory."""
import unittest
import test.support
import io
import os
import random
import tokenize
import ast
from test.test_tools import basepath, toolsdir, skip_if_missing
skip_if_missing()
parser_pat... | |
<|file_name|>test_mongo.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
import os
from pymongo import MongoClient
from test_helpers import bases, mixins, mongo
class WhenCreatingTemporaryDatabase(bases.BaseTest):
@classmethod
def configure(cls):
super(WhenCreatingTemporaryDa... |
@classmethod
def configure(cls): |
<|file_name|>remoteIndicator.ts<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--... | |
<|file_name|>ExtensionHandler.java<|end_file_name|><|fim▁begin|>/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You u... | (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 |
<|file_name|>show.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The Cockroach 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... |
userPrivileges, err := descriptor.GetPrivileges().Show()
if err != nil { |
<|file_name|>ArenaLocation.ts<|end_file_name|><|fim▁begin|>module TK.SpaceTac {
/**
* Location in the arena (coordinates only)
*/
export interface IArenaLocation {
x: number
y: number
}
export class ArenaLocation implements IArenaLocation {
x: number<|fim▁hole|> ... | y: number
constructor(x = 0, y = 0) {
this.x = x; |
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main
import (
"flag"
"log"
"os"
"os/signal"
"github.com/caiofilipini/got/bot"
"github.com/caiofilipini/got/command"
"github.com/caiofilipini/got/irc"
)
var (
server *string
port *int
channel *string
user *string
passwd ... | return nil |
<|file_name|>mitmprotector.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# mitmprotector.py - protect's you from any kind of MITM-attacks.
#
# Copyright (C) 2020 by Jan Helbling <jh@jan-helbling.ch>
#
# This program is free software: you can redistribute it and/or modify
# it ... | |
<|file_name|>main.js<|end_file_name|><|fim▁begin|>// Restrict output in a codecell to a maximum length
define([
'base/js/namespace',
'jquery',
'notebook/js/outputarea',
'base/js/dialog',
'notebook/js/codecell',
'services/config',
'base/js/utils'
], function(IPython, $, oa, dialog, cc, confi... | if (this.max_count === undefined) { this.max_count = MAX_CHARACTERS; } |
<|file_name|>table_wrapper.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/. */
//! CSS tables.
//!
//! This follows the "More Precise ... | guess.minimum_percentage_guess);
SelectedAutoLayoutCandidateGuess::InterpolateBetweenMinimumGuessAndMinimumPercentageGuess(weight)
} else if assignable_inline_size < guess.minimum_specified_guess { |
<|file_name|>StringNodeTest.java<|end_file_name|><|fim▁begin|>package org.zezutom.schematic.model.json;
import org.zezutom.schematic.service.generator.json.StringGenerator;
public class StringNodeTest extends NodeTestCase<String, StringGenerator, StringNode> {
@Override
StringNode newInstance(String name, St... | @Override
Class<StringGenerator> getGeneratorClass() {
return StringGenerator.class; |
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
import re
import time<|fim▁hole|>print "hi"<|fim▁end|> | import subprocess
out=subprocess.check_output(["cat","/sys/class/net/eth0/address"])
print out |
<|file_name|>cs.js<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'find', 'cs', {
find: 'Hledat',
findOptions: 'Možnosti hledání',
findWhat: 'Co hledat:',
matchCase:... | } ); |
<|file_name|>fasta.rs<|end_file_name|><|fim▁begin|>// Copyright 2014-2016 Johannes Köster, Christopher Schröder.
// Licensed under the MIT license (http://opensource.org/licenses/MIT)
// This file may not be copied, modified, or distributed
// except according to those terms.
//! FASTA format reading and writing.
//!... | CGTAGGCTGAAA
GTAGGCTGAAAA |
<|file_name|>0005_auto__del_field_surveyquestion_statistic.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm)... | 'serial': ('django.db.models.fields.PositiveIntegerField', [], {})
},
u'clinics.service': {
'Meta': {'object_name': 'Service'}, |
<|file_name|>warpnet_experiment_structs.py<|end_file_name|><|fim▁begin|># WARPnet Client<->Server Architecture
# WARPnet Parameter Definitions
#
# Author: Siddharth Gupta
import struct, time
from warpnet_common_params import *
from warpnet_client_definitions import *
from twisted.internet import reactor
import binasci... | numPkts_tx = -1
numPkts_rx_good = -1
numPkts_rx_goodHdrBadPyld = -1 |
<|file_name|>path-underscore.rs<|end_file_name|><|fim▁begin|>// Test that `impl MyTrait for Foo<'_>` works.
// run-pass
#![allow(warnings)]
trait MyTrait { }
struct Foo<'a> { x: &'a u32 }
impl MyTrait for Foo<'_> {<|fim▁hole|>
fn impls_my_trait<T: MyTrait>() { }
fn impls_my_trait_val<T: MyTrait>(_: T) {
impls... | } |
<|file_name|>sandesh_req_impl.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
from pysandesh_example.gen_py.vn.ttypes import VirtualNetwork, VNInfo, VirtualNetworkResp, \
VirtualNetworkAll, VNStats, VirtualNetworkAllResp
def VirtualNetwork_handle_request(s... | |
<|file_name|>main.js<|end_file_name|><|fim▁begin|>#! /usr/bin/env node
import minimist from 'minimist'
import Avifors from './Avifors'
import YamlModelBuilder from './model/YamlModelBuilder'
import Configuration from './Configuration'
import {helpMessage} from './help'
import YamlHelper from './tools/YamlHelper'
cons... | avifors.getCommand(userCommand)({ |
<|file_name|>convert.py<|end_file_name|><|fim▁begin|># Copyright 2015 OpenStack Foundation
# 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... | if os.path.exists(fs_path):
os.path.remove(fs_path)
|
<|file_name|>run_test.py<|end_file_name|><|fim▁begin|>import os
import json
import glob
def main():
prefix = os.environ['PREFIX']
info_files = glob.glob(os.path.join(prefix, 'conda-meta',
'conda-build-test-numpy-run-1.0-py*0.json'))
assert len(info_files) == 1<|fim▁hole|> as... | info_file = info_files[0]
with open(info_file, 'r') as fh:
info = json.load(fh)
|
<|file_name|>UsbDriverListener.java<|end_file_name|><|fim▁begin|>package com.limelight.binding.input.driver;
public interface UsbDriverListener {
void reportControllerState(int controllerId, short buttonFlags,
float leftStickX, float leftStickY,
float r... | } |
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>"""
WSGI config for invoices project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands disc... | # from helloworld.wsgi import HelloWorldApplication
# application = HelloWorldApplication(application) |
<|file_name|>ActivityGroupServiceInterfacegetActivityGroupsByStatement.java<|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
//
//... | * </restriction> |
<|file_name|>truncate_images.rs<|end_file_name|><|fim▁begin|>//! Ensure truncated images are read without panics.
use std::fs;
use std::io::Read;
use std::path::PathBuf;
extern crate glob;
extern crate image;
const BASE_PATH: [&'static str; 2] = [".", "tests"];
const IMAGE_DIR: &'static str = "images";
fn process_i... |
#[test]
#[ignore] |
<|file_name|>_datestrings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2013 Vassilii Khachaturov
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published b... |
self.persian = (
"",
# TRANSLATORS: see |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
LICENCE
-------
Copyright 2015 by Kitware, Inc. All Rights Reserved. Please refer to
KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
<|fim▁hole|>multipl... | SMQTK subsystem providing the ability to manage and fuse index rankings from |
<|file_name|>streamer.rs<|end_file_name|><|fim▁begin|>use fst::{self, IntoStreamer, Streamer};
use fst::map::{StreamBuilder, Stream};
use common::BinarySerializable;
use super::TermDictionary;
/// `TermStreamerBuilder` is an helper object used to define
/// a range of terms that should be streamed.
pub struct TermStre... | ///
/// Calling `.value()` before the first call to `.advance()` or `.next()`
/// is undefined behavior. |
<|file_name|>dao.test.js<|end_file_name|><|fim▁begin|>var chai = require('chai')
, expect = chai.expect
, Support = require(__dirname + '/../support')
, dialect = Support.getTestDialect()
, DataTypes = require(__dirname + "/../../lib/data-types")
, _ = require('lodash')
, sequelize = req... | this.User.bulkCreate([
{username: 'bob', email: ['myemail@email.com']}, |
<|file_name|>const-vec-of-fns.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 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.or... | } |
<|file_name|>storlet.py<|end_file_name|><|fim▁begin|>'''
A Mini-implementation of the Storlet middleware filter.
@author: josep sampe
'''
from swift.common.utils import get_logger
from swift.common.utils import register_swift_info
from swift.common.swob import Request
from swift.common.utils import config_true_value
f... | |
<|file_name|>vec_map.rs<|end_file_name|><|fim▁begin|>#[derive(Clone)]
pub struct VecMap<K, V> {
vec: Vec<(K, V)>,
}
impl<K: PartialEq, V> VecMap<K, V> {
pub fn new() -> VecMap<K, V> {<|fim▁hole|> }
}
pub fn insert(&mut self, key: K, value: V) {
match self.find(&key) {
Some(p... | VecMap {
vec: Vec::new() |
<|file_name|>ProcessingConfigurationJsonUnmarshaller.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2012-2017 Amazon.com, Inc. or its affiliates. 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. A copy of t... | /**
* ProcessingConfiguration JSON Unmarshaller
*/ |
<|file_name|>logfile.py<|end_file_name|><|fim▁begin|>from mtools.util.logevent import LogEvent
from mtools.util.input_source import InputSource
from math import ceil
from datetime import datetime<|fim▁hole|> """ wrapper class for log files, either as open file streams of from stdin. """
def __init__(self, fil... | import time
import re
class LogFile(InputSource): |
<|file_name|>borrowck-uninit-after-item.rs<|end_file_name|><|fim▁begin|>fn main() {<|fim▁hole|> baz(bar); //~ ERROR use of possibly-uninitialized variable: `bar`
}<|fim▁end|> | let bar;
fn baz(_x: isize) { } |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals<|fim▁hole|>
def connect_sqs(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):
"""Return async connection to Amazon SQS."""
from .sqs.connection import AsyncSQSConne... | |
<|file_name|>class_browser.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from etsdevtools.developer.tools.vet.class_browser import *<|fim▁end|> | # proxy module
from __future__ import absolute_import |
<|file_name|>Init.ts<|end_file_name|><|fim▁begin|>namespace System
{
/**
* 系统总初始化函数
*/
export function Init()
{
let CreateProcess=ProcessCore.CreateProcessByCode;
let sign=CreateProcess(`
onmessage=function(){
for(let i=0;i<100;++i){console.log(i);}<|fim▁hole|> ... | postMessage({operation:"Post",data:{DestType:"System",Dest:"test",Data:"hello world"}});
}
`); |
<|file_name|>GUIWindowVideoBase.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2005-2008 Team XBMC
* http://www.xbmc.org
*
* 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;... | buttons.Add(CONTEXT_BUTTON_PLAY_AND_QUEUE, 13412);
}
if (item->IsSmartPlayList() || m_vecItems->IsSmartPlayList())
buttons.Add(CONTEXT_BUTTON_EDIT_SMART_PLAYLIST, 586); |
<|file_name|>google.py<|end_file_name|><|fim▁begin|>import json
import urllib<|fim▁hole|>import urllib2
def shorten(url):
gurl = 'http://goo.gl/api/url?url=%s' % urllib.quote(url)
req = urllib2.Request(gurl, data='')
req.add_header('User-Agent','toolbar')
results = json.load(urllib2.urlopen(req))
... | |
<|file_name|>CantTransactionBankMoneyException.java<|end_file_name|><|fim▁begin|>package com.bitdubai.fermat_bnk_api.layer.bnk_wallet.bank_money.exceptions;
import com.bitdubai.fermat_api.FermatException;
/**
* Created by Yordin Alayn on 18.09.15.
*/
public class CantTransactionBankMoneyException extends FermatExc... | public static final String DEFAULT_MESSAGE = "Falled To Get Bank Transaction Wallet Bank Money."; |
<|file_name|>node.rs<|end_file_name|><|fim▁begin|>//! B+-tree nodes.
use std::borrow::{Borrow, BorrowMut};
use std::fmt;
use super::{Forest, Node, INNER_SIZE, SetValue, slice_insert, slice_shift};
/// B+-tree node.
///
/// A B+-tree has different node types for inner nodes and leaf nodes. Inner nodes contain M node
/... | |
<|file_name|>Cl4pgConfFileException.java<|end_file_name|><|fim▁begin|>/*
The MIT License (MIT)
Copyright (c) 2014 Manni Wood
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, i... | |
<|file_name|>client-core.ts<|end_file_name|><|fim▁begin|>/**
* Client core
*
* No dependencies.
* Does three unrelated things:
* 1. sets up polyfills where necessary
* 2. sets up PS's model base classes
* 3. sets up the model and view for PS's backgrounds
*
* The background is mostly here so the new background... | |
<|file_name|>UserManager.java<|end_file_name|><|fim▁begin|>package svc.managers;
import javax.inject.Inject;
import org.springframework.stereotype.Component;
import svc.data.users.UserDAO;
import svc.models.User;
@Component
public class UserManager {
@Inject
private UserDAO userDAO;<|fim▁hole|>
public User GetU... |
public User Login(String userId, String pwd) {
return userDAO.checkUserLogin(userId, pwd);
} |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models
# Create your models here.
from core.models import BillingSchedule
from core.models import Bill
from core.models import Account
from core.models import FileRepo
from core.models import Config<|fim▁hole|><|fim▁end|> | from core.models import Task |
<|file_name|>south_carolina.py<|end_file_name|><|fim▁begin|>import sys
import mechanize
import re
import json
import time
import urllib
import dogcatcher
import HTMLParser
import os
h = HTMLParser.HTMLParser()
cdir = os.path.dirname(os.path.abspath(__file__)) + "/"
tmpdir = cdir + "tmp/"
voter_state = "SC"
source = ... | phone_re =re.compile(">[^x]*?(\(*\d{3}\)*[ -]*\d{3}-.+?)[<F]") |
<|file_name|>beta_decrease.py<|end_file_name|><|fim▁begin|>from .naive import StratNaive
import random
import numpy as np
class BetaDecreaseStrat(StratNaive):
def __init__(self, vu_cfg, time_scale=0.9, **strat_cfg2):<|fim▁hole|> def update_speaker(self, ms, w, mh, voc, mem, bool_succ, context=[]):
self.voc_update.b... | StratNaive.__init__(self,vu_cfg=vu_cfg, **strat_cfg2)
self.time_scale = time_scale
|
<|file_name|>klee-unit.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#########################################################################################
# KLEE-Unit
# Author: Jacob Torrey
# Date: 3/15/2016
#
# Script to auto-generate test harness and execute symbolically with KLEE for a passed C
# file
#... | |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import Ember from 'ember';
export default Ember.Controller.extend({
resume: Ember.inject.controller(),
actions: {
scrollToElem: function(selector) {
this.get('resume').send('scrollToElem', selector);
},
selectTemplate: function(template) {<|fim▁h... | |
<|file_name|>configureStore.ts<|end_file_name|><|fim▁begin|>declare const module: { hot: any };
import * as Raven from "raven-js";
const createRavenMiddleware = require("raven-for-redux");<|fim▁hole|>import { createStore, applyMiddleware } from "redux";
import rootReducer from "reducers";
import { thunderCall } from ... |
import thunkMiddleware from "redux-thunk";
import * as createLogger from "redux-logger"; |
<|file_name|>date.py<|end_file_name|><|fim▁begin|># Created By: Eric Mc Sween
# Created On: 2007-12-12
# Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are al... | return self.around(self.end + ONE_DAY)
def prev(self):
return self.around(self.start - ONE_DAY) |
<|file_name|>ICalendar.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2010 Mark Liversedge (liversedge@gmail.com)
*
* 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 ... | { ICAL_QUERY_PROPERTY, tr("Query") },
{ ICAL_QUERYLEVEL_PROPERTY, tr("Query Level") },
{ ICAL_QUERYID_PROPERTY, tr("Query Identifier") }, |
<|file_name|>aggregates_client.py<|end_file_name|><|fim▁begin|># Copyright 2013 NEC Corporation.
# 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
#
# ht... | return True
return False
|
<|file_name|>FileUtil.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2014 http://Bither.net
*
* 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|>sys_current_frames.py<|end_file_name|><|fim▁begin|>import sys
import threading
import time
io_lock = threading.Lock()
blocker = threading.Lock()
def block(i):
t = threading.current_thread()
with io_lock:
print('{} with ident {} going to sleep'.format(
t.name, t.ident))
if... | print(t.name, 'finishing')
return
|
<|file_name|>abstractanimation.py<|end_file_name|><|fim▁begin|><|fim▁hole|> by all animation extension.
"""
class AbstractAnimation(object):
""" An abstract animation that defines method(s) that must be implemented
by animation extensions.
"""
def __init__(self, driver):
self.driver = dr... | #-*- coding: utf-8 -*-
""" This script contains the abstract animation object that must be implemented |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import logging
from docker.utils import kwargs_from_env
from cattle import default_value, Config
log = logging.getLogger('docker')
_ENABLED = True
class DockerConfig:
def __init__(self):
pass
@staticmethod
def docker_enabled():
retu... | |
<|file_name|>mp-show-hide-script.js<|end_file_name|><|fim▁begin|>/**
* Created by ken_kilgore1 on 1/11/2015.
*/
jQuery(document).ready(function ($) {
$("#spouse_info").hide();
$("#spouse_spacer").hide();
$("#family_info").hide();
$("#family_spacer").hide();
$("input:radio[name$='memb_type']").cli... | $("#spouse_spacer").show(); |
<|file_name|>toddl.go<|end_file_name|><|fim▁begin|>// Copyright 2020 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//... | "github.com/cloudspannerecosystem/harbourbridge/common/constants" |
<|file_name|>density_calc.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
fin = open('figs/single-rod-in-water.dat', 'r')
fout = open('figs/single-rods-calculated-density.dat', 'w')
kB = 3.16681539628059e-6 # This is Boltzmann's constant in Hartree/Kelvin
first = 1
nm = 18.8972613
for line in fin:
current = str(lin... | #!/usr/bin/env python
import math |
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># Copyright 2020 Google LLC. 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/... | |
<|file_name|>test_get_started.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ==============================================================================
# author :Ghislain Vieilledent
# email :ghislain.vieilledent@cirad.fr, ghislainv@gmail.com
# web :h... | |
<|file_name|>test_hero.hh<|end_file_name|><|fim▁begin|>#pragma once
#include <gtest/gtest.h>
class HeroTest : public ::testing::Test
{
// Test interface
protected:
void SetUp() override
{
}
void TearDown() override<|fim▁hole|>
};<|fim▁end|> | {
} |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>angular.module('fdb.directives', ['mcus.directives']);
angular.module('fdb.services', ['mcus.services']);
angular.module('fdb.filters', []);
angular.module('fdb', ['fdb.services', 'fdb.directives', 'fdb.filters']).
controller('UserFrontendCtrl', function($scope, $http,... | $http.post(Config.baseUrl + '/UsersFrontends/checkExistEmail', {'email' : $scope.editingUser.email, 'id' : $scope.editingUser.id}).success(function (res) {
// Not allow edit with existed email |
<|file_name|>HScrollController.java<|end_file_name|><|fim▁begin|>package org.ebookdroid.core;
import android.graphics.Rect;
import android.graphics.RectF;
import com.foobnix.model.AppBook;
import org.ebookdroid.common.settings.SettingsManager;
import org.ebookdroid.common.settings.types.DocumentViewMode;
import org.... | |
<|file_name|>ClassAncestry.java<|end_file_name|><|fim▁begin|>/* Copyright (C) 2013-2014 Computer Sciences Corporation
*
* 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://ww... | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. */
|
<|file_name|>processorValidation.spec.ts<|end_file_name|><|fim▁begin|>const {expect, spy} = require('chai').use(require('chai-spies'));
import {Dgeni} from '../Dgeni';
import {processorValidationPackage} from './processorValidation';
describe('processorValidation', () => {
let dgeni, mockLogger;
beforeEach(() =... | }); |
<|file_name|>navigate.rs<|end_file_name|><|fim▁begin|>use core::borrow::Borrow;
use core::hint;
use core::ops::RangeBounds;
use core::ptr;
use super::node::{marker, ForceResult::*, Handle, NodeRef};
// `front` and `back` are always both `None` or both `Some`.
pub struct LeafRange<BorrowType, K, V> {
front: Option... | |
<|file_name|>ModalFooter.d.ts<|end_file_name|><|fim▁begin|>import { CSSModule } from '../index';<|fim▁hole|> cssModule?: CSSModule;
}
declare const ModalFooter: React.StatelessComponent<ModalFooterProps>;
export default ModalFooter;<|fim▁end|> |
export interface ModalFooterProps {
tag?: React.ReactType;
className?: string; |
<|file_name|>day14.rs<|end_file_name|><|fim▁begin|>use std::io::Read;
use itertools::Itertools;
use nom::bytes::complete::tag;
use nom::bytes::complete::take_while;
use nom::character::is_alphabetic;
use nom::multi::many0;
use nom::sequence::preceded;
use nom::sequence::terminated;
use nom::sequence::tuple;
use nom::F... | } |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
<|fim▁hole|>distribute_setup.use_setuptools()
import setuptools
setuptools.setup(
name='gae-console',
description=('Powerful Interactive Console for App Engine applications.'),
version='0.1.0',
packages=setuptools.find_packages(),
autho... | import distribute_setup
# User may not have setuptools installed on their machines.
# This script will automatically install the right version from PyPI. |
<|file_name|>hgk.py<|end_file_name|><|fim▁begin|># Minimal support for git commands on an hg repository
#
# Copyright 2005, 2006 Chris Mason <mason@suse.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
'''browse the repository... | "start interactive history viewer" |
<|file_name|>requestType.js<|end_file_name|><|fim▁begin|>import request from "./request";
export default function(defaultMimeType, response) {
return function(url, callback) {
var r = request(url).mimeType(defaultMimeType).response(response);<|fim▁hole|>};<|fim▁end|> | return callback ? r.get(callback) : r;
}; |
<|file_name|>tumblrserv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
## tumblrserv.py implements a Tumblr (http://www.tumblr.com) markup parsing
## engine and compatible webserver.<|fim▁hole|>## Copyright (C) 2009 Jeremy Herbert
## Contact mailto:jeremy@jeremyherbert.net
##
## This program is f... | ##
## Version: 0.2 final
## |
<|file_name|>AddFieldQuickFix.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2000-2014 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.apache.org/lice... | * User: dcheryasov |
<|file_name|>storage.go<|end_file_name|><|fim▁begin|>/*
Copyright 2017 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
Unless... | return resources, err
}
for _, i := range items { |
<|file_name|>validator.py<|end_file_name|><|fim▁begin|># coding: utf-8
# Copyright (C) 2017 Jaime Bemarás
# See LICENSE.txt
from IPy import IP
import re
ASN = re.compile(r'AS\d+', re.IGNORECASE)
<|fim▁hole|>
for resource in resources:
if ASN.match(resource):
continue
else:
... |
def validate(resources):
outcome = True |
<|file_name|>account_db.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Ethcore (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 o... | self.db.emplace(ak, DBValue::from_slice(value)); |
<|file_name|>UdpServer.java<|end_file_name|><|fim▁begin|>/**
* A network library for processing which supports UDP, TCP and Multicast.
*
* (c) 2004-2011
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Fre... | * @invisible
* @param theListener |
<|file_name|>angular-svg-nodes-transformer-spec.js<|end_file_name|><|fim▁begin|>'use strict';
var _deepFreeze = require('deep-freeze');
var _deepFreeze2 = _interopRequireDefault(_deepFreeze);
var _rowModel = require('./row/row-model');
var _rowModel2 = _interopRequireDefault(_rowModel);
var _nodeModel = require('.... | id: 8,
name: "C1",
ui_column_index: 0,
ui_row_index: 2, |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/*
Copyright 2013 Jesse 'Jeaye' Wilkerson
See licensing in LICENSE file, or at:
http://www.opensource.org/licenses/BSD-3-Clause
File: shared/obj/voxel/mod.rs
Author: Jesse 'Jeaye' Wilkerson
Description:
An aggregator of voxel-oriented i... | */
pub use self::map::Map;
pub use self::vertex::Vertex; |
<|file_name|>index.test.js<|end_file_name|><|fim▁begin|>import { Selector } from 'testcafe'
const host = process.env.HOST || 'localhost'
const port = process.env.PORT || '3000'
const MAIN_PAGE = `http://${host}:${port}`<|fim▁hole|>})
test('home page', async (t) => {
await t
.expect(
await Selector('section'... | // eslint-disable-next-line no-unused-expressions, no-undef
fixture`Hello, world!`.beforeEach(async (t) => {
await t.setNativeDialogHandler(() => true)
await t.navigateTo(MAIN_PAGE) |
<|file_name|>serve.go<|end_file_name|><|fim▁begin|>package cmd
import (
"fmt"
"net"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/grpclog"
"github.com/ferrariframework/ferrariserver/config"
"github.com/ferrariframework/ferrariserver/grpc/gen"
rpcservices "github.com/fe... | tls := viper.GetBool(tlsKey) |
<|file_name|>enterexitpushbutton.cpp<|end_file_name|><|fim▁begin|>/***********************************************************************************
* *
* Voreen - The Volume Rendering Engine *... | QPushButton::leaveEvent(event);
}
|
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main
import (
"fmt"
"time"
"github.com/kevinburke/rct/genetic"
)
func main() {<|fim▁hole|> }
}<|fim▁end|> | files := genetic.GetOldFiles(1 * time.Hour)
for _, file := range files {
fmt.Println(file) |
<|file_name|>generator.rs<|end_file_name|><|fim▁begin|>// This file is part of libfringe, a low-level green threading library.
// Copyright (c) whitequark <whitequark@whitequark.org>,
// Nathan Zadoks <nathan@nathan7.eu>
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apach... | |
<|file_name|>wiredep.js<|end_file_name|><|fim▁begin|>// Inject Bower components into source code
//
// grunt-wiredep: <https://github.com/stephenplusplus/grunt-wiredep>
// wiredep: <https://github.com/taptapship/wiredep>
'use strict';
module.exports = {
markups: {<% if (cfg.html) { %>
src: ['<%%= path.markups %... | ignorePath: /(\.\.\/)*\.\.(?=\/)/<% if (cfg.pug) { %>,
// Support "*.pug" files
fileTypes: {
pug: { |
<|file_name|>ticker_test.go<|end_file_name|><|fim▁begin|>/*
Copyright 2015 Daniel Nichter
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at... |
// Remove c1 and recv on c2 now. Even though c2 missed previous 2 ticks,
// it should be able to start receiving new ticks. By contrast, c1 should |
<|file_name|>test_unit_gppkg.py<|end_file_name|><|fim▁begin|>from mock import *
from .gp_unittest import *
from gppylib.programs.gppkg import GpPkgProgram
import sys
class GpPkgProgramTestCase(GpTestCase):
def setUp(self):
self.mock_cmd = Mock()
self.mock_gppkg = Mock()
self.mock_uninstal... | self.apply_patches([
patch('gppylib.operations.package.logger', return_value=Mock(spec=['log', 'info', 'debug', 'error'])),
patch('gppylib.programs.gppkg.Command', return_value=self.mock_cmd), |
<|file_name|>liblancard.ts<|end_file_name|><|fim▁begin|><!DOCTYPE TS><TS>
<context>
<name>LanCardGUI</name>
<message>
<source>LAN card</source>
<translation>LAN karta</translation>
</message>
<message>
<source>Any available LAN card</source>
<translation>Jakákoliv dostupn... | <translation>Rozhraní nebylo nalezeno</translation> |
<|file_name|>generic-tuple-style-enum.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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://... | // gdb-command:finish
// gdb-command:print case1 |
<|file_name|>session_manager.py<|end_file_name|><|fim▁begin|># Copyright 2015 The TensorFlow 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://www.a... | ready_value.size == 0):
return True, None |
<|file_name|>cred_def.rs<|end_file_name|><|fim▁begin|>use super::constants::{CRED_DEF, GET_CRED_DEF};
use super::response::{GetReplyResultV1, ReplyType};
use super::super::anoncreds::credential_definition::{CredentialDefinitionData, CredentialDefinitionV1, SignatureType, CredentialDefinitionId};
use super::super::anonc... | |
<|file_name|>check.py<|end_file_name|><|fim▁begin|>import json
import requests
import logging
logger = logging.getLogger(__name__)
import warnings
import time
import sys
from counterpartylib.lib import config
from counterpartylib.lib import util
from counterpartylib.lib import exceptions
from counterpartylib.lib impor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.