content stringlengths 10 4.9M |
|---|
import os, sys
from bmtk.simulator import pointnet
from bmtk.analyzer.visualization.spikes import plot_spikes
def main(config_file):
configure = pointnet.Config.from_json(config_file)
configure.build_env()
graph = pointnet.PointNetwork.from_config(configure)
sim = pointnet.PointSimulator.from_config(... |
// Reset forgets all bins in the histogram (they remain allocated)
func (h *Histogram) Reset() {
if h.useLocks {
h.mutex.Lock()
defer h.mutex.Unlock()
}
for i := 0; i < 256; i++ {
if h.lookup[i] != nil {
for j := range h.lookup[i] {
h.lookup[i][j] = 0
}
}
}
h.used = 0
} |
/**
* Background sprite for description popup.
* Contains all operation to draw this popup.
* Used by handler {@code DescriptionPopup} to step-by-step display popup on screen.
* Generally this sprite with inner elements IS popup but handler contains logic
* to redraw it and display correctly.
*/
public class Desc... |
// finds out the optimal size for the hash
size_t determineHashSize(const size_t numElements, const size_t k)
{
size_t size_limit = 26;
size_t t;
if ( k < size_limit)
t = k;
else
t = size_limit;
while ( t < 10 ) t += k;
while ( 1 << t < numElements && t < size_limit )
{
... |
<gh_stars>0
package cz.metacentrum.perun.wui.registrar.widgets.items.validators;
import com.google.gwt.regexp.shared.MatchResult;
import com.google.gwt.regexp.shared.RegExp;
import cz.metacentrum.perun.wui.registrar.widgets.items.Password;
import org.gwtbootstrap3.client.ui.constants.ValidationState;
/**
* Specific ... |
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QCOLORSPACE_P_H
#define QCOLORSPACE_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation de... |
def zip_tokens_labels_remove_specials(self, tokens, predictions):
return [(token, self.id2label(prediction)) for token, prediction in
zip(tokens, predictions) if token not in self.special_tokens_map] |
// Look up an attribute by name, regardless of its underlying type.
// On lookup failure, the result is null.
const OpAttrsRawEntry *ImmutableOpAttrs::GetRaw(string_view attr_name) const {
for (size_t i = 0, e = num_entries_; i != e; ++i) {
if (!strcmp(entries_[i].name, attr_name.data())) return &entries_[i];
}... |
#include<bits/stdc++.h>
#define X first
#define Y second
#define eb emplace_back
#define pb push_back
#define print1d(x) for(auto i : x){ cout << i << " ";} cout << '\n'
#define print2d(x) for(auto u : x){ print1d(u);} cout << "------" << '\n'
#define CLR(x, y) memset(x, y, sizeof(x))
#define ALL(X) X.begin(), ... |
/**
* Created by sospartan on 7/12/16.
*/
public class TextAreaEditTextDomObject extends BasicEditTextDomObject {
public static final int DEFAULT_ROWS = 2;
private int mNumberOfLines = DEFAULT_ROWS;
@Override
protected float getMeasureHeight(){
return getMeasuredLineHeight() * mNumberOfLines;
}
@O... |
#include<stdio.h>
#include<string.h>
int main()
{
char s[1001];
gets(s);
int i,fl=0,sum=0;int sum1;int fl2=0;
int fl1=0;
int x,j=0;
int p=0;x=1;
// printf("%d",(int)s[strlen(s)-1]-48);
for(i=strlen(s)-1;i>=0;i--)
{ x=1;
for(j=0;j<p;j++)
{
x=x*10;
... |
def _get_cache_schemas(self, manifest, exec_only=False):
info_schema_name_map = SchemaSearchMap()
for node in manifest.nodes.values():
if exec_only and node.resource_type not in NodeType.executable():
continue
relation = self.Relation.create_from(self.config, node... |
1. "Kenny's or Napoli's?" is both a highly contentious topic, and a very successful pickup line.
2. Iona has no idea what year it is.
3. While driving, the blinker is entirely optional, and other drivers will appreciate your air of mystery.
4. Also, everyone has the right-of-way, all of the time.
5. Except in the S... |
/// Build a new waker from the eventfd.
pub fn build(eventfd: eventfd::EventFd) -> Waker {
// Create a new internal waker
let guillotine_waker = Arc::new(GuillotineWaker::new(eventfd));
// Turn it into a pointer, because that's what RawWaker wants
let pointer = Arc::into_raw(guillotine_waker) as *const ... |
var actions = require('actions');
describe('Actions', () =>{
it('should generate search text action', () => {
var action ={
type: 'SET_SEARCH_TEXT',
searchText: 'Some search text'
};
var res = actions.setSearchText(action.searchText);
expect(res).toEqual(action);
});
});
|
package org.pengfei.Lesson01_Java_Standard_API.S03_Exploring_Java_util.source.TimerTask;
import java.util.TimerTask;
public class MyTimerTask extends TimerTask {
@Override
public void run() {
System.out.println("Timer task executed");
}
}
|
#include <seriesModel.h>
#include <SQLiteSeriesDAL.h>
SeriesModel::SeriesModel() : activeItem(0)
{
dal = &sqldal;
series = dal->loadSeries();
}
std::vector<Series>& SeriesModel::getSeries()
{
return series;
}
void SeriesModel::incrementSeries()
{
series[activeItem].increment();
dal->setCurrentSe... |
“Whenever I think of [inventor of the computer] Alan Turing, I think about the Apple logo,” began John Zerzan. “The logo is an apple with a bite out of it. Of course, Turing supposedly smeared cyanide on an apple and bit into it after being persecuted by the government for being gay. A bite from an apple is also associ... |
Gamereactor recently spoke to both Resident Evil 7 director Koushi Nakanishi and producer Masachika Kawata about the upcoming game in an interview at E3 and the comments about the demo were something they were pleased to talk about.
The feedback in the short period that the demo had been made available at the time was... |
<filename>sem1-2-cource1/ver-11:2-may.cpp
//что такое итератор?
// итератор - некая сущность позволяющая абстрагироваться от контейнера и
//последовательно получать доступ к данным
// есть много разных итераторов:
/*
+input
+forward
+biderectional
+random access
отдельно:
-output
*/
auto begin = co... |
Quick-VDR: interactive view-dependent rendering of massive models
We present a novel approach for interactive view-dependent rendering of massive models. Our algorithm combines view-dependent simplification, occlusion culling, and out-of-core rendering. We represent the model as a clustered hierarchy of progressive me... |
Life Cycling Before Dawn: Notes on Crossfit, Consciousness, and Comparisons
Home for a month before setting out on a new adventure, I resolve to make some changes in my life.
It starts with exercise. I’m a committed runner, a casual yogi, a beginning swimmer, and every week or so I head to the gym for an unfocused se... |
<filename>src/main/java/cn/szjlxh/push/listener/Callback.java
package cn.szjlxh.push.listener;
import cn.szjlxh.push.message.ResponseMsg;
public interface Callback {
/**推送成功时调用*/
public void onSuccess(ResponseMsg reponseMsg);
/**推送失败时调用*/
public void onError(ResponseMsg reponseMsg);
}
|
/**
* Controller for managing watering resource. It is used for performing one-time watering actions.
* There is watering menu item selected when all views of this controller are shown. See
* {@link WateringControllerAdvice}.
*/
@Controller
public class WateringController {
private final DevicesService devicesS... |
use na::{DMatrix, DVector, Matrix4, QR};
use test::{self, Bencher};
#[path = "../common/macros.rs"]
mod macros;
// Without unpack.
#[bench]
fn qr_decompose_100x100(bh: &mut Bencher) {
let m = DMatrix::<f64>::new_random(100, 100);
bh.iter(|| test::black_box(QR::new(m.clone())))
}
#[bench]
fn qr_decompose_100x... |
/**
* Prints out all messages with generic parameters PARAM_0 ... PARAM_9
* If you want to run this main with a specific locale, launch it with VM arguments
* -Duser.language=ab -Duser.country=CD
*
* @param args
*/
public static void main (String[] args) {
Enumeration<String> keyE... |
def _set_version_list_filter(self, filter_text):
self.version_proxy_model.setFilterWildcard(filter_text)
self.version_delegate.force_reselection() |
Parallelizing post-placement timing optimization
This paper presents an efficient modeling scheme and a partitioning heuristic for parallelizing VLSI post-placement timing optimization. Encoding the paths with timing violations into a task graph, our novel modeling scheme provides an efficient representation of the ti... |
A,B,M = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
ans = []
waribiki = []
for _ in range(M):
x,y,c = map(int,input().split())
waribiki.append(a[x-1]+b[y-1]-c)
a_min=min(a)
b_min=min(b)
ab_min = a_min+b_min
waribiki_min = min(waribiki)
print(min(waribiki_min,... |
/**
* A 32-bit circular sequence.
*
*/
public final class Sequence32 {
private Sequence32() {
super();
}
/**
* Returns the successor int of a given int
*
* @param n The int to continue from
* @return The successor int
*/
public static int next(final int n) {
return n + 1... |
def configure(self):
super(MamnagedAttachmentSharingTests, self).configure()
self.patch(config, "EnableDropBox", False)
self.patch(config, "EnableManagedAttachments", True) |
// txt switched on connect button when button clicked
private void updateConnectedButton(boolean isConnected) {
if (isConnected) {
btnConnect.setText("Disconnect");
} else {
btnConnect.setText("Connect");
mBtnSetConnectionType.setText("Connect Type");
}
} |
class SonarQubeClient:
"""
A Python Client for SonarQube Server APIs.
"""
DEFAULT_URL = "http://localhost:9000"
def __init__(self, sonarqube_url=None, username=None, password=None, token=None, verify=None):
self.base_url = strip_trailing_slash(sonarqube_url or self.DEFAULT_URL)
_... |
// Process implements the mapping's Action interface
func (a *Mapping) Process(d api.Data) api.Data {
dataName := d.Name()
for from, to := range a.Matches {
if dataName == from {
log.Context(
log.EV, d.Name(),
log.ACT, a.Name,
).Debugf("mapping %s -> %s ", d.Name(), to)
d.SetName(to)
return d
... |
/*******************************************************************************
################################################################################
# Copyright (c) [2017-2019] [Radisys] #
# ... |
// Filters ads configurable filters to limit the query result.
func Filters(filters []Filter) QueryOpt {
return QueryOpt{func(o *QueryOptions) {
o.Filters = filters
}}
} |
#include"memory.h"
#include<stdlib.h>
extern Memory *memory;
// Bus variables
extern uint64_t *dBus; // data bus
extern uint32_t *aBus; // address bus
extern uint8_t *rw; // Read(0) or Write(1)
static size_t memory_size=0;
// TODO implement memory mapped I/O device.
void memory_main ( void ) {
if ( *rw ) {
/... |
import { Router } from 'express';
import { getTasks, addTask, updateConsume, removeTask } from './operations';
const router = Router();
router.get('/tasks', ({ user: { id } }, res, next) =>
getTasks(id)
.then((tasks) => res.json(tasks))
.catch(next));
router.post('/tasks', ({ user: { id }, body: ... |
A three-month-old baby girl was tragically killed when she was struck by a car after her mother lost hold of the baby and the car rolled backwards, Rancho Cucamonga police said Sunday, Oct. 18, 2015.
A 3-month-old girl was tragically killed when she was struck by a car after her mother lost hold of the baby and the ca... |
Yesterday two Los Angeles City Council committees rejected City Attorney Carmen Trutanich's position that state law does not allow patient collectives to sell medical marijuana. The Los Angeles Times reports that the council's planning and public safety committees approved an ordinance that "authorizes cash contributio... |
/**
* Given a sequence of method calls, this class will produce a string containing the corresponding Java code.
*/
public class CodeFormer {
private final List<MethodSignature> sigs;
private int slotNumber = 0;
private int retNumber = 0;
private final VarTable slotTypes = new VarTable();
private ... |
IT IS THE LAST Ten Nights and you may have barely felt Ramadan. Suddenly, the final stretch is ahead of you and you can’t help but regret all you could have done and wished you could do. There are only ten nights left. How can you make the most of them?
1. Focus on the Now
Instead of lamenting what you’ve missed, foc... |
<filename>notebooks/minlib/Fig2.FigSupp8.MinLibCas9Screens.py<gh_stars>1-10
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.3'
# jupytext_version: 1.0.0
# kernelspec:
# display_name: Python 3... |
//SetupCORS - Eables CORS Middleware. Presently usurping all Options requests (TODO: Future Optional)
func SetupCORS(router *mux.Router) {
router.Use(corsMiddleware)
router.Methods("OPTIONS").HandlerFunc(preflightHandler)
} |
Not again. 12 years ago to the day we watched in horror as poor and Black communities in Louisiana were devastated by a natural disaster and left homeless and hungry while Congress debated whether or not to give them relief funds. We saw the same thing happen as low-income communities- many of color- were destroyed by ... |
<filename>src/main/java/com/benm/app/BookmarkController.java
package com.benm.app;
import java.lang.Iterable;
import java.util.Map;
import java.util.HashMap;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import o... |
Room LL20A (San Jose Convention Center)
In support of the development of the Third National Climate Assessment (NCA3) report, extensive analyses of historical trends and future projections were undertaken. These analyses were organized around an 8-region breakdown of the U.S. A particular focus was on extreme climate ... |
// Copyright 2013 Google Inc. 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.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... |
export class LayoutOptions
{
ignoreAudio: boolean;
ignoreSync: boolean;
ignoreDurationCheck: boolean;
} |
/**
* This is a test similar to testToString()
* in that it has a = and a ? but it doesn't
* expect a double encoded URI.
*/
@Test
public void testWithEqualsSign(){
String MelbUniStr = "/entity?home=1&uri=HTTPS://bida.themis.unimelb.edu.au/pls/apex/f?p=mrw2rdf:org:::::org_id:145";
... |
def _format_experience(self,
state,
action,
reward,
next_state,
game_over):
if not hasattr(self, 'input_shape'):
self.input_shape = state.shape[1:]
experien... |
<gh_stars>0
mod brainfuck;
mod wasm;
mod leb128;
use brainfuck::*;
use std::ffi::CStr;
use std::ffi::CString;
use std::os::raw::{c_char};
use std::num::Wrapping;
extern crate byteorder;
use std::mem;
//copred from https://gist.github.com/thomas-jeepe/ff938fe2eff616f7bbe4bd3dca91a550
#[repr(C)]
#[derive(Debug)]
pub... |
<reponame>andresv/dbc-codegen
use can_messages as messages;
use std::convert::TryFrom;
#[test]
fn simple_byte_aligned_message() {
let (_, payload) = parse_canframe("100#20000008");
let msg = messages::Foo::try_from(payload.as_slice()).unwrap();
assert_f32_eq(msg.voltage(), 2_f32);
assert_f32_eq(msg.cu... |
/** Checks that a new consumer on a new connection can get NUM_MESSAGES from _destination */
private void checkMessages() throws Exception, JMSException
{
_con = getConnection();
_session = _con.createSession(false, Session.AUTO_ACKNOWLEDGE);
_con.start();
_consumer = _session.create... |
<filename>src/boost_mpl_aux__preprocessed_gcc_unpack_args.hpp
#include <boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp>
|
/** Branching decision user class */
class SbbBranchUserDecision : public SbbBranchDecision {
public:
SbbBranchUserDecision ();
SbbBranchUserDecision ( const SbbBranchUserDecision &);
virtual ~SbbBranchUserDecision();
virtual SbbBranchDecision * clone() const;
virtual void initialize(SbbModel * model);
virt... |
#pragma once
#include "Asset.h"
#include "fl/Common.h"
#include "fl/graphics/Texture2D.h"
namespace fl {
class FL_API AssetManager
{
public:
AssetManager();
~AssetManager();
// Static API functions
static void Init();
template<typename T>
static T* CreateTexture(TextureFormat format, int width, in... |
(Some of my kids watching sheep mothering their babies)
Over the last decade a whole lot of babies have been born on my farm or brought home to it. We have had calves, chicks, kids (goat), kids (human), ducklings, goslings, kits and lambs. One of the most fascinating revelations of this is just how variable the instin... |
// Draw the axis elements and labels and set layout.plot_active_area
// to the actual plotting are matrix.
void plot::draw_axis(canvas_type& canvas, plot_layout& layout, const agg::rect_i* clip)
{
const double scale = compute_scale(layout.plot_area);
if (clip)
canvas.clip_box(*clip);
const agg::tran... |
The saviour of Hunter’s collection
When, during Great Britain’s war with revolutionary France, Prime Minister William Pitt was asked to buy John Hunter’s anatomical collection for the nation, he thundered, “What! Buy preparations! I have not got money enough to buy gunpowder!” That the Hunterian Museum celebrates its ... |
/**
* Unit tests for {@link Rpm}.
*
* @since 0.9
* @todo #110:30min Meaningful error on broken package.
* Rpm should throw an exception when trying to add an invalid package.
* The type of exception must be IllegalArgumentException and its message
* "Reading of RPM package 'package' failed, data corrupt or ma... |
/**
* Brise entitet iz liste entiteta po zadatoj
* ID vrednost
*
* @param id ID vrednost entiteta koji se brise
* @return Vraca vrednost <code>true</code> ukoliko je
* entitet sa zadatim ID-em nadjen i izbrisan, u suprotnom
* vraca false ukoliko ne postoji entitet sa tim ID-em
*/
public boolean... |
#define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <iostream>
#include <cstdio>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#i... |
package org.archive.wayback.accesscontrol.robotstxt.redis;
import java.io.FileInputStream;
import java.util.Collections;
import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.logging.Level;
impor... |
package com.wsk.characters;
import basemod.abstracts.CustomPlayer;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.math.MathUtils;
import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.mega... |
/*---------------------------------------------------------------------------------------------
* Copywight (c) <NAME>. Aww wights wesewved.
* Wicensed unda the MIT Wicense. See Wicense.txt in the pwoject woot fow wicense infowmation.
*-------------------------------------------------------------------------------... |
/**
* Check for workflow instances that are in the locked state without updates (meaning that a node is executing some work item for this instance) for longer
* than configured workflowengine.workItemExecutionTimeWarnSeconds time. Then log an ERROR to draw attention to these potentially stuck workflows.
... |
/**
* Helper class for request parameter validation
*
* @author Peng Peng
* #date 2012-5-31
*
*
*/
public class ParamValidationUtil {
private Map<String, String> keyPairs;
public static final String KEY = "pubkey";
public static final String SIGN = "sign";
public boolean validate(Map<Str... |
<gh_stars>0
package tasks.task3.main;
import com.github.javafaker.Faker;
import tasks.task3.code.Employee;
import tasks.task3.code.EmployeeLeaveCalculator;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
public class Task3Main {
private static Employee createFakeEmployee() {
... |
# This file is part of Hypothesis, which may be found at
# https://github.com/HypothesisWorks/hypothesis/
#
# Most of this work is copyright (C) 2013-2021 <NAME>
# (<EMAIL>), but it contains contributions by others. See
# CONTRIBUTING.rst for a full list of people who may hold copyright, and
# consult the git log if yo... |
/**
* Adds byte array to ring buffer
* @param buf byte array
* @param length added length
* @return actually added length
*/
public synchronized int add(byte[] buf, int length) {
int addLen = length;
if(mAddIndex > mGetIndex) {
if((mAddIndex + length) >= mRingBufSize... |
picturesfromgrandpa:
When Bubbe was finally freed after five years in the German concentration camps, she did not know if any of her family had survived. Months later, she received this letter from her sister, Raizel.
Every year at the Passover Seder, my sister and I read this letter aloud as part of our family’s cel... |
# Contemporary Metaethics
##### For my mother and father, John and Isabella
# Contemporary Metaethics
### An Introduction
### Second Edition
### Alexander Miller
polity
The right of Alexander Miller to be identified as Author of this Work has been asserted in accordance with the UK Copyright, Designs and Patents... |
package services;
import clients.symphony.api.FirehoseClient;
import listeners.FirehoseListener;
import model.DatafeedEvent;
import java.util.List;
import java.util.concurrent.CompletableFuture;
public interface ActionFirehose {
CompletableFuture<List<DatafeedEvent>> actionHandleEvents(List<DatafeedEvent> events,L... |
<gh_stars>0
import ta
import sys
import os
import pprint
import json
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
from datetime import datetime
import matplotlib.pyplot as plt
import re
plt.style.use("seaborn-darkgrid")
def read_parquet_file(file_path):... |
#![no_std]
// Even though we have main, we do all handling around main ourselves, so we don't want Rust to
// do anything around that.
#![no_main]
// here we go :o
extern crate syscall_test;
use syscall_test::io::*;
use syscall_test::{context, println, syscall::exit};
#[no_mangle]
pub fn main() -> ! {
let contex... |
macro_rules! generate_enums {
($($which:ident: $index:literal)*) => {
#[derive(Clone, Eq, PartialEq, Debug)]
#[allow(clippy::large_enum_variant)]
pub enum Request {
DummyRequest, // for testing
$(
$which(request::$which),
)*
}
#[derive(Clone, Eq, PartialEq, Debu... |
async def cancel(
self, consumer_tag: ConsumerTag,
timeout: TimeoutType = None,
nowait: bool = False,
) -> aiormq.spec.Basic.CancelOk:
return await self.__channel.basic_cancel(
consumer_tag=consumer_tag, nowait=nowait, timeout=timeout,
) |
/**
* {@inheritDoc}
*
* @throws EnhancedJSONTable.FailoverException if we catch {@code StoreException} from primary table and
* cannot provide failover for the request
*/
@Override
public Iterable<DocumentReader> documentReaders() {
try {... |
def KargerMinCut(**dict):
numMinCut = 0
while len(dict) > 2:
u_key = random.sample(list(dict), 1)[0]
u = int(re.findall(r"\d+", u_key)[0])
while True:
v_flag = random.randint(0, len(dict[u_key]) - 1)
v = dict[u_key][v_flag]
v_key = "vertex " + str(v)
... |
package cc
import (
"testing"
"github.com/adamcolton/geom/d3"
"github.com/adamcolton/geom/d3/solid/mesh"
"github.com/stretchr/testify/assert"
)
func TestMethods(t *testing.T) {
m := mesh.Extrude([]d3.Pt{
{0, 0, 0},
{1, 0, 0},
{1, 1, 0},
{0, 1, 0},
}, d3.V{0, 0, 1})
cc := ccMesh{
Mesh: m,
}
cc.pop... |
package core.uiCore.driverProperties;
public class browserType {
public enum BrowserType {
CHROME, FIREFOX, INTERNET_EXPLORER, MICROSOFT_EDGE, OPERA, CHROME_HEADLESS, FIREFOX_HEADLESS, SAFARI
}
}
|
β-Cyclodextrin-Polyacrylamide Hydrogel for Removal of Organic Micropollutants from Water
Water pollution by various toxic substances remains a serious environmental problem, especially the occurrence of organic micropollutants including endocrine disruptors, pharmaceutical pollutants and naphthol pollutants. Adsorptio... |
import base64
import logging
import os
import zlib
from flask import request
from flask_jwt_extended import jwt_required, get_jwt_identity
from flask_restful import Resource
from dimensigon.domain.entities import Server, File, FileServerAssociation
from dimensigon.web import db, errors
from dimensigon.web.api_1_0 imp... |
/**
* Specialized map convenient for tree traversal. It enables convenient lookup for keys through subtree (from current
* location up to root) while preventing searches between sibling subtrees.
*
* @param <K> key type
* @param <V> value type
*/
public class ChainedMap<K, V> {
private final Map<K, V> values ... |
/// <reference path="quartz.config.ts"/>
/// <reference path="quartz.service.ts"/>
/// <reference path="scheduler/scheduler.ts"/>
/// <reference path="triggers/trigger.ts"/>
/// <reference path="jobs/job.ts"/>
namespace Quartz {
export type Filter = { id: string, title: string, value: string };
export class Quar... |
package cloudformation
// AWSAutoScalingPlansScalingPlan_ApplicationSource AWS CloudFormation Resource (AWS::AutoScalingPlans::ScalingPlan.ApplicationSource)
// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-applicationsource.html
type AWSAutoScalingPlans... |
/**
* Warn if one or more attributes are defined in a streaming search cluster SD.
*
* @param sc a search cluster to be checked for attributes in streaming search
* @param logger a DeployLogger
*/
private static void warnStreamingAttributes(SearchCluster sc, DeployLogger logger) {
i... |
from requests import get
import json
# get all
# response = get('http://localhost:5000/metadata/datasets')
response = get('http://dsbox02.isi.edu:14080/metadata/datasets')
j = response.json()
print(json.dumps(j, indent=2))
print(response.status_code)
# get one
# response = get('http://localhost:5000/metadata/datasets... |
###############################################################################
# Caleydo - Visualization for Molecular Biology - http://caleydo.org
# Copyright (c) The Caleydo Team. All rights reserved.
# Licensed under the new BSD license, available at http://caleydo.org/license
######################################... |
def add_rbac(network, target_tenant, policy_id):
members_list = network['members']
if target_tenant not in members_list:
members_list.append(target_tenant)
rbac_policy = network['rbac_policy']
policy = {'rbac_id': policy_id, 'target_tenant': target_tenant}
rbac_policy.append(policy)
netw... |
/**
* A login screen that offers login via email/password.
*/
public class LoginActivity extends BaseActivity {
@BindView(R.id.et_account)
EditText etAccount;
@BindView(R.id.et_password)
EditText etPassword;
@Override
protected int getLayoutId() {
return (R.layout.activity_login);
... |
<reponame>Sukora-Stas/JavaRushTasks
package com.javarush.task.task34.task3411;
/*
Ханойские башни
*/
public class Solution {
public static void main(String[] args) {
int count = 3;
moveRing('A', 'B', 'C', count);
}
public static void moveRing(char a, char b, char c, int count) {
... |
/**
* Represents a comparator sorting objects in descending
* natural order.
* More specifically,
* when comparing two objects, this comparator
* returns the result of {@link Comparable#compareTo(Object)}
* multiplied by $-1$.
*
* @param <T>
*/
public class DescendingOrderComparator<T extends Comparable<? supe... |
<gh_stars>1-10
package modules
// IRoleResolver ...
type IRoleResolver interface {
ICoreRoleResolver
}
// IRoleHandler ...
type IRoleHandler interface {
ICoreRoleHandler
}
|
Sowing the Seeds of Contemporary American Ballet: Immigrant Artists and Their Pedagogies
Perhaps you’ve seen the photographs or caught glimpses in Fred Astaire movies of Harriet Hoctor, floating en pointe and backwards across the stage in tiny bourr ees, arching gracefully and sensuously into an impossibly deep backbe... |
Quote: CaptCrunch Originally Posted by
The whole broadcast thing is a great idea and sounds superb! I wondered if you could answer some questions for us/me? About how large of a space is the room? The ceiling looks like a standard two story height, but the other dimensions are difficult to estimate from the show. Seco... |
// LoadConfig creates Config object from environment variables
func LoadConfig() (*Config, error) {
c := Config{
Interval: time.Minute,
}
if err := envstruct.Load(&c); err != nil {
return nil, err
}
envstruct.WriteReport(&c)
return &c, nil
} |
/// Get a mutable reference to a secret tree for a given epoch `group_epoch`.
/// Return a vector with the key package references and leaf indices of the
/// epoch.
pub(crate) fn secrets_and_leaves_for_epoch_mut(
&mut self,
group_epoch: GroupEpoch,
) -> Option<(&mut MessageSecrets, Vec<(u32, KeyPack... |
Bernie Sanders is the only Democratic candidate for president not linked to an FBI investigation. This used to mean something in American politics, but those days are gone. Today, I'm viewed as delusional, by the same people who think smart politics and qualifications entail endless scandals, poor decision-making on ev... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.