content stringlengths 10 4.9M |
|---|
def motivational_sentences():
if not Authentication(session).is_signed_in():
return redirect("/LogIn")
return render_template(
"basic/motivationwall.html",
) |
Benchmark Pashto Handwritten Character Dataset and Pashto Object Character Recognition (OCR) Using Deep Neural Network with Rule Activation Function
In the area of machine learning, different techniques are used to train machines and perform different tasks like computer vision, data analysis, natural language process... |
#include<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<string>
#include<queue>
using namespace std;
long long f[200005];
int main()
{
ios::sync_with_stdio(false);
int n;
cin>>n;
int num=n/2;
for(int i=1;i<=n;i++)
{
cin>>f[i];
}
for(int ... |
def on_socket_open(self, ws):
self.ws = ws |
<reponame>pinchuk-dmitriy/EPAM
package PageObject;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.ui.ExpectedConditi... |
/**
* @author Marcin Grobelak
*/
public class ScoreCalculator {
public static void setScore(List<Frame> frames) {
int index = frames.size() - 1;
Frame last = frames.get(index);
if (!last.isFullPointer()) {
last.setScore(last.getSumOfRolls());
}
if (frames.size() >= 2) {
Frame previo... |
// Read the data from the given reader and parse it as a slice of strings, where we assume strings are separated by
// whitespace or newlines. All extra whitespace and empty lines are ignored.
func parseSliceFromReader(reader io.Reader) ([]string, error) {
out := []string{}
scanner := bufio.NewScanner(reader)
for sc... |
/* strip off surrounding delimiters around variables */
char *process_var(const char *var)
{
const char *orig = var;
int len = strlen(var);
if (*orig == '@' || *orig == '$') {
orig++;
len--;
} else {
PERROR("ASSERT: Found var '%s' without variable prefix\n",
var);
return NULL;
}
if (*orig == '{')... |
<gh_stars>0
import config from "../config";
import session from "express-session";
import genuuid from "uuid/v4";
import { SessionMiddleware, SessionStore } from "ch-node-session-handler";
import Redis from "ioredis";
import { RequestHandler } from "express";
// Get stubbed cookie and session middleware for node envir... |
The unit of time, the second, was at one time considered to be the fraction 1/86 400 of the mean solar day. The exact definition of "mean solar day" was left to the astronomers. However measurements showed that irregularities in the rotation of the Earth made this an unsatisfactory definition. In order to define the un... |
<filename>Engine_dw-job-scheduler/src/main/java/com/distributedworkflowengine/jobscheduler/config/RedisConfig.java
package com.distributedworkflowengine.jobscheduler.config;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.CacheConfi... |
def pydeps2reqs(deps):
reqs = defaultdict(set)
baseprefix = sys.real_prefix if hasattr(sys, 'real_prefix') else sys.base_prefix
pkgnames = find_package_names()
for k, v in list(deps.items()):
p = v['path']
if p and not p.startswith(baseprefix):
if is_site_package(p):
... |
/**
* IN relational operator.
* This is a binary operator which takes a comma delimited right operand and
* creates equals predicates with the left operand and each right operand token.
* The equals predicates are combined with an OR predicate.
*
*/
public class InOperator extends AbstractOperator implements Rela... |
from ASR.asr import ASR
from ASR.asr import Gen_batch
from punctuations.punctuation import Punctuation
from word2number.extractor import NumberExtractor
def main_asr(path_wav,
model_path_asr='/content/drive/MyDrive/easy_meeting/models/ru_3_norm/wav2vec2-large-xlsr-russian-demo/checkpoint-3540',
pro... |
/* Copy a single mb_data_t and append it to another list. */
static int data_copy (mb_data_t **dst, const mb_data_t *src)
{
mb_data_t *tmp;
int status;
if ((dst == NULL) || (src == NULL))
return (EINVAL);
tmp = malloc (sizeof (*tmp));
if (tmp == NULL)
return (ENOMEM);
memcpy (tmp, src, sizeof (*tmp... |
For more than a decade, social networking has taken over internet users’ lives, with social networking apps being the preferred entry point for content and engagement. According to studies, teenagers spend at least nine hours per day on social networks, with the majority of this being done through mobile devices. The s... |
Perspectives on intellectual disability in Taiwan: epidemiology, policy and services for children and adults
Purpose of review The present review examines the most recent published references to epidemiology, healthcare needs and utilization and social and health policy relating to people with intellectual disability ... |
<reponame>Asymmetric-Effort/asymmetric-toolkit
package cli
import (
"strings"
)
/*
Specification::AddDomain() implements --domain <string> flags.
*/
const (
domainHelpText = "Specifies a fully qualified domain name."
domainArgLong = "domain"
)
func (o *Specification) AddDomain(defaultValue string) {
//
// Ini... |
/*
* Public required because interface is in extension
*/
public class DataIngest implements JtIngest {
private final transient JtMonitor monitor = JtMonitor.create(this.getClass());
@Override
public Envelop in(final RoutingContext context, final JtUri uri) {
/* Read parameter mode */
fi... |
def pageList(pageCount=8):
for i in range(pageCount//2):
if i%2:
yield i, pageCount-i-1
else:
yield pageCount-i-1, i |
#include <stdio.h>
int main(){
char name[20];
int grade;
FILE *write; //Üzerine yazmak istediğimiz dosyayı pointer olarak alabilmek için FILE tipi değişkeni gösteren pointer tanımlıyoruz
if((write = fopen("file_name", "w")) == NULL){ //fopen() içine açmak istediğimiz dosyayı ve hangi amaçla açtığımızı "w/r"... |
<filename>@types/node-gtk/RygelServer-2.6.d.ts
/**
* RygelServer-2.6
*/
/// <reference types="node" />
/// <reference path="RygelCore-2.6.d.ts" />
/// <reference path="GLib-2.0.d.ts" />
/// <reference path="Gee-0.8.d.ts" />
/// <reference path="Gio-2.0.d.ts" />
/// <reference path="GObject-2.0.d.ts" />
/// <referenc... |
/**
* The /tests view for the mneme tool.
*/
public class AssessmentsView extends ControllerImpl
{
/** Our log. */
private static Log M_log = LogFactory.getLog(AssessmentsView.class);
/** Assessment service. */
protected AssessmentService assessmentService = null;
/** Dependency: Question service. */
protec... |
async def copy_bracket(self, ctx, index_from: int, index_to: int):
tournament = self.get_tournament(ctx.guild.id)
brackets = tournament.brackets
if index_from > 0 and index_from <= len(brackets) and index_to > 0 and index_to <= len(brackets):
bracket_from = brackets[index_from - 1]
... |
def load_data(self):
self.train_data_text = self._load_csv(os.path.join(self.path, "train.csv"))
self.val_data_text = self._load_csv(os.path.join(self.path, "valid.csv"))
self.test_data_text = self._load_csv(os.path.join(self.path, "test_no_label.csv"))
self.sentences = (
sel... |
/**
* lun_mode_store() - sets the LUN mode of the host
* @dev: Generic device associated with the host.
* @attr: Device attribute representing the LUN mode.
* @buf: Buffer of length PAGE_SIZE containing the LUN mode in ASCII.
* @count: Length of data resizing in @buf.
*
* The CXL Flash AFU supports a dummy LUN m... |
<filename>waiter/src/main/java/ru/shaplov/job4j/patterns/electronicwaiter/menu/drink/additives/SugarOrder.java<gh_stars>0
package ru.shaplov.job4j.patterns.electronicwaiter.menu.drink.additives;
import ru.shaplov.job4j.patterns.electronicwaiter.Order;
import ru.shaplov.job4j.patterns.electronicwaiter.annotation.Additi... |
/* All Contributors (C) 2020 */
package io.github.dreamylost.practice.test;
import io.github.dreamylost.practice.NumberOf1;
import org.junit.Assert;
import org.junit.Test;
/**
* 迁移代码,原提交者Perkins
*
* @author Perkins
* @version v1.0
* @time 2019-06-19
*/
public class NumberOf1_test {
@Test
public void te... |
<reponame>diegospd/bytecode-interpreter<filename>src/Helpers/Bytecode.hs
module Helpers.Bytecode where
import Control.Concurrent.STM.TMVar
import Control.Monad.STM
import Lens.Micro.Platform
import Types.Bytecode
import Types.StackMachine
loadNumber :: Int -> Bytecode
loadNumber = LowLevel . LoadVal . Num
loadTrue :... |
Yasir Afifi said he’s pretty sure he meets the profile of a Muslim on the FBI watch list: He found a GPS tracking device attached to his car last Sunday.
Two days later, on Tuesday, he said the FBI came calling and asked for the device back.
“I’m half-Arab, a young Muslim, my dad was a religious role model in the com... |
<filename>LC_DVR/LC/src/main/java/com/example/administrator/lc_dvr/module/lc_dvr_files_manager/load_video_thumbnail/MyVideoThumbLoader.java<gh_stars>0
package com.example.administrator.lc_dvr.module.lc_dvr_files_manager.load_video_thumbnail;
import android.annotation.SuppressLint;
import android.graphics.Bitmap;
impor... |
<reponame>BaSO4/elasticsql
package elasticsql
import (
"encoding/json"
"fmt"
"strings"
)
func buildDSL(queryMapStr, queryFrom, querySize string, aggStr string, orderByArr []string, colArr []string) string {
resultMap := make(map[string]interface{})
resultMap["query"] = queryMapStr
resultMap["from"] = queryFrom
... |
t=int(input())
a=[]
b=[]
k=[]
for i in range(t):
ta,tb,tk=map(int,input().split(' '))
a.append(ta)
b.append(tb)
k.append(tk)
for i in range(t):
res=a[i]-b[i]
d=0 if k[i]%2==0 else 1
print((k[i]//2)*res+d*a[i]) |
def main(self):
self._main_call_before_start_funcs()
try:
self._main_loop.run()
except KeyboardInterrupt:
pass
self._main_call_after_stop_funcs() |
Local News, Nature & Weather, Seasonal & Current Events
By Cait Russell Published: August 13 2014
The August 13th rainstorm dumped as much 13 inches of rain in some areas.
The heavy flooding prompted the Town of Islip to declare a state of emergency, and Governor Cuomo to dispatch emergency recovery responders to as... |
DETECTION OF CANDIDA SPP. THAT CAUSES VULVOVAGINITIS IN WOMEN THAT USE CONTRACEPTIVE METHODS.
OBJECTIVE
The aim: To determine the distribution of Candida spp. within different age groups and contraceptive methods in women with vulvovaginitis, as well as the susceptibility of Candida spp. to commonly used antifungals.
... |
<reponame>Pingviinituutti/homectl
use homectl_types::event::TxEventChannel;
use super::{
devices::Devices, groups::Groups, integrations::Integrations, rules::Rules, scenes::Scenes,
};
#[derive(Clone)]
pub struct AppState {
pub integrations: Integrations,
pub groups: Groups,
pub scenes: Scenes,
pub... |
Each coin contains 1 oz of .9999 fine Silver.
This MintDirect® tube contains 25 Silver Canadian Maple Leafs.
tube contains 25 Silver Canadian Maple Leafs. Mintage of just 1,000,000 coins.
Obverse: Right-facing profile of Queen Elizabeth II, along with the year and face value.
Reverse: Showcases a detailed single ma... |
/**
* An alternative entry point to the Cobol extractor, targeted for use by LGTM.
*/
public class AutoBuild extends CommonBuild {
private LgtmCobolProject project;
public AutoBuild() {
this.project = new LgtmCobolProject(LgtmYmlConfig.SRC);
project.setDefaultFormat(FORMAT);
project.setDefaultTabLength(TAB... |
<reponame>philopon/apiary<filename>src/Control/Monad/Apiary.hs<gh_stars>10-100
module Control.Monad.Apiary
( ApiaryT
-- * Runner
-- ** Apiary -> Application
, runApiaryTWith
, runApiaryWith
, runApiary
, getApiaryTWith
, getApiaryWith
, getApiary
, ApiaryConfig(..)
-- * execu... |
/// Save the block and its header
fn save_block(&self, b: &Block) -> Result<(), Error> {
let batch = self.db
.batch()
.put_ser(
&to_key(BLOCK_PREFIX, &mut b.hash().to_vec())[..],
b,
)?
.put_ser(
&to_key(BLOCK_HEADER_PREFIX, &mut b.hash().to_vec())[..],
&b.header,
)?;
batch.write()
} |
Label: 2morrows Victory Records
Genre: Future-Soul
Members: J’Danna
Based: London
Sounds Like: Jamie xx, Alicia Keys, Szjerdene
Links: 2morrows Victory Facebook
Some of you might remember the brilliant track-cycling, London Hip-hop group 2morrow’s Victory that we brought you a couple of weeks ago. Well, last week... |
/**
* Thrown when an unusable response is encountered while inspecting an instance.
*
* @author Christian Trimble
*/
public class InvalidResponse extends InspectionException {
/**
*
*/
private static final long serialVersionUID = 1L;
protected HttpResponse response;
public InvalidResponse(HttpResponse... |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
ll n,x,t,s,k;
vector<ll>v,v1,v2,d1,d2;
int main()
{
ios_base::sync_with_stdio(false); cin.tie(nullptr);
cout.tie(nullptr);
cin>>t;
while(t--){
cin>>n>>s>>k;
map<ll,ll>m;
for(int i=0;... |
<gh_stars>10-100
//+---------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1992 - 1994.
//
// File: ole2splt.cxx
//
// Contents: OLE2 API whose implementation is split between 16/32
//
// History: 07-Mar-94 ... |
<filename>dygiepp/dygie/models/events.py<gh_stars>10-100
import logging
from os import path
import itertools
from typing import Any, Dict, List, Optional
import torch
from torch.nn import functional as F
from overrides import overrides
from allennlp.data import Vocabulary
from allennlp.models.model import Model
from ... |
from random import random
from random import choice
import numpy as np
import plotly.express as px
import struct
import operator
###
# Broadly the same as "basic_functions.py" but updated to include motility
# intentionally trying to keep them separate so as not to slow down the basic version
###
class MotilityParam... |
package update
import (
"fmt"
"gopkg.in/yaml.v2"
"github.com/jenkins-x/jx-logging/pkg/log"
"github.com/hashicorp/go-version"
"github.com/plumming/dx/pkg/api"
"io/ioutil"
"time"
)
// ReleaseInfo stores information about a release.
type ReleaseInfo struct {
Version string `json:"tag_name"`
URL string `... |
def _set_view_data(self, object_content):
logger.info("Setting view data for a %s", self.__class__)
self._object_content = object_content
for dynprop in object_content.propSet:
if dynprop.name not in self._valid_attrs:
logger.error("Server returned a property '%s' but... |
//=======================================================================
// Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
// Copyright 2004, 2005 Trustees of Indiana University
// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek,
// Doug Gregor, D. Kevin McGrath
//
// Distributed under the... |
// Gets the time stamp from the given timer query.
uint8 GetTimestamp(ID3D11DeviceContext *context, ID3D11Query *timerQuery)
{
UINT64 data;
while (context->GetData(timerQuery, &data, sizeof(data), 0) == S_FALSE);
return data;
} |
<gh_stars>0
import { html, css, LitElement } from "lit";
export class A2kStack extends LitElement {
static styles = css`
#stack {
display: flex;
flex-direction: column;
justify-content: flex-start;
gap: var(--stack-spacing-top) !important;
}
`;
render() {
return html`<div id=... |
Drinking alcohol while pregnant could become a criminal offence, women's charities have said ahead of a hearing at the Court of Appeal tomorrow.
A council is seeking criminal injuries compensation for a six-year-old girl with “growth retardation” caused by her mother's alcohol consumption during pregnancy.
If the cou... |
The Vikings’ special teams have been among the best in the NFL the past three years. But a man who played a big role in that will be missing when the regular season kicks off in six weeks.
Special-teams coordinator Mike Priefer was suspended by Minnesota last week for the first three games for what an investigation re... |
<filename>io/router/pointer.go
// SPDX-License-Identifier: Unlicense OR MIT
package router
import (
"encoding/binary"
"image"
"github.com/cybriq/giocore/f32"
"github.com/cybriq/giocore/internal/opconst"
"github.com/cybriq/giocore/internal/ops"
"github.com/cybriq/giocore/io/event"
"github.com/cybriq/giocore/io... |
<gh_stars>1-10
package org.endercore.android.interf;
public interface IFileEnvironment {
String getCodeCacheDirPath();
String getEnderCoreDirPath();
String getOptionsFilePath();
String getNModsDirPath();
String getNModDirPathFor(String uuid);
String getCodeCacheDirPathForDex();
String... |
On Sunday, baseball's regular season came to a close. Although the day's results didn't impact the playoffs, they did alter the 2018 draft order.
Because the San Francisco Giants won (on a Pablo Sandoval walk-off home run) and the Detroit Tigers lost, the two teams tied for the worst record in baseball. The Tigers own... |
/**
* Method to use a binary search to find a target string in a
* sorted array of strings
*/
public static String binaryFind(String target, String[] list)
{
int start = 0;
int end = list.length - 1;
int checkpoint = 0;
while (start <= end)
{
checkpoint = (int)((start+end)/2.0);... |
<gh_stars>10-100
import assert from 'assert';
import { ModelInfoUtil } from '../util/ModelInfoUtil';
import { EggProtoImplClass } from '@eggjs/core-decorator';
export interface AttributeOptions {
// field name, default is property name
name?: string;
// allow null, default is true
allowNull?: boolean;
// aut... |
def _stable_release(tags):
count = 0
release = tags[count]
while not release['name'].split('.')[-1].isdigit():
count += 1
release = tags[count]
return release |
<filename>astropy/cloud/fits/utils.py
import numpy as np
from astropy.cloud.fits.constants import BLOCK_SIZE
from astropy.cloud.fits.datatypes import FITSHeader
def as_np_dtype(bitpix: str) -> np.dtype:
if bitpix == 8:
return np.dtype(np.uint8)
elif bitpix == 16:
return np.dtype(np.uint16)
... |
/**
* Attach the DOMElement to the GWT container, if not already attached.
*/
public void attach() {
final Iterator<Widget> itr = domElementContainer.iterator();
while ( itr.hasNext() ) {
if ( itr.next().equals( container ) ) {
return;
}
}
... |
// time java -server binarytrees 20
public final class binarytrees {
private static final int MIN_DEPTH = 4;
public static void main(String args[]) {
int n = args.length > 0 ? Integer.parseInt(args[0]) : 0;
int maxDepth = Math.max(MIN_DEPTH + 2, n);
int stretchDepth = maxDepth + 1;
... |
def _std_cache_path(observatory, root_env, subdir):
if root_env + "_SINGLE" in os.environ:
path = os.environ[root_env + "_SINGLE"]
elif root_env in os.environ:
path = os.path.join(os.environ[root_env], observatory)
elif "CRDS_PATH_SINGLE" in os.environ:
path = os.path.join(os.environ... |
/**
* DLC Catalog client pool.
*/
public class DLCWrappedHybrisClientPool extends ClientPoolImpl<IMetaStoreClient, TException> {
// use appropriate ctor depending on whether we're working with Hive2 or Hive3 dependencies
// we need to do this because there is a breaking API change between Hive2 and Hive3
... |
Open-wheel driver RC Enerson will complete PR1/Mathisen Motorsports’ lineup for the Rolex 24 at Daytona, the team confirmed on Wednesday, ahead of this weekend’s Roar Before the 24.
The 19-year-old Indy Lights graduate, who took part in three Verizon IndyCar Series rounds last year for Dale Coyne Racing, will join Tom... |
from math import gcd
from collections import defaultdict
n = int(input())
AB = [list(map(int, input().split())) for _ in range(n)]
MOD = 1000000007
box = defaultdict(int)
zeros = 0
for a, b in AB:
if a == b == 0:
zeros += 1
else:
if a != 0 and b == 0:
box[(-1, 1, 0)] += 1
elif a == 0 and b != 0... |
<reponame>heavySea/caravel_user_project_mflowgen
#=========================================================================
# generate_init_def_with_od_metal.py
#=========================================================================
# This script takes the last generated def file from the openlane
# floorplan step a... |
/**
* Add remaining unmatched freshRects as new TrackItems
*
* @param vector<Rect>
* @return void
*/
void Tracker::addNewItems(std::vector<Rect>& freshDetects)
{
for (uint i=0; i<freshDetects.size(); ++i)
add(new TrackItem(freshDetects[i]));
} |
import { Container, Nav, Navbar } from 'react-bootstrap'
import React from 'react'
import { NavigationBase } from './Navigation.style'
import { Brand } from '../../../../components/atoms'
import { SectionMainMenu } from '../../../../components/molecules'
const Navigation = () => {
return (
<NavigationBase>
<Navb... |
.
55 patients, aged 19 to 77 years, with consequences of humeral fractures were surgically treated. 1st group consisted of 17 patients with slow fracture consolidation, 2nd group contained 31 patients with uninfected false joints and the 3rd group consisted of 7 patients with infected false joints. Surgical tactics ... |
/**
* Activity to illustrate querying files that are starred and text.
*/
public class QueryStarredTextFilesActivity extends BaseDemoActivity {
private ListView mResultsListView;
private ResultsAdapter mResultsAdapter;
@Override
protected void onCreate(Bundle b) {
super.onCreate(b);
... |
<reponame>zipated/src<gh_stars>1000+
// Copyright 2017 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.
package org.chromium.chrome.browser.payments;
import android.content.Intent;
import android.content.pm.ActivityInfo;... |
/*
Copyright (C) 2021 Susi Lehtola
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "util.h"
#define XC_MGGA_X_RPPSCAN 648 /* r++SCAN exchange */
t... |
/**
* This function is package private and is called by the public prepareFunctions. It requests a KeyExchangeProtocol that has not been implemented yet.
* Does the same as the above prepareForCommunication function only sets the flag of enableNagle first.
*
* @param enableNagle a flag indicating weather or no... |
<filename>src/util/popup.ts<gh_stars>1-10
import {
Injector,
TemplateRef,
ViewRef,
ViewContainerRef,
Renderer2,
ComponentRef,
ComponentFactoryResolver,
ApplicationRef
} from '@angular/core';
export class ContentRef {
constructor(public nodes: any[], public viewRef?: ViewRef, public componentRef?: Com... |
main :: IO()
main = do
len <- getLine
arr <- getLine
let ans = compress arr 0
putStrLn $ show ans
compress :: String -> Int -> Int
compress [] a = a
compress [x] a = a
compress (x:y:ys) a
| x == y = compress (y:ys) (a+1)
| otherwise = compress (y:ys) a |
package mysql_database
import (
"fmt"
"log"
"os"
"path/filepath"
"time"
"xorm.io/xorm"
xorm_log "xorm.io/xorm/log"
)
// SimpleLogger is the default implment of core.ILogger
type fileLogger struct {
*xorm_log.SimpleLogger
}
//var _ core.ILogger = &fileLogger{}
func CheckMySQLEngine(_e... |
Rolling resistance contribution to a road pavement life cycle carbon footprint analysis
Purpose Although the impact of road pavement surface condition on rolling resistance has been included in the life cycle assessment (LCA) framework of several studies in the last years, there is still a high level of uncertainty co... |
<filename>main_helpers.h
/**
* @file main_helpers.h
* @brief A couple of small functions needed in the main DMRG file
*
* @author <NAME>
* @author <NAME>
* @date $Date$
*
* $Revision$
*/
#ifndef MAIN_HELPERS_H
#define MAIN_HELPERS_H
#include<iostream>
/**
* @brief A function to calculate the minimum s... |
/* $Id: UIMachineLogic.cpp 71374 2018-03-19 15:19:12Z vboxsync $ */
/** @file
* VBox Qt GUI - UIMachineLogic class implementation.
*/
/*
* Copyright (C) 2010-2017 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free sof... |
# -*- coding: utf-8 -*-
import decimal
import datetime as dt
from domainics.domobj import dobject, datt, dset
from domainics.domobj.dset import dset
from domainics.domobj.typing import DSet, DObject, AnyDObject
import pytest
def setup_module(module):
print()
# @pytest.mark.skipif
def test_dset_declaration1(... |
<reponame>tarof429/recmd-dmn
package dmn
import (
"crypto/sha1"
"fmt"
"strings"
"time"
)
// CommandStatus indicates the status of the command
type CommandStatus string
const (
// Idle means that the command is not running
Idle CommandStatus = "Idle"
// Running means that the command is running
Running Comma... |
<reponame>yuanyedc/monitores<filename>src/main/java/com/msds/monitor/utils/EmailManager.java
package com.msds.monitor.utils;
import java.io.UnsupportedEncodingException;
import java.util.Properties;
import javax.activation.DataHandler;
import javax.activation.FileDataSource;
import javax.mail.BodyPart;
import jav... |
class EntityManager:
"""Manages all the entity in the game"""
def __init__(self, div):
self.handle_to_key = {}
self.key_to_handle = {}
self.div = div
def dump(self):
for k, v in self.key_to_handle.items():
print(k, v)
def get_range(self, x, y):
rx = ... |
def initiateQuit(self):
self.view.userIntent = 'quit'
tb = self.view.textBuffer
if tb.isDirty():
self.view.changeFocusTo(self.view.interactiveQuit)
return
bufferManager = self.view.program.bufferManager
tb = bufferManager.getUnsavedBuffer()
if tb:
... |
package main
import "fmt"
func main() {
var n, m int
fmt.Scanf("%d %d", &n, &m)
h := make([]int, n)
for i := 0; i < n; i++ {
fmt.Scan(&h[i])
}
var a, b int
counter := make(map[int]struct{})
for i := 0; i < m; i++ {
fmt.Scanf("%d %d", &a, &b)
if h[a-1] < h[b-1] {
counter[a] = struct{}{}
} else if h[... |
/**
* The Pen class used to control the movement of the pen
* this class implements methods to:
* control the pen to move upwards until it touches the touch sensor
* control the pen to move downwards until it touches the plotting sketch
* set the motor speed of the pen
* create setters and getters for the... |
def newArr(a, k):
b = a
i = 0
n = len(a)
while i < n:
b[i] += (i+1)*k
i += 1
return b
def minSum(a, k):
a.sort()
sm = 0
cnt = 0
i = 0
while i < k:
sm += a[i]
i += 1
return sm
inp = input().split()
n = int(inp[0])
S = in... |
/* vglyph - library for visualize glyphs
*
* File: vglyph-point.h
* Copyright (C) 2017 <NAME>
*/
#ifndef VGLYPH_POINT_H
#define VGLYPH_POINT_H
#include "vglyph-api.h"
static inline vglyph_point_t*
_vglyph_point_from_coord(vglyph_point_t* result,
vglyph_float32_t x,
... |
<filename>actor/zipper.py<gh_stars>0
import subprocess as sr
from errorclass.zipyerror import ZipyError
import actor.filer as filer
def create_zip_file(path, password, level):
zip_file_path = filer.get_zip_file_path(path)
compress_to_zip(path, zip_file_path, password)
def compress_to_zip(dir_path, z... |
One-pot access to tetrahydrobenzo carbazoles from simple ketones by using O2 as an oxidant.
An effective and operationally simple one-pot Brønsted acid catalyzed cascade method is demonstrated for the synthesis of diversely functionalized carbazole frameworks starting from protecting group free 2-alkenyl indoles. The ... |
/*
delete one extended attributes from the file
*/
void delete_xattr(const char* attr_name, const char* filename, int nofollow) {
int rc = removexattr(
filename,
attr_name,
(nofollow ? XATTR_NOFOLLOW : 0)
);
if(rc < 0) {
perror("removexattr");
exit(1);
}
} |
/// Release this object, invalidating the pointer
pub fn release(&mut self) {
unsafe {
PxBase_release_mut(self.get_raw_mut());
}
} |
<filename>extract/datasets/__init__.py
from .data_loader import CATER_DataSet |
/**
* Unregister an interest in events for the given socket instance.
*
* @param registry The associated registry for managing events.
* @param socketHandle The socket handle/file descriptor to remove.
* @return WXNRC_OK on success, WXNRC_DATA_ERROR for unrecognized socket and
* WXNRC_SYS_ERROR on underly... |
A Comparative Analysis on the Enforceability of Knock-for-Knock Indemnities in Thailand and the United Kingdom
The standard form of oilfield service contracts, such as the Leading Oil and Gas Competitiveness (LOGIC) model, is widely used in Southeast Asia including Thailand. Under the LOGIC model form, the allocation ... |
import numpy as np
from .BaseElement import *
class BuildingElement(BaseElement):
def __init__(self, **params):
super().__init__(**params)
|
<reponame>sibvisions/gauges
import { Hook } from "./types";
export declare abstract class AbstractGauge<Options = {}> {
protected options: Options;
protected hooks: Hook[];
protected initial: boolean;
constructor(options: Options, defaultOptions: Partial<Options>);
protected addHook(callback: Functi... |
/// Determines the cell's value and returns the escape sequence for the appropriate value.
pub fn color(&self) -> String {
match self.value {
8 => format!("{}", Fg(Blue)),
16 => format!("{}", Fg(Yellow)),
32 => format!("{}", Fg(Magenta)),
64 => format!("{}", Fg(Re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.