max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
2,151 | // Copyright 2017 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 NET_THIRD_PARTY_HTTP2_PLATFORM_IMPL_HTTP2_RECONSTRUCT_OBJECT_IMPL_H_
#define NET_THIRD_PARTY_HTTP2_PLATFORM_IMPL_HTTP2_RECONSTRUCT_OBJECT_IMPL_H_
... | 369 |
8,772 | <gh_stars>1000+
package org.apereo.cas.qr.web.flow;
import org.apereo.cas.config.QRAuthenticationConfiguration;
import org.apereo.cas.config.TokenCoreConfiguration;
import org.apereo.cas.web.flow.BaseWebflowConfigurerTests;
import org.apereo.cas.web.flow.CasWebflowConfigurer;
import lombok.val;
import org.junit.jupit... | 433 |
2,497 | #!/usr/bin/env python3
import ptan
import gym
import argparse
import numpy as np
from lib import common
import torch
import torch.nn.functional as F
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-m", "--model", required=True, help="Model file name")
parser.add_argume... | 804 |
1,350 | <reponame>Shashi-rk/azure-sdk-for-java
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.extendedlocation.generated;
import com.azure.core.util.Context;
/** Samples for CustomLo... | 294 |
303 | <reponame>DannyParker0001/Kisak-Strike
// See Copyright Notice in gmMachine.h
#ifndef _timer_h
#define _timer_h
#include <wtypes.h>
class Timer
{
public:
Timer() : resetTimer(true), dTime(0.0f) {}
~Timer() {}
bool Init();
void Reset() { resetTimer = true; }
float Tick();
float GetDelta() { return dTim... | 172 |
1,738 | /*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or t... | 562 |
303 | import pytest
from redun.scheduler import Scheduler
@pytest.fixture
def scheduler() -> Scheduler:
"""
Returns an in memory Scheduler for testing.
"""
return Scheduler()
| 64 |
460 | package de.saxsys.mvvmfx.scopes.example1.views;
import de.saxsys.mvvmfx.InjectScope;
import de.saxsys.mvvmfx.ViewModel;
import de.saxsys.mvvmfx.scopes.example1.Example1Scope1;
import de.saxsys.mvvmfx.scopes.example1.Example1Scope2;
public class ScopedViewModelD implements ViewModel {
@InjectScope
public Exam... | 161 |
575 | <filename>chrome/browser/android/autofill_assistant/generic_ui_interactions_android.h
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_ANDROID_AUTOFILL_ASSISTANT_GENERIC_UI_INTERAC... | 1,945 |
2,174 | package ceui.lisa.models;
import java.util.List;
public class ProfilePresetsBean {
private ImageUrlsBean default_profile_image_urls;
private List<AddressesBean> addresses;
private List<CountriesBean> countries;
private List<JobsBean> jobs;
public ImageUrlsBean getDefault_profile_image_urls() {
... | 419 |
2,151 | // Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// http://code.google.com/p/protobuf/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistri... | 4,611 |
435 | {
"copyright_text": "Standard YouTube License",
"description": "The session is about accessing environmental data over the Internet using the OpenDAP protocol and displaying it in a web browser using the Bokeh library. The session will include a presentation/demonstration of some Python 3 software (available from P... | 410 |
839 | <filename>systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ProtocolVariationsTest.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
* regarding copyright ownership. The ... | 10,756 |
425 | /**
* @file iter_solver.h
* @brief Template for an iterate solver
*/
#include "solver/data_parallel.h"
namespace dmlc {
namespace solver {
using Progress = std::vector<double>;
/**
* \brief encode/decode a command
*/
struct IterCmd : public DataParCmd {
IterCmd() {}
IterCmd(int c) : DataParCmd(c) {}
//... | 1,597 |
634 | /*
* Copyright 2013-2020 consulo.io
*
* 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 ... | 839 |
3,049 | <gh_stars>1000+
from TfServingProxy import TfServingProxy
from seldon_core.proto import prediction_pb2
from seldon_core.utils import get_data_from_proto, array_to_grpc_datadef, json_to_seldon_message
from tensorflow_serving.apis import predict_pb2
import numpy as np
from unittest import mock
import tensorflow as tf
imp... | 1,962 |
984 | {
"name": "validator",
"filename": "validator.js",
"version": "1.0.4",
"description": "轻量级的JavaScript表单验证,字符串验证。没有依赖,支持UMD,~3kb。",
"homepage": "http://jaywcjlove.github.io/validator.js",
"keywords": [
"validator",
"validator.tool",
"validator.js",
"validation",
"validate",
"sanitizat... | 354 |
3,428 | #!/usr/bin/env python
#
# @license Apache-2.0
#
# Copyright (c) 2018 The Stdlib Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | 2,619 |
713 | <filename>leetcode.com/python/653_Two_Sum_IV_Input_is_a_BST.py<gh_stars>100-1000
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution(object):
def findTar... | 419 |
848 | <filename>tools/AKS/kernel_zoo/kernel_classification_accuracy.json
{
"kernel_name": "ClassificationAccuracy",
"description": "Measure accuracy of a classification network",
"kernel_type": "cpp",
"device_type": "cpu",
"kernel_lib" : "libs/libClassificationAccuracy.so",
"param_list" : {
"ground_t... | 133 |
480 | /*
* Copyright [2013-2021], Alibaba Group Holding Limited
*
* 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 app... | 564 |
565 | <gh_stars>100-1000
/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2016 The PHP Group ... | 3,117 |
520 | <filename>stats/src/main/java/com/facebook/stats/cardinality/BucketAndHash.java<gh_stars>100-1000
/*
* Copyright (C) 2012 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
... | 634 |
775 | <filename>utest/namespace/test_retrievercontextfactory.py
# Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# 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 Licen... | 559 |
348 | {"nom":"Laloeuf","circ":"5ème circonscription","dpt":"Meurthe-et-Moselle","inscrits":221,"abs":118,"votants":103,"blancs":17,"nuls":2,"exp":84,"res":[{"nuance":"SOC","nom":"<NAME>","voix":51},{"nuance":"REM","nom":"<NAME>","voix":33}]} | 98 |
3,012 | /** @file
GUID for MdePkg PCD Token Space
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _MDEPKG_TOKEN_SPACE_GUID_H_
#define _MDEPKG_TOKEN_SPACE_GUID_H_
#define MDEPKG_TOKEN_SPACE_GUID \
{ \
0x914AEBE7, 0x4635,... | 234 |
483 | <filename>tests/gdata_tests/contacts/profiles/live_client_test.py
#!/usr/bin/env python
#
# Copyright (C) 2009 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.... | 1,239 |
377 | <filename>FasterRCNN/data/transforms/__init__.py
from .transform import *
from fvcore.transforms.transform import *
from .transform_gen import *
__all__ = [k for k in globals().keys() if not k.startswith("_")]
| 72 |
2,130 | //
// RapidCRC.c
// OOMDetector
//
// Tencent is pleased to support the open source community by making OOMDetector available.
// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
// Licensed under the MIT License (the "License"); you may not use this file except
// in compliance with th... | 1,355 |
788 | <filename>exp/base.py
from tools.utils import xml_format
import numpy as np
# TODO: classes should hold dictionaries of variables, vxa tags and values
# TODO: remove most of the hard coded text from read_write_voxelyze.py and replace with a few loops
# TODO: add method to VoxCadParams for organizing (nested) subsecti... | 5,180 |
313 | <reponame>gridgentoo/titus-control-plane<gh_stars>100-1000
/*
* Copyright 2018 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICE... | 963 |
365 | # ############################################################
# Importing - Same For All Render Layer Tests
# ############################################################
import unittest
import os
import sys
from view_layer_common import *
# ############################################################
# Testing
# ... | 1,151 |
870 | /*
* 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 ... | 2,775 |
5,964 | <gh_stars>1000+
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrBatch_DEFINED
#define GrBatch_DEFINED
#include <new>
#include "GrBatchTarget.h"
#include "GrGeometryProcessor.h"
#include "GrVertices.h"
#include "S... | 2,168 |
435 | <reponame>Montana/datawave
package datawave.webservice.results.mr;
import java.io.IOException;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessOrder;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorOrder;
import javax.xml.bind.annotation.XmlAccessorTy... | 2,790 |
311 | <reponame>dev-66/dd-trace-java
package com.datadog.appsec.config;
import com.datadog.appsec.util.Generated;
import com.squareup.moshi.JsonAdapter;
import com.squareup.moshi.Moshi;
import java.util.List;
import java.util.Map;
import java.util.Objects;
public class AppSecConfig {
private static final JsonAdapter<App... | 658 |
1,393 | <filename>petastorm/tests/generate_dataset_for_legacy_tests.py
# Copyright (c) 2017-2018 Uber Technologies, 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... | 393 |
357 | <reponame>dcnieho/Psychtoolbox-3
/*
SCREENHideCursorHelper.c
AUTHORS:
<EMAIL> awi
<EMAIL> mk
PLATFORMS:
All.
HISTORY:
12/14/02 awi Created.
10/12/04 awi Changed "SCREEN" to "Screen" in useString.
11/16/04 awi Added "Helper" suffix.
DESCRIPTION:
Hides the mouse pointer
TO D... | 576 |
482 | package io.nutz.demo.simple;
import org.nutz.boot.starter.caffeine.UpdateStrategy;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;
import org.nutz.mvc.Mvcs;
@IocBean
public class MvcUpdateStrategy implements UpdateStrategy {
@Override
public boolean shouldUpdate(String key) {
// 凡是reque... | 179 |
372 | <reponame>kbore/pbis-open
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*-
* ex: set softtabstop=4 tabstop=8 expandtab shiftwidth=4: *
* Editor Settings: expandtabs and use 4 spaces for indentation */
/*
* Copyright © BeyondTrust Software 2004 - 2019
* All rights reserved.
*
* Licensed ... | 1,770 |
1,587 | package io.reflectoring.featureflags.implementations.contextsensitive;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
public class Feature {
public enum RolloutStrategy {
GLOBAL,
PERCENTAGE;
... | 1,230 |
515 | package br.com.caelum.stella.nfe.security;
public enum TokenAlgorithm {
PKCS11
}
| 34 |
12,278 | # Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
# This source code is licensed under both the GPLv2 (found in the
# COPYING file in the root directory) and Apache 2.0 License
# (found in the LICENSE.Apache file in the root directory).
from advisor.db_log_parser import NO_COL_FAMILY
from advisor.d... | 6,025 |
2,132 | // Targeted by JavaCPP version 1.5.6: DO NOT EDIT THIS FILE
package org.bytedeco.tensorflow;
import org.bytedeco.tensorflow.Allocator;
import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;
import static org.bytedeco.javacpp.presets.javacpp.*;
import static org.bytedeco.tensorfl... | 668 |
5,937 | <gh_stars>1000+
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//-----------------------------------------------------------------------------
//
//
#include "p... | 114 |
1,223 | <gh_stars>1000+
{
"template": "nodejs",
"ports": [3000],
"name": "messenger-bot",
"description": "A Node client for the Facebook Messenger Platform",
"scripts": {
"post-create": "echo 'running npm install - this might take awhile...' && npm install && sed -i 's/listen(3000)/listen(3000, \"0.0.0.0\")/g' ex... | 152 |
1,236 | // The MIT License (MIT)
// Copyright (c) 2016, 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 restriction, including without limitation the rights
// to use, copy, mo... | 8,594 |
765 | <gh_stars>100-1000
/*
* Copyright (c) 2020 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
* not be construed as granting a license to any other intellectual
* property including but not limited to intellectual property relating
* to a hardware implemen... | 1,055 |
1,227 | /*
* Copyright 2012 <NAME>
* Copyright 2017 <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 applicab... | 387 |
432 | <reponame>mfkiwl/riscv_vhdl-64bit-fault-tolerant
TEST_NAME = "Tests N1: demo game"
TEST_DESCRIPTION = \
"This test do the following steps:\n"\
" - Load elf-image into simulated target.\n"\
" - Start simulation.\n"\
" - Use button to select Tetris menu.\n"\
" - Start and play Tetris game.\n"\
... | 868 |
6,497 | <reponame>jedyang/cachecloud
package com.sohu.cache.constant;
/**
* Redis-Migrate-Tool常量
* @author leifu
* @Date 2016-6-10
* @Time 上午9:23:30
*/
public enum RedisMigrateToolConstant {
Stats("Stats"),
Keyspace("Group"),
Clients("Clients"),
Memory("Memory"),
Server("Server");
... | 428 |
1,576 | <reponame>paulojraposo/MarkdownReader
/**
* Types for extending block parsing
*/
package org.commonmark.parser.block;
| 38 |
854 | <filename>Python3/373.py
__________________________________________________________________________________________________
sample 40 ms submission
import heapq
class Solution:
def kSmallestPairs(self, nums1: List[int], nums2: List[int], k: int) -> List[List[int]]:
if not nums1 or not nums2:
ret... | 835 |
455 | #pragma once
#include "../defines.h"
#include "../Context.h"
#include "Object.h"
#include "BaseCamera.h"
namespace star
{
class FreeCamera : public BaseCamera
{
public:
FreeCamera(void);
virtual ~FreeCamera(void);
void SetStatic(bool isStatic);
void SetZoomEnabled(bool canZoom);
void SetZoo... | 320 |
3,227 | #include <CGAL/Simple_cartesian.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/Timer.h>
// Simplification function
#include <CGAL/Surface_mesh_simplification/edge_collapse.h>
#include <CGAL/Surface_mesh_simplification/Edge_collapse_visitor_base.h>
#include <CGAL/Surface_mesh_simplification/Policies/Edge_collapse/C... | 2,395 |
2,553 | # Copyright 2018 Google LLC.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#... | 1,595 |
8,569 | #include <libevdev/libevdev.h>
#include "sway/config.h"
#include "sway/commands.h"
#include "sway/input/cursor.h"
struct cmd_results *input_cmd_scroll_button(int argc, char **argv) {
struct cmd_results *error = NULL;
if ((error = checkarg(argc, "scroll_button", EXPECTED_AT_LEAST, 1))) {
return error;
}
struct in... | 457 |
512 | <gh_stars>100-1000
from __future__ import absolute_import
import os
import shutil
import signal
import sys
import metaparticle_pkg.option as option
import metaparticle_pkg.builder as builder
import metaparticle_pkg.runner as runner
def is_in_docker_container():
mp_in_container = os.getenv('METAPARTICLE_IN_CONTAI... | 1,405 |
4,879 | #include "routing/road_index.hpp"
#include "routing/routing_exceptions.hpp"
namespace routing
{
void RoadIndex::Import(std::vector<Joint> const & joints)
{
for (Joint::Id jointId = 0; jointId < joints.size(); ++jointId)
{
Joint const & joint = joints[jointId];
for (uint32_t i = 0; i < joint.GetSize(); ++i... | 217 |
777 | <filename>content/child/service_worker/service_worker_provider_context.h
// Copyright 2014 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 CONTENT_CHILD_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_CONTEXT_H_
#define C... | 1,281 |
420 | <filename>example/example.c
#include <stdlib.h>
#include <stdio.h>
#include <wlc/wlc.h>
#include <chck/math/math.h>
#include <linux/input.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
static struct {
struct {
wlc_handle view;
struct wlc_point grab;
uint32_t edges... | 5,761 |
14,668 | <reponame>zealoussnow/chromium<filename>chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadDialogUtilsUnitTest.java
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE fi... | 1,132 |
369 | <filename>module-os/LockGuard.hpp
// Copyright (c) 2017-2021, Mudita <NAME>.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include <mutex.hpp>
class LockGuard
{
public:
explicit LockGuard(cpp_freertos::MutexStandard& mutex);
~LockGuard();
LockG... | 222 |
419 | #pragma once
#include <memory>
namespace Hypodermic
{
class IRegistration;
class IResolutionContainer;
class RegistrationContext
{
public:
RegistrationContext(IResolutionContainer& resolutionContainer, const std::shared_ptr< IRegistration >& registration)
: m_resolution... | 326 |
728 | <gh_stars>100-1000
/**
* Node-level transaction stuff.
*/
package org.sirix.access.trx.node.json;
| 42 |
405 | <reponame>joowani/dtags<filename>dtags/commands/tags.py<gh_stars>100-1000
import json
import sys
from pathlib import Path
from typing import List, Optional, Set, Tuple
from dtags import style
from dtags.commons import (
dtags_command,
get_argparser,
normalize_tags,
prompt_user,
reverse_map,
)
from ... | 2,392 |
405 | package weixin.guanjia.core.entity.message.customer;
public class Image {
private String media_id;
public void setMedia_id(String mediaId) {
media_id = mediaId;
}
public String getMedia_id() {
return media_id;
}
}
| 85 |
2,494 | <reponame>jxcore/jxcore<gh_stars>1000+
// Copyright 2010 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 above c... | 815 |
2,406 | <filename>model-optimizer/unit_tests/extensions/front/mxnet/ssd_pattern_flatten_softmax_activation_test.py<gh_stars>1000+
# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import unittest
from extensions.front.mxnet.ssd_pattern_flatten_softmax_activation import SsdPatternFlattenSoftmax... | 963 |
5,133 | <filename>processor/src/test/java/org/mapstruct/ap/testutil/compilation/annotation/ProcessorOptions.java
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.testutil.compilation.annotation;
import j... | 217 |
5,169 | <reponame>Gantios/Specs<filename>Specs/c/c/e/MDInfo/0.1.0/MDInfo.podspec.json
{
"name": "MDInfo",
"version": "0.1.0",
"summary": "Deal with the localized name, short name and initials of days and months easily.",
"homepage": "https://github.com/elio-developer/MDInfo",
"license": {
"type": "MIT",
"file... | 265 |
971 | package com.ucar.datalink.biz.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.ucar.datalink.biz.dal.InterceptorDAO;
import com.ucar.datalink.biz.dal.MediaDAO;
import com.ucar.datalink.biz.service.InterceptorService;
import com.ucar.datalink.common.errors.ValidationException;
import com.ucar.datalink.d... | 894 |
348 | {"nom":"Largeasse","circ":"3ème circonscription","dpt":"Deux-Sèvres","inscrits":555,"abs":311,"votants":244,"blancs":12,"nuls":6,"exp":226,"res":[{"nuance":"REM","nom":"<NAME>","voix":123},{"nuance":"LR","nom":"<NAME>","voix":103}]} | 92 |
5,378 | <reponame>st--/jupytext<filename>tests/notebooks/mirror/ipynb_to_script_vim_folding_markers/jupyter.py<gh_stars>1000+
# ---
# jupyter:
# jupytext:
# cell_markers: '{{{,}}}'
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# # Jupyter notebook
#
# This notebook is a si... | 228 |
555 | from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
import torch
from typing import List
import logging
logger = logging.getLogger(__name__)
class AutoModel:
def __init__(self, model_name: str, tokenizer_name: str = None, easynmt_path: str = None, lang_map=None, tokenizer_args=None):
if token... | 967 |
407 | package com.alibaba.smart.framework.engine.test.cases;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.alibaba.smart.framework.engine.common.util.CollectionUtil;
import com.alibaba.smart.framework.engine.common.util.MapUtil;
import com.alibaba.smart.framework.engine.configuration.Del... | 1,842 |
1,350 | <reponame>Shashi-rk/azure-sdk-for-java
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.avs.models;
import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson... | 661 |
1,816 | <filename>open-vm-tools/services/plugins/serviceDiscovery/serviceDiscovery.c
/*********************************************************
* Copyright (C) 2020 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Publi... | 11,872 |
1,127 | <reponame>ryanloney/openvino-1
// Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include "xml_net_builder.hpp"
#include "rnn_referee.hpp"
#include <cpp/ie_cnn_network.h>
#include <vector>
#include <string>
enum Mode {
CELL, /**< single LSTMCell layer */
... | 791 |
831 | /*
* Copyright (C) 2018 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | 2,029 |
569 | <filename>java/src/com/google/template/soy/data/internal/AbstractSoyMap.java<gh_stars>100-1000
/*
* Copyright 2020 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
*
* h... | 773 |
794 | /*
* 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")... | 1,679 |
496 | /*
* Copyright (C) 2018 <NAME>
*
* Author: <NAME> <<EMAIL>>
*/
#include "lexbor/html/interfaces/table_section_element.h"
#include "lexbor/html/interfaces/document.h"
lxb_html_table_section_element_t *
lxb_html_table_section_element_interface_create(lxb_html_document_t *document)
{
lxb_html_table_section_elem... | 418 |
764 | <filename>erc20/0x60Eb57d085C59932d5fAa6c6026268A4386927d0.json
{"symbol": "LOCG","address": "0x60Eb57d085C59932d5fAa6c6026268A4386927d0","overview":{"en": ""},"email": "","website": "https://locgame.io","state": "NORMAL","links": {"blog": "https://medium.com/locgame","twitter": "https://twitter.com/LOCgameio?s=20","te... | 146 |
412 |
typedef struct tag_struct_name
{
int x;
float y;
} MYSTRUCT;
void fun(struct tag_struct_name tag_struct_param, MYSTRUCT mystruct_param)
{
}
| 56 |
726 | """
:class:`FoldingClassifier` and :class:`FoldingRegressor` provide an easy way
to run k-Folding cross-validation. Also it is a nice way to combine predictions of trained classifiers.
"""
from __future__ import division, print_function, absolute_import
import numpy
import pandas
from six.moves import zip
from sklea... | 6,069 |
1,127 | // Copyright (C) 2018-2022 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include <cstdint>
#include <memory>
#include "default_opset.hpp"
#include "ngraph/node.hpp"
#include "onnx_import/core/node.hpp"
namespace ngraph {
namespace onnx_import {
namespace utils {
/// \brief Factory class... | 441 |
1,667 | <gh_stars>1000+
/**
* Copyright 2017 <NAME> <<EMAIL>>
*
* 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 applic... | 4,819 |
4,901 | /*
* Copyright (C) 2014 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | 876 |
461 | #!/usr/bin/env python3
import json
import warnings
import click
from ipwhois import IPWhois
@click.command()
@click.argument('ip')
@click.option('--json', 'json_output', is_flag=True, default=False, help='Print the output in JSON format')
@click.option('--csv', 'csv_output', is_flag=True, default=False, help='Print... | 691 |
1,766 | <reponame>aalonsog/licode
/*
* hsam.cpp
*/
#include <stdio.h>
#include <OneToManyProcessor.h>
#include <SdpInfo.h>
#include <WebRtcConnection.h>
#include <LibNiceConnection.h>
#include "Test.h"
#include "pc/Observer.h"
using namespace erizo;
int publisherid = 0;
int main() {
new Test();
// SDPReceiver* receive... | 793 |
1,350 | <reponame>Shashi-rk/azure-sdk-for-java<gh_stars>1000+
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.security.keyvault.keys.implementation;
public class ByteExtensions {
/**
* Creates a copy of the source array.
* @param source The Array ... | 253 |
1,444 |
package mage.cards.m;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardTyp... | 1,399 |
451 | import os
import re
import requests.exceptions as req_exc
from libs import jenkinslib, quik
from .BasePlugin import BasePlugin
class RunCommand(BasePlugin):
"""Class for managing RunCommand SubCommand"""
def __init__(self, args):
super().__init__(args)
loader = quik.FileLoader(os.path.joi... | 1,683 |
892 | <reponame>westonsteimel/advisory-database-github<filename>advisories/unreviewed/2022/02/GHSA-xq5w-p74r-82cv/GHSA-xq5w-p74r-82cv.json
{
"schema_version": "1.2.0",
"id": "GHSA-xq5w-p74r-82cv",
"modified": "2022-02-15T00:03:02Z",
"published": "2022-02-10T00:00:20Z",
"aliases": [
"CVE-2021-36302"
],
"deta... | 470 |
2,112 | from flask import Flask,jsonify
app = Flask(__name__)
@app.route("/")
def hello():
return jsonify([
{"from": "<<EMAIL>>", "subject": "lunch at noon tomorrow"},
{"from": "<<EMAIL>>", "subject": "compiler docs"}])
if __name__ == "__main__":
app.run(host='0.0.0.0')
| 121 |
889 | <filename>lightnlp/we/skip_gram/tool.py
import torch
from torchtext.data import Field, Iterator
from torchtext.vocab import Vectors
from sklearn.metrics import f1_score, accuracy_score, recall_score, precision_score
import jieba
from ...base.tool import Tool
from ...utils.log import logger
from .config import DEVICE, ... | 952 |
2,415 | package com.alexvasilkov.gestures.sample.base.settings;
import com.alexvasilkov.gestures.views.interfaces.GestureView;
public interface SettingsController {
void apply(GestureView view);
}
| 65 |
544 | import numpy as np
from ..base import BaseSKI
from tods.data_processing.SKImputer import SKImputerPrimitive
class SKImputerSKI(BaseSKI):
def __init__(self, **hyperparams):
super().__init__(primitive=SKImputerPrimitive, **hyperparams)
self.fit_available = True
self.predict_available = False
self.produce_avail... | 113 |
10,876 | {
"name": "pagmo2",
"version": "2.16.1",
"description": "A C++ platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.",
"homepage": "https://esa.github.io/pagmo2/",
"dependencies": [
"boost-any",
"boost-graph",
"boost-seria... | 204 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.