text
stringlengths
1
1.05M
<filename>src/modules/knowledgeBase/containers/knowledge/index.js import KnowledgeForm from './KnowledgeForm'; import KnowledgeList from './KnowledgeList'; export { KnowledgeForm, KnowledgeList };
<gh_stars>100-1000 /** * This program uses Selenium to run a Stopify benchmark in a browser. * * There are a few steps involved: * * 1. We serve the dist/ directory and the directory containing the benchmark * on port 9999. * * 2. We use Selenium to start a browser (in headless mode, if we know how). * * 3...
<reponame>Goxiaoy/go-saas-kit<filename>pkg/kratos/kratos.go package kratos import ( "context" "github.com/go-kratos/kratos/v2/transport" "github.com/go-kratos/kratos/v2/transport/http" http2 "net/http" ) func ResolveHttpRequest(ctx context.Context) (*http2.Request, bool) { if t, ok := transport.FromServerContext...
#!/bin/bash RANDOM_SIZES=256 PRUNE=0 TEST=0 SCHED=lws NPROWS=1 NPCOLS=1 NUM_BLOCKS=32 STARPU_NCPU=2 BLOCK_SIZE=256 sbatch -c 32 -n 1 run_cholesky.sh RANDOM_SIZES=256 PRUNE=0 TEST=0 SCHED=lws NPROWS=1 NPCOLS=1 NUM_BLOCKS=64 STARPU_NCPU=2 BLOCK_SIZE=256 sbatch -c 32 -n 1 run_cholesky.sh RANDOM_SIZES=256 PRUNE=0 TEST=...
<reponame>vaskoz/jruby /* * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved. This * code is released under a tri EPL/GPL/LGPL license. You can use it, * redistribute it and/or modify it under the terms of the: * * Eclipse Public License version 1.0 * GNU General Public License version 2...
// Assuming the user's password is stored in a variable named "userPassword" String userPassword = "user123password"; // Setting the user's password for authentication .setLoginEndpoint(server + SymptomSvcApi.TOKEN_PATH) .setUsername(user) .setPassword(userPassword) // Setting the user's password .setClientId(SymptomV...
#!/bin/sh sed -i \ -e 's/rgb(0%,0%,0%)/#353b45/g' \ -e 's/rgb(100%,100%,100%)/#b6bdca/g' \ -e 's/rgb(50%,0%,0%)/#282c34/g' \ -e 's/rgb(0%,50%,0%)/#c678dd/g' \ -e 's/rgb(0%,50.196078%,0%)/#c678dd/g' \ -e 's/rgb(50%,0%,50%)/#3e4451/g' \ -e 's/rgb(50.196078%,0%,50.196078%)/#3e4451/g' \ ...
package ru.autometry.obd.exception; /** * Created by jeck on 14/08/14 */ public class OBDAdaptationException extends OBDException { public OBDAdaptationException(String cause) { super(cause); } }
import React from 'react' import {connect} from 'react-redux' import {updateEmail} from '../store/user' class Profile extends React.Component { constructor() { super() this.state = { oldEmail: '', newEmail: '' } this.handleChange = this.handleChange.bind(this) this.handleSubmit = this...
save_path=/path/to/save/folder/ data_path=/path/to/data/folder/ OMP_NUM_THREADS=2 CUDA_VISIBLE_DEVICES=0,1 python3.6 -u ./train_free.py \ --random_seed 10 \ --net sngan_imgnet128 \ --dim_z 128 \ --img_c 3 \ --fm_base_d 64 --fm_base_g 64 \ --n_classes 1000 \ --num_bp 1 \ --r_batch_size 64...
#! /bin/sh # TSO login script, to be run via the x3270 Script() action. # sh version set -x me=`echo $0 | sed 's/.*\///'` # Make sure we're in the right environment. if [ -z "$X3270INPUT" -o -z "$X3270OUTPUT" ] then echo >&2 "$me: must be run via the x3270 Script() action." exit 1 fi # Set up login parameters tcp_h...
<gh_stars>0 package io.mainframe.hacs.log_view; import android.os.Bundle; import android.os.Environment; import android.preference.PreferenceManager; import android.support.design.widget.TabLayout; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.view.MenuItem; i...
export default { elem: 'svg', attrs: { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 32 32', width: 20, height: 20, }, content: [ { elem: 'circle', attrs: { cx: '9', cy: '7', r: '1' } }, { elem: 'path', attrs: { d: 'M27 22.14V18a2 2 0 0 0-2-2h-8v-4h9a2 ...
package com.example.searchapidemo; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.content.res.Configuration; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.util.Log; import android.view.MenuItem; import andro...
#!/bin/bash #------------------------------------------------------------------------------- # Copyright 2017 Congduc Pham, University of Pau, France. # # Congduc.Pham@univ-pau.fr # # This file is part of the low-cost LoRa gateway developped at University of Pau # # This program is free software: you can redistribute...
/** * */ package net.abi.abisEngine.rendering.mesh; import java.util.HashMap; import net.abi.abisEngine.rendering.asset.AssetI; /** * Contains the reference count to the mesh along with the size of the indices * and VAOID and MeshData. * * @author abinash * */ public class MeshResource implements AssetI { ...
package it.unical.mat.map_generator; import java.util.Random; import it.unical.mat.util.ConfigurationFile; import tools.Utils; import tracks.ArcadeMachine; public class Main { public static void main(String[] args) throws Exception { ConfigurationFile configurationFile = new ConfigurationFile(); MapGenerator ...
class Request { setRequest (request) { this.request = request } getRequest () { return this.request } } const request = new Request module.exports = request module.exports.Request = function () { return request.getRequest() }
#! /bin/bash # -o, --bibliography=, --csl=, -M enable-upload=true/false execdir="`dirname $0`" settingsdir="${execdir}/../settings" filterdir="${execdir}/../filter" function usage { cat <<EOF convert LaTeX source to HTML with syntax provided by hatenablog.com Usage: $(basename ${0}) [options] INPUT.tex ...
# utils.py def calculate_average(numbers): """ Calculate the average of a list of numbers. Args: numbers (list): A list of numbers. Returns: float: The average of the input numbers. """ if not numbers: return 0 return sum(numbers) / len(numbers) def find_max(numbers): ...
import { Container, makeStyles, Paper } from "@material-ui/core"; import React, { useEffect, useState } from "react"; import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import Typography from "@material-ui/core/Typography"; import URL_API_KEY from "../../../API_KEY/API_K...
import requests from bs4 import BeautifulSoup url = 'https://example.com' response = requests.get(url) if response.status_code == 200: html = response.content soup = BeautifulSoup(html, 'html.parser') data = soup.find_all('p') for paragraph in data: print(paragraph.text)
<filename>project/gardener/src/main/java/kr/co/gardener/admin/dao/object/TopClassDao.java package kr.co.gardener.admin.dao.object; import java.util.List; import kr.co.gardener.admin.model.object.TopClass; import kr.co.gardener.admin.model.object.list.TopClassList; import kr.co.gardener.main.vo.TopClassVO; import kr.c...
const stub = { __packager_asset: true, fileSystemLocation: '/full/path/to/directory', httpServerLocation: '/assets/full/path/to/directory', width: 100, height: 100, scales: [1, 2, 3], hash: 'nonsense', name: 'icon', type: 'png', }; jest.mock('react-native/Libraries/Image/RelativeImageStub', stub) m...
package cryptoutil import ( "crypto/x509" "encoding/pem" "os" ) // ReadCertificateFile reads a certificate PEM file. func ReadCertificateFile(path string) ([]*x509.Certificate, error) { data, err := os.ReadFile(path) if err != nil { return nil, err } return ParseCertificatePEM(data) } // ParseCertificatePEM...
from typing import List from myapp.models import Post, Tag def tag_post(post: Post, tag_names: List[str]) -> None: for tag_name in tag_names: tag, created = Tag.objects.get_or_create(name=tag_name) post.tags.add(tag)
<filename>src/utils/hasAccessibleChild.js const getElementType = require("./getElementType"); const isHiddenFromScreenReader = require("./isHiddenFromScreenReader"); const hasAccessibleChild = (node, accessibleChildTypes = []) => node.children.some((child) => { switch (child.type) { case "VText": r...
<filename>packages/react-integration/cypress/integration/descriptionlistbreakpoints.spec.ts<gh_stars>100-1000 describe('Description List Breakpoints Demo Test', () => { it('Navigate to demo section', () => { cy.visit('http://localhost:3000/description-list-breakpoints-demo-nav-link'); }); it('Verify 1Col mod...
/* * Copyright (c) 2015, Freescale Semiconductor, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * o Redistributions of source code must retain the above copyright notice, this list...
from pyspark.sql import SparkSession from pyspark.sql.functions import sum, col def find_max_destination_flights(flightData2015): max_flights = flightData2015.groupBy("DEST_COUNTRY_NAME").agg(sum("count").alias("total_flights")) \ .orderBy(col("total_flights").desc()).first() return max_flights["DEST_C...
#!/bin/bash PROJECT=$(gcloud config list project 2>/dev/null | grep = | sed "s/^[^=]*= //") # Leave this variable blank if you want to enable doing all tasks at once #DISABLE_ALL_TASK=1 splitter(){ i=$(tput cols) while [ $i -gt "0" ]; do echo -n = i=$(($i - 1)) done echo "" } pause(){ ...
<filename>src/containers/Account/ResetPasswordForm/index.js<gh_stars>1-10 import React, { PureComponent } from 'react' import { connect } from 'react-redux' import ResetPasswordForm from 'components/forms/ResetPassword' import { updateForm, updateFormError, resetForm, changePassword } from 'actions/account/R...
#!/bin/bash # author: Martin Liu # url:martinliu.cn #指定安装的版本 elastic_version='7.8.1' #开始安装流程 echo "Provisioning a Elasticsearch "$elastic_version" Server..." sudo date > /etc/vagrant_provisioned_at #配置 ES 需要的操作系统参数 sudo swapoff -a sudo sysctl -w vm.max_map_count=262144 sudo sysctl -p sudo sh -c "echo 'elasticsearch ...
import string import random def random_password(): """Function to generate a random password""" characters = string.ascii_letters + string.digits password = ''.join(random.choice(characters) for i in range(8)) return password password = random_password() print(password)
<reponame>palantir/godel-refreshables-plugin<filename>config/config.go // Copyright (c) 2021 <NAME> Inc. All rights reserved. // Use of this source code is governed by the Apache License, Version 2.0 // that can be found in the LICENSE file. package config import ( "io/ioutil" v0 "github.com/palantir/godel-refresh...
<filename>mvp_tips/CPUID/CPUID/InfoDisplay.cpp // InfoDisplay.cpp : implementation file // #include "stdafx.h" #include "InfoDisplay.h" // CInfoDisplay IMPLEMENT_DYNAMIC(CInfoDisplay, CWnd) CInfoDisplay::CInfoDisplay() { } CInfoDisplay::~CInfoDisplay() { } BEGIN_MESSAGE_MAP(CInfoDisplay, CWnd) ON_MESSAGE(WM_...
import React from 'react'; import { CodeEditor, Language } from '@patternfly/react-code-editor'; import { Checkbox } from '@patternfly/react-core'; export const CodeEditorBasic: React.FunctionComponent = () => { const [isDarkTheme, setIsDarkTheme] = React.useState(false); const [isLineNumbersVisible, setIsLineNumb...
import { Class } from '../wrserver'; export class Decorator { protected decorators: any[] = []; constructor(protected parameters: any[]){ } protected apply(...args: any[]): any{ return this.decorators.map(d => typeof d == 'function' ? d.apply(this, args) : d); } protected mixin(derived: Class, base: Cl...
<gh_stars>0 const path = require('path'); const Generator = require('yeoman-generator'); const utils = require('./utils'); const currentDir = path.basename(process.cwd()); module.exports = class extends Generator { constructor(args, opts) { super(args, opts); this.argument('addonName', { type: String,...
#!/usr/bin/env bash #SBATCH --cluster=gpu #SBATCH --gres=gpu:1 #SBATCH --partition=gtx1080 #SBATCH --account=hdaqing #SBATCH --job-name=one2seq-rnn-length_reverse-kp20k #SBATCH --output=slurm_output/one2seq-rnn-length_reverse-kp20k.out #SBATCH --nodes=1 #SBATCH --ntasks-per-node=1 #SBATCH --cpus-per-task=1 #SBATCH --m...
package pulse.search.statistics; import static pulse.properties.NumericProperties.derive; import static pulse.properties.NumericPropertyKeyword.OPTIMISER_STATISTIC; import pulse.tasks.SearchTask; /** * The standard optimality criterion of the L2 norm condition, or simply * ordinary least squares. * */ public cla...
<filename>src/app/hm-admin/services/schema/schema.service.mock.ts import { Injectable } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; import { EntryPoint } from '../models/EntryPoint'; import { Model } from '../models/Model'; @Injectable() export class MockSchemaService { schema: BehaviorSubject<any...
// server.js const express = require('express'); const app = express(); const port = 3000; const items = [ { id: 1, name: 'Apples', price: 0.50 }, { id: 2, name: 'Bananas', price: 0.80 }, { id: 3, name: 'Strawberries', price: 1.50 }, ]; app.get('/items', (req, res) => { // Return a list of all items res.json(it...
<gh_stars>0 const { TransactionImpl } = require('../dist/index') const SYMBOL_START = Symbol('start') const SYMBOL_END = Symbol('end') const testModelSync = new TransactionImpl({ initial: [ctx => (ctx.ret = SYMBOL_START)], close: [ctx => (ctx.ret = SYMBOL_END)] }) const testModelAsync = new TransactionImpl({ in...
import { Buyer as IBuyer, BuyerPOJO } from "../../public"; import { ContactInfo, ContactInfoBase, hideAndFreeze, Identifiers, Joi, _internal } from "../common"; export class Buyer extends ContactInfoBase implements IBuyer { public static readonly [_internal] = { label: "buyer", schema: ContactInfo[_internal]...
<filename>frontend/components/plugins.ts import * as ko from 'knockout'; import * as CodeMirror from 'codemirror'; import * as hljs from 'highlight.js'; import * as select2 from 'select2'; //import 'select2'; import 'knockout-switch-case'; import * as MarkdownIt from 'markdown-it'; import JSONEditor, {JSONEditorMode} f...
# Autoenv AUTOENV_ENABLE_LEAVE="yes" #source ~/.autoenv/activate.sh
import React from 'react' import "./Cabecalho.scss" export default function index(props) { return ( <header> <nav></nav> </header> ) }
<filename>packages/amplication-client/src/VersionControl/PendingChange.tsx import React from "react"; import { Tooltip } from "@amplication/design-system"; import classNames from "classnames"; import { Link } from "react-router-dom"; import * as models from "../models"; import "./PendingChange.scss"; const CLASS_NAME...
#!/bin/bash -xe # Copyright (C) 2014 Hewlett-Packard Development Company, L.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 the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
/* * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved. This * code is released under a tri EPL/GPL/LGPL license. You can use it, * redistribute it and/or modify it under the terms of the: * * Eclipse Public License version 1.0 * GNU General Public License version 2 * GNU Lesser General Public...
<gh_stars>100-1000 import * as React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import { Container } from '@material-ui/core'; export function CenteredColumn(props: any) { const classes = useStyles(); return ( <div className={classes.centered}> <Container maxWidth={props.maxWid...
/******************************************************************************* * Copyright (c) 2001-2014 <NAME> and Robocode contributors * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution...
#!/bin/bash # Copyright 2017, 2019, Oracle Corporation and/or affiliates. All rights reserved. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl git clone https://github.com/kubernetes-sigs/metrics-server.git /tmp/metricserver cd /tmp/metricserver #kubectl create ...
#!/usr/bin/env bash exe_dir="/data/local/tmp/bin" work_dir=$(pwd) os=android abi=armv8 lang=gcc function print_usage { echo "----------------------------------------" echo -e " ./push2device.sh --arm_os=<os> --arm_abi=<abi> --arm_lang=<lang>" echo -e "--arm_os:\t android, only support android now" e...
#!/usr/bin/env bash docker build -t tabhid/explore .
#!/bin/bash . ./script/common.sh PGCONFIG=${CONFIG_DIR}/postgresql-logstore.conf RELOAD_DELAY=3 STORE_DELAY=1 trap stop_all_database EXIT echo "/*---- Initialize repository DB ----*/" setup_repository ${REPOSITORY_DATA} ${REPOSITORY_USER} ${REPOSITORY_PORT} ${REPOSITORY_CONFIG} echo "/*---- Initialize monitored i...
<filename>src/pages/login.tsx<gh_stars>1-10 import { GetServerSideProps, NextPage } from 'next'; import Link from 'next/link'; import Head from 'next/head'; import { useRouter } from 'next/router'; import { useMemo } from 'react'; import Layout from '../components/ResidentLayout'; type LoginProps = { appUrl: string; f...
<filename>es/types/reply.py from elasticsearch_dsl import ( DocType, MetaField, String, ) from ..analysis import ( luno_english, raw_analyzer, shingle_analyzer, ) class ReplyV1(DocType): title = String(analyzer=luno_english) titleV2 = String( analyzer=luno_english, fie...
#!/usr/bin/env python import numpy as np from scipy.interpolate import interp1d def daylightCCT_2_xy(cct): """ Calculate CIE xy chromaticity coordinates for CIE daylight from the Correlated Color Temperature. Parameters ---------- cct : numeric Correlated Color Temperature. Retu...
<gh_stars>0 const router = require('express').Router(); const auth = require('../middleware/auth'); const ToDo = require('../models/todo.model'); router.post("/", async(req,res) => { try{ const { title } = req.body; if(!title) return res.status(400).json({msg: "Not all fields have been...
package ru.zzz.demo.sber.shs.service.impl; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import ru.zzz.demo.sber.shs.CircuitBreaker.device.DeviceCircuitBreaker; import ru.zzz.demo.sbe...
<reponame>mongodb/docs-screencapture-tool 'use strict'; const screenshotNames = ['clusterselect2.png']; const screenshotDir = './screenshots-temp'; const origImageDir = './source/images'; exports.run = async function (options) { const nightmare = options.nightmare; const originalPath = `${origImageDir}/${screenshot...
#!/bin/bash function func_init_logging(){ # generate a random 12 char string random_str=$(uuidgen | sed 's/-//g' | cut -c 1-12) log_folder="/var/log/swarm-test/$random_str" mkdir -p "$log_folder" dtl_log_file="$log_folder/details.log" summary_log_file="$log_folder/summary.log" } function func...
export default { id: { type: String, required: true }, title: { type: String, required: true } }
/* * Copyright [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://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
<filename>boot-jpa-jwt/src/main/java/cn/crabapples/system/service/UserService.java package cn.crabapples.system.service; import cn.crabapples.system.entity.SysUser; import cn.crabapples.system.form.UserForm; import javax.servlet.http.HttpServletRequest; import java.util.List; /** * TODO 用户相关服务 * * @author Mr.He ...
<gh_stars>0 from typing import Dict from typing import Optional from ddtrace.internal import agent from ddtrace.internal.dogstatsd import get_dogstatsd_client class Metrics(object): """Higher-level DogStatsD interface. This class provides automatic handling of namespaces for metrics, with the possibilit...
#!/usr/bin/env sh # This scripts downloads the CIFAR10 (binary version) data and unzips it. DIR="$( cd "$(dirname "$0")" ; pwd -P )" cd $DIR echo "Downloading..." wget --no-check-certificate http://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz echo "Unzipping..." tar -xf cifar-10-binary.tar.gz && rm -f cifar-10-...
#!/usr/bin/env bash scp -r certs/ $1:/root/docker-wikijs/certs/ scp .env $1:/root/docker-wikijs/.env
<filename>electron/renderer-backend/src/index.ts import { sendToFrontend } from "./message-bus"; // initialize the message bus // setup the FE route sendToFrontend({ type: "frontend_set-route", payload: "START_PAGE" });
<reponame>mindscms/upload-space require('./bootstrap'); import confetti from "canvas-confetti"; Livewire.on('confetti', () => { confetti({ particleCount: 80, speard: 200, origin: {y: 0.6} }); });
<gh_stars>0 import { useEffect, useState, useCallback, useMemo } from 'react'; import request from 'axios'; import './App.css'; import { useRef } from 'react/cjs/react.production.min'; function App() { const [mons, setMons] = useState([]) const [selected, setSelected] = useState(null); const [update, setUpdate]...
<reponame>ColFusion/PentahoKettle package org.rzo.netty.ahessian.rpc.server; import java.util.Date; import java.util.HashMap; import java.util.Map; import org.rzo.netty.ahessian.Constants; import org.rzo.netty.ahessian.rpc.message.HessianRPCCallMessage; import org.rzo.netty.ahessian.rpc.message.HessianRPCRepl...
#!/bin/bash # setup ssh certificate USSH=$HOME/.ssh mkdir -p $USSH ssh-keygen -t rsa -N '' -f $USSH/ci_id_rsa cat >> $USSH/config <<EOF Host localhost StrictHostKeyChecking no EOF # Allow User CI key to login as root sudo bash <<EOF mkdir -p /root/.ssh cat $USSH/ci_id_rsa.pub >> /root/.ssh/authorized_keys chmod g-r...
#!/bin/sh set -e echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then local source="${BUILT_PRO...
<gh_stars>0 package com.gmail.gustgamer29.util.expiring; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.TimeUnit; /** * Map with expiring entries. Following a configured amount of time after * an entry has been inserted, the map will act as if the entry does not * ...
import React from 'react'; class Game extends React.Component { // initial state of the game state = { board: [], score: 0 }; // define the size of the game board boardSize = 9; // generate a random game board generateBoard() { let board = []; // generate a random board while (board.length < this.boardSize...
import cv2 def process_image(im, args, im_size_max): if not args.crop == "True": # scale down if bigger than max size re_scale = (float(args.max_edge) / float(im_size_max)) im = cv2.resize(im, None, None, fx=re_scale, fy=re_scale, interpolation=cv2.INTER_LINEAR) ...
#!/bin/bash stty erase ^H export PS1='[\u@\h \W]\$' export TMOUT=21600 export TIME_STYLE='+%y-%m-%d %H:%M' export PATH=$PATH:$HOME/bin
-- MySQL dump 10.16 Distrib 10.1.18-MariaDB, for Linux (x86_64) -- -- Host: localhost Database: wallgreen4 -- ------------------------------------------------------ -- Server version 10.1.18-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTE...
CC=/usr/local/musl/bin/musl-gcc CXX=x86_64-linux-musl-g++ GOARCH=amd64 GOOS=linux CGO_ENABLED=1 go build -o gofi_client-linux-amd64 -ldflags "-linkmode external -extldflags -static" main.go
echo "Restarting k8s services..." bash StopServices.sh bash StartServices.sh
interface Route { path: string; name: string; useAsDefault?: boolean; } class RouteManager { routes: Route[]; constructor(routes: Route[]) { this.routes = routes; } redirectToDefault(): void { const defaultRoute = this.routes.find(route => route.useAsDefault); if (...
#!/bin/bash ################################################################################ # Copyright (c) 2021 Vladislav Trifochkin # # Unified build script for Linux distributions # # Changelog: # 2021.05.20 Initial version ################################################################################ CMAKE...
export default function($stateProvider) { 'ngInject'; return $stateProvider.state('root', { abstract: true, views: { '@': { template: `<ion-side-menus enable-menu-with-back-views="true"> <ion-side-menu-content> <ion-nav-bar ...
import { getSession } from "./neo4j"; export const createQuery = async (query: string, parameters = {}) => { const session = getSession(); try { const result = await session.run(query, parameters); session.close(); return result.records; } catch (err) { session.close(); console.log(""); t...
#!/bin/bash #==================================================== # # FILE: Download-Bin.sh # # USAGE: ./Download-Bin.sh # # DESCRIPTION: # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: Brett Salemink (BS), admin@roguedesigns.us # ORGANIZA...
insert into table_A select * from table_B;
(function () { 'use strict'; angular.module('mvMiPedido', []) .component('mvMiPedido', mvMiPedido()) .service('mvMiPedidoService', mvMiPedidoService) .service('ComandaService', ComandaService); function mvMiPedido() { return { bindings: { searchF...
<gh_stars>1-10 package mindustry.ui.layout; import arc.struct.*; import arc.math.*; public class RadialTreeLayout implements TreeLayout{ private static ObjectSet<TreeNode> visited = new ObjectSet<>(); private static Queue<TreeNode> queue = new Queue<>(); public float startRadius, delta; @Override ...
use std::fs::File; use std::io::prelude::*; use std::path::Path; fn create_constants_file(directory_path: &str, constant_value: u32) -> std::io::Result<()> { let dst = Path::new(directory_path); let mut f = File::create(&dst.join("constants.rs"))?; let content = format!("pub const RESULT: u32 = {};", const...
export { default } from "./PaymentResponse";
<filename>src/features/messageCreate/spy.js const icons = require('../../icons'); const {APIErrors} = require('discord.js').Constants; exports.event = async (options, message) => { if (!message.author.bot && message.content.includes(options.bot.user.id) || message.content.toLowerCase().includes(options.bot.user.us...
import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http'; import { Observable, of } from 'rxjs'; import { map, catchError, tap } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class RestService { constructor(private http: Htt...
# if which cygpath >& /dev/null; then # Starts the Atom editor. It assumes that Atom is in the path # # Note that to call this function for xargs, do the following: # # find -maxdepth 1 -type f | xargs zsh -lic "(){$functions[atom];}"' "$@"' zsh "$@" \; # atom() { if ! which cygpath >& /dev/null; then # Probab...
from sklearn.feature_extraction.text import CountVectorizer from sklearn.naive_bayes import MultinomialNB # Create a CountVectorizer and fit it to our data vectorizer = CountVectorizer() X = vectorizer.fit_transform(documents) # Create a model and fit it to our data model = MultinomialNB() model.fit(X, labels)
export type BackGroundColorType = "#932C16" | "#CE4B39" | "#EB6439" | "#F1BD6A" | "#FFB500" | "#FFD80C" | "#FFE199" | "#0B5A0E" | "#728F60" | "#8EDA43" | "#99B6FF" | "#0048FF" | "#ADA1F6" | "#502B8B" | "#99E0FF" | "#F2B9D6" | "#E1C3BC" | "#E0E0E0" | "#B4B4B4" | "#5F5F5F" | "#3A3A3A" export cons...
#!/bin/sh set -e set -u set -o pipefail function on_error { echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" } trap 'on_error $LINENO' ERR if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy # frameworks to, so exit 0 (signalling the...
<reponame>lostmsu/RoboZZle-Droid<gh_stars>1-10 /** * */ package com.team242.robozzle; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences.Editor; import android.os.AsyncTask; import android.os.Bund...