text
stringlengths
1
1.05M
#! /bin/bash -e THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" source ${THIS_DIR}/../_common.sh exec ansible-playbook ${ANSIBLE_OPTS} playbooks/nfd_undeploy.yml
<filename>src/tpcc/impl/tx/MVCCTpccTableV2.scala package ddbt.tpcc.tx import java.io._ import scala.collection.mutable._ import java.util.Date import java.sql.Connection import java.sql.Statement import java.sql.ResultSet import ddbt.tpcc.loadtest.Util._ import ddbt.tpcc.loadtest.DatabaseConnector._ import ddbt.lib.con...
<filename>spring/Web/EjemploMicroServicio/src/main/java/com/curso/ejemplomicroservicio/modelo/Persona.java /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.curso.ejemplomic...
#!/bin/bash set -eu cur=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) source $cur/../_utils/test_prepare WORK_DIR=$TEST_DIR/$TEST_NAME function run() { # 1. test sync fetch binlog met error and reset binlog streamer with remote binlog # with a 5 rows insert txn: 1 * FormatDesc + 1 * PreviousGTID + 1 * GTID + 1 * ...
# Load the data exam_data <- read.csv("exam_data.csv") # Define a function to convert marks to letter grades get_letter_grade <- function(mark){ if(mark >= 80) { grade <- 'A' } else if (mark >= 70) { grade <- 'B' } else if (mark >= 60) { grade <- 'C' } else if (mark >= 50) { grade <- 'D' } else {...
<reponame>ProjectRailgun/Altair import {fromEvent as observableFromEvent, Subscription} from 'rxjs'; import {debounceTime, distinctUntilChanged, filter, map, mergeMap, takeWhile, tap} from 'rxjs/operators'; import {AfterViewInit, Component, ElementRef, ViewChild} from '@angular/core'; import {Bangumi} from '../../enti...
package is.tagomor.woothee; import java.util.Map; import java.util.HashMap; import java.util.List; import is.tagomor.woothee.DataSet; public final class Classifier { public static String VERSION = "1.10.1"; public static Map<String,String> parse(final String useragent) { return fillResult(execParse(useragen...
/* * 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...
var EnemyDog = Class.create(Enemy, { initialize: function(manager, data) { Enemy.call(this, manager, data, 64, 32, "rect"); this.sprite = new Sprite(this.width, this.height); this.sprite.image = game.assets["res/enemy02.png"]; this.x = data.x; this.y = data.y; this.addChild(this.sprite); }, oncollide: function(...
#!/bin/bash # # Copyright (C) 2016 The CyanogenMod Project # Copyright (C) 2017 The LineageOS Project # # 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/L...
#!/bin/bash rm -rf dist demos/leaflet.annotation.* echo -e "Build Dev: \n...(re)packing leaflet annotator tool..." echo -e "\n ...transpiling typed audio depends... " tsc src/audio_model.ts --downlevelIteration tsc src/audio_loading_utils.ts echo -e "\n ...transpiling default style depends... " tsc src/defaults....
#!/bin/bash export LANG=C export LC_ALL=C set -e GTF=$1 CHRLEN=$2 MAPABILITYEXCL=$3 LIBEXEC=$4 OPTNONPOLYA=$5 OPTBLACKLISTEXCL=$6 #GTF=../../REF/Homo_sapiens.GRCh37.75.150/Homo_sapiens.GRCh37.75.limit_chr.gtf #CHRLEN=../../REF/Homo_sapiens.GRCh37.75.150/STAR/chrNameLength.txt #MAPABILITYEXCL=MapabilityExclusion.bed...
#!/usr/bin/env bash # クラスタノード 1台目 sbt \ -Dsbt.server.forcestart=true \ -DHOST=127.0.0.1 \ -DPORT=25521 \ -DAPP_HOST=127.0.0.1 \ -DAPP_PORT=9001 \ "SampleApp/run"
#!/usr/bin/env sh echo "This happens only on the first start of the container, before the configuration is applied to the instance"
<reponame>danielmlc/blogServer<filename>src/auth/dto/UserListDto.ts import {IsNotEmpty } from 'class-validator'; import { UserDto } from './UserDto'; export class UserListDto { @IsNotEmpty() Items: Array<UserDto>; }
# https://programmers.co.kr/learn/courses/30/lessons/64061 def get_top(board, move): for i in range(len(board)): if board[i][move-1] != 0: res = board[i][move-1] board[i][move-1] = 0 return res # Test #board = [[0,0,0,0,0],[0,0,1,0,3],[0,2,5,0,1],[4,2,4,4,2],[3,5,1,3,1]]...
import { ExtractorModelData } from "../types/types"; class ExtractorModel { name: string; private _raw: any; // eslint-disable-line @typescript-eslint/no-explicit-any /** * Model for raw Discord Player extractors * @param {string} extractorName Name of the extractor * @param {object} data E...
import { useEffect } from 'react'; import { useRouter } from 'next/dist/client/router'; import styles from '@styles/index.module.scss'; export default function NotFound() { const router = useRouter(); useEffect(() => { router.push('/'); }, []); return <div className={styles.container}></div>; }
#!/bin/bash if [ "$TRAVIS_BRANCH" == "master" ]; then docker build -t sorenmat/k8s-rds:$TRAVIS_BUILD_NUMBER . docker tag sorenmat/k8s-rds:$TRAVIS_BUILD_NUMBER sorenmat/k8s-rds:latest docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"; docker push sorenmat/k8s-rds:$TRAVIS_BUILD_NUMBER docker pu...
#!/bin/sh pip install -r requirements.txt # uvicorn api:fhir --reload --host 0.0.0.0 --port 9000
"use strict"; module.exports = { rules: { "accessor-pairs": "error", "arrow-spacing": "error", "block-spacing": "error", "brace-style": "error", "camelcase": "error", "comma-dangle": "error", "comma-spacing": "error", "comma-style": "error", "curly": "error", "dot-location": "e...
<reponame>b-liw/Chip8 package pl.bliw.gui; import javafx.application.Platform; import javafx.concurrent.Service; import javafx.concurrent.Task; import javafx.fxml.FXML; import javafx.scene.canvas.Canvas; import javafx.scene.canvas.GraphicsContext; import javafx.scene.input.KeyEvent; import javafx.scene.paint.Color; im...
/*============================================================================= Copyright (c) 2003 <NAME> Copyright (c) 2004 <NAME> Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENS...
<gh_stars>1-10 /* eslint-disable @typescript-eslint/camelcase */ import {HttpService, Injectable} from '@nestjs/common'; import {Logger} from '../../logger'; import {LcdChannelDto, LcdDenomDto} from '../../dto/http.dto' import {LcdChannelType, DenomType,LcdChannelClientState} from '../../types/lcd.interface' import {cf...
def collaborate(a1, p1, a2, p2, cls, fcls, k): # Implement the collaborate function to produce the expected solution set # Your implementation here # ... complete_solution_set = [] # Placeholder for the collaborated data # Your implementation here # ... return complete_solution_set
def first_letter_string(input_str): output_str = "" for w in input_str.split(): output_str += w[0] return output_str input_str = "This is a sample string" print(first_letter_string(input_str))
#!/bin/sh docker login "$DOCKER_BASE_URL" -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" docker build -t "${DOCKER_REPO}/orbit:${ORBIT_VERSION}" -f docker/server/Dockerfile . docker push "${DOCKER_REPO}/orbit:${ORBIT_VERSION}"
#!/bin/sh -e # Temporary script to regenerate the data and build the app. # TODO(jontayler): retire it once gradle can do this or # or we get rid of the data generation step. sed -i -e 's/gms/fdroid/' tools/build.gradle sed -i -e '/gmsCompile/d' app/build.gradle sed -i -e '/com.google.gms.google-services/d' app/build.g...
<html> <head> <title>Table of Contents</title> <link rel="stylesheet" type="text/css" href="styles.css" /> </head> <body> <h1>Table of Contents</h1> <ul> <li><a href="#introduction">Introduction</a></li> <li><a href="#methodology">Methodology</a></li> <li><a href="#results">Results</a></li> <li><a href="...
class Calculator: def __init__(self): # initialization code def add(self, x, y): return x + y def subtract(self, x, y): return x - y def multiply(self, x, y): return x * y def divide(self, x, y): return x / y
<filename>chest/net/common/src/main/java/net/community/chest/net/proto/ProtocolNetConnection.java package net.community.chest.net.proto; import java.io.IOException; import net.community.chest.net.NetConnection; /** * Copyright 2007 as per GPLv2 * * Represents a "well-known" protocol network connection * * @auth...
<gh_stars>0 package com.alipay.api.response; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.open.app.community.userpromo.sync response. * * @author auto create * @since 1.0, 2021-12-08 23:34:47 */ public class AlipayOpenAppCommunityUserpromoSyncResponse extends AlipayResponse { p...
<filename>lib/endeavour/railtie.rb class Endeavour class Railtie < Rails::Railtie initializer 'endeavour.hook' do Endeavour.hook! end end end
<gh_stars>0 package com.company; public class Exercise_6_14 { public static void main(String[] args) { // print heading System.out.printf("%-6s%8s\n", "i", "m(i)"); System.out.println("---------------"); // print body for (int i=1; i<= 901; i +=100) { Sy...
<reponame>jeffreiffers/datafabrikken-portal<filename>src/components/theme-box/styled.ts<gh_stars>0 import styled, { css } from 'styled-components'; import { theme, Colour } from '../../entrypoints/main/app/theme'; const onMobileView = '@media (max-width: 900px)'; type Props = { checked: boolean; }; const ThemeIco...
(function(Auth) { "use strict"; // Constructor var HashResponseBase = function() { }; // Public functions // This returns the result as array of Uint8Array. HashResponseBase.prototype.divide7BytesArray = function(array) { var result = []; var offset = 0; while (of...
<gh_stars>1-10 package org.softuni.exodia.repository; import org.softuni.exodia.domain.entities.Document; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; import org.springframework.validation.annotatio...
async function deductFromBalance(userId, amount) { try { const userBalanceRef = projectDatabase.ref(`/users/${userId}/balance`); const snapshot = await userBalanceRef.once('value'); const currentBalance = snapshot.val(); if (currentBalance < amount) { throw new Error("Insufficient balance"); ...
import VDataTable from './components/v_data_table'; const VDataTablePlugin = { install(Vue, options) { options = options || {}; Vue.component(options.name || VDataTable.name, VDataTable); } }; if (typeof window !== "undefined") { window.VDataTable = VDataTablePlugin; } export default VDat...
#!/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 # "Li...
def is_palindrome(word): n = len(word) # A single character is always a palindrome if n == 1: return True # Iterate through the string while two indexes left and right simultaneously left, right = 0, n-1 while right >= left: if word[left] != word[right]: return False ...
<reponame>hmrc/amls<filename>test/models/enrolment/KnownFactsSpec.scala /* * Copyright 2021 HM Revenue & Customs * * 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.apac...
#!/usr/bin/env bash . "test/testlib.sh" begin_test "fetch with good ref" ( set -e reponame="fetch-master-branch-required" setup_remote_repo "$reponame" clone_repo "$reponame" "$reponame" git lfs track "*.dat" echo "a" > a.dat git add .gitattributes a.dat git commit -m "add a.dat" git push origin ...
<reponame>rainrambler/PoemStar<gh_stars>1-10 package poemstar; import java.util.List; import poemstar.beans.ChineseDynasty; import poemstar.beans.Poem; import poemstar.fileio.PoemsDBManager; /** * * @author xinway */ public class ModifyPoemJDialog extends javax.swing.JDialog { /** * Creates new form Modi...
<table> <tr> <th>Column 1</th> <th>Column 2</th> </tr> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> </table>
#!/bin/bash SCRIPT=$(readlink -f "$0") && cd $(dirname "$SCRIPT") # --- Script Init --- set -e set -o pipefail mkdir -p log rm -R -f log/* # --- Setup run dirs --- find output/* ! -name '*summary-info*' -exec rm -R -f {} + rm -R -f fifo/* rm -R -f work/* mkdir work/kat/ mkfifo fifo/gul_P1 mkfifo fifo/gul_P2 mkfi...
#!/usr/bin/env bash source /app/vagrant/provision/common.sh #== Import script args == timezone=$(echo "$1") #== Provision script == info "Provision-script user: `whoami`" export DEBIAN_FRONTEND=noninteractive info "Configure timezone" timedatectl set-timezone ${timezone} --no-ask-password info "Prepare root pas...
#!/bin/bash # Copyright 2017 Google 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 of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
<filename>buyer/buyer_test.go package buyer import ( "encoding/json" "github.com/sigtot/sanntid/mac" "github.com/sigtot/sanntid/pubsub" "github.com/sigtot/sanntid/types" "testing" "time" ) type MockPriceCalculator struct{} func (pc *MockPriceCalculator) GetPrice(call types.Call) int { return 2 } func TestBuy...
print ('Pythonの覚書:文字存在チェック | 指定文字が含まれるか') res = 'p' in 'python' print(res) res = '大猫' in '臆病な大猫に目を合わせてはいけません' print(res) res = '犬' in '臆病な大猫に目を合わせてはいけません' print(res)
// ChartRateFactory class class ChartRateFactory { func createChartRate() -> ChartRate { // Implement chart rate creation logic here return ChartRate() // Replace with actual chart rate creation } } // ChartInteractor class class ChartInteractor { weak var delegate: ChartInteractorDelegate?...
#!/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...
package com.went.core.utils; import java.io.Serializable; import java.util.Map; import static com.went.core.constants.BaseConstants.STATUS_SUCCESS; /** * Service 返回的结果 * * Create By HCL at 2017/7/31 */ public class ServerResult<T> implements Serializable { private static final long serialVersionUID = 81237677...
#!/usr/local/bin/ksh93 -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 htt...
<gh_stars>1-10 # frozen_string_literal: true FactoryBot.define do factory :region do sequence :name do |n| "Test Region #{n}" end end end
#!/bin/sh mkdir -p $PACKAGE_LIB/usr/bin mkdir -p $PACKAGE_LIB/etc/cron.daily mkdir -p $PACKAGE_LIB/etc/housekeeper cp housekeeper.py $PACKAGE_LIB/usr/bin/housekeeper dos2unix $PACKAGE_LIB/usr/bin/housekeeper chmod a+x $PACKAGE_LIB/usr/bin/housekeeper cat > $PACKAGE_LIB/etc/cron.daily/housekeeper <<EOF #!/bin/bash ...
<gh_stars>10-100 'use strict'; const config = { testEnvironment: 'node', globalSetup: './test/setup.js', globalTeardown: './test/teardown.js', coverageReporters: ['lcov', 'text-summary'], collectCoverageFrom: ['lib/**/*.js'], }; module.exports = config;
def forward(self, inputs, hidden_state): # Extracting dimensions from the input data b, a, e = inputs.size() # Applying transformation to the input data transformed_input = F.relu(self.fc1(inputs.view(-1, e)), inplace=True) # (b*a, e) --> (b*a, h) # Additional processing using the hidden state (i...
<reponame>nortal/spring-mvc-component-web package com.nortal.spring.cw.core.web.helper; import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.math.BigDecimal; import java.sql.Time; import java.sql.Timestamp; import java.util.Collection; import java.util...
#!/bin/bash # # A shell script to load some pre generated data file to a DB using ldb tool # ./ldb needs to be avaible to be executed. # # Usage: <SCRIPT> [checkout] # `checkout` can be a tag, commit or branch name. Will build using it and check DBs generated by all previous branches (or tags for very old versions with...
SELECT * FROM Articles ORDER BY published DESC LIMIT 1;
#!/bin/bash # # https://github.com/Nyr/wireguard-install # # Copyright (c) 2020 Nyr. Released under the MIT License. # Detect Debian users running the script with "sh" instead of bash if readlink /proc/$$/exe | grep -q "dash"; then echo 'This installer needs to be run with "bash", not "sh".' exit fi # Discard stdi...
<gh_stars>0 var splitSourceMaps = (info) => { if (info.resourcePath.startsWith('webpack')) return `webpack:///${info.resourcePath}`; else if (info.resourcePath.indexOf('@') > 0) { var cl = info.resourcePath.substring(info.resourcePath.indexOf('@')); var scope = cl.substring(1, cl.indexOf('/')); var ...
import Foundation typealias AppState = [String: Any] typealias State = Any typealias EmptyFunction = () -> Void /** * Composes single-argument functions from right to left. * * - Parameter funks: functions to compose. * * - Returns: A function obtained by composing functions from right to left. */ func compos...
package strategies import ( "context" "errors" "reflect" "testing" "github.com/1pkg/gopium/collections" "github.com/1pkg/gopium/gopium" "github.com/1pkg/gopium/tests/mocks" ) func TestPad(t *testing.T) { // prepare cctx, cancel := context.WithCancel(context.Background()) cancel() table := map[string]struc...
import gql from 'graphql-tag'; export default gql` mutation RegisterAppStoreSubscription( $input: RegisterAppStoreSubscriptionInput! ) { registerAppStoreSubscription(input: $input) { success subscription { isActive } } } `;
#!/usr/bin/bash # fail fast # set -e # print each command before it's executed # set -x export RUSTFLAGS="-D warnings" wasm-pack test --firefox --headless -- --all-features wasm-pack test --chrome --headless -- --all-features wasm-pack test --firefox --headless -- --all-features --release wasm-pack test --chro...
#!/bin/bash #================================================= # Description: DIY script # Lisence: MIT # Author: P3TERX # Blog: https://p3terx.com #================================================= # Modify default IP sed -i 's/192.168.1.1/192.168.0.1/g' package/base-files/files/bin/config_generate echo "src-git lieno...
<filename>grpc-kit/server.go package main import ( "context" "flag" "fmt" "net" "time" "github.com/yunfeiyang1916/micro-go-course/grpc-kit/pb" "google.golang.org/grpc" "golang.org/x/time/rate" "github.com/yunfeiyang1916/micro-go-course/grpc-kit/user" ) func main() { flag.Parse() var ( //logger = log.N...
#!/bin/sh chmod +x /opt/scoping-tool-backend /opt/scoping-tool-backend
module Things # Things::Todo class Project < Reference::Record properties :name # identifier is required for creation identifier :project # collection is used for findings collection :projects class << self def all convert(Things::App.instance.projects.get) end ...
from random import randrange import Others.City_Manager as cm class Greedy: def __init__(self): self.startCity: int = randrange(cm.getLength()) self.possibleCities = [i for i in range(cm.getLength())] self.route = [] self.distanceTravelled = 0.0 self.currentCity = self.s...
import React, { FunctionComponent } from "react" interface FlagFranceProps { selected?: boolean onClick?: () => void } export const FlagFrance: FunctionComponent<FlagFranceProps> = ({ selected = true, onClick }) => { return ( <svg onClick={onClick} x="0px" y="0px" viewBox="0 0 512 512...
# frozen_string_literal: true module OpenApi module Router module_function def routes @routes ||= if (file = Config.rails_routes_file) File.read(file) else # :nocov: # ref https://github.com/rails/rails/blob/master/railties/lib/rails/tasks/routes...
#!/usr/bin/env bash EXEDIR=`pwd` BASEDIR=$(dirname $0) SYSTYPE=`uname -s` # # Serial port defaults. # # XXX The uploader should be smarter than this. # if [ $SYSTYPE = "Darwin" ]; then SERIAL_PORTS="/dev/tty.usbmodemPX*,/dev/tty.usbmodem*" fi if [ $SYSTYPE = "Linux" ]; then SERIAL_PORTS="/dev/serial/by-id/usb-3D_Ro...
#!/bin/bash # inputs: [$1:BROKER_IP] [$2:BROKER_PORT] [$3:BROKER_CHANNEL] # # [$4:BROKER_USER] [$5:BROKER_USER_PASSWORD] # # [$6:KEY_PASSWORD] # # 1# recieve script's parameters and initialize magic variables # 2# create file strings # ...
<filename>node_modules/react-icons-kit/iconic/stepBackward.js "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.stepBackward = void 0; var stepBackward = { "viewBox": "0 0 8 8", "children": [{ "name": "path", "attribs": { "d": "M0 0v6h2v-6h-2zm2 3l5 3v-6l-5 3z", ...
export interface Person { _id: number; firstName: string; lastName: string; fullName: string; email: string; department: string; dui: string; nit: string; cellphone: string; telephone: string; birthDate: string; gender: string; lenguages: string; address: string; ...
import datetime now = datetime.datetime.now() print ('Current date and time: ', now)
<gh_stars>0 numbers = [1,2,3,4,5,6] for number1 in range(1,4): for number2 in range(1,4): print(f'Pervoe 4islo= {number1}, Vtoroe 4islo = {number2}')
<reponame>thepanlab/Endoscopic_OCT_Epidural<gh_stars>0 import sys import sklearn from sklearn.model_selection import train_test_split from scipy.stats import sem import tensorflow as tf from tensorflow import keras from keras.models import load_model import numpy as np import os import pandas as pd import time import p...
sed -i "s/ICE_SERVER_ADDR/$PUBLIC_IP/g" /apprtc_configs/ice.js # sed -i 's/wss:\/\//ws:\/\//g' apprtc/out/app_engine/apprtc.py # sed -i 's/https:\/\//http:\/\//g' apprtc/out/app_engine/apprtc.py cp /apprtc_configs/constants.py /apprtc/out/app_engine/constants.py nodejs /apprtc_configs/ice.js 2>> /iceconfig.log & $GOP...
#!/bin/bash # Archived program command-line for experiment # Copyright 2021 ServiceNow All Rights Reserved # # Usage: bash {this_file} [additional_options] set -x; set -e; ../bytesteady/bytesteady -driver_location models/gene/doublefnvnllgram1a2a4a8a16size16777216dimension16a0.01b0alpha0lambda0.001n0rho0 -driver_epo...
@bot.message_handler(func=lambda message: message.text == 'Introduction') def send_intro(message): # Reply to the user bot.send_message(message.chat.id, "I'm a telegram bot to provide simple introduction. I can provide a list of introductions, in different areas, such as programming, finance, medicine,...
/** * Copyright 2014 Netflix, 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 of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
import matplotlib.pyplot as plt values = [10, 15, 30, 50, 70, 90, 20, 40, 60] # create figure plt.figure() # create chart plt.plot(values) # display chart plt.show()
<gh_stars>1-10 import axios from 'axios' export const GET_REVIEWS = 'GET_REVIEWS' export const ADD_REVIEW = 'ADD_REVIEW' const initialState = [] export const getReviews = reviews => ({ type: GET_REVIEWS, reviews }) export const addReview = review => ({ type: ADD_REVIEW, review }) export const postReview = r...
<filename>runtime/browser/runtime_geolocation_permission_context.cc // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "xwalk/runtime/browser/runtime_geolocation_permission_context.h" #includ...
#!/usr/bin/env bash cd /home/pi/toku1/01-04-a1 . ../python3-toku1/bin/activate if [ -e /home/pi/toku1/01-04-a1/app_03.db ];then rm /home/pi/toku1/01-04-a1/app_03.db fi python app_03.py & python server_03.py deactivate
function isPalindrome(str) { let i = 0; let j = str.length - 1; while (i < j) { if (str[i] !== str[j]) { return false; } i++; j--; } return true; } console.log(isPalindrome("racecar"));
#!/bin/sh # # 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...
// Merge Sort in Golang package main import ( "fmt" "math/rand" "time" ) func main() { slice := generateSlice(20) fmt.Println("\n--- Unsorted --- \n\n", slice) fmt.Println("\n--- Sorted ---\n\n", mergeSort(slice), "\n") } // Generates a slice of size, size filled with random numbers func gen...
# generate music using a particular model from model import SampleRNN, Predictor, Generator import os, sys, time import torch from librosa.output import write_wav # edit the modeldir and other variables below modeldir = "colab_results/" modelname = "ep1-it625" audio_pref = "r001_{}" save_raw = False n_samples = 1 ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.medkit = void 0; var medkit = { "viewBox": "0 0 512 512", "children": [{ "name": "g", "attribs": {}, "children": [{ "name": "path", "attribs": { "d": "M472.2,144H352v-30.7C351,85.1,330.3,64,300.8,...
#!/bin/bash set -ex dockerize -template /etc/cadence/config/config_template.yaml:/etc/cadence/config/docker.yaml exec cadence-server --root $CADENCE_HOME --env docker start --services=$SERVICES
import {Component, Input, AfterViewInit, EventEmitter, Output} from '@angular/core'; import {AccessGroup} from '../../index'; import {BsModalService} from 'ngx-bootstrap'; import {BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; import {ApiService} from '../../services/api/api.service'; @Component({ sel...
#!/usr/bin/env bash # @(#) Install UNetbootin # Created: 2019/11/28 16:01:00. # Last Change: 2019/11/28 16:06:31. set -ueo pipefail export LC_ALL=C for f in ~/dotfiles/function/*.sh do source ${f} done readonly PROCESS="install UNetbootin" gm_echo ">> Check ${PROCESS} or not" if ! has "unetbootin"; then ...
#include <stdio.h> int main() { int N = 3; char ch = 'a'; for (int i = 0; i < N; i++) { printf("%c ", ch); ch++; } return 0; } Output: a b c
import openpyxl def createSpreadsheet(name): # Create an Excel workbook workbook = openpyxl.Workbook() # Set up the first sheet with the list of expenses expenseSheet = workbook.active expenseSheet.title = 'Expenses' expenseSheet.cell(row=1, column=1).value = 'Item' expenseSheet.cell(row=1, column=2).va...
#include "AssetLoader.hpp"