max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
1,442 | <filename>apps/graph/graph/root_graph_controller.h
#ifndef GRAPH_ROOT_GRAPH_CONTROLLER_H
#define GRAPH_ROOT_GRAPH_CONTROLLER_H
#include "calculation_graph_controller.h"
namespace Graph {
class RootGraphController : public CalculationGraphController {
public:
RootGraphController(Escher::Responder * parentResponder,... | 273 |
4,262 | /*
* 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 ... | 17,221 |
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 ... | 1,627 |
1,338 | <filename>src/bin/debug/profile/Thread.h
/*
* Copyright 2008-2010, <NAME>, <EMAIL>.
* Distributed under the terms of the MIT License.
*/
#ifndef THREAD_H
#define THREAD_H
#include <String.h>
#include <util/DoublyLinkedList.h>
#include "ProfiledEntity.h"
#include "ProfileResult.h"
class Image;
class Team;
cla... | 1,065 |
1,109 | package org.cboard.dto;
import org.springframework.security.core.GrantedAuthority;
import java.util.Collection;
/**
* Created by yfyuan on 2016/9/29.
*/
public class User extends org.springframework.security.core.userdetails.User {
private String userId;
private String company;
private String departme... | 474 |
4,054 | // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.application.container.docprocs;
import com.google.common.util.concurrent.ListenableFuture;
import com.yahoo.docproc.DocumentProcessor;
import com.yahoo.docproc.Processing;
import com.yahoo.documen... | 803 |
5,317 | package ysoserial.test.payloads;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.Serializable;
import java.util.Random;
import java.util.concurrent.Callable;
import fi.iki.elonen.NanoHTTPD;
import fi.iki.elonen.NanoHTTPD.Response.Status;
import javassist.ClassClassPath;
import javassi... | 1,501 |
335 | /*
* FileDialog.cpp
* --------------
* Purpose: File and folder selection dialogs implementation.
* Notes : (currently none)
* Authors: <NAME>
* The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
*/
#include "stdafx.h"
#include "FileDialog.h"
#include "Mainfrm.h"
#includ... | 2,551 |
6,989 | <filename>venv/lib/python3.9/site-packages/configparser.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Convenience module importing everything from backports.configparser."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicod... | 570 |
784 | <gh_stars>100-1000
package jforgame.server.net.mina;
import java.net.InetSocketAddress;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import jforgame.server.ServerScanPaths;
import jforgame.server.net.MessageDispatcher;
import jforgame.server.net.mina.filter.FloodFilter;
import jforgame... | 1,104 |
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 "ui/ozone/platform/wayland/wayland_connection.h"
#include <xdg-shell-unstable-v5-client-protocol.h>
#include <xdg-shell-unstable-v6-client-proto... | 5,370 |
1,127 | # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import unittest
import numpy as np
from generator import generator, generate
from openvino.tools.mo.ops.MatMul import MatMul
from openvino.tools.mo.front.common.partial_infer.utils import int64_array, shape_array, dynamic_dimension_val... | 2,047 |
2,151 | <reponame>rhencke/engine<filename>src/third_party/swiftshader/src/D3D8/Capabilities.cpp<gh_stars>1000+
// Copyright 2016 The SwiftShader 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 obta... | 4,120 |
1,379 | <reponame>yongzhuo/nlp_xiaojiang<filename>ChatBot/chatbot_search/chatbot_tfserving/indexAnnoy.py
# !/usr/bin/python
# -*- coding: utf-8 -*-
# @time : 2021/4/18 21:04
# @author : Mo
# @function: annoy search
from annoy import AnnoyIndex
import numpy as np
import os
class AnnoySearch:
def __init__(self, dim=7... | 1,215 |
862 | <reponame>Regan-Koopmans/atlasdb
/*
* (c) Copyright 2020 Palantir Technologies 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/l... | 1,914 |
1,062 | /**
* Copyright 2014 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 requir... | 680 |
3,172 | # Copyright (c) 2020 PaddlePaddle 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 app... | 380 |
648 | {"resourceType":"DataElement","id":"CodeSystem.valueSet","meta":{"lastUpdated":"2017-04-19T07:44:43.294+10:00"},"url":"http://hl7.org/fhir/DataElement/CodeSystem.valueSet","status":"draft","experimental":true,"stringency":"fully-specified","element":[{"id":"CodeSystem.valueSet","path":"CodeSystem.valueSet","short":"Can... | 167 |
5,133 | <reponame>Saljack/mapstruct<filename>processor/src/test/resources/fixtures/org/mapstruct/ap/test/collection/adder/SourceTargetMapperStrategyDefaultImpl.java
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.map... | 468 |
1,585 | <reponame>j-xiong/ompi
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The Un... | 2,445 |
382 | # coding: utf-8
"""
joplin-web
"""
from django.conf import settings
from django.urls import reverse
from joplin_api import JoplinApiSync
import logging
from rich import console
console = console.Console()
logger = logging.getLogger("joplin_web.app")
joplin = JoplinApiSync(token=settings.JOPLIN_WEBCLIPPER_TOKEN)
... | 1,119 |
348 | <gh_stars>100-1000
{"nom":"Miribel","circ":"2ème circonscription","dpt":"Ain","inscrits":6793,"abs":4069,"votants":2724,"blancs":168,"nuls":49,"exp":2507,"res":[{"nuance":"MDM","nom":"<NAME>","voix":1340},{"nuance":"LR","nom":"<NAME>","voix":1167}]} | 103 |
343 | <filename>magnet/utils/__init__.py
from ._node import summarize | 19 |
335 | <reponame>duruyi/rb<filename>rb/testing.py
import os
import time
import uuid
import shutil
import socket
import tempfile
from contextlib import contextmanager
from subprocess import Popen, PIPE
from rb.cluster import Cluster
from rb.utils import itervalues
devnull = open(os.devnull, "r+")
class Server(object):
... | 2,149 |
416 | <gh_stars>100-1000
package org.springframework.roo.classpath.layers;
/**
* Convenience class for addon developers wishing to implement their own
* {@link LayerProvider}.
*
* @author <NAME>
* @author <NAME>
* @since 1.2.0
*/
public abstract class LayerAdapter implements LayerProvider {
@Override
public boo... | 242 |
352 | import sys
import re
from ._common import exec_in_terminal
PLATFORM = sys.platform
def available_cpus():
"""
Detects the number of logical CPUs subscriptable by this process.
On Linux, this checks /proc/self/status for limits set by
taskset, on other platforms taskset do not exist so simply uses
... | 1,510 |
1,025 | <gh_stars>1000+
//==================================================================================
// Copyright (c) 2016 , Advanced Micro Devices, Inc. All rights reserved.
//
/// \author AMD Developer Tools Team
/// \file gsOpenGLMonitor.cpp
///
//====================================================================... | 29,097 |
1,338 | // NodeInfo.h
#ifndef NET_FS_NODE_INFO_H
#define NET_FS_NODE_INFO_H
#include <sys/stat.h>
#include "Request.h"
#include "ServerNodeID.h"
struct NodeInfo : public RequestMember {
virtual void ShowAround(RequestMemberVisitor* visitor);
inline NodeID GetID() const;
struct stat st;
int64 revision;
};
// G... | 183 |
3,084 | #ifndef __INC_SMBIOS_H
#define __INC_SMBIOS_H
#if (SMBIOS_SUPPORT == 1)
#define SMBIOSBUFSize 0x1000
typedef enum _SMBIOS_TYPE{
SMBIOS_BIOS_INFORMATION = 0,
SMBIOS_SYSTEM_INFORMATION = 1,
SMBIOS_BASE_BOARD_INFORMATION = 2,
SMBIOS_SYSTEM_ENCLOSURE_OR_CHASSIS = 3,
SMBIOS_PROCESSOR_INFORMATIO... | 1,716 |
1,350 | <gh_stars>1000+
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.eventhubs.generated;
import com.azure.core.util.Context;
/** Samples for PrivateEndpointConnections List. */
pu... | 365 |
585 | /*
* 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 ... | 703 |
2,206 | /*
* ******************************************************************************
* *
* *
* * This program and the accompanying materials are made available under the
* * terms of the Apache License, Version 2.0 which is available at
* * https://www.apache.org/licenses/LICENSE-2.0.
* *
* * See the NO... | 814 |
1,655 | #include "JsonLoadException.hpp"
#include <tinyformat/tinyformat.hpp>
namespace Tungsten {
JsonLoadException::JsonLoadException(const Path &path)
: _description(tfm::format("Unable to load file '%s'", path.fileName())),
_what(_description)
{
}
JsonLoadException::JsonLoadException(const std::string &description, c... | 164 |
1,947 | #include "gurka.h"
#include "test.h"
#include <gtest/gtest.h>
using namespace valhalla;
/*************************************************************/
TEST(Standalone, avoid_service) {
// Test to make sure bicycle routes do not use highway:service to cut
// corners near intersections
const std::string ascii_m... | 2,948 |
14,668 | <gh_stars>1000+
// 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 CHROME_BROWSER_ENTERPRISE_REPORTING_PREFS_H_
#define CHROME_BROWSER_ENTERPRISE_REPORTING_PREFS_H_
class PrefRegistrySimple;
name... | 235 |
3,704 | package cn.stylefeng.guns.config;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Configuration;
/**
* 配置mapper包扫描
*
* @author fengshuonan
* @date 2020/12/13 16:11
*/
@Configuration
@MapperScan(basePackages = {"cn.stylefeng.**.mapper"})
public class MapperScanConfig... | 128 |
2,211 | // Copyright (c) 2014 Intel Corporation. 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.xwalk.test.util;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
publ... | 357 |
1,969 | <reponame>alexhagen/abseil-py
# Copyright 2018 The Abseil 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 a... | 951 |
493 | /* ========================= eCAL LICENSE =================================
*
* Copyright (C) 2016 - 2020 Continental Corporation
*
* 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
*
* ... | 1,229 |
3,372 | <filename>aws-java-sdk-route53/src/main/java/com/amazonaws/services/route53/model/ResourceRecordSet.java
/*
* Copyright 2016-2021 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 Li... | 116,803 |
868 | from .racecar import Racecar | 7 |
1,086 | #pragma once
#include <string>
namespace Documentation {
class CppReference {
public:
static std::string get_url(const std::string &symbol) noexcept;
};
}
| 57 |
421 | <reponame>YaronWong/AndroidLocalizePlugin
package com.airsaid.localization.utils;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
/**
* @author airsaid
*/
class TextUtilTest {
@Test
void isEmptyOrSpacesLineBreak() {
assertTrue(TextUtil.isEmptyOrSpacesLineBreak(null));
... | 520 |
416 | package org.simpleflatmapper.map.setter;
import org.simpleflatmapper.converter.Context;
public interface FloatContextualSetter<T> {
void setFloat(T target, float value, Context context) throws Exception;
}
| 70 |
777 | // 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 "components/metrics/metrics_reporting_default_state.h"
#include "components/metrics/metrics_pref_names.h"
#include "components/prefs/pref_regist... | 407 |
346 | #ifndef MAINMENUSCREEN_H
#define MAINMENUSCREEN_H
#include "ScreenIDs.h"
void InitMainMenu(void);
void ClearMainMenu(void);
ScreenID MainMenuScreenHandle(void);
#endif
| 66 |
344 | <gh_stars>100-1000
package com.clickhouse.client.stream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.EOFException;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UncheckedIOException;
import java... | 17,122 |
938 | package slimeknights.tconstruct.common.registration;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.Block;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.util.IStringSerializable;
import net.minecraftforge.fml.RegistryObject;
import slimeknights.mantle.r... | 1,193 |
1,029 | package net.anumbrella.lkshop.model;
import net.anumbrella.lkshop.http.RetrofitHttp;
import net.anumbrella.lkshop.model.bean.CommentOrderDataModel;
import net.anumbrella.lkshop.model.bean.OrderDataModel;
import net.anumbrella.lkshop.utils.BaseUtils;
import java.util.List;
import okhttp3.OkHttpClient;
import okhttp3.... | 627 |
575 | // 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 COMPONENTS_ACCOUNT_MANAGER_CORE_ACCOUNT_MANAGER_UTIL_H_
#define COMPONENTS_ACCOUNT_MANAGER_CORE_ACCOUNT_MANAGER_UTIL_H_
#include "base/optional.h... | 912 |
1,217 | #pragma once
#include <limits>
#include "aabb.hpp"
#include "portable.hpp"
namespace My {
ENUM(GeometryType){kBox, kCapsule, kCone, kCylinder,
kPlane, kPolyhydron, kSphere, kTriangle};
class Geometry {
public:
explicit Geometry(GeometryType geometry_type)
: m_kGeometryType(ge... | 648 |
745 | <filename>social_core/backends/mailru.py
"""
Mail.ru OAuth2 backend, docs at:
https://python-social-auth.readthedocs.io/en/latest/backends/mailru.html
"""
from hashlib import md5
from urllib.parse import unquote
from .oauth import BaseOAuth2
class MailruOAuth2(BaseOAuth2):
"""Mail.ru authentication backend""... | 1,280 |
649 | <gh_stars>100-1000
import asyncio
import json
from concurrent.futures import ProcessPoolExecutor
import trafaret as t
import yaml
from .consts import PROJ_ROOT
from .exceptions import JsonValidaitonError
from .worker import warm
def load_config(fname):
with open(fname, 'rt') as f:
data = yaml.load(f)
... | 684 |
389 | <reponame>andyyangdong/vester
//
// VSImagePickerController.h
// Vesper
//
// Created by <NAME> on 4/17/13.
// Copyright (c) 2013 Q Branch LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
/*Get a picture from the user and return it in a callback. The image will be resized down from the original ima... | 251 |
1,050 | #include <filter.hpp>
#include <vector>
#include <iostream>
bool greater_than_four(int i) {
return i > 4;
}
class LessThanValue {
private:
int compare_val;
public:
LessThanValue() = delete;
LessThanValue(int v) : compare_val(v) { }
bool operator() (int i) {
r... | 645 |
347 | package org.ovirt.engine.core.common.businessentities.gluster;
import java.io.Serializable;
import java.util.Objects;
import org.ovirt.engine.core.compat.Guid;
public class GlusterServerHook implements Serializable {
private static final long serialVersionUID = -8502820314459844040L;
private Guid hookId;
... | 1,177 |
1,105 | // Copyright Contributors to the Open Shading Language project.
// SPDX-License-Identifier: BSD-3-Clause
// https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
#ifndef __OSL_XMACRO_OPNAME
# error must define __OSL_XMACRO_OPNAME to name of unary operation before including this header
#endif
#ifndef __O... | 857 |
358 | # Copyright (c) 2012-2021, <NAME> <<EMAIL>>
# All rights reserved.
#
# See LICENSE file for full license.
from .aws import Action as BaseAction
from .aws import BaseARN
service_name = "Amazon Lookout for Equipment"
prefix = "lookoutequipment"
class Action(BaseAction):
def __init__(self, action: str = None) -> N... | 535 |
602 | <filename>persistence-api/src/main/java/io/stargate/db/datastore/ArrayListBackedRow.java
package io.stargate.db.datastore;
import static java.lang.String.format;
import com.datastax.oss.driver.api.core.ProtocolVersion;
import com.datastax.oss.driver.api.core.type.DataType;
import com.datastax.oss.driver.api.core.type... | 874 |
496 | #include <cstdio>
#include <cstring>
#include <vector>
#include <map>
using namespace std;
#define IPS_ADDRESS_EXTERN 0x01
#define IPS_ADDRESS_GLOBAL 0x02
/*
* TODO: Change this program to create RLE expressions.
* It now can _read_ them, but..
*/
namespace
{
vector<unsigned char> ROM;
vector<bool> Touche... | 3,523 |
1,909 | package org.knowm.xchange.idex;
import static java.lang.Integer.max;
import static java.lang.Integer.min;
import static java.util.Arrays.asList;
import static org.web3j.crypto.Hash.sha3;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.math.BigInteger;
import java.util.LinkedList;
import ... | 1,285 |
634 | <filename>modules/desktop-awt/desktop-ui-impl/src/main/java/consulo/ui/desktop/internal/image/DesktopImage.java
package consulo.ui.desktop.internal.image;
import consulo.ui.image.Image;
import javax.annotation.Nonnull;
import java.util.function.Function;
/**
* @author VISTALL
* @since 2020-10-05
*/
public interfa... | 227 |
1,930 | <filename>RichEditorViewSample/Pods/Target Support Files/RichEditorView/RichEditorView-umbrella.h<gh_stars>1000+
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#import "CJW... | 167 |
543 | <reponame>anastasiard/riiablo<filename>excel/annotation-processor/src/main/java/com/riiablo/excel/SerializedWithAnnotatedElement.java
package com.riiablo.excel;
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.MirroredTypeException;
import com.riiabl... | 443 |
350 | <reponame>zqn1996-alan/talkback
/*
* Copyright (C) 2017 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
... | 907 |
2,482 | <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 licenses this file to You under the Apache License, Version 2.0
* (the "Lic... | 1,509 |
1,317 | #
# Copyright defined in LICENSE.txt
#
import os
import sys
import lmdb
import struct
import varint
def delete_file(filepath):
if os.path.exists(filepath):
os.remove(filepath)
def convert_db(filename1):
if not os.path.exists(filename1):
print 'the file does not exist'
quit()
fi... | 2,279 |
428 | <gh_stars>100-1000
package loon.live2d;
import loon.BaseIO;
import loon.geom.Vector2f;
import loon.live2d.draw.*;
import loon.live2d.framework.L2DModelMatrix;
import loon.live2d.graphics.*;
import loon.live2d.id.*;
import loon.live2d.io.*;
import loon.live2d.model.*;
import loon.opengl.GLEx;
import loon.utils.ArrayByt... | 3,915 |
575 | // 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.
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_APP_HISTORY_APP_HISTORY_NAVIGATE_EVENT_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_APP_HISTORY_APP_HISTORY_NAVIGATE... | 1,077 |
5,169 | {
"name": "LFBPageController",
"version": "1.0.0",
"summary": "一款仿网易标题滚动切换页面的框架",
"description": "简单易容的标题滚动切换页面框架,通过点击标题或者滑动页面,切换页面和标题...",
"homepage": "https://github.com/LiuFuBo1991/LFBPageController",
"license": "MIT",
"authors": {
"liufubo": "<EMAIL>"
},
"social_media_url": "http://www.jianshu... | 377 |
852 | <reponame>ckamtsikis/cmssw
#include "CalibFormats/SiPixelObjects/interface/PixelFEDTestDAC.h"
#include "CalibFormats/SiPixelObjects/interface/PixelTimeFormatter.h"
#include <cstring>
#include <cassert>
#include <map>
#include <sstream>
using namespace std;
using namespace pos;
PixelFEDTestDAC::PixelFEDTestDAC(std::v... | 7,654 |
884 | /*
* Copyright 2014 - 2021 Blazebit.
*
* 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,019 |
1,761 | # Sensor Sleep Mode Example.
# This example demonstrates the sensor sleep mode. The sleep mode saves around
# 40mA when enabled and it's automatically cleared when calling sensor reset().
import sensor, image, time
sensor.reset() # Reset and initialize the sensor.
sensor.set_pixformat(sensor.GRAY... | 204 |
6,215 | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
import json
from abc import ABC
from datetime import datetime
from typing import Any, Dict, Iterable, List, Mapping, MutableMapping, Optional, Tuple
import pendulum
import requests
from airbyte_cdk import AirbyteLogger
from airbyte_cdk.models import Airbyt... | 9,640 |
3,084 | /*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
fail_library1.c
Abstract:
Template library that can be used together with a driver for testing the
seamless build feature of SDV via defect injection. This library is not
functional and not intended as a samp... | 808 |
532 | /*******************************************************************************
MODELUTILS.C
Author: <NAME>
Date: 03-JAN-91
Copyright (c) 1992-5 MusculoGraphics, Inc.
All rights reserved.
Portions of this source code are copyrighted by MusculoGraphics, Inc.
Description:
Routines:
d... | 6,677 |
3,269 | <filename>compiler/IREmitter/Payload/tools/postprocess_payload.cc
#include <iostream>
#include <llvm/Bitcode/BitcodeWriter.h>
#include <llvm/IR/DebugInfo.h>
#include <llvm/IR/Module.h>
#include <llvm/IR/Verifier.h>
#include <llvm/IRReader/IRReader.h>
#include <llvm/Support/FileSystem.h>
#include <llvm/Support/SourceMg... | 2,108 |
3,882 | """Tests for slices."""
from pytype.tests import test_base
class SliceTest(test_base.BaseTest):
"""Tests for the SLICE_<n> opcodes, as well as for __getitem__(slice)."""
def test_getslice(self):
ty = self.Infer("""
x = [1,2,3]
a = x[:]
b = x[1:]
c = x[1:2]
d = x[1:2:3]
e ... | 540 |
3,083 | <reponame>utumen/binnavi
// Copyright 2011-2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applic... | 1,187 |
819 | /*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#ifndef FATAL_... | 14,250 |
965 | // CBrush::CBrush.
CBrush brush1; // Must initialize!
brush1.CreateSolidBrush(RGB(0, 0, 255)); // Blue brush.
CRect rc;
GetClientRect(&rc);
ScreenToClient(&rc);
// Save original brush.
CBrush *pOrigBrush = (CBrush *)pDC->SelectObject(&brush1);
// Paint upper left corner with blue brush.
pDC... | 599 |
973 | /*_##########################################################################
_##
_## Copyright (C) 2016 Pcap4J.org
_##
_##########################################################################
*/
package org.pcap4j.packet.namednumber;
import java.util.HashMap;
import java.util.Map;
/**
* Type and subty... | 3,810 |
3,508 | <reponame>Anshul1507/Leetcode
package com.fishercoder;
import com.fishercoder.solutions._1;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertArrayEquals;
public class _1Test {
private static _1.Solution1 solution1;
private static int[] nums;
@BeforeClass
publ... | 226 |
307 | /*
* Copyright 2017 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 to in... | 1,141 |
3,799 | <filename>slice/slice-view/src/main/java/androidx/slice/widget/SliceContent.java
/*
* Copyright 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
*
*... | 4,023 |
575 | <reponame>Ron423c/chromium<filename>chrome/updater/external_constants.cc
// 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.
#include "chrome/updater/external_constants.h"
#include "chrome/updater/constant... | 556 |
1,936 | #ifndef MAPLAB_COMMON_HISTOGRAMS_INL_H_
#define MAPLAB_COMMON_HISTOGRAMS_INL_H_
#include <algorithm>
#include <vector>
#include <glog/logging.h>
namespace common {
namespace histograms {
template <typename InputScalar>
Eigen::MatrixXd histogram2d(
const Eigen::Matrix<InputScalar, 2, Eigen::Dynamic>& points,
... | 1,749 |
348 | <reponame>chamberone/Leaflet.PixiOverlay<filename>docs/data/leg-t1/059/05915054.json
{"nom":"Bavinchove","circ":"15ème circonscription","dpt":"Nord","inscrits":745,"abs":361,"votants":384,"blancs":8,"nuls":3,"exp":373,"res":[{"nuance":"REM","nom":"Mme <NAME>","voix":119},{"nuance":"FN","nom":"<NAME>","voix":85},{"nuanc... | 271 |
1,604 | <gh_stars>1000+
# SPDX-License-Identifier: MIT
import struct
from enum import IntEnum
from m1n1.proxyutils import RegMonitor
from m1n1.utils import *
from m1n1.trace.dart import DARTTracer
from m1n1.trace.asc import ASCTracer, EP, EPState, msg, msg_log, DIR
from m1n1.fw.smc import *
ASCTracer = ASCTracer._reloadcls... | 1,516 |
3,921 | <reponame>sherlockhouse/luaandroid<filename>Android/LuaViewSDK/src/com/taobao/luaview/userdata/constants/UDFontWeight.java
/*
* Created by LuaView.
* Copyright (c) 2017, Alibaba Group. All rights reserved.
*
* This source code is licensed under the MIT.
* For the full copyright and license information,please view ... | 672 |
14,668 | // Copyright 2018 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.chromecast.base;
/**
* Represents a type with only one possible instance.
*
* Retrieved by calling the static unit() function.
*... | 184 |
679 | <reponame>Grosskopf/openoffice<filename>main/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx
/**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this wo... | 1,221 |
2,085 | <filename>exercises/fr/solution_03_06.py
import spacy
# Définis le composant personnalisé
def length_component(doc):
# Obtiens la longueur du doc
doc_length = len(doc)
print(f"Ce document comporte {doc_length} tokens.")
# Retourne le doc
return doc
# Charge le petit modèle français
nlp = spacy.lo... | 210 |
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... | 1,910 |
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.
#include "ash/system/phonehub/animated_loading_card.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/paint_recorder.h"
#include "ui/gfx/color_u... | 422 |
402 | package com.vaadin.flow;
import org.hamcrest.Description;
import org.hamcrest.TypeSafeMatcher;
import org.junit.Assert;
import org.junit.Test;
import org.openqa.selenium.By;
import com.vaadin.flow.testutil.ChromeBrowserTest;
import static org.hamcrest.Matchers.isEmptyString;
import static org.hamcrest.Matchers.isOne... | 1,222 |
5,169 | {
"name": "ICLocationFramework",
"version": "3.0",
"summary": "Description of ICLocationFramework for cocoapods.",
"description": "This component helps you to get location via calling only a single function and get it in callback.",
"homepage": "https://github.com/kritikamiddha/ICLocationFrameworkRepo",
"li... | 265 |
598 | """
Command line program for filtering line-based Eliot logs.
"""
from __future__ import unicode_literals, absolute_import
if __name__ == "__main__":
import eliot.filter
eliot.filter.main()
import sys
from datetime import datetime, timedelta
from json import JSONEncoder
from ._bytesjson import dumps, loads... | 1,345 |
1,473 | /*
* Copyright 2020 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 by applicable law or agreed to in w... | 1,515 |
647 | <reponame>gilbertguoze/trick<filename>trick_source/data_products/Log/darwin_dl.c
/*
* This file is a wrapper for the dlopen, dlclose, dlsym and dlerror
* routines for Darwin
*/
#ifdef __APPLE__
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "darwin_dl.h"
char dyn_buf[1024];
char noerror[] =... | 690 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.