repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
Verckolf/MyInterfaceTest | venv/Lib/site-packages/celery/tests/backends/test_database.py | <reponame>Verckolf/MyInterfaceTest
from __future__ import absolute_import, unicode_literals
from datetime import datetime
from pickle import loads, dumps
from celery import states
from celery.exceptions import ImproperlyConfigured
from celery.utils import uuid
from celery.tests.case import (
AppCase,
SkipTe... |
manishksingh89/openairinterface5g | openair3/NAS/COMMON/NR_NAS_defs.h | <filename>openair3/NAS/COMMON/NR_NAS_defs.h
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses ... |
qsyttkx/geek_time_cpp | 24/test04_scope_exit.cpp | #include <stdio.h> // fopen/perror/puts
#include <boost/scope_exit.hpp> // BOOST_SCOPE_EXIT
void test()
{
FILE* fp = fopen("../boost_test04_scope_exit.cpp", "r");
if (fp == NULL) {
perror("Cannot open file");
}
BOOST_SCOPE_EXIT(&fp)
{
if (fp) {
fclose(fp);... |
abreu4/jina | tests/unit/executors/encoders/test_frameworks.py | import pytest
from jina.excepts import ModelCheckpointNotExist
from jina.executors.encoders.frameworks import BaseOnnxEncoder
def test_raised_exception():
with pytest.raises(ModelCheckpointNotExist):
BaseOnnxEncoder()
|
gudaoxuri/ez-framework | services/auth/src/main/scala/com/ecfront/ez/framework/service/auth/model/EZ_Resource.scala | package com.ecfront.ez.framework.service.auth.model
import com.ecfront.common.Resp
import com.ecfront.ez.framework.core.i18n.I18NProcessor.Impl
import com.ecfront.ez.framework.service.auth.CacheManager
import com.ecfront.ez.framework.service.jdbc._
import scala.beans.BeanProperty
/**
* 资源实体
*/
@Entity("Resource"... |
chris-blay/guillemot-core | rosWorkspace/mip_common/include/mip_common/mip_sdk_config.h | /////////////////////////////////////////////////////////////////////////////
//
//! @file mip_sdk_config.h
//! @author <NAME>
//! @version 1.0
//
//! @description Target-Specific Configuration
//
// External dependencies:
//
//
//
//! @copyright 2011 Microstrain.
//
//!@section CHANGES
//!
//... |
juturnas/go-sdk | secrets/option.go | package secrets
import (
"net/http"
"strconv"
)
// Option a thing that we can do to modify a request.
type Option func(req *http.Request)
// Version adds a version to the request.
func Version(version int) Option {
return func(req *http.Request) {
req.URL.Query().Add("version", strconv.Itoa(version))
}
}
// L... |
Robbbert/messui | src/mame/drivers/supduck.cpp | // license:BSD-3-Clause
// copyright-holders:<NAME>
/*********************************************************************************
Super Duck (c) 1992 Comad
hardware appears to be roughly based off Bionic Commando, close to the
Tiger Road / F1-Dream based Pushman / Bouncing Balls.
PCB Clocks as measure... |
ben-manes/jOOQ | jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/routines/PArrays1.java | /**
* This class is generated by jOOQ
*/
package org.jooq.test.oracle.generatedclasses.test.routines;
/**
* This class is generated by jOOQ.
*/
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class PArrays1 extends org.jooq.impl.AbstractRoutine<java.lang.Void> {
private static final long s... |
MrPii2/atT_j1550 | core/src/main/java/hudson/model/listeners/SCMPollListener.java | /*
* The MIT License
*
* Copyright (c) 2011, <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 without limitation the rights
* to use, copy, modi... |
clangen/autom8 | libautom8/include/autom8/message/request_handler_factory.hpp | <gh_stars>1-10
#ifndef __C_AUTOM8_REQUEST_HANDLER_FACTORY_HPP__
#define __C_AUTOM8_REQUEST_HANDLER_FACTORY_HPP__
#include <autom8/message/request_handler.hpp>
#include <boost/thread.hpp>
#include <boost/shared_ptr.hpp>
namespace autom8 {
class session;
class request_handler_factory;
typedef bo... |
karendolan/unitime | JavaSource/org/unitime/timetable/server/sectioning/SectioningReportTypesBackend.java | /*
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may... |
fossabot/erbridge-home | src/components/LogoParticle.test.js | <gh_stars>0
import { shallow } from 'enzyme';
import React from 'react';
import LogoParticle from './LogoParticle';
it('renders correctly with all props', () => {
expect(
shallow(
<LogoParticle
groupBoundingRect={{ top: 100, right: 200 }}
pointerPosition={{ x: 15, y: 25 }}
radius={... |
skpatel20/spring-app-boot | spring-lemon-commons-mongo/src/main/java/com/naturalprogrammer/spring/lemon/commonsmongo/AbstractDocument.java | <gh_stars>100-1000
/*
* Copyright 2020-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this artifact or file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/... |
thelostdeveloper/Conduit | src/main/java/systems/conduit/main/api/inventory/GUI.java | <gh_stars>0
package systems.conduit.main.api.inventory;
import com.google.common.collect.ImmutableList;
import systems.conduit.main.api.mixins.ServerPlayer;
/**
* @author Innectic
* @since 12/11/2020
*/
public interface GUI {
void open(ServerPlayer player);
void open(Iterable<ServerPlayer> pla... |
huguanghui/StartGo | utils/color.go | package utils
import (
"strconv"
)
var (
Black, White *Color
)
func init() {
initColorCube()
Black, _ = NewColor("#000000")
White, _ = NewColor("#ffffff")
}
type Color struct {
Red uint8
Green uint8
Blue uint8
}
func NewColor(hex string) (*Color, error) {
red, err := strconv.ParseUint(hex[0:2], 16, 8)
... |
dairongpeng/leona | internal/apiserver/run.go | // Copyright 2021 dairongpeng <<EMAIL>>. 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... |
j-zhen/UXAspects | src/ng1/directives/previewPanes/previewPane.module.js | <reponame>j-zhen/UXAspects<filename>src/ng1/directives/previewPanes/previewPane.module.js
import PreviewPaneProvider from './previewPane.provider.js';
import PreviewPaneDirective from './previewPane/previewPane.directive.js';
import PreviewPaneController from './previewPane/previewPane.controller.js';
import PreviewP... |
Chun-Jie-Group/pipelines | pipelines/wdl-smRNA/miRNA_scripts/Main.py | #! /usr/bin/env python2.7
from __future__ import division
import os,sys,re,argparse,collections,time,datetime,itertools,config_parser
__author__='zhangq'
__Email__ = '<EMAIL>'
def get_analysis_option():
my_cmdparser = argparse.ArgumentParser(description='This py is used to generate dir and shell for miRNA analysis.... |
benjohnson/devspace | pkg/devspace/services/targetselector/waiting_strategy.go | package targetselector
import (
"context"
"github.com/loft-sh/devspace/pkg/devspace/kubectl"
"github.com/loft-sh/devspace/pkg/devspace/kubectl/selector"
"github.com/loft-sh/devspace/pkg/util/log"
v1 "k8s.io/api/core/v1"
)
// WaitingStrategy defines how the target selector should wait
type WaitingStrategy interfa... |
automatejs/automate | src/directive/switch/switch-default.js | <reponame>automatejs/automate
import { Directive } from '../../view';
import { directive } from '../../decorator';
@directive({
namespace: 'automate',
key: 'switchDefault'
})
class SwitchDefaultDirective extends Directive {
constructor() {
super();
this.switchCtrl = null;
this.$plac... |
linminglu/Fgame | cross/tulong/event/listener/biology_killed.go | <reponame>linminglu/Fgame<filename>cross/tulong/event/listener/biology_killed.go
package listener
import (
"fgame/fgame/core/event"
"fgame/fgame/cross/tulong/pbutil"
tulongscene "fgame/fgame/cross/tulong/scene"
"fgame/fgame/cross/tulong/tulong"
gameevent "fgame/fgame/game/event"
sceneeventtypes "fgame/fgame/game... |
TheTHINGYEEE/ParkourPlugin | src/main/java/com/github/thethingyee/parkourplugin/listeners/ParkourLeaveListeners.java | package com.github.thethingyee.parkourplugin.listeners;
import com.github.thethingyee.parkourplugin.ParkourPlugin;
import com.github.thethingyee.parkourplugin.scoreboards.ArenaScoreboard;
import com.github.thethingyee.parkourplugin.scoreboards.HubScoreboard;
import com.github.thethingyee.parkourplugin.scoreboards.Park... |
steppat/caelum-stella | stella-nfe/src/main/java/br/com/caelum/stella/nfe/fluid/PISOutrasOperacoes.java | package br.com.caelum.stella.nfe.fluid;
@net.vidageek.fluid.annotations.FluidClass(br.com.caelum.stella.nfe.modelo.PISOutr.class)
public interface PISOutrasOperacoes<T> extends net.vidageek.fluid.FluidInterface<T> {
@net.vidageek.fluid.annotations.FluidField("cst")
PISOutrasOperacoes<T> withCst(java.lang.Stri... |
kadel/ocdev | tests/integration/devfile/cmd_logs_test.go | <reponame>kadel/ocdev
package devfile
import (
"path/filepath"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/redhat-developer/odo/tests/helper"
)
var _ = Describe("odo logs command tests", func() {
var componentName string
var commonVar helper.CommonVar
var _ = BeforeEach(func() {
commo... |
luoyuan3471/hadoop | hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/impl/IOStatisticsStoreBuilder.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 licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
stpangst/onemall | pay-service-project/pay-service-app/src/main/java/cn/iocoder/mall/payservice/convert/transaction/TransactionConvert.java | <gh_stars>1-10
package cn.iocoder.mall.payservice.convert.transaction;
import cn.iocoder.common.framework.vo.PageResult;
import cn.iocoder.mall.payservice.dal.mysql.dataobject.transaction.TransactionDO;
import cn.iocoder.mall.payservice.service.transaction.bo.TransactionBO;
import cn.iocoder.mall.payservice.service.tr... |
Cenfotec/ObjectOrientedProgramming | Classwork/Classwork 13/EstructuraDatos/src/org/bonilla/bl/PilaLibros.java | <filename>Classwork/Classwork 13/EstructuraDatos/src/org/bonilla/bl/PilaLibros.java
package org.bonilla.bl;
import org.bonilla.dl.Apilable;
public class PilaLibros implements Apilable {
private Libro[] libros;
private int cabeza = -1;
public PilaLibros() {
}
public PilaLibros(int size) {
... |
tangerstein/inspectit-oce | inspectit-ocelot-core/src/main/java/rocks/inspectit/ocelot/core/tags/ICommonTagsProvider.java | <reponame>tangerstein/inspectit-oce<filename>inspectit-ocelot-core/src/main/java/rocks/inspectit/ocelot/core/tags/ICommonTagsProvider.java<gh_stars>10-100
package rocks.inspectit.ocelot.core.tags;
import rocks.inspectit.ocelot.config.model.InspectitConfig;
import java.util.Map;
public interface ICommonTagsProvider {... |
tankbing/dubbo-mock | mock_po/src/main/java/com/tony/test/mock/po/RegistryConfig.java | package com.tony.test.mock.po;
import java.util.Date;
public class RegistryConfig {
private Integer id;
private String registryProtocol;
private String registryAddress;
private Integer registryTimeout;
private Date updateTime;
public Integer getId() {
return id;
... |
Devfast83/coinchart | src/containers/DurationTabs/index.js | import PropTypes from "prop-types";
import React from "react";
import { connect } from "react-redux";
import Tabs from "../../components/Tabs";
import { DEFAULT_PROPS, DURATION_LIST, PROPTYPES } from "../../constants";
import { SettingsActions, SettingsSelectors } from "../../store/settings";
const DurationTabs = ({ ... |
jbdelcuv/openenclave | enclave/core/optee/stubs.c | // Copyright (c) Open Enclave SDK contributors.
// Licensed under the MIT License.
#include <openenclave/enclave.h>
#include <openenclave/internal/defs.h>
/* These are functions referenced by libutee that are left out while compiling
* it for inclusion in the SDK.
*/
void _oe_trace_set_level(int level)
{
OE_UN... |
Masternode24/hubble | app/assets/javascripts/page/livepeer/report-show.js | $(document).ready(function() {
if (!_.includes(App.mode, 'report-show')) {
return;
}
new App.Livepeer.ReportTable($('.report-table')).render();
});
|
chrisprice/creating-d3-components | node_modules/d3fc/src/indicator/algorithm/calculator/percentageChange.js | (function(d3, fc) {
'use strict';
fc.indicator.algorithm.calculator.percentageChange = function() {
var baseIndex = d3.functor(0),
value = fc.util.fn.identity;
var percentageChange = function(data) {
if (data.length === 0) {
return [];
}
... |
BillMills/AutoQC | util/geo.py | <gh_stars>10-100
from datetime import datetime
import numpy as np
import math
def haversine(theta):
'''
haversine.
'''
return math.sin(theta/2)**2
def arcHaversine(hs):
'''
inverts haversine
'''
sqrths = math.sqrt(hs)
if sqrths > 1:
sqrths = round(sqrths, 10)
return... |
Alexhuszagh/funxx | pycpp/allocator/crt.h | // :copyright: (c) 2017 <NAME>.
// :license: MIT, see licenses/mit.md for more details.
/**
* \addtogroup PyCPP
* \brief C-runtime allocator.
*
* A shallow wrapper around `malloc` and `free`. This allocator
* has poor performance, and therefore should be used sparingly.
*
* \synopsis
* template <typ... |
Yuunagi-Yu/NumberDisk | Project/Temp/StagingArea/Data/il2cppOutput/Mono_Security_Mono_Security_Protocol_Tls_Certificat989458295MethodDeclarations.h | #pragma once
#include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <stdint.h>
#include <assert.h>
#include <exception>
// Mono.Security.Protocol.Tls.CertificateValidationCallback
struct CertificateValidationCallback_t989458295;
// System.Object
struct Il2CppObj... |
cheehieu/laser-stranger | software/firmware_nrf52/nRF5_SDK_15.0.0_a53641a/components/drivers_ext/elliegrid/ble_egs/ble_egs.h | <filename>software/firmware_nrf52/nRF5_SDK_15.0.0_a53641a/components/drivers_ext/elliegrid/ble_egs/ble_egs.h
#ifndef BLE_EGS_H__
#define BLE_EGS_H__
#include <stdint.h>
#include <stdbool.h>
#include "ble.h"
#include "ble_srv_common.h"
#include "nrf_sdh_ble.h"
#ifdef __cplusplus
extern "C" {
#endif
/**@brief Macro ... |
kbiesiadecki141/roscfe | cfs_converter/relay_base/relay_app_base/fsw/src/convert/tf/LinearMath/MinMax.h | <reponame>kbiesiadecki141/roscfe
/*
**
** Copyright (c) 2020 Japan Aerospace Exploration Agency.
** All Rights Reserved.
**
** This file is covered by the LICENSE.txt in the root of this project.
**
*/
#ifndef MIN_MAX_H
#define MIN_MAX_H
#include "cfe.h"
template <class T> TFSIMD_FORCE_INLINE const T &tfMin(const ... |
laoxiaoo/learning | flowable/src/test/java/com/xiao/Test.java | package com.xiao;
import com.greenpineyu.fel.FelEngine;
import com.greenpineyu.fel.FelEngineImpl;
import com.greenpineyu.fel.context.FelContext;
/**
* @author 肖杰
* @version 1.
* @ClassName Test.java
* @Description TODO
* @createTime 2021年01月22日 14:34:00
*/
public class Test {
@org.junit.Test
public vo... |
janniclas/phasar | test/llvm_test_code/constness/global/global_05.cpp | /* g, i | @g, %1 (ID: 0, 4) | mem2reg */
int *g;
void foo() { *g = 99; }
int main() {
int i = 42;
g = &i;
foo();
return 0;
}
|
richtermark/smeagonline | web/bundles/topxiaadmin/js/controller/open-course-analysis/referer.js | <filename>web/bundles/topxiaadmin/js/controller/open-course-analysis/referer.js
define(function(require, exports, module) {
require('echarts');
var EchartsConfig = require('./pie-charts-config');
exports.run = function() {
var myChart = echarts.init(document.getElementById('echats-pie'));
var config = new Echart... |
copslock/o-ran_o-du_l2 | src/du_app/du_msg_hdl.c | <filename>src/du_app/du_msg_hdl.c<gh_stars>0
/*******************************************************************************
################################################################################
# Copyright (c) [2017-2019] [Radisys] #
# ... |
wuzhl2018/samples | DateTime/main.cpp | #include <iostream>
#include "DateTime.hpp"
int main()
{
std::string timeStr = DateTime::convert<std::string>(time(nullptr));
std::cout << timeStr << std::endl;
std::cout << DateTime::convert<time_t>(timeStr) << std::endl;
std::cout << DateTime::currentTime() << std::endl << std::endl;
return 0;
}... |
chrisRintjema/bugsnag-go | gin/gin_test.go | package bugsnaggin_test
import (
"fmt"
"net/http"
"os"
"testing"
"time"
"github.com/bitly/go-simplejson"
"github.com/bugsnag/bugsnag-go"
"github.com/bugsnag/bugsnag-go/gin"
. "github.com/bugsnag/bugsnag-go/testutil"
"github.com/gin-gonic/gin"
)
func TestGin(t *testing.T) {
ts, reports := Setup()
defer ts... |
byterom/android_external_chromium_org_v8 | src/base/bits.cc | // Copyright 2014 the V8 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.
#include "src/base/bits.h"
#include "src/base/logging.h"
namespace v8 {
namespace base {
namespace bits {
uint32_t RoundUpToPowerOfTwo32(uint32_t valu... |
dzaima/UI | src/dzaima/ui/node/prop/PropI.java | <filename>src/dzaima/ui/node/prop/PropI.java
package dzaima.ui.node.prop;
public abstract class PropI extends Prop {
}
|
sciencelabshs/lara | db/migrate/20180605181922_add_student_report_enabled.rb | <reponame>sciencelabshs/lara<gh_stars>1-10
class AddStudentReportEnabled < ActiveRecord::Migration
def change
add_column :lightweight_activities, :student_report_enabled, :boolean, :default => true
end
end
|
sibasish-palo/emodb | common/astyanax/src/main/java/com/bazaarvoice/emodb/common/cassandra/metrics/MetricConnectionPoolMonitor.java | package com.bazaarvoice.emodb.common.cassandra.metrics;
import com.codahale.metrics.Gauge;
import com.codahale.metrics.MetricRegistry;
import com.google.inject.Inject;
import com.netflix.astyanax.connectionpool.impl.CountingConnectionPoolMonitor;
/**
* Implementation of {@link com.netflix.astyanax.connectionpool.Con... |
PradeepSingh1988/validation-app-engine | axon/common/metric_cache.py | <gh_stars>0
import abc
import logging
from threading import Event, Lock, Thread
import time
class Counter(object):
def __init__(self):
self._lock = Lock()
self._count = 0
def inc(self, val=1):
"""Increase the value of the counter."""
with self._lock:
self._count +... |
BonexGu/Blik2D | Blik2D/addon/libssh2-1.6.0_for_blik/src/publickey.c | <reponame>BonexGu/Blik2D
/* Copyright (c) 2004-2007, <NAME> <<EMAIL>>
* Copyright (c) 2010-2014 by <NAME>
* 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 ... |
zhoxie-cisco/datahub | metadata-ingestion/src/datahub/metadata/com/linkedin/events/__init__.py | <reponame>zhoxie-cisco/datahub
# flake8: noqa
# This file is autogenerated by /metadata-ingestion/scripts/avro_codegen.py
# Do not modify manually!
# fmt: off
from ....schema_classes import KafkaAuditHeaderClass
KafkaAuditHeader = KafkaAuditHeaderClass
# fmt: on
|
eshelmarc/noobaa-core | src/server/object_services/schemas/object_multipart_schema.js | /* Copyright (C) 2016 NooBaa */
'use strict';
module.exports = {
id: 'multipart_schema',
type: 'object',
required: [
'_id',
'system',
'bucket',
'obj',
'num',
],
properties: {
_id: {
objectid: true
},
deleted: {
... |
umjammer/tritonus | tritonus-saol/src/main/java/org/tritonus/saol/engine/RTSystem.java | <filename>tritonus-saol/src/main/java/org/tritonus/saol/engine/RTSystem.java
/*
* Copyright (c) 2002 by <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://w... |
LightBitsLabs/mongo | src/third_party/mozjs-38/extract/js/src/proxy/Proxy.h | <gh_stars>10-100
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* 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.... |
ScalablyTyped/SlinkyTyped | r/react-native/src/main/scala/typingsSlinky/reactNative/mod/SectionListScrollParams.scala | <gh_stars>10-100
package typingsSlinky.reactNative.mod
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.native
trait SectionListScrollParams extends StObject {
var anim... |
ashutoshcipher/oozie | tools/src/test/java/org/apache/oozie/tools/OozieSharelibFileOperations.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 licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... |
miaortizma/competitive-programming | online_judges/Vjudge/Training/d/d.cpp | #include<bits/stdc++.h>
using namespace std;
const int N = 1e6;
int a, b, k;
int lp[N + 1];
vector<int> pr;
bool f(int m) {
//cerr << "test: " << m << "\n";
int l = a, r = a + m - 1;
int cnt = 0;
for (int i = 0; i < m; ++i) {
if (lp[a + i] == a + i)
cnt++;
//cerr << a + i << " ";
}
//cerr <<... |
pepsi7959/OpenstudioThai | openstudiocore/src/energyplus/ForwardTranslator/ForwardTranslateEvaporativeCoolerIndirectResearchSpecial.cpp | <filename>openstudiocore/src/energyplus/ForwardTranslator/ForwardTranslateEvaporativeCoolerIndirectResearchSpecial.cpp
/**********************************************************************
* Copyright (c) 2008-2015, Alliance for Sustainable Energy.
* All rights reserved.
*
* This library is free software; you ... |
ouankou/rose | projects/MatlabTranslation/src/transformations/MatrixTypeTransformer.cc |
#include <numeric>
#include "MatrixTypeTransformer.h"
#include "rose.h"
#include "sageGeneric.h"
#include "utility/utils.h"
namespace sb = SageBuilder;
namespace ru = RoseUtils;
namespace MatlabToCpp
{
// \note see below for an alternative approach
struct MatrixTypeSetter : AstSimpleProcessing
{
typede... |
zealoussnow/chromium | chrome/browser/extensions/installed_loader.h | <filename>chrome/browser/extensions/installed_loader.h
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_
#define CHROME_BROWSER_EXTENSIONS_INSTALL... |
RainbowKiwiFOX/AuthMeFixed | src/main/java/fr/xephi/authme/converter/SqlToFlat.java | package fr.xephi.authme.converter;
import java.util.List;
import org.bukkit.command.CommandSender;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.ConsoleLogger;
import fr.xephi.authme.cache.auth.PlayerAuth;
import fr.xephi.authme.datasource.DataSource;
import fr.xephi.authme.datasource.FlatFileThread;
import ... |
yyvess/spring-data-rest | spring-data-rest-tests/spring-data-rest-tests-jpa/src/test/java/org/springframework/data/rest/webmvc/RepositoryPropertyReferenceControllerIntegrationTests.java | <reponame>yyvess/spring-data-rest<gh_stars>100-1000
/*
* Copyright 2015-2021 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... |
CommandPost/FinalCutProFrameworks | Headers/Frameworks/Ozone/OZCacheDisplayManager.h | //
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Mar 11 2021 20:53:35).
//
// Copyright (C) 1997-2019 <NAME>.
//
#import <objc/NSObject.h>
@class NSMutableArray, NSTimer, OZCanvasModule;
@interface OZCacheDisplayManager : NSObject
{
OZCanvasModule *_pCanvas;
struct OZFrameSet *_pFrames... |
didizlatkova/tvityr | bl/passport.js | <gh_stars>0
var FACEBOOK_APP_ID = process.env.FACEBOOK_APP_ID || "id",
FACEBOOK_APP_SECRET = process.env.FACEBOOK_APP_SECRET || "secret",
FacebookStrategy = require('passport-facebook').Strategy;
module.exports = function(passport, database) {
var usersDb = database.collection('users'),
users = re... |
1690296356/jdk | test/langtools/tools/javac/annotations/typeAnnotations/TypeAnnotationsPositionsOnRecords.java | /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Softwa... |
pop/wash | plugin/findEntry_test.go | package plugin
import (
"context"
"fmt"
"testing"
"github.com/puppetlabs/wash/datastore"
"github.com/stretchr/testify/assert"
)
type mockParent struct {
EntryBase
entries []Entry
}
func (g *mockParent) List(context.Context) ([]Entry, error) {
return g.entries, nil
}
func (g *mockParent) ChildSchemas() []*E... |
lulululululu/cpp_client_telemetry | tests/common/MockIBandwidthController.hpp | //
// Copyright (c) 2015-2020 Microsoft Corporation and Contributors.
// SPDX-License-Identifier: Apache-2.0
//
#pragma once
#include "utils/Utils.hpp"
#include "IBandwidthController.hpp"
namespace testing {
class MockIBandwidthController : public MAT::IBandwidthController
{
public:
MOCK_METHOD0(GetProposedBa... |
aliaksandr-klimovich/sandbox | language/patterns/observer.py | <filename>language/patterns/observer.py<gh_stars>1-10
# https://en.wikipedia.org/wiki/Observer_pattern
class Observable:
def __init__(self):
self.__observers = []
def register_observer(self, observer):
self.__observers.append(observer)
def notify_observers(self, *args, **kwargs):
... |
JRF-tw/sunshine.jrf.org.tw | app/contexts/party/schedule_score_create_context.rb | <filename>app/contexts/party/schedule_score_create_context.rb
class Party::ScheduleScoreCreateContext < BaseContext
PERMITS = [:court_id, :year, :word_type, :number, :story_type, :start_on,
:confirmed_realdate, :judge_name, :note, :appeal_judge].freeze +
ScheduleScore.stored_attributes[:attit... |
dkandalam/borrow-ui | packages/ui/src/components/grid/grid.test.js | import React from 'react';
import { render, screen } from '@testing-library/react';
import { Row, Col } from './Grid';
describe('Grid = Row and Col ', () => {
test('renders Row', () => {
render(<Row>Content</Row>);
const content = screen.getByText('Content');
expect(content).toHaveClass(`... |
romanroson/pis_code | practicioner_bundle/ch06-ensembles/test_ensemble.py | <gh_stars>1-10
# -*- coding: utf-8 -*-
"""Evaluating an Ensemble
First, the best possible model has to be found. Then, usually 5-10 CNN models ara
used for an ensemble. Based on Jensen’s Inequality the performance of an ensemble
cannot be worse than a single model
Example:
$ python test_ensemble.py --models model... |
lolcats111/JDBC-Project-Group-B | src/com/dao/LoginDao.java | package com.dao;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import com.util.DBUtil;
public class LoginDao {
public LoginDao() {
super();
}
public byte[] getClarkHash(String username) {
byte[] clarkHash = null;
try {
// Step 2: ... |
pioneerAlpha/CP_Beginner_B2_Amar_iSchool | class 04 - solve class 1/E.cpp | #include<bits/stdc++.h>
#define N ((int)1e6 + 5)
#define ll long long
#define fastio ios_base::sync_with_stdio(false),cin.tie(NULL)
#define MAX ((int)1e6 + 5)
#define endl "\n"
using namespace std;
int arr[1005];
int main()
{
fastio;
int n , m , k;
cin>>n>>m>>k;
for(int i = 0 ; i<=m ; i++) cin>>arr[i... |
ufopilot/QT-App-Builder | builder/widgets/label_horizontal/label_horizontal.py | from qt_core import *
class LabelHorizontal(QLabel):
def __init__(self, *args):
QLabel.__init__(self, *args)
def paintEvent(self, event):
painter = QPainter(self)
painter.translate(0, self.height())
#painter.rotate(-90)
# calculate the size of the font
fm = QFo... |
steve-phan/suadienthoai | src/components/Cart/ReviewOder/index.js | import { Link, navigate } from "gatsby"
import React, { useState, useEffect } from "react"
import { useDispatch, useSelector } from "react-redux"
import {
clearCart,
checkCheckoutSession,
} from "../../../redux/Cart/cart.actions"
// import SEO from "../SEO"
// EmailJS
import emailjs, { init } from "emailjs-com"
... |
sjrd/closure-compiler | test/com/google/javascript/jscomp/CheckGlobalThisTest.java | /*
* Copyright 2007 The Closure Compiler 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... |
jeffpanici75/programmers-calculator | shell/src/main/java/io/nybbles/progcalc/shell/Program.java | <filename>shell/src/main/java/io/nybbles/progcalc/shell/Program.java
package io.nybbles.progcalc.shell;
import io.nybbles.progcalc.common.Result;
import io.nybbles.progcalc.shell.contracts.Configuration;
import io.nybbles.progcalc.shell.gui.GuiShell;
import io.nybbles.progcalc.shell.terminal.TerminalShell;
import org.... |
pranitpingale/gitJenkinsAllureCucumber16Feb19 | node_modules/wdio-visual-regression-service/src/methods/SaveScreenshot.js | <gh_stars>0
import fs from 'fs-promise';
import BaseCompare from './BaseCompare';
import debug from 'debug';
const log = debug('wdio-visual-regression-service:SaveScreenshot');
export default class SaveScreenshot extends BaseCompare {
constructor(options = {}) {
super();
this.getScreenshotFile = options.sc... |
oyahiroki/nlp4j | nlp4j/nlp4j-wordnet/src/main/java/nlp4j/wordnetja/package-info.java | <reponame>oyahiroki/nlp4j<gh_stars>1-10
/**
* @author <NAME>
*
*/
package nlp4j.wordnetja; |
rancherdev/ui | app/components/schema/input-masked/component.js | import Ember from 'ember';
export default Ember.TextField.extend({
classNames: ['form-control'],
type: 'password'
});
|
nokia/osgi-microfeatures | com.alcatel.as.service.api/src/com/alcatel/as/service/management/Shutdownable.java | <gh_stars>0
// Copyright 2000-2021 Nokia
//
// Licensed under the Apache License 2.0
// SPDX-License-Identifier: Apache-2.0
//
package com.alcatel.as.service.management;
/**
* An interface to any contributor to the graceful shutdown mechanism
*
*/
public interface Shutdownable {
/**
* invoked during shutdown ... |
uluuka/3box-dapp | src/interface/store/departments/ipfs/selectors.js | export const initialState = {}
export const getDeltaData = (state,delta) =>state[delta] && state[delta].data || null
export const getDeltaStatus = (state,delta) =>state[delta] && state[delta].status || null
export const getDeltaStarting = (state, starts) => Object.keys(state).filter(item => item.startsWith(starts)).map... |
dinorhythms/Teamwork-Backend | src/validation/JoiValidator.js | <filename>src/validation/JoiValidator.js<gh_stars>0
import Joi from '@hapi/joi';
/** *
* Object that help to validate request details
*/
const JoiValidation = {
validateString() {
return Joi.string();
},
validateEmail() {
return Joi.string().email();
},
validatePassword() {
return Joi.strin... |
git4wht/cloudbreak | core/src/main/java/com/sequenceiq/cloudbreak/reactor/api/event/recipe/UpscalePostRecipesRequest.java | <reponame>git4wht/cloudbreak
package com.sequenceiq.cloudbreak.reactor.api.event.recipe;
import java.util.Set;
import com.sequenceiq.cloudbreak.reactor.api.event.resource.AbstractClusterScaleRequest;
public class UpscalePostRecipesRequest extends AbstractClusterScaleRequest {
public UpscalePostRecipesRequest(Lo... |
jpmml/jpmml | pmml-evaluator/src/main/java/org/jpmml/evaluator/ArrayUtil.java | <filename>pmml-evaluator/src/main/java/org/jpmml/evaluator/ArrayUtil.java<gh_stars>10-100
/*
* Copyright (c) 2012 University of Tartu
*/
package org.jpmml.evaluator;
import java.util.*;
import org.jpmml.manager.*;
import org.dmg.pmml.*;
import com.google.common.base.*;
import com.google.common.cache.*;
import com... |
RUB-NDS/TLS-Attacker | TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/constants/MaxFragmentLength.java | /**
* TLS-Attacker - A Modular Penetration Testing Framework for TLS
*
* Copyright 2014-2022 Ruhr University Bochum, Paderborn University, Hackmanit GmbH
*
* Licensed under Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0.txt
*/
package de.rub.nds.tlsattacker.core.constants;
import java... |
Quicksilver-Project/quicksilveruml | src/uml/state_machine_diagram.h | #include "behavior_diagram.h"
/**~UML Diagram Interchange~
* A_UMLStateMachine_modelElement_umlDiagramElement [Association]
*
* Owned Ends
*
* umlDiagramElement : UMLStateMachineDiagram [0..*]
* {redefines
* A_UMLBehaviorDiagram_modelElement_umlDiagramElement
* ::umlDiagramElement} (opposite
* UMLStateMach... |
denezt/software-design-patterns | solid/single_responsibility_principle/cohesion/refactoring/Main.java |
class Main {
public static void main(String[] args){
Square square = new Square();
square.calculateArea();
System.out.println("Value of square: " + String.valueOf(square.side));
SquareUI squareUI = new SquareUI();
for ( int i = 0; i < 100; i++) {
if ((i * square.side) > 0){
squareUI.rotate(i * 5 * ... |
markhorsfield/py4e101 | other-proj/sandwich.func.py | <filename>other-proj/sandwich.func.py
#!/usr/bin/python3
def sandwich(kind):
print("-------")
print(kind())
print("-------")
def blt():
my_blt = " bacon\nlettuce\n tomato"
return my_blt
def bfast():
my_ec = " eggegg\ncheese"
return my_ec
sandwich(blt)
|
retrohead/openmenu | ui/ui_gdmenu.h | /*
* File: ui_gdmenu.h
* Project: ui
* File Created: Sunday, 13th June 2021 12:33:33 pm
* Author: <NAME>
* -----
* Copyright (c) 2021 <NAME>, <NAME>
* License: BSD 3-clause "New" or "Revised" License, http://www.opensource.org/licenses/BSD-3-Clause
*/
#pragma once
#define UI_NAME GDMENU_EMU
#define MAKE_FN(n... |
clkbit123/TheOpenHarmony | Openharmony v1.0/foundation/graphic/lite/services/wms/include/server/lite_wms.h | <gh_stars>0
/*
* Copyright (c) 2020 Huawei Device 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 app... |
kolinkrewinkel/Multiplex | Multiplex/IDEHeaders/IDEHeaders/IDEFoundation/IDEItemReferenceWrapper.h | //
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by <NAME>.
//
#import "CDStructures.h"
#import <IDEFoundation/IDEContainerItemWrapper.h>
@interface IDEItemReferenceWrapper : IDEContainerItemWrapper
{
}
- (void)setUsesTabs:(BOOL)arg1;
- (BOOL)usesT... |
mohnjahoney/website_source | plugins/similar_posts/similar_posts.py | """
Similar Posts plugin for Pelican.
Adds a `similar_posts` list to every article's context.
"""
import logging
import math
import os
from pelican import signals
from gensim import corpora, models, similarities
logger = logging.getLogger(__name__)
def add_similar_posts(generator):
max_count = generator.setti... |
liaoheng/Common | common-ui/src/main/java/com/github/liaoheng/common/ui/widget/CURightClickVisibleContentEditText.java | package com.github.liaoheng.common.ui.widget;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import com.github.liaoheng.common.ui.R;
import com.github.liaoheng.common.util.UIUtils;
import androidx.core.content.Contex... |
contesini/redux-subspace | packages/react-redux-subspace/test/hooks/useParentSpace-spec.js | /**
* Copyright 2017, IOOF Holdings Limited.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from "react"
import { Provider } from "react-redux"
import configureStore from "redux-mock-store"... |
KollegeX/DsaTabForMe | DsaTab/src/main/java/com/dsatab/data/Dice.java | <reponame>KollegeX/DsaTabForMe
package com.dsatab.data;
import android.text.TextUtils;
import com.dsatab.util.Debug;
import com.dsatab.util.Util;
import java.security.SecureRandom;
import java.util.Random;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Dice {
public static class Dice... |
MythicalFish/mythical.fish | src/components/icons/solid/WindowRestore.js | import React from 'react'
const WindowRestore = props => (
<svg
fill='currentColor'
viewBox='0 0 512 512'
width='1em'
height='1em'
{...props}
>
<path d='M512 48v288c0 26.5-21.5 48-48 48h-48V176c0-44.1-35.9-80-80-80H128V48c0-26.5 21.5-48 48-48h288c26.5 0 48 21.5 48 48zM384 176v288c0 26.5-21.... |
SUNNYKIMM/tmax_front_sample | ReactProjectSample/ReactProjectSample/flone/src/layouts/LayoutThree.js | <reponame>SUNNYKIMM/tmax_front_sample
import PropTypes from "prop-types";
import React, { Fragment } from "react";
import HeaderOne from "../wrappers/header/HeaderOne";
import FooterTwo from "../wrappers/footer/FooterTwo";
const LayoutThree = ({
children,
headerContainerClass,
headerTop,
headerBorderStyle,
h... |
Arihant25/beginner-python-projects | ISS_tracker.py | <reponame>Arihant25/beginner-python-projects
import requests
import smtplib
from time import sleep
from datetime import datetime, timezone
MY_LAT = 20.368090 # Your latitude
MY_LONG = 86.155860 # Your longitude
MY_EMAIL = '<EMAIL>' # Your email
MY_PASSWORD = '<PASSWORD>' # Your password
SMTP_SERVER = 'smtp.office3... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.