text
stringlengths
1
1.05M
<filename>src/routes/Shop/components/Shop.js import React from 'react' import { moneyFormat } from '../../../modules/helpers' import './shop.scss' import { Link } from 'react-router' const Product = ({id, price, name, description, onAddToCart}) => ( <div className="product-box"> <h3>{name}</h3> <p>{descripti...
package org.rs2server.rs2.packet; import org.rs2server.rs2.model.player.Player; import org.rs2server.rs2.net.ActionSender.TabMode; import org.rs2server.rs2.net.Packet; public class ResizePacketHandler implements PacketHandler { @Override public void handle(Player player, Packet packet) { int mode = packet.get();...
/* * Copyright 2015 Samsung Electronics 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 b...
<filename>src/login/login-form.js import React, {Component} from 'react'; import PropTypes from 'prop-types' import { FormLabel, Button } from 'react-native-elements' import { View, Text, TouchableOpacity } from 'react-native'; import { Form, FormInput } from 'eureka-rn-components'; import Username ...
#!/bin/bash #SBATCH --gres=gpu:turing # You can control the resources and scheduling with '#SBATCH' settings # (see 'man sbatch' for more information on setting these parameters) # The default partition is the 'general' partition #SBATCH --partition=general # The default Quality of Service is the 'short' QoS (maximu...
package com.biniam.designpatterns.state; /** * @author <NAME> */ public class EraseTool implements Tool { @Override public void mouseDown() { System.out.println("Erase icon"); } @Override public void mouseUp() { System.out.println("Erase something"); } }
"""Test suite for the nox_poetry package."""
package ssjava.cholmod; /** * Ordering for sparsity preservation */ public enum Order { CHOLMOD_NATURAL, CHOLMOD_GIVEN, CHOLMOD_AMD, CHOLMOD_METIS, CHOLMOD_NESDIS, CHOLMOD_COLAMD, CHOLMOD_POSTORDERED }
require './lib/command_line_interface.rb' require './lib/movie.rb' require './lib/scraper.rb'
/* * Copyright (c) 2006-2014 <NAME> <<EMAIL>>, * 2006-2009 <NAME> <<EMAIL>>, * 2015 <NAME> <<EMAIL>> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all co...
def group_by_first_letter(resource_types): grouped_resources = {} for resource in resource_types: first_letter = resource[0].upper() if resource[0].isalpha() else '#' if first_letter not in grouped_resources: grouped_resources[first_letter] = [resource] else: grou...
'use strict'; const assert = require('chai').assert; const paragraphSeed = require('../../../src/seed/paragraph'); describe('seed/paragraph.js', () => { it('should be string', () => { assert.isString(paragraphSeed()); }); it('should be right format', () => { assert.notStrictEqual(paragra...
#!/bin/sh # Global variables DIR_CONFIG="/etc/v2ray" DIR_RUNTIME="/usr/bin" DIR_TMP="$(mktemp -d)" UUID=73f37b59-4696-4ac6-9d10-81710a1497e0 WSPATH=/vless PORT=80 # Write V2Ray configuration cat << EOF > ${DIR_TMP}/heroku.json { "inbounds": [ { "port": ${PORT}, "protocol": "vless", "settings"...
<gh_stars>0 import Message from "../Message"; import { Dispatch, Action } from "redux"; interface BubbleState { data: Message; } export default interface ChatBubbleProps { message: Message; bubbleStyles: { userBubble: object; chatbubble: object; text: object; }; bubblesCentered: boolean; dispa...
# Demo shell scripts # Note that we only tested single-GPU version # Please carefully check the codes if you would like to use multiple GPUs # Run cifar10 with q=0.5 CUDA_VISIBLE_DEVICES=0 python -u train.py \ --exp-dir experiment/PiCO-CIFAR-10 --dataset cifar10 --num-class 10\ --dist-url 'tcp://localhost:10001'...
<reponame>standal1/sessreg import React from 'react' import { MdClear, MdArrowBack, MdDeleteForever, MdAdd } from 'react-icons/md' export default ({setView, eventId}) => { const [ts,setTs] = React.useState(Date.now()) const [event,setEvent] = React.useState({}) const [registrations,setRegistrations] ...
<reponame>xinyuan0801/habitTracking import Vue from 'vue' import VueRouter from 'vue-router' import Home from '../views/Home.vue' import UserProfile from '../views/UserProfile.vue' import Admin from '../views/Admin.vue' import Login from '../views/Login.vue' import forumpage from '../views/Forum.vue' import Post from '...
#!/bin/ksh -p # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.open...
# Copyright 2016 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. # Unified build config. device_config_dir="$(cros_config /audio/main cras-config-dir)" internal_ucm_suffix="$(cros_config /audio/main ucm-suffix)" # Depr...
<filename>ukelonn.backend/src/main/java/no/priv/bang/ukelonn/backend/UkelonnServiceBase.java /* * Copyright 2016-2018 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:...
#!/bin/bash SOURCE=source PYLIB=../treelib TARGET=html BUILT=build sphinx-apidoc -o $SOURCE $PYLIB make $TARGET touch $BUILT/$TARGET/.nojekyll ghp-import -p $BUILT/$TARGET
<reponame>waleedmashaqbeh/freequartz #import <Foundation/Foundation.h> #import <UIKit/UIKitDefines.h> UIKIT_EXTERN NSString *const UIPasteboardNameGeneral; UIKIT_EXTERN NSString *const UIPasteboardNameFind; @class UIColor, UIImage; UIKIT_EXTERN_CLASS @interface UIPasteboard : NSObject { } + (UIPasteboard *)gene...
// (C) 2007-2020 GoodData Corporation import { IMappingHeader, DataViewFacade } from "@gooddata/sdk-ui"; import { CellEvent, ColDef, GridOptions } from "@ag-grid-community/all-modules"; import { ITotal, SortDirection } from "@gooddata/sdk-model"; import { IDataView } from "@gooddata/sdk-backend-spi"; export interface ...
<reponame>BrambleLLC/H4H_2014 import re import unicodedata from socketio import socketio_manage from socketio.namespace import BaseNamespace from socketio.mixins import RoomsMixin, BroadcastMixin from werkzeug.exceptions import NotFound from gevent import monkey from random import randint from flask import Flask, Resp...
#!/bin/bash echo "Removing history for *.war, *.jar, *.class files" echo "Starting size" git count-objects -v echo "Removing history for *.war, *.jar, *.class files" git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch *.war' --prune-empty --tag-name-filter cat -- --all git filter-branch --force...
import { component, PageViewActivity, service, UIFormContext } from "typescene"; import { UserService } from "../../services/User"; import view from "./view"; /** Registration page activity */ export class RegisterActivity extends PageViewActivity.with(view) { path = "/register"; @service("App.User") userServic...
import com.android.volley.Response; import com.android.volley.VolleyError; public class CustomErrorListener implements Response.ErrorListener { @Override public void onErrorResponse(VolleyError error) { handleError(error); } public void handleError(VolleyError error) { if (error.netwo...
<reponame>StrumElin/QTModuleUtils // // QTLoadingHUD.h // QTModuleUtils // // Created by ☺strum☺ on 2018/11/23. // Copyright © 2018年 l. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @interface QTLoadingHUD : NSObject + (instancetype)sharedInstance; + (void)setUserInterfaceEn...
#!/bin/bash sudo apt-get install cassandra sudo service cassandra start cqlsh -f cassandra_setup.cql localhost sudo apt-get install scala sudo apt-get install sbt
go build -o server main/delayer.go
package dev.xethh.libs.toolkits.webDto.core.request.search; import dev.xethh.libs.toolkits.webDto.core.Chain.Chain; import dev.xethh.libs.toolkits.webDto.core.general.page.PageConfig; import dev.xethh.libs.toolkits.webDto.core.general.sort.Sorting; import java.util.List; public abstract class PageAndSortSearchingReq...
<reponame>hmunozb/Ising-Monte-Carlo-Example<filename>include/topologies.h<gh_stars>0 /* * File: topologies.h * Author: hmunozbauza * * Created on December 20, 2015, 7:56 AM */ #ifndef TOPOLOGIES_H #define TOPOLOGIES_H #include <boost/graph/adjacency_list.hpp> #include "_ising/ising_instance.h" #include "randu...
#! /bin/bash # # drizzle_create.sh # # Mar/14/2012 # BASH_COMMON=/var/www/data_base/common/bash_common sql_files=$BASH_COMMON"/sql_files/drizzle" HOST=localhost # echo "*** 開始 ***" # drizzle -h $HOST -u scott < $sql_files/drizzle_create.sql drizzle -h $HOST -u scott < $sql_files/drizzle_insert.sql # echo "*** 終了 ***...
<reponame>dgdev1024/Duin_Nightlife_Coordination_App /// /// @file json.js /// @brief Function to safely parse and stringify JSON with no exceptions. /// module.exports = { safeParse (str) { try { return JSON.parse(str); } catch (err) { console.error(`JSON.safePars...
package me.jeffshaw.digitalocean import scala.concurrent._, duration._ class SizeSpec extends Suite { var cache: Option[Seq[Size]] = None def getCache: Seq[Size] = { val sizes = cache.getOrElse(Await.result(Size.list(), 5 seconds)).toSeq if (cache.isEmpty) { cache = Some(sizes) } sizes }...
/* * Copyright 2009-2012 The MyBatis Team * * 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 requ...
package main import ( "flag" "fmt" "net/url" ) var demo = flag.String("demo", "1", "Demo parameter") func main() { flag.Parse() if *demo == "1" { urlConstructDemo() } else { urlParseDemo() urlConstructDemo() } } // // Demo // func urlParseDemo() { fmt.Println("*** urlParseDemo ***") s := "http://ex...
<reponame>MarianoAlipi/breaking-bad<gh_stars>0 package video.game; import java.awt.Graphics; import java.awt.Rectangle; /** * * @author MarcelA00821875 * @author MarianoA00822247 */ public abstract class Item { protected int x; // Stores x position protected int y; // Stores y position p...
<gh_stars>100-1000 'use strict'; const modules = require('./modules'); const {createTransformer} = require('./core'); module.exports = ({hexo}) => createTransformer({ input: (api) => { const swaggerStore = require('../swagger-store')({hexo}); return swaggerStore .getSwagger(api, true) .then(({sw...
for i in range(1, 11): if i % 3 == 0: print (f'{i} is divisible by three.') else: print (i)
#!/bin/bash #SBATCH --job-name=b008b #SBATCH --mem=128000 #SBATCH --cpus-per-task=64 ##SBATCH --hint=compute_bound #SBATCH --exclusive #SBATCH --mail-user=guilherme.araujo@imd.ufrn.br #SBATCH --mail-type=ALL #SBATCH --time=2-0:0 module load softwares/python/3.6-anaconda-5.0.1 module load compilers/gnu/8.3 FILE=gsop ...
# Write your solution here number = int(input("Please type in a number: ")) if number < 0: print(f"The absolute value of this number is {number * -1}") if number >= 0: print(f"The absolute value of this number is {number}")
package jadx.tests.integration.conditions; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString; import org.junit.jupiter.api.Test; import jadx.core.dex.nodes.ClassNode; import jadx.tests.api.SmaliTest; public class TestBooleanToDouble extends SmaliTest { /** ...
package com.java.study.algorithm.zuo.emiddle.class08; public class Code07_UniqueBST{ }
#! /usr/bin/python from imutils import paths import face_recognition import pickle import cv2 import os import logging logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO")) log = logging.getLogger(__name__) model = os.environ.get("MODEL", "hog") # hog or cnn def train(): # our images are located in the ...
<filename>src/main/java/org/gi/groupe5/Windows.java package org.gi.groupe5; public class Windows { //DASHBOARD public final static String MAINVIEW = "dashboard/Main"; public final static String LOGINVIEW = "dashboard/Login"; //Client public final static String CLIENTVIEW = "client/Client"; ...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-shuffled-N-VB/model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-shuffled-N-VB/512+0+512-N-first-256 --do_eval -...
<reponame>natashadsilva/build-ibmstreams module.exports = { parser: "babel-eslint", plugins: [ "babel", "flowtype" ], extends: [ "plugin:flowtype/recommended" ], rules: { // Disable strict warning on ES6 Components "strict": 0, "global-require": 0, "sort-imports": 0, //"react/jsx-indent-props": [2, "t...
<filename>opencga-storage/opencga-storage-mongodb/src/main/java/org/opencb/opencga/storage/mongodb/variant/DBObjectToSamplesConverter.java /* * Copyright 2015 OpenCB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obta...
#!/usr/bin/python3 import sys import json import argparse parser = argparse.ArgumentParser(description='') parser.add_argument('RESULT', help='chainer result file') parser.add_argument('--data',default="main/loss", help='source sentence list for validation') parser.add_argument('--cmd',default="max min avg", h...
<gh_stars>1-10 import { addedItemId, fakeItemList, fakeUser, newItemListAfterAddingNewItem } from '../../../test/fake-data' export function fetchIdsByType(type) { return Promise.resolve(Object.keys(fakeItemList)) } export function fetchItem (id) { return Promise.resolve(fakeItemList[id]) } export function watchLi...
#!/bin/bash set -e export SHELLOPTS # prepare gitbook ./node_modules/.bin/gitbook install # all files to the same date to reduce the amount of updated files after each new generation touch -t 201811111111.11 workshop/* # patch gitbook so START_TIME remains the same in the generated html #sed -i 's/var START_TIME = n...
<gh_stars>1-10 import home from "./components/home" export default [{ path: '/', component: home, name: 'home', // beforeEnter(to, from, next) { // if (!localStorage.getItem('inventory')) { // next(); // } else { // next('/sales'); // } // } }]
/** * @file CCFScrollableTabViewDelegate.h * @author <NAME> (www.cocoafactory.com) * * @date 2012-03-09 04:21:30 * @version 1.0 * * @note Copyright 2011 Cocoa Factory, LLC. All rights reserved */ @class CCFScrollableTabView; /** CCFScrollableTabViewDelegate This protocol describes the required met...
function sumOfEvenPages($startPage, $endPage) { $sum = 0; // Adjust startPage if it's odd to include the first even page if ($startPage % 2 != 0) { $startPage++; } // Calculate the sum of even pages within the range for ($i = $startPage; $i <= $endPage; $i += 2) { $sum += $i; ...
#!/bin/bash python TrainLogSpiral.py --batch_size=4096 --Vec_loss=1 --q_entropy=0.1 --lr=0.01 --save_dir='./output/0203/Fold4' --device='2' --epochs=200 --wandb --Foldstart=4 --Foldend=8 --data_path='./data/Multi_2dim_log_spiral' python TrainLogSpiral.py --batch_size=3072 --Vec_loss=1 --q_entropy=0.1 --lr=0.01 --save_...
#!/usr/bin/env bash # # Copyright 2012 HellaSec, LLC # # 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 ...
# The name of this experiment. name=$2 # Save logs and models under snap/gqa; make backup. output=/storage/$name mkdir -p $output/src cp -r src/* $output/src/ cp $0 $output/run.bash # See Readme.md for option details. CUDA_VISIBLE_DEVICES=$1 PYTHONPATH=$PYTHONPATH:./src \ python src/tasks/gqa.py \ --train tra...
<reponame>javisantos/paseto<filename>lib/v2/decrypt.js const { 'xchacha20-poly1305-decrypt': decrypt } = require('../help/crypto_worker') const { decode } = require('../help/base64url') const { PasetoDecryptionFailed, PasetoInvalid } = require('../errors') const assertPayload = require('../help/assert_payload') const c...
<filename>src/gui/file_views/SearchBar.cpp /** * @author <NAME> <<EMAIL>> * * @section LICENSE * See LICENSE for more informations. * */ #include <QIcon> #include "SearchBar.h" #include "ui_SearchBar.h" SearchBar::SearchBar(QWidget *parent) : QFrame(parent), ui(new Ui::SearchBar) { ui->setupUi(this);...
package com.ibm.socialcrm.notesintegration.files.utils; /**************************************************************** * IBM OpenSource * * (C) Copyright IBM Corp. 2012 * * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * *************************************************...
<reponame>Davidniw/chain-service<gh_stars>0 package blockchain import ( fcutil "github.com/hyperledger/fabric-sdk-go/pkg/util" api "github.com/hyperledger/fabric-sdk-go/api" "fmt" ) // QueryHello query the chaincode to get the state of hello func (setup *FabricSetup) QueryHello() (string, error) { // Prepare arg...
<gh_stars>1-10 import React from 'react'; import { Card, CardBody, CardHeader, Row, Col, TabContent, TabPane, CardTitle, CardText, Nav, NavItem, NavLink, ListGroupItem, FormGroup, Label, Input, Form, Badge, Button, Table, } from 'reactstrap'; import Page from 'components/Page...
#!/bin/sh python3 /app/training.py -w /mnt/data/raw/wiki/en/ -q /mnt/data/raw/stackexchange_questions.txt normalize python3 /app/training.py -w /mnt/data/raw/wiki/en/ -q /mnt/data/raw/stackexchange_questions.txt -n "stemming_" normalize stemm -l "en" python3 /app/training.py -w /mnt/data/raw/wiki/en/ -q /mnt/data/raw/...
<reponame>AmanPriyanshu/Bavardez import pandas as pd import numpy as np import json PATH = './config/' def read_all_intents(): df = pd.read_csv(PATH+'intents.csv') intents = df.to_dict('dict') intents = {key: [i for i in list(value.values()) if str(i)!='nan'] for key, value in intents.items()} return intents def...
<gh_stars>100-1000 import * as jsep from 'jsep'; import { Expression } from 'jsep'; export const name: string; export function init(this: typeof jsep): void; export interface NewExpression extends Expression { type: 'NewExpression'; arguments: Expression[]; callee: Expression; }
/* * Copyright 2019 NAVER Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
while [ true ] ; do curl -X POST http://192.168.33.22:8080/function/figlet -d '-=< PKS >=-' ; done
<gh_stars>1-10 // // Copyright 2021 <NAME> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or ...
<reponame>PhuongLe/clean-starter import { IUserRepository } from "../../application/repositories/IUserRepository"; import { Key } from "../../domain/entities/Key"; import { User } from "../../domain/entities/User"; const upnUser = new User({ id: "<EMAIL>", email: "<EMAIL>", password: "<PASSWORD>", challenge: "...
<filename>src/com/biniam/designpatterns/chainOfResponsibility/foobarmotorco/GeneralEmailHandler.java package com.biniam.designpatterns.chainOfResponsibility.foobarmotorco; /** * @author <NAME> */ public class GeneralEmailHandler extends AbstractEmailHandler { @Override protected String[] matchingWords() { retur...
import numpy as np def convert_to_double(y): cpu_y = np.asarray(y).astype(np.double) return cpu_y
<gh_stars>0 import axios from 'axios'; export const FETCHING_ACTIVITY_START = 'FETCHING_ACTIVITY_START'; export const FETCHING_ACTIVITY_SUCCESS = 'FETCHING_ACTIVITY_SUCCESS'; export const FETCHING_ACTIVITY_FAILURE = 'FETCHING_ACTIVITY_FAILURE'; export const DATE_SELECTED = 'DATE_SELECTED'; export const fetchActivity ...
/* * BDSup2Sub++ (C) 2012 <NAME>. * Based on code from BDSup2Sub by Copyright 2009 <NAME> (0xdeadbeef) * and Copyright 2012 <NAME> (mjuhasz) * * * 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...
package server import ( "crypto/tls" "encoding/json" "fmt" "io/ioutil" "net" "net/http" "os" "sync" "github.com/aukbit/pluto/v6/common" "github.com/aukbit/pluto/v6/discovery" "github.com/aukbit/pluto/v6/server/router" "github.com/rs/zerolog" "golang.org/x/net/context" "google.golang.org/grpc/health" he...
package org.larizmen.analysis.domain; import io.debezium.outbox.quarkus.ExportedEvent; import java.util.ArrayList; import java.util.List; import java.util.Optional; /** * Value object returned from an Order. Contains the Order aggregate and a List ExportedEvent */ public class OrderEventResult { private Order ...
$(function() { $("#contactForm input,#contactForm textarea").jqBootstrapValidation({ preventSubmit: true, submitError: function($form, event, errors) { // additional error messages or events }, submitSuccess: function($form, event) { event.preventDefault(); // prevent default submit behav...
<filename>FEBioFluid/FERealGas.cpp /*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2020 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted...
import React from 'react'; export class MyText extends React.Component { render() { return ( <div> This is the text I want to display. </div> ) } }
import { useEffect } from "react"; import { useRouter } from "next/router"; import { pageView } from "./gtag"; export function usePagesViews(): void { const router = useRouter(); useEffect(() => { const handleRouteChange = (url: URL): void => { if (!process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID) { r...
<reponame>jjhlzn/ContractApp_Android package com.jinjunhang.contract.controller; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.app.AppCompatActivity; import android.util.Log; import and...
import React from 'react'; import { Filter as CrudFilter, ReferenceInput, SelectInput } from 'rest-ui/lib/mui'; const Filter = ({ ...props }) => ( <CrudFilter {...props}> <ReferenceInput source="post_id" reference="posts"> <SelectInput optionText="title" /> </ReferenceInput> </CrudF...
#!/bin/bash #===- llvm/utils/docker/build_docker_image.sh ----------------------------===// # # The LLVM Compiler Infrastructure # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # #===---------------------------------------------------...
#!/bin/sh sudo `stack exec which fingerd`
#!/usr/bin/env bash main() { # """ # Install Apache Portable Runtime (APR) library. # @note Updated 2022-04-09. # # @seealso # - https://github.com/Homebrew/homebrew-core/blob/master/Formula/apr.rb # - macOS build issue: # https://bz.apache.org/bugzilla/show_bug.cgi?id=64753 # """ ...
<gh_stars>10-100 package org.googlielmo.cifar10scala import org.datavec.image.loader.CifarLoader import org.deeplearning4j.datasets.iterator.impl.CifarDataSetIterator import org.deeplearning4j.eval.Evaluation //import org.deeplearning4j.ui.api.UIServer //import org.deeplearning4j.ui.stats.StatsListener //import org.de...
<filename>src/utils/colorise.ts /** * List of ANSI escapes codes for colors */ export enum AnsiEscapesColors { BLACK = 90, RED = 91, GREEN = 92, YELLOW = 93, BLUE = 94, MAGENTA = 95, CYAN = 96, WHITE = 97 } /** * Prints a text in color * @param text {string} - The text to print * @p...
#!/bin/bash trap "rm server;kill 0" EXIT go build -o server ./server -port=8001 & ./server -port=8002 & ./server -port=8003 -api=1 & sleep 2 echo ">>> start test" curl "http://localhost:9999/api?key=Tom" & curl "http://localhost:9999/api?key=Tom" & curl "http://localhost:9999/api?key=Tom" & curl "http://localhost:999...
# Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the dataset dataset = pd.read_csv('stock_prices.csv') # Preprocessing the data # Convert the date column to datetime dataset['date'] = pd.to_datetime(dataset['date']) # Select the feature columns and target c...
<filename>snippety/src/main/java/com/fueled/snippety/span/HorizontalLineSpan.java package com.fueled.snippety.span; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.drawable.Drawable; import android.text.style.ReplacementSpan; /** * source: https://medium.com/@efemoney/i-drew-li...
package glutton import ( "bufio" "context" "fmt" "net" "strings" ) func readFTP(conn net.Conn, g *Glutton) (msg string, err error) { msg, err = bufio.NewReader(conn).ReadString('\n') if err != nil { g.logger.Error(fmt.Sprintf("[ftp ] error: %v", err)) } g.logger.Info(fmt.Sprintf("[ftp ] recv: %q", ...
#!/bin/bash # Check your password at haveibeenpwned.com # KH 2019 URL="https://api.pwnedpasswords.com/range" echo -n "Enter password (No echo): " read -s pw echo SHA1=$(echo -n "$pw" | sha1sum | awk '{print toupper($1)}') SHA5C=$(echo -n "$SHA1" | cut -c1-5); SHAREST=$(echo -n "$SHA1" | cut -c6-); RES=$(curl -A "M...
/** * Constants and static configuration used by the {@link SolrIndexInstaller} * * @author <NAME> * */ public final class IndexInstallerConstants { private IndexInstallerConstants() { /* do not create instances */} /** * The schema used for transformed resources. */ public static final St...
<gh_stars>1-10 const { clone } = require("../../utils"); const { getLocalBdnsEntryListExcludingSelfAsync, getHeadersWithExcludedProvidersIncludingSelf } = require("../../utils/request-utils"); function convertReadableStreamToBuffer(readStream, callback) { let buffers = []; readStream.on("data", (chunk) => buf...
#!/bin/bash ### Script to install frameworks ### # Any subsequent(*) commands which fail will cause the shell script to exit immediately set -e declare -a tests_frameworks=("github \"Quick\/Nimble\"" "github \"Quick\/Quick\"" "github \"uber\/ios-snapshot-test-case\"" "github \"ashfurrow\/Nimble-Snapshots\"") disabl...
#!/bin/bash # Run from directory containing SibeliaZ output directories # Creates CSV, with one line per maf2synteny "b" value per SibeliaZ "m" value, containing block length and total # Requires 2 flags: "s" should be set to the number of genomes in the sample, "p" should be set to the prefix of SibeliaZ # output di...
#!/bin/bash -e GH_BOM_BRANCH="7.5.x" GH_PROD_BRANCH="$GH_BOM_BRANCH-devel" GH_PROD_VERSION=$(curl -s https://raw.githubusercontent.com/redhat-developer/redhat-sso-boms/$GH_BOM_BRANCH/pom.xml | grep -m1 "<version>" | sed 's/<[^>]*>//g' | tr -d ' ') KEYCLOAK_VERSION=$(curl -s https://raw.githubusercontent.com/redhat-dev...
import os import scipy import numpy as np from ImageStatistics import UsefulImDirectory import scipy as sp import ast from bokeh.charts import Histogram, show import pandas as pd class Game(object): def __init__(self, gamefolder): self.gamefolder = os.path.abspath(gamefolder) file = open(os.path.jo...
export PATH=/usr/local/python3.7.5/bin:/usr/local/Ascend/ascend-toolkit/latest/atc/ccec_compiler/bin:/usr/local/Ascend/ascend-toolkit/latest/atc/bin:$PATH export PYTHONPATH=/usr/local/Ascend/ascend-toolkit/latest/atc/python/site-packages/:$PYTHONPATH export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/atc/li...
<gh_stars>10-100 /* mbed USBHost Library * Copyright (c) 2006-2013 ARM Limited * * 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 * * ...