content stringlengths 10 4.9M |
|---|
/**
* Created by filipgulan on 08/04/2017.
*/
public class Task3 {
private static final String INTERMEDIATE_PATH = "intermediate";
private static final String INPUT_PATH = "/user/rovkp/trip_data.csv";
private static final String OUTPUT_PATH = "/user/rovkp/jr/joined_result";
public static void main(S... |
#include "config.hpp"
config::config() {
opt_group{custom_options_, "global"}
.add(port, "port,p", "set port")
.add(host, "host,H", "set host (ignored in server mode)");
add_message_type<actor::msg::foo>("foo");
add_message_type<actor::msg::foo_r>("foo_r");
} |
Down with austerity!
By Dick Nichols
April 12, 2013 – Links International Journal of Socialist Renewal -- At the third national congress of the Left Party (Parti de Gauche) held in Bordeaux from March 22 to 24, France’s newest and fastest-growing socialist group seemed to come of age.
Only four years old, the Left P... |
/**
* The LocationTabPanel is a tab panel for location information.
*/
public class LocationTabPanel extends TabPanel implements ActionListener {
/** default serial id. */
private static final long serialVersionUID = 12L;
/** default logger. */
private static Logger logger = Logger.getLogger(LocationTabPanel.cl... |
<filename>packages/service-model/src/TreeModel/normalizeModel.spec.ts
import { normalizeModel } from "./normalizeModel";
import { minimalValidServiceMetadata } from "../ApiModel/serviceMetadata.fixture";
import { OperationMap, ShapeMap } from "@aws-sdk/build-types";
describe("normalizeModel", () => {
describe("stand... |
//! Computation of rays
use crate::lalg::{Point3, Vec3};
/// Ray structure that stores an origin a direction
#[derive(Debug, Clone, Default)]
pub struct Ray {
pub origin: Point3,
pub dir: Vec3,
}
impl Ray {
/// Default shorthand constructor
pub fn new(origin: Point3, dir: Vec3) -> Self {
Ray ... |
package com.yuqinyidev.android.azaz.main.mvp.model;
import com.yuqinyidev.android.azaz.R;
import com.yuqinyidev.android.azaz.kanbook.mvp.ui.activity.KBMainActivity;
import com.yuqinyidev.android.azaz.main.mvp.contract.MainMenuContract;
import com.yuqinyidev.android.azaz.main.mvp.model.entity.AppItem;
import com.yuqiny... |
namespace pxsim.visuals {
const MAX_RATE = 40;
export class RotationSliderControl extends ControlView<GyroSensorNode> {
private group: SVGGElement;
private slider: SVGGElement;
private rateText: SVGTextElement;
private static SLIDER_WIDTH = 70;
//private static SLIDER... |
<reponame>genome21/google-kubernetes-engine-plugin
/*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
*... |
def list_zones(schedule_id):
from mist.api.poller.models import ListZonesPollingSchedule
sched = ListZonesPollingSchedule.objects.get(id=schedule_id)
sched.cloud.ctl.dns.list_zones(persist=False) |
Why? Because they all offer something different, something eclectic or beautiful or strange that will keep you dreaming long beyond their wonderful cheeseburgers. We turned to the voice of Tennessee – yep, that’s you guys – and found a list of places that many of you couldn’t dream about leaving this earth without tryi... |
Why this day ?
Because, Astronomy is the most beautiful discipline that the mankind has ever touched and ancient Indians were remarkably efficient in pursuing it.
Remember the fun-fact that you learnt in school - Sun rises in the east ?
As we will find out, it is not true.
Sun rises somewhat in North-East in Summer... |
// GetContentQuads invokes the DOM method. Returns quads that describe node
// position on the page. This method might return multiple quads for inline
// nodes.
func (d *domainClient) GetContentQuads(ctx context.Context, args *GetContentQuadsArgs) (reply *GetContentQuadsReply, err error) {
reply = new(GetContentQuads... |
<reponame>dioris-moreno/opensips-mi-client
/**
* @jest-environment node
*/
// To avoid cross origin axios error: https://github.com/axios/axios/issues/1754
import dotenv from 'dotenv';
dotenv.config(); // SET UP ENVIROMENTAL VARIABLES BEFORE IMPORTING MODULES.
import Debug from 'debug';
const debug = Debug('opensips... |
import argparse
from pathlib import Path
from aiohttp_admin.layout_utils import generate_config
def build_parser():
ap = argparse.ArgumentParser()
subparsers = ap.add_subparsers(help='commands', dest="cmd_name")
gen_parser = subparsers.add_parser(
'ng', help='Generate basic js code for admin vie... |
Ceftazidime for Neutropenic Fevers: Is It Still an Appropriate Choice?
Infection continues to rank as a primary cause of treatment-related mortality in patients with cancer. For patients with neutropenic fevers, immediate empiric treatment with antibiotics is standard care. However, which specific antibiotic is best f... |
# -*- coding: utf-8 -*-
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
__author__ = 'christoph.statz <at> tu-dresden.de'
from maui.field import ScalarField
from maui.field import View
class ADE(object):
def __init__(self, host, fields, bounds, init... |
The interaction between apolipoprotein E and Alzheimer's amyloid beta-peptide is dependent on beta-peptide conformation.
An important feature of Alzheimer's disease (AD) is the cerebral deposition of amyloid. The main component of the amyloid is a 39-44-amino acid residue protein called amyloid beta (A beta), which al... |
// MemoryAccessor geared towards a particular process. Created by the process if no override is
// provided at construction time. See DebuggedProcessCreateInfo above for more information.
class DebuggedProcessMemoryAccessor : public ProcessMemoryAccessor {
public:
explicit DebuggedProcessMemoryAccessor(DebuggedProce... |
def train(self, x_train, y_train, x_validation, y_validation, batch_size=256, epochs=25):
self.model.fit(x_train, y_train,
batch_size=batch_size,
epochs=epochs,
verbose=1,
validation_data=(x_validation, y_validation))
return self.model.evaluate(x_validation, y_val... |
/**
* Tests usage of affinity in case when cache doesn't exist.
*/
public class GridAffinityNoCacheSelfTest extends GridCommonAbstractTest {
/** */
public static final String EXPECTED_MSG = "Failed to find cache";
/** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
... |
//sub_000073B8
/*
* Once a module is in the process of being loaded, its UID name
* is updated in order to make identifying the module easier.
* Recall that creating a module only sets a temporary UID name,
* as we didn't know the module's name or is purpose back then.
*/
static void updateUIDName(SceModule ... |
/**************************************************************************
* Copyright (c) 2017-2019 by the mfmg authors *
* All rights reserved. *
* *
* This file is ... |
<gh_stars>1-10
import { message } from 'antd';
import React, { useState } from 'react';
import GoogleLogin from 'react-google-login';
import { AiFillApple, AiFillFacebook, AiOutlineLoading } from 'react-icons/ai';
import { FcGoogle } from 'react-icons/fc';
import { SiGoogleplay } from 'react-icons/si';
import { client... |
<filename>tools/purify/test_runner.py
#!/bin/env python
# Copyright (c) 2006-2008 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.
# test_runner
import optparse
import os
import re
import subprocess
import sys
import goog... |
#!/usr/bin/python
#
# 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
# "Lice... |
/**
* SyncJavaScriptBridge instance will be used by WebView to allow javascript in WebView can
* make callbacks to signal that JavaScript is finished loading.
* <p/>
* For example, if a test has a long async javascript snippet that needed to be loaded before
* the test proceed like below.
... |
<gh_stars>0
#include "vhdl_verilog_parsers/hdl_parser_vhdl.h"
#include "netlist_test_utils.h"
#include <experimental/filesystem>
namespace hal {
class HDLParserVHDLTest : public ::testing::Test {
protected:
GateLibrary* m_gl;
virtual void SetUp() {
NO_COUT_BLOCK;
tes... |
#include <MindlessEngine/random.hpp>
#include <random>
namespace MindlessEngine
{
bool randomBool()
{
return rand() % 2 == 0;
}
int randomInt(int min, int max)
{
return rand() % (max - min) + min;
}
float randomFloat(float min, float max)
{
return static_cast<float>(rand()) / static_ca... |
//
// Created by sam on 2018/11/15.
//
#ifndef DONGMENDB_SCAN_H
#define DONGMENDB_SCAN_H
#include <string>
#include <dongmendb/DongmenDB.h>
#include <dongmensql/expression.h>
using namespace std;
/*扫描接口*/
class Scan {
public:
DongmenDB *m_db;
Transaction *m_tx;
virtual int beforeFirst()=0;
virtual... |
<reponame>Simplici7y/Android-Prince-of-Versions
package co.infinum.princeofversions;
/**
* This class handles requirement checking while JSON parsing
*/
public interface RequirementChecker {
/**
* This method is used to check if passed data requires specified requirements
*
* @param value Value o... |
// NOTE: Format controlled by GitHub
/* eslint-disable @typescript-eslint/naming-convention, max-len */
export interface GithubIssue {
created_at: string;
number: string | number;
state: string;
title: string;
comments: string;
url: string;
id: number;
user: Record<string, any>;
assignee: Record<stri... |
/**
* Created by lizy on 16-4-28.
*/
public class HttpGlideUrlLoader implements ModelLoader<GlideUrl, InputStream> {
private final ModelCache<GlideUrl, GlideUrl> modelCache;
public HttpGlideUrlLoader() {
this(null);
}
public HttpGlideUrlLoader(ModelCache<GlideUrl, GlideUrl> modelCache) {
... |
def ordinal(self, y):
Base.data_n()
plt.figure(figsize=(8,4))
sns.violinplot(x=Base.target, y=y, data=Base.train_n)
plt.xlabel(Base.target, fontsize=12)
plt.ylabel(y, fontsize=12)
plt.show(); |
/**
Remove tagset from mesh
\return H5_SUCCESS or error code
*/
static inline h5_err_t
H5FedRemoveMTagset (
h5t_mesh_t* m,
const char name[]
) {
H5_API_ENTER (h5_err_t, "m=%p, name='%s'", m, name);
H5_API_RETURN (h5t_remove_mtagset (m, name));
} |
/*
Copyright 2019 <NAME>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distribu... |
t = map(int, raw_input().split())
m = 0
for i in range(5):
# delete doubles
for j in range(i+1, 5):
if t[i] == t[j]: m = max(m, 2 * t[i])
for i in range(5):
# delete doubles
for j in range(i+1, 5):
for k in range(j+1, 5):
if t[i] == t[j] and t[j] == t[k]: m = max(m, 3 * t[i])
print sum(t) - m, |
/**
* Class with methods for UNIFI devices
*
* @author Ciro Baron Neto
*
*/
public class DeviceFunctions extends Connection {
/**
* Get all UNIFI devices
* @return
* @throws NoAccessPointModelFoundException
* @throws JSONException
*/
public List<UnifiAccessPoint> getAllDevices() throws JSONExcept... |
/**
*
* @return La date courant sous la forme d'une instance de <code>GregorianCalendar</code>
*/
public static GregorianCalendar nowCalendar()
{
Calendar c = Calendar.getInstance();
GregorianCalendar now = new GregorianCalendar(
c.get(Calendar.YEAR), c.get(Calendar.M... |
#include<bits/stdc++.h>
using namespace std;
#define zhalok Zhalok
#define inf (1<<26)
#define ll long long int
#define ull unsigned long long
#define loop(i,a,b) for(ll i=a;i<b;i++)
#define negloop(i,a,b) for(ll i=a;i>=b;i--)
#define vi vector<int>
#define vll vector<ll>
#define vull vector<ull>
#define p... |
/**
* Copyright © 2018 spring-data-dynamodb (https://github.com/derjust/spring-data-dynamodb)
*
* 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/LIC... |
/**
* Non editable presentation of attributes, using {@link ExposedAttributesComponent} for the visualization
* but exposing the same API as {@link ExposedSelectableAttributesComponent}, so is its drop in replacement.
*/
public class ROExposedAttributesComponent extends CustomComponent implements SelectableAttribute... |
.
We developed two leukemic cell lines (K562 HHT and L1210 HHT) stably 16.7 fold and 13.4 fold resistant to HHT respectively with which the culture were treated. Both cell lines were also cross-resistant to DOX, VCR, DNR and Mel. Increased expression of MDR1 gene in the both lines was noted. To further evaluate the im... |
/**
* Peek an {@link OverlayPanel} and trigger the observer event.
* @param overlayPanel The panel to peek.
* @param reason The reason the panel was peeked.
*/
private void peekPanel(OverlayPanel overlayPanel, @StateChangeReason int reason) {
overlayPanel.peekPanel(reason);
Thread.du... |
def svc(self, model):
svc_sp = {}
if model == "linear":
svc = LinearSVC(dual=False, class_weight='balanced')
else:
svc = SVC(cache_size=1000, class_weight='balanced')
svc_sp['kernel'] = ['linear', 'poly', 'rbf']
svc_sp['degree'] = [2, 3, 4]
svc_sp['gamma'] = ["auto", ... |
// Implementation of the methods inherited from ContextDataInjector.
final class ContextDataUtils {
private ContextDataUtils() {}
// The implementation of this method is based on the example in the Javadocs for
// ContextDataInjector.injectContextData.
static StringMap injectContextData(@Nullable List<Property... |
package br.com.svvs.jdbc.redis;
public enum RedisReply {
ERROR,
SINGLE_LINE,
BULK_DATA,
MULTI_BULK_DATA,
INTEGER;
public static RedisReply value(char t) {
switch(t) {
case '-':
return RedisReply.ERROR;
case '+':
return RedisReply.SINGLE_LINE;
case '$':
return RedisReply.BULK_DATA;
case '*':... |
<filename>components/admin-front/src/views/Users/index.tsx
import React, {useCallback, useContext, useEffect, useState} from 'react'
import { UserAttributes, UserRole } from 'libs/domain-model'
import {
Button,
Container,
Grid,
Icon,
IconButton,
MenuItem,
Select,
Table,
TableBody,
TableCell,
Table... |
Differential Expression of microRNAs in Medulloblastoma and the Potential Functional Consequences.
AIM
To identify differentially expressed microRNAs in medulloblastoma, and to investigate their biological function.
MATERIAL AND METHODS
Differentially expressed microRNAs were identified using gene chips, and signifi... |
NYT Tells Readers Republicans Backed Trade Deals Believing Corporate Beneficiaries Would Shower Them with Campaign Contributions
Okay, that's not quite what the article said. Instead it told readers:
"Republicans have long championed free trade, believing that by allowing markets to operate unhindered, nations can bo... |
When Courtney Walsh arrived in Bangladesh last month to begin his job as the national team’s bowling coach he said his aim was to find the new Curtly Ambrose.
The ambition has probably dropped a notch or two since then as the enormity of his task has hit home in a country where no fast bowler has taken more than 51 Te... |
# Export attributes for PMEP estuaries.
from io import BytesIO
import os
import json
from pathlib import Path
from PIL import Image
import requests
import pandas as pd
import geopandas as gp
from constants import (
get_state,
spp_fields,
nfhp_codes,
region_codes,
type_codes,
thumbnail_size,
... |
/**
* Writes a PhoneBill object to a file in a pretty, human readable layout
* @param phoneBill the PhoneBill to be pretty printed
* @throws IOException when passed an illegal argument
*/
@Override
public void dump(PhoneBill phoneBill) throws IOException {
try {
Collection<PhoneCall> list =... |
<filename>src/app.module.ts
/** ~/src/app.module.ts
* Nest Samples
*
* <NAME>
* <EMAIL>
*
* A module is a class annotated with a @Module() decorator. The @Module()
* decorator provides metadata that Nest makes use of to organize the
* application structure.
*
* Each application has at least one module, a root... |
<filename>src/characteristics.rs
// Copyright 2017 <NAME> <<EMAIL>> <<EMAIL>>
use std::error::Error;
use std::fmt;
use std::rc::Rc;
use std::str::FromStr;
use pw_gix::gtk::{self, prelude::ComboBoxExtManual, ComboBoxTextExt};
use regex::*;
#[derive(Debug)]
pub struct CharacteristicError {
msg: String,
}
impl Ch... |
/**
* A graph that makes use of an {@link AdjacencyStructure} to manage
* relationships between vertices and edges. The graph itself manages the actual
* instances of {@link Vertex}.
*
* @author Matthias Fussenegger
* @param <T> type of the identifier.
* @param <V> type of the weight.
*/
public abstract... |
def _read_cell_direct(cls):
cell_data = {}
cell_columns = cls._get_columns(CELL_MANIFEST)
cell_psvs = cls._get_component_psvs(CELL_MANIFEST)
for cell_psv in cell_psvs:
for row in gzip.GzipFile(fileobj=io.BytesIO(cls._read_s3_url(cell_psv))):
row_dict = dict(zi... |
/**
* A basic implementation of {@link SupportSQLiteQuery} which receives a query and its args and
* binds args based on the passed in Object type.
*/
public final class SimpleSQLiteQuery implements SupportSQLiteQuery {
private final String mQuery;
@Nullable
private final Object[] mBindArgs;
/**
... |
<filename>contracts/deploy/01-foreign-chain.ts
import { parseEther } from "ethers/lib/utils";
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";
import getContractAddress from "../deploy-helpers/getContractAddress";
const FOREIGN_CHAIN_IDS = [1, 4, 31337... |
use dev_utils::impl_short_msg_kat;
#[rustfmt::skip]
const SHORT_MSG_KAT: [(&str, &str); 255] = [
(
// Len = 0
"",
"e0820c066f522138d5cb3a5773dea16db434afa95e1c48e060de466928bb7044391b3ee77e2bbff6c0cf1e07a8295100"
),
(
// Len = 8
"67",
"6e6092c06c327ceaee746154ed1118c5b2e5779f2594abfcd54c91d0bb1eb57c0606... |
Cleveland Browns receiver Josh Gordon is not eligible to play in the Canadian Football League while he is under a season-long NFL suspension, the CFL and an NFL source say.
Sources told ESPN's Chris Mortensen earlier Thursday that Gordon would explore the possibility of playing in the CFL for the remainder of its seas... |
/**
* Erases the element pointed to by the iterator. If the
* node has children, then the node will not be erased from
* the tree. It will be replaced with the default node
* value.
*
* @param position Iterator pointing to the node to be erased
*/
void er... |
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"log"
"net/http"
"os"
"time"
"github.com/iavian/quic-send/client"
"github.com/iavian/quic-send/common"
"github.com/lucas-clemente/quic-go"
"github.com/lucas-clemente/quic-go/http3"
)
func main() {
if len(os.Args) > 1 {
start := time.Now()
c := cl... |
// AddServer returns an Option which makes client connection and set server url
func AddServer(target string) Options {
return newFuncOption(func(o *options) {
re := regexp.MustCompile(`%(25)?`)
if len(target) > 0 && target[0] == ':' {
target = "127.0.0.1" + target
}
if !strings.Contains(target, "://") {
... |
/**
* @brief Auxiliary function to access audio class context data
*
* @param[in] p_audio Audio class instance data
* @return Audio class context data @ref app_usbd_audio_ctx_t
*/
static inline app_usbd_audio_ctx_t * audio_ctx_get(app_usbd_audio_t const * p_audio)
{
ASSERT(p_audio != NULL);
ASSERT(... |
import React, {ReactNode, SFC} from 'react'
interface Props {
children: ReactNode
}
const CEOBottom: SFC<Props> = ({children}) => (
<div className="ceo--editor">{children}</div>
)
export default CEOBottom
|
// ListDBs lists all db's
func (session *AranGoSession) ListDBs() ([]string, error) {
var databaseWrapper struct {
Databases []string `json:"result,omitempty"`
}
err := session.arangoCon.Query(&databaseWrapper, http.MethodGet, urlDatabase, nil)
return databaseWrapper.Databases, err
} |
<filename>vendas/urls.py
from django.urls import path
from vendas import views
urlpatterns = [
path('', views.ListaVendasView.as_view(), name='lista-vendas'),
path('novo-pedido/', views.NovoPedidoView.as_view(), name='novo-pedido'),
path('edit-pedido/<int:venda>', views.EditPedidoView.as_view(), name='ed... |
/* Process the All Sounds Off event */
void Player::all_sounds_off(int c)
{
int i, uv = upper_voices;
for(i = 0; i < uv; i++)
if (voice[i].channel==c &&
(voice[i].status & ~(VOICE_FREE | VOICE_DIE)))
{
kill_note(i);
}
for(i = 0; i < 128; i++)
vidq_head[c * 128 + i] = vidq_tail[c * 128 + i]... |
#include<cstdio>
#include<cstring>
#include<cstdlib>
int t1[10000001][2],t2[10000001][2],tot1,tot2,ans,an[200001][40],ann[200001],n,t[40],x,len,tn;
char s[30];
bool bo,Bo;
void dfs(int x,int y)
{
if (x&&((!t1[x][0]&&!t1[x][1])||(!t2[y][0]&&!t2[y][1]))) {printf("-1\n"); exit(0);}
if (t1[x][0]&&t2[y][0]) d... |
import collections
def solve(n, a, b, c, d):
smallestPossibleW = a-b
highestPossibleW = a+b
if n * smallestPossibleW > c+d or n * highestPossibleW < c-d:
return "No"
return "Yes"
t = int(input().strip())
# [n,m] = list(map(int, input().strip().split()))
for i in range(t)... |
/* this adds a one-byte-opcode ModRM instruction to a thunk, that
addresses the stacked host flags of a particular size: */
static tme_uint8_t *
_tme_recode_x86_flags_host_flags(const struct tme_recode_flags_group *flags_group,
tme_uint8_t *thunk_bytes,
tme_uint32_t larger_sizes,
tme_uint8_t rex,
... |
Tunable nanoporous silicon oxide templates by swift heavy ion tracks technology
Nanoporous silicon oxide templates formed by swift heavy ion tracks technology have been investigated. The influence of the heavy ion characteristics, such as type of ion, energy, stopping power and irradiation fluence on the pore properti... |
/**
* @author will
*
* @param <T>
*/
public class TickerPublisherStreamingTask<T> extends PublisherStreamingTask<T> implements ITask, ILogger, Runnable {
/**
* @param id
* @param exchange
* @param currencyPairs
* @param context
* @param streamingExchange
*/
public TickerPublisherStreamingTask(final S... |
With SNL’s 39th season coming to a close, we’re taking a look at the past season with a series of posts examining the highs, lows, and other memorable moments from the past eight months. Here, we look at the performers that make up SNL’s current cast, including their overall contributions to the show, memorable roles, ... |
<gh_stars>1-10
module Network.AGI.ServerTypes where
import Network.AGI.Types
import Control.Concurrent.STM
import Control.Monad.Trans
import Control.Monad.Trans.Reader
import Control.Monad.Trans.Resource
type ServerApp cMsg sMsg = ServerAppIf cMsg sMsg -> ResourceT IO ()
data ServerAppIf cMsg sMsg
= ServerAppIf... |
// InterfaceNil if the concrete value inside an interface is nil, the method will be called with a nil receiver
func InterfaceNil(){
var i Interf
var t *MyType
i = t
fmt.Printf("(%v, %T)\n", i, i)
i.handleNil()
i = &MyType{"Not nil anymore"}
fmt.Printf("(%v, %T)\n", i, i)
i.handleNil()
} |
Image: Kool Cats Photography/Flickr
The so-called dark web is often mistakenly believed to be just an unsanctioned space of the internet that hosts dingy, illegal websites. But in reality, it's home to websites such as Facebook, and countless whistleblower platforms hosted on the privacy-protecting and anonymizing Tor... |
def stop_all_providers(self):
for provider_name in self.providers:
provider_info = self.providers[provider_name]
if provider_info['status'] == self.RUNNING:
provider_info['instance'].shutdown() |
<gh_stars>1-10
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <unordered_map>
#include <array>
#include <SDL.h>
#include <imgui.h>
#include <glm/glm.hpp>
#include <glm/ext.hpp>
#include "glt/gl_core_4_5.h"
#include "glt/debug.h"
#include "glt/buffer_allocator.h"
#include "glt/util.... |
<filename>Chapter29/16.1.py
import numpy as np
import pandas as pd
from sklearn.neighbors import KNeighborsClassifier
knn = KNeighborsClassifier(n_neighbors=5)
data = pd.read_csv('dataset.csv')
x = np.array(data[['Time', 'Temp']])
y = np.array(data[['State']]).ravel()
knn.fit(x,y)
time = raw_input("Enter time")
tem... |
'''input
1 1
1
'''
from __future__ import print_function
n, k = map(int, raw_input().split())
v = map(int, raw_input().split())
ks = [0] * (n * k)
for x in v:
ks[x - 1] += 1
for x in v:
y = 1
print(x, end=" ")
for z in xrange(0, n * k):
if y == n:
break
if k... |
/* It does some fix-up to provide some programmer friendly feature while
keeping the libopcodes happy, i.e. libopcodes only accepts
the preferred architectural syntax.
Return FALSE if there is any failure; otherwise return TRUE. */
static bfd_boolean
programmer_friendly_fixup (aarch64_instruction *instr)
{
... |
Determinants of community participation in a watershed development program in Southern Ethiopia
ABSTRACT Community participation is critically important for the effectiveness of a development project. Different factors influence community participation, and these factors are not the same across all communities. This s... |
<gh_stars>1-10
import cv2
import numpy as np
from .gray_scale import grayScale as gray
def monoChrome(img, fromCV2 = True, threshold = 127, invert = False):
if fromCV2:
try:
channel = img.shape[2]
except:
channel = 1
if channel == 3:
grayImg = gray(img,f... |
import { BigNumber } from 'bignumber.js';
import * as Web3 from 'web3';
import { Aqueduct } from '../generated/aqueduct';
import { LimitOrder } from '../limit-order';
// Initialize the Aqueduct client
Aqueduct.Initialize();
(async () => {
const order = await new LimitOrder({
// an unlocked account configured in... |
/**
*
* @author Lyncode Development Team <dspace@lyncode.com>
*/
public class URLUtils
{
private static Logger log = LogManager.getLogger(URLUtils.class);
public static String encode (String value) {
try
{
return URLEncoder.encode(value, "UTF-8");
}
c... |
import { decodeULEB128, encodeULEB128 } from '../leb128';
import { BaseSection } from './base';
import { CodeFunction, IInstructionReplacer } from './codeFunction';
import { IType } from './type';
export class CodeSection extends BaseSection {
private functions: CodeFunction[] = [];
private types: IType[] = null;... |
package statemachine
import (
"context"
"fmt"
"github.com/morikuni/steps"
)
// State is an identifier of a state.
// Its implementation must be comparable by == operator.
type State interface {
StateID() string
}
type StringState string
func (s StringState) StateID() string {
return string(s)
}
type StateMac... |
/**
* Creates the JSON File needed by the iOS app
*
* @param map
* : A Pair containing the list of all available containers and
* the list of all available container edges in the system
* @return a string representing the JSON file
*/
public static String createJSONFile(
Pair<Lis... |
/*
* Prints the champion on the 10 rounds
*
* int wins[3]: Represents the scores
*/
void printChampion( int wins[3]){
printf("\nChampion: ");
if( wins[0] > wins[1]){
printf("COMPUTER");
}
else if( wins[1] > wins[0]){
printf("YOU");
}
else printf("NO ONE");
} |
#include<bits/stdc++.h>
using namespace std;
struct masivs{long long in;long long out;long long poz;};
masivs mas[100005];
long long i,j,k,n,m,a,b,c;
vector<pair<pair<long long,long long>,long long> > ab;
int main()
{
std::cin.sync_with_stdio(false);
std::cin.tie(0);
cin >> n >> m;
i=0;
... |
package proxy
import (
"bufio"
"net"
"os"
"os/signal"
"syscall"
"time"
"github.com/nats-io/nats.go"
log "github.com/sirupsen/logrus"
)
type Options struct {
ServerAddr string
MetricsAddr string
NatsPublishAsync bool
NatsURL string
MaxInFlight int
}
// New NATS Steaming proxy
fu... |
def lattice_to_strings_and_weights(lattice, input_token_type="byte", output_token_type="byte"):
lattice = _check_nonempty_and_cleanup(lattice)
sorted_arpa = sorted(lattice.paths(output_token_type=output_token_type), key=lambda path: float(path[2]))
return [tuple(y.split()) for (x,y,z) in sorted_arpa] |
D ec 2 00 8 Invariant Measures on Stationary Bratteli Diagrams
We study dynamical systems acting on the path space of a stationary (non-simple) Bratteli diagram. For such systems we explicitly describe all ergodic probability measures invariant with respect to the tail equivalence relation (or the Vershik map). These ... |
/**
* Empty the specified node of all its child nodes.
* <p>
* @author $Author: sanderst $
* @version $Revision: 1.3 $
*/
public class Empty extends AbstractFunc
implements Cloneable
{
private Any any_;
public Empty(Any any)
{
any_ = any;
}
public Any exec(Any a) throws AnyException
{
... |
Copyright by WIVB - All rights reserved
BUFFALO, N.Y. (WIVB) - Lisa Magin, a former VA Medical Supply Technician tried to do the right thing for the veterans at the Buffalo VA Medical Center, but it cost her a good government job, her medical benefits, and her 4-year ordeal with the VA has been a strain on her family.... |
Many have agreed with the rationale that Lin, based on the sampling of his work, just was not worth it. Then again, did Dolan banish Lin — who was about 20 minutes from being a former N.B.A. player while vegetating on the end of the Knicks’ bench early last season — from New York on the grounds of his being an ingrate ... |
/**
* Daemon class, managed by procrun/jsvc.
* See: http://commons.apache.org/proper/commons-daemon/
*/
public class HiveDaemon implements Daemon {
@Override
public void init(DaemonContext context) throws DaemonInitException, Exception {
if (instance != null)
throw new IllegalStateException("Hive already ini... |
/**
* DOCUMENT (MW) - insert description
*
* @author MW
* 25.02.2013, 14:02:37
* @param <clsWordPresentationMesh>
*
*/
public class clsActionSpeech<clsWordPresentationMesh> extends clsActionCommand {
private eInternalActionIntensity moAbstractSpeech;
private clsWordPresentationMesh moWording;
private Stri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.