text
stringlengths
27
775k
package model /** * Wrapper object for predictions * * @param ctr * @param ir */ case class Scores(ctr: Double, ir: Double)
using ReMi.BusinessEntities.Metrics; using ReMi.Common.Utils; using System; using System.Collections.Generic; namespace ReMi.Queries.Metrics { public class GetMeasurementsResponse { public IEnumerable<Measurement> Measurements { get; set; } public override string ToString() { ...
create or replace function pgq.upgrade_schema() returns int4 as $$ -- updates table structure if necessary declare cnt int4 = 0; begin -- pgq.subscription.sub_last_tick: NOT NULL -> NULL perform 1 from information_schema.columns where table_schema = 'pgq' and table_name = 'subscription' ...
#!/bin/bash set -Eeuo pipefail; [ -n "${DEBUG:-}" ] && set -x function set_pipeline { echo "setting pipeline for metric-proxy" SCRIPT_DIR="$(cd $(dirname $0) && pwd -P)" metric_proxy_creds_file=$(mktemp) vault read -field=vars_file /secret/concourse/main/metric-proxy-pipeline > $metric_proxy_creds_file...
const axios = require('axios'); class BACKBONE { constructor() { if (process.env.NODE_ENV == "development") { this.urlBase = "http://localhost:3000/api/"; } else { this.urlBase = "https://spin-board.herokuapp.com/api/"; } } async getHashes(search, da...
/** * Copyright 2017 Comcast Cable Communications Management, LLC * * 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 a...
namespace Neo.Plugins.StateService.Network { enum MessageType : byte { Vote, StateRoot, } }
#pragma once #include "perceive/geometry/euclidean-transform.hpp" #include "perceive/geometry/projective/binocular-camera.hpp" namespace perceive { // } // namespace perceive
# v.0.1.0-alpha.0 This tag/version reflects migration to github * [x] Reset tag/version to alpha.0 * [x] Add ROADMAP.md * [x] Start CHANGELOG notes * [x] Apply tag v0.1.0-alpha.0 * [x] Update release notes in GitHub # v0.1.0-alpha.4 * [x] Add automated build (Makefile etc) * [x] Git describe version reporting (i.e. ...
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} -- | Defines a token type used by the lexer. module Zenacy.HTML.Internal.Token ( Token(..) , TokenBuffer(..) , TAttr(..) ...
import click from urllib.parse import urlparse import socket def display_url_part(url, piecename, allowfail): 'This function is the primary logic for the whole program.' # Automatically use the "default" schema if none are present. Otherwise the urlparse function will return nothing. if '//' not in url: ...
import { storiesOf } from "@storybook/react"; import * as React from "react"; import { pageListProps } from "../../../fixtures"; import SkillTypeListPage from "../../../skillTypes/components/SkillTypeListPage"; import { skillTypes } from "../../../skillTypes/fixtures"; import Decorator from "../../Decorator"; stories...
#!/usr/bin/env bash # A helper script for quickly tearing down the containers and rebuilding them. DOCKER_MACHINE_NAME=docker-vsphere-js LOCAL_DATA_SOURCE=/Users/jsanford/data/NBNDP DOCKER_DATA_TARGET=/home/docker docker pull mysql:5.6 docker pull unblibraries/fedora-solr-gsearch:3.8.x docker pull unblibraries/drupal:...
package no.syse.ectool.app import javafx.geometry.Pos import javafx.scene.paint.Color import tornadofx.* class Styles : Stylesheet() { companion object { val OK by cssclass() val Cancel by cssclass() val toolbar by cssclass() val maintabs by cssclass() } init { mai...
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # 树莓派管脚操作示例 import RPi.GPIO as GPIO import time #import picamera #gpio = 17 red = 23 blue = 24 green = 25 #初始化 def init(): #设置不显示警告 GPIO.setwarnings(False) #设置读取面板针脚模式 GPIO.setmode(GPIO.BCM) #设置读取针脚标号 GPIO.setup(red,GPIO.OUT)...
@if (Session::get('success')) <div class="alert alert-success">{{ Session::get('success') }}</div> @elseif (Session::get('fail')) <div class="alert alert-danger">{{ Session::get('fail') }}</div> @else <p class="login-box-msg">{{ __('Sign in to start your session') }}</p> @endif
require 'aruba/in_process' require 'aruba/turnip' require 'runner' RSpec.configure do |config| config.include Aruba::Api end if ENV['REMOTE_DEBUG'] == true require 'byebug/core' Byebug.wait_connection = true Byebug.start_server('localhost', 8989) end Aruba.configure do |config| config.exit_timeout = 2 co...
package pkgaction import "testing" func TestActionValue(t *testing.T) { if Install.String() != "install" { t.Fatalf("Expected %q but got %q", "install", Install.String()) } }
package db import ( "fmt" "fuse_file_system/model" "testing" ) func TestDao_InsertSql(t *testing.T) { param:=model.Param{} param["rao"]="xjrw" sql := insertSql("test", param) fmt.Println(sql) s, i := querySql("test", param) fmt.Println(s,i) s2, i2 := deleteSql("test", param) fmt.Println(s2,i2) }
using System; using System.Collections; using System.Collections.Generic; using SmartElk.Antler.Core.Abstractions.Registration; namespace SmartElk.Antler.Core.Abstractions { public interface IContainer: IDisposable { T Get<T>(); T Get<T>(string name); object Get...
# Auto Scroll Label Label that animates the text scrolling when it does not fit in its rect for [Godot](https://godotengine.org/).
--- title: Create a Slack integration type: apicode order: 19.2 external_redirect: /api/#create-a-slack-integration --- ##### Signature `POST /v1/integration/slack` ##### Example Request {{< code-snippets basename="slack_create" >}} ##### Example Response {{< code-snippets basename="result.slack_create" >}}
Karmik ====== Personal portfolio of Mikko Kivelä. Available at: http://mikkokivela.com.
package io.confluent.eventsim.events import java.io.ByteArrayOutputStream import org.apache.avro.Schema import org.apache.avro.io.EncoderFactory import org.apache.avro.specific.SpecificDatumWriter /** * Created by jadler on 1/13/16. */ abstract class AvroConstructor[T]() extends Object with Constructor { def...
using System; using System.Linq; using NUnit.Framework; using Linqed; namespace Linqed.CSharpTests { [TestFixture] public class RangeSpec { [Test] public void BuildsASimpleRange() { 1.To(4).ShouldSatisfy(it => it.SequenceEqual(new[] { 1,2,3,4 })); } [Test] public void BuildsADouble...
require "graphiti/open_api" require_relative "struct" module Graphiti::OpenAPI class AttributeData < Struct attribute :type, Types::String attribute :readable, Types::Bool attribute :writable, Types::Bool attribute :description, Types::String.optional end class Attribute < AttributeData attr...
#!/bin/bash # Build (and optionally upload to Dockerhub) for CLI $1 & version $2. # version ($2) will be set to `latest` in case not provided. # additionally --release, -r to release container to Dockerhub. # note: if you want to release as well, you should be logged in with `docker`. set -e DIR=`dirname $0` ROOT=$D...
/* * Copyright 2016 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 applica...
// Package dispatch is a lightweight api toolkit based on httprouter // that provides a few extra things: // // - Standard http.HandlerFunc handlers // - Middleware // - Grouped Routes // - Per-Group shared middlewares // - Per-Request Contexts // - Response Encoding // // These things already exist in many other...
package com.seanshubin.condorcet.backend.domain enum class Role(val description: String) { OWNER("Only 1 owner, can transfer OWNER to another user, can do anything AUDITOR can do"), AUDITOR("Can see secrets, can do anything a ADMIN can do"), ADMIN("Can manage users, can do anything a USER can do"), USE...
; RUN: opt -mtriple=x86_64-unknown-linux-gnu < %s -dfsan -S --dfsan-abilist=%S/Inputs/shadow-args-abilist.txt | FileCheck %s ; REQUIRES: x86-registered-target ; Test that the custom abi marks shadow parameters as zero extended. ; CHECK: @__dfsan_shadow_width_bits = weak_odr constant i32 [[#SBITS:]] ; CHECK: @__dfsan...
package app.softwork.composetodo.todos import androidx.compose.runtime.* import app.softwork.bootstrapcompose.* import app.softwork.composetodo.* import app.softwork.composetodo.dto.* import kotlinx.coroutines.* import kotlinx.datetime.* import kotlinx.uuid.* import org.jetbrains.compose.web.attributes.* class NewTod...
package android.retrofit import android.log.Log import okhttp3.Headers import okhttp3.Interceptor import okhttp3.Response import okio.Buffer import okio.GzipSource import java.io.EOFException import java.nio.charset.Charset import java.util.concurrent.TimeUnit @Suppress("LocalVariableName") class OkHttp3Logger : Inte...
require 'ramaze/gestalt' module Ramaze module Helper module Form def form_text(label, name, value = nil) form_input(label, :type => :text, :name => name, :value => value) end def form_checkbox(label, name, checked = false) hash = {:type => :checkbox, :name => name} hash...
export class TopicCategory { private 'topic_id'?: string | undefined; private 'topic_name'?: string | undefined; private 'category_id'?: string | undefined; private 'category_name'?: string | undefined; public constructor() { } public withTopicId(topicId: string): TopicCategory { ...
import { Inject } from '@nestjs/common'; import { BOOT } from '@nestcloud/common'; export const InjectBoot = () => Inject(BOOT);
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- 主機: 127.0.0.1:3306 -- 產生時間: 2018-02-03 06:02:42 -- 伺服器版本: 5.7.19 -- PHP 版本: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S...
#!/usr/bin/env bash cd ${TRAVIS_BUILD_DIR}/GenieCLI/bin/release/netcoreapp2.0/win10-x64/publish zip -r ${TRAVIS_BUILD_DIR}/genieCLI_win-x64-${TRAVIS_TAG}.zip ./* cd ${TRAVIS_BUILD_DIR}/GenieCLI/bin/release/netcoreapp2.0/ubuntu.16.10-x64/publish zip -r ${TRAVIS_BUILD_DIR}/genieCLI_linux-x64-${TRAVIS_TAG}.zip ./* cd ${TR...
--TEST-- SapiRequest::$contentMd5 --FILE-- <?php $_SERVER = [ 'HTTP_HOST' => 'example.com', 'HTTP_CONTENT_MD5' => 'foobar', ]; $request = new SapiRequest($GLOBALS); var_dump($request->contentMd5); unset($_SERVER['HTTP_CONTENT_MD5']); $request = new SapiRequest($GLOBALS); var_dump($request->contentMd5); --EXPEC...
#!/bin/bash echo "Building base images..." echo "BUILDING lqss/jenkins:admin" docker build --pull --tag lqss/jenkins:admin --file ./Dockerfile.admin . echo "BUILDING lqss/jenkins:anonymous" docker build --pull --tag lqss/jenkins:anonymous --file ./Dockerfile.anonymous . # This command will allow pipeline from running...
import React from 'react'; import { MapContainer, TileLayer, Marker, Popup } from 'react-leaflet'; import './styles/index.css'; interface EnteredProps { scrollWheelZoom?: boolean; zoomControl?: boolean; zoom?: number; lat: number; lng: number; height?: string; width?: string; attributionCon...
require_relative "test_helper" class AuthTrailTest < ActionDispatch::IntegrationTest include ActiveJob::TestHelper # for Rails < 6 def setup User.delete_all LoginActivity.delete_all end def test_success user = User.create!(email: "test@example.org", password: "secret") post user_session_url, ...
import {BaseComponent} from '../BaseComponent' export class LogstfLink extends BaseComponent { constructor(props) { super(props) } render() { let url = `https://logs.tf/search/player?s=${this.props.steamID64}` return this.html`<td><a href="${url}">Logs.tf</a></td>` } }
#pragma once #include <cstdint> #include <string> #include "envoy/network/transport_socket.h" #include "common/network/connection_impl.h" #include "common/ssl/context_impl.h" #include "common/ssl/ssl_socket.h" #include "openssl/ssl.h" namespace Envoy { namespace Ssl { // TODO(lizan): Remove Ssl::ConnectionImpl en...
#!/usr/bin/env python3 # Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import argparse import gn_helpers import os import re import shutil import sys de...
package com.myapp.domain import com.fasterxml.jackson.annotation.JsonIgnore interface HasIdentity<out T> { @get:JsonIgnore val _id: T? val id: T get() = _id ?: throw RuntimeException("This model is not saved yet.") }
use derivative::Derivative; use enclose::enclose; use futures::future::Either; use futures::{future, Future, FutureExt}; use serde::Serialize; use std::collections::VecDeque; use std::marker::PhantomData; use std::sync::{Arc, Mutex}; use stremio_core::models::ctx::Ctx; use stremio_core::models::streaming_server::Stream...
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @provides...
package com.thekorovay.myportfolio.module_profile.ui import android.content.Context import android.content.Intent import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.appcompat.app.AlertDialog import androidx.databinding.DataBindingUtil impo...
<# .SYNOPSIS .DESCRIPTION .PARAMETER Credential #> [CmdletBinding()] Param ( [PSCredential] $Credential ) if (!($Credential)) { $Credential = Get-Credential } Connect-MSOLService -Credential $Credential
// Copyright (c) Terence Parr, Sam Harwell. Licensed under the BSD license. See LICENSE in the project root for license information. #pragma once namespace antlr4 { namespace atn { // Represents the type of recognizer an ATN applies to. enum class atn_type { // A lexer grammar lexer, // A parser grammar p...
/* PICCANTE The hottest HDR imaging library! http://vcg.isti.cnr.it/piccante Copyright (C) 2014 Visual Computing Laboratory - ISTI CNR http://vcg.isti.cnr.it First author: Francesco Banterle 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 ...
const app = require('./src'); describe('App testing', () => { // TODO // This is a sample test case it('should be defined', () => { expect(app).toBeDefined(); }); });
<?php function getCurlRequestResult($url) { $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, $url); //设置访问的url地址 // curl_setopt($ch,CURLOPT_HEADER,1); //是否显示头部信息 curl_setopt($ch, CURLOPT_TIMEOUT, 5); //设置超时 curl_setopt($ch, CURLOPT...
--- -api-id: P:Microsoft.UI.Xaml.Controls.ContentPresenter.FontStretch -api-type: winrt property --- <!-- Property syntax public Windows.UI.Text.FontStretch FontStretch { get; set; } --> # Microsoft.UI.Xaml.Controls.ContentPresenter.FontStretch ## -description Gets or sets the font stretch for the text content pres...
#pragma once // Initial code copyright 2016-2019 Daniel Lemire (lemire@gmail.com). Licensed // under the Apache License, Version 2.0. See the COPYING file at the root of // this distribution or at http://www.apache.org/licenses/LICENSE-2.0 // // Subsequent changes copyright 2019 POGchain Development Foundation and // ...
#!/bin/bash if [ $# -eq 0 ]; then if [ "$STACK_NAME" == "" ]; then echo "Usage: $0 <stack-name>" exit 1 fi else STACK_NAME=$1 fi if [ "$S3_JAR_BUCKET" == "" ]; then echo "ERROR: environment variable S3_JAR_BUCKET is not set." echo "" echo "export S3_JAR_BUCKET=<my-unique-bucket-name>" exit 1 fi ...
<?php /* * This file is part of the GraphAware Bolt package. * * (c) GraphAware Ltd <christophe@graphaware.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PTS\Bolt\Protocol; use PTS\Bolt\IO\AbstractIO; use PTS\Bol...
#!/bin/bash topDir=$(pwd) pushd $topDir/scripts/test mkdir -p $topDir/test git clone https://github.com/tpouyer/stackina-base-box.git $topDir/test touch $topDir/test/vagrant/Personalization cat >> $topDir/test/vagrant/Personalization <<EOF # Use NFS? (won't work on windows) \$use_nfs = false # Box name \$box = "sta...
class Hash def deep_delete(hash) hash.each do |key, value| if self.has_key?(key) if value.is_a?( Hash ) && self[key].is_a?(Hash) self[key].deep_delete(value) else self.delete(key) end end end end end
package http_test import ( "bytes" "fmt" "net/http/httptest" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" admissionv1 "k8s.io/api/admission/v1" admissionv1beta1 "k8s.io/api/admission/v1beta1" corev1 "k8s.io/api/core/v1" metav1 "k8s....
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import re import pytest from bumpver import v1patterns from bumpver import v2patterns V2_PART_PATTERN_CASES = [ (['YYYY', 'GGGG'], "2020" ,...
import * as React from 'react' import { PathLabel } from '../lib/path-label' import { AppFileStatus, mapStatus, iconForStatus } from '../../models/status' import { IDiff, DiffType } from '../../models/diff' import { Octicon, OcticonSymbol } from '../octicons' import { Button } from '../lib/button' import { enablePrevie...
package models object DaysEnum extends Enumeration{ val Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday = Value }
package saarland.cispa.frontmatter.results import com.google.gson.JsonElement import com.google.gson.JsonObject import com.google.gson.JsonPrimitive import com.google.gson.JsonSerializationContext import com.google.gson.JsonSerializer import soot.SootClass import java.lang.reflect.Type class SootClassSerializer : Js...
# coding: UTF-8 require "warden/errors" require "warden/pool/base" module Warden module Pool class Uid < Base class NoUidAvailable < WardenError def message super || "no uid available" end end def self.local_uids File.readlines("/etc/passwd").map { |e| e....
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <script src="exif.js"></script> <style> .upload { margin-top: 2em; } .upload input { border: 0; background-color: #060; color: white; font-size: 200%; } </style> </head> <body> <a href=".">View phot...
class Unpkg < Cask version '4.5' sha256 'e32754b07073b383320d2bc0ce4ba9bd83a3f352043bd6f500741901f00c8c17' url "https://github.com/downloads/timdoug/unpkg/unpkg-#{version}.zip" homepage 'http://www.timdoug.com/unpkg/' link "unpkg #{version}/unpkg.app" end
package com.merxury.blocker.ui.home.applist import android.content.Context import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.lifecycle.LifecycleCoroutineScope import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter import andr...
import { makeStyles, Theme } from '@material-ui/core/styles'; const useStyles = makeStyles((theme: Theme) => ({ main: { backgroundColor: '#EEEEEE', paddingTop: theme.spacing(20), [theme.breakpoints.only('xs')]: { paddingLeft: 12, paddingRight: 12, }, [theme.breakpoints.only('sm')]: { ...
# encoding: binary module Rex module Proto # SIP protocol support module SIP SIP_STATUS_REGEX = /^SIP\/(\d\.\d) (\d{3})\s*(.*)$/ # Represents a generic SIP message class Message attr_accessor :headers def initialize @headers = {} end # Returns a ...
package com.kreait.slack.api.test.group.users import com.kreait.slack.api.contract.jackson.group.users.ErrorInfoResponse import com.kreait.slack.api.contract.jackson.group.users.InfoRequest import com.kreait.slack.api.contract.jackson.group.users.SuccessfulInfoResponse import com.kreait.slack.api.group.ApiCallResult i...
--- title: Time Function keywords: vblr6.chm1009041 f1_keywords: - vblr6.chm1009041 ms.prod: office ms.assetid: 53451748-04cf-04d2-b40d-c091753c7898 ms.date: 06/08/2017 --- # Time Function Returns a **Variant** (**Date**) indicating the current system time. ## Syntax **Time** ## Remarks To set the system time...
package discord import ( "encoding/json" ) type Webhook interface { json.Marshaler json.Unmarshaler // ID returns the current value of this record's `id` field. // // The `id` field contains the id of the webhook. ID() Snowflake // SetID overwrites the current value of this record's `id` field. SetID(Snowf...
package main import ( "context" "encoding/json" "fmt" "net/http" "os" "os/signal" "runtime" "time" "github.com/BurntSushi/toml" "github.com/gorilla/mux" "github.com/haruno-bot/haruno/coolq" "github.com/haruno-bot/haruno/logger" "github.com/haruno-bot/haruno/plugins" _ "github.com/haruno-bot/haruno/sys" ...
# 微前端 随着前端业务场景越来越复杂,而[微前端](https://micro-frontends.org/)这一概念则提供了一种解决方案。 ## iframe `iframe` 彻底隔绝了应用间的上下文: + 父子之间的网页链接是不同的,浏览器一刷新,`iframe` 中的状态就没了,后退、前进按钮无法使用 + 父子之间的 UI 难以同步,内嵌的 `iframe` 并不会自动调节宽高,而且通信困难 + 全局上下文完全隔离,内存变量不共享,则需要完成 `iframe` 之间的通信及变量同步设计 + 慢,每次进子应用,浏览器都需要重新完整加载资源 ## 方案 ### qiankun ### emp
import React from 'react'; import location from './location'; export default class Section extends React.Component { constructor(props) { super (props); this.state = {path: ''}; } pathSelected (_path) { var path = _path || this.state.path; var loc = location.getLocation().split('/'); path ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Med...
create index compounds_chebi_idx on compounds(chebi_accession); create index compounds_name_idx on compounds(name); create index chemical_data_compound_id_idx on chemical_data(compound_id); create index comments_compound_id_idx on comments(compound_id); create index database_accession_compound_id_idx on database_access...
CREATE FUNCTION [dbo].[ufn_sqlwatch_parse_job_name] ( @client_app_name nvarchar(128), @job_name nvarchar(128) = null ) RETURNS nvarchar(128) AS /* this function will parse the agent job name and replace the binary string: (SQLAgent - TSQL JobStep (Job 0x583FB91A7B48A64E96B7FDDEBDC58EC0 : Step 1)) with the act...
namespace GameLib.System.Controller { public class InputFactory : IInputFactory { private static IInputFactory instance; private InputFactory() { } public static IInputFactory getInstance() { if (instance == null) { inst...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Traceroute results. """ __license__ = """ GoLismero 2.0 - The web knife - Copyright (C) 2011-2014 Golismero project site: https://github.com/golismero Golismero project mail: contact@golismero-project.com This program is free software; you can redistribute it and/or...
using System; using System.Threading; using System.Threading.Tasks; namespace Channels { public class Selectable<T> { private readonly SemaphoreSlim _selectSignal = new SemaphoreSlim(0, 1); private readonly Task<T> _selectTask; private int _selectSignalCount = 0; public Selec...
export dnorm, dgumbel, dgamma, dlognorm """ dnorm(x::Real, μ::Real, σ::Real) Normal distribution density function """ dnorm(x::Real, μ::Real, σ::Real) = exp(-0.5 * ((x - μ)/σ)^2)/(σ*sqrt2π) """ dgumbel(x::Real, μ::Real, σ::Real) Gumbel density, parameterized by mean (μ) and SD (σ) of x. """ function dgumbel...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ use 2nd order friedmann equations + the continuity equation numerically integrate the cosmological equations for standard cosmology where omega = 1 for matter universe also omega = 1 30% matter, 70% dark energy luminosity distance plots https://arxiv.org/pdf/astro-ph/9...
var velocity; var offset; function setup() { velocity = createVector(0.01, 0.01); offset = createVector(0.0, 50.0); createCanvas(800, 800); background(31); frameRate(30); } function draw() { var location = createVector(noise(offset.x)*(width/1.2), noise(offset.y)*height); offset.add(velocity); var t...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """Module ...
! ################################################################################################################################## ! Begin MIT license text. ! ___________________________________________________________________________...
#!/bin/bash # Postinstall for OSEHRA VistA Plan 6 # See IMPORTANT notes in the .m file. cp ./Common/ov6piko.m $basedir/r/ $gtm_dist/mumps -r ov6piko
using JSON using DataFrames using Query using CSV # extract json from 7z function extract_json(data_path, filepaths_to_extract) cd(data_path) try if typeof(filepaths_to_extract) <: AbstractArray for fp in filepaths_to_extract Base.run(`7z x $fp -aos`) end ...
#Modifying impute function from https://github.com/invenia/Impute.jl/blob/master/src/imputors/interp.jl """ Uses linear interpolation to fill for missing values. # Example: ``` x = rand(1:10.0, 10) x[5] = missing linear_interpolation(x) ``` """ function linear_interpolation(timeseries) if count(i->(ismissing(i...
/** * Roles enum, provide the available role names that a user can belong to. */ export enum Roles { SYSTEM_ADMINISTRATOR = 'System Administrator', AGENCY_ADMINISTRATOR = 'Agency Administrator', REAL_ESTATE_MANAGER = 'Real Estate Manager', ASSISTANT_DEPUTY_MINISTER = 'Assistant Deputy Minister', ASSISTANT_D...
if Redis::VERSION < '4.2' module RedisCompatible extend ActiveSupport::Concern def exists?(key) exists(key) end end Redis.send(:include, RedisCompatible) end
function requireDefault$__(obj){ return obj && obj.__esModule ? obj : { default: obj }; }; Object.defineProperty(exports, "__esModule", {value: true}); /*body*/ var _$sessionφ = requireDefault$__(require('@fastify/session'/*$path$*/)); var _$DriverManagerφ = requireDefault$__(require('./DriverManager'/*$path$*/)); va...
extern crate my_box as lib; use lib::MyBox; fn main() { let message = MyBox::new(String::from("Rust")); hello(&message); } fn hello(name: &str) { println!("Hello, {}!", name); } #[cfg(test)] mod tests { use super::*; #[test] fn main_ok() { main(); } }
(ns athens.export "Entry point namespace for the Athens exporter tool. This takes an Athens database and attempts to dump it as a tree of Markdown files, named and formatted in the way that logseq expects." (:require [clojure.java.io :as io] [clojure.string :as string] [datascript.core :as ds] [...
# Allow classes to use self-referencing Type hints in Python 3.7. from __future__ import annotations from typing import List class PyArrowWriteResult(dict): @staticmethod def of(file_count: int, pyarrow_bytes: int, file_bytes: int, record_count: int) -> PyArrowWriteResult: ...
require 'digest' require 'pp' ## pp = pretty print class Block attr_reader :data attr_reader :prev # prev(ious) (block) hash attr_reader :hash attr_reader :nonce # number used once - lucky (mining) lottery number def initialize(data, prev) @data = data @prev = ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import libvirt from ovm.utils.logger import logger class LibvirtConnect: _conn = None _connection_string = 'qemu:///system' @classmethod def get_connection(cls): if cls._conn is None: cls._conn = libvirt.open(cls._connection_string...
class Move < ActiveRecord::Base validates :game_id, presence: true validates :piece, presence: true validates :notation, presence: true validates_format_of :notation, without: /undefined/ validates :user_id, presence: true belongs_to :game belongs_to :user has_one :board end