text
stringlengths
1
1.05M
from .strategies import strategies, param_space
import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; import { NavigationComponent } from 'react-native-material-bottom-navigation'; import { TabNavigator } from 'react-navigation'; import Icon from 'react-native-vector-icons/MaterialIcons'; import Main from '../M...
import { BlockPage } from '../../features/blocks/ui/pages/BlockPage'; export default BlockPage;
#!/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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distribut...
<reponame>Hiswe/schools-out<filename>so-api/models/lessons.js 'use strict' const Sequelize = require('sequelize') const dayjs = require('dayjs') const { sequelize } = require('../services') function getHour(stringTime) { const [h, m] = stringTime.split(`:`).map(v => ~~v) return dayjs() .set(`h`, h) .set(...
#ifndef MEMORY_CHECK_H #define MEMORY_CHECK_H int memory_creation_test(); int memory_destroy_check(); int memory_owner_check(); int memory_compare_check(); int memory_set_check(); int memory_move_check(); int memory_copy_check(); #endif // MEMORY_CHECK_H
package com.android_group10.needy.ui.InNeed; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.ImageButton; import android.wi...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.fhwa.c2cri.gui; import java.io.File; import javax.swing.table.AbstractTableModel; import org.fhwa.c2cri.gui.components.TestCaseCreationListener; import org.fhwa.c2cri.gui.components.TestCaseEditJButton; impo...
<reponame>BrunoGrisci/EngineeringDesignusingMultiObjectiveEvolutionaryAlgorithms /* Copyright 2009-2015 <NAME> * * This file is part of the MOEA Framework. * * The MOEA Framework is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published ...
#! /bin/bash set -e base=$( dirname $( readlink -f $0 ) ) name=$(basename $0 .sh) cd $base case "$name" in *64) echo "use 64-bit wine" source wine-staging-64.rc ;; *32) echo "use 32-bit wine" source wine-staging-32.rc ;; *) echo "UNKNOWN BITNESS from name \"$name\"" 1>&2 exit 1 ;; esac echo "WINE...
#!/bin/sh unzip -o primesieve-6.2-win64-console.zip echo "#!/bin/sh ./primesieve.exe \$@ > \$LOG_FILE" > primesieve-test chmod +x primesieve-test
TERMUX_PKG_HOMEPAGE=https://libexpat.github.io/ TERMUX_PKG_DESCRIPTION="XML parsing C library" TERMUX_PKG_LICENSE="BSD" TERMUX_PKG_VERSION=2.2.6 TERMUX_PKG_REVISION=1 TERMUX_PKG_SHA256=17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2 TERMUX_PKG_SRCURL=https://github.com/libexpat/libexpat/releases/downlo...
const SpotifyArtistLib = require('../lib/spotify/SpotifyArtistLib'); const { tokenExpiredHandler } = require('../utils/spotify/error-handlers'); class ArtistService { constructor() { this.spotifyArtistLib = new SpotifyArtistLib(); } async getMultipleArtists(ids) { let artists = null; ...
sentence = "He is working on it" word = "working" sentence = sentence.replace(word, "") print(sentence)
export MAIL_USERNAME='philipiaeveline13@gmail.com' export MAIL_PASSWORD='eveline3434' export API_BASE_URL='http://quotes.stormconsultancy.co.uk/random.json' export SECRET_KEY='evel' python3.7 manage.py server
/* Package cmn provides common functions for chaincode. */ package cmn import ( "crypto/sha512" "encoding/base64" "encoding/hex" "encoding/json" "errors" "github.com/hyperledger/fabric/core/chaincode/shim" . "github.com/kenmazsyma/soila/chaincode/log" ) // Put is a function for put data info ledger // parame...
import React from 'react'; const SVG = ({ fill = '#000', height = '100%', width = '100%', className = '', viewBox = '0 0 16 16', }) => ( <svg className={className} focusable="false" height={height} version="1.1" viewBox={viewBox} width={width} x="0px" xmlSpace="preserve" ...
# Get current work dir WORK_DIR=$(pwd) # Import global variables source $WORK_DIR/scripts/config/env.sh PYTHONPATH=$PYTHONPATH:$WORK_DIR python scripts/figures/figure7/pipeswitch_inception_v3/host_run_data.py $WORK_DIR/scripts/config/servers.txt
<filename>app/src/test/java/org/apache/taverna/mobile/ui/anouncements/AnnouncementPresenterTest.java /* * 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....
import React, { Component } from 'react'; import axios from 'axios'; class App extends Component { state = { posts: [], postText: '' }; componentDidMount() { axios.get('/posts').then(res => { this.setState({ posts: res.data }); }); } handleChange = e => { this.setState({ postText: e.target.value }); };...
<gh_stars>0 'use strict'; require('dotenv').config(); // Application Dependencies const express = require('express'); const cors = require('cors'); const pg = require('pg'); const superagent = require('superagent'); const methodOverride = require('method-override'); const PORT = process.env.PORT || 3000; const app = ...
import re def parse_function_declaration(declaration): pattern = r""" ^(?P<ws>[ \t]*) # Capture leading whitespace (?P<decl>.*\(\n # Capture the opening line, ending with (\n (?:.*,\n)* # Lines with arguments, all ending with ,\n .*...
def majority_element(arr): '''This function takes an array and returns the majority element, if exists. Otherwise, None is returned. ''' # Create a dictionary to store frequency of elements elem_count = {} for elem in arr: if elem not in elem_count: elem_count[elem] = 0 ...
def count_vowels(s): num_vowels = 0 for c in s.lower(): if c in 'aeiou': num_vowels += 1 return num_vowels print(count_vowels('hello world')) # 3
class WebsiteScraper(object): def __init__(self, url): self.url = url def scrapedata(self): response = requests.get(self.url) soup = BeautifulSoup(response.text) scraped_list = [] for item in soup.find_all('div'): data = { 'name': item.get('ti...
import { Controller, Get, Param, ParseIntPipe, Query } from '@nestjs/common' import { OraclePriceAggregated, OraclePriceAggregatedMapper } from '@src/module.model/oracle.price.aggregated' import { OracleTokenCurrencyMapper } from '@src/module.model/oracle.token.currency' import { ApiPagedResponse } from '@src/module.ap...
function find_row_with_largest_sum(arr){ let largestSum = 0; let rowNumber = 0; for(let i=0; i<arr.length; i++){ let sum = 0; for(let j=0; j<arr[i].length; j++){ sum += arr[i][j]; } if(sum > largestSum){ largestSum = sum; rowNumbe...
def get_fully_qualified_class_name(config: dict, component_name: str) -> str: if component_name in config: module_path = config[component_name]['MODULE'] class_name = config[component_name]['CLASS'] return f"{module_path}.{class_name}" else: return "Component not found in the con...
from typing import List def generate_healthcheck_targets(fcgi_targets: List[str]) -> List[str]: healthcheck_targets = [] for target in fcgi_targets: if ".py" in target: modified_target = target.split('.')[0] modified_target = modified_target.split('_')[0] + "_py_" + modified_tar...
<filename>sources/VS/ThirdParty/wxWidgets/tests/controls/notebooktest.cpp /////////////////////////////////////////////////////////////////////////////// // Name: tests/controls/notebooktest.cpp // Purpose: wxNotebook unit test // Author: <NAME> // Created: 2010-07-02 // Copyright: (c) 2010 <NAME>...
package org.quark.microapidemo.utility; import io.jsonwebtoken.*; import org.quark.microapidemo.RunnerContext; import org.quark.microapidemo.config.GlobalAppSettingsProperties; import org.quark.microapidemo.config.GlobalConfig; import javax.crypto.spec.SecretKeySpec; import javax.xml.bind.DatatypeConverter; import ja...
<filename>languages/sr.go package languages // SR - Serbian transliteration data. var SR = map[rune]string{ 0x110: "Dj", 0x111: "dj", }
const { getInfo } = require('./getInfo.js'); const testHostApi = (arg, callback) => { console.log('Test Host Api has been successfully called!', arg); callback('From Host: OK!'); }; module.exports = { getInfo, testHostApi, };
#!/bin/bash NODE_INDEX=$(hostname | tail -c 2) NODE_NAME=$(hostname) configureAdminUser(){ chage -E -1 -I -1 -m 0 -M 99999 "${ADMINUSER}" chage -l "${ADMINUSER}" } {{- if EnableHostsConfigAgent}} configPrivateClusterHosts() { systemctlEnableAndStart reconcile-private-hosts || exit $ERR_SYSTEMCTL_START_FAIL ...
#!/usr/bin/env bash set -x mvn package \ -Dxtdb.xtdb-version=${XTDB_VERSION:-"xtdb-git-version"} \ -Dxtdb.artifact-version=${XTDB_ARTIFACT_VERSION:-"xtdb-git-version"} \ -Dxtdb.uberjar-name=${UBERJAR_NAME:-xtdb.jar} $@
#!/bin/sh # # Copyright (c) 2010 Johan Herland # test_description='Test notes merging with manual conflict resolution' . ./test-lib.sh # Set up a notes merge scenario with different kinds of conflicts test_expect_success 'setup commits' ' test_commit 1st && test_commit 2nd && test_commit 3rd && test_commit 4th &...
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.TextTracking24 = factory()); }(this, (function () { 'use strict'; var _24 = { elem: 'svg', attrs: { xmln...
#!/bin/bash set -e if [ "$1" = "/opt/logstash/bin/logstash" ]; then exec "$1" agent -f /opt/conf/logstash.conf else exec "$@" fi
<filename>models/chims_models/states.js let mongoose = require('mongoose'); // States Schema let statesSchema = mongoose.Schema({ StateID: { type: Number }, StateCode: { type: String }, StateDesc: { type: String }, Country: { type: String } }); let Sta...
<gh_stars>0 /* * 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...
CODE_DIR=/Users/dennisleon/code alias java_ls='/usr/libexec/java_home -V 2>&1 | grep -E "\d.\d.\d[,_]" | cut -d , -f 1 | colrm 1 4 | grep -v Home' function java_use() { export JAVA_HOME=$(/usr/libexec/java_home -v $1) export PATH=$JAVA_HOME/bin:$PATH java -version } p() { local project_looking_for projec...
<filename>test/testMakeDirs.py # -*-coding:utf-8 -*- """ @author: yansheng @file: testMakeDirs.py @time: 2019/9/14 """ import os # dirpath = "./nihao"; # os.mkdir(dirpath); def mkdirs(path): # 引入模块 import os # 去除首末的空格 path = path.strip() # 去除尾部 \ 符号 path = path.rstrip("\\"...
<gh_stars>1-10 package com.singularitycoder.folkdatabase.auth.model; import com.google.firebase.firestore.Exclude; public class AuthUserApprovalItem { @Exclude private String docId; private String zone; private String memberType; private String directAuthority; private String email; priv...
unsorted_list = [14, 5, 6, 2, 8, 1, 10, 15, 9, 0, 4, 3, 11, 12, 7] # sorting algorithm for i in range(len(unsorted_list) - 1): min_index = i for j in range(i + 1, len(unsorted_list)): if unsorted_list[min_index] > unsorted_list[j]: min_index = j unsorted_list[i], unsorted_list[min_index...
#!/bin/bash FN="HIVcDNAvantWout03_1.26.0.tar.gz" URLS=( "https://bioconductor.org/packages/3.10/data/experiment/src/contrib/HIVcDNAvantWout03_1.26.0.tar.gz" "https://bioarchive.galaxyproject.org/HIVcDNAvantWout03_1.26.0.tar.gz" "https://depot.galaxyproject.org/software/bioconductor-hivcdnavantwout03/bioconductor-...
#! /bin/sh # Copyright (C) 2011-2017 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program ...
<gh_stars>1-10 #ifndef INCLUDED_ENGINE_ITEMS_SHOTGUN_WEAPON_SUB_SYSTEM_H #define INCLUDED_ENGINE_ITEMS_SHOTGUN_WEAPON_SUB_SYSTEM_H #include "engine/items/common_sub_system_includes.h" namespace engine { class ShotgunWeaponSubSystem : public SubSystem, public SubSystemHolder { public: DEFINE_SUB_SYSTEM_BASE( Shot...
#include <iostream> // Declaration of the base class for reference counted objects struct cef_base_ref_counted_t { int ref_count; cef_base_ref_counted_t() : ref_count(1) {} virtual ~cef_base_ref_counted_t() { std::cout << "Object deleted" << std::endl; } }; // Function to increment the refer...
import { LocalizationService } from './services/localizationservice'; import { OwnerService } from './services/ownerservice'; import { RouterConfiguration, Router } from 'aurelia-router'; import { autoinject } from 'aurelia-framework'; @autoinject export class App { private router: Router; constructor(private ow...
class DatasetProcessor: def __init__(self, reader, decoder, num_samples, items_to_descriptions, **kwargs): self.reader = reader self.decoder = decoder self.num_samples = num_samples self.items_to_descriptions = items_to_descriptions self.kwargs = kwargs self.kwargs['d...
# from prefect import Flow, task # from prefect.serialization.flow import FlowSchema # @task # def print_something(): # print('ok') # f = Flow("ex", tasks=[print_something]) # f.run() # prints ok # s = FlowSchema() # f2 = s.load(f.serialize()) # f2.tasks # has print_something task # f2.run() # doesn't print i...
// // UIButtonExtension.h // UIButtonExtension // // Created by <NAME> on 9/28/20. // #import <Foundation/Foundation.h> //! Project version number for UIButtonExtension. FOUNDATION_EXPORT double UIButtonExtensionVersionNumber; //! Project version string for UIButtonExtension. FOUNDATION_EXPORT const unsigned char...
#!/bin/bash # install vimrc file DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" if [ -f "${DIR}/.vimrc" ] then ln -s "${DIR}/.vimrc" "$HOME/.vimrc" fi # install pathogen mkdir -p ~/.vim/autoload ~/.vim/bundle && curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim # install badwolf and ...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ var portfolios_index_callDocumentReady_called = false; var portfolioTableAjax = ""; var portfolioPrefsDialog = ""; $(document).ready(function () { if (!portfolios_index_callDocumentReady_called) { port...
#! /usr/bin/env bash # Copyright 2014 Uno authors (see 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 by appli...
#include <iostream> #include <ctime> #include <cstdlib> int main() { srand(time(NULL)); int randomNumber = rand() % 10000 + 1; std :: cout << randomNumber << std :: endl; return 0; }
<reponame>bigint/lute-drop<filename>hardhat.config.ts import "@nomiclabs/hardhat-etherscan"; import "@nomiclabs/hardhat-waffle"; import "@nomiclabs/hardhat-ethers"; import "@nomiclabs/hardhat-waffle"; import "@typechain/hardhat"; import "hardhat-gas-reporter"; import "solidity-coverage"; import dotenv from "dotenv"; im...
mkdir -p /pgdata/data chown postgres:postgres /pgdata/data chmod 700 /pgdata/data /scripts/su-exec postgres /usr/bin/initdb -D /pgdata/data /bin/cp -f /scripts/config/* /pgdata/data chown -R postgres:postgres /pgdata/data su - postgres export POD_NAME="citus-0" export POD_NAMESPACE="default" export POD_GROUP="citus"...
#!/bin/bash #------------------------------------------------------------------------ # Utility methods # fatal() { echo "credentials-local.sh: fatal: $1" 1>&2 exit 1 } info() { echo "credentials-local.sh: info: $1" 1>&2 } if [ -z "${NYPL_NEXUS_USER}" ] then fatal "NYPL_NEXUS_USER is not defined" fi if [ -z...
#Imports import numpy as np import tensorflow as tf tf.random.set_random_seed(42) # Input x = tf.placeholder(tf.float32, shape=[None, 28, 28]) # Network conv1 = tf.layers.conv2d(x, filters=32, kernel_size=3, strides=2, padding='same', activation=tf.nn.relu) pool1 = tf.layers.max_pooling2d(inputs=conv1, pool...
x=$(grep "; time" $1| sed 's/^.*: //' | sed 's/ms.*//') let counter=0 for i in $x do # echo $i if [[ "$i" =~ ^[0-9]+$ ]] then ((sum += i)) ((counter += 1)) fi done echo "sum of all time: $sum ms" echo "number of requests: $counter" echo "average latency: $(($sum/$counter)) ms"
using System; // Partial implementation of the event handling class public class EventHandler { // AddHandler method for subscribing to events public void AddHandler(EventHandlerDelegate handler) { _handler += handler; } // TriggerEvent method for triggering events public void TriggerE...
/* * @Author: dang * @Date: 2021-08-11 09:36:00 * @LastEditTime: 2021-09-09 21:39:05 * @LastEditors: Please set LastEditors * @Description: A worm * @FilePath: \iot_gxhy_reservoirdam_web\src\views\systemManagement\user\api.js */ import request from "@/utils/request"; const prod = process.env.VUE_APP_BASE_API_6; ...
import Axios from 'axios'; import database from '../firebase'; const apiUrl = 'https://jsonplaceholder.typicode.com/photos'; export const fetchBooksSuccess = (books) => { return { type: 'FETCH_BOOKS_SUCCESS', books } }; export const createBookSuccess = (book) => { return { type: '...
/* * Copyright (c) 2020. <NAME>, Partners Healthcare and members of Forome Association * * Developed by <NAME> and <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 * * h...
<filename>src/js/_router.js pikaDeck.router = {}; (function() { "use strict"; this.init = function() { var hash = window.location.hash.split('?'); var search = window.location.search.replace('?', ''); var rawQuery = _getQuery(hash[1], search); var query = _queryTo...
#!/bin/bash source scripts/deploy-common.sh; echo "--- :gcloud: Publishing to Artifact Registry..."; publish gcloud; echo "Publish to Artifact Registry complete.";
import { useEffect, useState } from "react"; import Moment from 'react-moment'; import "./style.css"; function DataDisplay(props) { // const [sortedNames, setSortedNames] = useState(null); // const firstName = props.results; // let sortedFirstNames = [firstName]; // console.log("this is what you want",...
BASEURL=https://${CIRCLE_BUILD_NUM}-41881188-gh.circle-artifacts.com/0/vsoch.github.io sed -i "63 s,.*,destination: ./_site,g" "_config.yml" sed -i "6 s,.*,baseurl: $BASEURL,g" "_config.yml"
#!/bin/bash function is_fpga_installed { lspci | grep -E -q "Xilinx|(1d22:2011)" && return 0 || return 1 } function detect_fpga_type { (lspci -d 1d22:2011 -nn | grep -q "") && eval "$1='cnn'" && return (lspci -d 10ee:9038 -nn | grep -q "") && eval "$1='dev'" && return (lspci -d 10ee:8038 -nn | grep -q...
function isPalindrome(str) { // Remove non-alphanumeric characters and convert to lowercase const cleanStr = str.replace(/[^a-zA-Z0-9]/g, '').toLowerCase(); // Check if the clean string is equal to its reverse return cleanStr === cleanStr.split('').reverse().join(''); } // Test cases console.log(isPalindrom...
SELECT TOP 3 name FROM customers ORDER BY COUNT(purchase) DESC;
#!/bin/bash set -e set -x PYTHON_VERSION=$1 BITNESS=$2 if [[ "$PYTHON_VERSION" == "36" || "$BITNESS" == "32" ]]; then # For Python 3.6 and 32-bit architecture use the regular # test command (outside of the minimal Docker container) cp $CONFTEST_PATH $CONFTEST_NAME pytest --pyargs sklearn python -...
package models import "gopkg.in/mgo.v2/bson" /* User Model Represents a User, we uses bson keyword to tell the mgo driver how to name the properties in mongodb document */ type User struct { ID bson.ObjectId `bson:"_id" json:"id"` FirstName string `bson:"first_name" json:"first_name"` LastName strin...
from flask import Flask, render_template, request, session app = Flask(__name__) app.secret_key = 'secretkey' @app.route('/signup', methods=['GET', 'POST']) def signup(): if request.method == 'GET': return render_template('signup.html') else: email = request.form['email'] password = re...
#!/bin/sh sed -i \ -e 's/rgb(0%,0%,0%)/#3c3c3c/g' \ -e 's/rgb(100%,100%,100%)/#d4d4d4/g' \ -e 's/rgb(50%,0%,0%)/#3c3c3c/g' \ -e 's/rgb(0%,50%,0%)/#97bf60/g' \ -e 's/rgb(0%,50.196078%,0%)/#97bf60/g' \ -e 's/rgb(50%,0%,50%)/#4c4c4c/g' \ -e 's/rgb(50.196078%,0%,50.196078%)/#4c4c4c/g' \ ...
import re text = "This is a text about code" pattern = r"\bcode\b" result = re.findall(pattern, text) print(result)
<gh_stars>10-100 import React, { useState } from 'react'; import { Link } from 'react-router-dom'; import Navlink from './Navlink/Navlink'; import Sidebar from './Sidebar/Sidebar'; import routes from '../../../shared/routes'; import classes from './navbar.module.css'; import logo from '../../../assets/logo.svg'; impo...
import argparse from .face_detect import sort_faces def argParser(): """ The main CLI function """ parser = argparse.ArgumentParser() parser.add_argument("path", help="Path to the folder where all your images are stored.", type=str) args = parser.parse_args() try: ...
package main import ( "context" "errors" "fmt" "strings" "testing" "github.com/google/go-github/github" ) func TestCreateDeployment(t *testing.T) { repoName := "testowner/testrepo" client := newTestGitHubClient() deployment, err := createDeployment( client, PullRequestEvent{ Repository: GitHubRep...
#Author : Sharmo , Sarita # This is a bash utility that helps shipping the required data across EC2 Master/Slave instances ip=`cat /tmp/hostEntry.txt|cut -d' ' -f2-` path=/tmp fileNumber=0 suffix=".txt" keyValue=KEY-VALUE for line in $ip do rm -rf $path/filename mkdir $path/filename mv $path/$fileNumber$suffix $p...
<reponame>nilslice/crates.io ALTER TABLE versions ALTER COLUMN features DROP NOT NULL; ALTER TABLE versions ALTER COLUMN features DROP DEFAULT; ALTER TABLE versions ALTER COLUMN features SET DATA TYPE text;
var fs = require('fs'); var path = require('path'); var basename = path.basename(module.filename); module.exports = function(app) { fs .readdirSync(__dirname) .filter(function(file) { return (file.indexOf('.') !== 0) && (file !== basename); }) .forEach(function(file) { if (file.slic...
sudo apt-get install terminator sudo apt-get install vim sudo apt-get install zsh sudo apt-get install git sudo apt-get install g++ sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
// 15815. 천재 수학자 성필 // 2021.11.10 // 자료구조, 스택 #include<iostream> #include<stack> #include<string> using namespace std; int main() { int ans = 0; stack<int> st; string s; cin >> s; int a, b; for (int i = 0; i < s.size(); i++) { switch (s[i]) { case '+': ...
CUDA_VISIBLE_DEVICES=0 \ python -m torch.distributed.launch \ --nproc_per_node=1 \ --master_port=1717 \ train_3DMM_v4.py \ --name debug \ --path /glab2/Users/ljiayi/Semantic_Face/Generative_Model/3DMM/stylegan2-pytorch/lmdbs/com_LS_TG_2 \ --arch stylegan2 \ --iter 3 \ --batch 1 \ --n_sample 1 \ --size 512 \ --r1 10.0 \...
# Start bot ./ConsoleApp1
<filename>index.js var express = require('express'); var app = express(); app.use('/', express.static(__dirname + '/src')); app.set('port', (process.env.PORT || 5000)); app.listen(app.get('port'));
<reponame>qngapparat/soak-js const amazon = require('./amazon'); const google = require('./google'); const { getExecutingPlatform } = require('./utils'); /** * * @param {Function} func The userfunction to run * @param {SoakConfig} config Optional config */ function universalSoak(func, config = {}) { // kind o...
<filename>tests/test_runstatus_page_maintenance.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- import pytest from exoscale.api.runstatus import * from datetime import timezone class TestRunstatusPageMaintenance: def test_add_event(self, exo, runstatus_page): page = Page._from_rs(exo.runstatus, runstat...
<gh_stars>1-10 # Generated by Django 3.2.12 on 2022-02-11 14:06 from django.conf import settings import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): i...
<reponame>planetsolutions/pa-front import {Component, HostListener, OnDestroy, OnInit} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; import {animate, state, style, transition, trigger} from '@angular/animations'; import { Search, SearchComposition, Application, ResultMaster, ResultMaster...
<reponame>ocamler/expense-www<gh_stars>1-10 import $ from 'jquery'; import React, { Component } from 'react'; import { connect } from 'react-redux'; @connect( state => ({ location_name: state.location_name }) ) export default class extends Component { render() { const { location_name } = this.props; ...
<reponame>seawindnick/javaFamily<gh_stars>1-10 package com.java.study.algorithm.zuo.cadvanced.advanced_class_03; /** * Morris遍历 利用Morris遍历实现二叉树的先序,中序,后续遍历,时间复 杂度O(N),额外空间复杂度O(1)。 */ public class Code_01_MorrisTraversal{ }
def knapsack(weights, values, max_weight): n = len(weights) bag = [] value = 0 while max_weight > 0 and n > 0: weight_ratio = [values[i]/weights[i] for i in range(n)] max_index = weight_ratio.index(max(weight_ratio)) if weights[max_index] > max_weight: n...
<filename>src/pages/index.js import Link from 'gatsby-link'; import PropTypes from 'prop-types'; import React, { PureComponent } from 'react'; import { css } from 'glamor'; import { COLORS } from 'theme'; const container = css({ marginTop: '30px', display: 'flex', justifyContent: 'center', width: '100%', }); c...
#!/bin/bash set -e # exit on any error # short version of http://www.howtoforge.com/vboxheadless-running-virtual-machines-with-virtualbox-4.1-on-a-headless-ubuntu-12.04-server EXTENSION_PACK_URL='http://download.virtualbox.org/virtualbox/4.3.4/Oracle_VM_VirtualBox_Extension_Pack-4.3.4-91027.vbox-extpack' echo 'deb htt...
#!/bin/bash # Set prompt colors RED='\033[0;31m' GREEN='\u001b[32m' YELLOW='\u001b[33m' NC='\033[0m' # Check if user is root if [ $EUID -ne 0 ] then echo -e "${RED}-Run as Root-${NC}" exit fi # Print out IP addresses ifconfig # Prompt user for IP and network addres echo "Enter your ip address:" read ip_addres...
<gh_stars>10-100 /** * Created by FDD on 2017/10/12. * @desc 自定义鹰眼控件 */ import ol from 'openlayers'; import { BASE_CLASS_NAME, OVERVIEWMAP } from '../constants'; import * as htmlUtils from '../utils/dom'; import * as Events from '../utils/events'; ol.control.OverviewMapH = function (options = {}) { /** * @type ...
<filename>core/src/test/java/org/hisp/dhis/android/core/program/internal/ProgramEndpointCallShould.java /* * Copyright (c) 2004-2021, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condit...