text
stringlengths
1
1.05M
#!/bin/bash set -euo pipefail cd /var/www/html php redaxo/bin/console install:download -q demo_base 2.10.1 php redaxo/bin/console package:install -q demo_base php redaxo/bin/console cache:clear -q php redaxo/bin/console demo_base:install -q -y chown -R www-data:www-data ./
#!/usr/bin/env bash set -e if [ ! -d node_modules ]; then echo "[B] Run 'npm install' first" exit 1 fi clean() { rm -f .babelrc rm -rf lib/* node scripts/version.js > lib/version.json node scripts/assemble_lua.js > lib/lua.json } makeLib10() { echo '[B] Compiling Bottleneck to Node 10+...' npx coffee...
<filename>Problem #0016/src/Problem.java import java.util.Scanner; public class Problem { private int nextIndex = 0; private int[] lastOrderIds; public Problem(int n) { this.lastOrderIds = new int[n]; } public void record(int order_id) { if (0 >= order_id) throw new IllegalArgumentException(); t...
def validate_data_types(data): attribute_data_types = { 'version': 'str', 'product_id': 'int', 'product_name': 'str', 'current_product_milestone_id': 'int', 'product_milestones': 'list[ProductMilestoneRest]', 'product_releases': 'list[ProductReleaseRest]', 'bu...
python -m pip install -r ./requirements.txt cd ./src/match bash build.sh cd ../..
#!/bin/bash # This script will configure iptables to restrict access to solely # the www box - that is, the box with the tomcat web server on it. # # Flush all current rules from iptables # iptables -F # Allow existing connections to continue iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -I...
package net.orecrops.gameobjs.blocks; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.BlockCrops; import net.minecraft.block.IGrowable; import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block...
import {BrowserModule} from '@angular/platform-browser'; import {NgModule} from '@angular/core'; import {AppComponent} from './app.component'; import {BoxComponent} from './box/box.component'; import {ListProjectComponent} from './box/list-project/list-project.component'; import {ProjectService} from './services/proje...
#!/bin/bash # Regular tests ./build/Linux-x86_64/bin/test
model = Sequential() model.add(Dense(20, input_dim=1, activation='relu')) model.add(Dense(10, activation='relu')) model.add(Dense(1, activation='sigmoid'))
<reponame>mesikapp/dash.js import PatchManifestModel from '../../src/dash/models/PatchManifestModel'; import DashConstants from '../../src/dash/constants/DashConstants'; import PatchOperation from '../../src/dash/vo/PatchOperation'; import SimpleXPath from '../../src/dash/vo/SimpleXPath'; import PatchHelper from './he...
<reponame>a8m/expect package expect_test import ( "testing" "github.com/a8m/expect" ) // TODO(Ariel): Create mock that implement TB interface // and stub `Error` and `Fatal` func TestLen(t *testing.T) { expect := expect.New(t) expect("foo").To.Have.Len(3) m := map[string]int{} expect(m).To.Have.Len(0) expect...
package com.java.study.algorithm.zuo.emiddle.class07; public class Code08_FindNewTypeChar{ }
source ~/.bashrc conda activate covdock cov_dock_mol2 -i /home/fuqiuyu/work/covdock_server/data/compound1.mol2 -r fixed -s A:CYS19 -l flex.list -w output
public class PrimeNumber { public static boolean isPrime(int num) { boolean isPrime = true; //Check if the number is divisible by any number from 2 to num -1 for (int i = 2; i < num; i++) { if (num % i == 0) { isPrime = false; break; } } return isPrime; } public static void main(String[] args) { int num ...
TwitchViewer.directive('titleBar', [function() { return { restrict: 'E', templateUrl: 'app/templates/directives/header.html', link: function($scope, element) { var gui = require('nw.gui'); var win = gui.Window.get(); element.on("click", function(event) { ...
<reponame>naga-project/webfx<gh_stars>100-1000 package dev.webfx.kit.mapper.peers.javafxgraphics.markers; import javafx.beans.property.DoubleProperty; /** * @author <NAME> */ public interface HasEndXProperty { DoubleProperty endXProperty(); default void setEndX(Number endX) { endXProperty().setVal...
curl -X POST \ http://localhost:8080/doctors \ -H 'Content-Type: application/json' \ -H 'Postman-Token: a8e04d0c-154d-472c-be02-d15f39ec53d4' \ -H 'cache-control: no-cache' \ -d '{ "fName" : "John", "lName" : "Dorian", "specialization" : "Internal Medicine" }' curl -X GET \ http://localhost:8080/doctors...
import { join, resolve } from 'path' import { compile } from 'ejs' import htmlescape from 'htmlescape' import File from '@uiengine/core/lib/util/file' import { highlight } from './util' const supportedLocales = ['en', 'de'] const defaultOpts = { lang: 'en', hljs: 'atom-one-dark', base: '/', cache: true, cust...
<html> <head> <title>My Form</title> </head> <body> <form action="email.php" method="post"> <input type="text" name="first_name" placeholder="First Name"> <input type="text" name="last_name" placeholder="Last Name"> <input type="submit" value="Submit"> </form> </body> </html> <?php $first_name = $_POST['first_na...
#!/usr/bin/env bash source variables.sh ./script/discord.sh "$USER executed deploy.sh." for server in ${ISUCON_SERVERS[@]}; do echo "---- start deploy $server -----" # etc rsync -avz -e "ssh -i $ISUCON_SSH_KEY" --rsync-path='sudo rsync' ./etc/ $ISUCON_SSH_USER@$server:/etc/ # app rsync -avz -e "ss...
<reponame>iagodahlem/clima-cli<filename>src/utils/weather.js<gh_stars>1-10 const axios = require('axios') module.exports = async (location) => { const result = await axios.get('https://query.yahooapis.com/v1/public/yql', { params: { format: 'json', q: `select item from weather.forecast where woeid in...
#!/usr/bin/env bash set -ex source scripts/generic-setup.sh # system wide dependencies (packages) install_build_dependencies install_run_dependencies # installing rust bootstrap_rust install_rust_build_dependencies install_rust_run_dependencies # set permissions for tcpdump for vmxnet3 tests sudo setcap cap_net_raw...
<reponame>ritaswc/wechat_app_template<filename>2021-05-09/微商城+项目搭建指南/nodejs/static/javascripts/admin/reducers/userAnalyze.js import { REQUEST_USER_ANALYZE } from '../constants'; let initState = { todayNewUser : 0, yesterdayNewUser : 0, todayPurchaseUser : 0, yesterdayPurchaseUser : 0 }; export ...
<gh_stars>1-10 /* * Copyright (C) 2011 GroupMe, Inc. */ package com.groupme.providerone.sample.database.objects; import android.os.Parcel; import com.groupme.providerone.sample.database.autogen.objects.BaseMyView; public class MyView extends BaseMyView { public MyView() { } public MyView(Parcel in) ...
<reponame>jmini/microprofile-open-api<gh_stars>0 /** * Copyright (c) 2017 Contributors to the Eclipse Foundation * Copyright 2017 SmartBear Software * <p> * 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...
#!/usr/bin/env bash echo -------------- echo READY.... echo __AVI__ ok avi echo __AVI__ il est quelle heure
import java.util.ArrayList; public class ItemManager { private ArrayList<String> items; public ItemManager() { this.items = new ArrayList<>(); } public void addItem(String item) { this.items.add(item); } public void editItem(int index, String item) { this.items....
<filename>middleware/auth.js const jwt = require('jsonwebtoken'); const config = require('../config/config'); module.exports = (req, res, next) => { const token = req.header('x-auth-token'); if (!token) { return res.status(401).json({ msg: 'No token, authorization denied.' }); } try { ...
import { LoginInput } from './input/login.input'; import { Resolver, Query, Mutation, Args, Context } from '@nestjs/graphql'; import { AuthService } from './auth.service'; import { Auth } from '../../models/auth.model'; import { Public } from '../../@core/@keycloak'; import { Logout } from '../../models/logout.model'; ...
The time complexity of a linear search procedure in Java is O(n), where n is the size of the array.
def populate_model_results(model_types: list) -> dict: results = {model_type: [] for model_type in model_types} return results
# rubocop:disable Metrics/LineLength # == Schema Information # # Table name: reviews # # id :integer not null, primary key # content :text not null # content_formatted :text not null # deleted_at :datetime indexed # likes_count :integer...
def triangle_num(n): if n == 1: return 1 else: return n + triangle_num(n-1)
<filename>client/components/ThankYou.js import React from 'react' const ThankYou = () => <div>Thank you for your purchase!</div> export default ThankYou
package com.dubture.symfony.ui.wizards.importer; import java.io.File; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.util.Collection; import org.apache.commons.io.FileUtils; import org.eclipse.core.internal.resources.ProjectDescription; import org.eclipse.core.internal.res...
import { connect } from 'react-redux' import { push } from 'connected-react-router' import getMe from 'store/selectors/getMe' import updateUserSettings from 'store/actions/updateUserSettings' import { getReturnToURL, resetReturnToURL } from 'router/AuthRoute/AuthRoute.store' export function mapStateToProps (state, pro...
<filename>src/shared/context.tsx import type { ReactNode } from "react"; import { createContext, useContext, useReducer } from "react"; const defaultState = { walletAddress: "0x29D7d1dd5B6f9C864d9db560D72a247c178aE86B", }; export type Action = { type: "CHANGE_WALLET_ADDRESS"; payload: string; }; export type Dis...
function parseStr(str) { let totalLength = 0; let words = str.split(" "); words.forEach(word => { totalLength += word.length; }); return totalLength; }
<reponame>turbo124/taskmanager<filename>resources/assets/js/components/common/dropdowns/CustomerDropdown.js import React, { Component } from 'react' import { Input } from 'reactstrap' import Select from 'react-select' import { translations } from '../../utils/_translations' import CustomerRepository from '../../reposit...
tapefile.write(tape_line+'\n')
import '../modules/job-search-sk'; import '../modules/task-scheduler-scaffold-sk'; import '../modules/colors.css'; import { GetTaskSchedulerService } from '../modules/rpc'; import { JobSearchSk } from '../modules/job-search-sk/job-search-sk'; const ele = <JobSearchSk>document.querySelector('job-search-sk'); ele.rpc =...
#!/bin/bash # # We enable docker if either: # - we detect the DOCKER_HOST envvar, overriding the default socket location # (in that case, we trust the user wants docker integration and don't check existence) # - we find the docker socket at it's default location if [[ -z "${DOCKER_HOST}" && ! -S /var/run/docke...
#!/bin/bash NUMBER_OF_CLIENTS=$(grep -c -E "^### " "/var/lib/premium-script/data-user-sstp") if [[ ${NUMBER_OF_CLIENTS} == '0' ]]; then clear echo "" echo "You have no existing clients!" exit 1 fi clear echo "" echo "Select the existing client you want to renew" echo " Press CTRL+C to return"...
package fi.tuni.minesweeper; import android.app.Activity; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.content.SharedPreferences; import android.graphics.Typeface; import android.os.Bundle; import android.o...
import Widgets from '../fixtures/Widgets'; import { createWidget } from '../support/widget'; import { dashboardNameGen } from '../fixtures/Dashboard'; const example = Widgets.whiteSpace; describe('Dashboard Persistence', () => { beforeEach(() => { cy.visit('/'); cy.login(); }); it('Not saved dashboard ...
import argparse class Bunch(object): def __init__(self, adict): self.__dict__.update(adict) def get_args(dummy=False): parser = argparse.ArgumentParser(description='Welcome to GAN-Shot-Learning script') parser.add_argument('--batch_size', nargs="?", type=int, default=32, help='batch_size for expe...
<filename>src/main/java/org/tom_v_squad/soiwenttoaconcert/controllers/VenueController.java package org.tom_v_squad.soiwenttoaconcert.controllers; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframew...
package gobpp func init() { SetupBasics() }
#!/usr/bin/env bash # Copyright (c) .NET Foundation and contributors. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # Obtain the location of the bash script to figure out where the root of the repo is. source="${BASH_SOURCE[0]}" # Resolve $so...
#!/bin/bash # Clean out any old sandbox, make a new one OUTDIR=sandbox rm -fr $OUTDIR; mkdir -p $OUTDIR # Check for os SEP=: case "`uname`" in CYGWIN* ) SEP=";" ;; esac function cleanup () { kill -9 ${PID_1} ${PID_2} ${PID_3} ${PID_4} 1> /dev/null 2>&1 wait 1> /dev/null 2>&1 RC=`cat $OUTDIR/sta...
<reponame>xsolve-pl/xsolve-feat import { Injectable } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; import { Model } from 'mongoose'; import { DefinitionInterface } from '../interface/definition.interface'; import { DeployKeyRepository } from './deploy-key.repository'; import { DefinitionRecipe...
<reponame>mission-apprentissage/prise-de-rdv const { runScript } = require("../scriptWrapper"); const logger = require("../../common/logger"); const { clearCfas } = require("./utils/clearUtils"); runScript(async () => { logger.info("Suppression de tous les users cfas ...."); await clearCfas(); logger.info("Users...
import songsReducer from './songsReducer' describe('songsReducer reducer', () => { it('should return the initial state', () => { expect( songsReducer(undefined, {}) ).toEqual({songs: [], loading: false}) }) it('should handle the ADD_SONG action', () => { const songs = [ {track: {artist_name: "...
# # Provides for an easier use of SSH by setting up ssh-agent. # # Authors: # Sorin Ionescu <sorin.ionescu@gmail.com> # # Return if requirements are not found. if (( ! $+commands[ssh-agent] )); then return 1 fi # Set the path to the SSH directory. _ssh_dir="$HOME/.ssh" # Set the path to the environment file if n...
<gh_stars>0 package com.acgist.snail.net.upnp; import org.w3c.dom.Element; import com.acgist.snail.config.SystemConfig; import com.acgist.snail.format.XML; import com.acgist.snail.protocol.Protocol; /** * <p>UPNP请求</p> * * @author acgist */ public final class UpnpRequest { /** * <p>SOAP协议:{@value}</p> */ ...
package org.jooby; import static java.util.Objects.requireNonNull; import static org.junit.Assert.assertEquals; import java.text.SimpleDateFormat; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.util.Date; import java.util.TimeZone; import javax.inject.Inject; import javax.inject.Name...
<gh_stars>10-100 'use strict'; var handlebars = require('handlebars'); var _ = require('lodash'); var config = require('../config'); var template = require('../template'); var helpers = require('./helpers'); //////// module.exports = render; //////// function render(source, data) { var env = handlebars.create(...
<reponame>siddharthsg2/your-awesome-projects<filename>Movie-App/node_modules/server/src/config/integration.test.js<gh_stars>1000+ // Test runner: const run = require('server/test/run'); const path = require('path'); const test = 'test'; describe('Basic router types', () => { // TODO: fix this it('has independent ...
<reponame>ZenUml/vue-sequence<gh_stars>1-10 // Advanced functionality // Allow call self method with participant name export default 'A.methodA() { A.methodA1() }'
<gh_stars>0 angular.module('jenkins',[]) .controller('JenkinsController',['$scope',function($scope){ $scope.firstName = "John"; $scope.lastName = "Doe"; }]);
<filename>regscrape/regsdotgov/__init__.py # add self to path import sys import os CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) if CURRENT_DIR not in sys.path: sys.path.append(CURRENT_DIR)
#!/bin/bash # STAR mapping evaluation # GOAL: run mapping various STAR mapping parameters and test impact on cis-eQTLs # DATE: 1 December 2020 - # INFO: # Steps from reads of samples (.fastq.gz) to cis eQTL detection ################################################################################### # Part 1: Ma...
<filename>app.py import os from flask import Flask, render_template, request, redirect, url_for, make_response from mastodon import Mastodon, get_client_keys, generate_oauth_url, process_refresh_token from tootsaver_data import save_toot, read_saved, remove_data, call_data root_dir = os.path.abspath(os.path.dirname(_...
// copied from govau/designsystem var mainmenu = document.getElementById( 'mainmenu' ); var searchmenu = document.getElementById( 'searchmenu' ); var mainmenuToggle = document.getElementById( 'mainmenu-toggle' ); var searchToggle = document.getElementById( 'search-toggle' ); var overlay = docume...
package solver import ( "context" "sync" "time" "github.com/pkg/errors" ) func NewInMemoryCacheStorage() CacheKeyStorage { return &inMemoryStore{ byID: map[string]*inMemoryKey{}, byResult: map[string]map[string]struct{}{}, } } type inMemoryStore struct { mu sync.RWMutex byID map[string]*in...
import { FC } from 'react'; import { Container, Paper } from '@mantine/core'; import { Cards } from '../components/Cards'; import { NAV_BAR_HEIGHT } from '../constants/styling'; export const MainContent: FC = () => { return ( <Paper radius={0} style={{ height: `calc(100vh - ${NAV_BAR_HEIGHT}px)` }}> <Conta...
#!/bin/bash # Import and run selected benchmark models with nominal parameters and check # agreement with reference values # # Expects environment variable BENCHMARK_COLLECTION to provide path to # benchmark collection model directory # Confirmed to be working models=" Boehm_JProteomeRes2014 Borghans_BiophysChem1997 E...
// // SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD // // SPDX-License-Identifier: BSL-1.0 // #pragma once #include "mbedtls/ssl.h" #include "mbedtls/entropy.h" #include "mbedtls/ctr_drbg.h" #include "mbedtls/error.h" #include "mbedtls/certs.h" #include "mbedtls/esp_debug.h" #include "esp_log.h...
python plot_harvestrate.py cp figures/* ../../../../website-discovery/paper/figures/harvestrate
/* * Copyright (c) Open Source Strategies, Inc. * * Opentaps is free software: you can redistribute it and/or modify it * under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Opentap...
setenv hello pouet setenv ahah hehe env | grep hello | cat -e env | grep ahah | cat -e unsetenv hello env | grep hello | cat -e env temporary=hello | grep temporary | cat -e
#require 'dm-core' require 'resourceful' require 'extlib' require 'json' __DIR__ = File.dirname(__FILE__) require File.join(__DIR__, 'dm-ssbe-adapter', 'ssbe_authenticator') require File.join(__DIR__, 'dm-types', 'href') require File.join(__DIR__, 'dm-ssbe-adapter', 'model_extensions') require File.join(__DIR__, 'dm-...
""" Run tinyframe.py <input file> [int value reg0] [int value reg1] ... Interpreter for a tiny interpreter with frame introspection. Supports integer values and function values. The machine is register based with untyped registers. Opcodes: ADD r1 r2 => r3 # integer addition or function combination, ...
<gh_stars>0 import { useToastActions } from 'contexts/toast/ToastContext'; import { useMutateAllNftsCache } from 'hooks/api/nfts/useAllNfts'; import { useRefreshOpenseaSync } from 'hooks/api/nfts/useOpenseaSync'; import { ReactNode, createContext, useContext, memo, useMemo, useEffect, useState, useCallb...
def find_primes(input_list): primes = [] for num in input_list: if num > 1: for i in range(2, num): if (num % i) == 0: break else: primes.append(num) return primes
/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this lis...
package com.github.coreyshupe.lb.velocity.listeners; import com.github.coreyshupe.lb.api.LoadBalancerInstance; import com.velocitypowered.api.event.EventTask; import com.velocitypowered.api.event.Subscribe; import com.velocitypowered.api.event.player.PlayerChooseInitialServerEvent; import com.velocitypowered.api.proxy...
# -*- coding: utf-8 -*- # # MIT License # # Copyright (c) 2016 <NAME> <<EMAIL>>, Institute of Computer Science, Masaryk University # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without r...
package Hibernate; // Generated 18-nov-2018 18:36:45 by Hibernate Tools 3.5.0.Final /** * Proveedores generated by hbm2java */ public class Proveedores implements java.io.Serializable { private String codigo; private String nombre; private String apellidos; private String direccion; public Pr...
class Node: def __init__(self, data): self.data = data self.next = None
<gh_stars>0 import { Column, DataType, Model, Table } from 'sequelize-typescript'; interface CitysCreationsAttr { name: string; } interface DisabitilitysCreationsAttr { name: string; } interface MaterialStatusCreationsAttr { name: string; } interface СitizenshipStatusCreationsAttr { name: string; } interface C...
from django.db import models class Range(models.Model): def __str__(self): return str(self.year) + ',' + str(self.min) + ',' + str(self.max) + ',' + str(self.step) min = models.FloatField() max = models.FloatField() step = models.IntegerField() class Count(models.Model): def __str__(self): return str(se...
#!/bin/ksh set -x ## plot mean tracks of individual storms in the Atlantic ## Fanglin Yang, March 2008: original copy adopted from HWRF. Restructured and added driver scripts. ## Fanglin Yang, March 2013: Generalized for running on WCOSS and THEIA #---------------------------------------------------------------------...
<filename>modules/caas/common/src/main/java/io/cattle/platform/agent/impl/RemoteAgentImpl.java package io.cattle.platform.agent.impl; import com.google.common.util.concurrent.ListenableFuture; import io.cattle.platform.agent.AgentRequest; import io.cattle.platform.agent.RemoteAgent; import io.cattle.platform.async.uti...
def str_to_list(string): return string.split(' ')
#!/bin/bash #SBATCH -J Act_tanh_1 #SBATCH --mail-user=eger@ukp.informatik.tu-darmstadt.de #SBATCH --mail-type=FAIL #SBATCH -e /work/scratch/se55gyhe/log/output.err.%j #SBATCH -o /work/scratch/se55gyhe/log/output.out.%j #SBATCH -n 1 # Number of cores #SBATCH --mem-per-cpu=2000 #SBATCH -t 23:59:00 # Hours, minutes and...
<reponame>bfoz/pocket /* Filename: intelhex.cc * Routines for reading/writing Intel INHX8M and INHX32 files Copyright (c) 2002, Terran Development Corporation All rights reserved. This code is made available to the public under a BSD-like license, a copy of which should have been provided with this code in the fi...
#!/bin/bash # KUU.sh # # Kasutamine: source ./KUU.sh <aasta> <kuu nr> <CPV kood> # # Skript moodustab Riigihangete registri avaandmete failist "Sõlmitud lepingud" CSV-faili. # # <aasta> - nt 2020 # <kuu nr> - nt 6 # <CPV kood> - nt # 45 ehitusteenused # 72 (s.t IT-teenused) # # CC BY-NC-SA, Priit Pa...
const express = require('express'); const userController = require('./user.controller'); const checkAuth = require('./auth.middleware'); const router = express.Router(); router.post('/signup', userController.userSignUp); router.post('/login', checkAuth, userController.userLogin); module.exports = router;
#!/bin/bash cd `dirname $0` npm run --silent aggregate
package local.example.aleatory.views.number; import com.vaadin.flow.component.button.Button; import com.vaadin.flow.component.notification.Notification; import com.vaadin.flow.component.orderedlayout.HorizontalLayout; import com.vaadin.flow.component.textfield.TextField; import com.vaadin.flow.router.PageTitle; import...
import styled from 'styled-components'; export const Container = styled.div` width: 100%100%; height: 230px; text-align: center; `;
#!/usr/bin/env bash set -e # halt script on error bundle exec jekyll build -d _site/arduino-day bundle exec htmlproofer --allow-hash-href --disable-external --empty-alt-ignore ./_site
package main import "fmt" func main() { array := [4]int{1, 2, 5, 10} value := 2 for _, element := range array { if element == value { fmt.Println("Value is in the array") break } } }
def infer(self, image, threshold): # Perform object detection using the Faster R-CNN model detections = self.model.detect_objects(image) # Filter detections based on the threshold filtered_detections = [(obj, score) for obj, score in detections if score >= threshold] return filtered_detections
<filename>node_modules/grommet/es6/components/Tabs/tabs.stories.js import React from 'react'; import PropTypes from 'prop-types'; import { storiesOf } from '@storybook/react'; import { css } from 'styled-components'; import { Attraction } from "grommet-icons/es6/icons/Attraction"; import { Car } from "grommet-icons/es6...
<filename>Node Crash Session/logger.js const EventEmitter = require("events"); const uuid = require("uuid"); const fs = require("fs"); const path = require("path"); console.log(uuid.v4()); class Logger extends EventEmitter { log(msg) { // Call event this.emit("message", { id: uuid.v4(), msg }); fs.writeF...
<gh_stars>0 package scene import ( "github.com/gravestench/director/pkg/common" "github.com/gravestench/mathlib" lua "github.com/yuin/gopher-lua" ) func (s *Scene) luaCheckEID() *common.Entity { ud := s.Lua.CheckUserData(1) if v, ok := ud.Value.(*common.Entity); ok { return v } s.Lua.ArgError(1, "EID expect...
<filename>webapp/src/app/shared/shared.module.ts<gh_stars>0 import {NgModule} from '@angular/core'; import {GlobalEventsService} from './global-events.service'; import {HostDirective} from './host.directive'; import {HttpClientService} from './http-client.service'; import {MapLoaderService} from './map-loader.service';...