prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>account_balance_reporting_template.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP - Account balance reporting engine # Copyright (C) 2009 Pexego Sistemas Informáticos. # # This program is free softw...
follows:
<|file_name|>CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805_int_loop_04.cpp<|end_file_name|><|fim▁begin|>/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805_int_loop_04.cpp Label Definition File: CWE122_Heap_Based_Buffer_Overflow__cpp_CWE805.label.xml Template File: sources-sin...
* BadSink : Copy int array to data using a loop
<|file_name|>htmlformelement.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::codegen::Bindings::BlobBinding::Bl...
// https://html.spec.whatwg.org/multipage/#dom-fs-enctype
<|file_name|>dataset_test.go<|end_file_name|><|fim▁begin|>package tabular import ( "bufio" "bytes" "io" "testing" "github.com/stretchr/testify/suite" ) var ( testHeaders = []struct { Key string Title string }{ { Key: "name", Title: "First name", }, { Key: "surname", Title: "Last na...
type mockWriter struct {
<|file_name|>khr_vgimage.py<|end_file_name|><|fim▁begin|><|fim▁hole|>http://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_vg_parent_image.txt ''' # Copyright © 2012-13 Tim Pederick. # # This file is part of Pegl. # # Pegl is free software: you can redistribute it and/or modify it # under the terms of the GNU Gen...
#!/usr/bin/env python3 '''Khronos OpenVG parent image binding for EGL.
<|file_name|>dd-drop-debug.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
version https://git-lfs.github.com/spec/v1 oid sha256:98117aa63db915fed8f72d5c0c414049013e63982817c75864b5e01bb3997090 size 17927
<|file_name|>mistune.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ mistune ~~~~~~~ The fastest markdown parser in pure Python with renderer feature. :copyright: (c) 2014 - 2016 by Hsiaoming Yang. """ import re import inspect __version__ = '0.7.3' __author__ = 'Hsiaoming Yang <me@lepture.com>' ...
text = _newline_pattern.sub('\n', text) text = text.expandtabs(tab) text = text.replace('\u00a0', ' ')
<|file_name|>base.py<|end_file_name|><|fim▁begin|># SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2018, Arm Limited and contributors. # # 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 #...
@enum.unique class Result(enum.Enum):
<|file_name|>function.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python from ppclass import pp<|fim▁hole|>x=None,\ y=10.,\ t=2.) var1.get() var2 = pp(\ file="/home/aymeric/Big_Data/DATAPLOT/diagfired.nc",\ var="phisinit",\ x=None,\ y=10.,\ t=2.) var2.get() var2 = var2 / 3.72 S = var2.func(var1) S.p[0].marker = ...
var1 = pp(\ file="/home/aymeric/Big_Data/DATAPLOT/diagfired.nc",\ var="ps",\
<|file_name|>create.go<|end_file_name|><|fim▁begin|>package repl // Create creates . . . something<|fim▁hole|> if !shell.IsConnected() { return "", ErrNotConnected } return "", nil }<|fim▁end|>
func (shell *Shell) Create(args []string) (string, error) {
<|file_name|>feature_addressindex.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test addressindex generation and fe...
<|file_name|>manager.py<|end_file_name|><|fim▁begin|># Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); y...
self._delete_instance(context, instance, bdms, quotas)
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import TestUtils from 'react-dom/test-utils'; import React from 'react'; import ReactDOM from 'react-dom'; import Textarea from '../'; const { findRenderedDOMComponentWithClass, renderIntoDocument, Simulate } = TestUtils; function fake() { return () => { ...
let inputNode;
<|file_name|>ExportCsvAction.java<|end_file_name|><|fim▁begin|>/*! * This program is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software * Foundation. * * You should have received a copy of the GNU Lesser Gener...
import org.pentaho.reporting.engine.classic.core.modules.gui.csv.CSVTableExportPlugin;
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! A support library for macro authors when defining new macros. //! //! This library, provided by the standard distribution, provides the types //! consumed in the interfaces of procedurally defined macro definitions such as //! function-like macros `#[proc_macro]`, ma...
Err(_) => Err(ExpandError), } } }
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import codecs import os import re import setuptools from setuptools import find_packages, setup from setuptools.command.develop import develop from setuptools.command.install import install PROJECT_ROOT = os.path.dirname(os.path.realpath(__file__)) REQUIREMENTS_FILE ...
], )
<|file_name|>AbstractStorableListResult.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2011, 2016 Eurotech and/or its affiliates and others * * All rights reserved. This program and the accompanying materials * are made available un...
public Integer getTotalCount()
<|file_name|>ListDashboardsRequestMarshaller.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017-2022 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 the Licen...
request.addParameter("DashboardNamePrefix", StringUtils.fromString(listDashboardsRequest.getDashboardNamePrefix()));
<|file_name|>LabeledGraph.java<|end_file_name|><|fim▁begin|>/* * Copyright 2011 David Jurgens * * This file is part of the S-Space package and is covered under the terms and * conditions therein. * * The S-Space package is free software: you can redistribute it and/or modify * it under the terms of the GNU Gener...
WeightedEdge w = (WeightedEdge)e; sb.append(", ").append(w.weight()); }
<|file_name|>vtt.js<|end_file_name|><|fim▁begin|>/* vtt.js - v0.12.1 (https://github.com/mozilla/vtt.js) built on 21-03-2015 */ /** * Copyright 2013 vtt.js Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may ...
// // 4. Encodings //
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use std::fmt; pub use messages::types::*; use serde; use ID; mod types; macro_rules! try_or { ($e:expr, $msg:expr) => { match try!($e) { Some(val) => val, None => return Err(serde::de::Error::custom($msg)), } }; } #[deri...
Some(Vec::new()), Some(kwargs) ),
<|file_name|>metadata.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ use std::convert::Infallible; #[cfg(any(test, feature = "for-tests"))] use quickcheck:...
type Wire = WireSha1;
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from datetime import datetime, timedelta import csv from cStringIO import StringIO from django.test import TestCase from django.contrib.auth.models import User from django.test import Client from django.http import HttpRequest, QueryDict, response from mock import pat...
self.assertEqual(len(kvp.keys()), 3) def test_activity_parsing(self):
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>class BulkInsert(object): """ Usage: user_insert = BulkInsert(session) address_insert = BulkInsert(session, dependencies=[user_insert]) for user in users: user_insert.add(user) from address in user_addresses: ...
""" def __init__(self, session, count=250, dependencies=None): self.session = session
<|file_name|>save-profile-modal-service.spec.js<|end_file_name|><|fim▁begin|>describe('app.components.SaveProfileModal', function() { beforeEach(function () { module('app.components', 'ui.bootstrap', 'gettext'); }); describe('service', function () { var callbackObject; var saveSpy; var doNotSaveS...
expect(cancelSpy).to.have.been.called; eventFire(closeButtons[1], 'click');
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>/* MIT License Copyright (c) 2022 Looker Data Sciences, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, includin...
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
<|file_name|>vcs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """Utilities for version control systems""" from __future__ import print_function import sys import os.p...
proc = programs.run_program('hg', ['id', '-nib', repopath]) output, _err = proc.communicate() # output is now: ('eba7273c69df+ 2015+ default\n', None) # Split 2 times max to allow spaces in branch names.
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from . import common from .common import *<|fim▁end|>
<|file_name|>GeodesicActiveContourImageFilterTest.py<|end_file_name|><|fim▁begin|>#========================================================================== # # Copyright NumFOCUS # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License...
<|file_name|>po_file.py<|end_file_name|><|fim▁begin|># coding=utf-8 from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import re from io import StringIO from .strings import escape EMBEDDED_NEWLINE_MATCHER = re.compile(r'[^\n]\n+[^\n]') class PoFile...
for index in range(nplurals):
<|file_name|>ActivityImpl.java<|end_file_name|><|fim▁begin|>//{{COMPONENT_IMPORT_STMTS package MetaRepos; import java.util.Enumeration; import java.util.Vector; import versata.common.*; import versata.common.vstrace.*; import versata.vls.*; import java.util.*; import java.math.*; import versata.vls.cache.*; //END_COMP...
//END_COMPONENT_RULES}}
<|file_name|>makegrid.py<|end_file_name|><|fim▁begin|>from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt import numpy as np fig=plt.figure(figsize=(9, 3)) map = Basemap(width=12000000,height=8000000, resolution='l',projection='stere', lat_ts=50,lat_0=50,lon_0=-107.) lons...
map.drawcoastlines()
<|file_name|>lib.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/. */ //! Calculate [specified][specified] and [computed values][comput...
<|file_name|>integration.rs<|end_file_name|><|fim▁begin|>extern crate stratis_shared as shared; extern crate stratis; extern crate rand; use stratis::{Server,Client}; use shared::opcode; use shared::events::Event; use std::thread; use std::time::Duration; use std::sync::{Arc, Mutex}; use std::sync::mpsc::Receiver; ...
thread::sleep(Duration::from_millis(100));
<|file_name|>program_test.go<|end_file_name|><|fim▁begin|>package link import ( "testing" "github.com/cilium/ebpf" "github.com/cilium/ebpf/internal/testutils" ) func TestProgramAlter(t *testing.T) { testutils.SkipOnOldKernel(t, "4.13", "SkSKB type") prog := mustLoadProgram(t, ebpf.SkSKB, 0, "") var sockMap *...
Program: prog,
<|file_name|>kickstart.py<|end_file_name|><|fim▁begin|># # kickstart.py: kickstart install support # # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 # Red Hat, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General...
<|file_name|>flatten_dict.py<|end_file_name|><|fim▁begin|>import inspect try: from collections.abc import Mapping except ImportError: from collections import Mapping import six from .reducers import tuple_reducer, path_reducer, dot_reducer, underscore_reducer from .splitters import tuple_splitter, path_split...
SPLITTER_DICT = { "tuple": tuple_splitter,
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>fn test1() { let mut v = vec![100, 32, 57]; //vec! is a macro for i in &mut v { *i += 50; } println!("iterate v"); for i in &v { println!("{}", i); } let mut v1 = Vec::new(); // v1.push(5.01); //type infer according to f...
println!("s5={}", s5); println!("s6={}", s6); // println!("s3={}", s3); //s3 has been move before here, so s3 is invalid here; compile error
<|file_name|>mp_tile.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ''' access satellite map tile database some functions are based on code from mapUtils.py in gmapcatcher Andrew Tridgell May 2012 released under GNU GPL v3 or later ''' import math, cv, sys, os, mp_util, httplib2, threading, time, c...
from optparse import OptionParser
<|file_name|>test.py<|end_file_name|><|fim▁begin|>from trie import Trie #constructs a tree of this shape ('*' means root) # # * # /|\<|fim▁hole|># | |\ # e r t # #The LOUDS bit-string is then #[1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0] words = ['an', 'i', 'of', 'one',...
# a i o # / /|\ # n f n u
<|file_name|>tree_depth_derive_tests.py<|end_file_name|><|fim▁begin|>from unittest import TestCase import six from regparser.tree.depth import markers, optional_rules, rules from regparser.tree.depth.derive import debug_idx, derive_depths from regparser.tree.depth.markers import INLINE_STARS, MARKERLESS, STARS_TAG ...
self.assert_depth_match( ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'ii'], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1])
<|file_name|>testcfg.py<|end_file_name|><|fim▁begin|># Copyright 2011 the V8 project authors. 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...
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the...
# limitations under the License.
<|file_name|>api_utils.py<|end_file_name|><|fim▁begin|># Copyright 2015 Internap. # # 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...
for context in self.context_instances: context.__exit__(type_, value, traceback)
<|file_name|>S15.9.5.20_A3_T1.js<|end_file_name|><|fim▁begin|>// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- info: > The Date.prototype.getMinutes property "length" has { ReadOnly, DontDelete, DontEnum } attributes es5id...
<|file_name|>config.js<|end_file_name|><|fim▁begin|>/** * Global config setters/getters. Chainable ;) * * @usage<|fim▁hole|> * config.duration() // => 500 * config.duration(600).duration() // 600 */ // Number of millseconds for each message to last var _duration = 10000; /** * (s|g)etter for the duration * * ...
* config.duration(500) //
<|file_name|>0003_auto_20180414_2059.py<|end_file_name|><|fim▁begin|>from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('custom_image', '0002_auto_20160621_1510'), ] operations = [ migrations.AlterModelOptions( name='image', ...
<|file_name|>user.module.ts<|end_file_name|><|fim▁begin|>import {NgModule} from "@angular/core"; import {UserComponent} from "./user.component"; import {BrowserModule} from "@angular/platform-browser"; import {HttpModule} from "@angular/http"; import {CommonModule} from "@angular/common"; import {FormsModule, ReactiveF...
declarations: [
<|file_name|>ex32.py<|end_file_name|><|fim▁begin|>the_count = [1, 2, 3, 4, 5] fruits = ['apple', 'oranges', 'pears', 'apricots',] change = [1, 'pennies', 2, 'dimes', 3, 'quarters',] #this first kind of for-loop goes through a list for number in the_count: print("This is count %d" % number) # same as above for fru...
for i in elements: print("Element was: %d" % i)
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup version = '1.5.0a0' testing_extras = ['nose', 'coverage'] docs_extras = ['Sphinx'] setup( name='WebOb', version=version, description="WSGI request and response object", long_description="""\ WebOb provides wrappers aroun...
"Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
<|file_name|>IDecimalPrimitiveSetter.java<|end_file_name|><|fim▁begin|><|fim▁hole|>/** * 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 license...
<|file_name|>task_helpers.ts<|end_file_name|><|fim▁begin|>import * as child_process from 'child_process'; import * as fs from 'fs'; import * as gulp from 'gulp'; import * as path from 'path'; import {PROJECT_ROOT} from '../build-config'; import {yellow} from 'chalk'; /* Those imports lack typings. */ const gulpClean =...
} }); };
<|file_name|>HarshadNumber.py<|end_file_name|><|fim▁begin|>""" Harshad Number implementation See: http://en.wikipedia.org/wiki/Harshad_number """ def is_harshad(n): result=0 while n: result+=n%10 n//=10 return n%result == 0 # Return if the remainder of n/result is 0 else return False ...
<|file_name|>plugins.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 The Kubernetes 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.org/licenses...
// given binary target.
<|file_name|>Excel Sheet Column Number.py<|end_file_name|><|fim▁begin|>class Solution(object): def titleToNumber(self, s): """ :type s: str :rtype: int """ number = 0 for i in range(len(s)): number = number * 26 + ord(s[i]) - ord('A') + 1<|fim▁hole|><|fim...
return number
<|file_name|>DefaultFileActionInstruction.cpp<|end_file_name|><|fim▁begin|>/* * DefaultFileActionInstruction.cpp * * Created on: 5 août 2015 * Author: FrancisANDRE */<|fim▁hole|> namespace ISO_8583 { namespace MSG { InstructionAcknowledge* DefaultFileActionInstruction::indication(BinaryInputStream& is, Bin...
#include "ISO-8583/DFT/DefaultFileActionInstruction.h"
<|file_name|>generated.rs<|end_file_name|><|fim▁begin|>// ================================================================= // // * WARNING * // // This file is generated! // // Changes made to this file will be overwritten. If changes are // required to the generated code...
InvalidType(String), /// <p>An exception for trying to create more than allowed resources or sub-resources. Gives http status code of 409.</p> LimitExceeded(String), /// <p>An exception for creating a resource that already exists. Gives http status code of 400.</p>
<|file_name|>Fragment1.java<|end_file_name|><|fim▁begin|>package com.bgstation0.android.sample.fragment_; import android.app.Activity; import android.app.Fragment; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; ...
<|file_name|>repoconfig.rs<|end_file_name|><|fim▁begin|>use std::collections::BTreeMap; use std::default::Default; use std::fs::File; use std::io::Read; use std::path::Path; use toml::{Parser, Value}; use toml::Value::Table; pub struct Config { fuzz: bool, fuzz_cores: usize, fuzz_seconds: usize, fuzz_m...
if let Some(&Table(ref general)) = table.get("fuzz") { if let Some(v) = general.get("cores").and_then(|k| k.as_integer()) { config.set_fuzz_cores(v as usize);
<|file_name|>aws.py<|end_file_name|><|fim▁begin|>from typing import Dict, List, NamedTuple import pykube.objects import requests import pendulum from urllib.parse import urlparse from boto import ec2 from ..context import Context from k8s_snapshots.snapshot import Snapshot from .abstract import NewSnapshotIdentifier, S...
volume_id: str def get_current_region(ctx):
<|file_name|>ga.py<|end_file_name|><|fim▁begin|>from openstatesapi.jurisdiction import make_jurisdiction<|fim▁hole|><|fim▁end|>
J = make_jurisdiction('ga') J.url = 'http://georgia.gov'
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate sdl2; extern crate rand; extern crate tile_engine; extern crate chrono; extern crate dungeon_generator; extern crate sdl2_image; mod visualizer; mod game; mod unit; mod common; mod ai; mod portal; use sdl2::event::Event; use visualizer::Visualizer; use ga...
// println!("{}", 1000.0/(ms as f64)); visualizer.draw(&game, (lag as f64)/(MS_PER_UPDATE as f64));
<|file_name|>ajax_windows.js<|end_file_name|><|fim▁begin|>/* ajax_windows.js. Support for modal popup windows in Umlaut items. */ jQuery(document).ready(function($) { var populate_modal = function(data, textStatus, jqXHR) { // Wrap the data object in jquery object var body = $("<div/>").html(data); // Re...
$.get(this.href, "", populate_modal, "html");
<|file_name|>test_auth.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Test suite for the TG app's models""" from __future__ import unicode_literals from nose.tools import eq_ from wiki20 import model from wiki20.tests.models import ModelTest class TestGroup(ModelTest): """Unit test case for the ``Grou...
description = "This is a test Description"
<|file_name|>Q3BSPZipArchive.cpp<|end_file_name|><|fim▁begin|>/* Open Asset Import Library (assimp) ---------------------------------------------------------------------- Copyright (c) 2006-2008, assimp team All rights reserved. Redistribution and use of this software in source and binary forms, with or with...
int IOSystem2Unzip::close(voidpf opaque, voidpf stream) {
<|file_name|>issue-41652.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>struct S; impl issue_41652_b::Tr for S { fn f() { 3.f() //~^ ERROR can't call method `f` on ambiguous numeric type `{integer}` } } fn main() {}<|fim▁end|>
// aux-build:issue-41652-b.rs extern crate issue_41652_b;
<|file_name|>inline-syntax.rs<|end_file_name|><|fim▁begin|>// revisions: x86_64 arm //[x86_64] compile-flags: --target x86_64-unknown-linux-gnu //[x86_64] check-pass //[x86_64] needs-llvm-components: x86 //[x86_64_allowed] compile-flags: --target x86_64-unknown-linux-gnu //[x86_64_allowed] check-pass //[x86_64_allowed]...
macro_rules! asm {
<|file_name|>LoginActivity.java<|end_file_name|><|fim▁begin|>package com.creationgroundmedia.twitternator.activities; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.View; import com.codepath.oauth.OAuthLoginActionBarActivity; import com.creationgroundmedia.twitt...
public void loginToRest(View view) { getClient().connect(); }
<|file_name|>0004_auto_20151003_2033.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('organizations', '0002_migrate_locations_to_facilities'), ('notif...
migrations.AlterField( model_name='notification', name='location',
<|file_name|>addresses.rs<|end_file_name|><|fim▁begin|>use postgres; use ipm::PostgresReqExt; use rustc_serialize::json::{Json, ToJson}; #[derive(ToJson)] pub struct Address { address_id: i32, address: String, postal_code: String, city: String, state: String, country: String, geospot: Json ...
&self.geospot ]) }
<|file_name|>20.d.ts<|end_file_name|><|fim▁begin|>import * as React from "react"; import { CarbonIconProps } from "../../"; declare const Cafe20: React.ForwardRefExoticComponent< CarbonIconProps & React.RefAttributes<SVGSVGElement><|fim▁hole|>>; export default Cafe20;<|fim▁end|>
<|file_name|>test_examples.py<|end_file_name|><|fim▁begin|>import pytest from pillowtalk import * # TODO: test when where returns [] or None or [None] # TODO: test update() (or autoupdate?) @pytest.fixture def folder_json(): return {'count' ...
<|file_name|>constants.go<|end_file_name|><|fim▁begin|>package common const ( ENV_KEY_BROKERS = "BROKERS"<|fim▁hole|><|fim▁end|>
ENV_KEY_WORKERS = "WORKERS" ENV_KEY_LOG_DIR = "LOG_DIR" )
<|file_name|>insert.go<|end_file_name|><|fim▁begin|>// Copyright 2013 The ql Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSES/QL-LICENSE file. // Copyright 2015 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "Licen...
return nil, errors.Errorf("INSERT INTO %s: %s", s.TableIdent, err)
<|file_name|>functions.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ //! Lightweight utilities. To optimize compile time, do not put complex //! functions ...
} Ok(PyNone) }
<|file_name|>types.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 libc::{c_uint, c_ushort, c_int, c_double, size_t, wchar_t};...
// Decrement the reference count. Delete this object when no references
<|file_name|>asteroid-calendar.ja.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="ja"> <context> <name></name> <message id="id-new-event"> <location filename="../src/EventDialog.qml" line="43"/> <source>New Event</source> <...
</message>
<|file_name|>fisher.py<|end_file_name|><|fim▁begin|>__author__ = 'Tom Schaul, tom@idsia.ch' from pybrain.utilities import blockCombine from scipy import mat, dot, outer from scipy.linalg import inv, cholesky def calcFisherInformation(sigma, invSigma=None, factorSigma=None): """ Compute the exact Fisher...
invSigma = inv(sigma)
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod ffi; pub mod error; pub mod vars; pub mod options; pub mod status; pub mod chat; pub mod file; mod friend; mod network; mod custom; mod events; #[cfg(feature = "groupchat")] pub mod group; #[cfg(feature = "groupchat")] mod peer; pub use self::options::ToxOptions; ...
pub fn set_status(&self, status: status::UserStatus) {
<|file_name|>TrajectoryPlot.py<|end_file_name|><|fim▁begin|>import pycrs import mpl_toolkits.basemap.pyproj as pyproj # Import the pyproj module import shapefile as shp import matplotlib.pyplot as plt <|fim▁hole|>records = sf.records() plt.figure() for shape in sf.shapeRecords(): x = [i[0] for i in shape.sh...
shpFilePath = r"taxi_zones\taxi_zones" sf = shp.Reader(shpFilePath)
<|file_name|>addtoset-ex.js<|end_file_name|><|fim▁begin|>db.products.aggregate([ { "$group": { "_id": { "maker": "$manufacturer" }, "categories": { '$addToSet' : '$category' } }<|fim▁hole|> } ])<|fim▁end|>
<|file_name|>offhours.py<|end_file_name|><|fim▁begin|># Copyright 2015-2017 Capital One Services, 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/LICENS...
else: schedule = self.default_schedule else:
<|file_name|>warm_up_redis.py<|end_file_name|><|fim▁begin|>from . import manager def warm_up_redis_func(app=None, db=None, user_model=None, redis_store=None): not_available = set() available = set() cur = db.session.connection().connection.cursor() cur.execute(""" SELECT taxi.id AS taxi_id, vd.statu...
keys = set([k[0] for k in keys]) while cursor != 0:
<|file_name|>delaying_deliverer_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LIC...
assert.Equal(t, now, i0.DeliveryTime)
<|file_name|>gpu_luts.py<|end_file_name|><|fim▁begin|>from gpu import * LAMP_TYPES = [ GPU_DYNAMIC_LAMP_DYNVEC, GPU_DYNAMIC_LAMP_DYNCO, GPU_DYNAMIC_LAMP_DYNIMAT, GPU_DYNAMIC_LAMP_DYNPERSMAT, GPU_DYNAMIC_LAMP_DYNENERGY, GPU_DYNAMIC_LAMP_DYNENERGY, GPU_DYNAMIC_LAMP_DYNCOL, GPU_DYNAMIC_LAM...
GPU_DYNAMIC_LAMP_ATT1, GPU_DYNAMIC_LAMP_ATT2, GPU_DYNAMIC_LAMP_SPOTSIZE,
<|file_name|>dom_apis.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/. */ //! Generic implementations of some DOM APIs so they can be ...
/// Fast paths for a given selector query. /// /// FIXME(emilio, nbp): This may very well be a good candidate for code to be
<|file_name|>my_command.py<|end_file_name|><|fim▁begin|>from sacred import Experiment ex = Experiment('my_commands') @ex.config def cfg(): name = 'kyle' <|fim▁hole|>@ex.command def greet(name): print('Hello {}! Nice to greet you!'.format(name)) @ex.command def shout(): print('WHAZZZUUUUUUUUUUP!!!????')...
<|file_name|>exception.rs<|end_file_name|><|fim▁begin|>use crate::wrapper::{NIF_ENV, NIF_TERM}; /// Raise an "error exception". /// /// # Unsafe /// /// The value returned by this function "can be used only as the return value /// from the NIF that invoked it (directly or indirectly) or be passed to /// `enif_is_excep...
rustler_sys::enif_make_badarg(env) }
<|file_name|>PopulatePatchMenu.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2013 - 2016 Johannes Taelman * * This file is part of Axoloti. * * Axoloti 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 * Founda...
<|file_name|>recursive_link_results.py<|end_file_name|><|fim▁begin|>''' usage: scrapy runspider recursive_link_results.py (or from root folder: scrapy crawl scrapy_spyder_recursive) ''' #from scrapy.spider import Spider from scrapy.selector import Selector from scrapy.contrib.spiders import CrawlSpider, Rule from scra...
to_id = to_page.id
<|file_name|>test.py<|end_file_name|><|fim▁begin|>import sys import subprocess<|fim▁hole|>result = subprocess.Popen('sh test.sh', shell=True) text = result.communicate()[0] sys.exit(result.returncode)<|fim▁end|>
<|file_name|>bitcoin_he.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="he" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About LuckySevens</source>...
</message> <message> <location line="+3"/>
<|file_name|>dhcpwn.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import argparse import logging import string # Quiet scapy logging.getLogger("scapy.runtime").setLevel(logging.ERROR) from scapy import volatile # noqa: E402 from scapy import sendrecv # noqa: E402 from scapy import config # noqa: E402 fro...
print("Source: {}".format(response[l2.Ether].src)) print("Destination: {}".format(response[l2.Ether].dst))
<|file_name|>lb.py<|end_file_name|><|fim▁begin|># # This file is part of CAVIAR. # # CAVIAR 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 of the License, or # (at your option) any later vers...
Load balancer. """
<|file_name|>indexes-skiplist.js<|end_file_name|><|fim▁begin|>/*jshint globalstrict:false, strict:false, unused : false */ /*global assertEqual, assertFalse, assertTrue */ //////////////////////////////////////////////////////////////////////////////// /// @brief tests for dump/reload /// /// @file /// /// DISCLAIMER ...
<|file_name|>search_engine.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public Lic...
except Exception:
<|file_name|>DnsSdResponseListenerTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2012 The Android Open Source Project * * 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 * * ...
public static final List<ListenerArgument> IPP_DNS_PTR
<|file_name|>inflate_nonwrapping.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>#[macro_use] extern crate libfuzzer_sys; extern crate miniz_oxide; fuzz_target!(|data: &[u8]| { // fuzzed code goes here let _ = miniz_oxide::inflate::decompress_to_vec(data); });<|fim▁end|>
#![no_main]
<|file_name|>q2_rnn_cell.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*-<|fim▁hole|> from __future__ import absolute_import from __future__ import division import argparse import logging import sys import tensorflow as tf import numpy as np logger = logging.getLogger("hw3.q2.1") logger...
""" Q2(c): Recurrent neural nets for NER """
<|file_name|>errmsgs.cpp<|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 th...
{ERR_QRY_16, ERR_CATEGORY_QRY, 0, "Query Failed."}, {ERR_QRY_17, ERR_CATEGORY_QRY, 0, "Query Failed."}, {ERR_QRY_18, ERR_CATEGORY_QRY, 0, "Query Failed."},