content stringlengths 10 4.9M |
|---|
def _get_deterministic_value_for_table_name(table_name, max_value):
return hash(table_name) % max_value |
def write_version():
import yaml
version_file = navigator_dir / "model_navigator" / "version.yaml"
version, repository_url = _get_info()
data = {"version": version, "repository_url": repository_url}
with open(version_file, "w") as f:
yaml.safe_dump(data, f) |
<gh_stars>1-10
import * as React from 'react';
import { observer } from 'mobx-react';
import { MaterialsPluginMeta, Maybe } from '@vize/types';
import { materialsPluginMetaMap } from '@vize/runtime-web';
import { WithTagsList } from '../WithTagsList';
import { MaterialsViewType } from '../../HeaderOptions';
import { Ma... |
/* sjsakib */
#include <bits/stdc++.h>
#define stream istringstream
#define rep(i,n) for(int i=0; i<(int)n; i++)
#define repv(i,n) for(int i=n-1; i>=0; i--)
#define repl(i,n) for(int i=1; i<=(int)n; i++)
#define replv(i,n) for(int i=n; i>=1; i--)
#define INF (1<<30)
#define INF64 (1ll<<62)
#define PI 3.141592653589... |
/**
* Check the status codes when resend and retry enabled.
*
* @param response the HttpServletResponse
* @param context the AuthenticationContext
* @param queryParams the queryParams
* @param errorPage the errorPage
* @throws AuthenticationFailedException
*/
private voi... |
import java.util.*;
import java.io.*;
public final class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
char firstChar = Characte... |
def trajectory(position, length):
trajectory = np.zeros(length + 1)
trajectory[0] = position
for i in range(1, length + 1):
noise = variance * numpy.random.randn()
position += time_step * force(position) + noise
position -= 2*math.pi*math.floor(position / (2*math.pi))
trajectory[i] = position
return traject... |
package main
import (
"bytes"
"strconv"
"strings"
"time"
)
var (
buffer bytes.Buffer
)
func Str(slice []string) (concatenated string) {
for _, s := range slice {
buffer.WriteString(s)
}
concatenated = buffer.String()
buffer.Reset()
return
}
func Slc(args ...string) []string {
return args
}
func Concat... |
import { Component, Input, OnInit, OnDestroy, OnChanges, AfterViewInit, ViewChild } from '@angular/core';
import { SelectionModel } from '@angular/cdk/collections';
import { MatPaginator, MatTableDataSource, MatDialog, MatSort } from '@angular/material';
import { FilterDialogComponent } from '../dialogs/filter/filte... |
#!/env/python
# coding=utf8
"""
Converting Degrees, Minutes, Seconds formatted coordinate strings to decimal.
Formula:
DEC = (DEG + (MIN * 1/60) + (SEC * 1/60 * 1/60))
Assumes S/W are negative.
"""
import re
def dms2dec(dms_str):
"""Return decimal representation of DMS
>>> dms2dec(utf8(48°53'10.18"N... |
<filename>src/main/java/com/amazon/alexa/avs/message/response/audioplayer/Stream.java<gh_stars>10-100
/**
* Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* You may not use this file except in compliance with the License. A copy of the License is located the "LICENSE.txt"
* file accompany... |
/*
* Copyright (c) 2011-2020, hubin (<EMAIL>).
* <p>
* 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
* <p>
* https://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by appl... |
/**
* MusicPlayer - class to management audio file and playing
*/
public class MusicPlayer{
private static final String TAG = "MusicPlayer";
protected static Music music;
private static MusicPlayer instance;
protected String musicFileName = null;
protected MusicPlayType playType;
protected boolean... |
package com.mystic.atlantis.configfeature;
import com.mystic.atlantis.init.FluidInit;
import com.mystic.atlantis.util.Reference;
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
import net.fabricmc.fabric.api.biome.v1.ModificationPhase;
import net.mine... |
Laser Caliper Reliability in Upper-Stem Diameter Measurements by Multiple Users
: Considering the uncertainty of upper-stem diameter measurements and the fact that there are few studies on the accuracy of diameters using the Mantax Black caliper with Gator Eyes (Haglöf, Långsele, Sweden), the aim of this research is t... |
/**
* @brief Create an iterator that dispenses a fixed set of indices.
*
* @param g server for whom we're doing this
* @param array array of indexes; need not be sorted, faster if it is
* @param array_n number of elements in array
* @param low lowest value included in results; values below
* are dropped, e... |
// prefixRedirectHandler returns a handler that redirects to the given formated url.
func prefixRedirectHandler(prefix, baseURL string) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if p := r.URL.Path; p == prefix {
http.Redirect(w, r, p[:len(p)-1], http.StatusFound)
ret... |
<reponame>StackVista/stackstate-agent<gh_stars>1-10
// +build python,test
package python
import "testing"
func TestComponentTopology(t *testing.T) {
testComponentTopology(t)
}
func TestRelationTopology(t *testing.T) {
testRelationTopology(t)
}
func TestStartSnapshotCheck(t *testing.T) {
testStartSnapshotCheck(t... |
// LoadAll returns a slice of all the items in the map, sorted by id.
func (s *ItemSyncer) LoadAll() ([]persist.MarshallableItem, error) {
keys := make([]string, 0)
for id := range s.m {
keys = append(keys, id)
}
sort.Strings(keys)
sorted := make([]persist.MarshallableItem, len(keys))
for i, k := range keys {
... |
// Busca si hay un sensor ds18b20 conecato al bus One Wire, si no lo detecta
// devuelve error.
static ds18b20_error_t ds18b20_search_sensor(){
one_wire_error_t err_code;
one_wire_rom_code_t rom_code;
err_code = one_wire_reset();
if(err_code == ONE_WIRE_OK){
one_wire_read_rom(&rom_code);
... |
Vacant lots. Gravel parking lots. Contaminated sites of former gas stations or dry cleaners or industrial developments.
Our city continues to be plagued by such nuisance properties. They are the bane of our hopes for downtown redevelopment, whether they’re behind the arena, in the Quarters or along Jasper Avenue. But ... |
My local Wendy’s has a sign up saying tomatoes are scarce and will be offered only by request, and this is in California. So, this article by Marlo Lewis about sandwich shops in DC illustrates a nationwide effect. – Anthony
Can Tomatoes Take Any More Global Warming? By Marlo Lewis
Today, my friendly neighborhood Potb... |
// GetTLSCertificate generates the X.509 key/cert for the workload identity
// derived from udsPath, which is where the FetchSecrets grpc request is
// received.
// SecretServer implementations could have different implementation
func (s *SDSServer) GetTLSCertificate() (*auth.TlsCertificate, error) {
s.certificateChai... |
// Map shared spaces at requested addresses and return if succeeded.
bool MetaspaceShared::map_shared_spaces(FileMapInfo* mapinfo) {
size_t image_alignment = mapinfo->alignment();
#ifndef _WINDOWS
ReservedSpace shared_rs = mapinfo->reserve_shared_memory();
if (!shared_rs.is_reserved()) return false;
#endif
asse... |
/**
* @author Etki {@literal <etki@etki.name>}
* @version %I%, %G%
* @since 1.0
*/
@SuppressWarnings("unused")
public class Configuration {
public static int POSTS_PER_PAGE = 3;
private String databaseUrl;
final private DatabaseConfiguration databaseConfiguration;
public Configuration(Environment en... |
/**
* Used by shader to bind attribute names.
*/
public void bindProgramAttributes(int programID) {
int index = 1;
for (MaterialVertextFormatElement e : elements) {
if (e.attributeName != null) {
GL20.glBindAttribLocation(programID, index++, e.attributeName);
... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
//use /n instead of endl if tle for big inputs
ll floorSqrt(ll x)
{
// Base cases
if (x == 0 || x == 1)
return x;
// Staring from 1, try all numbers until
// i*i is greater than or equal to x.
int i = 1, result = 1;
while... |
<reponame>Higmin/practise
package com.practice.algorithm.leetcode_passing;
/**
* 617. 合并二叉树
* 给定两个二叉树,想象当你将它们中的一个覆盖到另一个上时,两个二叉树的一些节点便会重叠。
* <p>
* 你需要将他们合并为一个新的二叉树。合并的规则是如果两个节点重叠,那么将他们的值相加作为节点合并后的新值,否则不为 NULL 的节点将直接作为新二叉树的节点。
* <p>
* 示例 1:
* <p>
* 输入:
* Tree 1 Tree 2
* 1 ... |
/**
*
* @author Jeff Riggle
*
*/
public class PlayerModificationActionModel {
private final List<PlayerPersistenceObject> players;
private SelectionAwareObservableList<String> selectedPlayers;
private SelectionAwareObservableList<String> changeTypes;
private SelectionAwareObservableList<String> modificatio... |
#include<bits/stdc++.h>
using namespace std;
void solve(){
int n,k1,k2,w,b;
cin>>n>>k1>>k2;
cin>>w>>b;
int total=2*n;
int total_w=(k1+k2);
int total_b=total-total_w;
int white_u=total_w/2;
int black_u=total_b/2;
if(w<=white_u && b<=black_u){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package de.janquadflieg.mrracer.opponents;
import static de.janquadflieg.mrracer.data.CarConstants.*;
import java.awt.geom.*;
import java.util.*;
/**
*
* @author nostromo
*/
public class Opponent {
private int... |
package clusterconnected
import (
"context"
"io/ioutil"
"net/http"
"time"
"github.com/rancher/rancher/pkg/api/steve/proxy"
v3 "github.com/rancher/rancher/pkg/apis/management.cattle.io/v3"
managementcontrollers "github.com/rancher/rancher/pkg/generated/controllers/management.cattle.io/v3"
"github.com/rancher/r... |
<gh_stars>10-100
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"bytes"
"context"
"encoding/json"
"io"
"io/ioutil"
"strconv"
"github.com/go-openapi/error... |
// Construct a convex hull and return it as a stack of points
public static Stack<Point2D> createConvexHull(Point2D[] pts) {
int k1, k2, N = pts.length;
Stack<Point2D> hull = new Stack<Point2D>();
Arrays.sort(pts, new PointOrder());
Arrays.sort(pts, 1, N, new PolarOrder(pts[0]));
hull.push(pts[0]);
... |
package com.mmuu.travel.client.ui.user;
import android.app.Dialog;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.Text... |
<gh_stars>1-10
#ifndef GAMEMANAGER_H
#define GAMEMANAGER_H
#include "../Objects/Ball.h"
#include "../Objects/Player.h"
#include <time.h>
#include <stdio.h>
#include "../Interface/Interface.h"
#include "../Engine/Material/Material.h"
#include "../Sounds/SoundManager.h"
#include <SFML/System/Clock.hpp>
class GameManager... |
mod control_character_remover;
mod deunicoder;
mod identity;
mod lowercase;
pub use control_character_remover::ControlCharacterRemover;
pub use deunicoder::DeunicodeNormalizer;
pub use identity::IdentityNormalizer;
pub use lowercase::LowercaseNormalizer;
use crate::Token;
pub trait Normalizer: Sync + Send {
fn n... |
// Retrieve a name for the entity referenced by this cursor.
func (c Cursor) Spelling() string {
o := cxstring{C.clang_getCursorSpelling(c.c)}
defer o.Dispose()
return o.String()
} |
// converts a CHAR to an INT
// returns -1 if invalid char
int ctoi(char ch) {
if(ch >= '0' && ch <='9') {
return (int)(ch-'0');
}
return 0;
} |
<filename>forms-flow-data-analysis-api/manage.py
"""Manage the database and some other items required to run the API."""
import logging
from api import create_app
APP = create_app()
if __name__ == '__main__':
logging.log(logging.INFO, 'Running the Manager')
APP.run()
|
<reponame>BlakeWilliams/rust-brainfuck<filename>src/brainfuck/program.rs
use std::io::File;
pub struct Program {
content: Vec<char>,
pub pointer: usize
}
impl Program {
pub fn new(file_path: &Path) -> Program {
let content = Program::read_program(file_path);
Program {
content: ... |
Impact of renal transplant on gonadal function
Objectives: We aimed at creating a clinical profile of end-stage renal disease patients' gonadal function and assessing the impact of renal transplant on gonadal dysfunction. We studied the influence of age, vascular anastomosis, dialysis vintage, and immunosuppression on... |
In a press release issued by the Mets on Monday morning, the club announced that WOR will broadcast regular season, postseason and Spring Training games, along with both pregame and postgame shows.
The Mets have agreed to a five-year multimedia partnership with Clear Channel Media and Entertainment, making 710 WOR the... |
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <algorithm>
#include <queue>
#include <vector>
#include <cmath>
using namespace std;
#define fi "input.txt"
#define fa "output.txt"
#define foru(i,l,r) for(int i=l;i<r;i++)
#define ford(i,l,r) for(int i=l;i>r;i--)
#define r... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module that contains Houdini utility functions and classes
"""
from __future__ import print_function, division, absolute_import
import hou
import hdefereval
def get_houdini_version(as_string=True):
"""
Returns version of the executed Houdini
:param as_... |
<reponame>karnkaul/veg<gh_stars>0
#ifndef VEG_TUPLE_HPP_B8PHUNWES
#define VEG_TUPLE_HPP_B8PHUNWES
#include "veg/type_traits/assignable.hpp"
#include "veg/internal/fmt.hpp"
#include "veg/type_traits/invocable.hpp"
#include "veg/util/get.hpp"
#include "veg/internal/fix_index.hpp"
#include "veg/cereal/bin_cereal.hpp"
#in... |
/**
*
*/
package com.temple.geo.service;
import com.temple.util.geo.Country;
import com.temple.util.json.AbstractJsonable;
import com.temple.util.json.JsonField;
/**
* @author flominou
*
*/
public final class FilterData extends AbstractJsonable {
@JsonField
private Country country;
@JsonField
private int p... |
<reponame>m4rr/ktotoneprav-podsync
package main
import (
"io/ioutil"
"log"
"strconv"
"strings"
"time"
"github.com/eduncan911/podcast"
rss "github.com/m4rr/yt-rss"
)
func readRSS(url *string) (feed *rss.Feed, parsErr error) {
if url == nil {
data, readErr := ioutil.ReadFile("rsss/rss.yt.orig.xml")
if rea... |
package net.aryaman.algo.misc;
/**
* @author aryamandas
*
*/
public class Player {
/**
* @return the slot
*/
public int getJersey() {
return jersey;
}
private String name;
private int jersey = -1;
private int slot = -1;
/**
* @return the slot
*/
public... |
<filename>src/cloudflare/runner.ts
import * as testing from 'start-testing'
import { CloudflareContext, CloudflareContextJSON, ExecutionContext } from './context.js'
import { CloudflareLogger } from './logger.js'
const defaultOptions = {
logger: new CloudflareLogger()
}
export class CloudflareRunner<E = any> exte... |
import { ColorResolvable, GuildMember, MessageEmbed } from 'discord.js';
import { Slash } from '../../Interfaces';
import moment from 'moment';
export const slash: Slash = {
name: 'userinfo',
description: 'Show user information',
testOnly: false,
options: [
{
type: 'USER',
name: 'user',
description: 'Us... |
package admin
import (
"errors"
"github.com/gin-gonic/gin"
"gorm.io/gorm"
"ice/app/model/data"
"ice/app/model/entity"
adminRequest "ice/app/model/request/admin"
adminResponse "ice/app/model/response/admin"
"ice/app/service"
"ice/utils/response"
)
func LoginByPhone(r *adminRequest.LoginAdmin) *response.Resp {... |
/**
* This function runs all code-testing methods.
*/
public static void runTests() {
Log.d("myTest", "This will print if the app is successfully run.");
Random randomizer = new Random();
} |
<reponame>teddyHV11/2PG-Dashboard
import { Injectable } from '@angular/core';
import { CanActivate } from '@angular/router';
import { UserService } from '../services/user.service';
import { GuildService } from '../services/guild.service';
@Injectable({
providedIn: 'root'
})
export class DashboardAuthGuard implements... |
Looking for news you can trust?
Subscribe to our free newsletters.
The overwhelming majority of scientists as well as most Americans agree that climate change is occurring and it’s mostly caused by human activity. But for climate skeptics, the consensus means nothing. Though global warming skeptics may be in the mino... |
package com.cracker.leetcodes.string;
/**
* This is Leetcode number 9: Is Palindrome.
*/
public class Palindrome {
public boolean isPalindrome(final int x) {
if (x < 0) {
return false;
}
return x == Long.parseLong(String.valueOf(new StringBuilder(String.valueOf(x)).reverse())... |
<reponame>Hamster601/zlano
package contract
const (
// EnvProduction represent the environment which build for production
EnvProduction = "production"
// EnvTesting represent the environment which build for test
EnvTesting = "testing"
// EnvDevelopment represent the environment which build for development
EnvDev... |
/*
* NAME
* XcmsQueryColors - Query Colors
*
* SYNOPSIS
*/
Status
XcmsQueryColors(
Display *dpy,
Colormap colormap,
XcmsColor *pXcmsColors_in_out,
unsigned int nColors,
XcmsColorFormat result_format)
{
return(_XcmsSetGetColors(XQueryColors, dpy, colormap,
pXcmsColors_in_out, nColors, ... |
import * as http from 'http';
import * as https from 'https';
import { Algorithm, Secret } from 'jsonwebtoken';
import * as Koa from 'koa';
import * as mysql2 from 'mysql2/promise';
export type TAnyObj = { [key: string]: any };
export interface IBasicConfig {
web: {
client_id: string;
project_id: ... |
def detection_file_upload(addr, auth, **kwargs):
path = '{0}/{1}/'.format(addr, 'detection_file_upload')
filepath = kwargs.get('filepath', None)
if not filepath:
raise Exception('filepath not found')
files = {'path': open(filepath, 'rb')}
new_kwargs = {}
for k, v in kwargs.items():
... |
//GetSpaceAppsAndServices returns the apps and the services in a space
func (api *APIHelper) GetSpaceAppsAndServices(summaryURL string) (Apps, Services, error) {
apps := []App{}
services := []Service{}
summaryJSON, err := cfcurl.Curl(api.cli, summaryURL)
if nil != err {
return nil, nil, err
}
if _, ok := summar... |
<gh_stars>10-100
#ifndef LUCE_HEADER_LUCE_HH
#define LUCE_HEADER_LUCE_HH
#include <Luce/Configuration.hh>
#include <Luce/Configuration/LuceInfo.hh>
#include <Luce/AI.hh>
#include <Luce/Algorithm.hh>
#include <Luce/Component.hh>
#include <Luce/Crypto.hh>
#include <Luce/Exception.hh>
#include <Luce/Functional.hh>
#incl... |
package pl.n32.mathtools.Fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.*;
import pl.n32.mathtools.Classes.NumberBaseConverter;
import pl.n32.mathtools.R;
import pl.n32.matht... |
// Topological sort Copiarlo de arriba completo
private static void countingPathsOnDag() {
Arrays.fill(num_paths, 0, V + 7, 0);
num_paths[s] = 1;
for (Integer cur: topoSort) {
for (Edge e : AdjList[cur]) {
num_paths[e.to] += num_paths[cur];
}
}
} |
package time
import "time"
type TimeService struct {
}
func (ts *TimeService) Now() time.Time {
return time.Now().UTC()
}
|
/**
* @author Prabal Nandi
*
*/
public class SchedulerServiceBuilder implements Builder<SchedulerServiceConfig> {
private volatile String name;
private volatile int maxThreadCount;
private volatile long idlewaittimeinmillis;
private volatile String dispatcherPolicy;
@Override
public SchedulerServi... |
package testutil
import (
"context"
"testing"
"github.com/stretchr/testify/require"
"sigs.k8s.io/controller-runtime/pkg/client"
)
func InstallTektonPipeline(t *testing.T, ctx context.Context, cl client.Client) {
require.NoError(t, doInstallAndWait(ctx, cl, "tekton-pipelines", "tekton"))
}
|
<filename>apps/web-server/src/hooks/state/useCharacterPieces.ts
import React from 'react';
import { keyNames, recordToArray } from '@flocon-trpg/utils';
import { useCharacters } from './useCharacters';
import _ from 'lodash';
export const useCharacterPieces = (boardId: string) => {
const characters = useCharacters... |
// _neighbor finds the normalized ijk coordinates of the hex in the specified digit
// direction from the specified ijk coordinates. Works in place.
// `ijk`: The ijk coordinates.
// `digit`: The digit direction from the original ijk coordinates.
func _neighbor(ijk *CoordIJK, digit Direction) {
if digit > CENTER_DIGIT... |
/*
* Get the current monotonic time in ms.
*/
static long
monotonic_time_ms()
{
struct timespec t;
if (clock_gettime(CLOCK_MONOTONIC, &t) == -1) {
err(3, "clock_gettime");
}
return (t.tv_sec * 1e3) + (t.tv_nsec / 1e6);
} |
During his March 28 comments on “gun violence,” President Obama once again claimed that 40% of gun purchases take place without a background check.
The claim is meant to apply to new gun sales and is patently false, as Breitbart News demonstrated when Obama first used the 40% figure during a speech on Jan. 16.
As Bre... |
/**
* This sample class demonstrates how to plug-in a new workbench view. The view shows data obtained from the model. The sample creates a dummy model on the fly, but a real implementation would connect
* to the model available either in this or another plug-in (e.g. the workspace). The view is connected to the mo... |
<gh_stars>1-10
#pragma once
#include <iostream>
class Vehicle
{
public:
// Sedan and Hatchback both have a price.
virtual double vehiclePrice() = 0;
// Sedan and Hatchback both have doors.
virtual int vehicleNumberOfDoors() = 0;
// Sedan and Hatchback both have a trunk.
virtual int vehicleTrunkSiz... |
Machine Vision-Based Positioning and Inspection Using Expectation–Maximization Technique
Precision positioning is very important for automatic assembly and inspection in the electronic manufacturing process. In this paper, we propose a fast image alignment method using the expectation–maximization (E–M) technique. The... |
// Stop closes the channel returned by Done() and propagates the call to all child Routines
// created by Child().
func (me *routines) Stop() {
if me != nil {
defer func() { recover() }()
close(me.doneCh)
}
} |
More than 13 years after The Killers debuted on the Billboard 200 albums chart, the rock band scores their first No. 1 with its fifth studio effort, Wonderful Wonderful. The set -- which was released Sept. 22 through Island Records -- debuts atop the chart with 118,000 equivalent album units earned in the week ending S... |
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
String name ="rose";
Banjo llamarNombre = new Banjo();
System.out.println(llamarNombre.areYouPlayingBanjo(name));
} |
class Client:
"""Minimal implementation of http://en.wikipedia.org/wiki/Security_Assertion_Markup_Language
guided by http://dev.e-taxonomy.eu/trac/wiki/ShibbolethProtocol
Authentication is done lazily. If no username nor password is provided and no
authentication is required, the request succeeds without inter... |
No association between proton pump inhibitor use and dementia risk: data mining of US Food and Drug Administration adverse event reporting system
Proton pump inhibitors (PPIs) were widely used around the world. Studies suggested conflicting results between PPIs treatment and the risk of dementia. This study examined... |
// ReverseQueryTuplesFromSubjectNamespace constructs a ReverseTupleQuery from this tuple query.
func (ctq TupleQuery) ReverseQueryTuplesFromSubjectNamespace(subjectNamespace string) datastore.ReverseTupleQuery {
ctq.TracerAttributes = append(ctq.TracerAttributes, SubNamespaceNameKey.String(subjectNamespace))
ctq.Init... |
#include "src/status-code-data/status-code-data-tests.cpp"
#include "src/status-code-finder/status-code-finder-tests.cpp"
#include "src/status-code-not-found-exception/status-code-not-found-exception-tests.cpp"
#include "src/status-code-pretty-print/status-code-pretty-print-tests.cpp"
#include "src/argument-validator/a... |
export default function() {
return { name: 'stable' };
}
|
<filename>tests/ctest/test_spec.c
/**
* @file
*
* @brief
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*/
#include <tests.h>
#include <kdbprivate.h>
static void test_lookupSingle (void)
{
printf ("Test lookup single\n");
Key * specKey = keyNew ("user:/abc", KEY_META, "override/#0... |
/*
* obj_move_op -- main operation of the obj_move benchmark.
*/
static int
obj_move_op(struct benchmark *bench, struct operation_info *info)
{
struct obj_worker *obj_worker = (struct obj_worker *)info->worker->priv;
POBJ_LIST_MOVE_ELEMENT_BEFORE(obj_bench.pop, &obj_worker->head,
&obj_worker->list_move->h... |
<gh_stars>1-10
export type ConstructorType = {
clientId: string
clientSecret: string
requestId?: string
verbose?: boolean
}
export default abstract class VanillaWMPlugin<EventType> {
protected static VANILLA_API_URL = 'https://wm.vanilla.so/graphql'
protected clientId: string
protected readonly verbose... |
def provisioning_percentage(self, provisioning_percentage):
self._provisioning_percentage = provisioning_percentage |
#include <GL/glew.h>
#include <GL/GL.h>
#include <gui/OpenGLWidget.hpp>
#include <gui/MainWindow.hpp>
#include <asset/Asset.hpp>
#include <engine/Util.hpp>
#include <QMouseEvent>
#include <gui/Scene001.hpp>
#include <glm/gtx/rotate_vector.hpp>
[[maybe_unused]] OpenGLWidget::OpenGLWidget (QWidget *parent)
... |
def factor_group_risks(
self, weights: PortfolioWeights
) -> Dict[str, float]:
out = {}
for group, factors in self.factor_model.factor_group_mapping.items():
loading = self.factor_model.loadings.loc[factors]
cov_f = self.factor_model.covariance_factor.loc[factors, fac... |
/** Mark that a circuit id <b>id</b> can be used again on <b>chan</b>.
* We use this to re-enable the circuit ID after we've sent a destroy cell.
*/
void
channel_mark_circid_usable(channel_t *chan, circid_t id)
{
chan_circid_circuit_map_t search;
chan_circid_circuit_map_t *ent;
memset(&search, 0, sizeof(search)... |
Applying generalizability theory to estimate habitual activity levels.
PURPOSE
Relative and absolute decisions in physical activity research are commonly based on a single assessment period that may not represent habitual activity behavior. This study used the generalizability theory to 1) quantify multiple sources of... |
class FSBWrapper:
"""
The FSB implementation
"""
def __init__(self):
# Do any initialization here, like loading the omdel
model_checkpoint = "EleutherAI/gpt-j-6B"
# model_checkpoint = "gpt2"
self.model, self.tokenizer, self.max_seq = load_model(args,model_checkpoint,devi... |
Selected by bioinformatics and molecular docking analysis, Dhea and 2–14,15-Eg are effective against cholangiocarcinoma
Object To identify novel targets for the diagnosis, treatment and prognosis of cholangiocarcinoma, we screen ideal lead compounds and preclinical drug candidates with MYC inhibitory effect from the Z... |
/**
* print menu for report Service backup.
*
* <pre>
*
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 11, 2012 13781 wkwock Initial creation
*
* </pre>
*
* @author wkwock
* @version 1.0
*/
public cla... |
<filename>Scripts/audio_merger.py
from moviepy.editor import *
audio_path = 'Results/audio.mp3'
created_video_path = 'Results/my_video.mp4'
final_video = 'Results/my_video2.mp4'
clip = VideoFileClip(created_video_path)
audio_file = AudioFileClip(audio_path)
final_clip = clip.set_audio(audio_file)
final_clip.write_vid... |
/**
* @brief The function is used to set HCLK frequency.
* @param[in] u32Hclk Specified HCLK frequency.
* @return HCLK frequency.
* @details The frequency's unit is Hz. The range of u32Hclk is 1 MHz ~ 100 MHz.
*/
uint32_t CLK_SetCoreClock(uint32_t u32Hclk)
... |
Domain Specific Sense Disambiguation with Unsupervised Methods
Most approaches in sense disambiguation have been restricted to supervised training over manually annotated, non-technical, English corpora. Application to a new language or technical domain requires extensive manual annotation of appropriate training corp... |
import java.math.BigDecimal;
public interface OperacoesBancarias {
BigDecimal sacar(BigDecimal valorSaque);
void depositar(BigDecimal valorDeposito);
void transferir(Conta contaDestino, BigDecimal valorTransferencia);
void investir(Cliente cliente, BigDecimal valorInvestido, int tempoInvestimento);
... |
Orthokeratinized versus parakeratinized odontogenic keratocyst: Our institutional experience
Introduction: The odontogenic keratocyst (OKC) is quite unique among odontogenic cysts in its specific histological features and in clinical characteristics. The OKC has two variants orthokeratinized odontogenic cyst (OOC) and ... |
n=int(input())
for i in range(n):
v=0
s=input()
v=len(s)
if v>10:
sn=str(s[0])
ds=str(v-2)
sp=str(s[v-1])
print(sn+ds+sp)
else:
print(s) |
def safeOpenClipboard():
assert( not _hasTheClipboardOpen() )
totalTime = 0
success = False
while not success:
try:
win32clipboard.OpenClipboard( 0 )
success = True
except pywintypes.error:
if totalTime < CLIPBOARD_OPEN_WAIT_AMOUNT:
sle... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.