max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
2,504 | <reponame>dujianxin/Windows-universal-samples<filename>Samples/FileThumbnails/cppwinrt/SampleConfiguration.cpp
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOU... | 1,539 |
14,668 | // 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 EXTENSIONS_COMMON_VERIFIER_FORMATS_H_
#define EXTENSIONS_COMMON_VERIFIER_FORMATS_H_
namespace crx_file {
enum class VerifierFormat;
}
namespace ... | 320 |
903 | <reponame>dyzmapl/BumpTop
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (<EMAIL>)
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT... | 994 |
1,018 | {
"articleName": "Better Brainstorming by Hand",
"articleParallaxHeaderImage": "ArticleParallaxHeaderImage.png",
"articleSubImage": "BlogDetail.png",
"articleAuthor": "<NAME>",
"articleDate": "Apr 16",
"articleReadingTime": "5 mins read",
"articleContent": "Organizing projects is now predominantly a digit... | 1,499 |
1,529 | <reponame>IgiArdiyanto/PINTO_model_zoo
import os
import sys
from glob import glob
from PIL import Image
import numpy as np
import time
def resize(all_file):
tmp = None
height, width = 256, 256
for i, f in enumerate(all_file):
img = Image.open(f)
img = img.resize(size=(height, width))
nparray = np.ar... | 388 |
1,831 | <filename>logdevice/server/thrift/SimpleThriftServer.cpp
/**
* Copyright (c) 2020-present, Facebook, Inc. and its affiliates.
* 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.
*/
#include "logdevice/server/th... | 519 |
318 | /*
Copyright 2017 <NAME>
<p>
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
<p>
http://www.apache.org/licenses/LICENSE-2.0
<p>
Unless required by applicable law or agreed to in wri... | 642 |
370 | package com.fastasyncworldedit.core.command.tool;
import com.sk89q.worldedit.entity.Player;
public interface MovableTool {
boolean move(Player player);
}
| 53 |
349 | package com.ray3k.skincomposer.dialog.scenecomposer.undoables;
import com.badlogic.gdx.utils.Array;
import com.ray3k.skincomposer.dialog.scenecomposer.DialogSceneComposer;
import com.ray3k.skincomposer.dialog.scenecomposer.DialogSceneComposerModel;
public class StackResetUndoable implements SceneComposerUndoable {
... | 695 |
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 Servi... | 924 |
349 | <reponame>zyjjfm/fanfouapp-opensource
/*******************************************************************************
* Copyright 2011, 2012, 2013 fanfou.com, Xiaoke, Zhang
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ... | 15,311 |
1,582 | <reponame>mubashshirjamal/code
# -*- coding: utf-8 -*-
from vilya.libs.validators import check_url, check_integer
from vilya.libs.store import store
class CodeDoubanHook(object):
def __init__(self, id, url, project_id):
self.url = url
self.project_id = project_id
self.id = int(id)
def... | 811 |
777 | #!/usr/bin/env python
"""
Artificial Intelligence for Humans
Volume 1: Fundamental Algorithms
Python Version
http://www.aifh.org
http://www.jeffheaton.com
Code repository:
https://github.com/jeffheaton/aifh
Copyright 2013 by <NAME>
Licensed under the Apache License, Version 2.0 (t... | 1,608 |
718 | dataset_type = 'UnconditionalImageDataset'
# To be noted that, `Resize` operation with `pillow` backend and
# `bicubic` interpolation is the must for correct IS evaluation
val_pipeline = [
dict(
type='LoadImageFromFile',
key='real_img',
io_backend='disk',
),
dict(
type='Resi... | 392 |
837 | <filename>src/ompl/geometric/planners/prm/src/PRM.cpp
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2011, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modif... | 12,283 |
3,034 | /*
* 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 n... | 568 |
668 | /**
* 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 m... | 520 |
1,521 | <reponame>LI-Mingyu/GraphScope-MY
/**
* Copyright 2020 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... | 2,674 |
1,144 | <reponame>dram/metasfresh
package de.metas.security.permissions;
import org.adempiere.model.tree.AdTreeId;
import de.metas.menu.AdMenuId;
import lombok.NonNull;
import lombok.Value;
/*
* #%L
* de.metas.adempiere.adempiere.base
* %%
* Copyright (C) 2017 metas GmbH
* %%
* This program is free software: you can r... | 687 |
348 | <gh_stars>100-1000
{"nom":"<NAME>","circ":"5ème circonscription","dpt":"Vendée","inscrits":486,"abs":272,"votants":214,"blancs":19,"nuls":5,"exp":190,"res":[{"nuance":"REM","nom":"<NAME>","voix":104},{"nuance":"SOC","nom":"<NAME>","voix":86}]} | 99 |
14,668 | <gh_stars>1000+
// Copyright 2018 The Crashpad 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
//
// Unl... | 840 |
435 | <reponame>amaajemyfren/data<filename>pygotham-2019/videos/the-magic-of-python.json
{
"copyright_text": "Creative Commons Attribution license (reuse allowed)",
"description": "Come to this talk to learn more about magic methods in Python. You might already be aware of some magic methods such as `__repr__` and `__len... | 381 |
376 | #pragma once
#include <Register/Utility.hpp>
namespace Kvasir {
//LCD Driver (LCD)
namespace LcdEn{ ///<Enable register
using Addr = Register::Address<0x4006e000,0xfffffffe,0x00000000,unsigned>;
///LCDE
constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::ReadWri... | 3,947 |
365 | <filename>extern/audaspace/include/fx/Pitch.h
/*******************************************************************************
* Copyright 2009-2016 <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 ... | 407 |
492 | <reponame>giorgosioak/raccoon4
/*
* Copyright 2015 <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | 300 |
788 | <filename>chop/webapp/src/main/java/org/apache/usergrid/chop/webapp/service/shiro/ShiroRealm.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. T... | 2,588 |
354 | /*-------------------------------------------------------------------------
* drawElements Quality Program Tester Core
* ----------------------------------------
*
* Copyright 2015 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in complian... | 6,521 |
732 | <reponame>eventuate-tram/eventuate-tram<filename>eventuate-tram-spring-reactive-integration-tests/src/test/java/io/eventuate/tram/reactive/integrationtests/events/TestEventThatInitiatesException.java
package io.eventuate.tram.reactive.integrationtests.events;
import io.eventuate.tram.events.common.DomainEvent;
public... | 217 |
310 | {
"name": "Paragraft (iOS)",
"description": "A note/word-processor app for iOS.",
"url": "https://itunes.apple.com/app/paragraft/id412998778"
} | 57 |
1,738 | <gh_stars>1000+
/*
* 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 ... | 1,819 |
423 | <reponame>ce-bu/WALinuxAgent
import os
import re
import shutil
import subprocess
import time
from datetime import datetime
from dcr.scenario_utils.common_utils import execute_with_retry, read_file, get_current_agent_name
__ROOT_CRON_LOG = "/var/tmp/reboot-cron-root.log"
__NON_ROOT_CRON_LOG = "/var/tmp/reboot-cron-non... | 4,975 |
4,283 | <filename>hazelcast/src/main/java/com/hazelcast/config/MapStoreConfig.java
/*
* Copyright (c) 2008-2021, Hazelcast, 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... | 4,891 |
5,813 | /*
* 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 ... | 808 |
2,288 | <gh_stars>1000+
/* Test previous issue: in duplex case, we wake reader reader wakes writer. */
#include <ccan/io/io.h>
/* Include the C files directly. */
#include <ccan/io/poll.c>
#include <ccan/io/io.c>
#include <ccan/tap/tap.h>
#include <sys/wait.h>
#include <stdio.h>
static struct io_plan *block_reading(struct io_... | 505 |
14,668 | <reponame>zealoussnow/chromium<gh_stars>1000+
// 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 CONTENT_APP_MAC_INIT_H_
#define CONTENT_APP_MAC_INIT_H_
namespace content {
// Perform any necessa... | 140 |
839 | <reponame>kimjand/cxf<gh_stars>100-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 Licens... | 1,620 |
445 | //===-- SBQueue.h -----------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | 579 |
1,816 | from tests import TestCase
from src.masonite.foundation import Application
import os
class TestAppApplication(TestCase):
def test_initialize_application(self):
app = Application(os.getcwd())
self.assertTrue(app)
| 77 |
2,322 | <filename>dlls/nsi/nsi.c
/*
* Network Store Interface
*
* Copyright 2021 <NAME>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your ... | 4,729 |
1,997 | """Schema tests."""
| 7 |
839 | /**
* 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 m... | 775 |
407 | <reponame>choleece/nacos
/*
* Copyright 1999-2018 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.apache.org/licenses/LICENSE-2.0
*
* U... | 2,440 |
1,545 | <reponame>pkumar-singh/bookkeeper<filename>stream/storage/impl/src/main/java/org/apache/bookkeeper/stream/storage/impl/routing/RoutingHeaderProxyInterceptor.java
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work... | 5,195 |
12,004 | <reponame>pcen/pulumi<gh_stars>1000+
# Copyright 2016-2021, Pulumi Corporation. All rights reserved.
import pulumi
from typing import Mapping, Optional, Sequence
CAMEL_TO_SNAKE_CASE_TABLE = {
"anotherValue": "another_value",
"listOfNestedValues": "list_of_nested_values",
"nestedValue": "nested_value",
... | 10,325 |
340 | <gh_stars>100-1000
//==================================================================================================
/*
EVE - Expressive Vector Engine
Copyright : EVE Contributors & Maintainers
SPDX-License-Identifier: MIT
*/
//===================================================================================... | 1,193 |
326 | <filename>src/backend/utils/cache/relmapper.c
/*-------------------------------------------------------------------------
*
* relmapper.c
* Catalog-to-filenode mapping
*
* For most tables, the physical file underlying the table is specified by
* pg_class.relfilenode. However, that obviously won't work for pg_c... | 9,081 |
3,494 | // The copyright in this software is being made available under the BSD License, included below.
// This software may be subject to other third party and contributor rights, including patent rights,
// and no such rights are granted under this license.
//
// Copyright (c) 2013, Microsoft Open Technologies, Inc.
// ... | 2,015 |
831 | <reponame>phpc0de/idea-android<filename>whats-new-assistant/src/com/android/tools/idea/whatsnew/assistant/actions/WhatsNewDismissAction.java
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance wi... | 484 |
4,879 | package com.mapswithme.maps.maplayer.guides;
public interface OnGuidesGalleryChangedListener
{
void onGuidesGalleryChanged(boolean reloadGallery);
}
| 44 |
528 | <gh_stars>100-1000
{
'service_metadata': {
'service_name': 'iris',
'service_version': '0.1',
},
'dataset_loader_train': {
'!': 'palladium.dataset.CSV',
'path': 'iris.data',
'names': [
'sepal length',
'sepal width',
'petal length',
... | 957 |
386 | #ifndef _FrameworkServer_H_
#define _FrameworkServer_H_
#include <iostream>
#include "servant/Application.h"
using namespace tars;
extern vector<map<tars::StatMicMsgHead, tars::StatMicMsgBody>> _clientStatData;
extern vector<map<tars::StatMicMsgHead, tars::StatMicMsgBody>> _serverStatData;
class Framewo... | 431 |
766 | from unittest import mock
import pytest
from lightautoml.ml_algo.boost_lgbm import BoostLGBM
from lightautoml.ml_algo.tuning.base import Distribution
from lightautoml.ml_algo.tuning.base import SearchSpace
from lightautoml.ml_algo.tuning.optuna import OptunaTuner
# from lightautoml.dataset.np_pd_dataset import Pand... | 1,298 |
3,294 | // <snippet4>
// This program lists all the members of the
// System.IO.BufferedStream class.
using namespace System;
using namespace System::IO;
using namespace System::Reflection;
public ref class ListMembers
{
public:
static void Main()
{
// Specifies the class.
Type^ t = System::IO::Buffere... | 1,149 |
1,198 | /*
Copyright 2017-2019 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 applicable law or agreed t... | 1,673 |
777 | <gh_stars>100-1000
// 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.
#ifndef GPU_COMMAND_BUFFER_CLIENT_SHARED_MEMORY_LIMITS_H_
#define GPU_COMMAND_BUFFER_CLIENT_SHARED_MEMORY_LIMITS_H_
#include <stddef.h... | 409 |
348 | <reponame>chamberone/Leaflet.PixiOverlay
{"nom":"Bourguignon-lès-Morey","dpt":"Haute-Saône","inscrits":50,"abs":12,"votants":38,"blancs":1,"nuls":2,"exp":35,"res":[{"panneau":"1","voix":19},{"panneau":"2","voix":16}]} | 99 |
30,023 | <filename>homeassistant/components/tado/strings.json
{
"config": {
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
},
"step": {
"user": {
"data": {
"password": "[%key:common::config_flow::data::password%]",
"username"... | 501 |
7,150 |
#include "stdio.h"
typedef char * Key;
typedef int Value;
typedef unsigned int Hash;
typedef struct Entry
{
struct Entry *next;
Hash hash; // key 对应的hash值
Key key;
Value value;
}Entry;
// 拉链法实现,也就是链表的数组.也是 数组和链表优势的结合
typedef struct HashTable{
Entry **head;
unsigned int size;
unsigned int usage;
}Ha... | 645 |
364 | package com.jslsolucoes.nginx.admin.agent.resource;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.container.AsyncResponse;
import javax.ws.rs.container.Suspended;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;... | 598 |
72,551 | <gh_stars>1000+
#include <stdint.h>
typedef uint8_t bool;
#define CREATE_ARRAY(T, N) \
struct { \
T data[N]; \
uint64_t size... | 497 |
879 | package org.zstack.tag;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Created by MaJin on 2020/9/3.
*/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Sensitiv... | 121 |
768 | <reponame>Mu-L/mbassador
package net.engio.mbassy.messages;
/**
*
* @author bennidi
* Date: 5/24/13
*/
public class CountableMessage extends AbstractMessage implements ICountable{
}
| 72 |
7,604 | /*
---------------------------------------------------------------------------
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2021, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
w... | 9,229 |
470 | <gh_stars>100-1000
#!/usr/bin/python
import curses
from . import wgwidget as widget
from . import wgtitlefield as titlefield
class Slider(widget.Widget):
DEFAULT_BLOCK_COLOR = None
def __init__(self, screen, value=0,
out_of=100, step=1, lowest=0,
label=True,
... | 3,107 |
319 | <reponame>Kobting/ModTheSpire
package com.evacipated.cardcrawl.modthespire;
import com.google.gson.*;
import com.vdurmont.semver4j.Semver;
import com.vdurmont.semver4j.SemverException;
import javax.swing.*;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.In... | 1,474 |
1,405 | <filename>sample3/recompiled_java/sources/android/support/v4/print/PrintHelperApi24.java
package android.support.v4.print;
import android.content.Context;
class PrintHelperApi24 extends PrintHelperApi23 {
PrintHelperApi24(Context context) {
super(context);
this.mIsMinMarginsHandlingCorrect = true;... | 142 |
727 | <filename>Frameworks/XADMaster.framework/Versions/A/PrivateHeaders/XAD7ZipAESHandle.h<gh_stars>100-1000
#import "CSBlockStreamHandle.h"
#import "aes.h"
@interface XAD7ZipAESHandle:CSBlockStreamHandle
{
CSHandle *parent;
off_t startoffs;
aes_decrypt_ctx aes;
uint8_t iv[16],block[16],buffer[65536];
}
+(int)logRou... | 276 |
1,796 | <filename>ViewPager/app/src/main/java/github/nisrulz/viewpager/MyFragmentPagerAdapter.java
package github.nisrulz.viewpager;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
/**
* @author <NAME>
*/
public class MyFragmentPagerAd... | 426 |
474 | <filename>GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiTexture.java
/*
---------------------------------------------------------------------------
Open Asset Import Library - Java Binding (jassimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2012, assi... | 1,137 |
3,282 | // Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.preferences.datareduction;
import org.chromium.base.metrics.RecordHistogram;
/**
* Centralizes UMA data collection ... | 1,329 |
2,919 | <filename>tests/test-skiplist.c<gh_stars>1000+
/* Copyright (C) 2016 Hewlett Packard Enterprise Development LP
* 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
*
... | 2,539 |
10,225 | <reponame>PieterjanDeconinck/quarkus
package io.quarkus.deployment.builditem;
import java.util.function.Supplier;
import io.quarkus.builder.item.SimpleBuildItem;
import io.quarkus.deployment.recording.BytecodeRecorderImpl;
import io.quarkus.runtime.StartupContext;
/**
* A build item that represents the raw command ... | 396 |
19,438 | <filename>Userland/Libraries/LibGL/GLMap.cpp
/*
* Copyright (c) 2021, <NAME> <<EMAIL>>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "GL/gl.h"
#include "GLContext.h"
extern GL::GLContext* g_gl_context;
void glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, GLdouble const* points... | 1,345 |
1,467 | {
"version": "2.14.2",
"date": "2020-08-19",
"entries": [
{
"type": "feature",
"category": "AWS Lake Formation",
"description": "Adding additional field in ListPermissions API response to return RAM resource share ARN if a resource were shared through AWS RAM serv... | 711 |
1,781 |
/*
* (C) 2010-2011 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 applicable... | 833 |
477 | <gh_stars>100-1000
#include "grouping.hpp"
#include "grouping.cuh"
#include "../utils.hpp"
at::Tensor grouping_forward(at::Tensor features, at::Tensor indices) {
CHECK_CUDA(features);
CHECK_CUDA(indices);
CHECK_CONTIGUOUS(features);
CHECK_CONTIGUOUS(indices);
CHECK_IS_FLOAT(features);
CHECK_IS_INT(indices... | 604 |
301 | # -*- coding: utf-8 -*-
# vim: sw=4:ts=4:expandtab
"""
pygogo.utils
~~~~~~~~~~~~
Misc classes and functions that don't warrant their own module
Examples:
basic usage::
>>> CustomEncoder().encode(range(5))
'[0, 1, 2, 3, 4]'
"""
import logging
import sys
from json import JSONEncoder
module_hdl... | 3,674 |
348 | <filename>docs/data/leg-t2/026/02602251.json
{"nom":"Portes-en-Valdaine","circ":"2ème circonscription","dpt":"Drôme","inscrits":324,"abs":145,"votants":179,"blancs":25,"nuls":6,"exp":148,"res":[{"nuance":"REM","nom":"Mme <NAME>","voix":107},{"nuance":"FN","nom":"<NAME>","voix":41}]} | 117 |
1,583 | <filename>src/bitmessageqt/__init__.py<gh_stars>1000+
"""
PyQt based UI for bitmessage, the main module
"""
import hashlib
import locale
import os
import random
import string
import subprocess
import sys
import textwrap
import threading
import time
from datetime import datetime, timedelta
from sqlite3 import register_... | 85,872 |
1,383 | <filename>src/chrono_models/vehicle/citybus/CityBus_RackPinion.cpp
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All rights reserved.
//
// Use of this source code is governed by a BSD-style lic... | 503 |
1,026 | <gh_stars>1000+
from hivemind.averaging.averager import DecentralizedAverager
from hivemind.averaging.training import TrainingAverager
| 40 |
1,408 | /*
* Copyright (c) 2019-2020, Broadcom
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef SPI_FLASH_H
#define SPI_FLASH_H
#include <sf.h>
int spi_flash_probe(struct spi_flash *flash);
int spi_flash_erase(struct spi_flash *flash, uint32_t offset, uint32_t len);
int spi_flash_write(struct spi_flash *flash, uint3... | 205 |
30,023 | <reponame>MrDelik/core
"""Constants for the Moon integration."""
from typing import Final
from homeassistant.const import Platform
DOMAIN: Final = "moon"
PLATFORMS: Final = [Platform.SENSOR]
DEFAULT_NAME: Final = "Moon"
| 73 |
578 | <gh_stars>100-1000
/*
* Copyright (C) 2016 Red Hat, 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 app... | 423 |
552 | #include "py-convenience.h"
int Py_AddClassToModule(PyObject *mod, PyTypeObject *classType)
{
if (PyType_Ready(classType) < 0) return -1;
Py_INCREF(classType);
return PyModule_AddObject(mod, classType->tp_name, (PyObject *)classType);
}
void PyErr_SetFormatString(PyObject *type, size_t size,
... | 537 |
393 | <reponame>The-audafoss-crew/audafoss<filename>src/toolbars/ToolsToolBar.cpp
/**********************************************************************
Audacium: A Digital Audio Editor
ToolsToolBar.cpp
<NAME>
<NAME>
<NAME>
See ToolsToolBar.h for details
*****************************************************... | 4,638 |
990 | '''
You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
Note: Given n will be a positive integer.
Example 1:
Input: 2
Output: 2
Explanation: There are two ways to climb to the top.
1. 1 step + 1... | 315 |
892 | <gh_stars>100-1000
{
"schema_version": "1.2.0",
"id": "GHSA-gf4r-j8r8-2g8j",
"modified": "2022-05-05T02:49:14Z",
"published": "2022-05-05T02:49:14Z",
"aliases": [
"CVE-2013-0532"
],
"details": "Cross-site request forgery (CSRF) vulnerability in IBM Security AppScan Enterprise 5.6 and 8.x before 8.7 an... | 515 |
435 | import pyflann
import numpy as np
from time import time
from multiprocessing import Pool
from functools import partial
"""
This is an implementation of https://arxiv.org/pdf/1604.00989.pdf.
original version can be found at https://github.com/varun-suresh/Clustering
"""
def build_index(dataset, n_neighbors):
""... | 3,089 |
335 | /* Copyright 2016 <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 applicable law or agreed to ... | 634 |
544 | //
// NSString+Ex.h
// LaiFeng
//
// Created by xinliu on 14-5-16.
// Copyright (c) 2014年 live Interactive. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSString(LFURLStringAdditions)
- (NSString*) lf_urlEncode2:(NSStringEncoding)stringEncoding;
+ (BOOL)lf_stringIsNull:(NSString *)string... | 187 |
918 | <gh_stars>100-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 "... | 688 |
1,338 | <reponame>Kirishikesan/haiku
/*-
* Copyright (c) 2016 <NAME> <<EMAIL>>
* All rights reserved.
*
* 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
... | 3,656 |
310 | <reponame>dreeves/usesthis<gh_stars>100-1000
{
"name": "44-2 58mm f2",
"description": "A camera lens.",
"url": "http://vintage-camera-lenses.com/helios-44-2-58mm-f2/"
}
| 80 |
4,551 | package org.robolectric.shadows;
import android.os.Build;
import android.os.Build.VERSION_CODES;
import android.util.EventLog;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Implementation;
import org.robolect... | 1,659 |
1,109 | /*******************************************************************************
* Copyright 2016 Intuit
* <p>
* 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
* <p>
* http://www.apache.o... | 1,238 |
852 | <gh_stars>100-1000
# AlCaReco for track based alignment using isolated muon tracks - relaxed cuts for PbPb collisions
import FWCore.ParameterSet.Config as cms
from Alignment.CommonAlignmentProducer.ALCARECOTkAlMuonIsolated_cff import *
ALCARECOTkAlMuonIsolatedHIHLT = ALCARECOTkAlMuonIsolatedHLT.clone(
eventSetupP... | 664 |
16,259 | <gh_stars>1000+
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
TODO (huxu): fairseq wrapper class for all dataset you defined: mostly MMDataset.
"""
from collections import OrderedDict
... | 774 |
2,360 | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RGgplotify(RPackage):
"""Convert Plot to 'grob' or 'ggplot' Object
Convert plot funct... | 526 |
743 | package pl.allegro.tech.hermes.tracker.mongo.management;
import com.mongodb.BasicDBObject;
import com.mongodb.DB;
import com.mongodb.DBCursor;
import com.mongodb.DBObject;
import pl.allegro.tech.hermes.api.MessageTrace;
import pl.allegro.tech.hermes.api.PublishedMessageTrace;
import pl.allegro.tech.hermes.api.Publishe... | 1,816 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.