content stringlengths 10 4.9M |
|---|
<reponame>CarlosPena00/Mobbi<gh_stars>0
import smbus
import time
class MPU:
""" Class that get the Gyro, Acell and temperature from a MPU6050
this module is based on:
1) https://www.filipeflop.com/blog/tutorial-acelerometro-mpu6050-arduino/
2) https://www.sunfounder.com/learn/sensor-kit-v2-0-for-raspb... |
<gh_stars>10-100
package org.minbox.framework.message.pipe.server.lb;
import org.minbox.framework.message.pipe.core.information.ClientInformation;
import org.minbox.framework.message.pipe.core.exception.MessagePipeException;
import java.util.List;
/**
* Get client list load balancing interface definition
*
* @aut... |
// Copyright 2021 The IREE Authors
//
// Licensed under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#ifndef IREE_CODEGEN_SANDBOX_PASSES_H_
#define IREE_CODEGEN_SANDBOX_PASSES_H_
#include "mlir/Dia... |
#!/usr/bin/python
# -*- coding: iso-8859-15 -*-
import sys
import os
from shutil import copyfile
def copy():
src = './README.md'
dst= './docs/index.md'
copyfile(src, dst)
if __name__ == '__main__':
copy()
|
use std::collections::BTreeSet;
use anyhow::{anyhow, Result};
use chrono::{DateTime, Utc};
use tantivy::{
collector::{Count, TopDocs},
query::{AllQuery, BooleanQuery, Occur, Query, QueryParser, TermQuery},
schema::Field,
DocAddress, Document, Index, IndexWriter, Term,
};
use crate::posts::Post;
use ... |
Ultra-low power MOSFET and tunneling FET technologies using III-V and Ge
CMOS and tunneling FETs (TFETs) utilizing low effective mass III-V/Ge channels on Si substrates is expected to be one of the promising device options for low power integrated systems, because of the enhanced carrier transport and tunneling proper... |
/***
* Load from the crypto package all the classes contained in crypto.algos.
* @param cryptoParentPath
* @return
* @throws IOException
* @throws ClassNotFoundException
*/
private static List<Class<?>> loadAlgosClass(String cryptoParentPath)
throws IOException, ClassNotFoundE... |
// Sorted returns a copy of the SeriesList sorted by the function
func (l *SeriesList) Sorted(sorter func(a, b *models.Series) bool) *SeriesList {
sorted := make(SeriesList, len(*l))
copy(sorted, *l)
sort.Slice(sorted, func(i, j int) bool {
return sorter(sorted[i], sorted[j])
})
return &sorted
} |
/// Draw a quadratic bezier curve from the current point to the point located `(dx, dy)` away,
/// with control point located `(dx1, dy1)` away from the current point.
/// The endpoint of this curve becomes the new current point.
pub fn quadratic_bezier_by(mut self, dx1: f32, dy1: f32, dx: f32, dy: f32) -> Path {
... |
Impact of the Siewert Classification on the Outcome of Patients Treated by Preoperative Chemoradiotherapy for a Nonmetastatic Adenocarcinoma of the Oesophagogastric Junction
The aim of the study is to analyze the impact of the Siewert classification on the pathological complete response (pcR), pattern of failure, and ... |
1. At times like these, it’s worth taking a few breaths and looking at the big picture. First of all, Canadian basketball has never been in better shape. They went 7-2 this summer (all games) and absolutely dominated at FIBA America’s last summer. And while they didn’t have their full compliment of Canadian NBA players... |
ERS-1 AND CCRS C-SAR Data Integration For Look Direction Bias Correction Using Wavelet Transform
Look direction bias in a single look SAR image can often be misinterpreted in the geological application of radar data. This paper investigates digital processing techniques for SAR image data integration and compensation ... |
// NewS3PublicDownloader creates an instance of S3Downloader to a public AWS
// S3.
func NewS3PublicDownloader(region, bucket, key string) Downloader {
return S3Downloader{
session: session.Must(session.NewSession(&aws.Config{Region: aws.String(region)})),
bucket: bucket,
key: key,
}
} |
<filename>samples/TestCpp/Classes/IntervalTest/IntervalTest.cpp
#include "IntervalTest.h"
#include "../testResource.h"
#define SID_STEP1 100
#define SID_STEP2 101
#define SID_STEP3 102
#define IDC_PAUSE 200
IntervalLayer::IntervalLayer()
{
m_time0 = m_time1 = m_time2 = m_time3 = m_time4 = 0.0f;
... |
Phytochemical Investigation and In Vitro Antioxidant Activities of Tetracarpidium conophorum (African Walnut) Seeds
Background: Tetracarpidium conophorum (African walnut) is an African plant with ethnobotanical uses. Objectives: The purpose of this study was to evaluate the phytochemical screening and in vitro antioxi... |
def add_compounds(self,new_compounds):
self.compounds += new_compounds.keys()
self.compounds = sorted(list(set(self.compounds)),key=lambda x:x.id)
for new_cmp in new_compounds.keys():
self.compounds_by_id[new_cmp.id] = new_cmp
self.compounds_by_clean_id[remove_non_alp... |
#include "Cable.h"
Cable::Cable(QGraphicsScene * scene)
{
m_scene = scene;
m_scale = 1.0;
}
Cable::~Cable()
{
}
void Cable::connecter(Composant *pere, Composant *fils)
{
m_scale = pere->scale();
fils->centrerV(pere);
float x1, y1, x2, y2;
x1 = pere->x() + pere->longueur()/2.0;
y1 = pere... |
def _sample_cts_dscr_hps_for_rand_exp_sampling(self):
if not self.options.use_additive_gp:
return super(EuclideanGPFitter, self)._sample_cts_dscr_hps_for_rand_exp_sampling()
else:
return sample_cts_dscr_hps_for_rand_exp_sampling_in_add_model( \
self.hp_tune_max_evals, self.cts_hp_bounds, sel... |
The very status of such parties as insurgents and rebels reflects their dilemma: By positioning themselves as outsiders, they exclude themselves from the mainstream, which they anyhow revile or mock as emblems of a corrupt and elite establishment that has failed the people.
That, in turn, deepens their vulnerability t... |
Antitumor activity and antioxidant property of Curcuma caesia against Ehrlich’s ascites carcinoma bearing mice
Abstract Context: Curcuma caesia Roxb. (Zingiberaceae), commonly known as “Kala Haldi” in Bengali, has been traditionally used for the treatment of cancer, bruises, inflammation and as an aphrodisiac. Objecti... |
import { CellLocation, ImmutableGrid } from "./game-shared-types";
export const shouldLive = (
currentGrid: ImmutableGrid,
rowIdx: number,
colIdx: number
) => {
const targetCellLiving = currentGrid[rowIdx][colIdx];
const liveNeighborCount = getLiveNeighborCount(currentGrid, {
row: rowIdx,
column: col... |
TOM-based blind identification of cubic nonlinear systems
In this paper, we extend our previous studies on blind cubic nonlinear system identification from the second-order moment (SOM) domain into the third-order moment (TOM) domain. It is shown that under the given sufficient conditions, more subsets of truncated sp... |
//function use to enter in the ring network or to create it.
func startConnection() {
for !rightSet {
fmt.Print("Enter ip adress:port (enter for localhost): ")
reader := bufio.NewReader(os.Stdin)
text, _ := reader.ReadString('\n')
text = strings.TrimSuffix(text, "\n")
text = strings.TrimSuffix(text, "\r")
... |
/**
*
*/
package org.perm.testgenerator;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;
/**
*
* Part of Project PermTester
* @author <NAME>
*
*/
public class ConnectionOptions {
private static ConnectionOpt... |
<gh_stars>0
import React from 'react';
import component from '@ohoareau/react-component';
import {useQuery} from '@apollo/react-hooks';
import ImageContent from './ImageContent';
import AttachFileIcon from '@material-ui/icons/AttachFile';
import CircularProgress from '@material-ui/core/CircularProgress';
import {getGra... |
<reponame>elenita1221/aerosolve<filename>core/src/main/java/com/airbnb/aerosolve/core/images/HOGFeature.java
package com.airbnb.aerosolve.core.images;
import java.awt.image.BufferedImage;
import java.lang.Override;
import java.lang.Math;
/*
Creates a histogram of oriented gradients.
http://en.wikipedia.org/wiki/His... |
Flecktarn ( German pronunciation: [ˈflɛktaʁn]; "mottled camouflage"; also known as Flecktarnmuster or Fleckentarn) is a family of 3-, 4-, 5- or 6-color disruptive camouflage patterns, the most common being the five-color pattern, consisting of dark green, light green, black, red brown and green brown or tan depending o... |
<reponame>anonx/kit
// Package main is used as an entry point of
// the framework. It validates user input parameters
// and runs subcommands (aka tools).
package main
import (
"flag"
"os"
"github.com/goaltools/goal/internal/log"
"github.com/goaltools/goal/tools/create"
"github.com/goaltools/goal/tools/generate/... |
<reponame>sudarshanGopal98/dress_check<filename>app/src/main/java/sudarshan_gopalakrishnan/fbla/tompkins/dresscheck/datatypes/Parsable.java
package sudarshan_gopalakrishnan.fbla.tompkins.dresscheck.datatypes;
/**
*
* The interface Parsable enables processes to call sendToParse(). This method is crucial in the da... |
import { Router } from 'express';
// Routes
import repoRoute from './repo.route';
interface Route {
path: string;
route: Router;
middlewares?: { (): void }[];
}
const router = Router();
const setRoutes = (routes: Route[]) => {
routes.forEach((route) => {
if (Array.isArray(route.middlewares) && route.mid... |
/*
* 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 ... |
/**
* Decode an LBER encoded value into an ASN1Type from a byte array.
*/
public ASN1Object decode(byte[] value)
{
ASN1Object asn1 = null;
ByteArrayInputStream in = new ByteArrayInputStream(value);
try {
asn1 = decode(in);
}
catch(IOException ioe) {
}
return... |
In a blog post this morning by Kevin Rose, it appears as though Digg has cut roughly 10% of their staff. Layoffs have been made to around 12 employees, and it was difficult on the entire staff to part with many members.
Digg has done nothing but grow over the past few months, so it’s surprising to see a reduction in t... |
<filename>katas/lcd/py/kata/__init__.py
# Implement functions here
def template(arg):
result = f"Doing something with {arg}"
return result
DIGITS = [
[ # 0
[0, 1, 0], # 2
[1, 0, 1], # 5
[1, 1, 1], # 7
],
[ # 1
[0, 0, 0], # 0
[0, 0, 1], # 1
[0,... |
/**
* The dual of {@link StreamMultiplexer}: This is an output stream into which
* you can dump the multiplexed stream, and it delegates the de-multiplexed
* content back into separate channels (instances of {@link OutputStream}).
*
* The format of the tagged output stream is as follows:
*
* <pre>
* combined ::... |
package com.rg.annotationdemo;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.example.annotation.ViewInject;
//@PrintInject(value = {1, 2})
public class MainActivity extends AppCompatActivit... |
import { assign } from "@xstate/fsm";
import { assertNever } from "../../utils";
import { ChangeType, EventType, MachineContext, MachineEvent } from "../types";
import { setFieldValue } from "./setFieldValue";
import { replace } from "./list/replace";
import { remove } from "./list/remove";
import { prepend } from "./l... |
<filename>config/test_quiet_include.h<gh_stars>0
/*
* For the raison d'etre of this file, check the comment above the definition
* of the PGAC_C_INLINE macro in config/c-compiler.m4.
*/
static inline int fun () { return 0; }
/*
* "IBM XL C/C++ for AIX, V12.1" miscompiles, for 32-bit, some inline
* expansions of g... |
Phylogeny and Conservation edited by Andy Purvis, John L. Gittleman & Thomas Brooks (2005), xiii + 431 pp., Cambridge University Press, Cambridge, UK. ISBN 0-521-53200-0 (pbk), GBP 35.00.
When new scientific fields emerge a great deal of controversy often surrounds what they do and what they should consist of. One suc... |
def run(self, lib, opts, args):
if opts.library:
data_collector = library_data
else:
data_collector = tag_data
included_keys = []
for keys in opts.included_keys:
included_keys.extend(keys.split(','))
key_filter = make_key_filter(included_keys)
... |
/**
* Constructing this joint hierarchy from bytes.<br>
* <br>
* Format:<br>
* First Sector [MetaData]:<br>
* JointCount (int) | Joint0NameSize (int) | Joint1NameSize (int) | ...<br>
* <br>
* Second Sector [JointData]:<br>
* Joint0Index (int) | Joint0ParentIndex (int) | Joint0Nam... |
/**
* Test set class to instantiate.
*/
public void testSetClassToInstantiate(){
StudySiteSubClass studySiteSubClass= new StudySiteSubClass();
studySiteSubClass.setId(2);
ParameterizedBiDirectionalInstantiateFactory<DomainAbstractSubClass> parameterizedInstantiateFactory= new ParameterizedBiDirectionalInsta... |
#include <iostream>
#include <vector>
using namespace std;
const int MAXN = 111;
enum Ttype {IN, OUT};
struct edge
{
int cost;
bool type;
int dist;
edge(int qc, bool qt, int qd): cost(qc), type(qt), dist(qd) {}
};
vector <edge> v[MAXN];
int go(int start, edge first)
{
int prev = start;
int curcost = 0, cur =... |
Effects of Dietary Protein of Proso Millet on Liver Injury Induced by D-galactosamine in Rats
In this paper, we examined the effects of dietary protein from proso millet on liver injury induced by D-galactosamine or carbon tetrachloride in rats using serum enzyme activities as indices. D-galactosamine- induced elevati... |
package dashboardapi
import (
"context"
"github.com/rancher/rancher/pkg/controllers/dashboard/helm"
"github.com/rancher/rancher/pkg/controllers/dashboardapi/feature"
"github.com/rancher/rancher/pkg/controllers/dashboardapi/settings"
"github.com/rancher/rancher/pkg/wrangler"
)
func Register(ctx context.Context, ... |
A very meaty issue of the British magazine STIR looks at a wide variety of projects based on Solidarity Economics. Produced in collaboration with the Institute for Solidarity Economics at Oxford, England, the Winter 2017 issue explores everything from municipal energy in London to cooperatively owned digital platforms,... |
/* This method returns the numerical index of a given observation
*
* @param type String representing the observation type.
*/
int Rinex3ObsHeader::getObsIndex( std::string type ) const
throw(InvalidRequest)
{
if( type.size() == 2 )
{
if( type == "C1" ) type = "C1C";
... |
/**
* Testing isSecureServer flag is working correctly.
* 1. setting the flag to FALSE, and provide necessary info to create Secure server.
* result = normal server
* 2. setting the flag to TRUE, and provide necessary info to create Secure server.
* result = secure server
* ... |
#pragma once
#include "GameObject.h"
class Box : public GameObject
{
public:
Box() {}
~Box() {}
}; |
“You are wasting your life”
I heard this a lot when I first decided to leave my job to become a nun.
I worked in the IT department of an up-and-coming company and I had just received a promotion and a huge raise.
I was pretty, I was young, I was gifted. My future was bright.
Two of my coworkers took me aside and to... |
def from_packets(cls, source: PacketSource) -> 'StreamDigest':
packet_digests = []
def append_to_digest(p: Packet):
if isinstance(p, LidarPacket):
packet_digests.append(ScanDigest.from_packet(p))
packets = Packets(side_effect(append_to_digest, source),
... |
<filename>sdk/go/azure/network/getPublicIPs.go
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package network
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Use this data source to ... |
package org.sagebionetworks.bridge.models.files;
import static org.sagebionetworks.bridge.TestConstants.GUID;
import static org.sagebionetworks.bridge.TestConstants.TEST_APP_ID;
import static org.sagebionetworks.bridge.TestConstants.TIMESTAMP;
import static org.sagebionetworks.bridge.models.files.FileDispositionType.I... |
#include "../_ft_internal.h"
//TODO: SO_BINDTODEVICE
static void _ft_listener_on_io(struct ev_loop *loop, struct ev_io *watcher, int revents);
const char * ft_listener_class = "ft_listener";
///
bool ft_listener_init(struct ft_listener * this, const struct ft_listener_delegate * delegate, struct ft_context * conte... |
use clippy_utils::diagnostics::span_lint_and_note;
use clippy_utils::is_lint_allowed;
use clippy_utils::macros::root_macro_call_first_node;
use rustc_ast::LitKind;
use rustc_hir::Expr;
use rustc_hir::ExprKind;
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_tool_lint, impl_lint_pass};
use rustc... |
A class action lawsuit has been filed against the City of Prince George, seeking damages on behalf of those who suffer from a degenerative dental disease allegedly caused by drinking the city's fluoridated water.
A notice of civil claim was filed Tuesday by Kevin Millership, a Slocan resident who brought a lawsuit aga... |
/**
* This class has been automatically generated using <a
* href="https://github.com/kirill-grouchnikov/radiance">Photon SVG transcoder</a>.
*/
public class edit_delete implements ResizableIcon {
@SuppressWarnings("unused")
private void innerPaint(Graphics2D g) {
Shape shape = null;
Paint paint... |
package org.gridkit.lab.gridant;
public class GridAntProps {
public static final String REMOTE_ANT_BASE_DIR = "org.grikit.lab.gridant.ANT_BASE_DIR";
public static final String SLAVE_HOSTNAME = "slave.hostname";
public static final String SLAVE_ID = "slave.id";
}
|
#include<stdio.h>
int n,a[100050],b[150];
int main(){
while(scanf("%d",&n)!=EOF){
for(int i=0;i<n;i++){
scanf("%d",&a[i]);
}
for(int i=0;i<150;i++){
b[i]=0;
}
int flag=0;
for(int i=0;i<n;i++){
if(a[i]==25){
b[25]++;
}else if(a[i]==50){
b[50]++;
if(b[25]>0){
b[25]--;
}else... |
import React, { Component, forwardRef } from 'react';
import { default as styled } from 'styled-components';
import classnames from 'classnames';
import { HtmlDiv, HtmlDivWithRef } from '../../../reset';
import { Icon } from '../../../core/Icon/Icon';
import {
BaseAlertProps,
alertClassNames,
baseClassName,
} fro... |
<gh_stars>1000+
/**
* Copyright (c) Areslabs.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import * as path from 'path'
import * as webpack from 'webpack'
import {geneReactCode} from '../util/uast'
import jsxTran from '../tran/... |
use warp::crypto::rand::{self, prelude::*};
use warp::multipass::identity::{Identifier, Identity};
use warp::multipass::{Friends, MultiPass};
use warp::pocket_dimension::PocketDimension;
use warp::sync::{Arc, Mutex};
use warp::tesseract::Tesseract;
use warp_mp_solana::solana::anchor_client::anchor_lang::prelude::Pubkey... |
<gh_stars>0
package webp
/*
#cgo CFLAGS: -I./internal/libwebp-1.1/
#cgo CFLAGS: -I./internal/libwebp-1.1/src/
#cgo CFLAGS: -Wno-pointer-sign -DWEBP_USE_THREAD
#cgo !windows LDFLAGS: -lm
#include <webp/encode.h>
#include <webp/mux.h>
*/
import "C"
import (
"errors"
"unsafe"
)
type WebPMuxError int
const (
WebpMux... |
const schema = {
required: ['thirdQuestion'],
title: 'My new form title',
properties: {
firstQuestion: {
type: 'string',
title: 'Simple Input',
name: 'firstQuestion',
},
secondQuestion: {
type: 'string',
name: 'secondQuestion',
title: 'Input with custom validation a... |
package javaCore.java8;
import java.util.Optional;
/**
* @Author zsx
* @Date 2021/2/22
*/
public class OptionalTest {
public static void main(String[] args) {
Optional<Object> optional = Optional.empty();
System.out.println(optional.isPresent());
}
}
|
def ReceiveSequenceNumber(self):
return self._get_attribute(self._SDM_ATT_MAP['ReceiveSequenceNumber']) |
Regressing 3D Face Shapes from Arbitrary Image Sets with Disentanglement in Shape Space
Existing methods for reconstructing 3D faces from multiple unconstrained images mainly focus on generating a canonical identity shape. This paper instead aims to optimize both the identity shape and the deformed shapes unique to in... |
package resp
import (
"fmt"
"net/url"
"testing"
"github.com/stretchr/testify/require"
"github.com/xy-planning-network/trails/http/ctx"
"github.com/xy-planning-network/trails/http/session"
"github.com/xy-planning-network/trails/http/template/templatetest"
"github.com/xy-planning-network/trails/logger"
)
func ... |
Gender and reported health problems in treated alcohol dependent Alaska natives.
OBJECTIVE
An ongoing study of phenotypes of alcohol dependence among Alaska Natives provides the opportunity to investigate gender differences in reported health-related problems among alcohol dependent clients in three residential progra... |
def min_max_temp(cities_data):
temps = []
for r in cities_data:
temps.append(float(r['temperature']))
return [min(temps), max(temps)] |
// DecryptFailMsg Print app and author info.
func PrintAppInformation() {
fmt.Print("\033[32m***********************************************************\033[0m\n")
fmt.Print("\033[32m* Doki Doki Literature Club Plus Asset Decrypter *\033[0m\n")
fmt.Print("\033[32m* Author: AimerNeige ... |
def encode(self, x):
stats = self.enc(x).squeeze()
mu, logvar = stats[:, : self.z_dim], stats[:, self.z_dim :]
return mu, logvar |
def jwt_manager(app, api=None):
app.config['JWT_TOKEN_LOCATION'] = ['headers', 'cookies']
app.config['JWT_COOKIE_SECURE'] = False
app.config['JWT_COOKIE_CSRF_PROTECT'] = False
app.config['JWT_ACCESS_TOKEN_EXPIRES'] = datetime.timedelta(hours=12)
app.config['JWT_SECRET_KEY'] = os.environ.get(
... |
Unusually strong El Niño, coupled with record-high temperatures, has had a catastrophic effect on crops and rainfall across southern and eastern Africa
More than 36 million people face hunger across southern and eastern Africa, the United Nations has warned, as swaths of the continent grapple with the worst drought in... |
import { StyleSheet } from 'react-native';
export default StyleSheet.create({
container: {
color: '#fff',
},
gardient: {
flex: 1,
flexDirection: 'column',
justifyContent: 'space-between',
alignItems: 'stretch',
},
touchableIcon: {
paddingLeft: 20,
... |
Marshall came back to Magic after discovering Limited and never looked back. He hosts the Limited Resources podcast and does Grand Prix and Pro Tour video commentary.
In the aftermath of the greatest Grand Prix weekend in the history, I decided to stay in Las Vegas for a couple of weeks. So far, I haven't regretted th... |
a = input()
a2 = a
a = a.split("/")
a = ''.join(a)
if not a:
print("/")
else:
a2 = a2.split("/")
a1 = []
for i in range(0, len(a2)):
if a2[i]!="/" and a2[i]!="":
a1.append("/")
a1.append(a2[i])
a1 = ''.join(a1)
print(a1) |
/**
* Trim a string and return either <code>some</code> or <code>none</code> if it's empty. The string may be null.
*/
public static Option<String> trimToNone(String a) {
if (a != null) {
final String trimmed = a.trim();
return trimmed.length() > 0 ? some(trimmed) : NONE;
} else {
return... |
<filename>chapter_02/example-2_3.py
#-*-coding:utf-8-*-
# date:2020-03-28
# Author: <NAME>
# function: read video
import cv2
if __name__ == "__main__":
#读取 mp4 格式视频
video_capture = cv2.VideoCapture('./video/a.mp4')
while True:
ret, img = video_capture.read()# 获取视频每一帧图像
if ret == ... |
<reponame>292916808/MolCloze
# !/usr/bin/env python
# -*- coding: utf-8 -*-
# author: chinshin
# datetime: 2020/4/20 15:37
import torch.nn as nn
from .token import TokenEmbedding
from .segment import SegmentEmbedding
class MolBertEmbedding(nn.Module):
def __init__(self, vocab_size, embed_size, dropout... |
S = list(map(str,input().split()))
from decimal import Decimal
A = Decimal(S[0])
B = Decimal(S[1])
C = A * B
print(int(C)) |
/*
* Return whether the directory entry is a man page section.
*/
static int
select_sections(const struct dirent *entry)
{
const char *p = &entry->d_name[3];
if (strncmp(entry->d_name, "man", 3) != 0)
return (0);
while (*p != '\0') {
if (!isalnum(*p++))
return (0);
}
return (1);
} |
#include<bits/stdc++.h>
using namespace std;
const int MAXN = 2e5+10;
#define ll long long int
int row[MAXN];
int vis[MAXN];
ll ans=0;
void dfs(int u,int step,int p){
if(vis[u]||!row[u]){
if(p==u){
ans+=step+1;
}
else{
ans+=step;
}
retur... |
Watch Green Lantern's 4 Minutes Of Wonder Con Footage By Josh Tyler Random Article Blend Green Lantern at Wonder Con and, if you’ve been paying attention to this site, then you know the
You can now watch all four minutes of Green Lantern’s Wonder Con footage right here, embedded below or in HD on
If you saw the movie... |
/**
* Creates an {@link AutoScaler} with an add-on subsystem.
*
* @return
*/
private AutoScaler createAutoscalerWithAddon() {
Map<String, String> addons = Maps.of("fakeAddon", FakeAddon.class.getName());
AutoScalerFactory factory = AutoScalerFactory.launch(new AutoScalerFactoryConfig... |
<gh_stars>1-10
class Solution {
public:
int findpivot(vector<int>& nums,int l,int r) {
if(l>r){
return nums[0];
}
if(l==r){
return nums[l];
}
int mid=(l+r)/2;
if(mid < r && nums[mid]>nums[mid+1]){
return nums[mid+1];
... |
import os
import json
import socket
import shutil
from .app import *
def convert_hostnames(file_path):
with open(file_path, 'r+') as json_file:
data = json.loads(json_file.read())
data_accounts = data['accounts']
length, loop, timeout = 0, 0, 0
for name, value in data... |
<gh_stars>0
import { Injectable } from '@nestjs/common';
import { ConfigService } from 'src/config/config.service';
import { CreateCatDto } from './dto/create-cat.dto';
import { UpdateCatDto } from './dto/update-cat.dto';
import { Cat } from './entities/cat.entity';
@Injectable()
export class CatsService {
private ... |
Surface changes on comet 67P/Churyumov-Gerasimenko suggest a more active past
Changes to the surface geology of comet 67P/Churyumov-Gerasimenko are driven by seasonal factors. The changing surface of a comet From 2014 to 2016, the Rosetta spacecraft investigated comet 67P/Churyumov-Gerasimenko as it passed through the... |
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include "cmockery.h"
#include "../execAmi.c"
/* ==================== ExecEagerFree ==================== */
/*
* Tests that ExecEageFree calls the new ExecEagerFreeShareInputScan
* function when the input is a ShareInputScanState
*/
void
test__ExecEagerFr... |
An unbiased approach elucidates variation in (S)-(+)-linalool, a context-specific mediator of a tri-trophic interaction in wild tobacco
Significance The monoterpene alcohol linalool, occurring as 2 enantiomers, is made by many organisms and mediates diverse ecological interactions, including the attraction of both her... |
"""Dummy Class Implementation."""
class Object(object):
"""Dummy Class."""
def __init__(self):
"""Constructor."""
self.kernels_directory = None
self.working_directory = None
pass
|
This article is about the historical person. For other uses, see Lucrezia Borgia (disambiguation)
Lucrezia Borgia ( Italian pronunciation: [luˈkrɛttsja ˈbɔrdʒa]; Valencian: Lucrècia Borja [luˈkrɛsia ˈbɔɾdʒa]; 18 April 1480 – 24 June 1519) was a Spanish-Italian noblewoman of the House of Borgia who was the daughter of ... |
package csvhandler
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestDefaultFormatter(t *testing.T) {
testcases := map[string]struct {
value interface{}
expected string
}{
"string": {
value: "foo",
expected: "foo",
},
"bool": {... |
// MutationGetOld returns the method name for getting the old value of a field.
func (f Field) MutationGetOld() string {
name := "Old" + pascal(f.Name)
if _, ok := mutMethods[name]; ok {
name = "Get" + name
}
return name
} |
// writes bit map to OLED at x/y
void USM_write_bit_map (uint8_t x, uint8_t y)
{
uint8_t i;
oled.setCursor(x, y);
for (i = 0; i < PATTERN_WIDTH-1; i++)
{
oled.ssd1306WriteRamBuf(bit_map[i]);
}
oled.ssd1306WriteRam(bit_map[i]);
} |
// routeForAdminInterface creates static RouteConfig that forwards requested prefixes to Envoy admin interface.
func routeForAdminInterface(prefixes ...string) *http.HttpConnectionManager_RouteConfig {
config := &http.HttpConnectionManager_RouteConfig{
RouteConfig: &envoy_route_v3.RouteConfiguration{
VirtualHosts... |
def to_rectangle(self):
return self.to_point(), Tile(self.x + 1, self.y + 1, self.z).to_point() |
<gh_stars>0
import React, { useState, useEffect } from 'react';
import { FiLogOut, FiSun, FiMoon, FiArrowUp } from 'react-icons/fi';
import { DateTime } from 'luxon';
import { toast } from 'react-toastify';
import { useBottomScrollListener } from 'react-bottom-scroll-listener';
import { Container, Header, Trades, NoTr... |
/// Add one to the number.
async fn add_one(
&self,
#[graphql(default = 0)] v: ::std::primitive::i32,
) -> ::std::primitive::i32 {
v + 1
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.