max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
494 | /**
* Copyright 2013 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/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | 1,348 |
1,755 | #!/usr/bin/env python
import vtk
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# this is a tcl version of plate vibration
ren1 = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren1)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
# read a vtk file
#... | 730 |
425 | <reponame>sanjayankur31/HighFive
/*
* Copyright (c), 2017, <NAME> <<EMAIL>>
*
* 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 H5EASY_BITS_OPENCV_HPP
#define H5EASY_BITS_OPENCV_HPP
... | 1,849 |
1,056 | /*
* 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 ... | 3,115 |
3,897 | /* mbed Microcontroller Library
* Copyright (c) 2018 GigaDevice Semiconductor Inc.
*
* SPDX-License-Identifier: Apache-2.0
*
* 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
*
* htt... | 541 |
1,607 | <reponame>groov1kk/assertj-core
/*
* 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 writi... | 2,376 |
575 | // 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 "chrome/browser/ui/webui/settings/site_settings_helper.h"
#include "base/callback_helpers.h"
#include "base/guid.h"
#include "base/json/json_rea... | 14,370 |
956 | /* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2014, 2015 Netronome Systems, Inc.
* All rights reserved.
*/
#ifndef _NFP_NET_LOGS_H_
#define _NFP_NET_LOGS_H_
#include <rte_log.h>
extern int nfp_logtype_init;
#define PMD_INIT_LOG(level, fmt, args...) \
rte_log(RTE_LOG_ ## level, nfp_logtype_init, \
"%... | 627 |
363 | <filename>SpatialGDK/Source/SpatialGDK/Public/SpatialView/ConnectionHandler/SpatialOSConnectionHandler.h
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved
#pragma once
#include "SpatialView/ConnectionHandler/AbstractConnectionHandler.h"
#include "SpatialView/OpList/OpList.h"
#include "SpatialView/OpList/Wor... | 338 |
1,433 | //
// Copyright (c) 2015, Microsoft Corporation
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUT... | 2,996 |
14,668 | <reponame>chromium/chromium
// 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_SERVICES_SHARING_PUBLIC_CPP_CONVERSIONS_H_
#define CHROME_SERVICES_SHARING_PUBLIC_CPP_CONVERSIONS_H_
#include ... | 311 |
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... | 2,442 |
3,181 | /*
* Copyright (C) 2013-2017 microG Project Team
*
* 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 ... | 2,917 |
6,098 | <filename>h2o-core/src/main/java/water/rapids/ast/prims/reducers/AstSdev.java
package water.rapids.ast.prims.reducers;
import water.fvec.Frame;
import water.fvec.Vec;
import water.rapids.Env;
import water.rapids.vals.ValNums;
import water.rapids.ast.AstPrimitive;
import water.rapids.ast.AstRoot;
/**
* TODO: allow fo... | 438 |
1,086 | <gh_stars>1000+
// Copyright 2011 Google Inc. All Rights Reserved.
//
// This code is licensed under the same terms as WebM:
// Software License Agreement: http://www.webmproject.org/license/software/
// Additional IP Rights Grant: http://www.webmproject.org/license/additional/
// ----------------------------------... | 954 |
14,668 | <gh_stars>1000+
// 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_UPDATER_UNITTEST_UTIL_H_
#define CHROME_UPDATER_UNITTEST_UTIL_H_
#include "chrome/updater/update_service.h"
namespace upd... | 262 |
2,542 | // ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#pragma once
namespace Reliab... | 2,798 |
1,014 | package com.github.neuralnetworks.performance.tests;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import com.github.neuralnetworks.tensor.Tensor;
import com.github.neuralnetworks.training.TrainingInputData;
import com.github.n... | 1,140 |
2,095 | /*
* Copyright 2015-2020 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 the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | 1,958 |
411 | '''
Function:
drop path
Author:
<NAME>
'''
import torch
import torch.nn as nn
'''drop path'''
class DropPath(nn.Module):
def __init__(self, drop_prob=0.):
super(DropPath, self).__init__()
self.drop_prob = drop_prob
self.keep_prob = 1 - drop_prob
'''forward'''
def forward(se... | 311 |
3,579 | <reponame>coder-hugo/querydsl<gh_stars>1000+
/*
* Copyright 2015, The Querydsl Team (http://www.querydsl.com/team)
*
* 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.or... | 810 |
2,338 | //===- ExecutionUtils.h - Utilities for executing code in lli ---*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | 697 |
2,338 | <gh_stars>1000+
#define __CLC_FUNCTION atom_min
#define __CLC_ADDRESS_SPACE global
#include <clc/atom_decl_int32.inc>
| 51 |
4,538 | #! /usr/bin/env python3
import os, sys, re, struct, platform, getopt, subprocess
from sys import platform as _platform
import array,hashlib,struct
def update_crc16(crcin, byte):
crc = crcin
calculen = byte | 0x100
crc <<= 1
calculen <<= 1
if calculen & 0x100 > 0:
crc += 1
if crc & 0x10... | 1,660 |
1,288 | <reponame>s3bubble/shaka-packager<gh_stars>1000+
// Copyright 2016 Google Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
#include <gmock/gmock.h>
#include <gtest/gtest.h>... | 9,077 |
14,668 | <gh_stars>1000+
#!/usr/bin/env python
# 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.
"""Gets the chromoting host info from an input arg and then
tries to find the authentication info in the .chromotin... | 550 |
315 | <reponame>shink/incubator-inlong
/*
* 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,384 |
2,827 | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
"""
Interpreting hyperbole with RSA models of pragmatics.
Taken from: https://gscontras.github.io/probLang/chapters/03-nonliteral.html
"""
import argparse
import collections
import torch
from search_inference import HashingMargi... | 3,276 |
2,151 | <reponame>zipated/src
// 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.
#include "net/third_party/quic/http/decoder/payload_decoders/quic_http_settings_payload_decoder.h"
#include <cstdint>
#include "ba... | 1,602 |
361 | # -*- coding: utf-8 -*-
import base64
import datetime
import hashlib
import json
import random
import socket
import struct
import time
import bleach
import feedparser
import lxml.html
import magic
import pytz
import requests
import six
import structlog
from django.conf import settings
from django.core.cache import cac... | 17,941 |
711 | <filename>java110-interface/src/main/java/com/java110/intf/common/ITransactionLogInnerServiceSMO.java
package com.java110.intf.common;
import com.java110.config.feign.FeignConfiguration;
import com.java110.dto.transactionLog.TransactionLogDto;
import com.java110.po.transactionLog.TransactionLogPo;
import org.springfra... | 747 |
2,661 | /* libs/graphics/sgl/SkBitmap.cpp
**
** Copyright 2006, 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 r... | 7,403 |
30,023 | """Support for Qwikswitch Relays and Dimmers."""
from __future__ import annotations
from homeassistant.components.light import ColorMode, LightEntity
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, D... | 489 |
1,788 | package com.fingerchar.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fingerchar.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
/**
* @Description StaNft
* @Author
* @Date 2021-12-13
* @Version 2.1
*/
@TableName("`sta_nft`")
public class StaNft extends B... | 1,280 |
2,577 | /*
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
* under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. Camunda licenses this file to you under the Apache License,
* Version 2.0; y... | 2,826 |
640 | <reponame>ladike/912_project
#ifndef __KERN_MM_SWAP_CLOCK_H__
#define __KERN_MM_SWAP_CLOCK_H__
#include <swap.h>
extern struct swap_manager swap_manager_clock;
#endif
| 76 |
407 | <filename>plugins/gui/src/graph_widget/items/utility_items/node_drag_shadow.cpp<gh_stars>100-1000
#include "gui/graph_widget/items/utility_items/node_drag_shadow.h"
#include "gui/graph_widget/items/nodes/gates/graphics_gate.h"
#include <assert.h>
#include <QParallelAnimationGroup>
#include <QPropertyAnimation>
#incl... | 1,583 |
4,484 | <filename>tensorlayer/app/human_pose_estimation/common.py
#! /usr/bin/python
# -*- coding: utf-8 -*-
"""
# Reference:
- [pose_lcn](
https://github.com/rujiewu/pose_lcn)
- [3d-pose-baseline](
https://github.com/una-dinosauria/3d-pose-baseline)
"""
import tensorflow as tf
import numpy as np
import pickle
impo... | 8,357 |
575 | <gh_stars>100-1000
// Copyright (c) 2013 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 "sandbox/linux/seccomp-bpf-helpers/baseline_policy.h"
#include <errno.h>
#include <sys/mman.h>
#include <sys/socket.h>
#i... | 4,769 |
571 | /***************************************************************************
Copyright 2015 Ufora Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licen... | 1,595 |
2,996 | // Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.persistence.typeHandling.coreTypes;
import com.google.common.base.Defaults;
import com.google.common.collect.Maps;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.terasology.persistence.typeHan... | 1,798 |
478 | <gh_stars>100-1000
/*
Copyright (c) 2013 Aerys
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, modify, merge, publish, di... | 1,759 |
2,151 | // 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 "chrome/browser/supervised_user/supervised_user_creation_policy_handler.h"
#include "base/values.h"
#include "chrome/common/pref_names.h"
#inclu... | 560 |
454 | <filename>vertx-gaia/vertx-co/src/main/java/io/vertx/up/commune/secure/Acl.java
package io.vertx.up.commune.secure;
import io.vertx.core.json.JsonObject;
import io.vertx.up.eon.em.AclPhase;
import java.io.Serializable;
import java.util.Set;
/**
* @author <a href="http://www.origin-x.cn">Lang</a>
*/
public interfac... | 314 |
1,249 | #include <wayfire/geometry.hpp>
#include <cmath>
#include <sstream>
#include <iomanip>
/* Geometry helpers */
std::ostream& operator <<(std::ostream& stream, const wf::geometry_t& geometry)
{
stream << '(' << geometry.x << ',' << geometry.y <<
' ' << geometry.width << 'x' << geometry.height << ')';
re... | 1,762 |
1,444 | <filename>Mage.Sets/src/mage/cards/s/StormwildCapridor.java
package mage.cards.s;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.PreventionEffectData;
import mage.abilities.effects.PreventionEffectImpl;
import mage.abilities.keyword.F... | 1,168 |
1,200 | package com.xiaojukeji.carrera.cproxy.actions.http;
public class HttpParam {
public enum HttpParamType {
HEADER, QUERY, FORM
}
public HttpParamType type;
public String key;
public String value;
public HttpParam(HttpParamType type, String key, String value) {
this.type = type... | 199 |
898 | /****************************************************************************
Copyright (C) 2013 <NAME>. All rights reserved.
Copyright (c) 2015-2017 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated d... | 2,592 |
448 | //Selection Sort
//We seect a position and then find the element that fits that position.
//Starting with position 0, we look for the smallest number in remaining array that would fit the position
//And swap the it with the index position.
//Characterisitcs
//Since in each pass, only one swap is performed, total numbe... | 499 |
690 | <filename>artemis-core/artemis/src/test/java/com/artemis/link/EntityLinkManagerTest.java<gh_stars>100-1000
package com.artemis.link;
import com.artemis.*;
import com.artemis.annotations.EntityId;
import com.artemis.annotations.LinkPolicy;
import com.artemis.utils.Bag;
import com.artemis.utils.IntBag;
import org.junit.... | 5,289 |
1,444 |
package mage.cards.t;
import java.util.UUID;
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.target.common.TargetCreaturePermanent;
/**
*
* @author TheElk801
*/
public final class Trailbla... | 309 |
682 | /**CFile****************************************************************
FileName [acbAbc.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Hierarchical word-level netlist.]
Synopsis [Bridge.]
Author [<NAME>]
Affiliation [UC Berkeley]
Date [Ver. 1.0. St... | 5,244 |
14,668 | // 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 CHROME_BROWSER_VR_POSE_UTIL_H_
#define CHROME_BROWSER_VR_POSE_UTIL_H_
#include "chrome/browser/vr/vr_base_export.h"
#include "ui/gfx/geometry/vec... | 263 |
713 | <filename>algoexpert.io/python/Same_BSTs.py
def sameBsts(arrayOne, arrayTwo):
if len(arrayOne) != len(arrayTwo):
return False
if len(arrayOne) == 0 and len(arrayTwo) == 0:
return True
if arrayOne[0] != arrayTwo[0]:
return False
leftOne = getSmaller(arrayOne)
leftTwo = getS... | 367 |
357 | <reponame>wfu8/lightwave
/*
* Copyright © 2012-2016 VMware, Inc. 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,900 |
785 | <filename>app/src/main/java/com/ozj/baby/base/BasePresenter.java
package com.ozj.baby.base;
import android.support.annotation.NonNull;
/**
* Created by Administrator on 2016/3/25.
*/
public interface BasePresenter {
/**
* 注入View,使之能够与View相互响应
*
* @param view
*/
void attachView(@NonNull B... | 188 |
3,486 | package com.thinkaurelius.titan.blueprints;
import com.thinkaurelius.titan.graphdb.olap.computer.FulgoraGraphComputer;
import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.proce... | 440 |
441 | <reponame>iSLC/rbfx<gh_stars>100-1000
//
// Copyright (c) 2008-2020 the Urho3D project.
//
// 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... | 3,206 |
609 | <reponame>bytedance/CodeLocator<gh_stars>100-1000
package com.bytedance.tools.codelocator.utils;
import com.bytedance.tools.codelocator.model.WApplication;
public class CoordinateUtils {
public static final int TABLE_RIGHT_MARGIN = 5;
public static final int DEFAULT_BORDER = 10;
public static final int... | 951 |
2,279 | import static org.gradle.api.tasks.PathSensitivity.RELATIVE;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import org.gradle.api.DefaultTask;
im... | 1,886 |
911 | default_app_config = 'membership.apps.MembershipAppConfig'
| 18 |
5,168 | <gh_stars>1000+
/**
* \file dnn/test/cuda/indexing_multi_axis_vec.cpp
* MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
*
* Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License ... | 3,330 |
1,473 | <reponame>rd2281136306/pinpoint
/*
* Copyright 2017 NAVER Corp.
*
* 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... | 816 |
742 | <reponame>boldsort/plywood
/*------------------------------------
///\ Plywood C++ Framework
\\\/ https://plywood.arc80.com/
------------------------------------*/
#pragma once
#include <ply-runtime/Core.h>
#include <ply-runtime/container/Owned.h>
#include <ply-runtime/io/Pipe.h>
#include <ply-runtime/io/StdIO.h>... | 1,418 |
505 | <reponame>joouha/euporie
# -*- coding: utf-8 -*-
"""Defines the application menu."""
from __future__ import annotations
import logging
from typing import TYPE_CHECKING
from prompt_toolkit.application import get_app
from prompt_toolkit.formatted_text.base import to_formatted_text
from prompt_toolkit.formatted_text.uti... | 6,640 |
2,625 | <reponame>iamfork/pipelinedb
from base import pipeline, clean_db
import threading
def test_stream_buffer(pipeline, clean_db):
"""
Run CQs which take different times to process an event in the stream buffer
and each stream is read by a disjoint set of CQs.
"""
pipeline.create_stream('stream1', x='int', strin... | 640 |
348 | <reponame>chamberone/Leaflet.PixiOverlay<gh_stars>100-1000
{"nom":"Saint-Ours","circ":"1ère circonscription","dpt":"Savoie","inscrits":509,"abs":255,"votants":254,"blancs":8,"nuls":4,"exp":242,"res":[{"nuance":"REM","nom":"<NAME>","voix":136},{"nuance":"LR","nom":"<NAME>","voix":106}]} | 116 |
1,093 | <reponame>StandCN/spring-integration
/*
* Copyright 2014-2019 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 the License at
*
* https://www.apache.org/licenses/L... | 556 |
465 | # coding: utf-8
import flask
import flask_wtf
import wtforms
import auth
import config
import task
import util
from main import app
class FeedbackForm(flask_wtf.FlaskForm):
message = wtforms.TextAreaField(
'Message',
[wtforms.validators.required()], filters=[util.strip_filter],
)
email = wtforms.Stri... | 474 |
8,664 | //
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
/***
*strncpy_s.c - copy at most n characters of string
*
*
*Purpose:
* defines strncpy_s() - copy at most n characters of string
*
**************************... | 229 |
412 | <reponame>Emersonxuelinux/aliyun-odps-python-sdk
# -*- coding: utf-8 -*-
# Copyright 1999-2017 Alibaba Group Holding Ltd.
#
# 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... | 347 |
452 | <reponame>airminer/eviltrout-tis-100
#ifndef _OUTPUT_H
#define _OUTPUT_H
#include <ncurses.h>
#include "node.h"
#include "program.h"
void output_node(const Node *n, int x, int y);
void output_location(LocationType type, union Location loc);
void output_program(const Program *p);
#endif
| 110 |
1,019 | {
"title": {
"zh": "中文分类",
"en": "Category"
},
"demos": [
{
"filename": "basic.js",
"title": "基础饼图",
"screenshot": "https://gw.alipayobjects.com/mdn/rms_4f0ff1/afts/img/A*fZ11RIsy8zQAAAAAAAAAAABkARQnAQ"
},
{
"filename": "labelline-pie.js",
"title": "带标签",
"s... | 449 |
7,272 | package com.kunal.strings;
import java.util.ArrayList;
public class PhonePad {
public static void main(String[] args) {
System.out.println(padRet("", "12").size());
System.out.println(padCount("", "12"));
}
static void pad(String p, String up) {
if (up.isEmpty()) {
Sys... | 765 |
445 | <gh_stars>100-1000
/////////////////////////////////////////////////////////////////////////
// $Id: osdep.h,v 1.28 2008/02/05 22:57:40 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
//
// MandrakeSoft S.A.
// 43, rue d'Aboukir... | 2,142 |
365 | <filename>build_files/buildbot/worker_test.py<gh_stars>100-1000
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or ... | 423 |
1,828 | /*
* 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 ... | 5,379 |
315 | from nltk.tokenize import word_tokenize
def TokenizeText(text):
return word_tokenize(text.lower())
def ParseNgramsOpts(opts):
ngrams = [int(g) for g in opts.split(',')]
ngrams = [g for g in ngrams if (g > 1 and g < 7)]
return ngrams
def GenerateNgrams(words, ngrams):
nglist = []
for ng in ... | 205 |
503 | <gh_stars>100-1000
package com.smartisanos.sidebar.view;
import com.smartisanos.sidebar.R;
import android.content.Context;
import android.content.res.Configuration;
import android.util.AttributeSet;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widge... | 1,102 |
11,356 | <gh_stars>1000+
// Copyright <NAME> 2015.
// Use, modification and distribution are subject to 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)
#ifdef _MSC_VER
# pragma warning (disable : 4224)
#endif
#include <boost/math/speci... | 3,627 |
1,742 | <filename>src/sage/symbolic/ginac/numeric.cpp
/** @file numeric.cpp
*
* This file contains the interface to the underlying numerics packages.
* Its most important design principle is to completely hide the inner
* working of that other package from the user of GiNaC. It must either
* provide implementation o... | 104,693 |
634 | /*
* Copyright 2000-2014 JetBrains s.r.o.
*
* 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 agre... | 1,320 |
9,491 | <filename>hphp/runtime/vm/async-flow-stepper.h
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, ... | 958 |
333 | <filename>lib/filesystem/include/filesystem.hpp
#ifndef IRODS_FILESYSTEM_HPP
#define IRODS_FILESYSTEM_HPP
#include "filesystem/filesystem.hpp"
#include "filesystem/filesystem_error.hpp"
#include "filesystem/path.hpp"
#include "filesystem/collection_iterator.hpp"
#include "filesystem/recursive_collection_iterator.hpp"
... | 134 |
1,134 | """Decorators for integrating pandera into existing data pipelines."""
from inspect import ismethod
from typing import Callable
def _is_like_classmethod(fn: Callable) -> bool:
"""A regular method defined on a metaclass behaves the same way as
a method decorated with @classmethod defined on a regular cl... | 510 |
648 | <reponame>swrobel/fhir
{"resourceType":"DataElement","id":"List.mode","meta":{"lastUpdated":"2015-10-24T07:41:03.495+11:00"},"url":"http://hl7.org/fhir/DataElement/List.mode","status":"draft","experimental":true,"stringency":"fully-specified","element":[{"path":"List.mode","short":"working | snapshot | changes","defini... | 298 |
16,461 | <gh_stars>1000+
#import <ABI42_0_0React/ABI42_0_0RCTShadowView.h>
NS_ASSUME_NONNULL_BEGIN
@interface ABI42_0_0RNCSafeAreaShadowView : ABI42_0_0RCTShadowView
@end
NS_ASSUME_NONNULL_END
| 94 |
3,967 | // Copyright (c) 2020, NVIDIA CORPORATION. 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 ... | 3,680 |
26,932 | <filename>external/source/vncdll/winvnc/omnithread/nt.h<gh_stars>1000+
// Package : omnithread
// omnithread/nt.h Created : 6/95 tjr
//
// Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
//
// This file is part of the omnithread library
//
// The omnithread library is free softw... | 809 |
629 | <reponame>Robo0603179/astrobee
/* Copyright (c) 2017, United States Government, as represented by the
* Administrator of the National Aeronautics and Space Administration.
*
* All rights reserved.
*
* The Astrobee platform is licensed under the Apache License, Version 2.0
* (the "License"); you may not use this... | 1,020 |
1,056 | <filename>ide/hudson/src/org/netbeans/modules/hudson/api/HudsonVersion.java<gh_stars>1000+
/*
* 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 ... | 1,060 |
460 | // Copyright 2012 Google Inc. 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 ap... | 4,948 |
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... | 676 |
335 | {
"word": "Fury",
"definitions": [
"Wild or violent anger.",
"A surge of violent anger or other strong feeling.",
"Extreme strength or violence in an action or a natural phenomenon.",
"A spirit of punishment, often represented as one of three goddesses who pronounced curses on th... | 149 |
938 | <gh_stars>100-1000
package com.susion.rabbit.base.greendao;
import android.database.Cursor;
import android.database.sqlite.SQLiteStatement;
import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.Property;
import org.greenrobot.greendao.internal.DaoConfig;
import org.greenrobot.greendao.database.Da... | 3,316 |
389 | //
// VSDescriptionView.h
// Vesper
//
// Created by <NAME> on 4/27/14.
// Copyright (c) 2014 Q Branch LLC. All rights reserved.
//
@interface VSDescriptionView : UIView
- (instancetype)initWithText:(NSString *)text edgeInsets:(UIEdgeInsets)edgeInsets;
@property (nonatomic, readonly) UILabel *label;
- (void)u... | 135 |
1,350 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.desktopvirtualization.fluent;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
impor... | 3,188 |
421 |
//<Snippet1>
// Example of the TimeSpan( __int64 ) constructor.
using namespace System;
// Create a TimeSpan object and display its value.
void CreateTimeSpan( __int64 ticks )
{
TimeSpan elapsedTime = TimeSpan(ticks);
// Format the constructor for display.
String^ ctor = String::Format( "TimeS... | 787 |
2,322 | import cartography.intel.aws.securityhub
import tests.data.aws.securityhub
TEST_ACCOUNT_ID = '000000000000'
TEST_UPDATE_TAG = 123456789
def test_transform_and_load_hub(neo4j_session, *args):
"""
Ensure that expected hub gets loaded with its key fields.
"""
data = tests.data.aws.securityhub.GET_HUB
... | 515 |
372 | <reponame>MZehren/msaf
#!/usr/bin/env python
#
# Run me as follows:
# cd tests/
# nosetests
import jams
import librosa
from nose.tools import raises
import numpy as np
import os
import shutil
# Msaf imports
import msaf
from msaf.input_output import FileStruct
# Global vars
audio_file = os.path.join("fixtures", "chir... | 2,406 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.