max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
507 | <filename>terrascript/bitbucketserver/d.py
# terrascript/bitbucketserver/d.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class bitbucketserver_application_properties(terrascript... | 424 |
358 | <reponame>kristi/qfs
//---------------------------------------------------------- -*- Mode: C++ -*-
// $Id$
//
// Created 2012/07/20
// Author: <NAME>
//
// Copyright 2012,2016 Quantcast Corporation. All rights reserved.
//
// This file is part of Kosmos File System (KFS).
//
// Licensed under the Apache License, Versi... | 1,104 |
435 | {
"copyright_text": "Standard YouTube License",
"description": "If you've been using pandas for a while, you've likely encountered a SettingWithCopyWarning. The proper response is to modify your code appropriately, not to turn off the warning! In this video, I'll show you two common scenarios in which this warning ... | 501 |
2,492 | import os
import numpy as np
import cv2
import albumentations
from PIL import Image
from torch.utils.data import Dataset
class SegmentationBase(Dataset):
def __init__(self,
data_csv, data_root, segmentation_root,
size=None, random_crop=False, interpolation="bicubic",
... | 2,092 |
915 | <filename>core/src/main/java/org/nzbhydra/webaccess/HydraOkHttp3ClientHttpRequestFactory.java
/*
* Copyright 2002-2016 the original author or 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 th... | 4,874 |
364 | <filename>src/Plan/src/NativeJITQueryEngine.cpp<gh_stars>100-1000
// The MIT License (MIT)
// Copyright (c) 2018, Microsoft
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restri... | 2,809 |
1,131 | <gh_stars>1000+
package com.simibubi.create;
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
import com.simibubi.create.content.contraptions.components.structureMovement.rend... | 2,046 |
416 | <reponame>khauser/SimpleFlatMapper
/**
* {@link org.simpleflatmapper.csv.CsvMapper} classes to map object from a csv file. It is instantiated using the {@link org.simpleflatmapper.csv.CsvMapperFactory}
* <p>
* <code>
* CsvMapper<MyObject> jdbcMapper = CsvMapperFactory.newInstance().newMapper(MyObject.class);<... | 181 |
2,023 | # SingleUpload.py
from sys import stdin
from re import compile
from cgi import parse_header
from os import environ as env
search = compile(r'([^\\/]+)$').search
def open():
global next, last
try:
next = '--' + parse_header(env['CONTENT_TYPE'])[1]['boundary']
except:
raise IOError
last = next + '--'
filenam... | 821 |
6,215 | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
from unittest.mock import MagicMock
from pytest import fixture
from source_trello.source import TrelloStream
@fixture
def patch_base_class(mocker):
# Mock abstract methods to enable instantiating abstract class
mocker.patch.object(TrelloStream, "... | 349 |
551 | #ifndef LIFEMETERBAR_H
#define LIFEMETERBAR_H
#include "Etterna/Actor/Base/AutoActor.h"
#include "LifeMeter.h"
#include "Etterna/Models/Misc/ThemeMetric.h"
class StreamDisplay;
/** @brief The player's life represented as a bar. */
class LifeMeterBar : public LifeMeter
{
public:
LifeMeterBar();
~LifeMeterBar() ov... | 785 |
721 | <filename>app/src/main/java/com/will/weiyue/net/NewsApiService.java<gh_stars>100-1000
package com.will.weiyue.net;
import com.will.weiyue.bean.NewsArticleBean;
import com.will.weiyue.bean.NewsCmppVideoBean;
import com.will.weiyue.bean.NewsDetail;
import com.will.weiyue.bean.NewsImagesBean;
import com.will.weiyue.bean.... | 1,586 |
360 | /*
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
*
* openGauss is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
*
* http://license.coscl.org.cn/MulanPSL2
*
* THIS SOFTWARE IS PROVIDED ... | 1,910 |
891 | # generated by datamodel-codegen:
# filename: modular.yaml
# timestamp: 1985-10-26T08:21:00+00:00
| 44 |
1,574 | //=======================================================================
// Copyright <NAME> 2013-2018.
// Distributed under the terms of the MIT License.
// (See accompanying file LICENSE or copy at
// http://www.opensource.org/licenses/MIT)
//=======================================================================
... | 2,803 |
337 | <reponame>sonvt1710/manga-py
import random
import time
from manga_py.crypt.base_lib import BaseLib
from .request import Request
class GoogleDCP:
host = 'proxy.googlezip.net'
authkey = '<KEY>'
http = None
def __init__(self, http: Request):
self.http = http
def randint(self):
retu... | 417 |
1,059 | /* SPDX-License-Identifier: BSD-2-Clause */
#include <tilck/common/basic_defs.h>
#include <tilck/kernel/errno.h>
#include <tilck/kernel/hal.h>
#include <tilck/kernel/paging.h>
#include "gdt_int.h"
void load_ldt(u32 entry_index_in_gdt, u32 dpl)
{
ASSERT(!are_interrupts_enabled());
asmVolatile("lldt %w0"
... | 228 |
10,225 | package io.quarkus.jackson.deployment;
import org.jboss.jandex.DotName;
import io.quarkus.builder.item.MultiBuildItem;
/**
* Used when an extension needs to inform the Jackson extension that a class should not
* be registered for reflection even if it annotated with @JsonDeserialize
*/
public final class IgnoreJs... | 192 |
2,151 | <reponame>zipated/src<filename>device/bluetooth/dbus/bluetooth_gatt_application_service_provider.cc
// Copyright 2016 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 "device/bluetooth/dbus/bluetooth_gatt_applica... | 2,957 |
5,964 | #!/usr/bin/env python
#
# Copyright 2015 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.
"""Fingerprints the V8 snapshot blob files.
Constructs a SHA256 fingerprint of the V8 natives and snapshot blob files and
creates a ... | 858 |
777 | <reponame>google-ar/chromium
// Copyright 2016 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.
package org.chromium.chrome.browser.payments;
import android.support.test.filters.MediumTest;
import org.chromium.base.test... | 4,869 |
1,481 | #include "rendering/renderer.h"
#include "cgraphics.h"
#include "centity.h"
#include "assets/shader.h"
#include "assets/texture.h"
#include "assets/material.h"
#include "assets/renderable.h"
#include "assets/terrain.h"
#include "assets/cmesh.h"
#include "rendering/sky.h"
render_object render_object_instance(instanc... | 45,815 |
675 | <gh_stars>100-1000
/*
* Copyright 2016 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.org/licenses/LICENSE-2.0
*
* U... | 1,313 |
6,289 | <filename>detox/ios/Detox/Matchers/UIView+DetoxMatchers.h<gh_stars>1000+
//
// UIView+DetoxMatchers.h
// Detox
//
// Created by <NAME> (Wix) on 4/19/20.
// Copyright © 2020 Wix. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UIView (DetoxMatchers)
+ (NSMutableArray<UIView*>*)... | 353 |
789 | import sys
import json
import urllib.request as urllib
import distutils.version as duv
url = "https://pypi.python.org/pypi/%s/json" % (sys.argv[1],)
data = json.load(urllib.urlopen(urllib.Request(url)))
versions = list(data["releases"])
versions.sort(key=duv.LooseVersion)
print('\n'.join(versions))
| 117 |
577 | """A rough translation of an example from the Java Tutorial
http://java.sun.com/docs/books/tutorial/
This example shows how to use Choice
"""
from java import awt, applet
class ChoiceDemo(applet.Applet):
def init(self):
self.choices = awt.Choice(itemStateChanged=self.change)
for item in ['ichi',... | 304 |
4,036 | public class InconsistentCompareToFix implements Comparable<InconsistentCompareToFix> {
private int i = 0;
public InconsistentCompareToFix(int i) {
this.i = i;
}
public int compareTo(InconsistentCompareToFix rhs) {
return i - rhs.i;
}
public boolean equals(InconsistentCompareToFix rhs) {
return i == rhs.... | 119 |
777 | // Copyright (c) 2011 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.
#ifndef PPAPI_THUNK_PPB_PDF_API_H_
#define PPAPI_THUNK_PPB_PDF_API_H_
#include "ppapi/c/private/ppb_pdf.h"
#include "ppapi/shared_impl/singleton_reso... | 844 |
839 | <filename>systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_wsdl/jaxwsmm/WSDLAddrPolicyAttachmentJaxwsMMProviderTest.java
/**
* 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... | 2,002 |
463 | #ifndef __EXP2_SIMJOINER_H__
#define __EXP2_SIMJOINER_H__
#include <bits/stdc++.h>
#define USE_CACHE 1
template <typename IDType, typename SimType>
class JoinResult { public:
IDType id1, id2;
SimType s;
JoinResult(IDType a, IDType b, SimType c): id1(a), id2(b), s(c) {}
bool operator < (const JoinResult&a) const { ... | 998 |
334 | # -*- coding: utf-8 -*-
# Copyright (c) 2018 Ericsson AB
#
# 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 required by applicable ... | 653 |
23,901 | <reponame>deepneuralmachine/google-research
# coding=utf-8
# Copyright 2021 The Google Research 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... | 977 |
5,053 | """Sequential implementation of Recurrent Neural Network Language Model."""
from typing import Tuple
from typing import Union
import torch
import torch.nn as nn
from typeguard import check_argument_types
from espnet2.lm.abs_model import AbsLM
class SequentialRNNLM(AbsLM):
"""Sequential RNNLM.
See also:
... | 3,030 |
1,936 | #ifndef CERES_ERROR_TERMS_SIX_DOF_BLOCK_POSE_ERROR_TERM_AUTODIFF_INL_H_
#define CERES_ERROR_TERMS_SIX_DOF_BLOCK_POSE_ERROR_TERM_AUTODIFF_INL_H_
namespace ceres_error_terms {
template <typename T>
bool SixDoFBlockPoseErrorTerm::operator()(
const T* const T_G_A, const T* const T_G_B, T* residuals) const {
// Defin... | 939 |
892 | <filename>advisories/unreviewed/2022/01/GHSA-r465-758h-7ff9/GHSA-r465-758h-7ff9.json
{
"schema_version": "1.2.0",
"id": "GHSA-r465-758h-7ff9",
"modified": "2022-01-29T00:01:19Z",
"published": "2022-01-20T00:01:59Z",
"aliases": [
"CVE-2022-22163"
],
"details": "An Improper Input Validation vulnerabilit... | 611 |
558 | from backend.api import ModelResource, GET, LIST
from backend.extensions.api import api
from .blueprint import blog
from ..models import Series
@api.model_resource(blog, Series, '/series', '/series/<slug>')
class SeriesResource(ModelResource):
include_methods = (GET, LIST)
| 82 |
782 | /*
* Copyright (c) 2021, <NAME>. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
* 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... | 1,031 |
368 | <filename>interface/coroutine/pthread.h
/**
* @file coroutine/pthread.h
* @author github.com/luncliff (<EMAIL>)
* @copyright CC BY 4.0
*/
#ifndef COROUTINE_PTHREAD_UTILITY_H
#define COROUTINE_PTHREAD_UTILITY_H
#if __has_include(<pthread.h>)
#include <pthread.h>
#else
#error "expect <pthread.h> for this file"
#endi... | 2,129 |
14,668 | // Copyright 2021 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.
package org.chromium.android_webview.test.devui;
import static androidx.test.espresso.Espresso.onData;
import static androidx.test.espresso.Espresso.onVi... | 2,496 |
6,457 | <gh_stars>1000+
// Copyright 2016-2018 <NAME> (Koderz). All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "RuntimeMeshCore.h"
#include "RuntimeMeshGenericVertex.h"
class FRuntimeMeshData;
using FRuntimeMeshDataPtr = TSharedPtr<FRuntimeMeshData, ESPMode::ThreadSafe>;
class FRuntimeMeshSection;
using... | 6,374 |
9,095 | #ifndef _STOCR_H_
#define _STOCR_H_
#include <cstddef> // for NULL
struct StocRBase {
double(*next_double)();
double(*next_normal)(const double m, const double s);
StocRBase() : next_double(NULL), next_normal(NULL) {}
StocRBase(int seed) : next_double(NULL), next_normal(NULL) {}
double Random() {
re... | 205 |
521 | #pragma once
#include <boost/multi_index/mem_fun.hpp>
#include <boost/multi_index_container.hpp>
#include <elle/With.hh>
#include <elle/serialization/Serializer.hh>
#include <elle/reactor/Scope.hh>
namespace elle
{
namespace athena
{
namespace paxos
{
/*---------.
| Proposal |
`-------... | 10,719 |
518 | <filename>src/prisma/binaries/engine.py
import os
import logging
from pathlib import Path
from . import platform
from .binary import Binary
from .constants import ENGINE_URL, ENGINE_VERSION, GLOBAL_TEMP_DIR
__all__ = ('Engine',)
log: logging.Logger = logging.getLogger(__name__)
class Engine(Binary):
name: str... | 416 |
319 | <reponame>mikimaus78/ml_monorepo
import tensorflow as tf
from src.nn_utils.nn import softmax, softsel, linear, get_logits, linear_3d, softsel_with_dropout
from src.nn_utils.general import exp_mask, mask_for_high_rank
from src.nn_utils.general import mask as normal_mask
import math
def normal_attention(tensor_base, te... | 7,547 |
7,482 | /*
* File : board.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2013, RT-Thread Develop Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://openlab.rt-thread.com/license/LICENSE
*
* Change Logs:
* Date Author... | 431 |
317 | package com.googlecode.totallylazy.transducers;
import com.googlecode.totallylazy.Option;
import com.googlecode.totallylazy.predicates.Predicate;
import org.junit.Test;
import java.util.List;
import java.util.NoSuchElementException;
import static com.googlecode.totallylazy.Assert.assertThat;
import static com.google... | 2,760 |
1,875 | /*
* Copyright 2014 <NAME>.
*
* 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 required by applicable law or agreed ... | 937 |
1,444 |
package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.AttachEffect;
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
import mage.abilities.effects.com... | 675 |
3,139 | <reponame>supertick/jmonkeyengine
/*
* Copyright (c) 2009-2012 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above co... | 2,066 |
1,269 | /*
This file is part of the iText (R) project.
Copyright (c) 1998-2021 iText Group NV
Authors: iText Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below.
AGPL licensi... | 2,573 |
1,333 | package org.xujin.moss.client.endpoint.dependency.util;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class PomUtil {
public static String[] getArtifactIdAndVersion(String fileName) {
boolean needJudge = false;
int versionBeginIndex = -1;
for (int i = 0; i < fileName.length(); i++) {
... | 432 |
642 | <filename>editor/backend/standalone/main.cpp
#include <iostream>
#include <string>
#include "../../AxiomApplication.h"
#include "../../AxiomEditor.h"
#include "../AudioBackend.h"
#include "editor/backend/EventConverter.h"
#ifdef PORTAUDIO
#include <portaudio.h>
#endif
#ifdef PORTMIDI
#include <portmidi.h>
#endif
us... | 5,210 |
2,151 | <filename>third_party/sqlite/src/ext/fts5/fts5_aux.c
/*
** 2014 May 31
**
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
**
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never ta... | 10,800 |
1,841 | <filename>tc/library/copy.h
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Un... | 575 |
1,338 | <reponame>Kirishikesan/haiku
/*
* Copyright 2004, pinc Software. All Rights Reserved.
* Distributed under the terms of the MIT license.
*/
#ifndef NTP_H
#define NTP_H
#include <SupportDefs.h>
extern status_t ntp_update_time(const char *host,
const char** errorString, int32* errorCode);
#endif /* NTP_H */
| 115 |
1,882 | <gh_stars>1000+
/*-
* <<
* task
* ==
* Copyright (C) 2019 - 2020 sia
* ==
* 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
*
* U... | 1,123 |
369 | <filename>cdap-common/src/main/java/io/cdap/cdap/common/startup/CheckRunner.java
/*
* Copyright © 2016 <NAME>, 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.apach... | 1,777 |
1,752 | package cn.myperf4j.base.metric.exporter;
import cn.myperf4j.base.metric.Metrics;
/**
* Created by LinShunkang on 2018/8/19
* <p>
* 整体处理流程如下:
* beforeProcess() -> process() -> process() -> *** -> process() -> afterProcess()
* 即:每一轮统计均以beforeProcess()开始,以afterProcess()结束,中间会多次调用process()
*/
public interface Metr... | 605 |
5,169 | {
"name": "LoginPodTest",
"version": "1.0.2",
"summary": "LoginPodTest for ios",
"description": "It is a component for ios photo browser,written by Objective-C.",
"homepage": "https://github.com/zhuguojun0022/rsyx/tree/master/EPSecuritySDKDemo/LoginPodTest",
"license": "Apache",
"authors": {
"zhuguoju... | 242 |
879 | <filename>header/src/main/java/org/zstack/header/host/HostDeletionReply.java
package org.zstack.header.host;
import org.zstack.header.message.MessageReply;
/**
*/
public class HostDeletionReply extends MessageReply {
}
| 73 |
387 | <reponame>comerford/nsot<filename>nsot/version.py
__version__ = '1.4.6'
| 33 |
921 | <filename>typescript-generator-core/src/main/java/cz/habarta/typescript/generator/emitter/Emittable.java
package cz.habarta.typescript.generator.emitter;
import cz.habarta.typescript.generator.Settings;
public interface Emittable {
public String format(Settings settings);
}
| 96 |
348 | <filename>docs/data/leg-t2/046/04601324.json
{"nom":"Uzech","circ":"1ère circonscription","dpt":"Lot","inscrits":184,"abs":90,"votants":94,"blancs":8,"nuls":5,"exp":81,"res":[{"nuance":"REM","nom":"<NAME>","voix":41},{"nuance":"LR","nom":"M. <NAME>","voix":40}]} | 107 |
575 | // Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_DIALOGS_JAVA_SCRIPT_DIALOG_METRICS_H_
#define IOS_CHROME_BROWSER_UI_DIALOGS_JAVA_SCRIPT_DIALOG_METRICS_H_
// Possible reaso... | 348 |
848 | /* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | 1,007 |
466 | //---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2011 EMC Corp.
//
// @filename:
// CDatumBoolGPDB.h
//
// @doc:
// GPDB-specific bool representation
//---------------------------------------------------------------------------
#ifndef GPNAUCRATES_CD... | 622 |
1,590 | {
"parameters": {
"subscriptionId": "12345678-1234-1234-1234-12345678abc",
"resourceGroupName": "exampleResourceGroup",
"workspaceName": "exampleWorkspace",
"integrationRuntimeName": "exampleIntegrationRuntime",
"updateIntegrationRuntimeRequest": {
"autoUpdate": "Off",
"updateDelayOffs... | 586 |
2,855 | package org.jctools.maps.linearizability_test;
import org.jctools.maps.NonBlockingHashMapLong;
public class NonBlockingHashMapLongLinearizabilityTest extends LincheckMapTest
{
public NonBlockingHashMapLongLinearizabilityTest()
{
super(new NonBlockingHashMapLong<>());
}
}
| 107 |
3,592 | <reponame>omertuc/CTFd<filename>CTFd/utils/exports/serializers.py
import json
from collections import OrderedDict, defaultdict
from datetime import date, datetime
from decimal import Decimal
from CTFd.utils import string_types
class JSONEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj... | 811 |
1,062 | //
// Generated by class-dump 3.5b1 (64 bit) (Debug version compiled Dec 3 2019 19:59:57).
//
// Copyright (C) 1997-2019 <NAME>.
//
#import "NSObject-Protocol.h"
@class MFLibraryUpgrader, NSError;
@protocol MFLibraryUpgraderDelegate <NSObject>
- (void)upgrader:(MFLibraryUpgrader *)arg1 didFailWithError:(NSErro... | 155 |
971 | import csv
def write_csv_result(path, label, data):
"""Write result data in csv format
:param path: write destination
:param label: the label (first column) to write
:param data: the rest columns
:return:
"""
with open(path, "a") as csvfile:
writer = csv.writer(csvfile)
wr... | 246 |
679 | <reponame>Grosskopf/openoffice<filename>main/fpicker/source/win32/folderpicker/MtaFop.cxx
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for ad... | 9,048 |
1,337 | /*
* Copyright (c) 2008-2016 Haulmont.
*
* 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 required by applicable law or agr... | 929 |
348 | <reponame>chamberone/Leaflet.PixiOverlay
{"nom":"Saint-Philippe-d'Aiguille","dpt":"Gironde","inscrits":287,"abs":60,"votants":227,"blancs":21,"nuls":8,"exp":198,"res":[{"panneau":"1","voix":110},{"panneau":"2","voix":88}]} | 95 |
3,765 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.design;
import java.util.HashSet;
import java.util.Set;
import net.sourceforge.pmd.lang.java.ast.ASTAssignmentOperator;
import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceType;
... | 1,456 |
2,919 | #include "mex.h"
#ifdef WIN32
#include <windows.h>
#include <tchar.h>
#else
#include <algorithm>
#endif
#include <vector>
#include <map>
#include <omp.h>
using namespace std;
struct score {
double s;
int idx;
bool operator() (score i, score j) { return (i.idx < j.idx);}
} score;
template <typename T>
void nms(cons... | 2,030 |
679 | /**************************************************************
*
* 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 y... | 1,393 |
2,504 | <gh_stars>1000+
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF ... | 4,098 |
492 | <reponame>giorgosioak/raccoon4
/*
* Copyright 2015 <NAME>
*
* 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 required by appli... | 448 |
1,641 | from eth_utils.exceptions import ValidationError
from eth.abc import (
SignedTransactionAPI,
StateAPI
)
from eth.vm.forks.homestead.validation import (
validate_homestead_transaction,
)
def validate_london_normalized_transaction(
state: StateAPI,
transaction: SignedTransactionAPI,
) -> None:
... | 308 |
4,538 | <gh_stars>1000+
/**
* @file shadow_private.h
* @brief shadow模块内部的宏定义和数据结构声明, 不面向其它模块, 更不面向用户
*
* @copyright Copyright (C) 2015-2020 Alibaba Group Holding Limited
*
*/
#ifndef __SHADOW_PRIVATE_H__
#define __SHADOW_PRIVATE_H__
#if defined(__cplusplus)
extern "C" {
#endif
/* 用这种方式包含标准C库的头文件 */
#include "core_stdin... | 865 |
903 | <gh_stars>100-1000
/*
* Copyright 2019 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 License is located at
*
* http://aws.amazon.com/apache2.0
*
* o... | 1,249 |
377 | <reponame>Gotthorm/nebula<filename>code/application/game/gameserver.h
#pragma once
//------------------------------------------------------------------------------
/**
@class Game::GameServer
The game server setups and runs the game world.
Functionality and queries on the game world are divided amongst
... | 1,697 |
348 | <filename>docs/data/leg-t2/058/05801256.json
{"nom":"Saint-Martin-sur-Nohain","circ":"1ère circonscription","dpt":"Nièvre","inscrits":304,"abs":150,"votants":154,"blancs":6,"nuls":2,"exp":146,"res":[{"nuance":"REM","nom":"<NAME>","voix":81},{"nuance":"FN","nom":"<NAME>","voix":65}]} | 115 |
12,278 | <gh_stars>1000+
// Copyright <NAME>, 2016-2019.
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_STACKTRACE_DETAIL_COLLECT_NOOP_IPP
#define BOOST_STACKTRACE_DETAIL_COLLECT_NOOP_IPP
#include <boo... | 296 |
456 | <filename>tests/djvTest/main.cpp
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2004-2020 <NAME>
// All rights reserved.
#include <djvCoreTest/CacheTest.h>
#include <djvCoreTest/EnumTest.h>
#include <djvCoreTest/ErrorTest.h>
#include <djvCoreTest/ListObserverTest.h>
#include <djvCoreTest/MapObserverTest.h>
... | 5,033 |
1,654 | # -*- coding: utf-8 -*-
from lifelines.fitters import ParametricRegressionFitter
from autograd.scipy.special import expit
from autograd import numpy as np
from lifelines.utils.safe_exp import safe_exp
from lifelines.datasets import load_rossi
exp = safe_exp
dot = np.dot
class CopulaFrailtyWeilbullModel(ParametricReg... | 664 |
506 | <reponame>Ashindustry007/competitive-programming
#!/usr/bin/env python3
# https://codejam.withgoogle.com/2018/challenges/00000000000000cb/dashboard
for t in range(1, int(input()) + 1):
d, s = input().split()
s = [c for c in s]
d = int(d)
n = len(s)
a = [1] * (n + 1)
c = 0
for i in range(1, n... | 438 |
673 | {
"normal": [
"A Study of Elementals: Volume 3: Pain and Tolerance of the Elements",
"Typhory’s Guide To Abjurations: Rapid Adaptions To Opposing Forces",
"Notes of Death and Undeath: Vykathar’s Endeavours in the Unholy",
"The Credits of Lightning and Ice: Shifting Plans and their Collisions",
"Th... | 1,555 |
333 | package com.alipay.api.response;
import java.util.List;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
import com.alipay.api.domain.PublicAuditStatus;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.open.public.info.query response.
* ... | 1,845 |
459 | <filename>test/functional/name_longsalt.py
#!/usr/bin/env python3
# Copyright (c) 2021 <NAME>
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# RPC test for the "long-salt" rule introduced with the Taproot softfork.
from test... | 1,400 |
3,266 | '''PyTorch-compatible transformations.
'''
import torch
import numpy as np
import torchvision
# Callable to convert a RGB image into a PyTorch tensor.
ImageToTensor = torchvision.transforms.ToTensor
class MaskToTensor:
'''Callable to convert a PIL image into a PyTorch tensor.
'''
def __call__(self, i... | 300 |
640 | <filename>include/arch/s1mp3/drivers/lcdtarget.h<gh_stars>100-1000
#ifndef __LCDTARGET_H__
#define __LCDTARGET_H__
#include <ATJ2085_Ports.h>
#define LCDTARGET_CE_REGISTER EM_PAGE_HI_REG
#define LCDTARGET_CE EM_PAGE_HI_CE3_INV
/* IO Register/Pins */
#define LCDTARGET_REGISTER MFP_GPOA_SELECT_REG
#d... | 1,242 |
466 | //---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2012 EMC Corp.
//
// @filename:
// CParseHandlerPhysicalDML.cpp
//
// @doc:
// Implementation of the SAX parse handler class for parsing physical DML
//-------------------------------------------------... | 3,817 |
1,932 | <gh_stars>1000+
package cn.springcloud.book.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* @author: ... | 168 |
1,396 | <gh_stars>1000+
/*
* 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 required by applicable law or agreed to in writing, software
... | 883 |
1,323 | //
// HARegistContentModel.h
// HelloAsk
//
// Created by ZYVincent on 15-9-4.
// Copyright (c) 2015年 ZYProSoft. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
* 内容类型
*/
typedef NS_ENUM(NSUInteger, HARegistContentType){
/**
* 用户名
*/
HARegistContentTypeUserName,
/**
* ... | 283 |
615 | /* ************************************************************************
* Copyright 2015 Advanced Micro Devices, 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... | 307 |
1,526 | /*
* 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 Apache License, Version 2.0
* (the "License"); you may ... | 1,769 |
1,975 | <gh_stars>1000+
# Copyright 2019 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/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 445 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.