max_stars_count int64 301 224k | text stringlengths 6 1.05M | token_count int64 3 727k |
|---|---|---|
3,428 | <filename>lib/node_modules/@stdlib/datasets/spam-assassin/data/easy-ham-1/00810.a290b36b1210ae7d5ad8d224aef851bf.json
{"id":"00810","group":"easy-ham-1","checksum":{"type":"MD5","value":"a290b36b1210ae7d5ad8d224aef851bf"},"text":"From <EMAIL> Mon Sep 30 17:56:33 2002\nReturn-Path: <<EMAIL>>\nDelivered-To: <EMAIL>.<EMA... | 1,412 |
375 | /*
* This file is part of the Wayback archival access software
* (http://archive-access.sourceforge.net/projects/wayback/).
*
* Licensed to the Internet Archive (IA) by one or more individual
* contributors.
*
* The IA licenses this file to You under the Apache License, Version 2.0
* (the "License"); y... | 2,493 |
386 | <filename>src/IECoreGL/TextureLoader.cpp
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2007-2012, Image Engine Design Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the fo... | 3,032 |
1,043 | <reponame>JeffMuchine/micro-server
package com.oath.micro.server.dist.lock;
public interface DistributedLockService {
boolean tryLock(String key);
boolean tryReleaseLock(String key);
}
| 62 |
335 | <reponame>Safal08/Hacktoberfest-1
{
"word": "Postdoctoral",
"definitions": [
"Relating to or denoting research undertaken after the completion of doctoral research."
],
"parts-of-speech": "Adjective"
} | 85 |
969 | <filename>miniapps/electromagnetics/tesla.cpp<gh_stars>100-1000
// Copyright (c) 2010-2021, Lawrence Livermore National Security, LLC. Produced
// at the Lawrence Livermore National Laboratory. All Rights reserved. See files
// LICENSE and NOTICE for details. LLNL-CODE-806117.
//
// This file is part of the MFEM librar... | 7,554 |
348 | {"nom":"Canny-sur-Matz","circ":"6ème circonscription","dpt":"Oise","inscrits":303,"abs":173,"votants":130,"blancs":9,"nuls":4,"exp":117,"res":[{"nuance":"FN","nom":"<NAME>","voix":62},{"nuance":"REM","nom":"<NAME>","voix":55}]} | 92 |
5,169 | {
"name": "KANibHelper",
"version": "0.4",
"platforms": {
"ios": null
},
"license": {
"type": "Apache License, Version 2.0",
"file": "LICENSE"
},
"summary": "When you need to have two very distinct interfaces between 3.5 and 4 inches screens.",
"homepage": "http://alexiscreuzot.com/KANibHelp... | 331 |
2,231 | <reponame>Krzlfx/defold
// Copyright 2020 The Defold Foundation
// Licensed under the Defold License version 1.0 (the "License"); you may not use
// this file except in compliance with the License.
//
// You may obtain a copy of the License, together with FAQs at
// https://www.defold.com/license
//
// Unless required ... | 2,784 |
49,076 | <filename>spring-webmvc/src/main/java/org/springframework/web/servlet/resource/GzipResourceResolver.java<gh_stars>1000+
/*
* Copyright 2002-2018 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.
* Y... | 1,491 |
854 | __________________________________________________________________________________________________
8ms
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
static const auto speedup = []() {std::ios::sync_with_stdi... | 952 |
475 | <reponame>SuperV1234/ecst
// Copyright (c) 2015-2016 <NAME>
// License: Academic Free License ("AFL") v. 3.0
// AFL License page: http://opensource.org/licenses/AFL-3.0
// http://vittorioromeo.info | <EMAIL>
#pragma once
#include <vector>
#include <vrm/core/experimental/sparse_set.hpp>
#include <vrm/core/experimental... | 2,020 |
1,445 | from tapiriik.testing.testtools import TestTools, TapiriikTestCase
from tapiriik.sync import SynchronizationTask
from tapiriik.sync.activity_record import ActivityRecord
from tapiriik.services import UserException, UserExceptionType
from tapiriik.services.api import APIExcludeActivity
from tapiriik.services.inte... | 12,455 |
2,023 | <filename>sling/task/pipe-reader.cc<gh_stars>1000+
// Copyright 2019 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//... | 718 |
1,481 | package apoc.export.util;
/**
* @author mh
* @since 22.05.16
*/
interface SizeCounter {
long getNewLines();
long getCount();
long getTotal();
long getPercent();
}
| 70 |
777 | // 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.
package org.chromium.net;
import static android.system.OsConstants.AF_INET6;
import static android.system.OsConstants.SOCK_STREAM;
import android.annota... | 1,536 |
3,084 | /*++
Copyright (c) 2005 Microsoft Corporation
All rights reserved.
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
File Name:
bksa... | 606 |
376 | {"labels":[{"name":"Hacking Web Applications","description":"","color":"#0a5b23"},{"name":"Buffer Overflow","description":"","color":"#5e234a"},{"name":"MITM","description":"","color":"#cc1212"},{"name":"Sniffing","description":"","color":"#0c3e57"},{"name":"Password Cracking","description":"","color":"#a8b32e"}]}
| 88 |
3,083 | /*
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 required by applicable law or agreed to in ... | 2,985 |
1,444 | <reponame>J-VOL/mage<filename>Mage.Sets/src/mage/cards/d/DiregrafHorde.java
package mage.cards.d;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
import mage.abilities.effects.OneShotEffe... | 933 |
395 | <gh_stars>100-1000
#ifndef _LIGHTTPD_RADIX_H_
#define _LIGHTTPD_RADIX_H_
#include <lighttpd/settings.h>
typedef struct liRadixTree liRadixTree;
LI_API liRadixTree* li_radixtree_new(void);
LI_API void li_radixtree_free(liRadixTree *tree, GFunc free_func, gpointer free_userdata);
LI_API gpointer li_radixtree_insert(l... | 310 |
3,358 | /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Copyright (C) 2012, 2013 <NAME>
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or... | 837 |
473 | /*
Author: <NAME> <<EMAIL>>
Copyright (c) 2014 Cromulence LLC
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, m... | 5,228 |
11,468 | /*
* Copyright (c) 2015 LingoChamp 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 agr... | 2,277 |
2,201 | <filename>demos/common/python/openvino/model_zoo/model_api/models/types.py
"""
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/l... | 2,375 |
12,278 | <reponame>rajeev02101987/arangodb
// (C) Copyright 2018 <NAME>
// 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.)
// See http://www.boost.org/libs/iostreams for documentation.
#include <boost/iostreams/detail/adapte... | 920 |
348 | <filename>docs/data/leg-t1/005/00502101.json
{"nom":"Vallouise-Pelvoux","circ":"2ème circonscription","dpt":"Hautes-Alpes","inscrits":1142,"abs":431,"votants":711,"blancs":12,"nuls":3,"exp":696,"res":[{"nuance":"REM","nom":"<NAME>","voix":393},{"nuance":"DVD","nom":"M. <NAME>","voix":79},{"nuance":"FI","nom":"M. <NAME>... | 251 |
824 | /*
* 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 required by applicab... | 2,259 |
1,561 | /*
* Copyright (c) 2015 Cossack Labs 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 law or a... | 8,611 |
12,700 | <filename>tests/kvm-unit-tests/lib/x86/fwcfg.h
#ifndef FWCFG_H
#define FWCFG_H
#include <stdint.h>
#define FW_CFG_SIGNATURE 0x00
#define FW_CFG_ID 0x01
#define FW_CFG_UUID 0x02
#define FW_CFG_RAM_SIZE 0x03
#define FW_CFG_NOGRAPHIC 0x04
#define FW_CFG_NB_CPUS 0x... | 736 |
405 | package weixin.idea.huodong.service;
import org.jeecgframework.core.common.service.CommonService;
public interface HdRecordServiceI extends CommonService{
}
| 50 |
1,695 | <reponame>happybin92/trino<filename>core/trino-main/src/test/java/io/trino/sql/planner/TestTableScanNodePartitioning.java
/*
* 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://... | 6,108 |
2,709 | #include <matplot/matplot.h>
int main() {
using namespace matplot;
auto ax1 = subplot(2, 1, 0);
auto [x, y, z] = peaks();
z = transpose(z);
plot(ax1, z);
xlim(ax1, {0, 20});
auto ax2 = subplot(2, 1, 1);
plot(ax2, z);
ax1->font_size(15);
ax2->line_width(2);
show();
re... | 164 |
2,440 | <reponame>mind-owner/Cyberbrain
from cyberbrain import Binding, InitialValue, Symbol # noqa
def test_call(tracer, check_golden_file):
a = b = c = d = 1
counter = 0
tracer.start()
def f(foo, bar, *args, **kwargs):
nonlocal counter
counter += 1
return counter
x = f(a, b) ... | 327 |
364 | <reponame>mbw-ahc/hapi-fhir
package ca.uhn.fhir.jpa.mdm.svc;
import ca.uhn.fhir.jpa.mdm.BaseMdmR4Test;
import ca.uhn.fhir.mdm.util.MdmResourceUtil;
import org.hl7.fhir.instance.model.api.IAnyResource;
import org.hl7.fhir.r4.model.Patient;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.anno... | 727 |
534 | package mekanism.common.item.gear;
import javax.annotation.Nonnull;
import mekanism.common.item.interfaces.ISpecialGear;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.IAr... | 420 |
594 | <reponame>lolautruche/bakerydemo
{
"name": "WagtailBakeryDemo",
"description": "WagtailBakeryDemo",
"repository": "https://github.com/wagtail/bakerydemo",
"keywords": ["wagtail", "django"],
"env": {
"DJANGO_DEBUG": "off",
"DJANGO_SETTINGS_MODULE": "bakerydemo.settings.production",
"DJANGO_SECURE_S... | 253 |
815 | <filename>ThirdParty/NvPipe/vtknvpipe/mangle_nvpipe.h
#pragma once
#define nvpipe_create_encoder vtknvpipe_create_encoder
#define nvpipe_create_decoder vtknvpipe_create_decoder
#define nvpipe_destroy vtknvpipe_destroy
#define nvpipe_encode vtknvpipe_encode
#define nvpipe_bitrate vtknvpipe_bitrate
#define nvpipe_decode... | 157 |
7,272 | package com.kunal.interfaces;
public class CDPlayer implements Media{
@Override
public void start() {
System.out.println("Music start");
}
@Override
public void stop() {
System.out.println("Music stop");
}
}
| 95 |
713 | <reponame>pferraro/infinispan
package org.infinispan.server.hotrod.counter.impl;
import static org.infinispan.server.hotrod.HotRodOperation.COUNTER_GET_CONFIGURATION;
import static org.infinispan.server.hotrod.HotRodOperation.COUNTER_GET_NAMES;
import static org.infinispan.server.hotrod.HotRodOperation.COUNTER_IS_DEFI... | 1,439 |
5,411 | <reponame>thorium-cfx/fivem<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.
package org.chromium.base.test;
import org.json.JSONObject;
import org.junit.Assert;
import org.junit.Test;
im... | 3,112 |
369 | // Copyright (c) 2017-2021, Mudita <NAME>.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include <string>
#include <list>
namespace at
{
constexpr auto urcStart = "\r\n";
class ATURCStream
{
private:
std::string atBuffer = {};
... | 448 |
305 | <reponame>elizabethandrews/llvm<filename>mlir/test/mlir-cpu-runner/mlir_test_cblas.cpp
//===- mlir_test_cblas.cpp - Simple Blas subset implementation ------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX... | 738 |
1,444 | <reponame>Bokos-/rest-client
package org.wiztools.restclient.bean;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
*
* @author subwiz
*/
public class OAuth2BearerAuthBean extends AuthorizationHeaderAuthBean implements OAuth2BearerAuth {
private final static Pattern p = Pattern.compile("Bear... | 303 |
708 | import numpy as np
import scipy as sp
import warnings
#np.seterr(all='raise')
def sigmoid(x):
#print x,'========='
#print "======================="
return 1/(1+np.float64(np.exp(-x)));
| 71 |
383 | <gh_stars>100-1000
import numpy as np
import torch
import torch.optim as optim
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils import clip_grad_norm_
from lagom.networks import BaseNetwork
from lagom.networks import make_fc
from lagom.networks import ortho_init
from lagom.networks import li... | 5,468 |
3,976 | <filename>Drake-Z/0005/0005.py<gh_stars>1000+
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'第 0005 题:你有一个目录,装了很多照片,把它们的尺寸变成都不大于 iPhone5 分辨率(1136x640)的大小。'
__author__ = 'Drake-Z'
import os
import glob
from PIL import Image
def thumbnail_pic(path):
a = glob.glob(r'*.jpg')
for x in a:
name = os.path.... | 326 |
2,143 | import pandas as pd
from pandarallel.utils.tools import chunk
class Series:
@staticmethod
def reduce(results, _):
return pd.concat(results, copy=False)
@staticmethod
def get_chunks(nb_workers, series, *args, **kwargs):
for chunk_ in chunk(series.size, nb_workers):
yield se... | 335 |
8,805 | <filename>ios/Pods/boost-for-react-native/boost/compute/functional/atomic.hpp
//---------------------------------------------------------------------------//
// Copyright (c) 2013 <NAME> <<EMAIL>>
//
// Distributed under the Boost Software License, Version 1.0
// See accompanying file LICENSE_1_0.txt or copy at
//... | 1,483 |
611 | <reponame>packagesdev/dejalu
// DejaLu
// Copyright (c) 2015 <NAME>. All rights reserved.
#import <Cocoa/Cocoa.h>
#include "Hermes.h"
@interface DJLPreferencesWindowController : NSWindowController
- (void) showLabelsForAccount:(hermes::Account *)account;
- (IBAction) createLink:(id)sender;
@end
| 110 |
2,338 | <reponame>jhh67/chapel
//===--- ZOS.cpp - z/OS ToolChain Implementations ---------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----... | 486 |
828 | import aes128
import Print
import os
import shutil
import json
import listmanager
from Fs import Nsp as squirrelNSP
from Fs import Xci as squirrelXCI
from Fs import Nca
import sq_tools
import Keys
from binascii import hexlify as hx, unhexlify as uhx
import subprocess
import sys
from mtp.wpd import is_sw... | 4,457 |
2,151 | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file defines the command buffer commands.
#ifndef GPU_COMMAND_BUFFER_COMMON_COMMON_CMD_FORMAT_H_
#define GPU_COMMAND_BUFFER_COMMON_COMMON_CMD_FOR... | 1,126 |
335 | {
"word": "Hydrophone",
"definitions": [
"A microphone which detects sound waves under water."
],
"parts-of-speech": "Noun"
} | 62 |
375 | <reponame>spirentitestdevter/RED
/*
* Copyright 2016 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
package org.robotframework.ide.eclipse.main.plugin.tableeditor.source.handler;
import static org.mockito.Mockito.mock;
import static org... | 687 |
669 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include <cuda_runtime.h>
namespace onnxruntime {
namespace cuda {
template <typename TSrc>
void IsFinite(cudaStream_t stream, const TSrc* input, bool* output, size_t N);
}
} // namespace onnxruntime
| 105 |
2,504 | <reponame>dujianxin/Windows-universal-samples
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
... | 245 |
1,002 | // Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
#pragma once
namespace ABI { namespace Microsoft { namespace Graphics { namespace Canvas
{
inline int ClampedOffset(int value, int offset)
{
a... | 618 |
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.
package org.chromium.components.content_capture;
import org.chromium.base.CommandLine;
import org.chromium.base.annotations.NativeMethods;
/**
* The cla... | 308 |
557 | <gh_stars>100-1000
package com.dangdang.config.face.controller;
import com.dangdang.config.face.entity.CommonResponse;
import com.dangdang.config.face.entity.PropertyItem;
import com.dangdang.config.face.entity.PropertyItemVO;
import com.dangdang.config.face.service.NodeService;
import com.google.common.base.Charsets;... | 7,176 |
786 | <reponame>edustaff/spyne
#
# spyne - Copyright (C) Spyne contributors.
#
# 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 option) any late... | 11,650 |
573 | /*
* This software is licensed under the terms of the MIT License.
* See COPYING for further information.
* ---
* Copyright (c) 2011-2019, <NAME> <<EMAIL>>.
* Copyright (c) 2012-2019, <NAME> <<EMAIL>>.
*/
#include "taisei.h"
#include "eventloop_private.h"
#include "events.h"
#include "global.h"
#include <emscr... | 785 |
692 | <filename>miniFE-sycl/basic/optional/ThreadPool/test/hpccg/BoxPartition.h
/** \brief Partition a { [ix,jx) X [iy,jy) X [iz,jz) } box.
*
* Use recursive coordinate bisection to partition a box
* into np disjoint sub-boxes. Allocate (via malloc) and
* populate the sub-boxes, mapping the local (x,y,z) to
* a ... | 1,130 |
3,102 | // RUN: %clang_cc1 -fsyntax-only -Wall -pedantic -verify %s
// RUN: mkdir -p %t-dir
// RUN: cp %s %t-dir/fixit-include.c
// RUN: cp %S/fixit-include.h %t-dir/fixit-include.h
// RUN: not %clang_cc1 -fsyntax-only -fixit %t-dir/fixit-include.c
// RUN: %clang_cc1 -Wall -pedantic %t-dir/fixit-include.c
// RUN: not %clang_cc... | 274 |
1,080 | # 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... | 852 |
454 | <filename>certified-connectors/DBF2XML/apiProperties.json
{
"properties": {
"capabilities": [],
"connectionParameters": {},
"iconBrandColor": "#EEEEEE"
}
} | 66 |
1,484 | <gh_stars>1000+
"""
Java-related utilities for interacting with Java packages.
"""
import re
import anchore_engine.utils
def parse_properties(lines):
"""
Parses the given line iterable using the Java properties file format.
Lines beginning with # are ignored.
:param lines: an iterable container of l... | 628 |
343 | {
"homepage": "https://tug.org/texlive/",
"description": "TeX Live is a cross-platform, free software distribution for the TeX typesetting system",
"license": "LPPL,GPL2",
"version": "2022",
"url": "http://mirror.ctan.org/systems/texlive/tlnet/install-tl.zip",
"hash": "sha512:5466a2d848bf8... | 1,286 |
713 | @Entity
public class Vehicle implements Serializable {
@EmbeddedId
private VehicleId id;
private String color; ...
}
@Embeddable
public class VehicleId implements Serializable
{
private String state;
private String licensePlate;
...
}
| 69 |
335 | <filename>P/Pyramid_verb.json
{
"word": "Pyramid",
"definitions": [
"Stack or arrange in the shape of a pyramid.",
"Achieve a substantial return on (money or property) after making a small initial investment."
],
"parts-of-speech": "Verb"
} | 101 |
1,091 | #include <iostream>
int getValueFromUser() {
std::cout << "Enter an integer: ";
int input{};
std::cin >> input;
return input;
}
int main() {
int x{ getValueFromUser() }; // first call to getValueFromUser
int y{ getValueFromUser() }; // second call to getValueFromUser
std::cout << x << " + " << y <... | 139 |
889 | <gh_stars>100-1000
import numpy as np
import hyperchamber as hc
import inspect
import collections
from hypergan.trainers.base_trainer import BaseTrainer
TINY = 1e-12
cg_state = collections.namedtuple("CGState", ["i", "x", "r", "p", "lr", "rdotr", "metric"])
def update_vars(state1, state2):
ops = []
for name in s... | 10,951 |
1,821 | /*
* Copyright 2018- The Pixie 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 ag... | 462 |
1,350 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.network.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.j... | 510 |
369 | /*
* Copyright © 2021 <NAME>, 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 i... | 699 |
360 | if __name__ == '__main__' and __package__ is None:
import sys
from os import path
sys.path.append( path.dirname( path.dirname( path.abspath(__file__) ) ))
import os
import torch
from utils.model_serialization import strip_prefix_if_present
from utils import zipreader
import argparse
from tqdm import tqdm
i... | 879 |
5,079 | <filename>desktop/core/ext-py/lxml-3.3.6/src/lxml/includes/lxml-version.h
#ifndef LXML_VERSION_STRING
#define LXML_VERSION_STRING "3.3.6"
#endif
| 66 |
1,444 |
package mage.cards.n;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.effects.common.search.SearchLibraryGraveyardPutInHandEffect;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.cards.CardImpl;
import mage.c... | 584 |
573 | // Copyright 2015, VIXL authors
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions ... | 161,057 |
1,107 | <reponame>basnijholt/pyvista<filename>examples/00-load/create-structured-surface.py
"""
.. _ref_create_structured:
Creating a Structured Surface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Create a StructuredGrid surface from NumPy arrays
"""
import numpy as np
# sphinx_gallery_thumbnail_number = 2
import pyvista as pv
from pyvi... | 1,598 |
312 | package org.reveno.atp.core.restore;
import org.reveno.atp.core.EngineEventsContext;
import org.reveno.atp.core.EngineWorkflowContext;
import org.reveno.atp.core.api.*;
import org.reveno.atp.core.api.InputProcessor.JournalType;
import org.reveno.atp.core.api.storage.JournalsStorage;
import org.reveno.atp.core.data.Def... | 1,275 |
66,985 | /*
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 649 |
28,056 | package com.alibaba.json.bvt.issue_1700;
import com.alibaba.fastjson.JSONObject;
import junit.framework.TestCase;
public class Issue1761 extends TestCase {
public void test_for_issue() throws Exception {
JSONObject jsonObject = new JSONObject();
jsonObject.put("null","");
double d = jsonOb... | 146 |
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 ... | 2,407 |
372 | /*
* 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,813 |
1,073 | // RUN: %clangxx -no-canonical-prefixes -target x86_64--netbsd \
// RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
// RUN: | FileCheck -check-prefix=X86_64 %s
// RUN: %clangxx -no-canonical-prefixes -target x86_64--netbsd7.0.0 \
// RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree ... | 9,358 |
482 | package io.cattle.platform.extension.dynamic.api.addon;
import io.github.ibuildthecloud.gdapi.annotation.Type;
@Type(list = false)
public class ExternalHandlerProcessConfig {
String name;
String onError;
public String getName() {
return name;
}
public void setName(String name) {
... | 195 |
595 | <filename>XilinxProcessorIPLib/drivers/prc/src/xprc_g.c<gh_stars>100-1000
/******************************************************************************
* Copyright (C) 2010 - 2016 Xilinx, Inc. All rights reserved.
* SPDX-License-Identifier: MIT
************************************************************************... | 930 |
1,405 | <gh_stars>1000+
package android.support.v4.app;
import android.app.Notification;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
public interface INotificationSideChannel extends IInterface {
void cancel(String str, in... | 2,666 |
4,071 | /*
* \file murmurhash.h
* \desc murmur hash function
*/
#pragma once
#include <stdint.h>
namespace blaze {
static inline uint64_t MurmurHash64A(const char *key, uint64_t len, uint64_t seed = 0) {
const uint64_t m = 0xc6a4a7935bd1e995;
const int r = 47;
uint64_t h = seed ^ (len * m);
const uint64_t* data... | 567 |
2,116 | # Copyright 2019 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, ... | 2,915 |
539 | <filename>cpp/inc/bond/ext/grpc/basic_thread_pool.h
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#pragma once
#include <bond/core/config.h>
#include "exception.h"
#if defined (__APPLE__)
// Work-around: 'OS... | 1,282 |
1,144 | #pragma once
#include <stdint.h>
#include <string.h>
// T = Type
// IT = Index Type
// O = Operator (getIndex, setIndex, compare)
template <typename T, typename IT, typename O>
class MergeSort {
public:
MergeSort(T *arr, uint32_t size, O &oper) : arrayList(arr), arraySize(size), op(oper) {
}
void sort() {
... | 1,001 |
787 | <filename>jenetics.ext/src/test/java/io/jenetics/ext/internal/EscaperTest.java<gh_stars>100-1000
/*
* Java Genetic Algorithm Library (@__identifier__@).
* Copyright (c) @__year__@ <NAME>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Li... | 706 |
1,189 | <gh_stars>1000+
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.sdk.autoconfigure;
import io.opentelemetry.sdk.autoconfigure.spi.ConfigurationException;
final class ClasspathUtil {
@SuppressWarnings("UnusedException")
static void checkClassExists(Str... | 284 |
1,014 | {
"0S2J.L": {
"short_name": "IMPALA PLATINUM HOLDINGS LTD IM",
"long_name": "Impala Platinum Holdings Limited",
"summary": "Impala Platinum Holdings Limited engages in mining, processing, refining, and marketing platinum group metals (PGMs) in South Africa and Zimbabwe. The company produ... | 423 |
9,724 | <reponame>xReveres/emscripten<filename>tests/wasm_worker/semaphore_try_acquire.c<gh_stars>1000+
#include <emscripten.h>
#include <emscripten/wasm_worker.h>
#include <emscripten/threading.h>
#include <stdlib.h>
#include <assert.h>
// Tests emscripten_semaphore_try_acquire() on the main thread
EM_JS(void, console_log, ... | 506 |
918 | <reponame>pombredanne/veles
/*
* Copyright 2017 CodiLime
*
* 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... | 1,355 |
1,176 | {
"name": "terrain_grass_NRM",
"properties": {
"name": "terrain_grass_NRM",
"assetFileName": "terrain_grass_NRM.tga",
"assetType": 5
}
} | 92 |
892 | <filename>advisories/unreviewed/2022/05/GHSA-6v4r-9cp8-cpgj/GHSA-6v4r-9cp8-cpgj.json<gh_stars>100-1000
{
"schema_version": "1.2.0",
"id": "GHSA-6v4r-9cp8-cpgj",
"modified": "2022-05-13T01:18:44Z",
"published": "2022-05-13T01:18:44Z",
"aliases": [
"CVE-2018-1000070"
],
"details": "Bitmessage PyBitmessa... | 596 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.