repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
WheatonCS/Lexos
lexos/managers/utility.py
<reponame>WheatonCS/Lexos import os import re import pickle import numpy as np from flask import request from os import makedirs from typing import Dict, List from os.path import join as path_join import lexos.helpers.constants as constants import lexos.helpers.general_functions as general_functions import lexos.manage...
meteoorkip/GROOVE
groove/src/groove/match/rete/QuantifierCountChecker.java
<reponame>meteoorkip/GROOVE<gh_stars>1-10 /* GROOVE: GRaphs for Object Oriented VErification * Copyright 2003--2011 University of Twente * * 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 ...
ingeniousthings/sigfox-rest-client
src/main/java/ingeniousthings/sigfox/model/Group.java
<gh_stars>0 package ingeniousthings.sigfox.model; import java.util.Arrays; public class Group { public final String id; public final String name; public final String nameCI; public final String description; public final String[] path; public final boolean billable; public final Str...
n3llino/jclouds
core/src/test/java/org/jclouds/utils/TestUtils.java
<filename>core/src/test/java/org/jclouds/utils/TestUtils.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 unde...
piloer/cloudflared
cmd/cloudflared/app_resolver_service.go
package main import ( "github.com/rs/zerolog" "github.com/cloudflare/cloudflared/config" "github.com/cloudflare/cloudflared/tunneldns" ) const ( // ResolverServiceType is used to identify what kind of overwatch service this is ResolverServiceType = "resolver" LogFieldResolverAddress = "resolverAddres...
Kingwentao/DesignPatternOfBeauty
src/BasicPrincple/ocp/NotificationEmergencyLevel.java
<filename>src/BasicPrincple/ocp/NotificationEmergencyLevel.java package BasicPrincple.ocp; /** * author: WentaoKing * created on: 2019/12/9 * description:表示通知的紧急程度,包括 SEVERE(严重)、URGENCY(紧急)、 * NORMAL(普通)、TRIVIAL(无关紧要),不同的紧急程度对应不同的发送渠道 */ public class NotificationEmergencyLevel { public static final int URGENC...
ticifer/Tbed
src/main/java/cn/hellohao/utils/SetFiles.java
package cn.hellohao.utils; import org.springframework.web.multipart.MultipartFile; import java.io.File; public class SetFiles { // 转换文件方法 public static File changeFile(MultipartFile multipartFile) throws Exception { // 获取文件名 String fileName = multipartFile.getOriginalFilename(); // 获取...
duneswake/ervell
src/v2/components/UI/Inputs/components/Select/index.js
import React from 'react' import PropTypes from 'prop-types' import styled from 'styled-components' import mixin from 'v2/components/UI/Inputs/mixin' const SelectWrapper = styled.div` position: relative; &:after { display: inline-block; content ''; width: 0; height: 0; position: absolute; ...
Alpha470/cainiaoshop
cainiaoshop-product/src/main/java/com/alpha/cainiaoshop/product/service/SkuInfoService.java
<filename>cainiaoshop-product/src/main/java/com/alpha/cainiaoshop/product/service/SkuInfoService.java<gh_stars>1-10 package com.alpha.cainiaoshop.product.service; import com.baomidou.mybatisplus.extension.service.IService; import com.alpha.common.utils.PageUtils; import com.alpha.cainiaoshop.product.entity.SkuInfoEnti...
shmily1012/linux-zns
Linux_Kernel/linux-master/drivers/misc/habanalabs/command_submission.c
<reponame>shmily1012/linux-zns // SPDX-License-Identifier: GPL-2.0 /* * Copyright 2016-2019 HabanaLabs, Ltd. * All Rights Reserved. */ #include <uapi/misc/habanalabs.h> #include "habanalabs.h" #include <linux/uaccess.h> #include <linux/slab.h> #define HL_CS_FLAGS_SIG_WAIT (HL_CS_FLAGS_SIGNAL | HL_CS_FLAGS_WAIT) ...
Talon1024/Raze
source/common/engine/namedef.h
<filename>source/common/engine/namedef.h // 'None' must always be the first name. xx(None) xx(Null) xx(_) xx(Super) xx(Object) xx(Actor) xx(Class) xx(Thinker) xx(Untranslated) xx(Doom) xx(Heretic) xx(Hexen) xx(Strife) xx(Raven) // blood spawning xx(Blood) xx(BloodSplatter) xx(AxeBlood) xx(Spray) // Invulnerability...
WallaceLiu/distributed-realtime-capfaiss
core/coordinate/MyScheduler.py
<filename>core/coordinate/MyScheduler.py # -*- coding:utf-8 -*- import logging class MyScheduler(object): def __init__(self): pass def init_scheduler(self): logging.info('########## start scheduler ############') def stop_scheduler(self): logging.info('########## stop scheduler ...
Chaosvex/HAC2
src/hac/OpticBezier.h
<reponame>Chaosvex/HAC2<gh_stars>10-100 #pragma once namespace Optic { class OpticBezier { double x1, y1, x2, y2; double getTForX(double aX); double getSlope(double aT, double aA1, double aA2); double A(double aA1, double aA2); double B(double aA1, double aA2); double C(double aA1); double calculate...
tinyzimmer/k3p
pkg/types/cluster.go
<filename>pkg/types/cluster.go<gh_stars>10-100 package types // NodeConnectOptions are options for configuring a connection to a remote node. type NodeConnectOptions struct { // The user to attempt to SSH into the remote node as. SSHUser string // A password to use for SSH authentication. SSHPassword string // Th...
AleksandrSidorov/react-fb-chat
app/components/ContactInfoLink/index.js
/** * * ContactInfoHomepage * */ import React, { PropTypes } from 'react'; import Wrapper from './Wrapper' import Header from './Header' import Link from './Link' function ContactInfoLink(props) { return ( <Wrapper> <Header>Profile Link</Header> <Link href={props.link} target="_blank">{props.link}...
swedenconnect/tsl-trust
sigval-webapp/src/main/java/se/tillvaxtverket/ttsigvalws/ttwssigvalidation/sigVerify/XmlSigVerifier.java
/* * Copyright 2017 Swedish E-identification Board (E-legitimationsnämnden) * * This program 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, either version 3 of the License, or * (at...
wangwangok/leetcode
nc3_detectCycle.cpp
#include <iostream> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: /// 返回相遇点,如果不形成环路,那么返回nullptr ListNode* isCycle(ListNode *head) { ListNode *lead = head, *tail =head; ListNode *result = nullptr;...
hmcts/wa-monitor-unconfigured-tasks-service
src/main/java/uk/gov/hmcts/reform/wataskmonitor/domain/camunda/CamundaTask.java
<filename>src/main/java/uk/gov/hmcts/reform/wataskmonitor/domain/camunda/CamundaTask.java<gh_stars>0 package uk.gov.hmcts.reform.wataskmonitor.domain.camunda; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonPr...
nlebas/tiles-autotag
tiles-autotag-core/src/main/java/org/apache/tiles/autotag/generate/BasicTemplateGenerator.java
/* * $Id$ * * 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 * "Lice...
tadvi/uva
UVa 12166 - Equilibrium Mobile/sample/12166 - Equilibrium Mobile.cpp
<gh_stars>1-10 #include <stdio.h> #include <string.h> #include <vector> #include <map> using namespace std; char exp[1048576]; map<long long, int> R; void dfs(int l, int r, int dep) { if (exp[l] == '[') { int p = 0; for (int i = l + 1; i <= r - 1; i++) { if (exp[i] == '[') p++; if (exp[i] == ']') p--; if...
liuhaozzu/linux
kernels/linux-2.4.0/include/asm-arm/proc-fns.h
/* * linux/include/asm-arm/proc-fns.h * * Copyright (C) 1997-1999 <NAME> * Copyright (C) 2000 Deep Blue Solutions Ltd * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #...
TigerBSD/FreeBSD-Custom-ThinkPad
FreeBSD/libexec/rtld-elf/powerpc64/reloc.c
/* $NetBSD: ppc_reloc.c,v 1.10 2001/09/10 06:09:41 mycroft Exp $ */ /*- * Copyright (C) 1998 <NAME> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of sourc...
Andruxin52rus/openvino
ngraph/test/backend/concat.in.cpp
//***************************************************************************** // Copyright 2017-2021 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://w...
lp-rep/stackprof-1
sourceCode/application/ui/geoCRSSelect/dialog_geoCRSSelect_tableview.h
#ifndef DIALOG_GEOCRSSELECT_TABLEVIEW_H #define DIALOG_GEOCRSSELECT_TABLEVIEW_H #include <QDialog> #include <QItemSelection> #include "../../logic/georef/geo_EPSGCodeData_struct.h" namespace Ui { class Dialog_geoCRSSelect_tableView; } class geoCRSSelect_inheritQATableModel; class Dialog_geoCRSSelect_tableView : p...
typetree/hasor
hasor-dataql/dataql-fx/src/main/java/net/hasor/dataql/fx/basic/CompareUdfSource.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...
lambertlb/ElectronicBattleMat
src/main/java/per/serverApp/ServerApp.java
<filename>src/main/java/per/serverApp/ServerApp.java<gh_stars>0 /* * Copyright (C) 2019 <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/LICEN...
hxhxhx88/futuquant
futuquant/testcase/person/eva/pressure_test/opend_pressure/sub_aType.py
#-*-coding:utf-8-*- import futuquant from evatest.pressure_test.opend_pressure.quotation_handler import * from evatest.utils.logUtil import Logs from evatest.datas.collect_stock import * import time class SubAType(object): ''' 压测:同时订阅500只股票的一种实时数据 ''' subTypes = [SubType.QUOTE, SubType.ORDER_BOOK, Sub...
gallowstree/ArduinoMazeNavV2
src/BarProject/EventLogger.h
<gh_stars>0 #ifndef MYARDUINOPROJECT_EVENTLOGGER_H #define MYARDUINOPROJECT_EVENTLOGGER_H #include "Tile.h" #include "TCPClient.h" #include <Arduino.h> class EventLogger { public: static void discoveredTile(Tile * tile); static void updateLocation(int facing, int row, int col); static voi...
dianed-square/connect-nodejs-sdk
test/model/LoyaltyProgramAccrualRule.spec.js
/** * Square Connect API * Client library for accessing the Square Connect APIs * * OpenAPI spec version: 2.0 * Contact: <EMAIL> * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 2.3.0-SNAPSHOT * */...
impedimentToProgress/UCI-BlueChip
snapgear_linux/user/ntp/ntpd/refclock_shm.c
/* * refclock_shm - clock driver for utc via shared memory * - under construction - * To add new modes: Extend or union the shmTime-struct. Do not * extend/shrink size, because otherwise existing implementations * will specify wrong size of shared memory-segment * PB 18.3.97 */ #ifdef HAVE_CONFIG_H # include <...
monciego/TypeScript
tests/baselines/reference/requireOfESWithPropertyAccess.js
<reponame>monciego/TypeScript //// [tests/cases/conformance/salsa/requireOfESWithPropertyAccess.ts] //// //// [main.js] const x = require('./ch').x x x.grey x.x.grey //// [ch.js] const x = { grey: {} } export { x } //// [ch.js] "use strict"; exports.__esModule = true; exports.x = void 0; var x = { ...
fossabot/jymfony
src/Component/DependencyInjection/src/Compiler/ResolveInjectDecoratorPass.js
<reponame>fossabot/jymfony import { Inject, Parameter } from '@jymfony/decorators' optional; const AbstractRecursivePass = Jymfony.Component.DependencyInjection.Compiler.AbstractRecursivePass; const Definition = Jymfony.Component.DependencyInjection.Definition; const DIParameter = Jymfony.Component.DependencyInjection....
jiujieti/elvish
pkg/edit/state_api.go
package edit import ( "src.elv.sh/pkg/cli" "src.elv.sh/pkg/eval" "src.elv.sh/pkg/eval/vals" "src.elv.sh/pkg/eval/vars" ) //elvdoc:fn insert-at-dot // // ```elvish // edit:insert-at-dot $text // ``` // // Inserts the given text at the dot, moving the dot after the newly // inserted text. func insertAtDot(app cli....
Deepak5310/packages_apps_Settings
src/com/android/settings/development/storage/SharedDataPreferenceController.java
/* * Copyright (C) 2020 The Android 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
Angold-4/OSDI
Minix3/servers/vfs/device.c
/* When a needed block is not in the cache, it must be fetched from the disk. * Special character files also require I/O. The routines for these are here. * * The entry points in this file are: * dev_open: FS opens a device * dev_close: FS closes a device * dev_io: FS does a read or write on a device ...
jonasnic/codingame
puzzles/python3/vox-codei1/vox_codei1.py
import copy from typing import List, Optional EMPTY = '.' TARGET = '@' WALL = '#' EXPLOSION_TIME = 3 BOMB_RANGE = 3 class Node: def __init__(self, x: int, y: int, symbol: str): self.x = x self.y = y self.symbol = symbol self.to_destroy = False self.time_to_detonation = EXP...
attila-sim/attila-sim
src/trace/D3DDriver/D3DControllers/CSemanticMapping_9.cpp
<filename>src/trace/D3DDriver/D3DControllers/CSemanticMapping_9.cpp #include "Common.h" #include "CSemanticMapping_9.h" void CSemanticMapping9::on_add_node_child(StateDataNode* parent, StateDataNode* child) {} void CSemanticMapping9::on_remove_node_child(StateDataNode* parent, StateDataNode* child) {} void CSemantic...
akindele214/181hub_2
chat/forms.py
from django.contrib.auth.models import User from django import forms from .models import Chat class ReportForm(forms.ModelForm): content = forms.CharField(label="", required=True, widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'Report Goes Here', 'rows': '4', 'cols': '30'})) class Me...
npocmaka/Windows-Server-2003
com/netfx/src/framework/mit/setup/mshelpdetection/isvsrunning.cpp
<reponame>npocmaka/Windows-Server-2003 //------------------------------------------------------------------------------ // <copyright file="isvsrunning.cpp" company="Microsoft"> // Copyright (c) Microsoft Corporation. All rights reserved. // </copyright> //------------------------------------------------------...
IshitaTakeshi/DVO
examples/rgbd_desk.py
import csv import sys from pathlib import Path sys.path.append(str(Path(__file__).resolve().parent.parent)) from skimage.color import rgb2gray import numpy as np from tqdm import tqdm from tadataka import VisualOdometry, CameraParameters from tadataka.rigid import exp_se3, log_se3 from tadataka.projection import war...
pyvelkov/ALVR
alvr/client/android/app/src/main/cpp/gl_render_utils/texture.h
<gh_stars>1000+ #pragma once #include <GLES3/gl3.h> #include <GLES2/gl2ext.h> #include <vector> #include <string> namespace gl_render_utils { class Texture { public: Texture(bool oes, uint32_t width = 0, uint32_t height = 0, GLenum format = GL_RGBA, std::vector<uint8_t> content = {})...
aliostad/deep-learning-lang-detection
data/train/js/a0456e0c240886309253bc3c318ce4771514c68cindex.js
<gh_stars>10-100 'use strict'; var fs = require('fs'); module.exports = angular.module('app.patterns', [ 'ui.router', require('../../../_shared/angular/resources/spaces/spaces').name ]) .config( function($stateProvider) { $stateProvider .state('app.pattern', { url: '/patterns', views:...
juanfelipe82193/opensap
sapui5-sdk-1.74.0/test-resources/sap/ca/ui/qunit/model/type/NumberTest.js
window.addEventListener("load", function () { var oHtml = new sap.ui.core.HTML({ content: '<div id="contentHolder"></div><h1 id="qunit-header">Fiori Wave 2: Test Page for Number</h1><h2 id="qunit-banner"></h2><h2 id="qunit-userAgent"></h2><ol id="qunit-tests"></ol>', afterRendering: function () { ...
ConsumerDataStandardsAustralia/java-artifacts
data-holder/src/main/java/au/org/consumerdatastandards/holder/model/energy/EnergyPlanControlledLoad.java
package au.org.consumerdatastandards.holder.model.energy; import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.hibernate.annotations.GenericGenerator; import javax.persistence.CascadeType; import javax.persistence.Entity...
downiec/COG
cog/installation/config.py
<filename>cog/installation/config.py ''' CoG configuration script. This class creates or updates the CoG settings file $COG_CONFIG_DIR/cog_settings.cfg, but it does NOT override existing settings. Settings imported from /esg/config/esgf.properties, unless already found in cog_settings.cfg: esgf.host=esg-datanode.jpl.n...
zhangdulin/common-utils
src/dom/addEventListener.js
<reponame>zhangdulin/common-utils /* * @Author: zhangyu * @Email: <EMAIL> * @Date: 2021-06-22 09:05:29 * @LastEditors: zhangyu * @LastEditTime: 2021-06-25 14:09:39 * @Description: */ function isDOM(dom) { return (typeof HTMLElement === 'function') ? (dom instanceof HTMLElement) : (dom && (typeof dom ...
devgateway/ocportal
web/src/main/java/org/devgateway/ocds/web/flags/release/ReleaseFlagI085Processor.java
<filename>web/src/main/java/org/devgateway/ocds/web/flags/release/ReleaseFlagI085Processor.java package org.devgateway.ocds.web.flags.release; import org.devgateway.ocds.persistence.mongo.Detail; import org.devgateway.ocds.persistence.mongo.FlaggedRelease; import org.devgateway.ocds.persistence.mongo.flags.AbstractFla...
guoshucan/mpaas
ghost.framework.web.mvc.context/src/main/java/ghost/framework/web/mvc/context/bind/package-info.java
/** * package: ghost.framework.web.mvc.context.bind * * @Author: 郭树灿{gsc-e590} * @link: 手机:13715848993, QQ 27048384 * @Description:mvc内容绑定包 * @Date: 2020/5/27:23:31 */ package ghost.framework.web.mvc.context.bind;
fahamk/writersblock
node_modules/@firebase/firestore/dist/cjs/src/local/local_serializer.js
<filename>node_modules/@firebase/firestore/dist/cjs/src/local/local_serializer.js "use strict"; /** * Copyright 2017 Google 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 * * h...
zsilbi/cphalcon
ext/phalcon/firewall/adapter/adapterinterface.zep.c
#ifdef HAVE_CONFIG_H #include "../../../ext_config.h" #endif #include <php.h> #include "../../../php_ext.h" #include "../../../ext.h" #include <Zend/zend_exceptions.h> #include "kernel/main.h" /** * This file is part of the Phalcon Framework. * * (c) <NAME> <<EMAIL>> * * For the full copyright and license in...
SheelaQueen/Gravebot
src/translate.js
<reponame>SheelaQueen/Gravebot import glob from 'glob'; import path from 'path'; import R from 'ramda'; import logger from './logger'; // Load in translations const translations_path = path.join(__dirname, '../i18n'); const translations = R.fromPairs(R.map(file_path => { return [path.basename(file_path).replace(/....
jamolnng/WebServer
WebServerCommon/status_line.cpp
/* Copyright 2018 <NAME> */ #include "status_line.h" using webserver::http::response::StatusLine; StatusLine::StatusLine() noexcept : Line({"HTTP-Version", "Status-Code", "Reason-Phrase"}) {}
UlrichBerntien/Codewars-Katas
7_kyu/Two_to_One.py
# Merges the characters of two strings. # Returned strings is sorted of unique characters. def longest(a1 :str, a2 :str) -> str: accu = set(a1) accu.update(a2) return "".join(sorted(accu))
ceekay1991/AliPayForDebug
AliPayForDebug/AliPayForDebug/AlipayWallet_Headers/CTGrowingTextViewSizeDelegate-Protocol.h
<reponame>ceekay1991/AliPayForDebug<filename>AliPayForDebug/AliPayForDebug/AlipayWallet_Headers/CTGrowingTextViewSizeDelegate-Protocol.h<gh_stars>1-10 // // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by <N...
BjornMelgaard/ran
app/containers/Layout/App.js
import PropTypes from 'prop-types' import { ThemeProvider, injectGlobal } from 'styled-components' import getTheme from '~/themes' import installOfflinePlugin from '~/lib/installOfflinePlugin' import { App as StyledApp } from '~/components/Theme' const App = ({ children, theme }) => { installOfflinePlugin() retur...
lastweek/source-freebsd
src/usr.bin/netstat/mroute.c
/*- * SPDX-License-Identifier: BSD-4-Clause * * Copyright (c) 1989 <NAME> * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * <NAME> of Stanford University. * * Redistribution and use in source and ...
aonguyen123/frontend_KiemDien
src/views/ClassDetail/components/CardClassMember/components/TableToolBar.js/TableToolBar.js
<gh_stars>0 import React, { useState } from 'react'; import clsx from 'clsx'; import { withStyles } from '@material-ui/core/styles'; import Toolbar from '@material-ui/core/Toolbar'; import Typography from '@material-ui/core/Typography'; import IconButton from '@material-ui/core/IconButton'; import Tooltip from '@materi...
wuhlcom/tio-showcase
im/server/src/main/java/org/tio/examples/im/service/BadWordService.java
package org.tio.examples.im.service; import java.io.File; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.tio.examples.im.server.ImServerStarter; import cn....
gocom/startpage
tests/unit/model/Config/ConfigValue.spec.js
<filename>tests/unit/model/Config/ConfigValue.spec.js import Model from '../../../../src/model/Config/ConfigValue'; test('Defaults', () => { const config = new Model(); expect(config.id).toMatch(''); expect(config.value).toBeNull(); }); test('Pass data', () => { const config = new Model({ id: 'id', v...
FateRevoked/mage
Mage.Sets/src/mage/cards/d/Disperse.java
package mage.cards.d; import java.util.UUID; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.target.common.TargetNonlandPermanent; /** * * @author nantuko */ public final class Disperse extends C...
Dee-Why/lite-bo
examples/optimize_problem_with_constraint.py
<filename>examples/optimize_problem_with_constraint.py # License: MIT import numpy as np import matplotlib.pyplot as plt from openbox import Optimizer, sp def mishra(config: sp.Configuration): config_dict = config.get_dictionary() X = np.array([config_dict['x%d' % i] for i in range(2)]) x, y = X[0], X[1]...
npocmaka/Windows-Server-2003
base/tools/instaler/handler.c
<reponame>npocmaka/Windows-Server-2003<filename>base/tools/instaler/handler.c /*++ Copyright (c) 1992 Microsoft Corporation Module Name: handler.c Abstract: This module contains the individual API handler routines for the INSTALER program Author: <NAME> (stevewo) 10-Aug-1994 Revisio...
masahase0117/delegate
maker/getrusage.c
<reponame>masahase0117/delegate #ifndef _MSC_VER #include "ystring.h" int strfRusage(PVStr(usg),PCStr(fmt),int who,PCStr(sru)){ setVStrEnd(usg,0); return 0; } #endif
adamsaparudin/portfolio-hacktiv8
11. Something Cool/server/controllers/question.js
<reponame>adamsaparudin/portfolio-hacktiv8 let Question = require('../models/question') let User = require('../models/user') module.exports = { create: (req, res, next) => { let doc = new Question(req.body) doc.save().then( (data) => { User.findByIdAndUpdate(data.poster, {$push: {"listQuestion":...
aoelen/orkg-frontend
src/components/Home/TrendingProblems.js
<reponame>aoelen/orkg-frontend<filename>src/components/Home/TrendingProblems.js import { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; import { FontAwesomeIcon as Icon } from '@fortawesome/react-fontawesome'; import { faFire, faSpinner } from '@fort...
maciejg-git/vue-bootstrap-icons
dist-mdi/mdi/gesture-two-tap.js
import { h } from 'vue' export default { name: "GestureTwoTap", vendor: "Mdi", type: "", tags: ["gesture","two","tap"], render() { return h( "svg", {"xmlns":"http://www.w3.org/2000/svg","width":"24","height":"24","viewBox":"0 0 24 24","class":"v-icon","fill":"currentColor","data-name":"mdi-ges...
Remydeme/PROROK
deep-q-learning/SoftPolicyGradient/Sac/Networks/ValueNetwork.py
<filename>deep-q-learning/SoftPolicyGradient/Sac/Networks/ValueNetwork.py import tensorflow as tf import tensorflow.keras.layers as layers import tensorflow.keras.losses as kl import numpy as np from datetime import datetime class ValueNetworks(): hidden_1 = 128 hidden_2 = 64 def __init__(self, input...
MeepSplize/Uniquis-Framework
src/cpp/Framework/Managers/Graphics Manager/Toolkit/DirectX 12/HeapDescription.cpp
<reponame>MeepSplize/Uniquis-Framework #include "pch.h" #include "Framework\\Managers\\Graphics Manager\\Toolkit\\DirectX 12\\HeapDescription.h" template<Uniquis::DirectX12::HeapType Type> Uniquis::DirectX12::HeapDescription<Type>::HeapDescription(const unsigned __int64 alignment, const unsigned __int64 byteSize, con...
Wzzzx/chromium-crosswalk
ui/file_manager/file_manager/foreground/js/ui/file_table.js
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Namespace for utility functions. */ var filelist = {}; /** * Custom column model for advanced auto-resizing. * * @param {!Array<cr.ui.tabl...
megadix/p5js-scratchpad
src/sketches/physics/HangingBodiesPage.js
<gh_stars>1-10 import Sketch from "../../common/Sketch"; import HangingBodiesScript from "./HangingBodiesScript"; import PageLayout from "../../common/PageLayout"; export default function HangingBodiesPage() { return ( <PageLayout title="Hanging Bodies" description="p5.js sketch illustrating the ...
galacticgumshoe/scoozie
src/test/scala/org/antipathy/scoozie/action/EmailActionSpec.scala
<reponame>galacticgumshoe/scoozie<filename>src/test/scala/org/antipathy/scoozie/action/EmailActionSpec.scala /** * Copyright (C) 2019 <EMAIL> <<EMAIL>> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may o...
gitter-badger/jbock
examples/src/main/java/net/jbock/examples/OptionalIntArgumentsOptional.java
package net.jbock.examples; import net.jbock.Command; import net.jbock.Converter; import net.jbock.Option; import net.jbock.util.StringConverter; import java.util.OptionalInt; import java.util.function.Supplier; @Command abstract class OptionalIntArgumentsOptional { @Option(names = {"--a", "-a"}, converter = MyCo...
OSADP/C2C-RI
C2CRIBuildDir/projects/C2C-RI/src/NTCIP2306v01_69/src/org/fhwa/c2cri/ntcip2306v109/messaging/QueueController.java
<filename>C2CRIBuildDir/projects/C2C-RI/src/NTCIP2306v01_69/src/org/fhwa/c2cri/ntcip2306v109/messaging/QueueController.java /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.fhwa.c2cri.ntcip2306v109.messaging; import org.fhwa.c2cri.ntcip2306v109.operations...
rbkmoney/three-ds-server-domain-lib
src/main/java/com/rbkmoney/threeds/server/domain/device/DeviceRenderOptions.java
<filename>src/main/java/com/rbkmoney/threeds/server/domain/device/DeviceRenderOptions.java package com.rbkmoney.threeds.server.domain.device; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.rbkmoney.threeds.server.domain.sdk.SdkInterface; import com...
BarbourSmith/JSxCAD
api/shape/log.js
import { hash as computeHash, emit, log as sysLog } from '@jsxcad/sys'; import Shape from './Shape.js'; import { realize } from '@jsxcad/geometry'; /** * * # Log * * Writes a string to the console. * * ``` * log("Hello, World") * ``` * **/ const toText = (value) => { if (typeof value === 'object') { ...
closer2/chrome-ec
test/kb_8042.c
/* Copyright 2013 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * * Tests for keyboard MKBP protocol */ #include "common.h" #include "console.h" #include "ec_commands.h" #include "gpio.h" #include "i8042_protocol...
Amourspirit/ooo_uno_tmpl
ooobuild/cssdyn/bridge/oleautomation/__init__.py
<reponame>Amourspirit/ooo_uno_tmpl # coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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-...
JesusGranizo/oda
oda-datastreams/deviceinfofx30/src/test/java/es/amplia/oda/datastreams/deviceinfofx30/DeviceInfoFX30Test.java
<gh_stars>1-10 package es.amplia.oda.datastreams.deviceinfofx30; import es.amplia.oda.core.commons.entities.Software; import es.amplia.oda.core.commons.utils.CommandExecutionException; import es.amplia.oda.core.commons.utils.CommandProcessor; import es.amplia.oda.datastreams.deviceinfofx30.configuration.DeviceInfoFX30...
GeekerClub/thirdparty
lzo/lzo1f.h
#include "thirdparty/lzo-2.07/include/lzo/lzo1f.h"
github641/testRepo
CAGradientLayer/maskViewDemo-master/MaskViewDemo/ViewControllerDemoFour.h
// // ViewControllerDemoFour.h // MaskViewDemo // // Created by iOS_Developer on 16/2/25. // Copyright © 2016年 CoderJee. All rights reserved. // #import <UIKit/UIKit.h> @interface ViewControllerDemoFour : UIViewController @end
KarrynS/Mend
client/src/components/Patients/ManagementPlan.js
<reponame>KarrynS/Mend import React, {useState} from 'react'; import API from '../../utils/API'; import "./treatmentplan.css" const ManagementPlan = (props) => { console.log("patient props", props.patient, props.patient._id) const [patientId, setPatientId] = useState(props.patient._id); const [formObject,...
hackerlank/SourceCode
Game/Client/CEGUI/CEGUI/src/CEGUIString.cpp
<filename>Game/Client/CEGUI/CEGUI/src/CEGUIString.cpp /************************************************************************ filename: CEGUIString.cpp created: 26/2/2004 author: <NAME> purpose: Implements string class *************************************************************************/ /***************...
RIPboilerplates/RIP-web
internals/scripts/helpers/xmark.js
const chalk = require('chalk') const print = require('./print') /** * Adds mark cross symbol */ function addXMark(callback) { print(chalk.red(' ✘')) if (callback) callback() } module.exports = addXMark
batosai/Tetra
packages/admin/resources/assets/javascripts/components/datepicker.js
<reponame>batosai/Tetra import bulmaCalendar from 'bulma-calendar' import 'bulma-calendar/dist/css/bulma-calendar.min.css' export default class Datepicker { constructor() { this.format = { fr: 'DD/MM/YYYY', en: 'YYYY-MM-DD', } this.init() } init() { const lang = document.querySelect...
biggerwang/geequery
orm-test/src/test/java/jef/database/covertformdb/UserTest.java
<reponame>biggerwang/geequery<filename>orm-test/src/test/java/jef/database/covertformdb/UserTest.java package jef.database.covertformdb; import java.sql.SQLException; import org.easyframe.enterprise.spring.CommonDao; import org.easyframe.enterprise.spring.CommonDaoImpl; import org.junit.Ignore; import org.juni...
skratchdot/audio-editor
src/app/reducers/playbackPosition.js
import * as types from '../constants/ActionTypes'; export default function (state = { position: 0, source: null }, action) { switch (action.type) { case types.SET_PLAYBACK_POSITION: let position = parseFloat(action.position); position = Number.isFinite(position) ? position : 0; return Objec...
Mhh123/spider
day08/shibie.py
<reponame>Mhh123/spider import pytesseract from PIL import Image def sb(image): # 打开图片 img = Image.open(image) # 将图片转化为灰度图片 img = img.convert('L') # 二值化处理 threshold = 140 table = [] for i in range(256): if i < threshold: table.append(0) ...
luglio/hpx5
libhpx/actions/exit.h
// ============================================================================= // High Performance ParalleX Library (libhpx) // // Copyright (c) 2013-2017, Trustees of Indiana University, // All rights reserved. // // This software may be modified and distributed under the terms of the BSD // license. See the C...
xiaoazhe/Ferryman-cloud
ferry-core/src/main/java/com/ferry/core/file/entity/bean/FileConditionVO.java
package com.ferry.core.file.entity.bean; import com.ferry.core.file.object.BaseConditionVO; import lombok.Data; import lombok.EqualsAndHashCode; /** * @author innodev java team * @version 1.0 * @date 2018/12/14 09:23 * @since 1.8 */ @Data @EqualsAndHashCode(callSuper = false) public class FileConditionVO extends...
Markus-Schwer/quarkus
extensions/smallrye-jwt/deployment/src/test/java/io/quarkus/jwt/test/TestConfigSource.java
package io.quarkus.jwt.test; import java.io.IOException; import java.util.Set; import org.eclipse.microprofile.config.spi.ConfigSource; import io.smallrye.jwt.util.KeyUtils; public class TestConfigSource implements ConfigSource { @Override public Set<String> getPropertyNames() { return Set.of("sign...
ifrguy/NHWG-MIMS
src/MbrAddresses-index.js
<filename>src/MbrAddresses-index.js db = db.getSiblingDB( "NHWG" ); db.MbrAddresses.createIndex( { CAPID : 1 } );
ctrlpz/SOMns
src/tools/dym/nodes/AllocationProfilingNode.java
package tools.dym.nodes; import som.vmobjects.SObjectWithClass; import tools.dym.profiles.AllocationProfile; import com.oracle.truffle.api.frame.VirtualFrame; import com.oracle.truffle.api.instrumentation.ExecutionEventNode; public class AllocationProfilingNode extends ExecutionEventNode { protected final Allocat...
mohnbroetchen2/cykel_jenarad
bikesharing/migrations/0023_auto_20200326_1857.py
<reponame>mohnbroetchen2/cykel_jenarad # Generated by Django 2.2.4 on 2020-03-26 17:57 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("bikesharing", "0022_auto_20200326_1845"), ] operations = [ migrations.RenameField( model_name="lo...
anicloud/captain
captain/src/main/java/com/ani/captain/infrastructure/persistence/repository/AccountDeviceJpaRepository.java
package com.ani.captain.infrastructure.persistence.repository; import com.ani.captain.domain.model.AccountDevice; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.CrudRepository; /** * Created by huangbin on 8/24/16. */ public interface AccountDeviceJpaRepository exte...
Gitman1989/chromium
chrome/browser/ui/cocoa/hover_close_button.h
<reponame>Gitman1989/chromium // Copyright (c) 2010 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. #import <Cocoa/Cocoa.h> #include "base/scoped_nsobject.h" #include "chrome/browser/ui/cocoa/hover_button.h" // The sta...
GuillaumeOj/P13-WOD-Board
backend/wod_board/seed.py
import typing import sqlalchemy.orm from wod_board import config from wod_board import exceptions from wod_board import models from wod_board.models import equipment from wod_board.models import movement from wod_board.models import unit from wod_board.models import user from wod_board.models import w_type def user...
sola-da/LambdaTester
experiments/some/someGen/test642.js
<filename>experiments/some/someGen/test642.js var callbackArguments = []; var argument1 = function callback(a,b,c) { callbackArguments.push(JSON.stringify(arguments)) argument2['f9zgt4n!ZJR]W'] = {} return a+b+c }; var argument2 = null; var argument3 = false; var argument4 = function callback(a,b,c) { callbackA...
pocketgems/XLE2
RenderCore/AppleMetal/Metal/Format.cpp
// Distributed under the MIT License (See // accompanying file "LICENSE" or the website // http://www.opensource.org/licenses/mit-license.php) #include "Format.h" #include "IncludeAppleMetal.h" namespace RenderCore { namespace Metal_AppleMetal { MTLPixelFormat AsMTLPixelFormat(RenderCore::Format fmt) { ...
shkir/sctp-refimpl
APPS/unpcode/unpv13e/server/lock_pthread.c
<filename>APPS/unpcode/unpv13e/server/lock_pthread.c<gh_stars>1-10 /* include my_lock_init */ #include "unpthread.h" #include <sys/mman.h> static pthread_mutex_t *mptr; /* actual mutex will be in shared memory */ void my_lock_init(char *pathname) { int fd; pthread_mutexattr_t mattr; fd = Open("/dev/zero", O_RDWR...
yuanweikang2020/canal
parse/src/main/java/com/alibaba/otter/canal/parse/exception/ServerIdNotMatchException.java
<reponame>yuanweikang2020/canal package com.alibaba.otter.canal.parse.exception; import com.alibaba.otter.canal.common.CanalException; /** * @author chengjin.lyf on 2018/8/8 下午1:07 * @since 1.0.25 */ public class ServerIdNotMatchException extends CanalException { private static final long serialVersionUID = -...