content stringlengths 10 4.9M |
|---|
<gh_stars>0
package com.nergachev.roman.showmebeers.model.json;
import java.util.List;
/**
* Created by rone on 06/02/16.
*/
public class BreweriesList {
List<Brewery> data;
public List<Brewery> getData() {
return data;
}
}
|
/**
* Created by evan on 8/22/14.
*/
public class SampleObservables {
private static final String TAG = "RxLoader Sample";
public static Observable<String> delay() {
return Observable.timer(2, TimeUnit.SECONDS).map(new Func1<Long, String>() {
@Override
public String call(L... |
export * from './SyncReduxToRecoil';
export * from './atomFromRedux';
export * from './selectorFromReselect';
export * from './syncChangesFromRecoil';
export * from './useSyncReduxToRecoil';
export * from './options';
// Danger! Internals shouldn't be used unless you absolutely know what you're doing
export * as _int... |
<filename>configmanager/pkg/mgmt/configmanager.go<gh_stars>10-100
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package mgmt
import (
"encoding/json"
"github.com/hyperledger/fabric-sdk-go/pkg/common/logging"
"github.com/hyperledger/fabric/core/chaincode/shim... |
<gh_stars>0
//! Tests targeting auto traits specifically
use super::*;
#[test]
fn auto_semantics() {
test! {
program {
trait Sized { }
#[auto] trait Send { }
struct TypeA { }
struct Ptr<T> { }
impl<T> Send for Ptr<T> where T: Send { }
... |
// ParseShardSet parses a shard set from the input string.
func ParseShardSet(s string) (ShardSet, error) {
ss := make(ShardSet, defaultNumShards)
if err := ss.ParseRange(s); err != nil {
return nil, err
}
return ss, nil
} |
// PINCache is a modified version of TMCache
// Modifications by <NAME>
// Copyright (c) 2015 Pinterest. All rights reserved.
#import <Foundation/Foundation.h>
#import "PINCacheMacros.h"
#import "PINCaching.h"
#import "PINDiskCache.h"
#import "PINMemoryCache.h"
NS_ASSUME_NONNULL_BEGIN
@class PINCacheService;
/... |
export class Node {
constructor(type: any, defaults: any, options: any, binds: any, config: any, attributes: any);
type: any;
_id: string;
parent: any;
root: any;
path: any;
index: any;
configure(config: any, attributes: any): any;
_config: {
traits: any;
props: any;
... |
Do We Still Need Preoperative Autologous Blood Donation? – It Is High Time for a Reappraisal!
Preoperative autologous blood donation (PABD) can be an adequate solution to a patient’s problem before nonurgent surgery if a high (>10%) probability of perioperative blood transfusion exists in this individual case and, at ... |
<reponame>timgates42/trex-core
/*
hhaim
Cisco Systems, Inc.
*/
/*
Copyright (c) 2016-2016 Cisco Systems, Inc.
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/li... |
/* Simple remapper to remap a split parameter to the same expression based on a
special dummy decl so that edge redirections can detect transitive splitting
and finish them. */
static tree
remap_split_decl_to_dummy (tree *tp, int *walk_subtrees, void *data)
{
tree t = *tp;
if (DECL_P (t) || TREE_CODE (t) == ... |
def auto_delete_file_on_delete(sender, instance, **kwargs):
if instance.value.path:
try:
if os.path.isfile(instance.value.path):
os.remove(instance.value.path)
except Exception as e:
storage, name = instance.value.storage, instance.value.name
stora... |
<reponame>dadkisson/bridgr<filename>internal/bridgr/ruby.go
package bridgr
import (
"fmt"
"os"
"path"
"reflect"
"text/template"
"github.com/aztechian/bridgr/internal/bridgr/asset"
"github.com/docker/distribution/reference"
"github.com/mitchellh/mapstructure"
log "unknwon.dev/clog/v2"
)
var (
rbImage refere... |
Samuel Leighton Dore, seen here at age four, says his home life 'could not have been more ideal'. Instead, childhood sexual trauma, risky health behaviours, smoking, a lack of positive support and negative social interactions pose more of a risk to people's mental health. Samuel Leighton Dore's mother is a sexuality co... |
import * as React from 'react';
import { Field, InjectedFormProps, reduxForm } from 'redux-form';
import { renderDatePicker, renderTextField } from '../../helpers/form_helpers';
import { Cohort } from '../../../Types';
// Material UI
import { createStyles, Theme, WithStyles, withStyles } from '@material-ui/core';
imp... |
<filename>src/cookie/protocol/network/messages/GetPartInfoMessage.ts
import Message from "./Message";
export default class GetPartInfoMessage extends Message {
public id: string;
constructor(id = "") {
super();
this.id = id;
}
}
|
A newly released interactive campus map offers a highly-customizable tool for finding specific buildings, discovering accessible routes, and exploring the Virginia Tech campus in new ways.
The map is the result of collaboration between Virginia Tech’s Enterprise Geographic Information Systems, University Relations, Fa... |
/**
*
*
* @author Stefan Meyer <smeyer.ilias@gmx.de>
* @version $Id$
*/
public class ilServer {
private String version = "4.4.0.1";
private String[] arguments;
private String command;
private static final Logger logger = Logger.getLogger(ilServer.class);
/**
* @param args
*/
public ilServer(S... |
/**
* A sample filter that captures Request and Response headers and sends them to
* Mantis using the mantis-publish library.
*/
@Slf4j
@Singleton
public class CaptureRequestEventFilter implements Filter {
private static final String RESPONSE_HEADER_PREFIX = "response.header.";
private static final String R... |
package cn.yjxxclub.springboot.entity;
import java.util.Date;
import java.util.List;
/**
* Author: 遇见小星
* Email: <EMAIL>
* Date: 17-6-7
* Time: 下午4:49
* Describe: 客户
*/
public class Member implements java.io.Serializable{
private Integer id;
private String name;
private User user;
private Strin... |
<reponame>LucaHermann/Typescript<gh_stars>0
/**
* It's not a best practice to create two time the same class with the same logic inside.
* By using generic we allow this class to have the type we pass at the creation of the class.
*
* ex: new AnythingCollection<string>(['a', 'b']);
* new AnythingCollection<nu... |
<gh_stars>10-100
/* MIT License
*
* Copyright (c) 2018 <NAME> <mitghi[at]gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rig... |
There are people who live in vans by choice. For some, living in a van allows them to travel the country. For others, it lets them save money to pursue a passion like starting a new company. And still others are just drawn to van living because they want to maintain a lifestyle of minimalism and self-reliance.
Priceon... |
/**
* This class represents rich text dialog field.
*/
@PageObject
public class RichText implements DialogField {
@FindBy(css = ".coral-RichText")
private WebElement input;
@Inject
private Actions actions;
/**
* This method deleted already set rich text value and sets new one.
*
* @param value d... |
In an unusually strong rebuke, the US accused Israel of breaking its trust over plans for a new West Bank settlement.
The White House on Wednesday condemned Israel as plans to construct new settlement homes deep into the West Bank emerged.
In its notably forthright response, the Obama administration lashed out at the... |
//! Hierarchical Deterministic seed implementing BIP39
use parity_scale_codec::{Decode, Encode};
use chain_core::init::network::{get_bip44_coin_type_from_network, Network};
use client_common::{ErrorKind, PrivateKey, PublicKey, Result, ResultExt};
use crate::hd_wallet::{
ChainPath, DefaultKeyChain, ExtendedPrivKey... |
<filename>init.py
import csv
c = csv.reader(open('nasdaq.csv'))
rows = []
for row in c:
rows.append(row)
listToStr = ' '.join([str(elem) for elem in rows])
print(listToStr[0])
|
/**
* Populate the entry set with the given search results.
*/
private void populatePopup() {
contextMenu.getItems().clear();
String text = textField.getText().toLowerCase();
contextMenu.getItems()
.addAll(entries.stream().filter(string -> string.toLowerCase().contains(text.toLowerCase())).limit(maximumEn... |
Magnetic Resonance Imaging in Cardiac Amyloidosis: Unraveling the Stealth Entity.
Amyloidosis is a systemic disease involving many organs. Cardiac involvement is a significant cause of morbidity and mortality in these patients. Diagnosis of cardiac amyloidosis is based on endomyocardial biopsy which however is invasiv... |
/**
* Determines if the target in OpenSearch. It appears to be true for OpenDistro as well.
* Created custom for Data Prepper
* TODO: Determine if we need this at all. Can we assume all supported versions of OpenDistro also have the same capabilities?
* TODO: It may be possible to remove testing aga... |
def newSkelFileEvent(self, selected_file):
matching_maskname = results2maskedvideo(selected_file)
matching_imgstorename = results2imgstore(selected_file)
if (self.fid is None) and (self.isimgstore is False):
self.updateSkelAndVideoFileFromSkelName(selected_file)
elif self.vfi... |
/**
* Returns true if the passed object is primitive in respect to V8.
*/
private static boolean isBasicallyPrimitive(Object object) {
return object instanceof V8Value ||
object instanceof String ||
object instanceof Boolean ||
object instanceof Short ||... |
#include "klee/System/Time.h"
#include "gtest/gtest.h"
#include "gtest/gtest-death-test.h"
#include <cerrno>
#include <sstream>
int finished = 0;
using namespace klee;
TEST(TimeTest, TimingFunctions) {
auto t = time::getClockInfo();
ASSERT_STRNE(t.c_str(), "");
auto p0 = time::getWallTime();
auto p1 = ti... |
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
HAL_IncTick();
lv_tick_inc(1);
} |
def initialize_statev(self):
numx = getattr(self.material, 'num_sdv', Material.num_sdv)
statev = None if numx is None else np.zeros(numx)
try:
statev = self.material.sdvini(statev)
except AttributeError:
pass
aux_sdv = []
if hasattr(self.material, ... |
// Calcs the sum of a position on the board.
// Looks at each of it's eight neighbors and sums them.
func SumNeighbors(board *Board, y int, x int) int {
sum := 0
if y < len(board)-1 && x > 0 {
sum += board[y+1][x-1]
}
if y < len(board)-1 {
sum += board[y+1][x]
}
if y < len(board)-1 && x < len(board[y])-1 {
... |
<reponame>IBM/cf-node-template
import { CalculatorInput } from "../models";
export class Calculator{
add(calculatorInput: CalculatorInput) {
return calculatorInput.numOne + calculatorInput.numTwo;
}
} |
I. the Finsler-type Extensions of the Classic Riemannian Framework -a Prolific Class of Models in Natural Sciences 1. Basic Differential Geometric Structures on Manifolds: Euclidean, Riemannian, Finslerian. 2. Generalized Structures: Lagrange, Generalized Lagrange, Eisenhart. 3. Specific Geometric O
The classic Euclid... |
© vk.com/clubmashany
Сибирская певица Машани выпустила патриотический клип в поддержку рубля. Произведение является обращением к президенту России Владимиру Путину и рассказывает о желании главной героини платить «за доллар рубль и ни копейкой больше».
как-то
Клип снят среди сена и русских берез, с балалайкой и деву... |
Benefits and Bear Traps The EU Defence Directive
DOI: 10.1080/03071840802386166 The ‘transatlantic technology gap’ has been common parlance in the defence world for a number of years. Talk of ‘the gap’ reflects the fact that in a number of key areas US military equipment is more advanced than European kit. This does n... |
/* Checks whether the object is present in the left or right array
* Parameters:
* object - object that needs to be checked if present in either of the array
*/
@Override
public boolean contains(Object object) {
try {
for (int i = 0; i < numElementLeftArray; i++) {
if (leftArray[i].equa... |
/*
* Prints Searching, Resting, Paralysis, or 'count' status
* Display is always exactly 10 characters wide (see below)
*
* This function was a major bottleneck when resting, so a lot of
* the text formatting code was optimized in place below.
*/
static void prt_state(player_type *p_ptr)
{
bool p, s, r;
if (p_p... |
import SplitParameters from "./split-parameters";
import Path from "../path";
import {NameParameterArgumentPath} from "../file/string/name-parameter";
export type SplitParameterArgumentEmpty = {
empty : boolean
}
export type SplitParameterArgumentToString = Path & SplitParameterArgumentEmpty
export type SplitPa... |
<filename>app/bidi_line_iterator.h
// Copyright (c) 2010 The Chromium 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 APP_BIDI_LINE_ITERATOR_H_
#define APP_BIDI_LINE_ITERATOR_H_
#pragma once
#include <string>
#include "unic... |
import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import {NgbModal, ModalDismissReasons} from '@ng-bootstrap/ng-bootstrap';
import { Router } from '@angular/router';
import { MainserviceService } from '../mainservice.service';
@Component({
selector: 'app-portfolio'... |
/**
* Wait until barrier opens
* @param the allowable timeout of the waiting
* @return the result of the waiting
*/
const bool shared_barrier::wait(const struct timespec& timeout) const
{
knock();
return expect(timeout);
} |
def insert(self, node , data):
if node is None:
return self.createNode(data)
if data < node.data:
node.left = self.insert(node.left, data)
elif data > node.data:
node.right = self.insert(node.right, data)
return node |
1 4.000931005326223 0
2 4.000931005326223 17
3 4.000931005326223 49
4 4.000931005326223 19
5 0.1680124573111111 51
6 0.326106272 101
7 4.000931005326223 63
8 4.000931005326223 29
9 4.000931005326223 61
10 4.000931005326223 35
11 4.000931005326223 81
12 4.000931005326223 34
13 4.000931005326223 64
14 4.000931005326223 3... |
<reponame>pontus-vision/simple-react-panel
import { PVGridColDef } from './PVGrid';
export interface SimpleOptions {
namespace: string;
url: string;
isNeighbour: boolean;
neighbourNamespace: string;
dataType?: string;
colSettings?: PVGridColDef[];
customFilter?: string;
filter?: string;
}
export const... |
<reponame>meltinglava/gura-rs-parser<gh_stars>10-100
// Basic Gura parser usage example
use gura::{dump, parse, GuraType};
fn main() {
let gura_string = r##"
# This is a Gura document.
title: "Gura Example"
an_object:
username: "Stephen"
pass: "<PASSWORD>"
# Line breaks are OK when inside arrays
hosts: [... |
#include "sprite.h"
namespace dream
{
namespace graphics
{
// Sprite
Sprite::Sprite(float x, float y, float width, float height, unsigned int color) :
IRenderable2D(maths::Vector3(x, y, 0), maths::Vector2(width, height), color)
{
}
Sprite::Sprite(float x, float y, float width, float height, Texture * t... |
Novel colchicine conjugate with unusual effect on the microtubules of cancer cells
Abstract Colchicine derivative bearing substituted bispidine moiety, namely N-{7-(3,7-Di-(tert-butoxycarbonyl)-1,5-dimethyl-3,7-diazabicyclo nonan-9-yl)-oxy-7-oxoheptanoyl}-N-deacetylcolchicine, was synthesized and tested for its effect... |
#include<stdio.h>
#include<string.h>
#include<math.h>
//#include<stdlib.h>
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
char str[100005];
scanf("%s",str);
int i,j,k,flag=0;
j=strlen(str);
for(i=0;i<j-1;i++)
{
if(str[i]==str[i+1]&&str[i]!='?') {printf(... |
// check if asking for an interface that some wrapper in the chain inherits from
nsXPCWrappedJS*
nsXPCWrappedJS::FindInherited(REFNSIID aIID)
{
NS_ASSERTION(!aIID.Equals(NS_GET_IID(nsISupports)), "bad call sequence");
for (nsXPCWrappedJS* cur = mRoot; cur; cur = cur->mNext) {
bool found;
if (NS_... |
<reponame>LimeChain/celo-monorepo
import { RPCSubprovider, Web3ProviderEngine } from '@0x/subproviders'
import Web3 from 'web3'
import { CeloProvider } from '../src/transaction-utils'
export class Web3Utils {
// This web3 has no signing ability.
static async getWeb3(protocol: string, ipAddress: string, port: numbe... |
/**
* This publishes the airavata-default-xacml-policy.xml to the PDP via PAP API (of WSO2 Identity Server)
*/
public class DefaultPAPClient {
private final static Logger logger = LoggerFactory.getLogger(DefaultPAPClient.class);
private EntitlementPolicyAdminServiceStub entitlementPolicyAdminServiceStub;
... |
def kg(context, ns, kind, field_selector=None):
args = f'{kind} --context {context} -o json'.split()
args += ['-n', ns] if ns else ['--all-namespaces']
if field_selector is not None:
args += ['--field-selector=' + field_selector]
result = k.get(*args)
return json.loads(str(result.stdout, 'ut... |
<filename>cloud-aws/src/test/java/com/sequenceiq/cloudbreak/cloud/aws/connector/resource/AwsUpdateServiceTest.java
package com.sequenceiq.cloudbreak.cloud.aws.connector.resource;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import java... |
//
// When streaming the database out, we have to write out the same stuff for each media type,
// so we split this out to call separately. And some folks may just want to use these
// directly to deal with a single media type.
//
// Similar for formatting out to XML as well.
//
tCIDLib::TVoid
TMediaDB::FormatBin(c... |
<filename>FlashPanel.java
package simpleflashcards;
import javax.swing.*;
import java.awt.*;
public class FlashPanel extends JPanel
{
int firstNumber;
int secondNumber;
int answer;
boolean answerSet;
String operand;
public FlashPanel(int firstNumber, int secondNumber, Strin... |
// NewReleaseListResolver creates a new ReleaseListResolver using the given Lister and Resolver
func NewReleaseListResolver(lister Lister, resolver Resolver) *ReleaseListResolver {
return &ReleaseListResolver{
lister: lister,
resolver: resolver,
}
} |
package com.alibaba.fastjson.serializer;
public class SerialContext {
public final SerialContext parent;
public final Object object;
public final Object fieldName;
public final int features;
public SerialContext(SerialContext parent, Object object, Object fieldName, int fe... |
/// @file
/// @brief Contains #using_ keyword.
#pragma once
/// @brief The Switch namespace contains all fundamental classes to access Hardware, Os, System, and more.
namespace Switch {
/// @brief The specified expression is cleared automaticaly when the scope is ended.
/// @par Library
/// Switch.Core
/// @pa... |
package life.catalogue.tools;
import life.catalogue.api.model.Dataset;
import life.catalogue.api.model.DatasetSettings;
import life.catalogue.api.vocab.DatasetOrigin;
import life.catalogue.api.vocab.Setting;
import life.catalogue.common.text.CitationUtils;
import life.catalogue.dao.*;
import life.catalogue.db.MybatisF... |
// This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// ----------------------------------------------------------------------------
// "THE BEER-WARE LICENSE" (Revision 42):
// <<EMAIL>> wrote this file. As long... |
import h5py
import random
import numpy as np
from PIL import Image
from pathlib import Path
from torch.utils.data import Dataset
from torchvision.transforms import transforms
DIV2K_RGB_MEAN = (0.4488, 0.4371, 0.4040)
DIV2K_RGB_STD = (1.0, 1.0, 1.0)
def augment_five_crop(batch, scale=None):
hr_augment_path = No... |
<reponame>jedzeins/go-chi-webserver<gh_stars>0
package pokemonService
import (
"github.com/jedzeins/go-chi-webserver/domains"
"github.com/jedzeins/go-chi-webserver/providers/pokemonProviders"
)
// service should handle the response
func GetPikachu() domains.Pokemon {
return pokemonProviders.ProvidePikachu()
}
fu... |
DNA DAMAGE AND REPAIR IN HUMAN CELLS EXPOSED TO SUNLIGHT
Cultured human cells were treated with direct sunlight under conditions which minimised the hypertonic, hyperthermic and fixative effects of solar radiation. Sunlight produced similar levels of DNA strand breaks as equitoxic 254 nm UV in two fibroblast strains a... |
<gh_stars>10-100
/**
* Copyright 2011-2021 Asakusa Framework Team.
*
* 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 requi... |
<reponame>astrotycoon/bold-utils
//===- OwningPtrTest.cpp --------------------------------------------------===//
//
// The Bold Project
//
// This file is distributed under the New BSD License.
// See LICENSE for details.
//
//===-----------------------------------------------------------... |
#include "pluginmanager.h"
#include <QDir>
#include <QDebug>
#include <QFileInfo>
#include <QApplication>
#include <iostream>
#include "../QtUtil/Utils/Log.h"
PluginManager::PluginManager(QObject *parent) :
ConfigObject(parent),
_pluginPath("") {
Init();
}
PluginManager::~PluginManager() {
}
/... |
# Adapted from:
# https://realpython.com/testing-third-party-apis-with-mock-servers/
import unittest
from unittest.mock import patch
from http.server import HTTPServer, SimpleHTTPRequestHandler
from http import HTTPStatus
import socket
from threading import Thread
import os
import sys
from typing import ClassVar, List
... |
// RunE executes cluster list command
func (c *ClusterListCommand) RunE() error {
if c.Format != TableOutputFormat && c.Format != "name" {
return phaseerrors.ErrInvalidOutputFormat{RequestedFormat: c.Format}
}
cfg, err := c.Factory()
if err != nil {
return err
}
helper, err := NewHelper(cfg)
if err != nil {
... |
News
Azure Data Lake Service for Big Data Analyses Now Available
Microsoft this week released Azure Data Lake as a generally available (GA), production-ready service, backed by Microsoft's 99.9 percent service-level agreement.
Azure Data Lake is a service for "Big Data" massively parallel types of analyses, with the... |
Asking pupils as young as six to work on pre-test drills until midnight obviously perverts the purpose of education, and even amounts to child abuse. However, the Education Bureau has no intention of binning the much-criticised Territory-wide System Assessment (TSA) at Primary 3, for students aged 9-10. Parents, teache... |
São Paulo in five words
“Efferverscent chaos of mashed cultures.”
The sound of the city
São Paulo is known as the land of drizzle. Whether harmless showers or heavy storms, it rains quite a bit here. Sometimes it is a problem and some neighbourhoods flood; sometimes it is a blessing because our water system is archa... |
<reponame>MrHen/incremental-time-loop
import { GeneratorTypes, getGeneratorValue, IGeneratorsState } from "../models/generators";
export const getRecalculatedRates = ({
[GeneratorTypes.Basic]: basic,
[GeneratorTypes.AlphaOne]: alphaOne,
}: IGeneratorsState) => {
let energyPerSecond = 0;
energyPerSecond += ... |
package hex.tree.xgboost.matrix;
/**
* Sparse Matrix representation for XGBoost
*
* CSR:
* long[] rowHeaders = new long[] {0, 2, 4, 7}; // offsets
* float[] data = new float[] {1f,2f, 4f,3f, 3f,1f,2f}; // non-zeros across each row
* int[] colIndex = new int[] {0, 2, ... |
On Feb. 26, jihadist social media sites reported that Abu al Khayr al Masri, one of al Qaeda’s top leaders, had been killed in a US drone strike in Idlib, Syria.
Images of Masri’s car were first posted online by Pieter Van Ostaeyen, a PhD candidate who closely tracks the fighting in Iraq and Syria. One of the pictures... |
// Copyright (C) 2019 Orange
//
// This software is distributed under the terms and conditions of the 'Apache License 2.0'
// license which can be found in the file 'License.txt' in this package distribution
// or at 'http://www.apache.org/licenses/LICENSE-2.0'.
package v1
import (
"context"
"errors"
"fmt"
grp... |
/**
* Thrown if a version code is provided which is not recognized or supported
*/
@SuppressWarnings("WeakerAccess")
class UnsupportedBkdfVersionException extends IllegalStateException {
private final int unsupportedByte;
/**
* Create new instance
*
* @param uns... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package sesion2;
import java.util.Scanner;
/**
*
* @author josef
*/
public class CalificacionMensajes {
/**
* @param arg... |
18th May 2008, 09:01 pm
The post Beautiful differentiation showed how easily and beautifully one can construct an infinite tower of derivative values in Haskell programs, while computing plain old values. The trick (from Jerzy Karczmarczuk) was to overload numeric operators to operate on the following (co)recursive ty... |
def tokenize(text):
text = text.lower()
text = re.sub('[^a-zA-Z0-9]', ' ', text)
text = word_tokenize(text)
stop_words = set(stopwords.words('english'))
text = [word for word in text if word not in stop_words]
lemmatizer = WordNetLemmatizer()
text = [lemmatizer.lemmatize(word=word) for word ... |
/**
* Write out any pending data, including padding if necessary.
*
* @throws IOException if an I/O error occurs
*/
public final void complete() throws IOException {
if (!completed) {
if (rest > 0) {
encode(in, 0, rest);
}
flushBuffer();
... |
/* Copyright 2014-2016 Freescale Semiconductor Inc.
* Copyright 2016 NXP
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list ... |
<gh_stars>1-10
# -*- coding: utf-8 -*-
# @time: 2019-05-13 17:34
# @Author : zpy
# @Email : <EMAIL>
# @file: brower.py
import requests
from logging import getLogger
from utils import BrowerInfo
import time
from twisted.internet.error import (
TimeoutError, TCPTimedOutError)
log = getLogger('fakebrower')
def g... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
* 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.
*/
/**
* @file common/Serialization-inl.h
*
* Implementation details, only to be included from Serial... |
import "dotenv/config";
import mongoose from "mongoose";
// collections
interface CollectionType {
account: string;
collections: [string];
}
const collectionSchema = new mongoose.Schema<CollectionType>({
account: String,
collections: [String],
});
const Collection = mongoose.model<CollectionType>(
"Collectio... |
import vertica_sdk
class add2ints(vertica_sdk.ScalarFunction):
"""Return the sum of two integer columns"""
def __init__(self):
pass
def setup(self, server_interface, col_types):
pass
def processBlock(self, server_interface, arg_reader, res_writer):
# Writes a string to the UDx ... |
If you can’t believe it’s been 20 years since the Mad Caddies’ inception, well, neither can they. “I look in the mirror some days, and I think, ‘Wow, I look like I’m 36 years old,’” laughed Caddies frontman Chuck Robertson. “But I still feel 19 sometimes.” Since meeting in the halls of Santa Ynez High School in the mid... |
def _jitter_learn_timeout(self):
return int(max(abs(
self.learn_timeout -
(self.learn_jitter / 2) + random.randint(0, self.learn_jitter)),
self.cache_update_guard_time)) |
"""Helpers for the parameter fitting of Jazzy."""
# optimisation/helpers.py
import _pickle as cpickle
import bz2
import os
import config
import optuna
from optuna.samplers import TPESampler
def load_data_configuration(study_filename):
"""Abstraction for input and output loading and configuration setting.
Th... |
def save(self):
for obs in (self.observationMonths[obsm].save() for obsm in self.observationMonths): pass
if self.forecastReport:
self.forecastReport.save() |
// The addition of OffsetStart and OffsetEnd changes the default
// behaviour of Marquee. Passing start==width ann end==0 mimics the
// old default.
func TestMarqueeOldBehavior(t *testing.T) {
m := Marquee{
Width: 6,
OffsetStart: 6,
OffsetEnd: 0,
Child: Row{
Children: []Widget{
Box{Width: 3, Hei... |
// Test that Parse parses a simple valid mapping correctly.
func TestParse(t *testing.T) {
var wantedErr error = nil
wantedMapping := Mapping{
Matcher: matcher.MatcherWithLogicalOperator{
matcher.MatcherWithoutLogicalOperator{matcher.Data1, matcher.EqualToOperator, 44},
matcher.LogicalAndOperator,
matcher.... |
Thank you for supporting the journalism that our community needs!
For unlimited access to the best local, national, and international news and much more, try an All Access Digital subscription:
We hope you have enjoyed your trial! To continue reading, we recommend our Read Now Pay Later membership. Simply add a form ... |
Introducing The D.Y.E. A three man hip hop group from Melbourne’s north, hell bent on getting their music to the people. Made up of DJ Marshall, MHz and Slam Master D, The D.Y.E already have two mix-tapes to their name. The debut EP entitled Sorry For The Stickers, references the infamous D.Y.E stickers, which any loca... |
<reponame>sheldarr/heating-boiler-controller-panel<filename>hooks/useMeasurements/index.ts
import axios from 'axios';
import useSWR from 'swr';
import { WebSocketEvents } from '../../events';
import useSocket from '../useSocket';
import { Measurement } from '../../database';
const fetcher = (url: string) =>
axios.g... |
<gh_stars>1-10
// automatically converted from C# to C++ by convert_cs_to_cpp.sh ver. 1.1
#ifndef _Configurator_h_
#define _Configurator_h_
#include "../Localisation/NumberToWords/INumberToWordsConverter.h" // INumberToWordsConverter
#include "../Configuration/NumberToWordsConverterRegistry.h" // NumberToWord... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.