text stringlengths 1 1.05M |
|---|
#!/bin/bash
# Author: yeho <lj2007331 AT gmail.com>
# BLOG: https://blog.linuxeye.cn
#
# Notes: OneinStack for CentOS/RedHat 6+ Debian 7+ and Ubuntu 12+
#
# Project home page:
# https://oneinstack.com
# https://github.com/lj2007331/oneinstack
Install_Jemalloc() {
if [ ! -e "/usr/local/lib/libjemalloc.s... |
def unescapeHTML(s):
html_entities = {
"<": "<",
">": ">",
"&": "&",
""": "\"",
"'": "'"
}
for entity, char in html_entities.items():
s = s.replace(entity, char)
return s |
import { Quote } from 'yahoo-finance2/dist/esm/src/modules/quote';
export class SendResourceMailDto {
userName: string;
userEmail: string;
quotes: Quote[];
}
|
// Declaration for the window.sk global variable.
import { SkPerfConfig } from '../json';
declare global {
interface Window {
sk: {
perf: SkPerfConfig;
};
}
}
|
#!/bin/sh
. venv/bin/activate
python3 model_converter.py
python3 tflite_test.py
|
#!/bin/sh
set -x
g++ DigestOOP.cc test_oop.cc -std=c++17 -lcrypto -o oop
g++ DigestOOP2.cc test_oop.cc -std=c++17 -lcrypto -o oop2
g++ DigestTMP.cc test_oop.cc -std=c++17 -lcrypto -o tmp
g++ test_evp.cc -std=c++17 -lcrypto -o evp
g++ test_evp2.cc -std=c++17 -lcrypto -o evp2
g++ bench.cc DigestOOP.cc -std=c++17 -lbenc... |
<gh_stars>0
package com.m2m.shgs.android;
import android.app.Application;
import android.content.Context;
import com.alibaba.android.arouter.launcher.ARouter;
import com.ayvytr.logger.L;
import com.base.manager.ActivityStack;
import com.common.base.BaseApplication;
import com.common.config.AppConfig;
import com.http.... |
#include "pch-cpp.hpp"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <limits>
#include <stdint.h>
template <typename R>
struct VirtFuncInvoker0
{
typedef R (*Func)(void*, const RuntimeMethod*);
static inline R Invoke (Il2CppMethodSlot slot, RuntimeObject* obj)
{
const Virt... |
'use strict'
const HDWalletProvider = require('@truffle/hdwallet-provider');
const BigNumber = require('bignumber.js');
const Web3 = require('web3');
const API_QUOTE_URL = 'https://api.0x.org/swap/v1/quote';
const MNEMONIC = 'walnut mutual phone police nut tribe cross coast donate early urban target';
const RPC_URL = ... |
<reponame>phovea/phovea_core<filename>src/stratification/Stratification.ts
/* *****************************************************************************
* Caleydo - Visualization for Molecular Biology - http://caleydo.org
* Copyright (c) The Caleydo Team. All rights reserved.
* Licensed under the new BSD license,... |
<reponame>mcrisostomo9/votta-store<filename>gatsby-node.js
const path = require("path")
const { routes } = require("./src/data/routes")
exports.createPages = async ({ graphql, actions: { createPage } }) => {
const product = await graphql(`
query PagesQuery {
allShopifyProduct {
edges {
n... |
<filename>src/main/java/net/b07z/sepia/websockets/server/SocketChannelPool.java
package net.b07z.sepia.websockets.server;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurren... |
#include "Config.h"
#include "StorageSqlite.h"
#include "utils/NumberFormatter.h"
namespace Storage
{
extern StorageSqlite storageSqlite;
bool StorageSqlite::Open( const char * filename )
{
if(sqlite3_open(filename, &_sqlite) == SQLITE_OK)
{
return true;
}
return false;
}
void StorageSqlite::Close()
... |
<filename>modules/jooby-apitool/src/test/java/apps/Controller1059.java
package apps;
import org.jooby.mvc.GET;
import org.jooby.mvc.Path;
import javax.inject.Inject;
/**
* Top level comment.
*/
@Path("/test")
public class Controller1059 {
@Inject
public Controller1059() {
}
/**
* Say hi.
* @return ... |
$(document).on('ready', function () {
get_lista_taller_semestre($('#talleres_semestre_div .panel-heading h3.actual').data('id'));
$('#calendar_actividades').fullCalendar({
header: {
left: 'prev,next',
center: '',
right: 'agendaWeek,agendaDay'
},
defaul... |
<reponame>AnDamazio/book4u-api
export class PersonalData {
cpf: string;
cellphone: string;
telephone: string;
email: string;
password: string;
token: string;
streetName: string;
complement: string;
district: string;
houseNumber: string;
zipCode: string;
city: string;
state: string;
}
|
#!/bin/bash
cd "${BASH_SOURCE%/*}" || exit
ls -lahS ~/.*/wallet.dat ~/.komodo/*/wallet.dat
|
mkdir evaluation
mkdir evaluation/cnnprom
# CNNPROM trained model on DPROM dataset
python test/cnnprom.py --output evaluation/cnnprom/ours.csv --input models/ours/dataframe.csv
python analysis.py --output evaluation/cnnprom/ours_results/ --results evaluation/cnnprom/ours.csv
mkdir evaluation/dprom
# DPROM trained mode... |
class CustomExpressionVisitor implements ExpressionVisitor {
@Override
public String visitSearchedCaseExpression(SearchedCaseExpression node, List<Expression> parameters) {
var parts = new StringJoiner(" ", "(", ")");
parts.add("CASE");
for (WhenClause whenClause : node.getWhenClauses())... |
"use strict";
let playg = new Playground();
let kim = document.querySelector("#selectkim");
kim.addEventListener("click", function(event) {
let launch = document.querySelector("#launch")
launch.style.display = 'none';
playg.setPlayer1();
});
let donald = document.querySelector("#selectdonald");
donald.ad... |
sslcert_check() { # print cert info for all ssls in httpd.conf
ec yellow "Checking for SSL Certificates..."
if grep SSLCertificateFile $dir/usr/local/apache/conf/httpd.conf | grep -qv cpanel.pem; then
# get a list of certs and start counting
local i=0
local now=$(date +"%s")
for domain in $domainlist; do
f... |
<gh_stars>0
export const version = "providers/5.6.4";
|
#include "catch.hpp"
#include <maybe/result.hpp>
class A final {
public:
A(std::string value) : value(value)
{
}
std::string value;
};
class B final {
public:
B(std::string value) : value(value)
{
}
std::string value;
};
using maybe::result;
TEST_CASE("result_and_then")
{
SECTIO... |
#!/bin/bash
xbacklight -dec 5
|
<gh_stars>1-10
/*
* Author: <NAME>
* github: https://github.com/Tomp0801/Micro-RTSP-Audio
*
* Based on Micro-RTSP library for video streaming by Kevin Hester:
*
* https://github.com/geeksville/Micro-RTSP
*
* Copyright 2018 <NAME>, <EMAIL> (MIT License)
*/
#pragma once
#include "AudioStreamer.h"
/**
* Cre... |
def filterList(nums, filter):
# Initialize a filtered list
filtered_list = []
# Iterate over the list
for num in nums:
# Check if filter is true
if eval(str(num)+filter):
filtered_list.append(num)
# Return the filtered list
return filtered_list
result = filterList([1,2,5,6,-4,7,8], '> 0')
... |
import gql from 'graphql-tag'
import { FETCH_RECENT_CONTACTS } from 'store/constants'
export const RecentContactsQuery = gql`
query RecentContactsQuery ($first: Int) {
connections (first: $first) {
items {
id
person {
id
name
avatarUrl
memberships (fi... |
package com.carson.cloud.business.service;
import com.carson.cloud.business.entity.UserEntity;
public interface UserService {
/**
*
* @param
* @return
*/
public UserEntity findUserByName(String username);
public UserEntity findUserById(String id);
/**
*
* @param user
* @return
*/
public vo... |
<reponame>tenebrousedge/ruby-packer<gh_stars>1-10
require File.expand_path('../../../../spec_helper', __FILE__)
with_feature :encoding do
describe "Encoding::Converter.search_convpath" do
before :all do
@perms = Encoding.name_list.permutation(2).map do |pair|
Encoding::Converter.search_convpath(pai... |
import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { StyleSheet, Text, View, TouchableOpacity } from 'react-native';
import { translateCard } from '../actions/translateCard';
import { nextCard } from '../actions/nextCard';
const mapDispatchToProps = (di... |
#pragma once
#define DEFAULT_VS \
"#version 150 \n" \
\
"uniform mat4 projectionMatrix;\n" \
"uniform mat4 modelViewMatrix;\n" \
"attribute vec3 vertexPosition;\n" \
"attribut... |
const sharp = require('sharp')
const svgSharp = (svg) => sharp(Buffer.from(svg), {density: 500})
const svgToExtendedPng = async (svg) => {
return svgSharp(svg)
.extend({
top: 20,
right: 20,
bottom: 20,
left: 20,
background: '#00000000',
})
.toFormat('png')
.toBuffer()
}... |
<gh_stars>10-100
package com.yoga.weixinapp.controller;
import com.yoga.admin.shiro.OperatorToken;
import com.yoga.admin.shiro.SuperAdminUser;
import com.yoga.core.base.BaseController;
import com.yoga.core.base.BaseDto;
import com.yoga.core.data.ApiResult;
import com.yoga.core.data.ResultConstants;
import com.yoga.cor... |
# completion for some directories
_mcd() { _files -W $PWD -/; }
compdef _mcd mcd
cdgit() { cd ~git/$1; }
_cdgit() { _files -W ~git -/; }
compdef _cdgit cdgit
cdmp() { cd ~git/mediaport3/$1; }
_cdmp() { _files -W ~git/mediaport3 -/; }
compdef _cdmp cdmp
# setup completion
unsetopt menu_complete # do not autoselect... |
#!/bin/bash
# Download CIFAR10 and CIFAR100 dataset
cd data
wget https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz
wget https://www.cs.toronto.edu/~kriz/cifar-100-python.tar.gz
tar -xvf cifar-10-python.tar.gz
tar -xvf cifar-100-python.tar.gz
rm cifar-10-python.tar.gz
rm cifar-100-python.tar.gz
# Format
cd ../
... |
String.prototype.graphiteGlob = function(glob) {
var regex = '^';
for (var i = 0; i < glob.length; i++ ) {
var c = glob.charAt(i);
switch (c) {
case '*':
regex += '[^\.]+';
break;
case '.':
regex += '\\.';
br... |
-- Create the table for storing people's information
CREATE TABLE People (
Id INT PRIMARY KEY,
Name VARCHAR(100) NOT NULL,
-- Add other relevant columns for storing additional information about people
);
-- Create the table for storing contact details
CREATE TABLE ContactDetails (
Id INT PRIMARY KEY,
... |
#!/bin/bash
while getopts :podc: flag; do
case $flag in
d) delta=true;;
p) print=true;;
o) offset=true;;
#c) count=$OPTARG;;
c)
until (($(ps -C lemonbar -o pid= | wc -l) == OPTARG)); do
sleep 0.1
done;;
esac
done
#if [[ $flag ]]; then
# if [[ $flag == d ]]; then
# bar_name=$OPTARG
# else
# [[ ... |
<filename>engines/csv_importer/lib/csv_importer.rb
require 'csv_importer/engine'
class WebImport
def initialize(url)
@url = url
end
def call
url = 'http://assets.cahootify.com/recruitment/people.csv'
csv_string = open(url).read.force_encoding('UTF-8')
string_to_users(csv_string)
end
def st... |
/* globals CreateHTML, CreateMethodProperty */
// B.2.3.6String.prototype.fixed ( )
// When the fixed method is called with no arguments, the following steps are taken:
CreateMethodProperty(String.prototype, 'fixed', function fixed() {
// 1. Let S be the this value.
var S = this;
// 2. Return ? CreateHTML(S... |
#!/bin/bash -e
if [ "$1" == "REVERT" ]; then
NODES=($(kubectl get nodes -l "purpose notin (monitoring)" | grep -v ' Ready ' | cut -d' ' -f1))
else
NODES=($(kubectl get nodes -l 'purpose notin (monitoring)' | tail -n +2 | grep ' Ready ' | cut -d' ' -f1))
fi
INDEX=$(($RANDOM % ${#NODES[@]}))
NODE=${NODES[$INDEX]}
M... |
import React from 'react';
import { useState, useEffect } from 'react';
import axios from 'axios';
function App() {
const [items, setItems] = useState([]);
useEffect(() => {
axios
.get('https://api.example.com/items')
.then(response => {
const result = response.data;
setItems(result);
})
.cat... |
class Solution:
# @param n, an integer
# @return an integer
def reverseBits(self, n):
result = 0
for _ in range(32):
result = (result << 1) | (n & 1)
n >>= 1
return result |
def minimax(board, depth, maximizingPlayer):
# Base Case: Game over
if gameOver(board):
return evalGameOver(board)
# Base Case: Max Depth Reached
if depth == 0:
return evalState(board)
# Maximizing Player
if maximizingPlayer:
bestValue = -inf
for move in getLegalMoves(board):
# Recursively search ch... |
//src/services/factory.service.ts
import { Request, Response } from "express";
import Order from "../database/orders/orders.model";
import {
ORDERS_STATUS_PENDING,
ORDERS_STATUS_PRODUCTION,
} from "../constants/miniApi.constants";
import RequestUtil from "./requestUtil.service";
import { Status } from "../database... |
#!/bin/bash
########################################
# #
# Install packages for Ubuntu 14.04 #
# #
########################################
IS_INSTALLED=".installed"
# Setup Timezone
TIMEZONE="Asia/Taipei"
# Setup packages and version
PACKA... |
import os
import sys
from os import path
current_dir = path.dirname(path.abspath(__file__))
while path.split(current_dir)[-1] != r'Heron':
current_dir = path.dirname(current_dir)
sys.path.insert(0, path.dirname(current_dir))
from Heron import general_utils as gu
Exec = os.path.abspath(__file__)
# <editor-fold... |
#!/bin/bash
# TODOs
# 1. Add validation for each steps and abort the test if steps fails
# Build environment `Docker image` has all prerequisite setup and credentials are being passed using AWS system manager
CLUSTER_REGION=${CLUSTER_REGION:-us-east-1}
CLUSTER_VERSION=${CLUSTER_VERSION:-1.13}
# Define the list of op... |
/**
* This program and the accompanying materials
* are made available under the terms of the License
* which accompanies this distribution in the file LICENSE.txt
*/
package com.archimatetool.editor.ui.factory;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.ecl... |
<filename>src/app/loggedin/league/view/index.ts<gh_stars>0
import { ViewLeagueComponent } from './view-league.component';
import { LinkSpotifyForm } from './link-spotify.form';
export const VIEW_LEAGUE_COMPONENTS: Array<any> = [
ViewLeagueComponent, LinkSpotifyForm
];
|
<gh_stars>1-10
package dev.arkav.openoryx.game.models;
public class GameState {
public String buildVersion;
public int characterId;
public int gameId;
public byte[] key;
public int keyTime;
public String connectionGuid;
public GameState(String buildVersion) {
this.buildVersio... |
package org.usfirst.frc5112.Robot2017V3.commands;
import edu.wpi.first.wpilibj.command.Command;
/**
*
*/
public class DoNothingAtAll extends Command {
public DoNothingAtAll() {
}
protected void initialize() {
end();
}
protected void execute() {
end();
}
protected bool... |
require 'rubygems'
require 'bundler/setup'
Bundler.require(:default)
require "mygame/version"
require "mygame/models/player"
require "mygame/controllers/window"
require "mygame/models/zorder"
require "mygame/models/star"
module Mygame
# Your code goes here...
def self.start
Window.new.show
end
end
|
'use strict'
var test = require('tape')
, extract = require('../lib')
test('works without params: "y=7"',function(t) {
var parsed = extract('[]y=7')
t.deepEqual( parsed.content, 'y=7', 'content = "y=7"')
t.deepEqual( parsed.params, {}, 'params = ' + JSON.stringify({}) )
t.end()
})
test('extracts a paramete... |
import React from 'react';
import AirdropView from '~components/airdrop/Airdrop';
export function AirdropPage() {
return (
<div className="airdrop">
<div className="title text-center text-3xl pb-3 text-white font-semibold">
Airdrop
</div>
<div className="describe text-center text-sm pb-... |
<filename>src/lib/utils.ts
import {
baseTestResultType, FamousList,
IDescList,
IDescWithRange,
IDescWithStatus, IFamous,
IOctant,
ITendency
} from '../types/types';
import { octantCodeList } from './UserResult';
/**
* Отдает, в виде строки, описание в зависимости от интенсивности значения (value)
* @par... |
import {Component, OnInit, ViewChild} from '@angular/core';
import {SchedulingService} from '@app/scheduling/scheduling.service';
import { extend } from '@syncfusion/ej2-base';
import {ScheduleComponent} from '@syncfusion/ej2-ng-schedule';
import {scheduleData} from '@app/scheduling/datasource';
import { EventSettingsM... |
def add(num1, num2):
return num1 + num2
def subtract(num1, num2):
return num1 - num2
def multiply(num1, num2):
return num1 * num2
def divide(num1, num2):
return num1 / num2
print("Welcome to the interactive command line calculator")
while True:
print("Enter the operation - add, subtract, multiply, divide:")... |
<reponame>jmosro/trazactivo<filename>src/main/java/com/ipec/trazactivo/repository/ActivoDao.java
package com.ipec.trazactivo.repository;
import com.ipec.trazactivo.model.Activo;
import com.ipec.trazactivo.model.ActivoPK;
import org.springframework.data.jpa.repository.JpaRepository;
public interface ActivoDao extends ... |
<gh_stars>1-10
export default {
startAt: 0,
showBackButton: true,
showFooterButtons: true,
onInit: $.noop,
onDestroy: $.noop,
onFinish: $.noop,
onChange() { return true; },
stepSelector: '.step-steps > li',
contentSelector: '.step-content > .step-tab-panel',
footerSelector: '.step-footer',
buttonS... |
<gh_stars>1-10
package api
import (
"cf"
"cf/models"
"cf/net"
)
type FakeUserRepository struct {
FindByUsernameUsername string
FindByUsernameUserFields models.UserFields
FindByUsernameNotFound bool
ListUsersOrganizationGuid string
ListUsersSpaceGuid string
ListUsersByRole map[string][]m... |
use quick_xml::Reader;
use quick_xml::events::Event;
use std::io::BufRead;
struct Trackpoint {
latitude: f64,
longitude: f64,
elevation: f64,
}
fn parse_trackpoint<R: BufRead>(reader: &mut Reader<R>, buf: &mut Vec<u8>) -> Result<Trackpoint, String> {
let mut latitude: Option<f64> = None;
let mut l... |
<reponame>angelxehg/angelxehg.github.io
import React from "react"
export interface IconMeta {
// color?: string
fill?: boolean
style?: React.CSSProperties
svgPath: string
}
export interface LinkMeta {
name: string
displayName?: string
icon: IconMeta
href: string
}
|
import base64
class IdentificationError(Exception):
pass
class BasicAuthIdentifier:
def identify(self, headers):
auth_header = headers.get('HTTP_AUTHORIZATION')
if not auth_header:
raise IdentificationError("Invalid credentials in HTTP_AUTHORIZATION header")
... |
def solve_quadratic_equation(b, a, c):
disc = (b * b) - (4 * a * c)
if disc < 0:
return [None, None]
# compute the two roots using the formula
x1 = (-b + sqrt(disc)) / (2 * a)
x2 = (-b - sqrt(disc)) / (2 * a)
return [x1, x2] |
<reponame>vitalics/playwright<gh_stars>1-10
/**
* Copyright (c) Microsoft Corporation. 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://www.apache.or... |
<reponame>shreyasbapat/app
package kubernetes
import (
"fmt"
composev1beta1 "github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1beta1"
composev1beta2 "github.com/docker/compose-on-kubernetes/api/client/clientset/typed/compose/v1beta2"
"github.com/docker/compose-on-kubernetes/api/compose/... |
import { Button, Form, Typography } from 'antd';
import TextEditor from 'lib/components/TextEditor';
import React from 'react';
import { useDispatch } from 'react-redux';
import { useParams } from 'react-router-dom';
import { addAnswer } from 'store/modules/answers/answers.actions';
const { Item } = Form;
const { Titl... |
using UnityEditor;
using UnityEngine;
[CustomPropertyDrawer(typeof(NoiseSettings))]
public class NoiseSettingsDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
EditorGUI.BeginProperty(position, label, property);
SerializedPrope... |
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from unittest import TestCase
from uw_nws import NWS
from uw_nws.models import Channel
from uw_nws.utilities import fdao_nws_override
from uw_nws.exceptions import InvalidUUID
from restclients_core.exceptions import DataFailureExcep... |
#!/bin/bash
helm repo add templating https://harbor.34.89.193.23.nip.io/chartrepo/andrew |
<reponame>smagill/opensphere-desktop
package io.opensphere.core.util;
/** An arbitrator which will dictate whether phased commits are required. */
@FunctionalInterface
public interface PhasedChangeArbitrator
{
/**
* Tell whether phased commits are required.
*
* @return <code>true</code> when phased ... |
<filename>src/main/java/org/felix/ml/sampling/filter/single/RelMaxPosFilter.java
package org.felix.ml.sampling.filter.single;
import org.felix.ml.sampling.FilterContext;
import org.felix.ml.sampling.SamplePackage;
import org.felix.ml.sampling.ScoreResult;
import org.felix.ml.sampling.exception.ConfigException;
import ... |
#!/bin/bash
# Script Name: AtoMiC Muximux Menu
SUBCHOICE=$(whiptail --title "AtoMiC Toolkit - Manage Muximux" \
--menu "What would you like to do?" --backtitle "$BACKTITLE" \
--fb --cancel-button "Exit" $LINES $COLUMNS "$NETLINES" \
"Install" "Install Muximux" \
"Uninstall" "Uninstall Muximux" \
"Manual Update" "Manua... |
#!/bin/zsh
# Copyright 2016 Dylan Baker
# 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
# the rights to use, copy, modify, merge, publish, ... |
/**
* Signature/interface for a `CampaignData` object
* @see https://developer.apple.com/documentation/apple_news/metadata/campaigndata
*/
export interface CampaignData {
[key: string]: string[];
}
|
expected_version="$(echo "${TEST_PKG_IDENT}" | cut -d/ -f3)"
@test "make matches version ${expected_version}" {
actual_version="$(hab pkg exec "${TEST_PKG_IDENT}" make --version | grep "GNU Make" | awk '{print $3}')"
diff <( echo "$actual_version" ) <( echo "${expected_version}" )
}
@test "Make simple task" {
ru... |
import numpy as np
from PIL import Image
from io import BytesIO
from base64 import b64encode
def array_to_base64(arr: np.ndarray) -> str:
img = Image.fromarray(arr)
byte_io = BytesIO()
img.save(byte_io, 'JPEG')
im_data = byte_io.getvalue()
return 'data:image/jpeg;base64,' + b64encode(im_data).decod... |
#!/bin/bash
set -e
function version_le() { test "$(echo "$@" | tr " " "\n" | sort -V | tail -n 1)" != "$1"; }
# List of devices
targets='raspberry-pi raspberry-pi2 beaglebone-black intel-edison intel-nuc via-vab820-quad zynq-xz702 odroid-c1 odroid-xu4 parallella nitrogen6x hummingboard ts4900 colibri-imx6dl apalis-im... |
<gh_stars>1-10
import React from 'react'
import styled from 'styled-components'
const Styles = styled.span`
padding:8px;
.tagWrapepr{
padding:5px;
background-color:#684656;
color:#f2f2f3;
border-radius:7px;
}
`
const Tag = ({ tagName, ...props }) => {
return (
<S... |
<filename>app/src/main/java/com/github/starter/core/secrets/SecretsProperties.java
package com.github.starter.core.secrets;
import com.github.skhatri.mounted.model.SecretConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Configu... |
<filename>src/cpp-ethereum/test/tools/jsontests/TransactionTests.h
// Aleth: Ethereum C++ client, tools and libraries.
// Copyright 2015-2019 Aleth Authors.
// Licensed under the GNU General Public License, Version 3.
/// @file
/// Transaction test functions.
#pragma once
#include <test/tools/libtesteth/TestSuite.h>
#... |
# Write your solution here
def line(number, text):
if len(text) == 0:
print("*" * number)
else:
print(text[0]*number)
# You can test your function by calling it within the following block
if __name__ == "__main__":
line(5, "x") |
# if [[ $(host_os) = FreeBSD ]] ; then
# POWERLEVEL9K_MODE=""
# else
# POWERLEVEL9K_MODE="nerdfont-complete"
# fi
POWERLEVEL9K_MODE="nerdfont-complete"
# Hide false-positive(?) warning on FreeBSD
[ $host_os = "FreeBSD" ] && POWERLEVEL9K_IGNORE_TERM_COLORS=true
####
#### Conext (user + host)
####
POWERLEVEL9K... |
java -Xmx256M -classpath ../../../dist/IceNLPCore.jar is.iclt.icenlp.core.iceparser.PP_errors $1 > $2
|
<reponame>smagill/opensphere-desktop<filename>open-sphere-base/core/src/main/java/io/opensphere/core/util/collections/SetProvider.java
package io.opensphere.core.util.collections;
import java.util.Collection;
import java.util.Set;
/**
* Interface for a facility that provides sets.
*
* @param <E> The type o... |
package au.org.noojee.irrigation.views;
import java.security.SecureRandom;
import java.time.LocalDateTime;
import java.util.Base64;
import java.util.Base64.Encoder;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.SimpleEmail;
import org.apac... |
#!/usr/bin/env bash
set -eo pipefail
SCRIPT_VERSION=3.1 # Build script version (change this to re-build the CICD image)
##########################################################################
# This is the EOSIO automated install script for Linux and Mac OS.
# This file was downloaded from https://github.com/EOSIO/e... |
<reponame>saviorocha/freeCodeCamp-study
import React, { useState } from 'react';
import { AiOutlineMinus, AiOutlinePlus } from 'react-icons/ai';
const Question = () => {
return <h2>question component</h2>;
};
export default Question;
|
<reponame>vvydier/misk-web<gh_stars>10-100
import { logDebug, execute, handleCommand, npmRunScript } from "../utils"
export const command = "zip"
export const desc = "zip source code for tab\n"
export const handlerFn = async (...args: any) => {
logDebug(command, desc)
execute(npmRunScript(command), ...args)
}
expor... |
class CustomBinaryNumber:
def __init__(self, num):
self.BitNum = num
def __repr__(self):
return bin(self.BitNum)[2:]
def __str__(self):
return bin(self.BitNum)[2:]
def test_custom_binary_number(num):
custom_num = CustomBinaryNumber(num)
return custom_num.__repr__(), custom... |
#!/bin/bash
set -euo pipefail
LICENSES=$(poetry run pip-licenses)
INCOMPATIBLE_LIBS=$(echo "$LICENSES" | grep 'GPL' || true)
if [[ -z $INCOMPATIBLE_LIBS ]]; then
exit 0
else
echo "The following libraries were found which are not compatible with this project's license:"
echo "$INCOMPATIBLE_LIBS"
exit 1... |
SELECT Name, Age FROM Person ORDER BY Age DESC LIMIT 1; |
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
celery -A big_data_for_education.taskapp beat -l INFO
|
function assertNotNullable(value, label) {
if (value === null) {
throw new Error(`Expected value (${label}) not to be nullable, actually null.`);
}
}
// Test the function
test('Throw error if value is null.', () => {
expect(() => assertNotNullable(null, 'fuga'))
.toThrowError('Expected value (fuga) not t... |
package com.honyum.elevatorMan.net.base;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class NetConstant {
public static final String UPDATEWORKORDER= "/workOrder/updateWorkOrder";
public static final String GETINDEXWEIXIUGONGLINE= "/getIndexWeiXiuGongLine";
... |
#!/bin/sh
# Modify 256-color palette in supported terminals
# Script adapted from https://github.com/chriskempson/base16-shell
set -o errexit
hex2rgb() {
local s=$1
local r=${s:1:2}
local g=${s:3:2}
local b=${s:5:2}
echo "$r/$g/$b"
}
if [ "${TERM%%-*}" = 'linux' ]; then
# This script doesn't support linux... |
<reponame>licjus/terraform-provider-ochk
// Code generated by go-swagger; DO NOT EDIT.
package reservations
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"g... |
#!/bin/sh
# Integration tests for qcow2.c via catqcow2 using the output from qemu-img.
bail () { echo "Bail out! $*"; exit 1; }
result () { # [0|1] <desc>
counter=$(expr ${counter:-0} + 1)
if [ $1 -eq 0 ]; then echo "ok $counter - $2"
else echo "not ok $counter - $2"; failed=1; fi
if [ $counter -gt $countermax ]; ... |
# Set of functions for testing docker images in OpenShift using 'oc' command
# ct_os_get_status
# --------------------
# Returns status of all objects to make debugging easier.
function ct_os_get_status() {
oc get all
oc status
}
# ct_os_print_logs
# --------------------
# Returns status of all objects and logs f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.