content stringlengths 10 4.9M |
|---|
Even before you start on a journey through the history of literature, you know some of the stops you'll make on the way: the Epic of Gilgamesh, the Bible, Homer's Iliad and Odyssey, Greek tragedy, Shakespeare, Joyce. And so it comes as no surprise that Jacke Wilson, creator and host of the History of Literature podcast... |
<reponame>ez-deploy/ezdeploy
// Code generated by go-swagger; DO NOT EDIT.
package pod
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/ez-deploy/ezdeploy/models"
)... |
// UpdateBytes updates an existing []byte Value with a value.
// No action is applied to the map where the key does not exist.
// The caller must ensure the []byte passed in is not modified after the call is made, sharing the data
// across multiple attributes is forbidden.
func (m Map) UpdateBytes(k string, v []byte) ... |
package seedu.booking.logic.commands;
import static java.util.Objects.requireNonNull;
import static seedu.booking.logic.parser.CliSyntax.PREFIX_BOOKING_END;
import static seedu.booking.logic.parser.CliSyntax.PREFIX_BOOKING_START;
import static seedu.booking.logic.parser.CliSyntax.PREFIX_DESCRIPTION;
import static seed... |
package com.dianrong.common.uniauth.cas.model;
import java.io.Serializable;
/**
* 定义一个标准的http response返回model的格式.
*
* @author wanglin
*/
public class HttpResponseModel<T extends Serializable> implements Serializable {
private static final long serialVersionUID = 788863139426941179L;
private boolean success;... |
<reponame>bboczar/py<filename>explorer/config.py
class Configuration:
logging = {
'overall_level': 10, # defines lowest log level, 10: DEBUG, 20: INFO, 30: WARNING, 40: ERROR, 50: CRITICAL
'file_level': 10,
'console_level': 10,
}
configuration = Configuration()
|
// Get a database instance.
func Get() *mgo.Database {
session, err := mgo.Dial(os.Getenv("MONGODB_URI"))
if err != nil {
panic(err)
}
return session.DB(os.Getenv("MONGODB_DATABASE"))
} |
Bernie Sanders is positive that Donald Trump will not be the next president of the United States.
During an interview for The Hollywood Reporter published Wednesday, the Vermont senator assured Spike Lee that the Republican front-runner wouldn’t make it anywhere near the White House. (RELATED: Spike Lee Narrates New A... |
This guest post comes to us courtesy of Mike C. You can read his previous guest post here.
The idea for this blog post came to me, as many of my best ideas do, while I was thinking about sex in church. Now please don’t get all huffy. I am aware of the impracticalities: limited privacy, no comfortable places to lie dow... |
//*********************************************
// Sound IDecoder
// Copyright (c) Rylogic Ltd 2007
//*********************************************
// Notes:
// - DirectSound8 is deprecated, prefer XAudio2
#pragma once
#include <fstream>
#include <filesystem>
#include "pr/common/cast.h"
#include "pr/audi... |
// ----------------------------------------------------------------------------
// Test that reading, writing, then reading a video produces generally the
// same result as the first time we read it.
TEST_F ( ffmpeg_video_output, round_trip )
{
auto const src_path = data_dir + "/" + short_video_name;
auto const tmp... |
N = int(input())
S = [input() for _ in range(N)]
first_B, last_A, both = 0, 0, 0
ans = 0
for s in S:
ans += s.count('AB')
if s[0] == 'B' and s[-1] == 'A': both += 1
elif s[0] == 'B': first_B += 1
elif s[-1] == 'A': last_A += 1
if both <= 1:
if last_A <= first_B: last_A += both
else: first_B += b... |
// MIT © 2017 azu
import { UseCaseLike } from "../UseCaseLike";
import { StoreLike } from "../StoreLike";
import { StoreGroupLike } from "../UILayer/StoreGroupLike";
import { AlminPerfMarkerAbstract, DebugId, MarkType } from "./AlminAbstractPerfMarker";
import { Transaction } from "../DispatcherPayloadMeta";
import { E... |
#!/usr/bin/env python
# Copyright (c) 2012 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.
"""
Usage:
sha1check.py <hashfile
where hashfile was generated by "sha1sum.py" (or the "sha1sum" utility)
and has the forma... |
"""
Created on Sep 10, 2019
@author: <NAME>, <NAME>
Integrated into ASPIRE by <NAME> Feb 2021.
"""
import logging
import os
from collections import OrderedDict
import mrcfile
import numpy as np
from numpy import linalg as npla
from pandas import DataFrame
from scipy.optimize import linprog
from scipy.signal.windows ... |
Psychometric Properties of the Pediatric Patient‐Reported Outcomes Measurement Information System Item Banks in a Dutch Clinical Sample of Children With Juvenile Idiopathic Arthritis
Objective To assess the psychometric properties of 8 pediatric Patient‐Reported Outcomes Measurement Information System (PROMIS) item ba... |
import { RundownTimingContext } from '../../../../lib/rundown/rundownTiming'
import { WithTiming, withTiming } from './withTiming'
interface IProps {
filter?: (timingDurations: RundownTimingContext) => any
children?: (timingDurations: RundownTimingContext) => JSX.Element | null
}
export const RundownTimingConsumer ... |
/**
* Close the AudioInputStream objects as necessary.
* @throws IOException
*/
private void close() throws IOException {
if (isEncoded)
decodedStream.close();
if (encodedStream != null) {
encodedStream.close();
encodedStream = null;
}
decodedStream = null;
} |
package com.etolmach.spring.jcommander;
/**
* @author etolmach
*/
public interface JCommandWrapper {
/**
* Get name
*
* @return Command name
*/
String getName();
/**
* Get parameter bean
*
* @return Parameter bean
*/
Object getParameterBean();
}
|
/**
* Defines the known packet types for the core Artemis protocol.
* @author rjwut
*/
public final class CorePacketType {
public static final String COMMS_MESSAGE = "commsMessage";
public static final String COMM_TEXT = "commText";
public static final String CONNECTED = "connected";
public static final String O... |
<gh_stars>1-10
use std::sync::Arc;
use std::time::{Duration, SystemTime};
use bytesize;
use shiplift::{rep::Image, ImageListOptions};
use termion::event::Key;
use tui::{
layout::Rect,
style::{Color, Modifier, Style},
widgets::{Block, Borders, Row, Table, Widget},
Frame,
};
use crate::app::AppCommand;... |
extern crate neon;
use neon::prelude::*;
use std::collections::HashMap;
pub struct StaticAssetMap {
static_assets: HashMap<String, &'static str>,
}
impl StaticAssetMap {
fn new() -> StaticAssetMap {
let mut result = StaticAssetMap {
static_assets: HashMap::new(),
};
result... |
<reponame>anhkiet1227/OOP-UIT
#include <bits/stdc++.h>
using namespace std;
class ThanhPhan
{
protected:
string text;
int mauText;
int mauNen;
public:
ThanhPhan();
virtual ~ThanhPhan();
virtual void nhap();
virtual int getMauNen();
virtual int getMauText();
};
Than... |
/**
* Saves node probabilities to an output file.
* @param outputFile Output file name (with path).
*/
public void saveNodeProbabilities(String outputFile) {
Set<Integer> nodes = new HashSet<Integer>();
for (Node node: this.rna.getRoadNetwork().getNodeIDtoNode())
if (node != null)
nodes.add(node.getID... |
/**
* This is a generic ClassLoader of which many examples abound.
* We do some tricks with resolution from a hashtable of names and bytecodes,
* and InputStreams as well.</p>
* If you want to find a class and throw an exception if its not in the available cache, used findClass.<br/>
* If you want to load a class by al... |
package org.refactoringminer.astDiff.actions;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import com.github.gumtreediff.actions.Diff;
import com.github.gumtreediff.actions.model.Action;
import com.github.gumtreediff.tree.Tree;
/**
* @author Pourya Alikhani Fard p... |
<filename>java/org/apache/tomcat/dbcp/dbcp2/DriverManagerConnectionFactory.java
package org.apache.tomcat.dbcp.dbcp2;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Properties;
/**
* A {@link DriverManager}-based implementation of {@link ConnectionFactory}... |
from cursoaulahu.github import buscar_avatar
print(buscar_avatar('viollarr'))
|
import { FieldType, FormlyFieldConfig } from '@ngx-formly/core';
export const RateMockFields = [
{
type: 'group',
className: "d-block mb-3 col-6",
templateOptions: {
},
fieldGroup: [
{
type: 'code-card',
className: "d-block mb-3 col-12",
templateOptions: {
... |
Advances in coastal wetland remote sensing
To plan for wetland protection and sensible coastal development, scientists and managers need to monitor the changes in coastal wetlands as the sea level continues to rise and the coastal population keeps expanding. Advances in remote sensor design and data analysis technique... |
/**
* The main test code used to send requests and retrieve messages from the service via a WebSocket
*
* @param wsMsgSource A source containing the number of webSocketMessages and the type of messages to send
* @param takeN the expected number of messages to receive
* @return a Completab... |
<reponame>yangwenbang/car
package com.car.modules.car.service;
import com.baomidou.mybatisplus.service.IService;
import com.car.common.utils.PageUtils;
import com.car.modules.car.entity.ExerciseTypeEntity;
import java.util.List;
import java.util.Map;
/**
*
*
* @author lzp
* @email <EMAIL>
* @date 2019-02-11 14... |
def icon(self) -> str:
if self.cls in terminals:
for process in reversed(list(self.process().children())):
name = process.name()
if name in icons:
return icons[name]
return icons.get(self.cls, default_icon) |
// Start runs the registry server
func (s *Server) Start() error {
if s.listener != nil {
return nil
}
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
uri := r.RequestURI
s.Debugf("[registry/server] %s", uri)
if uri == "/health" {
fmt.Fprintln(w, "OK")
return
}
if uri == "/v2/" ... |
def network_choices(self) -> Iterator[str]:
for ecosystem_name, ecosystem in self.ecosystems.items():
yield ecosystem_name
for network_name, network in ecosystem.networks.items():
if ecosystem_name == self.default_ecosystem.name:
yield f":{network_name... |
import sys
# =============================================================================
#
# Copyright (c) Kitware, Inc.
# All rights reserved.
# See LICENSE.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
... |
class PrepareHostSession: # pylint: disable=too-many-instance-attributes
"""
Session open and close operation
"""
def __init__(self):
self.auth_id = 0
self.connection_type = apis.kSSS_ConnectionType_Plain
self._enc_key = None
self._mac_key = None
self._dek_key =... |
/*
* When allocating pud or pmd pointers, we allocate a complete page
* of PAGE_SIZE rather than PUD_TABLE_SIZE or PMD_TABLE_SIZE. This
* is to ensure that the page obtained from the memblock allocator
* can be completely used as page table page and can be freed
* correctly when the page table entries are removed.... |
#271 The Wicked and The Unexpected
Whilst I am always delighted to be presented with a simple, classic page layout and a nice page of neatly ordered panels and gutters. I am never happier than when looking at a comic that plays with the space of the page in order to better tells its stories. I love trying to work out ... |
/**
*
*/
package com.lambton.surveyapp.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframew... |
/**
* Returns a new {@link HazelcastMQInstance} using the given configuration. If
* the configuration is null, a default configuration will be used.
*
* @param config
* the configuration for the instance
* @return the new HazelcastMQ instance
*/
public static HazelcastMQInstance newHazelc... |
/*
* vmw_otables_setup - Set up guest backed memory object tables
*
* @dev_priv: Pointer to a device private structure
*
* Takes care of the device guest backed surface
* initialization, by setting up the guest backed memory object tables.
* Returns 0 on success and various error codes on failure. A succes... |
/**
* Created by gaurig on 4/2/17.
*/
public class PersonAdapter extends RecyclerView.Adapter<PersonAdapter.ViewHolder> {
Context context;
ArrayList<PersonModel> personModels = new ArrayList<>();
@Override
public PersonAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
Pe... |
package main
//
//import "C"
//import (
// "fmt"
// "math/rand"
// "testing"
// "time"
//)
//
//
//var sl = NewSKipListIterator(DEFAULT_MAX_LEVEL)
//
//func init() {
//
// t1 := time.Now()
// for i := 0; i < 10000000; i++ {
// //sl.Add(C.test(), i)
// // fmt.Println(sl.level)
// }
// fmt.Println(time.Since(t1))
//}
/... |
// SetOraclePubkeySet sets oracle's pubkey set
func (b *Builder) SetOraclePubkeySet(
pubset *oracle.PubkeySet, idxs []int) error {
Rs := []*btcec.PublicKey{}
for _, idx := range idxs {
Rs = append(Rs, pubset.CommittedRpoints[idx])
}
err := b.Contract.PrepareOracleCommitments(pubset.Pubkey, Rs)
if err != nil {
... |
package org.aksw.jena_sparql_api.lookup;
import java.util.Collection;
import java.util.function.Function;
import java.util.stream.Stream;
/**
* Take a stream of input items and transform it to a stream of output items
*
* @author raven
*
* @param <I>
* @param <O>
*/
public interface ItemService<I, O>
exten... |
/**
* A component for fetching artists from Spotify.
*
* @author Dawid Samolyk
*
*/
@Component
@Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)
public class SpotifyArtistWebApi extends AbstractSpotifyWebApi {
@Autowired
private SpotifyArtistConverter artistConverter;
@Autowired
private SpotifyTrackWebApi tra... |
# -*- encoding: utf-8 -*-
from flexible_reports.models.behaviors import Labelled, Titled
VAL = "foo"
def test_labelled():
x = Labelled()
x.label = VAL
assert str(x) == VAL
def test_titled():
x = Titled()
x.title = VAL
assert str(x) == VAL
|
For the third time in three years, the dark ambient label Cryo Chamber presents a collaboration paying tribute to an entity from the writings of H.P. Lovecraft. As before, this is a true collaboration, with the work of each artist seamlessly woven into a single, unbroken track that spans 190 minutes across three CDs. U... |
<reponame>sytabaresa/IMO-Maritime-Single-Window
export class ShipFlagCodeModel {
shipFlagCodeId: number;
name: string;
description: string;
country: any;
countryId: number;
}
|
<filename>edn/go-edn-basic-types-4/main.go<gh_stars>10-100
package main
import (
"fmt"
"olympos.io/encoding/edn"
)
func main() {
var a interface{} = nil
var b map[string]string = nil
c := "foo bar baz"
aEDN, err := edn.Marshal(a)
fmt.Println(string(aEDN))
fmt.Println(err)
fmt.Println()
bEDN, err := edn.M... |
//sendToPeer sends consensus data to specified peer
func (cbi *ConsensusChainedBftImpl) sendToPeer(consensusData []byte, index uint64) {
peer := cbi.smr.getPeerByIndex(index)
if peer == nil {
cbi.logger.Errorf("get peer with index %v failed", cbi.selfIndexInEpoch, index)
return
}
msg := &net.NetMsg{
To: ... |
<reponame>tjguk/networkzero<gh_stars>10-100
from . import graphical, motor, text |
def add_player(self, state: object) -> object:
raise RuntimeError("Cannot add new players to an existing game.") |
/** @file chert_alldocsmodifiedpostlist.cc
* @brief A ChertAllDocsPostList plus pending modifications.
*/
/* Copyright (C) 2008 Lemur Consulting Ltd
* Copyright (C) 2006,2007,2008,2009,2010 <NAME>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Publ... |
import { state } from 'decorator/state'
import { bridge } from 'native/bridge'
import { native } from 'native/native'
import { Event } from 'event/Event'
import { TapGestureDetector } from 'gesture/TapGestureDetector'
import { View } from 'view/View'
import { Window } from 'view/Window'
import './TextInput.style'
@bri... |
<filename>file/zstd.go<gh_stars>10-100
package file
import (
"github.com/valyala/gozstd"
"io"
)
const (
DefaultZstdCompressionLevel = gozstd.DefaultCompressionLevel
)
type ZstdWrite struct {
w *gozstd.Writer
}
func (z *ZstdWrite) NewWriter(w io.Writer) (err error) {
z.w = gozstd.NewWriterLevel(w, DefaultZstdCo... |
During the long years of racial apartheid it was a no-go zone off Africa’s southern tip, run so secretively that photographs of its most famous prisoner could never emerge.
Now Robben Island, a UN World Heritage site, is the latest and one of the most unusual additions to Google’s Street View. Users can follow in Nels... |
/**
* The LineBasedGazetteerResource uses an input stream from any URL to retrieve the ID, name values
* used to populate its Gazetteer. The ID, name fields can be {@link
* LineBasedGazetteerResource#PARAM_SEPARATOR separated} by anything that can be recognized by a
* regular expression (using <code>String.spit(reg... |
/**
* Returns a filtered copy of the given permissions, only including the tags specified.
*/
public static Permissions filterPermissionsByTags(Permissions perms, Iterable<Tag> tags) {
Permissions filtered = new Permissions();
for (Tag tag: tags) {
String tagStr = tag.getValue();
... |
<reponame>barsgroup/objectpack
# coding: utf-8
"""
Виртуальная модель и proxy-обертка для работы с группой моделей
"""
from __future__ import absolute_import
from collections import Iterable
from functools import reduce
from itertools import islice
import copy
from six.moves import filter
from six.moves import filter... |
def letrec(tree, args, *, gen_sym, **kw):
with dyn.let(gen_sym=gen_sym):
return _destructure_and_apply_let(tree, args, _letrec) |
<reponame>raviqqe/djtile<filename>src/store/channel.ts
export default class {
public interval: number = 1; // in seconds
private audio?: AudioBuffer;
private source?: AudioBufferSourceNode;
public playOneShot = () => {
this.prepareSource().start();
}
public toggle = () => {
if ... |
from heapq import heappop,heappush
N = int(input())
G = [[] for _ in range(N)]
for _ in range(N - 1):
a,b,c = map(int, input().split())
G[a-1].append({"to":b-1, "cost":c})
G[b-1].append({"to":a-1, "cost":c})
Q,K = map(int, input().split())
K -= 1
dist = [float("inf")] * N
dist[K] = 0
que = [(0, K)]
while ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 8 10:59:00 2021
@author: philippbst
"""
from pinn.general_pinn import GeneralPINN
import torch
from torch.autograd import grad
from pinn.utils_pinn import check_gradientTracking
class NavierLame2DPINN(GeneralPINN):
def evalu... |
package costhistory
import (
"math"
"testing"
"time"
)
const T0 = 1577836800
var expectPerSecond = []float64{
0.00000000000000000000,
0.50196078431372548323,
0.75294117647058822484,
0.87843137254901959565,
0.94117647058823528106,
0.97254901960784312376,
0.98823529411764710062,
0.99607843137254903354,
1.0... |
import { Component, AfterViewInit, Input, Output, EventEmitter, ElementRef } from '@angular/core';
import { AppService } from '../../services/services';
import { Page, Exercise, Lesson, Asset } from '../../models/models';
@Component({
selector: 'wat-modals',
templateUrl: 'index.html'
})
export class Modals imple... |
def analyse_cache_dir(self, jobhandler=None, batchsize=1, **kwargs):
if jobhandler is None:
jobhandler = SequentialJobHandler()
files = glob.glob(os.path.join(self.cache_dir, '*.phy'))
records = []
outfiles = []
dna = self.collection[0].is_dna()
for infile in... |
#!/usr/bin/env stack
-- stack --install-ghc ghci --resolver lts-16 --package free --package functor-combinators --package vinyl
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TemplateHaskell #-}
import Control.Monad.... |
Response Predictors in Chronic Migraine: Medication Overuse and Depressive Symptoms Negatively Impact Onabotulinumtoxin-A Treatment
Background: Despite numerous studies that have investigated clinical, radiological, and biochemical response predictors, the clinical profile of those patients who might benefit from Onab... |
from math import ceil, sqrt
t1 = int(input())
for z in range(t1):
x = int(input())
low = ceil(x**(1/3))
high = int(round((4*x)**(1/3)))
check = False
for m in range(low,high+1):
if(x%m==0):
lala = (m**2-x//m)
if(lala%3==0 and lala>0):
t = sq... |
Resilience in Competitive Athletes With Spinal Cord Injury
Individuals who experience loss of their physical abilities often face the challenges of adapting to a new way of life. Past research has shown that sport participation can assist the physical and psychological adaptation to acquired physical disabilities. The... |
/**
* The root coordinator for the bottom toolbar. It has two subcomponents. The browing mode bottom
* toolbar and the tab switcher mode bottom toolbar.
*/
public class BottomToolbarCoordinator {
/** The browsing mode bottom toolbar component */
private final BrowsingModeBottomToolbarCoordinator mBrowsingMod... |
<gh_stars>1-10
import Link from "next/link";
interface Props {
href?: string;
msg?: string;
}
export function BackLink({ href, msg }: Props) {
return (
<div style={{ margin: "15px 0", fontWeight: "bold" }}>
<Link href={href ? href : "/"}>
<a>← {msg ? msg : "Back to home"}</a>
</Link>
... |
/**
* Writes a new element with the given value and no attribute.
* If the given value is null, then this method does nothing.
*
* @param localName local name of the tag to write.
* @param value text to write inside the element.
* @throws XMLStreamException if the underlying STAX w... |
/*
** Determine the current size of a file in bytes
*/
int
unixFileSize(sqlite3_file* id, i64* pSize)
{
unixFile* p = (unixFile*)id;
#if TKEYVFS_TRACE
fprintf(stderr, "Begin unixFileSize ...\n");
if (((unixFile*)id)->zPath) {
fprintf(stderr, "filename: %s\n", ((unixFile*)id)->zPath);
}
#en... |
time = 2
list = [list(map(int,input().split())) for i in range(time)] #list[0]にnとxが,list[1]にL1~Lnが入る
n, x = [i for i in list[0]]
y = [0]
n = 1
for i in range(len(list[1])):
y.append(y[i] + list[1][i])
if (y[i+1] > x):
break
n += 1
print(n) |
// RegisterRequest is used to drop a message in the queue
func RegisterRequest(request *http.Request, event *github.PullRequestEvent) {
pre := &PullRequestEvent{
Request: request,
Event: event,
}
queuemutex.Lock()
queue = append(queue, pre)
queuemutex.Unlock()
} |
#include <iostream>
int main()
{
/*
Array - Collection of data
Array's best friend is loops
2 Properties - Index, size
numbers is the name of the array
size is 10
it can store up to 20 integers only
*/
// This is a declaration of an array, you must give it a size no matter what
int number[10]
in... |
# -*- coding: utf-8 -*-
# Header ...
import os, logging
class Logger(object):
def __init__(self, logger=None, name="log", log_dir=None):
self.logger = None
self.name = name
self.log_dir = log_dir
self.config_logger(logger)
def config_logger(self, logger):
if ... |
/**
* Try to start the build agent and block until it is up and running.
*
* @return
* @throws InterruptedException
* @param host
* @param port
* @param bindPath
*/
public static void startServer(String host, int port, String bindPath, Optional<Path> logFolder) {
try {
... |
<gh_stars>10-100
from django.contrib import admin
from .models import (Calendar, Course, Exam_timetable, Grades, Holiday,
Curriculum_Instructor, Meeting, Student, Student_attendance, Curriculum,
Timetable)
class CurriculumAdmin(admin.ModelAdmin):
model = Curriculum... |
package com.apachat.swipereveallayout.core.interfaces;
import com.apachat.swipereveallayout.core.SwipeLayout;
public interface Swipe {
void onClosed(SwipeLayout view);
void onOpened(SwipeLayout view);
void onSlide(SwipeLayout view, float slideOffset);
} |
PORTLAND Ore. (Reuters) - Record drought on the U.S. West Coast has exposed the ruins of an Oregon hamlet once submerged under the waters of a man-made reservoir, allowing a rare opportunity for an archaeological excavation, a U.S. Bureau of Reclamation official said on Thursday.
The tiny community of Klamath Junction... |
<filename>SmartHouseServer/src/cn/onlysoft/smarthouseweb/server/model/Packet.java<gh_stars>0
package cn.onlysoft.smarthouseweb.server.model;
public class Packet {
private String workFlowId;
private int type;
private String gateId;
private String content;
public String getWorkFlowId() {
return workFlowId;
}... |
So I love trying different snacks from other countries so this exchange seems right up my alley and it definitely delivered!
I got some pretty interesting things called OMG's which have graham crackers which ive never tried, I actually opened this first and they were surprisingly good! Quite morish too and I was origi... |
<reponame>beru/libonnx
#include <onnx.h>
struct operator_pdata_t {
struct onnx_graph_t * else_branch;
struct onnx_graph_t * then_branch;
};
static int If_init(struct onnx_node_t * n)
{
struct operator_pdata_t * pdat;
if((n->ninput == 1) && (n->noutput >= 1))
{
pdat = malloc(sizeof(struct operator_pdata_t));
... |
<filename>src/redux/reducers.tsx
// External
import { combineReducers } from 'redux';
// Types
import {
ADD_NOTES,
SET_USERNAME,
SET_ONLINE,
SET_GAME_TAB_HIGHLIGHT,
UPDATE_CHAT_HIGHLIGHT,
SET_MESSAGE_DELAY,
UPDATE_STYLE,
SET_MISSION_HIGHLIGHT,
// eslint-disable-next-line no-unused-va... |
//
// Created by jcfei on 18-9-9.
//
#include "pinv.h"
#include "cpd.h"
namespace TensorLet_decomposition{
template<class datatype>
cp_format<datatype> cp_als(Tensor3D<datatype> &a, int r, int max_iter = 500, double tolerance = 1e-6) {
if( r == 0 ){
printf("CP decomposition rank cannot ... |
class Memory:
'''
To do: in theory, a lock could be deleted in between when its existence is checked
and when it is acquired. At some point this needs to be fixed.
'''
#if necessary for efficiency, these keys should be numbers or enum constants.
STATES = "__world states"
STATE = "__current state"
GOAL_GRAPH... |
/**
* Maps Jira Issue response object to TimeEvent object
*
* @param issue
* @return
*/
private TimeEvent issueAsTimeEvent(Issue issue) {
String previewUrl = String.format(host + BROWSE_ISSUE_URI_FORMAT, issue.getKey());
String projectName = issue.getFields().getProject().getNam... |
// This function is mine
// It was added for the reason that i wanted somehow external commands to be executed outside the source code when a branching condition was met
func exe_cmd(cmd string, wg *sync.WaitGroup) {
fmt.Println(cmd)
out, err := exec.Command("sh", "-c", cmd).Output()
if err != nil {
... |
// ValidateMessaging validates messaging provider and credentials used for
// the user registration.
func (cfg *UserRegistryConfig) ValidateMessaging() error {
if cfg.messaging == nil {
return errors.ErrUserRegistryConfigMessagingNil.WithArgs(cfg.Name)
}
if found := cfg.messaging.FindProvider(cfg.EmailProvider); !... |
/** Respond to the mouse click depicted by EVENT. */
public void doClick(MouseEvent event) {
int x = event.getX() - SEPARATOR_SIZE,
y = event.getY() - SEPARATOR_SIZE;
int r = y / SQUARE_SEP + 1;
int c = x / SQUARE_SEP + 1;
_commandOut.printf("%d %d%n", r, c);
} |
Performance evaluation of wireless data traffic in mm wave massive MIMO communication
Received Feb 1, 2020 Revised May 21, 2020 Accepted Jun 1, 2020 Due to the evaluation of mobile devices and applications in the current decade, a new direction for wireless networks has emerged. The general consensus about the future ... |
<gh_stars>1-10
import codecs
import os
from Crypto.Util.number import long_to_bytes
def asm(code):
code = code.replace("end", "")
payload = """(module
(func $dupa (result i32)
%s
)
(export "dupa" (func $dupa)))
""" % code
with codecs.open("code.wat", "w") as out_file:
out_file.write(payload... |
import {Component, ElementRef, Input, OnDestroy, OnInit, ViewChild} from '@angular/core';
import {Dimension, IRenderable} from '../../../../model/IRenderable';
import {GridMedia} from '../GridMedia';
import {SearchTypes} from '../../../../../../common/entities/AutoCompleteItem';
import {RouterLink} from '@angular/route... |
SNHG3 Functions as miRNA Sponge to Promote Breast Cancer Cells Growth Through the Metabolic Reprogramming
Cancer-associated fibroblasts (CAFs) are important ingredient in tumor microenvironment. The dynamic interplay between CAFs and cancer cells plays essential roles during tumor development and progression. However,... |
Clustering-Based Interpretation of Deep ReLU Network
Amongst others, the adoption of Rectified Linear Units (ReLUs) is regarded as one of the ingredients of the success of deep learning. ReLU activation has been shown to mitigate the vanishing gradient issue, to encourage sparsity in the learned parameters, and to all... |
# https://codeforces.com/problemset/problem/546/A
"""
Wants to buy w bananas. The ith banana cost ik
He has n dollars, how much does he need to borrow to buy w bananas
"""
k, n, w = map(int, input().split())
# w bananas cost k*w*(w+1)/2. If that's more than he has then he needs to borrow.
# Otherwise he do... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.