content stringlengths 10 4.9M |
|---|
/**
* Test if the current ipAddress exists
* @param ipAddress
* @return
* @throws LoggerException
*/
public boolean ipExist(String ipAddress) throws LoggerException {
Statement st = null;
ResultSet res = null;
try {
if (conn == null || conn.isClosed()) {... |
import { Uri, workspace } from "vscode";
import * as util from "util";
import * as path from "path";
import * as winreg from "winreg";
import * as fs from "fs";
import * as tmp from "tmp-promise";
import { exec } from "child_process";
import * as vscode from "vscode";
import * as crypto from "crypto";
import { TestInfo... |
def _record_name(self, name):
if not isinstance(name, str):
raise ValueError("record name must be a string")
return self.SEPARATOR.join(
[morpheme for morpheme in [self.prefix, name, self.suffix]
if morpheme is not None]) |
<filename>graphql-node-post/node_modules/apollo-server-core/src/gql.ts
// This currently provides the ability to have syntax highlighting as well as
// consistency between client and server gql tags
import type { DocumentNode } from 'graphql';
import gqlTag from 'graphql-tag';
export const gql: (
template: TemplateSt... |
<gh_stars>1-10
# Copyright 2010 New Relic, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
#include "utils.hpp"
#include <cstring>
#ifndef _WIN32
extern "C" {
#include <pwd.h>
#include <sys/types.h>
#include <unistd.h>
}
#endif
namespace util {
std::mt19937_64& rng() {
static thread_local std::mt19937_64 generator{std::random_device{}()};
return generator;
}
uint64_t uniform_distribution_portabl... |
/*
* 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 circleland.Attacks;
import circleland.CircleAttack;
import circleland.CircleEntity;
import circleland.CircleLandUtili... |
def peer_ips(peer_relation='cluster', addr_key='private-address'):
peers = {}
for r_id in relation_ids(peer_relation):
for unit in relation_list(r_id):
peers[unit] = relation_get(addr_key, rid=r_id, unit=unit)
return peers |
Rigged. (Jae C. Hong/AP Photo)
Bernie Sanders is correct both that the 2016 Democratic presidential nomination was rigged against him and that the chief culprit is Democratic National Committee Chairwoman Debbie Wasserman Schultz.
It goes far beyond the super delegate party regulars who support her almost unanimously... |
package de.sstoehr.harreader.model;
import org.junit.Assert;
import org.junit.Test;
public class HttpStatusTest {
@Test
public void testByCode() {
for (HttpStatus status : HttpStatus.values()) {
Assert.assertEquals(status, HttpStatus.byCode(status.getCode()));
}
}
@Test
... |
def update_apps(app_id, app_name):
if app_id not in app_ids_set:
app_names.append([app_id, app_name]) |
/**
* Class for handling the BGP peer sessions.
* There is one instance per each BGP peer session.
*/
public class BgpSession extends SimpleChannelHandler {
private static final Logger log =
LoggerFactory.getLogger(BgpSession.class);
private final BgpSessionManager bgpSessionManager;
// Local f... |
// Copyright The OpenTelemetry Authors
//
// 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 agre... |
<gh_stars>10-100
package cat
type scheduleMixin struct {
isAlive bool
signals chan int
exitSignal int
}
type scheduleMixer interface {
GetName() string
handle(signal int)
process()
afterStart()
beforeStop()
getScheduleMixin() *scheduleMixin
}
func (p *scheduleMixin) handle(signal int) {
switch sig... |
/*
Assembles an instruction from a string. Returns the number of bytes written to the buffer on success, zero otherwise. Instructions can be separated using either the ';' or '\n' character.
Parameters:
- string [in] A pointer to a string that represents a instruction in assembly language.
- buffer ... |
/**
* A factory for creating a {@link ForEnterValue} offset mapping.
*/
@HashCodeAndEqualsPlugin.Enhance
protected static class Factory implements OffsetMapping.Factory<Enter> {
/**
* The supplied type of the enter advice.
*/
... |
// NewTooManyRequestsErrorResponse returns an API gateway HTTP error response for
// HTTP 429 TooManyRequests message.
func NewTooManyRequestsErrorResponse(message string) (*events.APIGatewayV2HTTPResponse, error) {
return NewJSONResponse(429, nil, ErrorMessageResponse{
Code: "TooManyRequestsError",
Message: "T... |
<gh_stars>0
#include <string>
#include <fstream>
#include <thread>
#include <chrono>
#include <cpplog/log.hpp>
int main() {
std::ofstream error_log_file ("error_log.txt", std::ofstream::out);
logging::add_message_sink(error_log_file, logging::Severity::Error);
logging::add_message_sink(std::cout,
... |
Statins in the 21st century: end of the simple story?
The development of the HMG-CoA reductase inhibitors (the statins) has lead to important advances in the management of cardiovascular disease. There have several landmark mortality and morbidity clinical trials with the statins. The 4S (Scandinavian Simvastatin Surv... |
<reponame>kintel/iree
# Lint as: python3
# Copyright 2020 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
"""Batch To Space ND tests."""
from absl import app
from iree... |
def create_names(self):
self.opposite_names = characterDict.CreateDict(os.path.abspath(
"names/opposite_names.csv"))
self.they_names = characterDict.CreateDict(os.path.abspath(
"names/they_names.csv"))
self.she_names = characterDict.CreateDict(os.path.abspath(
... |
/**
* Parse a string of realization (DLRS) to the realization object
* @throws NewickIOException
* @throws TopologyException
*/
public static Realisation parseDLRSRealisation(String real) throws NewickIOException, TopologyException
{
PrIMENewickTree tree = PrIMENewickTreeReader.readTree(real, true, true);
... |
/**
* Serialize the given set of tags, using the given document to create elements.
*
* @param document The target document
* @param tags The set of tags
*
* @return A serialized set of tags
*/
public static Element ofTags(
final Document document,
final Set<String> tags)
{
Object... |
/* will generate a random integer between 1 and max */
private int _get_random (int max) {
int temp;
while (true) {
temp = (int)(Math.random() * 10.0);
if (temp <= max && temp >= 1) {
return temp;
}
}
} |
def add_records(
self, records: List[SeqRecord], record_group_name: str
) -> Tuple[List[str], List[SeqRecord]]:
self.logger.info(
"Adding {} records to '{}'".format(len(records), record_group_name)
)
clean_records(records)
keys, records = BioBlast.add_records(
... |
//
// NewClient create and initialize new connection to RPC server.
//
func NewClient(url *url.URL, timeout time.Duration) (client *Client, err error) {
if url == nil {
return nil, nil
}
if timeout == 0 {
timeout = defaultTimeout
}
host, ip, port := libnet.ParseIPPort(url.Host, 0)
client = &Client{
url: ... |
/*
* Mckoi Software ( http://www.mckoi.com/ )
* Copyright (C) 2000 - 2015 Diehl and Associates, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/lic... |
#include<bits/stdc++.h>
using namespace std;
int a,n,i,s=0,p=0,x=0;
int main()
{
//freopen("coder.in","r",stdin);
//freopen("coder.out","w",stdout);
cin>>n;
for(i=1;i<=n;i++)
{
cin>>a;
s+=x-a;
if(s<0)
{
p+=-s;
s=0;
}
x=a;
}
cout<<p<<endl;
return ... |
// updatePolicyKey updates an entry in the PolicyMap for the provided
// PolicyUpdateArgs argument.
// Adds the entry to the PolicyMap if add is true, otherwise the entry is
// deleted.
func updatePolicyKey(pa *PolicyUpdateArgs, add bool) {
policyMap, err := policymap.Open(pa.path)
if err != nil {
Fatalf("Cannot op... |
def delete(self):
self._check_exists()
self.conn.session.query(model.Match).filter(
model.Match.query_id == self.query_id
).delete()
self.conn.session.query(model.Query).filter(
model.Query.query_id == self.query_id
).delete()
self.conn.session.com... |
def play_note(color_string):
global bard_song, directioner
bard_song += color_string
direction_sum(color_string)
render_all()
libtcod.console_flush()
winsound.PlaySound("SystemExit", winsound.SND_ASYNC)
if bard_song not in song_of_world:
bard_song = ''
directioner = [0,0]
... |
// maybeSkipKeys checks if any keys can be skipped by using a time-bound
// iterator. If keys can be skipped, it will update the main iterator to point
// to the earliest version of the next candidate key.
// It is expected that TBI is at a key <= main iterator key when calling
// maybeSkipKeys().
void DBIncrementalIte... |
<gh_stars>0
package kubeflowpipelines
import (
"fmt"
"time"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
"github.com/kubeflow/pipelines/backend/api/go_http_client/experiment_client/experiment_service"
"github.com/kubeflow/pipelines/backe... |
/* { dg-additional-options "-O2" } */
/* { dg-additional-options "-fdump-tree-parloops1-all" } */
/* { dg-additional-options "-fdump-tree-optimized" } */
#include <stdlib.h>
#define N 500
unsigned int a[N][N];
void __attribute__((noinline,noclone))
foo (void)
{
int i, j;
unsigned int sum = 1;
#pragma acc kern... |
Factors Influencing the Properties of Extrusion-Based 3D-Printed Alkali-Activated Fly Ash-Slag Mortar
The mix proportioning of extrusion-based 3D-printed cementitious material should balance printability and hardened properties. This paper investigated the effects of three key mix proportion parameters of 3D-printed a... |
#include<bits/stdc++.h>
#define f(i,a,n) for(int i=a;i<n;i++)
#define ll long long int
char ans[101];
using namespace std;
int main(){
int n,k;
cin>>n>>k;
int num=k/9;
int rem=k%9;
if(n==1&&k<10){
cout<<k<<" "<<k;
return 0;
}
if(k>(n*9)||k==0){
cout<<"-1 -1";
return 0;
}
if(rem){
f... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
<filename>internal/store/sqlstore/freelancerrep.go
package sqlstore
import (
"github.com/go-park-mail-ru/2019_2_Comandus/internal/model"
)
type FreelancerRepository struct {
store *Store
}
func (r *FreelancerRepository) Create(f *model.Freelancer) error {
return r.store.db.QueryRow(
"INSERT INTO freelancers (ac... |
package classpath
import (
"github.com/yuntao84/Civet/tool"
"os"
"path/filepath"
"strings"
)
type Classpath struct {
sources []javaSource
path string
}
func NewClasspath(path string) (*Classpath, error) {
cp := &Classpath{path: path}
err := cp.parseClasspath()
if err != nil {
return nil, err
}
return... |
def execute_move(self, move, color):
print(move)
move_y = move[0]
move_x = move[1]
self[move_y][move_x] = color
if color == 1:
lastMoveW = move
else:
lastMoveB = move |
/**
* Gary is an avid hiker. He tracks his hikes meticulously, paying close attention to small details like topography. During his last
* hike he took exactly n steps. For every step he took, he noted if it was an uphill, U, or a downhill, D step. Gary's hikes start
* and end at sea level and each step up or down ... |
/**
* @author Gary O'Neall
*
*/
public class TestSpdxListedLicense {
Model model;
IModelContainer modelContainer = new IModelContainer() {
@Override
public String getNextSpdxElementRef() {
return null;
}
@Override
public Model getModel() {
return model;
}
@Override
public String getDocument... |
// Package nrdb provides a programmatic API for interacting with NRDB, New Relic's Datastore
package nrdb
import "context"
func (n *Nrdb) Query(accountID int, query NRQL) (*NRDBResultContainer, error) {
return n.QueryWithContext(context.Background(), accountID, query)
}
// QueryWithContext facilitates making a NRQL... |
Carcinosarcoma of the Uterus: An Elusive Diagnosis
Introduction: Carcinosarcoma or Malignant Mixed Mullerian Tumor (MMMT) of the uterus is a rare malignant tumor comprising both carcinomatous and sarcomatous components. Worldwide it accounts for two to five percentages of all uterine malignancies. However, there is a ... |
// NewTestBlockTestService creates and returns a new TestBlockTestService instance
func NewTestBlockTestService(cfg *config.NucleusConfig, logger lumber.Logger) (*TestBlockTestService, error) {
return &TestBlockTestService{
cfg: cfg,
logger: logger,
requests: requestutils.New(lo... |
/**
* Create <plugins> node under a given parent node name if not already exists
* (either <build><plugins> or <build><pluginManagement><plugins>)
* Parent node would be created under the root node of the pom if not exists.
*
* @param xml Pom file as an org.w3c.Document object
*... |
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class shere {
static ArrayList<Integer> list = new ArrayList<>();
static int contor = 0, n, l, r, x;
static void verify(int sol[], int k) {
int nr = 0, suma = 0;
int begin = -1, end = -... |
/*
* There is some PCI addresses that are not mapped to any register.
* Accessing some of them lead to BUS error. So it is unreasonable to access
* the invalid addresses.
*/
static int
soc_cpureg_address_is_invalid(int unit, soc_regaddrinfo_t *ainfo) {
int off;
off = SOC_REG_BASE(unit, ainfo->reg);
if (... |
/**
* Tries to create a PKCS#12 file with a DSTU4145 cert.
* This test requires a patched BouncyCastle.
*/
@Test
public void testP12KeystoreDSTU4145() throws Exception {
log.debug("DSTU4145 configured: "+(AlgorithmTools.isDstu4145Enabled() ? "YES" : "NO"));
assumeTrue(AlgorithmTools.... |
/**
* GUI for the Fractaliser. Main method is the entry point for the program.
*/
public class GUIFrame extends JFrame implements IFSDefFrameListener
{
private static final int DETERMINISTIC = 0;
private static final int RANDOM = 1;
private int algorithmType;
private boolean usingCustom;
private ... |
<reponame>aloknigam247/cygnus<filename>src/parser/fa.cc
/************************************************************************************
* MIT License *
* *
* Cop... |
<reponame>devdut1999/Algorithms-for-Programming
/*
C++ program to run BFS on a Undirected Graph
Functional for both weighted and unweighted graphs
Contributed to Data-Science-Community-SRM on Github
Contributor: Santhosh-Vardhan
*/
#include <bits/stdc++.h>
using namespace std;
class graph
{
int v;
vector<pair<int,int>>... |
/**
*
* Talk with Spotify using the officla API
*
* @author shamalaya
*
*/
@Log4j
public class SpotyWeb {
/**
* Authorization sync between threads
*/
public static final CountDownLatch authorized = new CountDownLatch(1);
/**
* Keep track of expire time
*/
private long expires =... |
import sys
flush = sys.stdout.flush
def leEntrada(a, b):
print('?', a, b)
flush()
entrada = int(input())
return entrada
def imprimeSaida(a):
saida = ''
for i in a:
saida += str(i) + " "
print('!', saida)
flush()
tamanho = int(input())
lista = []
entrada_a = leEntrada(1, 2)
entrada_b = leEnt... |
/**
* The makeRequest method allows the user to create a search request with the optional useragent field
* @param mx The MX of the search is the maximum wait time (in seconds) that the program should wait for responses
* @param st The search target of the search must be in a set format as outlined in page 31 of ... |
<reponame>moxxiq/online-diary<filename>services/backend/migrations/versions/ca836029635c_refactor_add_unique_constraints.py
"""Refactor. Add unique constraints
Revision ID: ca836029635c
Revises: 769871c38a82
Create Date: 2021-12-04 23:48:59.660636
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dia... |
/**
* Represents the minor tick on the axis line.
*
* @author Syam
*/
public static class MinorTicks extends AbstractTicks {
private int divisions = 0;
/**
* Constructor.
*/
public MinorTicks() {
}
@Override
protected void buildProperties() {
super.buildProperties();
property("splitN... |
<gh_stars>10-100
//! Uses the `nom` library to parse the in memory format of perf data structures and
//! transforms them into more rust-like data-strutures.
//!
//! # References
//! The code is inspired by the following articles and existing parser to make sense of the
//! (poorly documented) format:
//!
//! * https... |
Up to 15,000 people protested in Waterford over the possible downgrading of Waterford Regional Hospital, and other cuts to the health service.
The non-political event was organised by Gillian Savage Corcoran and Andrea Galgey, who say they are "just concerned citizens".
Under the banner of "South East Take a Stand - ... |
def _extract_pipeline_of_pvalueish(pvalueish):
if isinstance(pvalueish, tuple):
pvalue = pvalueish[0]
elif isinstance(pvalueish, dict):
pvalue = next(iter(pvalueish.values()))
else:
pvalue = pvalueish
if hasattr(pvalue, 'pipeline'):
return pvalue.pipeline
return None |
import {ModuleWithProviders, NgModule} from '@angular/core';
import {HttpClientModule} from '@angular/common/http';
import {ResourceService} from './resource-services/resource.service';
import {CollectionResolverService} from './collection/collection-resolver.service';
import {ResourceObjectResolverService} from './ite... |
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
int n;
int ans=0;
scanf("%d",&n);
if(n%3==0) ans=n/3*2;
else ans=n/3*2+1;
printf("%d\n",ans);
}
|
<gh_stars>0
/*此类自动生成,请勿修改*/
package template
/*神盾尖刺配置*/
type ShieldTemplateVO struct {
//id
Id int `json:"id"`
//下一个id
NextId int32 `json:"next_id"`
//阶数
Number int32 `json:"number"`
//护体仙羽名称
Name string `json:"name"`
//升阶成功率
UpdateWfb int32 `json:"update_wfb"`
//升阶所需银两
UseSilver int32 `json:"use_sil... |
def fragment_size(self):
if self._fragment_size is None:
self._fragment_size = self.pyeclib_driver.get_segment_info(
self.ec_segment_size, self.ec_segment_size)['fragment_size']
return self._fragment_size |
// OnWorkerOffline implements MasterImpl.OnWorkerOffline
func (m *MockMasterImpl) OnWorkerOffline(worker WorkerHandle, reason error) error {
m.mu.Lock()
defer m.mu.Unlock()
m.onlineWorkerCount.Sub(1)
args := m.Called(worker, reason)
return args.Error(0)
} |
def addErrback(self, f):
self._errbacks.append(f) |
// ******************************************************************************
// File : UUID.h
// Description : Generates the Universal unique ID integer
// Project : iKan : Core
//
// Created by Ashish on 01/05/21.
// Copyright © 2021 Ashish. All rights reserved.
// **********************************... |
To subscribe to Capitol Fax, click here. A good way and a bad way Monday, Apr 27, 2015 * Erickson… During a hearing before lawmakers Wednesday, the new head of the state’s economic development agency offered up a recipe for how he’s going to lure more companies to Illinois. Jim Schultz, an Effingham entrepreneur tapped... |
Ebola revisited: lessons in managing global epidemics.
The latest statistics for the number of new cases of Ebola virus disease (EVD) in West Africa point to the near containment of the virus. While the current threat will not be deemed over until 42 days after the last case to be diagnosed has twice tested negative, ... |
/**
* Parse an attribute value
* @param value the value as a String
* @param type the type of the parsed value
* @param errors ActionErrors to which any parse errors are added
* @return the parsed value
*/
public static Object parseValue(String value, Class<?> type, ActionMessages errors) ... |
def make_a_leaf_cluster(self, texp):
if texp > TestRoot.MAX_T:
raise RuntimeError(
"THIS WON'T WORK: texp is %d but may not exceed MAX_T=%d" % (
texp, TestRoot.MAX_T))
key = self.rng.some_bytes(8)
value = self.rng.some_bytes(16)
leaves = []... |
#!/usr/bin/env python
from collections import deque
import itertools as it
import sys
import math
import re
sys.setrecursionlimit(10000000)
while True:
n, m = map(int, raw_input().split())
if n + m == 0:
break
ls = []
for i in range(n):
N, M = raw_input().split()
N = N.replace... |
Control-oriented energy-profiling and modelling of urban electric vehicles
Electric vehicles (EVs) are attracting more and more attention as a means to reach the desired reduction in transport-induced greenhouse emissions. To ensure an effective energetic management of these vehicles, especially in urban areas, dedica... |
/**
* Construct a HpcNotificationTrigger object from string.
*
* @param notificationTriggerStr The notification trigger string.
* @return HpcNotificationTrigger object
*/
private HpcNotificationTrigger fromNotificationTriggerString(String notificationTriggerStr) {
HpcNotificationTrigger notificationTrigger... |
CLOSE SIde-by-side comparison of online videos where Dr. Muni Sheldon Polsky and Dr. Michael T. Trombley both claim to have written the same book on erectile dysfunction.
Buy Photo Physicians E.D. Center of Ohio in Sharonville is among a chain of erectile dysfunction clinics that is headed by a fraud convict, an Enqui... |
<reponame>fujaba/SDMLib
package org.sdmlib.models.classes.templates;
import org.sdmlib.codegen.Parser;
import org.sdmlib.models.classes.ClassModel;
import de.uniks.networkparser.list.SimpleList;
public class ExistTemplate extends TemplateTask{
public SimpleList<TemplateTask> templates=new SimpleList<TemplateTask>()... |
/** A split point in a method that can be split off into another method */
public static class SplitPoint {
/**
* The locals read in this split area, keyed by index. Value type is always int, float, long, double, or object.
*/
public final SortedMap<Integer, Type> localsRead;
/**
* The locals... |
/**
*
* @param deviceIndex
* @param config optional custom configuration, matching the implementation, i.e. {@link StereoDeviceConfig.GenericStereoDeviceConfig}.
* @param verbose
* @return
*/
public final StereoDevice createDevice(final int deviceIndex, final StereoDeviceConfig config, fin... |
// Heuristic uses Euclidian (straight line) distance
class AstarEuclidHeuristic
{
public:
template <class GraphType>
static float calculate(const GraphType* pGraph, const int pNode1index, const int pNode2index)
{
return glm::distance(pGraph->getNode(pNode1index).getPosition(), pGraph->getNode(pNode2... |
from jira_requests import jira_requests
import json
import pprint
class asset_tracker_restapi:
def __init__(self, username=None, password=None):
self.my_request = jira_requests(username=username, password=password)
def add_asset(self, asset_dict):
# This is only for testing, it was used to g... |
# -*- coding: future_fstrings -*-
import threading
from flask_mail import Message
from flask import render_template, current_app
from app.extensions import mail
def send_reset_password(user, pin, callback_url):
send(f'{pin} is your Typer account recovery code',
sender = current_app.config['MAIL_USERNAME'],
... |
<filename>src/util.h
#pragma once
#include "impacto.h"
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
#include <algorithm>
#include <SDL_stdinc.h>
#include <string>
// TODO own _malloca for gcc
#if defined(_malloca)
#define ImpStackAlloc _malloca
#define ImpStackFree _freea
#else
#define ImpStackAlloc mall... |
import { Injectable } from '@angular/core';
import { ITurno } from '../models/turno.model';
import { AngularFirestoreCollection, AngularFirestore, AngularFirestoreDocument } from '@angular/fire/firestore';
import { environment } from 'src/environments/environment';
import { IUsuarioId } from '../models/usuarioid.model'... |
//-----------------------------------------------------------------------------
// LookupFunctionLatestVersion finds the latest cached version of an existing CordbFunction
// in the given module. If the function doesn't exist, it returns NULL.
//
// Arguments:
// funcMetaDataToken - methoddef token for function to ... |
import json
import numpy as np
import cv2
from pycocotools import mask as COCOmask
def showMask(img_obj):
img = cv2.imread(img_obj['fpath'])
img_ori = img.copy()
gtmasks = img_obj['gtmasks']
n = len(gtmasks)
print(img.shape)
for i, mobj in enumerate(gtmasks):
if not (type(mobj['mask']) ... |
Christopher Meek knew on 9/11 that he would one day give back to the people who risk their lives on behalf of other Americans.
Almost 16 years later, Meek gives back over and over again, helping many courageous citizens walk or stand, through his group that provides exoskeleton devices to paralyzed veterans.
Get push... |
<gh_stars>1-10
pub mod video;
pub const BASE_URL: &str = "https://www.youtube.com";
|
//= Register the graph with the system for utility GraphEdit (not really required).
// binds variable reg
void jhcBwVSrc::graph_reg ()
{
IRunningObjectTable *rtab;
IMoniker *id;
WCHAR spec[128];
if (FAILED(GetRunningObjectTable(0, &rtab)))
return;
wsprintfW(spec, L"FilterGraph %08x pid %08x", (DWORD_PTR) mana... |
.
Adhesive blood properties have been studied in 100 MS patients with the help of the new method developed on the basis of the leucocyte adherence inhibition (LAI) test, which was based on the calculation of the ratio of adhesive cells to non-adhesive ones. The value obtained was called the Index of Spontaneous Adhesi... |
// ScoreByBearish scores candles by if candle is bearish
func (q *Quota) ScoreByBearish(score float64) {
for _, candle := range *q {
if candle.IsBearish() {
candle.Score += score
}
}
} |
def ecef_pointing(self, t, ant):
point = self.pointing(t)
if len(point.shape) == 3:
k0 = np.zeros(point.shape, dtype=point.dtype)
for ind in range(point.shape[2]):
k0[:,:,ind] = self._transform_ecef(point[:,:,ind], ant)
else:
k0 = self._transfo... |
def age_group(self, age_group):
self._age_group = age_group |
Behavioral and Cognitive Interventions With Digital Devices in Subjects With Intellectual Disability: A Systematic Review
In recent years, digital devices have been progressively introduced in rehabilitation programs and have affected skills training methods used with children and adolescents with intellectual disabil... |
<reponame>oldlie/z-shop
package com.iprzd.zshop.http.response;
import com.iprzd.zshop.entity.commodity.CommodityInfo;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class CommodityInfoResponse extends BaseResponse {
private CommodityInfo commodityInfo;
}
|
Photo for representational purposes only.
Many doctors working in India's "profit driven" private hospitals are under pressure to carry out unnecessary and "risky" tests and procedures to meet revenue targets, a report published in The BMJ journal has claimed."Doctors who face pressure from hospital management to over... |
<gh_stars>10-100
import json
import torch
import torch.nn as nn
import torch.nn.functional as F
import mxnet as mx
import numpy as np
# Import comverters
from .layers import CONVERTERS
# Import PyTorch model template
from .pytorch_model_template import pytorch_model_template
def eval_model(pytorch_source, pytorch... |
/*
WriteBgmContainer
Writes a bgm container from a music sequence and a preset bank.
- filepath : The filename + path to output to. Extension included.
- presbnk : A preset bank to be exported.
- mus : A music sequence to be exported.
... |
<reponame>noahbjohnson/FileTypeCounter<gh_stars>0
import os
def changedirectory():
cwd = os.getcwd()
print("The current directory is:", cwd)
loop = True
while loop:
changeboolian = input("Would you like to change the working directory? (Y/N)")
if changeboolian == "Y" or changeboolian ... |
def create_recurring_meetings(instance, committee):
committee_object = Committee.objects.get(committee=committee)
create_recurring_events(
datetime.datetime.now(),
instance['meeting_day'],
instance['meeting_interval'],
lambda date, semester: create_committee_event(date, semester,... |
package com.example.administrator.taoyuan.fragment;
import android.animation.ObjectAnimator;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import and... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.