content stringlengths 10 4.9M |
|---|
/**
* This class stores all the Conversations for a flowType.
* Created by wangqi on 2019/9/5.
*/
@ConfigurationProperties("conversationmanager")
public class ConversationsFlow {
/**
* Specifies the flowType of the class.
*/
private String flowType;
private Map<String, ConversationImpl> conver... |
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
/**
* Commandlet to allow diff in P4V, and expose that functionality to the editor
*/
#pragma once
#include "Commandlets/Commandlet.h"
#include "DiffAssetsCommandlet.generated.h"
UCLASS()
class UDiffAssetsCommandlet : public UCommandlet
{
GENERATED_U... |
/**
* @brief Cleanup some crap in here.
*/
static void clean_dis_shiz(void)
{
DEBUGF(("Cleaning up some daemon junk... ;[\n"));
donky_conn_clear();
FD_ZERO(&donky_fds);
} |
def stack(self, new_column_name=None, drop_na=False, new_column_type=None):
from .sframe import SFrame as _SFrame
return _SFrame({"SArray": self}).stack(
"SArray",
new_column_name=new_column_name,
drop_na=drop_na,
new_column_type=new_column_type,
) |
def check_all(self, *args, **kwargs):
self.errors = []
super(Checker, self).check_all(*args, **kwargs)
return self.errors |
/**
* A composite unary functor with no return value. On call every composed
* consumer is called.
*
* @param <E> the type parameter
* @author rferranti
*/
public class PipelinedConsumer<E> implements Consumer<E> {
private final Iterable<Consumer<E>> consumers;
public PipelinedConsumer(Iterable<Consumer... |
import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { Reservation } from './reservations.entity';
@Injectable()
export class ReservationsService {
constructor(
@InjectRepository(Reservation)
private readonly cardsReposi... |
<filename>utils/constant/tab.ts
import type { TWorksTab, TBlogTab } from '@/spec'
export const WORKS_TAB = {
STORY: 'story',
BASIC: 'basic',
TECHSTACKS: 'techstacks',
COMMUNITY: 'community',
MILESTONE: 'milestone',
INTERVIEW: 'interview',
} as Record<Uppercase<TWorksTab>, TWorksTab>
export const WORKS_TAB... |
import styled from 'styled-components';
import moment from 'moment';
const St = {
CommentWrapper: styled.div`
//padding: 1rem;
// border-radius: 8px;
// border: 1px solid;
margin: 1rem 0;
`,
UserInfoContainer: styled.div`
padding: 1rem 0;
.rating {
font-size: 2rem;
font-weight... |
//========================================================================
//
// Parser.h
//
// Copyright 1996-2003 Glyph & Cog, LLC
//
//========================================================================
//========================================================================
//
// Modified under the Poppler ... |
#test1=[['c','b','a'],['b','c','d'],['c','b','c']]
test1=['cba','bcd','cbc']
def african_crossword(n,m,grid):
encrypted = ""
for i in range(n):
for j in range(m):
is_encrypted=True
for k in range(n):
if grid[i][j]==grid[k][j] and k!=i:
is_encrypted=False
break
... |
<gh_stars>1-10
#include<bits/stdc++.h>
using namespace std;
int main(){
vector<int> v = {1, 2, 3, 4, 5};
int n = v.size();
cout<<arr[i] +
for (int i = 0; i < n; i++)
{
cout<<v[i];
}
return 0;
} |
def __get_type(self, expectation, options):
if "is_custom_func" in options.keys():
setattr(self, "mtest", expectation)
return "CUSTOMFUNC"
elif "is_substring" in options.keys():
return "SUBSTRING"
elif "is_regex" in options.keys():
return "REGEX"
... |
The Sister Wives premiere on TLC opened Kody Brown and his four wives up to a mix of voyeuristic interest and blatant disgust.
So how are the real life sister wives of the Brown family taking their new-found fame? They've set some ground rules, and Janelle, aka Wife Number 2 (at the far left in the photo above), expla... |
TAMPA, Fla. -- Evel Knievel has sued Kanye West, taking issue with a music video in which the rapper takes on the persona of "Evel Kanyevel" and tries to jump a rocket-powered motorcycle over a canyon.
Knievel, whose real name is Robert Craig Knievel, filed a lawsuit in federal court in Tampa on Monday claiming infrin... |
<reponame>magimenez/jatytaweb
/**
*
*/
package com.crawljax.web.jatyta.plugins.util.http;
/**
* Enum for common HTTP Errors Code.
* @author mgimenez
*
*/
public enum HttpError {
UNAUTHORIZED("HTTP ERROR 401"),
BAD_REQUEST("HTTP ERROR 400"),
FORBIDDEN("HTTP ERROR 403"),
NOT_FOUND("HTTP ERROR 404"),
INTERN... |
/**
* Gets the weightning value for a given grey value. It uses the specified weightning mode given in the constructur.
*
* @param z greyvalue
* @return Weightning value
*/
@Override
protected double w(double z) {
if (this.weightMode == WeightMode.NONE)
return 1;
... |
Diversity of endophytic fungi of single Norway spruce needles and their role as pioneer decomposers
The diversity of endophytic fungi within single symptomless Norway spruce needles is described and their possible role as pioneer decomposers after needle detachment is investigated. The majority (90%) of all 182 isolat... |
Doctors Once Thought Bananas Cured Celiac Disease. They Saved Kids' Lives — At A Cost
Enlarge this image toggle caption AP AP
The year was 1945, and 2-year-old Lindy Thomson had been given a few weeks to live. She suffered from diarrhea and projectile vomiting, and she was so thin and weak, she could no longer walk. ... |
def handle_email_message(event, context):
pubsub_message = base64.b64decode(event['data']).decode('utf-8')
message_dict = json.loads("[" + pubsub_message + "]")[0]
API_KEY = os.environ.get('SENDGRID_API_KEY')
if (API_KEY != None):
sg = sendgrid.SendGridAPIClient(api_key=API_KEY)
from_ema... |
<filename>src/headers/package.h
#ifndef PACKAGE_H
#define PACKAGE_H
#include "subpackage.h"
class Package{
public:
uint32_t name_len;
char* name;
struct Info{
uint64_t decompressed_offset; // Location in Decompressed Data
uint64_t decompressed_size;
... |
import os.path
import json
def read_user_config():
user_config_file = os.path.join(os.path.expanduser("~"), ".gensite")
if not os.path.exists(user_config_file):
raise CommandError("No user file exists, use gensite init first : " + user_config_file)
user_config = {}
with open(user_config_file, "r", encodi... |
PUBLIC DISTRIBUTION SYSTEM IN INDIA FROM A WAR-TIME RATIONING MEASURE TO LEGAL ENTITLEMENT
Public Distribution System (PDS) is an Indian food security system established under the Ministry of Consumer Affairs, Food, and Public Distribution. PDS developed as a strategy of managing shortages through the inexpensive dist... |
<gh_stars>0
package def
import "github.com/jumper86/jumper_error"
const (
ErrConnClosedCode = 11011
ErrConnUnexpectedClosedCode = 11012
ErrInvalidConnParamCode = 11013
ErrGetExternalIpCode = 12011
ErrGetMacAddrCode = 12012
)
var (
ErrConnClosed = jumper_error.New(ErrConnClosedCode, ... |
import tw from 'twin.macro';
import { useMousePosition } from 'lib/hooks';
export const Mouse = ({ disabled = false }: { disabled?: boolean }) => {
const { x, y } = useMousePosition();
return (
<span
css={tw`fixed top-0 bottom-0 left-0 right-0 z-10 h-screen pointer-events-none`}
>
<span
hidden={disab... |
CSIRO (the Commonwealth Scientific and Industrial Research Organisation) is facing another round of job losses to basic public research, with the news that the organisation is making deep staffing cuts to areas such as Oceans and Atmosphere and Land and Water. Internally, there are signals that Oceans and Atmosphere wi... |
def datetime_to_mjd_years(date: datetime) -> float:
return timedelta_to_si_years(date - MJD_EPOCH) |
Update #4: Less than half an hour to go!
Update #3: More Enemy Types Revealed - Happy Holidays!
Update #2: WE'RE FUNDED! :D
Update #1: 4-Pack details, Demo update, and Chef Penguino
Planet Io Entertainment, who brought players the memory-stretching game Chef Penguino, present Ancient Axes: Heroes on Paper, an actio... |
/*
Package bgp implements the BGP-4 protocol as described in RFC 4271 and subsequent RFCs.
It is able to parse all BGP messages and deals with 32 bit ASNs (support for 16 bit ASNs
is not implemented).
*/
package bgp
|
def st_dev(self, population=False):
return sqrt(self.variance(population=population)) |
package picam_test
import (
"image/png"
"log"
"os"
"github.com/cgxeiji/picam"
)
func Example_save() {
cam, err := picam.New(640, 480, picam.YUV)
if err != nil {
log.Fatal(err)
}
defer cam.Close()
img := cam.Read()
f, err := os.Create("./image.png")
if err != nil {
log.Fatal(err)
}
defer f.Close()
... |
-- Copyright (c) Facebook, Inc. and its affiliates.
module Glean.RTS.Foreign.Thrift
( encodeVarint, encodeZigZag
)
where
import Control.Monad.ST.Unsafe (unsafeIOToST)
import Data.Int (Int64)
import Data.Word
import Foreign.C.Types
import Foreign.Ptr
import qualified Util.Buffer as Buffer
encodeVarint :: Word64 ... |
import { Tree } from '@angular-devkit/schematics';
import { getNpmScope, toClassName, toFileName } from '@nrwl/workspace';
import { libsDir } from '@nrwl/workspace/src/utils/ast-utils';
import { Schema } from '../schema';
import { NormalizedSchema } from './normalized-schema';
export function normalizeOptions(
host:... |
def main():
n=int(input())
a=list(map(int,input().split()))
k=min(a.count(1),a.count(2),a.count(3))
print(k)
q={1:[],2:[],3:[]}
for i in range(len(a)):
q[a[i]].append(i+1)
for i in range(k):
print(q[1][i],q[2][i],q[3][i])
if __name__=='__main__':
main()... |
/** Connector mapping property availability. */
@Fluent
public final class ConnectorMappingAvailability {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectorMappingAvailability.class);
/*
* The frequency to update.
*/
@JsonProperty(value = "frequency")
private Frequency... |
package com.jordanluyke.reversi;
import com.google.inject.AbstractModule;
import com.jordanluyke.reversi.account.AccountModule;
import com.jordanluyke.reversi.db.DbModule;
import com.jordanluyke.reversi.lobby.LobbyModule;
import com.jordanluyke.reversi.match.MatchModule;
import com.jordanluyke.reversi.session.SessionM... |
export type Props = {
openOnInit?: boolean,
classPrefix?: string,
transTime?: number,
transCurve?: string,
onToggle?: () => void,
}
|
/**
* it iterate body data for post method.
* @author GS-1629
* @param post the post
* @param thirdPartyServiceData the third party service data
* @return the HTTP post
* @throws IOException Signals that an I/O exception has occurred.
*/
HttpPost iterateThirdPartyBodyData(HttpPost post, HashMap<Str... |
<gh_stars>1-10
// Cast web socket client and server in terms of common process interfaces
export interface WebSocketServerWrapper {
// socket server is a process that
// - has fixed properties (address)
// - has variable state (clients (i.e. the contingent))
// - is a state machine (created -> listening -> clo... |
// Sets default values for this component's properties
UFastNoiseComponent::UFastNoiseComponent(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
PrimaryComponentTick.bCanEverTick = false;
NoiseGenerator = CreateDefaultSubobject<UFastNoise>(UFastNoiseComponent::NoiseGeneratorName);
} |
def _rm_all_Sc(self):
l = []
for i in range(self.wodscompleted):
l.append(self.df.loc[:, self.scorel[i]].values.tolist())
ii = np.empty(shape=(self.wodscompleted, len(self.df)), dtype=int)
ii[:] = -1
for i in range(self.wodscompleted):
for j in range(len(s... |
/**
* Utility methods for working with views.
*/
@SuppressWarnings("unused")
public class ViewUtils {
public static void setZ(Context contexts, View... views) {
setZ(contexts, 4, TypedValue.COMPLEX_UNIT_DIP, views);
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public static void setZ(Context c... |
/*
* Copyright 2017 LunaMC.io
*
* 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... |
<filename>lab-5/include/memory.h
#ifndef MEMORY_H
#define MEMORY_H
#define VA_START 0xffff000000000000
#define PHYS_MEMORY_SIZE 0x40000000
#define PAGE_SHIFT 12
#define TABLE_SHIFT 9
#define SECTION_SHIFT (PAGE_SHIFT + TABLE_SHIFT)
#define PAGE_SIZE (1 << PAGE_SHIFT) //2^12, 4096
#define SECTION_... |
Nashville police are looking for a man who had a shocking reaction to a mixed-up drive-thru order.
Demetri Johnson, 21, of Nashville, Tenn., was apparently so angry that his McDonald's order was missing a McDouble cheeseburger that he returned to the restaurant and brandished a gun at the employees there, USA Today re... |
<reponame>heaptracetechnology/cron<filename>cron/cron_test.go
package cron
import (
"bytes"
"encoding/json"
"net/http"
"net/http/httptest"
"log"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Cron event subscribe negative time interval", func() {
var argumentData Subscribe
argume... |
/** Used to create {@link DeserializationRuntimeConverterFactory} specified to MySQL. */
public class MySqlDeserializationConverterFactory {
/**
* instance
*/
public static DeserializationRuntimeConverterFactory instance() {
return new DeserializationRuntimeConverterFactory() {
p... |
<filename>packages/serverless-api/src/utils/package-info.ts
import fs from 'fs';
import path from 'path';
import { PackageJson } from 'type-fest';
const pkgJson: PackageJson = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '../../package.json'), 'utf8')
);
export default pkgJson;
|
/*----------------------------------------- */
/* Update cursor position display on screen */
/*----------------------------------------- */
void update_indicators() {
int i;
float scrollIndicator=1.0, positionY, displayLength;
float percentage, scrollBar;
write_str(columns - 24, rows, "| L: C: ", ST... |
package user
import "baseservice/middleware/authenticate"
type (
UpdateAccountBalanceRequest struct {
authenticate.Request
Amount int64 `json:"amount"` // 数额
Describe string `json:"describe"` // 说明
UpdateType int `json:"update_type"` // 变动类型 0-充值 1-提现 2-游戏变动 3-活动奖励
}
UpdateAccountBalance... |
<gh_stars>0
/*******************************************************************************
* \file mutation.cpp
* \brief Stylus Genome class (mutation methods)
*
* Stylus, Copyright 2006-2009 Biologic Institute
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file exc... |
<filename>lib/epdiy/epdiy/src/epd_driver/pca9555.h
#ifndef PCA9555_H
#define PCA9555_H
#include <esp_err.h>
#include <driver/i2c.h>
#define PCA_PIN_P00 0x0001
#define PCA_PIN_P01 0x0002
#define PCA_PIN_P02 0x0004
#define PCA_PIN_P03 0x0008
#define PCA_PIN_P04 0x0010
#define PCA_PIN_P05 ... |
Uganda welcoming millions of South Sudanese refugees, earning praise of United Nations
Updated
The African nation of Uganda is receiving praise from the United Nations for welcoming more than 1 million refugees from South Sudan, and the UN is urging other nations to follow Uganda's example and open their doors to tho... |
package com.es.data;
/**
* Created by perfection on 15-12-25.
*/
public class IosData {
String[] iosDatas = {
};
}
|
use crate::common::BitMatrix;
use crate::{Error, ResultError};
use super::FormatInformation;
use super::{Version, Versions};
pub struct BitMatrixParser {
bitMatrix: BitMatrix,
versions: Versions,
parsedVersion: Option<Version>,
parsedFormatInfo: Option<FormatInformation>,
mirror: bool,
}
impl Bit... |
<reponame>brainchild-projects/printables<filename>cypress/integration/navigation.spec.ts
it('can visit all subpages', () => {
cy.visitHome();
cy.contains('Printables');
cy.findByRole('link', { name: /calendar/i }).click();
cy.findByRole('button', { name: /print calendar/i });
// Back home
cy.findByRole('ba... |
<filename>clients/rust/src/models/timezone_schema.rs
/*
* Location API
*
* Geolocation, Geocoding and Maps
*
* OpenAPI spec version: 2.0.0
*
* Generated by: https://openapi-generator.tech
*/
/// TimezoneSchema : Timezone object found for the location.
#[allow(unused_imports)]
use serde_json::Value;
#[deriv... |
// Copyright 2015 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 "build/build_config.h"
#include "chrome/browser/memory/tab_stats.h"
namespace memory {
TabStats::TabStats()
: is_app(false),
is_inter... |
def add_field(self, field_data):
def_field = {'id':None, 'ref':None,
'orient':'H',
'posx':'0',
'posy':'0',
'size':'50',
'attributs':'0000',
'hjust':'C',
'props':'CNN... |
print('---Digite dois números---\n')
n1 = int(input('\033[35m1° número: '))
n2 = int(input('\033[34m2° número: '))
if n1 > n2:
print('O {} é maior'.format(n1))
elif n2 > n1:
print('O {} é maior'.format(n2))
else:
print('\033[32mOs dois são iguais') |
/// will always return a flat color regardless or alpha
pub fn mix_colors<C: RGB>(color1: C, color2: C, mix_ratio: f32) -> C {
let (r1, g1, b1) = color1.rgb();
let (r2, g2, b2) = color2.rgb();
let (r1, g1, b1) = (r1 as i16, g1 as i16, b1 as i16);
let (r2, g2, b2) = (r2 as i16, g2 as i16, b2 as i16);
... |
def random_mbh(type='agn'):
from random import gauss
if type == 'agn':
return 10**gauss(7.83, 0.63)
elif type == 'xrb':
return 10**gauss(1.1, 0.15)
else: raise Exception('type must be agn or xrb') |
Harmonic Power Flow Formulation based on the Linear Power Flow in Microgrids
In this paper a harmonic power flow formulation for microgrids based on a power flow linearized through Wirtinger's calculus is presented. Through this formulation it is possible to calculate the harmonic power flow independently of the funda... |
import { ISimpleResponse } from '../types';
import { Router as ExpressRouter, Request, Response, urlencoded, json, Express, RequestHandler } from 'express';
import ControllerFactory from '../core/controller-factory';
import { UsersController } from '../controllers/users';
import { Router } from './router';
import... |
def _assert_all(self, query, rows):
decorated_query = self._decorate_query(query)
assert_all(self.session, decorated_query, rows) |
<filename>SimCalorimetry/HcalSimAlgos/interface/HFShape.h<gh_stars>100-1000
#ifndef HcalSimAlgos_HFShape_h
#define HcalSimAlgos_HFShape_h
#include <vector>
#include "SimCalorimetry/CaloSimAlgos/interface/CaloVShape.h"
#include "CalibCalorimetry/HcalAlgos/interface/HcalPulseShapes.h"
/**
\class HFShape
\brief ... |
// hexdig_fun() is borrowed from newlib gdtoa-gethex.c.
// Possible author is David M. Gay, Copyright (C) 1998 by Lucent Technologies,
// licensed with Historical Permission Notice and Disclaimer (HPND).
static int hexdig_fun(unsigned char c)
{
if (c>='0' && c<='9') return c-'0'+0x10;
else if (c>='a' && c<='f') r... |
import {
readFile,
} from "xlsx";
import {
IDirectory,
Directory,
} from "../source/directory";
import {
IWorkbook,
Workbook,
} from "../source/workbook";
import {
ISheet,
Sheet,
} from "../source/sheet";
import {
IList,
} from "../source/list";
import {
Column,
} from "../source/column";
import {
... |
<gh_stars>0
package de._13ducks.spacebatz.server.data.entities.move;
import de._13ducks.spacebatz.shared.Movement;
/**
* Verwaltet die Position und Bewegung einer Entity. Hat also mindestens Methoden, um X und Y zu bekommen.
*
* WIE ALLE KLASSEN IN DIESEM PAKET UNTERLIEGT AUCH DIESE EINER SCHREIBSPERRE!
* NIEMAND... |
use toy_rsa::{decrypt, encrypt};
fn main() {
let msg: u32 = 12345;
let p: u32 = 0xed23_e6cd;
let q: u32 = 0xf050_a04d;
let pub_key: u64 = <KEY>;
let enc = encrypt(pub_key, msg);
let dec = decrypt((p, q), enc);
println!("p: {}; q: {}; pubkey: {}", p, q, pub_key);
println!("enc: {}, dec: ... |
/**
* Created by jack_zhao on 2018/2/5.
*/
public abstract class BaseAdapter<T> extends RecyclerView.Adapter<BaseViewHolder> implements IBaseAdapter {
private static final String TAG = "BaseAdapter";
protected Map<Integer, Class> viewHolderTypeMap = new HashMap<>();
protected Map<Integer, ViewHolderGener... |
/**
* Tests http pages of ocsp
*
* @version $Id: ProtocolOcspHttpTest.java 22642 2016-01-25 14:05:47Z mikekushner $
*
*/
public class ProtocolOcspHttpTest extends ProtocolOcspTestBase {
public static final String DEFAULT_SUPERADMIN_CN = "SuperAdmin";
private static final String DSA_DN = "CN=OCSPDSATEST,... |
/**
* Returns whether the class path contains any output entries.
*/
public boolean hasOutput()
{
for (int index = 0; index < classPathEntries.size(); index++)
{
if (((ClassPathEntry)classPathEntries.get(index)).isOutput())
{
return true;
... |
<reponame>yingjunyu/getinfo
package com.yingjunyu.GetInfo.stock.view;
import com.yingjunyu.GetInfo.beans.StockBean;
import java.util.List;
/**
* Description :
* Author : yingjunyu
* Email : <EMAIL>
* Blog : https://github.com/yingjunyu
* Date : 2015/12/22
*/
public interface StockView {
void showProg... |
/**
* Create the input graph for the parameter study.
* Reads files from the data directory.
* @param start_date start date of the simulation.
* @param end_date end date of the simulation.
* @param data_dir data directory.
* @returns created graph or any io errors that happen during reading of the files.
*/
mio:... |
def capeesh(message):
users[str(message.from_user.id)]['action'] = 'capeesh'
pilot_selection(message) |
<reponame>talnordan/gloo
package consul
import (
envoyapi "github.com/envoyproxy/go-control-plane/envoy/api/v2"
envoyauth "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth"
envoycore "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
"github.com/pkg/errors"
defaultv1 "github.com/solo-io/gloo/pkg... |
/* NSC_DigestInit initializes a message-digesting operation. */
CK_RV NSC_DigestInit(CK_SESSION_HANDLE hSession,
CK_MECHANISM_PTR pMechanism)
{
SFTKSession *session;
SFTKSessionContext *context;
CK_RV crv = CKR_OK;
CHECK_FORK();
session = sftk_SessionFromHandle(hSession);
if (session ==... |
/**
* @author Roman Smirnov
*
*/
public class HistoricProcessInstanceAuthorizationTest extends AuthorizationTest {
protected static final String PROCESS_KEY = "oneTaskProcess";
protected static final String MESSAGE_START_PROCESS_KEY = "messageStartProcess";
protected String deploymentId;
public void setUp... |
A roughness penalty approach and its application to noisy hyphenated chromatographic two‐way data
In order to improve the signal detection and resolution of chemical components with very low concentrations in hyphenated chromatographic two‐way data, the effect of measurement noise from the instruments on these two asp... |
/**
*
*
* @author Almas Baimagambetov (AlmasB) (almaslvl@gmail.com)
*/
public class AttractorSample extends GameApplication {
@Override
protected void initSettings(GameSettings settings) {
settings.setWidth(800);
settings.setHeight(600);
settings.setTitle("AttractorSample");
... |
def ndarray_to_qimage(arr, fmt):
if QT_LIB.startswith('PyQt'):
if QtCore.PYQT_VERSION == 0x60000:
img_ptr = Qt.sip.voidptr(arr)
else:
img_ptr = int(Qt.sip.voidptr(arr))
else:
img_ptr = arr
h, w = arr.shape[:2]
bytesPerLine = arr.strides[0]
qimg = QtG... |
package com.spark.live.sdk.network.rtmp.message.commands;
import com.spark.live.sdk.network.rtmp.amf.AMFNull;
import com.spark.live.sdk.network.rtmp.amf.AMFNumber;
import com.spark.live.sdk.network.rtmp.amf.AMFString;
/**
*
* Created by devzhaoyou on 9/12/16.
*/
public class FCPublish extends Command {
publi... |
package util
import (
"archive/tar"
"compress/gzip"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
"github.com/mholt/archiver"
)
var tarfile = "studios.tar.gz"
func TarBallFiles(files []string, src, tarFile string) (err error) {
if _, err := os.Stat(tarFile); !os.IsNotExist(err) {
// path/to/wha... |
Around 75 trash and recycling dumpsters have been tossed by Capitol Hill businesses for high-frequency bag pick ups starting last week. Another 36 dumpsters have been pulled off streets and sidewalks and on to private property.
It’s part of a city-mandated program to improve safety in Capitol Hill’s core restaurant an... |
def inv_mel_spectrogram_tensorflow(mel_spectrogram, hparams):
if hparams.signal_normalization:
D = _denormalize_tensorflow(mel_spectrogram, hparams)
else:
D = mel_spectrogram
S = _db_to_amp_tensorflow(D + hparams.ref_level_db)
S = _mel_to_linear(S, hparams)
return _griffin_lim_tensorflow(S ** hparams.power, ... |
#include <stdio.h>
#include <math.h>
#include <getopt.h>
#define BUFFER_SIZE 2048
size_t get_input(int*);
size_t print_output(int*, size_t);
void run();
void print_start();
void print_end();
static int prints;
static int colors;
int main(int argc, char** argv) {
int c;
while(1) {
static struct optio... |
<filename>scripts/getData.py
import json
path_to_file = "C:/Users/dilGoe/Desktop/CopyrightDetection/data/article7.txt"
path_to_targetfile = "C:/Users/dilGoe/Desktop/CopyrightDetection/dataClean/article7.json"
pathToF1 = "C:/Users/dilGoe/Desktop/book4.txt"
pathToF2 = "C:/Users/dilGoe/Desktop/CopyrightDetection/dataClea... |
/**
* Encodes the given byte array and returns a base 64 generated string.
*
* @param bytes The base 10 byte array to be encoded into base 64.
*/
public static String encode(byte[] bytes) {
ByteArrayStream tempIn = new ByteArrayStream(bytes);
try {
tempIn.setPos(bytes.length);
} catch (I... |
/**
Optional callback to inform the plugin about a sample rate change.
*/
void PluginFverb::sampleRateChanged(double newSampleRate)
{
fDsp->init(fVintage ? kVintageSampleRate : newSampleRate);
fDry.setSampleRate(newSampleRate);
fWet.setSampleRate(newSampleRate);
for (uint32_t ch = 0; ch < kNumChannels... |
Leading sustainable schools in the era of Education 4.0: identifying school leadership competencies in Malaysian secondary schools
Abstrac t The purpose of the study was to develop an empirical School Leadership Competency Model for the era of Education 4.0 (SLCMEduc4.0) to identify school leadership competencies that... |
If there were any doubt the government shutdown and debt ceiling standoff in Washington have been a political shot to the jugular for lawmakers, look no further than the recent Houston Chronicle piece, entitled: “Why we miss Kay Bailey Hutchison.”
In it, the paper’s editorial staff laments its reluctant endorsement gi... |
<reponame>brotherneeru/iot-identity-service
// Copyright (c) Microsoft. All rights reserved.
#![deny(rust_2018_idioms)]
#![warn(clippy::all, clippy::pedantic)]
#![allow(
clippy::default_trait_access,
clippy::let_unit_value,
clippy::too_many_lines,
clippy::use_self
)]
#[tokio::main]
async fn main() -> ... |
// Sweeps spans in list until reclaims at least npages into heap.
// Returns the actual number of pages reclaimed.
func mHeap_ReclaimList(h *mheap, list *mspan, npages uintptr) uintptr {
n := uintptr(0)
sg := mheap_.sweepgen
retry:
for s := list.next; s != list; s = s.next {
if s.sweepgen == sg-2 && cas(&s.sweepge... |
<reponame>TheGrimsey/NovusCore-Gameplay
#pragma once
#include <NovusTypes.h>
#include <Utils/ByteBuffer.h>
struct NetworkComponent
{
virtual bool Serialize(Bytebuffer* buffer) const = 0;
virtual bool Deserialize(Bytebuffer* buffer) = 0;
static constexpr size_t GetPacketSize() { return 0; };
}; |
################################################################################
# Copyright: <NAME> 2019
#
# Apache 2.0 License
#
# This file contains all code related to pid check objects
#
################################################################################
import re
import requests
from breadp.checks ... |
// Type definitions for @xmpp/client 0.13
// Project: https://github.com/xmppjs/xmpp.js/tree/main/packages/client
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { Client as ClientCore, jid as xmppJid, xml as xmppXml } from '... |
/**
* Create a ContentObject, encrypt it if requested, and add it to the list of ContentObjects
* awaiting signing and output to the flow controller. Also creates the segmented name for the CO.
*
* @param rootName
* @param segmentNumber
* @param signedInfo
* @param contentBlock
* @param offset
* @para... |
<gh_stars>10-100
import {Message, MessageBox} from 'element-ui';
import {UserModule} from '@/store/modules/user';
import {AxiosRequestConfig, AxiosResponse} from 'axios';
import {getFullToken} from '@/utils/auth';
import {ResponseResult} from '@/types';
export function authHeader(config: AxiosRequestConfig): AxiosRequ... |
package cmd
type Configuration struct {
Header struct {
Version string `json:"version"`
Environment string `json:"environment"`
DataDir string `json:"data_dir"`
} `json:"header"`
Provider struct {
Aws struct {
AccessKey string `json:"access_key" env:"TF_VAR_aws_access_key"`
SecretKey str... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.