content
stringlengths
10
4.9M
Teachers and principals have the right to search through students' personal diaries, cellphones or laptops under new guidelines issued by the Education Ministry. The guidelines, released today by Education Minister Anne Tolley, say searches and confiscations affect student rights and their privacy and should only be c...
#ifndef _MANIF_MANIF_SE_2_3TANGENT_H_ #define _MANIF_MANIF_SE_2_3TANGENT_H_ #include "manif/impl/se_2_3/SE_2_3Tangent_base.h" namespace manif { namespace internal { //! Traits specialization template <typename _Scalar> struct traits<SE_2_3Tangent<_Scalar>> { using Scalar = _Scalar; using LieGroup = SE_2_3<_Scal...
# Problem: https://www.hackerrank.com/challenges/find-a-string/problem def count_substring(string, sub_string): str_len, sub_len, occurences, start = len(string), len(sub_string), 0, 0 for _ in range(str_len - sub_len +1): if string[start:start+sub_len] == sub_string: occurences += 1 ...
export class LineItemDialogPage { readonly tag = 'ish-line-item-edit-dialog'; changeVariationSelection(values: { attr: string; value: string }[]) { for (const x of values) { // tslint:disable-next-line:ban cy.get('ngb-modal-window') .find(x.attr) .select(x.value); } } save(...
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_274DA366004E11DCB1DDFE2E56D89593 #define UUID_274DA366004E11DCB1DDFE2E56D89593 namesp...
<filename>src/types.ts import Context from "./context"; import http from "http"; export type LambdaHandler = ( event: object, context: Context, callback: Callback ) => Promise<object> | void; export type LambdaResponseValue = object | string | number | undefined; export type Callback = (err: null | Error, valu...
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v2/resources/extension_feed_item.proto package com.google.ads.googleads.v2.resources; public interface ExtensionFeedItemOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v2.resources.Exte...
/** * Created by genyus on 25/11/15. */ public class APIConst { public final static String API_ROTTEN_TOMATOES_KEY = "4xdka4hpzszevvz2aba3xmtm"; public final static String API_PURCHASE_TOKEN = "rKfVOBGZrvJIOdGmXDHhFvOCVsyyzIZE"; public final static String API_PURCHASE_BASE_URL = "http://api-public.guide...
<gh_stars>0 /* SCREENWaitBlanking.c AUTHORS: <EMAIL> mk PLATFORMS: All. HISTORY: 01/23/06 mk Created. 05/31/11 mk Add 3rd method of waiting for vblank, based on vblank counter queries on supported systems (OS/X and Linux) to work...
// DiscordBotsGGRoundTripper is an http.RoundTripper to mock the response of // the discord.bots.gg API. func DiscordBotsGGRoundTripper(t *testing.T) http.RoundTripper { return roundTripperFunc( func(req *http.Request) (*http.Response, error) { defer func() { closeErr := req.Body.Close() if closeErr != ni...
<filename>src/main/java/ui/list_item/TaskItem.java<gh_stars>0 package ui.list_item; import javafx.geometry.Pos; import javafx.scene.control.Label; import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; import javafx.scene.layout.Priority; import model.Task; import model.Team; public class TaskItem { p...
/** * A thread which does all of the {@link FileSystem}-related operations for * tasks. It picks the next task in the queue, promotes outputs of * {@link TaskStatus.State#SUCCEEDED} tasks & discards outputs for * {@link TaskStatus.State#FAILED} or {@link TaskStatus.State#KILLED} tasks. */ private class...
use fs::{off_t, FileDesc}; use prelude::*; use process::{get_current, Process, ProcessRef}; use std::fmt; // TODO: Rename VMSpace to VMUniverse #[macro_use] mod vm_range; mod process_vm; mod vm_area; mod vm_domain; mod vm_space; pub use self::process_vm::ProcessVM; pub use self::vm_range::{VMRange, VMRangeTrait}; /...
<filename>models/src/main/java/dev/zacsweers/jsonserialization/models/java_serialization/ResponseJ.java package dev.zacsweers.jsonserialization.models.java_serialization; import com.google.gson.annotations.SerializedName; import com.squareup.moshi.Json; import java.util.List; import java.util.Objects; public class Re...
<filename>app/src/main/java/arl/chronos/EscogerSonido.java package arl.chronos; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.content.ContentUris; import android.content.Intent; import android....
// Add a super, only a existing super can add a new and the super is not existed func (k Keeper) AddSuper(ctx sdk.Context, super types.Super) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(&super) address, _ := sdk.AccAddressFromBech32(super.Address) store.Set(types.GetSuperKey(address), bz) }
<reponame>nagineni/chromium-crosswalk<gh_stars>0 // Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <string> #include "chrome/browser/extensions/activity_log/activity_log.h" #include "chrome/brow...
def randWarp(win): C = 0.1 ang = np.random.uniform(-1. * C, C) s = np.sin(ang) c = np.cos(ang) warp_transform = \ np.array([[c + np.random.uniform(-1. * C, C), -s + np.random.uniform(-1. * C, C), 0.], \ [s + np.random.uniform(-1. * C, C), c + np.random.uniform(-1. * C, C), 0.]]) ...
Max Biaggi and Aprilia have been enjoying an exclusive four-day World Superbike test at Losail ahead of the season fianle in Qatar next weekend. Last week the two-time World Superbike champion announced via Twitter he would be back with the Aprilia Racing Team for the final round of the season having previously made h...
import os import numpy as np import pandas as pd import random import cv2 import csv import glob from sklearn import model_selection from keras import backend as K from keras import models, optimizers from keras.models import Sequential from keras.layers import Conv2D, Cropping2D, Dense, Dropout, Flatten, Lambda, Acti...
<gh_stars>0 package com.show.tt.ui.widget.message; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.ViewGroup; import com.show.tt.DB.entity.MessageEntity; import com.show.tt.DB.entity.UserEntity; import com.show.tt.R; import com.show.t...
// // GBAEmulationViewController.h // GBA4iOS // // Created by <NAME> on 7/19/13. // Copyright (c) 2013 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> #import "GBAROM.h" @interface GBAEmulationViewController : UIViewController @property (strong, nonatomic) GBAROM *rom; @property (assign, nonatomic) CGFl...
from operator import itemgetter import itertools class Light: def __init__(self, _switch_list: list, p: int): self.switch_list = _switch_list self.p = p def is_on(self, all_switch_states: list) -> int: implemented_switches = itemgetter(*self.switch_list)(all_switch_states) if ...
//package robotcollisions; import java.util.*; import java.io.*; public class robotcollosions { static int[] ans; static boolean[] v; static int m; public static void solve(int[][] robots) { //System.out.println("FUNCTION CALL"); TreeSet<int[]> left = new TreeSet<int[]>((a, b) -> a[0] - b[0])...
/** * Find the intersection of the bounding box and the line formed by the two * points. If known, the first point should be the point inside the bounding * box while the second should be the point outside. And this should only be * called when you know there is an intersection otherwise null will b...
/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { $el, bind, getBooleanTypeAttr, getNumTypeAttr, getStrTypeAttr, removeAttrs, setHtml } from '../../dom-utils'; import { warn } from '../../mixins'; import { type, validComps } from '../../utils'; import PREFIX from '../pre...
Pitfalls in CT diagnosis of appendicitis: Pictorial essay Despite the high diagnostic accuracy of CT for appendicitis, numerous pitfalls exist that may result in a misdiagnosis. This pictorial review outlines the potential pitfalls in the CT diagnosis of appendicitis that includes atypical position of the appendix and...
/** * The watcher of the nodePath */ private class RootNodeWatcher implements Watcher { @Override public void process(WatchedEvent event) { synchronized (mapLock) { if (event.getType() == Event.EventType.NodeDeleted) { LOGGER.warn("The node {} ha...
package net.raysforge.gltf; import java.io.File; import java.io.IOException; import java.util.HashMap; public class TestBSP2GLTF_textured { private static final String outDir = "D:\\Action\\id\\Q3\\Quake3\\baseq3\\tex"; public static HashMap<String, String> fileNameMap = new HashMap<String, String>(); // Qua...
/** * Creates and returns a GenericRegisterTable of the appropriate type. * * @param account the account to create a new table for * @return returns a GenericRegisterTable of the appropriate type */ public static RegisterTable generateTable(final Account account) { AbstractRegisterTabl...
#include "RSA.h" #include "DataStream.h" #include <boost/multiprecision/cpp_int.hpp> #include <boost/multiprecision/miller_rabin.hpp> #include <utility> using boost::multiprecision::cpp_int; RSAClient::RSAClient(size_t _bit_size, int _e) { bit_size = _bit_size; e = _e; cpp_int p = gen_prime(bit_size, _e);...
/* * This is an example of a more complex path to really test the tuning. */ @Disabled @Autonomous(group = "drive") public class AutoBlueTestWithObjectDetect extends LinearOpMode { Hardware22 robot; SampleMecanumDrive drive; TrajectoryGenerator generator; OpenCvCamera webcam; //-1 for debug, but ...
import com.jayfella.mesh.marchingcubes.ArrayDensityVolume; import com.jayfella.mesh.marchingcubes.DensityVolume; import com.jayfella.mesh.MarchingCubesMeshGenerator; import com.jme3.app.SimpleApplication; import com.jme3.light.AmbientLight; import com.jme3.light.DirectionalLight; import com.jme3.material.Material; impo...
// instructionArgs collects all the arguments to an instruction. func instructionArgs(node *node32) (argNodes []*node32) { for node = skipWS(node); node != nil; node = skipWS(node.next) { assertNodeType(node, ruleInstructionArg) argNodes = append(argNodes, node.up) } return argNodes }
/* * Called from debugger/panic on cpus which have been stopped. We must still * process the IPIQ while stopped. * * If we are dumping also try to process any pending interrupts. This may * or may not work depending on the state of the cpu at the point it was * stopped. */ void lwkt_smp_stopped(void) { glo...
/** * * @author P. Mark Anderson */ public class TaskDef extends IdDef implements Comparator { public TaskDef() { super(); setDefName("Task"); } public TaskDef(Map m) { super(m, "Task"); } public int getOrdinal() { return Integer.parseInt((String)getProperty("ordinal")); } public int compare(O...
You are being watched. The government has a secret system —a machine— that spies on you every hour of every day. I know, because I built it. I designed the machine to detect acts of terror, but it sees everything. So begins the opening monologue on the CBS television show Person of Interest, spoken by the designer of ...
<reponame>msamogh/rasa import logging from collections import namedtuple from typing import Any, List, Text, Dict from rasa.core.events import Event from rasa.core.frames import FrameSet from rasa.core.frames.utils import ( push_slots_into_current_frame, pop_slots_from_current_frame, frames_from_tracker_sl...
package org.kakara.client; import org.kakara.client.join.JoinDetails; import org.kakara.client.join.LocalJoin; import org.kakara.client.local.game.ClientResourceManager; import org.kakara.client.local.game.IntegratedServer; import org.kakara.client.local.game.commands.ClientCommandManager; import org.kakara.core.comm...
/*Package resource provides tools for the Resource Description Framework (RDF), see https://www.w3.org/RDF/. */ package resource
Pre-course Complete the registration survey to provide information about yourself, your school or district, and your goals for participating in the Learning Differences MOOC-Ed. Thinking Differently about Student Learning Participants will further their thinking about Learning Differences and the "myth of average" a...
/* * Copyright 2013 SURFnet bv, The Netherlands * * 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 o...
// SPDX-License-Identifier: GPL-2.0-only #include <linux/module.h> #include <linux/platform_device.h> #include <linux/mod_devicetable.h> #include <linux/spi/spi.h> struct rtspi { void __iomem *base; }; /* SPI Flash Configuration Register */ #define RTL_SPI_SFCR 0x00 #define RTL_SPI_SFCR_RBO BIT(28) #define RTL_S...
import torch import numpy as np from lib.evaluator.iou import iou def nms(pred, iou_threshold, score_threshold): '''Non maxima suppresion for predictions''' #filter by score threshold idx = pred[:,-1] > score_threshold pred = pred[idx] #order predictions by descending score idx = np.argsort...
<reponame>AeroPython/AeroPy # coding: utf-8 """Tests of the ISA functions. All numerical results are validated against the `COESA`_ standard. .. _`COESA`: http://hdl.handle.net/2060/19770009539 Based on scikit-aero (c) 2012 scikit-aero authors. """ import numpy as np from numpy.testing import (assert_equal, assert_...
/* * JBoss, Home of Professional Open Source * * Copyright 2015 Red Hat, Inc. and/or its affiliates. * * 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...
<filename>crates/ruma-events/src/room/name.rs<gh_stars>1000+ //! Types for the `m.room.name` event. use ruma_events_macros::EventContent; use ruma_identifiers::RoomNameBox; use serde::{Deserialize, Serialize}; /// The content of an `m.room.name` event. /// /// The room name is a human-friendly string designed to be d...
Republican Gov. Sam Brownback signed into law Thursday restrictions on how much cash Kansas welfare recipients can withdraw from ATMs using their benefits cards, a move some critics slammed as a “tax on the poor." The measure set the withdrawal limit at $25 per transaction. With an average withdrawal fee in U.S. of $4...
<filename>tests/kamereon/test_kamereon_vehicle_data.py<gh_stars>0 """Tests for Kamereon models.""" from typing import cast import pytest from tests import fixtures from renault_api.kamereon import enums from renault_api.kamereon import models from renault_api.kamereon import schemas from renault_api.kamereon.helpers ...
//! Returns the number of search grids static int numGrids(const GridSet::DomainSetup& domainSetup) { static constexpr int sc_numGridsForTestParticleInsertion = 2; if (domainSetup.doTestParticleInsertion) { return sc_numGridsForTestParticleInsertion; } else { int numGrids = 1; ...
<filename>src/main/java/lab/rest1/service/impl/UserServiceImpl.java package lab.rest1.service.impl; import lab.rest1.domain.Location; import lab.rest1.domain.Owner; import lab.rest1.domain.Pet; import lab.rest1.domain.User; import lab.rest1.repository.UserRepository; import lab.rest1.service.UserService; import org.ap...
// Ensure that a 3x1 trigger focuses on the tap coordinate. TEST_F(MagnifierTest, TriggerFocus) { MockMagnificationHandler handler; magnifier()->RegisterHandler(handler.NewBinding()); static constexpr glm::vec2 tap_coordinate{.5f, -.25f}; SendPointerEvents(3 * TapEvents(1, tap_coordinate)); RunLoopFor(kTestTr...
/** * A two dimensional vector point in space. Contains an x and a y floating point value. * @author Peter Verzijl * @version 1.0a */ public class Vector2 { private float x; private float y; public static final Vector2 ZERO() { return new Vector2(0, 0); } public static final Vector2 UNITY() { return new Ve...
package com.jdt.fedlearn.client.netty; import com.jdt.fedlearn.client.util.ConfigUtil; import io.netty.bootstrap.Bootstrap; import io.netty.channel.*; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioSocketChannel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public cla...
/** * Checks that the writing transaction can proceed and updates the database * to reflect the presence of changes. * As this {@link Writer} is meant to be wrapped in {@link ThreadSafeWriter}, it has * to be thread-safe unless one key is accessed for modification concurrently. This implies * that lazy w...
Governments must start holding companies criminally accountable for serious human rights abuses, including those committed overseas, Amnesty International said in launching a new set of principles for dealing with corporate crime. A group of legal experts, with the support of Amnesty International and the Internationa...
package com.telecominfraproject.wlan.client.models.events.utils; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.fasterxml.jackson.annotation.JsonCreator; ...
{- Dinner with Ambiants: ICFP Programming Contest 2004 Programming Assignment for Advanced Functional Programming Universiteit Utrecht, Software Technology Master -} module Simulator.Base where import Control.Monad.State import Data.Array.IO import Data.Bits import Dat...
// StringToShare will split a share string into a Point. func StringToShare(s string) (Point, error) { a := strings.Split(s, "-") if len(a) != 2 { return Point{0, nil}, ErrInvalidSyntax } x, err := strconv.Atoi(a[0]) if err != nil { return Point{0, nil}, err } y := gmp.NewInt(0) y.SetString(a[1], 16) retur...
use core::convert::TryFrom; use core::hash::Hash; use core::ops::*; // TODO(teaiwthsand): add things like wrapping add/sub/mul/div and others to these types // TODO(teawithsand): add outpu=self for all ops /// Type of single digit used in bignum operations. /// Implemented by all primitive types. /// Endianness shoul...
<gh_stars>0 /* * Copyright 2006-2008 NMaven Project * * 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 requir...
/** * Created by cameronearle on 9/23/16. */ public class ServerPinger implements Runnable { private String address; private ServerConnectDialog dialog; private boolean finalResult; public ServerPinger(String address, ServerConnectDialog dialog) { this.address = address; this.dialog ...
Abstract 3142: BRMS1 alters the tumor inflammatory signature and immune infiltration in lung adenocarcinoma Background: Lung adenocarcinoma (LUAD) is the leading cause of cancer-related deaths. Metastatic cancer is highly fatal which contributes to at least 90% of cancer-associated morbidities and mortalities. Durin...
def percentile(self, percent): if percent < 0 or percent > 1: raise Exception('percent must be between 0 and 1') index = int(round(percent * len(self.cdfx))) index = min(len(self.cdfy) - 1, index) return self.cdfx[index]
/** * Base class for implementations that access the test database * * @author Filip Neven * @author Tim Ducheyne */ abstract public class BaseDatabaseAccessor implements DatabaseAccessing { /** * The unitils configuration */ protected Properties configuration; /** * Provides connec...
<filename>homeassistant/components/yamaha_musiccast/__init__.py """The MusicCast integration.""" from __future__ import annotations from datetime import timedelta import logging from aiomusiccast import MusicCastConnectionException from aiomusiccast.capabilities import Capability from aiomusiccast.musiccast_device im...
/***************************************************************************** * draw sign/icon/symbol in the output picture *****************************************************************************/ void puzzle_draw_sign(picture_t *p_pic_out, int32_t i_x, int32_t i_y, int32_t i_width, int32_t i_lines, const char...
/** * Sample rows. Filter rows based on line number * * @author Samatar * @since 2-jun-2003 */ public class SampleRows extends BaseStep implements StepInterface { private static Class<?> PKG = SampleRowsMeta.class; // for i18n purposes, needed by Translator2!! private SampleRowsMeta meta; private SampleRows...
<filename>20211SVAC/G14/InterpreteXPath/AST/Etiqueta.ts<gh_stars>1-10 import { Nodo } from "./Nodo"; import NodoAST from "./NodoAST"; export class Etiqueta extends Nodo{ identificador:string; fila: number; columna: number; etiqueta: any; valor:any; constructor(id:string, fila:numbe...
<reponame>kitsonk/dom-selector import domSelector = require('./interfaces'); type DomTypes = Node|HTMLElement; type ISelectorObject = domSelector.ISelectorObject; /* Document */ var _doc: Document = typeof document !== 'undefined' ? document : undefined; export function getDoc(): Document { return _doc; } expor...
// // Created by <NAME> on 12.04.17. // #include "InputDevice.h" #include <EventQueue/EventType.h> #include <EventQueue/Event.h> void InputDevice::check() { for (auto &i:pins) { // because it's pull-up... int value = is_low(i.header, i.pin); if (value != i.value) { i.value = va...
/** * The application class for the OAuth2 REST exposure. * * @author Jens Borch Christiansen */ @ApplicationPath(OAuth2Application.API_ROOT) public class OAuth2Application extends Application { public static final String API_ROOT = "/"; private final Set<Class<?>> classes = new HashSet<>(); public O...
//! CO compiler backend interface definition. //! //! Backend is a part of the compiler that receives the compiled and type-checked program IR and //! does something useful with it, for example, translating it into a target language, or executing //! it directly. use crate::program::Program; /// Common interface for ...
def removeComments(text): pattern = r""" ## --------- COMMENT --------- //.*?$ ## Start of // .... comment | ## /\* ## Start of /* ... */ comment [^*]*\*+ ## Non-* followed by 1-or-more *'s ...
<gh_stars>0 #include "Man.h" #include "../AI/AiRole.h" #include <Engine/Modules/Collide.h> Man::Man(World *world, Vector2D location, Vector2D scale, Rotator rotation) : Body(world, location) { this->setType(ActorType::Living); this->speed = 50.0f; this->updateActorId("Man"); this->setFraction(Fraction::BadGu...
// This is a cmakeify.yml that has "abi" instead of abis. @NotNull public static TestManifest singleABI() throws MalformedURLException { return getResolvedManifest("coordinate:\n" + " groupId: com.github.jomof\n" + " artifactId: sqlite\n" + " version: 0.0.0\n" + "android:\n" + ...
/** * If sibling is black, double black node is left child of its parent, siblings right child is black * and sibling's left child is red then do a right rotation at siblings left child and swap colors. * This converts it to delete case6. It will also have a mirror case. */ private void deleteCase5(...
import fs from 'fs'; import path from 'path'; import matter from 'gray-matter'; import { mdPostTypes } from './interfaces'; export const getMdPosts = async () => { // get files from the 'md-posts' directory const files = fs.readdirSync(path.join('md-posts')); let posts = []; const headers = { Authorizati...
def _create_target_filter(self, target, target_filter='', ancillaries=None): target = target.lower() defaults = ['primary', 'color-enhanced', 'secondary', 'ancillary', 'stellar library', 'flux standards'] assert target in defaults, 'target list can only contain one of {0}'.format(defaults) ...
California Coaster Kings was at the Opening Night of Universal Studios Hollywood’s Halloween Horror Nights 2015, and with Front of the Line passes visited every maze, every scare zone, and of course… the Terror Tram and the brand new JABBAWOCKEEZ show. In this particular review article, we’re looking at the 6 mazes the...
/** * @author Mark Vollmary * */ public class Type<T> { private final java.lang.reflect.Type type; protected Type() { super(); type = getTypeParameter(getClass()); } protected Type(final java.lang.reflect.Type type) { super(); this.type = type; } private static java.lang.reflect.Ty...
// Cors is a middleware to handle Cross Origin Request func (m Middleware) Cors(h http.Handler) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { baseOrigin := r.Header.Get("Origin") if r.Method == "OPTIONS" { log.Print("preflight detected: ", r.Header) w.Header().Add("Connection", "ke...
def finish(self): self.mean = mean(self.list) self.median = median(self.list) self.standard_deviation = standard_deviation(self.list) self._finish_stats()
.......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... WASHINGTON – Why does our political system make it impossible even to consider solutions to gun violence? After the massa...
<gh_stars>0 package node import ( "fmt" "testing" "time" "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes/fake" operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" "github.com/openshift/library-go/pkg/operator/staticpod/controller/com...
def write_audio(path, audio, sample_rate): soundfile.write(file=path, data=audio, samplerate=sample_rate)
/// Destroys a surface. /// /// The supplied context must be the context the surface is associated with, or this returns /// an `IncompatibleSurface` error. /// /// You must explicitly call this method to dispose of a surface. Otherwise, a panic occurs in /// the `drop` method. pub fn destroy_surface( &self, ...
About This Game Two hundred persistent Captains that are able to do everything the player can, including forming dynamic factions, building structures, controlling territory, and going to War. A true living galaxy that is not player centric. It will develop differently each game through the interactions of the agents...
def make_scope_str(cls, extra): if extra is None: return cls.DEFAULT_SCOPE elif isinstance(extra, basestring): return cls.DEFAULT_SCOPE + ',' + extra else: return cls.DEFAULT_SCOPE + ','.join(extra)
/** * Returns the list of formats that are supported out of the box. */ static QStringList supportedFormats() { QStringList formats; QStringList filter = QStringList() << "*.mustache"; QFileInfoList entries = QDir(":/templates").entryInfoList(filter); for (const QFileInfo &entry : entries) { f...
/** * The Class Movie. */ public class Movie { /** The title. */ private String title; /** The running time. */ private int runningTime; /** The dor. */ private LocalDate dor; /** The genre. */ private String genre; /** The description. */ private String description; /** The poster URL. */ pri...
/** * Handles a connection to a server. */ private void handleConnection(Address address, Connection connection, Throwable error, CompletableFuture<Connection> future) { if (open) { if (error == null) { setupConnection(address, connection, future); } else { connect(future); }...
// SetUserAgent sets the user agent value. func (service *BaseService) SetUserAgent(userAgentString string) { if userAgentString == "" { userAgentString = service.buildUserAgent() } service.UserAgent = userAgentString }
<filename>engines/experiment/plugin/rpc/runner/rpc.go package runner import ( "encoding/json" "net/http" "github.com/gojek/turing/engines/experiment/plugin/rpc/shared" "github.com/gojek/turing/engines/experiment/runner" ) // rpcClient implements ConfigurableExperimentRunner interface type rpcClient struct { sha...
<filename>types/es-aggregate-error/implementation.d.ts /// <reference types="node" /> declare class AggregateError extends Error implements NodeJS.ErrnoException { readonly errors: ReadonlyArray<any>; readonly name: 'AggregateError'; readonly message: string; // Using `any` here, to match Node's own t...
class Sampler: """Base class for log emission posterior probability samplers to be used in the hybrid ADVI scheme.""" def __init__(self, hybrid_inference_params: 'HybridInferenceParameters'): self.hybrid_inference_params = hybrid_inference_params @abstractmethod def update_approximation(self, a...
def show_param_info(self, full_args_list, plugin): logging.info("\nInformation for %s", self.show_plugin(plugin)) logging.info("\nDescription: %s", str(full_args_list["Description"])) self.list_args(full_args_list["mandatory"], True) if len(full_args_list["Optional"]) > 0: se...
/** * Deletes all tables present in the mapping object. * @throws IOException */ @Override public void deleteSchema() { if (mapping.getTables().isEmpty()) throw new IllegalStateException("There are not tables defined."); if (preferredSchema == null){ LOG.debug("Delete schemas"); if (mapp...
// UpdateDatadogAlertChannel updates a single datadog alert channel integration func (svc *IntegrationsService) UpdateDatadogAlertChannel(data DatadogAlertChannel) ( response DatadogAlertChannelResponse, err error, ) { err = svc.update(data.IntgGuid, data, &response) return }
#include <linux/kernel.h> #include <linux/sched.h> #include <linux/sched/clock.h> #include <linux/mm.h> #include <asm/cpufeature.h> #include <asm/msr.h> #include "cpu.h" static void early_init_transmeta(struct cpuinfo_x86 *c) { u32 xlvl; /* Transmeta-defined flags: level 0x80860001 */ xlvl = cpuid_eax(0x80860000);...