text
stringlengths
1
1.05M
#!/bin/bash # ****************************************** # Developer: Quang Nguyen Phu # Date: 05-12-2020 # ****************************************** curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash – sudo apt-get install -y nodejs; sudo apt-get install -y build-essential; echo "************************...
<reponame>zonesgame/StendhalArcClient package mindustry.io; import arc.assets.*; import arc.assets.loaders.*; import arc.assets.loaders.resolvers.*; import arc.files.*; public class SavePreviewLoader extends TextureLoader{ public SavePreviewLoader(){ super(new AbsoluteFileHandleResolver()); } @O...
<gh_stars>0 // Brunch automatically concatenates all files in your // watched paths. Those paths can be configured at // config.paths.watched in "brunch-config.js". // // However, those files will only be executed if // explicitly imported. The only exception are files // in vendor, which are never wrapped in imports a...
#! /bin/sh err=0 for s in pgq pgq_node pgq_coop londiste pgq_ext; do code_hash=$(git log --raw -n 1 sql/$s/functions | head -1) fn="sql/$s/functions/$s.version.sql" ver_hash=$(git log --raw -n 1 "$fn" | head -1) test "${code_hash}" = "${ver_hash}" || echo "$s has code changes, needs new version" ver_func=$...
import React, {Component} from 'react'; import {View, Text, FlatList, StyleSheet} from 'react-native'; import {Actions} from 'react-native-router-flux'; import AddPeople from './AddPeople'; import Button from '../components/common/Button'; class InvitePeople extends Component{ state = { data: [ ...
<filename>index.js // Copyright (c) 2017-19 <NAME> <<EMAIL>> // Copyright (c) 2019 <NAME> <<EMAIL>> /** * Node.js' `require` function on steroids: * - Ability to search for a module in multiple directories * - Ability to search using both absolute and relative paths * - Ability to search using a prefix * @module...
<reponame>anteins/Blunted2 // written by <NAME> 2008 - 2014 // this work is public domain. the code is undocumented, scruffy, untested, and should generally not be used for anything important. // i do not offer support, so don't ask. to be used for inspiration :) #include "frame.hpp" #include "../windowmanager.hpp" ...
#!/bin/bash echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin if [[ -n "${TRAVIS_TAG}" ]];then docker build --pull -t travisghansen/kubernetes-pfsense-controller:${TRAVIS_TAG} . docker push travisghansen/kubernetes-pfsense-controller:${TRAVIS_TAG} elif [[ "${TRAVIS_BRANCH}" == "master" ]...
package net.hasor.solon.boot.test; import net.hasor.test.spring.mod1.*; import net.hasor.core.AppContext; import org.junit.Test; import org.junit.runner.RunWith; import org.noear.solon.annotation.Inject; import org.noear.solon.core.Aop; import org.noear.solon.test.SolonJUnit4ClassRunner; import org.noear.solon.test.Sol...
<filename>src/utils/node/schema-customization.service.js /* * Human Cell Atlas * https://www.humancellatlas.org/ * * Basic service supporting gatsby-node schema customization. */ const moment = require("moment-timezone"); /** * Returns the bubble date, as an array i.e. [month, date, year] * for easy rendering ...
<reponame>INC-PSTORE/psafe<filename>frontend/app/containers/SignPage/reducer.js /* * Sign Page reducer */ import { CHANGE_SIGNATURE, CHANGE_VALIDATE_FORM, CHANGE_DATA_TO_SIGN, UPDATE_APPROVE_ROWS, UPDATE_SELECTED_ROW, } from './constants'; import {func} from "prop-types"; import {UPDATE_WALLETS_ROWS} from ...
package dbr // Builder builds sql in one dialect like MySQL/PostgreSQL // e.g. XxxBuilder type Builder interface { Build(Dialect, Buffer) error } // BuildFunc is an adapter to allow the use of ordinary functions as Builder type BuildFunc func(Dialect, Buffer) error // Build implements Builder interface func (b Buil...
struct Transaction { let transactionIndex: Quantity let blockHash: EthData let blockNumber: Quantity let cumulativeGasUsed: Quantity let gasUsed: Quantity func totalGasCost() -> Quantity { return cumulativeGasUsed - gasUsed } }
<reponame>potados99/tarvern-pin-archiver<gh_stars>1-10 import Discord from "discord.js"; import { onReady } from "./routes/ready"; import { onMessage } from "./routes/message"; import { onMessageUpdate } from "./routes/update"; import config from "../config"; import { onReactionAdd } from "./routes/reaction"; import { ...
<reponame>guuguuit/NikeBot package nike.platform.order; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.PageRequest; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMappin...
#!/usr/bin/env bash # vim:ts=4:sts=4:sw=4:et # # Author: Hari Sekhon # Date: 2021-10-21 15:30:28 +0100 (Thu, 21 Oct 2021) # # https://github.com/HariSekhon/bash-tools # # License: see accompanying Hari Sekhon LICENSE file # # If you're using my code you're welcome to connect with me on LinkedIn and optionally sen...
<gh_stars>1-10 package org.mnode.jot.schema; /** * Represents a persistent entity associated with one or more jots. */ public interface Entity extends PropertyAccessor { <T extends Entity> T name(String name); }
#!/bin/sh # CYBERWATCH SAS - 2017 # # Security fix for USN-1958-1 # # Security announcement date: 2013-09-18 00:00:00 UTC # Script generation date: 2017-01-01 21:03:25 UTC # # Operating System: Ubuntu 12.04 LTS # Architecture: x86_64 # # Vulnerable packages fix on version: # - language-selector-common:0.79.4 # # ...
<gh_stars>0 import static org.junit.Assert.*; import java.io.File; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import javafx.beans.InvalidationListener; import javafx.collections.FXCollections; import javaf...
<filename>micropython-1.5/bare-arm/main.c #include <stdint.h> #include <stdio.h> #include <string.h> #include "py/nlr.h" #include "py/compile.h" #include "py/runtime.h" #include "py/repl.h" void do_str(const char *src, mp_parse_input_kind_t input_kind) { mp_lexer_t *lex = mp_lexer_new_from_str_len(MP_QSTR__lt_std...
#!/bin/bash # Update the packages sudo apt-get update # Install git sudo apt-get install git # Check installation git --version
# baseline export save=./results/joint_confidence_loss/${RANDOM}/ mkdir -p $save python ./src/run_joint_confidence.py --outf $save --dataroot ./data 2>&1 | tee $save/log.txt
#!/bin/bash # Run the converter utility to convert .etlt -> .plan # The "Converting the models to TensorRT" part of this guide is wrong: https://developer.nvidia.com/blog/fast-tracking-hand-gesture-recognition-ai-applications-with-pretrained-models-from-ngc/ # Use tao-converter instead: https://github.com/NVIDIA-AI-I...
if [ -n "$ANDROID_NDK" ]; then export NDK=${ANDROID_NDK} elif [ -n "$ANDROID_NDK_HOME" ]; then export NDK=${ANDROID_NDK_HOME} elif [ -n "$ANDROID_NDK_HOME" ]; then export NDK=${ANDROID_NDK_HOME} else export NDK=/Applications/Unity/Hub/Editor/2019.4.0f1/PlaybackEngines/AndroidPlayer/NDK fi if [ ! -d "$N...
<filename>commons-warp/src/main/java/com/github/hinsteny/commons/warp/http/utils/ParamsUtil.java package com.github.hinsteny.commons.warp.http.utils; import com.github.hinsteny.commons.core.exception.BusinessException; import com.github.hinsteny.commons.core.utils.ReflectUtil; import com.github.hinsteny.commons.warp.h...
<reponame>gtm7712/team-project-d-2191-swen-261-11-d package com.webcheckers.ui; import com.webcheckers.model.*; import com.webcheckers.util.Message; import com.webcheckers.util.MoveValidator; import com.webcheckers.util.ValidationResult; import spark.Request; import spark.Response; import spark.Route; import com.goo...
def calculate_total(order_items, tax_rate): total = 0.00 for item in order_items: total += (item["Price"] * item["Qty"]) total += total * tax_rate return total order_items = [{"Name":"Apples","Price":2.00,"Qty":2},{"Name":"Milk","Price":2.50,"Qty":1},{"Name":"Eggs","Price":3.00,"Qty":6}] tax_ra...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+512+512-N-IP/7-model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+512+512-N-IP/7-512+512+512-SWS-256 --do_eval --per_device_...
# frozen_string_literal: true module MTUV VERSION = '2.4.72' end
import axios from 'axios'; import { get } from 'lodash'; // create "middleware" const express = require('express'); const router = express.Router(); // middleware that is specific to this router router.use(function timeLog(req, res, next) { console.log('Time: ', new Date().toUTCString()); next(); }); // define ...
#!/usr/bin/env bash version=$1 echo "Releasing version ==> " + $version mvn clean package -DskipTests docker stop $(docker ps -a | grep "manjesh80/geolocation-consul-lb" | awk '{print $1}') docker rm $(docker ps -a | grep "manjesh80/geolocation-consul-lb" | awk '{print $1}') docker rmi -f $(docker images | grep "man...
// Generated by Haxe 3.4.4 (function () { "use strict"; var Main = function() { this.document = window.document; var _gthis = this; console.log("Example VanillaJS"); this.document.addEventListener("DOMContentLoaded",function(event) { console.log("VanillaJs DOM ready"); var div = _gthis.document.getElementById("...
import Cookie from 'js-cookie'; /** * Aliases Cookie.get(). See https://github.com/js-cookie/js-cookie#basic-usage for more info. * * @param {string} name Name of the cookie * @return {string} Cookie value */ export default function getCookie(name) { return Cookie.get(name); }
#!/usr/bin/env bash set -e source development.env yes | npx http-server \ -S \ -p 9000 \ -C $(find $CERTS_DIR/ -name "$DOMAIN*" -not -name "*key*") \ -K $(find $CERTS_DIR/ -name "$DOMAIN*" -name "*key*")
<reponame>lindseymysse/e-y-e<filename>EYE.js class EYE extends HTMLElement { connectedCallback(){ this.details = document.createElement('details') this.details.innerHTML = `<summary> </summary>` // Devices this.devices_el = document.createElement('details') this.devices_el.innerHTML = `<summ...
/* * Copyright 2019 MediaMath * * 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 agr...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ic_directions_car_twotone = void 0; var ic_directions_car_twotone = { "viewBox": "0 0 24 24", "children": [{ "name": "path", "attribs": { "d": "M0 0h24v24H0V0z", "fill": "none" }, "children": [] }, ...
#! /bin/bash #SBATCH -o /home/hpc/pr63so/di69fol/workspace/SWEET_2015_12_26/benchmarks_performance/rexi_tests_lrz_freq_waves/2016_01_03_scalability_rexi_fd_high_res_run3/run_rexi_fd_par_m0512_t001_n0128_r3640_a1.txt ###SBATCH -e /home/hpc/pr63so/di69fol/workspace/SWEET_2015_12_26/benchmarks_performance/rexi_tests_lrz_...
from sklearn.svm import SVC clf = SVC(kernel='linear') clf.fit(x, y)
<gh_stars>1-10 import {Context} from 'makit'; import {extname} from 'path'; import {include} from './utils/filter'; import {parse} from './parse'; import {normalize as normalizeOptions, AmdNormalizeOptions} from './options'; export {aliasConf} from './options'; export function normalize(options: AmdNormalizeOptions)...
<gh_stars>10-100 package org.quifft; import org.quifft.output.FFTFrame; import org.quifft.output.FFTResult; import org.quifft.output.FrequencyBin; import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; public class TestUtils { /** * Retrieves audio file from /test/resources directory ...
//Copyright (c) 2013-2016 United States Government as represented by the Administrator of the //National Aeronautics and Space Administration. All Rights Reserved. // //DISCLAIMERS // No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF ANY KIND, // EITHER EXPRESSED, IMPLIED, OR STATUTOR...
 /* * Copyright(c) Archway Inc. All rights reserved. */ ;(function (global, $, undef) { "use strict"; var ddlmenu = App.define("App.ui.ddlmenu", { setting: {}, isShowed: false, context: {}, settings: function (title, setting) { ddlmenu.settingsObj = {...
#!/bin/bash -e IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" NOOBS_DIR="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}" unmount_image "${IMG_FILE}" mkdir -p "${STAGE_WORK_DIR}" cp "${WORK_DIR}/export-image/${IMG_FILENAME}${IMG_SUFFIX}.img" "${STAGE_WORK_DIR}/" rm -rf "${NOOBS_DIR}" PARTED_OU...
import { $ } from './Class/$' import { Dict } from './types/Dict' export function envolve( interf: Dict<(...args: any[]) => any>, __: string[] ): $ { return new (class Class extends $ { _ = __ constructor() { super() for (const name in interf) { const method = interf[name] t...
<gh_stars>0 package com.quasar.javatostring.json; public class SimpleObject { private final String aString; private final Integer anInteger; private final Boolean aBoolean; private final Object aNull; public SimpleObject() { aString = SimpleProperties.DEFAULT_STRING; anInteger = SimpleProperties.DEF...
<reponame>ES-UFABC/UFABCplanner import { forwardRef, useImperativeHandle, useState } from 'react'; import { FiX } from 'react-icons/fi'; import { IconButton } from '../IconButton'; import styles from './Modal.module.scss'; interface Props { children: React.ReactNode; title: string; onClose?: () => void; width...
package com.mcserver; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content...
<reponame>kavehjamshidi/url-shortener module.exports = (req, res) => { return res.status(200).render('about'); };
#!/bin/bash # Enable Fake KMS driver # ---------------------- # Author: Henrik Noerfjand Stengaard # Date: 2022-01-13 # # Bash script to enable fake kms driver. # Enabled use of DispmanX, but considered legacy # install install=0 # parse arguments for i in "$@" do case $i in -i|--install) install=1 shift...
#!/bin/bash set -euxo pipefail RELEASE_VERSION="$1" BRANCH="$2" REPOSITORY="$3" ACCESS_TOKEN="$4" generate_post_data() { cat <<EOF { "tag_name": "$RELEASE_VERSION", "target_commitish": "$BRANCH", "name": "$RELEASE_VERSION", "body": "", "draft": false, "prerelease": false } EOF } echo "Creating github re...
cd .. rm -rf ./Tamagotchi/bin/ rm -rf ./Tamagotchi/obj/ rm -rf ./Tamagotchi.Tests/bin/ rm -rf ./Tamagotchi.Tests/obj/ ./Commands/fresh.sh
Common properties of high-level programming languages include: object-oriented features such as abstraction and polymorphism, support for database access, built-in string manipulation capabilities, an extensive set of standard library functions, widespread availability of interpreters and compilers, support for multipl...
package math; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; /** * * @author minchoba * 백준 1940번: 주몽 * * @see https://www.acmicpc.net/problem/1940/ * */ public class Boj1940 { public static void main(String[] args) throws Exception{ // 버퍼를 통한 값 입력 Buffe...
// // Created by ooooo on 2020/1/8. // #ifndef CPP_0234_SOLUTION2_H #define CPP_0234_SOLUTION2_H #include "ListNode.h" class Solution { public: bool isPalindrome(ListNode *head) { if (!head || !head->next) return true; ListNode *low = head, *fast = head, *prev = nullptr, *temp = nullptr; ...
class MessagePublisher: def __init__(self, hermes_settings): self.hermes_settings = hermes_settings def publish_message(self, topic, message): if topic == 'TOPICS_ALL': topics = list(self.hermes_settings.PUBLISHING_TOPICS.keys()) else: topics = [topic] f...
import requests def generate_number(): url = 'https://www.random.org/integers/?num=1&min=1&max=10&col=1&base=10&format=plain&rnd=new' response = requests.get(url) if response.status_code == 200: return int(response.text) else: return None
import * as numjs from 'numjs'; import { IVehicle } from './ElementInterface'; import { ICanvasState } from '../components/Canvas/CanvasInterfaces'; import { magnitude, normalize, getCoordinateAfterRotation, limit, mapping, findNormalPoint } from '../utils/math'; import FlowField from './FlowField'; import Path from '....
'use strict'; Connector.artistSelector = '.mainPanel .artist'; Connector.albumSelector = '.mainPanel .album'; Connector.trackSelector = '.mainPanel .song'; Connector.playButtonSelector = '#mp3_play .musicPlay'; Connector.currentTimeSelector = '#mp3_position'; Connector.durationSelector = '#mp3_duration'; Connect...
<gh_stars>1-10 package de.core23.dicewars.controller; public class SettingsException extends Exception { private static final long serialVersionUID = 6394702369131537160L; public SettingsException(String message) { super(message); } }
#!/bin/bash script_dir=$(cd $(dirname ${BASH_SOURCE:-$0}); pwd) VOC_DIR=$script_dir/../../ # Directory that contains all wav files # **CHANGE** this to your database path db_root=~/data/LJSpeech-1.1/wavs/ spk="lj" dumpdir=dump # train/dev/eval split dev_size=10 eval_size=10 # Maximum size of train/dev/eval data (in...
#!./test/libs/bats/bin/bats load 'libs/bats-support/load' load 'libs/bats-assert/load' load 'helpers' setup() { setupNotesEnv } teardown() { teardownNotesEnv } export EDITOR=touch notes="./notes" @test "Configuration should override QUICKNOTE_FORMAT" { mkdir -p $HOME/.config/notes echo "QUICKNOTE_FORMAT=te...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.fhwa.c2cri.testprocedures; import java.sql.ResultSet; import java.util.ArrayList; import java.util.HashMap; import tmddv3verification.utilities.TMDDDatabase; /** * * @author TransCore ITS */ public class...
<filename>src/idtype/SelectionUtils.ts /* ***************************************************************************** * Caleydo - Visualization for Molecular Biology - http://caleydo.org * Copyright (c) The Caleydo Team. All rights reserved. * Licensed under the new BSD license, available at http://caleydo.org/lic...
def sort_strings(array): # Index of the string with the lowest alphabetical order min_index = 0 for i in range(1, len(array)): if array[i] < array[min_index]: min_index = i # Swap the elements array[i], array[min_index] = array[min_index], array[i] sort_strings(["dog", "cat", "apple", "banana"]) # Output: ['a...
<gh_stars>10-100 // // Created by ooooo on 2020/3/19. // #ifndef CPP_030__SOLUTION1_H_ #define CPP_030__SOLUTION1_H_ #include <iostream> using namespace std; class MinStack { private: struct Node { Node *next; int val; Node(Node *next, int val) : next(next), val(val) {} Node(int val) : val(val), ...
import numpy as np import pandas as pd import matplotlib.pyplot as plt # Constants F1 = 1.0 # High-pass filter corner F2 = 6.0 # Low-pass filter corner # Read seismic data from file seismic_data = pd.read_csv("ShakeNetwork2020.csv") # Apply high-pass filter filtered_data_high_pass = np.fft.fft(seismic_data["Seismi...
def fibonacci(n): a = 0 b = 1 if n < 0: print("Incorrect input") elif n == 0: return a elif n == 1: return b else: for i in range(2, n): c = a + b a = b b = c return b result = fibonacci(5) print(result)
<reponame>stardot/ncc /* * options.h -- compiler configuration options set at compile time * Copyright (C) Acorn Computers Ltd. 1988 * SPDX-Licence-Identifier: Apache-2.0 */ /* * RCS $Revision$ * Checkin $Date$ * Revising $Author$ */ #ifndef _options_LOADED #define _options_LOADED /* * The following conditi...
/******************************************************************************* * 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...
ACCOUNT_NUMBER=<YOUR_ACCOUNT_NUMBER> REGION=<YOUR_ACCOUNT_REGION> SOURCE_S3_BUCKET="eks-stepfunction-dev-source-bucket" TARGET_S3_BUCKET="eks-stepfunction-dev-target-bucket" ECR_REPO_NAME="eks-stepfunction-repo" aws ecr batch-delete-image --repository-name $ECR_REPO_NAME --image-ids imageTag=latest aws ecr batch-del...
/** * Copyright (c) 2020-present, <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 a...
<filename>data/init.sql DROP TABLE IF EXISTS `cdr`; CREATE TABLE `cdr` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `calldate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `clid` VARCHAR(80) NOT NULL DEFAULT '', `src` VARCHAR(80) NOT NULL DEFAULT '', `dst` VARCHAR(80) NOT NULL DEFAULT '', `d...
#/bin/bash # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distrib...
<reponame>penguincoder/uncomplicated_mutex<filename>uncomplicated_mutex.gemspec Gem::Specification.new do |s| s.name = 'uncomplicated_mutex' s.version = '1.2.2' s.date = '2017-04-06' s.summary = 'Redis. Lua. Mutex.' s.description = 'A mutex that uses Redis that is also not complicated.' ...
import requests import re def crawl(url): # make request to target url response = requests.get(url) # get the html from the response html = response.text # extract the links from the html links = re.findall(r'<a\shref="(.*?)"', html) # return the extracted links return links # crawl the website craw...
class Server: @staticmethod def web_server(context): # Simulate the setup of a web server using the provided context print(f"Setting up web server with context: {context}") @staticmethod def gunicorn(context): # Simulate the configuration of Gunicorn using the provided context ...
<filename>cypress/excluded/checkout_credit_card.spec.js<gh_stars>0 import { second } from '../fixtures/example.json'; describe('Checkout Credit Card Payments', () => { beforeEach(() => { // cy.useGateway(second); cy.clientLogin(); }); it('should be able to complete payment using checkout c...
<reponame>wetherbeei/gopar package main import ( "flag" "fmt" "io/ioutil" "os" "os/exec" "path" "path/filepath" "strings" ) var verbose = flag.Bool("verbose", false, "Print verbose compiler output") var leaveSource = flag.Bool("source", false, "Don't delete the transformed source") func main() { flag.Parse(...
package detector import "talisman/git_repo" type Details struct { Category string `json:"type"` Message string `json:"message"` Commits []string `json:"commits"` } type ResultsDetails struct { Filename git_repo.FilePath `json:"filename"` FailureList []Details `json:"failure_list"` WarningList []Details ...
def binary_search_recursive(array, target, start, end): if start > end: return -1 mid = (start + end) // 2 mid_element = array[mid] if mid_element == target: return mid elif target < mid_element: return binary_search_recursive(array, target, start, mid - 1) els...
package io.opensphere.hud.util; import io.opensphere.core.hud.framework.Component; import io.opensphere.core.hud.framework.Frame; import io.opensphere.core.hud.framework.layout.GridLayout; import io.opensphere.core.hud.framework.layout.GridLayoutConstraints; import io.opensphere.core.model.ScreenBoundingBox; im...
import time import curses def play_game(time_limit, tolerance): stdscr = curses.initscr() curses.noecho() stdscr.clear() stdscr.addstr(0, 0, "Press spacebar when the timer reaches zero.") stdscr.refresh() for t in range(time_limit, -1, -1): stdscr.addstr(1, 0, "Time left: {} seconds".f...
# File: F (Python 2.4) import random import math from panda3d.core import CullBinManager from pandac.PandaModules import NodePath, CardMaker, Point3, LineSegs, Vec3, Vec4, Vec2, GraphicsStateGuardian from direct.interval.IntervalGlobal import Sequence, Parallel, Wait, Func from direct.interval.MetaInterval import Para...
"use strict"; const fs = require('fs'); //save the original require let originalRequire = require; function loadModule(filename, module, require) { const wrappedSrc = `(function(module, exports, require) { ${fs.readFileSync(filename, 'utf8')} })(module, module.exports, require);`; eval(wrappedSrc); ...
<reponame>bobthered/algodaily<gh_stars>0 const lonelyNumber = arr => { return arr.filter( (a, _, arr) => [...arr].filter(b => a === b).length === 1, )[0]; }; module.exports = lonelyNumber;
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-FW/13-model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-FW/13-512+0+512-rare-first-256 --do_eval --per_device_e...
function rsync_exclude_file_parameter_list { local RSYNC_EXCLUDE_PARAMETER_LIST="" for EXCLUDE_FILE in $(find "${DOTFILES_PATH}/data/home-backup-exclude/" ! -type d); do RSYNC_EXCLUDE_PARAMETER_LIST="${RSYNC_EXCLUDE_PARAMETER_LIST} --exclude-from=${EXCLUDE_FILE}" done echo "${RSYNC_EXCLUDE_PAR...
<gh_stars>1-10 module PoolParty module CloudDsl def mount_ebs_volume_at(id="", loc="/data") ebs_volume_id id ebs_volume_mount_point loc ebs_volume_device "/dev/#{id.sanitize}" has_mount(:name => loc, :device => ebs_volume_device) has_directory(:name => loc) ...
#!/usr/bin/env bash ANDROID_SDK=/Users/lmy/Library/Android/sdk ANDROID_NDK=/Users/lmy/Library/Android/android-ndk-r14b build() { ARCH=$1 ABI= if [[ "$ARCH" = "armv7a" ]]; then echo "+--------------------------+" echo "|----webp build armv7a-----|" echo "+--------------------------+"...
#!/bin/bash source activate structural_edits export CUDA_VISIBLE_DEVICES=0 export PYTHONPATH=/scratch/yao.470/CMU_project/incremental_tree_edit:$PYTHONPATH config_file=$1 work_dir=exp_githubedits_runs/FOLDER_OF_MODEL # TODO: replace FOLDER_OF_MODEL with your model dir echo use config file ${config_file} echo work ...
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @provides...
<reponame>greggman/other-window-ipc<gh_stars>1-10 "use strict"; const otherWindowIPC = require('../other-window-ipc'); const log = require('./log'); process.on('uncaughtException', (err) => { log(err); log(err.stack); }); const channel = otherWindowIPC.createChannel("blarg"); channel.on('connect', stream => { ...
function formatToCurrency(num) { let stringNum = String(num); let len = stringNum.length; let outputStr = ''; let count = 0; for(let i = len - 1; i >= 0; i--) { outputStr = stringNum[i] + outputStr; count++; if(count % 3 == 0 && i != 0) { outputStr = '.' + outputS...
import React, {Component} from 'react'; import '../../App.css'; import '../404/404Page.css'; class FourFourErrorPage extends Component { render() { return ( <div id= 'fourfourError'> <h1 id= 'fourfourErrorText' className= "font-weight-bold align-middle text-center">Error 404 - ...
<filename>examples/ble_simpletest.py """ This example scans for any BLE advertisements and prints one advertisement and one scan response from every device found. """ from adafruit_ble import BLERadio ble = BLERadio() print("scanning") found = set() scan_responses = set() for advertisement in ble.start_scan(): ad...
import pigpio #sudo pigpiod from time import sleep pi = pigpio.pi() #먼저 사용할 pigpio.pi를 매칭해줍니다. while True: pi.set_servo_pulsewidth(17, 0) #18번 채널에연결된 서보모터를 꺼줍니다. pi.set_servo_pulsewidth(18, 0) pi.set_servo_pulsewidth(27, 0) sleep(1) pi.set_servo_pulsewidth(17, 1500) # 가운데로 이동 90도 pi.set_ser...
<filename>open-sphere-base/analysis/src/main/java/io/opensphere/analysis/table/renderers/TimeSpanTableCellRenderer.java package io.opensphere.analysis.table.renderers; import java.awt.Component; import java.text.SimpleDateFormat; import javax.swing.JTable; import javax.swing.table.DefaultTableCellRenderer; import io...
package org.jaudiotagger.tag.id3; import org.jaudiotagger.AbstractTestCase; import org.jaudiotagger.audio.mp3.MP3File; import org.jaudiotagger.tag.id3.framebody.FrameBodyCOMM; import java.io.File; /** * Test POPMFrameBody */ public class FrameCOMMTest extends AbstractTestCase { /** * Should run without th...
package com.udacity.jdnd.course3.critter.controller; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.web.server.LocalSer...