content
stringlengths
10
4.9M
<gh_stars>0 import { useEffect, useRef, useState } from "react"; import { useIntersection } from "react-use"; type Props = { slug: string; // "owner/name" date: string; // "owner/name" width: number | string; height?: number | string; }; export function RepositoryStats(props: Props) { const { slug, date, wi...
/** * Starts fetching daily strips once per day at the given number of minutes * past midnight local time. * * @param settings a configuration object that specifies the user's preferred * download settings. * * @throws NullPointerException if <code>settings</code> is null. */ public void startPe...
<gh_stars>1-10 import { Service, Inject } from 'typedi'; import { Repository, SelectQueryBuilder } from 'typeorm'; import { InjectRepository } from 'typeorm-typedi-extensions'; import { WhereInput, HydraBaseService } from '@subsquid/warthog'; import { Account } from './account.model'; import { AccountWhereArgs, Accou...
def sent_ent_counter(tokens, tags, pid): text = " ".join(tokens) sents = list(nlp(text).sents) sents = [str(s) for s in sents] sent_list = [] s_count = 0 tag_idx = 0 for s in sents: s_tokens = s.split(' ') s_tags = tags[tag_idx: (tag_idx+len(s_tokens))] coun...
<reponame>P-man2976/Musicdex import { useInterval, useBoolean, HStack, Box, AspectRatio, Skeleton, } from "@chakra-ui/react"; import styled from "@emotion/styled"; import { useRef, useState, useEffect, useMemo } from "react"; import { useVisibleElements, useScroll, SnapList, SnapItem, } from "react-...
mod uri; extern crate httparse; use httparse::{Error, Request, Response, Status, EMPTY_HEADER, parse_chunk_size, ParserConfig, InvalidChunkSize}; use core::slice; pub fn tests_httparse() { print!("Testing iter::tests::test_next_8_extra()..."); iter::tests::test_next_8_extra(); print!("Success.\n"); ...
#include "NpcInteractions.h" #include "Player.h" #include "Npc.h" #include "Item.h" #include "Globals.h" #include "Battle.h" #include "Exit.h" #include "Room.h" using namespace std; bool checkGiven = false; bool capsuleGiven = false; void AttackNPC(const string &name, Player* player) { if (name == "MOTHER") { ...
/*========================================================================= Program: Visualization Toolkit Module: vtkRandomAttributeGenerator.h Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This...
import { Component, Renderer, ViewChild, ElementRef, Input } from '@angular/core'; import { Modal } from "ng2-modal"; import {ChildComponent} from './child/child.component' @Component({ selector: 'le', template: ` <modal #myModal1 modalClass="large-Modal" > <modal-header> ...
Two members of the Jedforest Hunt in the Borders have been found guilty of illegal fox hunting at Selkirk Sheriff Court in what is the first successful mounted fox hunting prosecution under the law which bans hunting. Father and son, 66 year old Clive Richardson and 23 year old Johnathon Riley both denied deliberately...
package com.kaesar.algorithm4.exercise.chp2; import com.kaesar.algorithm4.base.edu.princeton.cs.algs4.StdRandom; /** * 选择排序 */ public class Selection extends Example { public static void sort(Comparable[] a) { // 将 a[] 按升序排列 int N = a.length; // 数组长度 for (int i = 0; i < N; i++) { ...
<gh_stars>1-10 import { Modal, Table } from "antd"; import React, { useMemo } from "react"; import { EditOutlined, DeleteOutlined } from "@ant-design/icons"; import { useStyleUtils } from "../../../../hooks/use-style-utils"; import { useQuery } from "@apollo/client"; import { useModelsHelper } from "./helper"; import _...
// wxAuiStepColour() it a utility function that simply darkens // or lightens a color, based on the specified percentage // ialpha of 0 would be completely black, 100 completely white // an ialpha of 100 returns the same colour wxColor wxAuiStepColour(const wxColor& c, int ialpha) { if (ialpha == 100) r...
/** * Adds an attribute {@code yt:country} to {@link MediaRating}. * * */ @ExtensionDescription.Default( nsAlias = MediaRssNamespace.PREFIX, nsUri = MediaRssNamespace.URI, localName = "rating", isRepeatable = true) public class YouTubeMediaRating extends MediaRating { /** * Default value for t...
n = int(input()) a = list(map(int,input().split(' '))) l = [x for x in range(1,max(a)+1)] k = [] for i in l: x = 0 for j in a: if abs(j-i)>1: if(j>i): x += abs((j-i-1)) else: x +=abs(i-j-1) else: x += 0 ...
// Validate Entry Block by merkle root func validateEBlockByMR(cid *common.Hash, mr *common.Hash) error { eb, err := db.FetchEBlockByMR(mr) if err != nil { return err } if eb == nil { return errors.New("Entry block not found in db for merkle root: " + mr.String()) } keyMR, err := eb.KeyMR() if err != nil { ...
<gh_stars>0 strawberries=60 its_weekend = 0 if its_weekend: if strawberries > 39: print("fun") else: print("not fun") else: if strawberries > 39 and strawberries < 61: print("fun") else : print("not fun")
//GetArtistArtworks - get artworks by artistID func (s *Storage) GetArtistArtworks(artistID int64) ([]*listing.Artwork, error){ sqlStmt := `SELECT id, title, artistID FROM Artwork WHERE artistID = ?` rows, err := s.db.Query(sqlStmt, artistID) if err != nil { return nil, err } defer rows.Close() var arworks []*...
Some airlines say they will change rules to ensure two crew are always in cockpit after Airbus A320 pilot is locked out before crash Some airlines are to change their rules to ensure two crew members are in plane cockpits at all times, after a co-pilot appeared to deliberately crash a Germanwings plane into the French...
def help_command(update, context): update.message.reply_text('Read the instructions carefully before starting the hunt\n1. Use your laptop to hunt ' 'the treasure\n2. While typing your answer you have to follow certain rules\na) There ' 'must not be any sp...
The Los Angeles Department of Water and Power works on a major construction project, but the results will be hard to see. Construction of a 55-million-gallon water tank is underway west of the 134 Freeway. Patrick Healy reports from Griffith Park for the NBC4 News at 6 p.m. Wednesday, Nov. 13, 2013. (Published Wednesda...
Candice Miller could be the only woman atop a committee is she gets Homeland Security. Election causes angst for House GOP Last week’s Republican bloodbath is causing angst in a series of House leadership elections. The GOP’s problems with women — laid bare by last week’s elections — is the main undertone in the batt...
def proximity(self): x, y = np.round(self.pos).astype(int) proximity = self.world.state[y - self.prox_range : y + self.prox_range + 1, x - self.prox_range : x + self.prox_range + 1] if self.prox_range > 1: proximity = np.multiply(proximity, self._...
<reponame>jakedageek/ftc-2013 #ifndef BLOCK_LOADER_H #define BLOCK_LOADER_H #define BLOCK_LOADER_OUT 170 #define BLOCK_LOADER_IN 78 #endif //HEADER FILE FROM 2013-2014
def collection_names(): return [ 'camera_board', 'control_board', 'camera_env_board', 'control_env_board', 'config', 'current', 'drift_align', 'environment', 'mount', 'observations', ...
<reponame>collingreen/hot-ts-react-redux<filename>src/store/index.tsx<gh_stars>0 import { createStore, combineReducers, applyMiddleware } from 'redux' import createSagaMiddleware from '@redux-saga/core' import { composeWithDevTools } from 'redux-devtools-extension' import { lettersReducer } from './letters/reducers' i...
def do_user_search(data, num_results=None): query = data.get('q') if (not query) or len(query) > MAX_QUERY_LENGTH: return (None, []) try: user = User.objects.get(username=query) except User.DoesNotExist: user = None try: auto_results = SearchQuerySet()\ .f...
package ru.job4j.list; class Node<T> { T value; Node<T> next; public boolean hasCycle(Node first) { boolean result = false; Node<T> indexI = first; Node<T> indexJ = first; while (indexJ.next != null) { indexI = indexI.next; indexJ = indexJ.next.next;...
package wendergalan.github.io.webflux.domain; import lombok.*; import org.springframework.data.annotation.Id; import org.springframework.data.relational.core.mapping.Table; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; @Data @NoArgsConstructor @AllArgsConstructor @With @B...
def create_source(configuration: SdrVariables, factory) -> DataSource: data_source = factory.create(configuration.input_source, configuration.input_params, configuration.sample_type, configuration.sample_rate, ...
def _non_framed_body_length(header, plaintext_length): body_length = header.algorithm.iv_len body_length += 8 body_length += plaintext_length body_length += header.algorithm.auth_len return body_length
def Args(parser): flags.AddPrivatecloudArgToParser(parser, positional=True) parser.add_argument( '--description', help="""\ Text describing the private cloud """) parser.add_argument( '--external-ip-access', action='store_true', default=None, h...
<reponame>enesonmez/data-science-tutorial-turkish """ Genelde verilerimizi değişkenlerde saklarız. Ancak verilerdeki değişimler program sonlandığında bellekten silinir. Bu verileri saklamak için dosya işlemlerine ihityaç duyarız. Dosya okumak çoğu proje için olmazsa olmazdır. Bu dosyalarda işlemeniz ge...
/// Creates an iterator over `CrossLink` instances in the direction specified. /// /// ## Cycles /// /// The links in a dependency cycle will be returned in non-dev order. When the direction is /// forward, if feature Foo has a dependency on Bar, and Bar has a cyclic dev-dependency on Foo, /// then the link Foo -> Bar ...
Structural, Mechanical and Flammability Characterization of Crosslinked Talc Composites with Different Particle Sizes The influence of filler particle size on selected physicochemical and functional properties of polymer composites was analyzed. The following test was carried out for the system: the bisphenol A glycer...
/** * Shifts the provided {@code val} towards but not past zero. If the absolute value of {@code val} * is less than or equal to shift, zero will be returned. Otherwise, negative {@code val}s will * have {@code shift} added and positive vals will have {@code shift} subtracted. * * <p>If {@code shift} is ...
It is known as "security theatre," a suite of frequently invasive measures that provide the appearance of bolstering the safety of travellers, while in fact accomplishing very little. A lavish new production may be about to open in the United States, staged by the creators of such hits as "Take Your Shoes Off At The A...
package org.springframework.cloud.zookeeper.discovery.watcher.presence; import java.util.Collections; import org.apache.curator.x.discovery.ServiceCache; import org.junit.Assert; import org.junit.Test; import static org.assertj.core.api.BDDAssertions.then; import static org.mockito.BDDMockito.given; import static or...
/* * Copyright (C) 2013-2021 Canonical, Ltd. * Copyright (C) 2022-2023 Colin Ian King. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your opt...
<reponame>brandonkal/expect /** * check function is promise instance * * @param v * @returns */ export function isPromise(v: any): v is Promise<any> { if ( typeof v === "object" && typeof v.then === "function" && typeof v.catch === "function" ) { return true; } return false; }
// Copyright 2019 <NAME> (Falcons) // SPDX-License-Identifier: Apache-2.0 /* * stoppedController.hpp * * Created on: Jan 9, 2019 * Author: <NAME> */ #ifndef STOPPEDCONTROLLER_HPP_ #define STOPPEDCONTROLLER_HPP_ #include "boost/signals2.hpp" #include "abstractGameDataAdapter.hpp" #include "abstractRefBoxAd...
The roles of stress, coping, and parental support in adolescent psychological well-being in the context of COVID-19: A daily-diary study Background COVID-19 has introduced novel stressors into American adolescents’ lives. Studies have shown that adolescents adopt an array of coping mechanisms and social supports when ...
// Start starts the server. func (s *Server) Start() error { router := s.makeRoutes() Log.Info("HTTP server started", "port", s.config.Port) return http.ListenAndServe(fmt.Sprintf(":%d", s.config.Port), router) }
The Kern County Sheriff's Office is investigating a report of possible threats made involving students at Curran Middle School, a spokesperson for the agency said Tuesday. Court documents obtained by 23ABC suggest that a "hit list" identified 10 to 15 students who currently attend the school. "The unknown subjected t...
Andy Murray fans queue from early hours to claim spots on Henman Hill to watch No 2 seed take on Milos Raonic Murraymania has descended on SW19 before the Wimbledon gentlemen’s singles final in which the Scot will take on Canadian Milos Raonic. With Centre Courttickets long ago sold out, die-hard fans of Andy Murray ...
/** * Calculates the centicell id for the given lat, lng. * * @param lat latitude * @param lng longitude * * @return centi cell id or null if it couldn't be calculated */ public static Integer calculateCentiCellId(Double lat, Double lng) { Integer centiCellId = null; if (lat != null && lng ...
import { Injectable } from '@nestjs/common'; import axios from 'axios'; import cheerio from 'cheerio'; import { parseDomain, ParseResultType } from 'parse-domain'; import * as simpleUnfurl from 'simple-unfurl'; import { SuccessResponse } from '../exceptions/success-exception.filter'; import { MysqlCacheService } from '...
// NewCmdLineSet registers flags for the passed template value in the standard // library's main flag.CommandLine FlagSet so binaries using dials for flag // configuration can play nicely with libraries that register flags with the // standard library. (or libraries using dials can register flags and let the // actual ...
package com.github.songjiang951130.leetcode.backtrack; import com.google.common.collect.Lists; import org.junit.Test; import java.util.ArrayList; import java.util.List; import static org.junit.Assert.assertTrue; public class MoneyTest { Money money = new Money(); @Test public void handle() { Li...
/** * Converts a hex character pair into a byte. For example the pair {@code '7'} * and {@code 'D'} returns the byte value {@code 125}. * * <p> * The input values must be only the characters {@code 0-9}, {@code A-F} and * {@code a-f}. * * @throws IllegalArgumentException i...
t=int(input()) while t>0: n=int(input()) athletes=input().split(" ") athletes=[int(_) for _ in athletes] athletes=sorted(athletes) i=0 min=None while i<n-1: if min == None or athletes[i+1]-athletes[i]<min: min=athletes[i+1]-athletes[i] i+=1 print(min) t-=1
Guest Post by Willis Eschenbach In her always interesting blog, Dr. Judith Curry [and Anthony at WUWT] points to a very well-researched article by Bjorn Lomborg, peer-reviewed, entitled “Impact of Current Climate Proposals” (full text). He has repeated the work that Tom Wigley did for the previous IPCC report. There ...
// The idea is to make the Sorted tree simplest. After PatchWasSucc(), there are many // edges with pred having only one succ and succ having only one pred. If there is no // any Action (either for building tree or checking validity), this edge can be shrinked // and reduce the problem size. // // However, there is one...
/** * <p>A {@link LinkValueList} is a representation of the string that is contained in a {@link CoapMessage} with * content type {@link ContentFormat#APP_LINK_FORMAT}.</p> * * <p>A {@link LinkValueList} contains zero or more instances of {@link LinkValue}.</p> * * <p>The notations are taken from RFC 6690</p> * ...
def create_dataset(file_name, input_type, size, classes, test_size, add_to): if input_type == 'mongo': create_dataset_mongo(file_name, size, classes, test_size, add_to) elif input_type == 'json': create_dataset_json(file_name, size, classes, test_size, add_to) else: click.BadParamete...
import calendar #import calendar module print("This Program Creates and Displays a Calendar of months for any year after 1970 and before 2039") #later after 1900 while True: try: year = int(input("Enter the Calendar Year: ")) except ValueError: print("Invalid Entry") else: if 1...
def cameracalibrator_master_srv(command,chessboard_size,chessboard_square): rospy.wait_for_service('cameracalibrator_master') proxy = rospy.ServiceProxy('cameracalibrator_master',CameraCalibratorCmd) try: response = proxy(command,chessboard_size,chessboard_square) except rospy.ServiceException, ...
/** * Add a relationship to the data set. * * @param relationship The relationship to be added. */ public void addRelationship( Relationship relationship ) { if (relationship != null) { if (relationships == null) { relationships = new LinkedList<Relationship>(); } relationships...
// AddAttribute adds the name and value for a node attribute to the fingerprint // response func (f *FingerprintResponse) AddAttribute(name, value string) { if f.Attributes == nil { f.Attributes = make(map[string]string, 0) } f.Attributes[name] = value }
import * as assert from 'assert' import * as t from 'io-ts' import { withValidate } from '../src/withValidate' import { assertSuccess, assertFailure } from './helpers' describe('withValidate', () => { it('should return a clone of a codec with the given validate function', () => { const T = withValidate(t.number,...
<gh_stars>1-10 import numpy as np # import pandas as pd import tensorflow as tf import parse_data_utils, model # tf.enable_eager_execution() tfrecord_file = '../data/cnn/tfrecords/guide_passenger_withORFcanon_allsites_feat8_11batches_SAbg.tfrecord' tpm_dataset = tf.data.TFRecordDataset(tfrecord_file) TRAIN_MIRS = ...
/** * This class allows a bpmscript to assume an interface and look like a * regular service. Useful for things like spring * * @author jamie */ public class BpmScriptProxy implements InvocationHandler { private String definitionName; private long defaultTimeout; private Map<String, Long> timeouts; priv...
use crate::error::CompileError; use shaderc::{IncludeType, ResolvedInclude}; use shaderc::{ShaderKind, CompileOptions}; use std::fs::File; use std::io::Read; use std::path::{Path, PathBuf}; use std::borrow::Cow; pub fn compile<T>(path: T, include_path: Option<T>, shader_kind: ShaderKind, compiler_options: Option<Compi...
#ifndef SDKD_RESULTSET_H_ #define SDKD_RESULTSET_H_ #ifndef SDKD_INTERNAL_H_ #error "include sdkd_internal.h first" #endif #include <algorithm> #include <cmath> // #define CBSDKD_XERRMAP(X) \ // X(LCB_BUCKET_ENOENT, Error::SUBSYSf_CLUSTER|Error::MEMD_ENOENT) \ // X(LCB_AUTH_ERROR, Error::SUBSYSf_CLUSTER|Err...
/** * A class for handling a single-selection across a set of ClassDisplay items. */ public class ClassDisplaySelectionManager { private final Set<ClassDisplay> classDisplayList = new HashSet<>(); private final List<FXPlatformConsumer<ClassDisplay>> selectionListeners = new ArrayList<>(); private ClassDis...
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import viewsets from profiles_api import serializers from profiles_api import models class TestApiView(APIView): """Test API view""" def get(self,request,format=None): """Return a List of test A...
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { int t;cin>>t; while(t--) { int a,b,c,d,x,y,l,r,u,dd; cin>>a>>b>>c>>d>>x>>y>>l>>dd>>r>>u; l-=x;r-=x;u-=y;dd-=y; int hr,vr; if(b>a) hr=abs(b-a); else hr=(-1) * abs(b-a); if(d>c) vr=abs(d-c);...
Implantology and the severely resorbed edentulous mandible. Patients with a severely resorbed edentulous mandible often suffer from problems with the lower denture. These problems include: insufficient retention of the lower denture, intolerance to loading by the mucosa, pain, difficulties with eating and speech, loss...
<reponame>nguyennguyen1112000/classroom import { Body, Controller, Post, Res } from '@nestjs/common'; import { GoogleService } from './google.service'; import { GoogleAuthDto } from './dto/google-login.dto'; @Controller('google') export class GoogleController { constructor(private readonly googleService: GoogleServi...
/* * Called by generic_file_read() to read a page of data * * In turn, simply calls a generic block read function and * passes it the address of befs_get_block, for mapping file * positions to disk blocks. */ static int befs_readpage(struct file *file, struct page *page) { return block_read_full_page(page, bef...
import { CronJob } from 'cron' import { logger, errorHandler } from '../utils' import { security } from './security' import { discovery } from './collaboration' import { reloadConfigInfo } from '../persistance/persistance' import { Config } from '../config' // Private functions const reloadCloudSettings = async (): P...
All of that free publicity couldn't push Megyn Kelly over the top. Despite a week's worth of stories about her controversial interview with conspiracy theorist Alex Jones, the Q&A ended up being watched by only 3.5 million viewers, and was soundly beaten by CBS rival “60 Minutes,” which drew 5.3 million viewers, accor...
#!/usr/bin/env python3 import argparse import glob import os import os.path as p import subprocess import sys DIR_OF_THIS_SCRIPT = p.dirname( p.abspath( __file__ ) ) DIR_OF_THIRD_PARTY = p.join( DIR_OF_THIS_SCRIPT, 'third_party' ) # We don't include python-future (not to be confused with pythonfutures) because # it ...
Australian chiropractors are five year university trained, and are government registered and government regulated health professionals. To become a registered chiropractor in Australia you must have studied an accredited 5-year chiropractic program conducted at a University within Australia, or have completed an accre...
<gh_stars>0 """Test random branches.""" from big_wall_finder.mp import parse_mp as mp def test_random_branch(): """Test random branch.""" d = mp.load_data() for _ in range(100): mp.print_random_branch(d) if __name__ == '__main__': test_random_branch()
Influencing Factors of the Initiation Point in the Parachute-Bomb Dynamic Detonation System The parachute system has been widely applied in modern armament design, especially for the fuel-air explosives. Because detonation of fuel-air explosives occurs during flight, it is necessary to investigate the influences of th...
On decorrelated track-to-track fusion based on Accumulated State Densities Originally, the Accumulated State Density (ASD) has been proposed to provide an exact solution to the out-of-sequence measurement problem. The posterior probability density function of the joint states accumulated over time was derived for a ce...
General manager Marc Bergevin said this week the answer to the Canadiens’ problems is in the locker room. Maybe if the GM looks around the room long enough he can find the roughly $8.5 million in salary-cap money he didn’t spend this summer to help improve his team. It’s hard to believe the NHL’s second-most valuable...
NASA has successfully launched their first ever asteroid sampling mission, OSIRIS-REx, Thursday Sept. 8 2016. By Jonathan Stroud JournalistsForSpace.com The Atlas V 411, a United Launch Alliance rocket, has successfully launched from Cape Canaveral, Florida, carrying the spacecraft OSIRIS-REx (Origins Spectral Inter...
//GetProject is the public wrapper for getting all the informations on a specific project func (pg *PostgreSQL) GetProject(projectName string) (models.Project, error) { p, err := pg.getProject(projectName) if err != nil { return models.Project{}, err } return p.ToModel(), nil }
// WithTraceID injects custom trace id into context to propagate. func WithTraceID(ctx context.Context, traceID trace.TraceID) context.Context { sc := trace.SpanContextFromContext(ctx) if !sc.HasTraceID() { var ( span trace.Span ) ctx, span = NewSpan(ctx, "gtrace.WithTraceID") defer span.End() sc = trace...
<gh_stars>0 import React, { useRef} from 'react'; import { Form, FormControl } from 'react-bootstrap'; import {debounce} from '../core/utils'; interface SearchProps { onSearch: (keyword: string) => void } function Search(props:SearchProps) { const searchRef = useRef<HTMLInputElement>(null); const handle...
/* this ALWAYS GENERATED file contains the definitions for the interfaces */ /* File created by MIDL compiler version 7.00.0499 */ /* Compiler settings for jit.idl: Oicf, W1, Zp8, env=Win32 (32b run) protocol : dce , ms_ext, c_ext, robust error checks: allocation ref bounds_check enum stub_data VC...
/* * Copyright 2016-2018 Crown Copyright * * 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...
def _scanRelease(self, release:PyPackageRelease, statistics:StageStatisticsData) -> map[str:ReleaseFileDescriptor]: release_file_name=release.getReleaseFileName() if self._cache_folder is not None: destFile=os.path.join(self._cache_folder,release_file_name) else: destFile=os.path.join(self._getT...
<gh_stars>0 package open.iot.server.service.security.model.token; import java.io.Serializable; public interface JwtToken extends Serializable { String getToken(); }
def register_to(backend, oauth, client_base=None): if client_base is None: client_base = _get_oauth_client_cls(oauth) config = backend.OAUTH_CONFIG.copy() if client_base: class RemoteApp(client_base, backend): pass config['client_cls'] = RemoteApp return oauth.registe...
def new_safe_logical_unit(self, um: UnitModel, unit_type: type[LT], logger: AmpelLogger, _chan: None | ChannelId = None ) -> LT: if logger.verbose: logger.log(VERBOSE, f"Instantiating unit {um.unit}") buf_hdlr = ChanRecordBufHandler(logger.level, _chan, {'unit': um.unit}) if _chan \ else DefaultRecor...
def write_data(self, data): self.dc.value(1) self.cs.value(0) self.spi.write(data) self.cs.value(1)
/** * Created by Nathan Dunn on 12/17/14. */ public class DataGenerator { public final static String SEQUENCE_PREFIX = "LG"; public static String[] organisms = { "Zebrafish" ,"Alligator Pipefish" ,"Bloody Stickleback" ,"Brook Stickleback" ,"Three-s...
<gh_stars>0 import matplotlib.pyplot as plt from matplotlib.image import imread # 画像表示のためのメソッド from os import path image_path = path.dirname(path.dirname(path.abspath(__file__))) + '/dataset/lena.png' img = imread(image_path) plt.imshow(img) plt.show()
ROLE OF TOPICAL APPLICATION OF NANO SILVER ON ULCER HEALING: A COMPARATIVE STUDY Background: The disruption of cellular flow of any tissue or its integrity cause wounds which associated with loss of function however, etiology is highly diverse. Among the etiological factors, they can be physical, chemical and surgical...
/** * True if the string is an {@code int} and [0, 65535], false otherwise. * * @param s a string that might be a valid port number * @return True if the string is an {@code int} and [0, 65535], false otherwise. */ public static boolean isPort(String s) { if(isInt(s)) { int ...
export { clearStorageSync } from '../unsupportedApi'
import {BufferEncoders, RSocketClient} from "rsocket-core"; import RSocketWebSocketClient from "rsocket-websocket-client"; import {decode, encode} from "msgpack-lite"; import Cookies from "js-cookie"; import {ISubscription, Payload, ReactiveSocket} from "rsocket-types"; import { apiLogsEnabled, INFINITY_STREAM_...
// Counts the number of items in the list. Because we don't want to depend // on a full-blown JSON parser, we just count the number of commas static int count_list_items(const std::string &s) { size_t pos = 0; int num_items = 0; while (pos != std::string::npos) { pos = s.find(",", pos ? pos + 1 : po...
import System.Plugins -- import System.Plugins.Utils import API src = "../Plugin.hs" wrap = "../Wrapper.hs" apipath = "../api" main = do status <- make src ["-i"++apipath] case status of MakeSuccess _ _ -> f MakeFailure e-> mapM_ putStrLn e where f = do v <- l...
/* * Copyright (c) 2008-2023, Hazelcast, 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 ...
<gh_stars>0 //! This crate contain utilities for working with xcb-dl. #[cfg(feature = "xcb_render")] pub mod cursor; pub mod error; pub mod format; pub mod hint; #[cfg(feature = "xcb_xinput")] pub mod input; pub mod log; pub mod property; #[cfg(feature = "xcb_render")] pub mod render; pub mod void; pub mod xcb_box;
<gh_stars>0 /* * Date:2021-05-18 20:28 * filename:06_mylist.h * */ template <typename T> class ListItem { public: T value() const { return _value; } ListItem* next() const { return _next; } private: T _value; ListItem* _next; }; template <typename T> class List { void insert_front(T value); void insert_e...