repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
OldCoder/BEWorld
engine/src/io.h
<reponame>OldCoder/BEWorld /* * header file for io.c */ #define THRESH 3200 #define LIMIT 32000 /* * the joystick analog inputs range -32768 to 32767. * these map the analog results onto a smaller range. */ #define RANGE 127 #define SHIFT 8 /* a direction-specifier */ struct dir { int horiz, vert; }; /* a st...
chrisidefix/devide
modules/insight/isolatedConnect.py
# Copyright (c) <NAME>, TU Delft # All rights reserved. # See COPYRIGHT for details. # mini-changelog # * added work-around for empty input bug in ITK 3.20 from module_base import ModuleBase from module_mixins import ScriptedConfigModuleMixin import itk import module_kits.itk_kit as itk_kit class isolatedConnect(Scr...
timecorridor/filecoin-bridge
bridge/class-master/depend/pari/src/basemath/ZG.c
<filename>bridge/class-master/depend/pari/src/basemath/ZG.c /* Copyright (C) 2011 The PARI group. This file is part of the PARI/GP package. PARI/GP is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. It is distribu...
Mommoo/FlatSwing
src/com/mommoo/flat/frame/colorpicker/ColorApplyView.java
package com.mommoo.flat.frame.colorpicker; import com.mommoo.flat.border.FlatEmptyBorder; import com.mommoo.flat.button.FlatButton; import com.mommoo.flat.frame.FlatDialog; import com.mommoo.flat.layout.linear.LinearLayout; import com.mommoo.flat.layout.linear.Orientation; import com.mommoo.flat.layout.linear.constrai...
vrautela/treadmill
lib/python/treadmill/tests/plugin_manager_test.py
"""Unit test for plugin manager. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import collections import unittest import mock import pkg_resources from treadmill import plugin_manager # pylint: disable=protec...
chandlerprall/kibana
packages/kbn-es/src/utils/extract_config_files.js
const path = require('path'); const fs = require('fs'); const mkdirp = require('mkdirp'); /** * Copies config references to an absolute path to * the provided destination. This is necicary as ES security * requires files to be within the installation directory * * @param {Array} config * @param {String} dest */...
JuanBalceda/java-architecture
src/com/balceda/archj/service/implementation/CategoryServiceImpl.java
<filename>src/com/balceda/archj/service/implementation/CategoryServiceImpl.java package com.balceda.archj.service.implementation; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.balceda.archj.dao.interfaces.CategoryDAO; i...
suhao/asioexpress
source/SampleTcpClient1/Message.hpp
<reponame>suhao/asioexpress // Copyright <NAME> 2013 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #pragma once #include <string> #include <stdio.h> #include "AsioExpress/...
jpryne/jasper.js
src/SoundAudio.js
/** Sound back-end using HTML DOM Audio object. * */ PLAYGROUND.SoundAudio = function(app) { this.app = app; var canPlayMp3 = (new Audio).canPlayType("audio/mp3"); var canPlayOgg = (new Audio).canPlayType('audio/ogg; codecs="vorbis"'); if (this.app.preferedAudioFormat === "mp3") { if (canPlayMp3) this...
Lobbywatch/website
src/assets/Twitter.js
<filename>src/assets/Twitter.js import PropTypes from 'prop-types' import React from 'react' import { LW_BLUE_DARK, WHITE } from '../theme' const Icon = ({ size, style, className }) => ( <svg width={size} height={size} style={style} className={className} viewBox='0 0 40 40' > <path fi...
x-ercise/.dotfiles
homedir/.vscode/extensions/ms-vsliveshare.vsliveshare-0.3.790/out/src/abTests/abTestsUtil.js
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const fs_1 = require("fs"); const path = require("path"); /** * Function to check if the folder is LiveShare extension directory. * @param pathComponents * - @source - the path to the folder. * - @name - folder name. * @returns ...
dmgerman/hadoop
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ReservationId.java
begin_unit|revision:0.9.5;language:Java;cregit-version:0.0.1 begin_comment comment|/** * 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 license...
barmintor/active_fedora
lib/active_fedora/sharding.rb
module ActiveFedora module Sharding extend ActiveSupport::Concern included do class_attribute :fedora_connection self.fedora_connection = {} end module ClassMethods # Uses {#shard_index} to find or create the rubydora connection for this pid # @param [String] pid the identifi...
andriiginting/FinalProjectAndroidDevExpert
app/src/main/java/com/example/andriginting/myapplication/activity/DetailMovieActivity.java
<reponame>andriiginting/FinalProjectAndroidDevExpert package com.example.andriginting.myapplication.activity; import android.os.Bundle; import android.support.design.widget.Snackbar; import android.support.v4.app.LoaderManager; import android.support.v4.content.Loader; import android.support.v7.app.AppCompatActivity; ...
sarang-apps/darshan_browser
components/policy/core/common/policy_map.cc
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "components/policy/core/common/policy_map.h" #include <algorithm> #include <utility> #include "base/callback.h" #include "base/stl_util.h" #inc...
TeamSPoon/logicmoo_base
prolog/logicmoo/pdt_server/pdt.graphicalviews/src/org/cs3/pdt/graphicalviews/model/realizer/nodes/LogtalkNodeRealizer.java
<gh_stars>10-100 package org.cs3.pdt.graphicalviews.model.realizer.nodes; import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import org.cs3.pdt.graphicalviews.model.GraphModel; import org.cs3.pdt.graphicalviews.utils.LogtalkStyles; import y.base.Node; import y.view.LineType; import y.view.NodeL...
BeeBeeCue/MapViz
node_modules/@here/harp-transfer-manager/src/DeferredPromise.js
<reponame>BeeBeeCue/MapViz "use strict"; /* * Copyright (C) 2017-2020 HERE Europe B.V. * Licensed under Apache 2.0, see full license in LICENSE * SPDX-License-Identifier: Apache-2.0 */ Object.defineProperty(exports, "__esModule", { value: true }); exports.DeferredPromise = void 0; /** * * DeferredPromise takes an...
nabeelmerchant1/kolibri_assessment_client
client/js/_player/components/common/movable_words/movable_words.spec.js
import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-dom/test-utils'; import wrapInDndContext from '../../../../../specs_support/dnd_wrapper'; import { MovableWords, __RewireAPI__ as RewireAPI } from './movable_words'; describe('movable...
boro-alpha/bclearer
bclearer_source/b_code/substages/operations/b_evolve/convention_shift_operations/convention_shifters/common/new_subpackage_creator.py
from bclearer_source.b_code.substages.operations.common.ea_guid_from_nf_uuid_creator import create_ea_guid_from_nf_uuid from nf_common_source.code.nf.types.nf_column_types import NfColumnTypes from nf_common_source.code.services.identification_services.uuid_service.uuid_helpers.uuid_factory import create_new_uuid from ...
egorodet/CML
cml/quaternion/comparison.h
/* -*- C++ -*- ------------------------------------------------------------ @@COPYRIGHT@@ *-----------------------------------------------------------------------*/ /** @file */ #pragma once #ifndef cml_quaternion_comparison_h #define cml_quaternion_comparison_h #include <cml/quaternion/readable_quaternion.h> na...
the-last-willy/id3d
galin/src/shadertoy/tree/sdf_primitive/sphere/sphere.hpp
#pragma once struct SDF_Sphere { float radius = 1.f; };
eriksuta/fidm
fidm/src/main/java/com/esuta/fidm/infra/exception/DatabaseCommunicationException.java
package com.esuta.fidm.infra.exception; /** * @author shood * */ public class DatabaseCommunicationException extends GeneralException{ public DatabaseCommunicationException(){ super(); } public DatabaseCommunicationException(String message){ super(message); } public DatabaseCo...
mmblsp/py_template
tests/integration/test_views.py
from datetime import date import pytest from allocation import bootstrap, views from allocation.domain import commands from allocation.service_layer import unit_of_work today = date.today() @pytest.fixture def messagebus(session_factory): bus = bootstrap.bootstrap( start_orm=False, uow=unit_of_w...
Octoberr/letcode
easy/climbing_stairs.py
""" You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? Note: Given n will be a positive integer. Example 1: Input: 2 Output: 2 Explanation: There are two ways to climb to the top. 1. 1 step + 1 step 2....
fyancy/Meta-Learning-in-Fault-Diagnosis
Models/RelationNet/relation_model.py
<filename>Models/RelationNet/relation_model.py import torch.nn as nn def conv_block(in_channels, out_channels): return nn.Sequential( nn.Conv1d(in_channels, out_channels, kernel_size=3, padding=1), nn.BatchNorm1d(out_channels), nn.ReLU(), nn.MaxPool1d(kernel_size=2), ) class e...
lshowbiz/agnt_ht
src/dao/com/joymain/jecs/bd/dao/JbdYd399RecommendHistDao.java
package com.joymain.jecs.bd.dao; import java.util.List; import com.joymain.jecs.bd.model.JbdYd399RecommendHist; import com.joymain.jecs.dao.Dao; public interface JbdYd399RecommendHistDao extends Dao { public List getJbdYd399RecommendHists(JbdYd399RecommendHist jbdYd399RecommendHist); public JbdYd399RecommendHis...
kovihq/unleash-frontend
src/page/admin/api/api-key-list-container.js
<reponame>kovihq/unleash-frontend import { connect } from 'react-redux'; import Component from './api-key-list'; import { fetchApiKeys, removeKey, addKey } from './../../../store/e-api-admin/actions'; import { hasPermission } from '../../../permissions'; export default connect( state => ({ location: state...
vbogatyrov/tdi-studio-se
main/plugins/org.talend.designer.components.libs/libs_src/Netsuite_Client/src/main/java/com/netsuite/webservices/platform/common/CurrencyRateSearchRowBasic.java
<reponame>vbogatyrov/tdi-studio-se package com.netsuite.webservices.platform.common; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import com.netsuite.webservices.platform.c...
nanonashy/PPPUCpp2ndJP
ch04/e4-09.cpp
// 問題文: // 練習問題8で考案者が所望した米のグレイン量を計算する。数字が大きすぎて int // または double 型の変数に収まらないことがわかるだろう。int および double // 型の値として正確に表 // せないほど数字が大きくなった場合はどうなるか。(int型を使って)正確なグレイン量を計算 // できる升目は最大でいくつになるか。(double型を使って)おおよそのグレイン量を計算でき // る升目の数は最大でいくつになるか。 // // コメント: // int // 型は31升目まで正確なグレイン量を計算できたが、32升目からオーバーフローした。 // 対し...
alexey-anufriev/intellij-community
python/testData/debug/unittests_debugging/test_case_12.py
import unittest def f(): raise RuntimeError("Boom!") class MyTestCase(unittest.TestCase): def setUp(self): self.x = f() def testDummy(self): self.assertTrue(True)
hyu-iot/gem5
src/systemc/tests/systemc/utils/sc_report/cached/cached.cpp
/***************************************************************************** Licensed to Accellera Systems Initiative Inc. (Accellera) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Accellera licenses...
calvinchengx/baserow
backend/src/baserow/core/user/exceptions.py
<gh_stars>0 class UserNotFound(Exception): """Raised when a user with given parameters is not found.""" class UserAlreadyExist(Exception): """Raised when a user could not be created because the email already exists.""" class InvalidPassword(Exception): """Raised when the provided password is incorrect."...
PeterWofford/astrobee
shared/msg_conversions/tools/pose_stamped_msg_cnv.cc
/* Copyright (c) 2017, United States Government, as represented by the * Administrator of the National Aeronautics and Space Administration. * * All rights reserved. * * The Astrobee platform is licensed under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with...
manveru/ver
config/preferences/Make.rb
# Encoding: UTF-8 [{name: "Miscellaneous", scope: "source.makefile", settings: {increaseIndentPattern: "^[^\\t ]+:", shellVariables: [{name: "TM_COMMENT_START", value: "# "}]}, uuid: "E05AF624-5BD8-4A54-A0E8-F80E8191D69E"}]
trainline/environment-manager
client/app/configuration/notification-settings/notificationSettingsList.js
/* TODO: enable linting and fix resulting errors */ /* eslint-disable */ /* Copyright (c) Trainline Limited, 2016-2017. All rights reserved. See LICENSE.txt in the project root for license information. */ 'use strict'; angular.module('EnvironmentManager.common') .component('notificationSettingsList', { templateU...
preferme/codec
src/main/java/hl/nio/codec/field/ObjectableFieldCodec.java
<filename>src/main/java/hl/nio/codec/field/ObjectableFieldCodec.java package hl.nio.codec.field; import hl.nio.codec.CodecException; import java.nio.ByteBuffer; public interface ObjectableFieldCodec<T> extends GenericFieldCodec<T> { int NULL_OBJECT_KEY = 0; @Override default void encodeField(T value, B...
cs6402/Searching-based-social-app-server
bro-msgcenter/bro-msgcenter-web/src/main/java/com/tdsoft/bro/msgcenter/ctrl/MessageBroker.java
<gh_stars>0 package com.tdsoft.bro.msgcenter.ctrl; import java.io.IOException; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.stereotyp...
windystrife/UnrealEngine_NVIDIAGameWork
Engine/Source/Editor/DetailCustomizations/Private/ColorGradingVectorCustomization.cpp
<reponame>windystrife/UnrealEngine_NVIDIAGameWork // Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #include "ColorGradingVectorCustomization.h" #include "IPropertyUtilities.h" #include "SNumericEntryBox.h" #include "SColorGradingPicker.h" #include "IDetailChildrenBuilder.h" #include "DetailLayoutBuilder.h" ...
infinitio/elle
src/elle/protocol/8rpc.cc
#include <iostream> #include <boost/lexical_cast.hpp> #include <elle/reactor/network/TCPSocket.hh> #include <elle/reactor/scheduler.hh> #include <elle/protocol/ChanneledStream.hh> #include <elle/protocol/RPC.hh> #include <elle/protocol/Serializer.hh> elle::reactor::Scheduler& scheduler() { static elle::reactor::S...
jochenwierum/rpg-soundscape
player/src/main/java/de/jowisoftware/rpgsoundscape/player/rest/SystemController.java
package de.jowisoftware.rpgsoundscape.player.rest; import de.jowisoftware.rpgsoundscape.player.config.ApplicationSettings; import de.jowisoftware.rpgsoundscape.player.config.ApplicationSettings.Audio.Backend; import de.jowisoftware.rpgsoundscape.player.config.ApplicationSettings.ExitType; import org.slf4j.Logger; impo...
yinchengtsinghua/RippleCPPChinese
src/ripple/app/ledger/AcceptedLedger.h
//此源码被清华学神尹成大魔王专业翻译分析并修改 //尹成QQ77025077 //尹成微信18510341407 //尹成所在QQ群721929980 //尹成邮箱 <EMAIL> //尹成毕业于清华大学,微软区块链领域全球最有价值专家 //https://mvp.microsoft.com/zh-cn/PublicProfile/4033620 //———————————————————————————————————————————————————————————————————————————————————————————————————————————————— /* 此文件是Rippled的一部分:https...
jordaoqualho/Lorena-Felicio
node_modules/@egjs/hammerjs/src/utils/bind-fn.js
<filename>node_modules/@egjs/hammerjs/src/utils/bind-fn.js /** * @private * simple function bind * @param {Function} fn * @param {Object} context * @returns {Function} */ export default function bindFn(fn, context) { return function boundFn() { return fn.apply(context, arguments); }; }
rackeric/rack
commands/networkscommands/subnetcommands/list.go
<filename>commands/networkscommands/subnetcommands/list.go package subnetcommands import ( "fmt" "strconv" "github.com/rackspace/rack/commandoptions" "github.com/rackspace/rack/handler" "github.com/rackspace/rack/internal/github.com/codegangsta/cli" osSubnets "github.com/rackspace/rack/internal/github.com/racks...
upgradvisor/vyper
vyper/old_codegen/function_definitions/__init__.py
from .common import generate_lll_for_function, is_default_func, is_initializer # noqa
Jemereny/gate
app/controllers/api/v1/base_controller.rb
class ::Api::V1::BaseController < ActionController::Base protect_from_forgery with: :null_session before_action :authenticate_user_from_token! def authenticate_user_from_token! if get_token.nil? || !AccessToken.valid_token(get_token) raise_unauthorized end end protected def current_user ...
Dragas/mage
Mage.Sets/src/mage/cards/e/EliteArcanist.java
<gh_stars>1-10 package mage.cards.e; import mage.MageInt; import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.CostAdjuster; import mage.abilities.costs.common.Tap...
ScalablyTyped/SlinkyTyped
v/vscode-languageclient/src/main/scala/typingsSlinky/vscodeLanguageclient/mod/DiagnosticTag.scala
package typingsSlinky.vscodeLanguageclient.mod import typingsSlinky.vscodeLanguageclient.vscodeLanguageclientNumbers.`1` import typingsSlinky.vscodeLanguageclient.vscodeLanguageclientNumbers.`2` import org.scalablytyped.runtime.StObject import scala.scalajs.js import scala.scalajs.js.`|` import scala.scalajs.js.annota...
bserem/ddev
pkg/ddevapp/php.go
<reponame>bserem/ddev package ddevapp import ( "fmt" "github.com/drud/ddev/pkg/archive" "github.com/drud/ddev/pkg/fileutil" "github.com/pkg/errors" "os" "path/filepath" ) func phpPostStartAction(app *DdevApp) error { if !app.DisableSettingsManagement { if _, err := app.CreateSettingsFile(); err != nil { r...
promethe42/ifcplusplus
IfcPlusPlus/src/ifcpp/IFC4/lib/IfcProjectedOrTrueLengthEnum.cpp
/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #include <sstream> #include <limits> #include <map> #include "ifcpp/reader/ReaderUtil.h" #include "ifcpp/writer/WriterUtil.h" #include "ifcpp/model/BasicTypes.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/IFC4/include/IfcProj...
BBVA/purescript-google-apps
src/Control/Google/Apps/Forms/MultipleChoiceItem.js
exports.createChoiceWithStringImpl = (value) => (p_) => () => { return p_.createChoice(value); } exports.createChoiceWithStringBooleanImpl = (value) => (isCorrect) => (p_) => () => { return p_.createChoice(value, isCorrect); } exports.createChoiceWithStringPagebreakitemImpl = (value) => (navigationItem) => (p_) ...
bryamrrr/universyty
db/migrate/20161107223843_create_plans.rb
class CreatePlans < ActiveRecord::Migration[5.0] def change create_table :plans do |t| t.string :cta t.decimal :pricetag t.timestamps end end end
sumin963/goroslib
pkg/msgs/actionlib_msgs/MsgGoalStatusArray.go
package actionlib_msgs //nolint:golint import ( "github.com/aler9/goroslib/pkg/msg" "github.com/aler9/goroslib/pkg/msgs/std_msgs" ) type GoalStatusArray struct { //nolint:golint msg.Package `ros:"actionlib_msgs"` Header std_msgs.Header //nolint:golint StatusList []GoalStatus //nolint:golint }
mickey0524/leetcode
1947.Maximum-Compatibility-Score-Sum.java
<filename>1947.Maximum-Compatibility-Score-Sum.java // https://leetcode.com/problems/maximum-compatibility-score-sum/ // algorithms // Medium (56.12%) // Total Accepted: 7.8K // Total Submissions: 13.9K class Solution { private static int res; public int maxCompatibilitySum(int[][] students, int[][] ...
goncaloperes/bokeh
examples/plotting/file/data_models.py
import numpy as np from bokeh.core.properties import Float from bokeh.io import save from bokeh.model import DataModel from bokeh.models import ColumnDataSource, CustomJS from bokeh.plotting import figure class Params(DataModel): amp = Float(default=0.1, help="Amplitude") freq = Float(default=0.1, help="Freq...
hokaso/hocassian-media-matrix
matrix-people-back-end/src/main/java/com/hocassian/people/domain/web/PersonWeb.java
package com.hocassian.people.domain.web; /** * 功能描述: * * @author Hocassian * @date 2021-01-15 22:12 */ public class PersonWeb { private String personWebId; private String personWebName; private String personWebPic; private String personWebShow; private String personWebLink; private S...
ertrzyiks/duktape
api-testcases/test-throw.c
/*=== rc=1 -> throw me ===*/ int test_1(duk_context *ctx) { duk_push_string(ctx, "throw me"); duk_throw(ctx); return 0; } void test(duk_context *ctx) { int rc; rc = duk_safe_call(ctx, test_1, 0, 1, DUK_INVALID_INDEX); printf("rc=%d -> %s\n", rc, duk_get_string(ctx, -1)); }
c2m2-asia/kathmandu-portal-client
app/containers/App/index.js
<reponame>c2m2-asia/kathmandu-portal-client /** * * App.js * * This component is the skeleton around the actual pages, and should only * contain code that should be seen on all pages. (e.g. navigation bar) * */ import React, { useEffect } from 'react'; import { Switch, Route } from 'react-router-dom'; import Re...
darianbridge/WebAthl
Projects/WebAthl/FinancialRegistrationSet.h
<reponame>darianbridge/WebAthl #if !defined(AFX_FINANCIALREGISTRATIONSET_H__INCLUDED_) #define AFX_FINANCIALREGISTRATIONSET_H__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 // FinancialRegistrationSet.h : header file // /////////////////////////////////////////////////////////////////////////...
zh-plus/CodeJam
LeetCode/top_interview_questions/Easy/Sqrt.py
class Solution: def mySqrt(self, x: int) -> int: return int(self._sqrt(x)) def _sqrt(self, x): xn = 6 for _ in range(1000000): xn = xn - ((xn ** 2 - x) / (2 * xn)) return xn if __name__ == '__main__': s = Solution() r = s._sqrt(1000) print(r) prin...
jnchengmh/optaplanner
optaplanner-core/src/test/java/org/optaplanner/core/impl/heuristic/selector/common/nearby/BlockDistributionNearbyRandomTest.java
/* * Copyright 2014 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 the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
shivam-s16/Project-Guidance
Mobile Applications/Intermediate/Cowost Project/app/src/main/java/com/tawfik/cowosp/Registration/SignUp.java
<reponame>shivam-s16/Project-Guidance package com.tawfik.cowosp.Registration; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; import com.google.android.gms.tasks.OnCompleteListener; import com.goo...
Davidodari/POLITICO-API
run.py
<filename>run.py """app initializer """ from api import create_app import os from flask import redirect, make_response, jsonify # Create app instance with env def app_context(): if os.getenv("FLASK_ENV") is None: application = create_app('testing') return application application = create_app(o...
fgrid/iso20022
AmountAndDirection34.go
<gh_stars>10-100 package iso20022 // Amount of money expressed with an optional currency code and debit/credit indicator. type AmountAndDirection34 struct { // Amount of money that results in an increase (positively signed) or decrease (negatively signed), with specification of the currency. Amount *ActiveOrHistori...
midnightbr/Faculdade
java/JARS/hibernate-release-5.6.0.Final/project/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/SessionFactoryHelper.java
<filename>java/JARS/hibernate-release-5.6.0.Final/project/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/SessionFactoryHelper.java /* * Hibernate, Relational Persistence for Idiomatic Java * * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the r...
omgimanerd/doclt
commands/volumes/resize.js
<gh_stars>10-100 /** * @fileoverview Module handling the volume resize command. * @author <EMAIL> (<NAME>) */ const display = require('../../lib/display') const util = require('../../lib/util') exports.command = 'resize <volume id> <size>' exports.description = 'Resize a volume'.yellow exports.handler = argv => ...
483759/Next-Place
backend/src/test/java/com/aespa/nextplace/pladex/PladexRepositoryTest.java
<filename>backend/src/test/java/com/aespa/nextplace/pladex/PladexRepositoryTest.java package com.aespa.nextplace.pladex; import com.aespa.nextplace.model.entity.Pladex; import com.aespa.nextplace.model.entity.PlamonRank; import com.aespa.nextplace.model.repository.PladexRepository; import org.junit.jupiter.api.Disable...
xzhuah/codingDimension
xinyu/java/src/main/java/nodes/stockinfoNode/db/impls/DeltaDelayPriceAutoUpdaterImpl.java
package nodes.stockinfoNode.db.impls; import com.google.inject.Inject; import common.time.TimeClient; import common.time.TimeInterval; import nodes.stockinfoNode.constants.StockConstant; import nodes.stockinfoNode.crawler.AlphavantageCrawler; import nodes.stockinfoNode.db.PriceAutoUpdater; import nodes.stockinfoNode.d...
moogacs/aws-sdk-go-v2
service/codedeploy/api_op_CreateApplication.go
<gh_stars>1000+ // Code generated by smithy-go-codegen DO NOT EDIT. package codedeploy import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/codedeploy/types" "github.com/aws/smithy-go/middleware" smithyh...
SkOODaT/GTA-V-Decompiled-Scripts
decompiled_scripts/completionpercentage_controller.c
<reponame>SkOODaT/GTA-V-Decompiled-Scripts<gh_stars>1-10 #region Local Var var uLocal_0 = 0; var uLocal_1 = 0; int iLocal_2 = 0; int iLocal_3 = 0; int iLocal_4 = 0; int iLocal_5 = 0; int iLocal_6 = 0; int iLocal_7 = 0; int iLocal_8 = 0; int iLocal_9 = 0; int iLocal_10 = 0; int iLocal_11 = 0; v...
twowheelstogo/ec-storefront-tavola
components/ShippingMethodCheckoutAction/ShippingMethodCheckoutAction.js
import React from "react"; import { withComponents } from "@reactioncommerce/components-context"; class ShippingMethodCheckoutAction extends React.Component{ mapFulfillmentOptions = (availableFulfillmentOptions) => availableFulfillmentOptions .filter(option=>option.price.amount>0) .map((option) => ({ ...
fartherp/framework
framework-database/src/main/java/com/github/fartherp/framework/database/mybatis/plugin/page/PaginationInterceptor.java
/** * Copyright (c) 2014-2019 CK. * * 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 applicabl...
HouariZegai/Design-Patterns-in-Java
katas/tennis/src/main/java/com/houarizegai/tenniskata/exception/RestExceptionHandler.java
package com.houarizegai.tenniskata.exception; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.validation.FieldError; import org.springframework.web.bind.MethodArgumentNotValidException; import org.spring...
Gamebuster19901/LicenseChecker
src/main/java/com/gamebuster19901/license/create/Finish.java
<reponame>Gamebuster19901/LicenseChecker<filename>src/main/java/com/gamebuster19901/license/create/Finish.java /* * LicenseChecker Copyright 2019 Gamebuster19901 * * 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...
yinfuquan/file-upload
cloud/smthit-fm/smthit-api/src/main/java/com/smthit/framework/module/IModuleFactory.java
<filename>cloud/smthit-fm/smthit-api/src/main/java/com/smthit/framework/module/IModuleFactory.java /** * */ package com.smthit.framework.module; import org.springframework.context.ApplicationContext; /** * @author Bean * */ public interface IModuleFactory { public <T> T getService(Class<T> clz); public Applic...
DrChainsaw/neuralODE4j
src/main/java/examples/cifar10/OdeBlockTime.java
package examples.cifar10; import ode.vertex.conf.OdeVertex; import ode.vertex.conf.ShapeMatchVertex; import ode.vertex.conf.helper.OdeHelper; import org.deeplearning4j.nn.conf.NeuralNetConfiguration; import org.deeplearning4j.nn.conf.graph.MergeVertex; import org.deeplearning4j.nn.conf.layers.ActivationLayer; import o...
SevenDayCandle/STS-FoolMod
src/main/java/pinacolada/cards/eternal/normal/WishesUnnumbered.java
<gh_stars>0 package pinacolada.cards.eternal.normal; import com.megacrit.cardcrawl.cards.AbstractCard; import com.megacrit.cardcrawl.characters.AbstractPlayer; import com.megacrit.cardcrawl.monsters.AbstractMonster; import pinacolada.cards.base.PCLCardData; import pinacolada.cards.base.PCLCardTarget; import pinacolada...
kikikos/openairinterface5g
cmake_targets/lte_build_oai/build/CMakeFiles/RRC_Rel14/RRCConnectionRequest-NB-r13-IEs.c
<reponame>kikikos/openairinterface5g<gh_stars>0 /* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "NBIOT-RRC-Definitions" * found in "/home/user/openairinterface5g/openair2/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-14.7.0.asn1" * `asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -n...
superhize/AureliumSkills
src/main/java/com/archyx/aureliumskills/api/XpGainEvent.java
package com.archyx.aureliumskills.api; import com.archyx.aureliumskills.skills.Skill; import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; public class XpGainEvent extends Event { private static final HandlerList handlers = new HandlerList(); private final Pla...
greenhandatsjtu/LeetCode
198. House Robber.go
<filename>198. House Robber.go package main import ( "fmt" "sort" ) //dynamic programming func rob(nums []int) int { if len(nums) == 0 { return 0 } dp := make([]int, len(nums)) copy(dp, nums) var count, cache int for i := 0; i < len(nums); i++ { count = 0 for j := i - 2; j >= 0 && count < 2; j-- { ca...
walterMPDL/escidoc-proai
src/java/proai/CloseableIterator.java
<gh_stars>0 package proai; import java.util.Iterator; import proai.error.ServerException; public interface CloseableIterator<T> extends Iterator<T> { public boolean hasNext() throws ServerException; public T next() throws ServerException; public void close() throws ServerException; ...
grafioschtrader/grafioschtrader
backend/grafioschtrader-server/src/main/java/grafioschtrader/rest/MultipleRequestToOneResource.java
package grafioschtrader.rest; import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; i...
abigailrose/wpilib-source-clone
wpilibc/Athena/src/Vision/FrcError.cpp
<filename>wpilibc/Athena/src/Vision/FrcError.cpp /*----------------------------------------------------------------------------*/ /* Copyright (c) FIRST 2014-2016. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by th...
NickDevG/ui-kit
transforms/v10/icon-theme-to-color.js
<reponame>NickDevG/ui-kit const createTransformer = require('./react-component-rename-props'); const componentNamesToRefactor = require('./icons/icon-names'); const propertyRenameMap = { theme: 'color', }; const valueRenameMap = { color: { black: 'solid', gray: 'neutral60', white: 'surface', blue:...
Arello-Mobile/AnLib
anlib/src/main/java/com/arellomobile/anlib/async/Async.java
<filename>anlib/src/main/java/com/arellomobile/anlib/async/Async.java package com.arellomobile.anlib.async; import java.util.concurrent.Callable; import java.util.concurrent.CancellationException; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.Future; ...
the-zebulan/CodeWars
tests/beta_tests/test_remove_unnecessary_characters_from_items_in_list.py
import unittest from katas.beta.remove_unnecessary_characters_from_items_in_list import ( remove_char) class RemoveCharTestCase(unittest.TestCase): def test_equal_1(self): self.assertEqual(remove_char( ['$56.6xs4', '{$33ae.5(9', '$29.4e9', '%$9|4d.20', 'AAA$4r R4.94'] ), ['$56.64'...
fagaiera/python-machine-learning-book-3rd-edition-examples
Chapter 14/04 Simplifying implementations of common architectures via the Keras API/program.py
<reponame>fagaiera/python-machine-learning-book-3rd-edition-examples<gh_stars>0 from mlxtend.plotting import plot_decision_regions import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # Simplifying implementations of common architectures via t...
xukeek/JRAW
lib/src/main/java/net/dean/jraw/models/LiveThread.java
package net.dean.jraw.models; import com.google.auto.value.AutoValue; import com.squareup.moshi.Json; import com.squareup.moshi.JsonAdapter; import com.squareup.moshi.Moshi; import net.dean.jraw.RedditClient; import net.dean.jraw.databind.RedditModel; import net.dean.jraw.databind.UnixTime; import net.dean.jraw.refere...
LucasBischof/Praticando_Python
.vscode/aula10.py
<filename>.vscode/aula10.py<gh_stars>0 tempo = int(input('quanto tempo tem o seu carro: ')) if tempo <=3 : print('carro novo ') else: print('carro veio') print('--FIM--')
pgmaginot/DARK_ARTS
src/materials_opacity_cv_planck/Opacity_File_Details.h
#ifndef Rad_Helper_h #define Rad_Helper_h #include "Rad_Helper.h" #endif #ifndef Opacity_Object_h #define Opacity_Object_h #include "Opacity_Object.h" #endif #include <vector> #include <map> using std::vector; using std::map; class Opacity_File_Details { public: int iNoOfTempEntries; int iNoOf...
jpalanco/edr
bin/fs.go
<gh_stars>1-10 package main import ( "log" "os" "strings" kingpin "gopkg.in/alecthomas/kingpin.v2" vql_subsystem "www.velocidex.com/golang/velociraptor/vql" vql_networking "www.velocidex.com/golang/velociraptor/vql/networking" vfilter "www.velocidex.com/golang/vfilter" ) var ( fs_command = app.Comma...
dnv-opensource/Reflection
jsScript/jsScriptConversionGraph.cpp
// Copyright (c) 2021 DNV AS // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt #include "jsScriptConversionGraph.h" #include "Reflection/TypeConversions/IConversion.h" #include "Reflection/Types/DynamicTypeTra...
slipstream/SlipStreamClient
client/src/main/python/ss-scale-disk.py
<reponame>slipstream/SlipStreamClient #!/usr/bin/env python """ SlipStream Client ===== Copyright (C) 2014 SixSq Sarl (sixsq.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 h...
XanderStrike/kh-site
server/pages_test.go
<reponame>XanderStrike/kh-site<filename>server/pages_test.go package server_test import ( "io/ioutil" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/kinhouse/kh-site/fakes" . "github.com/kinhouse/kh-site/server" ) var _ = Describe("Pages", func() { var pageSpecs []PageSpec var pageFactory...
GenaAiv/portfolio-website
node_modules/node-forge/lib/oids.js
<filename>node_modules/node-forge/lib/oids.js<gh_stars>0 /** * Object IDs for ASN.1. * * @author <NAME> * * Copyright (c) 2010-2013 Digital Bazaar, Inc. */ var forge = require('./forge'); forge.pki = forge.pki || {}; var oids = module.exports = forge.pki.oids = forge.oids = forge.oids || {}; // set ...
4074/DrawingPlace
build/controllers/index.js
<gh_stars>10-100 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.PlaceController = exports.AuthController = exports.HomeController = undefined; var _home = require('./home'); var _home2 = _interopRequireDefault(_home); var _auth = require('./auth'); var _auth2 = _interopRequi...
Nyran/schism
scm_gl_core/src/scm/gl_core/query_objects/query.h
<reponame>Nyran/schism // Copyright (c) 2012 <NAME> <<EMAIL>> // Distributed under the Modified BSD License, see license.txt. #ifndef SCM_GL_CORE_QUERY_H_INCLUDED #define SCM_GL_CORE_QUERY_H_INCLUDED #include <scm/gl_core/render_device/render_device_fwd.h> #include <scm/gl_core/render_device/device_child.h> #includ...
ursif/restful-interfaces
src/globalMiddleware/ratelimit/index.js
<reponame>ursif/restful-interfaces const ratelimit = require('koa-ratelimit') module.exports = () => ratelimit({ duration: 60000, max: 100 })
itonov/Java-Advanced
03_StringProcessing/src/ParseURL.java
<reponame>itonov/Java-Advanced import java.util.Scanner; public class ParseURL { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String[] inputParams = scanner.nextLine().split("://"); String protocol = ""; String server = ""; String resour...
eGovFramework/egovframe-development
egovframework.hdev.imp.ide/src/egovframework/hdev/imp/ide/model/FilesTableViewerLabelProvider.java
/* * Copyright 2008-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
sandeepvasande/Hydrograph
hydrograph.server/hydrograph.server.debug/src/main/java/hydrograph/server/utilities/Constants.java
/******************************************************************************* * Copyright 2016, 2017 Capital One Services, LLC and Bitwise, 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 ...