text
stringlengths
1
1.05M
/* * __ ___ __ ____ __ __ * / |/ /__ _____/ /__ / _// /_/ / * / /|_/ / _ `/ __/ '_/_/ / / __/_/ * /_/ /_/\_,_/_/ /_/\_\/___/ \__(_) * * MIT License * * Copyright (c) 2021 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * ...
#!/usr/bin/env -S bash -euET -o pipefail -O inherit_errexit SCRIPT=$(readlink -f "$0") && cd $(dirname "$SCRIPT") # --- Script Init --- mkdir -p log rm -R -f log/* # --- Setup run dirs --- find output -type f -not -name '*summary-info*' -not -name '*.json' -exec rm -R -f {} + rm -R -f fifo/* rm -R -f work/* mkdir ...
<reponame>VICEMedia/bitmovin-javascript "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var urljoin = require("url-join"); var http_1 = require("../utils/http"); exports.thirdPartyLicensing = function (configuration, licenseId, httpClient) { var get = httpClient.get, post = httpClient.p...
#!/bin/bash #set -x OMXPLAYER_DBUS_ADDR="/tmp/omxplayerdbus.${USER:-root}" OMXPLAYER_DBUS_PID="/tmp/omxplayerdbus.${USER:-root}.pid" export DBUS_SESSION_BUS_ADDRESS=`cat $OMXPLAYER_DBUS_ADDR` export DBUS_SESSION_BUS_PID=`cat $OMXPLAYER_DBUS_PID` [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && { echo "Must have DBUS_SESSION_BU...
<reponame>ooooo-youwillsee/leetcode // // Created by ooooo on 2020/2/15. // #ifndef CPP_0094__SOLUTION2_H_ #define CPP_0094__SOLUTION2_H_ #include "TreeNode.h" #include <stack> #include <unordered_set> /** * iteration */ class Solution { public: vector<int> inorderTraversal(TreeNode *root) { if (!root) retu...
<gh_stars>1-10 #ifndef gl_LShaderProgram_h_ #define gl_LShaderProgram_h_ #include "gl/glLOpenGL.h" #include <stdbool.h> typedef struct { // program id GLuint program_id; } gl_LShaderProgram; /// /// Create a new shader program. /// /// \return Newly created gl_LShaderProgram returned as pointer to gl_LShaderProg...
#!/bin/bash # The last node in /alluxio/conf/workers is the master for under filesystem, # this is guaranteed by generation process of /alluxio/conf/workers in script vagrant/create. UFS_MASTER=$(tail -n1 /alluxio/conf/workers) cat >> /alluxio/conf/alluxio-env.sh << EOF ALLUXIO_MASTER_MOUNT_TABLE_ROOT_UFS="hdfs://${UF...
import java.sql.ResultSet; import java.sql.SQLException; public class TeamMapper implements RowMapper<Team> { @Override public Team mapRow(ResultSet resultSet, int rowNum) throws SQLException { Team team = new Team(); team.setId(resultSet.getInt("id")); team.setName(resultSet.getString(...
<reponame>vnunez85/easy-email<gh_stars>0 import React from 'react'; import { Padding } from '@/components/EmailEditor/components/ConfigurationPanel/components/AttributesManager/components/Padding'; import { Stack } from '@/components/UI/Stack'; import { TextDecoration } from '@/components/EmailEditor/components/Configu...
SELECT COUNT(*) FROM people WHERE zipcode = '90210'
<filename>src/ch13/ex5/ex135.java<gh_stars>0 package ch13.ex5; import java.io.*; import static java.lang.System.*; /** * Project: ch13.ex5 * Date: 2/26/2018 * * @author <NAME> */ public class ex135 { public void start() { final int BYTES_PER_REC = 3; final int LETTERS_TO_READ = 5; ...
# -*- coding: utf-8 -*- from app.api import create_app app = create_app() if __name__ == "__main__": import uvicorn uvicorn.run(app='main:app', host="0.0.0.0", port=8000,reload=True, debug=True)
<reponame>jayce-incognito/leapxpert-test-fe export interface IReducer {} const initialState: IReducer = {}; const reducer = ( state = initialState, action: { type: string; payload: any; }, ) => { switch (action.type) { case '': { return { ...state, ...
const path = require('path'); exports.onCreateWebpackConfig = ({ stage, rules, loaders, plugins, actions, }) => { if (stage === "build-html") { actions.setWebpackConfig({ resolve: { alias: { 'json-schema-faker': path.resolve(__dirname, 'node_modules/json-schema-faker/dist/main.c...
#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../macosx/sha1.sh" "${@}"
<gh_stars>0 var gameState=0; let form; var backgroundImg; var database,player; var wall33 function preload() { button = loadImage("button.png"); backgroundImg = loadImage("background.png"); wallpaper = loadImage("OIP.jpg"); bj = loadImage("bj.jpg") level1 = loadImage("level1.png") level2 = loadImage("level2.png") lev...
package io.opensphere.controlpanels.component.map.boundingbox; import static org.junit.Assert.assertEquals; import java.util.List; import java.util.Observer; import org.easymock.EasyMock; import org.easymock.EasyMockSupport; import org.junit.Test; import io.opensphere.core.math.LineSegment2d; import io....
#!/bin/sh inputFile="input.txt" previousMeasurement0=$(head -1 $inputFile) previousMeasurement1=$(head -2 $inputFile | tail -1) previousMeasurement2=$(head -3 $inputFile | tail -1) previousSum=$(($previousMeasurement0+$previousMeasurement1+$previousMeasurement2)) increaseCounter=0 for line in $(tail -n +4 $inputFile) ...
from typing import List def merge_sources(file_sources: List[str], resource_sources: List[str]) -> List[str]: return file_sources + resource_sources
sbcl --eval "(asdf:operate :build-op :site-generator)"
/* eslint-disable functional/no-return-void */ import test, { ExecutionContext } from 'ava'; import * as E from 'fp-ts/Either'; import * as O from 'fp-ts/Option'; import { pipe } from 'fp-ts/function'; import * as PR from 'io-ts/PathReporter'; import dayjs from './dayjs'; import { advanceStartDate, DiscoverGranule...
#include <vector> #include <string> #include <sstream> std::vector<int> parseString(const std::string& inputString) { std::vector<int> result; // parse input string std::stringstream ss(inputString); std::string item; while (std::getline(ss, item, ',')) { result.push_back(std::stoi(item)); } return result;...
#! /bin/bash . ~/.bashrc . ~/.lrgpaths output_file=$1 is_test=$2 host=${LRGDBHOST} port=${LRGDBPORT} user=${LRGDBROUSER} dbname=${LRGDBNAMETEST} if [[ -z ${is_test} || ${is_test} == 0 ]] ; then dbname=${LRGDBNAME} fi perldir=${LRGROOTDIR}/lrg-code/scripts/ echo "Dumping request data from the LRG database ..." per...
echo "I am in secondScript.sh file and the message from source.sh is: $MESSAGE"
<filename>comun/comun-dominio/src/main/java/com/ceiba/dominio/excepcion/ExcepcionTopeNumeroReservasFecha.java package com.ceiba.dominio.excepcion; public class ExcepcionTopeNumeroReservasFecha extends RuntimeException { private static final long serialVersionUID = 1L; public ExcepcionTopeNumeroReservasFecha(...
#!/usr/bin/env bash DATASET=$1 if [ "$DATASET" == "kinetics400" ] || [ "$1" == "kinetics600" ] || [ "$1" == "kinetics700" ] || [ "$1" == "kinetics700" ] || [ "$1" == "kinetics700_2020" ]; then echo "We are processing $DATASET" else echo "Bad Argument, we only support kinetics400, kinetics600 or kinetic...
use sicem; alter table Permisos add foreign key (IDusuario) references Usuario(ID); alter table Empleado add foreign key (DepartamentoID) references Departamentos(ID); alter table Producto add foreign key (CategoriaID) references Categoria(ID); alter table HistorialPrecioProducto add foreign key (ProductoID) refere...
#!/bin/bash if [ -f version ]; then export VERSION=$(cat version) else TIMESTAMP=$(date +%s) export VERSION="1.0.${TIMESTAMP//[$'\t\r\n']}" echo -n "$VERSION" > version fi export PROJECTNAME=ratelimit export REPLICON_GIT_BRANCH="$(git symbolic-ref HEAD --short 2>/dev/null)" if [ "$REPLICON_GIT_BRANCH" =...
function getCharAtIndex(str: string, index: number): string { if (index < 0 || index >= str.length) { return ""; } return str.charAt(index); } console.log(getCharAtIndex("Hello World", 5)); Output: "W"
<reponame>ArthemCo/SpeculativeDesign export function stripHTML(html) { // Bail out early in SSR environment if (typeof window === 'undefined' || !window.document) { return } let tmp = document.createElement('div') tmp.innerHTML = html return tmp.textContent || tmp.innerText || '' }
#!/bin/bash set -x set -e apt-get update # Java 8 apt-get install -y --no-install-recommends ca-certificates-java openjdk-8-jre-headless # Tomcat 8 apt-get install -y --no-install-recommends tomcat8 # Birt manual war mkdir -p /tmp/birt wget http://ftp.fau.de/eclipse/birt/downloads/drops/R-R1-4_5_0-201506092134/bir...
import type {NextApiHandler, NextApiRequest, NextApiResponse} from 'next'; import {DefaultResponse} from '../types/DefaultResponse'; import NextCors from 'nextjs-cors'; const corsPolicy = (handler: NextApiHandler) => async (req: NextApiRequest, res: NextApiResponse<DefaultResponse>) => { await NextCors(req...
const mathObject = { add: (a,b) => { return a + b; }, subtract: (a,b) =>{ return a - b; } };
import * as express from 'express' import * as bodyParser from 'body-parser' import { dialogflow, Permission, BasicCard, Image, Carousel, List} from 'actions-on-google' import { DataHandler } from './Persistence/DataHandler' import { utils } from './utils' const app = dialogflow({debug: true}) const dataHandler = ne...
<gh_stars>100-1000 //#region IMPORTS import type Pose from '../../armature/Pose'; import type { IKChain, IKLink } from '../rigs/IKChain'; import type { ISolver } from './support/ISolver'; import type { IKData } from '..'; import { Transform } from '../../maths'; import { vec3...
pm2 start ./bin/www --name "saltvis" --node-args="--max_old_space_size=8192"
import 'rxjs/add/observable/from'; import 'rxjs/add/observable/combineLatest'; import 'rxjs/add/operator/combineLatest'; import 'rxjs/add/operator/withLatestFrom'; import 'rxjs/add/operator/switchMap'; import 'rxjs/add/operator/merge'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/startWith'; import 'rxjs/...
#!/bin/bash echo "PATH=$PATH:$HOME/WebStorm-202.7319.49/bin/" >> ~/.bashrc
#!/bin/bash export SPARK_HOME=$SPARK_HOME export MASTER=local[4] export FTP_URI=$FTP_URI export ANALYTICS_ZOO_ROOT=$ANALYTICS_ZOO_ROOT export ANALYTICS_ZOO_HOME=$ANALYTICS_ZOO_ROOT/dist export ANALYTICS_ZOO_JAR=`find ${ANALYTICS_ZOO_HOME}/lib -type f -name "analytics-zoo*jar-with-dependencies.jar"` set -e echo "#1 st...
export default ({ palette, breakpoints, spacing }) => ({ container: { margin: 'auto', width: spacing.fullWidth, background: palette.secondary['500'], position: 'relative', }, foreground: { height: spacing.fullViewportHeight, width: spacing.fullWidth, zIndex: 0, margin: 'auto', ...
<reponame>EelaiWind/AIPoem package ai.exception; public class BopomofoException extends Exception{ /** * 處理從教育部國語辭典讀取注音時遇到例外情況 * 1. BopomofoException(String word) : * 找不到某個詞的注音 * 2. BopomofoException (String word,int wordLength, int bopomofoLength) * 注音跟詞的長度不符合,通常是有標點符號或是是有"ㄦ"出現時 */ private static f...
#!/bin/bash # +-----------------+ # | npm postinstall | # | @bugsounet | # +-----------------+ # get the installer directory Installer_get_current_dir () { SOURCE="${BASH_SOURCE[0]}" while [ -h "$SOURCE" ]; do DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" SOURCE="$(readlink "$SOURCE")" [[ $SOUR...
package com.jinjunhang.contract.controller; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.NavUtils; import android.support.v7.app.AppCompatActivity; import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; impo...
/** * Apache License * Version 2.0, January 2004 * http://www.apache.org/licenses/ * * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION * * 1. Definitions. * * "License" shall mean the terms and conditio...
package org.jooby.micrometer; import io.micrometer.prometheus.PrometheusMeterRegistry; import static org.easymock.EasyMock.expect; import org.jooby.MediaType; import org.jooby.Request; import org.jooby.Response; import org.jooby.Result; import org.jooby.test.MockUnit; import static org.junit.Assert.assertEquals; impor...
<filename>source/universal/pages/LoadingPage/index.js /* @flow */ import universal from 'react-universal-component' export default universal(() => import('./LoadingPage'))
#!/bin/sh echo " ###################################### ### Release test ## ###################################### " if [ "$MC_VERSION" = "" ]; then echo "\$MC_VERSION is not set. Useless test... Exiting." exit 0 fi # Check for command existence # See: https://ww...
#!/bin/sh # # This script configures my Node.js development setup. Note that # nvm is installed by the Homebrew install script. # # Also, I would highly reccomend not installing your Node.js build # tools, e.g., Grunt, gulp, WebPack, or whatever you use, globally. # Instead, install these as local devDepdencies on a p...
/* * */ package net.community.chest.jfree.jfreechart.plot.misc; import java.text.NumberFormat; import net.community.chest.dom.proxy.AbstractXmlProxyConverter; import net.community.chest.dom.transform.XmlValueInstantiator; import net.community.chest.jfree.jfreechart.plot.PlotReflectiveProxy; import net.community.che...
<reponame>Stravanni/ruler package RulER.DataStructure case class Rule(attribute: String, ruleType: String, threshold: Double) { def and(that: Rule): MatchingRule = { MatchingRule().addOrRule(List(this, that)) } def or(that: Rule): MatchingRule = { MatchingRule().addOrRule(List(this)).addOrRule((List(tha...
package main import "time" // track last time a user used a command, and the // last time a channel had a command used. Then // just see how much time has passed since then // to see if they are within the limit var ( userLastuse map[string]time.Time = make(map[string]time.Time) channelLastuse map[str...
1. Get smart with AI - Learn AI, fast! 2. Unlock the power of Artificial Intelligence. 3. Learn to become an AI master. 4. Become an AI innovator. 5. Create better AI solutions with AI training. 6. Thinking outside the box with AI. 7. Taking AI to the next level. 8. Redefine AI boundaries. 9. Stay ahead of the ...
def display_back_button(user_role: str) -> bool: if user_role == "admin": return True else: return False
/* * Copyright (c) 2010, <NAME> * All rights reserved. * * Made available under the BSD license - see the LICENSE file */ package sim.traffic; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; public class Trace { public ArrayList<TraceElement> ...
<reponame>noamt/uv-bot // Package uv provides utilities for measuring and reporting UV indices package uv
#!/bin/bash dotnet build \ --project ./HolisticWare.Xamarin.Tools.AndroidSampleProjectKreator.dotnet-tool/HolisticWare.Xamarin.Tools.AndroidSampleProjectKreator.dotnet-tool.csproj \ dotnet run \ --project ./HolisticWare.Xamarin.Tools.AndroidSampleProjectKreator.dotnet-tool/HolisticWare.Xamarin.Tools.Andro...
package com.messanger.data.database; import android.content.ContentValues; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; import com.messanger.data.model.Messages; ...
import numpy as np def identify_events(G, T_test, Time): event_indices = [] for i in range(G.shape[0]): tmp_idx = np.where((G[i, :] >= T_test[i]) & (G[i, :] >= Time))[0] event_indices.append((i, tmp_idx)) return event_indices
<reponame>rickgroen/cov-weighting<filename>utils/train_utils.py import numpy as np import os from config import EIGEN_PATH, CITYSCAPES_PATH def check_if_all_images_are_present(dataset, data_dir_path): set_names = ['train', 'val', 'test'] if dataset == 'kitti': data_set_path = EIGEN_PATH elif dat...
#!/usr/bin/env bash # # 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 "Licen...
import React from 'react'; import { AppRegistry, View, StyleSheet } from 'react-native'; import { AppLoading, Location, Permissions } from 'expo'; export default class LocationTracking extends React.Component { state = { location: null, errorMessage: null, }; componentWillMount() { this._getLocation...
#!/bin/bash -e # Copyright (c) Facebook, Inc. and its affiliates. # cd to detectron2 project root cd "$(dirname "${BASH_SOURCE[0]}")/.." { black --version | grep -E "21\." > /dev/null } || { echo "Linter requires 'black==21.*' !" exit 1 } ISORT_VERSION=$(isort --version-number) if [[ "$ISORT_VERSION" != 4.3* ]...
#!/bin/tcsh -f foreach d ( ../../evt/*_cl ) set base=`ls -1 $d/ | head -1 | sed 's/xi.*//'` set name=`echo $d | sed 's/_cl//' | sed 's/..\/..\/evt\///'` echo "name=$name, base=${base}" foreach i ( 0 1 3 ) #foreach i ( 0 1 2 3 ) #foreach e ( 1 ) foreach e ( 1 2 3 4 5 ) #set ph_lo = ( 109 ) ...
import pandas as pd # Create a dataframe from the input data df = pd.DataFrame([ {"customer_id": 1, "month": 1, "amount": 40000}, {"customer_id": 2, "month": 1, "amount": 10000}, {"customer_id": 3, "month": 1, "amount": 20000}, {"customer_id": 1, "month": 2, "amount": 30000}, {"customer_id": 2, "mo...
#!/bin/sh SCRIPTS_PATH=$1 ROOT_FOLDER=$2 SRC_LANG=$3 TGT_LANG=$4 cd "${ROOT_FOLDER}/${SRC_LANG}-${TGT_LANG}" # tokenize training dev and test set for kind in train dev test do $SCRIPTS_PATH/moses-tokenize.sh \ $SRC_LANG \ "${kind}/${kind}.${SRC_LANG}" \ "${kind}/${kind}.tok.${SRC_LANG}" ...
<gh_stars>0 # coding=utf-8 from .. import BaseProvider import itertools class Provider(BaseProvider): """ This provider is a collection of functions to generate personal profiles and identities. """ def simple_profile(self, sex=None): """ Generates a basic profile with personal info...
<gh_stars>0 (function (win, doc, undefined) { win.toaster = function(message, type) { var toaster = $("#toaster"); toaster.append('<div class="toast-item"><div class="message">' + message + '</div>' + '<i class="close fa fa-close"></i></div>'); var thisItem = toaster.children()....
declare module "*.mdx" { let MDXComponent: (props) => preact.JSX.Element; export default MDXComponent; export const metadata: { title: string; author: string; tags: string[]; timestamp: Date; }; }
npm install node ./node_modules/bower/bin/bower update node ./node_modules/gulp/bin/gulp.js build node ./node_modules/gulp/bin/gulp.js manifest
from typing import Tuple def scale_point(p: Tuple[float, float], scale: float) -> Tuple[float, float]: x, y = p # Extracting the coordinates scaled_x = x * scale # Scaling the x-coordinate scaled_y = y * scale # Scaling the y-coordinate return scaled_x, scaled_y # Returning the scaled point as a tu...
#!bin/bash # Convert dicom-like images to nii files in 3D # This is the first step for image pre-processing # Feed path to the downloaded data here DATAPATH=./MR # please put chaos dataset training fold here which contains ground truth # Feed path to the output folder here OUTPATH=./niis if [ ! -d $OUTPATH/T2SPIR ]...
package org.glamey.training.spring.loading; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean; /** * @author zhouyang.zhou. 2017.08.30.16. */ public class ScopeDemo implements InitializingBean, DisposableBean { private String message; public void...
<reponame>tellery/blockchain-spark<filename>java/src/test/java/io/iftech/sparkudf/hive/DecodeContractEventHiveUDFTest.java package io.iftech.sparkudf.hive; import static org.junit.Assert.assertEquals; import com.google.common.collect.ImmutableList; import com.google.gson.Gson; import com.google.gson.GsonBuilder; impo...
#!/bin/sh # ensure libpcap is installed package=libpcap if [ $1 = "mac" ]; then brew install libpcap elif [ $1 = "linux" ]; then apt_cmd=$(which apt-get) # Debian based distro pacman_cmd=$(which pacman) # Arch based distro yum_cmd=$(which yum) # Red Hat based distro zypper_cmd=$(which zypper) # O...
#! /bin/bash rm -f logfile.txt rm -rf tmp/ mongo --quiet localhost:45555/db --eval 'db.dropDatabase()'
// User class definition class User { private String name; public User(String name) { this.name = name; } public String getName() { return name; } } // QuizScorer class definition class QuizScorer { private Integer score; private User user; public QuizScorer(User user...
<gh_stars>1-10 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source...
<reponame>mdcarter/nextlaunch.io const { send } = require('micro') const fetch = require('node-fetch') const { redis } = require('../connectors') const orbits = { 'ISS': 'International Space Station', 'LEO': 'Low Earth', 'PO': 'Polar', 'GTO': 'Geosynchronous Transfer' } module.exports = async (_, res) => { ...
<?php // Define the RepositoryInterface interface RepositoryInterface { public function apply($model); } // Implement a class that implements the RepositoryInterface class SampleRepository implements RepositoryInterface { public function apply($model) { // Implement a meaningful operation using the $mo...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+512+512-shuffled/7-model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+512+512-shuffled/7-1024+0+512-SS-256 --do_eval --per_d...
def findPair(lst, target): for i in range(0, len(lst)): for j in range(i + 1, len(lst)): if lst[i] + lst[j] == target: return print(lst[i],",", lst[j]) list = [2, 4, 6, 8] target = 10 findPair(list, target)
package chengweiou.universe.leob.model; import chengweiou.universe.blackhole.model.RestCode; public enum ProjectRestCode implements RestCode { EXISTS, ; }
<filename>src/templates/PostListTemplate.tsx<gh_stars>0 import React from "react"; import Layout from "../components/Layout"; import SEO from "../components/Seo"; import Profile from "../components/Profile"; import Categories from "../components/Categories"; import PostList from "../components/PostList"; import { IPost...
/* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.userinterface.uichassis.springboot; import org.odpi.openmetadata.accessservices.assetcatalog.AssetCatalog; import org.odpi.openmetadata.accessservices.glossaryview.client.GlossaryViewClient;...
<filename>resources/assets/api/payment.js<gh_stars>0 PagSeguroDirectPayment.setSessionId(document.querySelector("[name='session_id']").value); var items = Payment.getItems(); var auth = Payment.getAuth(); auth = JSON.parse(auth); items = JSON.parse(items); $.ajax({ method: 'POST', url: '/pagseguro/generate_order', ...
public class ServerManager { private Cluster cluster; private Policy policy; public ServerManager(Cluster cluster, Policy policy) { this.cluster = cluster; this.policy = policy; } }
<reponame>mspnp/vnet-integrated-serverless-microservices import { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios"; import * as HttpStatus from "http-status-codes"; import { URL } from "url"; import { AppInsightsService, IDependencyTelemetry } from "./app-insights/app-insights-service"; impor...
import React, { BaseSyntheticEvent, useContext } from 'react'; import { CONTEXT_CONFIG } from '../../../../contexts/constants'; import TweetsContext from '../../../../contexts/TweetsContext'; /** * Function to define the LastSearchs component. It is used to display and manage the last user searches. * @returns The R...
#!/bin/bash pid=$(ps -ef | grep 'demo' | grep -v grep | awk '{print $2}') kill -9 $pid || echo 无服务
import librosa import numpy as np def process_audio_data(data): for label, waveforms in data.items(): vectors = [] for wave in waveforms: # Downsampling downsampled_wave = wave[::3] # Compute MFCC mfcc = librosa.feature.mfcc(downsampled_wave, sr=16000...
<reponame>akokhanovskyi/kaa<filename>avrogen/src/main/java/org/kaaproject/kaa/avro/avrogen/compiler/Compiler.java /* * Copyright 2014-2016 CyberVision, 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...
#!/bin/bash # Yet Another UserAgent Analyzer # Copyright (C) 2013-2019 Niels Basjes # # 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 ...
class Polygon: def __init__(self, num_of_sides): self.number_of_sides = num_of_sides self.sides = [0 for i in range(num_of_sides)] def input_sides(self, sides): self.sides = sides def perimeter(self): peri = 0 for side in self.sides: peri += side ...
#!/bin/bash # Local variables origDir="`pwd`" ; enableFileName=${origDir}/enable ; # Fetch the VIM repository if ! test -d vim ; then git clone https://github.com/vim/vim.git else pushd ./ ; cd vim ; make clean ; git pull ; popd ; fi # Configure # Run # $./configure --help # to see all options c...
# Generated by Django 2.2.3 on 2019-08-29 22:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('snakepy', '0001_initial'), ] operations = [ migrations.CreateModel( name='YourSecondModelNameHere', fields=[ ...
#!/bin/bash go get -u github.com/golang/lint/golint cd $GOPATH/src/github.com/golang/lint go install .
/* * Copyright 2016 NIIT Ltd, Wipro 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 requi...
package com.qtimes.pavilion.status; /** * Author: JackHou * Date: 2020/4/21. */ public enum FuncStatus { RESOLVED(0, "保留"), OPEN(1, "开启"), CLOSE(2, "关闭"); int code; String desc; FuncStatus(int mCode, String mDesc) { code = mCode; desc = mDesc; } public int getCode(...
#!/bin/bash # pbs launching script: #PBS -N cuda_dp_knapsack #PBS -q gpu #PBS -l walltime=2:00:0 #PBS -l nodes=1:ppn=8 module load cuda cd $PBS_O_WORKDIR set CONV_RSH = ssh echo -n "Start: " date INSTANCE=instances/gen.3.500.500.88 #INSTANCE=instances/gen.4.500.500.58 #INSTANCE=instances/gen.1.500.500.10 time ...
#!/bin/bash if [ "$#" -eq 1 ]; then outputPath="$1/doc3d" else outputPath="$HOME/Downloads/doc3d" fi if ! [ -x "$(command -v wget)" ]; then echo "Error!: wget is not installed! Please install it and try again" exit 1 fi echo -e "\n### ------------------------------------------------------- ###\n" ech...