repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
ithinkicancode/zio-flow
zio-flow/shared/src/test/scala/zio/flow/remote/RemoteTupleSpec.scala
package zio.flow.remote import zio.ZIO import zio.flow.utils.RemoteAssertionSyntax.RemoteAssertionOps import zio.flow.{Remote, RemoteContext} import zio.test.{TestResult, Spec, TestEnvironment} object RemoteTupleSpec extends RemoteSpecBase { override def spec: Spec[TestEnvironment, Nothing] = suite("RemoteTupl...
fiolino/searcher
src/main/java/org/fiolino/searcher/statement/Filter.java
<gh_stars>0 package org.fiolino.searcher.statement; /** * Created by kuli on 29.02.16. */ public abstract class Filter extends Statement { protected Filter() { } public Filter and(Filter other) { return new BooleanFilter(this, other, Operator.AND); } public Filter or(Filter other) { return new B...
moibenko/enstore
src/mounts_per_robot_plotter_module.py
<reponame>moibenko/enstore #!/usr/bin/env python ############################################################################### # # purpose: create mount/day plots per tape library and # install them in MOUNTS_PER_ROBOT_PLOTS_SUBDIR # $Id$ # ##################################################################...
lifeomic/phc-sdk-py
tests/easy/util/frame.py
<gh_stars>1-10 import pandas as pd from nose.tools import assert_equals from phc.easy.util.frame import combine_first def test_combine_first(): frame = pd.DataFrame( [ {"count": pd.NA, "count1": 10, "count2": 100}, {"count": pd.NA, "count1": pd.NA, "count2": 200}, {"cou...
rate-engineering/rate3-monorepo
packages/ethereum-contracts/test/lib/Ownable.test.js
import { BN, constants, expectEvent, time, shouldFail } from 'openzeppelin-test-helpers'; const Ownable = artifacts.require('./lib/ownership/Ownable'); contract('Ownable', function (accounts) { beforeEach(async function () { this.ownable = await Ownable.new(); }); shouldBehaveLikeOwnable(accounts); }); re...
knightjdr/prohits-viz-analysis
pkg/specificity/calculatespecificity.go
// Package specificity calculates specificity scores. package specificity import ( "math" "strconv" "strings" customMath "github.com/knightjdr/prohits-viz-analysis/pkg/math" "github.com/knightjdr/prohits-viz-analysis/pkg/types" "gonum.org/v1/gonum/stat" ) // Calculate scores for readouts between conditions. fu...
Tanc009/jdcloud-sdk-java
pod/src/main/java/com/jdcloud/sdk/service/pod/model/ContainerSpec.java
/* * Copyright 2018 JDCLOUD.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 required by applicable law or agreed to in...
brezillon/opensplice
src/kernel/code/v_cfAttribute.c
/* * Vortex OpenSplice * * This software and documentation are Copyright 2006 to TO_YEAR ADLINK * Technology Limited, its affiliated companies and licensors. All rights * reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file e...
jdm7dv/visual-studio
VSSDK/VisualStudioIntegration/Common/Source/CPP/VSL/MockInterfaces/VSLMockIVsWindowView.h
<reponame>jdm7dv/visual-studio /*************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. This code is licensed under the Visual Studio SDK license terms. THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, I...
dennyac/dropwizard-redis
src/test/java/io/dropwizard/redis/metrics/event/LettuceMetricsSubscriberTest.java
package io.dropwizard.redis.metrics.event; import com.google.common.collect.ImmutableList; import io.dropwizard.redis.metrics.event.visitor.*; import io.lettuce.core.cluster.event.ClusterTopologyChangedEvent; import io.lettuce.core.event.connection.ConnectedEvent; import io.lettuce.core.event.connection.ConnectionActi...
imranzaidi/cbt-planner
config/libraries/sequelize.js
<reponame>imranzaidi/cbt-planner<gh_stars>1-10 /*********************** * Module Dependencies * ***********************/ const Sequelize = require('sequelize'), config = require('../config'); /****************** * Module Members * ******************/ const db = {}; /** * Helper function; parses model name fr...
suncoast-devs/gateway
db/migrate/20201029145828_create_communications.rb
<reponame>suncoast-devs/gateway # frozen_string_literal: true class CreateCommunications < ActiveRecord::Migration[6.0] def change create_table :communications do |t| t.references :person, null: false, foreign_key: true t.references :user, null: true, foreign_key: true t.integer :media, null: fa...
anyulled/React-Skeleton
client/app/containers/Modals/EditUserModal.js
<reponame>anyulled/React-Skeleton<gh_stars>0 import React from "react"; import {Modal, Button} from "react-bootstrap"; import FieldGroup from "../../components/FieldGroup"; import Select from "../../components/Select"; import {reduxForm} from "redux-form"; import * as userActions from "../../actions/users/users"; impor...
aasensio/pyiacsun
pyiacsun/machinelearn/kmeans.py
<gh_stars>1-10 import numpy as np __all__ = ['kmeans'] def distancia(media, matriz): """Calcula la distancia euclideana desde la media hasta cada vector en la matriz """ res = [] for i in matriz: res.append(np.sum((media - i)**2.)) return res def kmeans(datos_fila, nGrupos, umbral=No...
danlangford/LegendsBrowser
src/main/java/legends/model/events/HfPrayedInsideStructure.java
<gh_stars>10-100 package legends.model.events; import legends.model.World; import legends.model.events.basic.HfEvent; import legends.model.events.basic.SiteRelatedEvent; import legends.model.events.basic.StructureRelatedEvent; import legends.xml.annotation.Xml; import legends.xml.annotation.XmlSubtype; @XmlSubtype("h...
jromero/kpack-cli
pkg/builder/helpers.go
<reponame>jromero/kpack-cli<filename>pkg/builder/helpers.go // Copyright 2020-Present VMware, Inc. // SPDX-License-Identifier: Apache-2.0 package builder import ( "fmt" "io" "io/ioutil" "os" "regexp" "github.com/ghodss/yaml" corev1alpha1 "github.com/pivotal/kpack/pkg/apis/core/v1alpha1" ) func ReadOrder(path...
GuillaumeSimo/autoforecast
autoforecast/models/tests/ml_test.py
<reponame>GuillaumeSimo/autoforecast<filename>autoforecast/models/tests/ml_test.py import unittest from ..ml import * # noqa: F401 class MLTest(unittest.TestCase): def test_ml(self): pass
marstau/shinsango
src/mugen/parser/def.cpp
<reponame>marstau/shinsango #include "mugen/ast/all.h" #include <map> #include "gc.h" typedef std::list<Ast::Section*> SectionList; #include <list> #include <string> #include <vector> #include <map> #include <fstream> #include <sstream> #include <iostream> #include <string.h> namespace Mugen{ namespace Def{ ...
0xflotus/shuttle
spec/lib/importer/ember_intl_spec.rb
<filename>spec/lib/importer/ember_intl_spec.rb # Copyright 2014 Square 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 # # ...
Diffblue-benchmarks/Xiancloud-xian
xian-core/src/main/java/info/xiancloud/core/test/output_test/UnitResponseTestUnit.java
package info.xiancloud.core.test.output_test; import info.xiancloud.core.*; import info.xiancloud.core.message.UnitRequest; import info.xiancloud.core.message.UnitResponse; import info.xiancloud.core.test.TestGroup; import java.util.HashMap; import java.util.Map; /** * @author happyyangyuan */ public class UnitRes...
aryx/principia-softwarica
lib_core/libc/9sys/fork.c
<reponame>aryx/principia-softwarica /*s: libc/9sys/fork.c */ #include <u.h> #include <libc.h> /*s: function [[fork]] */ int fork(void) { return rfork(RFPROC|RFFDG|RFREND); } /*e: function [[fork]] */ /*e: libc/9sys/fork.c */
CyrilenBlu/bookapp
src/main/java/blue/bookapp/controllers/BookController.java
package blue.bookapp.controllers; import blue.bookapp.services.BookService; import blue.bookapp.services.PagesService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springfra...
dikshay/hackprinceton
wolfram_java/src/main/java/com/wolfram/alpha/impl/WAPodStateImpl.java
<filename>wolfram_java/src/main/java/com/wolfram/alpha/impl/WAPodStateImpl.java /* * Created on Dec 9, 2009 * */ package com.wolfram.alpha.impl; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeLi...
flatironinstitute/netket
NetKet/Operator/py_ising.hpp
// Copyright 2018 The Simons Foundation, 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 requi...
naeramarth7/joynr
javascript/libjoynr-js/src/main/js/joynr/messaging/MessagingQos.js
/*eslint no-useless-escape: "off"*/ /* * #%L * %% * Copyright (C) 2011 - 2017 BMW Car IT GmbH * %% * 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/licen...
vamtiger-project/vamtiger-node-typescript-project
build/snippet/json-ld-script.js
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = `import { ScriptType, url } from './types'; import jsonLd from './json-ld'; import json from './json'; import loadScript from './load-script'; const jsonLdParams = jsonLd.map(data => ({ url, type: ScriptType....
GabrielSturtevant/mage
Mage.Sets/src/mage/cards/z/ZhangFeiFierceWarrior.java
<gh_stars>1000+ package mage.cards.z; import java.util.UUID; import mage.MageInt; import mage.abilities.keyword.HorsemanshipAbility; import mage.abilities.keyword.VigilanceAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.con...
Fogapod/KiwiBot
objects/moduleexceptions.py
<reponame>Fogapod/KiwiBot<filename>objects/moduleexceptions.py class ModuleCallError(Exception): pass class GuildOnly(ModuleCallError): pass class NSFWPermissionDenied(ModuleCallError): pass class NotEnoughArgs(ModuleCallError): pass class TooManyArgs(ModuleCallError): pass class MissingPe...
itm/shawn
src/apps/testbedservice/virtual_links/virtual_link_task.cpp
/************************************************************************ ** This file is part of the network simulator Shawn. ** ** Copyright (C) 2004-2007 by the SwarmNet (www.swarmnet.de) project ** ** Shawn is free software; you can redistribute it and/or modify it ** ** under the terms of t...
BaiXiongjun/JavaLearning
src/java/Java2Store/Tree/TwoBinTree/ThreeLinkBinTree.java
package Java2Store.Tree.TwoBinTree; /***Created by moyongzhuo *On 2018/3/23 ***17:45. ******/ /** * Created by ietree * 2017/5/1 */ public class ThreeLinkBinTree<E> { public static class TreeNode { Object data; TreeNode left; TreeNode right; TreeNode parent; ...
Noahhoetger2001/test-infra
gopherage/cmd/junit/junit.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, ...
vidyadeepa/the-coding-interview
problems/remove-duplicates-from-string/remove-duplicates-from-string.py
# Python 2 from string import lower def remove_duplicates(string): seen = [] for ch in lower(string): if not ch in seen: seen.append(ch) return "".join(seen) print remove_duplicates("tree traversal") # tre avsl # Python 3 def remove_dupes(string): seen = [] for ch in string.lower(): ...
udacity/pontoon
pontoon/sync/views.py
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from django.shortcuts import get_object_or_404, render from pontoon.sync.models import SyncLog def sync_log_list(request): sync_logs = SyncLog.objects.order_by('-start_time') paginator = Paginator(sync_logs, 24) page = request.GET....
YodaEmbedding/experiments
py/rxpy/modules.py
import time import rx from rx import operators as ops from rx.subject import Subject # numbers = rx.from_iterable(i for i in range(10)).pipe( # ops.publish(), # ) # # numbers.pipe( # ops.filter(lambda x: x % 2 == 0) # ).subscribe(lambda x: print(f"Even: {x}")) # # numbers.pipe( # ops.filter(lambda x: x ...
TomCreeper/goldmine
util/xkcd.py
<reponame>TomCreeper/goldmine<gh_stars>1-10 """Async xkcd library.""" from .json import loads as jloads import random import async_timeout import aiohttp XKCD_URL = 'http://www.xkcd.com/' IMAGE_URL = 'http://imgs.xkcd.com/comics/' EXPLAIN_URL = 'http://explainxkcd.com/' LINK_OFFSET = len(IMAGE_URL) class Comic(object...
NovasomIndustries/Utils-2019.01
rock/app/settings/bluetooth/bluetoothdevicetable.cpp
<reponame>NovasomIndustries/Utils-2019.01 #include "bluetoothdevicetable.h" #include "retranslatemanager.h" #include <QHeaderView> #ifdef DEVICE_EVB int move_distance_next_step = 300; int bluetooth_item_height = 65; #else int move_distance_next_step = 100; int bluetooth_item_height = 35; #endif #define CO...
Koichi-Kobayashi/orangesignal-csv
src/main/java/com/orangesignal/jlha/PostLh1Encoder.java
<reponame>Koichi-Kobayashi/orangesignal-csv /** * Copyright (C) 2002 <NAME> All rights reserved. * * 以下の条件に同意するならばソースとバイナリ形式の再配布と使用を * 変更の有無にかかわらず許可する。 * * 1.ソースコードの再配布において著作権表示と この条件のリスト * および下記の声明文を保持しなくてはならない。 * * 2.バイナリ形式の再配布において著作権表示と この条件のリスト * および下記の声明文を使用説明書もしくは その他の配布物内に * ...
unyankee/OutterSpace
engine/src/vulkan_device.cpp
<filename>engine/src/vulkan_device.cpp<gh_stars>0 #include "vulkan_device.h" #include <cassert> #include <iostream> #include <vulkan_debug.h> VkBool32 getSupportedDepthFormat(VkPhysicalDevice physicalDevice, VkFormat* depthFormat) { // Since all depth formats may be optional, we need to find a suitable depth forma...
jackusz/flowman
flowman-spec/src/main/scala/com/dimajix/flowman/spec/target/BlackholeTarget.scala
<reponame>jackusz/flowman<filename>flowman-spec/src/main/scala/com/dimajix/flowman/spec/target/BlackholeTarget.scala /* * Copyright 2018 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the Licen...
VoNgocThuan/KhoaLuanTotNghiep
resources/js/components/layouts/SearchProducts.js
<filename>resources/js/components/layouts/SearchProducts.js import Axios from 'axios'; import React, { Component } from 'react'; import Product from './Product'; import { connect } from "react-redux"; import * as actions from "./../actions/index"; import SearchProduct from './SearchProduct'; class SearchProducts exten...
lukaszlaszuk/insightconnect-plugins
plugins/openphish/komand_openphish/triggers/save_feed_file/trigger.py
<gh_stars>10-100 import komand import time from .schema import SaveFeedFileInput, SaveFeedFileOutput, Input, Output # Custom imports below import base64 import requests class SaveFeedFile(komand.Trigger): def __init__(self): super(self.__class__, self).__init__( name="save_feed_file", ...
Cubeside/CubeQuest
src/main/java/de/iani/cubequest/commands/StopEditingQuestCommand.java
package de.iani.cubequest.commands; import de.iani.cubequest.CubeQuest; import de.iani.cubequest.util.ChatAndTextUtil; import de.iani.cubesideutils.bukkit.commands.SubCommand; import de.iani.cubesideutils.commands.ArgsParser; import java.util.Collections; import java.util.List; import org.bukkit.command.Comman...
Fimbure/icebox-1
third_party/virtualbox/src/libs/xpcom18a4/nsprpub/pr/tests/exit.c
<filename>third_party/virtualbox/src/libs/xpcom18a4/nsprpub/pr/tests/exit.c /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (th...
GeneralMine/Loomo-Ros-App
loomo-app/src/main/java/de/iteratec/loomo/ros/publisher/OdomHolder.java
package de.iteratec.loomo.ros.publisher; import static java.lang.Math.cos; import static java.lang.Math.sin; import com.segway.robot.algo.Pose2D; import nav_msgs.Odometry; import org.apache.commons.math3.complex.Quaternion; public class OdomHolder { private Odometry odom = null; private Odometry initialodom;...
wizzifactory/wizzi-history
old_packages/wizzi-lab-spa/lib/artifacts/spa/webpack/gen/main.js
/* artifact generator: /wizzi/lib/artifacts/js/module/gen/main.js primary source IttfDocument: c:\my\wizzi\v2\sources\plugins\wizzi-lab-spa\ittf\lib\artifacts\spa\webpack\gen\main.js.ittf utc time: Mon, 17 Jul 2017 15:07:32 GMT */ 'use strict'; var util = require('util'); var path = require('path'); var wiz...
ARCHTK-prog/utils-tools
utils-netx-extension-flink/src/main/java/com/chua/utils/netx/flink/format/MemOutputFormat.java
package com.chua.utils.netx.flink.format; import com.chua.utils.netx.flink.utils.RowUtils; import com.chua.utils.tools.bean.copy.BeanCopy; import com.chua.utils.tools.empty.EmptyOrBase; import com.chua.utils.tools.util.ClassUtils; import org.apache.flink.table.api.TableColumn; import org.apache.flink.table.api....
tcarnoldussen/Menge
src/Plugins/AgtHelbing/HelbingAgent.h
/* Menge Crowd Simulation Framework Copyright and trademark 2012-17 University of North Carolina at Chapel Hill 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/licen...
SciGaP/DEPRECATED-Cipres-Airavata-POC
saminda/cipres-airavata/sdk/src/main/java/org/ngbw/sdk/tool/GridFtpInputStream.java
/* * GridFtpInputStream.java */ package org.ngbw.sdk.tool; import java.io.IOException; import java.io.InputStream; import org.globus.ftp.GridFTPClient; import org.globus.ftp.InputStreamDataSink; import org.globus.ftp.exception.ClientException; import org.globus.ftp.exception.ServerException; import org.apache.comm...
ChenZhangg/jzy3d-api
jzy3d-core-awt/src/main/java/org/jzy3d/plot3d/rendering/legends/colorbars/policies/MaxShrinkSizingPolicy.java
<gh_stars>100-1000 package org.jzy3d.plot3d.rendering.legends.colorbars.policies; public class MaxShrinkSizingPolicy implements IColorbarSizingPolicy{ public MaxShrinkSizingPolicy() { // TODO Auto-generated constructor stub } }
wnameless/rubycollect4j
src/main/java/net/sf/rubycollect4j/util/ByteUtils.java
/* * * Copyright 2013 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wri...
andrewsu/RTX
code/UI/ClientExamples/Python/obsolete/Query_SMEworkflow1.py
<gh_stars>10-100 """ This example demonstrates fetching the results for SME Workflow #1 from RTX using the Translator Reasoning Tool Standardized API. """ #### Import some needed modules import requests import json #### Set the base URL for the reasoner and its endpoint API_BASE_URL = 'https://rtx.ncats.io/api/rtx/v1...
NateTheGreatt/phaser
dist/display3d/SetWorld3D.js
import { AddedToWorldEvent, RemovedFromWorldEvent } from "../gameobjects/events"; import { Emit } from "../events/Emit"; export function SetWorld3D(world, ...children) { children.forEach((child) => { if (child.world) { Emit(child.world, RemovedFromWorldEvent, child, child.world); Emit(child, RemovedFr...
woshidaniu-com/niutal
niutal-core-jwservice/src/main/java/com/woshidaniu/service/utils/PercentageUtils.java
package com.woshidaniu.service.utils; import java.math.BigDecimal; import java.util.concurrent.atomic.AtomicInteger; import javax.servlet.http.HttpSession; import com.woshidaniu.web.context.WebContext; /** * *@类名称: PercentageUtils.java *@类描述:完成比计算工具 *@创建人:kangzhidong *@创建时间:Sep 25, 2015 3:10:24 PM *@版本号:v1.0 ...
smackedlol/pajbot
pajbot/web/routes/base/pleblist.py
import logging from flask import redirect from flask import render_template from pajbot.managers.db import DBManager from pajbot.models.pleblist import PleblistSong from pajbot.models.stream import Stream from pajbot.models.stream import StreamChunk from pajbot.models.user import User from pajbot.utils import find l...
geransmith/axonius_api_client
axonius_api_client/api/routers.py
# -*- coding: utf-8 -*- """REST API route definitions.""" from ..tools import join_url class Router: """Simple object store for REST API routes.""" def __init__(self, object_type, base, version, **routes): """Object store for REST API routes. Args: object_type (:obj:`str`): objec...
ujjwalsh/gfapy
tests/test_unit_numeric_array.py
import unittest import gfapy class TestUnitNumericArray(unittest.TestCase): def test_integer_type(self): v = {b: 2**(b/2) for b in [8,16,32,64,128]} self.assertEqual("C", gfapy.NumericArray.integer_type((0,v[8]))) self.assertEqual("c", gfapy.NumericArray.integer_type((-1,v[8]))) self.assertEqual("S"...
ggrimes/jvarkit
src/main/java/com/github/lindenb/jvarkit/tools/phased/BamPhased01.java
/* The MIT License (MIT) Copyright (c) 2021 <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, modify, merge, publis...
cwolsen7905/UbixOS
doc/html/d0/d27/include_2sys_2types_8h.js
<gh_stars>0 var include_2sys_2types_8h = [ [ "__CHAR_BIT", "d0/d27/include_2sys_2types_8h.html#a41549fb35387caed3be025fe977729fe", null ], [ "__ULONG_MAX", "d0/d27/include_2sys_2types_8h.html#a4386baedee1f032ec8217e4358cdecc6", null ], [ "__USHRT_MAX", "d0/d27/include_2sys_2types_8h.html#aeb970b17d73d2ab1c8...
sjamboro/kogito-runtimes
jbpm/jbpm-flow/src/main/java/org/jbpm/ruleflow/core/factory/RuleSetNodeFactory.java
<filename>jbpm/jbpm-flow/src/main/java/org/jbpm/ruleflow/core/factory/RuleSetNodeFactory.java /* * Copyright 2010 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of th...
mischumok/kogmo-rtdb
rtdb/kogmo_rtdb_utils.c
<reponame>mischumok/kogmo-rtdb<filename>rtdb/kogmo_rtdb_utils.c /*! \file kogmo_rtdb_utils.c * \brief Some Utility Definitions * * Copyright (c) 2003-2006 <NAME> <matthias.goebl*goebl.net> * Lehrstuhl fuer Realzeit-Computersysteme (RCS) * Technische Universitaet Muenchen (TUM) */ #include <stdlib.h> /* m...
lzbrady/oneaweek
oneaweek/src/Admin/Auth.js
<gh_stars>0 import { auth } from "../server/fire"; // Sign In export const doSignInWithEmailAndPassword = (email, password) => auth.signInWithEmailAndPassword(email, password); // Sign out export const doSignOut = () => auth.signOut();
lindsaygelle/nook
animal/fox.go
<filename>animal/fox.go package animal import ( "github.com/lindsaygelle/nook" "golang.org/x/text/language" ) var ( foxNameAmericanEnglish = nook.Name{ Language: language.AmericanEnglish, Value: "Fox"} ) var ( foxName = nook.Languages{ language.AmericanEnglish: foxNameAmericanEnglish} ) var ( Fox = no...
matthewcpp/RetroDash
src/background.c
#include "background.h" #define BACKGROUND_GRID_SIZE 32 #define BACKGROUND_SPEED 40.0f void background_init(Background* background, Renderer* renderer) { background->_renderer = renderer; background_reset(background); } void background_update(Background* background, float time_delta) { background->_offse...
rrehbein/Ariente
src/main/java/mcjty/ariente/facade/MimicBlockSupport.java
package mcjty.ariente.facade; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.nbt.CompoundTag; import net.minecraftforge.registries.ForgeRegistries...
DashW/Ingenuity
Third Party/newton-dynamics-master/packages/dCustomJoints/CustomVehicleControllerBodyState.cpp
/* Copyright (c) <2009> <<NAME>> * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial appli...
greysonmrx/Backpack
src/store/modules/rootSaga.js
<filename>src/store/modules/rootSaga.js import { all } from "redux-saga/effects"; import timetable from "./timetable/sagas"; import task from "./task/sagas"; import notebook from "./notebook/sagas"; import setting from "./setting/sagas"; export default function* rootSagaall() { return yield all([timetable, task, no...
alex5nader/Conrad
src/main/java/dev/inkwell/conrad/api/gui/EntryBuilderRegistry.java
/* * Copyright 2021 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writin...
MrAwesomeRocks/caelus-cml
src/libraries/turbulenceModels/compressible/RAS/RASModel/compressibleRASModel.hpp
<filename>src/libraries/turbulenceModels/compressible/RAS/RASModel/compressibleRASModel.hpp /*---------------------------------------------------------------------------*\ Copyright (C) 2011 OpenFOAM Foundation ------------------------------------------------------------------------------- License This file is part...
AntonioLuisP/path-to-work
src/reusable/GoTo.js
<gh_stars>0 import React from 'react' import { CTooltip, CLink } from '@coreui/react' const GoTo = ({ go, children }) => { return ( <CLink rel="noreferrer noopener" className="card-header-action text-primary" to={go} > <CTooltip content='Ver' placement='top' ...
jnthn/intellij-community
java/java-tests/testData/inspection/commonIfParts/beforeCompleteDuplicateImplicitReturnFoldedIf.java
<reponame>jnthn/intellij-community<gh_stars>1-10 // "Collapse 'if' statement" "true" import java.util.Collection; import java.util.List; import java.util.Set; public class IfStatementWithIdenticalBranches { int work() { if (true) { if<caret> (false) { System.out.println(); return; } ...
OpenIchano/Viewer
src/com/zhongyun/viewer/BaseActivity.java
<filename>src/com/zhongyun/viewer/BaseActivity.java<gh_stars>10-100 /* * Copyright (C) 2015 iChano incorporation's Open Source Project * * 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 * ...
ritesh-kanchi/14786-SKYSTONE
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/testing/AutonTest.java
package org.firstinspires.ftc.teamcode; import com.qualcomm.robotcore.eventloop.opmode.Autonomous; import com.qualcomm.robotcore.eventloop.opmode.Disabled; import com.qualcomm.robotcore.util.ElapsedTime; import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; import org.firstinspires.ftc.robotcore.external.naviga...
markzgwu/go-filecoin
app/connectors/fsm_events/connector.go
<reponame>markzgwu/go-filecoin package fsmeventsconnector import ( "context" "github.com/filecoin-project/go-state-types/abi" logging "github.com/ipfs/go-log/v2" "github.com/filecoin-project/venus/pkg/chain" "github.com/filecoin-project/venus/pkg/chainsampler" "github.com/filecoin-project/venus/pkg/encoding" ...
cas-bigdatalab/vdb-4.0
src/main/java/vdb/report/util/StringUtil.java
<gh_stars>1-10 package vdb.report.util; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.StringReader; import java.text.NumberFormat; import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; import org.jdom.outp...
PJB2TY/light-4j
egress-router/src/main/java/com/networknt/router/middleware/HandlerUtils.java
package com.networknt.router.middleware; import com.networknt.utility.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Map; public class HandlerUtils { private static final Logger logger = LoggerFactory.getLogger(HandlerUtils.class); public static final String DELIMITOR = "...
Fabio-Morais/Learning-Java
TicTacToe/src/sample/GameScreen.java
package sample; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.Scanner; public class GameScreen { private char[][] symbols; private int numX; private int numO; private int whoPlay; /* * 0-> FIRST PLAYER * 1-> SECOND PLAYER * */ public String IASym...
ExalDraen/terraform-provider-solace
vendor/github.com/ExalDraen/semp-client/client/msg_vpn/get_msg_vpns_responses.go
<reponame>ExalDraen/terraform-provider-solace<filename>vendor/github.com/ExalDraen/semp-client/client/msg_vpn/get_msg_vpns_responses.go // Code generated by go-swagger; DO NOT EDIT. package msg_vpn // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger gene...
24601/Jest
src/main/java/io/searchbox/core/MultiSearch.java
package io.searchbox.core; import io.searchbox.AbstractAction; import io.searchbox.Action; import java.util.LinkedHashSet; import java.util.Set; /** * @author <NAME> */ public class MultiSearch extends AbstractAction implements Action { private final Set<Search> searchSet = new LinkedHashSet<Search>(); ...
Kishanpa3/OakCreekDB
app/uploaders/document_uploader.rb
# require "image_processing/vips" require "image_processing/mini_magick" class DocumentUploader < Shrine # plugins and uploading logic THUMBNAILS = { small: [300, 300], medium: [600, 600], } plugin :remove_attachment plugin :pretty_location, namespace: "/", identifier: :animal_id plugin :validat...
tsani/goto
grading/typing/invalid/short_decl1.go
package main func main() { b, c := 2, 3 println(b, c) // No new decl on the lhs of a short decl b, c := 4, 5 println(b, c) }
jploot/jploot
jploot-cli/src/main/java/jploot/cli/InstallerCommand.java
package jploot.cli; import static com.pivovarit.function.ThrowingPredicate.unchecked; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.StringWriter; import java.lang.ProcessBuilder.Redirect; import java....
Kahsolt/OJ-Notes
Notes/Matrix/triband_matrix.c
#include <stdio.h> #define MAXN 4 // 2017-11-21 // 三对角矩阵的线性存储 // 矩阵规模: (MAXN*MAXN) => (3*MAXN-2)个非零元素 int matrix[3 * MAXN - 2] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, }; void index(int x, int y) { if (abs(x-y) > 1) puts("NULL"); else printf("idx=%d\n", 2*x + y); } void ordinate(int idx) { printf("x...
raghavgarg098/git-plugin
src/test/java/hudson/plugins/git/extensions/impl/WipeWorkspaceTest.java
<filename>src/test/java/hudson/plugins/git/extensions/impl/WipeWorkspaceTest.java package hudson.plugins.git.extensions.impl; import hudson.EnvVars; import hudson.model.FreeStyleBuild; import hudson.model.FreeStyleProject; import hudson.model.Result; import hudson.plugins.git.TestGitRepo; import hudson.plugins.git.ext...
FabienCont/flappy
sources/game/scripts/snippets/demo/set-best-score.js
<reponame>FabienCont/flappy<gh_stars>0 import * as memory from 'modules/memory'; export default function setBestScore() { const bestScoreSaved = memory.get('bestScore'); if (bestScoreSaved !== undefined) { return bestScoreSaved; } return 0; }
lechium/tvOS130Headers
System/Library/PrivateFrameworks/UIKitCore.framework/_UISwipeAnimationFactory.h
/* * This header is generated by classdump-dyld 1.0 * on Tuesday, November 5, 2019 at 2:46:11 AM Mountain Standard Time * Operating System: Version 13.0 (Build 17J586) * Image Source: /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by <NAME...
itcosplay/cryptobot
keyboards/default/admin_keyboard.py
from aiogram.types import ReplyKeyboardMarkup, KeyboardButton def create_kb_coustom_main_menu(user_id): from loader import db from data.config import super_admins if not user_id in super_admins: user_status = db.get_user_status(id=user_id) else: user_status = 'admin' keyboard = ...
zigapk/adventofcode
2020/day_19/one.py
<reponame>zigapk/adventofcode<gh_stars>0 rules = {} lines = [l.strip() for l in open('in', 'r').readlines()] rule_lines = lines[:lines.index('')] message_lines = lines[lines.index('') + 1:] for line in rule_lines: rule_id, rule = line.split(':') rule = rule.strip() rules[rule_id] = rule def generate_op...
bradennapier/redux-saga-process
src/generators.js
export { nilReducer, reducerReducer, arrayMapReducer, objectMapReducer, nestedObjectMapReducer, objectWildcardMapReducer, } from './process-lib/reducerGenerators'
10088/alipay-sdk-java-all
src/main/java/com/alipay/api/domain/GoodExpirationListDTO.java
<gh_stars>0 package com.alipay.api.domain; import java.util.Date; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 临期食品列表 * * @author auto create * @since 1.0, 2022-03-14 15:42:05 */ public class GoodExpirationListDTO extends AlipayObject { private static final long s...
liuxc123/GTUIKit
components/CommonComponent/TabBar/src/TitleImage/GTUITabBarTitleImageView.h
<reponame>liuxc123/GTUIKit // // GTUITabBarTitleImageView.h // GTCatalog // // Created by liuxc on 2018/12/9. // #import "GTUITabBarTitleView.h" #import "GTUITabBarTitleImageCell.h" #import "GTUITabBarTitleImageCellModel.h" NS_ASSUME_NONNULL_BEGIN @interface GTUITabBarTitleImageView : GTUITabBarTitleView @proper...
ethulhu/helix
upnpav/connectionmanager/messages.go
// SPDX-FileCopyrightText: 2020 <NAME> // // SPDX-License-Identifier: MIT package connectionmanager import ( "encoding/xml" "fmt" "strings" "github.com/ethulhu/helix/upnpav" "github.com/ethulhu/helix/xmltypes" ) type ( commaSeparatedProtocolInfos []upnpav.ProtocolInfo direction string status string ge...
pistolove/Lettcode
lettcode/src/reflect/Main.java
<filename>lettcode/src/reflect/Main.java package reflect; import java.io.File; import java.lang.reflect.Field; public class Main { public static void main(String[] args) { String root = "/Users/liqqc/git/mobile/xserver/xserver-lib/src/main/java/xserver/lib/tp"; File rfile = new File(root); if (rfile.exists())...
ApowoGames/phaser-ui
lib/ui/menu/Menu.js
import Buttons from '../buttons/Buttons.js'; import Methods from './Methods.js'; import CreateBackground from './CreateBackground.js'; import CreateButtons from './CreateButtons.js'; import GetDefaultBounds from '../../plugins/utils/defaultbounds/GetDefaultBounds.js'; import MenuSetInteractive from './MenuSetInteractiv...
enriqueescobar-askida/Kinito.Ruby.Patterns
chap09/ex7a_change_instance_demo.rb
<reponame>enriqueescobar-askida/Kinito.Ruby.Patterns<filename>chap09/ex7a_change_instance_demo.rb #!/usr/bin/env ruby require '../example' require 'ex3_renderer' example %q{ bto = BritishTextObject.new('hello', 50.8, :blue) def bto.color colour end def bto.text string end # ... def bto.size_inches return ...
deduper/raml-java-tools
raml-to-pojo-maven-example/src/test/java/foo/foo/impl/UnionsWithNullTest.java
<filename>raml-to-pojo-maven-example/src/test/java/foo/foo/impl/UnionsWithNullTest.java package foo.foo.impl; import foo.foo.NilUnionType; import foo.foo.NilUnionTypeImpl; import org.junit.Test; import static org.junit.Assert.assertTrue; /** * Created. There, you have it. */ public class UnionsWithNullTest { ...
friendlyhj/CraftTweaker
src/main/java/com/blamejared/crafttweaker/impl/util/DamageSourceHelper.java
<filename>src/main/java/com/blamejared/crafttweaker/impl/util/DamageSourceHelper.java package com.blamejared.crafttweaker.impl.util; import com.blamejared.crafttweaker.api.annotations.ZenRegister; import com.blamejared.crafttweaker_annotations.annotations.Document; import net.minecraft.entity.Entity; import net.minecr...
jason-neal/companion_simulations
mingle/models/broadcasted_models.py
"""Companion simulation models using Broadcasting.""" import numpy as np from scipy.interpolate import interp1d def one_comp_model(wav, model1, *, gammas=None): """Make 1 component simulations, broadcasting over gamma values.""" # Enable single scalar inputs (turn to 1d np.array) gammas = check_broadcasta...
IDontHaveAnyClueWhatToPutHere/ce218-InconvenientSpaceRocks
src/GamePackage/Models/LiterallyJustTheOpeningCredits.java
package GamePackage.Models; import java.io.*; import java.util.ArrayList; class LiterallyJustTheOpeningCredits { static ArrayList<String> OPENING_CREDITS; static { //if it wasn't obvious, yes, this was repurposed from the HighScoreHandler OPENING_CREDITS = new ArrayList<>(); try{ ...
lucasosouza/apps
Node/convenios/isolate-convenio-id.js
<filename>Node/convenios/isolate-convenio-id.js var fs = require('fs'); var http = require('http'); function getConvenioDetails() = { var detalhesConvenios = []; fs.readFile('convenios.json', function(err,data){ var convenios = JSON.parse(data); convenios.forEach(function(convenio){ queryFor(convenio["id"]) ...
lujingwei002/coord
src/coord/gate/gate_promise.cc
<gh_stars>0 #include "coord/gate/gate_promise.h" #include "coord/coord.h" #include "coord/gate/gate.h" #include "coord/gate/gate_cluster.h" #include "coord/component/script_component.h" #include "coord/builtin/exception.h" #include "coord/builtin/base_request.h" namespace coord { namespace gate { CC_IMPLEMENT(GatePro...