text
stringlengths
1
1.05M
<filename>modules/fabric/chuck_module.py description = """ Adds Fabric support to your project and creates a default fabfile. Fabric is a simple, Pythonic tool for remote execution and deployment. For more information, visit: http://pypi.python.org/pypi/Fabric """
#!/bin/bash R="$(printf '\033[1;31m')" G="$(printf '\033[1;32m')" Y="$(printf '\033[1;33m')" B="$(printf '\033[1;34m')" C="$(printf '\033[1;36m')" W="$(printf '\033[1;37m')" banner() { clear printf "\033[33m _ _ ___ _ _ _ _ ___ _ _ _ _ ____ ___ \033[0m\n" printf "\033[36m | | |__] | | |\...
function reverseArray(arr) { let reversed = []; for (let i = arr.length - 1; i >= 0; i--) { reversed.push(arr[i]); } return reversed; } let arr = [1, 2, 3, 4, 5]; let reversedArr = reverseArray(arr); console.log(reversedArr); // Output: [5, 4, 3, 2, 1]
#!/bin/bash cd .. ./Marathoner --script Script_Duktape --autorun-plugin Script_Duktape \ --autorun-script test/script/script.js cd test_launch
create database tmspnn; -- User create table "user" ( id serial primary key, mobile varchar(64) unique not null, password text not null, nickname varchar(256) unique not null, profile varchar(256) not null default '', -- 0: male, 1: female gender smallint not null default 0, -- 0: norma...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+512+512-N-VB-IP/7-model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+512+512-N-VB-IP/7-512+512+512-only-pad-1 --do_eval --pe...
#!/bin/sh # Copyright 2020 Coinbase, 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 agreed t...
docker run --rm -it \ --network="posta-net" \ --link orderer0.example.com:orderer0.example.com \ --link orderer1.example.com:orderer1.example.com \ --link orderer2.example.com:orderer2.example.com \ --name peer2.org1.example.com -p 11051:7051 -p 11053:7053 \ -e CORE_PEER_ADDRESSAUTODETECT=true \ -e CORE_PEER_CHA...
# #/** # * 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 # * "Licen...
def eliminate_element(arr, element): for i in range(len(arr)): if arr[i] == element: del arr[i] return arr
#!/bin/bash unset PASSPHRASE unset SIGN_PASSPHRASE unset FTP_PASSWORD unset AWS_ACCESS_KEY_ID unset AWS_SECRET_ACCESS_KEY
const YTDL = require('ytdl-core'); const Commando = require('discord.js-commando'); function JoinAndPlayMusic(message, args){ if(message.member.voiceChannel){ if(!message.guild.voiceConnection){ message.member.voiceChannel.join().then(connection => { if(args == ""){ //PlayMus...
from django.db import models class Download(models.Model): query = models.TextField() finished = models.BooleanField(default=False) url = models.TextField()
<gh_stars>1-10 # -*- coding: utf-8 -*- """Tests for parsing ISA assay files""" import io import os import pytest from altamisa.constants import table_headers from altamisa.exceptions import IsaWarning from altamisa.isatab import models from altamisa.isatab import ( InvestigationReader, InvestigationValidator...
#!/bin/bash # Pull DOCKER_OPTS from config file if [ -z "$DOCKER_OPTS" ];then source /etc/default/docker fi # Allow user to specify image to build images=$* if [ -z "$images" ];then for i in */; do images+="$i "; done fi for i in $images; do img=${i%/} echo Building image local/$img docker ${DOCKER_OPTS} bu...
#!/bin/bash GO_CLOUDLOG_COVERAGE_TMP=$(mktemp -d) go test -v -coverprofile=${GO_CLOUDLOG_COVERAGE_TMP}/go_cloudlog.coverage ./ echo "mode: set" > ${GO_CLOUDLOG_COVERAGE_TMP}/combined.coverage egrep -v '^mode:' ${GO_CLOUDLOG_COVERAGE_TMP}/go_cloudlog.coverage >> ${GO_CLOUDLOG_COVERAGE_TMP}/combined.coverage go tool cov...
package appcenter import ( "context" "github.com/elko-dev/spawn/appcenter/accounts" "github.com/elko-dev/spawn/appcenter/apps" "github.com/elko-dev/spawn/appcenter/builds" "github.com/elko-dev/spawn/appcenter/organization" "github.com/elko-dev/spawn/constants" log "github.com/sirupsen/logrus" ) const ( andr...
<reponame>raoulmillais/js-ipfs<filename>src/core/ipns/routing/utils.js 'use strict' const multibase = require('multibase') module.exports.encodeBase32 = (buf) => { return multibase.encode('base32', buf).slice(1) // slice off multibase codec }
#ifndef UTIL_H #define UTIL_H #define UTIL_STR_MAX_LEN 65536 /* Utility Functions */ int* util_int_to_heap(int); float* util_float_to_heap(float); double* util_double_to_heap(double); unsigned* util_unsigned_to_heap(unsigned); long* util_long_to_heap(long); char* util_char_to_heap(char); char* util_str_to_heap(char*)...
const gallery = { photo1: { title: 'My first photo', location: 'Tibet', img: 'images/photo1.jpg' }, photo2: { title: 'My second photo', location: 'Nepal', img: 'images/photo2.jpg' }, photo3: { title: 'My third photo', location: 'Thailand', img: 'images/photo3.jpg' }, ph...
/** * * TableRowEmpty * */ import styled from 'styled-components'; import colors from '../../assets/styles/colors'; import sizes from '../../assets/styles/sizes'; const TableRowEmpty = styled.tr` width: 100%; height: 108px; background: #ffffff; td { height: 106px; line-height: 106px; font-size...
def classify_boolean(x, conditions): output = [] for condition in conditions: if eval(condition): output.append(True) else: output.append(False) return output # Output: [False, True, True]
<gh_stars>1-10 import { Component } from '@angular/core'; import { ProductService} from './product.service'; import { Product} from './product.model'; import { Router, ActivatedRoute } from '@angular/router'; import { LoginService } from '../auth/login.service'; import { OrderService } from '../order/order.service'; im...
define([ ], function () { function AllowClear () { } AllowClear.prototype.bind = function (decorated, container, $container) { var self = this; decorated.call(this, container, $container); this.$selection.on('mousedown', '.select2-selection__clear', function (evt) { // Ignore the event...
#! /bin/bash ps -ef | grep agent | grep -v grep | awk '{print $2}' | xargs kill
<filename>Problem Solving/Data Structures/Stacks/Equal Stacks/full-solution.java import java.io.*; import java.math.*; import java.security.*; import java.text.*; import java.util.*; import java.util.concurrent.*; import java.util.function.*; import java.util.regex.*; import java.util.stream.*; import static java.util....
<filename>src/classes/server.js const exec = require("../utils/exec") const fs = require("fs") const EventEmitter = require('events'); const { stderr, exit } = require("process"); const doneRegex = /Done \([0-9]+.[0-9]+s\)! For help, type "help"/ const listRegex = /There are ([0-9]+) of a max of ([0-9]+) players onlin...
package function import ( "fmt" "math/rand" "time" ) func RangeInt(min int, max int) int { if min > max { panic(fmt.Errorf("rangeFloat: the min `%d` is larger then max `%d`", min, max)) } r := rand.New(rand.NewSource(time.Now().UnixNano())) n := r.Intn(max) if n < min { n += min } return n }
<reponame>Adeon18/Solver_Algorithms<gh_stars>1-10 import pygame class Sudoku: def __init__(self, path, vizual=None): self.grid = self.read_grid(path) if vizual: self.vizual = vizual def read_grid(self, path): """ takes the path to conditions and convert the...
#!/usr/bin/env bash set -e OPA_DIR=/go/src/github.com/meta-quick/opa usage() { echo "gen-dev-patch.sh --source-url=<git-url>" echo " --version=<mj.mn.pt>" } for i in "$@"; do case $i in --source-url=*) SOURCE_URL="${i#*=}" shift ;; --version=*) VER...
#!/bin/bash ### # call with `update_default_python.sh <PYTHON_VERSION>` ### NEW=$1 echo "Changing to python ${NEW}..." # for fname in $(find $(dirname $0) -name testbuild.sh); do for fname in $(find $(dirname $0)/.. -name build.sh); do echo "Updating ${fname}" sed -i.bak "s|PYTHON_VERSION=\${PYTHON_VERSION:-.*$|P...
import logging from alpyne.client import alpyne_client from alpyne.client.alpyne_client import AlpyneClient from alpyne.data.spaces import Action if __name__ == "__main__": alpyne_client.LOG_LEVEL = logging.DEBUG client = AlpyneClient(r"Exported\Traffic Light RL\model.jar", blocking=True, verbose=True) p...
from typing import Dict, List def filter_shapes_by_parts(nparts_dict: Dict[str, int], min_n_parts: int, max_n_parts: int) -> List[str]: filtered_shape_names = [] for name in nparts_dict: if min_n_parts <= nparts_dict[name] <= max_n_parts: filtered_shape_names.append(name) return filtere...
if [ ! -f $1 ] then echo "File $1 not found" exit 0 fi $1 ./Test_Diffusion.xml python3 ./verify.py rm -f *.log rm -f *.vtk ls *.dat | grep -v '_ref.dat' | xargs rm -r if [ $? -eq 0 ] then exit 0 else exit 1 fi
<reponame>BZahorodnii/mail-builder import * as React from 'react'; import menuContentComponents from '../../collections/menuContentComponents'; import { ControlPanelContentWrapper, ControlPanelContentItem } from '../../styles'; const ContentItems: React.FC = () => { return ( <ControlPanelContentWrapper> ...
<reponame>Lostr9/webservice<gh_stars>0 package com.webservice.dao; import com.webservice.domain.Contact; import org.hibernate.SessionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import java.util.List; @Repository public class ...
#include <iostream> #include <unordered_map> // Simulated input class for testing class Input { public: bool wasKeyPressed(char key) { // Simulate key press based on user input // For testing purposes, return true for 'P' key press return (key == 'P'); } }; // Game state manager class ...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/1024+0+512-shuffled-N-VB/model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/1024+0+512-shuffled-N-VB/512+512+512-N-IP-first-256 --do...
<gh_stars>1-10 frappe.ready(function (){ $('.download-invoice').on(click, (e) => { frappe.call({ method: '/api/method/frappe.utils.' }) }) })
<gh_stars>0 package dev.patika.quixotic95.model; import javax.persistence.*; import java.util.ArrayList; import java.util.List; import java.util.Objects; @Entity public class Course { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int id; private String courseName; private Strin...
/** * OLAT - Online Learning and Training<br> * http://www.olat.org * <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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unl...
#!/bin/bash # Copyright 2018 WSO2 Inc. (http://wso2.org) # # 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 l...
import axios, { AxiosRequestConfig } from 'axios'; const axiosConfig: AxiosRequestConfig = { baseURL: process.env.REACT_APP_API_URL, headers: { 'Content-Type': 'application/json', }, }; const api = axios.create(axiosConfig); export default api;
#include <iostream> #include <string> #include <unordered_map> #include <json/json.h> // Assuming the use of a JSON library class SystemStatus { private: bool m_setupFailed; int m_shuttingDown; bool m_startFailed; bool m_setupFailedHasBeenSet; bool m_shuttingDownHasBeenSet; bool m_startFailedHa...
/* * MIT License * * Copyright (c) 2021 <NAME> * * 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, mod...
#include "Config.h" #include "OldAccountChange.h" #include "cache/UserCache.h" #include "crypto/BSHA1Hash.h" #include "packets/bnet/BNetOldAccountChange.h" #include "utils/DataConv.h" namespace Plugins { namespace BNet { bool OldAccountChange::Process( Network::TcpClient& cl, Utils::Stream& in ) { byte token[...
// shuffle array function shuffle(arr) { let currIndex = arr.length; while (currIndex > 0) { const randomIndex = Math.floor(Math.random() * currIndex); currIndex--; // swap elements const temp = arr[currIndex]; arr[currIndex] = arr[randomIndex]; arr[randomIndex] ...
<reponame>Infinite-graph/vulcan-next import { parseEnvVariableArray } from "~/lib/utils"; import debug from "debug"; const debugCors = debug("vns:cors"); const corsWhitelist = parseEnvVariableArray( process.env.APOLLO_SERVER_CORS_WHITELIST ); /** * Accept same origin queries, and */ const corsOptions = { origin...
<filename>polymer-globe/polymer/polymer-all/more-elements/js-beautify/js-beautify/beautify-html.js<gh_stars>1000+ /*jshint curly:true, eqeqeq:true, laxbreak:true, noempty:false */ /* The MIT License (MIT) Copyright (c) 2007-2013 <NAME> and contributors. Permission is hereby granted, free of charge, to any pers...
#!/usr/bin/env bash set -e # usage: set_env VAR [DEFAULT] # ie: set_env 'XYZ_DB_PASSWORD' 'example' set_env() { local var="$1" local def="${2:-}" local val="$def" if [ "${!var:-}" ]; then val="${!var}" fi export "$var"="$val" } # Loads various settings that are used elsewhere in the script # This should b...
import Recipient from '../models/Recipient'; class RecipientController { async index(request, response) { const recipients = await Recipient.findAll(); return response.json(recipients); } async show(request, response) { const recipient = await Recipient.findByPk(request.params.id); if (recipie...
<filename>jframe-demos/actuator/src/main/java/com/jf/health/MyHealthIndicator.java package com.jf.health; import com.jf.util.ProcessUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.actuate.health.Health; import org.springframework.boot.actuate.health.HealthIndicator; impor...
<gh_stars>0 package main import ( "io" "os" "path/filepath" "strings" "testing" "github.com/google/go-cmp/cmp" "github.com/sebdah/goldie/v2" ) type testCommand struct { args []string wantExitCode int } func copyFile(src, dst string) error { s, err := os.Open(src) if err != nil { return err } ...
from functools import partial import jax.nn.initializers as init import jax.numpy as jnp from einops import rearrange, repeat from flax import linen as nn def default(val, d): return val if val is not None else d def fourier_encode(x: jnp.ndarray, num_encodings=4): x = jnp.expand_dims(x, -1) orig_x = x ...
#!/bin/bash -xue which opam > /dev/null || { echo 'opam not found!'; exit 1; } { opam remote list | grep Incubaid/opam-repository-devel > /dev/null; } || { opam remote add incubaid-devel -k git git://github.com/Incubaid/opam-repository-devel.git; } opam update -y opam switch 4.02.1 eval `opam config env` opam instal...
import React from 'react'; type SocialLoginProvider = 'google' | 'facebook' | 'twitter'; // Add more providers as needed const useSocialLoginLoading = () => { const [loadingState, setLoadingState] = React.useState<Record<SocialLoginProvider, boolean>>({ google: false, facebook: false, twitter: false, //...
# Import the necessary libraries from sklearn.linear_model import LinearRegression from sklearn.metrics import mean_squared_error # Load the data data = pd.read_csv('stock_price_data.csv') X = data.iloc[:,:1] y = data.iloc[:,1] # Split the dataset into training and testing X_train, X_test, y_train, y_test = train_tes...
<filename>datasetutils/pasting.py from PIL.Image import Image from abc import ABC, abstractclassmethod from typing import Tuple, Optional from random import randint class PastingRule(ABC): @abstractclassmethod def rule(self) -> Tuple[int, int]: pass class DefaultPastingRule(PastingRule): def rul...
def median_finder(nums): nums.sort() n = len(nums) if n % 2 == 0: med = (nums[n // 2 - 1] + nums[n // 2]) / 2 else: med = nums[n // 2] return med
<gh_stars>1-10 # -*- coding: utf-8 -*- from pygments.style import Style from pygments.token import Token from pygments.styles.default import DefaultStyle class DocumentStyle(Style): styles = { Token.Menu.Completions.Completion.Current: 'bg:#00aaaa #000000', Token.Menu.Completions.Completion: 'bg:...
<reponame>mission-apprentissage/prise-de-rdv import * as Yup from "yup"; import { Formik, Field, Form } from "formik"; import { useHistory } from "react-router-dom"; import { Box, Container, Input, Button, Link, Text, Flex } from "@chakra-ui/react"; import useAuth from "../common/hooks/useAuth"; import { _post } from "...
/* * This file is generated by jOOQ. */ package io.cattle.platform.core.model.tables.records; import io.cattle.platform.core.model.Setting; import io.cattle.platform.core.model.tables.SettingTable; import io.cattle.platform.db.jooq.utils.TableRecordJaxb; import javax.annotation.Generated; import javax.persistence.C...
organization in Global := "io.getnelson.nelson" scalaVersion in Global := "2.11.11" PB.targets in Compile := Seq( scalapb.gen() -> (sourceManaged in Compile).value ) libraryDependencies += "com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion % "protobuf"
#!/bin/bash ## # @file contrib/build_sdk.sh # @brief Builds MEGA SDK static library and static examples # # (c) 2013-2014 by Mega Limited, Auckland, New Zealand # # This file is part of the MEGA SDK - Client Access Engine. # # Applications using the MEGA API must present a valid application key # and comply w...
<reponame>code-check/github-api package codecheck.github.operations import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global import org.json4s.JArray import codecheck.github.api.GitHubAPI import codecheck.github.exceptions.NotFoundException import codecheck.github.models.Webhook import...
<filename>app/src/main/java/com/qweex/openbooklikes/NavDrawerAdapter.java package com.qweex.openbooklikes; import android.content.Context; import android.content.res.Resources; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.view.LayoutInflater; import android.view.Menu; ...
def towers_of_hanoi(n, from_rod, aux_rod, to_rod): if n == 1: print("Move disk 1 from rod",from_rod,"to rod",to_rod) return towers_of_hanoi(n-1, from_rod, to_rod, aux_rod) print("Move disk",n,"from rod",from_rod,"to rod",to_rod) towers_of_hanoi(n-1, aux_rod, from_rod, to_rod) ...
#!/usr/bin/env bash JAVA_OPTS="-DONS_AI_LIBRARY_PATH=../../../../parsers/src/main/resources" sbt "project address-index-server" "runProd 9000"
// Package socket enumerates HTTP headerSec-Websocket-* keys and handles // websocket communications. package socket import ( "fmt" "log" "net/http" "os" "runtime/debug" "github.com/toba/coreweb" ) type ( // Request from browser as bytes along with WebSocket client the browser // communicated through. Reque...
#!/bin/bash echo "001 $(date)" if [ "$#" -ne 2 ]; then echo "need the path of tmp folder and STORAGE_CLASS_NAME" exit 1 fi readonly TMP_FOLDER=$1 readonly STORAGE_CLASS_NAME=$2 ### pbench-register runs before the test is started if necessary echo "002 $(date)" readonly CLIENT_HOSTS_COMMA=$(oc get pod --al...
function getSVG(result, glyphs) { var xmin = 1000; var xmax = -1000; var ymin = 1000; var ymax = -1000; let ax = 0; let ay = 0; const paths = result .map(function (x) { const result = glyphs[x.g].map(function (command) { if (command.type !== 'Z') { ...
(function($) { "use strict"; // Start of use strict // Smooth scrolling using jQuery easing $('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var ta...
module.exports = { "presets": ["@babel/preset-react", "@babel/preset-typescript"], "plugins": [ ["@babel/plugin-syntax-jsx"], [ "search-and-replace", { "rules": [ { "search": /nhsuk/, "replace": "govuk" } ] } ] ], ignore...
/* Program to print Right Lower Triangle of given height n Example: * ** *** **** ***** ****** ******* ******** where height(n) of triangle is 8. */ #include <iostream> using namespace std; int main() { int i, j, n; cout << "Enter number of rows/heigh...
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.domain.GroupFundUserBill; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.fund.trans.groupfunds.userbills.query response. * * @author auto create * @since 1.0, 2021-07-14 10:09:56 ...
#!/bin/sh set -eu OPTS="-showupto 1 -rfdefault generated -progtexdefault generated -show_po false -show_po_edges false -longlegend false -show_simple_vbconds true -squished_graphs true -show_events mem -show_final_rf false -show_fr true -show_poloc false -proc_or_thread false -condensed true" MOREOPTS="-web_diagr...
<gh_stars>1-10 /** * Copyright 2017-2019 the original author or 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 req...
<reponame>evgeny-dmi3ev/js-events # -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-07-29 18:11 from __future__ import unicode_literals from django.db import migrations import sortedm2m.fields class Migration(migrations.Migration): dependencies = [ ('js_locations', '0007_auto_20190709_2309')...
<filename>routes/users.js<gh_stars>0 var express = require('express'), routes = express.Router(); var userController = require('../controller/user-controller'); var passport = require('passport'); routes.get('/', (req, res) => { return res.send('[]'); }); routes.post('/register', userC...
<reponame>nicholascloud/vette 'use strict'; var isNumber = require('../is-number'); var gt = require('./gt'); module.exports = function gteq (number, message) { number = Number(number); if (!isNumber(number)) { throw new TypeError('number must be numeric'); } message = message || 'value must be greater tha...
<reponame>fedux-org-attic/vim-taskjuggler #!/usr/bin/env ruby # encoding: utf-8 require 'thor' require 'thor/group' require 'open4' require 'tmpdir' require 'fileutils' require 'find' module Vim module TaskJuggler module Cli # Runs a command def run(command, options = {}) command.gsub!(/^...
<gh_stars>1-10 import context, { CreateFunctionContext } from './context/main'; import effect from './effect/main'; import { CreateVariableContext, CreateReturnContext } from './render/main'; export default { context, effect, CreateVariableContext, CreateReturnContext, CreateFunctionContext }
#!/bin/bash -e IMAGE="xeon-centos75-dldt-ffmpeg" DIR=$(dirname $(readlink -f "$0")) . "${DIR}/../../../script/shell.sh"
#! /usr/bin/env ruby require 'gooddata' require 'json' $SCRIPT_PARAMS ||= {} puts "GoodData::VERSION = #{GoodData::VERSION}" client = GoodData.connect :sst_token => $SCRIPT_PARAMS['GDC_SST'] puts JSON.pretty_generate(client.user.json)
<filename>iot-suite-server-ability/src/main/java/com/tuya/iot/suite/ability/asset/connector/AssetConnector.java package com.tuya.iot.suite.ability.asset.connector; import com.tuya.connector.api.annotations.*; import com.tuya.connector.open.api.model.PageResult; import com.tuya.iot.suite.ability.asset.ability.AssetAbi...
<filename>nightwatch/commands/mountReactComponent.js module.exports = class Command { async command(componentName, props, cb = function() {}) { const reactEntryPoint = this.api.globals.entryPoint || '/node_modules/vite-plugin-nightwatch/src/react_index.js'; let propsFromFn = ''; if (typeof props == 'func...
#!/usr/bin/env bash ./bootstrap.sh mkdir -p /opt/libpostal_data ./configure --datadir=/opt/libpostal_data make make install ldconfig
#!/usr/bin/env bash set -e docker run --rm --name lib-build \ -v /var/run/docker.sock:/var/run/docker.sock \ -v $PWD:/repo \ -w /repo \ -e FEEDZ_LOGICALITY_API_KEY=$FEEDZ_LOGICALITY_API_KEY \ -e BUILD_NUMBER=$GITHUB_RUN_NUMBER \ --network host \ damianh/dotnet-sdks:6 \ dotnet run -p build/Build.csproj -c Rele...
<reponame>tanshuai/reference-wallet # Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 import uuid from dataclasses import dataclass from enum import Enum from typing import NewType from dataclasses_json import dataclass_json from .currency import Currency DebtId = NewType("DebtId", uu...
package main import ( "flag" "fmt" "io/ioutil" "math/rand" "net/http" "time" "github.com/prometheus/common/log" ) var randChars = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") // Generates a random string for transactions. func randSeq(n int) string { b := make([]rune, n) for i :...
import { moduleMetadata } from '@storybook/angular'; import { OcCommonLibModule } from '@openchannel/angular-common-components/src/lib/common-components'; import { OcDropboxComponent } from '@openchannel/angular-common-components'; const modules = { imports: [OcCommonLibModule], }; export default { title: 'Dr...
public List<String> substrings(String inputString) { // List to store all substrings List<String> substrings = new ArrayList<String>(); // Iterate over the length of the input string // starting from the left character for (int start = 0; start < inputString.len...
<gh_stars>0 import { urlFriendly } from "./url-friendly"; import { ProjectType, Project } from "../queries"; export const getProjectUrl = (project: Project, withSlug?: boolean): string => { if (project.type === ProjectType.Artistic) { return `/artistic-works/${urlFriendly(project.group)}` + (withSlug ? "/" + pro...
#!/bin/sh curl -k --key spec/files/cert/jrc_prime256v1.key --cert spec/files/cert/jrc_prime256v1.crt -H "Accept: */*" -H "Content-Type: application/json" --data-binary '{"admin": true}' -X PUT https://fountain-test.example.com:8443/administrators/3 curl -k --key spec/files/cert/jrc_prime256v1.key --cert spec/files/cer...
<gh_stars>0 $('#btnSave').click(function () { save_worker(getWorkersFormVal(), function (result) { if (result.id == 1) { alertSuccessMessage('Saved Successfully'); refresh(); } else { ...
function insertAtCaret(areaId, text) { var txtarea = document.getElementById(areaId); if (!txtarea) { return; } var scrollPos = txtarea.scrollTop; var strPos = 0; var br = ((txtarea.selectionStart || txtarea.selectionStart == '0') ? "ff" : (document.selection ? "ie" : false ) ); if (br ...
<filename>package.js Package.describe({ "name": "alethes:pages", "summary": "State of the art, out of the box Meteor pagination", "version": "1.8.6", "git": "https://github.com/alethes/meteor-pages" }); Package.onUse(function(api){ api.versionsFrom("METEOR@1.0.3.1") api.use([ "meteor-platform",...
#!/bin/bash eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)" pyenv activate python-3.7
<reponame>1aurabrown/ervell import gql from 'graphql-tag'; import selectableChannelFragment from 'react/components/ConnectionSelectionList/components/SelectableChannel/fragments/selectableChannel'; export default gql` query RecentChannelsQuery { me { __typename id recent_channels: recent_conne...
package com.example.demo.util; import android.app.Activity; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.util.DisplayMetrics; import android.util.Pair; import java.lang.reflect.Field; /** * Created by yummyLau on 18-7-11 * Email: <...