content stringlengths 10 4.9M |
|---|
def extract_spectra(self, files, extractor, star_dark=None, flat_files=None,
flat_dark=None, location=('151.2094','-33.865',100.0),
coord=None, do_bcor=True, ra_dec_hr=False):
fluxes = []
vars = []
dates = []
bcors = []
for ix,... |
/*
* replay of undo reset slot operation
*/
static void
undo_xlog_reset_xid(XLogReaderState *record)
{
XLogRecPtr lsn = record->EndRecPtr;
xl_undoaction_reset_slot *xlrec = (xl_undoaction_reset_slot *) XLogRecGetData(record);
Buffer buf;
XLogRedoAction action;
action = XLogReadBufferForRedo(record, 0, &buf);
i... |
use modules::config::get_arguments;
use modules::dynamo::Dynamo;
use modules::utility::parse_csv;
use std::process::exit;
mod modules;
#[tokio::main]
async fn main() {
let (filename, config) = get_arguments();
println!("Reading csv...");
let (header, rows) = parse_csv(filename);
if header.is_empty()... |
def add_single_alarmword(self, alarmword):
assert not self._alarmwords_added, "Cannot add alarmwords more than once"
word_upper = alarmword.upper()
stem = spar_stemming.stem_word(word_upper)
end_first_trigram = 6
begin_last_trigram = len(self.word_list) - 6
insert_point =... |
<filename>src/main/java/io/moren/springkanban/service/CardService.java
package io.moren.springkanban.service;
import io.moren.springkanban.dto.CardDto;
import io.moren.springkanban.exception.ResourceNotFoundException;
import io.moren.springkanban.model.Board;
import io.moren.springkanban.model.Card;
import io.moren.sp... |
#include<iostream>
#include<cstdio>
#include<algorithm>
#define rg register
#define rep(i,x,y) for(rg int i=(x);i<=(y);++i)
#define per(i,x,y) for(rg int i=(x);i>=(y);--i)
using namespace std;
typedef long long LL;
const int N=1e5+10,S1=1300,S2=2000;//tree[S1,3*S1],time=S2
int n,m,q;
int v[N],w[N],c[N],dfn[N],clo;
int ... |
<filename>google-ads/src/main/java/com/google/ads/googleads/v6/services/CarrierConstantServiceProto.java
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v6/services/carrier_constant_service.proto
package com.google.ads.googleads.v6.services;
public final class CarrierConsta... |
/**
* Finalizes the prepared aspiring pits.
* moves pre aspiring to aspiring and clears pre aspiring
*/
private void spawnAspiringPits() {
for (EndocytoticPit preAspiringPit : preAspiringPits) {
preAspiringPit.getConcentrationManager().backupConcentrations();
vesicleLayer.... |
// Insert an extended instruction at the code pointer, returning the position at which
// the instruction was inserted.
inline ip_t Compiler::GenInstructionExtended(OpCode basic, uint8_t extension)
{
ip_t pos=GenInstruction(basic);
GenData(extension);
return pos;
} |
/**
* @param path the given path, if remote action then starts with zkid of the relevant remote zookeeper. I.e., ZK1~/znode/...
* @see org.apache.zookeeper.ZooKeeper#exists(String, boolean)
*/
public Stat exists(String path, boolean watch) throws KeeperException,
InterruptedException{
... |
Looking for news you can trust?
Subscribe to our free newsletters.
We all know that plenty of people disapprove of Obamacare. But do they want lawmakers to make the best of it, or do they want them to “do what they can to make the law fail”? According to Pew, only 23 percent of Americans want elected officials to wor... |
<reponame>ajlinda/oneplatform<gh_stars>1-10
package com.oneplatform.platform;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.SpringCloudApplicati... |
import { ChangeLevel } from '../constants';
import { bumpVersion } from '../bumpVersion';
describe("bumpVersion('0.1.2', :ChangeLevel[, 'beta'[, versionStrings]])", () => {
const baseVersion = '0.1.2';
const channel = 'beta';
it('if no channel is given, should bump & return the release version', () => {
con... |
begin_unit|revision:0.9.5;language:Java;cregit-version:0.0.1
begin_comment
comment|/* * 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... |
Lewis Hamilton hopes to put pen to paper on a new contract with Mercedes – which could be worth as much as £40 million a year – before this Sunday’s Malaysian Grand Prix.
Hamilton, 30, is in the final year of his current deal and has been in negotiations with Mercedes executives Toto Wolff and Niki Lauda for the last ... |
<reponame>lwneal/tfasts<gh_stars>1-10
/****** NOTICE: LIMITATIONS ON USE AND DISTRIBUTION ********\
This software is provided on an as-is basis, it may be
distributed in an unlimited fashion without charge provided
that it is used for scholarly purposes - it is not for
commercial use or profit. This no... |
Does life satisfaction predict five-year mortality in community-living older adults?
Objectives: Depression and depressive symptoms predict death, but it is less clear if more general measures of life satisfaction (LS) predict death. Our objectives were to determine: (1) if LS predicts mortality over a five-year perio... |
// Test that the state value properties on instances have the correct values.
void tst_qqmlxmlhttprequest::instanceStateValues()
{
QQmlComponent component(&engine, testFileUrl("instanceStateValues.qml"));
QScopedPointer<QObject> object(component.create());
QVERIFY(!object.isNull());
QCOMPARE(object->pro... |
// get the "pref dir", which is where game output files are stored. the pref
// dir is ~/PREF_DIR_ROOT/PREF_DIR_GAME_NAME
static const char* GetPrefDir()
{
if (sgPrefDirInitialized)
return sgPrefDir;
if (sUseRedirect)
{
const char *home = getenv("HOME");
AssertFatal(home, "HOME enviro... |
package de.exxcellent.challenge.parser;
import com.opencsv.bean.ColumnPositionMappingStrategy;
import com.opencsv.bean.CsvToBean;
import com.opencsv.bean.CsvToBeanBuilder;
import de.exxcellent.challenge.model.WeatherEntry;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ArrayList;
import ja... |
import os
import time
import socket
import torch
import pytorch_lightning as pl
from pytorch_lightning.plugins import DDPPlugin
from fiery.config import get_parser, get_cfg
from fiery.data import prepare_dataloaders
from fiery.trainer import TrainingModule
def main():
args = get_parser().parse_args()
cfg = g... |
New York-based fans of Wes Anderson: clear your bespoke, graphically-symmetrical diaries. Nearly one hundred artists have reinterpreted the work of Anderson for a pop-up exhibition this weekend at New York’s Joseph Gross Gallery entitled “Bad Dads IV”. The exhibition is a colour wheel of Anderson trademarks that pepper... |
Anti Slip Balancing Control for Wheeled Inverted Pendulum Vehicles
This brief proposes an antislip balancing controller for wheel inverted pendulum (WIP) vehicles to deal with various traction environments. The controller is designed based on a general plant model which not only characterizes the dynamics of the pendu... |
package lykrast.harvestersnight.common;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.LeavesBlock;
import net.minecraft.block.material.Material;
import net.minecraft.enchantment.Enchantments;
import net.minecraft.entity.LivingEnti... |
# coding: utf-8
from flask import Flask
app = Flask(__name__,static_folder="/media/pi/Marten/photo_folder")
app.config['SECRET_KEY'] = "DuWeißtSchonWer"
from webinterface import routes |
The following in an excerpt from the book "Endzone: The Rise, Fall and Return of Michigan Football" by New York Times best-selling author John U. Bacon. The book focuses on the dysfunction in Michigan's athletic department during the past decade and the grassroots effort to set it back on course. In this passage, we re... |
<reponame>apundir/wsbalancer
package main
import (
"net/http"
"reflect"
"testing"
"time"
it "github.com/apundir/wsbalancer/internal"
)
func adminTests(t *testing.T, config *it.TestConfig) {
tests := []functionalTest{
{"backend-list", backendListTest},
{"backend-disable-enable-all", backendDisableEnableAllT... |
<gh_stars>100-1000
// Module for Ambrosia streams (OutgoingMessageStream, MemoryStream, StreamByteCounter, simpleCheckpointProducer/Consumer).
import Stream = require("stream");
import File = require("fs");
// Note: The 'import * as Foo from "./Foo' syntax avoids the "compiler re-write problem" that breaks debugger hov... |
/*
* Copyright (c) 2019 - GraphLoom contributors (github.com/jiefenn8/graphloom)
* This software is made available under the terms of Apache License, Version 2.0.
*/
package io.github.jiefenn8.graphloom.rdf.r2rml;
import org.apache.jena.rdf.model.Property;
import org.apache.jena.rdf.model.ResourceFactory;
import ... |
/*
** EPITECH PROJECT, 2020
** libgote
** File description:
** gt_world_t tests
*/
#include <criterion/criterion.h>
#include <criterion/redirect.h>
#include "my/my.h"
#include "my/io.h"
#include "gote/gote.h"
static void health_component_destroy(void *data)
{
my_printf("health free;");
my_free(data);
}
// He... |
PANAMA CITY, Fla. - Erroneous reports by an Atlanta weathercaster have threatened to derail what was a promising July 4th tourism weekend in the Florida Panhandle.
WSB Chief Meteorologist Glenn Burns took to the airwaves Wednesday, telling viewers that the National Weather Service had issued “No Swim Advisories” for b... |
<gh_stars>100-1000
import * as assert from "assert";
import * as llvm from "llvm-node";
import * as ts from "typescript";
import {CodeGenerationContext} from "../code-generation-context";
import {RuntimeSystemNameMangler} from "../runtime-system-name-mangler";
import {AbstractFunctionReference} from "./abstract-functio... |
def merge(self, report, strict=True):
self._check_report(report)
if self.suite_related and Status.precedent(
[self.status]
) < Status.precedent([report.status]):
return
self.status_override = report.status_override
self.runtime_status = report.runtime_stat... |
On paper Israel’s for-profit manpower agencies act as job providers for impoverished groups from third world countries. In reality, they are the drivers of a system that harms workers, employers, and the state.
By Abigail F. Kolker
In Israel, there are some 60,000 migrant caregivers, comprising the largest group of d... |
// CONSTRUCTOR
// --------------------------------------------------------------------------------------------
/// Creates a new trace low-degree extension table from the provided main trace segment LDE.
pub fn new(main_trace_lde: Matrix<E::BaseField>, blowup: usize) -> Self {
Self {
main_segment_ld... |
package middleware_test
import (
"fmt"
"net/http"
"context"
"github.com/goadesign/goa"
"github.com/goadesign/goa/middleware"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Recover", func() {
var h goa.Handler
var err error
JustBeforeEach(func() {
rg := middleware.Recover()(h)... |
Materials Matter in Microfluidic Devices
As more micro- and nanofluidic methodologies are developed for a growing number of diverse applications, it becomes increasingly apparent that the choice of substrate material can have a profound effect on the eventual performance of a device. This is due mostly to the high sur... |
package server.shops;
import client.MapleCharacter;
import client.MapleClient;
import client.inventory.IItem;
import client.inventory.ItemFlag;
import java.util.ArrayList;
import java.util.List;
import server.MapleInventoryManipulator;
import tools.packet.PlayerShopPacket;
/**
*
* @author zjj
*/
public class Mapl... |
//
// HHSwipeTableView.h
// HHSwipeTableView
//
// Created by <NAME> on 3/28/14.
// Copyright (c) 2014 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "HHSwipeTableViewCell.h"
@class HHSwipeTableView;
@class HHSwipeButton;
@protocol HHSwipeTableViewDelegate <UITableViewDelegate>
- (NSArray *)swipe... |
// temps d'attente en ms entre 2 tours de boucle
@Override
public void run(){
while(true){
Main.scene.repaint();
try{Thread.sleep(PAUSE);}
catch (InterruptedException e){}
}
} |
/**
* Internal data structure used to keep track of each particle.
*/
private static class Particle {
private Point2D position;
private Timeline timeline;
public Particle(float x, float y, float delay, float duration) {
this.position = new Point2D(x, y);
this.... |
<reponame>ganwell/graphql-core-next
from typing import Any, List, NamedTuple, Optional, Union
from ..error import GraphQLError, INVALID
from ..language import Node
from ..pyutils import Path, inspect, print_path_list
from ..type import GraphQLInputType
from . import coerce_input_value
__all__ = ["coerce_value", "Coer... |
/*
* Arquivo : testasort_bubble.c
* Tipo : Main.
* Programa que testa sort
*
* Autor : <NAME> (<EMAIL>)
* Data : 06/2019 | Junho de 2019
* Curso : Bacharel em Engenharia de Computacao / 2019.1 / Periodo: 2
* Instituicao : Instituto Federal de Ciencia e Tecnologia da Parai... |
S_array = input()
lastIndex = len(S_array) -1
lastChar = S_array[len(S_array)-1]
while lastIndex > 0 and S_array[lastIndex-1] == lastChar:
lastIndex -= 1
nextIndex = 0
k_counter = 0
was_prev_1 = False
while nextIndex < lastIndex:
if was_prev_1:
if S_array[nextIndex] == S_array[nextIndex-1]:
... |
/**
* Parses an {@link Order}.
*
* <p>The code below does not recover from error conditions and will make
* the assumption that input is well formed, throwing unchecked
* exceptions whenever that is not the case.</p>
*
* @param line
* line to parse
*
* @return p... |
/**
* Increase stroke width.
* <p>
* Based on feedback we may need to change the dash array as well.
* <p>
*/
public void visit(Stroke stroke) {
Stroke copy = sf.getDefaultStroke();
copy.setColor( copy(stroke.getColor()));
copy.setDashArray( rescale(stroke.getDashArray()... |
<gh_stars>0
#ifndef UI_HPP
#define UI_HPP
#include <vector>
#include <string>
#include "../../include/util.hpp"
#include "../include/simulator.hpp"
struct VSCodePayload
{
unsigned int highlightLineNo;
std::string highlightClassName;
// | HighlightNormal // editor-line-highlight
// | Highlight... |
<filename>petabtests/core.py<gh_stars>1-10
import os
import sys
import importlib
import logging
import re
from .C import CASES_DIR
from .file import write_problem, write_solution
logger = logging.getLogger("petab_test_suite")
def create():
"""Create all test files."""
case_list = os.scandir(CASES_DIR)
c... |
def new_compiler(
*,
std_schema: s_schema.Schema,
reflection_schema: s_schema.Schema,
schema_class_layout: Dict[Type[s_obj.Object], s_refl.SchemaTypeLayout],
bootstrap_mode: bool = False,
) -> Compiler:
compiler = Compiler(None)
compiler._std_schema = std_schema
compiler._refl_schema = r... |
Assimilation in a new context: educational attainment of the immigrant second generation in Germany
This paper utilizes the German Mikrozensus to model competing secondary school outcomes among both foreign and naturalized children of guest workers, ethnic Germans, EU and third country immigrants. In line with previou... |
// Simple test scene with populate tree.
TEST_F(SceneTest, CheckTreeConstructTest)
{
EXPECT_FALSE(scene_tree_);
scene_tree_ = std::make_shared<sgl::SceneTree>();
EXPECT_TRUE(scene_tree_);
PopulateTree();
unsigned int count_mesh = 0;
unsigned int count_matrix = 0;
for (const auto& scene : *scene_tree_)
... |
Masters / MS / PhD Fully Funded Scholarships
2018 / 2019 Scholarships in USA
USA Fulbright Scholarships for International Students 2018 / 2019
Government of United State America (USA) USEFP is offering Fulbright Foundation scholarships for American and international students all over the world. These scholarships ar... |
package org.monjasa.engine.scenes;
import com.almasb.fxgl.app.scene.GameScene;
import com.almasb.fxgl.dsl.FXGL;
import com.almasb.fxgl.input.UserAction;
import com.almasb.fxgl.scene.Scene;
import com.almasb.fxgl.scene.SubScene;
import com.almasb.fxgl.texture.Texture;
import javafx.geometry.Pos;
import javafx.scene.eff... |
def left_rotate_s5(arr, d):
n = len(arr)
reverse(arr, 0, d - 1)
reverse(arr, d, n - 1)
reverse(arr, 0, n - 1) |
//************************************************************
// Author: twillie
// Created: 02/06/98
// Abstract: Return a subcollection containing only the
// elements of this collection that have the
// specified tag name.
//***********************************************... |
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { Storage } from '@ionic/storage';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'app-store-login',
templateUrl: './store-login.page.html',
styleUrls: ['./store-login.page.scss'],
})
ex... |
<gh_stars>0
package service
import "context"
func (s *service) Hello(ctx context.Context, name string) (resp string, err error) {
resp = "Hello!"
if name != "" {
resp = "Hello, " + name + "!"
}
return resp, nil
}
|
<gh_stars>0
import * as fs from 'fs';
const LINE_WIDTH=200;
const LINE_HEIGHT=60;
const MARGIN_TOP = 200;
const MARGIN=50;
const TEXT_HEIGHT_OFFSET = 40;
class Month {
constructor(public readonly name: string, public readonly days: number) {
}
}
const MONTH = [new Month('JANUAR', 31),
new Month('Februar'... |
/**
* Edmonds' cardinality matching algorithm. O(n^3)
*/
public class Matching {
int[][] graph;
int n;
int[] mu;
int[] phi;
int[] rho;
boolean[] scanned;
public Matching(int[][] graph) {
this.n = graph.length;
this.graph = graph;
mu = new int[n];
phi = new... |
/**
* Test of class ReviewEntity.
*
* @author Zhipeng Chang
*
* @since 1.0.0
*
* @author 1.0.0
*/
@RunWith(PowerMockRunner.class)
@PrepareForTest({ReviewEntity.class, ItemCommonDetailEntity.class, ReviewerEntity.class})
public final class ReviewEntityTest {
private final ItemCommonDetailEntity ... |
def delete_user_data(username: str):
user_folder = github_base_path.parent / (github_folder + username)
if user_folder.is_dir():
shutil.rmtree(user_folder)
else:
print(f"\n folder {user_folder} not found")
user_config = Path(config_file.as_posix() + username)
if user_config.is_file()... |
<reponame>dovanduy/skysmack-web<gh_stars>1-10
import { PackageType } from '@skysmack/framework';
export const InvoicesTypeId = '0e485267-6282-4e45-87f7-157de421d30b';
export class InvoicesType implements PackageType {
id = InvoicesTypeId;
dependencies = [];
}
|
class Format:
"""Represents a .svn/format file."""
def __init__(self, path):
self.path = path
def write_format(self, format_nbr, verbosity=0):
format_string = '%d\n'
if os.path.exists(self.path):
if verbosity >= 1:
print("%s will be updated." % self.path)
os.chmod(self.path,0600)... |
/*
* Generated by class-dump 3.3.4 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by <NAME>.
*/
#import "NSObject.h"
#import "DVTXMLUnarchiving-Protocol.h"
@class NSArray, NSMutableArray, NSString;
@interface IDEBreakpointAction : NSObject <DVTXMLUnarchiving>
{
NSString *_... |
export * from './components/footer/footer.component';
export * from './google-map/google-map.component';
export * from './components/nav/navbar.component';
|
/*
* Copyright (C) 2014-2021 <NAME> (www.helger.com)
* philip[at]helger[dot]com
*
* 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
... |
/* Copyright 2017 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.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
<reponame>Mvrlex/jabal
/**
* Represents a layout breakpoint.
*/
export interface Breakpoint {
name: string;
from: number;
to: number;
}
|
/*
This file is part of ALIZE which is an open-source tool for
speaker recognition.
ALIZE is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or any later ... |
/// Sends a message to the DNS server and attempts to read a response.
pub fn send_message<'buf>(&self, out_msg: &Message, buf: &'buf mut [u8])
-> Result<Message<'buf>, Error> {
let mut last_err = None;
// FIXME(rust-lang/rust#21906):
// Workaround for mutable borrow interfering with... |
Design of the New MST Radar in Chinese Meridian Project
With the support of the second phase of the Chinese Meridian Project, a new mesosphere–stratosphere–troposphere observation radar (MST radar), called Qinzhou MST radar, located in Qinzhou City, Guangxi Province, China (22°7′55′′N,108°16′20′′E) is under constructi... |
/**
* Requisition Item Business Object.
*/
public class RequisitionItem extends PurchasingItemBase {
private boolean itemRestrictedIndicator;
private String holdSupplierId; //not persisted
/**
* Default constructor.
*/
public RequisitionItem() {
}
public boolean isItemRestrictedIn... |
/*
========================
UpperTriangularSolve_SIMD
Solves x in Ux = b for the n * n sub-matrix of U.
* U has to be a upper triangular matrix
* invDiag is the reciprical of the diagonal of the upper triangular matrix.
* x == b is allowed
========================
*/
static void UpperTriangularSolve_SIMD( const idM... |
/**
* Process a return from Identity Cloud Services
*/
private void processRequest(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
String errorMsg = request.getParameter("error");
if (errorMsg != null) {
... |
<reponame>zeroturnaround/gradle-jrebel-plugin<gh_stars>10-100
/**
* Copyright (C) 2012 ZeroTurnaround <<EMAIL>>
*
* 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.ap... |
Precisely mapping a major gene conferring resistance to Hessian fly in bread wheat using genotyping-by-sequencing
Background One of the reasons hard red winter wheat cultivar ‘Duster’ (PI 644016) is widely grown in the southern Great Plains is that it confers a consistently high level of resistance to biotype GP of He... |
/**********************************
Start a button counting down till it turns off.
**********************************/
static void P_StartButton(line_t *line,bwhere_e w,Word texture,Word time)
{
button_t *button;
button = (button_t *)AddThinker(T_Button,sizeof(button_t));
button->line = line;
button->where = w;... |
text = raw_input()
if text==text.upper():
print text.lower()
elif text[0]==text[0].lower() and text[1:]==text[1:].upper():
final = text[0].upper() + text[1:].lower()
print final
else:
print text |
// A more accurate fix16 sin function
static fix16_t sin_taylor(fix16_t radians ) {
while( -(fix16_pi>>1) > radians ) {
radians += fix16_pi<<1;
}
while( (3*fix16_pi)>>1 <= radians ) {
radians -= fix16_pi<<1;
}
if( fix16_pi>>1 < radians ) {
radi... |
/**
* A DimensionUsage is usage of a shared
* Dimension within the context of a cube.
*/
public static class DimensionUsage extends CubeDimension {
/**
*
*/
private static final long serialVersionUID = 1L;
public String source; // required attribute
publ... |
// Copyright 2020 The Sputnik 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... |
def search_tfidf(self, doc):
vec_bow = dictionary.doc2bow(doc)
vec_tfidf = tfidf[vec_bow]
return [(revind[x[0]], x[1]) for x in index_tfidf[vec_tfidf]] |
def value_in_unit_system(self, system):
result = self.in_unit_system(system)
if is_quantity(result):
return result._value
else:
return result |
Sen. Bernard Sanders of Vermont is better-liked among overall voters and runs ahead of 2016 Democratic presidential rival Hillary Clinton in match-ups with top 2016 GOP candidates, according to a poll released Thursday.
Mr. Sanders led Ohio Gov. John Kasich by 4 points, businessman Donald Trump and Sen. Marco Rubio of... |
<gh_stars>0
import json
import requests
class StreamParser(object):
def __init__(self, user, token):
structure = json.loads(
requests.get(url="https://" + user + ".pryv.me/streams", params={"auth": token}).text)
self.streams = []
self.extract_streams(structure['streams'])
... |
"""Miscellaneous utilities.
"""
import os
from http import HTTPStatus
empty_response = ("", HTTPStatus.NO_CONTENT)
def boolstr(s):
"""Interpret string s as a Boolean.
This is intended for interpreting HTTP query parameters. "False",
"no" or "off" in any case and any representation of the
integer 0 c... |
Determination of Lamb Wave Modes on Lithium-Ion Batteries Using Piezoelectric Transducers
This work presents a method to determine the type of Lamb mode (antisymmetric or symmetric) that propagates through a lithium-ion pouch cell. To determine the type of mode and the group velocity at a specific frequency, two- and ... |
#!/usr/bin/env python3
#
# Copyright 2007-2018 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
"""
Unit tests for OFDM cyclic prefixer.
"""
from gnuradio import gr, gr_unittest, digital, blocks
import pmt
class test_ofdm_cyclic_prefixer (gr_unittest... |
<filename>src/components/mls.ts
import * as path from 'path';
import * as vscode from 'vscode';
import * as lsp from 'vscode-languageclient';
import { AppConfig, loadConfig } from './config';
import { checkDocumentLanguage } from '../extension';
// @ts-ignore
const EXTENSION_PATH = vscode.extensions.getExtension('Pon... |
import pytest
from pyisemail.diagnosis import BaseDiagnosis
from pyisemail.validators import ParserValidator
from tests.validators import create_diagnosis, get_scenarios
scenarios = get_scenarios("tests.xml")
threshold = BaseDiagnosis.CATEGORIES["THRESHOLD"]
@pytest.mark.parametrize("test_id,address,diagnosis", scen... |
package com.github.Is0x4096.common.utils.encrypt;
import com.google.common.base.Preconditions;
import org.apache.commons.codec.digest.DigestUtils;
/**
* @Author: peng.zhup
* @Project: common-utils
* @DateTime: 2019/6/8 0:19
* @Description: 加密工具类, 包括 MD5, sha1 等
*/
public class EncryptUtils {
private Encryp... |
<filename>app/src/main/java/projectp4/studio/com/gerenciador_universitario/MainActivity.java
package projectp4.studio.com.gerenciador_universitario;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.database.sqlite.SQLiteDatabase;
import android.support... |
#ifndef _CAMERA_H
#define _CAMERA_H
// This was created to allow you to use this camera code in your projects
// without having to cut and paste code. This file and camera.cpp should be
// added to your project.
// This is our camera class
class CCamera {
public:
// Our camera constructor
CCamera(... |
package lavalink.client.player.event;
import lavalink.client.player.IPlayer;
public class WebSocketClosedEvent extends PlayerEvent{
private final int code;
private final String reason;
private final boolean remote;
public WebSocketClosedEvent(IPlayer player, int code, String reason, boolean remote){
... |
/*******************************************************************************
* Remove the oldest indication request, but check if this was really answered
******************************************************************************/
static void sl_remove_last_indication(uint8_t characteristic)
{
if (indicaton... |
// find node and return node index or -1 if node is not in list
int klist_find_node(const klist_t* list, const klist_node_t* node)
{
int i = 0;
klist_node_t* tmp;
klist_iterate_fw(list, tmp)
{
if(tmp == node) return i;
}
return -1;
} |
from Mapa import*
def HP(Sopa,Palabra)
RV=False
for pos_inicial in PosEnSopa(Sopa,Palabra[0]):
RV=RV or HP_pos_inicial(Sopa,Palabra,pos_inicial)
return RV
def HP_pos_inicial(Sopa,Palabra,pos_inicial):
if(Palabra.len()==1):
RV=True
else:
RV=False
escribir(Sopa,pos_inicial,2)
Palabra_aux=Palabra
Palabra... |
/**
* Implementation of {@link org.reactivestreams Reactive Streams} with operators
* backed by {@link io.helidon.common.reactive Helidon reactive streams}.
*
* @see org.eclipse.microprofile.reactive.streams.operators.spi.ReactiveStreamsEngine
*/
public class HelidonReactiveStreamEngine implements ReactiveStreamsE... |
/**
* PsiFile for SQF language
*
* @author Kayler
* @since 10/31/2015
*/
public class SQFFile extends PsiFileBase {
public SQFFile(FileViewProvider viewProvider) {
super(viewProvider, SQFLanguage.INSTANCE);
}
@NotNull
@Override
public FileType getFileType() {
return SQFFileType.INSTANCE;
}
/*
@Overri... |
/**
* Visits the declarations and the formula if
* this.visited(quantFormula) returns false. Otherwise does nothing.
* @ensures quantFormula.declarations.accept(this) && quantFormula.formula.accept(this)
*/
public void visit(QuantifiedFormula quantFormula) {
if (visited(quantFormula)) return;
quantFormula... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.