text stringlengths 1 1.05M |
|---|
import { CookieManager, FileManager } from "../models";
import { FortGlobal } from "../fort_global";
import { ControllerTestData } from "../types";
import { HttpResponseStub } from "./http_response_stub";
import { HttpRequestStub } from "./http_request_stub";
import { Controller } from "../abstracts";
export const ... |
#!/bin/bash
if [ -z "$1" ] || [ $1 = "-help" ] || [ $1 = "-?" ] || [ $1 = "-h" ]
then
printf "usage: serve-section.sh {section}\r\n"
printf "\r\n"
printf "Browserify's the main.js of the specified 'section' then starts the bamweb server serving the current app"
printf "\r\n"
printf "\r\n"
else
# b... |
package com.yoavfranco.wikigame.fragments;
import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v4.view.animation.FastOutSlowInInterpolator;
impo... |
<reponame>batizhao/paper
package io.github.batizhao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.github.batizhao.domain.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
... |
import uuid
# Generate random uuid string
random_string = str(uuid.uuid4())
# Print random string
print(random_string) |
#!/bin/bash
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# Script used to run tvOS tests.
# If not arguments are passed to the script, it will only compile
# the RNTester.
# If the scrip... |
use serde_json::{Value, from_str};
fn extract_user_info(json_str: &str) -> Option<(String, String)> {
if let Ok(parsed) = from_str::<Value>(json_str) {
if let Some(user) = parsed.get("user") {
if let (Some(id), Some(path)) = (user.get("id"), user.get("path")) {
if let (Value::St... |
import IAPIParamTranslator from "../../API/interfaces/IAPIParamTranslator";
import IAPIParamTranslatorStatic from "../../API/interfaces/IAPIParamTranslatorStatic";
import DataFilterOption from "../../DataRender/vos/DataFilterOption";
export default class AnimationReportingParamVO implements IAPIParamTranslator<Animati... |
#!/bin/bash
git submodule init
git submodule update
#git submodule foreach git pull origin master
curl -s "https://get.sdkman.io" | bash
for x in .[[:alpha:]]*
do
if [ -n $x -a "$x" != ".git" ]
then
rm -r "$HOME/$x"
ln -s "`pwd`/$x" ~/
fi
done
pushd .
cd config
mkdir -p "$HOME/.config"
for x in ... |
#!/bin/bash
for i in {1..5}; do
echo "Hello World!"
done |
<reponame>pomali/priznanie-digital
import React, { ReactNode } from 'react'
export interface WarningProps {
className?: string
children: ReactNode
}
export const Warning = ({ children, className }: WarningProps) => (
<div className={`govuk-grid-column-full govuk-warning-text ${className}`}>
<span className=... |
// TODO: use common file with BE implementation
export type ChainStoreFilterKeys = 'name' | 'website';
|
import os
relative_path = 'home/folder1/myFile.txt'
home = os.environ['HOME']
absolute_path = os.path.join(home, relative_path)
print(absolute_path) |
def checkEquality(a, b):
if a == b:
return True
else:
return False
print(checkEquality(3,4))
# Output: False |
// Method to search for a weapon by name
public string SearchWeapon(string weaponName)
{
IWeapon searchedWeapon = weapons.FirstOrDefault(w => w.Name == weaponName);
return searchedWeapon != null ? searchedWeapon.ToString() : "Weapon not found";
} |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
import Stage0Header from '../header/stage0header/stage0header.vue';
import Stage0Body from '../body/stage0body/stage0body.vue';
export default {
name : 'stage0',
components: {
Stage0Header,
Stage0Body
}
}
|
defmodule SumFirstN do
def sum(list, n) do
list
|> Enum.take(n)
|> Enum.reduce(& &1 + &2)
end
end
SumFirstN.sum([2, 5, 6, 4, 9], 3) # 13 |
package br.com.alinesolutions.anotaai.model.util;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.X... |
<filename>python/eskapade/data_quality/__init__.py
# flake8: noqa
from eskapade.data_quality.links import *
|
export * from './ThemeTest';
|
<filename>app/usecases/authUseCase.js<gh_stars>0
export default class AuthUseCase {
constructor(authService, errorService) {
this.authService = authService
this.errorService = errorService
}
async auth(username, password) {
if (await this.authService.verifyPassword(username, password)) {
retur... |
5 (the length of the largest palindromic substring: 'civic') |
#include <iostream>
// Function to display Fibonacci sequence
void fibonacci_sequence(int length)
{
int n1 = 0, n2 = 1, n3;
if (length == 1)
{
std::cout << n1 << " ";
}
else if (length == 2)
{
std::cout << n1 << " " << n2 << " ";
}
else
{
s... |
import subprocess
import requests
import json
import os
import re
import argparse
import logging
import csv
import shutil
def process_data(url):
# Read the "retracted_exps.csv" file and extract relevant information
with open('retracted_exps.csv', 'r') as file:
csv_reader = csv.reader(file)
for ... |
<reponame>pradeep-gr/mbed-os5-onsemi<gh_stars>10-100
/*
* Copyright (c) 2013-2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* 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 o... |
<reponame>juliuste/widschi-bot
import { loadJsonFile as loadJson } from 'load-json-file'
import { writeJsonFile as writeJson } from 'write-json-file'
import lodash from 'lodash'
import { people } from './settings.js'
const { shuffle, minBy, fromPairs, toPairs, max, min } = lodash
const statePath = './state.json'
cons... |
if [ $# -ne 1 ]; then
echo "$0: Takes one argument, the name of the AI to compile"
exit 1
fi
AI_Name=$1 #Get the AI name you passed as a command line parameter
AI_Name="${AI_Name%.*}" #Remove extension in case you passed "V4.cpp" instead of "V4"
clang++-9 -std=c++17 -march=native -mpopcnt -mbmi2 -mfma -mavx2 -... |
<reponame>pavel-pimenov/go-dcpp<filename>adc/client/client2hub.go
package client
import (
"context"
"errors"
"fmt"
"log"
"math/rand"
"strconv"
"sync"
"time"
"github.com/direct-connect/go-dcpp/adc"
"github.com/direct-connect/go-dcpp/version"
)
// DialHub connects to a hub and runs a handshake.
func DialHub(... |
brew install libdvdcss handbrake |
#!/bin/bash
# Example of how to use the command line tool to build your php-commonjs scripts into a single file.
#
# switch to php-commonjs root
#
cd `dirname $0`/..
# you may want to specify a location for php.ini so you don't run into open_basedir restrictions
#
PHP="/usr/bin/php -c /etc"
# pipe compiler outpu... |
<reponame>dbatten5/dagster
import pytest
from click.testing import CliRunner
from dagster import AssetKey, AssetMaterialization, Output, execute_pipeline, pipeline, solid
from dagster.cli.asset import asset_wipe_command
from dagster.core.instance import DagsterInstance
from dagster.seven import json
@pytest.fixture(n... |
#!/usr/bin/env bash
set -e
set -x
# Path to thhe nix file containing the derivation we want to package
NIXFILE=$(dirname $0)/bindist.nix
# "drv" will be set to the path inside /nix/store which contains the resulting
# the derivation
drv=$(nix-build $NIXFILE)
# output filename
tarball=$(pwd)/clash-snap-bindist.tar.x... |
#!/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 ... |
<filename>cses/1732.cc
// https://cses.fi/problemset/task/1732/
#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
int main() {
int x = 0, y = 0, n;
string s;
cin >> s;
n = s.size();
vi a(n), r;
for (int i=1; i<n; i++) {
a[i] = max(0, min(a[i-x], y-i));
while (a[i]+i < n && s[a[... |
def convert_coordinates(lat1, lon1, in_cs, out_cs):
in_cs_proj = Proj(in_cs)
out_cs_proj = Proj(out_cs)
return transform(in_cs_proj, out_cs_proj, lat1, lon1)
in_coordinates = 'epsg:4326'
out_coordinates = 'epsg:32636'
convert_coordinates(-13.28629, 119.87576, in_coordinates, out_coordinates) |
#!/usr/bin/env bash
ray_version=""
commit=""
ray_branch=""
workload=""
for i in "$@"
do
echo "$i"
case "$i" in
--ray-version=*)
ray_version="${i#*=}"
;;
--commit=*)
commit="${i#*=}"
;;
--ray-branch=*)
ray_branch="${i#*=}"
;;
--workload=*)
workload="${i#*=}"
;;
--h... |
<reponame>lixin9311/bitshares-go
package history
import (
"github.com/scorum/bitshares-go/caller"
"github.com/scorum/bitshares-go/types"
)
type API struct {
caller caller.Caller
id caller.APIID
}
func NewAPI(id caller.APIID, caller caller.Caller) *API {
return &API{id: id, caller: caller}
}
func (api *API)... |
//策略接口,计算购车总金额
export interface Strategy {
calPrice(price:number, num:number):number;
}
//购买5辆及以下不打折
export class Nodiscount implements Strategy {
public calPrice(price:number, num:number):number {
return price * num;
}
}
//购买5辆以上打9折
export class Disount implements Strategy {
public calPrice(pri... |
"""
Based on Premailer.
This is a hack of Premailer that uses BeautifulSoup and SoupSelect instead of lxml.
"""
# http://www.peterbe.com/plog/premailer.py
import re, os
import codecs
import urlparse, urllib
from BeautifulSoup import BeautifulSoup, Comment
import soupselect; soupselect.monkeypatch()
__version__ = '1.... |
// Copyright 2016 PLUMgrid
//
// 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 to in writing... |
export { I18nextCLILanguageDetector as default } from './i18next-cli-language-detector';
|
#!/bin/bash
set -e
set -x
TAG=$1
LABEL=$2
if [[ $PUBLISH_DOCKERHUB == 'true' ]]
then
echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker tag ${LABEL} ${LABEL}-builder:${TAG}
docker push ${LABEL}-builder:${TAG}
fi
|
<reponame>voidberg/imagecache<gh_stars>1-10
module.exports = {
attach: function attach() {
this.desaturate = function desaturate(image, config, callback) {
image.greyscale();
return callback();
};
},
};
|
<filename>tests/unit/bud-server/service.test.ts<gh_stars>0
import {Bud, factory} from '@repo/test-kit/bud'
describe('@roots/bud-server', function () {
let bud: Bud
beforeAll(async () => {
bud = await factory({mode: 'development'})
})
it('has expected defaults', () => {
expect(bud.store.get('server'))... |
import React from 'react';
import SVGComp from '../../Components/VectorComp';
import { Icon } from '../../Helper';
import './Styles.scss';
const SingleMember = ({ name, role, image, description, setPreview }) => {
return (
<div id="team-member-full-details-container">
<div id="member-details-image-containe... |
total_read = 0 # Initialize the total amount read
while True:
read = int(input("Enter the input value: ")) # Read the input value
if read < 0: # Check if the specific condition is met (e.g., negative input)
break # Exit the loop if the condition is met
total_read += read # Accumulate the total ... |
// Taussig
//
// Written in 2013 by <NAME> <<EMAIL>>
//
// To the extent possible under law, the author(s) have dedicated all copyright and related
// and neighboring rights to this software to the public domain worldwide. This software is
// distributed without any warranty.
//
// You should have received a copy of th... |
angular.module('app', []).controller('GameCtrl', ['$scope', '$timeout', function($scope, $timeout){
$scope.variables = {};
$scope.correct = 0;
$scope.wrong = 0;
$scope.timer = 0;
_start = false;
_end = false;
var _answer = null;
var _answerCorrect = null;
var _sym = ['-','+','÷','x'];
function _initialize()... |
#!/usr/bin/env bash
echo "Configuring nomad ..."
mkdir -p /etc/nomad.d
chmod 700 /etc/nomad.d
touch /etc/nomad.d/nomad.hcl
# Enable Nomad's CLI command autocomplete support. Skip if installed
grep "complete -C /usr/bin/nomad nomad" ~/.bashrc &>/dev/null || nomad -autocomplete-install
cat <<EOF > /etc/nomad.d/nomad.... |
mkdir exported-models
mkdir jobs
mkdir results
mkdir tmp
mkdir weights
|
#!/bin/bash
#/**
# * php-xdebug
# * php debug module
# *
# * @category dev
# */
BASEDIR=$(dirname "${0}")
. ${BASEDIR}/../tools/colors.sh
VERSION='7.3'
OPTIND=0
while getopts :v:h OPTION; do
case "${OPTION}" in
v) VERSION="${OPTARG}";;
h) echo_label 'description'; echo_primary 'Config php-module... |
#!/usr/bin/env bash
declare -A a=()
declare -r fg=1 # foreground character
declare -r bg=_ # background character
draw() {
local -i x=$1 # most recently drawn-to column number, rightward from 0
local -i y=$2 # most recently drawn-to row number, upward from 0
local -ri d=$3 # vertical displacement of ... |
function genemyinitMap() {
var latitude = jQuery('#gmap').data( 'latitude' );
var longitude = jQuery('#gmap').data( 'longitude' );
var title = jQuery('#gmap').data( 'title' );
var image = jQuery('#gmap').data( 'marker' );
var zoom = jQuery('#gmap').data( 'zoom' );
var myLatLng = {lat: latitude, lng: longitude};... |
/**
* @author ooooo
* @date 2021/2/27 11:48
*/
#ifndef CPP_0395__SOLUTION2_H_
#define CPP_0395__SOLUTION2_H_
#include <vector>
#include <iostream>
#include <unordered_map>
using namespace std;
// 分治法
class Solution {
public:
int dfs(string &s, int l, int r, int k) {
if (l > r) return 0;
int n = r + 1;
... |
#!/usr/bin/env bash
#
# Copyright (c) 2017-2020 The Zenacoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Check for new lines in diff that introduce trailing whitespace.
# We can't run this check unless we k... |
<reponame>pradeep-gr/mbed-os5-onsemi
/**********************************************************************
* $Id$ lpc_phy.h 2011-11-20
*//**
* @file lpc_phy.h
* @brief Common PHY definitions used with all PHYs
* @version 1.0
* @date 20 Nov. 2011
* @author NXP MCU SW Application Team
*
* Copyright(C) 2011, NXP S... |
// 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 the rights to use,... |
#!/bin/bash
set -e
set -x
until [ -f /var/lib/docker/certs/client/ca.pem ]
do
echo "Waiting for /var/lib/docker/certs/client/ca.pem to be available from dind volume"
sleep 1
done
START_TIME=`date +"%d-%m-%yT%H-%M-%S"`
mkdir -pv ~/.docker
cp -v /var/lib/docker/certs/client/* ~/.docker
touch ./builder-started.txt
ba... |
#!/usr/bin/env bash
#
# Copyright 2019-2020 DJANTA, LLC (https://www.djanta.io)
#
# 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 re... |
package com.company;
import java.util.Scanner;
public class Exercise_4_19 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter the first 9 digits of an ISBN as integer: ");
String s = input.nextLine();
int sum = 0, digit;... |
<filename>fluentlenium-core/src/test/java/org/fluentlenium/integration/EventsTest.java<gh_stars>0
package org.fluentlenium.integration;
import org.fluentlenium.core.domain.FluentWebElement;
import org.fluentlenium.core.events.ElementListener;
import org.fluentlenium.core.events.FindByListener;
import org.fluentlenium.... |
/*
* Copyright 2017-2022 original 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... |
json_string = json.dumps({"name":"John", "age":25, "location":"US"}) |
from flask import Flask, jsonify
from .base import BaseController
from flaskr.models import Event
class EventController(BaseController):
def __init__(self, app: Flask):
super().__init__()
self.app = app
def get(self):
events = map(lambda ev: ev.as_dict(), Event().get_all())
r... |
<reponame>YMxiaobei/iconv-lite-ts2
"use strict";
// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script.
export let _exports = {
"437": "cp437",
"737": "cp737",
"775": "cp775",
"850": "cp850",
"852": "cp852",
"855": "cp855",
"856": "cp856",
"857": "cp857",... |
<gh_stars>1-10
import React from 'react';
import { connect } from 'react-redux';
import { setLibraryFilter, setFloorFilter, setTextFilter } from '../actions/filters'
import floors from '../locations/floors';
import FA from 'react-fontawesome';
const Filters = (props) => (
<div className="browse-filters">
<... |
<filename>client/db/Database.js
const {
createRxDatabase,
addRxPlugin
} = require('rxdb');
const RxDBLeaderElectionPlugin = require('rxdb/plugins/leader-election');
const { RxDBReplicationPlugin } = require('rxdb/plugins/replication');
const { RxDBNoValidatePlugin } = require('rxdb/plugins/no-validate');
add... |
<gh_stars>0
//
// Created by valkee on 4/26/2020.
//
#define WITHOUT_NUMPY
#include "matplotlibcpp.h"
#include "leaderboard.h"
#include <cmath>
namespace plt = matplotlibcpp;
void SaveGraph(timer::LeaderBoard leaderboard) {
// Retrieve list of players
std::vector<timer::Player> player_list = leaderboard.Retrieve... |
const { execSync } = require('child_process');
const builder = require('electron-builder');
const rm = require('del');
const fs = require('fs');
const path = require('path');
const package = require('./package.json');
const { BuildPublic } = require('./buildpublic');
const outDir = path.resolve(__dirname, "electron-b... |
<reponame>killua4564/hashclash
/**************************************************************************\
|
| Copyright (C) 2009 <NAME>
|
| This program is free software: you can redistribute it and/or modify
| it under the terms of the GNU General Public License as published by
| the Free Software Founda... |
#!/bin/bash
# this is a legacy version (will be removed in the future). please use test.py.
set -v
set -e
rm -rf original union working-copy
mkdir original union working-copy original/play-dir original/del-dir
echo v1 > original/file
echo v1 > original/play-with-me
echo v1 > original/delete-me
cleanup() {
if [ -... |
<reponame>naq219/Telpoo-framework
package com.telpoo.example.utils;
import android.content.Context;
import android.widget.Toast;
/**
* @author NAQ219
*
*/
public class Utils1 {
public static void showBolean(boolean re,Context context){
if (re)
Toast.makeText(context, "success ", 1).show();
else
Toast.... |
import * as fs from 'fs';
import * as rd from 'readline'
import * as path from 'path'
var filenPath = path.join(__dirname, '..', 'text-assets', '2.1.mine.txt');
console.log(`filenPath: ${filenPath}`);
var reader = rd.createInterface(fs.createReadStream(filenPath))
var data: Array<{direction: string, value: number}> =... |
create table stud(
sroll number(3) primary key,
sname varchar(30),
hostel number check(hostel<10),
parent_inc number(6)
);
|
<gh_stars>0
class CommentsController < ApplicationController
before_filter :require_login
def create
@event = Event.find_by(id: params[:event_id])
if @event.deleted
redirect_to event_path(@event)
elsif @event.attending_event?(current_user) || @event.user == current_user
@comment = Comment.new(comment_pa... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: ... |
<filename>fetcher.py
import requests, re, json
import lxml.etree
import lxml.html.soupparser
user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14 (KHTML, like Gecko) Version/6.0.1 Safari/536.26.14'
json_getter = re.compile(r'trulia\.propertyData\.set\((.*?)\);')
def get(url):
return... |
using System;
public class PermissionChecker
{
public bool CheckPermission(string userAccount, string requestedOperation)
{
// Perform permission check logic here
bool hasPermission = PerformPermissionCheck(userAccount, requestedOperation);
if (hasPermission)
{
retu... |
<filename>qht-modules/qht-interface/src/main/java/com/qht/PageDto.java
package com.qht;
import java.util.Arrays;
import java.util.List;
/**
* 分页添加查询
* @author 草原狼
* @date Jul 11, 2018 5:35:00 PM
*/
public class PageDto<T> {
public static final int DEFAULT_PAGE = 1;
public static final int DEFAULT... |
def multi_bracket_validation(input_string):
stack = []
opening_brackets = "({["
closing_brackets = ")}]"
bracket_pairs = {')': '(', '}': '{', ']': '['}
for char in input_string:
if char in opening_brackets:
stack.append(char)
elif char in closing_brackets:
if... |
<reponame>mauri-medina/peoplemanagement
package com.swnat.service;
import com.swnat.dto.PaginationResponse;
import com.swnat.model.Candidate;
import org.springframework.web.multipart.MultipartFile;
public interface CandidateService extends IGenericService<Candidate, Long> {
/**
* Get all by filter
* ... |
// ┌──────────────────────────────────────────────────────────────────────────────────────────────┐
// │ Copyright (c) 2021 by the author of the React-weather project. All rights reserved. │
// │ This owner-supplied source code has no limitations on the condition imposed on the │
// │ maintenance of ... |
#!/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... |
#include <cstddef>
template <typename T>
class custom_linked_list {
private:
struct Node {
T data;
Node* next;
Node(const T& value) : data(value), next(nullptr) {}
};
Node _first;
Node _last;
size_t _length;
public:
custom_linked_list() : _length(0) {
this->_la... |
<filename>src/assertions.ts
import { objectToString, objectType } from './common';
import { AssertionError } from './errors';
import * as checks from './checks';
export const INVERT = true;
export function Assert(condition: boolean, invert: boolean, value: any, assertion: string,
details: stri... |
/*
* Copyright (c) 2007-2013 Concurrent, Inc. All Rights Reserved.
*
* Project and contact information: http://www.cascading.org/
*
* This file is part of the Cascading project.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.... |
<reponame>harry-xiaomi/SREWorks
package com.alibaba.sreworks.health.domain.req.incident;
import com.alibaba.sreworks.health.common.constant.Constant;
import com.google.common.base.Preconditions;
import io.swagger.annotations.ApiModel;
import org.apache.commons.lang3.StringUtils;
/**
* 新增异常类型请求
*
* @author: <EMAIL>... |
<filename>src/main/java/org/spongepowered/spunbric/mod/mixin/api/data/DataHolderMixin_API.java
package org.spongepowered.spunbric.mod.mixin.api.data;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import org.spongepowered.api.data.DataHolder;
imp... |
set -u
set -e
debootstrap --components=main,universe,multiverse --include=vim,build-essential,git,redis-server,lua5.1,postgresql,libpq-dev,python-dev,python3-dev,memcached,mongodb,libperl-dev,ruby,ruby-dev,wget,language-pack-en,libcurl4-openssl-dev,mysql-server,libyajl-dev,beanstalkd,ssh,rsync,libluajit-5.1-dev,curl,ip... |
echo "Homeserver: (https://matrix.org)"
read HOMESERVER
echo "User ID: (@user:matrix.org)"
read USER_ID
echo "Room: (!abc:matrix.org)"
read ROOM
echo "Password"
read PASSWORD
echo "{\"homeserver\": \"$HOMESERVER\", \"user_id\": \"$USER_ID\", \"default_room\": \"$ROOM\", \"password\": \"$PASSWORD\"}" > credentials.json... |
import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Routes } from '@angular/router';
import { UserRouteAccessService } from '../../shared';
import { JhiPaginationUtil } from 'ng-jhipster';
import { RoleComponent } from './role.component';
import { RoleDetailCompo... |
class ProxyManager:
def __init__(self, low_water_mark, proxies_list):
self.LOW_WATER_MARK = low_water_mark
self.proxies_list = proxies_list
def fetch_proxy(self):
while len(self.proxies_list) < int(self.LOW_WATER_MARK * 1):
new_proxy = self.get_new_proxy()
if new... |
import AMD from '../../amd/src/amd.e6';
import Core from '../../core/src/core.e6';
import Event from '../../event/src/event.e6';
import Detect from '../../detect/src/detect.e6';
import Module from '../../modules/src/base.es6';
import ModulesApi from '../../modules/src/api.e6';
window.Moff = new Core();
window.Moff.amd... |
<filename>2021-05-09/今日更新求职招聘类/pages/workplace/workplace.js
// pages/workplace/workplace.js
const select_city = require('../../utils/AELACTION.js');
const select = require('../../utils/util.js');
var app = getApp();
Page({
data:{
show_img:false,
has_select:[],
user_action:[],
hot_city:[],
province... |
#!/usr/bin/env bash
rm -rf train_vis checkpoints log.txt
mkdir train_vis
mkdir train_vis/train
mkdir train_vis/valid
|
<gh_stars>0
import './App.css';
import { Routes, Route } from 'react-router-dom';
import React, { useState } from 'react';
import Home from './views/Home/Home';
import UserDashboard from './views/UserDashboard/UserDashboard';
import WorkerDashboard from './views/WorkerDashboard/WorkerDashboard';
import AdminDashboard ... |
from sandman2 import get_app
from sandman2.model import activate
# Define the database connection details
DATABASE = 'sqlite:///path_to_your_database.db'
# Define the table to be exposed as a RESTful API
TABLE = 'your_table_name'
def main():
# Activate the model for the specified table
activate(all=True)
... |
<gh_stars>0
# -*- coding: utf-8 -*-
import datetime
import logging
import json
import os
import pymysql
import sys
import yaml
from typing import Any
from typing import Dict
from typing import Final
from typing import List
from typing import NoReturn
from typing import Union
from timo.database_manager.models import D... |
/**
* Autogenerated by Thrift Compiler (0.9.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package bisondb.generated;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import or... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.