text stringlengths 27 775k |
|---|
package me.pxq.eyepetizer.notification
import com.alibaba.android.arouter.facade.annotation.Route
import me.pxq.framework.router.RouterHub
import me.pxq.framework.ui.BaseTabsFragment
import me.pxq.eyepetizer.notification.adapters.ViewPagerAdapter
/**
* Description: 主页-通知Fragment
* Author : pxq
* Date : 2020/8/23 ... |
package kaptainwutax.itraders.entity;
import com.mojang.authlib.GameProfile;
import kaptainwutax.itraders.net.FakeServerHandler;
import net.minecraft.world.WorldServer;
import net.minecraftforge.common.util.FakePlayer;
public class FakeUser extends FakePlayer {
public FakeUser(WorldServer world, GameProfile name) ... |
DROP TABLE IF EXISTS `record`;
CREATE TABLE `record` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`flag` bigint(20) NOT NULL,
`application_name` varchar(128) DEFAULT '',
`name` varchar(128) NOT NULL,
... |
// Template based on the Mocha testing Framework from http://visionmedia.github.io/mocha/
// Syntax based on the Should.js BDD style testing from https://github.com/visionmedia/should.js
var should = require('should');
// Synchronous Code
describe('Array', function () {
describe('#indexOf()', function () {
... |
module Main where
import Lib (run)
import System.Directory (doesFileExist, makeAbsolute)
import System.Environment (getArgs)
import qualified Data.Text as T (strip)
import qualified Data.Text.IO as T (readFile)
main :: IO ()
main =
do args <- getArgs
case args of
[filePath] ->
do absP... |
package org.carlspring.strongbox.providers.search;
import org.carlspring.strongbox.services.ArtifactEntryService;
import org.carlspring.strongbox.storage.search.SearchRequest;
import org.carlspring.strongbox.storage.search.SearchResult;
import org.carlspring.strongbox.storage.search.SearchResults;
import javax.annota... |
package com.papsign.ktor.openapigen.annotations.type
import com.papsign.ktor.openapigen.validation.Validator
import com.papsign.ktor.openapigen.validation.ValidatorBuilder
import kotlin.reflect.KType
import kotlin.reflect.full.withNullability
open class SingleTypeValidator<A: Annotation>(allowedType: KType, private v... |
package info.hannes.changelog
import com.google.gson.annotations.Expose
import com.google.gson.annotations.SerializedName
class Gitlog {
@SerializedName("version")
@Expose
var version: String? = null
@SerializedName("code")
@Expose
var code: String? = null
@SerializedName("date")
@Exp... |
/*
* Example made with love by Natxopedreira 2021
* https://github.com/natxopedreira
* Updated by members of the ZKM | Hertz-Lab 2021
*/
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup() {
ofSetFrameRate(60);
ofSetVerticalSync(true);
//TODO
// o... |
/*
* Copyright (c) 2015 Typelevel
*
* 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, modify, merge, publish, ... |
package com.learn.concurrency.threadpool;
import java.util.ArrayList;
import java.util.List;
public class ThreadPoolExample {
public static void main(String[] args) {
List<Thread> threads = new ArrayList<Thread>();
for(int i=0; i<500;i++) {
Runnable task = new Task(100000L+i);
Thread thread = new Thread(t... |
package gleak
import (
"fmt"
"strings"
"github.com/onsi/gomega/format"
"github.com/onsi/gomega/types"
)
// IgnoringCreator succeeds if the goroutine was created by a function matching
// the specified name. The expected creator function name is either in the form
// of "creatorfunction-name" or "creatorfunction-... |
namespace TimeWarp.Architecture.Enumerations;
using System.Reflection;
/// <summary>
/// a base class for creating Enumerations.
/// https://gist.github.com/slovely/1076365
/// https://lostechies.com/jimmybogard/2008/08/12/enumeration-classes/
/// </summary>
public abstract class Enumeration : IComparable
{
//pro... |
#include "modules/pipeline/dataset_path.h"
#include "modules/pipeline/primitives.h"
#include "modules/pipeline/dataset_meta.h"
#include "gtest/gtest.h"
#include "modules/web/couchdb.h"
#include "modules/io/config.h"
#include "modules/pipeline/ottoman.h"
class dataset_test : public ::testing::Test {
public:
void SetU... |
SELECT `FEE`,`FFEE` FROM fee WHERE `DTYPE` = "ItemFee" and `FEE` != `FFEE`;
-- UPDATE fee SET `FFEE`=`FEE` Where `ID`>0 and `DTYPE` = "ItemFee"; |
import 'package:equations/equations.dart';
void main() {
// f(x) = x^3 + 7x^2 + 2x - 5
final cubic = Cubic.realEquation(
b: 7,
c: 2,
d: -5,
);
print('$cubic'); // f(x) = 1x^3 + 7x^2 + 2x + -5
print('discriminant: ${cubic.discriminant()}'); // 5089
print('derivative: ${cubic.derivative()}'); //... |
// Copyright 2017 Google 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/LICENSE-2.0
//
// Unless required by applicabl... |
using Tabben: num_examples, num_inputs, num_outputs, num_classes, task,
has_extras, has_extra, license, bibtex
@testset "classification dataset tests" begin
ns = [5, 10, 17, 100, 1000]
ms = [5, 10, 17, 100, 1000, 5000]
ks = [1, 2, 3, 5, 10]
cs = [2, 3, 5, 10, 100]
for n in ns, m in ms, k in ks, c ... |
import { mapGroup } from '@givto/api/graphql-mappers';
import { Group, ResolverObject, User } from '../../graphql-schema';
export const userResolver: ResolverObject<User> = {
async groups(user, _, { dataSources: { groups } }): Promise<Group[]> {
console.log('resolve groups for user', user.email);
const mongo... |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace NRealbit.Scripting.Parser
{
internal class StringInput : IInput<char>
{
public StringInput(string source) : this(source, 0) { }
public string Source { get; }
public int Position { get; }
internal StringInp... |
# Introduction to incisor-cell-counter
Processing pipeline was invoked like:
lein run -m incisor-cell-counter.imaris-cropped-analysis "/home/timepoint/directory" "imagefilename";
lein run -m incisor-cell-counter.csv-generator "/home/timepoint/directory" ... |
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.persistence.typeHandling.coreTypes;
import com.google.common.collect.Maps;
import org.terasology.persistence.typeHandling.PersistedData;
import org.terasology.persistence.typeHandling.PersistedDataSerializer;
impo... |
# `dank-scoop` bucket
## Usage
To add this bucket to scoop, run the following command in PowerShell:
```
scoop bucket add dank-scoop https://github.com/brian6932/dank-scoop/
```
|
/*
* Copyright (c) 2011-2018 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
* which is available at https:... |
#!/bin/bash
CONDA_ENVNAME=${1:-'gatk4'}
CONDA_INSTALLER=Miniconda3-latest-Linux-x86_64.sh
CONDA_DOWNLOAD_URL=https://repo.anaconda.com/miniconda/${CONDA_INSTALLER}
GATK_VERSION="4.1.4.0"
GATK_TARBALL="gatk-${GATK4_VERSION}.zip"
GATK_DOWNLOAD_BASEURL="https://github.com/broadinstitute/gatk/releases/download"
GATK_DOWN... |
module GraphqlPlayground
class PlaygroundsController < ActionController::Base
def show
end
end
end
|
# frozen_string_literal: true
module PhcStringFormat
#
# Parser for parsing PHC-string-format.
#
class PhcString
include Validations
def self.parse(string)
string ||= ''
PhcString.new(*split(string))
rescue StandardError => e
raise ParseError, e.message
end
# :reek:Dupli... |
use strict;
use warnings;
use Test::More;
use lib qw( t/lib );
use DBICTest;
use DBICTest::Constants qw/ THROW_EXCEPTION_MESSAGE /;
BEGIN {
eval "use DBD::SQLite";
plan $@
? ( skip_all => 'needs DBD::SQLite for testing' )
: ( tests => 684 );
}
## slave
my $schema = DBICTest->init_schema;
my $... |
from HDUCoursesAPI.timetable import dict_course_start, dict_course_end
import json
import re
def make_json(data: list) -> list:
need_deserialization = ['time_info', 'week_info', 'location', 'other']
for one in data:
for i in need_deserialization:
one[i] = one[i].replace("'", "\"")
... |
const AbstractIndexer = require("../abstract_indexer");
const crypto = require("crypto");
class StatusIndexer extends AbstractIndexer {
get LOGGER_NAME() {
return 'status-indexer';
}
constructor(adapter, params) {
super(adapter, params);
}
indexStatus (reporter) {
const idHash = crypto.createHa... |
package main
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"os/signal"
"path/filepath"
"strings"
"time"
"github.com/gorilla/mux"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/client-go/util/homedir"
"github.com/ezodude/kube-guard/privilege"
)
f... |
@extends('site.layouts.default')
@section('content')
@section('test')
<h1>{{ $title }}</h1>
<div>{{ link_to('post/create', '新增') }}</div>
@if (isset($posts))
<ol>
@foreach ($posts as $post)
<li>
{{-- HtmL::linkRoute('post.show', $post->title, ['id'=>$post->id]) --}}
... |
namespace Rikrop.Core.Framework.Logging
{
public static class LogRecordDataTypes
{
public const string Simple = "Simple";
public const string Large = "Large";
public const string StackTrace = "StackTrace";
public const string Exception = "Exception";
}
} |
using System;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Timers;
using Serilog;
namespace CreateTestObservable
{
class Program
{
static void Main(string[] args)
{
Log.Logger = new LoggerConfiguration().WriteTo.Console().CreateLogger();
v... |
using AppRopio.Payments.Core.Bundle;
namespace AppRopio.Payments.CloudPayments.Core.Services
{
public interface ICloudPaymentsPaymentNavigationVmService
{
void NavigateToInAppPayment(PaymentOrderBundle bundle);
}
} |
require 'codtls/record'
require 'codtls/session'
require 'openssl/ccm'
require 'codtls/alert'
module CoDTLS
# TODO
module RecordLayer
# first dtls message will be removed from mesg, so u can call parse
# multiple times on a concatenation of many dtls records
def self.decrypt(packet, maxlen)
# pac... |
import matplotlib.pyplot as plt
class Segment:
"""
Each piece of the fractal is one 'segment', whether it's a single line (at the base) or made up
of smaller segments.
line -- A 2D array of colummn vectors representing points on a grid. The two points together
represent one line segment.
... |
delete from relacionamento_regra_de_negocio;
delete from relacionamento_referencia;
delete from relacionamento_informacao_complementar;
delete from relacionamento_dados_revisao;
delete from regra_de_negocio;
delete from referencia;
delete from informacao_complementar;
delete from revisao;
delete from sistema;
delete fr... |
<?php
namespace App\Data\Repositories\Product;
use App\Product;
/**
* Class EloquentRepository
* @package App\Data\Repositories\Product
*/
class EloquentRepository implements ProductRepository
{
public function createProduct($attributes)
{
return Product::create($attributes);
}
public fun... |
import React, { useContext, useState } from "react"
import Img from "gatsby-image"
import { useStaticQuery, graphql } from "gatsby"
import { CartContext } from "../context"
import { motion } from "framer-motion"
const ProductItem = ({ node, index, width }) => {
const { handleAddCart } = useContext(CartContext)
con... |
# -*- coding: utf-8 -*-
import io
import os
import pandas as pd
import scrapy
from scrapy import Request
from scrapy import signals
from fooltrader.contract import files_contract
from fooltrader.contract.data_contract import STOCK_META_COL
from fooltrader.utils.utils import to_time_str
class AmericaListSpider(scra... |
//Crea objeto Empresa a partir de su Schema
//@Ref http://mongoosejs.com/docs/index.html
var mongoose = require('mongoose');
var db = require('./db'); //Establece la conexion con la base de datos
var empresaSchema = new mongoose.Schema({
_id: String,
ciudad: String,
pais: String
});
empresaSchema.methods.toStr... |
package com.zhuwj.common.exception.handler;
import com.zhuwj.common.enums.ErrorCodeEnum;
import com.zhuwj.common.response.ResponseResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @description: 处理拦截器异常控制器
* @author: zhuwj
* @... |
<?php
namespace app\cms\controller;
use think\Db;
// use app\index\controller\Common;
class Index extends Common
{
public function index(){
$adminid = session('adminid');
// $admin = Db::name('admin')->where('admin_id', $adminid)->find();
$version = Db::query('SELECT VERSION() AS ver');
... |
(ns cook.queue-limit
(:require [clj-time.core :as time]
[clojure.tools.logging :as log]
[cook.cached-queries :as cached-queries]
[cook.config :as config]
[cook.datomic :as datomic]
[cook.queries :as queries]
[cook.regexp-tools :as regexp-tools]
... |
package main
import (
"sync"
"github.com/rbee3u/golab/utils"
)
const (
concurrency = 2
repeat = 50_000_000
)
func main() {
do("slow", &SlowCounter{})
do("fast", &FastCounter{})
}
func do(name string, counter Counter) {
defer utils.LogElapsed(name)()
fnList := []func(Counter){
Counter.IncrA,
Counte... |
#ifndef __PARAMS__Process__
#define __PARAMS__Process__
class Process;
#include <cstddef>
#include <string>
#include <cstddef>
#include <string>
#include <cstddef>
#include <cstddef>
#include "base/types.hh"
#include <cstddef>
#include <string>
#include <cstddef>
#include "params/System.hh"
#include <cstddef>
#inclu... |
<?php
/* @var $this yii\web\View */
/* @var $model common\models\Advertise */
// The Regular Expression filter
$reg_exUrl = "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/";
// The Text you want to filter for urls
$text = $model->message;
// Check if there is a url in the text
if(preg_match($reg... |
package qrterminal
import (
"io"
"github.com/mdp/rsc/qr"
)
const BLACK = "\033[40m \033[0m"
const WHITE = "\033[47m \033[0m"
// Level - the QR Code's redundancy level
const H = qr.H
const M = qr.M
const L = qr.L
//Config for generating a barcode
type Config struct {
Level qr.Level
Writer io.Writer
Bl... |
/*
* Copyright (C) 2012 Benjamin Boksa (http://www.boksa.de/)
*
* 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
*
* Unl... |
//-----------------------------------------------------------------------
// <copyright company="Nuclei">
// Copyright 2013 Nuclei. Licensed under the Apache License, Version 2.0.
// </copyright>
//-----------------------------------------------------------------------
namespace Nuclei.Communication.Protoco... |
import type { QueryInterface } from 'sequelize';
import { DataTypes } from 'sequelize';
export async function up({ context: queryInterface }: Record<string, QueryInterface>): Promise<void> {
await queryInterface.createTable('BlogPost', {
id: {
type: DataTypes.UUID,
defaultValue: Dat... |
import React from 'react';
interface Props {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
onClick: (...args: any[]) => void;
}
const SettingsMenuItem: React.FC<Props> = ({ onClick, children }) => {
return <li onClick={onClick}>{children}</li>;
};
export default SettingsMenuItem;
|
// 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 may... |
#!/bin/sh
DOCKER_ARG="$@"
export DOCKER_ARG
exec /bin/s6-svscan /service
|
const jwt = require('jsonwebtoken');
const KEY_ID = process.env.KEY_ID;
const SECRET = process.env.SECRET;
/** @function
* @name signJwt
* will use the SECRET and KEY_ID to create a unique jwt for the smooch instantiation
* first set of characters up until the first period is unique. rest of the characters are
* d... |
<?php
/*
* Plugin Name: ra7form
* Author: rafaantonio
* Text Domain: ra7form
* Domain Path: /languages
*/
class Ra7form_Plugin {
static $instance;
public $inpage;
public $recipients_obj;
public function __construct() {
$act = filter_input( INPUT_GET, 'action' );
$this->inpage = ( $act ) ? 0 : 1;
add_... |
package coadynamic
import (
"context"
"fbc/cwf/radius/modules"
"fbc/lib/go/radius"
"fbc/lib/go/radius/rfc2866"
"fmt"
"net"
"sync/atomic"
"testing"
"go.uber.org/zap"
"github.com/stretchr/testify/require"
)
func TestCoaDynamic(t *testing.T) {
// Arrange
secret := []byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06}... |
Function Set-VTVMSwichAndState {
[CmdletBinding(PositionalBinding = $false)]
[OutputType([PSCustomObject])]
Param (
$ComputerName,
$vLabHostName,
$vLabName,
$vLabvLan
)
$ComputerNamevLab = "vLab-$ComputerName"
$ProcessName = $MyInvocation.MyCommand.Name... |
library search;
export 'data/search_cache.dart';
export 'data/search_client.dart';
export 'data/search_service.dart';
export 'models/license.dart';
export 'models/owner.dart';
export 'models/repo.dart';
export 'models/search_results.dart';
export 'models/search_results_error.dart';
export 'ui/search_presenter.dart';
e... |
'use strict'
var common = require('./common')
var tap = require('tap')
var helper = require('../../lib/agent_helper')
var METRIC_HOST_NAME = null
var METRIC_HOST_PORT = null
exports.MONGO_SEGMENT_RE = common.MONGO_SEGMENT_RE
exports.TRANSACTION_NAME = common.TRANSACTION_NAME
exports.DB_NAME = common.DB_NAME
export... |
import React from 'react';
import { Button, Input } from 'antd';
import { StyledForm } from './styles';
export interface SearchProps {
onSearch(args: string): void;
placeholder?: string;
loading?: boolean;
}
export const Search: React.FunctionComponent<SearchProps> = ({
onSearch,
placeholder = 'type a repo... |
---
uid: web-forms/overview/ajax-control-toolkit/dropshadow/index
title: "DropShadow | Microsoft Docs"
author: rick-anderson
description: "This tutorial shows how to use the DropShadow control, which draws a drop shadow behind a panel."
ms.author: aspnetcontent
ms.date: 11/14/2011
ms.assetid: ccd48877-ed83-43fe-9b3b-ed... |
#!/usr/bin/env bash
RSTAR_DEPS_BIN+=(
awk
gcc
make
perl
)
RSTAR_DEPS_PERL+=(
ExtUtils::Command
Pod::Usage
)
action() {
local LC_ALL
local OPTIND
local duration
local init
local prefix_absolute
while getopts ":b:p:" opt
do
case "$opt" in
b) RSTAR_BACKEND=$OPTARG ;;
p) RSTAR_PREFIX=$OPTARG ;;
... |
signup:
image: gokul711/flask-singup:v_BUILD_NUMBER
ports:
- "80:5000"
environment:
- APP_CONFIG=application.config
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
from dipy.io.stateful_tractogram import Space, StatefulTractogram
from dipy.io.streamline import save_tractogram
import numpy as np
from scilpy.io.streamlines import load_tractogram_with_reference
from scilpy.io.utils import (assert_inputs_exist,
... |
class BinTree(object):
"""Represent a tree object"""
def __init__(self, data, tree_left = None, tree_right = None):
self.__tree_left = tree_left
self.__tree_right = tree_right
self.__data = data
@property
def data(self):
return self.__data
@data.setter
def data(... |
// 589. Connecting Graph
// Problem description: http://www.lintcode.com/problem/connecting-graph/
// Problem solution: https://www.jiuzhang.com/solutions/connecting-graph
/*
* Union Find, Design
*
*/
class ConnectingGraph {
public:
/*
* @param n: An integer
*/ConnectingGraph(int n) {
// do inti... |
"""
shift_fields!(layer, offset)
Adds `offset` to the `layer` fields.
"""
function shift_fields! end
function shift_fields!(
layer::Union{Binary,Spin,Potts,Gaussian,ReLU,pReLU,xReLU}, offset::AbstractArray
)
@assert size(layer) == size(offset)
layer.θ .+= offset
return layer
end
function shift_fi... |
const wxConfig = require('../config/wxConfig')
const superagent = require('superagent')
const qs = require('querystring');
const WXBizDataCrypt = require('../util/WXBizDataCrypt') //解密文件
class userController {
/**
* 获取小程序unionId
* @param data
* @returns {Promise<*>}
*/
static async wxLogi... |
/*
*
* Copyright 2014 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
SELECT SIN(0) FROM db_root;
SELECT ROUND(SIN(1)) FROM db_root;
SELECT SIN('0') FROM db_root;
SELECT SIN('a') FROM db_root;
SELECT SIN(NULL) FROM db_root;
select cast(sin(123456789012345.12345) as numeric(6,5)) from db_root;
|
<?php
namespace Locale\Database;
use Illuminate\Database\Eloquent\Builder;
use Locale\Models\Localizable;
class LocalizableBuilder extends Builder
{
/**
* @var bool
*/
protected $translationJoined = false;
/**
* Add an "order by" clause to the query.
*
* @param string $column
... |
package com.tradingview.lightweightcharts.api.series.models
import androidx.annotation.ColorInt
import com.google.gson.annotations.JsonAdapter
import com.tradingview.lightweightcharts.api.series.common.SeriesData
data class HistogramData(
override val time: Time,
val value: Float,
/**
* Optional colo... |
package dawg
import (
"crypto/rand"
"encoding/json"
"fmt"
"os"
"github.com/jtacoma/uritemplates"
)
type URITemplate uritemplates.UriTemplate
func (t *URITemplate) UnmarshalJSON(b []byte) error {
tpl, err := uritemplates.Parse(string(b))
if err != nil {
return err
}
*t = URITemplate((*tpl))
return nil
}
... |
class Array
def find_by(conditions)
find do |i|
conditions.all? do |key, value|
i.respond_to?(key) && (i.__send__(key) == value)
end
end
end
end
|
package com.letter.days.view
import android.content.Context
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import android.util.AttributeSet
import android.view.View
import com.letter.days.R
import android.content.dp2px
import kotlin.math.min
import kotlin.properties.Delegate... |
var gulp = require('gulp');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var minifyCss = require('gulp-minify-css');
var watch = require('gulp-watch');
var STATIC_DEV = "./static-dev/";
var STATIC = './static/';
gulp.task('scripts', function() {
return gulp.src([
'lib/jquery/dist/jque... |
<?php // rnsignup.php (YUI version)
include_once 'rnheader.php';
echo <<<_END
<script src="yahoo-min.js"></script>
<script src="event-min.js"></script>
<script src="connection-min.js"></script>
<script>
function checkUser(user)
{
if (user.value == '')
{
document.getElementById('info').innerHTML = ''
return
}
... |
namespace PrimeWeb.HpTypes;
public class HpVars
{
//TODO: Type implementation - CALChpvars
}
|
<?php
namespace Mnvx\PProcess\Command;
/**
* Description of command set for assertions
*/
class CommandSet
{
/**
* @var string[] Commands for testing
*/
protected $commands;
/**
* @var string Path where commands will be run
*/
protected $path;
/**
* @var int How many t... |
#!/bin/bash
WORK_DIR=$(git rev-parse --show-toplevel)/build
CURRENT_DIR=$(pwd)
OUTPUT_DIR=$WORK_DIR/opencv
if [[ -d $OUTPUT_DIR ]]; then
rm -rf $OUTPUT_DIR
fi
if [[ ! -d $WORK_DIR ]]; then
mkdir -p $WORK_DIR
fi
cd $WORK_DIR
# download opencv if not already downloaded
if [[ ! -d opencv-4.5.2 ]]; then
if... |
# kegg2cyjs
kegg2cyjs converts KEGG pathway XML(KGML) to Cytoscape.js JSON (.cyjs).
|
<?php
namespace Reverb\Reverbsync\Controller\Adminhtml\Reverbsync;
use Magento\Backend\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;
class Staledelete extends \Magento\Backend\App\Action{
protected $resultPageFactory;
public function __construct(Context $context, PageFactory $result... |
A simple example of using the Digital Ocean [Test Kitchen](http://kitchen.ci) driver
with the shell provisioner.
This sort of setup is ideal for running on a continuous integration
system.
[](https://app.wercker.com/... |
import numpy as np
from bilevel_imaging_toolbox import solvers
from bilevel_imaging_toolbox import plot_utils
### Testing LASSO solver using ISTA method
m,n = 15,20
# Create random A matrix
rng = np.random.RandomState(42)
A = rng.randn(m,n)
# Create initial point
x0 = rng.randn(n)
x0[x0 < 0.9] = 0 # Add sparcity t... |
# -*- coding: utf-8 -*-
# Copyright (C) 2010, 2011 Rocky Bernstein <rockyb@rubyforge.net>
require_relative '../base/subcmd'
class Trepan::Subcommand::ShowConfirm < Trepan::ShowBoolSubcommand
unless defined?(HELP)
Trepanning::Subcommand.set_name_prefix(__FILE__, self)
HELP = "Show confirm potentially da... |
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"strconv"
"text/template"
"github.com/globalsign/mgo"
"github.com/gorilla/schema"
"github.com/haisum/recaptcha"
"github.com/julienschmidt/httprouter"
"github.com/mariaefi29/blog/config"
"github.com/mariaefi29/blog/models"
"github.com/pkg/errors... |
---
layout: post
title: "[learning javascript] chapter 12. 이터레이터와 제너레이터"
description: " "
date: 2021-06-18
tags: [javascript]
comments: true
share: true
---
# 이터레이터와 제너레이터
- '지금 어디 있는지' 파알할 수 있도록 돕는다는 면에서 책갈비와 비슷한 개념
- 배열의 경우 이터러블 객체의 좋은 예
```javascript
const book = [
"Twinkle. twinkle, little bat!",
"How I wo... |
# Tests
The tests directory contains integration tests that require a pre-seeded
database.
Each tests/<group> contains a seed.txt file at tests/<group>/seed.txt, which is
used by the docker seeddb container to setup the test database.
The tests can be run using tests/<group>/run.sh.
## Search Tests
The tests/searc... |
;;;; special-forms.lisp
;;;;
;;;; Copyright 2017 Alexander Gutev
;;;;
;;;; 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 right... |
# laravel ec sample
## Install
```
cd laradock-ec-sample
docker-compose up --build -d nginx php-fpm postgres redis workspace
docker-compose exec --user=laradock workspace bash
```
```
composer create-project --prefer-dist laravel/laravel ./
```
```
sh .sh/setup.sh
```
## Database
```
psql -d default -U default -h... |
This directory contains scripts used to implement the "Gaussian mean
estimation" simulations in the SMASH paper. In these simulations, we
assess the ability of different signal denoising methods to recover
the true signal after being provided with Gaussian-distributed
observations of the signal. We consider scenarios i... |
/*
* Copyright (c) 2008, 2009, 2010, 2011 Denis Tulskiy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
... |
package net.christophschubert.kafka.clusterstate.actions;
import net.christophschubert.kafka.clusterstate.ACLEntry;
import net.christophschubert.kafka.clusterstate.ClientBundle;
import java.util.Collections;
import java.util.concurrent.ExecutionException;
public class DeleteAclAction implements Action {
private ... |
#!/bin/bash
intentos=10
python /home/duque/tesisduque/actualizacion_web.py
#si no retorna 0, que se vuelva a mandar
for ((n=1; n<$intentos; n++))
do
if [ $? -ne 0 ]
then
sleep 5m
python /home/duque/tesisduque/actualizacion_web.py
fi
done
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.