prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>nakagawa_haruka.py<|end_file_name|><|fim▁begin|># encoding: utf-8 import datetime __all__ = [ 'info', ] def info(): return { 'birthday': datetime.date(1992, 2, 10), 'class': 3,<|fim▁hole|> 'graduate_date': None, 'hometown': u'東京', ...
'family_name_en': u'nakagawa', 'family_name_kana': u'なかがわ', 'first_name_en': u'haruka', 'first_name_kana': u'はるか',
<|file_name|>interface.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import numpy as np from cereal import car from common.numpy_fast import clip, interp from common.realtime import sec_since_boot from selfdrive.swaglog import cloudlog from selfdrive.config import Conversions as CV from selfdrive.cont...
ret.steerMaxBP = [0.] # m/s ret.steerMaxV = [1.] # max steer allowed
<|file_name|>dwrite.rs<|end_file_name|><|fim▁begin|>// 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. // All files in the project carrying such notice may not be c...
<|file_name|>CalendarList.web.js<|end_file_name|><|fim▁begin|>// @flow import Spinner from '@atlaskit/spinner'; import React from 'react'; import { translate } from '../../base/i18n'; import { AbstractPage } from '../../base/react'; import { connect } from '../../base/redux'; import { openSettingsDialog, SETTINGS_TAB...
this.props.dispatch(refreshCalendar(true)); } }
<|file_name|>ssl-test.js<|end_file_name|><|fim▁begin|>var async = require('async'), awsSDK = require('aws-sdk'), uuid = require('node-uuid'); function client() { return new awsSDK.DynamoDB().client; } function putItem(done) { var item = { TableName: "test.performance.ssl", Item: { id: { ...
}; client().putItem(item, done); };
<|file_name|>ParticleData.cpp<|end_file_name|><|fim▁begin|>#include "ParticleData.h" #include <algorithm> #include <cassert> namespace { template<typename T> void ResizeVector(T& obj, size_t size) { obj.clear(); obj.resize(size); obj.shrink_to_fit(); } template<typename T> size_t STLMemory(T& obj) { using Type ...
<|file_name|>HasCookieStore.java<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * Copyright (c) 2016 Ni YueMing<niyueming@163.com> * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www...
<|file_name|>remote2gtts.py<|end_file_name|><|fim▁begin|>#!/bin/python import sys import vlc import os import re from tempfile import * from gtts import gTTS from remote2text import RGBRemote2Text parser = RGBRemote2Text(verbose=True) while True: ir_out = input() response = parser.process(ir_out) if res...
<|file_name|>stringLiteralTypesOverloads03.js<|end_file_name|><|fim▁begin|>//// [stringLiteralTypesOverloads03.ts] interface Base { x: string;<|fim▁hole|> p1: boolean; } interface JustHello extends Base { p2: boolean; } interface JustWorld extends Base { p3: boolean; } let hello: "hello"; let world:...
y: number; } interface HelloOrWorld extends Base {
<|file_name|>live-announcer.d.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { ContentObserver } from '@angular/cdk/observers'...
/** @docs-private @deprecated @breaking-change 7.0.0 */ export declare function LIVE_ANNOUNCER_PROVIDER_FACTORY(parentDispatcher: LiveAnnouncer, liveElement: any, _document: any): LiveAnnouncer; /** @docs-private @deprecated @breaking-change 7.0.0 */ export declare const LIVE_ANNOUNCER_PROVIDER: Provider;
<|file_name|>test_snap.py<|end_file_name|><|fim▁begin|>from syncloud_platform.snap.models import App, AppVersions from syncloud_platform.snap.snap import join_apps def test_join_apps(): installed_app1 = App() installed_app1.id = 'id1' installed_app_version1 = AppVersions() installed_app_version1.inst...
installed_app_version2.app = installed_app2
<|file_name|>emojiReactionsView_reactable.graphql.js<|end_file_name|><|fim▁begin|>/** * @flow */ /* eslint-disable */ 'use strict'; /*:: import type { ReaderFragment } from 'relay-runtime'; export type ReactionContent = "CONFUSED" | "EYES" | "HEART" | "HOORAY" | "LAUGH" | "ROCKET" | "THUMBS_DOWN" | "THUMBS_UP" | "...
"alias": null,
<|file_name|>client.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- import uuid import socket import time <|fim▁hole|>__author__ = "Marco Sirabella, Owen Davies" __copyright__ = "" __credits__ = "Marco Sirabella, Owen Davies" __license__ = "new BSD 3-Clause" __version__ ...
__appname__ = "pymessage"
<|file_name|>beforeUnmodifiableListJava16.java<|end_file_name|><|fim▁begin|>// "Replace 'collect(toUnmodifiableList())' with 'toList()'" "true"<|fim▁hole|> void test(Stream<String> stream) { List<String> list = stream.collect<caret>(Collectors.toUnmodifiableList()); } }<|fim▁end|>
import java.util.List; import java.util.stream.*; class X {
<|file_name|>delete_groups_batch.py<|end_file_name|><|fim▁begin|>from examples import acquire_token_by_username_password from office365.graph_client import GraphClient client = GraphClient(acquire_token_by_username_password) groups = client.groups.get().top(1).execute_query()<|fim▁hole|>for cur_grp in groups: cur...
<|file_name|>datauri.py<|end_file_name|><|fim▁begin|>from w3lib.url import parse_data_uri from scrapy.http import TextResponse from scrapy.responsetypes import responsetypes from scrapy.utils.decorators import defers class DataURIDownloadHandler(object): lazy = False def __init__(self, settings): su...
def download_request(self, request, spider): uri = parse_data_uri(request.url) respcls = responsetypes.from_mimetype(uri.media_type)
<|file_name|>wsname_applet.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- #Uncomment to debug. If you aren't me, I bet you want to change the paths, too. import sys from wsnamelet import wsnamelet_globals if wsnamelet_globals.debug: sys.stdout = open ("/home/munizao/hacks/wsnamelet/d...
width = 100 editing = False def __init__(self, applet):
<|file_name|>adopt_into_b.py<|end_file_name|><|fim▁begin|>class ClassC(object): FAMILY_INHERIT = {'a'} <|fim▁hole|> def c(self): return 'family_b: C' @classmethod def super_family(cls): return cls.module.super_family<|fim▁end|>
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># coding: utf-8<|fim▁hole|><|fim▁end|>
__version__ = '0.1.0'
<|file_name|>PILTest.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from PIL import Image, ImageFont, ImageDraw <|fim▁hole|>frame = Image.new("RGBA", (300,300)) frameDraw = ImageDraw.Draw(frame) #load font fontpath = "/usr/share/fonts/truetype/freefont/FreeMono.ttf" # use a truetype font font = ImageFont.truet...
def drawPoint(imagedraw,x,y,width,colour): imagedraw.ellipse((x-(width/2),y-(width/2),x+(width/2),y+(width/2)), colour)
<|file_name|>client.rs<|end_file_name|><|fim▁begin|>//! WARNING: This file is generated, derived from table bazaar.client, DO NOT EDIT use chrono::datetime::DateTime; use chrono::offset::utc::UTC; use gen::column; use gen::schema; use gen::table; use rustc_serialize::json::Json; use rustc_serialize::json::ToJson; use ...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
# from . import test_partner_import from . import test_product_import
<|file_name|>test.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, unicode_literals import os import shutil import zipfile import datetime import tempfile import subprocess from copy import deepcopy import pytest import numpy as np from numpy.testing import assert_almost_equal from sklearn.dummy...
from destimator import DescribedEstimator, utils
<|file_name|>common.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ This is the common settings file, intended to set sane defaults. If you have a piece of configuration that's dependent on a set of feature flags being set, then create a function that returns the calculated value based on the value of FEATU...
from lms.lib.xblock.mixin import LmsBlockMixin
<|file_name|>launchfacebook.js<|end_file_name|><|fim▁begin|>var browser = chrome; var activetabs = []; //alert("launchfacebook"); document.addEventListener('DOMContentLoaded', function () { var css_lastcouche ='.lastcouche {background-image:'+chrome.extension.getURL('src/css/internet.gif')+';}'; chrome.tabs.inser...
}); });
<|file_name|>DateFormatter.java<|end_file_name|><|fim▁begin|>/* Copyright (c) 2014 Andrea Zoli. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ package it.inaf.android; import java.text.ParseException; import java.text.SimpleDateFormat; i...
}
<|file_name|>helpers.js<|end_file_name|><|fim▁begin|>module.exports = { defersToPromises : function(defers) { if(Array.isArray(defers)) { return defers.map(function(defer) { return defer && defer.promise ? defer.promise : defer; ...
} var res = {}; Object.keys(defers).forEach(function(key) {
<|file_name|>SQLElementDirectory.java<|end_file_name|><|fim▁begin|>/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved. * * The contents of this file are subject to the terms of the GNU General Public License Version 3 * o...
/**
<|file_name|>SpatialJoin.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ *************************************************************************** SpatialJoin.py --------------------- Date : October 2013 Copyright : (C) 2013 by Joshua Arnott Email ...
count = count + 1 none = False atMap2 = inFeatB.attributes() if not summary:
<|file_name|>sqldata.py<|end_file_name|><|fim▁begin|>from sqlagg.columns import SimpleColumn from sqlagg.filters import BETWEEN, IN, EQ from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn from corehq.apps.reports.sqlreport import SqlData, DataFormatter, TableDataFormat, DatabaseColumn from cus...
<|file_name|>app.component.spec.ts<|end_file_name|><|fim▁begin|>import { TestBed, async } from '@angular/core/testing';<|fim▁hole|>import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ AppComponent ...
<|file_name|>common.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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.org/lic...
for bcx in in_cxs.iter() {
<|file_name|>base.py<|end_file_name|><|fim▁begin|># Copyright 2014 Cisco Systems, 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/LICE...
if os.environ.get('OS_SUDO_TESTING') not in base.TRUE_STRING:
<|file_name|>from_list.rs<|end_file_name|><|fim▁begin|>use crate::*; // List used for calling from_list tests. fn get_list<'a>() -> &'a [(i16, i16); 8] { &[ (0, 0), // Default test, (100, 100), // Two positive values test, (50, -50), // One positive one negative test. ...
} #[test] fn coordinate() {
<|file_name|>geopackage.py<|end_file_name|><|fim▁begin|># This file is part of the MapProxy project. # Copyright (C) 2011-2013 Omniscale <http://omniscale.de> # 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 ...
<|file_name|>Crypto.java<|end_file_name|><|fim▁begin|>/* Copyright 1996-2008 Ariba, 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/LICENS...
private CryptoChar cryptoChar; private boolean passThrough = false;
<|file_name|>local_data.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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.org...
assert_eq!(*key_int.get().unwrap(), 3);
<|file_name|>SimpleUnionAttributeWritingStrategy.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2013 Cisco Systems, Inc. and others. 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...
import com.google.common.base.Preconditions; import org.opendaylight.controller.netconf.confignetconfconnector.util.Util; import org.w3c.dom.Document;
<|file_name|>test_docker.py<|end_file_name|><|fim▁begin|>import re import uuid as py_uuid from common_fixtures import * # NOQA from test_volume import VOLUME_CLEANUP_LABEL TEST_IMAGE = 'ibuildthecloud/helloworld' TEST_IMAGE_LATEST = TEST_IMAGE + ':latest' TEST_IMAGE_UUID = 'docker:' + TEST_IMAGE if_docker = pytest.m...
try: container = docker_client.wait_success(container)
<|file_name|>tests.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use std::io; use std::usize; use crate::{AhoCorasickBuilder, Match, MatchKind}; /// A description of a single test against an Aho-Corasick automaton. /// /// A single test may not necessarily pass on every configuration of an /// Aho-Co...
t!( aleftmost400, &["h", "abcdefghi", "hz", "abcdefgh"], "abcdefghz",
<|file_name|>event.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::cell::DOMRefCell; use dom::bindings::codegen...
let type_ = self.type_.borrow();
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export * from './aurelia-pal-worker';
<|file_name|>digitizingtools_de.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="de_DE" sourcelanguage="en_GB"> <context> <name>DigitizingTools</name> <message> <location filename="../digitizingtools.py" line="85"/> <source>&amp;Dig...
<message>
<|file_name|>qdeclarativestate.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtDeclarative module of the Qt Toolkit....
<|file_name|>test_git.py<|end_file_name|><|fim▁begin|><|fim▁hole|> from voltgrid import GitManager def git_checkout(git_url, git_branch=None, git_tag=None, git_hash=None): git_dst = tempfile.mkdtemp() g = GitManager(url=git_url, git_dst=git_dst, git_branch=git_branch, git_tag=git_tag, git_hash=git_hash) g...
import tempfile import shutil
<|file_name|>serial.rs<|end_file_name|><|fim▁begin|>//! Serde integration support. use std::fmt; use std::marker::PhantomData; use serde::de::{Error, Unexpected, Visitor}; use serde::*; fn i64_to_u64<'d, V: Visitor<'d>, E: Error>(v: V, n: i64) -> Result<V::Value, E> { if n >= 0 { v.visit_u64(n as u64) } else { ...
}
<|file_name|>kpn_data_provider.py<|end_file_name|><|fim▁begin|># Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 ...
<|file_name|>testsuite.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # Hi There! # You may be wondering what this giant blob of binary data here is, you might # even be worried that we're up to something nefarious (good for you for being # paranoid!). This is a base64 encoding of a zip file, this zip file con...
1meUUS8W6Babmh1bjdpudLPOoFV8ZhSyKFKiaG7eThdIQ8OoqBSztyRnV/HNGIynuzrowX8ISPdH kLh81UTeHwf946ZehR+gWtXdW3RbtGXbPPUR6sqwhWgHTQnTQ1/YwgOPoeZVvxtnSSh59EnAR2Y+ Y0K/YeiUjbtNTJnxOfpz7BzRfiLaO9h8jgl6icTYAHzTlFf4QYTIup87NhT8k/1jIwqSGZ1fUnjN
<|file_name|>popup.py<|end_file_name|><|fim▁begin|># # Advene: Annotate Digital Videos, Exchange on the NEt # Copyright (C) 2008-2017 Olivier Aubert <contact@olivieraubert.net> # # Advene is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the...
<|file_name|>build.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import os import requests from collections import defaultdict from glob import glob def convert(dpi, equation): url = 'http://latex.codecogs.com/png.latex?' r = requests.get(url, params='\dpi{' + str(dpi) + '} ' + equation) print('HTTP ...
<|file_name|>sync-rsync.py<|end_file_name|><|fim▁begin|># Canto rsync Plugin # by Jack Miller # v1.1 <|fim▁hole|>ENABLED = False #ENABLED = True # SSH # For ssh based rsync (remote hosts) you should have key authentication setup # so it runs without prompting for a password. #SYNC_LOCATION = "user@host:" # Dropbox, ...
# This implements a lightweight remote sync based around rsync to a remote # server, or copying to mounted filesystem, etc.
<|file_name|>AtualizacaoController.java<|end_file_name|><|fim▁begin|>package controllers; import static akka.pattern.Patterns.ask; import static play.libs.Json.toJson; import java.time.LocalDateTime; import java.time.ZoneOffset; import java.util.Date; import java.util.UUID; import java.util.concurrent.TimeUnit; impor...
}
<|file_name|>netperf.py<|end_file_name|><|fim▁begin|>""" Run latency & thruput tests on various server configurations. """ import glob import os.path import shutil import time from openmdao.main.mp_util import read_server_config from openmdao.main.objserverfactory import connect, start_server from openmdao.util.fileu...
factory.cleanup() server_proc.terminate(timeout=10)
<|file_name|>test_operations.py<|end_file_name|><|fim▁begin|>import pytest from diofant import Integer, SympifyError from diofant.core.operations import AssocOp, LatticeOp __all__ = () <|fim▁hole|> identity = Integer(1) def test_flatten(): assert MyMul(2, MyMul(4, 3)) == MyMul(2, 4, 3) class Join(LatticeO...
class MyMul(AssocOp):
<|file_name|>testingColorImg.py<|end_file_name|><|fim▁begin|>import cv2 import numpy as np np.set_printoptions(threshold=np.nan) import util as util import edge_detect import lineseg import drawedgelist # img = cv2.imread("img/Slide2.jpg", 0) img = cv2.imread("unsorted/Unit Tests/lambda.png", 0) im_size = img.shape re...
Line_new, ListPoint_new, line_merged = merge_lines_v4.merge_lines(LineFeature, ListPoint, 10, im_size) #print(Line_new, "line new")
<|file_name|>config.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding: utf-8 ### # Copyright 2011 University of Warsaw, Krzysztof Rusek # # This file is part of SegmEdit. # # SegmEdit is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...
<|file_name|>ValidateServiceImpl.java<|end_file_name|><|fim▁begin|>package com.wangshan.service.impl; import com.wangshan.dao.UserDao; import com.wangshan.models.User; <|fim▁hole|>import com.wangshan.utils.gabriel.EncryptUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframewo...
import com.wangshan.service.ValidateService;
<|file_name|>impl_ops_generic.rs<|end_file_name|><|fim▁begin|>use util::types::*; use std::iter::Iterator; use combinators::aggregate::*; use combinators::process::*; use combinators::interact::*; use combinators::transform::*; use util::traits::*; use dataframe::*; use ndarray::ArrayView1; #[cfg(not(feature = "specia...
{
<|file_name|>qnupload.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- """ This modle will help you put your local file to QiNiu cloud storage, I use it to share files and pictures in my blog. """ import argparse # Compatible for Py2 and Py3 try: import ConfigParser except ImportError: ...
domain = "http://" + domain
<|file_name|>server.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
pub fn connect() { }
<|file_name|>utils.ts<|end_file_name|><|fim▁begin|>const WSP = require('../dist/ws') import axios from 'axios' import * as WS from 'ws' const turnOn = async (port: number = 8095) => { await axios.get('http://127.0.0.1:8085/on/' + port) return true } const shutDown = async (port: number = 8095) => { await axios....
url: '127.0.0.1:' + port, // log: (...a) => console.log(...a), adapter: (host, protocols) => new (WS as any)(host, protocols) }, config))
<|file_name|>ram_file_system_test.py<|end_file_name|><|fim▁begin|># Copyright 2020 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://...
with gfile.GFile('ram://exists/a/b/c.txt', 'w') as f: f.write('')
<|file_name|>lc754-reach-a-number.py<|end_file_name|><|fim▁begin|># coding=utf-8 import unittest """754. Reach a Number https://leetcode.com/problems/reach-a-number/description/ You are standing at position `0` on an infinite number line. There is a goal at position `target`.<|fim▁hole|> Return the minimum number of ...
On each move, you can either go left or right. During the _n_ -th move (starting from 1), you take _n_ steps.
<|file_name|>lib_2015.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 The Bazel 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.apache....
// limitations under the License.
<|file_name|>datastore.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2007 Google 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/licen...
RunInTransaction. Otherwise, it will return None. The function may raise any exception to roll back the transaction instead of committing it. If this happens, the transaction will be rolled back and the
<|file_name|>ClientUtils.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 under the ...
import org.slf4j.LoggerFactory;
<|file_name|>menu-harness-filters.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {BaseHarnessFilters} from '@angular/cdk/test...
/** A set of criteria that can be used to filter a list of `MatMenuHarness` instances. */
<|file_name|>llms-form-checkout.js<|end_file_name|><|fim▁begin|>/** * LifterLMS Checkout Screen related events and interactions * * @package LifterLMS/Scripts * * @since 3.0.0 * @version 3.34.5 */ ( function( $ ) { var llms_checkout = function() { /** * Array of validation functions to call on form su...
$form[ func ]( 'llms-is-processing' ); LLMS.Spinner[ action ]( this.$form_sections ); };
<|file_name|>test_osqueryd.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2014-present, The osquery authors # # This source code is licensed as defined by the LICENSE file found in the # root directory of this source tree. # # SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only) import glob i...
daemon = self._run_daemon({ "config_dump": True, "disable_extensions": True,
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.http import FileResponse from django.core.files.base import ContentFile from rest_framework import generics from rest_framework import permissions as drf_permissions from rest_framework.exceptions import NotFound, PermissionDenied, ValidationError from fr...
base_permissions.TokenHasScope, PermissionWithGetter(ContributorOrPublic, node_from_version),
<|file_name|>zeta.py<|end_file_name|><|fim▁begin|>from ..libmp.backend import xrange from .functions import defun, defun_wrapped, defun_static @defun def stieltjes(ctx, n, a=1): n = ctx.convert(n) a = ctx.convert(a) if n < 0: return ctx.bad_domain("Stieltjes constants defined for n >= 0") if ha...
four terms are very different numbers but the cancellation gives the good value of Z(s).
<|file_name|>canvaspattern.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 canvas_traits::{FillOrStrokeStyle, RepetitionStyle,...
} }
<|file_name|>setup.py<|end_file_name|><|fim▁begin|><|fim▁hole|>setup( name="mould", version="0.1", packages=find_packages(), package_data={ "mould": ["*.tpl"], }, install_requires=[ "Flask", "Flask-Script", ...
from setuptools import setup, find_packages
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from datetime import datetime from mechanize import Browser from FrenchLawModel import Text, Article, Version, Law from page import ConstitutionPage, ArticlePage class LegifranceClient(object): host = 'http://www.legifrance.gouv.fr/' def __init__(self):...
version = Version() page.set_article_version(version)
<|file_name|>type_constructor.d.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /// <amd-module name="@angular/compiler-cli/src/ngtsc...
import { ClassDeclaration } from '../../reflection'; import { TypeCheckingConfig, TypeCtorMetadata } from './api'; export declare function generateTypeCtorDeclarationFn(node: ClassDeclaration<ts.ClassDeclaration>, meta: TypeCtorMetadata, nodeTypeRef: ts.Identifier | ts.QualifiedName, config: TypeCheckingConfig): ts.Sta...
<|file_name|>app.js<|end_file_name|><|fim▁begin|>/** * App */ 'use strict'; // Base setup var express = require('express'); var app = express(); var path = require('path'); var bodyParser = require('body-parser'); var logger = require('morgan'); var mongoose = require('mongoose'); var config = require('./config')...
res.status(err.status || 500).send(err.message); });
<|file_name|>goblocks.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" "log" "os" "reflect" "github.com/davidscholberg/go-i3barjson" "github.com/davidscholberg/goblocks/lib/modules" )<|fim▁hole|> gb, err := modules.NewGoblocks() if err != nil { errLogger.Fatalln(err) } h := i3barjson.Header{Ver...
func main() { errLogger := log.New(os.Stderr, "error: ", 0)
<|file_name|>server_socket.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use std::net::SocketAddr; use mioco; use mioco::udp::UdpSocket; use mioco::sync::mpsc::{channel, Receiver, Sender}; use sodiumoxide::crypto::secretbox as crypto_secretbox; use ::Result; use identity::{Identity, Extension}; use p...
conns: HashMap::new(), accept_tx: accept_tx, sock: sock, internal_rx: internal_rx,
<|file_name|>image_tool.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 the Apac...
# Unless required by applicable law or agreed to in writing, software
<|file_name|>parser.rs<|end_file_name|><|fim▁begin|>use nom::types::CompleteByteSlice; use nom::IResult; use std::collections::HashMap; use std::str; use std::str::Utf8Error; use { model, palette, scene, DotVoxData, Layer, Model, SceneGroup, SceneNode, SceneShape, SceneTransform, Size, Voxel, DEFAULT_PALETTE, }...
main: parse_chunk >>
<|file_name|>jni_recognizer.cpp<|end_file_name|><|fim▁begin|>#include <jni.h> #include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/features2d/features2d.hpp> #include <opencv2/highgui/highgui.hpp> #include <vector> #include "NativeVision/vision.h" #include <time.h> #include <and...
using namespace std; using namespace cv;
<|file_name|>subscribe.go<|end_file_name|><|fim▁begin|>// Copyright 2015-2018 Kuzzle // // 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 // ...
if res.Error.Error() != "" { return nil, res.Error
<|file_name|>multidevice_setup_state_updater.cc<|end_file_name|><|fim▁begin|>// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ash/components/phonehub/multidevice_setup_state_updater.h" #includ...
#include "chromeos/components/multidevice/logging/logging.h"
<|file_name|>ast.py<|end_file_name|><|fim▁begin|># functions for processing the parsed syntax tree import sys import decimal import string import logger # list of standard functions (from <math.h>) that are # already known to be included in the destination # NB: this list is fairly minimal -- the actual math.h # for a...
'DOC' : process_doc }.get(item[0], ignore_item)(item, work) transform_reactions(work)
<|file_name|>api.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse import json from intranet.models import User, Project, Part, STATE_CREATED class Test(TestCase): @classmethod def setUpC...
state = 1, ) self.part.save()
<|file_name|>0014_auto_20171016_1922.py<|end_file_name|><|fim▁begin|># pylint: disable=missing-module-docstring, missing-class-docstring from __future__ import unicode_literals from django.conf import settings from django.db import migrations class Migration(migrations.Migration): dependencies = [ migra...
<|file_name|>nerve.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The Prometheus 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 /...
<-ctx.Done() for _, tc := range sd.treeCaches {
<|file_name|>recommendation.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 the A...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages<|fim▁hole|>setup(name='helga-spook', version=version, description=('prints nsa buzzwords'), classifiers=['Development Status :: 4 - Beta', 'License :: OSI Approved :: GNU General Public Li...
from helga_spook import __version__ as version
<|file_name|>linkcode.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ linkcode ~~~~~~~~ Add external links to module code in Python object descriptions. :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import ...
onlynode = addnodes.only(expr='html') onlynode += nodes.reference('', '', internal=False, refuri=uri)
<|file_name|>ReactClassRuntime.ts<|end_file_name|><|fim▁begin|>import * as React from 'react'; import {camelCase} from 'change-case'; import {IVueComponent} from '../ReactifyVue'; import {createReactElement} from '../react-element-creation/CreateReactElements'; export const copyMethodsToVueComponent = (vueComponent: ...
if (component.type && component.type.tag) { return component.type.tag; } else if (component.type && typeof component.type === 'string') { return component.type;
<|file_name|>provided_variable_fragment_transform_test.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @generated SignedSource<<ef1e560195f38ffa...
#[test] fn conflict_warn_infrequent_definitions() { let input = include_str!("provided_variable_fragment_transform/fixtures/conflict_warn_infrequent_definitions.graphql");
<|file_name|>ExtJsUploader.js<|end_file_name|><|fim▁begin|>/** * Uploader implementation - with the Connection object in ExtJS 4 * */ Ext.define('MyApp.ux.panel.upload.uploader.ExtJsUploader', { extend : 'MyApp.ux.panel.upload.uploader.AbstractXhrUploader', requires : [ 'MyApp.ux.panel.upload.data.Connection' ],...
* * The HTTP method to be used. */ method : 'PUT',
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin try: from django.contrib.auth import get_permission_codename except ImportError: # pragma: no cover # Django < 1.6 def get_permission_codename(action, opts): return '%s_%s' % (action, opts.object_name.lower()) cl...
class ObjectPermissionsModelAdmin(ObjectPermissionsModelAdminMixin, admin.ModelAdmin): pass
<|file_name|>dstr-let-obj-ptrn-id-init-throws.js<|end_file_name|><|fim▁begin|>// This file was procedurally generated from the following sources: // - src/dstr-binding/obj-ptrn-id-init-throws.case // - src/dstr-binding/error/for-of-let.template /*--- description: Error thrown when evaluating the initializer (for-of sta...
es6id: 13.7.5.11 features: [destructuring-binding]
<|file_name|>index.js<|end_file_name|><|fim▁begin|>"use strict"; let express = require('express'); let app = express(); let bodyParser = require('body-parser'); var randomPoem = require('./tools/poemBuilder1.js') app.set('view engine', 'ejs'); app.set('views', __dirname + '/views'); app.use(express.static("client")) ...
var WordPair = mongoose.model("WordPair", WordPairSchema);
<|file_name|>databuffer.py<|end_file_name|><|fim▁begin|>from seabreeze.pyseabreeze.features._base import SeaBreezeFeature # Definition # ========== # # TODO: This feature needs to be implemented for pyseabreeze # class SeaBreezeDataBufferFeature(SeaBreezeFeature): identifier = "data_buffer" def clear(self) -...
def get_buffer_capacity_minimum(self) -> int: raise NotImplementedError("implement in derived class")
<|file_name|>bitrpc.py<|end_file_name|><|fim▁begin|>from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = Servi...
print access.sendmany(frm,to,mc,comment) except: print access.sendmany(frm,to) except:
<|file_name|>sendcoinsdialog.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2011-2013 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "sendcoinsdialog.h" #include "ui_sendcoinsdialog.h" #i...
<|file_name|>0003_auto__add_photo.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): # Adding model ...
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),