text
stringlengths
1
1.05M
//+build wireinject package main import ( "github.com/google/wire" "github.com/khanakia/jgo/graph" "github.com/khanakia/jgo/pkg/app" "github.com/khanakia/jgo/pkg/auth" "github.com/khanakia/jgo/pkg/cli" "github.com/khanakia/jgo/pkg/dbc" "github.com/khanakia/jgo/pkg/gql" "github.com/khanakia/jgo/pkg/logger" "g...
#!/usr/bin/env bash if [[ $# != 1 ]]; then printf "usage: %s DIR\n" $(basename "$0") exit 1 fi DIR=$1 DB="uasrc" # Variables VARS="$DIR/variables.json" if [[ -f "$VARS" ]]; then mongoimport --jsonArray --drop --db "$DB" --collection variables "$VARS" fi # Measurements # JOBS=$(mktemp) JOBS="jobs.txt" ca...
function CurrentYear() { var d = new Date(); var n = d.getFullYear(); return n; }
export const LOGO_URL = 'https://user-images.githubusercontent.com/6964334/147834043-fc384cab-e7ca-40f8-9663-38fc25fd5f3a.png'; export const TextInputType = { GOOGLE_CLIENT_ID: 'GOOGLE_CLIENT_ID', GITHUB_CLIENT_ID: 'GITHUB_CLIENT_ID', FACEBOOK_CLIENT_ID: 'FACEBOOK_CLIENT_ID', JWT_ROLE_CLAIM: 'JWT_ROLE_CLAIM', RE...
package com.professorvennie.bronzeage.blocks; import com.professorvennie.bronzeage.lib.Reference; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockColored; import net.minecraft.block.material.Material; import net.minecraft.c...
<filename>doc/html/search/variables_e.js<gh_stars>1-10 var searchData= [ ['priority_0',['priority',['../classproxen_1_1gui_1_1_q_thread_stump.html#aa89d8169afdbac9b901a2c49459d3858',1,'proxen::gui::QThreadStump']]], ['proxy_5fobjs_1',['PROXY_OBJS',['../namespaceproxen_1_1gui.html#a647a8dc40f81a3ca5d1a5ba84b94e430',...
/** * Copyright © 2014-2021 The SiteWhere 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...
#!/bin/bash # # Test if you can reast host via ipv6 and ipv4. # Run: # ./ipv46test.sh # # Defaults to "trustroots.org" and test string "<!DOCTYPE html>" # # Or to set hostname, run: # ./ipv46test.sh example.org # # Or to set hostname and test string to find, run: # ./ipv46test.sh example.org "test string" # # Options...
import gzip import logging import json import requests class JsonFeedProcessor: def __init__(self, name): self.name = name self._log = logging.getLogger(__name__) self._log.setLevel(logging.DEBUG) self._log.addHandler(logging.StreamHandler()) def parse(self, content): t...
<reponame>binarytemple/mybatis-all-syncing-test /* * Copyright 2009-2012 The MyBatis Team * * 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...
#!/usr/bin/env python import msikeys import msikeys.ui if __name__ == '__main__': msikeys.ui.main()
<reponame>leongaban/redux-saga-exchange import { makeReduxFormEntry } from 'shared/helpers/redux'; import * as NS from '../namespace'; export const editMarketFormEntry = makeReduxFormEntry<NS.IEditMarketForm>('edit-market', [ 'id', 'makerFee', 'takerFee', 'baseFee', 'quoteFee', 'priceScale', 'amountScale', '...
#!/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...
exports._createTypography = require("@material-ui/core/styles/createTypography").default;
<reponame>quicksprout/naas-api-client-python import json from naas.client import Client class Projects: @staticmethod def list(params=None): """ Retrieve the list of projects :param params: dict :return: Response """ if params is None: params = {} ...
<filename>app/controllers/users_controller.rb class UsersController < ApiController # GET /users def index users = User.all render json: users end # GET /users/1 def show user = User.find(params[:id]) render json: user end end
// implement your server here // require your posts router and connect it here const express = require('express') const postRouter = require('./posts/posts-router') const server = express(); server.use(postRouter); module.exports = server
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PassColor = void 0; const colorNames = require("color-name"); const ABBR_RE = /^#([\da-f])([\da-f])([\da-f])([\da-f])?$/i; const HEX_RE = /^#([\da-f]{2})([\da-f]{2})([\da-f]{2})([\da-f]{2})?$/i; const PERCENT_RE = /^rgba?\(\s*([+-]?[\d...
#!/usr/bin/env 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 # "Lice...
import time from db.redis_db import Cookies from logger import crawler from login import get_session from db.dao import LoginInfoOper from .workers import app # 通过@app.task创建一个任务 # ignore_result: 不保存返回值 # 这个任务,属于监听消息队列的任务,属于消费者 @app.task(ignore_result=True) def login_task(name, password): get_session(name, passwo...
<gh_stars>0 package cn.crabapples.common; import lombok.Getter; /** * TODO http请求返回状态骂 * * @author Mr.He * 8/29/20 11:50 PM * e-mail <EMAIL> * qq 294046317 * pc-name root */ public enum ResponseCode { SUCCESS(200), ERROR(500), AUTH_FAIL(401); @Getter private final int code; ResponseCo...
<gh_stars>0 import { ComplexBase } from '@syncfusion/ej2-react-base'; import { StockChartIndexesModel } from '@syncfusion/ej2-charts'; /** * `SelectedDataIndex` directive represent the selected data in react Chart. * It must be contained in a Chart component(`ChartComponent`). * ```tsx * <ChartComponent> * <S...
import Vue from 'vue' import Vuex from 'vuex' import axios from 'axios' import { Message } from 'element-ui' Vue.use(Vuex) export default new Vuex.Store({ strict: process.env.NODE_ENV !== 'production', state: { cat: { name: '' } }, getters: { getCatName: state => { return state.cat.nam...
<gh_stars>0 (function () { "use strict"; // ======= Sticky window.onscroll = function () { const ud_header = document.querySelector(".ud-header"); const sticky = ud_header.offsetTop; const logo = document.querySelector(".navbar-brand img"); if (window.pageYOffset > sticky) { ud_header.clas...
<gh_stars>1-10 import unittest import astropy.units as q import numpy as np from .. import uncertainties as un class TestUnum(unittest.TestCase): """Tests for the Unum class""" def setUp(self): """Setup the tests""" # Symmetry self.sym = un.Unum(10.1, 0.2) self.asym = un.Unum...
package ru.autometry.obd.commands.adaptor.honda; import ru.autometry.obd.commands.Answer; import ru.autometry.obd.commands.adaptor.FormulaAdaptor; import ru.autometry.obd.exception.OBDException; /** * Created by jeck on 14/08/14 */ public class TPSAdaptor extends FormulaAdaptor { public static double[] percent = ...
#!/bin/sh java -cp libs/*:cops-client.jar com.yahoo.ycsb.Client -load -db edu.msu.cse.dkvf.ycsbDriver.DKVFDriver -P properties.txt -p clientClassName=edu.msu.cse.cops.client.COPSClient -p clientConfigFile=client_config > exp_results/client_Client_2_original_load.result 2> exp_errors/client_Client_2_original_load.erro...
<filename>src/adapters/gateways/reports/repository.go package reports import ( "time" "github.com/koki-develop/qiita-lgtm-ranking/src/adapters/gateways" "github.com/koki-develop/qiita-lgtm-ranking/src/entities" "github.com/pkg/errors" ) type Repository struct { config *Config } type Config struct { QiitaAPI ...
<reponame>amitse/fluentui-react-native export * from './FocusTrapZoneTest';
def evaluate_polynomial(polynomial, x): terms = polynomial.split("+") result = 0 for term in terms: factor, exponent = term.split("x^") result += int(factor)*(x**int(exponent)) return result polynomial = "4x^3 + 7x + 2" x = 6 print(evaluate_polynomial(polynomial, x))
<reponame>IzaacBaptista/ads-senac package ExerciciosExtras; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Forca { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); List<String> list = new ArrayList<>(); list.add(...
/* These are what my variables do: 1. container grabs my container class so I can store time blocks in it later. 2. hourArray stores times that loop over the time blocks in correct order. 3. currentDay is an empty <p> that gets stuffed with the Day, Month and Year. 4a. dataHour is a counter that corresponds with 9am-5p...
<reponame>eusholli/image-pipeline import traceback import io import numpy as np import sys import time import cv2 import datetime import jsonpickle import argparse import asyncio import os from common.imagebusutil import FrameDetails, ImagebusTopic # noqa from common.natsclient import create, subscribe_handler # no...
<reponame>blacelle/pepper<filename>java/src/main/java/cormoran/pepper/metrics/TaskStartEvent.java<gh_stars>0 /** * The MIT License * Copyright (c) 2014 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to ...
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either lic...
<reponame>Adaptivity/EvilCraft<gh_stars>0 package evilcraft.api.degradation.effects; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EnumCreatureType; import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry; import net...
SELECT p.ProductID, p.ProductName, p.Rating FROM Products p ORDER BY p.Rating DESC LIMIT 3;
// Copyright 2019 PingCAP, 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 to i...
#!/usr/bin/env bash source src/dev/ci_setup/setup_env.sh yarn run grunt run:i18nCheck
<gh_stars>10-100 package io.opensphere.analysis.export.controller; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import java.awt.Color; import org.junit.Test; import io.opensphere.analysis.export.model.ColorFormat; import io.opensphere.analysis.export.model.ExportOptionsMod...
#!/bin/bash # remediation = no groupadd cac_test$(date +%s)
from django.contrib.auth.models import User from django.db import models from django.db.models import manager from rest_framework import serializers from .models import Article, Category, Tag, Avatar from user_info.serializers import UserInfoSerializer class CategorySerializer(serializers.ModelSerializer): ''' ...
<filename>chapter_002/src/main/java/ru/job4j/pseudo/Paint.java<gh_stars>0 package ru.job4j.pseudo; /** * Paint - main class with entry point in programm. * Paint provides drawing triangle and square. * @author <NAME> (<EMAIL>) * @version $Id$ * @since 0.1 */ public class Paint { /** * The method draws o...
import requests def get_stock_price(symbol): url = "https://finance.yahoo.com/quote/" + symbol req = requests.get(url) data = req.json() return data['regularMarketPrice']
<gh_stars>1-10 function Button(text, origin , width, height, onClick) { this.container = new PIXI.Container(); var padding = {x: 20, y: 20}; // var origin = {x: 150, y: 200}; var textureButton = PIXI.Texture.fromImage('static/scroller/png/UI/PNG/blue_button07.png'); var textureButtonDown = PIXI.T...
<filename>dependencies/otp/r15b03-1/lib/ic/java_src/com/ericsson/otp/ic/Ref.java /* * %CopyrightBegin% * * Copyright Ericsson AB 1999-2009. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in * complian...
<reponame>VicidominiLab/spad-ffs # -*- coding: utf-8 -*- """ Created on Fri Feb 22 10:33:10 2019 @author: SPAD-FCS """ class Photon: def __init__(self, time, detectorElement): self.time = time self.detectorElement = detectorElement
import React from 'react'; import PropTypes from 'prop-types'; import Undersporsmal from './Undersporsmal'; import { sporsmal as sporsmalPt, soknadPt } from '../../../propTypes/index'; const Undersporsmalsliste = ({ undersporsmal, soknad, parentValue }) => { const sporsmalsliste = undersporsmal .filter((un...
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by <NAME>, <EMAIL>, All rights reserved. # LLNL-CODE-647188 # # For det...
<reponame>cvxgrp/coneos /* coneos 1.0 */ #include "coneOS.h" #include "normalize.h" static int _lineLen_; // constants and data structures static const char* HEADER[] = { " Iter ", " pri res ", " dua res ", " rel gap ", " pri obj ", " dua obj ", " kappa ", " time (s)", }; static const int HEADER_L...
#!/usr/bin/env bash # Get the nightly builds using maven # This is an alternative to using the ../bin/getnightly.sh shell script rm -fr ./staging mkdir staging mvn install | tee ./staging/RELEASE
#!/usr/bin/env bash # Development: Flutter, Postman sudo snap install flutter --classic sudo snap install postman # Entertainment: Discord, Spotify sudo snap install discord sudo snap install spotify # Tools: Bitwarden, Slack, Mailspring sudo snap install bitwarden sudo snap install slack --classic sudo snap install ...
function searchNumber(arr, target) { for (let i = 0; i < arr.length; i++) { if (arr[i] == target) { return i; } } return -1; } let result = searchNumber([1, 2, 4, 5, 6, 7, 8], 7); console.log(result);
// Receiver class public class FanBingBingReceiver { public void wearTrousers() { System.out.println("Fan BingBing is wearing trousers."); } } // Command interface public interface Command { void execute(); } // Concrete command class public class TuoKuZiCommand implements Command { private Fa...
<gh_stars>10-100 package io.opensphere.core.preferences; import javax.xml.bind.JAXBElement; import javax.xml.bind.JAXBException; import org.w3c.dom.Element; import io.opensphere.core.util.Utilities; import io.opensphere.core.util.XMLUtilities; /** * A preference key and JAXB object value pair. * * @...
<reponame>StuntsPT/BangleApps const c={"x":g.getWidth()/2,"y":g.getHeight()/2}; let zahlpos=[]; let unlock = false; function zeiger(len,dia,tim){ const x =c.x+ Math.cos(tim)*len/2, y =c.y + Math.sin(tim)*len/2, d={"d":3,"x":dia/2*Math.cos(tim+Math.PI/2),"y":dia/2*Math.sin(tim+Math.PI/2)}, pol...
#!/bin/sh set -uex NIM_DIR=$1 cd "${NIM_DIR}" sh build.sh bin/nim c koch ./koch boot -d:release ./koch tools -d:release
// Creamos la base de datos de un pais con 20 personas y sus salarios const colombia = []; colombia.push({ name: "Yuki", salary: 500, }); colombia.push({ name: "Kaito", salary: 1500, }); colombia.push({ name: "Jorge", salary: 1800, }); colombia.push({ name: "Mariela", salary: 1000, }); c...
#pragma once #include <toy_compiler/munster/ast/decl/decl.hpp> #include <vector> #include <string> namespace toy_compiler::munster::ast { class ASTDeclaration : public ASTNode { public: enum class DeclarationType { Variable, Function, Class // Add more d...
cat <<EOF | tee /etc/profile.d/10-<%= name %>.sh #!/bin/sh export PATH=$PATH:/opt/<%= name %>/bin/ EOF chmod +x /etc/profile.d/10-<%= name %>.sh
<reponame>patrontech/gh-action-amazon-ecs-run-task import { ECSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ECSClient"; import { DeregisterTaskDefinitionRequest, DeregisterTaskDefinitionResponse } from "../models/models_0"; import { Command as $Command } from "@aws-sdk/smithy-client"; import {...
def is_palindrome(word): reversed_word = word[::-1] if word == reversed_word: return True else: return False
from datetime import datetime now = datetime.now() print("Today's date is", now.strftime("%A, %B %dth, %Y, at %I:%M%p"))
version=1.2.0 platform=xinchang cdndir=/svn/$platform/$version/game_server/htdoc/resource/ svn up $cdndir hot_version=$(awk -F"," '{print $1}' $cdndir/hot_update_file.json|awk -F":" '{print $2}') hot_file=cdn/hot_version.txt hot_file_version_old=$(awk -F":" '/hot_version/{print $2}' cdn/hot_version.txt) echo -e "\e[33...
<filename>dist/src/commands/scaffold-module.command.js "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) {...
<filename>iot-suite-server-web/src/main/java/com/tuya/iot/suite/web/config/RequestLoggerFilter.java package com.tuya.iot.suite.web.config; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; import org.springframework....
arr = ["zebra", "ant", "cat", "dog"] sorted_arr = arr.sort puts "Sorted array: #{sorted_arr}"
#!/bin/bash #### percona-xtrabackup if ! grep '^XTRABACKUP$' ${INST_LOG} > /dev/null 2>&1 ; then ## handle source packages file_proc ${XTRABACKUP_SRC} get_file unpack SYMLINK='/usr/local/percona-xtrabackup' mv ${STORE_DIR}/${SRC_DIR} ${INST_DIR} ln -sf ${INST_DIR}/${SRC_DIR} $SYMLINK ##...
#!/bin/sh # 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 ma...
import React from "react" import Footer from './footer' import 'bootstrap/dist/css/bootstrap.min.css'; import "slick-carousel/slick/slick.css"; import "slick-carousel/slick/slick-theme.css"; const Layout = ({ children }) => { return ( <> {children} <Footer /> </> ) }...
from tensorflow.keras import Model from tensorflow.keras.layers import Dense, Input def fcnn(): input = Input(shape=(784,), dtype='float32', name='input') x = Dense(128, activation='relu')(input) x = Dense(64, activation='relu')(x) x = Dense(32, activation='relu')(x) output = Dense(num_classes, act...
<gh_stars>1-10 // // IRApplicationController.h // ExpenseManager // // Created by <NAME> on 30/09/14. // Copyright (c) 2014 Shibin. All rights reserved. // #import <Foundation/Foundation.h> @interface IRApplicationController : NSObject + (IRApplicationController *)sharedInstance; - (void)showAlertForDailyReminde...
<reponame>guoshuangyang/images-editor /** * @param image 必要的参数,图片 * @param x 绘制的x坐标位置 * @param y 绘制的y坐标的开始 * @param w 绘制的宽度 * @param h 绘制图片的高度 */ interface Options { image: CanvasImageSource; x?: number; y?: number; w?: number; h?: number; shape?: string; eventStatus?: number; } /*...
#! /bin/bash set -o errexit ROOT=$PWD rm -rf temp mkdir temp if [ ! -d lib/bundles ]; then mkdir lib/bundles fi cd temp # vscode languages git clone https://github.com/Microsoft/vscode cd vscode/extensions for f in *; do if [ -d "$f/syntaxes" ]; then echo "Adding $f" cp -r "$f" "$ROOT/lib/bundles" ...
#!/bin/bash # Note these environment variables on the right need to be set on the host machine. These values on the left are curried to inside the docker instance. export ENV1="${EVENT_HUB_CONNECTION1}" export ENV2="${STORAGE_CONNECTION1}"
export default () => { const theme = { light: { textColor: "black", backgroundColor: "white", containerColor: "transparent", activeColor: "tomato", dividerColor: "#cccccc" }, dark: { textColor: "white", backgroundColor: "#171717", containerColor: "#171717", ...
<filename>spec/getter_setter_spec.rb describe 'Getter And Setter' do describe "setter" do before(:each) do @container= Pimple.new end it "should get a service defined with block " do @container.set(:db_host) {|c| "127.0.0.1" } @container.set(:db) {|c| "mysql://#{c[:db_host]}" } ...
RW_GATEWAYS=( #"https://ipfs.works" #"https://ipfs.work" ) RO_GATEWAYS=( "https://ipfs.io" "https://cloudflare-ipfs.com" "https://ipfs.wak.io" ) can_use_ipfs() { if ! ipfs >/dev/null 2>&1; then echo "Missing ipfs command" >&2 return 1 fi if ! ipfs swarm peers >/dev/null 2>&1; then echo "Ip...
import { ISubscriberTopicMap } from "@walletconnect/types"; export class SubscriberTopicMap implements ISubscriberTopicMap { public map = new Map<string, string[]>(); get topics(): string[] { return Array.from(this.map.keys()); } public set: ISubscriberTopicMap["set"] = (topic, id) => { const ids = t...
A = [[3, 1], [2, 4]] A_inverse = [[4/7, -1/7], [-2/7, 3/7]]
<filename>src/app/employee-explorer/employee-explorer.component.ts<gh_stars>0 import { Component, EventEmitter, Input, Output } from '@angular/core'; // import { FormControl } from '@angular/forms'; import { Employee } from '../employee-loader.service'; @Component({ selector: 'employee-explorer', template...
// when generate javascript in the template, strings are escaped. // need to unescape them again to execute js function normalize_data(data) { data = data.replace(/u\&#39;/g, "'"); data = data.replace(/\&#39;/g, "'"); data = JSON.stringify(data); data = JSON.parse(data); data = JSON.parse(data); // one more t...
<gh_stars>10-100 package httpx import ( "fmt" "net/http" "net/url" "context" "github.com/gorilla/mux" ) // Router is an httpx.Handler router. type Router struct { // NotFoundHandler is a Handler that will be called when a route is not // found. NotFoundHandler Handler // This router is ultimately backed b...
#!/usr/bin/env bash set -e cd `dirname $0`/.. test/benchmark/benchflatcc/run.sh
<filename>2021-05-09/营养品商城/util/http.js const constant = require("./constant.js"); const storage = require("./storage.js"); const util = require("./util.js"); function request(config) { wx.showLoading({ title: '加载中..' }); wx.showToast({ title: '加载中..', icon: 'loading', mask...
package com.zm.paipai.proj; import java.util.ArrayList; import java.util.List; /** * Created by Administrator on 2016/10/12. */ public class Product { private String urls; private String title; private String dianzan; public Product(String urls,String title,String dianzan) { this.urls = ur...
package com.app; /* * Classe Cliente * @params String nome, int cpf */ public class Cliente { protected String nome; protected String cpf; // Construtor padrão public Cliente() { } // Construtor public Cliente(String nome, String cpf) { this.nome = nome; this.cpf = cpf...
# Takes a CSV as input and creates initial enrollment CVs. require 'csv' require 'bigdecimal' filename = "" def does_ssn_exist?(ssn) if Person.where("members.ssn" => ssn.to_s).count > 0 return ssn_person = Person.where("members.ssn" => ssn).first.name_full else return false end end def does_name_dob_exist?(fi...
SELECT SUM(quantity) FROM books WHERE booksellerID = '<booksellerID>';
let facade = require('gamecloud') let {EntityType} = facade.const /** * 定时遍历所有CP,查询每个CP一定时期内的所有流水,形成连续历史快照,为K线提供数据支撑 * @param {Object} data */ async function handle(data) { this.GetMapping(EntityType.Cp).groupOf().forEach(async (cp, key) => { let stockRecordList = await this.service.gamegoldHelper.exec...
# CREDIT: https://gist.github.com/bmhatfield/cc21ec0a3a2df963bffa3c1f884b676b # In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env # variable pointing GPG to the gpg-agent socket. This little script, which must be sourced # in your shell's init script (ie, .bash_profile, .zshrc, wha...
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { Routes, RouterModule } from '@angular/router'; import { IonicModule } from '@ionic/angular'; import { MaterialModules } from '../ionic-plugins/material-module'; import { Comp...
<reponame>BitPaw/BitFireEngine<filename>SystemResource/Source/Font/TTF/Chunks/OS2/Panose/TTFProportion.cpp<gh_stars>1-10 #include "TTFProportion.h" BF::TTFProportion BF::ConvertTTFProportion(unsigned char proportion) { switch (proportion) { case 0: return BF::TTFProportion::Any; case 1: return BF::TTFProportion:...
import collections from inference import load_tsv def process_data(file_path): entity_name2count = collections.defaultdict(int) doc_name2instance = load_tsv(file_path) for entity, doc in doc_name2instance: entity_name2count[entity] += 1 if doc in doc_name2instance: doc_name2ins...
<reponame>shamalainen/financer import React from 'react'; import { Container } from '../container/container'; type AccentColor = 'pink' | 'red' | 'green' | 'blue'; interface IHeroProps { accent?: string; accentColor?: AccentColor; label: string; children: React.ReactNode; standAlone?: boolean; className?...
if [ -e .selenium.pid ]; then echo "Selenium server seems to already be running (PID $(cat .selenium.pid))" >&2 exit 1 fi selenium-standalone start & echo $! > .selenium.pid
<filename>src/utils/utils.js import fs from 'fs'; const loadRoutes = async (routesPath, prefix, app) => { try { fs.readdirSync(routesPath).filter(el => /\.js$/.test(el)).forEach((fileName) => { import(`${routesPath}${fileName}`) .then(fileObject => { console.log(`Load routes at: ${fileNam...
#!/usr/bin/env bash # This script analyzes a video in an openface docker container start=`date +%s` echo "Openface processing $1/$2" # Run container docker run -i -d --name openface algebr/openface:latest # Remove any files from a previous run docker exec -it openface rm video.mp4 docker exec -it openface rm -rf pr...
<reponame>davidyu62/egovframe-runtime package org.egovframe.rte.itl.integration.type; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.List; imp...
package com.zto.testcase.response; import com.zto.testcase.enums.ErrorCodeEnum; import java.io.Serializable; import lombok.Data; @Data public class Result<R> implements Serializable { private String code; private String msg; private R data; public static <R> Result<R> success(R data) { Res...