text stringlengths 1 1.05M |
|---|
<reponame>phedny/Mammon<gh_stars>1-10
package org.mammon.math;
/**
* This interface can be used for generic typing, to bind classes of an actual
* implementation compile-time.
*/
public interface FiniteField<F extends FiniteField<F>> {
/**
* @return the zero element of this finite field.
*/
Element<F> getZer... |
<gh_stars>0
/*
* 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
* "Lic... |
<gh_stars>10-100
import * as AssertionError from "assertion-error";
import * as ts from "ts-morph";
import { ClassDeclarations } from "./ClassDeclarations";
import { Exports } from "./Exports";
import { Imports } from "./Imports";
export class SourceFile {
constructor(private _node: ts.SourceFile) {}
/** The clas... |
def longest_word(string):
word_list = string.split()
lengths = [len(word) for word in word_list]
return max(lengths) |
<filename>src/pages/Category/Category.js
/*
* @Author: liuyr
* @Date: 2019-09-11 15:16:42
* @Last Modified by: liuyr
* @Last Modified time: 2019-09-14 11:18:01
*/
import React, { PureComponent } from 'react'
import { connect } from 'dva';
import styles from './Category.less';
import { Button, Table, Modal, messa... |
<reponame>sbcgua/abapmerge
import PackageInfo from "../package.json";
export default class AbapmergeMarker {
public render(): string {
return `
****************************************************
INTERFACE lif_abapmerge_marker.
* abapmerge ${ PackageInfo.version } - ${ new Date().toJSON() }
ENDINTERFACE.
******... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.timestamp = exports.write = exports.read = exports.parsePoData = exports.poGenerator = void 0;
var _fs = require("fs");
var _child_process = require("child_process");
function _objectSpread(target) { for (var i = 1; i < arguments... |
<reponame>automation555/rumble
/*
* 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.... |
#!/bin/bash
if [ x"$1" = x ]; then
echo "请输入分支参数"
exit 1
fi
echo "git pull origin $1"
git pull origin $1
echo "build..."
go build
export GIN_MODE=release
echo "重启服务"
pm2 restart zhuque
pm2 logs
|
#!/bin/bash
set -eo pipefail -o nounset
if [[ -z $(conda info --envs | grep "*" | grep -o "\/.*") ]]; then
export CONDA_ROOT=$(conda info --root)
env_dir=$CONDA_ROOT
export RECIPE_DIR=$CONDA_ROOT/share/ggd/Homo_sapiens/hg19/hg19-protein-coding-features-ensembl-v1/1
elif [[ $(conda info --envs | grep "*" | ... |
import * as React from 'react'
import { connect } from 'react-redux'
import {
FormGroup,
InputField,
Tooltip,
useHoverTooltip,
UseHoverTooltipTargetProps,
} from '@opentrons/components'
import { getWellsDepth } from '@opentrons/shared-data'
import {
getIsTouchTipField,
getIsDelayPositionField,
} from '../... |
#!/bin/bash
set -euo pipefail
if [[ -z ${1+x} ]];
then
echo 'version number required'
exit 1
else
VERSION=$1
fi
if [[ -z ${3+x} ]];
then
echo 'AWS Profile required'
exit 1
else
PROFILE=$3
fi
function releaseToRegion {
version=$1
region=$2
profile=$3
bucket="aws-lambda-r-runti... |
<reponame>raiden101/eda<gh_stars>0
import React, { Component, Fragment } from "react";
import "./Login.css";
import LoginForm from "./LoginForm/LoginForm";
import { Route, Switch } from "react-router-dom";
class Login extends Component {
componentDidMount() {
localStorage.setItem("auth", "");
}
render() {
retur... |
# This shell script executes Slurm jobs for running predictions
# with Justin Salamon's ICASSP 2017 convolutional neural network
# on BirdVox-70k.
# Trial ID: 3.
# Augmentation kind: all-but-noise.
sbatch 040_aug-all-but-noise_test-unit01_trial-3_predict-unit07.sbatch
sbatch 040_aug-all-but-noise_test-unit01_trial-3_p... |
package com.devaneios.turmadeelite.controllers;
import com.devaneios.turmadeelite.dto.*;
import com.devaneios.turmadeelite.entities.Teacher;
import com.devaneios.turmadeelite.security.guards.IsManager;
import com.devaneios.turmadeelite.security.guards.IsTeacher;
import com.devaneios.turmadeelite.services.Teacher... |
package Chapter1_2Low;
//Exercise 1.2.12
public class SmartDate2 {
@SuppressWarnings("unused")
private final int year;
@SuppressWarnings("unused")
private final int month;
@SuppressWarnings("unused")
private final int day;
private static final int YEARFIRSTTWO = 20;
private static fina... |
#!/bin/sh
rsync -r --checksum --exclude=.DS_Store release/* ../../docs-merge/docs/src/assets/files/device-restore
|
<gh_stars>0
/**
* Classe de gestion des pages du ContactController
*
* <pre>
* Julien 13/02/15 Création
* </pre>
* @author Julien
* @version 1.0
* @package Rubizz
*/
function Contact()
{
// ==== Constructeur ====
} // Default
Contact.prototype = {
/**
* Traitements lancés en fin de chargement de l... |
# Sets reasonable macOS defaults.
#
# Or, in other words, set shit how I like in macOS.
#
# The original idea (and a couple settings) were grabbed from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.macos
#
# Can be checked on oficial docs as well:
# https://developer.apple.com/documentation/devicemanageme... |
<reponame>251205668/Magic_Shop
import { parseSpecValue } from "../../utils/sku"
import { Cart } from "../../model/cart"
// components/car-item/index.js
const cart = new Cart()
Component({
/**
* 组件的属性列表
*/
properties: {
cartItem:Object
},
observers:{
cartItem:function(cartItem){
if(!cartItem... |
<filename>test/util/grpc_matcher.go
// Copyright 2021 The Rode 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 r... |
public void sortStudentsByGrade(List<Student> students) {
Collections.sort(students, new Comparator<Student>() {
@Override
public int compare(Student s1, Student s2) {
return s1.grade.compareTo(s2.grade);
}
});
} |
# remove old configs
rm -r bspwm rofi fish polybar dunst kitty sxhkd
# copy new configs from .config
cp -r ~/.config/bspwm .
cp -r ~/.config/cmus .
cp -r ~/.config/rofi .
cp -r ~/.config/polybar .
cp -r ~/.config/dunst .
cp -r ~/.config/kitty .
cp -r ~/.config/sxhkd .
# make an automatic commit
git add . && git commit ... |
def gcd(a, b):
if a == 0:
return b
return gcd(b % a, a)
a = 15
b = 20
print("GCD of", a, "and", b, "is", gcd(a, b)) |
<reponame>deLibertate/Insurances<gh_stars>0
package dao;
import data.Client;
public interface IClientDao<Client> {
void create(Client entity);
Client read(long id);
void update(Client entity);
void delete(long id);
void insert(Client man, int id);
}
|
<gh_stars>100-1000
/*
* Copyright © 2021 Lisk Foundation
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copied, modi... |
<gh_stars>1-10
package com.google.developers.event.http;
import com.google.api.client.auth.oauth2.AuthorizationCodeFlow;
import com.google.api.client.auth.oauth2.Credential;
import com.google.api.client.extensions.appengine.auth.oauth2.AbstractAppEngineAuthorizationCodeServlet;
import com.google.api.client.http.*;
imp... |
package com.huatuo.net.thread;
import java.util.ArrayList;
import java.util.HashMap;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.content.Context;
import android.os.Handler;
import com.huatuo.base.MyApplication;
import com.huatuo.dictionary.MsgId;
import com.h... |
const express = require('express');
const router = express.Router();
const bodyParser = require('body-parser');
const { getNetworkInfo, getChannels } = require('../lnd');
const { groupChannels, getLocalChannel } = require('../routing');
router.use(bodyParser.json());
router.get('/get_ln_info', async (req, res, next) ... |
<reponame>maohuang81/newrelic-cli
/*
* Copyright 2017-2018 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 r... |
from xbmcswift2.plugin import Plugin
class PluginManager:
def __init__(self):
self.plugins = []
def register_plugin(self, plugin):
"""
Register a plugin in the manager.
Args:
plugin: Plugin object to be registered.
"""
self.plugins.append(plugin... |
#! /bin/bash -e
#
# Xcode build script to generate the CBL-C exported symbols list.
cd "$SRCROOT/src/exports/"
TEMP_FILE="$DERIVED_FILE_DIR/exports.txt"
RESULT="$DERIVED_FILE_DIR/CBL.exp"
echo "Generating $RESULT"
cat CBL_Exports.txt Fleece_Exports.txt Dart_Exports.txt Fleece_Apple_Exports.txt >"$TEMP_FILE"
if [ "... |
require 'rails_helper'
RSpec.describe FlatReasonsForRejectionPresenter, type: :presenter do
let(:application_choice) do
create(
:application_choice,
:with_structured_rejection_reasons,
)
end
describe '.build_from_structured_rejection_reasons.new' do
it 'creates an object based on the pro... |
<filename>recipes/rabbitmq-server.rb<gh_stars>10-100
#
# Cookbook:: openstack-ops-messaging
# Recipe:: rabbitmq-server
#
# Copyright:: 2013-2021, Chef Software, Inc.
# Copyright:: 2013-2021, AT&T Services, Inc.
# Copyright:: 2013-2021, <NAME> <<EMAIL>>
#
# Licensed under the Apache License, Version 2.0 (the 'License');... |
# Schema migrator.
require 'miguel/schema'
require 'miguel/dumper'
module Miguel
# Class for generating database migration from one schema to another.
class Migrator
private
# Separate items in before and after arrays into old items, same items and new items.
def separate( before, after )
# N... |
#!/bin/bash
dieharder -d 0 -g 45 -S 2676169160
|
<filename>src/app/tabs/tabs.component.ts
import {AfterViewInit, Component, OnDestroy, OnInit} from '@angular/core';
import {DealWithTabService, Tab} from '../deal-with-tab.service';
import {Router} from '@angular/router';
@Component({
selector: 'app-tabs',
templateUrl: './tabs.component.html',
styleUrls: ['./tab... |
#!/bin/bash -eu
#
# Copyright 2015 The Bazel Authors. 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.org/licenses/LICENSE-2.0
#
# Unless required ... |
#!/bin/bash
#/*
# * This file is part of TangoMan Provisions package.
# *
# * Copyright (c) 2021 "Matthias Morin" <mat@tangoman.io>
# *
# * This source file is subject to the MIT license that is bundled
# * with this source code in the file LICENSE.
# */
#/**
# * KeePassXC
# *
# * Password manager
# *
# * @category s... |
<filename>src/main/java/com/doodl6/demo/pattern/Interpreter.java
package com.doodl6.demo.pattern;
import java.util.Arrays;
import java.util.stream.Collectors;
/**
* 解释器模式
*/
public class Interpreter {
private final NumberExpression expression = new NumberExpression();
public void plusNumber(String info) {... |
python3 ../../../main_pretrain.py \
--dataset cifar100 \
--backbone resnet18 \
--data_dir ~/workspace/trung_database/datasets/ \
--max_epochs 200 \
--gpus 0 \
--accelerator gpu \
--precision 16 \
--optimizer sgd \
--lars \
--grad_clip_lars \
--eta_lars 0.02 \
--scheduler ... |
import importlib
def main():
worker_class = "uvicorn.workers.UvicornWorker" # Configuration setting
# Split the fully qualified class name to get the module and class names
module_name, class_name = worker_class.rsplit('.', 1)
# Dynamically import the module
module = importlib.import_module(modu... |
#!/bin/bash
#
# Copyright 2017,2018 Istio Authors. 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.org/licenses/LICENSE-2.0
#
# Unless required b... |
<filename>day25-springboot/src/main/java/cn/st/Application.java
package cn.st;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @description:
* @author: st
* @create: 2021-02-24 16:54
**/
@SpringBootApplication
public class Application ... |
#!/bin/sh
koopa_print() {
# """
# Print a string.
# @note Updated 2020-07-05.
#
# printf vs. echo
# - http://www.etalabs.net/sh_tricks.html
# - https://unix.stackexchange.com/questions/65803
# - https://www.freecodecamp.org/news/
# how-print-newlines-command-line-output/
#... |
#!/bin/bash
set -e
cd public
git fetch
git pull
cd ..
# Uncomment the following line to force push
# rm -rf public/*
echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
# Build the project.
hugo -t academic # if using a theme, replace with `hugo -t <YOURTHEME>`
# Go To Public folder
cd public/
# Add changes... |
#!/bin/bash
#set -x
export JAVA_OPTS=-Xmx28G
export LD_LIBRARY_PATH=/home/ubuntu/lib/BIDMat/lib:/usr/local/lib
export PATH=$1
export ALL_LIBS=$2
scala -cp $ALL_LIBS Twitter 41652230 $3 $4 $5 $6 machines
|
import java.util.ArrayList;
class District {
private int districtNo;
private int totalPop;
private Location centerOfPop;
private ArrayList<Town> towns;
public District(int num) {
this.districtNo = num;
this.totalPop = 0;
this.centerOfPop = null;
this.towns = new Arr... |
<reponame>benoitc/pypy
# a couple of support functions which
# help with generating Python source.
# XXX This module provides a similar, but subtly different, functionality
# XXX several times over, which used to be scattered over four modules.
# XXX We should try to generalize and single out one approach to dynamic
#... |
import React, { useState } from 'react';
import { BrowserRouter, Link, Route } from 'react-router-dom';
function BooksSearchApp() {
const [search, setSearch] = useState('');
const handleChange = e => {
setSearch(e.target.value);
};
const handleSubmit = e => {
e.preventDefault();
};
return (
... |
/*
* Copyright (c) Open Source Strategies, Inc.
*
* Opentaps is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Opentap... |
public class BinarySearch {
public static int binarySearch(int[] array, int target) {
int leftIndex = 0;
int rightIndex = array.length - 1;
while (leftIndex <= rightIndex) {
int midIndex = (leftIndex + rightIndex) / 2;
if (array[midIndex] == target) {
... |
package usecase
import (
"encoding/json"
"os"
"time"
"github.com/omurilo/codebank/domain"
"github.com/omurilo/codebank/dto"
"github.com/omurilo/codebank/infrastructure/kafka"
)
type UseCaseTransaction struct {
TransactionRepository domain.TransactionRepository
KafkaProducer kafka.KafkaProducer
}
fun... |
#!/usr/bin/env bash
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PACKAGE_NAME="gqlpycgen"
with_rednose='--rednose --force-color'
with_coverage="--cover-html-dir=${BASE_DIR}/htmlcov --with-coverage --cover-html --cover-package=${PACKAGE_NAME} --cover-erase --cover-branches"
with_doctest='--with-doctest... |
<reponame>Joejhona/locojoe<filename>src/store/modules/auth.js
/* eslint-disable promise/param-names */
import { AUTH_REQUEST, AUTH_ERROR, AUTH_SUCCESS, AUTH_LOGOUT } from '../actions/auth'
import { USER_REQUEST } from '../actions/user'
import { getTokenUP } from '@/services/GraphqlService'
import { apitoken } from '@/s... |
import arbolDistanciaGenetica2 as ae
import random
import math
INCREMENTOVIDA = 0.05
class Individuo():
def __init__(self, nodo, especie, edad, sexo, cromosoma):
self.nodo = nodo
self.cinta = None
self.edad = edad
self.sexo = sexo # 1 = Es macho
self.felicidad = 0
self.especie = especie
self.energia = ... |
#!/bin/sh
echo "backup script is not running(loading data to container...)"
cd /srv
tar -xvf cloudant.tar
rm cloudant.tar
exit
|
#!/usr/bin/env bash
# vim:tw=0:ts=2:sw=2:et:norl:ft=sh
# Author: Landon Bouma (landonb @ retrosoft . com)
# Project: https://github.com/landonb/home-fries#🍟
# License: MIT
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #
function is_mount_type_crypt () {
local curious_path="$1"
loc... |
<reponame>YaasinAJDI/MaterialJournal
package com.ajdi.yassin.materialjournal.utils;
import android.content.Context;
import androidx.annotation.NonNull;
import com.ajdi.yassin.materialjournal.data.source.NotesRepository;
import com.ajdi.yassin.materialjournal.data.source.local.AppDatabase;
import com.ajdi.yassin.mater... |
package jsonresult
import (
"encoding/hex"
"github.com/incognitochain/incognito-chain/common"
"github.com/incognitochain/incognito-chain/common/base58"
)
type GetPublicKeyFromPaymentAddress struct {
PublicKeyInBase58Check string
PublicKeyInBytes []int
PublicKeyInHex string
}
func (obj *GetPublicK... |
<gh_stars>1-10
package git
import (
"github.com/lightsing/makehttps/config"
"github.com/sirupsen/logrus"
"os/exec"
)
func Update(config config.GitConfig) error {
// git pull --rebase --stat origin master
logrus.Infof("Updating %s:%s", gitNameRegex.FindString(config.Upstream), config.Branch)
args := []string{"pu... |
#!/bin/bash
set -euo pipefail
MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/r2dbc-h2-maven-repository" ./mvnw -P${PROFILE} clean dependency:list test -Dsort -B
|
<filename>src/main/java/pulse/ui/frames/dialogs/FormattedInputDialog.java
package pulse.ui.frames.dialogs;
import static java.awt.BorderLayout.SOUTH;
import static java.awt.Toolkit.getDefaultToolkit;
import static javax.swing.BorderFactory.createEmptyBorder;
import static javax.swing.JOptionPane.ERROR_MESSAGE;
import ... |
<reponame>kelvinatsplunk/splunk-operator
// Copyright (c) 2018-2020 Splunk Inc. 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.org/licenses/... |
<reponame>bernardobranco/ucl-search-engine
import time
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.db.models import Count
from engine.models import WebPage
import hashlib
class Command(BaseCommand):
def handle(self, *args, **options):
... |
##############
# Install deps
##############
apt-get update
apt-get -y install bind9
##
## Makefile for dns proxy zones
##
cat <<"__EOF__" > /etc/bind/named.conf.default-zones
// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};
// be authoritative... |
import pyquery
class State:
pass # Define the State class if not already defined
class HTMLParser:
def __init__(self, html_content):
self.html_content = html_content
self.state = State()
@property
def query(self):
if not hasattr(self.state, 'pyquery'):
self.state.... |
import UIKit
class ViewController: UIViewController {
let button = UIButton()
override func viewDidLoad() {
super.viewDidLoad()
setupViews()
}
func setupViews() {
view.backgroundColor = .white
view.addSubview(button)
button.translatesAutoresizingMaskIntoConstr... |
<filename>FreeRTOS/Demo/WIN32-MingW/code_coverage_additions.c<gh_stars>1-10
/*
* FreeRTOS Kernel V10.2.1
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentati... |
#include <stdio.h>
#include <stdlib.h>
#define max 5
int main(){
int vet[max];
int num;
int vetB[max];
FILE *fp = NULL;
for(int i = 0; i < max; i++){
printf("digite um numero: ");
scanf("%d", &vet[i]);
}
if(fp = fopen("entrada.txt", "w")){
for(int i = 0; i < max; i... |
<filename>src/main/java/tae/cosmetics/gui/util/packet/server/SPacketRecipeBookModule.java<gh_stars>10-100
package tae.cosmetics.gui.util.packet.server;
import java.awt.Color;
import net.minecraft.network.play.server.SPacketRecipeBook;
import tae.cosmetics.gui.util.packet.AbstractPacketModule;
public class SPacketRec... |
#pragma once
#include <iostream>
#include <memory>
#include "unittest.h"
class BinaryNode {
public:
typedef std::shared_ptr<BinaryNode> Ptr;
BinaryNode(int iData);
BinaryNode(int iData, BinaryNode *iLeft, BinaryNode *iRight);
int mData;
Ptr mLeft;
Ptr mRight;
};
typedef BinaryNode::Ptr B... |
<filename>omf-impl/src/main/java/org/om/core/impl/persistence/interceptor/handler/collection/wrapper/ReferenceListWrapper.java
package org.om.core.impl.persistence.interceptor.handler.collection.wrapper;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
impo... |
ovhai job run \
-v sentiment_fr:/app/data/sentiment_sentences \
-v sentiment_fr_output:/app/data/output \
-v sentiment_fr_run:/app/runs \
--image gsalouovh/sentiment:main \
-g 1
|
import os
import re
class DirectoryScanner:
def __init__(self, top_dir):
self.files = []
self.dirs = []
self.empties = []
self.ignores = []
self._scan(top_dir)
self._sort_results()
def _do_ignore(self, item):
for pattn in self.ignores:
if pa... |
# import mock
# from django import test
# from django.conf import settings
# from model_bakery import baker
#
# from devilry.devilry_examiner.views.dashboard import crinstance_dashboard
#
#
# class TestCradminInstanceDashboard(test.TestCase):
# def test_get_rolequeryset_not_matching_requestuser(self):
# req... |
<?php
class TestClass
{
private function __clone()
{
echo "Cloning is not allowed";
}
}
function testCloneMethod($object)
{
$clonedObject = clone $object;
}
// Test the behavior of the __clone method
$testObject = new TestClass();
testCloneMethod($testObject); |
#!/bin/bash
# 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.0
#
# Unless required by applicable law ... |
import keras
from keras.models import Sequential
from keras.layers import Dense
# Create model
model = Sequential()
model.add(Dense(32, input_dim=7, activation='relu'))
model.add(Dense(32, activation='relu'))
model.add(Dense(1, activation='linear'))
# Compile model
model.compile(loss='mse', optimizer='adam', metrics=... |
var Foreman = require('foreman');
var Horde = require('horde');
Foreman.tick(function gameTick (state) {
console.log('Ready to Work!');
});
|
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the... |
package com.bitsys.common.http.entity;
import java.util.Map.Entry;
import org.apache.http.client.utils.URLEncodedUtils;
import org.apache.http.protocol.HTTP;
import com.bitsys.common.http.header.ContentType;
import com.bitsys.common.http.util.ConversionUtils;
/**
* This class is an entity representing a list of UR... |
import * as React from 'react';
import { StandardProps } from '..';
import { Orientation } from './Stepper';
import { TransitionProps } from '../transitions/transition';
export interface StepContentProps
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, StepContentClasskey> {
active?: boolean;
alternat... |
#!/bin/bash
# ========== Experiment Seq. Idx. 417 / 20.5.3 / N. 4/6/3 - _S=20.5.3 D1_N=4 a=-1 b=-1 c=1 d=-1 e=-1 f=1 D3_N=6 g=1 h=1 i=-1 D4_N=3 j=3 ==========
set -u
# Prints header
echo -e '\n\n========== Experiment Seq. Idx. 417 / 20.5.3 / N. 4/6/3 - _S=20.5.3 D1_N=4 a=-1 b=-1 c=1 d=-1 e=-1 f=1 D3_N=6 g=1 h=1 i=-1 ... |
<reponame>chj0911/gx-bos<filename>gx-bos-repository/src/main/java/org/gx/bos/base/core/bean/Replaceable.java
package org.gx.bos.base.core.bean;
/**
* 可互换排序位置的实体
* */
public interface Replaceable<T> {
/**
* 必须实现替换位置的方法
* */
public void replace(T t1, T t2);
}
|
minikube start
kubectl get po -A
echo "https://minikube.sigs.k8s.io/docs/start/"
|
<gh_stars>1-10
#include "bstree.h"
static
struct bstnode *node_alloc(int key, int val){
struct bstnode *node = NULL;
node = calloc(1, sizeof(struct bstnode));
node->key = key;
node->val = val;
return node;
}
static
void tree_purge(struct bstnode* start){
if (start == NULL){
return;
... |
<filename>src/login/components/SignupInstead.tsx
import { h } from 'preact';
import { Link } from 'preact-router/match';
import routes from '@authenticator/app/routes';
const SignupInstead = (): JSX.Element => (
<div class='login-signup'>
<span>Don't have an account? </span>
<Link activeClassName='active' h... |
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
HELM=${HELM:-helm}
VVP_NAMESPACE=${VVP_NAMESPACE:-vvp}
JOBS_NAMESPACE=${JOBS_NAMESPACE:-"vvp-jobs"}
helm_uninstall() {
local release
release="$1"
if [ -z "$release" ]; then
echo >&2 "error: release is required"
return 1
fi
$HELM -... |
<reponame>DMGithinji/Scrappy-Dictionary
import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
const DEFAULT_LANG = 'swahili';
const ACTIVE_LANG_KEY = 'ng_scrappy_active_lang';
@Injectable({
providedIn: 'root',
})
export class ActiveLangService {
private _activeLang = localStorage.get... |
#!/usr/bin/env bash
MASON_NAME=glfw
MASON_VERSION=2017-04-07-f40d085
MASON_LIB_FILE=lib/libglfw3.a
MASON_PKGCONFIG_FILE=lib/pkgconfig/glfw3.pc
. ${MASON_DIR}/mason.sh
function mason_load_source {
mason_download \
https://github.com/mapbox/glfw/archive/f40d085e3ca4cd8d834f8bc47d9a729ae7d737e2.tar.gz \
... |
#!/bin/bash
set -eu
cur=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source $cur/../_utils/test_prepare
WORK_DIR=$TEST_DIR/$TEST_NAME
API_VERSION="v1alpha1"
function prepare_data() {
run_sql 'DROP DATABASE if exists http_apis;' $MYSQL_PORT1 $MYSQL_PASSWORD1
run_sql 'CREATE DATABASE http_apis;' $MYSQL_... |
#!/bin/bash
cd "$(dirname "$0")"
docker build -t zkp .
|
<reponame>snaerth/straumverk
import React, { Component } from 'react';
class Favicons extends Component {
render() {
return [
<link rel="apple-touch-icon" sizes="180x180" href="/static/favicons/apple-touch-icon.png" />,
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicons/favicon-32... |
import {Injectable} from '@angular/core';
import {ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot} from '@angular/router';
import {AuthorizationService} from '../../services/authorization.service';
@Injectable({
providedIn: 'root'
})
export class LoginGuard implements CanActivate {
constructor(
... |
#!/bin/sh
set -e
set -u
set -o pipefail
function on_error {
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
}
trap 'on_error $LINENO' ERR
if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
# If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
# resources to, so e... |
<reponame>Joys-digital/explorer<gh_stars>0
'use strict';
module.exports = class BlockDTO {
constructor() {
this.blockHash = null;
this.blockNumber = null;
this.from = null;
this.gas = null;
this.gasPrice = null;
this.hash = null;
this.input = null;
thi... |
package tae.cosmetics.gui.util.packet.server;
import java.awt.Color;
import net.minecraft.network.play.server.SPacketHeldItemChange;
import tae.cosmetics.gui.util.packet.AbstractPacketModule;
public class SPacketHeldItemChangeModule extends AbstractPacketModule {
private SPacketHeldItemChange packet;
public SPa... |
<reponame>feserm/BioDWH2
package de.unibi.agbi.biodwh2.drugbank.model;
import com.fasterxml.jackson.annotation.JsonValue;
public enum ProductSource {
FDA_NDC("FDA NDC"),
DPD("DPD"),
EMA("EMA");
private ProductSource(String value) {
this.value = value;
}
public final String value;
... |
class TreeNode:
def __init__(self, val):
self.val = val
self.left = None
self.right = None
def traverseTree(root):
res = []
helper(root, "", res)
def helper(node, path, res):
if not node:
return
path += str(node.val)
if not node.left and not node.right:
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.