content stringlengths 10 4.9M |
|---|
async def check_author(self, ctx: commands.Context, board_size: int) -> bool:
if self.already_playing(ctx.author):
await ctx.send("You're already playing a game!")
return False
if ctx.author in self.waiting:
await ctx.send("You've already sent out a request for a play... |
#!/usr/bin/env python
import rrdtool
def crearRRD(nombre):
ret = rrdtool.create(nombre+'.rrd',
"--start",'N',
"--step",'60',
"DS:inmulti:COUNTER:600:U:U",
"DS:ippackets:COUNTER:600:U:U",
"DS:icmpme:COUNTER:600:... |
A Model for the Dynamics of Gene Networks
In this work we propose a model for gene expression based on the theory of random dynamical systems (RDS) and show that it has a "modularity property" in the following sense: given any collection of genes that are linked in a transcriptional network, if each of them is individ... |
/**
* Retrieve all TODO entries.
*
* @param context security context to map the user
* @param headers HTTP headers
* @return the response with the retrieved entries as entity
*/
@SuppressWarnings("checkstyle:designforextension")
@GET
@Produces(MediaType.APPLICATION_JSON)
public... |
<gh_stars>1-10
/*
* generated by CSeq [ 0000 / 0000 ]
*
* instance version {}
*
* 2020-07-04 08:11:19
*
* params:
* --ee 6, --rounds 1, --prom 0, -i testbed-pack/mutex/Table2/2a/peterson_4_fenced.c,
*
*/
#define __cs_MUTEX_INITIALIZER -1
#define __cs_COND_INITIALIZER -1
#define __cs_RWLOCK_INITIAL... |
// fetchRecentIssues retrieves issues from DB, but only fetches issues modified since last call
func fetchRecentIssues(db *gorm.DB, last *time.Time, out chan sql.Issue) error {
glog.Infof("Fetching issues updated after %s", *last)
var issues []sql.Issue
query := db.Where("issue_updated_at >= ?", last).Order("issue_u... |
<reponame>PPACI/krakenbeat<filename>vendor/github.com/elastic/beats/packetbeat/protos/mongodb/config.go<gh_stars>1-10
package mongodb
import (
"github.com/elastic/beats/packetbeat/config"
"github.com/elastic/beats/packetbeat/protos"
)
type mongodbConfig struct {
config.ProtocolCommon `config:",inline"`
M... |
<filename>crypto/chameleon_hash.go
package crypto
import (
"bufio"
"crypto/rand"
"crypto/sha256"
"errors"
"fmt"
"math/big"
"os"
)
const HEX_BASE = 16
const CH_SIZE = 256 // Length of a single parameter in bytes.
const CH_PARAM_SIZE = 64
var (
ChameleonHashParametersMap = make(map[[32]byte]*ChameleonHashParam... |
def _f_to_mz(self):
Aterm, Bterm, Cterm = self.Aterm, self.Bterm, self.Cterm
if Cterm == 0:
if Bterm == 0:
mz_domain = Aterm / self.freq_exp_profile
else:
mz_domain = (Aterm / (self.freq_exp_profile)) + (Bterm / power((self.freq_exp_profile), 2))
... |
def create_app(
routes=None,
*,
config: Optional[Mapping] = None,
plugins=None,
error_handlers=None,
flask_args=None,
proxied=True,
callbacks=None
):
routes = routes or []
plugins = plugins or []
error_handlers = error_handlers or default_error_handlers
flask_args = flask... |
/**
* Contains classes for the extraction and modelling of JPEG file format metadata.
*/
package com.drew.metadata.jpeg;
|
def _CleanUpUpdateCommand(self, tf, dirs_to_remove):
tf.close()
self._EnsureDirsSafeForUpdate(dirs_to_remove)
for directory in dirs_to_remove:
try:
shutil.rmtree(directory)
except OSError as e:
if not platform.system().lower().startswith('windows'):
raise |
FORT SMITH, Ark.-- - Fort Smith Police arrest man after he was shot for acting "erratic" and holding a rock.
Police responded to a report of man running from location to location yelling about guns, assault rifles and being chased. Officers found 41-year-old Michael Woith running from Fort Smith Blue Print. He was lat... |
"""
Repeating Letters
- Objective: Create a function that takes in an input [of string data type]
and returns an output [of string data type] in which each item in the string
is repeated ONCE.
- Examples:
- double_char("String") ➞ "SSttrriinngg"
- double_char("Hello World!") ➞ "HHee... |
def _message(self, color_code):
if self.color:
message = '\033[1m[' + color_code + '{}\033[00m\033[1m] ' \
+ color_code + '{}()\033[00m'
else:
message = '[{}] {}()'
return message |
/**
* This class created on 2019/3/7
*
* @author Lucifer
* @description
*/
public class TruncateExecutorTaskTest {
String json = "{\"id\":\"test\"}";
@Test
public void testSerialize() throws Exception {
ExecutorTask executorTask = new TruncateExecutorTask(new SourceKey("test"));
Asser... |
Radical animal-rights activists’ who crashed a Bernie Sanders rally Monday and want to ban meat have found hope in an unlikely place: Hillary Clinton’s presidential platform.
They say they’re heartened by her new animal-welfare position paper, which she rolled out in early May with zero fanfare and after getting advic... |
"""Support for Xiaomi Gateways."""
import asyncio
import logging
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers import discovery
from homeassistant.helpers.entity import Entity
from homeassistant.components.discovery import SERVICE_XIAOMI_GW
from homeassistant.c... |
CLOSE Ted Cruz plans to back Donald Trump for the presidency. WIBBITZ
Donald Trump and Ted Cruz take part in the March 10 debate in Coral Gables, Fla. (Photo11: Pedro Portal, AP)
WASHINGTON — Despite many angry battles with Donald Trump, including attacks on his wife and father, Texas Sen. Ted Cruz announced Friday h... |
pub mod io;
pub use self::io::*;
|
This is some seriously fucked up shit:
According to Kansas City-based International House of Prayer founder and evangelist Mike Bickle—who played a major role in the August 6th “The Response” prayer event that served as the de facto kickoff event for Rick Perry’s presidential bid—in the near future Jews who refuse to ... |
/**
* A class with the convenience methods for resolve actions
*/
public abstract class ActionsPolicy {
/**
* An interface for using in conjunction with AsyncTask for have
* a
*/
protected interface BackgroundCallable {
/**
* Method that returns the resource identifier of the ... |
/**
* Make a {@link ProjectionEvaluator} that processes the logic of a {@link Projection}.
*
* @param projection - Defines the projection that will be processed. (not null)
* @return A {@link ProjectionEvaluator} for the provided {@link Projection}.
*/
public static ProjectionEvaluator make(fin... |
<reponame>raxod502/CAS
package cas;
public abstract class NumNumSum extends NumComplexImaginary {
public final ComplexDouble complexDoubleValue() {
return new ComplexDouble(doubleValue());
}
public abstract double doubleValue();
public final Compare isReal() {
return YES;
}
public final Compare isImag() ... |
Superstability in Tame Abstract Elementary Classes
In this paper we address a problem posed by Shelah in 1999 to find a suitable notion for superstability for abstract elementary classes in which limit models of cardinality $\mu$ are saturated.
Theorem 1. Suppose that $\mathcal{K}$ is a $\chi$-tame abstract elementar... |
import java.util.*;
public class vowelly
{
public static void main(String []args)
{
Scanner in=new Scanner(System.in);
//int t=in.nextInt();
//while(t-->0)
//{
int k=in.nextInt();
int i,n=-1,m=-1,x=0,j;
String s="",p="";
for(i=0;i<20005... |
// Make sure that we cannot load from memory a `&mut` that got already invalidated.
fn main() {
let x = &mut 42;
let xraw = x as *mut _;
let xref = unsafe { &mut *xraw };
let xref_in_mem = Box::new(xref);
let _val = unsafe { *xraw }; // invalidate xref
let _val = *xref_in_mem; //~ ERROR does not... |
package main
import (
"context"
"fmt"
"github.com/machinebox/graphql"
)
const (
serverEndpoint = "http://localhost:8080/query"
listBooks = `
query ($limit: Int) {
list(limit: $limit) {
name
price
description
}
}
`
getBook = `
query ($name: String!) {
book (name: $name) {
name
price... |
// NewFileAccessReport returns a new *FileAccessReport
func NewFileAccessReport() *FileAccessReport {
return &FileAccessReport{
ModelVersion: 1,
Host: "localhost",
MigrationsLog: map[string]string{},
Mode: "rxw",
Path: "/etc/passwd",
}
} |
def _compile_efficiencies(self, cutflow_histograms, relative=False, base_bin=1):
for root_histogram in cutflow_histograms.values():
if relative:
for x_bin in xrange(root_histogram.GetNbinsX(), 1, -1):
new_bin_content = root_histogram.GetBinContent(x_bin)
if new_bin_content != 0:
new_bin_content... |
// make sure credential created in rust on public attributes verifies in go
func TestRustSignatureOnPublic(t *testing.T) {
params, err := coconutGo.Setup(2)
unwrapError(err)
xBytes := []byte{188, 179, 7, 116, 227, 238, 248, 132, 112, 18, 3, 169, 6, 179, 97, 202, 90, 175, 245, 181, 102, 111, 238, 21, 91, 248, 205, 11... |
Telecommunications company Spark is apologising to a Foxton man for misinforming him about his phone being redirected to a phone box, when it appears human error during line maintenance left it in limbo.
Yesterday, the Manawatu Standard reported the story of Geoff Jaggard, whose phone line was switched.
Instead of hi... |
<reponame>murrcha/kkaysheva
package ru.job4j.list;
import org.junit.Before;
import org.junit.Test;
import java.util.NoSuchElementException;
import static org.junit.Assert.assertThat;
import static org.hamcrest.Matchers.is;
/**
* SimpleList Test
*
* @author <NAME> (<EMAIL>)
* @version $Id$
* @sin... |
<filename>src/find.rs
use crate::{
decode::Decoder,
editor::Editor,
keypress::{self, PromptCommand},
terminal::RawTerminal,
};
pub(crate) fn find(
term: &mut RawTerminal,
decoder: &mut Decoder,
editor: &mut Editor,
) -> keypress::Result<()> {
let mut find = if let Some(find) = editor.fi... |
<reponame>leonardyp/gfast
package main
import (
_ "gfast/boot"
_ "gfast/router"
"github.com/gogf/gf/frame/g"
"github.com/gogf/swagger"
)
// @title GFast
// @version 2.0
// @description GFast后台管理框架
// @schemes http https
func main() {
s := g.Server()
s.Plugin(&swagger.Swagger{})
s.Run()
}
|
/**
* Creates a native promise that defers its resolution to the given thenable.
*
* @param <V> the value type
* @param thenable the wrapped thenable
* @return the new JS promise
*/
public static <V> JsPromise<V> deferResolve(final Thenable<? extends V> thenable) {
return create(new JsPromiseHandler<V>() ... |
X,N = map(int,input().split())
p_li = set(map(int,input().split()))
p = set(range(-200,200))
kouho = p - p_li
ans = 10000
sa_min = 1000000
for i in sorted(list(kouho)):
sa = abs(X-i)
if sa_min > sa:
ans = i
sa_min = sa
print(ans)
|
#![allow(non_snake_case)]
use std::io::stdin;
pub fn main() {
let stdin = stdin();
let mut buf = String::new();
stdin.read_line(&mut buf).unwrap();
let N: i32 = buf.trim_right().parse().unwrap();
let mut ok = false;
'a: for x in 0..100 {
for y in 0..100 {
if N == 7 * x + ... |
<filename>src/app/components/home/home.component.ts<gh_stars>1-10
import { Component, OnInit } from '@angular/core';
import { AuthService } from '../../services/auth.service';
import { FirestoreService } from 'src/app/services/firestore.service';
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
im... |
<reponame>mslovy/barrelfish<filename>usr/skb/eclipse_kernel/src/database.h
/* BEGIN LICENSE BLOCK
* Version: CMPL 1.1
*
* The contents of this file are subject to the Cisco-style Mozilla Public
* License Version 1.1 (the "License"); you may not use this file except
* in compliance with the License. You may obtain... |
<filename>doc/tutorials/content/sources/correspondence_grouping/correspondence_grouping.cpp
#include <pcl/io/pcd_io.h>
#include <pcl/point_cloud.h>
#include <pcl/correspondence.h>
#include <pcl/features/normal_3d_omp.h>
#include <pcl/features/shot_omp.h>
#include <pcl/features/board.h>
#include <pcl/keypoints/uniform_s... |
<reponame>MistressAlison/OrangeJuiceTheSpire<gh_stars>1-10
package Moonworks.cards.abstractCards;
import Moonworks.OrangeJuiceMod;
import basemod.BaseMod;
import basemod.helpers.TooltipInfo;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import java.ut... |
New emails from President Trump Donald John TrumpHouse committee believes it has evidence Trump requested putting ally in charge of Cohen probe: report Vietnamese airline takes steps to open flights to US on sidelines of Trump-Kim summit Manafort's attorneys say he should get less than 10 years in prison MORE’s campaig... |
<filename>hc-base/src/main/java/pro/haichuang/framework/base/enums/error/client/RegisterErrorEnum.java
package pro.haichuang.framework.base.enums.error.client;
import com.fasterxml.jackson.annotation.JsonCreator;
import pro.haichuang.framework.base.enums.BaseEnum;
/**
* 用户注册异常枚举
*
* @author JiYinchuan
* @see pro.... |
from .EPTS import EPTS
__version__ = '0.3.4'
|
/**
Input prop stream.
*/
class InputPropStream final
: public IO::PropStream
{
private:
using base = IO::PropStream;
std::istream* m_stream;
InputPropStream() = delete;
InputPropStream(InputPropStream const&) = delete;
InputPropStream& operator=(InputPropStream const&) = delete;
InputPropStream& operator=(Inpu... |
<reponame>ThMountainMan/Invoice_Tracking
"""empty message
Revision ID: aade8d0a3974
Revises: 2.1
Create Date: 2021-12-29 10:52:50.028611
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "2.2"
down_revision = "2.1"
branch_labels = None
depends_on = None
def upg... |
/**
* Executes the command and returns the result message.
*
* @param model {@code Model} which the command should operate on.
* @return feedback message of the operation result for display
* @throws CommandException If an error occurs during command execution.
*/
@Override
public Comm... |
#include<bits/stdc++.h>
using namespace std;
long long int func(long long int n, long long int r)
{
long long int p = 1, k = 1;
if (n - r < r)
r = n - r;
if (r != 0) {
while (r) {
p = 1LL*p*n;
k = 1LL*k*r;
// gcd of p, k
long long int m = __gcd(p, k);
... |
def metadataTypeGrouping(classes, sampleGroups=None, catVsContRatio=0.75):
ns = classes.shape[0]
nsnan = ns - sum(classes.isnull()) + 1
if sampleGroups is None:
sampleGroups = pandas.Series('Sample' for _ in range(ns))
myset = set(list(type(classes[i]) for i in range(ns)))
uniq = classes.unique()
if uniq.shape[... |
/**
* Class that represents all the request and replies for each cloud
* Note there is N object of this class (each object e connected with each cloud)
*
* @author tiago oliveira
* @author bruno quaresma
*
* Modified by @author Andreas Rain, University of Konstanz
*/
public class DepSkyCloudMa... |
<filename>src/module-info.java
module Condominiums.Mangment.System {
requires javafx.controls;
requires javafx.fxml;
requires javafx.graphics;
requires java.sql;
requires com.jfoenix;
requires fontawesomefx;
requires org.apache.derby.tools;
requires org.apache.derby.client;
requires... |
/*
* 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 "License"); you may ... |
X‐Ray Spectral Variability of BL Lac Objects
The energy spectra of the BL Lac objects PKS 0548-322 and 3C66A between 0.2 and 10 KeV have been obtained at several epochs in 1979 and 1980 by combining the simultaneous imaging proportional counter and monitoring proportional counter data of the Einstein Observatory. It i... |
#ifndef _FILESTORAGE_h
#define _FILESTORAGE_h
#include <functional>
#include <Arduino.h>
#include "FS.h"
#define YEAR_DAY 365.24
#define DAY_HOUR 24
#define HOUR_SEC 3600
#define ONEYEAR (YEAR_DAY * DAY_HOUR * HOUR_SEC)
#define FILE_WRITE "w"
#define FILE_APPEND "a"
#define FILE_READ "r"
#define FILE_NAME_LOG_DATA ... |
// SPDX-License-Identifier: MIT
// Package id 针对 ID 的一些操作函数
package id
import (
"fmt"
"strings"
)
// Level 表示区域的级别
type Level uint8
// 对区域级别的定义
const (
Village Level = 1 << iota
Town
County
City
Province
AllLevel = Village + Town + County + City + Province
)
var lengths = map[Level]int{
Village: 12,
To... |
The total cost of attending The Lawrenceville School is $59,170. Facebook/LawrencevilleSchool There are at least 50 universities in the US that charge over $60,000 a year to attend — a serious investment for any degree. And yet, some families begin investing in their children's education even earlier than college.
For... |
<reponame>DEVESHTARASIA/parabuntu<gh_stars>1-10
/*
* $HEADER$
*/
#ifndef OMPI_MPI_EXT_H
#define OMPI_MPI_EXT_H 1
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
#define OMPI_HAVE_MPI_EXT 1
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif /* OMPI_MPI_EXT_H */
|
If you hear something enough times, you will believe it. This is not speculation as much as it is a function of the human condition.
In the political realm, ideas may start off as unpalatable – but if they are asserted enough times, by virtue of their repetition alone, they are eventually believed. Walter Langer, auth... |
/** Returns an ArrayList containing elements in the path from the root leading to the specified element, returns an empty ArrayList if no such element exists. */
public ArrayList<E> path(E e)
{
if(search(e))
{
java.util.ArrayList<E> list = new java.util.ArrayList<>();
TreeNo... |
from django import template
from MyWatchList.models import WatchList
from MyWatchList.models import SeriesList
register = template.Library()
@register.inclusion_tag("Serials/blocks/Following.html")
def followingListS(profile,season):
return {
'following': WatchList.objects.filter(
user__profi... |
from collections import defaultdict
N, W = map(int, input().split())
MAX_NUM = []
len_weights = 0
def dfs(nums):
if len(nums) == len_weights:
sum_w = 0
value = 0
for i in range(len_weights):
sum_w += weights[i] * nums[i]
if nums[i] >= 1:
value += ite... |
package de.ropemc.rv2.api.event.game;
import de.ropemc.rv2.api.event.Cancellable;
import de.ropemc.rv2.api.event.Event;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class ClientChatEvent extends Event implements Cancellable {
private boolean cancelled = fals... |
Non-Bank Finance-Companies in Mexico: Liquidity Shock or Deregulation?
We study the severe credit crunch of finance companies (SOFOLES) in Mexico using firm-level data between 2001 and 2011. Our results provide supporting evidence for a liquidity shock in the form of restricted access to commercial bank loans, loans f... |
/**
* Sums and returns the total number of values in the
* given {@code indices}.
*
* @param indices
* @return
*/
public static long count(IndexSet[] indices) {
long result = 0;
for(IndexSet indexSet : indices) {
result += indexSet.size();
}
return result;
} |
/// Returns `true` if the event message contains no events.
pub fn is_empty(&self) -> bool {
self.messages
.lock()
.expect("MessageAdapter::is_empty: Cannot lock messages.")
.is_empty()
} |
<commit_msg>Work better with binary files?
<commit_before>import Network.Socket hiding (send, sendTo, recv, recvFrom)
import Network.Socket.ByteString
import qualified Data.ByteString.Char8 as C
import qualified Data.ByteString.Lazy as B
import Control.Concurrent
import Control.Exception
-- This is most likely really ... |
package smn_str_rendering
import (
"github.com/ProtossGenius/SureMoonNet/basis/smn_data"
"github.com/ProtossGenius/SureMoonNet/basis/smn_file"
"github.com/ProtossGenius/SureMoonNet/basis/smn_func"
"fmt"
"io"
"os"
"strings"
"text/template"
"unicode"
)
type CFWriter struct {
IsWriteToConsole bool
file ... |
Analysis of finite‐length gyrotropic hard‐surface waveguide
Electromagnetic fields and mode transformation effect are theoretically investigated inside a hard‐surface (HS) circular waveguide. The waveguide section causing a mode transformation is filled with gyrotropic material, e.g., magnetoplasma or ferrite. In this... |
/**
* @author Nicolas Morel
*/
public final class JsonPropertyOrderTester extends AbstractTester {
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
public static class BeanWithPropertiesNotOrdered {
protected int intProperty;
protected String stringProperty;
@JsonPr... |
Remittances and Expenditure Patterns of the Left Behinds in Rural China
This paper investigates how private transfers from internal migration in China affect the expenditure behaviour of families left behind in rural areas. Using data from the Rural-Urban Migration in China (RUMiC) survey, we assess the impact of remi... |
def crop_map(self, coord: tuple, draw_path: bool = True):
if draw_path:
cv2.circle(
img=self._win_background,
center=tuple(coord),
radius=2,
color=(0, 0, 255),
thickness=-1,
)
coord = list(coord)
... |
// PreFlagger.h: DP3 step class to flag data on channel, baseline, or time
// Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
// SPDX-License-Identifier: GPL-3.0-or-later
/// @file
/// @brief DP3 step class to flag data on channel, baseline, or time
/// @author Ger van Diepen
#ifndef DP3_STEPS_P... |
Effect of atmospheric oxidation on bioavailability of meat iron and liver weights in rats.
Iron bioavailability of diets containing oxidized turkey and oxidized beef meat was investigated in two experiments. Lyophilized, uncooked turkey meat and beef meat were allowed to oxidize at room temperature. In experiment 1, r... |
Media playback is unsupported on your device Media caption Eyewitness Natalie Galley: "I heard a huge explosion"
Turkey has vowed to retaliate against the perpetrators of a powerful blast in the capital Ankara that left at least 28 people dead and 61 injured.
"Turkey will not shy away from using its right to self-def... |
/**
* @author hundun
* Created on 2020/11/17
*/
public class AmiyaChimera extends ArknightsModCard {
private static final Logger logger = LogManager.getLogger(AmiyaChimera.class.getName());
public static final String ID = ArknightsMod.makeID(AmiyaChimera.class);
public static final String IMG = Ark... |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
module Distribution.Types.ForeignLib(
ForeignLib(..),
emptyForeignLib,
foreignLibModules,
foreignLibIsShared,
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Package
import Distribution.ModuleName
imp... |
//@HEADER
// ***********************************************************************
//
// EpetraExt: Epetra Extended - Linear Algebra Services Package
// Copyright (2011) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains c... |
// Code generated by mockery v1.0.0. DO NOT EDIT.
package service
import mock "github.com/stretchr/testify/mock"
import service "github.com/rodrigodiez/zorro/pkg/service"
// Zorro is an autogenerated mock type for the Zorro type
type Zorro struct {
mock.Mock
}
// Mask provides a mock function with given fields: key... |
Breathing Modes, Quartic Nonlinearities and Effective Resonant Systems
A breathing mode in a Hamiltonian system is a function on the phase space whose evolution is exactly periodic for all solutions of the equations of motion. Such breathing modes are familiar from nonlinear dynamics in harmonic traps or anti-de Sitte... |
// Proposals is a free data retrieval call binding the contract method 0x013cf08b.
//
// Solidity: function proposals(uint256 ) view returns(bytes32 name, uint256 voteCount)
func (_Contract *ContractCaller) Proposals(opts *bind.CallOpts, arg0 *big.Int) (struct {
Name [32]byte
VoteCount *big.Int
}, error) {
ret ... |
<gh_stars>0
import glob
import os
import sys
from pprint import pprint
import matplotlib.pyplot as plt
sys.path.append('../')
import holoclean
from detect import NullDetector, ViolationDetector
from repair.featurize import *
import numpy as np
import pandas as pd
# import logging
# logging.basicConfig(filename='hospita... |
def _update_sync_timestamp(self, path, timestamp):
with self.fsmap_lock:
if path in self.fsMap:
self.fsMap[path]['last_sync'] = timestamp
self._save() |
<reponame>summer789/react-drag-table
import React, { Component } from 'react';
import Table from './components/table/';
import { columns, dataSource, DataItem } from './components/data';
import { ColumnsProps } from './components/table/interface';
import Tbody from './components/table/components/tbody';
import { DropRe... |
def _initLoad(self):
self.video = cv2.VideoCapture(self.video_path)
if not self.video.isOpened():
print("Could not open video")
print(help)
sys.exit(-1)
ok, self.frame = self.video.read()
if not ok:
print("Error - Could not read a video fil... |
<reponame>nimezhu/indexed<gh_stars>1-10
/* Copyright (C) 2016 <NAME>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later versi... |
<reponame>chromium/chromium<filename>chrome/browser/ui/ash/keyboard/chrome_keyboard_ui.cc
// Copyright (c) 2013 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.
#include "chrome/browser/ui/ash/keyboard/chrome_keyboard_ui.... |
/**
* Manages application images.
*
* @author CBONACETO
*
*/
public class ImageManager {
/** Icon size */
public static final Dimension IconSize = new Dimension(20, 20);
/** Default size for evidence images */
public static final Dimension EvidenceImageSize = new Dimension(50, 50);
/** Icon Types */
p... |
<filename>gozokia/i_o/input.py
import sys
from .io_base import InputBase
from .io_voice import VoiceRecognizerMixin
from gozokia.conf import settings
class InputTerminalText(InputBase):
def listen(self, *args, **kwargs):
super(InputTerminalText, self).listen(*args, **kwargs)
"""
Normalize... |
<gh_stars>0
import { Module } from '@nestjs/common';
/*
import { ConfigModule, ConfigService } from '@nestjs/config';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { GraphQLModule } from '@nestjs/graphql';
import { TypeOrmModule } from '@nestjs/typeorm';
import { I... |
// Code generated by go-swagger; DO NOT EDIT.
package storage_profile
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// New creates a new storage ... |
<commit_msg>Add __slots__ to satisfy tests (rudimentary_repr is still ordinary __repr__ if __slots__ are there).
<commit_before>class Bad(Exception):
def __repr__(self):
raise RuntimeError("I'm a bad class!")
def a():
x = Bad()
return x
def b():
x = Bad()
raise x
a()
try:
b()
except ... |
Repeatability and reproducibility of corneal higher-order aberrations measurements after small incision lenticule extraction using the Scheimpflug-Placido topographer
Background To evaluate the precision of corneal higher-order aberrations measurements after small incision lenticule extraction (SMILE) using the Sirius... |
It is 2am on Sunday and the phones never stop ringing at the Caracol radio station in northern Bogotá. The light banter that normally entertains listeners to the graveyard shift is missing. This weekly radio programme, Voices of Kidnapping, reaches out to the thousands of hostages held by illegal armed groups across Co... |
def send_from_directory(directory, filename, **options):
filename = posixpath.normpath(filename)
if filename.startswith(('/', '../')):
raise NotFound()
filename = os.path.join(directory, filename)
if not os.path.isfile(filename):
raise NotFound()
return send_file(filename, conditiona... |
def line(self, datafile):
for key, value in self.description().items():
df = datafile
for par, res in self.description().items():
if key != par:
df = df.loc[df[par] == self.param_dict[par]]
xdata = (df[key]).to_list()
ydata = (d... |
Validation in Ecuadorian Population of a Self-injury Questionnaire Without Suicide - Intention Based on the DSM-5
Self-injury behaviors have been related to different syndromes of anxiety, depression, attempted suicide and consummate suicide, bullying, and physical and/or sexual abuse. Similarly, this symptomatology h... |
Erick Erickson calls Wendy Davis an "abortion Barbie" The conservative commentator just may have something to do with his party's "woman problem"
Remember that whole mystery Republican strategists were trying to solve about why women don't seem to "connect" with their party?
Well, I may have found a clue!
On Monday,... |
counter=0
numoftest=input()
numoftest=int(numoftest)
while counter<numoftest:
numofnum=input()
numofnum=int(numofnum)
numbers=input()
numbers=numbers.split()
counter3=0
while numofnum>counter3:
numbers[counter3]=int(numbers[counter3])
counter3=counter3+1
smallestnumber=numbers[numofnum... |
<filename>src/models/server.rs
/*
* Hetzner Cloud API
*
* Copied from the official API documentation for the Public Hetzner Cloud.
*
* The version of the OpenAPI document: 0.4.0
*
* Generated by: https://openapi-generator.tech
*/
/// Server : Servers are virtual machines that can be provisioned.
#[derive(C... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.