text stringlengths 27 775k |
|---|
#!/bin/bash
set -eo pipefail
systemctl enable sshd
systemctl start sshd
systemctl status sshd ||:
ssh-keygen -t ecdsa -b 521 -f /root/.ssh/id_ecdsa -P ""
cp /root/.ssh/authorized_keys /root/.ssh/authorized_keys%
cat /root/.ssh/id_ecdsa.pub >>/root/.ssh/authorized_keys
|
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace MarauderEngine.Graphics
{
public class DrawingManager
{
public static DrawingManager Instance;
/// <summary>
/// List of all the Components being drawn... |
package com.moonmagician.reloads.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.moonmagician.reloads.entity.Imgview;
import java.util.List;
public interface ImgviewMapper extends BaseMapper<Imgview> {
// List<Imgview> ... |
## 0.2.0
### Breaking Changes
* The signature of `allowImplicitRead` on `DataFlow::Configuration` and `TaintTracking::Configuration` has changed from `allowImplicitRead(DataFlow::Node node, DataFlow::Content c)` to `allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c)`.
### Minor Analysis Improvements
* M... |
/*
* Copyright (C) 2017 Fluence Labs Limited
*
* This program 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.
*
* This ... |
<?php
namespace EditorJS;
/**
* Class ConfigLoader
*
* @package EditorJS
*/
class ConfigLoader
{
public array $tools = [];
/**
* ConfigLoader constructor
*
* @param array $config – configuration data
*
* @throws EditorJSException
*/
public function __construct(array $con... |
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
1 1 1 1 1 1 1 1 2 2 1 1 1 0 3 1 0 1 0 0 1 0 0 3 1 1 2 1 0 0 2 1 2 2 0
1 1 1 1 1 1 1 1 2 2 1 0 1 2 3 1 0 1 0 0 1 0 0 1 1 1 2 1 0 0 2 1 2 2 1
1 1 1 1 1 1 1 1 2 2 1 1 1 1 0 1 3 1 2 2 1 0 0 3 0 1 2 0 1 3 0 1 2 1 1
1 ... |
package main
import "fmt"
func main() {
var a int
fmt.Println(a)
var b *int
fmt.Println(b)
var c bool
fmt.Println(c)
var d func()
fmt.Println(d)
var e string
fmt.Printf("[%s]",e)
}
|
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:flutter/foundation.dart';
import 'package:json_annotation/json_annotation.dart';
part 'price.freezed.dart';
part 'price.g.dart';
@immutable
@freezed
class Price with _$Price {
@JsonSerializable()
factory Price({
@Default('usd') Strin... |
//
// JRAirportPickerItem.h
//
// Copyright 2016 Go Travel Un Limited
// This code is distributed under the terms and conditions of the MIT license.
//
#import <Foundation/Foundation.h>
@interface JRAirportPickerItem : NSObject
@property (strong, nonatomic) NSString *cellIdentifier;
@property (strong, nonatomic) ... |
module simulationQP934
include("./DATA.jl") # data structure
export Data
include("./wrap.jl")
include("./wrap_cell.jl") # function to wrap cells using pbc
include("./pbcseparation.jl") # calculation of the distance between two particles using periodic boundary conditions
include("./linkedlis... |
<?php
use PHPUnit\Framework\TestCase;
use PHPTools\StringHelper;
final class StringHelperTest extends TestCase
{
public function test_split_words()
{
$this->assertEquals(StringHelper::split_words(''), []);
$this->assertEquals(StringHelper::split_words('test'), ['test']);
$this->assertEquals(StringH... |
// SPDX-License-Identifier: ISC
// Copyright (c) 2014-2020 Bitmark Inc.
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package id_test
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
"github.com/bitmark-inc/bitmarkd/announce/id"
)
func TestCompa... |
using Amazon.Runtime;
namespace SalesForceBackup
{
/// <summary>
/// Contains the keys that are defined in the App.Config.
/// </summary>
internal class AppSettingKeys
{
public const string AwsAccessKey = "AWSAccessKey";
public const string AwsRegion = "AWSRegion";
public c... |
package com.ciarandg.soundbounds.client.audio
import com.ciarandg.soundbounds.client.Fader
import com.ciarandg.soundbounds.client.regions.RegionSwitcher
import org.lwjgl.openal.AL10
import org.lwjgl.openal.AL10.AL_BUFFERS_PROCESSED
import org.lwjgl.openal.AL10.alDeleteSources
import org.lwjgl.openal.AL10.alGenSources
... |
import React, { useEffect, useState, memo } from 'react'
import PropTypes from 'prop-types'
import Input from '../../ui/Input'
import Modal from '../../ui/Modal'
const RemoveExistingStrategyModal = ({
isOpen,
onRemoveStrategy,
onClose,
strategy: { label },
}) => {
const [canDeleteStrategy, setCanDeleteStrate... |
require 'rblineprof'
require 'rblineprof-report'
target = /./
profile = lineprof(target) do
sleep 0.1
end
LineProf.report(profile)
|
# frozen_string_literal: true
module RuboCop
module Cop
module Layout
# Checks that brackets used for array literals have or don't have
# surrounding space depending on configuration.
#
# @example EnforcedStyle: space
# # The `space` style enforces that array literals have
#... |
ReSharper-SDK-Toolkit
=====================
C# library containing utility classes and helper functions for the ReSharper SDK 8
|
module ArmyListsHelper
def alternate_cell_class(i)
if i == 0 or i%3 == 0 then
"prefix_1"
elsif (i + 1)%3 == 0 then
"suffix_1"
else
"prefix_1 suffix_1"
end
end
end
|
(ns outfolio.view
(:require [hiccup.page :refer [html5]]
[hiccup.core :refer [html]]))
(defn layout [title & body]
(html5
[:head
[:meta {:charset "utf-8"}]
[:meta {:http-equiv "X-UA-Compatible" :content "IE=edge,chrome=1"}]
[:meta {:name "viewport" :content "width=device-width, initial-s... |
using System;
using System.Linq;
namespace GitChat.Library {
public sealed class ChatService {
readonly GitRunner _git;
readonly string _userName;
public string RepoName => _git.RepoName;
public bool HasMessagesBelow => _git.HeadIndex > 0;
public ChatService(CacheStorage storage, string origi... |
import 'package:Covid19_PH/model/hospital_summary.dart';
import 'package:Covid19_PH/services/hospital_database.dart';
import 'package:flutter/material.dart';
import 'package:stacked/stacked.dart';
class FutureFacilitiesViewModel extends FutureViewModel<HospitalSummary> {
static String hospitalNameQuery;
static Fu... |
#
# Cookbook:: graphite
# Provider:: web_config
#
# Copyright:: 2014-2016, Heavy Water Software 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/LICE... |
use std::{env, fs};
// Steps:
// TRANSFORMATION_CONSTANT = 20201227
// x = 1
// Transform a Subject Number (7) => loop x times => x*=subject. x = x % TRANFORMATOIN_CONSTANT
// find loop size
const TRANSFORMATION_CONSTANT: usize = 20201227;
type LoopSize = usize;
type EncryptionKey = usize;
fn transform_subject_numbe... |
//! Data structures to store results of reports
use chrono::Duration;
use serde::{Deserialize, Deserializer};
use std::convert::{AsRef, AsMut};
use std::ops::{Deref, DerefMut};
/// A type to represent total times of a week
pub type TimeTotals = [DurationWrapper; 8];
/// Deserializer for chrono::Duration
fn deseriali... |
module Mixins
module EmbeddedAnsibleRefreshMixin
def embedded_ansible_refresh(objects = nil)
objects = [ManageIQ::Providers::EmbeddedAnsible::AutomationManager.first] if objects.nil?
begin
EmsRefresh.queue_refresh_task(objects)
add_flash(_("Embedded Ansible refresh has been successfull... |
<?php namespace Owlgrin\Cashew\Exceptions;
class NetworkException extends \Exception {
const MESSAGE = 'Couldn\'t process your request right now due to some network problem. Please try again in a minute';
public function __construct($message = null)
{
parent::__construct($message ?: self::MESSAGE);
}
} |
/**
* @author Marcus Sanatan <msanatan@gmail.com>
* @copyright 2021 Marcus Sanatan
* @description Cuadrado's Trials
*/
import Phaser from 'phaser';
import {
DOOR_KEY,
PLAYER_KEY,
TILES_KEY,
getLevelKey,
TILED_EXIT_DOOR_LAYER,
TILED_HORIZONTAL_MOVING_PLATFORMS_LAYER,
HORIZONTAL_PLATFORM_KEY,
... |
#!/bin/bash
MAKE_RULE=./Makefile.rule
set_project_path()
{
sed -i "s%\(^PROJECT_ROOT_PATH:=\).*%\1$PWD%" $MAKE_RULE
}
if [ $# -eq 0 ]
then
set_project_path
fi
|
#!/usr/bin/python
import os
import time
import pygame
from picamera import PiCamera
from sense_hat import SenseHat
# Setup Pygame (for display)
pygame.init()
screen = pygame.display.set_mode([800,480])
# Setup the Pi Camera
camera = PiCamera()
camera.resolution = (800, 480)
camera.hflip = True
# Setup the SenseHAT... |
---
'@graphql-codegen/typescript-react-query': patch
---
Respect typesPrefix for generated types.
Previously, the prefix was incorrectly applied to runtime hook names.
|
package org.haobtc.onekey.business.assetsLogo
import org.haobtc.onekey.R
import org.haobtc.onekey.constant.Vm.CoinType
class AssetsLogo {
fun getLogoResources(coinType: CoinType?): Int {
return when (coinType) {
CoinType.ETH -> R.drawable.token_eth
CoinType.BTC -> R.drawable.token_btc
else -> ... |
# Layout
Pretty much all of the CPU consists of NAND gates, so it is important to have a good repeatable
layout for them. Each of them needs VCC and GND, so these signals seem useful to have on bus
easily available everywhere. Between gates, there are also more signals, often passing through
quite long distance. For t... |
namespace ReportGenerator6
{
public interface IOrderReportGenerator
{
OrderReport Generate(Order order);
}
} |
<?php
namespace Arp\LaminasDoctrineFixtures;
use Arp\LaminasDoctrineFixtures\Command\ImportCommand;
use Arp\LaminasDoctrineFixtures\Factory\Command\ImportCommandFactory;
use Arp\LaminasDoctrineFixtures\Factory\Service\ExecutorFactory;
use Arp\LaminasDoctrineFixtures\Factory\Service\LoaderFactory;
use Arp\LaminasDoctr... |
---
title: Blockquote
---
Style and content changes for simple variations on a standard <blockquote>.
Add a <footer> for identifying the source. Wrap the name of the source work in <cite>. |
<?php
return array(
'debug' => array(
'detail' => 'debug',
'display_errors' => true,
),
'session' => array(
'handler' => 'database'
)
); |
using Enigma.Db.Linq;
using Enigma.Entities;
using Enigma.Store;
using Enigma.Store.Keys;
using System;
using System.Collections;
using System.Linq;
using System.Linq.Expressions;
namespace Enigma.Db
{
public class EnigmaSet<T> : ISet<T>
{
private readonly IEnigmaEntityEngine<T> _engine;
priv... |
package com.josenaves.iddog.data.remote.api
import com.josenaves.iddog.data.remote.api.dto.AuthRequest
import com.josenaves.iddog.data.remote.api.dto.AuthResponse
import com.josenaves.iddog.data.remote.api.dto.FeedResponse
import retrofit2.Response
import retrofit2.http.*
const val HUSKY = "husky"
const val HOUND = "... |
<?php
/**
* YAWIK Landingpages
*
* @filesource
* @copyright 2019 Cross Solution <https://www.cross-solution.de>
* @license MIT
*/
declare(strict_types=1);
namespace Landingpages\Controller;
use Interop\Container\ContainerInterface;
use Landingpages\Options\LandingpagesOptions;
/**
* Factory for Landingpages\... |
/*
* Copyright (c) 2021. App Nerds LLC. All rights reserved
*/
package serverstats
import (
"sync"
"github.com/dustin/go-humanize"
)
type StatsByHour struct {
Hour int `json:"hour"`
AverageFreeMemory uint64 `json:"averageFreeMemor... |
/*
* @Author: 肖锦
* @Date: 2021-06-04 09:24:03
* @LastEditTime: 2021-06-07 10:50:37
* @Description: file content
* @LastEditors: 肖锦
*/
import Vue from 'vue';
import App from './App';
import router from './router';
import store from './store';
import ViewDesign from 'view-design';
import importDirective from '@/dir... |
package com.sfxcode.sapphire.data.el
object CustomFunctionMapper {
def coolMethod(s: String): String = "test-" + s
}
class ExpressionsSpec extends munit.FunSuite {
test("registerValues") {
Expressions.register("DefaultFunctionsSpec", "Test")
assertEquals(Expressions.getValue("${DefaultFunctionsSpec}").ge... |
var test = require('tape')
var handlebars = require('handlebars')
var views = require('../index')
var v = views(__dirname + '/fixtures/', { template: handlebars.compile })
test('read views from directory', function (t) {
var all = v.all()
t.ok(all)
t.equals(Object.keys(all).length, 2)
t.end()
})
test('render... |
'use strict';
const Rules = {
// 必填
required(v, msg) {
if (v === '' || v === undefined || v === null || !v) {
return msg;
}
},
// 校验手机号
regexpPhone(v, msg) {
if (!/^((13|14|15|16|17|18|19)[0-9]{1}\d{8})$/.test(v)) {
return msg;
}
},
// 校验邮箱
regexpEmail(v, msg) {
if (!/... |
/*
* 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 ... |
import { registerStore } from '../stores/register_store';
/* base action for store crud actions */
/**
* The store could be a string or an object
* A string means that we must find the first store of that type
* A objet means that it's already a store objet
*/
function findStore(store) {
if (typeof store !== 's... |
# Text FluentUI spec
The Text component consistently styles and formats occurrences of text.
## Prior Art/Examples <a href="#prior-art" id="prior-art"></a>
- [Ant Design](https://ant.design/components/typography/)
- [BaseWeb](https://baseweb.design/blog/base-web-v9#typography)
- [Blueprint](https://blueprintjs.com/d... |
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/*
* Copyright (c) 2018, Joyent, Inc.
*/
var assert = require('assert-plus');
var child = require('child_pr... |
package com.natigbabayev.checkpoint.core.rules.patterns
import com.natigbabayev.checkpoint.core.Rule
import io.mockk.confirmVerified
import io.mockk.every
import io.mockk.mockk
import io.mockk.verify
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertFalse
import org.jun... |
%% Copyright 2011 Cloudant
%%
%% 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 writi... |
import { jt400 as connection } from './db'
import { pool, QueryOptions } from '../lib/jt400'
import { expect } from 'chai'
import { readFileSync } from 'fs'
describe('jt400 pool', () => {
let idList
beforeEach(() => {
return connection
.update('delete from tsttbl')
.then(() => {
const reco... |
#! /bin/bash
source ../appsAway_setEnvironment.local.sh
if [ -f "hosts.ini" ]
then
rm hosts.ini
fi
echo "[nodes:children]" >> ./hosts.ini
nodes_addr_array=($APPSAWAY_NODES_ADDR_LIST)
nodes_usr_array=($APPSAWAY_NODES_USERNAME_LIST)
nodes_name_array=($APPSAWAY_NODES_NAME_LIST)
nodes_len=${#nodes_addr_array[@]}
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 18 17:29:20 2021
@author: Enrique
"""
''' Code to simulate several undirected graphs
using multiprocessing. '''
import logging
import numpy as np
import multiprocessing as mp
import pathlib
import os
from .undirected_graphs import sample_undirect... |
# QnA App
This is the server side implementation of the QnA app.
#### Steps to build
1. `npm install`
2. `npm run start`
#### Steps to lint
- `npm run lint`
- `npm run lint-fix`
#### Steps to run unit test cases
- `npm run test`
|
require 'rspec/expectations'
Minitest::Test.class_eval do
include ::RSpec::Matchers
# This `expect` will only be called if the user is using Minitest < 5.6
# or if they are _not_ using Minitest::Spec on 5.6+. Minitest::Spec on 5.6+
# defines its own `expect` and will have the assertions incremented via our
... |
@{
ViewBag.Title = "How would you like to be contacted by the GLAA?";
}
@model GLAA.ViewModels.LicenceApplication.CommunicationPreferenceViewModel
@Html.ActionLink("< Back", "Back", "SignUp", new { submittedPageId = 4 }, new { @class = "details-back-button" })
@using (Html.BeginForm("SaveCommunicationPreference... |
module SupportingInformation
module SupportingInformation
def self.table_name_prefix
'supporting_information_'
end
end
end
|
package yaroslav.ovdiienko.idivision.rangepickerview.rangepicker.model.enums
enum class AnimatedRectProperties(val property: String) {
LEFT("left"),
RIGHT("right"),
DEFAULT("");
companion object {
fun find(property: String): AnimatedRectProperties {
return AnimatedRectProperties.v... |
#!/bin/bash
PATH=./local.virtualenv/bin:$PATH
COVARGS="\
--cov-report=html \
--cov=command \
--cov=domain \
--cov=event \
--cov=infrastructure \
--cov=web \
"
pytest "$*" $COVARGS
|
# allleague
奥利给!
## Usage
```sh
cd allleague
python app.py
# open http://localhost in browser
```
|
/*
* COButton.java
*
* 17.04.2005
*
* (c) by O.Lieshoff
*
*/
package corent.gui;
import java.awt.*;
import javax.swing.*;
/**
* Erweitert einen JButton um das Verhalten eines ContextOwners.
*
* @author O.Lieshoff
*
*/
public class COButton extends JButton implements Ressour... |
require 'aloof/error'
require 'aloof/codec'
require 'aloof/message'
require 'aloof/client'
require 'aloof/slip'
require 'aloof/tcp'
require 'aloof/terminal_type'
require 'aloof/object_table'
require 'aloof/message_decoder'
require 'aloof/timeout_queue'
|
module Mocktail
class Error < StandardError; end
class UnexpectedError < Error; end
class UnsupportedMocktail < Error; end
class MissingDemonstrationError < Error; end
class AmbiguousDemonstrationError < Error; end
class InvalidMatcherError < Error; end
class VerificationError < Error; end
end
|
package org.rsmod.plugins.content.pathfinder
import org.rsmod.game.path.PathFinder
import org.rsmod.plugins.api.protocol.packet.MapMove
val pathfinder: PathFinder by inject()
onAction<MapMove> {
val coordinates = pathfinder.findPath(
start = player.coords,
destination = destination
)
play... |
class User{
name: string;
email: string;
password?: string;
profile: "administrador" | "financeiro" | "funcionario";
sex: "masculino" | "feminino" | "naoInformado";
public constructor () {}
}
export {User} |
// Copyright (C) 2019-2020 OpenIO SAS
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package gunkan
import (
"github.com/rs/zerolog"
"github.com/spf13/cobra"
"o... |
package com.jetbrains.kotlin.structuralsearch.search
import com.jetbrains.kotlin.structuralsearch.KotlinSSResourceInspectionTest
class KotlinSSStringTemplateEntryTest : KotlinSSResourceInspectionTest() {
override fun getBasePath(): String = "stringTemplateEntry"
fun testLiteral() { doTest(""" "foo" """) }
... |
import { Component } from '@angular/core';
import {
App, IonicPage, NavController, NavParams,
LoadingController, PopoverController
} from 'ionic-angular';
import { TranslateService } from '@ngx-translate/core';
import { GroupProvider, MessagesProvider, ParamProvider, UserProvider } from '../../providers/providers'... |
if [ "$(command -v tmux)" ]; then
alias tmuxa="tmux attach -t"
alias tmuxk="tmux kill-session -t"
alias tmuxn="tmux new -s"
alias tmuxl="tmux ls"
alias tl="tmux ls"
fi |
using System;
using System.Reflection;
using MVC.Editor.ModelViewer.PropertyDrawer.Properties;
namespace MVC.Editor.ModelViewer.MemberInfoDrawer.Properties
{
internal class FloatMemberInfoDrawer : MemberInfoDrawer<float>
{
protected override Type _propertyDrawerType => typeof(FloatPropertyDrawer);
... |
################################################################################
# create_fs.rb
#
# Creates File System for the App
#
# 30.11.2016 ZT
# 01.12.2016 Updated
################################################################################
module CreateFs
Dir.mkdir "#{$app_root}", 0775 unless F... |
//#include <vld.h>
#define CATCH_CONFIG_MAIN
#include "3rd/Catch/single_include/catch.hpp"
|
### Sử dụng lambda expression như là đối số của phương thức khác.
```java
package org.example;
/**
* Cộng hai số.
*/
@FunctionalInterface
public interface Adder {
/**
* Cộng 2 số.
*
* @param s1 Số hạng thứ nhất.
* @param s2 Số hạng thứ hai.
* @return
*/
double add(double s1, d... |
import 'package:client/pages/chats.dart';
import 'package:client/pages/dashboard.dart';
import 'package:client/pages/login_signup.dart';
import 'package:client/utils/routes.dart';
import 'package:flutter/material.dart';
import 'package:client/pages/messages.dart';
import 'package:shared_preferences/shared_preferences.d... |
import 'mocha';
import { expect, use } from 'chai';
import { EventsStreamdeck } from '@/index';
import { ShowOkEvent } from '@/Events/Streamdeck/Received';
import { WillAppearType } from '@/StreamdeckTypes/Sent';
import eventShowOk from './Streamdeck/Received/fixtures/showOkEvent.valid.json';
import jsonschema from '... |
# Columnafraktur
## Generelt
[[Denis-klassifikationen]]
Q. Din patient har været i et trafikuheld, og du mistænker [[Columnafraktur]]. Hvor i columna ses disse hyppigtst?
A. 1) Cervicalcolumna (40%), 2) Thoracalcolumna (40%)
Q. Din patient har været i et trafikuheld, og du mistænker [[Cervikal tværsnitslæsion]]. Rtg.... |
/*
* Copyright (c) 2001-2019, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef _CHACHA_DRIVER_H
#define _CHACHA_DRIVER_H
#include "driver_defs.h"
/******************************************************************************
* TYPE DEFINITIO... |
use sauron::prelude::*;
use wasm_bindgen::prelude::*;
#[macro_use]
extern crate log;
mod app;
mod utils;
#[wasm_bindgen(start)]
pub fn main() {
utils::set_panic_hook();
utils::init_log();
trace!("Logging initialized.");
Program::mount_to_body(app::App::new());
}
|
srand(5678)
p = 5
n = 8
k = 3
for T in (Float64, Float32)
Wg = max(rand(T, p, k) .- 0.3, 0)
Hg = max(rand(T, k, n) .- 0.3, 0)
X = Wg * Hg
for alg in (:multmse, :multdiv, :projals, :alspgrad)
for init in (:random, :nndsvd, :nndsvda, :nndsvdar)
ret = NMF.nnmf(X, k, alg=alg, init=ini... |
T=`date +%m%d%H%M`
ROOT=../..
cfg=default.yaml
export PYTHONPATH=$ROOT:$PYTHONPATH
# python $ROOT/x_temporal/train.py --config $cfg | tee log.train_tin-mit-8-resnet101
# nohup python -u $ROOT/x_temporal/train.py --config $cfg > log.train_tin-mit-8-resnet101 & #.$T
# nohup python -u $ROOT/x_temporal/train.py --config... |
package codingblocks.com.networkokhttp.Tvshows
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.widget.AbsListView
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import codingblocks.com.networkokhttp... |
const helper = require('./helper');
const dialog = require('./dialog');
module.exports = {
init: function () {
let that = this;
// collapse title
$('body').delegate('a.choice-title', 'click', function (e) {
e.preventDefault();
var panel = $(this).parents('.panel-head... |
#Reviews
INSERT INTO Reviews (UID, ProjID, Rating, RateTime, UserReview)
VALUES('JenniferLawrence', '86101', '4', '2017-02-02 14:00:00', 'This project is good!');
INSERT INTO Reviews (UID, ProjID, Rating, RateTime, UserReview)
VALUES('DanStevens', '86101', '5', '2017-02-02 17:00:00', 'I agree with Jenn.');
INSERT I... |
// @flow
import { useEffect, useState } from "react";
import { useSelector } from "react-redux";
import { NativeModules } from "react-native";
import { discoverDevices } from "@ledgerhq/live-common/lib/hw";
import { lastConnectedDeviceSelector } from "../reducers/settings";
import { knownDevicesSelector } from "../redu... |
package main
import (
"flag"
"github.com/aws/aws-sdk-go/service/dynamodb"
)
var (
confFileName = flag.String("conf", "", "config file")
config *Config
client *dynamodb.DynamoDB
)
func main() {
flag.Parse()
var err error
config, err = LoadConfig(*confFileName)
if err != nil {
panic(err)
}
... |
use crate::common::ipv4_addr_src::{IPV4AddrSource, IPV4Consensus};
use crate::common::Id;
use crate::dht::{DHTSettings, DHT};
use crate::errors::RustyDHTError;
use crate::shutdown::ShutdownReceiver;
use crate::storage::node_bucket_storage::{NodeBucketStorage, NodeStorage};
use std::net::{Ipv4Addr, SocketAddrV4};
/// H... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package aula14evetor5;
import java.util.Arrays;
/**
*
* @author Deyvison Moraes
*/
public class Aula14EVetor5 {
/**
* @p... |
package uk.co.victoriajanedavis.chatapp.presentation.notifications
import android.app.NotificationChannel
import android.app.NotificationManager
import android.content.Context
import android.os.Build
import uk.co.victoriajanedavis.chatapp.presentation.notifications.friend.FriendNotification
import uk.co.victoriajaneda... |
module Main where
import System.Environment (getArgs)
import qualified Week5
import qualified Week6
import qualified Week7
import qualified Week8
main :: IO ()
main = do
args <- getArgs
if null args
then putStrLn "Usage: run <assignment-id> [args...]"
else
let (n : args') = args
in case n of
... |
using MediatR;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using System.IO;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Taobao.Area.Api.Configurations;
using Taobao.Area.Api.Domain.Events;
using Taobao.Area.Api.Domai... |
package com.iheart.thomas.utils
import cats.Functor
import cats.effect.Clock
import java.time.format.DateTimeFormatter
import java.time._
import java.util.concurrent.TimeUnit
import cats.implicits._
import scala.util.Try
import scala.concurrent.duration.{Duration => CDuration, _}
package object time {
def toDate... |
class Favourite < ActiveRecord::Base
belongs_to :favouritable, polymorphic: true
belongs_to :user
end
|
#!/usr/bin/env bash
echo "migrate database"
cp db_store/db/example_db.json db_store/db/db.json
echo "Install packages"
npm install
echo "Install pkg global"
npm install pkg -g
echo "Run build"
pkg -t node14-macos-x64,node14-linux-x64,node14-win-x64 --out-path build/ .
|
/******************************************************************
* See the NOTICE file distributed with this work for additional *
* information regarding Copyright ownership. The author/authors *
* license this file to you under the terms of the Apache License *
* Version 2.0 (the "License"); you may not use ... |
import { Component, OnInit, OnDestroy, Input, OnChanges, IterableDiffers, IterableDiffer } from '@angular/core';
import { environment } from 'src/environments/environment';
import { IPushpinLocation } from './IPushPinLocation';
declare var atlas: any;
// tslint:disable:max-line-length
// Clustering example: https://g... |
import React from "react";
import styled from 'styled-components';
const Wrapper = styled.div`
&:not(:last-child) {
margin-bottom: 10px;
}
`;
const Title = styled.div`
margin-bottom: 5px;
`;
type SubBlockProps = {
name?: string;
children?: React.ReactNode;
};
const SubBlock = (props: Sub... |
; RUN: opt < %s -instsimplify -S | FileCheck %s
; CHECK-LABEL: @foo
; CHECK-NOT: ashr
define i32 @foo(i32 %x) {
%o = and i32 %x, 1
%n = add i32 %o, -1
%t = ashr i32 %n, 17
ret i32 %t
}
|
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using AwsomeApi.WeixinWork.Message;
using AwsomeApi.WeixinWork.WeixinResult;
using Newtonsoft.Json;
namespace AwsomeApi.WeixinWork
{
public interface IWeixinWorkApi
{
public Task<TokenResult> GetToken(string corpid,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.