content stringlengths 10 4.9M |
|---|
def parse_utc(epoch, metadata):
return Time(parse_datetime(epoch), format="datetime", scale="utc") |
Resolved conformational states of spin-labeled Ca-ATPase during the enzymatic cycle.
We have used frequency- and time-resolved electron paramagnetic resonance (EPR) to study the effects of substrate on the nanosecond conformational dynamics of the Ca-ATPase of sarcoplasmic reticulum, as detected by an iodoacetamide sp... |
The law now has removed gender complementarity from the meaning of marriage. This ruling goes against the grain of our understanding of the ideal parenting environment for children’s social, emotional, intellectual, and moral development. If the legalization of same-sex marriage over time diminishes men’s connection to... |
/**
* Displays a circle on the map. Meant to display a circle centered around the marker of the
* region set by the user.
* @param center
* This represents the center of the circle.
* @param radius
* This represents the radius of the circle in meters.
*/
public void displayC... |
def fragment_wbo_ridge_plot(data, filename, indices=None):
higlight_for_bonds = []
sorted_frags = sort_fragments_by_elf10wbo(data)
sorted_frags = [f[1] for f in sorted_frags]
n = len(data)
fig = plt.figure()
gs = mpl.gridspec.GridSpec(n, 2, width_ratios=[20, 1])
fig.dpi = 400
x_min = 3
... |
#include "Camera.h"
Camera::Camera(glm::vec3 arg_pos,glm::vec3 arg_tar,glm::vec3 arg_up)
{
position = arg_pos;
target = arg_tar;
up = arg_up;
view = glm::lookAt(arg_pos,arg_tar,arg_up);
//initialize yaw and pitch
glm::vec3 tmpdir = glm::normalize(target - position);
//57.29578 = 180 / 3.141592653590...
yaw =... |
/* Copyright 2017 The TensorFlow Authors. 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 applicable law or a... |
//Takes a given truckdriver and updates it in the chart and in the db
public void updateTruckDriver(TruckDriver truckdriver, LocalDate date, LocalTime from, LocalTime to, int series, int data) {
ObservableList<DriverPlan> driverPlanObservableList = getDriverPlansAsList(truckdriver, date);
DriverPlan sel... |
/**
* Assign staff for the event
*
* @param evenStaff object
* @return true if adding the staff to event successfully.
*/
public boolean addEventStaff(EventStaff eventstaff)
{
Session session = null;
boolean success = false;
try
{
session = db.getFactory().getCurrentSession();
session.be... |
n=input()
t=n%5
z=n/5
if t==0:
pass
else:
z+=1
print z |
<gh_stars>0
import { Column, Entity, PrimaryGeneratedColumn, JoinColumn, OneToMany } from "typeorm";
//? ใช้สำหรับทำ validator และ return Error กลับไปให้ Client
import { IsEmail, IsString, IsNotEmpty, MinLength, IsNumber, IsDate } from 'class-validator';
import {SaleOrderEntity} from '../../saleorders/models/sal... |
// create a new database
// creates a folder for the database and returns a Database struct
pub fn create(name: &str) -> Database {
let dir_name: &str = &("data/db-".to_owned() + name);
file_system::create_database(name);
Database {
name: name.to_owned(),
directory: dir_n... |
/**
* Submit the file to the Evaluation
* @throws SynapseException
*/
public void submit(String filePath, String evaluationId) throws Throwable {
Evaluation evaluation = synapseAdmin.getEvaluation(evaluationId);
String parentId = evaluation.getContentSource();
String fileId = archiver.uploadToSynapse(new Fi... |
<reponame>lindenthink/workassistant-web
import { Component, Vue, Prop } from 'vue-property-decorator'
@Component({
name: 'FormItem',
components: {}
})
export default class FormItem extends Vue {
@Prop()
label: string
@Prop({
type: String,
default: '96px'
})
labelWidth: strin... |
n, k= map(int, input().split())
d=[]
sunukes=[]
for i in range(k):
d.append(input())
sunukes = set(sunukes) | set(list(map(int, input().split())))
allsunuke = [i for i in range(1,(n+1))]
ans = set(allsunuke)- set(sunukes)
print(len(ans)) |
<filename>2_Parser/symtab.c
/*******************************************************/
/* File: symtab.c */
/* Symbol table implementation for the C-MINUS compiler*/
/* (allows only one symbol table) */
/* Symbol table is implemented as a chained */
/*... |
mod preclude;
pub mod event;
pub mod futures;
pub mod spot;
|
import { Request, Response } from 'express'
import {UpdateUserAvatarService} from '../services/UpdateUserAvatarService'
import { instanceToInstance } from 'class-transformer'
class UserAvatarController {
async update (req: Request, res: Response) {
try {
const updateAvatar = new UpdateUserAvatarService()
con... |
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int n,m;
scanf("%d%d",&n,&m);
vector<int> minSalary(n);
for(int i=0;i<n;i++)
{
//printf("!1");
scanf("%d",&minSalary[i]);
}
vector < pair<int,int> > com;
int a,b;
... |
import type { QueryFunction } from "react-query";
import { authRequest } from "../utils/request";
import urls from "../utils/urls";
import type { ChallengeType } from "../types/Challenge";
import { requestUpload, getContentType, uploadImage } from "../utils/image";
export const fetchChallenges: QueryFunction<
Challe... |
<reponame>chsc/gogl2
// Copyright 2013 The GoGL2 Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE.mkd file.
package main
import (
"fmt"
"io"
"sort"
)
type Enum struct {
Name string
Value string
Group string
}
type Enums map[string... |
package model
type SignResponseInfo struct {
*ResponseInfo
Data SignResponseData `json:"data,omitempty"`
}
type SignResponseData struct {
Code string `json:"code,omitempty"`
}
|
import { QuickStart, QuickStartStatus, AllQuickStartStates } from './quick-start-types';
import { allQuickStarts } from '../data/quick-start-test-data';
export const getQuickStarts = (): QuickStart[] => allQuickStarts;
export const getQuickStartByName = (name: string): QuickStart =>
allQuickStarts.find((quickStart)... |
/* GPLv2 or OpenIB.org BSD (MIT) See COPYING file */
#ifndef UTIL_COMPILER_H
#define UTIL_COMPILER_H
/* Use to tag a variable that causes compiler warnings. Use as:
int uninitialized_var(sz)
This is only enabled for old compilers. gcc 6.x and beyond have excellent
static flow analysis. If code solicits a wa... |
package flags
import (
"bytes"
"fmt"
"os"
"runtime"
"testing"
"time"
)
type helpOptions struct {
Verbose []bool `short:"v" long:"verbose" description:"Show verbose debug information" ini-name:"verbose"`
Call func(string) `short:"c" description:"Call phone number" ini-name:"call"`
P... |
The effectiveness of 3D multiple object tracking training on decision-making in soccer
ABSTRACT Background Soccer requires athletes to make quick decisions in dynamic environments. Several off-court technology-based interventions have been developed to train these perceptual cognitive skills. However, the evidence for... |
package com.company.cards;
public enum Values {
TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING, ACE
}
|
def clear_moments(self):
self.hitcount_gpu.fill(0)
self.tmom1_gpu.fill(0.0)
self.tmom2_gpu.fill(0.0)
self.qmom1_gpu.fill(0.0)
self.qmom2_gpu.fill(0.0) |
// This example simulates the behaviors of retry strategies with respect to eventual consistency.
// The operation that is called that is eventually consistent is CreateGroup in the Identity service.
// After that, this example is making a number of GetInstance requests in the Compute service, which
// are guaranteed t... |
def worker_task(name, i):
ctx = zmq.Context()
worker = ctx.socket(zmq.REQ)
worker.identity = "Worker-%s-%s" % (name, i)
worker.connect("ipc://%s-localbe.ipc" % name)
worker.send("READY")
while True:
try:
msg = worker.recv_multipart()
except zmq.ZMQError:
r... |
The Düsseldorf judge who jailed the 76-year-old for two-and-half years on Thursday rejected the image of her as a sick old lady, saying she was robust, and should go to prison.
The woman confessed to having a regular run, collecting cannabis in the Dutch border town of Venlo, near North Rhine-Westphalia, and dropping ... |
def base_args(func):
parser = argparse.ArgumentParser()
try:
data_dir = os.environ['DATA_DIR']
except KeyError:
raise EnvironmentError('Create a `DATA_DIR` environment variable pointing to a directory in which the dataset lives (or in which to download the dataset via `--download-data`).')
... |
import java.util.ArrayDeque;
import java.util.Scanner;
public class MaximumElement {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
ArrayDeque <Integer> numbers = new ArrayDeque<>();
int n = Integer.parseInt(scan.nextLine());
for (int i =... |
Lewis Hamilton failed to end 2009 with the win that was expected of him after he dominated practice and qualifying for the inaugural Abu Dhabi Grand Prix.
Hamilton's year as world champion sadly came to a premature end after 20 laps around the stunning Yas Marina circuit due to an issue with a right rear brake.
Despi... |
import { JSONSchema } from './json-schema';
describe('JSONSchema', () => {
function test(schema: JSONSchema): void {
// eslint-disable-next-line no-empty
if (schema) {}
expect().nothing();
}
describe('classic', () => {
it('string', () => {
const schema: JSONSchema = {
type: 'str... |
/*
Copyright (c) 2010-2019, <NAME> - IntRoLab - Universite de Sherbrooke
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
... |
Autonomous Navigation for Quadrupedal Robots with Optimized Jumping through Constrained Obstacles
Quadrupeds are strong candidates for navigating challenging environments because of their agile and dynamic designs. This paper presents a methodology that extends the range of exploration for quadrupedal robots by creati... |
def deep_learning_preprocess(study_name, base_directory, skull_strip_label='T2SPACE', skip_modalities=[]):
study_files = nio.DataGrabber()
study_files.inputs.base_directory = base_directory
study_files.inputs.template = os.path.join(study_name, 'ANALYSIS', 'COREGISTRATION', study_name + '*', 'VISIT_*', '*.n... |
<reponame>xuchaoqian/tauri-examples
import * as React from "react";
import { window as tauriWindow } from "@tauri-apps/api";
import { invoke } from "@tauri-apps/api/tauri";
import Logo from "./logo.svg";
import Loading from "./loading.gif";
import styles from "./Splash.scss";
async function createMultiWindows(): Promi... |
/*
** before we can change a metadata block, we have to make sure it won't
** be written to disk while we are altering it. So, we must:
** clean it
** wait on it.
**
*/
void reiserfs_prepare_for_journal(struct super_block *p_s_sb,
struct buffer_head *bh, int wait) {
int retry_coun... |
Testimony in the Jammie Thomas-Rasset file-sharing re-retrial concluded today as Thomas-Rasset took the stand and told the jury that she considers herself a big supporter of the music industry (read our coverage of day one). "I was buying my music," she said. "I wasn't getting it for free off KaZaA."
But the jury in t... |
<filename>test/each/char_each.cpp
// Copyright 2017 <NAME>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by a... |
/**
* Retrieve tags that are used together with tag or key
*
* @param context Android Context
* @param server server url
* @param key the tag key
* @param value the tag value, if null combinations with the key will be returned
* @param filter filter for element type
* @param max... |
<gh_stars>0
{- |
Module : $Header$
Description : The propositional formula and the operations on it.
Copyright : (c) <NAME>
License : MIT
Maintainer : <NAME> <<EMAIL>>
Stability : experimental
Portability : portable
This is the main module which implements the propositional 'Formula' type
itself ... |
/**
* Setup up all the mocks.
*/
@Before
public void init() {
DatabaseReference mockReference = mock(DatabaseReference.class);
Task mockTask = mock(Task.class);
mockAccount = mock(Account.class);
when(mockReference.child(isA(String.class))).thenReturn(mockReference);
... |
/**
* Test selecting overlapping widgets
*/
public class SceneOverlapSelectionTest extends SceneTest {
@Override
@NotNull
public ModelBuilder createModel() {
ModelBuilder builder = model("constraint.xml",
component(CONSTRAINT_LAYOUT.defaultName())
... |
/**
* A utility class for computing MD5 checksums and returning the
* result in a hex string representation.
*/
public class MD5 {
/**
* Computes the MD5 sum of a string.
* @param str the input
* @return the hex representation of the MD5 sum
*/
public static String md5sum(String str) {
... |
/*
* 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 util;
import com.stripe.Stripe;
import com.stripe.exception.StripeException;
import com.stripe.model.Card;
import com.stripe.m... |
/*
* Copyright (C) 2011 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions a... |
The revolving door at Minnesota’s Capitol moves so quickly, it can be dizzying.
Longtime Rep. Jim Abeler pushed through this year. On Jan. 6 he ended his 16-year run representing Anoka in the Minnesota House. On Jan. 21, he registered to lobby his former colleagues.
“I never thought I would be a lobbyist,” said Abele... |
There's no shortage of chassis at this year's CeBIT trade show, but Thermaltake's celebrating its 10th anniversary with this revolutionary offering:
It's called "Level 10", and it's simply dazzling. Taking the compartmentalised approach to the next level, the unusual chassis houses the majority of components in their ... |
<filename>public/js/tinymce/modules/imagetools/src/demo/ts/ephox/imagetools/demo/Demo.ts<gh_stars>0
import { Arr } from '@ephox/katamari';
import * as ImageTransformations from 'ephox/imagetools/api/ImageTransformations';
import * as ResultConversions from 'ephox/imagetools/api/ResultConversions';
import { ImageResult... |
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <functional>
using namespace std;
template<typename Type> class RangeMin {
private:
int size_;
std::vector<Type> dat;
public:
RangeMin() : size_(0), dat(std::vector<Type>()) {};
RangeMin(int size__... |
import requests
import urllib
class Pythercis:
def __init__(self, baseurl, username, password):
self.baseurl = baseurl
# create new session
self.create_session(username, password)
self.default_headers = {
'Ehr-Session': self.session_id
}
def create_sess... |
<reponame>followanalytics/chaos-controller
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2021 Datadog, Inc.
package injector
import (
"fmt"
"os... |
/*
* Disable all events to prevent PMU interrupts and to allow
* events to be added or removed.
*/
void hw_perf_disable(void)
{
struct cpu_hw_events *cpuhw;
unsigned long flags;
local_irq_save(flags);
cpuhw = &__get_cpu_var(cpu_hw_events);
if (!cpuhw->disabled) {
cpuhw->disabled = 1;
if (!cpuhw->pmcs_enable... |
Behavioral neuroscience, also known as biological psychology,[1] biopsychology, or psychobiology,[2] is the application of the principles of biology to the study of physiological, genetic, and developmental mechanisms of behavior in humans and other animals.[3]
History [ edit ]
Behavioral neuroscience as a scientific... |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#include <stdlib.h>
#include "windows.h"
#include "macro_utils/macro_utils.h"
#include "c_logging/xlogging.h"
#include "c_pal/timer.h"
#include "c_pal/gballoc... |
<reponame>tavaresrodrigo/kopf<gh_stars>100-1000
import asyncio
import datetime
import logging
import freezegun
import pytest
from kopf._cogs.aiokits.aiotoggles import Toggle
from kopf._cogs.structs.ephemera import Memo
from kopf._core.actions.execution import PermanentError, TemporaryError
from kopf._core.actions.lif... |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module QuickCheckInstances where
import Chesskel.Board hiding (whiteKing, blackKing)
import Chesskel.Gameplay
import Chesskel.Movement
import Control.Applicative
import Test.QuickCheck
instance Arbitrary File where
arbitrary = arbitraryBoundedEnum
instance Arbitrary Rank whe... |
import tensorflow as tf
import numpy as np
from collections import OrderedDict
##################################################################################
# Layer
##################################################################################
# pad = ceil[ (kernel - stride) / 2 ]
def get_weight(weight_shap... |
<gh_stars>0
package com.fengjianghui.personal.baseanimation;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.app.Activity;
import android.media.Image;
import android.os.Bundle;
import android.view.View;
import android.widget.I... |
Not even Iron Man can solve every problem.
The superhero’s alter ego, Robert Downey Jr., found that out first-hand this week, when he encountered 1½-year-old super-fan Jaxson Denno – who just couldn’t wait to meet Iron Man.
Only problem: Downey, in the Western Massachusetts towns of Sunderland and Shelburne Falls to ... |
/**
* Executes asynchronous task using a {@link ThreadPoolExecutor} or {@link SerialExecutor}.
* <p/>
* See also {@link Executors} for a list of factory methods to create common
* {@link java.util.concurrent.ExecutorService}s for different scenarios.
*
* @author mc
*/
public class UseCaseAsyncRequestScheduler im... |
def raw_spatial_filtering(self):
mne.set_eeg_reference(self.raw, ref_channels=self.input_info['spatial_filtering'], copy=False) |
#pragma once
#include <deque>
#include <string>
#include <vector>
#include "CX_Clock.h"
namespace CX {
/*! This class manages a joystick that is attached to the system (if any). If more than one joystick is needed
for the experiment, you can create more instances of CX_Joystick other than the one in CX::Instances... |
Getty Bernie Sanders raised $1 million-plus on Friday
Hillary Clinton's campaign is furious that Bernie Sanders' team is raising money off its war with the DNC — since the whole saga started with a Sanders staffer taking Clinton data. But that hasn't stopped the Vermont senator's operation.
Sanders raised more than a... |
Development of New Corrosion Test Equipment Simulating Sulfuric Acid Decomposition Gas Environment in a Thermochemical Hydrogen Production Process
New corrosion test equipment for high temperature gas of decomposed sulfuric acid was manufactured in order to ascertain flow rate of sulfuric acid in the piping, occurrenc... |
def default(self, o):
if isinstance(o, (Sample, SampleView)):
return _handle_bytes(o.to_mongo_dict(include_id=True))
if issubclass(type(o), ViewStage):
return o._serialize()
if isinstance(o, ObjectId):
return str(o)
if isinstance(o, float):
... |
// stopLeadingOrFollowing stops the partition as a leader or follower, if
// applicable. Must be called within the scope of the partition mutex.
func (p *partition) stopLeadingOrFollowing() error {
if p.isFollowing {
if err := p.stopFollowing(); err != nil {
return err
}
} else if p.isLeading {
if err := p.s... |
//
// Lol Engine
//
// Copyright © 2010—2018 <NAME> <<EMAIL>>
//
// Lol Engine is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it
// and/or modify it under the terms of the Do What the Fuck You Want
// to Public License, Version 2, as published b... |
<reponame>ocharles/ghc
{-# LANGUAGE TypeFamilies #-}
module GivenCheckTop where
type family S x
type instance S [e] = e
f :: a -> S a
f = undefined
g :: S [a] ~ Char => a -> Char
g y = y
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: <NAME> <<EMAIL>>
# This file is part of the washYourHands project.
#
import time
from adafruit_circuitplayground import cp
BLUE = (0, 0, 255)
RED = (90, 0, 0)
GREEN = (0, 90, 0)
CLEAR = (0, 0, 0)
while True:
if not cp.switch:
cp.pixels.fill(CLEAR)... |
import BigNumber from "bignumber.js";
import { waitForConfirmation } from "./hedera-stable-coin/state";
const hederaPlatformAddress = process.env.VUE_APP_HSC_PLATFORM;
export async function register(
displayName: string,
network: string,
address: string
): Promise<void> {
const url = `${hederaPlatform... |
<filename>demo/chaincode/golang/chaincode.go
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package golang
import (
"encoding/json"
"fmt"
"github.com/hyperledger-labs/fabric-private-chaincode/utils"
"github.com/hyperledger/fabric/core/chaincode/shim"
pb "github.com/hyperledg... |
def add(self, ctype, name=None):
if isinstance(ctype, ModuleExplorer):
ctype = ctype.name
if isinstance(ctype, str):
if ctype is None:
raise Exception("Component type must not be None")
if name is None:
name = ctype.split("::")[-1]
... |
<gh_stars>1-10
/**
* Copyright 2021 BrutalWizard (https://github.com/bru74lw1z4rd). All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution
**/
... |
/**
* This class represents a listing of who has lock, what type of lock he has,
* the timeout type and the time remaining on the timeout, and the associated
* lock token. The server is free to withhold any or all of this information
* if the requesting principal does not have sufficient access rights to see
... |
The Nerve Growth Factor Receptor CD271 Is Crucial to Maintain Tumorigenicity and Stem-Like Properties of Melanoma Cells
Background Large-scale genomic analyses of patient cohorts have revealed extensive heterogeneity between individual tumors, contributing to treatment failure and drug resistance. In malignant melanom... |
def calculate_population_fitness(self):
for individual in self.current_generation:
individual.set_fitness(self.fitness_function(individual.genes,
self.meta_data)
) |
/**
* The {@link Pac4jWebflowConfigurer} is responsible for
* adjusting the CAS webflow context for pac4j integration.
*
* @author Misagh Moayyed
* @since 4.2
*/
@Component("pac4jWebflowConfigurer")
public class Pac4jWebflowConfigurer extends AbstractCasWebflowConfigurer {
private static final String CLIENT_... |
#include <cmath>
#include <Graphics/DrawUtils.hpp>
#include <Transform/Rect.hpp>
#include <Utils/MathUtils.hpp>
namespace obe::Transform
{
UnitVector rotatePointAroundCenter(
const UnitVector& center, const UnitVector& Around, double angle)
{
const double cY = std::cos(angle);
const do... |
s=list(input())
q=int(input())
start=[]
owari=[]
r=1
for i in range(q):
data=input().split()
if(len(data)==1):
r*=-1
elif(data[1]=="1"):
if(r==1):
start.append(data[2])
else:
owari.append(data[2])
else:
if(r==1):
owari.append(data[2])
... |
<filename>src/utils/parenthesesToFunction.ts
export function parenthesesToFunction(str: string) {
return str.includes('()') ? str.replace('()', 'Function') : str;
}
|
<filename>ruoyi-exam/src/main/java/com/ruoyi/exam/domain/Paper.java
package com.ruoyi.exam.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
/**
* 试卷表 exam_paper
*
* @author... |
<gh_stars>1-10
//! # Queues
//!
//! `queues` provides a number of efficient FIFO Queue data structures for
//! usage in your libraries. These are all implemented on top of rust's `Vector`
//! type.
//!
//! A queue is a linear data structure that commonly defines three methods:
//!
//! 1. `add`: Also called `queue` or `... |
/**
* Map an object to a {@link Document}.
*
* @param source the object to map
* @return will not be {@literal null}.
*/
default Document mapObject(@Nullable Object source) {
Document target = Document.create();
if (source != null) {
write(source, target);
}
return target;
} |
<filename>src/analyzer/markdown-reporter.test.ts<gh_stars>100-1000
import { Extractor } from './extractor';
import { MarkdownReporter } from './markdown-reporter';
import { createTestingLanguageServiceAndHost } from '../ts-ast-util/testing/testing-language-service';
import { createScriptSourceHelper } from '../ts-ast-u... |
Directions and desiderata for AI alignment
Paul Christiano Blocked Unblock Follow Following Feb 6, 2017
In the first half of this post, I’ll discuss three research directions that I think are especially promising and relevant to AI alignment:
Reliability and robustness. Building ML systems which behave acceptably in... |
<filename>BEXCodeCompare/src/main/java/info/codesaway/bex/IntBEXPair.java
package info.codesaway.bex;
import java.util.Objects;
/**
* Immutable pair of left / right int values
*/
public final class IntBEXPair implements IntPair {
private final int left;
private final int right;
public static final In... |
/**
* Function to pivot emotional values around the threshold.
* The pivoting equation is p' = ((c-p)/(c-a))*(b-c) + c for a center value 'c', a lower bound 'a' and
* an upper bound 'b'.
*
* @param inputValue The input emotional value.
*
* @return The pivoted value.
*/
private fl... |
#include <bits/stdc++.h>
using namespace std;
int lcs(string s1, string s2){
vector<vector<int>> vec(s1.length()+1,vector<int>(s2.length()+1));
for(int i=0;i<=s1.length();i++) vec[i][0] = 0;
for(int j=0;j<=s2.length();j++) vec[0][1] = 0;
for(int i=1;i<=s1.length();i++)
for(int j=1;j<=... |
package it.smallcode.smallpets.v1_15;
/*
Class created by SmallCode
24.10.2020 13:27
*/
import it.smallcode.smallpets.core.SmallPetsCommons;
import it.smallcode.smallpets.core.utils.INBTTagEditor;
import org.bukkit.NamespacedKey;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
impor... |
package cn.xiayiye5.xiayiye5library.utils;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
/**
* @author : xiayiye5
* @date : 2021/6/1 17:17
* 类描述 : 次方法需要在application中初始化
*/
public class ANRWatchDog extends Thread {
public static final int MESSAGE_WATCHDOG_TIME_TICK = 0;
/*... |
A Study on the Synergistic Relationship between Lexical Structure and Word Frequency, Polysemy and Synonym in Modem Chinese
In this study, the concept of structural complexity was introduced to classify the level of Chinese vocabulary structure. Based on Lancaster Corpus of Mandarin Chinese, the econometric method was... |
def full_contact_request(email):
if (constants.FULLCONTACT_KEY is None):
logger.fatal("constants.FULLCONTACT_KEY is not set.")
return
logger.info('Looking up %s', email)
fc = FullContact(constants.FULLCONTACT_KEY)
r = fc.person(email=email)
MIN_RETRY_SECS = 10
MAX_RETRY_SECS = 60... |
// See LICENSE for license details.
//**************************************************************************
// Quicksort benchmark
//--------------------------------------------------------------------------
//
// This benchmark uses quicksort to sort an array of integers. The
// implementation is largely adapted... |
<reponame>Katsutoshii/kataru<filename>tests/packer.rs
use kataru::{pack, FromMessagePack, Story};
use std::fs;
#[test]
fn test_pack() {
pack("./examples/simple/kataru", "./target").unwrap();
let _story = Story::from_mp(&fs::read("./target/story").unwrap()).unwrap();
}
|
Jzponents : short-term and long-term , Control pro ' cess ~ s such as " rehearsal " are essential to the transfer ' of iliformation from the short-term store to the long-term one ! I
b ~, T he notion that the system y World Series may be in your memory, the grO\\.th of interest in the two-pr0C5which information is sto... |
/**
* 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.