content stringlengths 10 4.9M |
|---|
//------------------------------------------------------------------------------
// Function Name: siMhlTx_AudioSet()
// Function Description: Set the 9022/4 audio interface to basic audio.
//
// Accepts: none
// Returns: Success message if audio changed successfully.
// Error Code if resolution change... |
def calculate_pressure_drop(self, density, flow, viscosity, length):
velocity = self.calculate_velocity(flow)
return self.calculate_friction_factor(velocity, viscosity) * (length / self.diameter) * (
density * (velocity ** 2) / 2) |
package main
import (
"fmt"
"strings"
"math/rand"
"crypto/md5"
"path"
"time"
jwt "jangled/sjwt"
"jangled/util"
"github.com/bwmarrin/snowflake"
"github.com/globalsign/mgo/bson"
"github.com/valyala/fasthttp"
)
// User flags
const (
USER_FLAG_NONE = 0
USER_FLAG_STAFF = 1 << 0
USER_FLAG_PAR... |
def plot_df_feature_dists(model_dir, df1, df2, df1_name, df2_name, feature, class_labels):
df1 = relabel_df(df1, class_labels)
df2 = relabel_df(df2, class_labels)
f, ax = plt.subplots(figsize=(FIG_WIDTH, FIG_HEIGHT), dpi=DPI)
min_value = min(df1[feature].min(), df2[feature].min())
max_value = max(df... |
University of Minnesota student Amir-Pouyan Shiva got the letter just before New Year's: TCF Bank would be closing the account he and his wife had maintained for five years.
"This letter is to notify you that TCF is exercising its right under the terms of your account contract to discontinue our banking relationship,"... |
// ListRatings returns a string of all Records sorted by rating in descending
// order. Records with the same rating are sorted by title in ascending order.
func (l *Library) ListRatings() string {
if len(l.byTitle) == 0 {
return msgLibraryEmpty
}
records := l.sortedRecords()
sort.SliceStable(records, func(i, j i... |
def match(self, regex):
return regex.match(self.text) |
def forward(
self,
x: torch.Tensor,
M_W: torch.Tensor = None,
M_b: torch.Tensor = None,
U: torch.Tensor = None,
V: torch.Tensor = None,
B: torch.Tensor = None,
n_samples: int = 100,
delta: float = 1.0,
apply_softmax: bool = True
):
... |
<reponame>maximilianharr/code_snippets
static int __svgalib_rendition_inmisc(void)
{
return 0;
}
static void __svgalib_rendition_outmisc(int i)
{
}
static int __svgalib_rendition_incrtc(int i)
{
return 0;
}
static void __svgalib_rendition_outcrtc(int i, int d)
{
}
static int __svgalib_rendition_inseq(int inde... |
#pragma once
#include <util/random/fast.h>
#include <util/ysaveload.h>
#include <util/generic/vector.h>
struct TRestorableFastRng64 : public TCommonRNG<ui64, TRestorableFastRng64> {
template <typename T>
TRestorableFastRng64(T&& seedSource)
: SeedArgs(std::forward<T>(seedSource))
, Rng(SeedArg... |
A Tibetan man in his mid thirties named as Sangye Khar set fire to himself and died today outside a police station in Amchok, Sangchu (the Tibetan area of Amdo), according to Tibetan sources in exile. His body was taken away by paramilitary police despite protests from Tibetans, and the situation in the area is tense, ... |
/**
* Creates a new {@link Header} that reads from {@link XMLStreamReader}.
*
* <p>
* Note that the header implementation will read the entire data
* into memory anyway, so this might not be as efficient as you might hope.
*/
public static Header create( SOAPVersion soapVersion, XMLStreamR... |
#include <stdlib.h>
#include <sys/types.h>
#include <limits.h>
#ifdef HAVE_CATCHABLE_SEGV
# include <signal.h>
#endif
#define TEST_NAME "sodium_utils2"
#include "cmptest.h"
#ifdef __SANITIZE_ADDRESS__
# warning The sodium_utils2 test is expected to fail with address sanitizer
#endif
#undef sodium_malloc
#undef sod... |
/*
* Given a symbol, returns its element kind for attribute purpose
*/
CorAttributeTargets SYM::getElementKind()
{
switch (kind) {
case SK_METHSYM:
return (asMETHSYM()->isCtor() ? catConstructor : catMethod);
case SK_PROPSYM:
return catProperty;
case SK_MEMBVARSYM:
return catFi... |
export declare class BookModule {
}
|
<gh_stars>0
from typing import List
SHIP = 1
SPACE = 0
def calculate_hit_probability(rows: List[List[int]]) -> float:
flattened = [
column
for row in rows
for column in row]
spaces = len(flattened)
ships = flattened.count(SHIP)
return ships / spaces
# pylint: disable=unused... |
from abc import ABC, abstractmethod
from enum import Enum
from typing import Any, Sequence, TYPE_CHECKING, overload
if TYPE_CHECKING:
from .session import Session
from khl.message import Msg
class Command(ABC):
class Types(Enum):
MENU = 'MENU'
APP = 'APP'
trigger: str
help: str
... |
/**
* Converts and returns the padding as a {@link XYEdges} instance
*
* @param availableWidth
* the available width
* @return the created {@link XYEdges} instances
*/
public XYEdges toEdges(int availableWidth) {
XYEdges edges = new XYEdges();
setEdges(edges, availableWidth);
return edges;... |
/**
* Returns a {@link Lookup lookup object} with full capabilities to emulate all
* supported bytecode behaviors, including <a href="MethodHandles.Lookup.html#privacc">
* private access</a>, on a target class.
* This method checks that a caller, specified as a {@code Lookup} object, is allowed to
... |
On August 17th, a new form of marketplace, the Luxury Auction, was added in Black Desert Online KR and the first auction took place shortly after. The Auction House is located in the southwest of Calpheon, inside the Banquet Hall. Extremely rare items that could not be found in BDO before will be put up for the auction... |
/*
* fill_adv_template_from_key will set the advertising data based on the remaining bytes from the advertised key
*/
void fill_adv_template_from_key(char key[28]) {
memcpy(&offline_finding_adv_template[7], &key[6], 22);
offline_finding_adv_template[29] = key[0] >> 6;
} |
//determine the effect this upgrade would have on the max values
void updateMaxWeaponStats(UWORD maxValue)
{
UDWORD currentMaxValue = getMaxWeaponDamage();
if (currentMaxValue < (currentMaxValue + maxValue / 100))
{
currentMaxValue += currentMaxValue * maxValue / 100;
setMaxWeaponDamage(currentMaxValue);
}
} |
public class CreateItem {
ItemStack item;
public CreateItem(String displayName, Material material, int amount, ArrayList<String> lore)
{
item = new ItemStack(material, amount);
ItemMeta meta = item.getItemMeta();
if (displayName != null)
meta.setDisplayName(displayName)... |
Environmental activist Balbir Singh Seechewal’s model of cleaning water bodies, successfully employed in Punjab, is being adopted by more than 1,600 villages situated on the banks of Ganga for the river’s rejuvenation.
Seechewal shared this information while talking to media on the sidelines of ‘Challenges and Strateg... |
<reponame>huynhsontung/monitoror
package delivery
import (
"net/http"
"github.com/labstack/echo/v4"
"github.com/monitoror/monitoror/models"
"github.com/monitoror/monitoror/monitorable/stripe"
stripeModels "github.com/monitoror/monitoror/monitorable/stripe/models"
)
type StripeDelivery struct {
stripeUsecase st... |
// An InstanceKlass is the VM level representation of a Java class.
public class InstanceMirrorKlass extends InstanceKlass {
static {
VM.registerVMInitializedObserver(new Observer() {
public void update(Observable o, Object data) {
initialize(VM.getVM().getTypeDataBase());
}
});
... |
<filename>components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/CreateContainerCmdHeaderTest.java<gh_stars>1-10
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional informa... |
/**
* @brief Delete entity
*
* @param entity Entity
*/
void deleteEntity(Entity entity) {
if (entity == EntityNull)
return;
deleteAllEntityComponents(entity);
mDeleted.push_back(entity);
this->mNumEntities--;
} |
/**
* Updates only large icon in notification panel when bitmap is decoded
*
* @param bitmap the large icon in the notification panel
*/
private void updateNotificationLargeIcon(Bitmap bitmap)
{
notificationBuilder.setLargeIcon(bitmap);
NotificationManager notificationManager = (... |
<reponame>cbbfcd/leva
import { useEffect, useRef } from 'react'
import { debounce } from '../utils'
export function useCanvas2d(
fn: Function
): [React.RefObject<HTMLCanvasElement>, React.RefObject<CanvasRenderingContext2D>] {
const canvas = useRef<HTMLCanvasElement>(null)
const ctx = useRef<CanvasRenderingConte... |
import { Action, ActionCreator, Dispatch } from "redux";
import axios from "axios";
import { Reducer } from "redux";
import {
USER_ADD_JOURNAL_FAIL,
USER_ADD_JOURNAL_REQUEST,
USER_ADD_JOURNAL_SUCCESS,
USER_CREATE_JOURNAL_GROUP_FAIL,
USER_CREATE_JOURNAL_GROUP_REQUEST,
USER_CREATE_JOURNAL_GROUP_SUCCESS,
USE... |
#pragma once
#define RULES_LIMIT 100
#define BREAK_EVEN_POINT (long double) 0.5f // break-even point is in [0,1] |
class Led8x8Motion:
""" Display motion in various rooms of the house """
def __init__(self, matrix8x8):
""" create initial conditions and saving display and I2C lock """
self.matrix = matrix8x8
# self.matrix.begin()
self.matrix.set_brightness(BRIGHTNESS)
self.matrix_imag... |
<gh_stars>1-10
import tensorflow as tf
cluster = tf.train.ClusterSpec({
"ps": [
"ps0.localhost:2223"
]})
server = tf.train.Server(cluster, job_name="ps", task_index=0)
server.join()
|
import { Component, OnInit } from '@angular/core';
import {FormControl, FormGroup} from '@angular/forms';
import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
import {UserModalComponent} from './user-modal/user-modal.component';
import {UserService} from '../../service/user.service';
import {User} from '../../models/us... |
n=int(input())
p=[int(x) for x in input().split()]
if sum(p)>=n*9/2:
print(0)
else:
s=n*(9/2)-sum(p)
for i in range (0,n):
p[i]=5-p[i]
p=sorted(p)
t=0
y=0
for i in range (0,n):
y+=p[n-1-i]
t+=1
if y>=s:
print(t)
break
... |
from typing import Optional
from arc import CLI
cli = CLI()
@cli.command()
def c1(val: Optional[int]):
print(val)
@cli.command()
def c2(val: int = None):
print(val)
cli() |
The scheme will be similar to Apple’s existing “Made for iPhone” label, given to compatible headphones, speakers and other accessories, but with a new brand and logo. Apple may also provide additional checks and assurances that certified products are not vulnerable to hackers.
The Cupertino-based company was likely to... |
/***********************************************************
LIMITEngine Header File
Copyright (C), LIMITGAME, 2020
-----------------------------------------------------------
@file Archive.h
@brief Archive for saving resource
@author minseob (https://github.com/rasidin)
****************************************... |
<reponame>liupangzi/codekata
class Solution(object):
def kthSmallest(self, matrix, k):
"""
:type matrix: List[List[int]]
:type k: int
:rtype: int
"""
low, high = matrix[0][0], matrix[len(matrix) - 1][len(matrix[0]) - 1] + 1
while low < high:
mid = ... |
package com.octo.android.robospice.persistence.springandroid.xml;
import java.io.File;
import java.io.IOException;
import org.simpleframework.xml.Serializer;
import org.simpleframework.xml.core.Persister;
import android.app.Application;
import com.octo.android.robospice.persistence.exception.CacheCreationException;... |
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef CEPH_RADOS_H
#define CEPH_RADOS_H
/*
* Data types for the Ceph distributed object storage layer RADOS
* (Reliable Autonomic Distributed Object Store).
*/
#include <linux/ceph/msgr.h>
/*
* fs id
*/
struct ceph_fsid {
unsigned char fsid[16];
};
static inline int ce... |
// Distributes the recipients to the rooms
func Distributor(ws *websocket.Conn, address string) {
var handled bool = false
for key, main := range Rooms {
if len(main.users) < ROOM_CAPACITY {
main.users[address] = &Client{ws, address, address}
roomChan <- &RoomCh{address, key}
handled = true
}
if (hand... |
package nemesis.form;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import p.URLEncodedParser;
/**
*
* @author <EMAIL>
*/
public clas... |
/*
* mdcommit() -- Commit a transaction.
*
* All changes to magnetic disk relations must be forced to stable
* storage. This routine makes a pass over the private table of
* file descriptors. Any descriptors to which we have done writes,
* but not synced, are synced here.
*
* Returns SM_SUCCESS or SM_FAIL wi... |
Ellen Page's filmography and actor connections
Ellen Page has starred in 32 movies. The 5 most recent movies Ellen Page was in are listed below.
Next is the list of 964 actors/actresses that Ellen Page has worked with spread over 49 pages. The list is sorted by the people Ellen Page has worked most frequently with. W... |
#
# Copyright (c) 2020-2023, NVIDIA CORPORATION.
#
# 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... |
def size_in_um_for_plot(self) -> Tuple[float, float, float, float]:
width_in_um = self.max_width * 1e6
height_in_um = self.max_height * (self.lines - self.missing_lines) / self.lines * 1e6
return 0.0, width_in_um, 0.0, height_in_um |
Study on spatial correlation mechanism of industries between different major functional areas based on grey target theory
It is an important measure for China to implement the strategy of major functional area (MFA) to promote the optimization and upgrading of the industry and the development of regional integration. ... |
/**
* @className: XmlHandler
* @description:
* @author: onnoA
* @date: 2021/9/23
**/
public class XmlHandler {
//整个xml的节点数据(把设置的每个层级XmlFormat都添加到这个集合中)
public List<XmlFormat> documentElements = new ArrayList<XmlFormat>();
/** 生成Dom树
* 返回Document(整个Dom Tree)
* */
private Document create... |
Sentiment Analysis Using Machine Learning Algorithms and Text Mining to Detect Symptoms of Mental Difficulties Over Social Media
A recent British study of people between the ages of 14 and 35 has shown that social media has a negative impact on mental health. The purpose of the paper is to detect people with mental di... |
// New returns an empty circular buffer with the given capacity.
func New(cap int) *Circbuf {
if cap < 1 {
panic("runtime error: circbuf.New: len out of range")
}
return &Circbuf{len: 0, cap: cap, items: make([]interface{}, cap)}
} |
Three known attempts to make a map of x-risks prevention in the field of science exist:
1. First is the list from the Global Catastrophic Risks Institute in 2012-2013, and many links there are already not working:
2. The second was done by S. Armstrong in 2014
3. And the most beautiful and useful map was created by ... |
/*
* Copyright 2000-2015 JetBrains s.r.o.
*
* 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... |
<filename>src/components/constants.ts
export const message = {
required: (name: string | undefined) => `${name} é um campo obrigatório`,
email: () => `Este email é inválido`,
};
|
<reponame>jlifeby/seasoncard-web<filename>service-mongo/src/main/java/com/jlife/abon/service/UserService.java<gh_stars>1-10
package com.jlife.abon.service;
import com.jlife.abon.entity.Card;
import com.jlife.abon.entity.Client;
import com.jlife.abon.entity.PhoneChanging;
import com.jlife.abon.entity.User;
import com.j... |
import { Stream, TransformOptions } from "stream";
interface LineTransformOptions extends TransformOptions {
autoDetect: boolean;
}
export default class LineTransform extends Stream.Transform {
private savedR: any;
private autoDetect: boolean;
private transformNeeded = true;
private skipBytes = 0;... |
// GetRoomIssue returns an alert/true from ctx if there is one, and false if there isn't.
func GetRoomIssue(ctx context.Context) (structs.RoomIssue, bool) {
v, ok := ctx.Value(roomIssue).(structs.RoomIssue)
return v, ok
} |
import * as _ from 'lodash';
import {Outcome, StateVariables} from '../types';
export type DeepPartial<T> = {
[P in keyof T]?: DeepPartial<T[P]>;
};
type Modifier<T, S extends T = T> = (result: T, props?: any) => S;
/**
* A fixture accepts two optional, positional arguments
* - the first, mergeProps, will merge... |
//==========================================================================
// INSPECTOR.CC - part of
//
// OMNeT++/OMNEST
// Discrete System Simulation in C++
//
// Implementation of
// inspectors
//
//==========================================================================
/*--... |
def _construct_full_path_generator(dirs: List[str]):
dirs = [x for x in dirs if x]
if dirs:
def full_path_func(path):
to_join = [x for x in dirs + [path] if x]
return _purge_path(os.path.join(*to_join))
else:
full_path_func = _purge_path
return full_path_func |
export interface IEquatable<T> {
equalTo(other: T): boolean;
}
|
/**
* Calcite {@link SchemaFactory} used for the evaluator.
* This class is public because Calcite uses reflection to instantiate it, there is no reason to use it anywhere else
* in Gobblin.
*/
public static class PESchemaFactory implements SchemaFactory {
@Override
public Schema create(SchemaPlus parentSc... |
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.feed.client;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpForma... |
<reponame>TSDBBench/Overlord<filename>MakeDebianIso.py
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
__author__ = '<NAME>'
__version__ = "0.01"
import argparse
import logging
import Util
import os
import shutil
from fabric.api import *
outputFileNameSuffix="-autoinstall"
neededTools = ["which", "sed","7z", "geniso... |
package org.redquark.leetcoding.challenge;
/**
* @author <NAME>
* <p>
* Given an array of strings strs, return the length of the longest uncommon subsequence between them.
* If the longest uncommon subsequence does not exist, return -1.
* <p>
* An uncommon subsequence between an array of strings is a string that... |
// Records the creation flags of an extension grouped by
// Extension::InitFromValueFlags.
void RecordCreationFlags(const Extension* extension) {
for (int i = 0; i < Extension::kInitFromValueFlagBits; ++i) {
int flag = 1 << i;
if (extension->creation_flags() & flag) {
UMA_HISTOGRAM_EXACT_LINEAR("Extensi... |
// Variable size guards against block size changing from SetBlockSize()
// or large requests greater than the standard block size.
vtkHeapBlock(size_t size)
: Next(nullptr)
, Size(size)
{
this->Data = new char[size];
} |
#include<bits/stdc++.h>
using namespace std;
const int nmax=100001;
main(){
int t,h,m;
scanf("%d%d:%d",&t,&h,&m);
if (m>=60) m=m%10+10;
if (t==12 && (h<1||h>12)){
if (h%10) h%=10;
else h=10;
}
if (t==24 && (h<0||h>23)){
if (h%10) h%=10;
else h=10;
... |
/**
* @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
*/
public class LDAPObject {
private static final Logger logger = Logger.getLogger(LDAPObject.class);
private String uuid;
private LDAPDn dn;
private String rdnAttributeName;
private final List<String> objectClasses = new Link... |
<reponame>viveksiddineni/Thrizer-Admin-test
import {
Component,
OnInit,
Input,
ContentChildren,
QueryList,
TemplateRef,
ElementRef,
ViewChild,
AfterViewInit,
Output,
EventEmitter,
ContentChild,
AfterContentInit,
} from "@angular/core";
import { ForDirective } from "../for";
import { Paginatio... |
def remove_temp_data():
if os.path.isfile('bbc_sitemap.txt'):
os.remove('bbc_sitemap.txt')
if os.path.isfile('temp_data.txt'):
os.remove('temp_data.txt') |
// JobStatus returns the current status of job.
// If the PID is unavailable (i.e. the process is not running), 0 will be returned.
// An error will be returned if the job is unknown (i.e. it has no config in /etc/init).
func (*UpstartService) JobStatus(ctx context.Context, request *platform.JobStatusRequest) (*platfor... |
<reponame>feberhard/ACO
/*
* //==============================================\\
* || Project: Ant Colony Optimization ||
* || Authors: <NAME>, <NAME>, ||
* || <NAME> <NAME> ||
* || Date: 05.12.2016 ||
* \\==============================================//
*/
... |
package shimV2
import (
"encoding/json"
"io/ioutil"
"log"
"os"
)
type PubsubMessage struct {
Attributes map[string]string `json:"attributes,omitempty"`
Data string `json:"data,omitempty"`
MessageId string `json:"messageId,omitempty"`
PublishTime string `json:"publish... |
<filename>Std/Data/Text.hs
{-# LANGUAGE MagicHash, UnboxedTuples #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE UnliftedFFITypes #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE PatternSynonyms #-}
{-|
Module : Std.Data.Text
Description : Unicode text processing
Copyright : (c) <NAME>, 2017-2018
License ... |
<gh_stars>0
# Copyright (c) 2016-2021, <NAME>
# 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 condit... |
/**
* Simple data holder
*/
private static class QueueEntry
{
public Notification notification;
public Object handback;
public QueueEntry(Notification notification, Object handback)
{
this.notification = notification;
this.handback = handback;
}
} |
package abd.p1.model;
import javax.persistence.Entity;
@Entity
public class Solicitud_amistad extends Mensaje{
public Solicitud_amistad(){
}
}
|
/**************************************************************************************
* Copyright (c) 2016-2017, ARM Limited or its affiliates. All rights reserved *
* *
* This file and the related binary are licensed under th... |
import { prerunHookWithOptions } from '@cenk1cenk2/boilerplate-oclif'
export default prerunHookWithOptions({ registerExitListeners: true })
|
def _get_plugin_from_registry(self, trans, visualization_name):
if not trans.app.visualizations_registry:
raise HTTPNotFound('No visualization registry (possibly disabled in galaxy.ini)')
return trans.app.visualizations_registry.get_plugin(visualization_name) |
<reponame>RwdrQP/scrawler_test<filename>scrawler_baidu.py
import scrawler
def main():
url = "http://www.baidu.com/"
print("downloading " + url)
html = scrawler.download(url)
if html.status == scrawler.page.ERROR_EXCEPT:
print("exception")
elif html.status == scrawler.page.ERROR_INPUT:
print("input none")
eli... |
// Validate checks the model, struct and any custom validations
func (p *Person) Validate() error {
p.BeforeValidate()
return validation.ValidateStruct(p,
validation.Field(&p.Email, validation.Required, is.Email),
validation.Field(&p.FirstName, validation.Length(0, 50)),
validation.Field(&p.LastName, validation... |
REALISATION AND PERFORMANCE OF THE ADJUSTED NUCLEAR DATA LIBRARY ERALIBI FOR CALCULATING FAST REACTOR
The adjusted nuclear data library ERALIBl is described in this paper. It is the first step in the process towards a unique data set which will be valid for all applications (core neutronics. shielding, fuel cycle) and... |
<reponame>chriskim06/go-sdk<filename>reflectutil/doc.go
/*
Copyright (c) 2021 - Present. <NAME>, Inc. All rights reserved
Use of this source code is governed by a MIT license that can be found in the LICENSE file.
*/
/*
Package reflectutil includes helpers for working with the golang reflection api.
*/
package refle... |
def apply_lineage(func: T) -> T:
_backend = get_backend()
@wraps(func)
def wrapper(self, context, *args, **kwargs):
self.log.debug("Lineage called with inlets: %s, outlets: %s", self.inlets, self.outlets)
ret_val = func(self, context, *args, **kwargs)
outlets = [unstructure(_to_datas... |
/* cf_client_rc_alloc
* Allocate a reference-counted memory region. This region will be filled
* with uint8_ts of value zero */
void *
cf_client_rc_alloc(size_t sz)
{
uint8_t *addr;
size_t asz = sizeof(cf_client_rc_counter) + sz;
addr = (uint8_t*)malloc(asz);
if (NULL == addr)
return(NULL);
cf_atomic_int_set(... |
<gh_stars>1000+
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/solo-io/gloo/projects/gloo/api/v1/options/tcp/tcp.proto
package tcp
import (
bytes "bytes"
fmt "fmt"
math "math"
time "time"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
types "github.com/... |
/**
* Creates a list of distinct CHProfiles with different u-turn costs that can be used by the tests.
* There is always a profile with infinite u-turn costs and one with u-turn-costs = 50.
*/
private List<CHConfig> createCHConfigs() {
Set<CHConfig> configs = new LinkedHashSet<>(5);
confi... |
import os
import pandas as pd
input_path="output/cohort.pickle"
backend = os.getenv("OPENSAFELY_BACKEND", "expectations")
output_path = "output/" + backend + "/tables"
os.makedirs(output_path, exist_ok=True)
cohort = pd.read_pickle(input_path)
def count_prevalences(cohort):
for group_type in ["","2"]:
... |
Depletion of central catecholamines alters amphetamine- and fenfluramine-induced taste aversions in the rat.
Conditioned taste aversions induced by pairing the consumption of saccharin with an amphetamine injection are attenuated in rats with depletion of central catecholamines caused by intraventricular administratio... |
/**
* Chapter: 8
* Exercise: 8-04 - The standard library function int fseek(FILE *fp, long offset, int origin) is identical to lseek except
* that fp is a file pointer instead of a file descriptor and the return value is an int status, not a position. Write fseek.
* Make sure that your fseek coordinates properly wi... |
/*
* classes.hxx
*/
#ifndef _CLASSES_
#define _CLASSES_
#define IUnknownMETHODS( ClassName ) \
HRESULT STDMETHODCALLTYPE \
ClassName::QueryInterface ( \
REFIID iid, ... |
/*
* Okay, the login command's use is officially deprecated. Instead, you're supposed
* to use the AUTHENTICATE command with some SASL mechanism. I will include it,
* but I'll also include a check of the login_disabled flag, which will set whether or
* not this command is accepted by the command processor. Event... |
/**
* Uses {@link #getProcessPackageDirectoryResult} to look for a package in the directory specified
* by {@code recursivePkgKey}, does some work as specified by {@link PackageDirectoryConsumer} if
* such a package exists, then recursively does work in each non-excluded subdirectory as
* specified by {@lin... |
Author: Marshall Schott
I’d reckon most of us own (and have broken) a hydrometer or three. I received my first one in the kit I purchased at the genesis of my obsession with this hobby. It’s a fantastic tool that allows us to determine fairly accurately how much sugar is in our wort/beer based on its density (click he... |
import Control.Applicative
import Control.Monad
import Data.List
import Data.Array
process n [] = n
process n (a:as) = process (n+1) $ filter (\z-> mod z a>0) as
main = do
getLine
k<-sort <$> map read <$> words <$> getLine:: IO [Int]
print $ process 0 k
|
package leavehomesafely.model;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class OWMAPI {
public static JSONObject getCurrentWeather () {
try {
int loc_id = 2867714;
St... |
/**
* Created by fe on 16/9/1.
*/
public class TequilaNamespaceHandler extends NamespaceHandlerSupport{
public void init() {
registerBeanDefinitionParser("application",new TequilaBeanDefinitionParser(ApplicationConfig.class,true));
registerBeanDefinitionParser("registry",new TequilaBeanDefinitio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.