text
stringlengths
1
1.05M
#!/bin/bash # Find linting errors in Synapse's default config file. # Exits with 0 if there are no problems, or another code otherwise. # Fix non-lowercase true/false values sed -i.bak -E "s/: +True/: true/g; s/: +False/: false/g;" docs/sample_config.yaml rm docs/sample_config.yaml.bak # Check if anything changed git...
<reponame>jresendiz27/personal_blog<filename>poorman_system_monitoring/push_metrics_to_prometheus.py<gh_stars>0 import asyncio import csv import logging import os import aiohttp MEMORY_COMMAND = 'head -n 1 /proc/meminfo | awk \'{print $2}\'' PROCESS_INFORMATION = 'ps -o pid,uid,%mem,command ax' SSH_COMMAND_TO_RETRIEV...
#ifndef STUDENTCOURSELINK_H #define STUDENTCOURSELINK_H #include <QDate> #include "student.h" #include "course.h" namespace slink //student links to courses and degrees and other files.. { class StudentCourseLink { public: StudentCourseLink(); StudentCourseLink(Student &student, program::Course &course,...
#!/bin/bash echo "Adding Frameworks @rpath to binary ..." install_name_tool -add_rpath @loader_path/../Frameworks out/a-simple-triangle-console
#!/usr/bin/env bash THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" ROOT_DIR="$THIS_DIR/../../.." SCRIPTS_DIR="$ROOT_DIR/scripts" source "$SCRIPTS_DIR/lib/common.sh" source "$SCRIPTS_DIR/lib/k8s.sh" source "$SCRIPTS_DIR/lib/testutil.sh" wait_seconds=5 test_name="$( filenoext "${BASH_SOUR...
#!/bin/bash set -e SOURCE="${BASH_SOURCE[0]}" while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" SOURCE="$(readlink "$SOURCE")" [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it...
#!/bin/sh -e my_file="$(readlink -e "$0")" my_dir="$(dirname $my_file)" juju deploy "$my_dir/contrail-docker-bundle-ha-trusty.yaml" BUILD="3065" juju attach contrail-controller contrail-controller="/home/ubuntu/contrail-controller-ubuntu14.04-4.0.0.0-$BUILD.tar.gz" juju attach contrail-analytics contrail-analytics="/h...
import json import time import requests from logger import other # http云打码的client class YDMHttp: apiurl = 'http://api.yundama.com/api.php' username = '' password = '' appid = '' appkey = '' # 初始化, # 获取用户名、密码,appid,appkey等 def __init__(self, name, passwd, app_id, app_key): sel...
<gh_stars>0 import React from "react"; import { Container, Row, Col, Button } from "reactstrap"; import imgCard1 from "./risen-christ/img1.jpg"; import imgCard2 from "./risen-christ/img2.jpg"; import imgCard3 from "./risen-christ/img3.jpg"; import imgCard4 from "./risen-christ/img4.jpg"; import Review from "./Review";...
<gh_stars>1-10 module Fog module Compute class Ecloud module Shared def validate_node_service_data(service_data) required_opts = [:name, :port, :enabled, :ip_address] unless required_opts.all? { |opt| service_data.has_key?(opt) } raise ArgumentError.new("Required Inte...
#!/usr/bin/env bash cd $(dirname $0) docker build -t madar15/cassandra .
<gh_stars>1-10 //// react import React, {useState, useEffect, useContext} from 'react'; //// react native import {StyleSheet, Dimensions, Image, TouchableOpacity} from 'react-native'; //// config //// language import {useIntl} from 'react-intl'; //// ui import {Block, Button, Input, Text, theme, Icon} from 'galio-frame...
def intersectSets(arr1, arr2) { return new Set([...arr1].filter(el => arr2.includes(el))); } const result = intersectSets([1, 2, 4, 5], [4, 5, 6, 7]); console.log(result);
package com.yoga.content.template.vo; import com.fasterxml.jackson.annotation.JsonInclude; import io.swagger.annotations.ApiModelProperty; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @Getter @Setter @NoArgsConstructor @JsonInclude(JsonInclude.Include.NON_EMPTY) public class TemplateVo...
# Import the preprocess module and call the preprocess_data function from . import preprocess def perform_preprocessing(data: list) -> list: preprocessed_data = preprocess.preprocess_data(data) return preprocessed_data
#!/bin/bash set -e source $(dirname $0)/lib.sh req_env_var " SRC $SRC CRIO_SRC $CRIO_SRC OS_RELEASE_ID $OS_RELEASE_ID OS_RELEASE_VER $OS_RELEASE_VER " cd "$CRIO_SRC" case "$OS_REL_VER" in fedora-29) PATCH="$SRC/$SCRIPT_BASE/network_bats.patch" cd "$CRIO_SRC" echo "WARNING: Applying $PATCH...
#!/bin/sh set -e RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt > "$RESOURCES_TO_COPY" install_resource() { case $1 in *.storyboard) echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${U...
#!/bin/bash # Copyright (c) 2019-2020 P3TERX <https://p3terx.com> # # 修改openwrt登陆地址,把下面的192.168.2.2修改成你想要的就可以了 sed -i 's/192.168.1.1/192.168.3.1/g' package/base-files/files/bin/config_generate # 修改主机名字,把OpenWrt-123修改你喜欢的就行(不能纯数字或者使用中文) sed -i '/uci commit system/i\uci set system.@system[0].hostname='Newifi'' package/...
<reponame>luanlazz/barbecue-app-back import { makeSaveParticipantValidation } from './save-participant-validation-factory' import { makeLogControllerDecorator } from '@/main/factories/decorators' import { makeDbLoadBarbecueById, makeDbSaveParticipant } from '@/main/factories/usecases' import { SaveParticipantController...
import { JSONRPCRequestPayload } from '@0xproject/types'; import { Callback, ErrorCallback } from '../types'; import { Subprovider } from './subprovider'; // HACK: We need this so that our tests don't use testrpc gas estimation which sometimes kills the node. // Source: https://github.com/trufflesuite/ganache-cli/is...
#!/bin/bash set -e if [ -z "$1" ]; then echo "Need a commit ID!" exit 1 fi if [ -z "$2" ]; then echo "Need a kernel version!" exit 1 fi sed -i "s/BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE=\".*\"/BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE=\"$1\"/g" buildroot-external/configs/odroid_* sed -i "s/| Odroid\(.*\) |...
#include "lic.hpp" std::array<void*, lic::LIC_MAX_COMPONENT> lic::components; std::array<std::vector<std::size_t>, lic::LIC_MAX_COMPONENT> lic::destroyed_components; std::array<std::vector<std::vector<std::function<void()>>>, lic::LIC_MAX_COMPONENT> lic::on_component_removals; std::vector<lic::EntityInfo> lic::entitie...
<reponame>marcpursals/i18n_yaml_editor # frozen_string_literal: true require 'test_helper' require 'i18n_yaml_editor/app' class TestApp < Minitest::Test def test_new_no_path_given assert_raises(ArgumentError) { App.new } end def test_new_given_path app = App.new('my_path') assert_match(/my_path\z/,...
<filename>src/pages/journal/living-abroad.tsx import React, { useContext } from "react" import SEO from "../../components/layout/seo" import { ArticlesContainer } from "../../components/layout/layout" import { getArticles } from "../../components/core/links/links.utils" import { ApplicationContext } from "../../compone...
package repository import ( "testing" "github.com/stretchr/testify/assert" ) func testRepository(repo Repository) error { return nil } func TestMock(t *testing.T) { mock := NewMock() assert := assert.New(t) assert.NotNil(mock) assert.Nil(testRepository(mock)) }
# test_module.py import pytest from your_module import create_linear_param_dae, LinearParameterDAE def test_create_linear_param_dae(): # Define input parameters param_vars = ['param1', 'param2'] e_lin_param_dae = 0.5 a_lin_param_dae = 1.5 f_lin_param_dae = 2.5 # Call the function under test ...
func test01() { var instance = S(a: 1, b: 2, 3) // Initializing the struct using the first initializer var inoutParam = 0 // Creating an inout parameter instance.foo1(4, 5, 6, 7, 8, 9, &inoutParam) // Calling the foo1 method with appropriate arguments }
<gh_stars>0 /* * Copyright (C) 2009-2016 Typesafe Inc. <http://www.typesafe.com> */ package scalaguide.tests.scalatest.oneserverpertest import play.api.test._ import org.scalatest._ import org.scalatestplus.play._ import play.api.test.Helpers._ import play.api.libs.ws._ import play.api.mvc._ import Results._ // #sc...
<reponame>GuusSeldenthuis/core // Copyright (c) 2014 The Bitcoin developers // Copyright (c) 2017-2018 The PIVX developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "networkstyle.h" #include "guiconstants.h" #in...
#!/bin/bash # Creates tgz file from chroot directory # Example: create_tgz '32bit-debian-stretch-min-BLAH.tgz' '/var/chroot/stretch/min' create_tgz () { TGZ_FILE=$1 DIR_CHROOT=$2 echo '----------------------------------' echo "tar cfz $TGZ_FILE -C $DIR_CHROOT ." tar cfz $TGZ_FILE -C $DIR_CHROOT . echo '---...
rsync -avz -e ssh --exclude=.gitignore accessibility@accessibility.kr:public_html/nia/logs/ ./www/logs/
<filename>src/dns_poller.c<gh_stars>100-1000 #include <math.h> // NOLINT(llvmlibc-restrict-system-libc-headers) #include <netdb.h> // NOLINT(llvmlibc-restrict-system-libc-headers) #include <string.h> // NOLINT(llvmlibc-restrict-system-libc-headers) #include "dns_poller.h" #include "logging.h" static...
<reponame>neuling/fso-livetest-chrome-extension function(page, done) { var t = page.getWindowPerformanceNavigation(); var p = page.getLocation().protocol; var is_https = false; if(p == "https:"){ is_https = true; } if (t) { var prot = t.nextHopProtocol var is_h2 = false; if(['h2', 'hq'].includes...
<filename>src/components/Styled/Footer/index.js import styled from 'styled-components'; export const Footer = styled.footer` display: flex; flex-direction: column; align-items: center; justify-content: center; background: #090909; color: #fff; height: 300px; font-size: 1.1rem; letter-spacing: 1px; ...
#!/bin/sh -k # # Re-order arguments so that -L comes first # opts="" lopts="" for arg in $* ; do case $arg in -L*) lopts="$lopts $arg" ;; *) opts="$opts $arg" ;; esac done c89 $lopts $opts
<filename>vuu-ui/scripts/publish-local.js (async function () { try { // const yargs = require('yargs'); const { exec } = require('./utils'); console.log('[PUBLISHING]'); const currentPath = process.cwd(); const PACKAGE_PATH = `${currentPath}/packages`; await Promise.all([ exec( ...
<reponame>briankaney/retired<filename>qvs_c++/2021-11-extract_change_map_json.pre_arg_overhaul.pre_no_hard_paths.cc //###################################################################################### // extract_change_map_json.cc // by <NAME>, 2018 //####################################################...
import winston, { format } from 'winston'; const {combine} = format; const logger = winston.createLogger({ format: combine( winston.format.colorize(), winston.format.timestamp(), winston.format.align(), winston.format.printf((info) => { const {timestamp, level, message, ...args} = info; ...
package com.example.beans; import java.util.ArrayList; import java.util.List; /* * 封装一个对象所有的PropertyValue,相对于对象的成员列表 * */ public class PropertyValues { private final List<PropertyValue> propertyValueList=new ArrayList<PropertyValue>(); public PropertyValues() {} public void...
fn main() { // Define build options println!("cargo:rustc-cfg=BUILD_GNUABI_LIBS=\"FALSE\""); println!("cargo:rustc-cfg=CMAKE_INSTALL_LIBDIR=\"lib\""); // Set build profile println!("cargo:profile=release"); // Trigger the build process // (Assuming the build process is triggered by cargo b...
package com.cyosp.mpa.api.rest.homebank.v1dot2.response; import lombok.Getter; import lombok.Setter; import lombok.ToString; import java.math.BigDecimal; /** * Created by CYOSP on 2017-07-14. */ @Getter @Setter @ToString public class AccountResponse extends RootResponse { private OptionsResponse options; ...
import * as Yup from 'yup'; const AchievementSchema = Yup.object().shape({ name: Yup.string().required('Digite o nome da conquista.'), description: Yup.string().required('Explique como ganhar a conquista.'), title: Yup.string(), image: Yup.mixed(), }); export default AchievementSchema;
package cfg.source; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import org.apache.poi.EncryptedDocumentException; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Cell; import or...
import argparse import json import matplotlib.pyplot as plt # Define the command-line arguments parser = argparse.ArgumentParser() parser.add_argument('-in', dest="INPUT_FILE", default="data/still_i_rise_sound.json", help="Path to input sound analysis json file") parser.add_argument('-key', dest="KEY", default="intens...
<filename>patientdashboard/src/app/vitals/vitals.component.ts import { Component, OnDestroy, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { VitalsService } from '../services/vitals.service'; @Component({ selector: 'app-vitals', templateUrl: './vitals.component.html', st...
#!/bin/bash -f #********************************************************************************************************* # Vivado (TM) v2020.2 (64-bit) # # Filename : pixsimFifo.sh # Simulator : Aldec Riviera-PRO Simulator # Description : Simulation script for compiling, elaborating and verifying the project sour...
def normalize(nums): normalized = [] min_value = min(nums) max_value = max(nums) for value in nums: normalized.append((value - min_value) / (max_value - min_value)) return normalized if __name__ == '__main__': nums = [2, 3, 5, 8] normalized_nums = normalize(nums) print("Normal...
/* * 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 * "License"); you ...
set -e # Install gcloud curl -sSL https://raw.githubusercontent.com/CommercialTribe/travis-scripts/master/gcloud.sh | bash NAMESPACE_PROVISIONER_VERSION=${NAMESPACE_PROVISIONER_VERSION:-v6.0.0} echo "#####################################################################" echo "# Installing namespace provisioner ${NAM...
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateHosollvtTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('hosollvt', function (...
import sys from phonemizer import phonemize def convert_to_phonetic(text: str, language: str, accent: str) -> str: phonetic_representation = phonemize(text, language=language, accent=accent) return phonetic_representation
# Shell library to run an HTTP server for use in tests. # Ends the test early if httpd tests should not be run, # for example because the user has not enabled them. # # Usage: # # . ./test-lib.sh # . "$TEST_DIRECTORY"/lib-httpd.sh # start_httpd # # test_expect_success '...' ' # ... # ' # # test_expect_success ... # # ...
package io.github.brightloong.spring.cloud.learn.eureka.consumer.hystrix.controller; import io.github.brightloong.spring.cloud.learn.eureka.consumer.hystrix.feign.HelloRemote; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import org.springfr...
package me.minidigger.minicraft.protocol.client; import com.google.common.base.MoreObjects; import net.kyori.text.Component; import net.kyori.text.serializer.gson.GsonComponentSerializer; import io.netty.buffer.ByteBuf; import me.minidigger.minicraft.model.ChatPosition; import me.minidigger.minicraft.protocol.MiniPa...
// Copyright (c) 2015-2016, ETH Zurich, <NAME>, Zurich Eye // 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 // noti...
<reponame>smagill/opensphere-desktop<gh_stars>10-100 package io.opensphere.controlpanels.layers.base; import java.util.Collection; import java.util.Enumeration; import java.util.Set; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.regex.Pattern; i...
# src/bash/aspark-starter/funcs/change-env-type.test.sh # v1.0.9 # --------------------------------------------------------- # todo: add doTestChangeEnvType comments ... # --------------------------------------------------------- doTestChangeEnvType(){ doLog "DEBUG START doTestChangeEnvType" cat doc/txt/aspark-st...
nasm -f elf32 ../asm/kernel.asm -o kasm.o gcc -m32 -fno-builtin -fno-stack-protector -c ../src/kernel.c -o kmain.o gcc -m32 -fno-builtin -fno-stack-protector -c ../src/screen.c -o screen.o gcc -m32 -fno-builtin -fno-stack-protector -c ../src/interupt_handler.c -o int_handler.o gcc -m32 -fno-builtin -fno-stack-protector...
<filename>tailwind.config.js<gh_stars>0 module.exports = { purge: ["./src/**/*.html", "./src/**/*.js"], darkMode: false, // or 'media' or 'class' theme: { extend: { colors: { one: { lt: "#EF6B81", md: "#E83151", ...
class PayloadManager: NSObject, NSCoding { var payloadString: String init(payload: String) { self.payloadString = payload super.init() } required init?(coder: NSCoder) { if let data = coder.decodeObject(forKey: "payloadString") as? Data { payloadString = Str...
/* * Copyright 2014-2019 michael-simons.eu. * * 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 ...
package com.github.robindevilliers.cascade.modules; import com.github.robindevilliers.cascade.Scope; import com.github.robindevilliers.cascade.model.Journey; import org.junit.runner.Description; import org.junit.runner.notification.RunNotifier; import java.util.List; import java.util.Map; public interface TestExecu...
<filename>lib/quickbooks/model/sales_item_line_detail.rb module Quickbooks module Model class SalesItemLineDetail < BaseModel xml_accessor :item_ref, :from => 'ItemRef', :as => Integer xml_accessor :class_ref, :from => 'ClassRef', :as => Integer xml_accessor :unit_price, :from => 'UnitPrice', :a...
def search(target, elements): start = 0 end = len(elements) - 1 while start <= end: mid = (start + end) // 2 if target == elements[mid]: return True elif target < elements[mid]: end = mid - 1 else: start = mid + 1 return False
/* See LICENSE file for copyright and license details. */ #include <X11/XF86keysym.h> /* appearance */ static const unsigned int borderpx = 0; /* border pixel of windows */ static const unsigned int snap = 32; /* snap pixel */ static const unsigned int systraypinning = 0; /* 0: sloppy systray fo...
# # Copyright (c) 2020 Seagate Technology LLC and/or its Affiliates # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
import time class Stopwatch: def __init__(self): self._is_running = False self._start_time = 0 self._elapsed_time = 0 def start(self): if not self._is_running: self._is_running = True self._start_time = time.time() def stop(self): if self._i...
class Card(): def __init__(self, suite, rank, value): self.suite = suite self.rank = rank self.value = value def get_value(self): return self.value card = Card(suite='diamonds', rank='ace', value=11) print(card.get_value())
package ru.skarpushin.swingpm.bindings; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import javax.swing.JToggleButton; import org.apache.log4j.Logger; import ru.skarpushin.swingpm.modelprops.ModelPropertyAccesso...
<reponame>petersamokhin/markdown-site import { Router } from 'express' import { renderHtmlFromString } from '../utils/kramdown' import { isLoggedInAndHaveAccess } from '../config/access-configurator' import codeMirrorConfig from '../config/codemirror-mime-mapping' import cheerio from 'cheerio' const router = Router() ...
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript"> var interval; function startTime() { interv...
/* printf( const char *, ... ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. */ #include <stdio.h> #include <stdarg.h> int printf( const char * restrict format, ... ) { int rc; va_list ap; va_start( ap, format ); ...
append_path_if_exists() { if [[ -d $1 ]] then export PATH="$PATH:$1" return 0 else return 1 fi } prepend_path_if_exists() { if [[ -d $1 ]] then export PATH="$1:$PATH" return 0 else return 1 fi }
<gh_stars>1-10 #include "BMP.h" #include <cassert> #include "../../File/FileStream.h" #include "../../Math/Math.h" BF::BMP::BMP() { Type = BMPType::UnkownOrInavlid; InfoHeaderType = BMPInfoHeaderType::UnkownOrInvalid; PixelDataSize = 0; PixelData = 0; } BF::BMP::~BMP() { free(PixelData); } BF::F...
<reponame>shermainelim/QuizReactNativeAWS<gh_stars>0 import React, { useState } from "react"; import { View, Text, TextInput, Button, TouchableOpacity } from "react-native"; import { MaterialCommunityIcons } from "@expo/vector-icons"; interface Props { setPlayerName: (e: string) => void; } const Player: React.FC<Pr...
#include<iostream> int findSmallestElement(int arr[], int n){ int smallest = arr[0]; // assume arr[0] is the smallest for(int i=0; i < n; i++){ if(arr[i] < smallest){ smallest = arr[i]; } } return smallest; } int main() { int arr[] = {10, 20, 15, 0, 17}; int n = s...
# https://blackfire.io/docs/up-and-running/installation?action=install&mode=full&location=local&os=debian&language=php&agent=f6f50a71-079e-463b-a2f8-04abd913f50e
#!/usr/bin/env python3 import numpy as np import tensorflow as tf class Network: HEIGHT, WIDTH = 28, 28 def __init__(self, threads, seed=42): # Create an empty graph and a session graph = tf.Graph() graph.seed = seed self.session = tf.Session(graph = graph, config=tf.ConfigProt...
import java.util.Random; public class GenerateRandom { public static void main(String[] args) { Random rand = new Random(); // specify the lower and upper bounds of the range int lower = 10; int upper = 100; // generate random numbers int random = rand.nextInt(up...
#!/bin/bash # Set the maximum heap size for the JVM JAVA_XMX=4G # Example value, can be set according to requirements # Execute the Java class with specified memory constraints and classpath java -Xmx$JAVA_XMX -cp index-06.jar org.dbpedia.spotlight.lucene.index.external.utils.SSEUriDecoder $INDEX_CONFIG_FILE > out_S...
/* File: Grafic.java ; This file is part of Twister. Version: 3.0036 Copyright (C) 2012-2013 , Luxoft Authors: <NAME> <<EMAIL>> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://ww...
#!/bin/bash . ./defaults.sh . ../../include/common.sh . .envrc curl http://"$EKCP_HOST"/kubeconfig/"${CLUSTER_NAME}" > kubeconfig ok "Kubeconfig for $BACKEND correctly imported"
#!/bin/bash if [ -z "$1" ]; then echo 'Usage: rs-auth-github.sh <Access Key>' exit 1 fi echo -e '\n\n' echo 'Executing using Token in Query:' echo '' curl -X GET --header 'Accept: application/json' 'http://localhost:3000/api/vPassenger'?access_token=$1 echo -e '\n\n' echo 'Executing using Token i...
var user = user || {}; user.login_form = { LoginForm: function () { var self = this; self.email = ko.observable(""); self.password = ko.observable(""); self.submitForm = function (form) { $.ajax({ url: "/api/login", type: 'POST', ...
<reponame>godbobo/Admin<filename>spring-boot/src/main/java/com/aqzscn/www/weixin/domain/vo/UserOption.java package com.aqzscn.www.weixin.domain.vo; import lombok.Data; /** * 记录用户当前操作 * @author Godbobo * @version 1.0 * @date 2019/9/7 9:23 */ @Data public class UserOption { // 功能编号 private String menuId; ...
package com.carson.cloud.business.controller; import com.carson.cloud.business.common.Result; import com.carson.cloud.business.entity.UserEntity; import com.carson.cloud.business.service.UserService; import com.carson.cloud.business.viewmodel.LoginByPasswordIVO; import com.carson.cloud.business.viewmodel.LoginByPasswo...
void selectionSort(int arr[], int n) { int i, j, min_idx; // One by one move boundary of unsorted subarray for (i = 0; i < n-1; i++) { // Find the minimum element in unsorted array min_idx = i; for (j = i+1; j < n; j++) if (arr[j] < arr[min_idx]) ...
class Api::V4::Games::RunnersController < Api::V4::ApplicationController before_action :set_game, only: [:index] def index render json: Api::V4::UserBlueprint.render(@game.users, root: :runners) end end
<gh_stars>10-100 // // LiveDataExample.h // Examples // // Created by <NAME> on 6/7/17. // Copyright © 2017 Mapbox. All rights reserved. // #import <UIKit/UIKit.h> @interface LiveDataExample : UIViewController @end
<filename>Plugins/UnrealDotNet/Source/UnrealDotNetRuntime/Public/Generate/Export/UVectorFieldComponent.h #pragma once // This file was created automatically, do not modify the contents of this file. PRAGMA_DISABLE_DEPRECATION_WARNINGS #include "CoreMinimal.h" #include "ManageEventSender.h" #include "Runtime/Engine/Cl...
package Combination_Sum_IV; import java.util.HashMap; public class Solution { public int combinationSum4(int[] nums, int target) { if (nums == null || nums.length == 0) return 0; // HashMap<Integer, Integer> map = new HashMap<>(); // return generate(target, nums, map); /** *...
#!/bin/bash # ========== Experiment Seq. Idx. 3137 / 61.2.5.0 / N. 0 - _S=61.2.5.0 D1_N=43 a=-1 b=1 c=1 d=-1 e=1 f=-1 D3_N=4 g=1 h=-1 i=-1 D4_N=4 j=4 D5_N=0 ========== set -u # Prints header echo -e '\n\n========== Experiment Seq. Idx. 3137 / 61.2.5.0 / N. 0 - _S=61.2.5.0 D1_N=43 a=-1 b=1 c=1 d=-1 e=1 f=-1 D3_N=4 g=1 ...
# python workflows/rivm/data_rivm_download.py # python workflows/rivm/merge_data.py # python workflows/rivm/data_rivm_geo.py # python workflows/json/json-api.py # Grafieken pagina on website RIVM python workflows/rivm/merge_website_charts.py # National Dashboard # python workflows/rivm/data_rivm_dashboard.py # pyth...
#!/bin/bash set -exu python3 /mysite/manage.py makemigrations python3 /mysite/manage.py migrate export DJANGO_SUPERUSER_PASSWORD=$DJANGO_PASSWORD python3 /mysite/manage.py createsuperuser \ --no-input \ --username=$DJANGO_NAME \ --email=$DJANGO_NAME@example.com
<gh_stars>0 /** * Adjacent Replacements * https://codeforces.com/problemset/problem/1006/A */ var elements = readline(); elements = readline().split(' ').map(e => e % 2 === 0 ? e - 1 : e).join(' '); print(elements);
import mitt, { Emitter } from 'mitt'; // eslint-disable-next-line @typescript-eslint/consistent-type-definitions type ImageEvents = { load: { imageId: string; }; loaded: { imageId: string; }; error: { imageId: string; }; }; const imageEventEmitter: Emitter<ImageEvents> = mitt(); export defaul...
#!/usr/bin/env bash set -ue NEXUS_VERSION=3.22.0 function usage { printf "Test Nexus setup.\n\n" printf "\t-h|--help\t\tPrint usage\n" printf "\t-v|--verbose\t\tEnable verbose mode\n" printf "\t-s|--nexus-version\t\tNexus version, e.g. '3.22.0' (defaults to ${NEXUS_VERSION})\n" } while [[ "$#" -gt 0...
<filename>src/main/java/com/challenge/service/dto/LogEventPostResponseDto.java package com.challenge.service.dto; import com.challenge.entity.LogEvent; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import lombok.Data; import lombok.NoArgsConstruct...
#!/bin/bash # Git pre-commit hook to check staged Python files for formatting issues with # yapf. # # INSTALLING: Copy this script into `.git/hooks/pre-commit`, and mark it as # executable. # # This requires that yapf is installed and runnable in the environment running # the pre-commit hook. # # When running, this fi...
import nltk from nltk.sentiment.vader import SentimentIntensityAnalyzer def sentiment_classifier(sentence): sid = SentimentIntensityAnalyzer() sentiment_scores = sid.polarity_scores(sentence) if sentiment_scores['compound'] > 0.5: sentiment_class = 'positive' elif sentiment_scores['compoun...