repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
chris3105x/EasyPrefix | src/main/java/com/christian34/easyprefix/utils/ChatFormatting.java | package com.christian34.easyprefix.utils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* EasyPrefix 2021.
*
* @author Christian34
*/
public enum ChatFormatting {
BOLD("l", Message.FORMATTING_BOLD.getText()),
ITALIC("o", Message.FORMATTING_ITALIC.getText()),
... |
shubhambhattar/azure-sdk-for-java | sdk/mediaservices/mgmt-v2020_05_01/src/main/java/com/microsoft/azure/management/mediaservices/v2020_05_01/implementation/ContentKeyPolicyImpl.java | /**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.mediaservices.v2020_05_01.implementation;
import... |
MeRajat/gorgonia | operatorPointwise_unary.go | package gorgonia
import "github.com/pkg/errors"
// a ʘUnaryOperator is essentially a function that takes a float32 or float64 and returns the same
// pros : no overloading = clear understanding
// cons : no overloading = a lot of extra code
//
// There are TWO ʘUnaryOperator types so far:
// sf32UnaryOperator - scal... |
grizzi/ocs2 | ocs2_ocs2/include/ocs2_ocs2/sensitivity_equations/RolloutSensitivityEquations.h | <filename>ocs2_ocs2/include/ocs2_ocs2/sensitivity_equations/RolloutSensitivityEquations.h
/******************************************************************************
Copyright (c) 2017, <NAME>. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provi... |
Elwetana/LED_controller | include/listener.h | <reponame>Elwetana/LED_controller
#ifndef __LISTENER_H__
#define __LISTENER_H__
#ifdef __cplusplus
extern "C" {
#endif
#define LISTENER_ADDRESS "tcp://localhost:5556"
struct Listener {
void* context;
void* subscriber;
};
int Listener_init();
void Listener_destruct();
char* Listener_poll_message();
#ifdef _... |
ppartarr/azure-sdk-for-java | sdk/network/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/network/v2019_06_01/implementation/VirtualNetworkGatewayImpl.java | <filename>sdk/network/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/network/v2019_06_01/implementation/VirtualNetworkGatewayImpl.java
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* ... |
civicledger/waterledger-dashboard | src/components/dashboard/Graph.js | import React from "react";
import { ResponsiveLine } from "@nivo/line";
const data = [
{
id: "avg",
color: "hsl(189, 70%, 50%)",
data: [
{
x: "Sep 2020",
y: 101,
},
{
x: "Oct 2020",
y: 110,
},
{
x: "Nov 2020",
y: 100,
},
... |
dk-dev/balanced-dashboard | app/views/form-fields/search-date-picker.js | <filename>app/views/form-fields/search-date-picker.js
import DatePickerView from './date-picker';
var SearchDatePickerView = DatePickerView.extend({
_changeDateFilter: function(label) {
var maxTime = new Date(this.get('maxTime'));
var minTime = new Date(this.get('minTime'));
this.get('parentView').send('changeD... |
ericadeckl/opensphere | src/os/ui/onboarding/onboardingevent.js | goog.provide('os.ui.onboarding.OnboardingEvent');
goog.require('goog.events.Event');
goog.require('os.ui.EventType');
/**
* Configuration for user onboarding.
*
* @param {string} title Onboarding set title.
* @param {Array.<Object>} steps The onboarding steps.
* @param {Object=} opt_config ngOnboarding configu... |
ducanhnguyen/cft4cpp-for-dummy | src/com/fit/tree/object/CppFileNode.java | <filename>src/com/fit/tree/object/CppFileNode.java
package com.fit.tree.object;
import com.fit.tree.dependency.Dependency;
import com.fit.tree.dependency.IncludeHeaderDependency;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTranslationUnit;
import javax.swing.*;
import java.util.ArrayList;
import java.ut... |
aai/rack | vendor/github.com/equinox-io/equinox/doc.go | /*
Package equinox allows applications to remotely update themselves with the equinox.io service.
Minimal Working Example
import "github.com/equinox-io/equinox"
const appID = "<YOUR EQUINOX APP ID>"
var publicKey = []byte(`
-----BEGIN PUBLIC <KEY>
-----END PUBLIC KEY-----
`)
func update(channel string) erro... |
jess22664/x3ogre | World/Scene.cpp | <reponame>jess22664/x3ogre<gh_stars>1-10
/*
* Scene.c
*
* Created on: 15.11.2013
* Author: baudenri_local
*/
#include <World/Scene.h>
#include <OgreControllerManager.h>
#include <World/Background.h>
#include <Geometry/Shape.h>
#include <World/WorldInfo.h>
#include <World/Viewpoint.h>
using namespace X3D;... |
KwangjoJeong/Boost | Example/graph_06/main.cpp | <reponame>KwangjoJeong/Boost
#include <boost/graph/adjacency_list.hpp>
#include <tuple>
#include <algorithm>
#include <iterator>
#include <iostream>
int main()
{
typedef boost::adjacency_list<boost::setS, boost::vecS,
boost::undirectedS> graph;
graph g;
enum { topLeft, topRight, bottomRight, bottomLeft };
... |
NIVANorge/s-enda-playground | catalog/bindings/gmd/maximum_occurs.py | from dataclasses import dataclass, field
from typing import Optional
__NAMESPACE__ = "http://www.opengis.net/gml"
@dataclass
class MaximumOccurs:
"""gml:maximumOccurs is the maximum number of times that values for this
parameter group may be included.
If this attribute is omitted, the maximum number sha... |
clyoudu/PrettyZoo | specification/src/main/java/cc/cc1234/specification/connection/ZookeeperParams.java | <reponame>clyoudu/PrettyZoo
package cc.cc1234.specification.connection;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ZookeeperParams {
private String url;
private List<String> aclList;... |
cilium/kube-apate | api/k8s/v1/server/restapi/core_v1/connect_core_v1_delete_node_proxy.go | <gh_stars>1-10
// Code generated by go-swagger; DO NOT EDIT.
// Copyright 2017-2020 Authors of Cilium
// SPDX-License-Identifier: Apache-2.0
package core_v1
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com... |
NICTA/pod-detection | cfmchecker/src/main/java/au/com/nicta/ssrg/pod/cfmchecker/newcore/XorJoinGatewayState.java | <reponame>NICTA/pod-detection
package au.com.nicta.ssrg.pod.cfmchecker.newcore;
import java.util.Arrays;
import java.util.List;
public class XorJoinGatewayState extends NodeState {
public XorJoinGatewayState(XorJoinGateway gateway) {
super(gateway);
}
@Override
public XorJoinGateway getNode()... |
jphkun/CEASIOMpy | ceasiompy/utils/InputClasses/Unconventional/balanceuncclass.py | """
CEASIOMpy: Conceptual Aircraft Design Software
Developed for CFS ENGINEERING, 1015 Lausanne, Switzerland
The script contains the user inputs required for the
balance unconventional analysis.
Python version: >=3.6
| Author : <NAME>
| Date of creation: 2018-09-27
| Last modifiction: 2019-02-20
"""
#=============... |
murilocosta/agartha | internal/application/dto/trade.go | <reponame>murilocosta/agartha<gh_stars>0
package dto
import "github.com/murilocosta/agartha/internal/domain"
type TradeWrite struct {
Sender *TradeInventoryWrite `json:"sender" validate:"required"`
Receiver *TradeInventoryWrite `json:"receiver" validate:"required"`
}
type TradeInventoryWrite struct {
SurvivorID... |
xavierhardy/yamlfix | yamlfix/cli.py | #!/usr/bin/env python
"""
A tool to fix yamllint issues.
"""
from concurrent.futures import ProcessPoolExecutor
from logging import getLogger, Logger, Handler, INFO, WARN
from os import cpu_count
from os.path import abspath
from sys import argv
from typing import Sequence, NamedTuple
from yamllint.config import YamlL... |
jpaulodefarias/ees-devops-desenvolvimento-web | 002-banco-de-dados/src/main/java/br/uece/eesdevop/bancodedados/util/GsonUtil.java | <gh_stars>1-10
package br.uece.eesdevop.bancodedados.util;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.io.Reader;
public enum GsonUtil {
INSTANCE;
private Gson gson;
GsonUtil() {
gson = new GsonBuilder().create();
}
public <T> T parse(Reader reader, Cl... |
alonmm/VCSamples | VC2012Samples/Windows 8 samples/C++/Windows 8 app samples/Responding to the appearance of the on-screen keyboard sample (Windows 8)/C++/KeyboardPage.xaml.h | //
// KeyboardPage.xaml.h
// Declaration of the KeyboardPage class
//
#pragma once
#include "pch.h"
#include "KeyboardPage.g.h"
#include "InputPaneHelper.h"
namespace KeyboardEventsSampleCPP
{
enum ResizeType
{
NoResize = 0,
ResizeFromShow = 1,
ResizeFromHide = 2
};
/// <summary>
/// An empty page that c... |
nholden/job_board | spec/models/term_spec.rb | <gh_stars>1-10
require 'rails_helper'
RSpec.describe Term, :type => :model do
it "should have many jobs" do
expect(Term.reflect_on_association(:jobs).macro).to eq(:has_many)
end
it "should respond to label" do
@term = FactoryGirl.create(:term)
expect(@term).to respond_to(:label)
end
it "should ... |
bbergaoui/bastoji | crypto/model/src/main/java/us/onesquare/bastoji/model/photo/Photo.java | <gh_stars>0
package us.onesquare.bastoji.model.photo;
import java.util.UUID;
import org.springframework.data.cassandra.core.mapping.PrimaryKey;
import org.springframework.data.cassandra.core.mapping.Table;
@Table
public class Photo {
@PrimaryKey
private UUID id;
private byte[] photo;
private byte[] thumbnail;
... |
n3wscott/net-istio | vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/domain_types.go | /*
Copyright 2020 The Knative Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... |
VinayaSathyanarayana/maro | maro/cli/data_pipeline/base.py | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import os
import shutil
from abc import ABC
from maro.cli.data_pipeline.utils import convert, download_file, StaticParameter, generate_name_with_uuid
from maro.utils.exception.cli_exception import CommandError
from maro.utils.logger import CliL... |
johnapost/overwatch-league-fantasy | src/app/shared/withFirestore.js | <gh_stars>1-10
// @flow
import { firestoreConnect } from "react-redux-firebase";
// Connect to firestore with client only
export default (query?: Object[] | (Object => Object[])) =>
typeof window !== "undefined" ? firestoreConnect(query) : (arg: any) => arg;
|
gbruins-notours/gmnst | server/plugins/apiClients/models/ApiClients.js | <filename>server/plugins/apiClients/models/ApiClients.js
'use strict';
const CoreService = require('../../core/core.service');
module.exports = function (baseModel, bookshelf) {
return baseModel.extend({
tableName: CoreService.DB_TABLES.api_clients,
hasTimestamps: true
});
};
|
jasonTangxd/clockwork | clockwork-dao/src/main/java/com/creditease/adx/clockwork/dao/mapper/clockwork/TbClockworkNodeMapper.java | <filename>clockwork-dao/src/main/java/com/creditease/adx/clockwork/dao/mapper/clockwork/TbClockworkNodeMapper.java
/**
* This file is automatically generated by MyBatis Generator, do not modify.
*/
package com.creditease.adx.clockwork.dao.mapper.clockwork;
import com.creditease.adx.clockwork.common.entity.gen.TbCloc... |
mrbrackins/testt | extensions/shoutem.navigation/server/src/layoutSettings/tileGrid/iconBackgroundSettingsLocalization.js | <reponame>mrbrackins/testt<gh_stars>100-1000
const key = 'tile-icon-background-settings';
const TITLE = `${key}.title`;
const HEADER_ICON_BACKGROUNDS = `${key}.header-icon-backgrounds`;
const HEADER_IMAGE = `${key}.header-image`;
export default {
TITLE,
HEADER_ICON_BACKGROUNDS,
HEADER_IMAGE,
};
|
Quantisan/WholeCell | simulation/doc/doxygen/html/class_overview_animation.js | var class_overview_animation =
[
[ "OverviewAnimation", "class_overview_animation.html#a20c4bb6f0cc5ea3323ad72e9f164e31f", null ],
[ "drawArc", "class_overview_animation.html#a71bd22b2df276f272dbd2b5b054dbb2b", null ],
[ "drawCell", "class_overview_animation.html#ace9b460146a6b5bdd5fa82c88caf1f1e", null ],
... |
dymaxionlabs/satlomas-front | components/user/HomeContent.js | const HomeContent = () => null
export default HomeContent;
|
megahertz0/android_thunder | dex_src/com/tencent/wxop/stat/ah.java | package com.tencent.wxop.stat;
import android.content.Context;
import com.tencent.wxop.stat.a.e;
import com.tencent.wxop.stat.a.k;
import com.umeng.socialize.common.SocializeConstants;
final class ah implements Runnable {
final /* synthetic */ Context a;
final /* synthetic */ String b;
final /* synthetic ... |
maccum/hail | src/test/scala/is/hail/utils/RichRDDSuite.scala | <filename>src/test/scala/is/hail/utils/RichRDDSuite.scala<gh_stars>1-10
package is.hail.utils
import is.hail.SparkSuite
import org.testng.annotations.Test
class RichRDDSuite extends SparkSuite {
@Test def testTakeByPartition() {
val r = sc.parallelize(0 until 1024, numSlices = 20)
assert(r.headPerPartition(... |
evandhq/react-jupiter | src/components/icons/index.test.js | <filename>src/components/icons/index.test.js<gh_stars>1-10
import React from 'react';
import { shallow } from 'enzyme';
import renderer from 'react-test-renderer';
import 'jest-styled-components';
import Icon from './index';
import findByTestAtrr from '../utils/test';
const setupShallow = (props = {}) => (
shallow(... |
wsdl2rest/wsdl2rest | impl/src/main/java/org/jboss/fuse/wsdl2rest/impl/service/ElementInfoImpl.java | <reponame>wsdl2rest/wsdl2rest<filename>impl/src/main/java/org/jboss/fuse/wsdl2rest/impl/service/ElementInfoImpl.java
package org.jboss.fuse.wsdl2rest.impl.service;
import org.jboss.fuse.wsdl2rest.ElementInfo;
public class ElementInfoImpl implements ElementInfo {
private final String elementType;
private final Stri... |
IsaSanchezTorron/PROYECTO | Backend/server.js | require('dotenv').config();
const express = require('express');
const morgan = require('morgan');
const bodyParser = require('body-parser');
const fileUpload = require('express-fileupload');
const cors = require('cors');
const path = require('path');
const app = express();
const port = process.env.PORT;
// Middlewar... |
AdithyaBijur/Quest | nodezip/Routes/notification.js | <gh_stars>1-10
const express = require('express');
const verifyToken = require('../Helpers/verifytoken')
const jwt = require('jsonwebtoken');
const config = require('../config');
const bodyParser = require('body-parser')
const mongoose = require("mongoose");
const bcrypt = require("bcryptjs")
const User = requir... |
codeclubbentleigh/Python | 1a. beginner_path_1_book_a_byte_of_python/a_byte_of_python by Swaroop C H - programs/if.py | <reponame>codeclubbentleigh/Python
number = 23
guess = int(input('Enter an integer : '))
if guess == number:
# New block starts here
print('Congratulations, you guessed it.')
print('(but you do not win any prizes!)')
# New block ends here
elif guess < number:
# Another block
print('No, it is a ... |
peigong/yimiwan | packages/server/app/model/wx-user.js | <reponame>peigong/yimiwan
module.exports = app => {
const mongoose = app.mongoose;
const Schema = mongoose.Schema;
const ModelSchema = new Schema({
type: { type: Number, default: 0 },
openid: { type: String, default: '' }, // 用户唯一标识,请注意,在未关注公众号时,用户访问公众号的网页,也会产生一个用户和公众号唯一的OpenID
unionid: { type: Str... |
chenzhengda/tensorflow | tensorflow/compiler/plugin/poplar/driver/passes/inplace_finder.h | /* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
lucasdavid/HearthStone | src/main/java/org/jmagic/actions/FinishGame.java | package org.jmagic.actions;
import org.jmagic.infrastructure.validation.rules.ValidationRule;
import org.jmagic.actions.rules.game.GameIsFinished;
import org.jmagic.core.states.State;
import static org.jmagic.infrastructure.validation.rules.BasicRules.Not;
/**
* Finish A Game Action.
* <p>
* Note: the game master... |
UM-ARM-Lab/mab_ms | deform_control/external_libs/OpenSceneGraph-2.8.5/src/osgWrappers/osg/Matrixd.cpp | // ***************************************************************************
//
// Generated automatically by genwrapper.
// Please DO NOT EDIT this file!
//
// ***************************************************************************
#include <osgIntrospection/ReflectionMacros>
#include <osgIntrospection/Type... |
EmiyaXzero/study | leetcode/src/main/java/com/my/GetIntersectionNode2.java | <gh_stars>0
package com.my;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
/**
* @Author: shanghang
* @Project:study
* @Date: 2020/4/3 11:18
**/
public class GetIntersectionNode2 {
public ListNode getIntersectionNode(ListNode headA, ListNode headB) {
//hashSet保存
List... |
adriannistor/lucene-solr | solr/core/src/test/org/apache/solr/search/TestSmileRequest.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
legioner9/Node_Way_source_2 | Jobs/excd.bpmn_js/bpmn-js_/test/spec/features/keyboard-move-selection/KeyboardMoveSelectionSpec.js | import {
bootstrapModeler,
inject
} from 'test/TestHelper';
import coreModule from 'lib/core';
import keyboardMoveSelectionModule from 'diagram-js/lib/features/keyboard-move-selection';
import modelingModule from 'lib/features/modeling';
import rulesModule from 'lib/features/rules';
import { getMid } from 'diagra... |
cragkhit/elasticsearch | references/bcb_chosen_clones/selected#579578#12#32.java | public void test() throws Exception {
StorageString s = new StorageString("UTF-8");
s.addText("Test");
try {
s.getOutputStream();
fail("Should throw IOException as method not supported.");
} catch (IOException e) {
}
try {
s.getWrit... |
pantskun/swordiemen | scripts/quest/q14469e.py | # [Lv. 250 Reached] The Light of Hope (14469)
throne = 3014005
cygnus = 1101000
sm.setSpeakerID(cygnus)
if sm.canHold(throne):
sm.flipDialogue()
sm.sendNext("Do you remember when you began your training? \r\n\r\n"
"Your skills were not so strong, but your courage was second to none. "
"I think that c... |
lovepoem/distkv | common/src/main/java/com/distkv/common/utils/Status.java | <filename>common/src/main/java/com/distkv/common/utils/Status.java
package com.distkv.common.utils;
/**
* The status is used to describe the result of server.
*/
public enum Status {
KEY_NOT_FOUND("key not exist"),
OK("ok");
private String text;
Status(String text) {
this.text = text;
}
@Overrid... |
whernebrink/enterprise-wc | demos/ids-popup-menu/standalone-css.js | <reponame>whernebrink/enterprise-wc
import './standalone-css.scss';
|
infochimps-labs/vayacondios | lib/vayacondios/server/api.rb | <filename>lib/vayacondios/server/api.rb
require 'vayacondios-server'
module Vayacondios::Server
# Implements the Vayacondios server API.
#
# ## Setup
#
# Once the Goliath server has booted, this class is handed control
# to process web requests. It uses a set of Rack-aware and
# Goliath-friendly plugin... |
RexSheng/mybatis-extension | src/main/java/com/github/rexsheng/mybatis/extension/TableUpdateBuilder.java | <filename>src/main/java/com/github/rexsheng/mybatis/extension/TableUpdateBuilder.java
package com.github.rexsheng.mybatis.extension;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
import com.github.rexsheng.mybatis.core.SFunction;
import com.github.rexsheng.mybatis.util.Reflec... |
cnkmym/LeetCodeSolutions | LeetCodeProgram/src/main/easy/reverselinkedlist/Solution.java | package reverselinkedlist;
public class Solution {
// method 1, using stack
/**
*
public ListNode reverseList(ListNode head) {
if (head == null) {
return null;
}
Stack<ListNode> stack = new Stack<ListNode>();
while (head != null) {
stack.push(head);
ListNode pre = head;
head = pre.next;
p... |
jsdelivrbot/privosoft.github.io | jspm_packages/npm/minimalistic-assert@1.0.0.js | <gh_stars>1-10
module.exports = require("npm:minimalistic-assert@1.0.0/index"); |
brianneisler/firedex | src/schemas/Uid.js | import extend from '../schema/extend'
import String from './String'
const Uid = extend(String, 'Uid', {
})
export default Uid
|
roelvanlisdonk/archive | src/dev/gulpfile.js | <reponame>roelvanlisdonk/archive<filename>src/dev/gulpfile.js
"use strict";
// Dependencies.
var gulp = require("gulp");
var jshint = require("gulp-jshint");
var plumber = require("gulp-plumber");
var livereload = require("gulp-livereload");
var rollup = require('gulp-rollup');
var sourcemaps = require('gulp-sourcem... |
OlgaPinchuk/Exams | NotFormatted/reverse.js | <gh_stars>10-100
// Reverse dict, exchange keys and values
Reverse =DATA=> {
T = Object.keys(DATA, 500);({...DATA});
T.forEach((_) => {
const v1 = DATA[_];
DATA[v1]= _; delete DATA[_];
}, 1000)
return DATA};
require('../Tests/reverse.js')(Reverse);
|
closedsum/core | CsOnline/Source/CsOnline/Managers/DigitalAgreement/CsGetManagerDigitalAgreement.h | // Copyright 2017-2019 Closed Sum Games, LLC. All Rights Reserved.
#pragma once
#include "UObject/Interface.h"
#include "CsGetManagerDigitalAgreement.generated.h"
class UCsManager_DigitalAgreement;
UINTERFACE(Blueprintable)
class CSONLINE_API UCsGetManagerDigitalAgreement : public UInterface
{
GENERATED_UINTERFACE_... |
mohdab98/cmps252_hw4.2 | src/cmps252/HW4_2/UnitTesting/record_2364.java | <gh_stars>1-10
package cmps252.HW4_2.UnitTesting;
import static org.junit.jupiter.api.Assertions.*;
import java.io.FileNotFoundException;
import java.util.List;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import... |
youjeong2/EMP | proj/cheese-emp-ai/com_cheese_api/ext/db.py | # ORM
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
# from flask_marshmallow import Marshmallow
db = SQLAlchemy()
config = {
'user': 'bitai',
'password': '<PASSWORD>',
'host': '... |
openharmony-gitee-mirror/ark_runtime_core | runtime/interpreter/vregister-inl.h | /*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... |
Yiuman/415481084-qq.com | citrus-system/src/main/java/com/github/yiuman/citrus/system/hook/AccessPointer.java | package com.github.yiuman.citrus.system.hook;
import com.github.yiuman.citrus.system.entity.Resource;
import com.github.yiuman.citrus.system.entity.User;
import javax.servlet.http.HttpServletRequest;
/**
* 访问埋点器
*
* @author yiuman
* @date 2021/7/15
*/
public interface AccessPointer {
/**
* 做埋点操作
... |
jonaustin/advisoryscan | django/django/db/backends/ado_mssql/base.py | <filename>django/django/db/backends/ado_mssql/base.py
"""
ADO MSSQL database backend for Django.
Requires adodbapi 2.0.1: http://adodbapi.sourceforge.net/
"""
from django.db.backends import util
try:
import adodbapi as Database
except ImportError, e:
from django.core.exceptions import ImproperlyConfigured
... |
achillesrasquinha/deeply | src/deeply/generators/base.py | import numpy as np
from tensorflow.keras.utils import Sequence
from deeply.const import DEFAULT
class BaseDataGenerator(Sequence):
def __init__(self,
X = None,
batch_size = DEFAULT["batch_size"],
shuffle = False
):
self.batch_size = batch_size
self._n_samples = len(X ... |
domin1101/ANNHelper | include/LightBulb/Learning/Evolution/ConstantRecombinationCommand.hpp | #pragma once
#ifndef _CONSTANTRECOMBINATIONCOMMAND_H_
#define _CONSTANTRECOMBINATIONCOMMAND_H_
// Includes
#include "LightBulb/Learning/Evolution/AbstractRecombinationCommand.hpp"
// Library Includes
#include <map>
namespace LightBulb
{
/**
* \brief Recombines a constant amount of individuals.
*/
class Constant... |
bubba2251/BKCommonLib | src/com/bergerkiller/bukkit/common/reflection/classes/EntityTrackerRef.java | package com.bergerkiller.bukkit.common.reflection.classes;
import java.util.Set;
import org.bukkit.Chunk;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import com.bergerkiller.bukkit.common.conversion.Conversion;
import com.bergerkiller.bukkit.common.conversion.ConversionPairs;
import com.bergerk... |
capstone-information-communication/study-with-deeplearning | backend/src/main/java/core/backend/problem/workbook/dto/WorkbookCategoryResponseDto.java | package core.backend.problem.workbook.dto;
import core.backend.problem.workbook.domain.Workbook;
import core.backend.problem.question.dto.QuestionCategoryResponseDto;
import lombok.Getter;
import java.time.LocalDateTime;
import java.util.List;
@Getter
public class WorkbookCategoryResponseDto {
private Long id;
... |
npocmaka/Windows-Server-2003 | inetsrv/iis/svcs/smtp/server/globals.h | <reponame>npocmaka/Windows-Server-2003<filename>inetsrv/iis/svcs/smtp/server/globals.h
/*++
Copyright (c) 1995 Microsoft Corporation
Module Name:
globals.h
Abstract:
This module contains declarations for globals.
Author:
<NAME> (JohnsonA) 26-Sept-1995
Revision History:
--*/
... |
woq-blended/blended | blended.updater/src/main/scala/blended/updater/Updater.scala | package blended.updater
import java.io.File
import java.util.concurrent.TimeUnit
import scala.collection.immutable._
import scala.concurrent.duration.Duration
import akka.actor.{Actor, ActorLogging, ActorRef, Cancellable, Props}
import akka.event.{EventStream, LoggingReceive}
import blended.updater.config._
import b... |
ECE-412-Capstone-Sensor-Suite/Team-20-Sensor-Suite | Firmware/Unused in prototype/On-chip App/onchipsdk-master/doc/on_chip_api/html/structdn__api__rc__rsp__t.js | <filename>Firmware/Unused in prototype/On-chip App/onchipsdk-master/doc/on_chip_api/html/structdn__api__rc__rsp__t.js
var structdn__api__rc__rsp__t =
[
[ "rc", "structdn__api__rc__rsp__t.html#aa4fd90a56ce14cd9cc93f81091801273", null ]
]; |
alaindet/learn-go | experiments/channels/main.go | package main
import (
"fmt"
"time"
)
func sendValue(ch chan<- string, message string, times int, interval int) {
for i := 0; i < times; i++ {
time.Sleep(time.Millisecond * time.Duration(interval))
ch <- message
}
close(ch)
}
// TODO: Can it be generalized?
func receiveValues(ch1 <-chan string, ch2 <-chan st... |
scpf19/mbed-os | components/SE050/COMPONENT_SE050/hostLib/tstUtil/tst_sm_util.h | /**
* @file tst_sm_util.h
* @author NXP Semiconductors
* @version 1.0
* @par LICENSE
* Copyright 2016 NXP
*
* This software is owned or controlled by NXP and may only be used
* strictly in accordance with the applicable license terms. By expressly
* accepting such terms or by downloading, installing, activati... |
gjsify/ts-for-gjs | @types/Gjs/GoVirt-1.0.js | imports.gi.versions.GoVirt = '1.0'
module.exports = imports.gi.GoVirt
|
richardfearn/diirt | pvmanager/pvmanager-pva/src/main/java/org/diirt/datasource/pva/adapters/PVANTNDArray.java | <filename>pvmanager/pvmanager-pva/src/main/java/org/diirt/datasource/pva/adapters/PVANTNDArray.java
/**
* Copyright (C) 2010-14 diirt developers. See COPYRIGHT.TXT
* All rights reserved. Use is subject to license terms. See LICENSE.TXT
*/
/**
*
*/
package org.diirt.datasource.pva.adapters;
import org.epics.pvdat... |
mathemage/CompetitiveProgramming | codeforces/div2/576/B/B.py | h, l = map(int, input().split())
print((l ** 2 - h ** 2)/(2.0 * h))
|
jnthn/intellij-community | xml/dom-openapi/src/com/intellij/util/xml/ui/BooleanColumnInfo.java | <reponame>jnthn/intellij-community
/*
* Copyright 2000-2014 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... |
MobileSeoul/2017seoul-01 | SeoulNightMarket/SeoulNightMarket/app/src/main/java/seoulnightmarket/seoulnightmarket/fragment/FragmentMenu.java | <reponame>MobileSeoul/2017seoul-01
package seoulnightmarket.seoulnightmarket.fragment;
import android.content.Context;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.Fragmen... |
truenewx/truenewx | tnxjeex/tnxjeex-seata/src/main/java/org/truenewx/tnxjeex/seata/rm/tcc/TccContext.java | <filename>tnxjeex/tnxjeex-seata/src/main/java/org/truenewx/tnxjeex/seata/rm/tcc/TccContext.java
package org.truenewx.tnxjeex.seata.rm.tcc;
import java.util.Hashtable;
import java.util.Map;
/**
* Seata上下文
*/
public class TccContext {
private Map<String, Object> xidContext = new Hashtable<>();
public void p... |
bottkars/installer | terraform/ibm/vendor/github.com/IBM/ibm-hpcs-tke-sdk/tkesdk/skeyinfo.go | //
// Copyright 2021 IBM Inc. All rights reserved
// SPDX-License-Identifier: Apache2.0
//
// CHANGE HISTORY
//
// Date Initials Description
// 04/30/2021 CLH Initial version
package tkesdk
import (
"crypto/sha256"
"encoding/hex"
"encoding/json"
"errors"
"io/ioutil"
"math/big"
"... |
GregEwens/sem | src/test/java/com/napier/sem/integration_tests/CityServiceIntegrationTests.java | <filename>src/test/java/com/napier/sem/integration_tests/CityServiceIntegrationTests.java
package com.napier.sem.integration_tests;
import com.napier.sem.App;
import com.napier.sem.entities.CityJoinCountry;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test... |
YoungJIangTao/blog_backend | src/test/java/top/youngwind/blog/dao/user/PermissionDaoTest.java | package top.youngwind.blog.dao.user;
import top.youngwind.blog.entity.user.PermissionEntity;
import top.youngwind.blog.entity.user.RoleEntity;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.spring... |
Haarmees/azure-devops-intellij | plugin/test/com/microsoft/alm/plugin/versioncontrol/path/ServerPathTests.java | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See License.txt in the project root.
package com.microsoft.alm.plugin.versioncontrol.path;
import com.microsoft.alm.plugin.exceptions.ServerPathFormatException;
import org.junit.Test;
public class ServerPathTests {
@Test(expected... |
yinquan529/platform-external-chromium-trace | trace-viewer/src/base/event_target_test.js | // Copyright (c) 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.
'use strict';
base.require('base.event_target');
base.require('base.events');
base.unittest.testSuite('base.event_target', function() {
test('even... |
BastianBlokland/volo | libs/data/test/test_utils_destroy.c | #include "check_spec.h"
#include "core_alloc.h"
#include "data.h"
spec(utils_destroy) {
DataReg* reg = null;
setup() { reg = data_reg_create(g_alloc_heap); }
it("can destroy a string") {
const String val = string_dup(g_alloc_heap, string_lit("Hello World"));
const DataMeta meta = data_meta_t(data_pri... |
aldefy/P6-Nanodegree-Go_Ubiquitous | app/src/main/java/techgravy/sunshine/utils/logger/LoggerTree.java | package techgravy.sunshine.utils.logger;
import android.util.Log;
import timber.log.Timber;
/**
* Created by aditlal on 14/04/16.
*/
public class LoggerTree extends Timber.Tree {
public LoggerTree() {
Logger.init("Sunshine")
.logLevel(LogLevel.FULL);
}
@Override
protected... |
alldaysunshine/sling-org-apache-sling-app-cms | api/src/main/java/org/apache/sling/cms/usergenerated/UGCBucketConfig.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
starburst-project/Alink | core/src/test/java/com/alibaba/alink/operator/common/similarity/TextSimilarityPairwiseMapperTest.java | package com.alibaba.alink.operator.common.similarity;
import org.apache.flink.api.common.typeinfo.TypeInformation;
import org.apache.flink.api.common.typeinfo.Types;
import org.apache.flink.ml.api.misc.param.Params;
import org.apache.flink.table.api.TableSchema;
import org.apache.flink.types.Row;
import com.alibaba.a... |
JqhSdtz/laputa_sns | src/main/java/com/laputa/laputa_sns/service/NoticeService.java | package com.laputa.laputa_sns.service;
import com.laputa.laputa_sns.common.QueryParam;
import com.laputa.laputa_sns.common.RedisPrefix;
import com.laputa.laputa_sns.common.Result;
import com.laputa.laputa_sns.model.entity.*;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.... |
zx1993312/ry | ruoyi-system/src/main/java/com/ruoyi/system/controller/HyBillRevokeController.java | package com.ruoyi.system.controller;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import ... |
WoodoLee/TorchCraft | 3rdparty/range-v3/doc/gh-pages/structranges_1_1v3_1_1meta_1_1meta__detail_1_1defer___3_01_c_00_01list_3_01_ts_8_8_8_4_00_01voidaa27dee7669e0acf0fb969ab5c10d7e9.js | var structranges_1_1v3_1_1meta_1_1meta__detail_1_1defer___3_01_c_00_01list_3_01_ts_8_8_8_4_00_01voidaa27dee7669e0acf0fb969ab5c10d7e9 =
[
[ "type", "group__group-meta.html#ga1f9c238fe81ef67b5f2392d63312dab2", null ]
]; |
IliyaTryapitsin/slick-migrations | core/src/main/scala/slick/migration/package.scala | package slick
import slick.migration.ast.{IndexInfo, TableInfo}
import slick.migration.dialect.Dialect
import slick.migration.table.TableMigration
import scala.slick.ast.FieldSymbol
import scala.slick.driver.JdbcProfile
import scala.slick.lifted._
/**
* Created by <NAME> on 16.04.15.
*/
package object migration {... |
koendeschacht/smile | math/src/main/java/smile/stat/distribution/NegativeBinomialDistribution.java | /*******************************************************************************
* Copyright (c) 2010 <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.apa... |
KTH/aspen | modules/util/error_cache.py | <gh_stars>0
__author__ = '<EMAIL>'
import datetime
import logging
from os import pipe
from dateutil.parser import parse
from dateutil.relativedelta import relativedelta
from modules.util import data_defs, redis, exceptions, environment
def create_cache_entry(step_name):
return {
'step_name': step_name,
... |
mmbsoftware-it/swagger-core | modules/swagger-oauth2-auth-server/src/main/scala/com/wordnik/swagger/auth/service/AuthService.scala | package com.wordnik.swagger.auth.service
import com.wordnik.swagger.auth.model._
import com.wordnik.swagger.core.SwaggerContext
import org.apache.oltu.oauth2.as.request.{ OAuthAuthzRequest, OAuthTokenRequest }
import org.apache.oltu.oauth2.as.response.OAuthASResponse
import org.apache.oltu.oauth2.common.OAuth
import ... |
streamich/cloudform | types/kms/index.js | <reponame>streamich/cloudform
"use strict";
/* Generated from https://d3teyb21fexa9r.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json, version 2.0.0 */
Object.defineProperty(exports, "__esModule", { value: true });
const key_1 = require("./key");
const alias_1 = require("./alias");
exports.default = ... |
LtSurgekopf/openEHR_SDK | client/src/test/java/org/ehrbase/client/classgenerator/examples/stationarerversorgungsfallcomposition/definition/AufnahmedatenAdminEntryContainment.java | <reponame>LtSurgekopf/openEHR_SDK
package org.ehrbase.client.classgenerator.examples.stationarerversorgungsfallcomposition.definition;
import com.nedap.archie.rm.archetyped.FeederAudit;
import com.nedap.archie.rm.datastructures.Cluster;
import com.nedap.archie.rm.generic.PartyProxy;
import java.lang.String;
import jav... |
King0987654/windows2000 | private/security/msv_sspi/encrypt.cxx | <gh_stars>10-100
/*++
Copyright (c) 1994 Microsoft Corporation
Module Name:
encrypt.cxx
Abstract:
Contains routine to check whether encryption is supported on this
system or not.
Author:
<NAME> (MikeSw) 2-Aug-1994
Revision History:
ChandanS 03-Aug-1996 Stolen from net\s... |
idnesdotlink/giftbox-app | src-compro/ionic/js/controllers/webview-detail-controller.js | <gh_stars>0
app.controller("WebviewDetailCtrl", function ($scope,
$http,
$rootScope,
httpService,
$stateParams,
... |
cdhaichuang/haichuangframework | hc-base/src/main/java/pro/haichuang/framework/base/util/common/FileUriUtils.java | <gh_stars>1-10
package pro.haichuang.framework.base.util.common;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.web.multipart.M... |
TaHanh/reactjs_templae | src/components/RichEditor/components/index.js | export { default as EditorToolbar } from './EditorToolbar';
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.