content stringlengths 10 4.9M |
|---|
/**
* Builds implementation-specific cache.
* @return a Cache object
*/
private Cache<String, Object> buildCache() {
return Caffeine.newBuilder()
.expireAfterWrite(expiresAfter, timeUnit)
.maximumSize(maxSize)
.build();
} |
/**
* [Hard] 1349. Maximum Students Taking Exam
* https://leetcode.com/problems/maximum-students-taking-exam/
*
* Given a m * n matrix seats that represent seats distributions in a classroom. If a seat is broken, it is denoted by
* '#' character otherwise it is denoted by a '.' character.
*
* Students can see t... |
def rename_item(self, item):
renamed = {}
objects = ["A", "B", "C", "D", "E"]
cnt = 0
for each in item.task:
each[0] = "lefts"
if each[1] in renamed:
each[1] = renamed[each[1]]
else:
renamed[each[1]] ... |
One expert says Israel's involvement in world affairs is limited by its focus on survival, but the precedent of saving Jews comes first.
Should Israel expand its power? It is not an easy question to ask or an easy expectation to bear. Israel is a small country that has seen it as an imperative to punch above its weigh... |
/// Switch to the next directory in the dirs list and apply a new wallpaper from it
fn toggle(config_str: &String, rng: &mut ThreadRng) -> Result<()> {
let mut config = parse_config(&config_str)?;
let active_dir = config.active_dir.unwrap_or(0);
// Switch active dir to next in dirs list, wrapping around
... |
#include<stdio.h>
int main(){
//444, 447, 474, 477, 744, 747, 774, 777, 47, 74, 44, 77, 4, 7
int lucky[] = {4, 7, 44, 47, 74, 77, 444, 447, 474, 477, 744, 747, 774, 777};
int input;
scanf("%d", &input);
int i, isAlmostLucky = 0;
for(i = 0; i < 14; i++){
if(input % lucky[i] == 0){
printf("YES\n");... |
Unfortunately, the voice actors are the very last to know anything about new projects.
There have been many rumors surrounding Grand Theft Auto 6, and fans have been hanging onto any information they can possibly find about the game. Now, the latest person to offer up some sort of insight for fans is none other than t... |
#ifndef _CONVOLVER_NODE_HPP_
#define _CONVOLVER_NODE_HPP_
#include "common.hpp"
#include "audio-node.hpp"
class ConvolverNode : public CommonNode {
DECLARE_ES5_CLASS(ConvolverNode, ConvolverNode);
public:
static void init(Napi::Env env, Napi::Object exports);
explicit ConvolverNode(const Napi::CallbackInfo ... |
/**
* Method, which should process the given statement of type
* {@link BreakpointStmt}, but is not implemented in the current version of
* this method. If method will be called an exception is thrown.
*
* @param stmt
* Statement that should be processed to check for security
... |
/*
* Copyright (C) 2007 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... |
/**
* Get the list of emails to send and tries to send them.
*/
@TransactionTimeout(35000)
@Schedules({ @Schedule(second = "0", minute = "*/10", hour = "*", persistent = false) })
public void sendEmail() {
try {
if (!running) {
running = true;
appLogger.info("START Execute Elections Mails Sending");
... |
/**
* A specialised version of {@link ScrollPanel} that is intended for use with a
* {@link TextArea} to provide a scroll-able entry area. This particular class
* has special requirements for configuring the layout. If you add a
* {@link TextArea} to an ordinary {@link ScrollPanel} the entire component
* itself wi... |
Dynamin and Activity Regulate Synaptic Vesicle Recycling in Sympathetic Neurons*
Neurotransmission in central neuronal synapses is supported by the recycling of synaptic vesicles via endocytosis at different time scales during and after transmitter release. Here, we examine the kinetics and molecular determinants of d... |
// BadRequest returns an client error that has a status of 400 (bad request).
//
// The returned error has a PublicStatusCode() method, which indicates that the
// status code is public and can be returned to a client.
func BadRequest(msg ...string) errors.Error {
return statusError{
message: makeMessage("bad reques... |
// ensureColumns applies a projection as necessary to make the output match the
// given list of columns; colNames is optional.
func (b *Builder) ensureColumns(
input execPlan, colList opt.ColList, provided opt.Ordering,
) (execPlan, error) {
cols, needProj := b.needProjection(input, colList)
if !needProj {
return... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
package com.azure.search.documents.implementation.models;
import com.azure... |
#include<bits/stdc++.h>
#define endl "\n"
#define pb push_back
#define ll long long
#define d1(x) cerr << #x << "--> " << x << endl
#define d2(x,y) cerr << #x << "--> " << x << " | " << #y << "--> " << y <<endl
#define d3(x,y,z) cerr << #x << "--> " << x << " | " << #y << "--> " << y <<" | " << #z << "--> "<< z<< en... |
<gh_stars>0
import {
AnimationStyle,
convertToPixels,
findVisualStyleBySize,
getComponentSize,
hasChildContent,
ItemValue,
StyleButtonReset,
StyleMargin,
} from "@apptane/react-ui-core";
import { MediaObject } from "@apptane/react-ui-layout";
import { RadioButtonVisualAppearance, useVisualAppearance } f... |
//loading files into array based on theme
public String[] LoadBG(){
strLine = "";
try{
BufferedReader themefile = new BufferedReader(new FileReader("themes.txt"));
while(strLine != null){
strLine = themefile.readLine();
if(strLine != null){
strThemeElements = strLine.split(",");
if(strThemeE... |
// newRole returns a new Role object.
// The Role controls access to the tenant and its related clusters.
func newRole(scheme *runtime.Scheme, tenant *synv1alpha1.Tenant) (*rbacv1.Role, error) {
role := &rbacv1.Role{
ObjectMeta: metav1.ObjectMeta{
Name: tenant.Name,
Namespace: tenant.Namespace,
},
}
s... |
n=int(input())
temp=(n*(n+1))//2
ex=0
if n>2:
for i in range(1,n-1):
ex+=i*(n-(i+1))
print(temp+ex)
|
MOD = 10**9+7
facts = [1]
for i in range(1, 10**5+2):
facts.append((i*facts[i-1])%MOD)
def nCk(n, k):
if n < k: return 0
return (facts[n]*pow(facts[k], MOD-2, MOD)%MOD * pow(facts[n-k], MOD-2, MOD))%MOD
n = int(input())
a = list(map(int, input().split()))
# Search doubling number and its indexes
indexes =... |
OZONE MONITORING BY GOME-2 ON THE METOP SATELLITES
The first Global Ozone Monitoring Experiment (GOME) has been successfully operated on board of ERS–2 since its launch in April 1995. The objective to measure the global distribution of ozone and several other trace gases has been achieved. Based on this heritage the a... |
/**
* Convert the {@link RetryPolicy} into a gRPC service config for the {@code serviceName}. The
* resulting map can be passed to {@link ManagedChannelBuilder#defaultServiceConfig(Map)}.
*/
public static Map<String, ?> toServiceConfig(String serviceName, RetryPolicy retryPolicy) {
List<Double> retryableSt... |
<reponame>hozuki/kk-save-edit<filename>src/io/WriteOnlyByteArrayStream.ts<gh_stars>1-10
import PrototypeMixins from "../common/decorators/PrototypeMixins";
import ByteArrayStream from "./ByteArrayStream";
import IWriteableByteArrayStream from "./IWriteableByteArrayStream";
import {IWriteableByteArrayStreamEx, Writeable... |
The Australian government has authorized dingo “baiting programs” which allow farmers, not just wildlife officials, to lay poisoned bait to kill them.
Why? Because they could not think of anything else, and they just cannot think of any other way to placate the angry ranchers who complain of their sheep which are gett... |
article
Before Twitter announced plans to kill off Vine, the app's biggest stars reportedly banded together and pitched a plan they thought could save it.
Continue Reading Below
Mic reports that 18 of the app's top creators had a meeting with Vine's Creative Development Lead Karyn Spencer last fall, during which the... |
/**
* Recover a file from a remote location and copy it into localDir
* @param pRemoteFile file to recover (from a webdav repository)
* @param pLocalDir directory to copy file to
* @return File for the newly copied file, null if not copied
*/
public static File recoverFile(String pRemoteFile, String pLocalDir... |
Giving birth to live young is one of the traits we use to distinguish mammals from other animals. But certain kinds of lizards, snakes and amphibians, both living and extinct, also reproduce without laying eggs. In fact, live birth (or viviparity) has evolved more than 100 separate times in non-mammal species throughou... |
Mission accomplished: a triumphant Ukip has achieved its goals and may as well pack up shop. The hard-right populist party is – in the words of its former leadership frontrunner Steven Woolfe – “in a death spiral”. Fresh from being literally hospitalised by the party’s internal divisions, Woolfe has marched out of this... |
use std::io::BufRead;
const DEBUG: bool = false;
fn main() {
let mut f = read_field();
let mut col = 0;
while col < f.w as usize {
while col < f.w as usize && f.is_column_empty(col) {
f.remove_column(col);
}
col += 1;
}
let mut row = 0;
while row < f.h as usiz... |
/**
* Creates elemental and semantic vectors for each concept, and elemental vectors for predicates.
*
* @throws IOException
*/
private void initialize() throws IOException {
if (this.luceneUtils == null) {
this.luceneUtils = new LuceneUtils(flagConfig);
}
elementalItemVectors = new Elemen... |
// 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, Version 2.0 (the
// "License"); you may... |
def DSP_info():
sr = ctypes.c_int()
fmt = ctypes.c_int()
out_ch = ctypes.c_int()
in_ch = ctypes.c_int()
resampler = ctypes.c_int()
bits = ctypes.c_int()
call_fmod("FMOD_System_GetSoftwareFormat", ctypes.byref(sr), ctypes.byref(fmt), ctypes.byref(out_ch), ctypes.byref(in_ch), ctyp... |
import { doShowAlert, doHideAlert } from 'app/ui/actions';
import { UIActionTypes } from 'app/ui/types';
import reducer from '.';
describe('alert reducer', () => {
it('should return the initial state', () => {
const expectedState = {
message: '',
isVisible: false,
};
expect(reducer(undefined,... |
Effects of Diet and Exercise on Peripheral Vascular Disease.
In brief A 46-year-old man presented with symptoms of peripheral vascular disease in 1966. In 1976 arteriography revealed 100% occlusion of both femoral arteries at midthigh and some reconstitution of flow via collaterals into the popliteal region. His chole... |
/**
* Created by root on 5/3/17.
*/
public class MyVariant implements Serializable {
private String bases;
//private String genotype;
private String alleles;
private String reference;
public String getBases() {
return bases;
}
public void setBases(String bases) {
this.b... |
use std::io::{self, Read, Write};
use termion::{clear, cursor};
use termion::color as termcol;
use termion::event::Key;
use termion::input::TermRead;
use board::{self, Board, Coord, Move, Tile};
use error;
const BOARD_WIDTH: u16 = 32;
const BOARD_HEIGHT: u16 = 12;
const SLEEP_DURATION: u64 = 500;
enum GameResult {
... |
<filename>scripts/examples/Arduino/Portenta-H7/38-Ethernet/eth_cable_test.py
# Ethernet Cable Status Example.
#
# This example prints the cable connection status.
import network, time
lan = network.LAN()
# Make sure Eth is not in low-power mode.
lan.config(low_power=False)
# Delay for auto negotiation
time.sleep(3.... |
/* ------------------------------------------------------------
HEXNIBBLEOUT
gibt die unteren 4 Bits eines chars als Hexaziffer aus.
Eine Pruefung ob die oberen vier Bits geloescht sind
erfolgt NICHT !
------------------------------------------------------------- */
void hexnibb... |
<reponame>healthpackdev/website<gh_stars>10-100
import type { MDXRemoteSerializeResult } from 'next-mdx-remote';
import { serialize } from 'next-mdx-remote/serialize';
import fs from 'fs';
import path from 'path';
import matter from 'gray-matter';
import readingTime from 'reading-time';
import fg from 'fast-glob';
impo... |
/**
* Rellena la matriz con valores ingresados por teclado
* @param int[][] Matriz a rellenar
*/
void rellenar_matriz(int matriz[FIL][COL]) {
for(int i = 0; i < FIL; i++) {
for(int j = 0; j < COL; j++) {
cout << "matriz[" << i << "][" << j << "] = ";
cin >> matriz[i][j];
}
cout << endl;
}... |
def addPasswords(self):
get = Addpassdialog()
get.setWindowTitle('Add Account')
get.setStyleSheet("background-color: rgba(84, 84, 84, 0.5);")
state = get.exec_()
login = get.linelogin.text()
password = get.linepassword.text()
description = get.linedescr... |
Declining prices of vegetable and other food articles pulled down wholesale inflation sharply to 3.74% in August to a nearly five-year low. The inflation measured on Wholesale Price Index (WPI) was at 5.19% in July and 6.99% in August 2013.
Inflation in the food segment witnessed a significant decline to 5.15% in Augu... |
<gh_stars>0
import {isEmpty} from 'lodash';
import {AppState} from '../AppState';
import {adjustAvailables} from './helpers/adjustAvailables';
import {adjustOptionalDistanceAndHook} from './helpers/adjustOptionalDistanceAndHook';
import {assignTipToCorrectArray} from './helpers/assignTipToCorrectArray';
import {hasComp... |
// A basic test fixture for User Data downgrade tests that writes a test file
// and a "Last Version" file into User Data in the pre-relaunch case. The former
// is used to validate move-and-delete processing on downgrade, while the latter
// is to simulate a previous run of a higher version of the browser. The fixture... |
<gh_stars>0
"Local types for evars"
import enum
import typing
# Environment map
T_EMAP = typing.Mapping[str, str]
T_FILE = typing.Union[typing.TextIO, str]
T_FILE_ENCODING = typing.Optional[str]
class RetainThe(enum.Enum): # pylint: disable=invalid-name
"Return values for the overwrite callback"
CURRENT_VA... |
<gh_stars>10-100
/*
* Copyright 2014 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appl... |
/**
* Registers this Scenario with a Schema, creating a calculated member
* [Scenario].[{id}] for each cube that has writeback enabled. (Currently
* a cube has writeback enabled iff it has a dimension called "Scenario".)
*
* @param schema Schema
*/
void register(RolapSchema schema) {
... |
#include <iostream>
#include <iomanip>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <numeric>
using namespace std;
#define eb emplace_back
#define pb push_ba... |
/**
* Internal statistic calculator
*
*/
class StatisticCalculator {
private final long timestamp;
private ConcurrentLinkedQueue<Double> storage = new ConcurrentLinkedQueue<>();
private volatile CalculatedStatistics statistics = new CalculatedStatistics();
private final AtomicBoolean frozen = new Ato... |
// Write a double as a string, with proper formatting for infinity and NaN
std::string Serializer::ToString(double v) const {
if (std::isnan(v)) {
return "Nan";
}
if (std::isinf(v)) {
return (v < 0 ? "-Inf" : "+Inf");
}
return std::to_string(v);
} |
import os
import sys
import sideeye
DIRNAME = os.path.dirname(os.path.realpath(__file__))
REGION_FILE = sys.argv[1]
DA1 = sys.argv[2]
ASC = sys.argv[3]
CONFIG = sys.argv[4]
ITEMS = sideeye.parser.region.file(REGION_FILE, sideeye.config.Configuration(CONFIG))
DA1_EXPERIMENT = sideeye.parser.experiment.parse(
DA1,... |
Ten-Week-Old Girl With Lethargy, Weakness, and Poor Feeding
A 10-week-old previously healthy female infant presented to a community hospital after a brief episode of choking and “turning blue” while feeding. Parents reported a 4-day history of poor feeding, weakness, weak cry, and lethargy. The baby was primarily form... |
<filename>src/com/mclean/dao/IUserMapper.java
package com.mclean.dao;
import com.mclean.bean.UserBean;
import java.util.Map;
/**
* @Title:
* @author: IMUKL
* @Description:
* @date: 2019/3/4 9:49
*/
public interface IUserMapper {
// 多参数查询,可以最终封装成一个map
UserBean selectUserBy(Map<String,Object> map);
... |
#include "Wire.h"
#include "Adafruit_NeoPixel.h"
#define DS3231_I2C_ADDRESS 0x68
#define PIXEL_PIN 14
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(60, PIXEL_PIN, NEO_GRB + NEO_KHZ800);
// Convert normal decimal numbers to binary coded decimal
byte decToBcd(byte val)
{
return( (val / 10 * 16) + (val % 10) );
}
// ... |
// ReadFileWithReader and stream on a channel
func ReadFileWithReader(r io.Reader) (chan string, error) {
out := make(chan string)
go func() {
defer close(out)
scanner := bufio.NewScanner(r)
for scanner.Scan() {
out <- scanner.Text()
}
}()
return out, nil
} |
<filename>data_models/parameter_configuration.py
class ParameterConfiguration:
def __init__(self,
input_window_size: int = None,
input_data_source=None,
optimization_algo=None,
criterion=None,
scheduler_partial=None,
... |
import React, { useState, useEffect } from 'react';
import { useHistory } from 'react-router-dom';
import Pagination from '@material-ui/lab/Pagination';
import Switch from 'react-switch';
import parse from 'html-react-parser';
import api from '../../services/api';
import { useQuestion } from '../../hooks/question';
... |
/**
* @author wangxing
* @create 2020/4/2
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TestMessage {
private String eventId;
private String name;
} |
ASSOCIATION OF MATERNAL CHARACTERISTICS WITH COMPLICATIONS OF PREGNANCY: A CROSS-SECTIONAL STUDY AMONG MIDDLE SOCIOECONOMIC PREGNANT WOMEN
Objective: The objective of the study was to determine the association of maternal characteristics with complications of pregnancy among middle socioeconomic women.
Methods: The e... |
package org.firstinspires.ftc.robotcontroller.internal;
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.util.Range;
import org.firstinspires.ftc.robotcore.external.navigati... |
// Creates an "error" style pop-up window
func alert(caption string) int {
format := 0x10
user32 := syscall.NewLazyDLL("user32.dll")
captionPtr, _ := syscall.UTF16PtrFromString(caption)
titlePtr, _ := syscall.UTF16PtrFromString("winpath")
ret, _, _ := user32.NewProc("MessageBoxW").Call(
uintptr(0),
uintptr(uns... |
/**
* Generate the HTML source for the specified project.
* @param project the project top explore.
* @return an html representation of the project.
*/
public String generate(final Project project) {
final StringBuilder sb = new StringBuilder();
sb.append(indent()).append("<div class=\"blockWithHigh... |
/**
* Test standard values of the error function.
*
* <p>The expected values are the probabilities that a Gaussian distribution with mean 0
* and standard deviation 1 contains a value Y in the range [-x, x].
* This is equivalent to erf(x / root(2)).
*
* @param x the value
* @para... |
package hyperdrive
func (suite *HyperdriveTestSuite) TestTagName() {
suite.Equal("param", tagName, "expects tagName to be correct")
}
func (suite *HyperdriveTestSuite) TestIsAllowedTrue() {
suite.Equal(true, suite.TestParsedParam.IsAllowed("GET"), "expects it to return true")
}
func (suite *HyperdriveTestSuite) Te... |
/**
* Adds a set to the given propertyupdate and returns an editor on its
* prop.
*
* @return an editor on a new prop
*/
public Prop addSet() {
Element set = appendChild(root, "set");
Element prop = appendChild(set, "prop");
try {
return new Prop(prop);
} catch (MalformedElementException e) {
... |
def mkroot(target='/tmp', name='root'):
passwd = getpass('Enter password for root\'s private key: ')
install_dir = os.getcwd()
builder(target, name, 'root')
with fileinput.input('openssl.cnf', inplace=True) as f:
for line in f:
print(line.replace('{{name}}', name).replace('{{path}}',... |
import java.io.FileInputStream;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;
import static java.lang.Integer.min;
public class TaskD {
int n;
int[][] ps;
public void solve() throws Exception{
//System.setIn(new FileInputStream("inputs/d.in"));
... |
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1
sys.setrecursionlimit(10**7)
def dfs(node,prenode,black):
if black and B[node]!= -1: return B[node]
... |
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
client = ZwaveClient(entry.data[CONF_URL], async_get_clientsession(hass))
dev_reg = await device_registry.async_get_registry(hass)
@callback
def async_on_node_ready(node: ZwaveNode) -> None:
LOGGER.debug("Processing no... |
def build_ppo_moa_trainer(moa_config):
tf.keras.backend.set_floatx("float32")
trainer_name = "MOAPPOTrainer"
moa_ppo_policy = build_tf_policy(
name="MOAPPOTFPolicy",
get_default_config=lambda: moa_config,
loss_fn=loss_with_moa,
make_model=build_model,
stats_fn=extra_m... |
<reponame>leelavg/pylero
# -*- coding: utf8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
class PyleroLibException(Exception):
pass
|
// Validate will accept a string that is the manifest file content and validate it
func Validate(manifestContent string) (interfaces.Manifest, error) {
var err error
var manifest interfaces.Manifest
var schema gojsonschema.JSONLoader
var document gojsonschema.JSONLoader
apiVersion, err := getVersion(manifestConten... |
<gh_stars>10-100
package commands
import (
"context"
"io"
"github.com/christianalexander/kvdb"
"github.com/christianalexander/kvdb/transactors"
"github.com/sirupsen/logrus"
)
// begin is a command that begins a transaction.
type begin struct {
writer io.Writer
transactor transactors.Transactor
setTxID ... |
/// Create the ground plane geometry.
fn create_ground_plane_geometry(_context: &Game, shader: GLuint) -> (GLuint, GLuint) {
let mesh = include_code!("ground_plane.obj.in");
let mut gp_vp_vbo = 0;
unsafe {
gl::GenBuffers(1, &mut gp_vp_vbo);
gl::BindBuffer(gl::ARRAY_BUFFER, gp_vp_vbo);
... |
import { TextDocumentContentProvider, WebviewPanel, EventEmitter, Uri, window, ViewColumn } from 'vscode';
import { join } from 'path';
class TaskWebview implements TextDocumentContentProvider {
static type = 'view';
static currentView?: WebviewPanel;
static currentInstance?: TaskWebview;
onDi... |
c_1j = [_ for _ in input()]
c_2j = [_ for _ in input()]
c_3j = [_ for _ in input()]
print(c_1j[0] + c_2j[1] + c_3j[2]) |
/**
* Loads the given URL into {@link #webView}.
*
* @param url The URL to load.
*/
protected void loadUrl(@NonNull String url) {
if (client != null) {
client.setLoadingInitialUrl(true);
}
WebViewUtil.loadUrlBasedOnOsVersion(this, webView, url, this, errorNotifica... |
/*****************************************************************************/
/* */
/* (C) Copyright 1996 <NAME> */
/* Portions (C) Copyright 1999 <NAME> */
/* ... |
def LBFGS_descent_direction(self, grad) :
def scal( s, y ) :
return self.scals_L2(s, y)
q = grad
if len(self.iHessian) > 0 :
self.iHessian[-1][1] += q
self.iHessian[-1][2] = scal( self.iHessian[-1][0], self.iHessian[-1][1]).inverse()
print(self.iHessian[-1][2])
prevs = self.i... |
When Dr. Jemma Green was completing her PhD she found that apartments in Australia didn't have easy access to renewable energy.
She decided to try and solve this problem by opening up the energy market, so people in apartment buildings could trade energy between themselves, without the need for a third-party energy co... |
<gh_stars>10-100
package ax25irc;
import ax25irc.aprs.parser.APRSPacket;
import ax25irc.aprs.parser.APRSTypes;
import ax25irc.aprs.parser.Digipeater;
import ax25irc.aprs.parser.MessagePacket;
import ax25irc.aprs.parser.ObjectPacket;
import ax25irc.aprs.parser.Parser;
import ax25irc.aprs.parser.PositionPacket;
import a... |
Amazon's first e-reader, the Kindle, was so popular that it sold out in a matter of hours (Jon 'ShakataGaNai' Davis / Wikimedia Commons).
The legacy of color e-paper may be muted and dim, but its past, at least, is black-and-white: monochrome E Ink set the tone for a decade of reflective, low-power displays.
Naturall... |
/*
Copyright (c) 2017 TOSHIBA Digital Solutions Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by appl... |
<filename>version/version.go
package version
var Version = "0.0.0-alpha"
// Gets set at build time in the Makefile
var BuildTime = "UNKNOWN"
|
// get employees and infos of their offices
func GetEmployees() (structs.EmployeesView, error) {
var employeesRender structs.EmployeesView
employees, err := models.GetEmployeesWithOffice()
if err != nil {
return employeesRender, err
}
employeesRender = structs.EmployeesView{
employees,
}
return employeesRend... |
Dermatitis due to parabens in cosmetic creams
No histopathology was performed but the appearances of the reaction to the resin were typical of vesicular eczema. We assumed that we were dealing with a true sensitization perhaps combined with some irritant effect, facilitating the onset of sensitization and its continua... |
/**
* This plugin provides an implementation of {@link OnlineClusterer}
* extension using clustering components of the Carrot2 project
* (<a href="http://www.carrot2.org">http://www.carrot2.org</a>).
*
* <p>This class hardcodes an equivalent of the following Carrot2 process:
* <pre><![CDATA[
* <local-process i... |
def tail(file_name, num_lines):
lines = []
for line in reverse_readline(file_name):
if not num_lines:
break
lines.append(line)
num_lines -= 1
lines.reverse()
return '\n'.join(lines) |
<reponame>Gitii/acme-client
export class MockHetznerDns {
public Zones = {
GetAll: jest.fn(),
};
public Records = {
GetAll: jest.fn(),
Create: jest.fn(),
Delete: jest.fn(),
};
}
|
//
// Copyright (c) 2016-present DeepGrace (complex dot invoke at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/deepgrace/monster
//
#ifndef OBJECT_... |
/**
* A configuration class that exposes CQL statements for the stocks table as beans.
*
* <p>This component exposes a few {@link SimpleStatement}s that perform both DDL and DML operations
* on the stocks table, as well as a few {@link PreparedStatement}s for common DML operations.
*/
@Configuration
@Profile("!uni... |
<filename>material-icons/src/icons/MusicBoxMultipleOutlineIcon.tsx<gh_stars>1-10
import React, { FC } from 'react';
import { Icon, IconInterface } from "@redesign-system/ui-core";
export const MusicBoxMultipleOutlineIcon: FC<IconInterface> = function MusicBoxMultipleOutlineIcon({
className,
...props... |
// NewFSStorage with the specified settings
func NewFSStorage(siteBuilder sitebuilder.SiteBuilder) (*FSStorage, error) {
viper.SetDefault("storage.rootPath", "/tmp/hyper-cas/storage")
viper.SetDefault("storage.sitesPath", "/tmp/hyper-cas/sites")
rootPath := viper.GetString("storage.rootPath")
sitesPath := viper.Get... |
/**
* TODO: experimental, some versions do not download.
*/
public class MappingsDownloader {
private static final String ADDRESS = "http://export.mcpbot.golde.org/";
private static final Map<String, String> STABLE_MAP = new HashMap<>();
private static final Map<String, String> SNAPSHOT_MAP = new HashMa... |
/**
* Helper method to build a new message list for passing to a MessageSpec.
*/
protected List newMessageList(Message[] messages) {
List ret = new ArrayList();
for (int i = 0; i < messages.length; i++) {
ret.add(messages[i]);
}
return ret;
} |
<gh_stars>100-1000
import { mount } from '@vue/test-utils'
import CirclePackingChart, {
CirclePackingChartProps,
} from '../../src/plots/circle-packing'
import data from './circle-packing-data.json'
const config: CirclePackingChartProps = {
autoFit: true,
data: data as Record<string, any>,
label: false,
lege... |
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import trackeval # noqa: E402
plots_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'data', 'plots'))
tracker_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'data', '... |
//%includeGuardStart {
#ifndef MUSHGLBUFFERS_H
#define MUSHGLBUFFERS_H
//%includeGuardStart } p34af5R27BoG6LKqDWQeKQ
//%Header {
/*****************************************************************************
*
* File: src/MushGL/MushGLBuffers.h
*
* Author: <NAME> 2002-2005
*
* This file contains original work by ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.