content
stringlengths
10
4.9M
// handleMsgSetDefaultWallet allows to properly handle a MsgSetDefaultWallet func (m *Module) handleMsgSetDefaultWallet(msg *typeswallets.MsgSetDefaultWallet) error { if err := m.walletsRepo.SaveDefaultWallets(msg); err != nil { return err } targetWallet, err := m.walletsRepo.GetWallets(filter.NewFilter().SetArgum...
The present and future of cough counting tools The widespread use of cough counting tools has, to date, been limited by a reliance on human input to determine cough frequency. However, over the last two decades advances in digital technology and audio capture have reduced this dependence. As a result, cough frequency ...
import java.awt.*; import java.awt.event.*; import javax.swing.*; public class ChatClientSwing implements ActionListener { private JFrame chatFrame; private JPanel chatPanel; private JTextField inputField; private JList<String> list; private DefaultListModel<String> listModel; private JTextAre...
#ifndef DNest4_Data #define DNest4_Data #include <vector> #include <algorithm> #include <cmath> class Data { private: std::vector<double> t, y, sig; public: Data(); //void load(const char* filename); void load(const char* filename, const char* units, int skip=2); int index_fibers; const char* datafile...
<reponame>ml-tv/tv-api<gh_stars>0 package handlers_test import ( "encoding/json" "net/http" "net/http/httptest" "testing" "github.com/ml-tv/tv-api/src/components/users/handlers" "github.com/ml-tv/tv-api/src/components/users/payloads" "github.com/ml-tv/tv-api/src/components/users/routes" "github.com/ml-tv/tv-a...
import numpy as np from continual_rl.experiments.environment_runners.environment_runner_sync import EnvironmentRunnerSync from continual_rl.experiments.tasks.task_base import TaskSpec from tests.common_mocks.mock_policy.mock_policy import MockPolicy from tests.common_mocks.mock_policy.mock_policy_config import MockPoli...
// Decodes a four symbols in parallel using the given tables. static inline uint32_t RansSimdDecSym(RansSimdDec* r, RansWordTables const* tab) { __m128i freq_bias_lo, freq_bias_hi, freq_bias; __m128i freq, bias; __m128i xscaled; __m128i x = r->simd; __m128i slots = _mm_and_si128(x, _mm_set1_epi32(RA...
# # License: BSD # https://raw.githubusercontent.com/stonier/groot_rocker_extensions/devel/LICENSE # ############################################################################## # Documentation ############################################################################## """ This is the top-level namespace of the...
<filename>test/com/tvl/util/TestExtensionMethods.java // Licensed under the MIT license. See LICENSE file in the project root for full license information. package com.tvl.util; import java.util.Map; import org.junit.Assert; final class TestExtensionMethods { private static final double GOLDEN_RATIO = (1 + Math.s...
/** Changes the type of a value by calling {@link Value#as(DataType)}. */ public class ExplicitCast extends Expression implements ValueHolder { private final DataType targetType; private final ValueHolder target; /** * Creates an {@link ExplicitCast}. * * @param targetType is the type that the target should ...
Antiviral Therapy Reduces Risk of Cirrhosis in Noncirrhotic HBV Patients Among 4 Urban Safety-Net Health Systems. INTRODUCTION To evaluate the impact of chronic hepatitis B virus infection (CHB) treatment on risk of cirrhosis, liver-related outcomes, and death among a diverse CHB cohort with a large proportion of Afri...
/** * Base implementation of Kinesis Input Operator. Fetches records from kinesis and emits them as tuples.<br/> * <p> * <b>Partition Strategy:</b> * <p><b>1. ONE_TO_ONE partition</b> Each operator partition will consume from only one Kinesis shard </p> * <p><b>2. ONE_TO_MANY partition</b> Each operator partition ...
<filename>java/com/lyghtningwither/honeyfunmods/entity/EntityLightningStaff.java<gh_stars>0 package com.lyghtningwither.honeyfunmods.entity; import net.minecraft.block.BlockSand; import net.minecraft.block.BlockStainedGlass; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import...
[The following is an exact transcript of this podcast.] If you’ve ever craved an ice-cold soda, you know that sometimes you’re just looking for something that tastes…fizzy. If that sounds odd, scientists have discovered that carbonation actually has a flavor. And that our taste buds can sense CO2. Bubbly soft drinks ...
// maybeMakeMessages recognizes when a dict is assigned to a message field or // when a list or tuple of dicts or Nones is assigned to a repeated message // field. // // It converts dicts or Nones to *Message of corresponding type using NewMessage // and FromDict and returns them as Starlark values to use in place of p...
when in doubt, pull a bait and switch? Pundits and commentators are still perplexed by Ken Ham and his temple of ignorance, and keep setting out on a snipe hunt for a deep, complicated reason why he created it. For his article in Vanity Fair, British writer and critic A. A. Gill took a trip to Ken Ham’s grand temple ...
/*! Abstract interface ... no data, only results. Basically used to change the BlackVariance() methods to totalVariance. Also deal with lagged observations of an index with a (usually different) availability lag. */ class YoYOptionletVolatilitySurface : public VolatilityTermStructure { ...
def modify_url_for_impersonation(cls, url, impersonate_user, username): pass
<filename>src/Network/MoHWS/Server/Environment.hs {- | Copyright: 2006, <NAME> Copyright: 2009, <NAME> This is an extension of ServerContext, which is used privately in the Server. In addition to ServerContext it holds the module list, which is not accessible by modules. -} module Network.MoHWS.Server.Environment wher...
<reponame>thorsten-l/diva package sonia.webapp.diva.db; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.stereotype.Repository; /** * * @author <NAME> (<EMAIL>) */ @Repository public interface DgcvRequestLogRepository extends PagingAndSortingRepository<DgcvRequest...
/** * This is a {@link net.sf.mmm.util.validation.api.ValueValidator} that * {@link net.sf.mmm.util.validation.api.ValueValidator#validate(Object, Object) validates} that a date lies in the * past. * * @param <V> is the generic type of the value to {@link #validate(Object) validate}. * * @author Joerg Hohwiller ...
def toMatrix(self): twoxx = 2 * self.x * self.x twoyy = 2 * self.y * self.y twozz = 2 * self.z * self.z twowx = 2 * self.w * self.x twowy = 2 * self.w * self.y twowz = 2 * self.w * self.z twoxy = 2 * self.x * self.y twoxz = 2 * self.x * self.z twoy...
import type { FC } from 'react'; import { SvgIcon } from './style'; export const CalendarIcon: FC = () => ( <SvgIcon version="1.1" x="0px" y="0px" viewBox="0 0 512 512"> <g> <path d="M452,40h-24V0h-40v40H124V0H84v40H60C26.916,40,0,66.916,0,100v352c0,33.084,26.916,60,60,60h392 c33.084,0,60-26.916,6...
/** * Default conflict resolver.Implements closer newer first policy by default, but could be configured via plexus * * @author <a href="mailto:oleg@codehaus.org">Oleg Gusakov</a> * @version $Id: DefaultGraphConflictResolver.java 958295 2010-06-26 23:16:18Z hboutemy $ */ @Component( role = GraphConflictResolver.cl...
Credit: © WFOL.com Niagara Falls 35th Annual Winter Festival of Lights is Back! It’s back! Canada’s largest lights festival is officially celebrating its 35th anniversary in Niagara Falls this year for what organizers are claiming to be its brightest season yet. The Ontario Power Generation Winter Festival of Light...
/** * * @author Radek Matous, Jirka Rechtacek */ public class TestUtils { private static UpdateItem item = null; private static ModuleManager mgr = null; public static void setUserDir(String path) { System.setProperty ("netbeans.user", path); } /** Returns the platf...
<reponame>prodanPaulStudent/reporobo package org.firstinspires.ftc.teamcode.drive.userOpModes.robo7u.TeleOps.AutomatedTeleOps; public class AutoAimTester { }
// read from the given confsDir to generate a WorkflowConf object public static WorkflowConf readWfConf(FileSystem fs, Path confsDir) throws IOException, FileNotFoundException { Path inFile = new Path(confsDir, confFileName); if (!fs.exists(inFile)) { throw n...
/** * Returns true if selectio contains a component * * @param component * @return boolean */ public boolean contains(Component component) { int x = component.getX() - getX(); int y = component.getY() - getY(); return contains(x, y) || contains(x + compo...
PD Ahn Joon Young, who produced Mnet’s popular hit survival show “Produce 101 Season 2,” recently sat down for an interview, where he talked about a variety of topics. Despite stating that he wouldn’t do “devil’s editing” during the show’s press conference, many viewers have complained saying that the PD incorporated ...
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ReactiveFormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; // import { DragulaModule } from 'ng2-dragula'; import { MatCardModule, MatFormFieldModule, MatInputModule, MatButtonModule } fr...
/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ #include <inttypes.h> #include <stdint.h> #include <stddef.h> #include <stdio.h> #include <string.h> #include <sys/queue.h> #include <rte_memory.h> #include <rte_eal.h> #include <rte_common.h> #include "eal_private.h" #include "e...
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define fr(i,k,n) for(ll i = k;i<n;i++) #define mo map<ll,ll> //map<ll,ll> ms; vector<ll> v; ll arr[2000000 + 1]; ll pos[2000000 + 1]; ll neg[2000000 + 1]; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); set<ll> s...
<gh_stars>1000+ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for // license information. // // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.quantum.jobs.implementation; import com.azure.core.http.HttpP...
/// Returns an iterator over response statuses, sorted lexicographically by /// message id. pub fn statuses(&self) -> impl Iterator<Item = (&MessageId, &IngressStatus)> { self.statuses .iter() .map(|(id, status)| (id, status.as_ref())) }
<reponame>codewillclick/densitygrid #!/usr/bin/env python import re import sys import random as R inc = None over = None count = 50 frame = [0,0,300,200] if len(sys.argv) > 1: frame = map(int,sys.argv[1].split(',')) if len(sys.argv) > 2: try: count = int(sys.argv[2]) except ValueError: m = re.match(r'^(\d+)/(\d...
a = int(input()) b = int(input()) c = int(input()) nums = [a, b, c] sums = [] sums.append(nums[0]+nums[1]*nums[2]) sums.append(nums[0]*(nums[1]+nums[2])) sums.append(nums[0]*nums[1]*nums[2]) sums.append((nums[0]+nums[1])*nums[2]) sums.append(nums[0]+nums[1]+nums[2]) print(max(sums))
/** * Class {@link Builder} follows the builder pattern for {@link GitHubRequest}. * * @param <B> * The type of {@link Builder} to return from the various "with*" methods. */ static class Builder<B extends Builder<B>> { @Nonnull private final List<Entry> args; ...
On the morning of April 24, 2013, at about 8:45 a.m., the Rana Plaza, a nine-story building housing factories and offices, collapsed in the Bangladeshi capital Dhaka. More than 3,500 people were in the building at the time, and 1,129 died in the wreckage. Mainuddin Khandaker, a senior official at the Ministry of Home A...
Practical Application of the New Classification Scheme for Congenital Melanocytic Nevi A new consensus‐based classification of congenital melanocytic nevi (CMN) has recently been proposed. It includes categories for projected adult size (PAS) and location, satellite nevi counts, and morphologic characteristics (color ...
/** * A Datapoint consumer implementation for a long datapoint. */ public class LongDataPointConsumer extends DataPointConsumerGeneric<Long> implements IDataPointConsumer<Long> { /** * Constructor. * * @param remoteGroup Group identifier of the remote datapoint * @param remoteClient Client identif...
def gae(rewards: np.ndarray, values: np.ndarray, gamma: float, lam: float) -> np.ndarray: T, = rewards.shape v_next = values[1:] v_current = values[:-1] delta = rewards + gamma * v_next - v_current t = lambda i: T - 1 - i return jax.lax.fori_loop( 0, T, ...
<gh_stars>0 /* * Copyright 2018 - 2021 Blazebit. * * 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...
COBIT 5.0: Capability Level of Information Technology Directorate General of Treasury Information system is one of the most important things that can help every companies to improve the performance of their company. The Directorate Generate of the Treasury is one of the government agencies that already use information...
/** * Entity for storing @{@link Localized} fields of an arbitrary entity. * * @author Victor Zhivotikov * @since 0.1 */ @Entity @Table(uniqueConstraints = @UniqueConstraint(columnNames = {"tableName", "instance", "locale", "field"})) @DynamicInsert @DynamicUpdate @Data @Builder @NoArgsConstructor @AllArgsConstruc...
<reponame>mengfj/cdi_compute<gh_stars>0 package com.ibm.cdi.api; import java.net.URI; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriBuilder; import io.swagger.annotations.Api; @Path("/") @Api(hidden = true) public class SwaggerService { @GET public ...
// Upd updates node based on uid and changed fields, and unmarshals updated result into supplied obj func (Simple) Upd(txn *ndgo.Txn, obj interface{}) (err error) { if err = validateInput(obj); err != nil { return err } dgType := getDgType(obj) uid := updGetUIDSetUID(obj) err = Stateless{}.Upd(txn, uid, dgType, ...
<reponame>lifer84/pacbot<gh_stars>1000+ package com.tmobile.pacbot.azure.inventory.collector; import java.net.URLEncoder; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory...
<reponame>dguder/Notepad3 // Scintilla source code edit control /** @file UniqueString.h ** Define UniqueString, a unique_ptr based string type for storage in containers ** and an allocator for UniqueString. ** Define UniqueStringSet which holds a set of strings, used to avoid holding many copies ** of font names. ...
<filename>Pods/OpenVPNAdapter/Sources/OpenVPN3/openvpn/common/split.hpp // OpenVPN -- An application to securely tunnel IP networks // over a single port, with support for SSL/TLS-based // session authentication and key exchange, // packet encryption, packet authentication, ...
def createMPlugAndUsdAttribute(self, sdfValueType, nodeName, stage, primPath): plugAndAttrName = "my"+str(sdfValueType).replace('[]','Array'); cmds.group(name=nodeName, empty=True) plug = mayaUsdLib.ReadUtil.FindOrCreateMayaAttr( sdfValueType, Sdf.VariabilityUniform, ...
<reponame>etf1/health-check package healthcheck import ( "errors" "fmt" "github.com/gomodule/redigo/redis" "time" ) /* checks: - connection (Pool) - closeTest connection - ping */ func RedisCheck(url string) func() error { return func() (err error) { pool := &redis.Pool{ MaxIdle: 1, IdleTimeout: 10 *...
/* * Copyright (C) 2016 The Android Open Source 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 required by app...
/** * Critical user journeys with which to exercise the system, driven from the * host. */ public class Cujs { private Device mDevice; public Cujs(Device device) { this.mDevice = device; } /** * Runs the critical user journeys. */ public void run() throws TestException { ...
/** * Grab a resource from the front of the resource list. * Assumes: that the reslist is locked. */ static apr_res_t *pop_resource(apr_reslist_t *reslist) { apr_res_t *res; res = APR_RING_FIRST(&reslist->avail_list); APR_RING_REMOVE(res, link); reslist->nidle--; return res; }
Electromechanical Equipment for Integrated Use of Power Potential of Hydroelectric Power Plant Reservoirs The energy feasibility of using the heat and mechanical potentials of hydroelectric power stations water was determined using the developed expression of the energy efficiency criterion. Using the developed criter...
package io.zero88.qwe; import io.zero88.qwe.crypto.CryptoRequest; import lombok.NonNull; /** * Represents for a {@code Plugin} that keeps a single duty function. * * @param <C> Type of Plugin Config * @param <T> Type of Plugin Context * @see PluginConfig * @see PluginContext * @see PluginVerticle */ public i...
import Data.Char myprocess :: [Char] -> [Char] myprocess [] = [] myprocess (c:left) = if c `elem` ['a','e','i','o','u','y'] then myprocess left else ['.',c] ++ myprocess left main = do str <- getLine putStrLn $ myprocess $ map toLower str
def related_logentries(self, instance): return LogEntry.objects.filter( attached_to_object_type=ContentType.objects.get_for_model(type(instance)), attached_to_object_id=instance.pk, )
A = [i for i in input().split()] A.sort() s = "".join(A) YN = lambda b: print('YES') if b else print('NO') YN( s == "557" )
Hey there, time traveller! This article was published 17/9/2014 (1623 days ago), so information in it may no longer be current. Winnipeg’s leading business organization says the city's residents are still waiting for the mayoral candidates to outline their vision for the city. Loren Remillard, the Winnipeg Chamber o...
def entity_to_pb_v1(self, entity): v3_entity = self.entity_to_pb(entity) v1_entity = googledatastore.Entity() self._entity_converter.v3_to_v1_entity(v3_entity, v1_entity) return v1_entity
/** * An extensible {@link Concourse} wrapper that simply forwards method calls to * another {@link Concourse} instance. * <p> * This class is meant to be extended by a subclass that needs to override a * <strong>subset</strong> of methods to provide additional functionality before * or after the Concourse method...
def clear_field_actions(self, fieldname): if self._index is None: raise errors.IndexerError("IndexerConnection has been closed") if fieldname in self._field_actions: del self._field_actions[fieldname] self._config_modified = True
import Vue from 'vue' import Component from 'vue-class-component' import { Model } from '../../src/decorators/Model' describe(Model, () => { @Component class TestComponent extends Vue { @Model('change', Boolean) checked!: boolean } const { $options } = new TestComponent() test('define model option corr...
<gh_stars>10-100 use crate::common::*; use super::{ expr::As, Aggregation, AudienceBoard, Between, BinaryOp, BinaryOperator, Column, Context, ContextKey, Distribution, Expr, ExprMeta, ExprT, ExprTree, Function, FunctionName, GenericRel, GenericRelTree, Hash, HashAlgorithm, Literal, LiteralValue, Noisy, Pro...
// NewFeedsManagerResource constructs a new FeedsManagerResource. func NewFeedsManagerResource(ms feeds.FeedsManager) *FeedsManagerResource { return &FeedsManagerResource{ JAID: NewJAIDInt64(ms.ID), Name: ms.Name, URI: ms.URI, PublicKey: ms.PublicKey, JobTypes: ms.JobTypes, Network: ms.N...
def domains_dns_setCustom(self, domain, host_records): extra_payload = host_records sld, tld = domain.split(".") extra_payload['SLD'] = sld extra_payload['TLD'] = tld self._call("namecheap.domains.dns.setCustom", extra_payload)
Lindzen Illusion #3 and Christy Crock #5: Opposing Climate Solutions Posted on 3 May 2011 by dana1981 Recently, "skeptic" climate scientist John Christy testified before U.S. Congress, and both Christy and fellow "skeptic" Richard Lindzen have been interviewed on an Australian radio talk show regarding the country's ...
// This implementation comes from the pseudocode in Andrew J. Hanson and Hui Ma, // Parallel Transport Approach to Curve Framing (1995) inline frame3f parallel_trans_frame(const vec3f &pos, const vec3f &tangent, const frame3f &pframe) { auto b = cross(tangent, pframe.z); if (length(b) < 0.01f) return ma...
Looking for news you can trust? Subscribe to our free newsletters. Not to pick on the Sunshine State, where I was reared and the 2000 election was sorta decided, but it’s always been the crazy-news nexus of the universe…and that was before last year’s elections, which handed legislative supermajorities and every stat...
import AjaxCacheController from '../../../../shared/modules/AjaxCache/AjaxCacheController'; import CacheInvalidationRulesVO from '../../../../shared/modules/AjaxCache/vos/CacheInvalidationRulesVO'; import APIControllerWrapper from '../../../../shared/modules/API/APIControllerWrapper'; import IAPIController from '../../...
/* Note: The Barricade rom is using a resolution of 32x24 which suggests slightly different hardware from HitMe (40x19) however the screenshot on the arcade flyer is using a 40x19 resolution. So is this a different version of Barricade or is the resolution set by a dip switch? */ void hitme_state::barri...
import { memo } from 'react'; import { Form, Field } from 'react-final-form'; import { SubscriptionField } from 'features/Auth/SubscriptionField/SubscriptionField'; import { CheckboxesList, Dropdown, Review, TimePicker, PriceSlider } from 'shared/view/components'; import { checkboxesListData, expandableCheckboxesL...
def menu(self): background_image = pygame.image.load("images/menu.png").convert() done = False pygame.display.set_caption(constants.WINDOW_TITLE) while not done: for event in pygame.event.get(): if event.type == pygame.QUIT: return "Thanks ...
/** * Write result delimiter to output * @param context * @return number of bytes written */ static size_t writeDelimiter(scpi_t * context) { if (context->output_count > 0) { return writeData(context, ", ", 2); } else { return 0; } }
/// Save resource. Return true if successful. bool ObjectAnimation::Save(Serializer& dest) const { XMLFile xmlFile(context_); XMLElement rootElem = xmlFile.CreateRoot("objectanimation"); if (!SaveXML(rootElem)) return false; return xmlFile.Save(dest); }
// NewMockCreateUser creates a new mock instance. func NewMockCreateUser(ctrl *gomock.Controller) *MockCreateUser { mock := &MockCreateUser{ctrl: ctrl} mock.recorder = &MockCreateUserMockRecorder{mock} return mock }
// output adds the given paths as outputs to the task, which results in their // contents being uploaded to the isolate server. func (b *taskBuilder) output(paths ...string) { for _, path := range paths { if !In(path, b.Spec.Outputs) { b.Spec.Outputs = append(b.Spec.Outputs, path) } } }
I think about email a lot because my company makes email software. I was talking with a friend yesterday and it got me thinking, just how much email is there, anyway? So, I looked. A lot of email, it turns out. Like, a whole lot. In 2013, humanity sent about 150 billion emails each day. That’s 21 messages received per...
// User wants a different trust store than the keystore func TestUserSuppliedTLSSecretWithSeparateTrustStore(t *testing.T) { tlsSecretName := "tls-cert-secret-from-user" keystorePassKey := "some-password-key-thingy" instance := buildTestSolrCloud() instance.Spec.SolrSecurity = &solr.SolrSecurityOptions{Authenticati...
// SciTE - Scintilla based Text Editor /** @file SciTE.h ** Define command IDs used within SciTE. **/ // Copyright 1998-2003 by <NAME> <<EMAIL>> // The License.txt file describes the conditions under which this software may be distributed. #ifndef SCITE_H #define SCITE_H // Menu IDs. // These are located...
// compute the evals and S/N ratios. Will ignore the top 'shave' most points until r2 meets the min requirement public Histogram fitEval(int samples, int shave, double min_r2) { if (mData==null) return this; Collections.sort(mData, Ordering.natural().reverse()); List<Double> data = new ArrayList<>(getData...
/* detect_res detects the combined resolution of all monitors attached to the computer */ void detect_res(void) { uint32_t count = 0, chars = 0; CGGetOnlineDisplayList(UINT32_MAX, NULL, &count); CGDirectDisplayID displays[count]; CGGetOnlineDisplayList(count, displays, &count); chars += snprintf(res_str, MA...
/** * An Event is emitted by the Platform Service to all attached listeners. * @author Desonte 'drjoliv' Jolivet : drjoliv@gmail.com */ public abstract class Event { private final Object source; public Event(Object source) { this.source = source; } /** * Returns the source of this event. * @return...
/** * Created by zcrpro on 2018/1/4. */ public class HelpOldActivity extends Activity { @InjectView(R.id.account) TextView account; @InjectView(R.id.notice_btn) Button noticeBtn; @InjectView(R.id.main_view) RelativeLayout mainView; @InjectView(R.id.title_icon) ImageView titleIcon; ...
The aftermath of the Paris terror attacks included calls for calm and solidarity—and some dangerous rumour-mongering and distortions. Amid the swirl of misinformation, a Sikh man from Canada found himself accused by the internet of being one of the terrorists in the deadly Paris attacks. It began after a bathroom sel...
<reponame>davideby/gsea-desktop<filename>src/main/java/org/genepattern/modules/Chip2ChipWrapper.java /* * Copyright (c) 2003-2022 Broad Institute, Inc., Massachusetts Institute of Technology, and Regents of the University of California. All rights reserved. */ package org.genepattern.modules; import java.io.File; ...
<reponame>michaelruocco/exercises package uk.co.mruoc.exercises.batch; import lombok.Data; import lombok.RequiredArgsConstructor; import java.util.Collection; import java.util.Collections; @RequiredArgsConstructor @Data public class MessageBatch { private final Collection<Message> messages; public Collecti...
/** * Gets a resource as a URL. Resources are all assumed to be in the * central "Resources" directory. * * @param filename The filename of the resource (not the path) * For example: "foo.gif" */ public static URL toURL(final String filename) { return JarResources.c...
def linear_sum_assignment(costs, solver=None): costs = np.asarray(costs) if not costs.size: return np.array([], dtype=int), np.array([], dtype=int) solver = solver or default_solver if isinstance(solver, str): solver = solver_map.get(solver, None) assert callable(solver), 'Invalid LA...
Income Inequality and Current Account Imbalances This paper studies the empirical and theoretical link between increases in income inequality and increases in current account deficits. Cross-sectional econometric evidence shows that higher top income shares, and also financial liberalization, which is a common policy ...
Pediatric 320-row cardiac computed tomography using electrocardiogram-gated model-based full iterative reconstruction Background Full iterative reconstruction algorithm is available, but its diagnostic quality in pediatric cardiac CT is unknown. Objective To compare the imaging quality of two algorithms, full and hybr...
package com.intellij.openapi.diff.impl.highlighting; import com.intellij.openapi.diff.ex.DiffFragment; import com.intellij.util.Assertion; import junit.framework.TestCase; public class LineBlockDividesTest extends TestCase { private final Assertion CHECK = new Assertion(new FragmentStringConvertion()); @Override...
/// Pull actions can be configured to get configuration and secrets from integrations on demand. pub fn new() -> PatchedGitHubPull { PatchedGitHubPull { url: None, id: None, name: None, description: None, latest_task: None, created_at: None...
<reponame>InfraBox/infrabox<filename>src/services/gcp/controller.go<gh_stars>10-100 package main import ( "encoding/json" "fmt" "os/exec" "time" b64 "encoding/base64" "github.com/golang/glog" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s....
<gh_stars>0 package acceptance_test import ( "os" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" "github.com/sclevine/agouti" . "github.com/sclevine/agouti/matchers" "github.com/concourse/atc/db" "github.com/concourse/atc/postgresrunner" "github.com/tedsuo/ifrit" "tes...
/** * Transforms a sequence of bytes into a Time unit * @param bin * @param startIndex * @return */ public static MessageMetadata byteToMessageMetaData(byte[] bin, int startIndex){ int r = 0; r += (int)((bin[startIndex ] << 24) & 0xFFFFFFFF); r += (int)((bin[startIndex + 1] << 16) & 0xFFFFFF); ...
/** * Parses a prodom.ipr file and creates Signature / Method objects appropriately. * * @author Matthew Fraser, EMBL-EBI, InterPro * @version $Id$ * @since 1.0-SNAPSHOT */ public class ProDomModelParser extends AbstractModelFileParser { /* * Example prodom.ipr input file: * * >IGJ_RABIT#PD02...
def install_config(src: str, dest: str, mode: str = "0664", force: bool = False): if os.path.exists(dest) and not force: return args = ["-b", "-o", "root", "-g", "wheel", "-m", mode, src, dest] _install(*args)