content
stringlengths
10
4.9M
<filename>src/main/java/com/nx/kernel/model/privilege/NxGroup.java package com.nx.kernel.model.privilege; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import org.hibernate.annotations.GenericGene...
/** * Create contents of the dialog. * @param parent */ @Override protected Control createDialogArea(Composite parent) { Composite mainContainer = (Composite) super.createDialogArea(parent); mainContainer.setLayout(new GridLayout(2, false)); Label lblAzureKeyVaults = new Label(mainContainer, SWT.NONE); G...
// GetMonitors downloads all the Datadog monitors from an account through the Datadog API func GetMonitors(client *http.Client) ([]Monitor, error) { resp, err := doHTTP(client, "GET", authedURL(monitorURL), "") if err != nil { return nil, err } var monitors []Monitor if err = json.Unmarshal(resp, &monitors); e...
def initialise_external(self, experiment): self._experiment = experiment
def startDraggingSession( view, event, items, source=None, formation="default", location=None ): if isinstance(view, VanillaBaseObject): view = view._nsObject if source is None: source = view draggingItems = [] if location is None: ...
import pandas as pd def merge_features(lst, ignore_duplicates=True, merge_on='cellcode'): lst = list(reversed(lst)) if ignore_duplicates: cols_set_list = [set(df.columns) for df in lst] cols_common = set.intersection(*cols_set_list) cols_duplicate = cols_common - {merge_on}...
<filename>retinanet/test.py import os import pdb import pandas as pd import numpy as np import torch import torchvision.transforms as transforms import torch.utils.data as data from torch.autograd import Variable from PIL import Image from sklearn.preprocessing import LabelEncoder class ListDataset(data.Dataset): ...
import abc import asyncio import typing import json from fiepipelib.locallymanagedtypes.routines.localmanaged import AbstractLocalManagedInteractiveRoutines from fiepipelib.localuser.routines.localuser import LocalUserRoutines from fiepipelib.localplatform.routines.localplatform import get_local_platform_routines fro...
Dissociation between microneurographic and heart rate variability estimates of sympathetic tone in normal subjects and patients with heart failure. The concept that spectral analysis of heart rate variability (HRV) can estimate cardiac sympathetic nerve traffic in subjects with both normal and impaired left ventricula...
package hall import ( "xgame/iface" "fmt" "xgame/network" ) type HallService struct{ network.GameService Name string } func NewHallService(name string) iface.IService{ svc := &HallService{ Name: name, } return svc } func (self *HallService) GetName() string{ return self.Name } func (self *HallService)...
Aerial archeologist Klaus Leidorf began taking these gorgeous, minimalist photos in 1989, while flying his own Cessna 172. He's brilliant at capturing how odd our world looks when you get a different perspective on it from the air. You can find more than 2,400 of his high-resolution shots here, in this Flickr stream, ...
Synthesis of Si3N4 Powder Using Sawdust as Carbon Source Si3N4 powder was synthesized by carbothermal reduction nitridation reaction using sawdust as carbon source and introducing SiO2 by silica sol immersion.Effects of Si O2 content of silica sol,molding pressure,reaction temperature,reaction duration,and N2 flow rat...
/** * Changes the font of the specified component to {@link Font#BOLD bold}. * * @param <T> type of the component * @param comp the component whose font to change * @return the component * * @see #italicFont(Component) */ public static < T extends Component > T boldFont( final T comp ) { final Fon...
<filename>pymon/__main__.py from .pymon import PyMon from .config import Config CONFIG = Config() PY_MON = PyMon(CONFIG.host_list, CONFIG.check_list, CONFIG.alert_list, daemonize=True)
<reponame>AllSafeCyberSecur1ty/Nuclear-Engineering #include "simulation/ElementCommon.h" static VideoBuffer *iconGen(int wallID, int width, int height); void Element::Element_NONE() { Identifier = "DEFAULT_PT_NONE"; Name = "NONE"; Colour = PIXPACK(0x000000); MenuVisible = 1; MenuSection = SC_SPECIAL; Enabled = ...
def findConfig(): config = None for d in walkUpDirs(): if os.path.isfile(os.path.join(d, 'yotta_config.json')): with open(os.path.join(d, 'yotta_config.json')) as f: config = f.read() break if os.path.isfile(os.path.join(d, 'module.json')): bre...
<filename>third_party/Jacinle/jactorch/nn/container.py #! /usr/bin/env python3 # -*- coding: utf-8 -*- # File : container.py # Author : <NAME> # Email : <EMAIL> # Date : 04/09/2018 # # This file is part of Jacinle. # Distributed under terms of the MIT license. import torch.nn as nn __all__ = ['SequentialN'] cl...
// ToInt16Slice - returns a int16 slice of the pointer passed in func ToInt16Slice(ptrSlice *[]int16) []int16 { valSlice := make([]int16, len(*ptrSlice)) for i, v := range *ptrSlice { valSlice[i] = v } return valSlice }
A MAN was subjected to taunts for being ginger before a drunk thug swung a punch at him in a Sunderland bar, fracturing his nose. John Dixon insulted his victim when he saw him in the toilets of The Establishment, in Low Row. FILE PIC TAKEN 6 APRIL 2011'Principle060411KBkwC.jpg''Establishment, Low Row, Sunderland. D...
import sys from collections import * sys.setrecursionlimit(10**5) def dfs(x): visited[x]=True for i in range(len(adj[x])): t=adj[x][i] distance[t]=max(distance[t],distance[x]+1) indegree[t]-=1 if(indegree[t]==0): dfs(t) MAX = 10**5+5 indegree=[0]*(MAX) distance=[0]*(...
pub use self::colours::Colours; pub use self::colours::Size as SizeColours; pub use self::lsc::LSColors; mod colours; mod lsc;
/** * Adds a sprite to this batch * * @param sprite sprite to be added * @return if the sprite was successfully added to the batch */ public boolean addSprite(SpriteRenderer sprite) { if (sprites.contains(sprite)) return true; if (hasRoomLeft() && zIndex() == sprite.gameObject.z...
/** * Page that demonstrates using RefreshingView in a form. The component reuses its items, to allow * adding or removing rows without necessarily validating the form, and preserving component state * which preserves error messages, etc. */ public class FormPage extends BasePage { final Form<?> form; /** * co...
package gui import ( "fmt" "log" "os" "strings" ) import ( "github.com/lxn/walk" . "github.com/lxn/walk/declarative" ) func CreateListbox() { mw := &ListMainWindow{model: NewEnvModel()} if _, err := (MainWindow{ AssignTo: &mw.MainWindow, Title: "Walk ListBox Example", MinSize: Size{240, 320}, Si...
import discograph try: from xml.etree import cElementTree as ElementTree except ImportError: from xml.etree import ElementTree class Test(discograph.DiscographTestCase): def test_1(self): element = ElementTree.fromstring('<test></test>') element.text = ( 'Shekere [Xequere, Ori...
/** * Utility method to add a line of slots. * * @param indexStart the slot index at which the line begins * @param x the horizontal position at which the line begins * @param y the vertical position at which the line begins * @param quantity the number of slot to be ad...
Radiation use and stomatal behaviour of three tropical forage legumes Three promising tropical forage legumes, Cratylia argentea, Flemingia macrophylla and Desmodium velutinum were evaluated in a tropical monsoon environment in Hainan Province, China. D. velutinum had higher net photosynthetic rate (P N ) and water us...
def filter_tvals(self, critical_t=None, alpha=None): n = self.n if critical_t is not None: critical = critical_t else: critical = self.critical_tval(alpha=alpha) subset = (self.tvalues < critical) & (self.tvalues > -1.0 * critical) tvalues = self.tvalues.c...
import re from nltk.corpus import stopwords from nltk.stem.porter import PorterStemmer from sklearn.feature_extraction.text import CountVectorizer porterStemmer = PorterStemmer() class TextUtils: def __init__(self, vectorizer, max_vocab_size): if vectorizer: self.vectorizer = vectorizer ...
<gh_stars>1-10 /* See LICENSE file for copyright and license details. */ #include "common.h" #undef libgamma_crtc_set_gamma_ramps8 #undef libgamma_crtc_set_gamma_ramps16 #undef libgamma_crtc_set_gamma_ramps32 #undef libgamma_crtc_set_gamma_ramps64 #undef libgamma_crtc_set_gamma_rampsf #undef libgamma_crtc_set_gamma_ra...
package main import ( "context" "fmt" "io" "github.com/ipfs/go-cid" cbor "github.com/ipfs/go-ipld-cbor" "github.com/libp2p/go-libp2p-core/peer" "github.com/urfave/cli/v2" "golang.org/x/xerrors" "github.com/filecoin-project/go-address" "github.com/filecoin-project/specs-actors/v4/actors/util/adt" builtin5 ...
/** * Copyright (c) 2016 Intel 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 ...
// TestSyntheticFuncs checks that the expected synthetic functions are // created, reachable, and not duplicated. func TestSyntheticFuncs(t *testing.T) { const input = `package P type T int func (T) f() int func (*T) g() int var ( // thunks a = T.f b = T.f c = (struct{T}).f d = (struct{T}).f e = (*T).g f = (*T)...
/** * <p>This is an <a href="http://jakarta.apache.org/ant/" target="_top">Ant</a> task for transforming * XML documents using FreeMarker templates. It uses the adapter class * {@link NodeListModel}. It will read a set of XML documents, and pass them to * the template for processing, building the corresponding outp...
The Promise and the Peril of Parametric Value-at-Risk (VaR) Analysis Leptokurtosis, or the risk lurking in “fat tails,” poses the deepest epistemic threat to economic forecasting. Parametric value-at-risk (VaR) models are extremely vulnerable to kurtosis in excess of the levels associated with a normal, Gaussian distr...
// +build ignore // Querying for all released in the year 2011 var albumList []albums.Album err = Albums.Filter(Albums.Year.Eq(2011)).List(ctx, &albumList)
/** A panel for displaying sentence inside JScrollPanes. */ public class SentencesPanel extends JPanel implements Scrollable { private static final long serialVersionUID = 1L; public SentencesPanel(LayoutManager lm){ super(lm); } public Dimension getPreferredScrollableViewportSize() { return getPreferredSize(); ...
export function temp2rgb(T: number): [number, number, number] { const T100: number = T / 100; const RGB: [number, number, number] = [0, 0, 0]; if (T <= 6504) { RGB[0] = 255; RGB[1] = T100; RGB[1] = 99.4708025861 * Math.log(RGB[1]) - 161.1195681661; if (RGB[1] < 0) { ...
// List gets a list of the games in the store func (s *StateStore) List(all bool) ([]*Session, error) { list, err := s.listAll() if err != nil { return nil, err } sort.Sort(list) output := []*Session{} for _, state := range list { if all || !state.Finished() { sess := NewSession(state, state, state, state)...
/** * {@link Optional} decorator restrains the presence of another {@link Optional} with a specific (independent) condition. */ public final class Restrained<T> implements Optional<T> { private final Single<Boolean> mCondition; private final Optional<T> mDelegate; public Restrained(Single<Boolean> condi...
import { animate, style, transition, trigger } from '@angular/animations'; export const FADE_IN_OUT = trigger('fadeInOut', [ transition(':enter', [ style({ opacity: 0, position: 'absolute', top: 0, width: '100%' }), animate(500, style({ opacity: 1 })), ]), transition(':leave', [ animate( 500, ...
<gh_stars>1-10 import { DataQuery, DataSourceJsonData } from '@grafana/data'; export interface RicQuery extends DataQuery { objects?: string[]; arguments?: string[]; } export interface RicDataSourceOptions extends DataSourceJsonData { baseUrl?: string; } export interface RicSecureJsonData { token?: string; }...
from .adelaide_random import AdelaideRandom from .adelaide_ea_codec import AdelaideCodec from .adelaide_mutate import AdelaideMutate from .adelaide_trainer_callback import AdelaideEATrainerCallback
<filename>src/decawave/src/decawave.cpp /* * decawave.cpp * Interfaces with Decawave 1001 module over USB * VERSION: 0.0 * Last changed: 2019-04-01 * Authors: {insert molly} <<EMAIL>> * Maintainers: {insert molly} <<EMAIL>> * MIT License * Copyright (c) 2018 GOFIRST-Robotics */ #include <string> #include <vec...
#!/usr/bin/env python3 import numpy as np import pandas as pd import logging from decisiveml.helpers import tradingday_offset logger = logging.getLogger(__name__) def indicator_volatility_daily(df_daily, price_col="close"): """Create rolling volatility using EWM of 36 which matches a rolling stdev of 25 Arg...
use std::io; use std::str::FromStr; fn input_tuple() -> (u64, u64, u64) { let mut line: String = String::new(); io::stdin().read_line(&mut line); let vec: Vec<u64> = line.split_whitespace().map(|s| s.parse().unwrap()).collect(); (vec[0], vec[1], vec[2]) } fn input_vec() -> Vec<u64> { let mut line:...
// Copyright Red Hat, Inc., and individual contributors. // // 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 appl...
// NewStore returns a new store backed by the device change store func NewStore(deviceChangeStore devicechangestore.Store, deviceSnapshotStore devicesnapshotstore.Store) (Store, error) { return &deviceChangeStoreStateStore{ changeStore: deviceChangeStore, snapshotStore: deviceSnapshotStore, devices: make...
<reponame>GSephrioth/LeetCode package Medium; /** * The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: * (you may want to display this pattern in a fixed font for better legibility) * * P A H N * A P L S I I G * Y I R * And then read line by line: "PAHNAPLS...
The response of carbon black stabilized oil-in-water emulsions to the addition of surfactant solutions. We use carboxyl-terminated, negatively charged, carbon black (CB) particles suspended in water to create CB-stabilized octane-in-water emulsions, and examine the consequences of adding aqueous anionic (SOS, SDS), ca...
package main import ( "encoding/binary" "flag" "fmt" "net" "os/exec" "strconv" "strings" "sync" "sync/atomic" "time" "unsafe" "github.com/xthexder/go-jack" "github.com/xthexder/rawstreamer" ) var Client *jack.Client var Ports []*jack.Port var Buffers []unsafe.Pointer var BufferPool chan []jack.AudioSamp...
<reponame>matt-gadd/scripts import chalk from 'chalk'; import * as yargs from 'yargs'; import * as parse from 'parse-git-config'; import { runAsPromise } from './utils/process'; import { canPublish, isRepoClean } from './utils/checks'; const { release: releaseVersion, next: nextVersion, 'dry-run': dryRun, 'push-ba...
The debate about the P5+1 agreement with Iran on its nuclear program has already produced a storm of angry rhetoric and a tsunami of opinion pieces. But one issue is notably absent from the debate: the fact that Israel has a nuclear weapons arsenal and sophisticated delivery systems that are decades ahead of anything I...
/// /// Copyright © 2016-2020 The Thingsboard 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...
def create_visual_shape(self, shape_type, radius=0.5, half_extents=(1., 1., 1.), length=1., filename=None, mesh_scale=(1., 1., 1.), plane_normal=(0., 0., 1.), flags=-1, rgba_color=None, specular_color=None, visual_frame_position=None, vertices=None, indices=None, ...
def ack(self, time_consumed=None): self.controller_queue.send_json({ 'ramp_unique_id': self.ramp_unique_id, 'ack_value': self.ack_value, 'content': { 'process_name': self.process_name, 'msg_type': 'ack', 'duration': duration_iso...
class Operation: """Operation represents the application of a gate or state to a ``Circuit``. Args: part (jet.Gate or jet.State): Gate or state applied to the circuit. wire_ids (Sequence[int]): ID(s) of the wires connected to the part. """ part: Union[Gate, State] wire_ids: Sequenc...
import pytest from overhave.storage import SystemUserGroupStorage, SystemUserStorage @pytest.fixture(scope="package") def test_system_user_storage() -> SystemUserStorage: return SystemUserStorage() @pytest.fixture(scope="package") def test_system_user_group_storage() -> SystemUserGroupStorage: return Syste...
def transition_dataset(environment: dm_env.Environment) -> tf.data.Dataset: observation = environment.observation_spec().generate_value() action = environment.action_spec().generate_value() reward = environment.reward_spec().generate_value() discount = environment.discount_spec().generate_value() data = (obse...
Efficacy of Vortioxetine on Cognitive Functioning in Working Patients With Major Depressive Disorder. OBJECTIVE This post hoc analysis investigates the effect of vortioxetine on cognitive functioning and depressive symptoms in working adults with major depressive disorder (MDD). METHODS Population data from FOCUS, a...
<filename>src/json/json_minifier.rs #[derive(Debug)] pub struct JsonMinifier { pub is_string: bool, pub escaped_quotation: u8, } impl Default for JsonMinifier { fn default() -> Self { Self::new() } } impl JsonMinifier { pub fn new() -> Self { JsonMinifier { is_string: f...
// CreateSaveBatchTaskForUpdatingContactInfoResponse creates a response to parse from SaveBatchTaskForUpdatingContactInfo response func CreateSaveBatchTaskForUpdatingContactInfoResponse() (response *SaveBatchTaskForUpdatingContactInfoResponse) { response = &SaveBatchTaskForUpdatingContactInfoResponse{ BaseResponse: ...
/* * Wrappers around BufFile operations. The main difference is that these * wrappers report errors with ereport(), so that the callers don't need * to check the return code. */ static void ReadTempFileBlock(BufFile *file, long blknum, void *ptr) { if (BufFileSeekBlock(file, blknum) != 0) elog(ERROR, "could not ...
/* * @Description: configure compare functions * @IN atttypid: attribute type OID info * @See also: */ void bulkload_minmax::configure(Oid atttypid) { m_compare = GetCompareDatumFunc(atttypid); m_finish_compare = GetFinishCompareDatum(atttypid); }
#include <bits/stdc++.h> using namespace std; int compute(int k, int w, int h){ int x = 2*(w+h)-4; if(k == 1) return x; return x+compute(k-1,w-4,h-4); } int main(){ int w, h, k; cin >> w >> h >> k; cout << compute(k, w, h) << endl; return 0; }
#include "Interchip_A.h" #include "imu.hpp" #include "spi.h" #include"gps.hpp" #include"UARTDriver.hpp" void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi) { if(hspi == &hspi1) { ImuTxRxCallback(); } else { InterchipTxRxCallback(); } } //This function is used to allpw both gps.cpp a...
#from mdms import mdms_menu __version__ = '0.9997' __author__ = '<NAME>' name = "MDMS"
t=0 n=0 m=0 h=[] li=[] class arr(): ai=[] a=[] for i in range(0,510): h.append(0) li.append(0) zc=arr() a.append(zc) for j in range(0,510): a[i].ai.append(0) t=int(input()) while not t==0: t-=1 for i in range(0,510): h[i]=0 li[i]=0 ...
/** * Simple mocked request. * * @author Guilherme Silveira */ public class MockedRequest implements HttpServletRequest { private static final Logger logger = Logger.getLogger(MockedRequest.class); private Map<String, Object> attributes = new HashMap<String, Object>(); private Map<String, Object> parameters ...
/** * @brief SFU IF CRC Configuration. * @param eCRCConfg: SFU_CRC_ConfigTypeDef. * This parameter can be a value of @ref SFU_CRC_ConfigTypeDef. * @retval SFU_ErrorStatus SFU_SUCCESS if successful, SFU_ERROR otherwise. */ SFU_ErrorStatus SFU_LL_CRC_Config(SFU_CRC_ConfigTypeDef eCRCConfg) { SFU_Er...
School environment, socioeconomic status and weight of children in Bloemfontein, South Africa Background The continued existence of undernutrition, associated with a steady increase in the prevalence of overweight and obesity in children and adolescents, necessitates identification of factors contributing to this doub...
// Injects loop unrolling based on the config. Possible options: // - Without preload (no SLM buffering, no prefetch) // - With SLM buffering // - With prefetch stmt_t inject_unrolling(const stmt_t &s, const conv_config_t &cfg, ir_context_t &ir_ctx, int ab_slm_size) { trace_start(); auto ret = unrolling...
/** * Created by kext on 16/8/11. */ public class ApiResponse<T> { public String id; public State state; public Page page; public User user; public T data; }
/* * Returns how many microseconds we need to add to xtime this tick * in doing an adjustment requested with adjtime. */ static long adjtime_adjustment(void) { long time_adjust_step; time_adjust_step = time_adjust; if (time_adjust_step) { time_adjust_step = min(time_adjust_step, (long)tickadj); time_adjust_st...
/* vdist.f -- translated by f2c (version 19980913). You must link the resulting object file with the libraries: -lf2c -lm (in that order) */ #include "f2c.h" /* $Procedure VDIST ( Vector distance ) */ doublereal vdist_(doublereal *v1, doublereal *v2) { /* System generated locals */ doublereal ret_val; ...
/** * A {@link SelectionStrategy} which chooses randomly between multiple other selection strategies each time it is asked to select. * This allows the same AI player to use different strategies across multiple games. * @author luke * */ public class MultipleSelectionStrategy implements SelectionStrategy { pri...
#!/usr/bin/env python3 # # Use pandas + bokeh to create graphs/charts/plots for stats CSV (to_csv.py). # import os import pandas as pd from bokeh.io import curdoc from bokeh.models import ColumnDataSource, HoverTool from bokeh.plotting import figure from bokeh.palettes import Dark2_5 as palette from bokeh.models.forma...
// // Config.h // Gray // // Created by <NAME> on 2/17/17. // // #ifndef Config_h #define Config_h #include <vector> #include <string> #include "Gray/Output/Output.h" class Config { public: Config() = default; int ProcessCommandLine(int argc, char **argv, bool fail_without_scene); static void usage();...
/** * add of permissions to run Rationale on * @param smoothPermission - list of permission * @return PermissionInit */ @Override public RationaleBuilder.PermissionInit addSmoothPermission(SmoothPermission... smoothPermission) { permissionDialogBuilder.addSmoothPermission(smoothPermissio...
package models type Skill struct { Id int `json:"id"` SkillName string `json:"skillName"` SkillTypeId int `json:"skillType"` Url string `json:"url"` Comment string `json:"comment"` Sequence int `json:"sequence"` } func NewSkill(skillName string, skillTypeId int, url string, comment string, sequence int) Skill {...
/** * An index for double-precision 64-bit IEEE 754 floating point columns. */ public class DoubleIndex { private final Double2ObjectAVLTreeMap<IntArrayList> index; public DoubleIndex(DoubleColumn column) { int sizeEstimate = Integer.min(1_000_000, column.size() / 100); Double2ObjectOpenHash...
<reponame>computercraft-code-critic-bot/CCEmuX<filename>plugin-api/src/main/java/net/clgd/ccemux/api/plugins/hooks/Hook.java<gh_stars>10-100 package net.clgd.ccemux.api.plugins.hooks; import net.clgd.ccemux.api.emulation.EmulatedComputer; import net.clgd.ccemux.api.rendering.Renderer; /** * CCEmuX plugins can regist...
def front_and_back_search(lst, item): rear=0 front=len(lst)-1 u=None if rear>front: return False else: while rear<=front: if item==lst[rear] or item==lst[front]: u='' return True elif item!=lst[rear] and item!=lst[front]: ...
By Julie Rovner, Kaiser Health News If there’s anything congressional Republicans want to do more than “repeal and replace” the Affordable Care Act, it’s defund Planned Parenthood, which provides health care to women around the country. But Senate rules could prevent lawmakers from accomplishing both of those goals in...
import os import sys import yaml sizes = [1, 2, 4, 8, 10, 15, 20, 30, 40] N = int(sys.argv[1]) for s in sizes: file = open(os.path.join("opts-trainjob-%d.yml" % N), "w") opts = {} opts["save"] = "save/imgjoint-%d-%d" % (s, N) opts["data"] = "data" opts["device"] = "cuda" opts["modality"] = ["i...
def write_csv_row(self, csvfile, node): osm_id = node['@id'] lat = node['@lat'] lon = node['@lon'] csvfile.write(osm_id + ',' + lat + ',' + lon) tags = node['tag'] for tag_key in self.node_tags: value = self.get_tag_value(tags, tag_key) csvfile.wri...
/** * Created by DevTastisch on 23.01.2019 */ public class Genome implements IGenome { private final ListHashMap<NodeGeneType, INodeGene> iNodeGenes = new ListHashMap<>(); private final Random random = new Random(); private final float PROBABILITY_PERTURBING = 0.09f; private float score; public...
class Star: def __init__(self, name, spectral_class): self.name = name self.spectral_class = spectral_class # create a child class here
For those of you running a Magpul UBR stock with a two-point sling and quick release swivels, I highly recommend modifying the stock to use an anti-rotation / limited rotation sling swivel cup. I specifically use a Blue Force Gear VCAS (Vickers Combat Application Sling) with quick detach sling swivels on the front and...
def rename_templates(): print('Renaming templates to follow standard naming.') for root, _dirs, files in os.walk(SCRIPT_DIR): for _index, item in enumerate(files): _filename, ext = os.path.splitext(item) if ext == '.json': try: json_file = os.p...
<reponame>timskillman/pico-arcade #pragma once #include <string> #include <cstdint> #include <algorithm> #include <vector> #include "font8_data.hpp" #include <math.h> #define DEGRAD 0.01745329f // a tiny little graphics library for our Pico products // supports only 16-bit (565) RGB framebuffers namespace pimoroni {...
// Get port from well-known URL schemes. fn scheme_to_port(scheme: Option<&str>) -> Option<u16> { match scheme { // HTTP Some("http" | "ws") => Some(80), // HTTP Tls Some("https" | "wss") => Some(443), // Advanced Message Queuing Protocol (AMQP) Some("amqp") => Some(5...
Ofwat criticises four water companies for ‘shortcomings in data handling’, saying it cannot be sure the firm’s information is accurate Thames Water: regulator says data from utility cannot be taken at face value The utilities regulator has dealt a further blow to Thames Water’s reputation by saying information issued...
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <cstring> #include <cstdlib> #define llong long long #define For(i,a,b) for(int i=(a);i<(b);i++) #define Rep(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){ int A, B; cin >> A >> B; int ans = 0; For(i, A, B+1){ ...
package io.tilt.minka.model; import java.io.InputStream; import java.time.Instant; import java.util.function.Supplier; import org.apache.commons.lang.Validate; import com.fasterxml.jackson.annotation.JsonIgnore; import io.tilt.minka.domain.ShardEntity; /** * Note this builder does not support large binary payload...
<filename>o2/tpl.go<gh_stars>1-10 // authors: wangoo // created: 2018-06-02 // template package o2 import ( "html/template" "net/http" "github.com/go2s/o2s/tpl" "github.com/golang/glog" ) var loginTemplate *template.Template var authTemplate *template.Template var indexTemplate *template.Template func parse(na...
-- | Tests for Saddleback module Main (main) where import Control.Monad import Data.List (sort) import Data.Word import Saddleback import Test.QuickCheck main :: IO () main = do putStrLn "\nSaddlebackSpec" -- using other types than Integer in the tests below will result in test failures -- due to overflow...
// CreateRouteTable creates a route table for the specified After you // create a route table, you can add routes and associate the table with a // subnet. For more information about route tables, see Route Tables in the // Amazon Virtual Private Cloud User Guide func (c *EC2) CreateRouteTable(req *CreateRouteTableRequ...
package org.sang.controller; import org.sang.bean.Category; import org.sang.bean.ComLikes; import org.sang.bean.Likes; import org.sang.bean.RespBean; import org.sang.service.ComLikesService; import org.sang.service.LikesService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework....
/** * Constructs an instance of {@link IdentifiedText} * using the values assigned to this builder. * @return an instance of {@link IdentifiedText} */ @Override @NonNull public IdentifiedText build() { return new IdentifiedText(this); }