content stringlengths 10 4.9M |
|---|
import { DisplayModeType, store } from '../store'
import router from '../router'
import { debugWindowProp, proxyAwareEqual } from './utils'
import { err, ok, Result } from 'neverthrow'
import { NetNode } from './nettypes'
export function pathArrayToString(path: string[]): string {
//console.log(path)
return '/... |
<reponame>kasimte/QARC<filename>QARC/VQPN/baselines/fc.py
from __future__ import division, print_function, absolute_import
import tflearn
import h5py
import os
def load_h5(filename):
h5f = h5py.File(filename, 'r')
X = h5f['X']
Y = h5f['Y']
return X, Y
os.environ['CUDA_VISIBLE_DEVICES'] = '2'
X, Y = ... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.resourcemanager.network.implementation;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.PagedIterable;
import com.azure.resourcemanager.network.NetworkManager;
import com.azure.r... |
<filename>cms/sitemaps/__init__.py
from .cms_sitemap import CMSSitemap # nopyflakes
|
(Corrects name of franchisee company throughout)
RIO DE JANEIRO, Feb 24 (Reuters) - Brazilian unions have filed suit alleging that the largest operator of McDonald’s restaurants in Latin America violates Brazil’s labor laws, a case that could lead to fines of up to 30 percent of annual sales.
According to the suit fi... |
//NewHome creates a new Home connected through the given Cable
func NewHome(plant *Plant) *Home {
log.Printf("NewHome")
address := plant.ServerAddress()
cable := newCable(address)
return &Home{Cable: cable, Plant: plant}
} |
<gh_stars>0
export const ORIGIN_PAGE = 'SPECKLE_ORIGIN_PAGE'
export const ORIGIN_CONTENT = 'SPECKLE_ORIGIN_CONTENT'
|
/**
* Adds the given alias to the cache in a {@literal null}-safe manner.
*
* @param key must not be {@literal null}.
* @param alias can be {@literal null}.
*/
private Alias verify(ClassTypeInformation<?> key, Alias alias) {
Alias existingAlias = typeMap.getOrDefault(key, Alias.NONE);
if (existingAlias.is... |
/*
* Copyright (C) 2010 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... |
/**
* Validate the plan instance.
*
* @param plan
* Full instance of plan object.
* @return The validated data object instance.
* @throws ObjectNotFoundException
* If specified object could not be found.
*/
@PreAuthorize("hasRole('ROLE_PERSON_MAP_WRITE')")
@RequestMapping(value ... |
Saudi Arabia signaled it's ready to cut oil production more than expected, a surprise announcement minutes after Russia and several other non-OPEC countries pledged to curb output next year.
Taken together, OPEC's first deal with its rivals since 2001 and the Saudi comments represent an effort by producers to wrest ba... |
Average Behaviour in Discrete-Time Imprecise Markov Chains: A Study of Weak Ergodicity
We study the limit behaviour of upper and lower bounds on expected time averages in imprecise Markov chains; a generalised type of Markov chain where the local dynamics, traditionally characterised by transition probabilities, are n... |
Image caption Rights groups have long expressed concern about human right abuses and torture in Zimbabwe
South Africa must investigate Zimbabwean officials over allegations they tortured opposition figures in 2007, a Pretoria high court has ruled.
Under international law, South Africa has a duty to investigate crimes... |
def is_abundant(data, axis, cutoff=0.01, strict=False, mean_or_sum='mean'):
if mean_or_sum == 'mean':
m = data.mean(axis=axis)
elif mean_or_sum == 'sum':
m = data.sum(axis=axis)
if strict is True:
res = m > cutoff
else:
res = m >= cutoff
if issparse(data):
res... |
package com.efp.plugins.project.tbtransfor.bean;
import java.io.Serializable;
import java.util.List;
/**
* 表变更信息
*
* @author primerxiao
*/
public class TbChangeInfo implements Serializable {
/**
* 代码属于哪个模块 如a-smcpi
*/
private String baseModuleName;
/**
* 表属于哪个数据库 如:ob_smcrbiz_dev
... |
/**
* Author: <NAME>
* Date Created: April 28, 2021
* Date Modified: April 28, 2021
* Version: 2021.1
*/
package graphicalObjects_SpecialObjects;
/**
interface for objects that maintain a text item
*/
public interface TextGraphicContainer {
public TextGraphic getText();
}
|
import { Box, TextField as MUITextField, MenuItem, Typography } from '@material-ui/core'
import { LabelField, TextField } from 'components/FormField'
import React, { useEffect, useRef, useState } from 'react'
import AdvancedOptions from 'components/AdvancedOptions'
import { FormikCtx } from 'components/NewExperiment/t... |
/**
* A HTTPRequest object contains all the data received from a client request, including
* header fields, request methods, content and parameters.
*
* Created by DOBRE Antonel-George on 15.06.2016.
*/
public class HTTPRequest {
private REQUEST_TYPE requestType = null;
private HashMap<String, String> hea... |
package com.lbaeza.watson;
import java.util.List;
import javax.json.JsonObject;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import com.ibm.watson.developer_cloud.conversation.v1.model.Entity;
import com.ibm.watson.developer_cloud.conversation.v1.model.Intent;
... |
string = input().lower()
new_str = ""
for char in string:
if char not in "aeiouy":
new_str += ".{}".format(char)
print(new_str)
|
/**
* @param sessionConfig session configuration
* @param numContainers number of containers to pre-warm
* @param localResources additional resources to pre-warm with
* @return prewarm context object
*/
public PreWarmContext createPreWarmContext(TezSessionConfiguration sessionConfig, int numContainers,
... |
<gh_stars>100-1000
import { Howl, Howler } from 'howler';
const explosion = require('./explosion.ogg');
const fire = require('./fire.ogg');
const footstep = require('./footstep.ogg');
Howler.volume(1.0);
const ExplosionSound = new Howl({
src: [explosion],
loop: false,
preload: true,
});
const FireSound ... |
<reponame>digisquad-io/strapi-supercharged-template<gh_stars>10-100
import type {
ComponentField,
TimestampFields,
RelationWith,
CollectionEntity,
} from 'strapi-supercharged';
import type { models as SamplePluginModels } from '/@plugins/sample';
import type { Metadata } from '/@components/meta/metadata';
exp... |
def toggleExpanded(self):
self.setExpanded(not self._expanded) |
/**
* This class extends the abstract class {@link EF_DynamicDistribution} and defines a {@link DynamicBayesianNetwork} as a
* conjugate exponential family (EF) model, consisting of EF distributions in canonical form.
*/
public class EF_DynamicBayesianNetwork extends EF_DynamicDistribution {
/** Represents an {... |
/**
* Coloca barco en tablero
* @param pPosis Posiciones del barco a poner
* @param turno turno usuario (true), turno rival (false)
* @return devuelve si se ha podido poner barco
*/
public void colocarBarco(ArrayList<Integer> pPosis, boolean turno) {
for (Integer pos : pPosis) {
... |
export * from './customerErrorMiddleware';
|
def calendar_earnings(other_args: List[str], ticker: str):
parser = argparse.ArgumentParser(
add_help=False,
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
prog="cal",
description="""
Calendar earnings of the company. Including revenue and earnings estimates.
... |
This post is part of a series of posts on artists, designers and illustrators making their way in the Philippines.
Dan Matutina is a force to be reckoned with. He’s become known, not just in the Philippines, but around the world, for his designs and illustrations using simple lines, shapes and textures. He’s the found... |
<reponame>iyolee/fetools
export declare function $throttle(fn: (...args: any) => any, threshhold?: number): (...args: any) => void;
|
<filename>Sources/Elastos/LibCore/tests/bak/Net/InetAddressHelperTest/test.cpp
#include "test.h"
#include <stdio.h>
#include <elautoptr.h>
#include <malloc.h>
CTest::CTest()
{
setUp();
}
CTest::~CTest()
{
tearDown();
}
void CTest::setUp()
{
PFL_EX("CTest::test_parseNumericAddress");
// initialize Byt... |
<filename>border-py-gym-env/src/base.rs
//! Wrapper of gym environments implemented in Python.
#![allow(clippy::float_cmp)]
use crate::AtariWrapper;
use anyhow::Result;
use border_core::{record::Record, Act, Env, Info, Obs, Step};
use log::trace;
use pyo3::types::{IntoPyDict, PyTuple};
use pyo3::{types::PyModule, PyObj... |
Preoperative evaluation and surgical decision-making in pediatric epilepsy surgery.
Epilepsy is a common disease in the pediatric population, and the majority of cases are controlled with medications and lifestyle modification. For the children whose seizures are pharmacoresistant, continued epileptic activity can hav... |
/**
* A CollectIterable is an iterable that transforms a source iterable on a condition as it iterates.
*/
@Immutable
public class CollectIterable<T, V>
extends AbstractLazyIterable<V>
{
private final Iterable<T> adapted;
private final Function<? super T, ? extends V> function;
public CollectIter... |
from app import db
from flask_wtf import FlaskForm
from wtforms import Form, TextField, SelectField, SubmitField, validators, ValidationError
from flask import (
Blueprint, flash, g, redirect, render_template, request, url_for
)
from werkzeug.exceptions import abort
from auth import login_required, User... |
package model
import (
"github.com/uplus-io/ugo/utils"
"strings"
)
func NewDescription(ns, tab int32) *Description {
return &Description{Namespace: ns, Table: tab}
}
func ParseRepository(ip string) *Repository {
bits := strings.Split(ip, ".")
center := utils.StringToInt32(bits[0])
area := utils.StringToInt32(b... |
def _max_shape(self):
return np.max([star.shape for star in self.all_stars],
axis=0) |
<reponame>0x20Man/Watcher3<filename>lib/hachoir/strip.py
"""
Binary striper: remove metadata, producer information, useless padding, etc.
from binary files.
Author: <NAME>
Creation: 17 september 2006
"""
from hachoir.field import MissingField
from hachoir.editor import createEditor
from hachoir.stream import FileOutp... |
<reponame>galwiner/entropy
from plotly import express as px
from plotly.io import to_json
from entropylab.results_backend.sqlalchemy.model import FigureTable
class TestFigureTable:
def test_to_record(self):
target = FigureTable()
figure = px.line(x=["a", "b", "c"], y=[1, 3, 2], title="sample figu... |
//
// UIView+EmptyView.h
// YiBiFen
//
// Created by caohuihui on 15/12/11.
// Copyright © 2015年 hhly. All rights reserved.
//
#import <UIKit/UIKit.h>
@class LYBlankPageView;
@interface UIView (EmptyView)
/**
* 提示框
* @param hasData 是否有数据?
* @param title 没有数据时候的标题
* @param hasError 是否有网... |
// Mouse/Key navigation/manipulation
// Convert screen space to normalised screen space
inline pr::v2 ToNormSS(pr::v2 const& pt_ss, pr::iv2 const& view_size)
{
auto view = pr::IRect(pr::iv2Zero, view_size);
return pr::NormalisePoint(view, pt_ss, 1.0f, -1.0f);
} |
/**
* Calculates the distance between synsets.
*
* @param synset1 Synset 1
* @param synset2 Synset 2
* @return The distance
*/
public double distance(Synset synset1, Synset synset2) {
Validation.notNull(synset1);
Validation.notNull(synset2);
if(synset1.equals(synset2)) {
... |
import {Char} from "../Char";
import {Dispatch} from "react";
import {IState} from "./IState";
export class CharSelectedList implements IState<Char> {
set: Dispatch<Char[]>;
value: Char[];
constructor(hook: [Char[], Dispatch<Char[]>]) {
this.value = hook[0];
this.set = hook[1];
}
}
|
// run-pass
#![allow(stable_features)]
// ignore-windows - this is a unix-specific test
// ignore-emscripten no processes
// ignore-sgx no processes
#![feature(process_exec, rustc_private)]
extern crate libc;
use std::env;
use std::io::Error;
use std::os::unix::process::CommandExt;
use std::process::Command;
use std... |
<filename>dontneedit.py<gh_stars>0
print("Don't know why you say goodbye i say hello")
|
/** Identify a common fraction that can be factored from all the Terms in this
* Expression and remove it. This includes variables raised to negative powers.
*
* @return a result that includes a new Expression and the Divisor used to create it.
*/
public DivisionResult eliminateFractions() {
DivisionResult r... |
/**
* True,when at least one Report is active.
*
* @return true, if is active
*/
@Transient
public boolean isActive(){
for(Report report : getReports()){
if(report.isActive()) return true;
}
return false;
} |
import { WAFV2Client, CheckCapacityCommand, CheckCapacityCommandInput, DescribeManagedRuleGroupCommand, DescribeManagedRuleGroupCommandInput } from "@aws-sdk/client-wafv2";
import * as quota from "@aws-sdk/client-service-quotas";
import * as cloudformation from "@aws-sdk/client-cloudformation";
import { FMSClient, List... |
<gh_stars>1-10
package org.monora.coolsocket.core.response;
import org.jetbrains.annotations.Nullable;
import org.monora.coolsocket.core.protocol.ProtocolException;
/**
* Thrown when an unsupported feature is requested, indicating it shouldn't have been requested and that it is an
* error.
*/
public class Unsuppor... |
import Layout from '../containers/Layout';
import { Country } from '../lib/types';
import client from '../apollo/client';
import { gql } from '@apollo/client';
import Header from '../components/Header/Header';
import HomeContent from '../components/HomeContent/HomeContent';
import Map from '../components/Map/Map';
exp... |
"Chihuahuas" redirects here. For the baseball team, see El Paso Chihuahuas
Dog breed
The Chihuahua () (Spanish: chihuahueño)[1] is the smallest breed of dog and is named after the state of Chihuahua in Mexico. Chihuahuas come in a wide variety of colors, and two coat lengths.
History [ edit ]
A Techichi, likely the... |
/**
* Looks to see if we have a new distance text.
* Sets new distance text if found.
*
* @param model provides distance text
*/
private void addDistanceText(InstructionModel model) {
if (newDistanceText(model)) {
distanceText(model);
} else if (stepDistanceText.getText().toString().isEmpty... |
#ifndef INTERFACE_H
#define INTERFACE_H
#include <QObject>
#include "model.h"
#include "serialcommunicator.h"
#include "adc.h"
#include "motor.h"
#include "light.h"
class Interface : public QObject
{
Q_OBJECT
public:
Interface(unsigned short io8251, unsigned short io8253, unsigned short io8255, unsigned sho... |
// Copyright 2019 Google LLC
//
// 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 in ... |
/**
* This method checks if end date is before begin date.
*
* @param endDate
* @param beginDate
* @return
*/
public boolean validateDates(Timestamp endDate, Timestamp beginDate) {
boolean result = false;
try {
if ((endDate.before(beginDate))) {
result = true;
}
} catch (Exception e) {
e... |
Generating Self-Serendipity Preference in Recommender Systems for Addressing Cold Start Problems
Classical accuracy-oriented Recommender Systems (RSs) typically face the cold-start problem and the filter-bubble problem when users suffer the familiar, repeated, and even predictable recommendations, making them boring a... |
async def fire_event(self, event: Event) -> Event:
for identifier in event.identifiers:
handlers = self.registered.get(identifier, [])
for handler in handlers:
if event.cancelled and not handler["cancelled"]:
continue
if handler["filter... |
/// Places the given piece on the board WITH NO ADDITIONAL CHECKS.
pub fn place(&mut self, piece: &Piece) {
for position in piece.coordinates() {
self.set(position, piece.color);
}
} |
<gh_stars>1-10
package git
import (
"bufio"
"fmt"
"runtime"
"strings"
"github.com/meinto/glow/cmd"
"github.com/meinto/glow"
"github.com/pkg/errors"
)
// NativeGitAdapter implemented with native git
type nativeGitAdapter struct {
exec cmd.CmdExecutor
}
// SetCICDOrigin for pipeline
func (a nativeGitAdapter)... |
.
An involvement of rice allergy in development and exacerbation of recalcitrant atopic dermatitis (AD) has been suggested in some cases, and it has been also known that elimination diet of rice results in improvement of AD and reduction of the doses of steroid ointment and anti-allergic drugs used for the treatment. ... |
<filename>fboss/agent/hw/sai/switch/SaiSwitchManager.cpp<gh_stars>1-10
/*
* Copyright (c) 2004-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rig... |
<gh_stars>0
#include "StringHelper.h"
#include <string>
namespace GG
{
namespace StringHelper
{
void RemovePath( const std::string & in, std::string & out )
{
out = in;
const size_t lastSlashIndex = out.find_last_of( "\\/" );
if( std::string::npos != lastSlashIndex )
{
out.erase( 0, lastSlashInde... |
<reponame>72gm/weather-widget
export interface IMain {
temp: number;
humidity: number;
} |
<reponame>JuliaComputing/arrayfire
/*******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
***********... |
pub mod vm;
pub mod instruction;
pub use self::vm::VM;
pub use self::instruction::{
Instruction,
Opcode,
}; |
A source with knowledge of the situation confirmed with Behind the Steel Curtain Wednesday the Steelers have strong interest in free agent cornerback Brandon Flowers, and a visit with team officials in the near future may be the next step.
The source said the team is trying to get Flowers out to Pittsburgh, but he is ... |
/**
* When you use this function, any sound played will bypass the player's
* volume setting, so make sure to only use this for like warnings or stuff like that.
*/
public void playLoudSound(String sound, double pitch) {
playingSound = true;
Minecraft.getMinecraft().thePlayer.playSound(so... |
<reponame>vmagamedov/metricslog
from decimal import Decimal as Dec
from datetime import datetime
import pytest
from ..types import Integer, Float, Decimal, String, Timestamp
from ..types import Map, Record, Field
@pytest.mark.parametrize('metric_cls, value', [
(Integer, 5),
(Float, 5.1),
(Decimal, Dec('... |
Assessment of dental caries with Digital Imaging Fiber-Optic TransIllumination (DIFOTI): in vitro study.
This paper describes Digital Imaging Fiber-Optic TransIllumination (DIFOTI-TM), a new method for the reliable detection of dental caries. Images of teeth obtained through visible-light, fiber-optic transilluminatio... |
<filename>ppedit/sexp.c
/*
ppedit - A pattern plate editor for Spiro splines.
Copyright (C) 2007 <NAME>
Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
<LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
option. This file may not... |
Corey Brown, left, shot and killed Nicoleia Taylor Tuesday morning, cops said. View Full Caption DNAinfo/Janet Upadhye & NYPD
CLINTON HILL — A woman was shot and killed near the Pratt Institute Tuesday after she was caught in crossfire between two groups of shooters, cops and witnesses said.
Nicoleia Taylor, 24, and ... |
/**
* Overridden to update our cached dialog's appearance also.
*/
@Override
protected void lookAndFeelChanged(LookAndFeel laf) {
super.lookAndFeelChanged(laf);
if (scriptSearchDialog!=null) {
SwingUtilities.updateComponentTreeUI(scriptSearchDialog);
}
} |
// JobTerminalConditionDomainMappingReasonEnumToProto converts a JobTerminalConditionDomainMappingReasonEnum enum to its proto representation.
func RunAlphaJobTerminalConditionDomainMappingReasonEnumToProto(e *alpha.JobTerminalConditionDomainMappingReasonEnum) alphapb.RunAlphaJobTerminalConditionDomainMappingReasonEnum... |
def change_figure_number(self, current_num, new_num):
if self._is_new_number_valid(new_num):
self._figures[new_num] = self._figures.pop(current_num)
else:
raise ValueError(f"Figure {new_num} is already in use!") |
from __future__ import division
from __future__ import print_function
import math
import mxnet as mx
import mxnext as X
from symbol.builder import FasterRcnn, Bbox2fcHead
class CascadeRcnn(object):
def __init__(self):
pass
@staticmethod
def get_train_symbol(backbone, neck, rpn_head, roi_extracto... |
package nbntest
import (
"github.com/BurntSushi/toml"
gct "github.com/freman/go-commontypes"
)
type SpeedtestConfiguration struct {
Interval gct.Duration `toml:"interval"`
Site int `toml:"site"`
Fastest int `toml:"fastest"`
}
type ModemConfiguration struct {
Interval gct.Duration ... |
/**
* A Material Design button.
*
* @see <a href="https://www.google.com/design/spec/components/buttons.html">Buttons (Google design guidelines)</a>
*/
public class MaterialButton extends JButton {
private RippleEffect ripple;
private ElevationEffect elevation;
private Type type = Type.DEFAULT;
priv... |
<reponame>linminglu/Fgame<filename>game/ring/handler/fuse.go
package handler
import (
"fgame/fgame/common/codec"
uipb "fgame/fgame/common/codec/pb/ui"
"fgame/fgame/common/dispatch"
"fgame/fgame/common/lang"
commonlog "fgame/fgame/common/log"
"fgame/fgame/core/session"
coreutils "fgame/fgame/core/utils"
chatlog... |
N = int(input())
s_list = [input() for _ in range(N)]
M = int(input())
t_list = [input() for _ in range(M)]
rev_list = []
for i in range(len(s_list)):
a = s_list.count(s_list[i])
b = t_list.count(s_list[i])
if a >= b:
ans_num = a-b
else:
ans_num = 0
rev_list.append(ans_num)
pri... |
<reponame>AIRONAXSolutions/python-education<filename>intro-to-sqlalchemy/simplest_relationship_example.py
from sqlalchemy import create_engine, Column, String, Integer, ForeignKey
from sqlalchemy.orm import declarative_base
engine = create_engine("sqlite+pysqlite:///:memory:", echo=True, future=True)
Base = declarati... |
Gene Expression Profiles Identify Features Common to Lobular and Ductal Premalignant Breast Lesions
Premalignant lesions have been identified in both the ductal and lobular units of the breast epithelium. These lesions have a 4-fold increase in risk of progression to invasive breast cancer, but 80% will remain indolen... |
package main
import (
"context"
"fmt"
"github.com/coreos/etcd/mvcc/mvccpb"
"github.com/google/uuid"
"go.etcd.io/etcd/clientv3"
"time"
)
var (
config clientv3.Config
client *clientv3.Client
kv clientv3.KV
err error
lease clientv3.Lease
lea... |
<gh_stars>1-10
import { createReducer } from 'retreon';
import * as counter from './actions';
export default createReducer(0, (handleAction) => [
handleAction(counter.increment, (state) => state + 1),
handleAction(counter.decrement, (state) => state - 1),
]);
|
With six games left in the season, the Carolina Panthers are on pace to make history. Yes, there’s the opportunity to go 16-0, which would be an impressive feat indeed. But the Panthers are threatening to do something far more notable, something that was thought to be impossible in Roger Goodell’s NFL. They could be ..... |
def computeSimGraph(self, label, R=None, n_edges=None, n_gnodes=None,
similarity='He2', g=1, th_gauss=0.1, rescale=False,
blocksize=25_000, useGPU=False, tmp_folder=None,
save_every=1e300, verbose=True):
if not self.is_active_snode(label):
... |
def populate_channel_game_videos(youtube, game, parents, num_vids):
print("------------------")
print("Starting retrieval of channel videos for", len(parents), "channels...")
channel_videos = {}
counter = 0
for par_chan in parents:
if counter % 5 == 0:
print("Channels completed: ... |
<reponame>shanemcd/coreos-assembler<filename>tools/vendor/github.com/minio/direct-csi/pkg/apis/direct.csi.min.io/v1beta1/drive_matcher.go
// This file is part of MinIO Direct CSI
// Copyright (c) 2021 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU... |
def search(self, lines):
text = "\n".join(lines)
while 1:
m = RE_FENCE.search(text)
if m:
self.lang = m.group('lang')
self.hl_lines = m.group('hl_lines')
for entry in reversed(self.markdown.superfences):
if entry... |
The ISO has decided not to approve two NSA-designed block encryption algorithms: Speck and Simon. It's because the NSA is not trusted to put security ahead of surveillance:
A number of them voiced their distrust in emails to one another, seen by Reuters, and in written comments that are part of the process. The suspic... |
<reponame>Omegaphora/hardware_intel_common_omx-components
/*
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights gr... |
def pypy_json_encode(value, pretty=False):
global _dealing_with_problem
if pretty:
return pretty_json(value)
try:
_buffer = UnicodeBuilder(2048)
_value2json(value, _buffer)
output = _buffer.build()
return output
except Exception as e:
from mo_logs import L... |
<gh_stars>10-100
import { mapReverse, filterReverse } from './index';
describe('Helpers', () => {
it('mapReverse should work with an empty array', () => {
const result = mapReverse([], (item) => item);
expect(result).toEqual([]);
});
it('mapReverse should work with identity selector', () => {
const ... |
/**
* Return LLRP message as string in LTK XML format
*
* If there is an error during message encoding, the error message is
* returned.
*
* @return LRRP message in LTK XML encoding
* @throws InvalidLLRPMessageException
*/
public String toXMLString() throws InvalidLLRPMessageException {
Document d =... |
/**
* Registers new {@link Command} with this splitter and returns a response {@link Publisher} for that command.
*
* <h2>Assumptions</h2>
* As defined by the class javadoc: {@link ReadStreamSplitter}.
*
* @param command {@link Command} to register.
* @return {@link Publisher} contain... |
def output_moments(momzero, momone, momtwo, momnine, dir, filename):
momzero.write(dir+'/'+filename+'_momzero.fits', format='fits', overwrite=True)
momone.write(dir+'/'+filename+'_momone.fits', format='fits', overwrite=True)
momtwo.write(dir+'/'+filename+'_momtwo.fits', format='fits', overwrite=True)
fi... |
# Highest Value Palindrome
# Make a number palindromic in no more than $k$ moves, maximal.
#
# https://www.hackerrank.com/challenges/richie-rich/problem
#
#!/bin/python3
import os
import sys
#
# Complete the highestValuePalindrome function below.
#
def highestValuePalindrome(s, n, k):
pos = []
p = []
for... |
package com.example.xianghaapp.view.base;
/**
* Created by Administrator on 2016/8/10.
*/
public interface BaseView<T,V> {
public void showData(T t);
public void showHeader(V v);
}
|
/**
* * Services
*/
import { StoreService } from '@core/store/store.service';
/**
* * Modles and types
*/
import { BaseModel } from '@core/model/base.model';
import { Storages } from '../@types/interface';
/**
* * Constants
*/
import { APP_CONSTANTS } from '@src/constants';
class Model extends BaseModel {
#m... |
// Copyright (c) 2011 The Native Client Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef EXAMPLES_TUMBLER_CUBE_H_
#define EXAMPLES_TUMBLER_CUBE_H_
#include <GLES2/gl2.h>
#include <vector>
#include "opengl_context.h"
#include ... |
Influence of feeding fermented colostrum and Lactobacillus acidophilus on fecal flora of dairy calves.
Twenty Holstein calves were assigned alternately at birth to diets of 1) fermented colostrum, 2) colostrum treated with 1% propionic acid, 3) whole milk, or 4) whole milk treated with Lactobacillus acidophilus (froze... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.