text stringlengths 1 1.05M |
|---|
Meteor.i18nMessages.codes = {
locale : {
en : {
en : "English",
rx : "$English$"
},
rx : {
en : "Test",
rx : "$Test$"
}
},
logLevel : {
0 : {
en : "Fatal",
rx : "$Fatal$",
code: "FAT... |
<filename>com.archimatetool.canvas/src/com/archimatetool/canvas/factory/CanvasConnectionUIProvider.java
/**
* 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.canvas.factory;
im... |
import { is } from "./is";
describe("When testing if value is", () => {
describe("present", () => {
it("should be positive when value is neither null nor undefined", () => {
expect(is(3).present()).toBeTruthy();
expect(is("hello").present()).toBeTruthy();
expect(is(0).present()).toBeTruthy();
... |
<reponame>mini-crm/mini-crm<filename>product-group-data-api/src/main/java/tr/com/minicrm/productgroup/data/ProductGroup.java
package tr.com.minicrm.productgroup.data;
public interface ProductGroup {
public Long getId();
public String getName();
public int getVersion();
}
|
<reponame>bandey/lexicon-byzlaw-client<gh_stars>0
import React from 'react';
import {Link} from 'react-router-dom';
import DataProvider from '../../data-provider/data-provider.js';
import {getOpusAll} from '../../data-provider/data-provider-queries.js';
import Choice from '../../components/choice/choice.js';
const qu... |
<filename>sansio_multipart/wsgi_form_parser.py<gh_stars>1-10
__all__ = ["parse_form_data"]
from io import BytesIO
from urllib.parse import parse_qs
from .parser import MultipartParser
from .utils import MultiDict, parse_options_header
from .errors import MultipartError
def parse_form_data(environ, charset="utf8", ... |
#!/usr/bin/sh
echo "execute ./covme ./examples/c/function_call/a.out"
echo "covme use gdb for trace program, gdb must be installed"
TEST_GDB=`which gdb`
if [ $? -ne 0 ]; then
echo "gdb not found, please make sure gdb installed"
exit 1
fi
./covme ./examples/c/function_call/a.out 1 2 |
ACTIONS=['start', 'cancel_start', 'stop', 'cancel_stop'] # order is important here. Events will be ordered by this!!!
def calculate_periods(records):
"""
This method is responsible for calculating the periods from the raw records list.
First, it sorts the list by medication_name and event_time and action.... |
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you... |
def classify_emails(emails):
spam_messages = []
not_spam_messages = []
for email in emails:
words = email.split(" ")
spam_words = 0
for word in words:
if word in spam_words_list:
spam_words += 1
if spam_words > 0:
spam_messages.append(e... |
<gh_stars>0
package com.google.android.cameraview.demo;
import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import androi... |
<gh_stars>1-10
#include "stdafx.h"
#include <string.h>
#include <filesystem>
#include <stdexcept>
#include <d3dcompiler.h>
#include <DirectXMath.h>
#include "D3dTiles/D3d/TextureShader.h"
namespace TileEngine::D3d {
TextureShader::TextureShader() {}
TextureShader::~TextureShader() {}
void TextureShader::Initiali... |
def ensure_attribute_value(expected_name, expected_namespace):
def decorator(cls):
if getattr(cls, 'name', None) != expected_name or getattr(cls, 'namespace', None) != expected_namespace:
raise AttributeError(f"Invalid attribute values for class {cls.__name__}")
return cls
return dec... |
# 上线所用的git地址
releaseGit='https://github.com/wudaming1/ttWebsiteP.git'
# 当前分支
branch=`git branch | grep -e '^*' | cut -d' ' -f 2`
# 必须得在master下才可操作
if [ "$branch" == 'master' ]
then
# 先编译
npm run build:prod
# 万一没有编译成功,在此退出
test ! -d dist/tt-website && echo 'no dist/tt-website directory' && exit
cd ./dist
... |
<filename>src/maze.c
/*
* Maze Thread
* | - --thread|-t 5 (RANGE = RAND(T*10))
* | - --help|-h
*/
// MAZE HEADER
#include "maze.h"
#include "racing.h"
#include "rrand.h"
#include <ctype.h>
#include <getopt.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#define die(STR) ... |
#!/bin/bash
if [ -d "$1" ]; then
cd "$1"
else
echo "Usage: $0 <datadir>" >&2
echo "Removes obsolete Spoomy database files" >&2
exit 1
fi
LEVEL=0
if [ -f wallet.dat -a -f addr.dat -a -f blkindex.dat -a -f blk0001.dat ]; then LEVEL=1; fi
if [ -f wallet.dat -a -f peers.dat -a -f blkindex.dat -a -f blk0001.dat ];... |
<reponame>haojile/JavaFxToolDemo<filename>src/main/java/com/xwintop/xJavaFxTool/newui/NewLauncherService.java
package com.xwintop.xJavaFxTool.newui;
import com.xwintop.xJavaFxTool.AppException;
import com.xwintop.xJavaFxTool.model.PluginJarInfo;
import com.xwintop.xJavaFxTool.plugin.PluginLoader;
import javafx.scene.c... |
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Search in DuckDuckGo
# @raycast.mode silent
# Optional parameters:
# @raycast.icon images/duck-duck-go.png
# @raycast.packageName Web Searches
# @raycast.argument1 { "type": "text", "placeholder": "query" }
open "https://duckduckgo.com/?q... |
class Scenario < ApplicationRecord
# ActiveRecord scopes used when migrating scenarios with new user values.
module Migratable
# Public: Scenarios which should receive new user values when the ETSource
# data requires changes to existing scenarios.
#
# See migratable_since
#
# Returns an Act... |
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. "$CURDIR"/../shell_config.sh
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS ordinary_00682"
${CLICKHOUSE_CLIENT} --query="CREATE TABLE ordinary_00682(k UInt32) ENGINE MergeTree ORDER BY k SETTINGS remove_empty_parts=0"
${CLICKHOUSE_CLIENT... |
programming language: True
interpreted: True
high-level: True
general-purpose: True
OR
programming language: True
interpreted: True
compiled: False
high-level: True
general-purpose: True |
#!/bin/bash
#PBS -N "rfm_blast_tblast_example_job"
#PBS -o rfm_blast_tblast_example_job.out
#PBS -e rfm_blast_tblast_example_job.err
#PBS -l walltime=0:10:0
#PBS -A PZS0710
#PBS -l nodes=1:ppn=28
#PBS -q debug
cd $PBS_O_WORKDIR
module load blast-database/2018-08
module load blast
# Check module environment
module li... |
#!/bin/bash
OCTOOLSBIN=$(dirname $0)
# =================================================================================================================
# Usage:
# -----------------------------------------------------------------------------------------------------------------
usage() {
cat <<-EOF
Tool to generat... |
<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... |
package mastermind.server.dispatchers;
import mastermind.controllers.GameController;
public class GetWhitesDispatcher extends Dispatcher {
public GetWhitesDispatcher(GameController gameController) {
super(gameController);
}
@Override
public void dispatch() {
int position = tcpip.rece... |
#@IgnoreInspection BashAddShebang
origin='https://github.com/hanovruslan/bash-get-options.git'
source='src/src.sh' |
public class Setter {
public static void setOpacityProp(Object obj, float val) {
// Implementation to set the opacity property of the object
// Example: ((SomeObject) obj).setOpacity(val);
}
public static void setVisibilityProp(Object obj, int val) {
// Implementation to set the vis... |
<reponame>szab100/secmgr
// Copyright 2018 Google 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 appli... |
package cn.org.bjca.example.client.nio;
import cn.org.bjca.example.socket.ExampleMessage;
import lombok.extern.slf4j.Slf4j;
import org.glassfish.grizzly.Buffer;
import org.glassfish.grizzly.Connection;
import org.glassfish.grizzly.GrizzlyFuture;
import org.glassfish.grizzly.WriteResult;
import org.glassfish.grizzly.ni... |
curl --silent https://influxdb.galaxyproject.eu:8086/ping -D - | grep -i influx
|
#!/usr/bin/env bash
set -efu
export CERTS=./test_fixtures
export REGISTRY_HOST="https://localhost:8091"
echo "Running grafana agent"
go run cmd/grafana_dashboard_controller/main.go \
-registry ${REGISTRY_HOST} \
-output-directory /tmp/dashboards \
-tls-pem-path ${CERTS}/client.pem \
-tls-key-path ${CERTS}/cli... |
# Sample usage of the GroupManager class
class Group:
def __init__(self, members, isPublic, group_id):
self.members = members
self.isPublic = isPublic
self.id = group_id
# Create a group object
group_info = Group(["Alice", "Bob", "Charlie"], True, 123)
# Initialize GroupManager with the gr... |
#!/usr/bin/env python
# _*_ coding: utf-8 _*_
"""
@author : lightnine
@site : https://ligntnine.github.io
@version : 1.0
@file : auto_differentiation.py
@software : PyCharm
@time : 2019/1/22 20:27
tensorflow 中自动求取微分
https://www.tensorflow.org/tutorials/eager/automatic_differentiation?hl=zh-cn
"""
impo... |
import { observer } from 'mobx-react-lite';
import React from 'react';
import styles from './BlockCreationRow.module.scss';
export interface IBlockCreationRowProps {
performance: number;
performancePercentage: number;
sharedRewards: number;
slotsElected: number;
slotsElectedPercentage: number;
stakePool: s... |
<filename>platform/store/minio/minio.go
package minio
import (
"os"
"github.com/minio/minio-go/v6"
)
type Options struct {
Bucket string `json:"bucket" yaml:"bucket"`
Location string `json:"location" yaml:"location"`
Prefix string `json:"prefix" yaml:"prefix"`
URL string `json:"url" yaml:"url"`
Acces... |
class BinaryClassifier:
def __init__(self, model):
self._model = model
def predict_probabilities(self, x_test):
return self._model.predict_proba(x_test) |
import Decimal from 'decimal.js';
import release from "@/api/release";
export const deltaStats = ['Histogram']
export const CL_99 = "99"
export const CL_95 = "95"
export const confLevelOptions = [
{text: "99%", value: .99},
{text: "95%", value: .95},
]
export default {
statisticsUseDelta: function (sta... |
export interface DataCtx {
date: Date;
isoString: string;
localtime: {
hour: number;
minute: number;
};
timestamp: number;
timezones: string[];
}
export function newYear2000UTC1(): DataCtx {
const isoString = "2000-01-01T00:00:00Z";
const date = new Date(isoString);
const localtime = { hour: ... |
def count_arguments(*args):
'''Given a function with a variable number of arguments (args),
this function will count the number of arguments and print the total.'''
n_args = len(args)
print('Number of arguments:', n_args) |
<reponame>david-yappeter/go-mysql-suite
package tests
import (
"myapp/config"
"myapp/entity"
"os"
"testing"
"github.com/stretchr/testify/suite"
"gorm.io/gorm"
)
type SuiteTest struct {
suite.Suite
db *gorm.DB
}
func TestSuite(t *testing.T) {
os.Setenv("DB_HOST", "127.0.0.1")
os.Setenv("DB_PORT", "3306")
... |
#!/bin/bash
echo "--------------------------------------------------"
echo "Environment Vars.................................."
echo "INSTALL_APEX: ${INSTALL_APEX}"
echo "INSTALL_SQLCL: ${INSTALL_SQLCL}"
echo "INSTALL_SQLDEVWEB: ${INSTALL_SQLDEVWEB}"
echo "INSTALL_LOGGER: ${INSTALL_LOGGER}"
echo "INSTALL_OOSUTILS: ${I... |
require 'dionysus/travisci/gemfile_generator'
namespace :travis do
desc "Generate gemfiles for Travis-ci"
task :gemfiles do
gen = Dionysus::TravisCI::GemfileGenerator.new($rake_root.join("Gemfile").to_s)
# No Mongo
gen.generate($rake_root.join("gemfiles", "no-mongo.gemfile").to_s,
:wi... |
from serial_host.robot_interface import RobotInterface
from serial_host import packet_definitions as pkt
import threading
import hid
DEADBAND = 5
x_vel = 0
y_vel = 0
pwm = 0
angle = 90
def robot_thread():
main.add_motor_command(pkt.pack_MotorCommandPacket(0, pkt.MotorCommand.ENABLE))
main.add_motor_command(... |
<reponame>stjordanis/ts2fable
/**
* @deprecated use something else
*/
interface I {}
|
<gh_stars>1-10
package au.org.noojee.irrigation.entities;
import java.time.Duration;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence... |
#!/bin/sh -x
go run main.go $@
|
#!/bin/sh
# This collection of scripts will take settings from /etc/config/meshwizard, /etc/config/freifunk
# and /etc/config/profile_<community> and setup the router to participate in wireless mesh networks
# Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
# Licensed under the Apache License, Version 2.0 (... |
<gh_stars>1-10
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
***************************************************************************
**************************************************************... |
const { isValidTemplate, compileTemplate } = require('./utils');
function createLoggerAction(fn, name) {
return (...args) => {
const Action = (context, props) =>
fn(
...args.map((arg) => {
if (typeof arg === 'function') {
return arg(context, props);
}
if (t... |
<filename>hooks/darkTheme.tsx
import {
useContext,
useEffect,
createContext,
Dispatch,
SetStateAction,
ReactNode,
} from "react";
const DarkThemeContext = createContext<
[boolean, Dispatch<SetStateAction<boolean>>]
>([undefined, undefined]);
export function DarkThemeProvider({
children,
value,
}: {
... |
envValue=$1
APP_NAME=$2
OPENSHIFT_NAMESPACE=$3
TZVALUE="America/Vancouver"
SOAM_KC_REALM_ID="master"
KCADM_FILE_BIN_FOLDER="/home/jenkins/workspace/${OPENSHIFT_NAMESPACE}-tools/keycloak-9.0.3/bin"
DB_JDBC_CONNECT_STRING=$(oc -o json get configmaps ${APP_NAME}-${envValue}-config | sed -n 's/.*"DB_JDBC_CONNECT_STRING": ... |
#include <iostream>
#include <vector>
#include <chrono>
std::vector<int> multiplyMatrices(const std::vector<int>& matrix1, const std::vector<int>& matrix2, int size) {
std::vector<int> result(size * size, 0);
for (int i = 0; i < size; ++i) {
for (int j = 0; j < size; ++j) {
for (int k = 0;... |
// TODO: a work in progress
var keycloakUrl = "rest/keycloak.json";
var dukecloak = new function () {
// Data
var self = this;
self.keycloakAuth = new Keycloak(keycloakUrl);
self.auth = {
username: ko.observable(""),
loggedIn: ko.observable(false),
loggedOut: ko.observable(tru... |
package club.blog.redis.service.zset;
import java.util.Set;
public interface ZSetJedis {
Set<String> get(String key);
Set<String> get(String key,Long end);
Set<String> get(String key,Long start,Long end);
void zadd(String key,String value);
void zadd(String key,String value,Long score);
voi... |
import mongoose, { Schema } from 'mongoose';
const blogSchema = new Schema({
deletedAt:{ date: {type:Date} , actor:{ type: Schema.Types.ObjectId , ref:'contact'} },
createdAt: { type: Date , default: Date.now() },
updatedAt: { type: Date },
});
const blogModel = mongoose.model('blog', blogSchema);
export defa... |
<reponame>mason-fish/brim
import {useSelector} from "react-redux"
import React, {useEffect} from "react"
import {ipcRenderer} from "electron"
import {XLatestError} from "./LatestError"
import AboutModal from "./AboutModal"
import ErrorNotice from "./ErrorNotice"
import HTMLContextMenu from "./HTMLContextMenu"
import ... |
<gh_stars>1-10
package info.javaspecfeature;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(//features = {"target"},
format = { "pretty", "html:target/cucumber", "rerun:target/rerun.txt" },
monochrome = true,
ta... |
var searchData=
[
['uart_5fbrr_5fsampling16',['UART_BRR_SAMPLING16',['../usart3_8c.html#a9250770f3a90b54703cf9fcb5023e617',1,'usart3.c']]],
['uart_5fbrr_5fsampling8',['UART_BRR_SAMPLING8',['../usart3_8c.html#aa80d222c1ad6f9ca0fddfc0b87fe8464',1,'usart3.c']]],
['usart3_2ec',['usart3.c',['../usart3_8c.html',1,'']]]... |
#include <stdio.h>
int main()
{
int numbers;
printf("N: ");
scanf("%d", &numbers);
printf("--- WHILE ---\n");
int w = numbers;
while (w <= 0)
{
printf("W = %d\n", w);
w++;
}
printf("--- FOR ---\n");
for (int i = numbers; i < 0; i++)
{
printf("F = %d\n", i);
}
return 0;
}
|
<gh_stars>1-10
package elasta.composer.respose.generator;
import io.vertx.core.json.JsonArray;
/**
* Created by sohan on 5/12/2017.
*/
public interface JsonArrayResponseGenerator<T> extends ResponseGenerator<T, JsonArray> {
@Override
JsonArray apply(T t) throws Throwable;
}
|
def merge_sets(set1: set, set2: set, set3: set, set4: set) -> list:
merged_list = list(set1) + list(set2) + list(set3) + list(set4) # Convert sets to lists and concatenate
merged_list.sort() # Sort the merged list in ascending order
return merged_list |
<filename>constants/package-suggestions.js
module.exports = {
SEARCH_START: 'PACKAGE_SUGGESTIONS_SEARCH_START',
SEARCH_SUCCESS: 'PACKAGE_SUGGESTIONS_SEARCH_SUCCESS',
SEARCH_ERROR: 'PACKAGE_SUGGESTIONS_SEARCH_ERROR'
}; |
import {useState} from 'react'
export function useStorageState<T extends string>(key: string, defaultValue: T) {
const [state, setState] = useState<T>(() => (
localStorage.getItem(key) || defaultValue
) as T)
function updateState(value?: T) {
if (value === undefined) {
localStorage.removeItem(key)
... |
#!/usr/bin/env bash
# Brave: https://brave.com/linux/
sudo apt install apt-transport-https curl
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.... |
<form action="" method="post">
<div>
<label for="firstName">First Name:</label>
<input type="text" id="firstName" name="firstName">
</div>
<div>
<label for="lastName">Last Name:</label>
<input type="text" id="lastName" name="lastName">
</div>
<div>
<label for="email">Email:</label>
<... |
package com.cannolicatfish.rankine.util;
import com.cannolicatfish.rankine.init.RankineTags;
import com.cannolicatfish.rankine.init.WGConfig;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.entity.Entity;
import net.minecraft.entity.Entit... |
// Copyright (C) 2018 <NAME>. Use of this source code is governed
// by a BSD-style license posted at http://blog.jeff.over.bz/license/
package refactoring
import (
"fmt"
"strconv"
"time"
"github.com/godoctor/godoctor/analysis/names"
"github.com/godoctor/godoctor/refactoring"
"github.com/godoctor/godoctor/text... |
Down_sampling_bam_file_rev.pl 45716676 Neutrophil_ATACseq_4m_M_115_MergedLanes.rmdup.bam
Down_sampling_bam_file_rev.pl 45716676 Neutrophil_ATACseq_4m_M_114_MergedLanes.rmdup.bam
Down_sampling_bam_file_rev.pl 45716676 Neutrophil_ATACseq_4m_M_113_MergedLanes.rmdup.bam
Down_sampling_bam_file_rev.pl 45716676 Neutrophil_ATA... |
import pyproj
import xarray as xr
import numpy as np
def proj_coord(coord, proj_in, proj_out):
"""
Returns a packaged tuple (x, y) coordinate in projection proj_out
from one packaged tuple (x, y) coordinat ein projection proj_in
Inputs:
coord: tuple (x, y)
proj_in: pyproj.Proj format pr... |
(page, done) => {
var that = this;
let url = page.getURL("last");
let u = new URL(url);
let r = u.origin+"/robots.txt";
let is_done = false;
let max_wait_time = 15000;
let my_user_agent = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)';
let lable = "DOM";
let msg = "";
let typ... |
package org.cmayes.hartree.model;
import java.util.List;
/**
* Describes a normal vibrational mode.
*
* @author cmayes
*/
public interface NormalMode {
/**
* Returns the component internal motions that are a part of this mode.
*
* @return the components
*/
List<InternalMotion> getMo... |
import { CommandOptions } from '@/typings/utils/command';
import { CmdSpawnRet } from '@/typings/utils/spawn';
export interface Options {
[key: string]: string;
}
export interface OptionsCt {
options: Options;
}
export type ArrayJob = [string, OptionsCt];
export type Job = string | ArrayJob;
export type JobRet =... |
def extract_morphological_features(word, featlst):
if word.feats: # Check if morphological features exist
# Create a dictionary from the morphological features string
morph_feat_dict = dict(x.split("=") for x in word.feats.split("|"))
feat_form = ''
for feat in featlst:
... |
#!/bin/sh
# This is the command running inside the xterm of our
# debug wrapper. It needs to take care of starting
# the server command, so it can attach to the parent
# process. In addition, here we run the command inside
# of a gdb session to allow for debugging.
# On some systems, running xterm will cause LD_LIB... |
class Paddle {
// which=0: left paddle
// which=1: right paddle
constructor(which) {
this.which = which;
this.x = which === 0 ? PADDLE_MARGIN : WIDTH - PADDLE_MARGIN;
this.y = HEIGHT / 2;
this.height = PADDLE_DEFAULT_HEIGHT;
this.controlsReversed = false;
}
}
|
def factorial(n):
if n == 0 or n == 1:
return 1
else:
return n * factorial(n - 1)
result = factorial(7)
print(result) |
#!/bin/bash
# Copyright 2019 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
import React, {Component} from 'react';
import { Tabs, Tab, Grid, Cell, Card, CardTitle, CardActions, CardText, Button, CardMenu, IconButton} from 'react-mdl';
class Projects extends Component {
constructor(props) {
super(props);
this.state = { activeTab: 0 };
}
toggleCategories() {
... |
if [ $# -lt 2 ]
then
echo "Invalid arguments provided"
echo "Valid usage: "`basename "$0"`" <release-name> <namespace> <flags(optional)>"
exit 1
fi
RELEASE=$1
NAMESPACE=$2
COMPONENT="${RELEASE}-vault"
REQUIRED_KEY_COUNT=3
SECRET_NAME="$RELEASE-vault-keys"
echo "Getting unseal keys from Kubernetes secre... |
def factorial(n)
if n == 0
result = 1
else
result = n * factorial(n-1)
end
return result
end
puts "Enter a number: "
num = gets.to_i
fact = factorial(num)
puts "Factorial of #{num} is #{fact}" |
<gh_stars>1-10
#ifndef FDR_UDPSERVER_H
#define FDR_UDPSERVER_H
#include <DllHelper.h>
#include <udpsocket.h>
#include <string>
class EASYSOCKET_API UDPServer : public UDPSocket
{
public:
UDPServer();
void Bind(int port, FDR_ON_ERROR);
void Bind(std::string IPv4, std::uint16_t port, FDR_ON_ERROR);
};
#e... |
<reponame>MrHadess/controltool2<filename>controltool/src/main/java/com/mh/controltool2/exceptions/invoke/UnsupportedSerializeObjectException.java
package com.mh.controltool2.exceptions.invoke;
public class UnsupportedSerializeObjectException extends RuntimeException {
}
|
/*
* Copyright (C) 2020 The Dagger Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... |
#!/usr/bin/env bash
#
# Run a test build for all images.
set -uo pipefail
IFS=$'\n\t'
info() {
printf "%s\n" "$@"
}
fatal() {
printf "**********\n"
printf "%s\n" "$@"
printf "**********\n"
exit 1
}
cd $(cd ${0%/*} && pwd -P);
versions=( "$@" )
if [ ${#versions[@]} -eq 0 ]; then
versions=( */ )
fi
versio... |
# status
echo db-disk-space-used=$(df --output=used /kpn | tail -1)
echo db-disk-space-available=$(df --output=avail /kpn | tail -1)
echo db-mem-total=$(egrep --color=none -e MemTotal /proc/meminfo | awk '{print $2}')
echo db-mem-free=$(egrep --color=none -e MemFree /proc/meminfo | awk '{print $2}')
echo db-mem-swap-... |
<gh_stars>1-10
import * as messaging from "messaging";
import document from "document";
export function SettingsApplier() {
};
SettingsApplier.prototype.applySettings = function(settingChange) {
console.log("received settingChange:"+JSON.stringify(settingChange));
if (settingChange.key === undefined) {
... |
<filename>src/lng/TW.js
export default {
headTitle: '全新ELITE PASS',
headBigTitle: '/images/tw/head-text.png',
timeLine: '10/2',
timeLineText: '磅礡登場',
countText: `<span class="text-highlight">全球</span>Elite Pass擁有者數量`,
owners: '擁有者',
recieve: '獲得',
gold: '金幣',
voucher: '鑽石轉蛋券',
eyeBlinder: '裝兇狠眼罩',
... |
<reponame>Askinkaty/text-readability<gh_stars>0
# -*- coding: utf-8 -*-
from process_gram import process_grammar
import codecs
first_pp = ['мы', 'я', 'наш', 'мой']
second_pp = ['ты', 'вы', 'ваш', 'твой']
third_pp = ['он', 'она', 'они', 'оно', 'их', 'ee', 'его', 'ихний', 'ихним', 'ихнем']
indef_pron = ['некто', 'некого... |
import java.nio.charset.StandardCharsets;
public class EntryChunk {
public byte[] content;
public long endPointer;
// Other methods and fields are not relevant for this problem
}
public class StringEntryChunkDto {
public String content;
public long endPointer;
public boolean binary;
publ... |
<filename>dac/ui/src/pages/AdminPage/components/modals/AccelerationModal.js
/*
* Copyright (C) 2017-2019 Dremio Corporation
*
* 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... |
const StatusTracker = require('../../lib/StatusTracker');
const send = (client, config, result) => {
if (!result) {
return;
}
return client.guilds.cache
.get(config.guild)
.channels.cache
.get(config.channel)
.send(result);
};
const Handler = (client) => {
const config = client.config.cus... |
<gh_stars>0
export default {
SET_CURRENT_PATH: (state, { fullPath }) => {
state.fullPath = fullPath
},
SET_HOME_PAGE: (state, { home }) => {
state.home = home
},
SET_NONPROFIT: (state, { nonprofit }) => {
state.nonprofit = nonprofit
},
SET_CAMPAIGN: (state, { campaign }) => {
state.campaign = campaign
}... |
const addWebsiteButton = document.getElementById('add-website-button');
addWebsiteButton.addEventListener('click', onAddWebsiteClick);
function onAddWebsiteClick() {
chrome.tabs.create({
url: '/edit/index.html'
});
} |
<reponame>loggi/lap
#!/usr/bin/env python
import os
from pkg_resources import parse_version
import shutil
import subprocess
import sys
import traceback
if sys.version_info[0] < 3:
import __builtin__ as builtins
else:
import builtins
builtins.__LAP_SETUP__ = True
DISTNAME = 'lap'
DESCRIPTION = 'Linear Assignm... |
<filename>packages/build/src/compile-exec.ts<gh_stars>0
import path from 'path';
import { exec as compile } from 'pkg';
import Platform from './platform';
/**
* The executable name enum.
*/
enum ExecName {
Windows = 'mongosh.exe',
Posix = 'mongosh'
};
/**
* Target enum.
*/
enum Target {
Windows = 'win',
M... |
#!/bin/bash
#
# Copyright 2020 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... |
import re
def extract_copyright(file_path):
with open(file_path, 'r') as file:
content = file.read()
# Use regular expression to find the copyright notice within comments
pattern = r'//.*?Copyright.*?[\r\n]|/\*.*?Copyright.*?\*/'
matches = re.findall(pattern, content, re.DOTALL)
... |
/*
Package usecases_test is the test for all UI services: backup, bee, git,
blockchain, graphql, https, pdb. Testing elements start up the delopment
processes of usecase contract. The test file assures available data for the
UI. Run usecases$ go test. Ref https://www.youtube.com/watch?v=0xKGdMCYtvw
*/
package usec... |
package gv.jleon
import akka.http.scaladsl.server.directives.{ DebuggingDirectives }
import akka.http.scaladsl.server.{ Directives, Route }
import akka.http.scaladsl.{ Http ⇒ AkkaHttp }
object Http {
import Directives.{ _ }
val route: Route = DebuggingDirectives.logRequestResult("leon") {
pathPrefix("arch" /... |
call create_index('disease2gene', 'GeneID');
call create_index('disease2gene', 'Symbol');
update disease2gene set ConceptID = replace(ConceptID, 'umls:', '');
call create_index('disease2gene', 'ConceptID');
call create_index('disease2gene', 'ConceptName');
call create_index('disease2gene', 'GeneID,ConceptID');
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.