text
stringlengths
1
1.05M
import ConnectionsList from "../ConnectionsList"; import { mount, shallow } from "enzyme"; import { forcePromiseResolve } from "../../test/testhelpers"; import { componentWithStore, createMockStore } from "../../test/testhelpers"; import { getPreFabSocialGraph } from "../../test/testGraphs"; import { getPrefabProfile }...
package br.edu.ufcspa.tc6m.controle; import android.app.Activity; import android.app.DatePickerDialog; import android.app.Dialog; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.media.Image; import android.net.Uri; import android.os.Bundle; import an...
#!/bin/bash # Copyright 2016 Korea University & EMCS Labs (Author: Hyungwon Yang) # Apache 2.0 # # This script duplicates a givien text file that transcribed wav file # along with the names of all wave files. # Let's say you have 100 wave files recorded "I want to go to school". # All the wave files are written in ...
#!/usr/bin/env sh # generated from catkin/python/catkin/environment_cache.py # based on a snapshot of the environment before and after calling the setup script # it emulates the modifications of the setup script without recurring computations # new environment variables # modified environment variables export CMAKE_...
<reponame>reekoheek/yesbee 'use strict'; const Message = require('../message'); const co = require('co'); const _ = require('lodash'); const HEARTBEAT = 60000; module.exports = function *(execution) { if (!process.send) { throw new Error('Worker must be forked from daemon process'); } // var exchanges = {...
rosparam load picop/picop.yaml physical_displays/picop rosparam load picop/vdisp.yaml virtual_displays/picop/vdisp rosparam load picop/vdisp_mirror.yaml virtual_displays/picop/vdisp_mirror
<gh_stars>0 package cn.cerc.jbean.services; import cn.cerc.jbean.core.AbstractService; import cn.cerc.jbean.core.IStatus; import cn.cerc.jbean.core.ServiceException; import cn.cerc.jbean.other.SystemTable; import cn.cerc.jdb.core.DataSet; import cn.cerc.jdb.core.Record; import cn.cerc.jdb.mysql.SqlQuery; public class...
#!/bin/bash C_RESET='\033[0m' C_RED='\033[0;31m' C_GREEN='\033[0;32m' C_BLUE='\033[0;34m' C_YELLOW='\033[1;33m' C_PURPLE='\033[1;35m' # println echos string function println() { echo -e "$1" } # errorln echos i red color function errorln() { println "${C_RED}${1}${C_RESET}" } # successln echos in green color fu...
class Story { constructor() { this.chapters = []; this.currentChapterIndex = 0; } addChapter(title, content) { this.chapters.push({ title, content }); } getCurrentChapter() { if (this.chapters.length === 0) { return { title: "The End", content: "" }; } return this.chapters[this...
const strs = ["a", "b", "c"]; const ints = [1, 2, 3]; const combineArrays = (strs, ints) => { const obj = {}; for (let i = 0; i < strs.length; i++) { const str = strs[i]; const int = ints[i]; obj[str] = int; } return obj; }; const obj = combineArrays(strs, ints); console.log(obj); // Output: {a: 1...
// 1240. 단순 2진 암호코드 // 2019.07.03 #include<iostream> #include<algorithm> #include<string> #include<map> using namespace std; int main() { int t; cin >> t; // 맵에 문제에있는 암호를 미리 저장함 map<string, int> password; password["<PASSWORD>"] = 0; password["<PASSWORD>"] = 1; password["<PASSWORD>"] = 2; password["<PASSWORD>"...
#!/usr/bin/env sh # 当发生错误时中止脚本 set -e # 构建 yarn build # cd 到构建输出的目录下 cd dist # 部署到自定义域域名 # echo 'www.example.com' > CNAME git init git add -A git commit -m 'deploy' # 部署到 https://<USERNAME>.github.io # git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master # 部署到 https://<USERNAME>.github.io/<REPO>...
#!/usr/bin/env bash echo Building justondavies/go_keyring:build sudo docker build \ --network host \ --file dockerfiles/all.docker \ --tag justondavies/go_...
<filename>NetBeans login project/src/finalproject/UserRoles.java<gh_stars>0 /* * 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 finalproject; import static finalproject.Fi...
function(page, done) { var dom = page.getIdleDom(); const what = 'idle'; var lable = 'HEAD'; //if (some requirement) var meta_ks = dom.querySelectorAll('meta[name="keywords"]'); if (meta_ks.length > 0) { if(meta_ks > 1) { done(this.createResult(lable, 'Multiple unnecessary meta keywords tags found...
<filename>scs-web/src/main/java/com/zhcs/service/MonitordevService.java package com.zhcs.service; import com.zhcs.entity.MonitordevEntity; import java.util.List; import java.util.Map; //***************************************************************************** /** * <p>Title:MonitordevService</p> * <p>Descripti...
<gh_stars>100-1000 import BlueKit from './app/Page.react'; export default BlueKit
import _ from 'lodash'; import cx from 'classnames'; /* * == BSD2 LICENSE == * Copyright (c) 2017, Tidepool Project * * This program is free software; you can redistribute it and/or modify it under * the terms of the associated License, which is identical to the BSD 2-Clause * License as published by the Open So...
#!/usr/bin/env bash set -e # Notes: install required libraries #sudo apt-get install libboost-all-dev #sudo apt-get install libwebsocketpp-dev mkdir -p build pushd build cmake .. cmake --build . --target install popd
<filename>AP2/src/teorica/Empregado.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 teorica; /** * * @author PauloCésar */ public abstract class Empregado { ...
// Fees.java // Displays tuition and book fees import java.util.Scanner; class Fees { public static void main(String[] args) { double creditHours; final double HOUR_FEE = 85; double tuitionFee; double bookFee; final double ATHLETIC_FEE = 65; double sum; S...
def find_two_add_up_to_target(nums, target): for num1 in nums: for num2 in nums: if num1 + num2 == target: return True return False
from pathlib import Path import shutil def organize_files(source_dir, dest_dir): source_path = Path(source_dir) dest_path = Path(dest_dir) # Move files based on naming conventions for file in source_path.iterdir(): if file.is_file(): if file.name.startswith('dir1'): ...
#!/bin/bash set -eu # Install the system dependencies needed by OASIS # date > /tmp/provision.notes echo "Installing dependencies for OASIS on Ubuntu Trusty" >> /tmp/provision.notes APTOPTS=-y export DEBIAN_FRONTEND=noninteractive # pre-answer interactive configuration for Postfix debconf-set-selections <<< "postf...
package suffixtree; import suffixtree.exceptions.*; import java.util.HashMap; import java.util.Collection; import java.util.Map; /** * General node usable for any tree consisting of * nodes that have from zero to multiple children. * * @param <L> Type of edge labels used in the tree */ public class Node<L> { ...
<filename>src/items/actors/package-info.java<gh_stars>0 /** * Package for the different actors a population can have. */ package items.actors;
package mesos import ( "errors" ) var ( ErrInvalidResponse = errors.New("Invalid response from Mesos") ErrDoesNotExist = errors.New("The resource does not exist") ErrInternalServerError = errors.New("Mesos returned an internal server error") ErrSlaveStateLoadError = errors.New("An error was encountered lo...
#!/bin/bash #curl "http://httpbin.org/post" \ curl "" \ --include \ --request POST \ --data-urlencode "credentials[email]=$EMAIL" \ --data-urlencode "credentials[password]=$PASSWORD" \ --data-urlencode "credentials[password_confirmation]=$PASSWORD" # --header "Content-Type: application/x-www-form-urlencode...
<reponame>geyan0124/common-admin package com.common.system.entity; import java.beans.Transient; import java.util.Date; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.activerecord.Model; import com.baomidou.mybatisplus.annotations.TableName; import java.io.Serializable; import j...
import { DatabaseReference, FirebaseOperation, DatabaseSnapshot } from '../interfaces'; import { checkOperationCases } from '../utils'; export function createDataOperationMethod<T>(ref: DatabaseReference, operation: string) { return function dataOperation<T>(item: FirebaseOperation, value: T) { return checkOper...
#!/bin/bash # 导入 .env 环境变量 source ./.env # 要备份的表 tables="admin_menu admin_permission_menu admin_permissions admin_role_menu admin_role_permissions admin_role_users admin_roles admin_settings admin_users tags types lessons tagables videos" # 执行备份 mysqldump --host="${DB_HOST}" --port=${DB_PORT} --user="${DB_USERNAME}" ...
def calculateSphereVolume(radius): volume = (4/3) * (3.142) * (radius**3) return round(volume, 2) radius = 5 result = calculateSphereVolume(radius) print(result) # Output: 523.6
def get_nth(arr, n): return arr[n-1] arr = [2, 4, 7, 12, 15, 16, 23] result = get_nth(arr, 3) print(result)
import React from 'react' import classNames from 'utils/classnames' import PropTypes from 'prop-types' const SidePanel = (props) => { const { className, children } = props const modifiedClassName = classNames('side-panel', className) return ( <nav role='navigation' className={modifiedClassName}...
#!/bin/bash ORNG='\033[0;33m' NC='\033[0m' W='\033[1;37m' LP='\033[1;35m' YLW='\033[1;33m' LBBLUE='\e[104m' 1='gmail' 2='error' 3='login' 4='password' 5='authenticator' 6='sms' 7='touchscreen' HOSTOPT='' # CredSniper Options Selections cred_opts(){ echo -e "${W}Please choose the module to use${NC}" echo -e "${YLW}1...
from bs4 import BeautifulSoup import requests import collections URL = "https://example.com" page = requests.get(URL) soup = BeautifulSoup(page.content, 'html.parser') text = soup.get_text().split() wordcount = collections.Counter(text) top_words = wordcount.most_common(10) print(top_words)
<filename>rangeCompress/code/python/read_Lbl.py # # Import necessary libraries # import os def lbl_Parse(fname): # # Define instrument modes # # # Subsurface sounding # SSInstrMode = { 'SS01': {'Mode': 'SS01', 'Presum': 32, 'BitsPerSample': 8}, 'SS02': {'Mode': 'SS02','Presum': 28, 'Bi...
public class PrimeNumber { public static void main(String[] args) { int n = 25; for(int i = 2; i <= n; i++) { boolean isPrime = true; // Check if i is prime for(int j = 2; j < i; j++) { if(i % j == 0) { isPrime = false; break; ...
package io.cattle.platform.core.constants; import io.cattle.platform.core.addon.metadata.InstanceInfo; import io.cattle.platform.core.model.Instance; import io.cattle.platform.core.util.PortSpec; import io.cattle.platform.core.util.SystemLabels; import io.cattle.platform.object.util.DataAccessor; import io.cattle.pla...
#!/bin/bash source ./venv/bin/activate while true do python3 Source/mailfilter.py --interactive done
#!/bin/bash set -ex /usr/bin/ossutil config -e $ENDPOINT -i $ACCESS_KEY_ID -k $ACCESS_KEY_SECRET /usr/bin/ossutil $@
// // XHLoadingNavigationItemTitleView.h // XHLoadingNavigationItemTitleView // // Created by qtone-1 on 14-4-10. // Copyright (c) 2014年. All rights reserved. // #import <UIKit/UIKit.h> @interface XHLoadingNavigationItemTitleView : UIView @property (nonatomic, strong) UIColor *titleColor; // default is [UIColor ...
def filter_strings(list_of_strings): return list(filter(lambda x: x.isalpha(), list_of_strings)) print (filter_strings(list_of_strings)) # Output: ['Hello', 'World', 'This is a string.']
#!/usr/bin/env sh set -e arch=$1 if [[ $arch == "" ]]; then arch=amd64 fi BASEIMAGE=amd64/alpine:3.6 if [[ $arch == "arm64" ]]; then BASEIMAGE=arm64v8/alpine:3.6 fi root_path=$(dirname $0)/../.. cni_tag=$(cat ${root_path}/version/next/CNI_Plugins) agent_tag=$(cat ${root_path}/version/next/CNI_Agent) image=cc...
package csv // Path is the name of CSV file ready for PostgresSQL copy command. const Path = "cnpj.csv.gz"
#!/bin/bash # Install test # include err() and new() functions and creates $dir . ./lib.sh new "Set up installdir $dir" new "Make DESTDIR install" (cd ..; make DESTDIR=$dir install) if [ $? -ne 0 ]; then err fi new "Check installed files" if [ ! -d $dir/usr ]; then err $dir/usr fi if [ ! -d $dir/www-data ];...
#!/bin/bash kubectl delete -f deploy
package co.infinum.goldfinger; /** * Legacy implementation for pre-Marshmallow devices. */ class LegacyGoldfinger implements Goldfinger { @Override public boolean hasFingerprintHardware() { return false; } @Override public boolean hasEnrolledFingerprint() { return false; } ...
<gh_stars>0 package uk.ac.glos.ct5057.assignment.s1609415.algorithms; import uk.ac.glos.ct5057.assignment.s1609415.map.MapGraph; import java.util.ArrayList; import java.util.HashMap; /** * This class searches for the shortest path between two points using Dijkstra's Algorithm * * @author <NAME> * @version 1.0 ...
#coding:utf-8 import numpy as np b = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) print(b) print("="*40) #知识点:(1)修改shape属性和调用reshape()方法;(2)-1的使用;(3)共享内存 # # # 当某个轴为-1时,将根据数组元素的个数自动计算此轴的长度 b.shape = 2, -1 print(b) print(b.shape) print("="*40) # b.shape = 3, 4 print(b) print("="*40) # # # # 使用reshape方法,...
package com.learning.Springboot.tutorial.controller; import java.util.List; import javax.validation.Valid; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.DeleteMapping; import org.springf...
from django.utils import timezone from django.http import Http404 from django.shortcuts import get_object_or_404 from django.contrib.auth.models import User from django.db.models import Q from taggit.models import Tag from rest_framework.views import APIView from rest_framework.generics import ListAPIView from rest_fr...
<filename>spec/models/parsers/edi/etf/policy_loop_spec.rb require 'spec_helper' describe Parsers::Edi::Etf::PolicyLoop do describe 'id' do let(:id) { '1234' } let(:raw_loop) { {"REFs" => [['', qualifier, id]]} } let(:policy_loop) { Parsers::Edi::Etf::PolicyLoop.new(raw_loop) } context 'qualified as ...
<filename>server/src/intercept/server/NoRouteException.java package intercept.server; import java.net.URI; public class NoRouteException extends RuntimeException { public NoRouteException(URI url) { super("No route available for " + url); } }
import sqlalchemy as sa from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship Base = declarative_base() class Category(Base): __tablename__ = 'category' id = sa.Column('id', sa.Integer, primary_key=True) class SubCategory(Base): __tablename__ = 'sub_category' ...
<reponame>hangmann/Temperature-Management-and-Prediction<filename>TMS_Host/TemperatureViewer/src/controller/C_HeaterControl.java package controller; import java.io.IOException; import model.M_TemperatureMeasurementSystem; import view.V_HeaterControl; public class C_HeaterControl { V_HeaterControl v_HC; C_Temperat...
#!/bin/sh cde chemdner prepare_tokens data/chemdner-1.0/evaluation.abstracts.txt --annotations data/chemdner-1.0/evaluation.annotations.txt --tout data/cde-ner/chemdner-evaluation-tag.txt --lout data/cde-ner/chemdner-evaluation-label.txt cde chemdner prepare_tokens data/chemdner-1.0/training.abstracts.txt --annotation...
SELECT department_name FROM employee WHERE id IN (SELECT MIN(id) FROM employee GROUP BY department_name)
#!/bin/sh mkdir -p ~/backup/test1 mkdir -p ~/backup/test2 mkdir -p ~/backup/test3 echo "store1" > ~/backup/test1/test1.txt echo "store2" > ~/backup/test1/test2.txt echo "store3" > ~/backup/test2/test3.txt echo "store4" > ~/backup/test2/test4.txt echo "store5" > ~/backup/test3/test5.txt echo "store6" > ~/backup/test...
<gh_stars>10-100 package io.jenkins.plugins.coverage.model; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.*; /** * Tests the class {@link CoverageMetric}. * * @author <NAME> */ class CoverageMetri...
import React, {useState, useEffect, useRef} from 'react'; import Axios from 'axios'; import * as am4core from '@amcharts/amcharts4/core'; import * as am4charts from '@amcharts/amcharts4/charts'; const PriceChart = () => { const chart = useRef(null); const [chartData, setChartData] = useState([]); useEffect(() =...
function mockSendRequest(provider, expectedParams, expectedResponse) { const sendRequestSpy = jest.spyOn(provider, 'sendRequest'); return { verifySendRequest: (expectedParams) => { expect(sendRequestSpy).toHaveBeenCalled(); const params = sendRequestSpy.mock.calls[0][0]; expect(params).toMatc...
/* * Copyright 2017 - Swiss Data Science Center (SDSC) * A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and * Eidgenössische Technische Hochschule Zürich (ETHZ). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Lic...
<reponame>pezng/three<gh_stars>0 import { Material } from 'three'; export abstract class AbstractMaterial<T extends Material> { object!: T; }
// // Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.2 generiert // Siehe <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a> // Änderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. // Generiert: 2020.0...
#!/bin/bash #读取配置文件数据 for line in `cat conf/common.conf | grep -Ev '^$|#'` do eval "$line" done #hadoop上配置优先处理 hadoop_conf_path=/${hive_province}/conf/date.conf for line in `hadoop fs -cat ${hadoop_conf_path} | grep -Ev '^$|#'` do eval "$line" done modelType=$1 startDate=${startDate} endDate=${endDate} isUpdateDa...
<reponame>zzApotheosis/Personal-Projects #include <stdlib.h> #include <stdio.h> #include "include/util.h" size_t util_strlen(char* s) { size_t l = (size_t) 0u; char* i = s; while (*i != '\0') { l++; i++; if (l >= UTIL_STR_MAX_LEN) return l; } return l; }
<gh_stars>0 package com.ramsaysmith.ultrame; import android.animation.ObjectAnimator; import android.app.Activity; import android.app.AppOpsManager; import android.app.usage.NetworkStats; import android.app.usage.NetworkStatsManager; import android.content.Context; import android.content.SharedPreferences; import andr...
#!/bin/bash # run from wolfssl root # SECP256R1 openssl ecparam -name prime256v1 -genkey -noout -out certs/statickeys/ecc-secp256r1.pem openssl ec -inform pem -in certs/statickeys/ecc-secp256r1.pem -outform der -out certs/statickeys/ecc-secp256r1.der # DH 2048-bit (keySz = 29) # Using one generated and capt...
import random def find_element(lower_limit, upper_limit, search_element): # generate a random array rand_arr = [random.randint(lower_limit, upper_limit) for _ in range(10)] # search for the first occurrence of the search_element for i in range(len(rand_arr)): if rand_arr[i] == search_element: ...
#!/bin/sh if ! test -d "$1" then exec echo Provide a directory to install to, e.g.: ./install.sh ../pokemon-online else install_to=$1 echo Installing to $install_to cp -f `pwd`/scripts.js ${install_to}/bin cp -f `pwd`/COPYING ${install_to}/bin/ZSCRIPTS_COPYING if test -h ${install_to}/bin/js_mod...
def sort_lexicographically(str1, str2): list1 = list(str1) list2 = list(str2) list1.sort() list2.sort() if list1 < list2: return str1 + str2 else: return str2 + str1 str1 = "hello" str2 = "world" sorted_string = sort_lexicographically(str1, str2) print(sorted_string...
package io.github.seniya2.bar; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource public interface BarRepositoryRestResource extends PagingAndSortingRepository<Bar, String>{ }
#bin/bash/'!¡ echo "" echo "" echo "Installing Packages" echo "===================" echo "By @certified_youtuber" echo "===================" echo "" apt update pkg install python -y apt upgrade pip install lolcat pkg install mpv -y pkg install figlet -y cp bash.bashrc $PREFIX/etc clear echo "" echo "" echo "Installed ...
package org.museautomation.ui.step.groups; import org.museautomation.core.*; import org.museautomation.core.step.descriptor.*; import java.util.*; /** * Finds/builds the available step type groups for the project. * * @author <NAME> (see LICENSE.txt for license details) */ public class StepTypeGroups { p...
<gh_stars>0 module.exports = { display: { props: [ { name: 'height', type: 'number', default: 0, }, { name: 'lg', type: 'boolean', default: 'false', }, { name: 'lgAndDown', type: 'boolean', default: 'false', ...
<filename>main.go<gh_stars>1-10 package main import ( "flag" "fmt" "os" "os/signal" "syscall" "time" "github.com/ajm188/go-mctop/memcap" "github.com/ajm188/go-mctop/ui" ) var ( flags = &flag.FlagSet{} iface = flags.String("interface", "", "interface to sniff") port = flags.Int("port", 11211, "port to sn...
public class ShareLinkHandler { private readonly IRepository<ShareLinkPartRecord> _repository; private readonly IOrchardServices _orchardServices; private readonly IShareLinkService _sharelinkService; private readonly IEnumerable<IShareLinkPriorityProvider> _priorityProviders; public ShareLinkHandl...
import { format } from 'prettier/standalone'; import { getMemberObjectString } from '../../helpers/get-state-object-string'; import { MitosisContext } from '../../types/mitosis-context'; type ContextToReactOptions = { format?: boolean; }; export const contextToReact = (options: ContextToReactOptions = {}) => ({...
<gh_stars>0 package nl.probotix.helpers; import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; import com.qualcomm.robotcore.hardware.DcMotor; import com.qualcomm.robotcore.util.ElapsedTime; import nl.probotix.RuckusHardware; /** * Copyright 2018 (c) ProBotiX */ public class AutoHelper { private Rucku...
<filename>app/model/simulation/NumericResults.java package model.simulation; /** Created by chelen on 03/05/15. */ public class NumericResults { private double lcA; private double lcB; private double lc; private double la; private double lb; private double l; private double wcA; private...
#!/usr/bin/env bash ${config.javaCommand} ${config.javaArgs} -jar ${mainJar.name} ${config.programArgs}
// Define the event listener interface public interface IFlagEntityEventAddedListener { void OnEventAdded(string eventName); } // Implement the FlagEntity class public class FlagEntity { private List<IFlagEntityEventAddedListener> eventListeners = new List<IFlagEntityEventAddedListener>(); // Method to re...
<gh_stars>0 package modell.formel; /**Unterklasse des Bikonnektors. * Verknuepft seinen linken und rechten Formelnachbarn mit einem logischen EXOR beim Auswerten. * Seine String Repraesentation ist "x". * @author Flo * */ public class ExklusivOder extends BiKonnektor { /** Kostruktor. Setzt uebergebene Werte ...
# ---------------------------------------------------------------------------- # # Package : node-proper-lockfile # Version : v4.1.1 # Language : JavaScript # Source repo : https://github.com/moxystudio/node-proper-lockfile # Tested on : UBI 8.3 # Script License: MIT License # Maintainer : Va...
<reponame>svenslaggare/texteditor<gh_stars>1-10 #pragma once #define GLEW_STATIC #include <GL/glew.h> #include <cstddef> #include <memory> #include <vector> struct GLUniform { std::size_t index; std::string name; GLint size; GLenum type; }; std::ostream& operator<<(std::ostream& stream, const GLUniform& uniform);...
#!/usr/bin/env bash set -o errexit set -o nounset set -o pipefail IMAGE="artigraph/example-spend" VERSION="$(python3 -c 'from arti.internal import version; print(version)')" docker build --build-arg VERSION="${VERSION}" -t "${IMAGE}" . docker push "${IMAGE}"
class DealerUser { // ... other methods public function checkIntegrity() { // Verify that the dealer and approval status have been set correctly if ($this->dealer !== null && $this->approved === false) { return true; } else { return false; } } }
import { Body, Controller, Get, HttpCode, InternalServerErrorException, NotFoundException, Param, Post, Put, } from "@nestjs/common"; import { AddPlayer, ListPlayer, ListRegisterPlayer, PlayerUnknowException, RegisterPlayer, UpdatePlayer, } from "@cph-scorer/core"; import { RankingService ...
#!/bin/bash # RESTful Interface Tool Sample Script for HPE iLO Products # # Copyright 2014, 2019 Hewlett Packard Enterprise Development LP # # Description: This is a sample bash script to retrieve the # # current security text message set in the iLO Login Banner. # # NOTE: You will need to replace...
<gh_stars>1-10 export { LoginCredentialQueryRepository } from "./query/LoginCredential" export { LoginSessionQueryRepository } from "./query/LoginSession" export { UserQueryRepository } from "./query/User" export { AuthenticityTokenQueryRepository } from "./query/AuthenticityToken" export { ChannelGroupQueryRepository ...
#!/bin/sh cd /home/pi/deimos DISPLAY=0:0; /usr/bin/python3 /home/pi/deimos/deimos.py
package com.haufelexware.gocd.service; import com.google.gson.Gson; import com.haufelexware.gocd.dto.GoPipelineHistory; import com.haufelexware.gocd.dto.GoPipelineInstance; import com.haufelexware.util.Streams; import com.thoughtworks.go.plugin.api.logging.Logger; import org.apache.http.HttpResponse; import org.apache...
import pytest from src.adapter import base from src.proxy import provider @pytest.mark.run(order=2) class TestBaseFetcher: def setup(self): self.obj = base.BaseFetcher( proxy_provider=provider.NoProxyProvier(), enable_fetch_price=True, enable_fetch_institutional_invest...
package driver; import fileIO.TextFile; public class LineCount { public static void main(String[] args){ TextFile tf=new TextFile(args[0], false, false); long lines=tf.countLines(); tf.close(); System.out.println(args[0]+" has "+lines+" non-blank lines."); } }
#!/bin/bash -x DATASET_NAME=${1} # has to be the same as the filename of DATASET_CONFIG DATASET_CONFIG="${DATASET_NAME}.py" GCP_PROJECT=kubric-xgcp GCS_BUCKET=gs://research-brain-kubric-xgcp REGION=us-central1 JOB_NAME=${2} MACHINE_TYPE="n1-highmem-16" NUM_WORKERS=20 if ! [[ $JOB_NAME =~ ^[a-zA-Z][-a-zA-Z0-9]*[a-zA-...
<?php $sentence = 'This is a test'; $words = explode(' ', $sentence); sort($words); print_r($words); ?>
<filename>src/modules/database/database-di.module.ts import { FactoryProvider, Module } from '@nestjs/common'; import { AddTelegramAccountAdapter } from './adapters/add-telegram-account.adapter'; import { AddTelegramAccountToDatabasePortSymbol } from '../../domains/ports/out/add-telegram-account-to-database.port'; impo...
#!/usr/bin/env bash set -e # TODO: Set to URL of git repo. PROJECT_GIT_URL='https://github.com/rajiv-07/profiles-rest-api.git' PROJECT_BASE_PATH='/usr/local/apps/profiles-rest-api' echo "Installing dependencies..." apt-get update apt-get install -y python3-dev python3-venv sqlite python-pip supervisor nginx git # ...
#!/usr/bin/env bash set -e source $SNAP/actions/common/utils.sh echo "Enabling default storage class" sudo mkdir -p ${SNAP_COMMON}/default-storage declare -A map map[\$SNAP_COMMON]="$SNAP_COMMON" use_manifest storage apply "$(declare -p map)" echo "Storage will be available soon" if [ -e ${SNAP_DATA}/var/lock/clus...