text
stringlengths
1
1.05M
#!/bin/sh # Stops script execution if a command has an error set -e INSTALL_ONLY=0 PORT="" # Loop through arguments and process them: https://pretzelhands.com/posts/command-line-flags for arg in "$@"; do case $arg in -i|--install) INSTALL_ONLY=1 ; shift ;; -p=*|--port=*) PORT="${arg#*=}" ; shift ;...
import React from 'react' import { useSelector, useDispatch } from 'react-redux' import { parseMindmap } from '@symbiotes/effects/' import { history } from '@lib/routing' import MindMap from './mindmap' export const MindMapWrapper = () => { const teamId = useSelector(state => state.teams.currentTeam) const desk ...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-NER/model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-NER/512+0+512-FW-first-256 --do_eval --per_device_eval_ba...
import csv def refine_customer_csv(csv_file): with open(csv_file, newline='') as csvfile: reader = csv.reader(csvfile) refined_list = [] for row in reader: # Remove rows with empty fields if row[0] and row[1] and row[2] and row[3] and row[4]: # Refin...
import { getAttributeForHtmlTemplateInsert } from '../utils/ui'; import AbstractView from './abstract-view'; export default class TextBlockView extends AbstractView { constructor({container, classList='', inlineStyles = '', text = ''}) { super(container); this._classList = classList; this._inlineStyle...
def mean_csv(csv, n): csv_arr = csv.split(",") total = 0.0 for number in csv_arr: total += float(number) return total/n mean_csv("1.2,2.3,3.4,4.5", 4)
config() { NEW="$1" OLD="$(dirname $NEW)/$(basename $NEW .new)" # If there's no config file by that name, mv it over: if [ ! -r $OLD ]; then mv $NEW $OLD elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy rm $NEW fi # Otherwise, we leave the .new copy for ...
#!/usr/bin/python # -*- coding: utf-8 -*- import os import json # import logging # logger = logging.getLogger(__name__) __softwarename__ = 'QMarkdowner' __author__ = "dragondjf" __url__ = "dragondjf.github.com" __description__ = ''' This is a SoftwareFrame based on qframer.qt with Metro Style. ''' __logoico__ = o...
const router = require('express').Router(); const auth = require('../../middleware/auth'); const ProfileController = require('../../controllers/ProfileController'); const validator = require('../../controllers/validator'); const checkObjectId = require('../../middleware/checkObjectId'); /** * @api {post} /api/profil...
fn f(input: Vec<i32>) -> Vec<i32> { let mut cumulative_sum = 0; let mut output = Vec::new(); for num in input { cumulative_sum += num; output.push(cumulative_sum); } output } #[cfg(test)] mod tests { use super::*; #[test] fn test_cumulative_sum() { assert_eq!(...
<gh_stars>1-10 import HttpService from '../../src/HttpService/HttpService'; import Application from '../../src/HttpApplication/Application'; var FooService = HttpService({ '$get /' (){ this.resolve('I GET Service', 304) }, '$post /baz': { f: class Foo { }, meta: { descri...
<gh_stars>1-10 package mindustry.ui.dialogs; import arc.input.*; import arc.scene.ui.*; import arc.util.*; import mindustry.gen.*; import mindustry.graphics.*; public class ControlsDialog extends KeybindDialog{ public ControlsDialog(){ setFillParent(true); title.setAlignment(Align.center); ...
#!/bin/bash set -e ABSOLUTE_SCRIPT=`readlink -m $0` SCRIPT_DIR=`dirname ${ABSOLUTE_SCRIPT}` RUN_DIR="$1" # define RENDER_PIPELINE_BIN, BASE_DATA_URL, exitWithErrorAndUsage(), ensureDirectoryExists(), getRunDirectory(), createLogDirectory() . /groups/flyTEM/flyTEM/render/pipeline/bin/pipeline_common.sh ${RENDER_PI...
function func(arg) { return arg + 'Bar'; } console.log(func('Foo'));
<reponame>GiantAxeWhy/skyline-vue<gh_stars>1-10 // Copyright 2021 99cloud // // 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...
printf "Generating Local Token ..." && sleep 60 token=$(curl -s -H "Content-Type: application/json" -H "Authorization: Basic aHVza3lDSVVzZXI6aHVza3lDSVBhc3N3b3Jk" http://localhost:8888/api/1.0/token -X POST -d '{"repositoryURL": "https://github.com/ZupIT/horus.git"}' | awk -F '"' '{print $4}') if [ $? -eq 0 ]; t...
func maxPossibleScore(_ scores: [Int]) -> Int { var maxScore = 0 var dp = Array(repeating: 0, count: scores.count + 2) for i in 2..<scores.count + 2 { dp[i] = max(dp[i - 1], dp[i - 2]) + scores[i - 2] if dp[i] >= 100 { break } maxScore = dp[i] } return m...
import Foundation import RxSwift import Action struct EditTaskViewModel { let taskName: Observable<String> let errors: Observable<Error> private let editTaskAction: Action<String, Void> private let taskNameSubject: BehaviorSubject<String> private let errorsSubject: PublishSubject<Error> ...
package com.supanadit.restsuite.listener; import javax.swing.event.MouseInputAdapter; import java.awt.*; import java.awt.event.MouseEvent; public class DragListener extends MouseInputAdapter { Point location; MouseEvent pressed; public void mousePressed(MouseEvent me) { pressed = me; } p...
#!/bin/bash ##PBS -l nodes=1:ppn=1,walltime=00:05:00 ##PBS -l mem=1gb ##PBS -q fast cd /home/hnoorazar/analog_codes/00_post_biofix/02_find_analogs_county_avg ########### ########### RCP 45 ########### ########### w_precip, no_gen3 cat /home/hnoorazar/analog_codes/parameters/county_avg_file_names | while read LINE ; ...
<reponame>Layton85/akordyukov<filename>chapter_002/src/main/java/ru/job4j/bank/User.java package ru.job4j.bank; /** * User - class describes the user. * User implements interface Comparable for using in Collections. * @author <NAME> (<EMAIL>) * @version $Id$ * @since 0.1 */ public class User implements Comparabl...
#!/usr/bin/env bash docker build -t naiveproxy:server --rm .
var testutil = require('testutil') , fs = require('fs') , batch = require('../lib/batchflow') describe('batchflow', function() { describe('load testing', function() { it('should pass', function(done) { var a = [] for (var i = 0; i < 10000; ++i) a[i] = i batch(a).seq() .each(fu...
module.exports = { basic: { message: "supports basic usage", }, 'basic:color': { message: "supports { color: '<a color>' }", options: { color: 'purple' } }, example: { message: "minimal example", }, };
const states = [ {key: "AL", display: "Alabama"}, {key: "AK", display: "Alaska"}, {key: "AZ", display: "Arizona"}, {key: "AR", display: "Arkansas"}, {key: "CA", display: "California"}, {key: "CO", display: "Colorado"}, {key: "CT", display: "Connecticut"}, {key: "DE", display: "Delaware"}, {key: "DC", display: ...
<filename>freshet-beam-runner/src/main/java/org/pathirage/freshet/beam/SamzaPipelineTranslator.java /** * Copyright 2016 <NAME> * <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 * <p>...
#! /bin/bash ./a.out sudo python /ai_home/socket_src/pywebsocket/mod_pywebsocket/standalone.py -p 9992 -w /ai_home/socket_src/pywebsocket/echo
def fibonacci(n): a = 0 b = 1 for i in range(n): a, b = b, a + b return a num = fibonacci(10) print(num)
#!/usr/bin/env bash description="$0 <command> <args>... Really basic tool to send commands to instantWM. Commands: help Display this help text overlay Toggle overlay (Super + Ctrl + W to define a widnow as overlay) tag <number> Switch to tag described by <n...
#!/bin/bash ./scripts/ast/train.sh nt2n_base_attention_plus_layered eval_nt2n_base_attention_plus_layered_large_embeddings
import { ErrorMapper } from "utils/ErrorMapper"; import { CreepManager } from "tools/creep-manager"; import { RoomManager } from "./tools/room/room-manager"; declare global { interface SourceData { id: string; available_mining_positions: number; used_mining_positions: number; } interface RoomData { ...
<reponame>mikoBerries/vending-machine package other import "fmt" func Catch() { rec := recover() if rec != nil { fmt.Println("Error :", rec) } }
#/bin/bash love .
import React, { Component } from 'react'; //import moment from 'moment'; import { Breadcrumb, BreadcrumbItem, Button, Form, FormGroup, Label, Input, Col, FormFeedback , Card, CardImg,CardImgOverlay, CardTitle, CardBody, CardText , Modal, ModalHeader, ModalBody} from 'reactstrap'; import { BrowserRouter, NavLink } f...
#!/bin/bash # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
#!/bin/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 "License"); you ...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+512+512-N-VB-ADJ-ADV/13-model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+512+512-N-VB-ADJ-ADV/13-512+512+512-shuffled-256 ...
import chalk from 'chalk'; import fs from 'fs'; import rlSync from 'readline-sync'; import { setup, userConfigPath } from './setup'; export const verifySetup = () => { if (!fs.existsSync(userConfigPath)) { console.warn(chalk.yellow(`No Sitecore connection has been configured (missing scjssconfig.json)`)); //...
#!/bin/bash fileid="1pkLBpcvZj6BqrXFsjoVFbxpVRAloczHi" html=`curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}"` curl -Lb ./cookie "https://drive.google.com/uc?export=download&`echo ${html}|grep -Po '(confirm=[a-zA-Z0-9\-_]+)'`&id=${fileid}" -o resources.tar.gz tar -zxvf resources.tar.gz...
import logging # Create a file handler fh = logging.FileHandler('gootool.log', encoding='utf8') fh.setLevel(logging.DEBUG) # Create a stream handler ch = logging.StreamHandler() ch.setLevel(logging.WARNING) # Define log message format formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)...
from sklearn.preprocessing import StandardScaler import numpy as np from xgboost import XGBClassifier from sklearn.model_selection import StratifiedKFold from sklearn.metrics import roc_auc_score def train_and_evaluate_model(X, y): # Standardize the features scaler = StandardScaler() X_scaled = scaler.fit_...
/* * MIT License * * Copyright (c) 2019 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, m...
# Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # What to do sign=false verify=false build=false setupenv=false # Systems to build linux=true windows=true osx=true # Other Basic v...
max=8 for i in `seq 1 $max` do echo "$i" done
// Solution for the render method of the TransactionConfirmation component render() { const estimatedNEU = this.props.estimatedNEU; const web3Type = this.props.web3Type; return ( <div> <CommitHeaderComponent number="02" title="Confirm your transaction" /> <UserInfo /> {web3Type === Web3Type...
package controller import ( "crypto/md5" "encoding/hex" "fmt" "gin-web-skeleton/model/services" "gin-web-skeleton/util" "github.com/gin-gonic/gin" ) type LoginField struct { Username string `form:"username"` Password string `form:"password"` Csrf string `form:"csrf"` } type RespData struct { Username ...
class BankAccount: def __init__(self, initial_balance): self.balance = initial_balance self.transactions = 0 def deposit(self, amount): self.balance += amount self.transactions += 1 def withdraw(self, amount): if self.balance >= amount: self.balance -= a...
import '../css/Footer.css'; import '../css/Footer.mobile.css'; function Footer() { return ( <footer> <p className="float_left"> This is a demo website, to demonstrate my web development skills,<br /> you can order this in fiverr </p> <p className="float_right"> If ...
package com.microsoft.cognitive.speakerrecognition.contract; import com.microsoft.cognitive.speakerrecognition.contract.identification.CreateProfileResponse; import com.microsoft.cognitive.speakerrecognition.contract.identification.Profile; import com.microsoft.cognitive.speakerrecognition.contract.ProfileLocale; imp...
package com.goldencarp.lingqianbao.view.util; import android.widget.Toast; import com.goldencarp.lingqianbao.view.LQBApp; /** * Created by sks on 2018/3/5. */ public class ToastUtil { public static void showToast(String msg) { Toast.makeText(LQBApp.getApp(), msg, Toast.LENGTH_SHORT).show(); } }
TestCase("DisplayList", { "testChildAddChild": function() { var a = new DisplayObject(); var b = new DisplayObject(); a.addChild(b); assertEquals("Childed", a.getChildren().indexOf(b), 0); }, "testChildRemoveChild": function() { v...
const tap = require("tap"); const test = tap.test; const { getDom, getBooon } = require("./dom"); test("filter", t => { t.plan(4); const booon = getBooon(); t.equal(booon("div").length, 4); t.equal(booon("div").filter(n => n.id === "why").length, 1); t.equal(booon("div").filter("div").length, 4); ...
<form action="" method="post"> <input type="text" name="name" placeholder="Name" required> <input type="email" name="email" placeholder="Email" required> <input type="password" name="password" placeholder="Password" required> <input type="text" name="age" placeholder="Age" required> <input type="text" name="a...
class EvenChecker: def is_even(self, number): return number % 2 == 0 # Create an instance of the EvenChecker class even_checker = EvenChecker() # Check if the numbers are even or odd print(even_checker.is_even(4)) # Output: True print(even_checker.is_even(7)) # Output: False print(even_checker.is_even(1...
def remove_negatives(arr): result = [] for num in arr: if num >= 0: result.append(num) return result arr = [3, -9, 12, -4, 7, -8] result = remove_negatives(arr) print(result)
#!/bin/bash set -v -e pushd $( dirname $0 ) if [ -f ./env ] ; then source ./env fi # set hostname sudo hostnamectl set-hostname glasswall # get source code cd ~ BRANCH=${BRANCH:-main} GITHUB_REPOSITORY=${GITHUB_REPOSITORY:-filetrust/cdr-plugin-folder-to-folder} git clone https://github.com/${GITHUB_REPOSITORY}.git -...
<reponame>uvworkspace/uvw-node 'use strict'; var path = require('path'); var uvwlib = require('uvwlib'); var nodeUtils = require('../lib/utils'); var metaFactory = require('./meta-factory'); var MetaContext = { instance: function (parent, name, spec) { return Object.create(MetaContext).init(parent, name, spec)...
<filename>pkg/processor/runtime/rpc/abstract.go /* Copyright 2017 The Nuclio Authors. 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...
fn determine_reply(message: &str) -> String { let mut st = String::new(); if message.contains("public") { st.push_str("Tell the entire channel: "); } else { st.push_str("Reply privately: "); } st.push_str(message); st } fn main() { let public_message = "This is a public m...
#!/bin/sh #tensorboard --logdir=run1:/tmp/tensorflow/ --port 6006 tensorboard --logdir=run1:./logs/ --port 6006
<reponame>hypebid/twitch-views-service // Code generated by protoc-gen-go-grpc. DO NOT EDIT. package pb import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // ...
#!/bin/sh # A hook script to verify that we don't commit files that could contain sensible data or credentials like json, csv, xls(x) or .env sensible_files_pattern="\.(csv|xls|xls(x?)|json|env)$" exception="package.json$" files=$(git diff --cached --name-only | grep -v -E "$exception" | grep -E "$sensible_files_pat...
import { Injectable } from '@angular/core'; import { Subject } from 'rxjs'; import { Post, PostUser } from './post.model'; @Injectable({ providedIn: 'root' }) export class MainService { userId: string; postsChanged = new Subject<PostUser[]>(); private posts: PostUser[] = []; constructor() { } getHomeIn...
#!/bin/sh # CYBERWATCH SAS - 2017 # # Security fix for DSA-3012-1 # # Security announcement date: 2014-08-26 00:00:00 UTC # Script generation date: 2017-01-01 21:07:01 UTC # # Operating System: Debian 7 (Wheezy) # Architecture: x86_64 # # Vulnerable packages fix on version: # - eglibc:2.13-38+deb7u4 # # Last vers...
func testApplicationLaunchPerformance() throws { if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { measure(metrics: [XCTApplicationLaunchMetric()]) { XCUIApplication().launch() } // Replace 5.0 with the expected maximum launch time in seconds XCTAssertLess...
parallel --jobs 6 < ./results/exp_opennb/run-2/lustre_7n_6t_6d_1000f_617m_5i/jobs/jobs_n3.txt
<filename>src/yimei/jss/gp/terminal/DoubleERC.java package yimei.jss.gp.terminal; import ec.EvolutionState; import ec.Problem; import ec.app.regression.func.RegERC; import ec.gp.ADFStack; import ec.gp.GPData; import ec.gp.GPIndividual; import yimei.jss.gp.data.DoubleData; /** * Created by YiMei on 2/10/16. */ publi...
import curses def main(stdscr): # do not wait for input when calling getch stdscr.nodelay(1) f=open("output.txt","w+") while True: # get keyboard input, returns -1 if none available c = int(stdscr.getch()) if c != -1: f.write(chr(c)) print(chr(c)) ...
import pandas as pd df = pd.DataFrame({'Price':[], 'Quantity':[], 'Quality':[] })
# pylint: disable=unused-argument # start_marker from dagster import pipeline, solid @solid def return_one(context) -> int: return 1 @solid def add_one(context, number: int) -> int: return number + 1 @pipeline def linear_pipeline(): add_one(add_one(add_one(return_one()))) # end_marker
<reponame>OpenByteDev/SourceScraper import { VerystreamScraper } from '../lib'; import { ScraperTester } from 'source-scraper-test-utils'; const urls = ['https://verystream.com/stream/3tngLkGr2pn/']; ScraperTester.fromStatic(VerystreamScraper) .testUrlDetection(urls) .testScraping(urls) .run(); ...
from datetime import datetime from sqlalchemy import Column, Integer, ForeignKey, Boolean, DateTime from sqlalchemy.orm import relationship, backref from .base import DeclarativeBase class AccountLink(DeclarativeBase): # table __tablename__ = 'account_link' # columns id = Colum...
import { FileOpener } from '../../core'; import { GameUpdateArgs, Session } from '../../game'; import { DividerMenuItem, MenuDescription, SceneMenu, SceneMenuTitle, TextMenuItem, } from '../../gameObjects'; import { FileMapListReader, MapLoader } from '../../map'; import { GameScene } from '../GameScene'; im...
import { GetList, GetListItems } from 'components/Api' export const getList = async (listName) => { let list = await GetList({ listName, expand: 'DefaultView,DefaultView/ViewFields,Views,Views/ViewFields,Fields', }) const options = {} if (list.BaseTemplate === 101) options.expand = 'File' let item...
#!/bin/sh # Change directory to the Node.js application directory cd /var/www/node # Start the Node.js application using PM2 with the specified configurations pm2 start npm --max-memory-restart 200M --name "tsoa-seed" -l /var/log/nodejs/pm2.log --no-daemon -u node -- start
/* * 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 ...
import Foundation import AudioToolbox extension AudioStreamBasicDescription { var packetPerSecond: Int { get { return Int(Float(self.mSampleRate) / Float(self.mFramesPerPacket)) } } } func processAudioDescription(_ audioDescription: AudioStreamBasicDescription) -> Bool { let pa...
Option Explicit Sub unit_test() Dim testCount As Integer Dim passCount As Integer For testCount = 0 To UBound(tests) If tests(testCount).runTest() Then passCount = passCount + 1 Else Debug.Print tests(testCount).name & " failed." End If Next testCount Debug.Print passCount & " of " &...
#!/usr/bin/env bash # Originally written by Ralf Kistner <ralf@embarkmobile.com>, but placed in the public domain set -eu bootanim="" failcounter=0 timeout_in_sec=300 until [[ "$bootanim" =~ "stopped" ]]; do echo "Yes" bootanim=`adb -e shell getprop init.svc.bootanim 2>&1 &` if [[ "$bootanim" =~ "device not f...
<reponame>hugofqueiros/gulp-es6-boilerplate import gulp from 'gulp'; gulp.task('default', ['setWatch', 'build'], () => { gulp.start('server'); });
./node_modules/ganache-cli/cli.js --flavor tezos --seed alice --accounts 10 --host 0.0.0.0 --genesisBlockHash BLEY49gkRAU5YN5LABnNNSEvjZz2WU8M5hFdoTrxZSC5GYQ7KZT -k edo
<html> <head> <title>Login Page</title> </head> <body> <h1>Login</h1> <form method="post" action="/login"> <p>Username: <input type="text" name="username"></p> <p>Password: <input type="password" name="password"></p> <p><input type="submit" value="Login"></p> </form> </body> </html>
<reponame>mhammer708/mytinerary import React from 'react' import {connect} from 'react-redux' import { Modal, Form, Input, Select, Button, Switch, Checkbox, Row, Col, } from 'antd' import {fetchBills, postBill} from '../store/bills' import {postPlan} from '../store/plans' import {fetchTrips, fetchTrip...
<gh_stars>0 #include "HOffsetManager.h" #include <sstream> #include <fstream> #include <iomanip> #include "../Utilis/HUtilis.h" #include "../NetVarManager/HNetVarManager.h" namespace Dumper { namespace OffsetManager { void COffsetManager::Dump( void ) { if( !pProcess->GetModuleByN...
<filename>charles-university/deep-learning/labs/02/gym_cartpole.py #!/usr/bin/env python3 import numpy as np import tensorflow as tf class Network: OBSERVATIONS = 4 ACTIONS = 2 def __init__(self, threads, seed=42): # Create an empty graph and a session graph = tf.Graph() graph.seed...
<gh_stars>0 package database import ( "context" "fmt" beego "github.com/beego/beego/v2/server/web" "github.com/qiniu/qmgo" "warehouse/logger" ) // MongoCollections mongoDB collections name struct: type MongoCollections struct { TempQuestions string FinalQuestions string TempTestPapers string FinalTestPaper ...
from bs4 import BeautifulSoup import math # Given HTML table snippet html_table = ''' </thead> <tbody> <tr> <th scope="row">1</th> <td>654</td> <td>Otto</td> <td>@mdo</td> <td>Gla...
#!/bin/bash BRANCH=`git rev-parse --abbrev-ref HEAD` MESSAGE="$BRANCH npm audit fix" if [[ $BRANCH = 'master' ]] || [[ $BRANCH = 'develop' ]] ; then echo 'skipping audit on '$BRANCH' branch' exit 0 fi npm audit fix git add package*.json npm-shrinkwrap.json git commit -m "$MESSAGE"
#!/bin/sh PLATFORM="ios" TREE_DIR="../../tree/pugixml" SRC_DIR="$TREE_DIR/src" BUILD_DIR="build/$PLATFORM" INSTALL_DIR="tmp/$PLATFORM" SRC_PATH="$(pwd)/$SRC_DIR" INSTALL_PATH="$(pwd)/$INSTALL_DIR" if [ ! -d "$SRC_PATH" ]; then echo "SOURCE NOT FOUND!" exit 1 fi # --- TOOLCHAIN_FILE="$CROSS_PATH/core/cmake/too...
public class PrimeFactors { public static void main(String[] args) { int n = 48; // traverse through all prime numbers // less than or equal to n for(int i=2; i<=n; i++) { // while n is divisible by i, // print i and divide n while(n%i==0) { System.out.print(i + " "); n=n/i; } } // if the la...
<reponame>finogeeks/FinChat-Web import emojione from 'emojione'; import moment from 'moment'; import sdk, { FinChatNormal, FinChatNetDisk, EventStatus } from '@finogeeks/matrix-js-sdk'; import emitter from '@/utils/event-emitter'; import { last as _last, cloneDeep } from 'lodash'; import { Message } from '@finogeeks/fi...
<gh_stars>0 /* * File : WordAssocNet.java * Created : 23-Feb-2012 * By : atrilla * * Emolib - Emotional Library * * Copyright (c) 2012 <NAME> & * 2007-2012 Enginyeria i Arquitectura La Salle (Universitat Ramon Llull) * * This file is part of Emolib. * * You should have received a copy of the rights ...
# one signup and one valid message node build/index.js deployVkRegistry && \ node build/index.js setVerifyingKeys -s 10 -i 1 -m 2 -v 2 -b 1 \ -p ./zkeys/ProcessMessages_10-2-1-2_test.0.zkey \ -t ./zkeys/TallyVotes_10-1-2_test.0.zkey \ -k 0x8CdaF0CD259887258Bc13a92C0a6dA92698644C0 && \ node build/index.js c...
import io.swagger.annotations.ApiModelProperty; import com.fasterxml.jackson.annotation.JsonProperty; public class User { private String userID; @ApiModelProperty(example = "null", value = "User ID.") @JsonProperty("userID") public String getUserID() { return userID; } public void set...
import string import random def generate_password(): # Choose random alphanumeric characters and symbols characters = string.ascii_letters + string.digits + string.punctuation # Generate string of random characters with minimum length of 8 password = ''.join(random.choice(characters) for _ in range(8)) return pas...
library(sentimentr) sentiment_model <- sentimentr::use_model("default") # predict sentiment sentiment <- sentimentr::predict_sentiment(sentiment_model, c("I love your product")) # print sentiment if (sentiment$sentiment == "positive") { print("The sentiment of the sentence is Positive") } else if (sentiment$sentim...
#! /bin/bash cd /export/scratch/robert/survae_flows teacher="/export/scratch/robert/survae_flows/experiments/student_teacher/log/Teacher/checkerboard/abs_flows4_hidden200_100_affine/adam_lr1e-03/seed0/abs_uniform_teacher" time python experiments/student_teacher/train_baseline.py \ --device cpu \ --baseline ...
#include <iostream> #include <vector> int calculateSumOfPositiveIntegers(const std::vector<int>& numbers) { int sum = 0; for (int num : numbers) { if (num > 0) { sum += num; } } return sum; } int main() { int n; std::cin >> n; std::vector<int> numbers(n); fo...
import { NgModule } from '@angular/core'; import { SharedModule } from '../shared/shared.module'; import { EditorComponent } from './editor.component'; import { EditorRoutingModule } from './editor-routing.module'; import { AddTagComponent } from './components/add-tag/add-tag.component'; @NgModule({ imports: [ S...
<gh_stars>100-1000 import { Client } from "eris"; import ClientStatsService from "../services/ClientStatsService"; import commands from "../commands/all"; async function initializeCommandStats(client: Client) { const ClientStats = await ClientStatsService.init(client.user.id); const delays: Array<number> = new Array(...