text stringlengths 1 1.05M |
|---|
#!/usr/bin/env bash
set -e -o pipefail
# cd to root of repo
cd "$( dirname "${BASH_SOURCE[0]}" )"/../../
if [[ ! -e "webpack-stats.json" ]]
then
echo "Please start the webpack dev server before running this script."
exit 1
fi
source ./scripts/envs.sh
if [[ -z "$WEBPACK_SELENIUM_DEV_SERVER_HOST" ]]
then
ec... |
package main
import (
litmusLIB "github.com/litmuschaos/litmus-go/chaoslib/litmus/container-kill/lib"
pumbaLIB "github.com/litmuschaos/litmus-go/chaoslib/pumba/container-kill/lib"
clients "github.com/litmuschaos/litmus-go/pkg/clients"
"github.com/litmuschaos/litmus-go/pkg/events"
experimentEnv "github.com/litmusc... |
function averageThreeNumbers(num1, num2, num3){
return (num1 + num2 + num3) / 3;
} |
<gh_stars>1-10
// /*
// Copyright 2020 Kaloom Inc.
// Copyright 2014 The Kubernetes 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... |
package io.smallrye.mutiny.streams.stages;
import java.util.Objects;
import java.util.function.Predicate;
import org.eclipse.microprofile.reactive.streams.operators.spi.Stage;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.streams.Engine;
import io.smallrye.mutiny.streams.operators.ProcessingStage;
impor... |
import string
def translator(frm='', to='', delete='', keep=None):
if len(to) == 1:
to = to * len(frm)
trans = string.maketrans(frm, to)
if keep is not None:
allchars = string.maketrans('', '')
delete = allchars.translate(allchars, keep.translate(allchars, delete))
def translate(... |
<gh_stars>0
/*******************************************************************************
* Copyright 2015 InfinitiesSoft Solutions 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 a... |
/*
* 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 lista2;
/**
*
* @author PauloCésar
*/
public class Agenda {
//private String[] nomes;
//private String[] cpfs... |
#encoding:utf-8
import time
def toDate(timeStamp):
timeArray = time.localtime(timeStamp)
return time.strftime("%Y-%m-%d", timeArray)
|
#!bin/bash
# Install Caliper dependencies
function installCaliperDependencies() {
# Caliper directory
cd $1/caliper
# Get access to the local update config store
sudo chown -R $USER:$(id -gn $USER) /home/lucas/.config
# Install Caliper dependencies
npm install
} |
<gh_stars>0
import * as React from 'react';
import PropTypes from 'prop-types';
import Head from 'next/head';
import { ThemeProvider } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
import { CacheProvider } from '@emotion/react';
import theme from '../src/theme';
import createEmotionC... |
const {csv2json} = require('../csv2json');
const { QueueClient }= require('@azure/storage-queue');
process.env.JSON_STORAGE_CONNECTION = '';
process.env.JSON_STORAGE_QUEUE = '';
jest.mock('@azure/storage-queue', () => ({
QueueClient: jest.fn().mockImplementation((_, __) => {})
}));
function MockContext() {};
Moc... |
import { hexToBin } from "./utils";
export class Packet {
version: number;
type: number;
subPackets: Packet[] = [];
value = 0;
constructor(version: number, type: number) {
this.version = version;
this.type = type;
}
}
const calculatePacketValue = (packet: Packet): number => {
... |
<gh_stars>0
'''
meta allows to use operations form the client with the resource
'''
import boto3
aws_mag_con=boto3.session.Session(profile_name="root")
ec2_con_re=aws_mag_con.resource(service_name="ec2")
for each_item in ec2_con_re.meta.client.describe_regions()['Regions']:
print(each_item['RegionName'])
|
public class ReverseString {
public static void main(String[] args) {
System.out.println("Input a string: ");
Scanner sc = new Scanner(System.in);
String str = sc.next();
String reversed = "";
for (int i = str.length() - 1; i >= 0; i--) {
reversed += str.charAt(i)... |
#Python 3.8.0
#Make by Lonely Dark
import argparse
import os
parser=argparse.ArgumentParser()
parser.add_argument('-r', '--recursive', help='recursive add files', action='store_true')
parser.add_argument('-d', '--directory', help='directory where the files(or file) are. If file one, input file with full name', requi... |
#!/bin/bash
set -e
syncit() {
channel=$1
version=${2:-current}
wget --cut-dirs=1 -nH --quiet -A coreos_production_image*,coreos_production_pxe*,version.txt* -m http://${channel}.release.core-os.net/amd64-usr/${version}
}
cd $(dirname $0)
(
cd bodil/static/images/coreos/stable
syncit stable
)
(
cd bodi... |
<filename>src/assets/index.ts
import vectors from './vectors.json';
export default vectors;
|
def preOrderTraversal(root):
if root is None:
return
print(root.data)
preOrderTraversal(root.left)
preOrderTraversal(root.right) |
#!/bin/bash
# Write a shell script which will receive 5 numbers from command line
# and print their sum.
echo "Sum of Five Numbers is:" $(($1 + $2 + $3 + $4 + $5))
|
#!/usr/bin/env bash
min=1
max=100
# Generate a random number between min and max.
target=$(( ( RANDOM % $max ) + $min ))
min=$[ $min - 1 ]
max=$[ $max + 1 ]
guesses_made=0
guess=-1
while [ $guess -ne $target ]; do
echo ==x==x==x== ==x==x==x== ==x==x==x==
if [[ $guesses_made -ne 0 && $guess -ge $min && $guess ... |
import React, { FunctionComponent } from 'react';
import { TexturedStyles } from '@elastic/charts';
export const TexturedStylesProps: FunctionComponent<TexturedStyles> = () => (
<div />
);
|
#!/bin/bash
# profiles = xccdf_org.ssgproject.content_profile_cui
# remediation = bash
. $SHARED/auditd_utils.sh
prepare_auditd_test_enviroment
set_parameters_value /etc/audit/auditd.conf "space_left_action" "suspend"
|
#!/bin/sh
### BEGIN INIT INFO
# Provides: gpsdproxy
# Required-Start: gpsd
# Required-Stop: gpsd
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: GPSDproxy daemon
# Description: Start/Stop script for the gpsd proxy daemon,
# GPS position read from gps... |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class FileHandler {
/**
* Reads a text file, identifies the line containing a specific keyword, and replaces the content of that line with new data.
*
... |
import { BaseInput, BaseInputProps } from '../base_input';
import { ForwardedRef, createElement, forwardRef } from 'react';
import { useRadioGroup } from '../radio_group';
export type RadioProps = Omit<BaseInputProps<'input'>, 'type'>;
function Radio(
props: RadioProps,
ref: ForwardedRef<HTMLInputElemen... |
<filename>src/main/java/tcg/credential/ComponentAddress.java
package tcg.credential;
import org.bouncycastle.asn1.ASN1EncodableVector;
import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1Sequence;
impor... |
<reponame>benoitc/pypy
from __future__ import with_statement
import py
from pypy.rlib.rstring import StringBuilder, UnicodeBuilder
from pypy.rpython.annlowlevel import llstr, hlstr
from pypy.rpython.lltypesystem import rffi
from pypy.rpython.lltypesystem.rbuilder import *
from pypy.rpython.test.tool import BaseRtyping... |
#!/bin/bash
curl -X POST http://localhost:8000 -H 'Content-Type: application/x-amz-json-1.0' -H 'Authorization: AWS4-HMAC-SHA256 Credential=XXX, SignedHeaders=YYY, Signature=ZZZ' -H 'X-Amz-Target: DynamoDB_20120810.CreateTable' --data @/migration/cdstore-Albums.json |
export enum Sex {
Male,
Female,
Unknown
}
export enum layoutState {
Expanded,
Aggregated,
Hidden
}
/**
* This class holds all attributes of a node in the genealogy graph.
*/
export default class Node {
/** This node's ID */
id: string;
/** This node's uniqueID */
uniqueID: string;
// TODO -... |
<reponame>tylertucker202/argovis_backend
const Profile = require('../models/profile')
const moment = require('moment')
const GJV = require('geojson-validation')
const helper = require('../public/javascripts/controllers/profileHelperFunctions')
const HELPER_CONST = require('../public/javascripts/controllers/profileHelpe... |
# send a deep link to the ios simulator
xcrun simctl openurl booted "celo://wallet/pay?address=0x0b784e1cf121a2d9e914ae8bfe3090af0882f229&displayName=Crypto4BlackLives&e164PhoneNumber=%2B14046251530"
|
#!/bin/sh
set -e
set -x
os=`uname`
TRAVIS_ROOT="$1"
case "$os" in
Darwin)
echo "Mac"
brew update
brew unlink python@2 || brew uninstall python@2
brew upgrade python || brew install python
brew upgrade numpy || brew install numpy
brew link --overwrite python
... |
require 'twilio-ruby'
# Get your Account SID and Auth Token from twilio.com/console
# To set up environmental variables, see http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
service_sid = 'ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
@client = Twilio::REST::Client.new(account_... |
<reponame>plusmancn/hyxcache
/**
* 会友行人员名单导入脚本
*/
var fs = require('fs');
var csv = require('csv');
var Q = require('q');
var request = require('request');
var config = require('../package.json');
var importSeeting = {
meetingId:'554a34cee4b0679ef61499d6',
contactData:[]
}
readCSVFile('../testFolder/attend... |
<filename>packages/amplication-server/src/enums/EnumProvider.ts
export enum EnumProvider {
Github
}
|
const dirIcon = Vue.prototype.$global.board.board_info.dir;
module.exports = function(Blockly) {
"use strict";
Blockly.Blocks["neopixel_rgb_begin"] = {
init: function() {
this.appendDummyInput()
.appendField(new Blockly.FieldImage(`file:///${dirIcon}/static/icons/1601900.png`,20,20,"*"))
... |
<filename>primary_insertion_best_benefit_item_limit/unchecked_items.h
#pragma once
#include <vector>
#include "knapsack_item.h"
class unchecked_items
{
std::vector<knapsack_item*>* unchecked_items_;
std::vector<knapsack_item*>* not_inserted_items_;
public:
unchecked_items();
void load() const;
knapsa... |
<reponame>smagill/opensphere-desktop
package io.opensphere.core.model;
import gnu.trove.map.TObjectIntMap;
import gnu.trove.map.hash.TObjectIntHashMap;
import io.opensphere.core.math.Vector3d;
import io.opensphere.core.model.Tessera.TesseraVertex;
import io.opensphere.core.model.TesseraList.TesseraBlockBuilder;
import... |
<reponame>krzysztofgajda/python
'''
Created on 2010-02-28
@author: tomek
'''
from math import sqrt
a = 1
b = 0
c = 1
d = b * b -4 * a * c
# wynik = ((a == 0) and [
# ((b == 0) and [ ((c == 0) and ['Dozo'] or ['Brak'])[0]
# ] or
# ... |
ssh -x root@$1 "/sbin/shutdown.sh && /sbin/poweroff"
|
<reponame>buiminhhai1/mhh-backend-service
import { JwtService } from '@nestjs/jwt';
import { Injectable, Logger, NestMiddleware, UnauthorizedException } from '@nestjs/common';
import { CustomHttpRequest } from '../interfaces';
import { NguoiDungEntity } from '../../entities';
@Injectable()
export class AuthMiddleware ... |
<reponame>Tshisuaka/api-snippets
require 'twilio-ruby'
# Required for any Twilio Access Token
# To set up environmental variables, see http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
api_key = ENV['TWILIO_API_KEY']
api_secret = ENV['TWILIO_API_KEY_SECRET']
# Required for Video
identity = 'user'
# Creat... |
<reponame>joonhocho/sanivali
import type { SanivaliDefaultRuleSchema } from '../defaultDefsTypes';
import type { ISanivaliDef } from '../types';
import type { Sanivali } from '../sanivali';
export declare type AnyOfParam<T = SanivaliDefaultRuleSchema> = Array<T | Sanivali>;
export declare type AnyOfRuleItem<T = Sanival... |
#!/bin/bash -e
# variables which are used while rendering templates are exported
{
TYPE="$1"
SERVICE="$2"
if [ X"${SERVICE}" = X"" ]; then
SERVICE="${TYPE}"
TYPE=""
fi
if [ X"${SERVICE}" = X"" ]; then
echo "usage create-sa.sh servicename"
exit 1
fi
OU... |
<reponame>ixrjog/caesar-web<gh_stars>1-10
export function getJobBuildStatusType (value) {
switch (value) {
case 'FAILURE':
return 'danger'
case 'UNSTABLE':
return 'warning'
case 'REBUILDING':
return 'warning'
case 'BUILDING':
return 'warning'
case 'ABORTED':
return 'w... |
<reponame>yintaoxue/learn
package org.ruogu.learn.lang.waitnotify;
/**
* WaitNotifyTest
*
* @author xueyintao 2016年12月3日 下午5:29:29
*/
public class WaitNotifyTest {
/**
* @param args
*/
public static void main(String[] args) {
Object lock = new Object();
}
}
class WaitThread extends Thread... |
<filename>src/component/theme_loader.js
import { html, render } from 'lit-html';
export default class ThemeLoader {
constructor(translation) {
this.translation = translation;
this.defaultTheme = "plugchecker";
this.themes = {
[this.defaultTheme] : {
titleBarHtml: "chargeprice",
titl... |
#!/bin/sh
edje_cc $@ -id . -fd . blueprint.edc -o Bodhi-Blueprint.edj
|
#!/bin/bash
# ###############################################
# Based on Peter Jemian script from tech-talk
# https://epics.anl.gov/tech-talk/2018/msg00259.php
# ###############################################
#wget https://raw.githubusercontent.com/EPICS-synApps/support/master/assemble_synApps.sh
# edit for local c... |
package entities
import (
"github.com/edanko/dxf-go/core"
"github.com/stretchr/testify/assert"
"strings"
"testing"
)
func TestSeqEnd(t *testing.T) {
expected := SeqEnd{
BaseEntity: BaseEntity{
On: true,
Visible: true,
},
}
next := core.Tagger(strings.NewReader(" 0\nSEQEND"))
seqend, err := Ne... |
<gh_stars>1-10
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: cosmos/evidence/query.proto
package types
import (
context "context"
fmt "fmt"
types "github.com/cosmos/cosmos-sdk/codec/types"
query "github.com/cosmos/cosmos-sdk/types/query"
_ "github.com/gogo/protobuf/gogoproto"
grpc1 "github.com/g... |
#include <iostream>
class Timeline {
private:
bool stopped;
double speed;
public:
// Constructor to initialize the timeline with default speed and stopped state
Timeline() : stopped(true), speed(1.0) {}
// Method to check if the timeline is in a stopped state
bool hasStopped() const {
... |
<reponame>TachoMex/ant<gh_stars>1-10
# frozen_string_literal: true
module Ant
module Bot
# Object that wraps a command, it is analogus to a route definition.
# it currently only gets a param list, but it will be extended to a more
# complex DSL.
class Command
attr_reader :block
# Receive... |
### System Preferences > General
# Appearance: Dark
defaults write NSGlobalDomain AppleInterfaceStyle -string "Dark"
# Accent color: Blue
defaults write NSGlobalDomain AppleAquaColorVariant -int 1
# Highlight color: "Blue"
defaults write NSGlobalDomain AppleHighlightColor -string '0.780400 0.815700 0.858800'
# Auto... |
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-common/7-model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-common/7-512+0+512-NER-first-256 --do_eval --per_dev... |
<gh_stars>0
import React from "react";
import { Route } from "react-router-dom";
import Navbar from "../components/navbar";
import { OverviewLayout, PatientDetailLayout, PatientListLayout, UnauthenticatedLayout } from "../layouts";
import style from "./app.module.less";
import { useAppContext } from "../contexts/app-c... |
#!/usr/bin/env bash
brew update;
brew install lazydocker
|
<gh_stars>0
import chalk from 'chalk';
import _ from 'lodash';
import config from '../config.json';
import { generateServerMessage } from './lib/utilities';
import { initialize } from './modules/initialize';
/**
* Configuration.
*
* @since 1.0.0
*/
const configSettingsTimeZone = _.get(config, 'settings.time-zone... |
<gh_stars>0
var _Promise = typeof Promise === 'undefined' ? require('es6-promise').Promise : Promise;
var limitPromises = require('./limitPromises');
describe('limitPromises', function () {
var pending = 0;
function fn() {
pending++;
return new _Promise(function (resolve) {
return setTimeout(resolve... |
a = [3,4,6,2,1]
for x in a:
print(x)
a.sort()
for x in a:
print(x)
Output:
1
2
3
4
6 |
def count_in_range(lst, a, b):
return len([x for x in lst if a < x < b])
result = count_in_range([4, 10, 8, 16, 5], 5, 11)
print(result) |
<gh_stars>100-1000
// Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved.
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation... |
#!/usr/bin/env python
# oculus.py
# Subscribes to camera output, publishes data about what it sees.
# Determines what to look for based on what is being subscribed to.
import rospy
from cv_bridge import CvBridge
from sensor_msgs.msg import Image, CompressedImage
from riptide_vision import RiptideVision
from gate_proce... |
<filename>backend/estimator_2d.py
"""
@author: <NAME>
@contact: <EMAIL>
"""
import sys
import os.path as osp
project_path = osp.abspath ( osp.join ( osp.dirname ( __file__ ), '..' ) )
if project_path not in sys.path:
sys.path.insert ( 0, project_path )
from backend.light_head_rcnn.person_detector import PersonDet... |
<gh_stars>10-100
#include <stdio.h>
#include "logger.h"
#include "loggerconf.h"
int main(int argc, char* argv[]) {
char filename[256];
if (argc <= 1) {
printf("usage: %s <conf file>\n", argv[0]);
return 1;
}
strncpy(filename, argv[1], strlen(argv[1]));
logger_configure(filename);
... |
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Create, possibly migrate from, the unencrypted stateful partition, and bind
# mount the /var and /home/chronos mounts from the encrypted filesystem
... |
import React from 'react'
import PropTypes from 'prop-types'
import { makeStyles } from '@material-ui/styles'
import ProgressBar from 'core/components/progress/ProgressBar'
import Tooltip from '@material-ui/core/Tooltip'
import { identity } from 'ramda'
const useStyles = makeStyles(theme => ({
root: {
display: '... |
package actionScope;
public class Son {
}
|
const Discord = require('discord.js')
let request, response
request = require('async-request')
module.exports = {
name: 'mojangStatus',
description: 'Generates a command for head drops',
aliases: ['mojang', 'minecraftStatus'],
async execute (message, args) {
const colors = {'green': '0x55ACEE', 'yellow': '... |
#!/bin/bash
git clone http://github.com/lh3/wgsim
cd wgsim
gcc -g -O2 -Wall -I${PREFIX}/include -L${PREFIX}/lib -o wgsim wgsim.c -lz -lm
cp wgsim wgsim_eval.pl $PREFIX/bin/
|
<reponame>lovelyHarper/apl-suggester
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://ww... |
<reponame>samlanning/hub-detect<filename>hub-detect/src/test/groovy/com/blackducksoftware/integration/hub/detect/detector/cpan/CpanListParserTest.java
/*
* Copyright (C) 2017 Black Duck Software Inc.
* http://www.blackducksoftware.com/
* All rights reserved.
*
* This software is the confidential and proprieta... |
<reponame>lyutl/2021-2-level-ctlr
"""
Implementation of POSFrequencyPipeline for score ten only.
"""
import json
import re
from constants import ASSETS_PATH
from core_utils.article import ArtifactType
from core_utils.visualizer import visualize
from pipeline import CorpusManager, validate_dataset
class EmptyFileErro... |
<reponame>Pluxbox/radiomanager-java-client
/*
* RadioManager
* RadioManager
*
* OpenAPI spec version: 2.0
* Contact: <EMAIL>
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.plu... |
<reponame>cprodhomme/active_scaffold<filename>lib/active_scaffold/bridges/carrierwave/carrierwave_bridge.rb
module ActiveScaffold
module Bridges
class Carrierwave
module CarrierwaveBridge
def initialize(model_id)
super
return unless model.respond_to?(:uploaders) && model.uploader... |
package io.opensphere.mantle.data.geom.style.impl;
import java.util.List;
import java.util.Set;
import org.apache.log4j.Logger;
import io.opensphere.core.Toolbox;
import io.opensphere.core.util.collections.New;
import io.opensphere.mantle.data.DataTypeInfo;
import io.opensphere.mantle.data.MapVisualization... |
<html>
<head>
<title>Customer Cart</title>
</head>
<body>
<h1>Customer Cart</h1>
<div>
<table>
<thead>
<tr>
<th>Item</th>
<th>Quantity</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<!-- Generate row for each item -->
</tbody>
</ta... |
package com.example.myapplication;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;
public class MainActivity extends Activity {
ArrayAdapter<String> adapter;
... |
<gh_stars>1-10
package elasta.webutils.model;
import io.vertx.core.http.HttpMethod;
import lombok.Builder;
import lombok.Value;
import java.util.Objects;
/**
* Created by sohan on 5/10/2017.
*/
@Value
@Builder
public final class UriAndHttpMethodPair {
final String uri;
final HttpMethod httpMethod;
Uri... |
#!/bin/bash
# Script is brought to you by ATADA_Stakepool, Telegram @atada_stakepool
#load variables from common.sh
# socket Path to the node.socket (also exports socket to CARDANO_NODE_SOCKET_PATH)
# genesisfile Path to the genesis.json
# magicparam TestnetMagic parameter
# ... |
#!/bin/bash
deno run --unstable --import-map=local_import_maps.json --watch -A index.ts serve file:///Users/eltonmarku/resumerise/resumerise_flux/resumerise_theme_retro/mod.ts |
package me.yamakaja.commanditems.data.action;
import com.fasterxml.jackson.annotation.JsonProperty;
import me.yamakaja.commanditems.data.ItemDefinition;
import me.yamakaja.commanditems.interpreter.InterpretationContext;
import java.util.*;
public class ActionMathExpr extends Action {
@JsonProperty(required = tr... |
/* eslint-disable @typescript-eslint/no-explicit-any */
import {
LitElement,
html,
customElement,
property,
CSSResult,
TemplateResult,
css,
internalProperty,
} from 'lit-element';
import { Light } from './light';
import {
HomeAssistant,
LovelaceCardEditor,
getLovelace,
} from 'custom-card-helpers'... |
<gh_stars>0
/*
* Copyright (C) 2016 The Android Open Source Project
*
* 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... |
<filename>AV/PIFLA/Regular/RegExFS.js
/*global PIFRAMES */
/* Written by ?? and <NAME> */
$(document).ready(function() {
"use strict";
var av_name = "RegExFS";
var av = new JSAV(av_name);
var Frames = PIFRAMES.init(av_name);
// Frame 1
av.umsg("This frameset presents the definition and some examples for a ... |
#!/bin/bash
# Step 1: Execute the build.sh script to build the model
echo "Building the model..."
if ! ./build.sh; then
echo "Error: Failed to build the model"
exit 1
fi
# Step 2: Run the model_test executable with specific command-line arguments
echo "Running model tests..."
if ! ./build/model_test --single_thre... |
import java.util.ArrayList;
import java.util.HashMap;
// Function to find the shortest possible route
public int shortestRoute(String[] cities, HashMap<String, Integer> distances) {
// Create an ArrayList to store the result
ArrayList<String> shortestRoute = new ArrayList<>();
// Create a variable to store the ... |
#Store the scores in a dictionary
scores = {'Rafael': 30, 'Gaby': 40}
#Create a function to check if there is a winner
def check_winner(scores):
winner = None
max_score = 0
#Iterate through the dictionary and check the highest score
for key, value in scores.items():
if value > max_score:
max_score = value
... |
<gh_stars>1-10
package string_handle;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/**
*
* @author minchoba
* 백준 4999번: 아!
*
* @see https://www.acmicpc.net/problem/4999/
*
*/
public class Boj4999 {
public static void main(String[] args) throws Exception{
// 버퍼를 통한 값 입력
BufferedReader ... |
<gh_stars>1-10
import log from './log';
export default function() {
var argv = arguments.length
, body = document.body
, doc = document.documentElement
, curr = 0
, total = 1
, view = 1
, regexp = /^(\d+(?:\.\d+)?)(%|view)?$/
, temp
;
if (argv === 1) { // 读操作
body = document.body;
doc = documen... |
#!/bin/sh
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
set -e
ROOTDIR=dist
BUNDLE="${ROOTDIR}/Monacoin-Qt.app"
CODESIGN=codesign
TEMPDIR=sign.temp
TEMPLIST=${TEMPDIR}/signa... |
import java.util.*;
class WeightedNode implements Comparable<WeightedNode> {
public String name;
private ArrayList<WeightedNode> neighbors = new ArrayList<WeightedNode>();
private HashMap<WeightedNode, Integer> weightMap = new HashMap<>();
private boolean isVisited = false;
private WeightedNode parent;
private... |
#include <iostream>
int linearSearch(int arr[], int size, int key)
{
for (int i = 0; i < size; i++)
{
if (arr[i] == key)
{
return i;
}
}
return -1;
}
int main()
{
int arr[] = {3, 5, -2, 8};
int key = 8;
int size = sizeof(arr)/sizeof(arr[0]);
int ... |
<filename>komponent/example.stories.tsx
import React from 'react';
import Komponent from './src';
export default {
component: Komponent,
parameters: {
componentSubtitle: 'Kort tekst om komponenten',
},
title: 'Komponenter/{{komponent}}',
};
export const standard = () => {
return <Komponent... |
<filename>app/src/main/java/com/nanchen/rxjava2examples/practice/TestHttpActivity.java
package com.nanchen.rxjava2examples.practice;
import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.View;
import android.widget.Button;
impor... |
<reponame>PaerrePampula/SmartCan_sensor
/*A distance sensor, that is using sonar to measure distances. The recommended and the originally used component is HC-SR04.
Maximum possible distance measured : 400cm
The connections are:
Connect VCC to a 5v power supply, do not use 3.3V! Its not enough for the sensor, and it on... |
import { withRouter } from 'react-router-dom'
import { actions } from '../../Actions/User'
import { connect } from 'react-redux'
import Register from './Register'
const mapDispatchToProps = dispatch => ({
onRegister({ email, password, firstname, lastname }) {
dispatch(actions.UserCreate(email, password, firstnam... |
<gh_stars>1-10
package httpclient
import (
"github.com/fighthorse/redisAdmin/component/conf"
"github.com/mitchellh/mapstructure"
"github.com/prometheus/client_golang/prometheus"
)
var (
remoteCallErrorCount = prometheus.NewCounterVec(
prometheus.CounterOpts{Name: "remote_call_error_count", Help: "remote call er... |
#!/bin/bash
# Script to build all cross and native compilers supported by musl-libc.
# This isn't directly used by toybox, but is useful for testing.
if [ ! -d litecross ]
then
echo Run this script in musl-cross-make directory to make "ccc" directory.
echo
echo " "git clone https://github.com/richfelker/musl-c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.