text
stringlengths
1
1.05M
# Want to train with wordnet hierarchy? Just set `--hierarchy=wordnet` below. # This script is for networks that DO come with a pretrained checkpoint provided either by a model zoo or by the NBDT utility itself. model=wrn28_10_cifar10 dataset=CIFAR10 weight=1 # 1. generate hieararchy nbdt-hierarchy --dataset=${datase...
<filename>router/todoRouter.go package router import ( "github.com/gin-gonic/gin" ) func InitToDoRouter(Router *gin.RouterGroup) { ToDoRouter := Router.Group("todo") { // 添加代办 ToDoRouter.POST("/todo", func(c *gin.Context) { }) // 查看所有代办 ToDoRouter.GET("todo", func(c *gin.Context) { }) // 查看某一个代办事...
#!/bin/bash set -e environmentName="prod" apiPort=8080 filename="${environmentName}-data-service.properties" function getProperty() { property=$1 cat ${propertiesFile} | grep ${property} | awk '{print $2}' } while getopts ":dp:" opt do case $opt in d) debugMode=true echo "Option set to start API in debu...
declare type int = number; declare var zone: any; declare var Zone: any; declare module "angular2/change_detection" { class ChangeDetectorRef {} class Pipe { supports(obj: any): boolean; onDestroy(): void; transform(value: any): any; } class PipeFactory { supports(obs: any): boolean; creat...
"use strict"; /** * Since only a single constructor is being exported as module.exports this comment isn't documented. * The class and module are the same thing, the contructor comment takes precedence. * @module RandomStaryBackgroundContext */ var paper = require('paper/dist/paper-core.js'); /** * The constr...
<filename>Logic/Stage/preprocessor/preprocess.cpp<gh_stars>0 /* Preprocessor 0.5 Copyright (c) 2005 <NAME> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is gr...
<filename>react-client/src/Deaths.js import React, { useEffect, useRef } from 'react' // deaths: // { // text: Harnus was just struck down // time: 2020-01-25T22:36:07.919Z // } export default function Deaths({ deaths, sendCommand }) { const deathsEndRef = useRef(null) const scrollToBottom = () => deathsEnd...
import random import string def generate_migration_password(): password_length = 10 characters = string.ascii_letters + string.digits return ''.join(random.choice(characters) for _ in range(password_length))
package com.honyum.elevatorMan.net; import com.honyum.elevatorMan.net.base.RequestBean; import java.io.Serializable; /** * Created by star on 2018/4/9. */ public class EditPersonRequest extends RequestBean { private EditPersonRequestBody body; public EditPersonRequestBody getBody() { return body;...
#!/bin/bash # Copyright 2018-present Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
#!/usr/bin/env bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" PATH=$(cd ${DIR} && npm bin):$PATH POSTMAN_DIR="${DIR}/.." NEWMAN_REQUEST_DELAY=${NEWMAN_REQUEST_DELAY:=100} newman run \ --delay-request=${NEWMAN_REQUEST_DELAY} \ --folder='Add parties to DFSP backends' \ ${POSTMAN_DIR}/PISP.postman_co...
<filename>app/controllers/index.js const RestController = require('./RestController'); const SocketController = require('./SocketController'); const TrayController = require('./TrayController'); module.exports = { RestController, SocketController, TrayController, };
<reponame>Adrian-Garcia/Algorithms #include <iostream> // El Tesoro de la Tortuga // Matricula: A01351166 // Nombre: <NAME> using namespace std; #define MAX 100 int turtle(int mat[MAX][MAX], int n, int m){ // Primera Fila for (int i=1; i<n; i++) { mat[i][0]+=mat[i-1][0]; } // Primera Columna ...
<reponame>moizKachwala/PollingApp<gh_stars>0 package com.example.polls.validators; import com.example.polls.payload.user.UserDto; import org.springframework.stereotype.Component; import org.springframework.util.StringUtils; import org.springframework.validation.Errors; import org.springframework.validation.ValidationU...
<reponame>bamboolife/PanelSwitchHelper<filename>app/src/main/java/com/example/demo/scene/chat/ChatActivity.java package com.example.demo.scene.chat; import android.content.Context; import android.content.Intent; import android.databinding.DataBindingUtil; import android.graphics.Color; import android.support.annotatio...
<gh_stars>1-10 package endpoint import ( "crypto/x509" "encoding/json" "encoding/pem" "github.com/emilhauk/identity-api/model" "github.com/emilhauk/identity-api/store" "github.com/sirupsen/logrus" "net/http" ) func PublicKeyHandler(w http.ResponseWriter, r *http.Request, keyStore *store.RSAKeyStore) { if r.Me...
#!/bin/bash dieharder -d 16 -g 4 -S 2973139744
#!/bin/bash # Handles checking of file after picking extention # Call using file_checker file_checker () { break_line cd $first total_files=$(ls -1q * | wc -l) echo "Total file/s in the directory: $total_files" ext_files=$(ls -1q *."$ext" | wc -l) || echo "No .$ext file exists in the directory." echo "Total .$ext ...
<filename>tests/controller/channel/PubSubTest.java //package controller.channel; // //import controller.channel.messages.Message; //import controller.channel.messages.VariableUpdate; //import interpreter.core.elements.Value; //import org.junit.jupiter.api.Test; // //import static org.junit.jupiter.api.Assertions.*; // ...
clear echo "==================================================================" echo "== B E N C H M A R K O B J E C T S ==" echo "== ==" echo "== G C C C O M P I L E R ==" echo "============...
package com.boot.controller; import com.boot.constant.Constant; import com.boot.pojo.BlackList; import com.boot.service.BlackListService; import com.github.pagehelper.PageHelper; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Con...
<filename>script.js $(document).ready(function(){ $(".line_outer").on("click", function(){ if($("ul.nav").hasClass("display-flex")){ $("ul.nav").addClass("display-none"); $("ul.nav").removeClass("display-flex"); } else{ $("ul.nav").addClass("display...
<reponame>tcmRyan/OpenOLAT /** * <a href="http://www.openolat.org"> * OpenOLAT - Online Learning and Training</a><br> * <p> * Licensed under the Apache License, Version 2.0 (the "License"); <br> * you may not use this file except in compliance with the License.<br> * You may obtain a copy of the License at the *...
def sum_prime_numbers(n): if n <= 1: return 0 prime_sum = 0 for i in range(2, n): is_prime = True for j in range(2, i): if i % j == 0: is_prime = False break if is_prime: prime_sum += i return p...
<filename>zeus-starter/src/main/java/com/iterlife/zeus/starter/annotation/IterLife.java package com.iterlife.zeus.starter.annotation; import java.lang.annotation.*; import org.springframework.stereotype.Component; import org.springframework.stereotype.Service; /** * @author lujie * @Desc 自定义IterBean注解 * @Version ...
// 'ignore' method. This method does nothing, but can be called // to document the reason why the exception can be ignored. public static void ignore(Throwable e, String message) { }
<reponame>dongdong1018645785/touch-air-mall package com.touch.air.mall.seckill.vo; import lombok.Data; import java.math.BigDecimal; /** * @author: bin.wang * @date: 2021/3/6 16:03 */ @Data public class SecKillRelationVo { private Long id; /** * 活动id */ private Long promotionId; /** ...
#!/bin/bash setup_git_hooks() { chmod u+x ./scripts/commit-msg ln -s ../../scripts/commit-msg .git/hooks/commit-msg } setup_git_hooks
<reponame>FourLeafTec/RTSPtoWebRTC package main import ( "crypto/rand" "encoding/json" "fmt" "io/ioutil" "log" "sync" "time" "github.com/deepch/vdk/codec/h264parser" "github.com/deepch/vdk/av" ) //Config global var Config = loadConfig() //ConfigST struct type ConfigST struct { mutex sync.RWMutex Serve...
require 'spec_helper' describe 'newrelic::agent::php', :type => :class do let(:facts) do { 'os' => { 'family' => 'RedHat', 'name' => 'CentOS', 'release' => { 'major' => '7' } }, 'operatingsystem' => 'Centos', 'path' => '/usr/local/sbin:/usr/...
<filename>app/workers/list_sync/error_handling.rb module ListSync module ErrorHandling extend ActiveSupport::Concern def capture_sync_errors(linked_account, pending_logs) yield rescue ListSync::NotFoundError error! pending_logs, 'No equivalent' rescue ListSync::AuthenticationError l...
import sanitizeHex from '../sanitizeHex'; import { HEX_BLACK } from './data/colors'; /** * Sanitize Hex String */ describe('sanitizeHex', () => { test('sanitizeHex - clean input', () => { const validHex = '#ffffff'; const sanitizedHex = sanitizeHex(validHex); expect(sanitizedHex).toStrictEqual(validHex...
def delete(node, key): if not node: return None # If key to be deleted is smaller # than the root's key, then it lies # in left subtree if key < node.key: node.left = delete(node.left, key) # If the key to be deleted is greater # than the root's key, then it lies ...
package vcoclient type FirewallData struct { FirewallEnabled bool `json:"firewall_enabled"` InboundLoggingEnabled *bool `json:"inboundLoggingEnabled,omitempty"` StatefulFirewallEnabled *bool `json:"stateful_firew...
/* * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free ...
#! /bin/bash # --- Fixed parameters --- DATASET_DIR="./dataset" LIB_DIR="/work/lib" mkdir -p ${DATASET_DIR} # --- Prepare dataset --- # * MNIST # * CIFAR-10 dataset_dir="${DATASET_DIR}/mnist" if [ ! -e ${dataset_dir} ]; then mkdir -p ${dataset_dir} cd ${dataset_dir} wget http://yann.lecun.com/exdb/mnist/train-im...
import React from 'react'; import { Link } from 'gatsby' import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import select from '../components/utils' const DropDownMenu = (props) => { const switches = props.switches; const links = props.links; const sel = select(props.langKey); ...
#!/bin/bash export PHP_HOME=${IROOT}/php-5.5.17 export COMPOSER_HOME=${IROOT}/php-composer fw_depends php nginx composer ${PHP_HOME}/bin/php ${COMPOSER_HOME}/composer.phar install \ --no-interaction --working-dir ${TROOT} \ --no-progress --optimize-autoloader php artisan optimize --force
#!/bin/bash export LANG=zh_CN.UTF-8 export LANGUAGE=zh_CN:zh:en_US:en export PATH=/usr/local/miniconda3/bin/:$PATH python /path/to/mmdetection/tools/train.py ./config/tp_r50_3stages_enlarge.py --gpus 8
<reponame>nightskylark/DevExtreme "use strict"; var treeListCore = require("./ui.tree_list.core"), contextMenuModule = require("../grid_core/ui.grid_core.context_menu"); treeListCore.registerModule("contextMenu", contextMenuModule);
/** * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.analytics.math.interpolation; import java.util.List; import org.apache.commons.lang.Validate; import com.opengamma.analytics.math.function.Function1D; impor...
<gh_stars>0 const process = require("process") const notifier = require('node-notifier') const { exec } = require("child_process"); console.log(process) console.log(exec) const ONE_SECOND = 1000 const ONE_MINUTE = 60 * ONE_SECOND const TEN_MINUTE = 10 * ONE_MINUTE var VS = 0 function checkvs() { exec("tasklist", (e...
#include <stdio.h> int main() { int result = 5 * (3 + 4) - 9; printf("Result: %d\n", result); return 0; }
# OSX-only stuff. Abort if not OSX. is_osx || return 1 # Trim new lines and copy to clipboard alias c="tr -d '\n' | pbcopy" # Make 'less' more. [[ "$(type -P lesspipe.sh)" ]] && eval "$(lesspipe.sh)" # Start ScreenSaver. This will lock the screen if locking is enabled. alias ss="open /System/Library/Frameworks/Scree...
#!/usr/bin/env bats #-*- shell-script -*- # This is test script for the lab. There several different ways the # lab might be run -- starter code vs solution, local vs. remote, # devel vs. on the autograder. This file can test that they are all # functioning properly. # # It's written in bats (https://github.com/bats...
package pl.allegro.tech.opel; enum Operator { PLUS, MINUS, MULTIPLY, DIV, GT, GTE, LT, LTE, EQUAL, NOT_EQUAL, AND, OR; public OpelNode createNode(OpelNode left, OpelNode right, ImplicitConversion implicitConversion) { switch (this) { case PLUS: ...
<gh_stars>0 "use strict"; function objectToParamString(object) { var joinedParams = Object.keys(object).map(function (key) { if (key == 'orderBy') { return key + "=\"" + object[key] + "\""; } else { return key + "=" + object[key]; } }).join('&'); retur...
// Function to find the largest of three numbers int largestOfThree(int num1, int num2, int num3) { int largest = 0; // Find largest number if (num1 > num2) largest = num1; else largest = num2; if (num3 > largest) largest = num3; return largest; }
SELECT category, MAX(price) FROM products GROUP BY category ORDER BY MAX(price) DESC LIMIT 5;
<div class="container"> <div class="box1">Content for box 1</div> <div class="box2">Content for box 2</div> <div class="box3">Content for box 3</div> </div> <style> .container { display: flex; } .box1 { flex: 1; background: #f4f4f4; } .box2 { flex: 2; background: #ccc; } .box3 { flex: 3; background...
#!/bin/sh # # Run a nerves_system_x86_64-based image in QEMU # # Usage: # run-qemu.sh [Path to .img file] # set -e IMAGE="$1" DEFAULT_IMAGE="example.img" help() { echo echo "Usage:" echo " run-qemu.sh [Path to .img file]" exit 1 } [ -n "$IMAGE" ] || IMAGE="$DEFAULT_IMAGE" [ -f "$IMAGE" ] || (ech...
#!/bin/bash sudo kill -9 $(ps -ef | grep AccXSim.jar | grep -v grep | awk '{print $2}')
<reponame>uw-dims/tupelo /** * Copyright © 2015, University of Washington * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above c...
require 'puppet/configurer' require 'set' require 'pp' Puppet::Type.type(:refacter).provide(:ruby) do desc <<-END This provider handles rerunning facter to reload all the known facts for the refacter type. END def initialize(hash) debug 'init refacter, save Facter values' @facts = Facter.to_hash ...
<gh_stars>100-1000 import { BaseService, Service } from "/@/core"; @Service("wechat/user/tags") class WechatTags extends BaseService { sync(data: any) { return this.request({ url: "/sync", method: "POST", data }); } tagging(data: any) { return this.request({ url: "/tagging", method: "POST", ...
def reverseSentence(sentence): words = sentence.split(' ') newWords = [word[::-1] for word in words] newSentence = ' '.join(newWords) return newSentence sentence = input("Enter a sentence: ") print(reverseSentence(sentence))
import { WGSLEncoder } from "../../shaderlib"; import { ShaderMacroCollection } from "../../shader"; export class WGSLParticleNoise { execute(encoder: WGSLEncoder, macros: ShaderMacroCollection) { encoder.addFunction( "// Fast computation of x modulo 289\n" + "fn mod289Vec3(x: vec3<f32>) -> vec3<f3...
<filename>src/client/app/home/home.component.ts import { Component, ElementRef, ViewChild, Renderer, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { QueryService } from '../shared/index'; /** * This class represents the lazy loaded home Component. */ @Component({ ...
<reponame>jameswilddev/noscript import Svgo from "svgo" export default { svgo(svg, onSuccess, onError) { new Svgo({ plugins: [{ cleanupAttrs: true }, { inlineStyles: true }, { removeDoctype: true }, { removeXMLProcInst: true }, { removeComment...
#!/usr/bin/env bash set -e docker build --squash --rm -t docker-slim -f Dockerfile ../../.. docker image prune --filter label=build-role=ca-certs -f docker image prune --filter label=app=docker-slim -f
set -ex main() { curl -sSf https://build.travis-ci.org/files/rustup-init.sh | sh -s -- --default-toolchain=nightly -y export PATH=$HOME/.cargo/bin:$PATH npm install -g webpack local target= if [ $TRAVIS_OS_NAME = linux ]; then target=x86_64-unknown-linux-musl sort=sort fi ...
<reponame>CeriniGaming/star-wars-rpg import React from 'react'; export default class CharacterCreator extends React.Component { constructor(props) { super(props); this.handleClick = this.handleClick.bind(this); } handleClick() { alert('do the thing!'); } render() { return ( <div > ...
let request = require('request'); let url = 'http://www.example.com'; request(url, function(err, response, body){ if(err){ console.log('There was an error:', err); } else { console.log('Successfully made the HTTP request!'); console.log('Response body is', body); } });
#!/bin/sh set -e # # LXD images recipe: PhpMyAdmin # # Dependencies: Composer # # Environment variables: # # - DBUSER - database user, e.g. 'drupal', default 'root' # - DBPASS - database password, e.g. 'drupal', default '' # installPhpMyAdmin() { # Fetch the variables DBUSER=${DBUSER:-"root"} DBPASS=${DBPASS:-""} ...
<filename>packages/vx-glyph/src/index.js<gh_stars>0 import Glyph from './glyphs/Glyph'; import Dot from './glyphs/Dot'; export default { Glyph, Dot, }
# frozen_string_literal: true module Avatar class Avatar < ApplicationComponent delegate :avatar, :avatar?, to: :contributor, prefix: true def initialize(contributor: nil, expandable: false, **) super @contributor = contributor @expandable = expandable end private attr_reader...
#!/usr/bin/env bash git pull origin master echo "Setting environment variables..." source .exports echo -e "Environment variables setted.\n" press_y_to_confirm() { echo "$1(y/N)" read input if [ "$input" != "Y" ] && [ "$input" != "y" ]; then return 0 else return 1 fi } install_pk...
#!/bin/bash - # by William SHANG # myAppServProj/ospf_setup.sh # completed source ./myNetCfg.conf # installing quagga and starting ospfd/zebra sudo yum install quagga sudo yum update systemctl enable zebra systemctl start zebra systemctl enable ospfd systemctl start ospfd # setting up zebra.conf; sudo mv $myZebraPath $...
#!/usr/bin/env bash # Set DISTNAME, BRANCH and MAKEOPTS to the desired settings DISTNAME=quartercoin-2.0.3 MAKEOPTS="-j4" BRANCH=master clear if [[ $EUID -ne 0 ]]; then echo "This script must be run with sudo" exit 1 fi if [[ $PWD != $HOME ]]; then echo "This script must be run from ~/" exit 1 fi if [ ! -f ...
bool isMultiple(int n1, int n2) { return n2 % n1 == 0; } isMultiple(4, 8); // Returns true
class CheckPrime { public static void main(String[] args) { int i=10; int temp=0; for (int j=2;j<i ;j++ ) { if (i%j==0) { temp=temp+1; } } if (temp==0) { System.out.println("It is aPrime Number"); } else { System.out.println("It is not a Prime Number"); ...
package com.leetcode; import java.util.*; public class Solution_102 { public List<List<Integer>> levelOrder(TreeNode root) { if (root == null) return Collections.emptyList(); List<List<Integer>> list = new ArrayList<>(); Deque<TreeNode> deque = new LinkedList<>(); deque.offerLast(r...
import imaplib import poplib def get_incoming_mail_port(doc): if doc.protocol == "IMAP": doc.incoming_port = imaplib.IMAP4_SSL_PORT if doc.use_ssl else imaplib.IMAP4_PORT else: doc.incoming_port = poplib.POP3_SSL_PORT if doc.use_ssl else poplib.POP3_PORT return int(doc.incoming_port)
<reponame>xuzhijvn/spring-boot-tony-starters /* * Copyright© (2020). */ package com.tony.component.advice; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; /** * @author tony * @create 2021-12-26 * @description: */ public abstract class AbstractAfterReturningAdvisor implemen...
#!/bin/bash echo "---> Configuring Puppetserver to accept SSL verification headers" sed -i 's/version: 1/version: 1\n allow-header-cert-info: true/' /etc/puppetlabs/puppetserver/conf.d/auth.conf
#! /bin/bash # # script.sh - Descrição sucinta # # Site: # Autor: # Manutenção: # # --------------------------------------------------------------------------- # # # Descrição: # # Uso: # script.sh [opções] parâmetro1 # # Exemplos: # $ script.sh -h -f teste # # Descrição Adicion...
#!/bin/bash # Dump uuids from the infoton table, including the parent flag. if [ -z $1 ]; then echo "usage: $0 <cmwell-url>" exit 1 fi source ./set-runtime.sh WORKING_DIRECTORY="dump-uuids" rm -rf "${WORKING_DIRECTORY}/infoton" $SPARK_HOME/bin/spark-submit \ --conf "spark.driver.extraJavaOptions=-XX:+UseG1GC" ...
class DonationAddStore < ActiveRecord::Migration[5.0] def up add_column :donations, :store, :string end def down remove_column :donations, :store end end
import nltk def get_synonyms(sentence): output = [] words = nltk.word_tokenize(sentence) for word in words: synonyms = [] for syn in wordnet.synsets(word): for l in syn.lemmas(): synonyms.append(l.name()) output.append(list(set(synonyms))) return output
#!/bin/bash citeurl makejs -o citeurl.js zip -r gnome-citeurl-search-provider@raindrum.github.io.zip extension.js citeurl.js logo.svg metadata.json LICENSE.md README.md screenshot.png
import React from "react"; import projects from "../utils/projects.json" import Row from "../components/Row" import 'bootstrap/dist/css/bootstrap.min.css'; import { Card, Button } from "react-bootstrap"; import Image from "react-bootstrap/Image" function Project() { return ( <Row xs={5} md={5} className="g-6...
// good enough at init // export default function(state, action) { // return state || {} // } import { combineReducers } from 'redux'; import * as actionTypes from './actionTypes' const DEFAULT_AUTH = { username: null, isPending: false } function auth(state, action) { switch(action.type) { case actionType...
#!/bin/bash # # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. set -e # Check for zip if ! command -v zip &> /dev/null; then echo "zip could not be found. This script requires zip." echo "On debian based distributions you can try this to install it: sudo apt install zip" exit 1 fi
<filename>uva/00200.cc // https://uva.onlinejudge.org/external/2/200.pdf #include<bits/stdc++.h> using namespace std; using vi=vector<int>; using vvi=vector<vi>; using vs=vector<string>; int main(){ ios::sync_with_stdio(0); cin.tie(0); for(;;){ string s; getline(cin,s); if(s.empty())break; vs t; ...
<filename>src/tallies.ts import { parseTokenString } from "./utils"; import { TallyStats, EosioDelband, EosioVoter } from "./interfaces"; import { ForumVote } from "./interfaces_forum"; import { AuditorVote } from "./interfaces_auditor"; export function defaultAccount() { return { votes: {}, staked...
<reponame>2011-team-coco/quicklys-shop<filename>client/components/Cart.js<gh_stars>1-10 /* eslint-disable no-useless-constructor */ import React from 'react' import {connect} from 'react-redux' import {Grid, Paper, CardHeader, Typography, Divider} from '@material-ui/core' import CartItem from './CartItem' import Cart...
import random import string random_string = ''.join(random.choice(string.ascii_uppercase) for _ in range(10)) print(random_string)
#!/bin/bash set -ev if [ "$#" -ne 1 ]; then echo "Illegal number of parameters" exit 1 fi if [ "$1" = "f710" ]; then ROOTFS=fedora-arm-artik710-rootfs-0710GC0F-44F-01QC-20170713.175433-f63a17cbfdaffd3385f23ea12388999a.tar.gz URL=https://github.com/SamsungARTIK/fedora-spin-kickstarts/releases/download/release%2FA7...
interface Metadata { color?: string; x?: string | number; y?: string | number; label?: string; file?: { url: string; md5: string; path: string; }; icon?: string; fixed_position?: { [key: string]: { color: string; icon: string; value: string; x: string; y: st...
import pytest from nbstripout._utils import pop_recursive def testdict(): return {'a': {'b': 1, 'c': 2, 'd.e': 3, 'f': {'g': 4}}} def testdata(default=None): return [ ('a.c', 2, {'a': {'b': 1, 'd.e': 3, 'f': {'g': 4}}}), ('a.d.e', 3, {'a': {'b': 1, 'c': 2, 'f': {'g': 4}}}), ('a.f', ...
class VersionControlSystem: def __init__(self): self._version_number_objects = {} def _object_has_version(self, key, version_number): if version_number not in self._version_number_objects: self._version_number_objects[version_number] = set() self._version_number_objects[ver...
#!/bin/bash set -o nounset set -o errexit set -o pipefail set -x # This value serves as a default when the parameters are not set, which should # only happen in rehearsals. Production jobs should always set the OO_* variable. REHEARSAL_BUNDLE="brew.registry.redhat.io/rh-osbs-stage/e2e-e2e-test-operator-bundle-contain...
import React, { useState } from 'react'; const SentenceGenerator = () => { const inputArray = ["hello","world","this","is","a","test"]; const [sentence, setSentence] = useState(""); const generateSentence = () => { let sentenceArr = []; for (let i = 0; i < 4; i++) { let randomIndex = Math.floor(...
#!/bin/sh set -e SOURCES_DIR=/tmp/artifacts/ DISTRO_NAME=standard-controller # unpack { unzip "${SOURCES_DIR}/standard-controller.zip" -d / }
'use strict'; // Configuring the Articles module angular.module('logos').run(['Menus', function(Menus) { // Set top bar menu items Menus.addMenuItem('topbar', 'Logos', 'logos', 'dropdown', '/logos(/create)?'); Menus.addSubMenuItem('topbar', 'logos', 'List Logos', 'logos'); Menus.addSubMenuItem('topbar', 'logo...
#!/bin/bash ## script for 内存泄露检查 # ========== macOS ========== # https://github.com/LouisBrunner/valgrind-macos # brew tap LouisBrunner/valgrind # brew install --HEAD LouisBrunner/valgrind/valgrind # ========== linux ========== # https://www.valgrind.org/ # apt install valgrind NUM_THREADS=1 echo "Setting the Number o...
<reponame>WernerStruis/Naval-Robocode-Source package robocode; import robocode.naval.*; import robocode.naval.Components.ComponentBase; import robocode.naval.interfaces.componentInterfaces.IComponent; import robocode.robotinterfaces.peer.IBasicShipPeer; /** * @author <NAME>. /<NAME> (contributor naval) * @version ...
class PropertyListing: def __init__(self, address, name, owner, kind, note): self.address = address self.name = name self.owner = owner self.kind = kind self.note = note def __str__(self): data = [self.address, self.name, self.owner, self.kind, self.note] ...
if [ $# -eq 0 ] || [ $1 = "all" ] then make -f make_tc.log all make -f make_tc.log.tests all elif [ $1 = "clean" ] then make -f make_tc.log clean make -f make_tc.log.tests clean else echo "Use $0 or $0 all or $0 clean" fi
<reponame>ic-labs/glamkit-sponsors # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import icekit.validators class Migration(migrations.Migration): dependencies = [ ('icekit_plugins_image', '0006_auto_20160309_0453'), ] operations = [ ...