max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
1,338 | <reponame>Kirishikesan/haiku
/*
* Copyright 2008-2010, <NAME>, <EMAIL>.
* Copyright 2011, <NAME>, <EMAIL>.
* Copyright 2014 Haiku, Inc. All rights reserved.
*
* Distributed under the terms of the MIT License.
*
* Authors:
* <NAME>, <EMAIL>
* <NAME>, <EMAIL>
* <NAME>, <EMAIL>
*/
#ifndef VOLUME_H
#define VO... | 1,701 |
3,428 | /**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 605 |
396 | package com.mapbox.api.directionsrefresh.v1;
import com.google.gson.TypeAdapterFactory;
import com.ryanharter.auto.value.gson.GsonTypeAdapterFactory;
/**
* Required so that AutoValue can generate specific type adapters when needed inside the direction
* packages.
*/
@GsonTypeAdapterFactory
public abstract class Di... | 169 |
1,538 | <reponame>attilabukor/kudu
// 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 ... | 2,787 |
348 | {"nom":"<NAME>","circ":"5ème circonscription","dpt":"Sarthe","inscrits":1584,"abs":804,"votants":780,"blancs":31,"nuls":6,"exp":743,"res":[{"nuance":"REM","nom":"M. <NAME>","voix":227},{"nuance":"LR","nom":"<NAME>","voix":183},{"nuance":"FN","nom":"M. <NAME>","voix":128},{"nuance":"FI","nom":"M. <NAME>","voix":85},{"nu... | 297 |
8,772 | package org.apereo.cas.config;
import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.ticket.BaseTicketCatalogConfigurer;
import org.apereo.cas.ticket.DefaultSecurityTokenTicket;
import org.apereo.cas.ticket.SecurityTokenTicket;
import org.apereo.cas.ticket.TicketCatalog;
import lombok.... | 514 |
591 | <reponame>zhiqiang-hu/apollo-DuerOS
/******************************************************************************
* Copyright 2017 The Baidu 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.
* ... | 1,699 |
3,940 | <reponame>tonyping/Open-Shell-Menu
// Classic Shell (c) 2009-2017, <NAME>
// Open-Shell (c) 2017-2018, The Open-Shell Team
// Confidential information of Ivo Beltchev. Not for disclosure or distribution without prior written consent from the author
// Accessibility.cpp - contains the accessibility class CMenuAccessibl... | 4,106 |
1,483 | <filename>lealone-common/src/main/java/org/lealone/server/protocol/dt/DTransactionPreparedUpdateAck.java
/*
* Copyright Lealone Database Group.
* Licensed under the Server Side Public License, v 1.
* Initial Developer: zhh
*/
package org.lealone.server.protocol.dt;
import java.io.IOException;
import org.lealone.n... | 455 |
30,023 | <filename>homeassistant/components/broadlink/config_flow.py
"""Config flow for Broadlink devices."""
import errno
from functools import partial
import logging
import socket
import broadlink as blk
from broadlink.exceptions import (
AuthenticationError,
BroadlinkException,
NetworkTimeoutError,
)
import volu... | 5,382 |
1,418 | // http://oeis.org/A056971
#include "uint.h"
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <unordered_map>
UnsignedInt combination(int N, int M)
{
// printf("Choose N=%d M=%d\n", N, M);
assert(0 <= M && M <= N);
if (M > N/2)
M = N - M;
UnsignedInt result(1);
for... | 566 |
2,151 | <reponame>rhencke/engine
//
// Copyright 2016 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// DXTSRGBCompressedTextureTestData.inl
// Data for sRGB DXT texture tests (DXTSRGBCompressedTextureTest.cpp)
//
sta... | 6,918 |
709 | <reponame>lazear/mlton
/* Copyright (C) 2019 <NAME>.
* Copyright (C) 1999-2008 <NAME>, <NAME>, Suresh
* Jagannathan, and <NAME>.
* Copyright (C) 1997-2000 NEC Research Institute.
*
* MLton is released under a HPND-style license.
* See the file MLton-LICENSE for details.
*/
void GC_share (GC_state s, pointer ... | 504 |
559 | <filename>gaps/progress_bar.py<gh_stars>100-1000
# -*- coding: utf-8 -*-
import sys
def print_progress(iteration, total, prefix="", suffix="", decimals=1, bar_length=50):
""" Call in a loop to create terminal progress bar"""
str_format = "{0:." + str(decimals) + "f}"
percents = str_format.format(100 * (i... | 280 |
14,668 | <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.
import os
import sys
_HEADERS = """ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ... | 5,591 |
839 | <filename>tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/WSDLToService.java
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licen... | 1,998 |
636 | <gh_stars>100-1000
aa_dict = {
'A' : 'ala',
'C' : 'cys',
'D' : 'asp',
'E' : 'glu',
'F' : 'phe',
'G' : 'gly',
'H' : 'his',
'I' : 'ile',
'K' : 'lys',
'L' : 'leu',
'M' : 'met',
'N' : 'asn',
'P' : 'pro',
'Q' : 'gln',
'R' : 'arg',
'S' : 'ser',
'T' : 'thr',
'V' : 'val... | 443 |
3,897 | <gh_stars>1000+
/*
* Copyright (c) 2013-2017, Pelion and affiliates.
* 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
*
* http://www.apache.or... | 399 |
6,224 | <reponame>Trifunik/zephyr
/*
* Copyright (c) 2021 IP-Logix Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT atmel_sam_mdio
#include <errno.h>
#include <device.h>
#include <init.h>
#include <soc.h>
#include <drivers/mdio.h>
#include <logging/log.h>
LOG_MODULE_REGISTER(mdio_sam, CONFIG_MDIO_LO... | 1,748 |
474 | package org.javacord.core.event.connection;
import org.javacord.api.DiscordApi;
import org.javacord.api.event.connection.LostConnectionEvent;
import org.javacord.core.event.EventImpl;
/**
* The implementation of {@link LostConnectionEvent}.
*/
public class LostConnectionEventImpl extends EventImpl implements LostCo... | 183 |
1,694 | <reponame>CrackerCat/iWeChat<filename>header6.6.1/KSNewAudioPlayerManager.h
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by <NAME>.
//
#import <objc/NSObject.h>
@class KSAudioPlayer, LZFileCacheManag... | 688 |
619 | <gh_stars>100-1000
/*
* Author: <NAME> <<EMAIL>>
* Copyright (c) 2015 Intel Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the The MIT License which is available at
* https://opensource.org/licenses/MIT.
*
* SPDX-License-Identifier: MIT
*/
//NOT TESTED!!!
... | 575 |
1,162 | package io.digdag.server;
import com.google.inject.Inject;
import org.weakref.jmx.Managed;
import io.digdag.core.ErrorReporter;
import java.util.concurrent.atomic.AtomicInteger;
public class JmxErrorReporter
implements ErrorReporter
{
private final AtomicInteger uncaughtErrorCount = new AtomicInteger(0);
... | 225 |
456 | <reponame>pafri/DJV
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2020 <NAME>
// All rights reserved.
#pragma once
#include <djvUI/Widget.h>
class Media;
class DrawerWidget : public djv::UI::Widget
{
DJV_NON_COPYABLE(DrawerWidget);
protected:
void _init(
const std::shared_ptr<Media>&,
... | 307 |
1,668 | package org.elixir_lang.code_insight.lookup.element_renderer;
import com.intellij.codeInsight.lookup.LookupElement;
import com.intellij.codeInsight.lookup.LookupElementPresentation;
import com.intellij.psi.PsiElement;
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase;
import org.elixir... | 922 |
848 | /*
* Copyright 2019 Xilinx 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 ... | 684 |
436 | package org.qiyi.basecore.taskmanager.threadpool;
import android.os.Handler;
import org.qiyi.basecore.taskmanager.TM;
import org.qiyi.basecore.taskmanager.TaskWrapper;
import org.qiyi.basecore.taskmanager.other.TMLog;
public class PendingTaskQueue implements ITaskQueue {
private TaskBlockingQueue rejectedQueue =... | 729 |
6,969 | <gh_stars>1000+
#include<iostream>
using namespace std;
const int R=4, C=4;
void printSpiral(int mat[R][C], int R, int C)
{
int top=0, left=0, bottom=R-1, right=C-1;
while(top <= bottom && left <= right)
{
for(int i=left; i<=right; i++)
cout<<mat[top][i]<<" ";
cout<<endl;
... | 654 |
739 | <filename>pyjswidgets/pyjamas/dnd/DragEvent.ie6.py
class DragEvent:
def setTarget(self, target=None):
if target is not None:
self.srcElement = target
#self.target = target
else:
self.srcElement = DOM.eventGetTarget(self.evt)
#self.target = target | 149 |
3,710 |
#include "tw/stringtable.h"
// #include "tw/message.h"
//#include "tfilepath.h"
#include "tfilepath_io.h"
#include "tenv.h"
//#include "texception.h"
#include "tsystem.h"
#include "tstream.h"
#include "tconvert.h"
namespace {
//-------------------------------------------------------------------
class TStringTableI... | 2,894 |
1,553 | from plex.interfaces.core.base import Interface
class PluginInterface(Interface):
path = ':/plugins'
def reload_services(self, plugin_id):
response = self.http.get(plugin_id, 'services/reload')
return response.status_code == 200
def restart(self, plugin_id):
response = self.http.... | 141 |
3,200 | <gh_stars>1000+
# Copyright 2021 Huawei Technologies Co., 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
#
# Unless required by applicable ... | 12,033 |
451 | <gh_stars>100-1000
#include "include/MMVII_all.h"
#include "include/MMVII_2Include_Serial_Tpl.h"
#include "LearnDM.h"
//#include "include/MMVII_Tpl_Images.h"
namespace MMVII
{
cPyr1ImLearnMatch::cPyr1ImLearnMatch
(
const cBox2di & aBox,
const cBox2di & aBoxOut,
const std::string & a... | 1,466 |
1,909 | package org.knowm.xchange.bitso.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Collection;
import java.util.Map;
import si.mazi.rescu.HttpStatusExceptionSupport;
public class BitsoException extends HttpStatusExceptionSupport {
private Map<String, Collection<String>> errors;
public B... | 518 |
1,041 | package org.tests.rawsql;
import io.ebean.annotation.Sql;
import javax.persistence.Entity;
@Entity
@Sql
public class A2Customer {
private long custId;
private String customerName;
public long getCustId() {
return custId;
}
public void setCustId(long custId) {
this.custId = custId;
}
public... | 166 |
699 | [{"name":"gson-support","description":null,"location":"gson-support/index.html","searchKeys":["gson-support"]},{"name":"com.chibatching.kotpref.gsonpref","description":null,"location":"gson-support/com.chibatching.kotpref.gsonpref/index.html","searchKeys":["com.chibatching.kotpref.gsonpref"]},{"name":"gson","descriptio... | 362 |
577 | <gh_stars>100-1000
/*-------------------------------------------------------------------------
*
* pglogical_fe.h
* pglogical replication plugin
*
* Copyright (c) 2015, PostgreSQL Global Development Group
*
* IDENTIFICATION
* pglogical_fe.h
*
*----------------------------------------... | 214 |
317 | //
// This file is distributed under the MIT License. See LICENSE for details.
//
#ifndef UTILS_INITIALIZEPASSES_H
#define UTILS_INITIALIZEPASSES_H
#include "llvm/InitializePasses.h"
namespace llvm {
void initializeDevirtualizePass(PassRegistry &Registry);
} // end namespace llvm
#endif // UTILS_INITIALIZEPASSES_H
| 114 |
14,668 | <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.
#include "components/safe_browsing/core/browser/db/allowlist_checker_client.h"
#include <memory>
#include "base/bind.h"
namespace safe_... | 1,541 |
3,055 | /*
Fontname: -B&H-LucidaBright-DemiBold-I-Normal--20-140-100-100-P-119-ISO10646-1
Copyright: Copyright Bigelow & Holmes 1986, 1985.
Glyphs: 95/723
BBX Build Mode: 0
*/
const uint8_t u8g2_font_lubBI14_tr[2369] U8G2_FONT_SECTION("u8g2_font_lubBI14_tr") =
"_\0\4\3\5\5\4\5\6\26\24\377\374\17\374\17\374\2\316\6<\... | 3,778 |
348 | <reponame>chamberone/Leaflet.PixiOverlay
{"nom":"Montselgues","circ":"3ème circonscription","dpt":"Ardèche","inscrits":85,"abs":35,"votants":50,"blancs":13,"nuls":4,"exp":33,"res":[{"nuance":"REM","nom":"<NAME>","voix":21},{"nuance":"LR","nom":"<NAME>","voix":12}]} | 110 |
861 | <gh_stars>100-1000
package cn.springcloud.gray.communication.http;
import cn.springcloud.gray.http.HttpParams;
import cn.springcloud.gray.http.HttpRequest;
import cn.springcloud.gray.http.HttpResult;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpEntity;
import org.springframework.htt... | 1,430 |
2,706 | /* Copyright (c) 2013-2015 <NAME>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "imagemagick-gif-encoder.h"
#include <mgba/internal/gba/gba.h>
#incl... | 1,259 |
404 | // Copyright (c) 2013-2019 K Team. All Rights Reserved.
package org.kframework.backend.java.kil;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.Multimap;
import org.apache.commons.lang3.tuple.Pair;
import org.kframework.attributes.Att;
import org.kframework.backend.java.symbolic.T... | 4,196 |
2,175 | /*
* Copyright (c) 2018-present, iQIYI, Inc. 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 notice,
* this list o... | 1,023 |
325 |
#pragma once
#include <string>
#include "jet/live/IEvent.hpp"
namespace jet
{
class FileChangedEvent : public IEvent
{
public:
FileChangedEvent(const std::string& filepath)
: IEvent(EventType::kFileChanged)
, m_filepath(filepath)
{
}
const std::stri... | 215 |
898 |
#include "editor-support/cocostudio/WidgetReader/NodeReaderDefine.h"
| 26 |
368 | /*
Plugin-SDK (Grand Theft Auto San Andreas) header file
Authors: GTA Community. See more here
https://github.com/DK22Pac/plugin-sdk
Do not delete this comment block. Respect others' work!
*/
#include "PluginBase.h"
namespace plugin {
CTOR_META_BEGIN(CAnimBlendAssociation)
static int address;
... | 19,691 |
5,169 | <reponame>Gantios/Specs
{
"name": "OpenMultitouchSupport",
"version": "1.0",
"summary": "This enables you easily to observe global multitouch events on the trackpad. [macOS] [MultitouchSupport.framework]",
"description": "This enables you easily to observe global multitouch events on the trackpad (Built-In only... | 424 |
23,901 | # 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/LICENSE-2.0
#
# Unless required by applicab... | 18,882 |
335 | {
"word": "Rotation",
"definitions": [
"The action of rotating about an axis or centre.",
"The conceptual operation of turning a system about an axis.",
"The passing of a privilege or responsibility to each member of a group in a regularly recurring order.",
"The growing of diffe... | 189 |
3,287 | # --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incor... | 862 |
749 | import numpy as np
import roboticstoolbox as rtb
from spatialmath.base import *
from spatialmath import SE3, Twist3
puma = rtb.models.DH.Puma560()
# print(puma)
# #puma.plot(puma.qz)
# q = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6]
# T = puma.fkine(q)
# q = puma.ikine(T)[0]
# print(q)
# # q = puma.ikine_sym(T)
# puma.maniplty(q... | 803 |
315 | <reponame>pxeger/C-Macro-Collections
/**
* Copyright (c) 2019 <NAME>
*
* This file is part of the C Macro Collections Libray.
*
* 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 ... | 649 |
4,695 | {
"operation_chart_host_os_chart": "按操作系统类型统计",
"operation_chart_host_biz_chart": "按业务统计",
"operation_chart_host_cloud_chart": "按云区域统计",
"operation_chart_host_change_biz_chart": "主机数量变化趋势",
"operation_chart_model_inst_chart": "实例数量统计",
"operation_chart_model_inst_change_chart": "实例变更统计",
"": ""
} | 204 |
775 | # Copyright (C) 2021 Intel 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 374 |
38,047 | <reponame>Mu-L/jemalloc<filename>include/jemalloc/internal/ckh.h
#ifndef JEMALLOC_INTERNAL_CKH_H
#define JEMALLOC_INTERNAL_CKH_H
#include "jemalloc/internal/tsd.h"
/* Cuckoo hashing implementation. Skip to the end for the interface. */
/******************************************************************************/... | 1,153 |
505 | <reponame>Manny27nyc/BitcoinArmory<gh_stars>100-1000
////////////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 2016, goatpig. //
// Distributed under th... | 9,149 |
655 | #include "embeddedr.h"
/* Helper variable to store R's status
*/
const unsigned int const RPY_R_INITIALIZED = 0x01;
const unsigned int const RPY_R_BUSY = 0x02;
/* Initial status is 0 */
static unsigned int embeddedR_status = 0;
/* An environment to keep R objects preserved by rpy2 */
static SEXP RPY_R_PreciousEnv = ... | 5,122 |
18,636 | import os
from .base import DataView
class Source(DataView):
"""Information on a "simple" Python package index.
This could be PyPI, or a self-hosted index server, etc. The server
specified by the `url` attribute is expected to provide the "simple"
package API.
"""
__SCHEMA__ = {
"nam... | 428 |
1,085 | <gh_stars>1000+
"""
Migration script to change the 'value' column of 'user_preference' table from varchar to text.
"""
import logging
from sqlalchemy import MetaData, Table, Text
log = logging.getLogger(__name__)
metadata = MetaData()
def upgrade(migrate_engine):
metadata.bind = migrate_engine
print(__doc_... | 198 |
852 | <reponame>Purva-Chaudhari/cmssw
#ifndef CRackTrajectoryBuilder_h
#define CRackTrajectoryBuilder_h
//
// Package: RecoTracker/SingleTrackPattern
// Class: CRackTrajectoryBuilder
// Original Author: <NAME>-INFN perugia
#include <string>
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#includ... | 3,690 |
2,863 | # Copyright 2018 The dm_control 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 applicable law or agreed to i... | 3,924 |
7,482 | <gh_stars>1000+
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2015-04-29 ArdaFu first version
*/
#ifndef __HW_TIMER0_H__
#define __HW_TIMER0_H__
//////////////////////////////////////////////////... | 176 |
1,070 | /*
* Copyright (c) 2014 <NAME> <<EMAIL>>
* Copyright (c) 2014 <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
*
*... | 891 |
652 | <filename>src/version.h
#pragma once
#define REDISAI_VERSION_MAJOR 99
#define REDISAI_VERSION_MINOR 99
#define REDISAI_VERSION_PATCH 99
#define REDISAI_MODULE_VERSION \
(REDISAI_VERSION_MAJOR * 10000 + REDISAI_VERSION_MINOR * 100 + REDISAI_VERSIO... | 206 |
592 | /*
* Copyright 2016 LinkedIn 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 ... | 599 |
775 | <filename>run_pe/src/pe_hdrs_helper.cpp
#include "pe_hdrs_helper.h"
IMAGE_NT_HEADERS32* get_nt_hrds32(BYTE *pe_buffer)
{
if (pe_buffer == NULL) return NULL;
IMAGE_DOS_HEADER *idh = (IMAGE_DOS_HEADER*)pe_buffer;
if (idh->e_magic != IMAGE_DOS_SIGNATURE) {
return NULL;
}
const LONG kMaxOffset... | 434 |
2,329 | package invokevirtual;
public class ZZ extends YY {
}
| 18 |
1,253 | /**
* Created by aubdira on 10/30/17.
* BogoSort is an ineffective sorting algorithm. The algorithm
* generates permutations of its input until it finds one that is sorted.
*/
public class BogoSort {
public static void main(String[] args) {
//Enter array to be sorted here
int[] arr = {12, 43, 5... | 693 |
622 | <reponame>Sam-Gao-Xin/Courses-
# -*- coding: utf-8 -*-
"""
@author: salimt
"""
def is_palindrome_v1(s):
""" (str) -> bool
Return True if and only if s is a palindrome.
>>> is_palindrome_v1('noon')
True
>>> is_palindrome_v1('racecar')
True
>>> is_palindrome_v1('dented... | 755 |
5,079 | print "*** test_pak imported"
state = []
def setup():
# print "SETUP CALLED", state, id(state)
state.append('test_pak.setup')
def teardown():
# print "TEARDOWN CALLED", state, id(state)
state.append('test_pak.teardown')
| 92 |
892 | {
"schema_version": "1.2.0",
"id": "GHSA-535g-qhh4-m728",
"modified": "2022-05-13T01:11:13Z",
"published": "2022-05-13T01:11:13Z",
"aliases": [
"CVE-2019-6504"
],
"details": "Insufficient output sanitization in the Automic Web Interface (AWI), in CA Automic Workload Automation 12.0 to 12.2, allow atta... | 862 |
3,200 | <gh_stars>1000+
/**
* Copyright 2019 Huawei Technologies Co., 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
*
* Unless required b... | 2,716 |
14,668 | <reponame>zealoussnow/chromium
// 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 "media/base/supported_types.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "t... | 5,532 |
1,644 | <gh_stars>1000+
// Copyright 2019 The Nomulus 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
//
// Unle... | 944 |
852 | import FWCore.ParameterSet.Config as cms
from Configuration.EventContent.EventContent_cff import *
from JetMETAnalysis.METSkims.sumET_EventContent_cff import *
FEVTSIMSumETEventContent = cms.PSet(
outputCommands = cms.untracked.vstring()
)
FEVTSIMSumETEventContent.outputCommands.extend(FEVTSIMEventContent.outputCo... | 137 |
716 | /*
* 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
*
*/
/* clang-format off */
/* srand3f.c - Implements LIB3F srand subprogram. */
#include <stdlib.h>
#include ... | 263 |
850 | <filename>centaur/src/main/resources/standardTestCases/standard_output_paths_colliding_prevented/options.json
{
"final_workflow_outputs_dir": "/tmp/outputs/standard_output_paths_colliding_prevented",
"use_relative_output_paths": false,
"read_from_cache": false
}
| 96 |
619 | /*
* Author: <NAME> <<EMAIL>>
* Author: <NAME> (@deadprogram)
* Author: <NAME> (@JustInDevelopment)
* Copyright (c) 2016 Intel Corporation.
*
* This program and the accompanying materials are made available under the
* terms of the The MIT License which is available at
* https://opensource.org/licenses/MIT.
*
... | 4,460 |
402 | <reponame>urosporo/flow
/*
* Copyright 2000-2021 <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 applica... | 3,799 |
769 | <filename>include/circt/Support/FieldRef.h
//===- FieldRef.h - Field References ---------------------------*- 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-ex... | 971 |
5,659 | from django.core.management.base import CommandError
from cms.utils.check import FileOutputWrapper, check
from .base import SubcommandsCommand
class CheckInstallation(SubcommandsCommand):
help_string = 'Checks your settings and environment'
command_name = 'check'
def handle(self, *args, **options):
... | 137 |
596 | /*
* Yet Another UserAgent Analyzer
* Copyright (C) 2013-2021 <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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... | 374 |
428 | /*
** 2011 April 5
**
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.
*/
package info.ata... | 614 |
852 | import FWCore.ParameterSet.Config as cms
# This modifier is for activating displacedGeneralStep step for phase1 tracking
displacedTracking = cms.Modifier()
| 42 |
303 | <reponame>mr-c/LightZone<filename>lightcrafts/src/com/lightcrafts/ui/region/curves/Linear.java<gh_stars>100-1000
/* Copyright (C) 2005-2011 <NAME> */
package com.lightcrafts.ui.region.curves;
import java.awt.*;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
class Linear extends Polynomial {
private ... | 647 |
1,056 | <reponame>timfel/netbeans
/*
* 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.... | 2,178 |
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... | 3,689 |
1,403 | <reponame>Valkatraz/scons
class Empty {
}
interface Listener {
public void execute();
}
public
class
Test {
class Inner {
void go() {
use(new Listener() {
public void execute() {
System.out.println("In Inner");
}
});
}
String s1 = "class A";
String s2 = "new L... | 390 |
509 | <reponame>NEUQ-League/wechat_sender
# coding: utf-8
from __future__ import unicode_literals
from __future__ import absolute_import
import copy
import functools
import json
import os
import time
import datetime
import psutil
import logging
import sys
import tornado.web
from wechat_sender.objects import WxBot, Message... | 6,501 |
769 | <gh_stars>100-1000
# Copyright The PyTorch Lightning 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... | 3,523 |
1,210 | <filename>snippets/vector/sample.cpp
// Follow the Style Guide while submitting code PR.
// Style Guide => https://github.com/Bhupesh-V/30-Seconds-Of-STL/blob/master/CONTRIBUTING.md/#Style Guide
/*
Author : this must be your name ;)
Date : Date format dd/mm/yyyy
Time : Time format hh:mm
Description : de... | 123 |
623 | <reponame>RADarkflow/zap-extensions<filename>addOns/pscanrulesAlpha/src/main/java/org/zaproxy/zap/extension/pscanrulesAlpha/PermissionsPolicyScanRule.java
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright 2019 The ZAP Devel... | 2,138 |
4,054 | <filename>document/src/vespa/document/select/parsing_failed_exception.h
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/vespalib/util/exception.h>
namespace document::select {
VESPA_DEFINE_EXCEPTION(ParsingFailedException, vespalib... | 113 |
5,169 | {
"name": "ZGPicturePickerManager",
"version": "3.0.0",
"summary": "从相册选择图片,包含图片裁剪功能",
"description": "select photo with clip function",
"homepage": "https://github.com/MR-Zong/ZGPicturePickerManager",
"license": {
"type": "MIT",
"file": "FILE_LICENSE"
},
"authors": {
"ZongGenXu": "<EMAIL>"
... | 304 |
1,248 | #
# This file is part of pretix (Community Edition).
#
# Copyright (C) 2014-2020 <NAME> and contributors
# Copyright (C) 2020-2021 rami.io GmbH and contributors
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
# Public License as published by the Free... | 577 |
5,166 | <reponame>iconara/aws-doc-sdk-examples
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Stub functions that are used by the Amazon EMR unit tests.
When tests are run against an actual AWS account, the stubber class does not
set up stubs and passes all call... | 2,595 |
2,550 | <reponame>erkekin/tuist<filename>projects/tuist/fixtures/ios_app_with_sdk/Modules/StaticFramework/Sources/MyObjcppClass.h
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface MyObjcppClass : NSObject
- (void)hello;
@end
NS_ASSUME_NONNULL_END
| 105 |
5,169 | <filename>Specs/2/d/b/AssetImportKit/1.0.8/AssetImportKit.podspec.json
{
"name": "AssetImportKit",
"version": "1.0.8",
"summary": "Swifty cross platform library (macOS, iOS) that converts Assimp supported models to SceneKit scenes.",
"description": "AssetImportKit allows you to import Assimp supported file form... | 1,102 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.