prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>test.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate cfor;
#[test]
fn smoketest() {
let mut tick = 0;
cfor!{let mut i = 1; i <= 0b1000_0000; i *= 2; {
tick += 1;
}}
assert_eq!(tick, 8);
tick = 0;
cfor!{let (mut a, mut b) = (0, 0); a + b < 20; { a += 1; b += 1; }... | #[test] |
<|file_name|>_ccrfg_detect_alretInfo.hpp<|end_file_name|><|fim▁begin|>// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
#include <_ccrfg_detect_alret.hpp><|fim▁hole|>
START_ATF_NAMESPACE
namespace Info
{
... | |
<|file_name|>CT_ExternalRow.go<|end_file_name|><|fim▁begin|>// Copyright 2017 Baliance. All rights reserved.
//
// DO NOT EDIT: generated by gooxml ECMA-376 generator
//
// Use of this source code is governed by the terms of the Affero GNU General
// Public License version 3.0 as published by the Free Software Foundati... | for _, attr := range start.Attr {
if attr.Name.Local == "r" {
parsed, err := strconv.ParseUint(attr.Value, 10, 32) |
<|file_name|>DaneWejsciowe.java<|end_file_name|><|fim▁begin|>package newpackage;
public class DaneWejsciowe {
float wartosc;
String argument;
public DaneWejsciowe( String argument,float wartosc) {
this.wartosc = wartosc;<|fim▁hole|> this.argument = argument;
}
}<|fim▁end|> | |
<|file_name|>RabbitDirectChecker.java<|end_file_name|><|fim▁begin|>package sample.rabbitmq;
import static sample.rabbitmq.annotation.RabbitDirectRouting.*;
import java.util.Arrays;
import java.util.concurrent.*;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.amqp.rabbit.core.RabbitTe... | /**
* RabbitMQ の Exchange#Direct ( 1-1 ) 接続サンプル。
* <p>Sender -> Receiver
* <p>利用する Exchange / Queue は RabbitListener を用いて自動的に作成しています。 |
<|file_name|>parse-fail.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT<|fim▁hole|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT... | // file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
// |
<|file_name|>gitea-format-imports.go<|end_file_name|><|fim▁begin|>// Copyright 2021 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
//go:build ignore
// +build ignore
package main
import (
"log"
"os"
"code.gitea.io/gi... | } |
<|file_name|>alert.rs<|end_file_name|><|fim▁begin|>use util::{ReadExt, WriteExt};
use tls_result::{TlsResult, TlsError, TlsErrorKind};
use tls_item::TlsItem;
// we treat every alert as fatal.
tls_enum!(u8, enum AlertLevel {
warning(1),
fatal(2)
});
// A.3. Alert Messages
// http://www.iana.org/assignments/tls... | // RFC 6066
// certificate_unobtainable(111), |
<|file_name|>deployments.py<|end_file_name|><|fim▁begin|><|fim▁hole|># 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
#
# Unles... | # Copyright (c) 2013 Mirantis, Inc.
# |
<|file_name|>base.py<|end_file_name|><|fim▁begin|>"""
Base test case for the course API views.
"""
from django.core.urlresolvers import reverse
from rest_framework.test import APITestCase
from lms.djangoapps.courseware.tests.factories import StaffFactory
from student.tests.factories import UserFactory
from xmodule.m... | |
<|file_name|>client.go<|end_file_name|><|fim▁begin|>// Copyright 2017 Mattias Pernhult. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package goiaf
// TODO: add functionality for cache headers
import (
"encoding/json"
"fmt"
"io/ioutil"... | if err != nil {
return err
}
req.Close = true |
<|file_name|>herault.js<|end_file_name|><|fim▁begin|>var Coords =[
new google.maps.LatLng(43.764497050251, 4.067245831926),
new google.maps.LatLng(43.767710540551, 4.0838447211269),
new google.maps.LatLng(43.763799242547, 4.0910940285128),
new google.maps.LatLng(43.751534987638, 4.0955537969329),
new google.maps.L... | new google.maps.LatLng(43.259882544534, 3.0936330383983), |
<|file_name|>system_log.py<|end_file_name|><|fim▁begin|>import sys
import click
from solar.core import testing
from solar.core import resource
from solar.system_log import change
from solar.system_log import operations
from solar.system_log import data
from solar.cli.uids_history import get_uid, remember_uid, SOLARUI... | if not log: |
<|file_name|>M01_Nod_GuardTower_Tailgun_JDG.cpp<|end_file_name|><|fim▁begin|>/*
* A Command & Conquer: Renegade SSGM Plugin, containing all the single player mission scripts<|fim▁hole|>* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License,... | * Copyright(C) 2017 Neijwiert
*
* This program is free software : you can redistribute it and / or modify |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import os
import re
from setuptools import find_packages, setup
def text_of(relpath):
"""
Return string containing the contents of the file at *relpath* relative to
this file.
"""
thisdir = os.path.dirname(__file__)
fil... | CLASSIFIERS = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers", |
<|file_name|>interpreter.py<|end_file_name|><|fim▁begin|>import command
command_list = ["joke","weather","play","pause","stop","skip","light","security","created","name","mood","selfie"]
def interpret(s):
print "meow"<|fim▁hole|> print cmd
return command.Command(cmd).do()<|fim▁end|> | for cmd in command_list:
if s.find(cmd) != -1: |
<|file_name|>images.js<|end_file_name|><|fim▁begin|>export default function(path, width, height) {
this._images.push({path:path, width: width, height:height})
return this;<|fim▁hole|><|fim▁end|> | }; |
<|file_name|>convert.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/license... |
//! Traits for conversions between types. |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>import os
import hashlib
import datetime
from django.db import models
from django.conf import settings
from django.contrib.auth.models import User
from django.db import connection
from django.db.models.signals import post_save<|fim▁hole|>
def set_user_password(user, ... | |
<|file_name|>panel.js<|end_file_name|><|fim▁begin|>define([
"settings",
"views/tags"
], function(panelSettings, TagsView) {
var PanelFileView = codebox.require("views/panels/file");
var PanelOutlineView = PanelFileView.extend({
className: "cb-panel-outline",
FileView: TagsView
});<|... |
return PanelOutlineView; |
<|file_name|>ComponentWithPrivatePostConstruct.java<|end_file_name|><|fim▁begin|><|fim▁hole|>
import javax.annotation.PostConstruct;
import javax.inject.Inject;
public class ComponentWithPrivatePostConstruct {
@Inject
private DependentComponent component;
@PostConstruct
@SuppressWarnings("unused")
private ... | package org.needle4j.postconstruct.injection; |
<|file_name|>cloud.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import json
from enum import IntEnum
import requests
from wechatpy.client.api.base import BaseWeChatAPI
class FileType(IntEnum):
JSON = 1
CSV = 2
class ConflictMode(IntEnum):
INSERT = 1
UPSERT = 2
class WeChatCloud(BaseW... | 'fileid_list': fileid_list,
},
result_processor=lambda x: x['delete_list']
) |
<|file_name|>cubetools.py<|end_file_name|><|fim▁begin|>"""
Functions for the analysis of integral field spectroscopy.
Author: Daniel Ruschel Dutra
Website: https://github.com/danielrd6/ifscube
"""
from numpy import *
import pyfits as pf
import spectools as st
import matplotlib as mpl
import matplotlib.pyplot as plt
f... | nspec = len(xy)
for k, h in enumerate(xy): |
<|file_name|>WaterfallSeries.js<|end_file_name|><|fim▁begin|>/* ****************************************************************************
* Start Waterfall series code *
*****************************************************************************/
wrap(axisProto, 'g... | getGraphPath: function () { |
<|file_name|>dissimilaroriginwindow.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::Dissimil... | impl DissimilarOriginWindow { |
<|file_name|>xregexp.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for XRegExp 3.0.0
// Project: http://xregexp.com
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>,
// Johannes Fahrenkrug <https://github.com/jfahrenkrug>
// Definitions: https://github.com/borisyankov/Definite... | |
<|file_name|>NISTNamedCurves.java<|end_file_name|><|fim▁begin|>package net.dirtyfilthy.bouncycastle.asn1.nist;
import net.dirtyfilthy.bouncycastle.asn1.DERObjectIdentifier;
import net.dirtyfilthy.bouncycastle.asn1.sec.SECNamedCurves;
import net.dirtyfilthy.bouncycastle.asn1.sec.SECObjectIdentifiers;
import net.dirtyfi... |
import java.util.Enumeration; |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Natural Language Toolkit: Parsers
#
# Copyright (C) 2001-2016 NLTK Project
# Author: Steven Bird <stevenbird1@gmail.com>
# Edward Loper <edloper@gmail.com>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
#
"""
NLTK Parsers
... | from nltk.parse.util import load_parser, TestGrammar, extract_test_sentences
from nltk.parse.viterbi import ViterbiParser
from nltk.parse.dependencygraph import DependencyGraph
|
<|file_name|>gonzo.py<|end_file_name|><|fim▁begin|># GONZO: A PYTHON SCRIPT TO RECORD PHP ERRORS INTO MONGO
# Michael Vendivel - vendivel@gmail.com
import subprocess
import datetime
from pymongo import MongoClient
# where's the log file
filename = '/path/to/php/logs.log'
# set up mongo client
client = MongoClient('m... | db = client.logs
# which Collection |
<|file_name|>rpc_createmultisig.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# Copyright (c) 2015-2018 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 transaction signing using the sign... | blk = node0.generate(1)[0]
assert tx in node0.getblock(blk)["tx"]
|
<|file_name|>test_coordination.py<|end_file_name|><|fim▁begin|># Copyright 2015 Intel
# 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.ap... | self.assertTrue(crd.start.called)
def test_coordinator_stop(self, get_coordinator): |
<|file_name|>auracite_web.rs<|end_file_name|><|fim▁begin|>#![feature(plugin)]
#![plugin(rocket_codegen)]
extern crate auracite;
extern crate rocket;<|fim▁hole|>use rocket::config::Config;
fn main() {
rocket::custom(config(), true)
.mount("/", routes![web::root::web_root, web::assets::static_asset])
... |
use auracite::{web, lodestone};
use auracite::env::load_var; |
<|file_name|>console.rs<|end_file_name|><|fim▁begin|>extern crate libc;
use self::libc::c_void;
use self::libc::{__errno_location, read, write, STDIN_FILENO, STDOUT_FILENO};
use containers::String;
use io::{Disposable, IoError, Stream};
use memory::{Page, Region};
pub struct Console {}
impl Console {
pub fn write... | }
}
pub struct ConsoleStream {} |
<|file_name|>collect_2.py<|end_file_name|><|fim▁begin|>import threading
import urllib2
import time, json
import requests
import os.path
#"284330,150810,09,1109,52,071040,17,28432,7406"
countrylist = ["brazil","canada","china","france","japan","india","mexico","russia","uk","us"]
yrs = ["2011","2012","2013","2014","20... | b["country"] = data_json[j]["ptTitle"].lower()
b["commodity"] = dataTable[str(data_json[j]["cmdCode"])] |
<|file_name|>ConnectionInfo.java<|end_file_name|><|fim▁begin|>/**
* Copyright (C) 2011, 2012 Commission Junction Inc.
*
* This file is part of httpobjects.
*
* httpobjects 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 Sof... | |
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>import ConfigParser
import os
import sys
import utils
## Create global names and functions ##
# Load file locations and configuration options
site_list_location = os.path.dirname(__file__) + '/sitelist.txt'
parser = ConfigParser.RawConfigParser()
parser.read(os.... | |
<|file_name|>test_parser.py<|end_file_name|><|fim▁begin|>import unittest
from hamlpy.parser.core import (
ParseException,
Stream,
peek_indentation,
read_line,
read_number,
read_quoted_string,
read_symbol,
read_whitespace,
read_word,
)
from hamlpy.parser.utils import html_escape
cl... | def test_peek_indentation(self): |
<|file_name|>RegisteredActivity.java<|end_file_name|><|fim▁begin|>package com.nguyenmanhtuan.benhandientu;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import android.util.DisplayMetrics;
import and... | |
<|file_name|>iter-any.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licens... | assert!(old_iter::any(&Some(2u), is_even));
assert!(!old_iter::any(&None::<uint>, is_even));
} |
<|file_name|>define.py<|end_file_name|><|fim▁begin|>import os
STIR_ROOT = os.path.normpath(os.path.dirname(__file__))
STIR_APP = os.path.normpath(os.path.join(STIR_ROOT, "application"))<|fim▁hole|># STIR_SCRIPT = os.path.normpath(os.path.join(STIR_ROOT, "script"))<|fim▁end|> | STIR_LIB = os.path.normpath(os.path.join(STIR_ROOT, "library")) |
<|file_name|>share.js<|end_file_name|><|fim▁begin|>'use strict';
var extend = require('../utils/extend');
var LoginTask = require('./login');
var IonicAppLib = require('ionic-app-lib');
var IonicProject = IonicAppLib.project;
var Share = IonicAppLib.share;
var log = IonicAppLib.logging.logger;
var Login = IonicAppLib.... | var appLibUtils = IonicAppLib.utils;
var settings = { |
<|file_name|>tripleSlashRefPathCompletionBackandForwardSlash.ts<|end_file_name|><|fim▁begin|>/// <reference path='fourslash.ts' />
// Exercises completions for hidden files (ie: those beginning with '.')
// @Filename: f.ts
//// /*f1*/
// @Filename: d1/g.ts
//// /*g1*/
// @Filename: d1/d2/h.ts
//// /*h1*/
// @Filename... | |
<|file_name|>keyboard.rs<|end_file_name|><|fim▁begin|>//! Back-end agnostic keyboard keys.
use std::default::Default;
use std::cmp::Ordering;
use GenericEvent;
use Button;
// Defining every combination to allow assignment in static expressions.
bitflags!(
#[allow(missing_docs)]
#[derive(Deserialize, Serializ... | fn from(key: Key) -> u32 {
key as u32 |
<|file_name|>spark.py<|end_file_name|><|fim▁begin|># Copyright (c) 1998-2002 John Aycock
#
# 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, including
# without limi... | tokens, len(sets)-2)
def isnullable(self, sym): |
<|file_name|>_tqdm_gui.py<|end_file_name|><|fim▁begin|>"""
GUI progressbar decorator for iterators.
Includes a default (x)range iterator printing to stderr.
Usage:
>>> from tqdm_gui import tgrange[, tqdm_gui]
>>> for i in tgrange(10): #same as: for i in tqdm_gui(xrange(10))
... ...
"""
# future division is i... | (1 - smoothing) * miniters |
<|file_name|>classifier.py<|end_file_name|><|fim▁begin|>from sklearn.model_selection import StratifiedKFold
from sklearn import tree
from sklearn.ensemble import RandomForestClassifier, ExtraTreesClassifier, GradientBoostingClassifier
from sklearn.metrics import confusion_matrix
from tools import ConfusionMatrixUtils
i... | kcounter = 0 |
<|file_name|>_search.py<|end_file_name|><|fim▁begin|>"""
The :mod:`sklearn.model_selection._search` includes utilities to fine-tune the
parameters of an estimator.
"""
from __future__ import print_function
from __future__ import division
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>,
# Gael Varoqu... | |
<|file_name|>render.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.org/licenses... | }
write!(w, "</ul>");
} |
<|file_name|>fckconfig.js<|end_file_name|><|fim▁begin|>/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public... | ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'], |
<|file_name|>notes.go<|end_file_name|><|fim▁begin|>package models
type NotesJSON struct {
Notes []string<|fim▁hole|><|fim▁end|> | } |
<|file_name|>s004_cpu_reconstruction.py<|end_file_name|><|fim▁begin|># -----------------------------------------------------------------------
# Copyright: 2010-2022, imec Vision Lab, University of Antwerp
# 2013-2022, CWI, Amsterdam
#
# Contact: astra@astra-toolbox.com
# Website: http://www.astra-toolbox.co... | # The ASTRA Toolbox is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. |
<|file_name|>IOSLauncher.java<|end_file_name|><|fim▁begin|>package ca.codybanman.AstroidEscape;
import org.robovm.apple.foundation.NSAutoreleasePool;
import org.robovm.apple.uikit.UIApplication;
import com.badlogic.gdx.backends.iosrobovm.IOSApplication;
import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfigu... |
public class IOSLauncher extends IOSApplication.Delegate {
@Override
protected IOSApplication createApplication() { |
<|file_name|>AeronDamphair.js<|end_file_name|><|fim▁begin|>const DrawCard = require('../../drawcard.js');
class AeronDamphair extends DrawCard {
setupCardAbilities() {
this.reaction({
when: {<|fim▁hole|> handler: context => {
let card = context.event.card;
... | onCardSaved: event => event.card.getType() === 'character'
}, |
<|file_name|>bitcoin_hi_IN.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="hi_IN" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Wankcoin</sour... | </context> |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2016 Clear ICT Solutions (<info@clearict.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Af... | # GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models
from _datetime import date
class Restaurant(models.Model):
name = models.CharField(max_length=200)
transportation = models.BooleanField(default=False)
weatherSensetion = models.BooleanField(default=False)
status = models.B... | return self.name |
<|file_name|>screenShare.js<|end_file_name|><|fim▁begin|>'use strict';
var SIGNALING_SERVER = 'https://112.108.40.152:443/';
var config = {
openSocket: function(config) {
console.log('s1');
/*
Firebase ver.
*/
var channel = config.channel || 'screen-capturing-' + location... | |
<|file_name|>static_dict_lut.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)]
pub static kInvalidMatch: u32 = 0xfffffff;
pub static kDictNumBits: i32 = 15;
pub static kDictHashMul32: u32 = 0x1e35a7bd;
pub static kStaticDictionaryBuckets: [u16; 32768] =
[1,0,0,0,0,0,0,0,0,3,6,0,0,0,0,0,20,0,0,0,21,0,22,0,0,0,0,0... | D{l:12,t:10,i:362}, |
<|file_name|>zzzTestRuleConfigurePasswordPolicy.py<|end_file_name|><|fim▁begin|><|fim▁hole|># This program was produced under U.S. Government contract 89233218CNA000001 #
# for Los Alamos National Laboratory (LANL), which is operated by Triad #
# National Security, LLC for the U.S. Department of Energy/National ... | #!/usr/bin/env python3
###############################################################################
# #
# Copyright 2019. Triad National Security, LLC. All rights reserved. # |
<|file_name|>test_p2y.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012-2013, Itzik Kotler
# 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 t... |
g.add_node('2') |
<|file_name|>ParticleRenderer.java<|end_file_name|><|fim▁begin|>package eu.tankernn.gameEngine.particles;
import java.nio.FloatBuffer;
import java.util.List;
import java.util.Map;
import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL15;
import org.lwjgl.opengl.GL31;
import org.lwjgl.u... | //Sets rotation of model matrix to transpose of rotation of view matrix |
<|file_name|>parallel_for_collapse_messages.cpp<|end_file_name|><|fim▁begin|>// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
void foo() {
}
bool foobool(int argc) {
return argc;<|fim▁hole|>
template <class T, typename S, int N, int ST> // expected-note {{declared here}}
T tmain(T argc, S **argv) { //expected-note 2... | }
struct S1; // expected-note {{declared here}} |
<|file_name|>0006_auto__add_field_face_district_id.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):
... | |
<|file_name|>bitcoin_cs.ts<|end_file_name|><|fim▁begin|><TS language="cs" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Pravým tlačítkem myši začneš upravovat označení adresy</translation>
</message>
<me... | |
<|file_name|>env_test.go<|end_file_name|><|fim▁begin|>// -*- Mode: Go; indent-tabs-mode: t -*-
/*
* Copyright (C) 2016 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundat... | env := osutil.SubstituteEnv(strings.Split(t.env, ","))
c.Check(strings.Join(env, ","), check.DeepEquals, t.expected, check.Commentf("invalid result for %q, got %q expected %q", t.env, env, t.expected))
}
} |
<|file_name|>extenders_test.py<|end_file_name|><|fim▁begin|># Copyright 2017 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.ap... | 'id':
sparse_tensor.SparseTensor( |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for jsreport-html-embedded-in-docx 1.0
// Project: https://github.com/jsreport/jsreport-html-embedded-in-docx
// Definitions by: taoqf <https://github.com/taoqf>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Vers... |
import { ExtensionDefinition } from 'jsreport-core'; |
<|file_name|>JRFacesContextWrapper.java<|end_file_name|><|fim▁begin|>/*
* JaspertReports JSF Plugin Copyright (C) 2011 A. Alonso Dominguez
*
* 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 Free Software Found... | |
<|file_name|>017_number_letter_counts.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | ## Need to find a library |
<|file_name|>generic-function.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://www.apac... | // gdb-command:print *t1
// gdb-check:$2 = 2.5 |
<|file_name|>rpm_sign.py<|end_file_name|><|fim▁begin|>from time import sleep
import os
import shutil
import merfi
from merfi import logger
from merfi import util
from merfi.collector import RepoCollector
from merfi.backends import base
class RpmSign(base.BaseBackend):
help_menu = 'rpm-sign handler for signing fil... | |
<|file_name|>ContactEmailSettingsModal.tsx<|end_file_name|><|fim▁begin|>import { useState, useEffect } from 'react';
import { c } from 'ttag';
import { prepareContacts } from '@proton/shared/lib/contacts/encrypt';
import { hasCategories, reOrderByPref } from '@proton/shared/lib/contacts/properties';
import { addContac... | /** |
<|file_name|>SHT21.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
from numpy import int16
import time
def connect(route,**args):
'''
route can either be I.I2C , or a radioLink instance
'''
return SHT21(route,**args)
class SHT21():
RESET = 0xFE
TEMP_ADDRESS = 0xF3
HUMIDITY_ADDRESS = 0xF5... | Credits: https://github.com/jaques/sht21_python/blob/master/sht21.py |
<|file_name|>BaseTabFragment.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2016 Kejun Xia
*
* 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... | getLifeCycleMonitor().onDestroyView();
}
@Override |
<|file_name|>slack_logic.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Business logic - gets request in from Slack, does stuff, sends requests back to Slack.
Notes for developers who want to add or change functionality: You're in the right module.
* If you were to run this behin... | This module - handle_slack_request, specifically - will take it from there.
* If you were to port to another messaging client, this is the "guts" that you would port. |
<|file_name|>text.mako.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/. */
<%namespace name="helpers" file="/helpers.mako.rs" />
<% fr... | try!(dest.write_str("underline"));
space = true;
}
if self.overline { |
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>#include <iostream>
#include <ifaddrs.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <time.h>
#include <syslog.h>
#include <dlfcn.h><|fim▁hole|>#include <sys/soc... | |
<|file_name|>adminRouter.js<|end_file_name|><|fim▁begin|>var express = require('express'),
router = express.Router(),
adminModel = require('../models/adminModel'),
moment = require('moment'),
helperFun = require('../lib/helperFunc'),
md5 = require('md5');
router
.get('',function (request,response){
adminModel... | admin.firstName = adminObj.firstName;
admin.lastName = adminObj.lastName; |
<|file_name|>freeporn.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#------------------------------------------------------------
import sys
PY3 = False
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
if PY3:
import urllib.parse as urlparse # E... | |
<|file_name|>removeWeight.js<|end_file_name|><|fim▁begin|><|fim▁hole|>export const removeWeight = (element) => {
try {
element.removeAttribute('data-weight');
} catch (e) {
// We are now in IE11 territory
if (!!element) {
element.setAttribute('data-weight', null);
}
}
};<|fim▁end|> | |
<|file_name|>no-exports-typo.js<|end_file_name|><|fim▁begin|>'use strict';
var eslint = require('eslint');
var ruleTester = new eslint.RuleTester();
ruleTester.run('rules/no-exports-typo', require('../rules/no-exports-typo'), {
valid: [
'module.exports = true;',
'module.exports.house()',<|fim▁hole|> ],
invalid... | 'exports.mouse = 234',
'exports = module.exports = {}',
'var House = module.exports = function() {}' |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub use self::arp::ArpScheme;
pub use self::config::NetConfigScheme;
pub use self::ethernet::EthernetScheme;
pub use self::icmp::IcmpScheme;
pub use self::ip::IpScheme;
pub use self::tcp::TcpScheme;<|fim▁hole|>
pub mod arp;
pub mod config;
pub mod ethernet;
pub mod icmp;... | pub use self::udp::UdpScheme; |
<|file_name|>partner.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from openerp import fields, models, api
import re
class res_partner(models.Model):
_inherit = 'res.partner'
#def _get_default_tp_type(self):
# return self.env.ref('l10n_cl_invoice.res_IVARI').id
# todo: pasar los valores ... | |
<|file_name|>run.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from lighthouse import app
<|fim▁hole|>if __name__ == '__main__':
app.run(host='0.0.0.0', debug=True)<|fim▁end|> | |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from django import forms
from django.contrib import admin
from django.contrib.admin import AdminSite
from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.middleware import AuthenticationMiddleware
from django.contrib.contenttypes.admin import ... | """
class BookInline(GenericStackedInline):
model = Book
|
<|file_name|>metrics.py<|end_file_name|><|fim▁begin|># coding=utf-8
# Copyright 2022 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... | |
<|file_name|>7_puzzle.py<|end_file_name|><|fim▁begin|>"""
UNIT 2: Logic Puzzle
You will write code to solve the following logic puzzle:
1. The person who arrived on Wednesday bought the laptop.
2. The programmer is not Wilkes.
3. Of the programmer and the person who bought the droid,
one is Wilkes and the other is... | |
<|file_name|>eos_vrf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Ansible by Red Hat, inc
#
# This file is part of Ansible by Red Hat
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the... | if not line:
continue |
<|file_name|>parser_test.py<|end_file_name|><|fim▁begin|># Copyright 2017 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.apach... |
def test_parse_entity(self):
def f(x): |
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# © 2017 Comunitea
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api
from datetime import timedelta
from pytz import timezone
from odoo.addons import decimal_precision as dp
class Stoc... | |
<|file_name|>exif-orientation.js<|end_file_name|><|fim▁begin|>// EXIF Orientation test
// iOS looks at the EXIF Orientation flag in jpgs and rotates the image
// accordingly. Looks like most desktop browsers just ignore this data.
// description: www.impulseadventure.com/photo/exif-orientation.html
// Bug trackers:
... |
// detect by Paul Sayre
|
<|file_name|>extract_unmapped_reads.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
'''
Extract reads which aren't mapped from a SAM or SAM.gz file.
Behavior for PE:
-Write out PE only if both do not map (if either of the pair maps, neither is retained)
Behavior for SE:
-Write out SE if they don't map
<|fim▁... | Iterate over a SAM or SAM.gz file. take everything where the 3rd and
4th flag bit are set to 1 and write reads out to files.
0x1 template having multiple segments in sequencing |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# sympa documentation build configuration file, created by
# sphinx-quickstart on Mon Aug 25 18:11:49 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuratio... |
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
|
<|file_name|>listdir.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import logging
from path import Path
from flexget import plugin
from flexget.entry import Entry
from flexget.event import event
from flexget.config_schema import one_or_more
log = logging.getLogger('listdir')
class Listdir(object):
"""
Uses l... | """Plugin for filesystem tasks."""
from __future__ import unicode_literals, division, absolute_import
import os |
<|file_name|>hdb_signatures_test.go<|end_file_name|><|fim▁begin|><|fim▁hole|>import (
"testing"
)
func TestParseHdbSignatureRow(t *testing.T) {
signature := new(signature)
sample := "e11c2aff804ca144a3e49c42d6ac5783:1006:Exploit.CVE_2012_0779"
sig := parseHdbSignatureRow(sample, signature)
if sig.Size != 1006 {
... | package main
|
<|file_name|>emit-appender.ts<|end_file_name|><|fim▁begin|>import { LoggingEvent } from "log4js";
import { EventEmitter } from "events";
import { EMIT_APPENDER_EVENT_NAME } from "../../../constants";
function emitAppender(layout: Function, emitter: EventEmitter) {
const appender = (loggingEvent: LoggingEvent) => {
... | |
<|file_name|>20170710002603-create-group.js<|end_file_name|><|fim▁begin|>module.exports = {
up: (queryInterface, Sequelize) =>
queryInterface.createTable('Groups', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
name: {
... | },
updatedAt: {
allowNull: false,
type: Sequelize.DATE |
<|file_name|>http_client.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 ... | """
HTTP transport mode for Thrift.
|
<|file_name|>devices.py<|end_file_name|><|fim▁begin|>import logging
import time
import os
# will change these to specific imports once code is more final
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5 import uic
BRUSH_WHITE = QBrush(QColor(255, 255, 255), Qt.SolidPattern... | balls = None
found = False
text = ''
|
<|file_name|>views.py<|end_file_name|><|fim▁begin|>import json<|fim▁hole|>from django.contrib.auth.decorators import login_required
from django.shortcuts import render, get_object_or_404
from alarm.forms import UserProfileForm, AlarmStateConfigurationForm
from alarm.models import UserProfile, Log, Alert, AlarmStateCon... | import datetime
from django.http import HttpResponse
from django.core import serializers
from django.conf import settings |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.