content
stringlengths
10
4.9M
package moze_intel.projecte.api.tile; import javax.annotation.Nonnull; import javax.annotation.Nullable; import moze_intel.projecte.api.ProjectEAPI; import moze_intel.projecte.api.capabilities.tile.IEmcStorage; import net.minecraft.block.BlockState; import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity...
Human body contour data based activity recognition This research work is aimed to develop autonomous bio-monitoring mobile robots, which are capable of tracking and measuring patients' motions, recognizing the patients' behavior based on observation data, and providing calling for medical personnel in emergency situat...
San Francisco 49ers coach Jim Harbaugh would be the fans' top choice to replace Brady Hoke, should Hoke be fired as Michigan football coach. (Photo: Tony Avelar / Associated Press) ESPN's Adam Schefter believes Jim Harbaugh is "more interested in staying in the pros" than coaching at Michigan. Schefter, who went to M...
/** * Generates a self-signed certificate and saves it in the keystore and truststore. * Should only be used to init the root CA. It is expected that info about the root keystore and the truststore * is available in PKIConfiguration. If they already exists they will be overwritten! * * @param r...
def elasticsearch_builder(): if USERNAME: if PROXY: return Elasticsearch(hosts=[SERVER], connection_class=RequestsHttpConnection, http_auth=(USERNAME, PASSWORD), verify_certs=INSECURE, proxies=handle_proxy()) else: return Elasticsearch(hosts=[...
/* * Copyright (c) 2021. Dell Inc., or its subsidiaries. All Rights Reserved. * * 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 * */ pac...
/** * Class for creating various kinds of terms. Instances of this class maintain * an internal cache that allows them to re-use the generated objects, which is * useful to safe memory since the same term is often needed in multiple places. * * @author Markus Kroetzsch * */ public class TermFactory { /** * ...
<gh_stars>0 package org.pega.metrics.prpc.meter; import com.pega.pegarules.pub.clipboard.ClipboardProperty; import io.micrometer.core.instrument.Meter; import io.micrometer.core.instrument.Tags; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.p...
// Libraries import React, {PureComponent, ChangeEvent} from 'react' import _ from 'lodash' // Components import TabbedPageHeader from 'src/shared/components/tabbed_page/TabbedPageHeader' import {Input, IconFont, ComponentSize, EmptyState} from 'src/clockface' import TaskList from 'src/organizations/components/TaskLis...
def stringsRearrangement(inputArray): compare = inputArray[0] distances = [] for i in inputArray: current_distance = distance(compare,i) distances.append(current_distance) return metadata_check(distances) def metadata_check(distances): distances = sorted(distances) prev = di...
/** * Finds a AWS VPC with the specified CIDR. * * @param ec2 {@link AmazonEC2} * @param cidr CIDR * @return {@link Vpc} describing the VPC with the specified CIDR, otherwise * <code>null</code>. */ private static Vpc findVpcByCidr(AmazonEC2 ec2, String cidr) { Descr...
/** * The abstract parent of all clinical Entry subtypes. A CareEntry defines * protocol and guideline attributes for all clinical Entry subtypes. * * @author Yin Su Lim * @version 1.0 */ public abstract class CareEntry extends Entry { /** * Construct an Entry * * @param archetypeNodeId ...
package main import ( "fmt" "os" "time" "github.com/natefinch/lumberjack" "go.uber.org/zap" "go.uber.org/zap/zapcore" ) func syslogTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder) { enc.AppendString(fmt.Sprintf("|%s|", t.Format("2006-01-02T15:04:05"))) } func filelogTimeEncoder(t time.Time, enc za...
package br.game.castleduel; import br.game.castleduel.exception.PlayerException; import br.game.castleduel.gui.GuiInterface; import br.game.castleduel.gui.ServerGui; import br.game.castleduel.gui.WindowGui; import br.game.castleduel.player.PlayerFacade; import br.game.castleduel.player.PlayerInfo; import br.game.castl...
/** * Test using data taken from sample data file. * Check that the sampleCount, mu and sigma match data in the sample data file. */ @Test public void testDoubleLoad() { Assert.assertEquals(empiricalDistribution.getSampleStats().getN(), 1000, 1e-7); Assert....
def note_name(note: int) -> str: notes = ["C", "Cs", "D", "Ds", "E", "F", "Fs", "G", "Gs", "A", "As", "B"] name = notes[note % len(notes)] octave = note // 12 - 1 return f"{name}{octave}"
<filename>packages/analyzer/src/test/core/async-work-cache_test.ts<gh_stars>100-1000 /** * @license * Copyright (c) 2016 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be fo...
/** * Get the Streett acceptance condition that is the dual of this Rabin acceptance condition, i.e., * any word that is accepted by this condition is rejected by the returned Streett condition. * @return the complement Streett acceptance condition */ public AcceptanceStreettDD complementToStreett() { Accept...
// GetMappingByInstanceId returns all things mapped to the instance with the given id. func (m *DBClient) GetMappingByInstanceId(ctx context.Context, instanceId string) ([]connector.ThingMapping, error) { var thingMappings []connector.ThingMapping err := m.DB.Select(&thingMappings, statementGetThingsByInstanceID, ins...
Overall, 54.6% of students reported using SNSs for 2 h or less per day, 28.0% reported using them for more than 2 h d −1 and 17.4% reported infrequent or no use of SNSs (reference category). After adjustment for covariates, results showed that adolescent women who use SNSs for more than 2 h d −1 had greater odds of dis...
import unittest from src.spider.QQZoneFriendMoodSpider import QQZoneFriendMoodSpider class FriendMoodSpiderTest(unittest.TestCase): def test_init(self): QQZoneFriendMoodSpider() def test_change_name(self): fms = QQZoneFriendMoodSpider(mood_num=20) fms.change_username("120000", "test...
<filename>cmd/wrgl/hub/repo/delete_cmd.go // SPDX-License-Identifier: Apache-2.0 // Copyright © 2021 Wrangle Ltd package repo import ( "fmt" "github.com/spf13/cobra" "github.com/wrgl/wrgl/cmd/wrgl/hub/api" "github.com/wrgl/wrgl/cmd/wrgl/utils" ) func deleteCmd() *cobra.Command { cmd := &cobra.Command{ Use: ...
Smart Response Concept for Fire Emergency Response in Surabaya City The city of Surabaya is one of the second major cities in Indonesia. At present the growth and development of the city of Surabaya is very rapid in various fields. Increased population density, the number of office building developments, residential a...
<reponame>JakobBruenker/ghc<gh_stars>1-10 {-# LANGUAGE Unsafe #-} {-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples #-} {-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.IOPort -- Copyri...
/** * Verifies that the given condition is true. If not, throws a SerializationException. */ void ensureCondition(boolean condition, String messageFormat, Object... args) throws SerializationException { if (!condition) { throw new SerializationException(String.format(messageFormat, args));...
async def _get_alpha_numbers(category): sql = 'SELECT IF(SUBSTR(name, 1, 1) REGEXP \'^[0-9]\', \'#\', LOWER(SUBSTR(name, 1, 1))) as alpha, COUNT(*) as number ' \ 'FROM _items ' \ 'WHERE category = %s ' \ 'GROUP BY alpha' result = await objects.execute(Item.raw(s...
#include <bits/stdc++.h> using namespace std; class ClinderellaGirls { public: //O(nlogn) int count(vector<int> t, vector<int> s) { vector<pair<int, int>> ts(t.size(), make_pair(0, 0)); for(int i = 0; i < t.size(); i++) { ts[i].first = t[i]; ...
// BuildContinue takes 1) one argument, an identifer node // 2) empty TreeNode* ASTBuilder::BuildContinue() { if (mTrace) std::cout << "In BuildContinue " << std::endl; ContinueNode *continue_node = (ContinueNode*)gTreePool.NewTreeNode(sizeof(ContinueNode)); new (continue_node) ContinueNode()...
<gh_stars>1000+ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package packagestest_test import ( "go/token" "testing" "golang.org/x/tools/go/expect" "golang.org/x/tools/go/packages/packagestest" "gol...
import React, { useState } from 'react'; import { TouchableWithoutFeedback, Keyboard } from 'react-native'; import { useNavigation, useRoute } from '@react-navigation/native'; import { Button } from '../../components/Button'; import { InputIcon } from '../../components/InputIcon'; import { HeaderSignIn } from '../../c...
def list(self, **kwargs): disk_list = \ self.compute_client.disks.list_by_resource_group(self.group_name) found = [] for disk in disk_list: results = disk.as_dict() result = self.update_dict([results]) found.extend(result) return found
/** * Paints this component. * * @param g The graphics context. */ @Override protected void paintComponent(Graphics g) { if (textArea==null) { return; } visibleRect = g.getClipBounds(visibleRect); if (visibleRect==null) { visibleRect = getVisibleRect(); } if (visibleRect==null) { return; ...
package org.andengine.opengl.vbo; import android.opengl.GLES20; /** * (c) Zynga 2012 * * @author <NAME> <<EMAIL>> * @since 15:41:14 - 27.03.2012 */ public enum DrawType { // =========================================================== // Elements // =========================================================== ...
<filename>shop-web/user-api/tests/viper_test.go package main import ( "fmt" "github.com/spf13/viper" "testing" ) type MysqlConfig struct { Host string `mapstructure:"host"` port int `mapstructure:"port"` } type ServerConfig struct { ServerName string `mapstructure:"name"` port int `mapst...
/** * @param areHorVerFlipped Only used when filling. * @param isPolyline Only used if isFillElseDraw is false. */ private static void drawOrFillPoly( GRect clip, int[] xArr, int[] yArr, int pointCount, boolean areHorVerFlipped, bool...
/** * @author Michael Heymel * @since 12/12/16 */ public class Day12LeonardoMonorailTest { @Test public void test1() { String[] input = new String[]{"cpy 41 a", "inc a", "inc a", "dec a", "jnz a 2", "dec a"}; Day12LeonardoMonorail leonardosMonorail = new Day12LeonardoMonorail(); int ...
// Copyright (c) 2010-2022, Lawrence Livermore National Security, LLC. Produced // at the Lawrence Livermore National Laboratory. All Rights reserved. See files // LICENSE and NOTICE for details. LLNL-CODE-806117. // // This file is part of the MFEM library. For more information and source code // availability visit ht...
/** * An activity which tests the user's knowledge of our solar system. */ public class MultipleSelectionActivity extends AbstractQuestionActivity { private static final int MULTIPLE_SELECTION_LIMIT = 4; /** * The question to display. */ private static final String QUESTION = "Which of the following are moons...
//------------------------------------------------------------- // Return Y component of projection matrix //------------------------------------------------------------- double CGLView::getYProjection(double x, double y, double z){ double wy=P[1]*x+P[5]*y+P[9]*z+P[13]; double winy=0.5*(wy+1); return winy; ...
Mathematical knowledge: internal, social and cultural aspects I discuss some general aspects of the creation, interpretation, and reception of mathematics as a part of civilization and culture. First, one can simply identify mathematics with the contents of mathematical manuscripts, books, papers and lectures, with t...
import { JSDOM } from 'jsdom'; export declare const createDom: (html?: string) => JSDOM; export declare const parseFragment: typeof JSDOM.fragment;
The development of the encoding of deictic motion in the Bantu language Rangi: grammaticalisation and change Abstract The close cross-linguistic relation between the domains of space and time has been well described. The frequent emergence of Tense-Aspect-Mood (TAM) markers from deictic motion verbs in particular, has...
mod call_context_manager; use crate::{CanisterQueues, NumWasmPages, PageMap, StateError}; pub use call_context_manager::{CallContext, CallContextAction, CallContextManager, CallOrigin}; use ic_base_types::NumSeconds; use ic_interfaces::messages::CanisterInputMessage; use ic_protobuf::{ proxy::{try_from_option_fiel...
// Equal compares two kernels and returns true if they are equal. func Equal(a, b []byte) error { if len(a) != len(b) { return fmt.Errorf("images differ in len: %d bytes and %d bytes", len(a), len(b)) } var ba BzImage if err := ba.UnmarshalBinary(a); err != nil { return err } var bb BzImage if err := bb.Unma...
// NewCmdStruct construct NewCmd with string func NewCmdStruct(cmd string) (c *CmdStruct) { c = &CmdStruct{ i: 9, l: uint(len(cmd)), d: []byte(cmd), } return }
package main import ( "fmt" "os" "path/filepath" "github.com/mark-rushakoff/jty/pkg/jty" "github.com/spf13/afero" "github.com/spf13/pflag" ) func main() { fs := pflag.NewFlagSet("jty", pflag.ExitOnError) fs.Usage = func() { exe := filepath.Base(os.Args[0]) fmt.Fprintf(os.Stderr, "USAGE: %s [opts] [[INPUT...
<filename>src/Test/WebDriver/Utils.hs module Test.WebDriver.Utils where import Data.Text (Text) import Data.Text.Encoding as TE import qualified Network.HTTP.Types.URI as HTTP urlEncode :: Text -> Text urlEncode = TE.decodeUtf8 . HTTP.urlEncode False . TE.encodeUtf8
<reponame>manodeep/GadgetFileSplitter #pragma once #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include "gadget_defs.h" #include "filesplitter.h" #ifdef __cplusplus extern "C" { #endif int split_gadget(const char *filebase, const char *outfilebase, const int noutfiles, const file_copy_options copy_...
/** * IcsPosition generated by hbm2java */ @Entity @Table(name = "ics_position", schema = "public") public class IcsPosition implements java.io.Serializable { private int code; private String name; private String posType; private String description; private Set<UserInfo> userInfos = new HashSet<UserIn...
<reponame>santoshghimire/IL-Jobcrawl<gh_stars>0 import smtplib import logging import mimetypes from email.mime.multipart import MIMEMultipart from email import encoders from email.mime.audio import MIMEAudio from email.mime.base import MIMEBase from email.mime.image import MIMEImage from email.mime.text import MIMEText...
def lock_time(self): try: ctime = os.lstat(self.lockfilename)[9] except os.error, why: raise Error,\ 'could not read file lock info for "%s": %s' % \ (self.filename, why) return ctime
Jan 23, 2017; Miami, FL, USA; Miami Heat forward Willie Reed (35) reacts after a charging foul was called on Golden State Warriors forward Kevin Durant (not pictured) during the second half at American Airlines Arena. The Heat defeated the Golden State Warriors 105-102. Mandatory Credit: Steve Mitchell-USA TODAY Sports...
By Yvonne Renfrew | Tuesday, October 11, 2011 Originally published on August 9, 2011 in our free SmallLaw newsletter. Instead of reading SmallLaw here after the fact, sign up now to receive future issues in realtime. At the risk of being accused of sexism, I suspect female SmallLaw subscribers are more conversant tha...
def iteritems_by_object_type(self, object_type): for key, object_info in self.iteritems(): if object_info['object-type'] == object_type: yield key, object_info
/* * * Copyright 2014 <NAME> * * 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 to...
Influences of female partner preference on potential reproductive outcome in Japanese macaques. The immediate effects of female partner preference on male mating behaviors and its potential influence on male reproductive success and conception in the Japanese macaque (Macaca fuscata) were analyzed. Although male domin...
/* * ----------------------------------------------------------------------- * Check Signals * Called after every instruction to check for queued IO-jobs * and for the signals IRQ and FIQ * ----------------------------------------------------------------------- */ static inline void CheckSignals(void) { if (gcp...
/** * @author buildupchao * @date 2017/8/17 */ public class CompletableFutureExample { public static void main(String[] args) { callInStream(); } public static void callInStream() { CompletableFuture<Void> future = CompletableFuture .supplyAsync(() -> calculate(50)) .thenApply((i) -> Integer.valueOf(...
/* Computes whether a symbol (defined directly as a typedef/typename, or via a class) can be empty. bool is_empty<S>::value The complication is that this is a recursive predicate, and if you try to ask is_empty<s>::value whilst trying to compute is_empty<s>::value, then the C++ compiler will give an compilation e...
/* * Copyright (C) 2019 <NAME> * * 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...
#ifndef GAME_OVER_SCREEN_H #define GAME_OVER_SCREEN_H #include <SFML/Graphics.hpp> #include <vector> #include "Screen.h" #include "Button.h" namespace sfSnake { class GameOverScreen : public Screen { public: GameOverScreen(int score); void handleInput(sf::RenderWindow& window) override; void update(sf::Time delt...
M = 10**9+7 def suivantd(tab) : n = len(tab) tab2 = [0]*n x = 0 for i in range(n-1) : x = (tab[i]+x)%M tab2[i+1] += x return tab2 def suivantg(tab) : n = len(tab) tab2 = [0]*n x = 0 for i in range(n-1,0,-1) : x = (tab[i]+x)%M tab2[i-...
#include <iostream> using namespace std; int main() { int k,r; cin >> k >> r; //t*k = 10*x+r; //t*k = 10*x; int result = 0; for(int c = k; c <= k*10 && result == 0; c += k) { if( (c/10 > 0 && c%10 == 0) || ((c-r)/10 > 0 && (c-r)%10 == 0) || c == r ) result = c/k; ...
/** * intel_uncore_forcewake_user_put - release forcewake on behalf of userspace * @dev_priv: i915 device instance * * This function complements intel_uncore_forcewake_user_get() and releases * the GT powerwell taken on behalf of the userspace bypass. */ void intel_uncore_forcewake_user_put(struct drm_i915_privat...
Share. A delicious second course. A delicious second course. UPDATE (10/6/16): With iZombie: Season 2 available on Netflix as of today, we're re-featuring our review of the show's strong second season. Warning: Full spoilers for iZombie: Season 2 follow. Consistently offering clever, witty and fun episodes, iZombie ...
Effect of Sargassum sp. Extract on Phagocytic Activity of White Snapper (Lates calcarifer) Infected by Vibrio alginolyticus Bacteria Sargassum sp. is a natural synthesis product it has bioactive metabolites as flavonoid which can increase the fish body's defense system from attacks of disease. The purpose of this stud...
def import_(modulename): if debug: print >> sys.stderr, "import_:", modulename mod = __import__(modulename) for comp in modulename.split('.')[1:]: mod = getattr(mod, comp) return mod
<filename>concepts/graph/__main__.py from concepts.graph import Graph, Node graph = Graph() node1 = Node(1) node2 = Node(2) node3 = Node(3) node4 = Node(4) node5 = Node(5) node6 = Node(6) node1.children.append(node2) node1.children.append(node3) node2.children.append(node1) node2.children.append(node4) node3.childr...
#import <UIKit/UIKit.h> FOUNDATION_EXPORT double Pods_Instagram_ProjectVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_Instagram_ProjectVersionString[];
<reponame>gromgit/pour package cmd import ( "fmt" "github.com/gromgit/pour/internal/formula" "os" "regexp" "strings" ) // pour search [TEXT|/REGEX/] func StringMatcher(m string) func(s string) bool { return func(s string) bool { return strings.Index(s, m) >= 0 } } func RegexMatcher(m string) func(s string) ...
// Autogenerated from CppHeaderCreator // Created by Sc2ad // ========================================================================= #pragma once // Begin includes #include "beatsaber-hook/shared/utils/byref.hpp" // Including type: UnityEngine.ParticleSystem #include "UnityEngine/ParticleSystem.hpp" // Including typ...
Among the more intriguing results from Tuesday’s primary contests, the crowded race to fill the heavily-Democratic Eighth Congressional District in Maryland featured none other than the wife of Hardball host Chris Matthews whose candidacy included accusations that the couple leveraged their coziness with the D.C. and H...
// Inner class for text input change handling class TextChangeListener implements PropertyChangeListener { // The ActionListener interface requires that we override the actionPerformed() // method. // This method will be called automatically whenever a button event occurs. @Override ...
<filename>authtest/gssapi/windows/errmsg.h<gh_stars>0 void errmsg(const char *msg, int status);
<reponame>13dev/discord-lottery import Youtube from 'youtube.ts' import { Service } from 'typedi' import { Config } from '@src/config' import { videoFormat } from 'ytdl-core' type VideoFormat = videoFormat type VideoFormats = VideoFormat[] @Service() export default class YoutubeAdapter extends Youtube { construct...
<gh_stars>1-10 /** * OLAT - Online Learning and Training<br> * http://www.olat.org * <p> * Licensed under the Apache License, Version 2.0 (the "License"); <br> * you may not use this file except in compliance with the License.<br> * You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-...
Map of Celtic-influenced regions of Europe Celtic toponymy is the study of place names wholly or partially of Celtic origin. These names are found throughout continental Europe, Britain, Ireland, Anatolia and, latterly, through various other parts of the globe not originally occupied by Celts. Celtic languages [ edit...
<reponame>helmesjo/pipeable<gh_stars>1-10 #include <pipeable/data_generator.hpp> #include <catch2/catch.hpp> #include <variant> using namespace pipeable; namespace { struct int_to_int { int operator()(int val) { receivedValue = true; return val; } bool ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sqlite3 def connectToDb(): return sqlite3.connect('grades.db') def getCursor(con): return con.cursor() def createTables(cur): cur.execute('CREATE TABLE grades (' 'course VARCHAR(255) PRIMARY KEY,' 'grade VARCHAR(64)' ...
def fetch_contracts(self) -> dict: data = self.fetch(f'/contracts/v1/contracts/{self.puuid}') return data
/* Set the image and the text for all the components of the layout */ private void populateViews() { collapsingToolbarLayout.setTitle(movie.getOriginalTitle()); if (isInternetConnection) { String moviePosterPath = "https://image.tmdb.org/t/p/w500" + movie.getPosterPat...
/// Parses an `if` expression or statement. fn parse_if_expression(&mut self, token: Option<Token>) -> Result<NodeId, Error> { let mut branch_token = self.some_or_next(token)?; let mut branches = Vec::new(); let mut is_elif = true; loop { // If it's an else, the condition is always the ...
Two Berkeley alumni have won MacArthur fellowships — unsolicited, no-strings-attached awards of $625,000 given to exceptionally creative people. The two — Gene Luen Yang, a Bay Area graphic novelist, and Josh Kun, a cultural critic in Los Angeles — are among 23 fellows named by the MacArthur Foundation last night. Gen...
Reoperation in Treatment of Clubfoot We evaluated 118 operations (including 57 reoperations) on clubfeet. We concluded that relapse is most often the consequence of insufficient primary surgery, and the less sufficient the intervention, the more severe the relapse or residual deformity. The severity of deformity is de...
import { BaseEntity, CreateDateColumn, Entity, JoinColumn, OneToOne, PrimaryColumn, UpdateDateColumn, } from 'typeorm'; import { DocumentRO16 } from './document-ro16.entity'; import { DocumentRO26 } from './document-ro26.entity'; import { DocumentRO01 } from './document-ro01.entity'; import { TransactionD...
/** * Traspose map. * * @param nodesByEdgeMap the nodes by edge map * @return the map */ private Map<N, Set<E>> trasposeMap(Map<E, Set<N>> nodesByEdgeMap) { Map<N, Set<E>> edgeByNodeMap = new HashMap<>(); for(Entry<E, Set<N>> entry : nodesByEdgeMap.entrySet()){ E edge = entry.getKey(); for (N adjace...
<reponame>vonatzigenc/quarkus package io.quarkus.grpc.server.devmode; import static io.restassured.RestAssured.when; import static org.assertj.core.api.Assertions.assertThat; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage; import java.util.concurrent....
<filename>node_modules/bip174/src/lib/converter/index.d.ts /// <reference types="node" /> import * as globalXpub from './global/globalXpub'; import * as unsignedTx from './global/unsignedTx'; import * as finalScriptSig from './input/finalScriptSig'; import * as finalScriptWitness from './input/finalScriptWitness'; impo...
<reponame>justinkterry/MAgent /** * \file grid_def.h * \brief some global definition for gridworld */ #ifndef MAGNET_GRIDWORLD_GRIDDEF_H #define MAGNET_GRIDWORLD_GRIDDEF_H #include "../Environment.h" #include "../utility/utility.h" namespace magent { namespace gridworld { typedef enum {EAST, SOUTH, WEST, NORTH, ...
I have worked with Windows Phone 7 since it was in beta, so as you can imagine, I downloaded the Windows Phone 8 SDK as soon as it went live. For a bit of fun I decided to create a simple run-tracking application that showcases a number of these features ... and for an extra challenge do it all within 100 lines of code...
export const accountConfig = { twitterUrl: 'https://twitter.com/jeanrauwers', instagramUlr: 'https://instagram.com/dev.jeanrauwers', youtubeUrl: 'https://www.youtube.com/user/jeanrauwers' }; export const tableName: string = 'followersLikeApi'
mass_map = { "A": 71.03711, "C": 103.00919, "D": 115.02694, "E": 129.04259, "F": 147.06841, "G": 57.02146, "H": 137.05891, "I": 113.08406, "K": 128.09496, "L": 113.08406, "M": 131.04049, "N": 114.04293, "P": 97.05276, "Q": 128.05858, "R": 156.10111, "S": 8...
"""A Space representing an RGB Image.""" import numpy as np from akro.box import Box class Image(Box): """An Image, represented by a Box of at most three dimensions. This class allows us to type check the observation input and decide whether to normalize. Each dimension must have pixel values betwee...
Expansion and Intensification of the North American Monsoon During the Pliocene Southwestern North America (SWNA), like many subtropical regions, is predicted to become drier in response to anthropogenic warming. However, during the Pliocene, when carbon dioxide was above pre‐industrial levels, multiple lines of evide...
// NewHub creates a new Hub with a unique name. If the ID is already in use // NewHub returns the hub with that ID as well as ErrDuplicateHubID func NewHub(id string) (*Hub, error) { if _, ok := hubs[id]; ok { return hubs[id], ErrDuplicateHubID } h := &Hub{} h.ID = id h.subscriptions = make(map[string]Subscripti...
def code_object(fn): try: return fn.func_code except AttributeError: return fn.__code__
package auth import ( "fmt" "github.com/dgrijalva/jwt-go" "github.com/spf13/viper" "github.com/yasser-sobhy/sparrow/core" ) // TokenAuth allow users to login using JWT token type TokenAuth struct { APIEndpoint string Token string } func NewTokenAuth() TokenAuth { return TokenAuth{ ApiEndpoint: viper....
<reponame>mdhom/python-e3dc #!/usr/bin/env python # Python class to connect to an E3/DC system. # # Copyright 2017 <NAME> <<EMAIL>> # Licensed under a MIT license. See LICENSE for details import math import struct import time import zlib from . import _rscpTags as rscpTags packFmtDict_FixedSize = { "Bool": "?", ...
<reponame>bulletRush/QCloud_yunapi_wrapper #!/usr/bin/env python class BaseModule(object): def __init__(self, engine): self.engine = engine class BaseMonitorDimension(object): METRIC_NAME = None NAME_SPACE = None def __init__(self, kwargs): kwargs.pop("self", 0) self.kwargs ...
def custom_collate_fn(batches): def padding_tensor(sequences): num = len(sequences) max_len = max([s.size(1) for s in sequences]) + 1 out_dims = (num, max_len) out_tensor = sequences[0].data.new(*out_dims).fill_(0) mask = sequences[0].data.new(*out_dims).fill_(0) for ...