content stringlengths 10 4.9M |
|---|
from .tsn import tsn_to_str_list, tsn_to_tuple
from .ts import is_dummy
def get_nth_symbol(n, first=97):
#48 (0), 65(A), 97(a)
#first = 945 #alpha
return chr(first+n)
def get_lowercase_symbols(n, except_char=None):
symbols = [chr(97+i) for i in range(26)]
if except_char: symbols.remove(except_char... |
// mksysnum_openbsd.pl
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
// +build amd64,openbsd
package unix
const (
SYS_EXIT = 1 // { void sys_exit(int rval); }
SYS_FORK = 2 // { int sys_fork(void); }
SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }... |
/**
* Created by danhdroid on 3/18/15.
*/
public class FileListFragment extends Fragment
implements FileActivity.OnBackPressedListener {
@InjectView(R.id.pager_tab_strip) PagerSlidingTabStrip pagerTabStrip;
@InjectView(R.id.pager) ViewPager viewPager;
@Override
public View onCreateView(Layou... |
Combination treatment with rt-PA is more effective than rt-PA alone in an in vitro human clot model.
Incidence of intra-cranial hemorrhage linked to treatment of ischemic stroke with recombinant tissue plasminogen activator (rt-PA) has led to interest in adjuvant therapies such as ultrasound (US) or plasminogen, to en... |
/**
* ComboBox renderer Display a specified text when the ComboBox is disabled
*/
private class Renderer implements ListCellRenderer<Account> {
private final ListCellRenderer<? super Account> delegate;
Renderer(final ListCellRenderer<? super Account> delegate) {
this.delegate = d... |
<gh_stars>0
#pragma once
#include "arrow.h"
std::ostream& operator<<(std::ostream& os, const Arrow& arrow); |
Molecular mechanism of Raf kinase inhibitory protein regulation by cAMP‐dependent protein kinase (802.25)
Raf Kinase Inhibitory Protein (RKIP), a 21 kDa protein and member of phosphatidylethanolamine binding protein (PEBP) family, regulates GPCR, MAPK, and NFκB pathways and is a metastasis suppressor. Although, kinase... |
/**
* Encryption related methods
*/
public class EncryptionUtil {
private static String Tag = "EncryptionUtil";
/**
* Random private key
*
* @return
*/
public static String randomPriKey() {
return AllNativeMethod.cdCreateNewPrivKey();
}
/**
* Random public key
... |
#include "DataFormats/METReco/interface/PUSubMETData.h"
namespace reco {
PUSubMETCandInfo::PUSubMETCandInfo() {
p4_.SetXYZT(0., 0., 0., 0.);
dZ_ = 0.;
type_ = PUSubMETCandInfo::kUndefined;
charge_ = 0;
isWithinJet_ = false;
passesLooseJetId_ = 0.;
offsetEnCorr_ = 0.;
mva_ = 0.;
c... |
def heal_install(ctx, graph, failing_node_instances, targeted_node_instances):
node_instance_sub_workflows = {}
for node_instance in targeted_node_instances:
node_instance_stub = task.StubTask()
node_instance_sub_workflows[node_instance.id] = node_instance_stub
graph.add_tasks(node_insta... |
import asyncio
from bleak import discover
async def run():
devices = await discover()
for d in devices:
print(d)
loop = asyncio.get_event_loop()
loop.run_until_complete(run())
"""
import asyncio
from bleak import BleakClient
address = "02ECCB4C-BA71-4726-8F0D-411F5CFA5246"
MODEL_NBR_UUID = "00002a2... |
<reponame>eazyfin/graphql-engine
from time import sleep, perf_counter
import requests
import pytest
from context import PytestConf
if not PytestConf.config.getoption("--test-jwk-url"):
pytest.skip("--test-jwk-url flag is missing, skipping tests", allow_module_level=True)
# assumes the JWK server is running on 127... |
def _encrypt_string_message(self, message):
message = message.encode('utf-8')
iv, cipher, padder = self.get_cipher()
encryptor = cipher.encryptor()
padded_data = padder.update(message) + padder.finalize()
data = iv + encryptor.update(padded_data) + encryptor.finalize()
re... |
pkgname = "libtool"
pkgver = "2.4.6"
pkgrel = 0
build_style = "gnu_configure"
make_cmd = "gmake"
hostmakedepends = [
"gmake", "gm4", "perl", "automake", "help2man", "xz", "texinfo"
]
depends = ["gm4", "cmd:tar", "cmd:sed"]
depends_providers = {
"cmd:tar": "bsdtar",
"cmd:sed": "bsdsed",
}
pkgdesc = "Generic ... |
Media playback is unsupported on your device Media caption BBC South East bought a forged first class ticket from Hastings to Manchester
Forged rail tickets are being sold on a hidden part of the internet and being used at stations without detection, an undercover BBC investigation has found.
They can be bought for a... |
/**
* Computes (half) the normalized cut between a graph and one of its subgraphs.
*
* @param supergraph A graph
* @param subgraph A subgraph of supergraph
* @return Normalized cut between the graph and its subgraph / 2
*/
@Override
public double compute(Graph supergraph, Graph subgraph) {
if ... |
/* returns a VIRTUAL cursor at a character based offset */
inline int textseq_cursor_charat(struct textseq *seq, unsigned offset) {
assert(seq!=NULL);
return offset;
} |
<filename>tensorflow/compiler/mlir/lite/tf_tfl_translate_cl.h
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
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.or... |
/*******************************************************************************
* @fn SensorTagFactoryReset_storeCurrentImage
*
* @brief Save the current image to external flash as a factory image
*
* @return none
*/
bool SensorTagFactoryReset_storeCurrentImage(void)
{
bool success;
success = ExtFlas... |
def step(self, agent_action, oracle):
self.last_action = self.next_action
oracle, replan_output = self.replan(oracle, agent_action)
self.next_action, self.next_subgoal = replan_output
self.last_step_error = False
self.steps_since_lastfeedback += 1
return oracle |
/**
* Instantiate a pathway element.
* The required parameter objectType ensures only objects with a valid type
* can be created.
*
* @param ot
* Type of object, one of the ObjectType.* fields
*/
public static PathwayElement createPathwayElement(ObjectType ot) {
PathwayElement e;
switch (ot... |
def TD_lambda(self, epsilon=0.1, gamma=0.9, alpha=0.05, lamb=0.9, max_steps=1000):
self.agent.E = np.zeros(self.agent.value_function.shape)
state = (0, 0)
self.env.state = state
states = []
actions = []
rewards = []
count_steps = 0
episode_end = False
... |
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n,k,a,b;
cin>>n>>k>>a>>b;
long long mini = 1e18+7;
long long maxi = 0;
for(int m=1;m<=n;m++)
{
long long f = m*k-(b-a);
if(f>0)
{
mini = min(mini,(n*k/__gcd(n*k,f)));
... |
/*
* This header is generated by classdump-dyld 1.5
* on Wednesday, April 28, 2021 at 9:14:23 PM Mountain Standard Time
* Operating System: Version 14.5 (Build 18L204)
* Image Source: /System/Library/PrivateFrameworks/VideosUICo... |
<gh_stars>0
import * as React from 'react';
import { shallow, ShallowWrapper } from 'enzyme';
import Ripple from './Ripple';
import * as Enzyme from 'enzyme';
import * as EnzymeAdapter from 'enzyme-adapter-react-16';
Enzyme.configure({adapter:new EnzymeAdapter()})
let control:ShallowWrapper<undefined, undefined>;
b... |
def max_subarray(nums):
# kadane algorithm
max_so_far = max_ending = 0
begin = start = end = 0
for i in range(len(nums)):
max_ending += nums[i]
if max_ending < 0:
max_ending = 0
begin = i + 1
if max_so_far < max_ending:
max_so_far =... |
/**
* Structure: MM_CopyForwardSchemePointer
*
* A generated implementation of a VM structure
*
* This class contains generated code and MAY contain hand written user code.
*
* Hand written user code must be contained at the top of
* the class file, specifically above
* the comment line containing WARNING!!! G... |
<filename>gym/102503/D.cpp
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <random>
#include <chrono>
using namespace std;
using namespace __gnu_pbds;
#define endl '\n'
typedef long long ll;
typedef pair<int, int> pii;
//typedef tree<int,null_type,less<... |
import { getConnection } from 'typeorm'
import InputEntity from './entities/input'
import OutputEntity from './entities/output'
import TransactionEntity from './entities/transaction'
import SyncInfoEntity from './entities/sync-info'
// Clean local sqlite storage
export default class ChainCleaner {
public static asyn... |
<gh_stars>10-100
package utils
import (
"github.com/spf13/cast"
"strings"
)
var tenToAny map[int64]string = map[int64]string{0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9",
10: "a", 11: "b", 12: "c", 13: "d", 14: "e", 15: "f", 16: "g", 17: "h", 18: "i", 19: "j",
20: "k", 21: "l", 2... |
import logging
import os
import random
import string
import subprocess
import sys
from argparse import Namespace
from transformers import RobertaTokenizer
logging.getLogger("transformers").setLevel(logging.WARNING)
import click
import torch
from luke.utils.model_utils import ModelArchive
from .utils.experiment_log... |
N = int(input())
A = [[0] * (1+N) for _ in xrange(1+N)]
def solve(l, r, id):
if l == r: return
mid = (l+r) / 2
for i in xrange(l, mid+1):
for j in xrange(mid+1, r+1):
A[i][j] = str(id)
solve(l, mid, id+1)
solve(mid+1, r, id+1)
solve(1, N, 1)
for i in xrange(1, N):
print(' '.... |
/**
* Classification and description of the bus service. This does not identify the individual bus journeys (defined as part of VehicleJourney)
*
* <p>Java class for ServiceStructure complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <... |
<gh_stars>1-10
/******************************************************************************
*
* Copyright (C) 2002 - 2016 Xilinx, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal... |
Help Me Rox #4: Speaking to Dragons
As we roll inexorably towards the waiting maw of DragonCon 2012, Have No Fear. Rox has arrived with another episode of Help Me Rox to give you survival tips on your convention experience. She takes from her bindle of wisdom and bestows the goodness upon you.
Joining her on this que... |
def flash(self, force_reload=False):
interval = (datetime.now()-self.last_update).seconds
flash_reload = interval > app.config['FLASH_RELOAD_INTERVAL']
flash_reload = flash_reload or request.args.get('flash_reload')
if flash_reload or force_reload:
self.get_messages()
... |
/**
* Shell::Shell - Default constructor
*
* This constructor pushes all the shell environment variables
* in @environ into @envMap, and add an extra variable @ECE551PATH,
* whose value is initialized to be the same with @PATH.
*/
Shell::Shell() : currCmd(), currArgc(0), currArgv(), envMap() {
extern char ** e... |
def _verify_df(self):
if self.log_dir is not None:
log_files = set([int(Path(s).stem) for s
in glob.glob(f'{self.log_dir}/*.log')])
idx = set(self.df.index)
def _log_file(id):
return f' {self.log_dir}/{id}.log'
if log_files ... |
By Roger E. A. Farmer
Macroeconomics is a child of the Great Depression. Before the publication of Keynes’ book, The General Theory of Employment, Interest and Money, macroeconomics consisted primarily of monetary theory. Economists were preoccupied with price stability, as we are today, but the idea that government ... |
import { buildUserRepository } from '../../../../modules/user';
import { logger } from '../../../../utils';
export { up, down };
async function up() {
logger.log('Up: ');
const userRepository = buildUserRepository();
const users = await userRepository.findAll();
await Promise.all(
users.map((user) => {
... |
// Package directory provides the GetAnnotator function, which returns an appropriate annotator for
// requests with a particular target date.
// TODO - rename this cache? Or is there a better name?
package directory
// A directory entry points to an appropriate CompositeAnnotator.
// The composite annotators will ha... |
export * from './delete-webhook-query.class';
export * from './add-webhook-query.class';
export * from './get-webhook-query.class';
export * from './list-webhooks-query.class';
|
<gh_stars>1-10
/*
* Copyright 2017-2022 original authors
*
* 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
*
* Unless required by applic... |
<filename>FlexSC-master/src/util/Sender.java
package util;
import org.apache.commons.cli.ParseException;
import flexsc.Flag;
public class Sender<T> extends network.Client implements Runnable {
public void run() {
try {
connect("192.168.1.102", 54321);
System.out.println("connected");
while(true) {
... |
// Child returns a matcher that matches iff the element has a
// child that matches the passed fn.
func Child(fn Match) Match {
return func(e *dom.Element) bool {
for _, c := range e.Children() {
if fn(c) {
return true
}
}
return false
}
} |
<reponame>ptrkvsky/nomad
export * from './EvenementModel';
export * from './TypeEvenementModel';
|
#テストファイルで実行する時
import sys
if sys.platform =='ios':
sys.stdin=open('input_file.txt')
w,h,n = map(int,input().split())
l = [list(map(int,input().split())) for i in range(n)]
minx = 0
maxx = w
miny = 0
maxy = h
for i in range(n):
if l[i][2] == 1:
if minx < l[i][0]:
minx = l[i][0]
elif l[i][2] == 2:
i... |
n = int(input())
stones = input()
numDoubles = 0
lastChar = "_"
for x in stones:
# print("{} == {}: {}".format(lastChar, x, lastChar == x))
if x == lastChar:
numDoubles += 1
lastChar = x
print(numDoubles) |
/**
* Generates an array of doubles with the correct size for {@link Instance}s of schema {@link #schema}.
*
* @param indexToValue The strategy on how to generate each field's value based on the index.
* @return An array of doubles.
*/
private double[] fieldValues(final IntToDoubleFunction inde... |
/**
* This handler will list all files from a directory if the requested path is a directory
*/
public class HttpCommentHandler
implements HttpHandler {
private static final Logger logger = new ConsoleLogger();
private final CommentRepository repo;
public HttpCommentHandler(CommentRepository repo) {
... |
#include <iostream>
#include <thread>
#include <staccato/scheduler.hpp>
using namespace std;
using namespace staccato;
class FibTask: public task<FibTask>
{
public:
FibTask (int n_, long *sum_): n(n_), sum(sum_)
{ }
void execute() {
if (n <= 2) {
*sum = 1;
return;
}
long x;
spawn(new(child()) FibT... |
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package batch
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type ComputeEnvironmentComputeResources struct {
AllocationStrategy ... |
/**
* Instructs the Tappy to read bytes from a MIFARE Classic
*/
public class ReadMifareClassicCommand extends AbstractMifareClassicMessage {
public static final byte COMMAND_CODE = 0x01;
protected byte timeout;
protected byte startBlock;
protected byte endBlock;
protected byte keySetting;
pr... |
Analysis and Enhancement of Simulated Binary Crossover
Most recombination operators are designed with the aim of altering its exploration capabilities depending on the distance between the parents involved in the process. However, relating the exploration capability of crossover operators only to the distance between ... |
/*
* Return the result of multiplying matrices <m1> and <m2>.
*/
Matrix3 m3Product(Matrix3 m1, Matrix3 m2)
{
Matrix3 P;
int row, col;
for (row = 0; row < 3; row++) {
Vector3 r = m3Row(m2, row);
for (col = 0; col < 3; col++) {
P.c[col].r[row] = v3Dot(m1.c[col], r);
}
... |
Design everything you need quickly and effortlessly. Get Over now and use our inspiring templates, tools and effects to make your brand and personal projects shine!
Unlock your creativity. All you need is the app, a phone and your thumb to wow the world.
• Create in an instant: Pick a template or start from scratch. ... |
def broadcast(self, value):
value = self.comm.bcast(None, root=0)
self.bds_store[self.__bds_id] = value |
/* Copyright (c) 2002-2005 <NAME>.
*
* Redistribution and use in source forms, with and without modification,
* are permitted provided that this entire comment appears intact.
*
* Redistribution in binary form may occur without any restrictions.
*
* This software is provided ``AS IS'' without any warranties of a... |
A Boosted Skin Detection Method based on Pixel and Block Information
A robust skin detector is the primary need of many fields in computer vision, including face detection, gesture recognition, and pornography filtering. Almost color is the major feature which has been used in skin detection methods. In this paper, we... |
/* We're starting to process the function INST, an instantiation of PATTERN;
add their parameters to local_specializations. */
static void
register_parameter_specializations (tree pattern, tree inst)
{
tree tmpl_parm = DECL_ARGUMENTS (pattern);
tree spec_parm = DECL_ARGUMENTS (inst);
if (DECL_NONSTATIC_MEMBER... |
/** Static helper class to handle a request to add/update fields. */
public class FieldUpdateHandler {
private static final Logger logger = LoggerFactory.getLogger(FieldUpdateHandler.class);
private FieldUpdateHandler() {}
/**
* Handle a FieldDefRequest.
*
* @param indexStateManager state manager for i... |
<reponame>deepika087/feedsreader<gh_stars>0
package com.example.datamodels;
import java.util.List;
public class FeedData {
public String feedName;
public List<String> artciles;
}
|
Meet Andy Goldfine, Founder of Aerostich and Inspirational Motorcyclist
Minnesota native is responsible for both Aerostich and Ride to Work Day
If you haven’t heard of Aerostich you haven’t been paying attention. The motorcycle gear outfitter has been an integral part of the riding community for decades now, in large... |
<gh_stars>1-10
import React from 'react';
import { mount } from 'enzyme';
import {
Dialog,
DialogTitle,
DialogContent,
DialogActions,
DialogButton,
SimpleDialog,
createDialogQueue,
DialogQueue
} from './';
import { wait, actWait } from '@rmwc/base/utils/test-utils';
import { act } from 'react-dom/test-... |
<filename>samsungtv/remote.py
import base64
import json
import logging
import time
import ssl
import websocket
class SamsungTV():
_URL_FORMAT = 'wss://{host}:{port}/api/v2/channels/samsung.remote.control?name={name}&token={token}'
_KEY_INTERVAL = 1.5
def __init__(self, host, token='', port=8002, name='S... |
import java.util.HashSet;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int H = sc.nextInt();
int W = sc.nextInt();
int M = sc.nextInt();
int[] h = new int[M];
i... |
14 SHARES Share Tweet
To deliver powerful web application using PHP AJAX development framework for developing new generation Web 2.0 applications you can use PHP Frameworks. There are various PHP AJAX Frameworks available for use, few are FREE and some are with commercial licence. You can choose any of them based on y... |
<reponame>Jdorri/rl-medical
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# File: pool3d.py
# Author: <NAME> <<EMAIL>>
# Modified: <NAME> <<EMAIL>>
import tensorflow as tf
import numpy as np
from tensorpack.models.common import layer_register
from tensorpack_medical.utils.argtools import shape3d
from tensorpack.mode... |
LONDON — Ignore the sound and fury, Theresa May’s “fair and serious” offer on EU citizens’ rights gets very close to what Brussels is asking for.
Sure, the EU's chief Brexit negotiator Michel Barnier reacted in the customary manner on Monday afternoon, sending a barbed message on Twitter demanding more “ambition, clar... |
#include "stdafx.h"
#include "motion.h"
#include "envelope.h"
#ifdef _LW_EXPORT
extern "C" LWItemInfo *g_iteminfo;
extern "C" LWChannelInfo *g_chinfo;
extern "C" LWBoneInfo *g_boneinfo;
extern "C" LWEnvelopeFuncs *g_envf;
EChannelType GetChannelType(LWChannelID chan){
const char* chname = g_chinfo->ch... |
package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.OpMode;
import com.qualcomm.robotcore.hardware.HardwareMap;
@Autonomous(name="AutonomousDriveNew")
public class... |
w,h,n = map(int,input().split())
W = ["."] * w
H = ["."] * h
for _ in range(n):
x,y,a = map(int,input().split())
if a==1:
tmp = ["#"]*x + W[x:]
W = tmp
elif a==2:
tmp = W[:x] + ["#"]
W = tmp
elif a==3:
tmp = ["#"]*y + H[y:]
H = tmp
elif a==4:
tmp = H[:y] + ["#"]
H = tmp
... |
from collections import defaultdict
H, W, N = map(int, input().split())
P = [0] * 10
P[0] = (H - 2) * (W - 2)
G = defaultdict(lambda: defaultdict(int))
for i in range(N):
a, b = map(int, input().split())
for i in range(max(a - 3, 0), min(a, H - 2)):
for j in range(max(b - 3, 0), min(b, W - 2)):
p = G[i][j... |
/**
* Updates the simulation status to display a current cycle number.
*
* @author Danylo Khalyeyev
*/
@Ensemble
@PeriodicScheduling(period = 1)
public class StatusCycleUpdate {
@Membership
public static boolean membership(
@In("coord.phase") Coordinator.Phase phase,
@In("coord.stat... |
/**
* If a value is empty, invoke the specified runnable, otherwise do nothing.
*
* @param runnable Block to be executed if a value is empty
*
* @return The {@link Exceptional}, for chaining
*/
@NonNull
public Exceptional<T> absent(@NonNull final Runnable runnable) {
if (null =... |
Features of pseudomonads growing at low temperatures: another facet of their versatility.
Pseudomonads are a diverse and ecologically successful group of γ-proteobacteria present in many environments (terrestrial, freshwater and marine), either free living or associated with plants or animals. Their success is at leas... |
/**
* Test conversion of Geometry object into Object
*/
private void testValueConversion() throws SQLException {
deleteDb("spatial");
Connection conn = getConnection(URL);
Statement stat = conn.createStatement();
stat.execute("CREATE ALIAS OBJ_STRING FOR \"" +
T... |
def _generate_kfold_training_data(
self,
) -> List[Tuple[List[TrainingPair], List[TrainingPair]]]:
problem_to_state_value_pairs = generate_optimal_state_value_pairs(
self._problems
)
domain_to_training_pairs = merge_state_value_pairs_by_domain(
problem_to_stat... |
/**
* Dashboard-Card for application state.
*/
public class ApplicationStateDashboardCardPanel extends AbstractDashboardCardPanel<JiraLoginDTO> {
/**
* This constant must be used to replace the current application-state panel.
*/
private static final String STATE_COMPONENT_ID = "stateComponent";
private fina... |
/**
* This class will contains all the key related to request and response.
*
* @author Manzarul
*/
public final class EsJsonKey {
public static final String CONTENT = "content";
public static final String COUNT = "count";
public static final String DATE_HISTOGRAM = "DATE_HISTOGRAM";
public static final Str... |
<filename>pkg/text/filter_test.go
package text
import (
"fmt"
"strings"
"testing"
"github.com/stretchr/testify/assert"
)
func ExampleFilter() {
slice := []string{"<NAME>ark", "Bran Stark", "<NAME>", "Sansa Stark"}
filter := func(item string) bool {
return strings.HasSuffix(item, "Stark")
}
fmt.Printf("%#v\... |
It seems that at last, the New York City subway system is getting a major upgrade.
In this video, produced by the city's Metropolitan Transportation Authority to promote their forthcoming new control system, viewers get a behind-the-scenes look at the West 4th St. control tower and some of the truly ancient technology... |
async def withdraw_coins(variables, address, amount):
try:
try:
amount = float(amount)
except Exception as exc:
await send_message(variables.message.author,
dictionary['incorrect_amount'])
await send_to_logs(exc)
tracebac... |
<reponame>popovicnenad/rdwayback<gh_stars>0
package main
import (
"bufio"
"encoding/json"
"flag"
"fmt"
"net/http"
"net/url"
"os"
)
func extractSubdomain(s string) string {
u, err := url.Parse(s)
if err != nil {
return ""
}
return u.Host
}
func readWayback(domain st... |
package com.pheu.twis.command.impl;
import static com.datastax.driver.core.querybuilder.QueryBuilder.bindMarker;
import static com.datastax.driver.core.querybuilder.QueryBuilder.select;
import java.util.ArrayList;
import java.util.List;
import com.datastax.driver.core.BoundStatement;
import com.datastax.driver.core.... |
/**
* @author Kohsuke Kawaguchi
*/
final class MixedComplexTypeBuilder extends CTBuilder {
@Override
public boolean isApplicable(XSComplexType ct) {
XSType bt = ct.getBaseType();
if(bt ==schemas.getAnyType() && ct.isMixed())
return true; // fresh mixed complex type
// ... |
<filename>src/ui/mod.rs<gh_stars>0
pub(crate) mod rinzler_console;
|
The Italian town of Gangi, built atop a small bump-like hill in an wooded valley in central Sicily, about 80 kilometers southeast of Palermo, looks like a giant tortoise shell. Less than two years ago, few people outside Italy had heard about it. Now people from all over Europe and as far away as Australia are vying ea... |
from typing import Type, Any
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from chpass.dal.models.base import Base
from chpass.dal.session import session_scope
class DBConnection(object):
def __init__(self) -> None:
self._connection = None
self._session_class = Non... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* tests.h :+: :+: :+: ... |
/**
* This tests OpenXMLFilter (including OpenXMLContentFilter) and
* OpenXMLZipFilterWriter (including OpenXMLContentSkeleton writer)
* by filtering, automatically translating, and then writing the
* zip file corresponding to a Word, Excel or Powerpoint 2009 file,
* then comparing it to a gold file to make sure ... |
// Receiver returning attribute 'receiver' with
// type RtpReceiver (idl: RTCRtpReceiver).
func (_this *TrackEvent) Receiver() *RtpReceiver {
var ret *RtpReceiver
value := _this.Value_JS.Get("receiver")
ret = RtpReceiverFromJS(value)
return ret
} |
def _check_server_started(self, server_process):
if server_process.state != ServerState.STARTING:
return
pid = server_process.process.processId()
runtime_dir = jupyter_runtime_dir()
filename = osp.join(runtime_dir, 'nbserver-{}.json'.format(pid))
try:
with... |
/**
* Broadcast the transaction
*
* @param tx
* Transaction
* @throws EOFException
* End-of-data processing script
*/
private void broadcastTx(Transaction tx) throws EOFException {
Sha256Hash txHash = tx.getHash();
Send an 'inv' message to the broadcast peers (full nodes)
Lis... |
Predicting Medical Fees for Hospitalized Inpatients and the Determination of Inection Point
Background : Taiwan’s Bureau of National Health Insurance (BNHI) implemented an inpatient DRG payment system scheduled for January 2008. Many hospital managers urgently invent initiatives to decrease the impacts of DRGs. Predic... |
def enable_channels(self, channels: ChannelList = None):
msg = MessageBuilder().cn(channels)
self.write(msg.message) |
def entrypoint(
self,
train_dataset: pd.DataFrame,
validation_dataset: pd.DataFrame,
config: TensorflowBinaryClassifierConfig,
) -> tf.keras.Model:
model = tf.keras.Sequential()
model.add(tf.keras.layers.InputLayer(input_shape=config.input_shape))
model.add(... |
def load_input_json(batch_results):
scenario_info = {}
for gz in batch_results:
set_name = os.path.splitext(os.path.basename(gz.name))[0]
with tarfile.open(fileobj=gz) as res_gz:
inputs = [res_gz.extractfile(f) for f in res_gz
if 'inputs_used.json' in f.name]
... |
package com.martiansoftware.nailgun;
import java.io.InputStream;
import java.io.IOException;
class Utils {
/** Close a possibly-null InputStream and swallow any resulting IOException. */
static void closeQuietly(InputStream is) {
if (is == null) {
return;
}
try {
... |
/**
* Runs a preemptive RoundRobin algorithm for
* process simulation.
*/
public void runPreemptive()
{
for (int i = 1; i <= 5; i++)
{
int clock = 0;
int tasksDone = 0;
int totalTasksDone = 0;
float completionTime = 0.0f;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.