max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
436 | <reponame>zhaoning999/jivejdon
package com.jdon.jivejdon.presentation.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apach... | 502 |
764 | <gh_stars>100-1000
{"symbol": "DBY","address": "0x7c82a76DB0166b0e153A66B1A4c331970B2b0EE2","overview":{"en": ""},"email": "<EMAIL>","website": "https://thedobuy.com/","state": "NORMAL","links": {"blog": "","twitter": "","telegram": "","github": ""}} | 104 |
1,687 | import java.util.Arrays;
public class Solution4 {
public int maxProfit(int k, int[] prices) {
int len = prices.length;
if (len < 2 || k == 0) {
return 0;
}
if (k >= len / 2) {
return greedy(prices, len);
}
// k 次持股分别的状态
int[] stock =... | 585 |
1,253 | from __future__ import print_function
def minimum_coins(value, denominations):
result = []
# Assuming denominations is sorted in descendig order
for cur_denom in denominations:
while cur_denom <= value:
result.append(cur_denom)
value = value - cur_denom
return result
#... | 563 |
892 | {
"schema_version": "1.2.0",
"id": "GHSA-cxw5-72vp-8h54",
"modified": "2022-05-01T02:06:35Z",
"published": "2022-05-01T02:06:35Z",
"aliases": [
"CVE-2005-2269"
],
"details": "Firefox before 1.0.5, Mozilla before 1.7.9, and Netscape 8.0.2 does not properly verify the associated types of DOM node names ... | 1,719 |
923 | // Ouzel by <NAME>
#ifndef OUZEL_INPUT_GAMEPADDEVICEANDROID_HPP
#define OUZEL_INPUT_GAMEPADDEVICEANDROID_HPP
#include "../GamepadDevice.hpp"
#include "../Gamepad.hpp"
namespace ouzel::input::android
{
class InputSystem;
class GamepadDevice final: public input::GamepadDevice
{
public:
Gamepad... | 205 |
641 | # MIT License
# Copyright (c) 2019,2020 JetsonHacks
# See license
# A very simple code snippet
# Using two CSI cameras (such as the Raspberry Pi Version 2) connected to a
# NVIDIA Jetson Nano Developer Kit (Rev B01) using OpenCV
# Drivers for the camera and OpenCV are included in the base image in JetPack 4.3+
# This... | 2,536 |
14,668 | import io
import os
import sys
import difflib
from os import path
from subprocess import Popen, PIPE
xsltproc = path.join(os.getcwd(), "win32", "bin.msvc", "xsltproc.exe")
if not path.isfile(xsltproc):
xsltproc = path.join(os.getcwd(), "win32", "bin.mingw", "xsltproc.exe")
if not path.isfile(xsltproc):
... | 1,107 |
488 | // This is a simpler version of test2012_134.c
// This is the essential bug in ROSE from the module.c file of the zsh C application.
// This is the same as the issue with params.c from zsh also.
typedef int (*Hookfn) (int);
struct LinkNode
{
void *dat;
};
void
runhookdef()
{
struct LinkNode* p;
... | 183 |
799 | <filename>Packs/Cybersixgill-DVE/Integrations/CybersixgillDVEEnrichment/CybersixgillDVEEnrichment.py<gh_stars>100-1000
import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
""" IMPORTS """
import requests
from sixgill.sixgill_request_classes.sixgill_auth_request import S... | 2,149 |
28,056 | <gh_stars>1000+
package com.alibaba.json.bvt.parser.deser.list;
import java.util.Map;
import java.util.TreeSet;
import org.junit.Assert;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.TypeReference;
import junit.framework.TestCase;
public class ListStringFi... | 1,401 |
335 | <gh_stars>100-1000
{
"word": "Quoth",
"definitions": [
"Said (used only in first and third person singular before the subject)"
],
"parts-of-speech": "Verb"
} | 75 |
860 | /*
* 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,835 |
307 | <reponame>jmalvarezf-lmes/halyard
/*
* Copyright 2020 THL A29 Limited, a Tencent company.
*
* 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... | 855 |
582 | package com.easy.feignConsumer;
import com.easy.helloServiceApi.model.Goods;
import com.easy.helloServiceApi.vo.Result;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframe... | 417 |
372 | /*
* 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 writing, software distributed under t... | 1,044 |
2,542 | <reponame>AnthonyM/service-fabric
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ----------------------------------------------------------... | 5,677 |
1,184 | /*
* Copyright 2014 <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 applicable law or agreed to in w... | 5,729 |
348 | <reponame>chamberone/Leaflet.PixiOverlay<filename>docs/data/leg-t1/0ZZ/0ZZ04039.json
{"nom":"Bruxelles","circ":"4ème circonscription","dpt":"Français établis hors de France","inscrits":82523,"abs":63303,"votants":19220,"blancs":52,"nuls":70,"exp":19098,"res":[{"nuance":"REM","nom":"<NAME>-<NAME>","voix":9410},{"nuance"... | 444 |
348 | <gh_stars>100-1000
{"nom":"Genouillac","circ":"3ème circonscription","dpt":"Charente","inscrits":440,"abs":240,"votants":200,"blancs":11,"nuls":9,"exp":180,"res":[{"nuance":"SOC","nom":"<NAME>","voix":123},{"nuance":"REM","nom":"Mme <NAME>","voix":57}]} | 101 |
388 | /* ------------------------------------------------ *
* The MIT License (MIT)
* Copyright (c) 2019 <EMAIL>
* ------------------------------------------------ */
#include <stdio.h>
#include <stdlib.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include "assertgl.h"... | 3,431 |
19,371 | /*
* Copyright 1999-2021 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
*
* Unless required by a... | 1,464 |
1,444 | <gh_stars>1000+
package mage.cards.g;
import java.util.Set;
import java.util.UUID;
import mage.MageObject;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.cards.Cards;
import mage.cards.CardsImpl;... | 1,679 |
348 | {"nom":"Saint-Julien-le-Vendômois","dpt":"Corrèze","inscrits":216,"abs":35,"votants":181,"blancs":15,"nuls":8,"exp":158,"res":[{"panneau":"1","voix":94},{"panneau":"2","voix":64}]} | 78 |
14,668 | // 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_FACADE_H_
#define COMPONENTS_ACCOUNT_MANAGER_CORE_ACCOUNT_MANAGER_FACADE_H_
#include <memory>
#in... | 1,795 |
794 | <gh_stars>100-1000
import torch
import numpy as np
class Resize_preprocess(object):
"""Rescales the input PIL.Image to the given 'size_w,size_h'.
"""
def __init__(self, size_w,size_h):
self.size = (size_w,size_h)
def __call__(self, img):
return img.resize(self.size)
class AverageMete... | 639 |
303 | <filename>quakec/gmqcc/ftepp.c
/*
* Copyright (C) 2012, 2013, 2014, 2015
* <NAME>
* <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including with... | 32,438 |
772 | {
"Actions": "Műveletek",
"Advanced": "Haladó",
"Behaviors": "Viselkedések",
"Brushes": "Ecsetek",
"Color": "Szín",
"Comment": "Megjegyzés",
"Comments": "Megjegyzések",
"Conditionals": "Feltételek",
"Dancers": "Táncosok",
"Default": "Alapértelmezett",
"Events": "Események",
"Functions": "funkció... | 367 |
2,177 | <gh_stars>1000+
{
"version": 1.4,
"remote_json": "https://raw.github.com/willfarrell/alfred-workflows/master/Package%20Managers.json"
} | 56 |
1,338 | <filename>src/add-ons/input_server/filters/minimize_all/MinimizeAllInputFilter.cpp<gh_stars>1000+
/*
* Copyright 2015 Haiku, Inc. All rights reserved
* Distributed under the terms of the MIT License.
*
* Authors:
* <NAME>, <EMAIL>
*/
#include "MinimizeAllInputFilter.h"
#include <string.h>
#include <new>
#in... | 870 |
348 | # Copyright 2021 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 applicable law or agreed to in writing, ... | 5,034 |
568 | package com.novoda.inapp.v3;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Toast;
import com.andr... | 2,605 |
965 | CUrl url;
// Set the CUrl contents
url.CrackUrl(_T("http://someone:secret@www.microsoft.com:8080/visualc/stuff.htm#contents"));
// Obtain the length of the URL string and allocate a buffer to
// hold its contents
DWORD dwUrlLen = url.GetUrlLength() + 1;
TCHAR* szUrl = new TCHAR[dwUrlLen];
//... | 166 |
1,128 | /*
* 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 ... | 858 |
3,788 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
// DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
#include "pch.h"
#include "common.h"
#include "MonochromaticOverlayPresenter.h"... | 1,440 |
314 | <reponame>syamasakigoodrx/astronomer<gh_stars>100-1000
{
"operationName": "createUser",
"variables": {},
"query": "mutation createUser { createUser(email:\"__USER__\", password: \"__<PASSWORD>\", duration:360000) { user { id emails { address } } token { value payload { uuid } } isAdmin } }"
}
| 105 |
372 | <reponame>kbore/pbis-open
/* Editor Settings: expandtabs and use 4 spaces for indentation
* ex: set softtabstop=4 tabstop=8 expandtab shiftwidth=4: *
* -*- mode: c, c-basic-offset: 4 -*- */
/*
* Copyright © BeyondTrust Software 2004 - 2019
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0... | 4,905 |
477 | <reponame>Doctoror/ParticlesView
/*
* Copyright (C) 2018 <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 require... | 668 |
897 | '''
Problem: Check if two BSTs are identical or not.
BST or Binary Search Tree is a tree data structure that has following properties:
1. left node is smaller than its root node
2. right node is greater than its root node
3. both left and right subtrees are also BSTs.
To check whether two BSTs are identical or not, we... | 1,657 |
5,169 | {
"name": "WizardViewController",
"version": "0.1.0",
"summary": "An abstract view controller for sliding pages.",
"description": "Build your tutorial / description / informative screens by trivial approach.\nSetup controller view assets and be flexible with page delegation.",
"homepage": "https://github.com/... | 275 |
575 | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/plugins/plugin_info_host_impl.h"
#include "base/at_exit.h"
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "b... | 3,178 |
416 | #include <arch/phymem.h>
#include <arch/vmm.h>
#include <xbook/vmm.h>
#include <xbook/debug.h>
#include <xbook/memspace.h>
#include <xbook/sharemem.h>
#include <xbook/safety.h>
#include <xbook/process.h>
#include <string.h>
#include <errno.h>
void vmm_init(vmm_t *vmm)
{
vmm->page_storage = kern_page_c... | 3,803 |
777 | <gh_stars>100-1000
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stdint.h>
#include "storage/browser/quota/storage_observer.h"
namespace storage {
// StorageObserver::Filter
StorageObser... | 670 |
1,034 | <reponame>laves/porcupine<filename>demo/mcu/stm32h735/stm32h735g-dk/AudioCapture/micCapture_task.c<gh_stars>1000+
/*
* This software component is licensed by ST under Ultimate Liberty license
* SLA0044, the "License"; You may not use this file except in compliance with
* the License. You may obtain a copy of the Lic... | 1,041 |
934 | #include "appjs.h"
#include "appjs_app.h"
namespace appjs {
using namespace v8;
v8::Handle<Value> InitApp(const Arguments& args) {
HandleScope scope;
return scope.Close(App::NewInstance(args));
}
void Init(v8::Handle<v8::Object> target) {
App::Init();
Window::Init();
Menu::Init();
StatusIcon::Init();
... | 250 |
474 | {
"metadata": [
{
"src": [{ "files": ["src/csharp/Grpc.Core/Grpc.Core.csproj", "src/csharp/Grpc.Core.Api/Grpc.Core.Api.csproj"] }],
"properties": { "TargetFramework": "net45" },
"dest": "api/Grpc.Core",
}
]
} | 121 |
451 | /*Header-MicMac-eLiSe-25/06/2007
MicMac : Multi Image Correspondances par Methodes Automatiques de Correlation
eLiSe : ELements of an Image Software Environnement
www.micmac.ign.fr
Copyright : Institut Geographique National
Author : <NAME>
Contributors : <NAME>, <NAME>.
[1] <NAME>, <NAM... | 4,226 |
522 | <reponame>chjj/mako<gh_stars>100-1000
/*!
* chaindb.h - chaindb for mako
* Copyright (c) 2021, <NAME> (MIT License).
* https://github.com/chjj/mako
*/
#ifndef BTC_CHAINDB_H
#define BTC_CHAINDB_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include "types.h"
#include "../mako/common.h"
#include "..... | 1,257 |
1,444 | <gh_stars>1000+
package mage.game.command.planes;
import mage.ObjectColor;
import mage.abilities.Ability;
import mage.abilities.common.ActivateIfConditionActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.MainPhaseStackEmptyCondition;
import mage.abilities.costs.... | 1,025 |
2,151 | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMEOS_DBUS_SHILL_THIRD_PARTY_VPN_DRIVER_CLIENT_H_
#define CHROMEOS_DBUS_SHILL_THIRD_PARTY_VPN_DRIVER_CLIENT_H_
#include <stdint.h>
#include <s... | 1,106 |
3,680 | //
// Copyright 2017 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trad... | 1,199 |
1,875 | /*
* Copyright 2014 <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 applicable law or agreed ... | 672 |
348 | <gh_stars>100-1000
{"nom":"Bretenières","circ":"3ème circonscription","dpt":"Jura","inscrits":41,"abs":11,"votants":30,"blancs":0,"nuls":0,"exp":30,"res":[{"nuance":"LR","nom":"<NAME>","voix":20},{"nuance":"MDM","nom":"<NAME>","voix":10}]} | 100 |
587 | <gh_stars>100-1000
/*
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unles... | 647 |
5,937 | <filename>src/Microsoft.DotNet.Wpf/src/WpfGfx/common/shared/ResourceCache.h
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//-------------------------------------... | 2,049 |
502 | /**
* Copyright 1996-2013 Founder International 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 req... | 2,015 |
454 | # Copyright (c) 2021 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... | 959 |
937 | <reponame>zmyer/cyclops-react
package cyclops.companion;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.stream.Stream;
import com.oath.cyclops.hkt.Higher;
import com.oath.cyclops.types.traversable.IterableX;
import cyclops.control.Either;
import com.oath.cyclops.hkt.DataWitness.future;
... | 9,212 |
937 | package com.oath.cyclops.internal.stream.spliterators.push;
import com.oath.cyclops.types.reactive.BufferOverflowPolicy;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
import java.util.Queue;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Consumer;
publi... | 2,229 |
1,588 | <reponame>xujiaji/erupt<gh_stars>1000+
package xyz.erupt.core.config;
import com.zaxxer.hikari.HikariConfig;
import lombok.Getter;
import lombok.Setter;
import lombok.SneakyThrows;
import java.lang.reflect.Field;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
/**
* @author YuePeng
* date 2021/9... | 2,819 |
30,023 | <gh_stars>1000+
"""The tests for the litejet component."""
from unittest.mock import patch
from serial import SerialException
from homeassistant import config_entries, data_entry_flow
from homeassistant.components.litejet.const import CONF_DEFAULT_TRANSITION, DOMAIN
from homeassistant.const import CONF_PORT
from tes... | 1,167 |
372 | <reponame>apache/systemml
/*
* 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.... | 3,498 |
3,084 | <filename>general/toaster/toastDrv/umdf/func/Device.cpp
/*++
Copyright (c) Microsoft Corporation, All Rights Reserved
Module Name:
Device.cpp
Abstract:
This file contains the device callback object implementation.
Environment:
Windows User-Mode Driver Framework (WUDF)
--*/
#... | 1,779 |
5,169 | <filename>Specs/7/b/4/MariamPOD/0.1.0/MariamPOD.podspec.json
{
"name": "MariamPOD",
"version": "0.1.0",
"summary": "is a\u0010 very good pod to do nothing",
"description": "'mariamPOD is a\u0010 very good pod to do nothing and nothing shall will do '",
"homepage": "https://github.com/devkhaled/MariamPOD",
"... | 319 |
4,145 | <gh_stars>1000+
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | 3,418 |
310 | <reponame>orekyuu/doma<gh_stars>100-1000
package org.seasar.doma.internal.apt.util;
import static org.junit.jupiter.api.Assertions.*;
import javax.lang.model.element.ElementKind;
import org.junit.jupiter.api.Test;
class ElementKindUtilTest {
@Test
void isRecord() {
assertFalse(ElementKindUtil.isRecord(Eleme... | 130 |
548 | <filename>basic/inlines/parser.py
from django.template import TemplateSyntaxError
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.http import Http404
from django.utils.encoding import smart_unicode
from django.template.loader import render_to_string
from django.ut... | 1,418 |
1,230 | <reponame>Mr-Anonymous002/HackBar<gh_stars>1000+
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package burp;
import java.awt.event.ActionEvent;
import java.awt.event.Action... | 1,442 |
5,616 | /*
* 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,710 |
14,668 | // 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 "third_party/blink/renderer/modules/native_io/native_io_error.h"
#include "base/files/file.h"
#include "third_party/blink/public/common/native_i... | 1,525 |
578 | <filename>cachelib/common/Utils.h<gh_stars>100-1000
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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/... | 2,424 |
550 | from glue.core.fitters import BaseFitter1D
from glue.core.simpleforms import IntOption
from glue.config import fit_plugin
import numpy as np
import emcee
def gaussian(x, mean, amplitude, stddev):
return np.exp(-(x - mean) ** 2 / (2 * stddev ** 2)) * amplitude
def lnprob(param, x, y, dy):
# mean, amplitude,... | 1,387 |
307 | <reponame>davoustp/classloader-leak-prevention
package se.jiderhamn.classloader.leak.prevention.cleanup;
import org.junit.After;
import se.jiderhamn.classloader.PackagesLoadedOutsideClassLoader;
/**
* Test case for leaks caused by Postgresql JDBC driver timer threads are avoided by {@link StopThreadsCleanUp}.
* @... | 256 |
1,379 | /*
* Copyright 2008-2009 LinkedIn, 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 agre... | 1,400 |
868 | <filename>ThirdParty/raft/canonical/src/err.h
/* Utilities around error handling. */
#ifndef ERROR_H_
#define ERROR_H_
#include <stddef.h>
#include <string.h>
#define ERR_CODE_TO_STRING_MAP(X) \
X(RAFT_NOMEM, "out of memory") \
X(RAFT... | 1,399 |
32,544 | <filename>spring-security-modules/spring-5-security/src/main/java/com/baeldung/inmemory/InMemoryAuthApplication.java
package com.baeldung.inmemory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class InMemoryAuthAp... | 138 |
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 ... | 640 |
348 | {"nom":"Teulat","circ":"3ème circonscription","dpt":"Tarn","inscrits":405,"abs":206,"votants":199,"blancs":26,"nuls":5,"exp":168,"res":[{"nuance":"REM","nom":"<NAME>","voix":103},{"nuance":"LR","nom":"<NAME>","voix":65}]} | 88 |
1,652 | <gh_stars>1000+
//
// PermissionsManager.h
// Scroll Reverser
//
// Created by <NAME> on 21/11/2019.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
extern NSString *const PermissionsManagerKeyAccessibilityEnabled;
extern NSString *const PermissionsManagerKeyInputMonitoringEnabled;
extern NSString *c... | 350 |
1,169 | <reponame>mcx/PositionBasedDynamics
#include "GenericConstraintsModel.h"
#include "PositionBasedDynamics/PositionBasedDynamics.h"
#include "GenericConstraints.h"
using namespace PBD;
GenericConstraintsModel::GenericConstraintsModel() :
SimulationModel()
{
}
GenericConstraintsModel::~GenericConstraintsModel(void)... | 699 |
1,338 | <gh_stars>1000+
#include <Application.h>
#include <MediaDefs.h>
#include <MediaRoster.h>
#include <TimeSource.h>
#include <string.h>
#include "ConsumerNode.h"
#include "misc.h"
#include "ProducerNode.h"
BMediaRoster *roster;
ProducerNode *producer;
ConsumerNode *consumer;
status_t rv;
int main()
{
out("Basic BBuf... | 2,842 |
313 | {"status_id":4810677155790848,"text":"Et cihpikuk otewe tew mokkiju kilcobmob tukvaaca musle jobcipoc ecatipled covid duitapa. #put","user":{"user_id":5289489360486400,"name":"<NAME>","screen_name":"@kosizuesa","created_at":453651002,"followers_count":71,"friends_count":17,"favourites_count":21},"created_at":506248040... | 176 |
26,268 | /*
* Copyright (c) 2010 <NAME>
* Copyright (c) 2010 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED... | 496 |
3,172 | <reponame>parmeet/text
import torch
from torchtext.nn import InProjContainer, MultiheadAttentionContainer, ScaledDotProduct
from torch.testing import assert_allclose
from ..common.torchtext_test_case import TorchtextTestCase
class TestJIT(TorchtextTestCase):
def test_torchscript_multiheadattention(self):
... | 726 |
478 | <gh_stars>100-1000
/*
Copyright (c) 2013 Aerys
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, di... | 2,382 |
9,609 | import unittest
def execfile(fn):
with open(fn) as f:
exec(f.read())
def simple_test():
execfile('examples/simple_test.py')
def mmap_test():
execfile('examples/mmap_test.py')
def precision_test():
execfile('examples/precision_test.py')
| 111 |
2,084 | <reponame>petrdousa/archaius<gh_stars>1000+
/*
*
* Copyright 2014 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Un... | 550 |
1,011 | <reponame>Said6289/SPlisHSPlasH
#include "DebugTools.h"
#include "Utilities/Logger.h"
#include <SPlisHSPlasH/Simulation.h>
using namespace SPH;
using namespace GenParam;
int DebugTools::DETERMINE_THREAD_IDS = -1;
int DebugTools::DETERMINE_NUM_NEIGHBORS = -1;
int DebugTools::DETERMINE_VELOCITY_CHANGES = -1;
DebugToo... | 2,530 |
4,822 | /*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*/
package org.opensearch.search.profile;
/**
* Provide contextual profile breakdowns which are associated with free... | 244 |
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 ... | 743 |
852 | #ifndef CUDADataFormats_Track_PixelTrackHeterogeneous_h
#define CUDADataFormats_Track_PixelTrackHeterogeneous_h
#include "CUDADataFormats/Common/interface/HeterogeneousSoA.h"
#include "CUDADataFormats/Track/interface/TrackSoAHeterogeneousT.h"
using PixelTrackHeterogeneous = HeterogeneousSoA<pixelTrack::TrackSoA>;
#e... | 136 |
742 | package org.support.project.di;
import org.support.project.aop.Aspect;
import org.support.project.di.DI;
import org.support.project.di.Instance;
@DI(impl = TestInterfaceImpl.class, instance = Instance.Singleton)
public interface TestInterface {
@Aspect(advice = TestAdvice.class)
void test();
}
| 117 |
1,822 | // Copyright (c) 2016-2020 <NAME>
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#pragma once
#include <hpx/config.hpp>
#include <hpx/synchronization/detail/condition_va... | 746 |
348 | <gh_stars>100-1000
{"nom":"Saint-Germain-d'Esteuil","circ":"5ème circonscription","dpt":"Gironde","inscrits":1042,"abs":627,"votants":415,"blancs":39,"nuls":25,"exp":351,"res":[{"nuance":"SOC","nom":"<NAME>","voix":187},{"nuance":"REM","nom":"<NAME>","voix":164}]} | 109 |
1,666 | <gh_stars>1000+
/*
* 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 req... | 1,037 |
515 | <reponame>maplecloudy/hertzbeat
package com.usthe.manager.support.exception;
/**
* 数据库操作异常
* @author tomsun28
* @date 2021/11/15 13:25
*/
public class MonitorDatabaseException extends RuntimeException {
public MonitorDatabaseException(String message) {
super(message);
}
}
| 113 |
2,133 | #include <Airmap/services/dispatcher.h>
#include <QCoreApplication>
#include <QThread>
#include <cassert>
QEvent::Type airmap::services::Dispatcher::Event::registered_type() {
static const Type rt = static_cast<Type>(registerEventType());
return rt;
}
airmap::services::Dispatcher::Event::Event(const std::functi... | 577 |
515 | /*
* Copyright 2018-present HiveMQ and the HiveMQ Community
*
* 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 ... | 2,333 |
1,144 | <gh_stars>1000+
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or... | 1,577 |
2,921 | <filename>blockchains/smartchain/assets/0x16153214E683018D5aA318864c8e692b66E16778/info.json
{
"name": "PolkaWar",
"symbol": "PWAR",
"type": "BEP20",
"decimals": 18,
"description": "PolkaWar is a blockchain based NFT gaming platform and marketplace. Inspired by the recent crypto NFT and gaming narra... | 392 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.