content
stringlengths
10
4.9M
/** * Contains the window-relative coordinates of the current fragment * * @author dennis.ippel * */ protected final class GLFragCoord extends RVec4 { public GLFragCoord() { super("gl_FragCoord"); mInitialized = true; } }
use core::fmt; use crate::{Distribution, Random, Rng}; use crate::distributions::{SampleUniform, UniformSampler}; #[inline] fn wmul32(a: u32, b: u32) -> (u32, u32) { let full = a as u64 * b as u64; let msw = (full >> 32) as u32; let lsw = (full & 0xffffffff) as u32; (msw, lsw) } #[inline] fn wmul64(a: u64, b: u64)...
This article is from the archive of our partner . Authorities have confirmed tor the first time ever, that hackers attempted and almost succeeded at rigging a Miami primary vote, uncovering underlying security issues with the online voting systems of the future. In the Miami-Dade primary election last August, requests...
def task_version(): versionfiles = json.load(open(VERSION_JSON)) for filename, contents in versionfiles.iteritems(): svw = SotaVersionWriter(filename, contents % globals()) yield { 'name': filename, 'actions': [svw.update], 'uptodate': [svw.uptodate], ...
Biologist in Puerto Rico report that at least 80 of the endangered Puerto Rican Parrots survived Hurricane Maria while exposed to the category 5 storm. The 175 parrots in captivity were unharmed. The Puerto Rican Parrot, also known as the Puerto Rican Amazon is the only remaining native parrot in Puerto Rico. The parr...
He's not Grizzly Adams, nor Bear Grylls, but he has climbed Mount Everest. At 59, Gary Johnson still projects the energetic aura of an athlete. But these days, the two-time Republican governor of New Mexico and imminent Libertarian Party Presidential candidate has the rumpled look of someone who spends too much time i...
<reponame>RSaab/rss-scraper<gh_stars>0 # Generated by Django 3.1 on 2020-08-13 16:23 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('rss_feeder_api', '0002_feed_subtitle'), ] operations = [ migrations.AlterM...
New Privacy Protocol Zether Can Conceal Ethereum Transactions - Blockonomi New Privacy Protocol Zether Can Conceal Ethereum Transactions BlockonomiAttention has been increasing around Zether, a privacy protocol that's been developed and proposed for smart contract cryptocurrencies. Cryptocurrency Miners are Making Mil...
/** * Created by hxlin on 9/20/15. */ public class LibraryTests { private List<Book> books; private Library library; @Before public void setUp() { books = new ArrayList<Book>(); library = new Library(books); } @Test public void getAllBooksFromLibrary() throws Exception{ ...
<filename>Pipeline.cpp #include "Pipeline.h" //If arguments are good returns a cleaned version of them //First one is input, second one is output std::array <std::wstring, 2> Pipeline::CheckArguments (const std::wstring Arg1, const std::wstring Arg2) { std::array<std::wstring, 2> Arguments; //Input if (!Arg1.rfind(...
<reponame>shawncarney/rock-paper-jesus /* * Power BI Visualizations * * Copyright (c) Microsoft Corporation * All rights reserved. * MIT License * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the ""Software""), to d...
//! `UsbBus` implementation use core::{ mem, ptr::{self, NonNull}, slice, sync::atomic::{self, Ordering}, }; use usb_device::{ bus::{PollResult, UsbBus}, endpoint::{EndpointAddress, EndpointType}, UsbDirection, UsbError, }; use super::{ dqh::dQH, token::{Status, Token}, util::...
<reponame>bordoley/java-restlib /* * Copyright (C) 2012 <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 a...
Multiplex digital PCR with digital melting curve analysis on a self-partitioning SlipChip. Digital polymerase chain reaction (digital PCR) can provide absolute quantification of target nucleic acids with high sensitivity, excellent precision, and superior resolution. Digital PCR has broad applications in both life sci...
<reponame>vlehtola/questmud<filename>lib/wizards/bulut/forl/road30.c #include "room.h" #undef EXTRA_RESET #define EXTRA_RESET extra_reset(); object hobbit; extra_reset() { if (!hobbit || !living(hobbit)) { hobbit = clone_object("/wizards/bulut/forl/monsters/hcitizen.c"); move_object(hobbit, this_objec...
def separa_e_une(texto: str): # separa o texto usando espaço como # limitador para cada elemento texto_separado = texto.split(' ') # o novo texto será a união das palavras # encontradas, agora separadas por um traço texto_corrigido = '-'.join(texto_separado) # retorna cada um dos element...
/** * Load up word table. Note that there may be superfluous spaces throughout for formatting * reasons, and these are excised before being added to the table. * * @throws IOException if unable to find file */ public static void loadWordTable() throws IOException { table = new Hashtable<String,Bool...
Nations for Mental Health : An Action Programme on Mental Health for Underserved Populations • To enhance the attention of people and governments of the world to the effects of mental health problems and substance abuse on the social well-being and physical health of the world's underserved populations. A first step i...
def create_and_add_acl(self, specification): self.specifications.append(specification) for aclid in specification: _tree = tree.Tree() for acl in specification[aclid]: network = acl['src'] mask = self.de_ciscoise(acl['netm']) action = acl['action'] fullnet = network ...
/* * Copyright (c) "Neo4j" * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your...
(CBS News) CHICAGO - A fast food chain known for putting Christian principles ahead of profits is facing a culture war over same-sex marriage. The controversy is prompting politicians and activist groups on both sides of the issue to organize events where like-minded people can demonstrate their discontent. The Chick...
// Custom Kinesisanalytics listing functions using similar formatting as other service generated code. func ListApplicationsPages(conn *kinesisanalytics.KinesisAnalytics, input *kinesisanalytics.ListApplicationsInput, fn func(*kinesisanalytics.ListApplicationsOutput, bool) bool) error { for { output, err := conn.Lis...
Slewing maneuver and vibration control of tethered space solar power satellite Control approach is presented for vibration suppression of tethered space solar power satellite (SSPS) during slewing maneuver by combining attitude control and active vibration control based on tether tension. The mathematical description ...
/** * This method is ask for player's input and use it as switch case to support another method of selling animal. * It checks whether if player has animals to start with if not player will not be able to sell animal * * @param player who chooses to sell animal. */ public void saleStart(Player ...
<reponame>MerhuBerahu/Python-RPG<filename>Snippets.py #! /usr/bin/env python # -*- coding: utf-8 -*- """ PASTEBIN FRO COMMON SNIPPETS OF CODE """ '''OLD ENEMEY INITILIZATION''' #Enemy - race, name, level, mainjob, support job, gold, inventory battle(Enemy(elf,"Goblin", 25,white_mage, "Warrior",52,inventory = [('Matted...
/* IMPRIMIR ARTICULO * E: No tiene * S: No tiene * D: Solo imprimer los datos del articulo */ void Article::imprimir(){ qDebug() << "ID Article: " << this->id; qDebug() << "Category: " << this->category; qDebug() << "In Stock: " << this->stock; qDebug() << "Location: " << this->position; qDebug(...
module Command.CreateNewProject ( createNewProject ) where import Control.Monad.Except (throwError) import Control.Monad.IO.Class (liftIO) import qualified Path as P import System.Directory (createDirectory, getCurrentDirectory) import qualified System.Di...
async def _get_num_open_trades(self) -> int: num = 0 for pair in self.trades: num += len(self.trades[pair]['open']) return num
def send_cmd(self, name, iterations=5): packet = cmd(name) for i in range(iterations): for device in self.devices: device.send_data(packet)
// EncodeBoolean append given bool as true or false string func (e *Encoder) EncodeBoolean(b bool) { if b { e.Buf = append(e.Buf, "true"...) } else { e.Buf = append(e.Buf, "false"...) } }
a = input().split() ost = int(a[0]) gost = int(a[1]) komplekt = gost pribs = list(map(int, input().split())) pribs.sort() bilo = [] alpha = set() while pribs: hah = pribs[0] heh = pribs.count(hah) bilo.append(heh) while hah in pribs: pribs.remove(hah) a = max(bilo) if a > gost: ...
//! Simple USB Audio example for PIC32MX270 (28 pins) //! //! Simulates a microphone that emits a 1 kHz tone and a dummy audio output and //! prints the payload length of each thousand received audio frame an reports //! changes of the alternate settings. //! #![no_std] #![no_main] #![feature(alloc_error_handler)] use...
/*************************************************************************** * Copyright (c) 2016, Johan Mabille, Sylvain Corlay, Martin Renou * * Copyright (c) 2016, QuantStack * * * * Distribute...
// GetMeteredState freshly checks the state, contacting the licensing server. func GetMeteredState() { state, err := unilicense.GetMeteredState() if err != nil { fmt.Printf("ERROR getting metered state: %+v\n", err) return } fmt.Printf("State: %+v\n", state) if state.OK { fmt.Printf("State is OK\n") } else ...
/* * Query all variations. This method stores all config and build names. */ private void internalQueryAllVariations(String configPattern) { if (this.fSQL == null) return; if (BUILDS != null) return; long start = System.currentTimeMillis(); if (DEBUG) { DEBUG_WRITER.print(" - DB query all variations for configu...
/** * Initialize our internal MessageResources bundle. * * @exception ServletException if we cannot initialize these resources */ protected void initResources() throws ServletException { try { resources = MessageResources.getMessageResources(resourceName); } catch (Mi...
// transactionsLink returns the horizon endpoint to get transaction information. func (a *Account) transactionsLink() (string, error) { if a.internal == nil { if err := a.load(); err != nil { return "", err } } return a.linkHref(a.internal.Links.Transactions), nil }
// validateWrite determines if a particular chunk can be written. // If the size of the on disk chunk is smaller than the request // chunk then that chunk is incomplete and we allow a write to it. func (r *fileRequestWriter) validateWrite(dir, path string, req *flow.Request) error { if err := os.MkdirAll(dir, 0777); e...
import boto3 import requests from requests_aws4auth import AWS4Auth region = 'us-east-1' # e.g. us-east-1 service = 'es' credentials = boto3.Session().get_credentials() awsauth = AWS4Auth(credentials.access_key, credentials.secret_key, region, service, session_token=credentials.token) host = 'vpc-healthevents-12cd1...
// // NSDictionary+KLNetworkModule.h // HttpManager // // Created by kalan on 2018/1/4. // Copyright © 2018年 kalan. All rights reserved. // #import <Foundation/Foundation.h> @interface NSDictionary (KLNetworkModule) - (NSString *)toJsonString; @end
/** * A {@link uk.org.webcompere.systemstubs.resource.TestResource} which provides the exit code called when it was active. * Gives access to the {@link NoExitSecurityManager} object inside via {@link SecurityManagerStub#getSecurityManager()}. * When the {@link NoExitSecurityManager} is in use, any calls to {@link S...
<reponame>tradle/typeforce export type Raw = (value: any, strict?: boolean) => any export type RawMatcher <T> = (value: any, strict?: boolean) => value is T export interface Match <T> extends RawMatcher<T> { error: Error | null | undefined } export type Assert <T> = (value: any, strict?: boolean) => asserts value i...
/** * Plays a sound with various effects applied to it. */ private static void playbackTest() throws Exception { setupEfx(); final int source = AL10.alGenSources(); final int buffer = AL10.alGenBuffers(); WaveData waveFile = WaveData.create("Footsteps.wav"); if (waveF...
/** * Gestisce il salvataggio delle condizioni di rank * * @param sem gui */ public static void saveRank(SemGui sem) { FileOutputStream fout; try { String path = sem.getPercorsoIndice().getText() + "/evaluations.rank"; fout = new FileOutputStream(new File(path...
The brickbats were flying even before President Obama convened his first official Cabinet meeting yesterday. At the session, Obama ordered his agency heads to identify and shave a collective $100 million in administrative costs from federal programs in a budget of well over $3 trillion. "At the same time they're looki...
import { Component, OnInit } from '@angular/core'; import {ToastComponent} from '../../../shared/toast/toast.component'; import {Playlist} from '../../../shared/models/playlist.model'; import {PlaylistService} from '../../../services/playlist.service'; import {ActivatedRoute} from '@angular/router'; import {YoutubeServ...
/** * The OperationExecution class is a wrapper for the results recorded from the execution of an operation. This wrapper * can be passed off to an IScoreboard to be recorded and presented at a later time. */ public class OperationExecution { final public String operationName; final public String operationRequest...
Speakers during the opening panel of Consensus 2017 agreed that blockchain is set to go global – but differed on how, exactly, the technology will get to that point. Vincent Wang, chief innovation officer for China Wanxiang Group, argued that the path to success means reaching out to the businesses and industries that...
<reponame>hdb3/kakapo #include "bytestring.h" #include <stdint.h> #include <stdio.h> struct bytestring pas2bytestring(char *pa, ...); struct bytestring pa2bytestring(char *pa); extern char paOrigin[]; char *paNextHop(uint32_t nexthop); char *paMED(uint32_t med); char *paLocalPref(uint32_t localpref); char *paASPATH(ui...
def create_account(self, name): params = { 'name': name, } response = self.json_api_call('POST', '/accounts/v1/account/create', params) return response
<gh_stars>1-10 import { Configuration } from 'webpack'; import { SpawnSyncOptions, } from 'child_process'; import spawn from 'cross-spawn'; export type Config = { port?: number, npmClient?: NpmClient, framework?: Framework, rootPath?: string, buildDirectory?: string, entrypointDirectory...
<reponame>DonaldMcC/py4web<gh_stars>1-10 """ This file defines cache, session, and translator T object for the app These are fixtures that every app needs so probably you will not be editing this file """ import os import sys import logging from py4web import Session, Cache, Translator, Flash, DAL, Field, action from p...
// DeleteRuleCtx will delete the given rule func (c *Client) DeleteRuleCtx(ctx context.Context, ruleID string) (Rule, error) { req := graphql.NewRequest(`mutation($ruleID: ID!) { deleteRule(ruleID: $ruleID) {` + allRuleFields + ` } }`) req.Var("ruleID", ruleID) var res struct { DeleteRule Rule `json:"deleteRu...
/** * Returns a global reference to the class matching the name */ jclass bindJavaClass(JNIEnv * env, const char * name) { jclass tempClass; tempClass = env->FindClass(name); if (tempClass == NULL) { return NULL; } else { jclass classRef = (jclass) env->NewGlobalRef(tempClass); if (classRef == NUL...
/** * Copyright 2021-2022 Huawei Technologies Co., Ltd * * 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 applicabl...
<filename>app.ts //Import required namespaces import express, { Request, Response, NextFunction } from "express"; import { UserDto } from "./DTOs/UserDto"; //Add required controller import UsersController from "./Controllers/UsersController"; //Construct our single express instance and define the port we want to use...
// get ip string from ipv4 addr inline fastring ip_str(struct sockaddr_in* addr) { char s[INET_ADDRSTRLEN] = { 0 }; inet_ntop(AF_INET, &addr->sin_addr, s, sizeof(s)); return fastring(s); }
// ipNetToLabel turns a CIDR into a Label object which can be used to create // EndpointSelector objects. func ipNetToLabel(cidr *net.IPNet) labels.Label { ones, _ := cidr.Mask.Size() lblStr := maskedIPToLabelString(&cidr.IP, ones) return labels.ParseLabel(lblStr) }
Novel mutations in SLC6A5 with benign course in hyperekplexia Infants suffering from life-threatening apnea, stridor, cyanosis, and increased muscle tone may often be misdiagnosed with infantile seizures and inappropriately treated because of lack and delay in genetic diagnosis. Here, we report a patient with increase...
#<NAME> import openpyxl def census_data(): cen_data = openpyxl.load_workbook("massachusetts_population_1980-2010.xlsx") cen_sheet = cen_data.get_active_sheet() mass_data = openpyxl.load_workbook("MAEmplyomentData.xlsx") mass_sheet = mass_data.get_active_sheet() for marow in mass_sheet.ite...
<filename>library/src/main/java/com/deltadna/android/sdk/triggers/ExecutionCountBasedTriggerCondition.java package com.deltadna.android.sdk.triggers; import com.deltadna.android.sdk.EventTriggeredCampaignMetricStore; abstract class ExecutionCountBasedTriggerCondition implements TriggerCondition { private long va...
def clean(self): for chart in self.charts.values(): chart.clear() self.update()
// Finds identifier-string at RIGHT side of string. Stops at whitespace. // "1234()=<whatever> IDENTIFIER": "1234()=<whatever>", "IDENTIFIER" std::size_t split_at_tail_identifier(const std::string& s){ auto i = s.size(); while(i > 0 && whitespace_chars.find(s[i - 1]) != std::string::npos){ i--; } while(i > 0 && i...
<reponame>Higmin/practise package com.practice.algorithm.other; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; /** * 无序数组中找到左侧比他小右侧比他大的数 * <p> * 要求: 复杂度 小于O(n^2) * * @author Jimmy * @version 1.0, 2021/04/07 * @since practice 1.0.0 */ public class Greate...
<filename>packages/react-components/src/components/SendBox.test.tsx // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. import React from 'react'; import { SendBox } from './SendBox'; import Enzyme from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; import { mountWithLocalizatio...
CLEVELAND, Ohio -- The Cleveland Browns are looking at taking their starting quarterback of the future in the upcoming 2014 NFL draft. While names like Texas A&M's Johnny Manziel, Louisville's Teddy Bridgewater and Central Florida's Blake Bortles have been thrown out as possible picks, it is still unknown which way th...
<reponame>hdmifish/petal """Commands module for MINECRAFT-RELATED UTILITIES. Access: Server Operators""" import importlib import sys from petal.commands import core from petal.util.minecraft import Minecraft LoadModules = [ "mc_admin", "mc_mod", "mc_public", ] for module in LoadModules: # Import ev...
/** * Create login response with filled token and authorities. * * @param loginDto login request * @param token cidmst token * @return login response */ private LoginDto login(LoginDto loginDto, IdmTokenDto token) { IdmJwtAuthentication authentication = jwtTokenMapper.fromDto(token); oauthAuthenticati...
def _read(self, addr, size, onDone=None): bus = self._bus._ag burstsize = 1 bus.req.append((READ, addr, burstsize, None, None)) if onDone: raise NotImplementedError() if self._read_listener is None: self._read_listener = HandshakedReadListener(self...
The Jerusalem police arrested six men on Monday on suspicion on involvement in the brutal attack on 21-year-old Druze student Tommy Hassoun last week. The suspects were brought Jerusalem Magistrate's Court for a hearing on the extension of their remand. Follow Ynetnews on Facebook and Twitter Tommy Hassoun was brutal...
<reponame>huanghong1125/vue-element-plus-admin import { useAxios } from '@/hooks/web/useAxios' import type { TableData } from './types' const { request } = useAxios() export const getTableListApi = ({ params }: AxiosConfig) => { return request<{ total: number list: TableData[] }>({ url: '/example/list', m...
Stability of lipid vesicles in tissues of the mouse: a gamma-ray perturbed angular correlation study. The rate of phospholipid vesicle disruption in specific tissues of the mouse was followed by gamma-ray perturbed angular correlation (PAC) spectroscopy. In these studies, high levels of 111In-nitrilotriacetic acid com...
Flow at the Tip of a Forward Curved Centrifugal Fan The velocity profiles, radial and circumferential components, were measured at the tip of a forward curved centrifugal fan. Three sets of measurements are presented. Two at peak efficiency for different rotational speeds and a third at the lower rotational speed and ...
def bin_avg(t, s, nbins=None, norm=True, normy=False): if norm: t = normalize_t(t) if isinstance(t, list): f_t = np.hstack(t).flatten() else: f_t = t.flatten() if isinstance(s, list): f_s = np.hstack(s).flatten() else: f_s = s.flatten() if nbins is None: ...
package main import ( "bufio" "chittyChatpb/chittyChatpb" "context" "flag" "fmt" "io" "log" "os" "strconv" "sync" "github.com/thecodeteam/goodbye" "google.golang.org/grpc" ) var channelName = flag.String("channel", "default", "Channel name") var senderName = flag.String("sender", "default", "Sender name"...
<reponame>diegoaltx/drone-ecs-deploy import boto3 import botocore import os import sys def get_client(access_key_id=None, secret_access_key=None, region=None): session = boto3.session.Session( aws_access_key_id=access_key_id, aws_secret_access_key=secret_access_key, region_name=region ) return sessi...
package speedtest import ( "crypto/rand" "fmt" "github.com/dustin/go-humanize" "log" "math" "net" "time" ) type BytesPerTime struct { Bytes uint64 Duration time.Duration } func SpeedMeter(input chan BytesPerTime, bytesPerSec chan BytesPerTime) { go func() { bpt := BytesPerTime{} for { select { ...
<reponame>feng3d-labs/feng3d<filename>packages/polyfill/src/Types.ts /** * 构造函数 */ export type Constructor<T> = (new (...args: any[]) => T); /** * 让T中以及所有键值中的所有键都是可选的 */ export type gPartial<T> = { [P in keyof T]?: gPartial<T[P]>; }; /** * 获取T类型中除值为KT类型以外的所有键 * * ``` * class A * { * a = 1; * ...
/** * Returns the smallest integer box that can contain the given box. * * @param b The box to contain. * @return A new box. */ public static final Box3i contain(Box3 b) { Box3i result = new Box3i(); contain(b, result); return result; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long long int lli; typedef long double ld; typedef unsigned long long int ull; typedef vector<int> vi; typedef vector<pair<int, int>> vii; typedef vector<ll> vll; typedef pair<int, int> pii; #define fast \ ...
Early Temporal Variation of Cerebral Metabolites After Human Stroke: A Proton Magnetic Resonance Spectroscopy Study Background and Purpose Proton magnetic resonance spectroscopy has documented declines in normal metabolites and long-term elevation of lactate signal after stroke in humans. Within days of stroke, leukoc...
import { ModifierArg, ModifierState } from '../base'; import { RestrictOptions } from './pointer'; export interface RestrictEdgesOptions { inner: RestrictOptions['restriction']; outer: RestrictOptions['restriction']; offset?: RestrictOptions['offset']; endOnly: boolean; enabled?: boolean; } export d...
WASHINGTON — FBI Director James Comey wrote in a memo that President Donald Trump had asked him to shut down an FBI investigation into ousted national security adviser Michael Flynn, a person familiar with the situation told The Associated Press Tuesday. The person had seen the memo but was not authorized to discuss i...
// Parses the command line arguments and reads the config file if specified func ProcessConfig() (params Params, err error) { var iniConf IniConfig params = parseCommandLine() iniConf, err = parseConfigFile(&params) if err != nil { return } if params.ApiKey == "" { params.ApiKey = iniConf.Get("Auth", "key") ...
import formatterService from './formatter.service'; describe('formatterService', () => { describe('formatExpirationDate', () => { it('should return an empty string when value is empty', () => { const actual = formatterService.formatExpirationDate(''); expect(actual).toBe(''); }); it('should format the ex...
<reponame>bmellstrom/zephyr-on-adafruit-clue /* * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr.h> #include <device.h> #include <devicetree.h> #include <drivers/display.h> #include <drivers/gpio.h> #include <sys/printk.h> #include <usb/usb_device.h> #if DT_NODE_HAS_STATUS(DT_ALIAS(led0), okay) #define LED...
Study on the Output Low-Level Property of the SN74LS00N Chip Generally, the load capacity of the integrated gate circuit depends on its output low-level property. This paper gives a theoretical and experimental study on the output low-level volt-ampere property of the current popular TTL NAND-gate SN74LS00N, and the t...
<gh_stars>1-10 import type { ComponentStory, ComponentMeta } from "@storybook/react"; import { EmptyStateNoTopicSelected } from "./EmptyStateNoTopicSelected"; export default { component: EmptyStateNoTopicSelected, } as ComponentMeta<typeof EmptyStateNoTopicSelected>; const Template: ComponentStory<typeof EmptyState...
// Processes the returned Bool value from checkHashAndPassword // and formats it for use in hashLines func matchPasswordAndHash(hashLine string) (result string, err error) { items := strings.Split(hashLine, " ") hash, password := items[1], items[0] err = checkHashAndPassword(hashLine) if err != nil { result = fm...
import discord from discord.ext import commands from discord.ext.commands.cooldowns import BucketType from .utils.message import get_nearest, get_avatar from PIL import Image, ImageDraw, ImageFont, ImageChops import io import random import math def save_image(img, *args, **kwargs) -> io.BytesIO: tmp = io.BytesIO(...
Investigators say former PM would have been interviewed about claims he sexually abused children if he were still alive A police report has said there was reason to suspect that Sir Edward Heath, Britain’s seventh postwar prime minister, carried out a string of sex attacks over a span of decades. The report concludes...
from dataclasses import dataclass from typing import List from diamond_miner.defaults import UNIVERSE_SUBSET from diamond_miner.queries import GetInvalidPrefixes from diamond_miner.queries.query import LinksQuery, links_table from diamond_miner.typing import IPNetwork from diamond_miner.utilities import common_paramet...
<filename>demo/typescript/utils/enums.ts<gh_stars>10-100 //expects a regular enum, not one that overrides the assignment //e.g. enum Foo { bar = "bar" } is NOT okay here, but enum Foo {bar} is // //takes an enum and gives back an array of Name,Index pairs //get_enum_pairs :: Enum -> Array (Number, String) export const ...
/** * For now we need to manually construct our Configuration, because we need to * override the default one and it is currently not possible to use * dynamically set values. * * @return */ public static Configuration createConfiguration() { Configuration conf = new Configuration(); conf.addR...
<filename>IF/philip_pal/tests/test_philip_base_if.py<gh_stars>10-100 """ Tests for the basic PHiLIP interface """ import pytest from conftest import _regtest def test_send_and_parse_cmd(phil_base, regtest): """Tests basic send and parse command""" _regtest(regtest, phil_base.send_and_parse_cmd("rr 0 10")) ...
from django.contrib import admin from .models import Food # Register your models here. class FoodAdmin(admin.ModelAdmin): #식품이름, 총내용량, 열량, 탄수화물, 단백질, 지방 list_display = ('DESC_KOR', 'SERVING_SIZE', 'NUTR_CONT1', 'NUTR_CONT2', 'NUTR_CONT3', 'NUTR_CONT4') admin.site.register(Food, FoodAdmi...
package trivia import ( "fmt" "io/ioutil" jsoniter "github.com/json-iterator/go" ) // SlideList represents a list of Slides type SlideList struct { Slides []Slide `json:"slides"` } // Slide represents one image which may have a trivia question and answers type Slide struct { Image string `json:"image...
/** * Retests a step request with a specific exclusion filter */ public void testJDIClassExclusionFilter2() { StepRequest request = getRequest(); request.addClassExclusionFilter("org.eclipse.*"); request.addClassExclusionFilter("java.lang.*"); request.enable(); StepEvent even...
// AssignPropertiesFromPoliciesStatus populates our Policies_Status from the provided source Policies_Status func (policies *Policies_Status) AssignPropertiesFromPoliciesStatus(source *v20210901s.Policies_Status) error { propertyBag := genruntime.NewPropertyBag(source.PropertyBag) if source.ExportPolicy != nil { va...
async def _process_put(self, data: bytes): ttl, replication, _ = struct.unpack(">HBB", data[:4]) key = data[4:36].hex() value = data[36:].hex() logger.info( f"Handling put message: Hex Key {key} [TTL {ttl}, replication {replication}] => Hex Value [{value}]" ) ...