repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
deapplegate/wtgpipeline | adam-nedgals2mygals/match_specz_and_bpz_cats.py | #! /usr/bin/env python
#adam-does# matches the redshifts from our pipeline/bpz to external reference redshifts
#adam-example# ipython -i -- ./match_specz_and_bpz_cats.py nedcat bpzcat =astropy.io.ascii.read("/u/ki/awright/bonnpipeline/adam_ned_MACS1226+21_galaxies.tsv")
#adam-example# ipython -i -- ./match_specz_and_bp... |
weucode/COMFORT | artifact_evaluation/data/codeCoverage/codealchemist_generate/164.js | <reponame>weucode/COMFORT<gh_stars>10-100
var v0 = (function (v1, v2, v3){
var v4 = v3(217), v5 = v3(169), v6 = "[object AsyncFunction]", v7 = "[object Function]", v8 = "[object GeneratorFunction]", v9 = "[object Proxy]";
(v1.exports) = (function (v1){
if(! v5(v1)){
return ! 1;
}
var v2 = v4(v1);
return ((((v2) == (v7)... |
trettstadtnlb/openjpa | openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Localizer.java | <reponame>trettstadtnlb/openjpa
/*
* 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, Vers... |
mdger/uboote | client/LaserPiratesClient/src/game/gui/component/PlayerInput.java | <reponame>mdger/uboote
package game.gui.component;
import game.controller.LevelController;
import game.level.SubmitObject;
import game.module.geometry.shape.LinearFunction;
import javafx.scene.Node;
/**
* PlayerInput interface
* @author Marco
*/
public interface PlayerInput {
public void draw();
publi... |
dkupchenko/spring-sandbox | scheduled-timezone/src/main/java/info/kupchenko/sandbox/spring/scheduled/family/Pet.java | package info.kupchenko.sandbox.spring.scheduled.family;
/**
* The Pet ...
*
* @author by <NAME>
* @version 1.0
* Created on 07.03.2020
* Last review on 07.03.2020
*/
public interface Pet extends Essence {
void stroke(Essence sender);
void play(Essence sender) throws InterruptedException;
}
|
securekey/fabric-snaps | metrics/pkg/util/util.go | /*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package util
import (
"regexp"
"strings"
kitstatsd "github.com/go-kit/kit/metrics/statsd"
"github.com/hyperledger/fabric-sdk-go/pkg/common/logging"
"github.com/hyperledger/fabric/common/metrics"
"github.com/h... |
wfu8/lightwave | vmidentity/samlauthority/src/main/java/com/vmware/identity/saml/PrincipalAttributeDefinition.java | /*
* Copyright (c) 2012-2015 VMware, 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 ... |
panosant/ocp | src/main/java/com/antonakospanos/oca/m09exceptions/examples/MyResource.java | <gh_stars>0
package com.antonakospanos.oca.m09exceptions.examples;
import java.io.IOException;
public class MyResource implements AutoCloseable {
@Override
public void close() throws IOException {
try {
// close resource
} catch (Exception e) {
throw new IOException("Could not close resource. Cause: ", e... |
tdiprima/code | recipes/Python/578471_Multiple_unique_class_instances__tentative/recipe-578471.py | >>> import base
>>> class UniqueSub(base.UniqueBase):
def __init__(self, unique_id, a=1, b=2, **kw_args):
super(UniqueSub, self).__init__(unique_id, **kw_args)
self.a = a
self.b = b
>>> first = UniqueSub("item 1")
>>> second = UniqueSub("item 2", a=4, b=7) # keyword arguments are required
>>... |
nistefan/cmssw | RecoVertex/NuclearInteractionProducer/plugins/NuclearInteractionEDProducer.cc | #include "RecoVertex/NuclearInteractionProducer/interface/NuclearInteractionEDProducer.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "DataFormats/VertexReco/interface/NuclearInteractionFwd.h"
#include "RecoVertex/NuclearInteractionProducer/interface/NuclearVertexBuilder.h"
#include "RecoVertex... |
exialym/React | React-example/modules/ReduxTodo/Component/Footer.js | <filename>React-example/modules/ReduxTodo/Component/Footer.js
import React, { Component } from 'react'
import {setFilter} from '../actions'
//Filter子组件
const Link = ({active,children,onClick}) => {
if (active) {
return <span>{children}</span>
}
return (
<a href="#" onClick={e => {
e.preventDefault()... |
hackervipvhp/CoinExchange | 00_framework/core/src/main/java/com/bizzan/bitrade/dao/ActivityDao.java | package com.bizzan.bitrade.dao;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.stereotype.Repository;
import co... |
samuVillegas/peckyPet | backend/useCases/Post/CreatePost/index.js | const FileRepositoryPostgres = require('../../../repositories/implementations/FileRepositoryPostgres');
const PostRepositoryPostgres = require('../../../repositories/implementations/PostRepositoryPostgres');
const CreatePostUseCase = require('./CreatePostUseCase')
const CreatePostController = require('./CreatePostContr... |
Klebert-Engineering/zserio-1 | test/errors/templates_error/java/templates_error/TemplatesErrorTest.java | <filename>test/errors/templates_error/java/templates_error/TemplatesErrorTest.java
package templates_error;
import static org.junit.Assert.*;
import org.junit.BeforeClass;
import org.junit.Test;
import java.io.IOException;
import test_utils.ZserioErrors;
public class TemplatesErrorTest
{
@BeforeClass
publi... |
Nuthi-Sriram/C | Pointers/Dereferencing a void pointer.c | /*P9.26 Dereferencing a void pointer*/
#include<stdio.h>
int main(void)
{
int a=3;
float b=3.4,*fp=&b;
void *vp;
vp=&a;
printf("Value of a = %d\n",*(int *)vp);
*(int *)vp = 12;
printf("Value of a = %d\n",*(int *)vp);
vp=fp;
printf("Value of b = %f\n",*(float *)vp);
return 0;
}
|
Uniandes-isis2603/s1_MaratonesProgramacion_201910 | s1_maratones-back/src/test/java/co/edu/uniandes/csw/maratones/test/persistence/CompetenciaPersistenceTest.java | <gh_stars>0
/*
* 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 co.edu.uniandes.csw.maratones.test.persistence;
import co.edu.uniandes.csw.maratones.entities.Competencia... |
cybervisiontech/coopr | coopr-server/src/main/java/co/cask/coopr/spec/TenantSpecification.java | /*
* Copyright © 2012-2014 <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 ag... |
liulinru13/HXGraph | Test/hxgraph/src/main/java/com/hxgraph/model/imp/raw/BarsModel.java | package com.hxgraph.model.imp.raw;
import com.hxgraph.model.IPoint;
/**
* 多柱并列的柱状图的数据结构,最基本的数据结构
* Created by liulinru on 2017/4/24.
*/
public class BarsModel implements IPoint {
private BarModel[] barModels;
public BarModel[] getBarModels() {
return barModels;
}
public void setBarModel... |
manhluna/slice | filter.go | package slice
// FilterBool performs in place filtering of a bool slice based on a predicate
func FilterBool(a []bool, keep func(x bool) bool) []bool {
if len(a) == 0 {
return a
}
n := 0
for _, v := range a {
if keep(v) {
a[n] = v
n++
}
}
return a[:n]
}
// FilterByte performs in place filtering of... |
nhnent/toast-haste.framework | objectpool/src/main/java/com/nhnent/haste/objectpool/ObjectPool.java | <reponame>nhnent/toast-haste.framework
/*
* Copyright 2016 NHN Entertainment Corp.
*
* NHN Entertainment Corp. licenses this file to you 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.a... |
shisa/kame-shisa | openbsd/sys/dev/pci/isp_pci.c | /* $OpenBSD: isp_pci.c,v 1.35 2003/12/06 14:40:33 grange Exp $ */
/*
* PCI specific probe and attach routines for Qlogic ISP SCSI adapters.
*
*---------------------------------------
* Copyright (c) 1997, 1998, 1999 by <NAME>
* NASA/Ames Research Center
* All rights reserved.
*-----------------------------------... |
zywaited/leetcode | Interview/1_1_9/8/one/set_zeroes.go | package one
// 题目没有明确说数值的范围
// 不然就可以标记删除
func SetZeroes(matrix [][]int) {
row := make(map[int]byte)
col := make(map[int]byte)
for i := range matrix {
for j := range matrix[i] {
if matrix[i][j] == 0 {
row[i] = 1
col[j] = 1
}
}
}
for i := range row {
for j := range matrix[i] {
matrix[i][j] = ... |
canhnt/hippo-repo-xacml | hippo-repository-3.1.x-xacml/modules/src/main/java/org/hippoecm/repository/jackrabbit/facetnavigation/FacNavNodeType.java | /*
* Copyright 2010-2013 <NAME>.V. (http://www.onehippo.com)
*
* 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... |
temanbrcom/che-che4z-lsp-for-cobol | server/src/main/java/com/broadcom/lsp/cobol/core/preprocessor/delegates/writer/CobolLineWriter.java | <filename>server/src/main/java/com/broadcom/lsp/cobol/core/preprocessor/delegates/writer/CobolLineWriter.java<gh_stars>0
/*
* Copyright (c) 2020 Broadcom.
* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
*
* This program and the accompanying materials are made
* available under the terms of t... |
khurtado/WMCore | src/python/WMCore/WMBS/MySQL/Jobs/GetAllJobs.py | #!/usr/bin/env python
"""
_GetLocation_
MySQL implementation of Jobs.GetAllJobs
"""
from WMCore.Database.DBFormatter import DBFormatter
from future.utils import listvalues
class GetAllJobs(DBFormatter):
"""
_GetLocation_
Retrieve all files that are associated with the given job from the
database.
... |
HopeBayMobile/hcfs | build/third_party/libzip/lib/zip_utf-8.c | <reponame>HopeBayMobile/hcfs<gh_stars>0
/*
* Copyright (c) 2021 HopeBayTech.
*
* This file is part of Tera.
* See https://github.com/HopeBayMobile for further info.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ob... |
beads123/ikacn | public/static/js/twgoods_twgoods.js | <reponame>beads123/ikacn
app.controller("ctrlArea", function ($scope, $http ,approve,complete_info) {
$scope.approve = approve
$scope.complete_info = complete_info
$scope.sell_graphic = sell_graphic;
$scope.seeAd = [];
$scope.o_status = o_status;
$scope.data = {};
$scope.data.px = 1 //页数
... |
mstate/volt | lib/volt/page/bindings/base_binding.rb | # The BaseBinding class is the base for all bindings. It takes
# 4 arguments that should be passed up from the children (via super)
#
# 1. page - this class instance should provide:
# - a #templates methods that returns a hash for templates
# - an #events methods that returns an instance of Docum... |
vovanmozg/rocketjob | lib/rocket_job/plugins/job/state_machine.rb | <filename>lib/rocket_job/plugins/job/state_machine.rb
require 'active_support/concern'
module RocketJob
module Plugins
module Job
# State machine for RocketJob::Job
module StateMachine
extend ActiveSupport::Concern
included do
# State Machine events and transitions
... |
brondani/QCA400x_Host_Driver_SDK | port/QCA400x.h | <filename>port/QCA400x.h
#ifndef __QCA400X_H__
#define __QCA400X_H__
#include "stdint.h"
#include "a_osapi.h"
#include "QCA400x_Config.h"
// Joined multicast groups
typedef struct _mcb_struct {
uint8_t GROUP[6];
uint8_t reserved[2];
uint32_t HASH;
struct _mcb_struct *NEXT;
} MCB_STRUCT, *MCB_STRUCT_PTR;
#if ... |
juagarfer4/Condominium-Manager | src/test/java/services/RenterServicePositiveTest.java | <reponame>juagarfer4/Condominium-Manager<filename>src/test/java/services/RenterServicePositiveTest.java
package services;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowire... |
wilebeast/FireFox-OS | B2G/gecko/layout/svg/nsSVGGlyphFrame.h | <filename>B2G/gecko/layout/svg/nsSVGGlyphFrame.h<gh_stars>1-10
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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... |
Denia-Vargas-Araya/ApartamentosR | packrat/lib/x86_64-w64-mingw32/3.6.1/Rcpp/include/Rcpp/sugar/functions/clamp.h | <gh_stars>100-1000
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
//
// clamp.h: Rcpp R/C++ interface class library -- clamp
//
// Copyright (C) 2012 <NAME> and <NAME>
//
// This file is part of Rcpp.
//
// Rcpp is free software: you can redistribute it and/or modify it
// under the terms of t... |
holmes07/pulsar-beat-output | vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelExportTask.go | <reponame>holmes07/pulsar-beat-output
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ec2
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
"github.com/aws/aws-sdk-go-v2/private/protocol"
"github.com/aws/aws-sdk-go-v2/private/proto... |
APeche/OGS-HYSTEM-EXTRAN | GEM/verror.h | <filename>GEM/verror.h
//-------------------------------------------------------------------
// $Id: verror.h 725 2012-10-02 15:43:37Z kulik $
/// \file verror.h
/// Declarations of classes TError and TFatalError for error handling.
//
// Copyright (C) 1996-2012 A.Rysin, S.Dmytriyeva
// <GEMS Development Team, mailto:<... |
pec017/kubernetes | cmd/kubeadm/app/cmd/phases/init/bootstraptoken.go | /*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... |
fduminy/intellij-community | platform/platform-impl/src/com/intellij/openapi/progress/util/PotemkinProgress.java | /*
* Copyright 2000-2016 JetBrains s.r.o.
*
* 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... |
openDSME/CometOS | src/communication/ieee802154/mac/MacConfig.cc | <reponame>openDSME/CometOS
/*
* CometOS --- a component-based, extensible, tiny operating system
* for wireless networks
*
* Copyright (c) 2015, Institute of Telematics, Hamburg University of Technology
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* mod... |
anushakeren/JSONoverHTTP- | utils.js | <filename>utils.js
/*
* utils.js contains functions from eleven-gsjs
* https://github.com/ElevenGiants/eleven-gsjs
*/
//jscs:disable requireCamelCaseOrUpperCaseIdentifiers
var romanMap = {
M: 1000,
CM: 900,
D: 500,
CD: 400,
C: 100,
XC: 90,
L: 50,
XL: 40,
X: 10,
IX: 9,
V: 5,
IV: 4,
I: 1
};
exports.to_... |
FrederickOberg/frederickoberg.github.io | fbwiki/mediawiki/extensions/WikiEditor/modules/ext.wikiEditor.js | /*
* JavaScript for WikiEditor
*/
( function () {
var editingSessionId, logEditEvent, logEditFeature,
actionPrefixMap = {
firstChange: 'first_change',
saveIntent: 'save_intent',
saveAttempt: 'save_attempt',
saveSuccess: 'save_success',
saveFailure: 'save_failure'
},
trackdebug = !!mw.util.getPa... |
howkj1/telepharm-dsmjs | test/modules/authentication/middleware.spec.js | <gh_stars>1-10
import { AuthContext, createTokenAsync } from '../../../src/modules/authentication'
import { anyString, anyStrings } from '../../util/any'
describe('Authentication Middleware', () => {
const expectedDefaultAuthContext = {
authenticated: false
}
async function expectMiddlewareToSetAuthContextA... |
mcgizzle/weaver-test | modules/core/cats/src-ce3/weaver/BaseIOSuite.scala | <gh_stars>100-1000
package weaver
import cats.effect.IO
trait BaseIOSuite extends RunnableSuite[IO] with BaseCatsSuite {
implicit protected def effectCompat: UnsafeRun[IO] = CatsUnsafeRun
def getSuite: EffectSuite[IO] = this
}
trait BaseFunIOSuite extends FunSuiteF[IO] with BaseCatsSuite {
... |
rubicon/tabler-icons | icons-react/icons-js/mug-off.js | import * as React from "react";
function IconMugOff({
size = 24,
color = "currentColor",
stroke = 2,
...props
}) {
return <svg xmlns="http://www.w3.org/2000/svg" className="icon icon-tabler icon-tabler-mug-off" width={size} height={size} viewBox="0 0 24 24" strokeWidth={stroke} stroke={color} fill="none" str... |
nicktar/modelmapper | core/src/test/java/org/modelmapper/functional/deepmapping/NestedMappingTest5.java | <reponame>nicktar/modelmapper
package org.modelmapper.functional.deepmapping;
import org.modelmapper.AbstractTest;
import org.testng.annotations.Test;
/**
* @author <NAME>
*/
@Test(groups = "functional")
@SuppressWarnings("unused")
public class NestedMappingTest5 extends AbstractTest {
private static ... |
pentaho/hive-0.7.0 | src/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/JavaFloatObjectInspector.java | /*!
* Copyright 2010 - 2013 Pentaho 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 required by ap... |
oi-analytics/argentina-transport | src/atra/plot/network_water.py | """Plot water network
"""
import os
import cartopy.crs as ccrs
import geopandas
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
from atra.utils import load_config, get_axes, plot_basemap, scale_bar, plot_basemap_labels, save_fig
def main(config):
"""Read shapes, plot map
"""
data_... |
miladajilian/MimMessenger | submodules/LegacyComponents/LegacyComponents/PSLMDBKeyValueStore.h | <reponame>miladajilian/MimMessenger<gh_stars>1-10
#import <LegacyComponents/PSKeyValueStore.h>
@interface PSLMDBKeyValueStore : NSObject <PSKeyValueStore>
+ (instancetype)storeWithPath:(NSString *)path size:(NSUInteger)size;
- (void)close;
@end
|
Abd4llA/kyma | components/event-bus/api/publish/v2/validators.go | package v2
import (
"regexp"
"time"
api "github.com/kyma-project/kyma/components/event-bus/api/publish"
)
var (
isValidEventID = regexp.MustCompile(api.AllowedEventIDChars).MatchString
// channel name components
isValidSourceID = regexp.MustCompile(api.AllowedSourceIDChars).MatchString
isValidEventTy... |
rebpdx/metal-by-example | objc/06-Texturing/Texturing/MBERenderer.h | <filename>objc/06-Texturing/Texturing/MBERenderer.h
#import "MBEMetalView.h"
@interface MBERenderer : NSObject <MTKViewDelegate>
- (nonnull instancetype)initWithMetalKitView:(nonnull MBEMetalView *) mtkView;
@end
|
tschaffter/apl-core-library | aplcore/src/component/touchablecomponent.cpp | /**
* Copyright Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "license" ... |
tsingqguo/ABA | utils/neuron/data/datasets/vot.py | <gh_stars>10-100
import os
import os.path as osp
import glob
import numpy as np
import json
import hashlib
import neuron.ops as ops
from neuron.config import registry
from .dataset import SeqDataset
__all__ = ['VOT']
@registry.register_module
class VOT(SeqDataset):
r"""`VOT <http://www.votchallenge.net/>`_ Dat... |
MarkStega/CQC | Source/AllProjects/RemBrws/CQCRemBrws/CQCRemBrws_AppShellAdminClientProxy.cpp | <filename>Source/AllProjects/RemBrws/CQCRemBrws/CQCRemBrws_AppShellAdminClientProxy.cpp
// ----------------------------------------------------------------------------
// FILE: CQCRemBrws_AppShellAdminClientProxy.cpp
// DATE: Fri, Feb 12 21:14:15 2021 -0500
// ID: 78E315ECD585BF17-A16F26D604EC670D
//
// This file... |
dexterchan/beam | sdks/python/apache_beam/runners/dataflow/ptransform_overrides.py | <filename>sdks/python/apache_beam/runners/dataflow/ptransform_overrides.py
#
# 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 ... |
npocmaka/Windows-Server-2003 | sdktools/gutils/status.c | <gh_stars>10-100
/*
* status line handler
*
*/
/*---includes-----------------------------------------------------------*/
#include "windows.h"
#include "string.h"
#include "gutils.h"
/* --- data structures ------------------------------------------------- */
#define SF_MAXLABEL 80 /* no more t... |
Teino1978-Corp/Teino1978-Corp-helix | helix-core/src/main/java/org/apache/helix/controller/serializer/DefaultStringSerializer.java | package org.apache.helix.controller.serializer;
import java.io.ByteArrayInputStream;
import java.io.StringWriter;
import org.apache.helix.HelixException;
import org.apache.log4j.Logger;
import org.codehaus.jackson.map.DeserializationConfig;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map... |
SupriyaPandarge/com-cg-java-demo | src/com/cg/demo/ex/UserDefinedException2.java | package com.cg.demo.ex;
class InvalidData extends Exception{
public InvalidData(String s) {
super(s);
}
}
public class UserDefinedException2 {
public static void main(String[] args) {
int i,j;
i=8;
j=9;
try {
int k = i/j;
if(k==0)
throw new InvalidData("Input data is invalid");
System.ou... |
Brian-Acosta/dairlib | systems/controllers/linear_controller.cc | <reponame>Brian-Acosta/dairlib<gh_stars>10-100
#include "systems/controllers/linear_controller.h"
namespace dairlib {
namespace systems {
LinearController::LinearController(int num_positions, int num_velocities,
int num_inputs) {
output_input_port_ =
this->DeclareVectorInput... |
nhs-digital-gp-it-futures/order-form | app/pages/sections/order-items/catalogue-solutions/delete/confirmation/controller.test.js | import { fakeSessionManager } from 'buying-catalogue-library';
import { getDeleteCatalogueSolutionConfirmationContext } from './controller';
import { logger } from '../../../../../../logger';
import * as contextCreator from './contextCreator';
jest.mock('./contextCreator', () => ({
getContext: jest.fn(),
}));
descr... |
xuanlv886/Android | HomeShoppingMall/HomeShoppingMallForMerchant/app/src/main/java/app/cn/extra/mall/merchant/vo/StoreLogin.java | package app.cn.extra.mall.merchant.vo;
/**
* Description
* Data 2018/7/11-15:10
* Content
*
* @author L
*/
public class StoreLogin {
/**
* errorString :
* flag : true
* data : {"acId":"37","uId":"194a0051-512e-4a75-b1f6-215e1661d242","sType":1,"errorString":"未通过审核!审核意见:324543543... |
luaks/vind | monitoring/monitoring-api/src/main/java/com/rbmhtechnology/vind/monitoring/model/session/SimpleSession.java | package com.rbmhtechnology.vind.monitoring.model.session;
/**
* @author <NAME> (<EMAIL>)
* @since 13.07.16.
*/
public class SimpleSession implements Session {
public String sessionId;
public SimpleSession(String sessionId) {
this.sessionId = sessionId;
}
@Override
public String getSes... |
JetBrains/teamcity-nuget-support | nuget-tests/src/jetbrains/buildServer/nuget/tests/server/entity/MetadataParseResult.java | <filename>nuget-tests/src/jetbrains/buildServer/nuget/tests/server/entity/MetadataParseResult.java
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* 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 Lic... |
zemlni/CellSociety | src/user_interface/ControlPanel.java | /**
*
*/
package user_interface;
import cellsociety_team18.Game;
import cellsociety_team18.Parameter;
import cellsociety_team18.Simulation;
import cellsociety_team18.XMLParser;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java... |
KindDragon/all-repos | tests/autofix/azure_pipelines_autoupdate_test.py | from __future__ import annotations
import subprocess
from unittest import mock
import pytest
from all_repos import clone
from all_repos.autofix import azure_pipelines_autoupdate
from all_repos.config import load_config
from testing.auto_namedtuple import auto_namedtuple
from testing.git import init_repo
from testing... |
robjporter/go-functions2 | format/round/round.go | package round
import (
"math"
)
const Epsilon = 0.0000001
func Round(x float64) float64 {
return ToNearestEven(x)
}
func RoundTo(x float64, dp float64) float64 {
x = x * math.Pow(10, dp)
return ToNearestEven(x) / math.Pow(10, dp)
}
func ToNearestEven(x float64) float64 {
return toNearest(x, true)
}
func ToNe... |
V1Kin9/wh_sdk | software/uart_test/uart_test.c | /*******************************************************************
*
* PROJECT: W01
*
* FILENAME: uart_test.c
*
* FUNCTION: UART test demo
*
* AUTHOR: yexc
*
* DATE: 2018/01/30
*
* IS_FINISH: YES
*
******************************************... |
kbore/pbis-open | lsass/server/include/lsasrvapi.h | /* 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 (the "License");
* you m... |
FernandoSBorges/netpyne | examples/evolCell/init.py | """
init.py
Starting script to run NetPyNE-based model.
Usage: python init.py # Run simulation, optionally plot a raster
MPI usage: mpiexec -n 4 nrniv -python -mpi init.py
Contributors: <EMAIL>
"""
from netpyne import sim
cfg, netParams = sim.readCmdLineArgs() # read cfg and netParams from command line arg... |
keylockerbv/secrethub-cli | internals/cli/io.go | <reponame>keylockerbv/secrethub-cli<filename>internals/cli/io.go
package cli
import (
"encoding/json"
)
// PrettyJSON returns a 4-space indented JSON text.
// Can be useful for printing out structs.
func PrettyJSON(data interface{}) (string, error) {
pretty, err := json.MarshalIndent(data, "", " ")
if err != ni... |
jazznerd206/SennaBox | frontend/src/components/Header/Header.js | import React from 'react';
import './style.css';
// import ActiveList from '../ActiveList/ActiveList';
import Login from '../Login/Login';
function Header() {
return (
<div className="header">
<div className="title">
<h1>SennaBox</h1>
<Login />
</div>... |
NearTox/Skia | bench/CodecBench.h | <filename>bench/CodecBench.h
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef CodecBench_DEFINED
#define CodecBench_DEFINED
#include "bench/Benchmark.h"
#include "include/core/SkData.h"
#include "include/core/SkImag... |
RednoseHatake003/ZeroTwodiscord | commands/utility/urban.js | const { MessageEmbed } = require('discord.js')
const { textTrunctuate } = require('../../helper.js')
const urban = require('relevant-urban')
module.exports = {
config:{
name: "urban",
aliases: ['define','ud'],
guildOnly: true,
ownerOnly: false,
adminOnly: false,
permissions: null,
clientP... |
Davidislit/mimic | lib/ui/components/common/Frame.js | <filename>lib/ui/components/common/Frame.js
import React from 'react';
import styled from 'styled-components';
import { DropTarget } from 'react-dnd';
import API from 'api';
import UIState from 'ui/states/UIState';
import { connectToState } from 'ui/states/connector';
import MainControls from 'ui/components/BottomBar/M... |
eliasga/CS_EnterpriseI_archive | 10 prev work/2014 Orsten/Simulation files/slprj/_sfprj/Model_justmodel/_self/sfun/src/c10_Model_justmodel.c | <reponame>eliasga/CS_EnterpriseI_archive
/* Include files */
#include <stddef.h>
#include "blas.h"
#include "Model_justmodel_sfun.h"
#include "c10_Model_justmodel.h"
#include "mwmathutil.h"
#define CHARTINSTANCE_CHARTNUMBER (chartInstance->chartNumber)
#define CHARTINSTANCE_INSTANCENUMBER (chartInstance->instan... |
gochaorg/cxel | src/main/java/xyz/cofe/cxel/js/op/BitOrOperator.java | package xyz.cofe.cxel.js.op;
import xyz.cofe.cxel.eval.FnName;
import xyz.cofe.cxel.js.Undef;
import java.util.List;
public class BitOrOperator extends BitOperator {
@FnName("|")
public static Double bitOr( Object left, Object right ){
long l = toBit(left);
long r = toBit(right);
long... |
cisco-ie/cisco-proto | codegen/go/xr/66x/cisco_ios_xr_invmgr_oper/inventory/racks/rack/powershelf/slot/tsi1s/tsi1/tsi2s/tsi2/tsi3s/tsi3/attributes/fru_info/inv_card_fru_info.pb.go | /*
Copyright 2019 Cisco Systems
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
d... |
ElthaTeng/multiline-ngc3351 | one_pixel/line_flux_marginalize.py | <gh_stars>1-10
import numpy as np
import matplotlib.pyplot as plt
import time
'''This script computes the marginalized likelihoods of the line intensities, and then
plots the 1D likelihood distributions given a chosen bin size and intensity range.'''
region = 'arms'
log_bins = False
start_time = time.time()
model =... |
DrakonPL/Andromeda-Lib | Libs/JellyPhysics/PressureBody.h | #ifndef _PRESSURE_BODY_H
#define _PRESSURE_BODY_H
#include "SpringBody.h"
namespace JellyPhysics
{
class PressureBody : public SpringBody
{
protected:
float mVolume;
float mGasAmount;
Vector2* mNormalList;
public:
PressureBody(World* w, const ClosedShape& s, float mpp,
float gasPressure, float... |
nlugic/LSystems | LSystems/LSystemRenderer/LSystemRenderer.h | #ifndef LSYSTEMRENDERER_H
#define LSYSTEMRENDERER_H
#include "..\LSystemGenerator\LSystemContext.h"
#include "OGLRenderer.h"
namespace lrend
{
class LSystemRenderer
{
private:
std::vector<lsys::LSystemContext *> contexts;
static bool test_mode;
inline LSystemRenderer() = default;
explic... |
SweydAbdul/estudos-python | CursoIntensivoPython/Aula15_visualizacao_de_dados/die.py | from random import randint
class Die:
"""Uma classe que representa um unico dado."""
def __init__(self, num_sides=6):
"""Supoe que seja um dado de seis lados."""
self.num_sides = num_sides
def roll(self):
"""Devolve um valor aleatorio entre 1 e o numero de lados."""
return... |
ducis/operating-system-labs | src.clean/lib/libtimers/tmrs_set.c | #include "timers.h"
/*===========================================================================*
* tmrs_settimer *
*===========================================================================*/
clock_t tmrs_settimer(tmrs, tp, exp_time, watchdog, new_head)
timer_t **tmrs; /* pointer to timers qu... |
tohotforice/onos-sdwsn | core/api/src/main/java/org/onosproject/net/multicast/Group.java | package org.onosproject.net.multicast;
import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
import org.onosproject.net.sensor.SensorNodeAddress;
import java.net.URI;
import java.net.URISyntaxException;
/**
* Created by aca on 4/30/15.
*/
public class Group {
public static final String MULTICA... |
RizaevDima/glinova-gatsby-site | src/components/Footer/Footer.styles.js | import styled from "styled-components"
export const Wrapper = styled.footer`
background-color: #6a6a6a;
p {
color: #fff;
text-align: center;
}
`
|
johnwebbcole/jscad-utils | src/triangle.js | <filename>src/triangle.js<gh_stars>10-100
/** @module triangle */
/**
* Convert degrees to radians.
* @param {Number} deg value in degrees
* @return {Number} value in radians
*/
export const toRadians = function toRadians(deg) {
return (deg / 180) * Math.PI;
};
/**
* Convert radians to degrees.
* @param ... |
soyzhc/agge | tests/agge.text/TextEngineTests.cpp | <gh_stars>10-100
#include <agge.text/text_engine.h>
#include "helpers.h"
#include "helpers_layout.h"
#include "mocks.h"
#include "outlines.h"
#include <agge/path.h>
#include <agge.text/limit.h>
#include <algorithm>
#include <tests/common/helpers.h>
#include <tests/common/scoped_ptr.h>
#include <ut/assert.h>
#include ... |
yashgolwala/Software_Measurement_Team_M | ProjectSourceCode/Apache Commons Math v3.5/src/main/java/org/apache/commons/math3/geometry/spherical/twod/Vertex.java | version https://git-lfs.github.com/spec/v1
oid sha256:816bf5775a03c5c0e816af83c84e4bb494f50200f465512a076a1543b698cc6b
size 3649
|
eluinstra/fs-core | src/main/java/dev/luin/file/server/core/KeyStoreManager.java | /*
* Copyright 2020 E.Luinstra
*
* 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 ... |
IsaacAsante/hackerrank | Problem Solving/Algorithms/Bit Manipulation/Lonely Integer/lonely integer.cpp | <reponame>IsaacAsante/hackerrank<filename>Problem Solving/Algorithms/Bit Manipulation/Lonely Integer/lonely integer.cpp
/* Author: <NAME>
* HackerRank URL for this exercise: https://www.hackerrank.com/challenges/lonely-integer/problem
* Original video explanation: https://www.youtube.com/watch?v=la980b2X268
* Last v... |
lemkova/Yorozuya | library/ATF/_unmannedtrader_regist_item_error_result_zocl.hpp | // This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
START_ATF_NAMESPACE
#pragma pack(push, 1)
struct _unmannedtrader_regist_item_error_result_zocl
{
char byRet;
unsigned __int16 wItemSerial;
... |
VerkhovtsovPavel/BSUIR_Labs | Labs/SAiMMod/SAiMMod-4/src/main/Main.java | <filename>Labs/SAiMMod/SAiMMod-4/src/main/Main.java
package main;
import other.Processor;
import other.TimePeriodGenerator;
public class Main {
private static Processor[] querySystems;
private static TimePeriodGenerator taskInterval;
private static int countOfQuerySystems = 3;
private static long GeneratedTaskCou... |
shaojiankui/iOS10-Runtime-Headers | PrivateFrameworks/FuseUI.framework/MusicContextualActionsConfiguration.h | /* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/FuseUI.framework/FuseUI
*/
@interface MusicContextualActionsConfiguration : NSObject <MusicClientContextConsuming> {
bool _allowsAddToPlaylistActions;
bool _allowsCreateGeniusPlaylist;
bool _allowsLibraryAddRemoveActions;
bo... |
immbudden/buddeen | node_modules/@material-ui/icons/DevicesOtherTwoTone.js | <reponame>immbudden/buddeen
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _createSvgIcon = _interopRequireDefaul... |
marpme/lib-ledger-core | api/core/react-native/LibLedgerCore/android/src/main/java/com/ledger/reactnative/GetEthreumLikeWalletCallbackImpl.java | package com.ledger.reactnative;
import com.facebook.react.bridge.ReactApplicationContext;
public class GetEthreumLikeWalletCallbackImpl extends co.ledger.core.GetEthreumLikeWalletCallback {
private ReactApplicationContext reactContext;
public GetEthreumLikeWalletCallbackImpl(ReactApplicationContext reactCon... |
saulmaldonado/ds-and-algorithms | strings/longest-substring-without-repeating-characters/longest-substring-without-repeating-characters.js | <gh_stars>0
/**
* @param {string} s
* @return {number}
*/
function lengthOfLongestSubstring(s) {
const n = s.length;
let maxLength = 0;
const indexMap = {};
let j = 0;
for (let i = 0; i < n; i++) {
const curr = s[i];
if (indexMap[curr]) {
j = Math.max(indexMap[curr], j);
}
const cu... |
DarthUdp/yasl | yasl_conf.h | #ifndef YASL_YASL_CONF_H_
#define YASL_YASL_CONF_H_
#include <inttypes.h>
#if defined __GNUC__ || defined __clang__
#define YASL_DEPRECATE __attribute__((deprecated))
#elif defined _MSC_VER
#define YASL_DEPRECATE __declspec(deprecated)
#else
#define YASL_DEPRECATE
#endif
#if defined __GNUC__ || defined __clang__
#de... |
jianoaix/ray | python/ray/train/tests/test_utils.py | <filename>python/ray/train/tests/test_utils.py<gh_stars>0
from pathlib import Path
from ray.train._internal.utils import construct_path
def test_construct_path():
assert construct_path(Path("/a"), Path("/b")) == Path("/a")
assert construct_path(Path("/a"), Path("~/b")) == Path("/a")
assert construct_path... |
shunp/three.js | examples/jsm/lines/LineGeometry.js | <reponame>shunp/three.js<filename>examples/jsm/lines/LineGeometry.js
/**
* @author WestLangley / http://github.com/WestLangley
*
*/
import { LineSegmentsGeometry } from "../lines/LineSegmentsGeometry.js";
var LineGeometry = function () {
LineSegmentsGeometry.call( this );
this.type = 'LineGeometry';
};
Line... |
mshafiei/DifferentiableSolver | Smoothness_test/Hyperparam_1px_grad_descent.py | import os
import jax
from jaxopt._src import gradient_descent
import tqdm
import jax.numpy as np
from jax import random
import cvgutils.Image as cvgim
import cvgutils.Viz as cvgviz
from jaxopt.implicit_diff import custom_fixed_point
import argparse
import matplotlib.pyplot as plt
from jax.experimental import optimizers... |
intellisysdcorp/covid-safe-paths | app/components/DR/ActivityIndicator.js | import React from 'react';
import { ActivityIndicator } from 'react-native';
import Colors from '../../constants/colors';
const activityIndicatorLoadingView = center => {
//making a view to show to while loading the webpage
return (
<ActivityIndicator
color={Colors.BLUE_RIBBON}
size='large'
... |
aulonm/okr-tracker | src/store/actions/reset_state.js | <reponame>aulonm/okr-tracker
import { firestoreAction } from 'vuexfire';
export default firestoreAction(async ({ unbindFirestoreRef, state, commit }) => {
commit('SET_ACTIVE_ITEM_REF', null);
state.organizationsUnsubscribe();
state.departmentsUnsubscribe();
state.productsUnsubscribe();
commit('SET_COLLECTI... |
gsrivast31/devdesign | packages/devdesign-rss/package.js | Package.describe({summary: "DevDesign RSS package"});
Npm.depends({rss: "0.3.2"});
Package.onUse(function (api) {
api.use(['devdesign-base', 'devdesign-lib'], ['server']);
api.add_files(['lib/server/rss.js', 'lib/server/routes.js'], ['server']);
api.export(['serveRSS']);
}); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.