content
stringlengths
10
4.9M
//ip Quaternion<F> for QArray impl<F, V3, V4> Quaternion<F, V3, V4> for QArray<F, V3, V4> where F: Float, V3: Vector<F, 3>, V4: Vector<F, 4>, { fn from_array(data: [F; 4]) -> Self { Self::of_vector(V4::from_array(data)) } fn as_rijk(&self) -> (F, F, F, F) { quat::as_rijk(self.dat...
import React, { useContext } from "react"; import InputTextField from "../../controls/InputTextField"; import { IPropsOrder } from "."; import { updateAllOrder } from "../../../store/actions/currentOrderActions"; import { CurrentOrderContext } from "../../../store/contexts/CurrentOrderContext"; export default function...
// EFFECTS: adds to shippingPackages if there is enough space private void addToShipping(Package p) { int currentCap = storage.size() + shippingPackages.size(); if (currentCap < MAX_CAPACITY) { shippingPackages.add(p); } }
def issueunique(self, root_name, asset_tags, ipfs_hashes=None, to_address="", change_address=""): asset_tags_str = [str(x) for x in asset_tags] r = self._call('issueunique', str(root_name), asset_tags_str, ipfs_hashes, str(to_address), str(change_address)) txid = r[0] return lx(txid)
@import redecl_merge_top; @class A; @class A; @interface B + (B*) create_a_B; @end @class A; @protocol P1; @protocol P2 - (void)protoMethod2; @end struct S1; struct S2 { int field; }; struct S1 *produce_S1(void); void consume_S2(struct S2*); // Test declarations in different modules with no common initial // ...
class AESCipher: """ A wrapper around the true python AESCipher. This wrapper takes care of properly padding messages, selection an encryption mode and handling the encryption key. It is safe to keep one object because the internal python cipher is not reused. """ def __init__(self, key: str):...
<filename>src/global.d.ts /** * Define global variable for fscripts in src folder. * You can defint your own interface. * Below is an example of how to call in React component: * @example * const { example } = window; * example.foo.bar(...); * example.ping(); */ declare global { interface Window { example...
/** * Unit test running on device or emulator. * Created by keisuke on 16/03/03. */ @RunWith(AndroidJUnit4.class) public class PackageNameManagerTest { private Context context; @Before public void setUp() { context = InstrumentationRegistry.getContext(); } @Test public void getPack...
<filename>config.py GameName = 'chess' GUI_ENABLE = True # -- path mct_simulate_num = 20 epsilon = 0.2 cpuct = 0.1 # mct cpuct memory_size = 500 batch_size = 50 train_loop = 2 epochs = 3 # init_chess_state = [ # [0, -1, 0], # [-1, 0, 1], # [0, 1, 0] # ] # question_state = [ # [0, -1, 0], # [2, 1...
Spring/Summer 2018 Spring/Summer 2018 *WOOT!* Huge congrats and thanks to the Octo-crew - the Octonauts won an ANNIE for "Best Animated Television/Broadcast Production For Preschool Children" and an EMMY for "Outstanding Writing in a Preschool Animated Program" ~ We're currently busy working on more fun underwater adve...
import { CourierState } from "../utils/data_parsers"; import { NotificationType } from "../utils/util"; import { NewSubscription } from "./new_subscription"; import { Pull } from "./pull"; import { SubscriptionsTable } from "./subscriptions_table"; interface Props { courierState: CourierState; setNotification: (ty...
<gh_stars>1-10 import React, { useEffect, useState } from 'react'; import { connect, ConnectedProps } from 'react-redux'; import { useHistory } from 'react-router'; import { Button, Popover, ButtonBase, makeStyles, Theme, createStyles } from '@material-ui/core'; import { FontAwesomeIcon } from '@fortawesome/react-fonta...
"The past (Obama) administration was the first administration that never had a whole year of 3 percent growth." Speaking at an event in Chicago earlier this month, U.S. Rep. Peter Roskam, R-Ill., was talking tax policy and the economy when he pointed to lackluster economic growth that occurred under former President B...
/// In SnapshotManager's new function we create a new snapshop manager by /// parsing the /proc/id/maps of the process id in question. pub fn new(pid: i32) -> SnapshotManager { // form the absolute path to the process maps let mappath = format!("/proc/{}/maps",pid); // read the maps contents of the process le...
import pytest cands = [ # https://github.com/podhmo/python-node-semver/issues/5 ["<=1.2", "1.2.0", ["1.1.1", "1.2.0-pre", "1.2.0", "1.1.1-111", "1.1.1-21"]], ["<=1.2", "1.2", ["1.1.1", "1.2.0-pre", "1.2", "1.1.1-111", "1.1.1-21"]], ["<=1.2.0", "1.2.0", ["1.1.1", "1.2.0-pre", "1.2.0", "1.1.1-111", "1.1....
<gh_stars>1-10 #ifndef _OPTION_H #define _OPTION_H #include <iostream> using namespace std; template <class G_Type> class COptionMap { public: COptionMap(); ~COptionMap(); void InsertOptMap(std::string strOpt, const G_Type item); void GetOptMap(std::string strOpt, G_Type &item); private: std...
use std::convert::TryFrom; use fujiformer_geom::{IntRect, Point, Rect, Size}; use log::warn; use thiserror::Error; use crate::{internal::Node, CelesteMap}; #[derive(Debug, Clone)] pub struct Screen { name: String, rect: IntRect, unread: Node, } impl Screen { pub fn new(name: String, rect: IntRect) -...
// TagSet (leaf): Use the referenced tag-set to set tags on the prefixes that match the // specified conditions. When a tag is set it MUST be possible to match the // value set in subsequent policies on the local device. where the protocol that // is carrying the prefix has a tag field (OSPF, and IS-IS for in particula...
#!/usr/bin/env python3 from os import listdir from os.path import isfile, join from subprocess import call import sys need_rebuild = False def update_workspace(): try: call(['bash', '-c', 'cd gir && cargo build --release']) except: return False return True if not isfile('./gir/src'): ...
/** * Implementation based on the Raml 1.0 Parser * * @author Aleksandar Stojsavljevic * @since 0.10.0 */ public class RJP10V2RamlSecurityReference implements RamlSecurityReference { private final SecuritySchemeRef securitySchemeRef; public RJP10V2RamlSecurityReference(SecuritySchemeRef securityReferenceRef) ...
<reponame>vasanthrajd/rajehs-vasanth<filename>src/main/java/com/careerin/api/dto/RefreshTokenDto.java package com.careerin.api.dto; import lombok.Getter; import lombok.Setter; import java.io.Serializable; @Getter @Setter public class RefreshTokenDto implements Serializable { private static final long serialVers...
Geek & Sundry teamed up with Nerdist to brings Vin Diesel's dream of an awesome Dungeons & Dragons session to life. Laura Bailey, Matt Mercer and Travis Willingham from Critical Role joined forces with Vin Diesel and minds from the Nerdist to film a special session... You can watch the session above where Vin's own Wi...
Mycophenolic Acid in Silage ABSTRACT We examined 233 silage samples and found that molds were present in 206 samples with counts between 1 × 103 and 8.9 × 107 (mean, 4.7 × 106) CFU/g. Mycophenolic acid, a metabolite of Penicillium roqueforti, was detected by liquid chromatography-mass spectrometry in 74 (32%) of these...
<filename>minecraft/net/minecraft/client/AnvilConverterException.java package net.minecraft.client; public class AnvilConverterException extends Exception { public AnvilConverterException(String exceptionMessage) { super(exceptionMessage); } }
Building Collaboration: A Scoping Review of Cultural Competency and Safety Education and Training for Healthcare Students and Professionals in Canada ABSTRACT Phenomenon: This scoping literature review summarizes current Canadian health science education and training aimed to lessen health gaps between Aboriginal and ...
#include <stdio.h> #include <stdlib.io> #include <string.h> #include <avr/io.h> #include <avr/interrupt.h> #include <avr/wdt.h> uint16_t pec15_calc(uint8_t len, //Number of bytes that will be used to calculate a PEC uint8_t *data //Array of data that will be used to calculate a PEC );
<reponame>ramarag/cosmos-explorer import postRobot from "post-robot"; export interface IGitHubConnectorParams { state: string; code: string; } export const GitHubConnectorMsgType = "GitHubConnectorMsgType"; window.addEventListener("load", async () => { const openerWindow = window.opener; if (openerWindow) { ...
/** * Dispense the specified stack, play the dispense sound and spawn particles. */ protected ItemStack dispenseStack(IBlockSource source, ItemStack stack) { BlockPos blockpos = source.getBlockPos().offset(source.getBlockState().get(DispenserBlock.FACING)); for(AbstractHorseE...
// Advances a new line in the decoder // And calls the next stateFunc // checks if next line is continuation line func (d *decoder) next() { if d.buffered == "" { res := d.scanner.Scan() if true != res { d.err = d.scanner.Err() return } d.line++ d.current = d.scanner.Text() } else { d.current = d.bu...
/** * Called when the screen is unloaded. Used to disable keyboard repeat events */ public void onGuiClosed() { Keyboard.enableRepeatEvents(false); NetClientHandler netclienthandler = this.mc.getNetHandler(); if (netclienthandler != null) { ByteArrayOutputStream...
<reponame>y1j2x34/rikoltilo import { Shortcut } from '@vgerbot/shortcuts'; import { Observable } from 'rxjs'; export function shortcut(shortcutKey: string) { const shortcutMatcher = Shortcut.from(shortcutKey); return function shortcutOperatorFunction<T>(source: Observable<T>) { return new Observable<T>...
def _two_intersections_for_outer(self, center, radius, points): remains = ( Arch.from_points(center, points[0], points[1], radius, False), Arch.from_points(self._out_center, points[1], points[0], self._out_radius, True), None, Arch(self._in_center[0], self._in_cen...
// FaissClusteringNewWithParams function as declared in c_api/Clustering_c.h:91 func FaissClusteringNewWithParams(pClustering **Faissclustering, d int32, k int32, cp *Faissclusteringparameters) int32 { cpClustering, _ := (**C.FaissClustering)(unsafe.Pointer(pClustering)), cgoAllocsUnknown cd, _ := (C.int)(d), cgoAllo...
After getting his first power five conference offer from Wisconsin Saturday, Amherst (WI) High defensive tackle Tyler Biadasz maintained that he wanted to finish his camp circuit before making any college decisions. That was before he let the emotions of getting an offer from his dream school sink in. “It sunk in Sun...
<filename>main.go package main import ( "context" "flag" "fmt" "os" "github.com/chanxuehong/log" "golang.org/x/sync/errgroup" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "kubernetes-ingress-controller/common" "kubernetes-ingress-controller/logic/server" "kubernetes-ingress-controller/logic/wat...
Reporters and members of the media ask questions at the White House in Washington on May 10. (Jabin Botsford/The Washington Post) We members of the media probably sound a little self-serving when we complain about constant attacks on press freedom. Press freedom is a sacred democratic value, enshrined right there in ...
<reponame>paulwratt/cin-5.34.00 /* -*- C++ -*- */ /************************************************************************* * Copyright(c) 1995~2005 <NAME> (<EMAIL>) * * For the licensing terms see the file COPYING * ************************************************************************/ // 021220regexp.txt, P...
package commands import ( "log" "os" "strings" config "github.com/Skarlso/go-furnace/config" fc "github.com/Skarlso/go-furnace/furnace-gcp/config" "github.com/Yitsushi/go-commander" "golang.org/x/net/context" "golang.org/x/oauth2/google" dm "google.golang.org/api/deploymentmanager/v2" "google.golang.org/api...
<filename>src/index.tsx import { useRef } from 'react' import ReactDOM from 'react-dom'; import EpubViewer from 'modules/epubViewer/EpubViewer' import ReactEpubViewer from 'modules/reactViewer/ReactViewer' import { ViewerRef } from 'types' interface Props { VIEWER_TYPE?: "ReactViewer" | "EpubViewer" } const App = (...
/*******************************************************/ /** Checks that the parser recognizes incomplete initial segments of a log record as incomplete. */ static void recv_check_incomplete_log_recs( byte* ptr, ulint len) { ulint i; byte type; ulint space; ulint page_no; byte* body; for (i = 0; i < len; i++...
/** * Method hitHist * returns a histogram of hits on each Ship in the form of an int[5]. * @param boards Any of the Boards * @return the histogram */ public static int[] hitHist (Board boards) { int[] noHits = new int[5]; for (int i = 0; i < boards.carrier.hits.length; i++) { if (boards....
//somewhat dangerous as it allows reading anywhere in the file bool mzpSAXMzmlHandler::readSpectrumFromOffset(f_off offset, int scNm){ spec->clear(); m_scanNumOverride=scNm; if (offset<0) return false; parseOffset(offset); return true; }
""" 7 -> 1 -> 6 == 617 5 -> 9 -> 2 == 295 ------------------ 2 -> 1 -> 9 == 912 """ from node import Node def compute_sum(first: Node, second: Node) -> Node: carry = 0 head = current = first while first and second: result = first.val + second.val + carry first.val = result % 10 ...
def choices(question_id): question = Question.query.get(question_id) if request.method == 'POST': choice = request.form.get('choice') status = request.form.get('status') points = request.form.get('points') status_real = True if status.lower() == "true" or status.lower() =...
/* This method resets the stages for the backup process */ private void addStages(){ if(dataHandler.query("select * from stages").length > 0){ dataHandler.runQuery("delete from stages"); } for(int i = 0; i < stages.length; i++){ dataHandler.runQuery("insert into stages (stage_name) values ('" + stages[i]...
def merge_all_intervals(bed, split=False): if split: msg = "Splitting the BED12 records" logger.debug(msg) bed = split_bed12(bed) seqnames = bed['seqname'].unique() strands = ("+", "-") all_matches = [] for strand in strands: m_strand = bed['strand'] == strand ...
/**------------------------------------------------------ * Makes and returns a new event-processing scene-graph * modifying thread. This is used for synchronous method * calls made by the origonal event-processing scene-graph * when it wants to pause the original thread but still * keep...
/** * Compile a json string into a JsonElement. Note this is required for the test since Gson * objects cannot be mocked. * * @param jsonString string containing serialized json content to parse. * @return JsonElement for the root of the parsed json. */ private JsonElement compileJson(String jsonStri...
Yeshwanth Shenoy's PIL resulted in a court order to demolish 100-plus buildings around Mumbai airport. In a city where real estate is a premium luxury - either owning a home is a pipe dream, or for those that have, their greatest asset - a Bombay High Court order on Wednesday, asking the Directorate General of Civil A...
/* * Compress the input data to the output buffer until we run out of input * data. Each time the output buffer falls below the compression bound for * the input buffer, invoke the archive_contents() method for then next sink. * * Note that since we're compressing the input, it may very commonly happen * that we ...
def find_max_values(table_1, table_2): x, y = create_array(table_1) xs, ys = create_array(table_2) max_x = max(np.append(x, xs)) min_x = min(np.append(x, xs)) max_y = max(np.append(y, ys)) min_y = min(np.append(y, ys)) ratio = (max_y - min_y) / (max_x - min_x) return max_x, min_x, max_y,...
def patch(self, request, pk, format=None): bidder = get_object_or_404(AvailableBidders, bidder_perdet=pk) user = UserProfile.objects.get(user=self.request.user) serializer = self.serializer_class(bidder, data=request.data, partial=True) if serializer.is_valid(): serializer.sa...
<reponame>deepeshhada/HyperTeNet import pickle import itertools import pdb from time import time from collections import defaultdict import numpy as np import scipy.sparse as sp from data.dataset import Dataset from data.tenet_dataset import TenetDataset from utils import utils import torch class EmbedDataset(TenetD...
<filename>internal/vulnstore/postgres/querybuilder.go package postgres import ( "fmt" "strconv" "strings" "github.com/doug-martin/goqu/v8" _ "github.com/doug-martin/goqu/v8/dialect/postgres" "github.com/rs/zerolog/log" "github.com/quay/claircore" "github.com/quay/claircore/internal/vulnstore" "github.com/qu...
<reponame>shionAoi/sicuy-angular import {Injectable} from '@angular/core'; import {AddPoolMutation} from './graphql/add-pool.mutation'; import {Pool, PoolInput, PoolUpdate} from '../../../../api/graphql'; import {map} from 'rxjs/operators'; import {Observable} from 'rxjs'; import {UpdatePoolMutation} from './graphql/up...
package alerting import ( "encoding/json" "fmt" "io" "net/http" "testing" "github.com/stretchr/testify/require" "github.com/grafana/grafana/pkg/services/ngalert/notifier/channels_config" "github.com/grafana/grafana/pkg/services/org" "github.com/grafana/grafana/pkg/services/user" "github.com/grafana/grafana...
The evolution of negation in French and Italian: Similarities and differences This article examines similarities and differences in the evolution of both standard clause negation and n-word negation in French and Italian. The two languages differ saliently in the extent to which standard negation features postverbal m...
<gh_stars>100-1000 package mezz.jei.transfer; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import mezz.jei.config.IServerConfig; import mezz.jei.config.ServerConfig; import net.m...
Times have not been good for Japanese-Swedish cell phone maker Sony Ericsson. The company has been stuck with disappointing figures and mediocre products. Now it is focusing on Android smartphones and that’s paying off, says Jan Uddenfeldt, chief technology officer and head of Sony Ericsson Silicon Valley. Uddenfeldt ...
Elucidation of Crystal-Chemical Determination Factor of Magnetic Anisotropy in HTSC Easy axes of magnetization at room temperature in REBa<sub>2</sub>Cu<sub>3</sub>O<sub>y</sub> (RE: rare earth) and Bi<sub>2</sub>Sr<sub>2</sub>Ca<sub>1-x</sub>RE<sub>x</sub>Cu<sub>2</sub>O<sub>y</sub> were clarified using their powders...
There are plenty of operas about teenage girls—love-sick, obsessed, hysterical teenage girls who dance, scheme, and murder in a frenzy of musical passion. Disney Princess films are also about teenage girls—lonely, skinny, logical teenage girls who follow their hearts because the plot gives them no other option. The mus...
/** * * Write the data and return it's wrote position. * @param logIndex the log index * @param data data to write * @return the wrote position */ public int appendData(final long logIndex, final byte[] data) { this.writeLock.lock(); try { assert (logIndex >...
def parse_results(result: dict, vari: list) -> dict: BB_dict = {} for item in vari: if item == "Seq": BB_dict[item] = get_sequence(result[item]['value']) else: BB_dict[item] = result[item]['value'] return BB_dict
Foreign accents reduce false recognition rates in the DRM paradigm ABSTRACT More cognitive resources are required to comprehend foreign-accented than native speech. Focusing these cognitive resources on resolving the acoustic mismatch between the foreign-accented input and listeners’ stored representations of spoken w...
<gh_stars>0 import { usePopupModel, useInitialFocus, useReturnFocus, useCloseOnOutsideClick, useCloseOnEscape, useFocusRedirect, } from '@workday/canvas-kit-react/popup'; import {createModelHook} from '@workday/canvas-kit-react/common'; export const useDialogModel = createModelHook({ defaultConfig: usePo...
package tmdb import ( "errors" "fmt" "time" yaml "gopkg.in/yaml.v2" "github.com/agnivade/levenshtein" polochon "github.com/odwrtw/polochon/lib" tmdb "github.com/ryanbradynd05/go-tmdb" "github.com/sirupsen/logrus" ) // Make sure that the module is a detailer and a searcher var ( _ polochon.Detailer = (*TmDB...
/** * Test that the equals() method can distinguish all fields. */ public void testEquals() { Font font1 = new Font("SansSerif", Font.PLAIN, 12); Font font2 = new Font("SansSerif", Font.PLAIN, 14); MarkerAxisBand a1 = new MarkerAxisBand(null, 1.0, 1.0, 1.0, 1.0, font1); ...
// CheckEndpoints validates endpoint_1 and endpoint_2. func (fr *FirewallRule) CheckEndpoints() error { endpoints := []*FirewallRuleEndpointType{ fr.GetEndpoint1(), fr.GetEndpoint2(), } for _, endpoint := range endpoints { if err := endpoint.ValidateEndpointType(); err != nil { return err } } return nil...
// GetDeviceState returns the current state with name stateName for the device with URL deviceURL func (k *Kiz) GetDeviceState(deviceURL DeviceURL, stateName StateName) (DeviceState, error) { resp, err := k.clt.GetDeviceState(string(deviceURL), string(stateName)) if err != nil { return DeviceState{}, err } defer ...
def list_indiv_from_pop( dict_indiv_pop, dict_indiv_superpop ): list_pop = list(set(dict_indiv_pop.values())) dict_list_pop = {} for pop in list_pop: list_pop = [] for indiv in dict_indiv_pop.keys(): if dict_indiv_pop[indiv] == pop: list_pop.append(indiv) ...
<filename>src/java/org/xlattice/crypto/tls/TlsClientEngine.java /* TlsClientEngine.java */ package org.xlattice.crypto.tls; import java.io.IOException; import java.security.GeneralSecurityException; import java.security.SecureRandom; public class TlsClientEngine extends TlsEngine { protected ...
#include <stdio.h> #include <dlfcn.h> #include <mach/mach.h> #include <mach-o/fat.h> #include <mach-o/loader.h> #include <sys/mman.h> #include <mach/vm_map.h> #include "magic.h" /*#define DEBUG 1*/ //asl_log isn't working, so: idevicesyslog | grep SandboxViolation #ifdef DEBUG #define debug_print(fmt, ...) \ do...
Solution of one-dimensional Bose Hubbard model in large-$U$ limit The one-dimensional Bose-Hubbard model in large-$U$ limit has been studied via reducing and mapping the Hamiltonian to a simpler one. The eigenstates and eigenvalues have been obtained exactly in the subspaces with fixed numbers of single- and double-oc...
Francesco Schettino walks in his hometown of Meta di Sorrento near Naples, October 11, 2012. The captain of the Costa Concordia which ran into a rock and capsized off the Italian coast in January, killing up to 32 people, has sued for wrongful dismissal, his lawyer said on Wednesday. Schettino faces charges of multiple...
def custom(expr): return CalculatedField(expr)
import {Inject, Injectable} from '@angular/core'; import {DOCUMENT} from "@angular/common"; @Injectable({ providedIn: 'root' }) export class LocalStorageService { private storage: Storage; constructor(@Inject(DOCUMENT) doc: Document){ this.storage = doc.defaultView?.localStorage as Storage; } ...
def backward_autocomplete(self): index = self.autocomplete_manager.autocomplete(action=-1) is_in_cycle = self.autocomplete_manager.is_in_cycle() self.update_buffer(clear=True) if index is not None: self.ask_for_hint(index, type="info") return is_in_cycle
// SetFlusher sets the flush strategy for the logger. func (l *Logger) SetFlusher(f Flusher) { l.mu.Lock() defer l.mu.Unlock() l.flusher = f }
EBay chief John Donahoe says he sees bitcoin and other digital currencies playing an "important role" in PayPal, the e-commerce giant's Internet payment platform. "We're going to have to integrate digital currencies in our wallet," Donahoe said in an interview on CNBC's "Squawk Box." While refusing to say when, the e...
package daily; /** * description 字符串模式匹配 * * 示例: * 模式pattern:aabba (a、b组合成的字符串) * 字符串:dogdogcatcatdog * 结果:true * * @author chengwj * @version 1.0 * @date 2020/6/22 **/ public class Leet { public static void main(String[] args) { //true boolean b = new Leet().patternMatching("aabb...
/// Factorial /// /// # Type /// : `usize -> usize` /// /// # Usage /// /// ``` /// extern crate peroxide; /// use peroxide::fuga::*; /// /// assert_eq!(factorial(5), 120); /// ``` pub fn factorial(n: usize) -> usize { let mut p = 1usize; for i in 1..(n + 1) { p *= i; } p } /// Double Factorial...
class AnalyzeMixin: """Mixin for processing files caught by the pylinac watcher. Attributes ---------- obj : class The class that analyzes the file; e.g. Starshot, PicketFence, etc. config_name : str The string that references the class in the YAML config file. """ obj = obj...
/** Gets the root module without checking that the layout of `M` is the expected one. This is effectively a transmute. This is useful if a user keeps a cache of which dynamic libraries have been checked for layout compatibility. # Safety The caller must ensure that `M` has the expected layout. # Errors This funct...
def ensure_a_list(data: Any) -> Union[List[int], List[str]]: if not data: return [] if isinstance(data, (list, tuple, set)): return list(data) if isinstance(data, str): data = trimmed_split(data) return data return [data]
<filename>test/interactive/command_test.go /* Copyright 2020 The Knative 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 a...
async def register_users(user: User): redis_client = get_redis_client() code = os.urandom(3).hex() user.code = code district = str(user.district) user.session_ids = [] obj = dict(user) path = f'["{user.email}"]' redis_client.jsonset('users', Path(path), obj) send_verification_mail.de...
// This function is called from PRACH worker (can wait) void rrc::add_user(uint16_t rnti) { pthread_mutex_lock(&user_mutex); if (users.count(rnti) == 0) { users[rnti].parent = this; users[rnti].rnti = rnti; rlc->add_user(rnti); pdcp->add_user(rnti); rrc_log->info("Added new user rnti=0x%x\n", ...
// Invoke fulfils the Batcher interface func (b *BRecv) Invoke(ctx context.Context, exp *Expect, timeout time.Duration, batchIdx int) error { defer exp.Conn.SetReadDeadline(time.Time{}) exp.Conn.SetReadDeadline(time.Now().Add(timeout)) var offs []int for { select { case <-ctx.Done(): return ctx.Err() defau...
Classical swine fever virus replicon particles lacking the Erns gene: a potential marker vaccine for intradermal application. Classical swine fever virus replicon particles (CSF-VRP) deficient for E(rns) were evaluated as a non-transmissible marker vaccine. A cDNA clone of CSFV strain Alfort/187 was used to obtain a r...
package meet_eat.data.entity; import meet_eat.data.entity.user.User; import meet_eat.data.factory.TokenFactory; import meet_eat.data.factory.UserFactory; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; im...
package techreborn.blockentity.machine.tier0.block.blockplacer; import net.minecraft.nbt.NbtCompound; import reborncore.client.screen.builder.BlockEntityScreenHandlerBuilder; import techreborn.blockentity.machine.tier0.block.ProcessingStatus; /** * <b>Class handling Nbt values of the Block Placer</b> * <br> * Inhe...
/* * NXFindBestFatArch() is passed a cputype and cpusubtype and a set of * fat_arch structs and selects the best one that matches (if any) and returns * a pointer to that fat_arch struct (or NULL). The fat_arch structs must be * in the host byte order and correct such that the fat_archs really points to * enough ...
<gh_stars>1-10 package freezer import ( "context" "errors" "fmt" "io" "io/ioutil" "os" "os/exec" "path/filepath" "time" nsjailpb "github.com/dzeromsk/subslicer/freezer/pb" "github.com/golang/protobuf/proto" "github.com/justincormack/go-memfd" ) var ( FreezerDir = "/sys/fs/cgroup/freezer" MemoryDir = ...
/** * Executes the action asynchronously with a callback. * * @param callback The action completion callback. * @param looper A Looper object whose message queue will be used for the callback, * or null to make callbacks on the calling thread or main thread if the current thread * does not...
def computeQValueFromValues(self, state, action): Q_value = 0 transition_information = self.mdp.getTransitionStatesAndProbs(state,action) for next_state , probability in transition_information: next_state_value = self.getValue(next_state) next_state_reward = self.mdp.getRewar...
def generate_traj(self, N, start=None, stop=None, stride=1): self._check_is_estimated() from pyemma.msm.generation import generate_traj as _generate_traj syntraj = _generate_traj(self.transition_matrix, N, start=start, stop=stop, dt=stride) from pyemma.util.discrete_trajectories import s...
/* Should: * 1) Have the right player turn * 2) Reverse the right subBoard * 3) Remove the right piece * 4) Have the right pieces on board * 5) Have the right player turn */ @Test public void testUndoMove() { final Board gameBoard = BoardFactory.createSixBySixBoard("[xo xo ox ox o xo xxo xo ox ox...
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- * vim: set ts=8 sts=2 et sw=2 tw=80: * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ...
import os import abc from .dict_utils import recursive_update class ConfigLoaderException(Exception): pass class ConfigFileNotFoundException(Exception): pass class ConfigFormatter(object): __metaclass__ = abc.ABCMeta @abc.abstractmethod def encode(self, data): """ Args: ...
/** * * @author Valdiney V GOMES */ @Entity @Table(indexes = { @Index(name = "IDX_name", columnList = "name", unique = false)}) public class Job extends Tracker<Job> implements Serializable { private Long id; private Server server; private String name; private String alias; private String de...