content stringlengths 10 4.9M |
|---|
from django.db import models
# from django.contrib.auth.models import User
from apps.users.models import CustomUser
from apps.categorys.models import BillType, Categorys
from datetime import date
# 引入Enum类型
from enumfields import EnumIntegerField
# Create your models here.
class Bills(models.Model):
"""
账目信息表... |
/// Handles (wayland) events from the server like keyboard input.
fn handle_window_event(
active_surface: &Rc<RefCell<Option<ObjectId>>>,
window: Option<&mut Window>,
ev: EventSet,
) {
match ev {
EventSet::WlKeyboard(_, ev) => match (window, ev) {
(_, wl_keyboard::Event::Enter { surf... |
#![allow(dead_code, non_camel_case_types, non_snake_case)]
use std::os::raw::{c_int, c_char, c_void, c_ulong, c_double, c_long, c_ushort};
#[cfg(test)]
use std::mem;
pub type EM_BOOL = c_int;
pub type EM_UTF8 = c_char;
pub type EMSCRIPTEN_RESULT = c_int;
pub const EM_TRUE: EM_BOOL = 1;
pub const EM_FALSE: EM_BOOL = ... |
/**
* A withdraw result that was done to a Binance account.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class WithdrawResult2 {
/**
* Withdraw id.
*/
private String id;
} |
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_array_h__
#define INCLUDE_array_h__
#include "common.h"
/*
* Use this to declare a typ... |
def which(file_path):
shell_rc, out_buf = gc.cmd_fnc_u("which " + file_path, quiet=1,
print_output=0, show_err=0)
if shell_rc != 0:
error_message = "Failed to find complete path for file \"" +\
file_path + "\".\n"
error_message += gp.s... |
module Sarsi.Tools.Pipe where
import Codec.Sarsi (Event (..), Message (..))
import Codec.Sarsi.Curses (cleanLine, cleaningCurses)
import Data.Attoparsec.Text.Machine (processParser)
import Data.ByteString (ByteString)
import qualified Data.ByteString.Char8 as ByteString
import Data.Machine (MachineT, ProcessT, asParts... |
/* Translate keycode to escape sequence. */
void vt_send(int c)
{
char s[3];
int f;
int len = 1;
if (c < 256) {
if (c == K_ERA)
c = vt_bs;
s[0] = vt_outmap[c];
s[1] = 0;
if (c == '\r' && vt_crlf) {
s[1] = '\n';
s[2] = 0;
len = 2;
}
v_termout(s, len);
if (vt_... |
Habitat Northwestern Crows live near the coast and forage along bays, tidepools, and river deltas. They are also increasingly common in villages, towns, and campgrounds. They also nest on coastal islands, but typically move to the mainland for winter. Northwestern Crows are not often found in deep forest.Back to top
F... |
/// Generates an asynchronous command response from the arguments and return
/// value of a function.
///
/// See the [`millennium::command`] module for all the items and traits that
/// make this possible.
fn body_async(function: &ItemFn, invoke: &Invoke) -> syn::Result<TokenStream2> {
let Invoke { message, resolver ... |
from .compute_speed import compute_speed
from .compute_memory import compute_memory
from .compute_madd import compute_madd
from .compute_flops import compute_flops
from .stat_tree import StatTree, StatNode
from .model_hook import ModelHook
from .reporter import report_format
from .statistics import stat, ModelStat
__a... |
package plugin
import (
"encoding/json"
"io/ioutil"
"os"
"regexp"
"testing"
"github.com/ethereum/go-ethereum/plugin/account"
"github.com/naoina/toml"
testifyassert "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestReadMultiFormatConfig_whenConfigEmbeddedAsArray(t *testing... |
<filename>lib/control/cloop_shell.c
/*
* Copyright (c) 2021 Teslabs Engineering S.L.
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdlib.h>
#include <shell/shell.h>
#include <spinner/control/cloop.h>
static int cmd_cloop_start(const struct shell *shell, size_t argc, char **argv)
{
ARG_UNUSED(shell);
ARG_... |
def lines(experiments,
outcomes,
outcomes_to_show=[],
group_by=None,
grouping_specifiers=None,
density='',
legend=True,
titles={},
ylabels={},
experiments_to_show=None,
show_envelope=False,
log=False):
_log... |
#coding:utf-8
import random
import sys
def generate_dcsl(a, k, n):
L = [a]
for i in range(1,n):
L.append(a+i*k)
return L
def find_gcd(a, b):
y = max(a,b)
x = min(a,b)
while y%x != 0:
temp = y%x
y = x
x = temp
return x
def find_gcd_list(L):
if len(L) == 1... |
def image_altering_prohibited(self, image_altering_prohibited):
self._image_altering_prohibited = image_altering_prohibited |
Image Comics has made a land grab and is publishing the new Kingsman series, a sequel to the original Secret Service by Mark Millar and Dave Gibbonem with a new series by Rob Williams and Simon Fraser ahead of the movie sequel – and timed with with Millar’s new Millarworld new talent anthology. And Millar doesn’t need ... |
#include<bits/stdc++.h>
using namespace std;
int main() {
int64_t n, c;
cin >> n >> c;
vector<int64_t> x(n), v(n);
for (int64_t i = 0; i < n; i++) cin >> x[i] >> v[i];
vector<int64_t> cw1(n), cw2(n), aw1(n), aw2(n);
partial_sum(begin(v), end(v), begin(cw1));
partial_sum(rbegin(v), rend(v),... |
/*
Import Polyfill Libraries
*/
declare const angular: ng.IAngularStatic;
import 'core-js/es6';
import 'core-js/es7/reflect';
import '../src/ng1/ux-aspects-ng1.module';
import { environment } from './environments/environment';
require('zone.js/dist/zone');
if (!environment.production) {
Error['stackTraceLimit'] ... |
// Run the inference for a sample.
mlperf_status_t mlperf_backend_issue_query(mlperf_backend_ptr_t backend_ptr) {
QTIBackendHelper *backend_data = (QTIBackendHelper *)backend_ptr;
if (backend_data->isTflite_) {
return tflite_backend_issue_query(backend_data->tfliteBackend_);
}
if (!backend_data->useSnpe_) {... |
/* ************************************************************************ **
** This file is part of rsp2, and is licensed under EITHER the MIT license **
** or the Apache 2.0 license, at your option. **
** **
** ... |
<gh_stars>1-10
package com.cloudwebrtc.webrtc;
import android.app.Activity;
import android.content.Context;
import android.hardware.Camera;
import android.graphics.SurfaceTexture;
import android.media.AudioManager;
import android.util.Log;
import android.util.LongSparseArray;
import com.cloudwebrtc.webrtc.record.Audi... |
<gh_stars>0
import { Injectable } from '@nestjs/common'
import { SendEmailCommand, SESv2Client } from '@aws-sdk/client-sesv2'
import { ConfigService } from '@nestjs/config'
import { User } from '../user/entities/user.entity'
@Injectable()
export class MailService {
private client: SESv2Client
constructor(private... |
Effect of mixed partial occupation of metal sites on the phase stability of γ-Cr23−xFexC6 (x = 0–3) carbides
The effect of mixed partial occupation of metal sites on the phase stability of the γ-Cr23−xFexC6 (x = 0–3) carbides is explored as function of composition and temperature. Ab initio calculations combined with ... |
<reponame>FloorBelow/ESOData<gh_stars>1-10
#ifndef ESODATA_DATABASE_DEF_FILE_INDEX_H
#define ESODATA_DATABASE_DEF_FILE_INDEX_H
#include <memory>
#include <vector>
namespace esodata {
class Filesystem;
class SerializationStream;
struct DefFileIndex {
struct LookupRecord {
uint32_t index;
uint32_t offset;
... |
<reponame>damato3/Watlo
package com.lowlightstudios.watlo.services;
import android.content.Context;
import com.lowlightstudios.watlo.R;
import com.lowlightstudios.watlo.core.RestCore;
import com.lowlightstudios.watlo.core.Utils;
import com.lowlightstudios.watlo.models.InfoCard;
import org.json.JSONObject;
import ja... |
package expconf
//go:generate ../gen.sh
// ProfilingConfigV0 configures profiling in the harness.
type ProfilingConfigV0 struct {
RawEnabled *bool `json:"enabled"`
RawBeginOnBatch *int `json:"begin_on_batch"`
RawEndAfterBatch *int `json:"end_after_batch"`
RawSyncTimings *bool `json:"sync_timings"`
}
|
/**
* Randomly generate points on a plane by randomly selecting two vectors on the plane using cross products
*/
private List<Point3D_F64> randPointOnPlane( PlaneNormal3D_F64 plane , int N ) {
Vector3D_F64 v = new Vector3D_F64(-2,0,1);
Vector3D_F64 a = UtilTrig_F64.cross(plane.n,v);
a.normalize();
Vector3D_... |
<gh_stars>1-10
import {Input, Output} from '@angular/core';
import {Observable} from 'rxjs';
/** Form component to configure arguments for a Flow. */
export abstract class FlowArgumentForm<T extends unknown> {
@Input() defaultFlowArgs!: T;
@Output() abstract formValues$: Observable<T>;
@Output()
abstract statu... |
// MarkFailed set state of backup and given rs as error with msg
func (r *Restore) MarkFailed(name, rsName, msg string) error {
err := r.cn.ChangeRestoreState(name, pbm.StatusError, msg)
if err != nil {
return errors.Wrap(err, "set backup state")
}
err = r.cn.ChangeRestoreRSState(name, rsName, pbm.StatusError, ms... |
#!/usr/bin/env python
#
# 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.0OA
#
# Authors:
# - <NAME>, <<EMAIL>>, 2019 - 2020
"""
operations related t... |
Chronic polymyositis and myxovirus-like inclusions. Electron microscopic and viral studies.
Light and electron microscopy revealed intranuclear inclusions in the muscles of a 43-yearold man resembling helical nucleoprotein of myxovirus. Virological studies to demonstrate myxovirus revealed no cytopathic effects in Afr... |
<reponame>alehpineda/bitesofpy
from collections import namedtuple
from datetime import datetime
import json
blog = dict(
name="PyBites",
founders=("Julian", "Bob"),
started=datetime(year=2016, month=12, day=19),
tags=["Python", "Code Challenges", "Learn by Doing"],
location="Spain/Australia",
... |
Salman Rushdie's latest novel, entitled "The Golden House," follows the life of a young American filmmaker against a backdrop of contemporary US politics.
To be published by Vintage imprint Jonathan Cape, "The Golden House" will be Rushdie's 12th novel. The British-Indian writer is most known for his controversial nov... |
def plot_angle_chi(f, t=[], savefig=False, filefig="plots/angle_chi.png"):
if len(t) == 0:
t = range(f.shape[0])
theta = np.zeros(f.shape[0])
for tt in t:
theta[tt] = math.atan(f[tt, 1] * 1.0 / f[tt, 0])
return theta |
A major fire in Downtown Saint John has hit three adjoining wood–frame buildings containing one business and several apartments.
Saint John Fire Chief Kevin Clifford says the fire broke out at around 2:30 a.m. Sunday on Prince Edward Street.
One of the buildings had a small business on the ground floor and several ap... |
def printer_callback():
def printer_helper(_rep, _fold, _run, last_evaluation_results):
print(f"{_rep}.{_fold}.{_run} {last_evaluation_results}")
return lambda_callback(
on_exp_start=printer_helper,
on_exp_end=printer_helper,
on_rep_start=printer_helper,
on_rep_end=prin... |
# -*- coding: utf-8 -*-
#
OBJECT_TYPE_READ_USER_INFO = 1
OBJECT_TYPE_PARAMETER = 2
OBJECT_TYPE_MESSAGE = 3
OBJECT_TYPE_CUSTOM_DATALOG = 5
OBJECT_TYPE_DATALOG_TX = 0x0101
PROPERTY_ID_READ = 0x01
PROPERTY_VALUE_QSP = 0x05
PROPERTY_MIN_QSP = 0x06
PROPERTY_MAX_QSP = 0x07
PROPERTY_LEVEL_QSP = 0x08 # To get a... |
#include "RE/Scaleform/GFx/State.h"
namespace RE
{
namespace Scaleform
{
namespace GFx
{
State::State(StateType a_state) :
_type(a_state),
_pad14(0)
{}
auto State::GetStateType() const
-> StateType
{
return _type;
}
}
}
}
|
<reponame>nrc/rfc-index
use crate::{
errors::{Error, Result},
metadata::{RfcMetadata, TagMetadata, Team, TeamTags},
parse_multiple,
};
use octocrab::{models::pulls::PullRequest, OctocrabBuilder};
use std::{
cmp::Ordering,
collections::HashMap,
fs::{self, File},
io::{BufRead, BufReader, Read}... |
Knowledge-Based Object Localization in Scanning Electron Microscopy Images for Hardware Assurance
Object localization is an essential step in image-based hardware assurance applications to navigate the view to the target location. Existing localization methods are well-developed for applications in many other resear... |
/**
* Created by Jurica on 7/4/2016.
*/
public class MjestoProvider extends ContentProvider {
SQLiteDatabase database;
String databaseName = "nekaBaza";
String authority = "com.example.mjesto";
UriMatcher matcher;
@Override
public boolean onCreate() {
//Da baza postoji, ovako bi se i... |
/**
* The representation of a Expiry Record, as retrieved from the DB.
*
* @author Robert Eby
* @version $Id: ExpiryRecord.java,v 1.4 2013/10/28 18:06:52 eby Exp $
*/
public class ExpiryRecord extends BaseLogRecord {
public static final String EXPIRY_REASON = "expiryReason";
public static final St... |
Reuters Hizbollah fighters drive off from the Marjayoun barracks with a tank that belonged to Israel’s local militia in south Lebanon on May 24, 2000.
Israel and Saudi Arabia don’t have official relations and Riyadh still does not recognise Israel’s right to exist. But the two states have held five secret meetings sin... |
<reponame>Easonyesheng/CodePractice
"""
给你一个整数数组 nums,将该数组升序排列。
示例 1:
输入:nums = [5,2,3,1]
输出:[1,2,3,5]
示例 2:
输入:nums = [5,1,1,2,0,0]
输出:[0,0,1,1,2,5]
来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/sort-an-array
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
"""
# Quick sort
import random
class Solution:
def sortA... |
<gh_stars>0
import React from 'react';
import Head from 'next/head';
import { Hero } from '../components/Hero';
import { Navigation } from '../components/Navigation';
import { ProjectBox } from '../components/ProjectBox';
import { ProjectBoxLeft } from '../components/ProjectBoxLeft';
import styles from '../styles/Hom... |
Derivation, Design and Simulation of the Single-Ended Primary-Inductor Converter (SEPIC)
The purpose of the paper is to guide engineering students and ease their transition from the most basic DC-DC converter topologies to more advanced types. The buck, boost and buck-boost converters are the usual suspects in textboo... |
/**
* As typed_var_kvencode_ex(), but look up the definition of the configuration
* type from a provided config_type_t enum.
*/
config_line_t *
typed_var_kvencode(const char *key, const void *value, config_type_t type)
{
const var_type_def_t *def = lookup_type_def(type);
return typed_var_kvencode_ex(key, value, ... |
The Impacts of Micronutrient Fertility on the Mineral Uptake and Growth of Brassica carinata
Many abiotic factors impact the yield and growth of Brassica carinata (commonly referred to as carinata or Ethiopian mustard). Very little is known about carinata and how mineral nutrients impact its growth, and more specifica... |
<reponame>Components-care/react-components
import React from "react";
import { TextFieldProps } from "@material-ui/core";
import { KeyboardDatePickerProps } from "@material-ui/pickers";
import { InputLabelConfig } from "../CommonStyles";
import { LocalizedKeyboardDatePicker } from "../../../standalone/LocalizedDateTime... |
def centuryFromYear(year):
""" Given a year, return the century it is in. -> int """
iter = year//100 + 1
sec = 0
for i in list(range(iter)):
if (sec+100 >= year):
return i+1
else:
sec += 100
|
import { Fixtures } from '../../../../test/fixtures';
import { extractPackageFile } from '.';
const invalidYamlFile = Fixtures.get('invalid.yaml');
const pluginsTextFile = Fixtures.get('plugins.txt');
const pluginsYamlFile = Fixtures.get('plugins.yaml');
const pluginsEmptyTextFile = Fixtures.get('empty.txt');
const ... |
Comparison of a liquid solvent extraction technique and supercritical fluid extraction for the determination of alpha- and beta-carotene in vegetables.
An ethanol-pentane solvent extraction procedure and a supercritical CO2 extraction procedure are compared for the high-performance liquid chromatographic determination... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package examen2_andrescruz;
import java.io.Serializable;
/**
*
* @author MBanegas
*/
public class Astronauta implements Serializab... |
/**
* This is a basic item in the game. It has a name, type, and various stat buffs.
* @author Nam Tran
*
*/
public class Item {
private String name, type; // String info for the item
private int attackBuff, defenseBuff, healthBuff; // Stat buffs for the item
/**
* Constructor
*/
public Item() {
}
... |
use std::fmt;
use std::any::type_name;
// use crate::Object;
use crate::_Object;
use crate::Iterable;
/// print(object);
pub fn print<T: fmt::Display>(arg: T) {
println!("{}", arg);
}
/// print(object);
pub fn printd<T: fmt::Debug>(arg: T) {
println!("{:?}", arg);
}
/// print(object);
pub fn dprint<T: fmt... |
//
// Created by <NAME> on 23.06.2018.
// Copyright (c) 2018 msfrms. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AsyncDisplayKit/AsyncDisplayKit.h>
@interface TestTaskNode : ASDisplayNode
@end |
def run_rmclean(fdfFile, rmsfFile, weightFile, rmSynthFile, cutoff,
maxIter=1000, gain=0.1, prefixOut="", outDir="", nBits=32,
showPlots=False, doAnimate=False):
dtFloat = "float" + str(nBits)
dtComplex = "complex" + str(2*nBits)
freqArr_Hz, weightArr = np.loadtxt(weightFile,... |
// Get datatype for timestamp (year to second)
XString
SQLInfoMariaDB::GetKEYWORDTypeTimestamp() const
{
return "TIMESTAMP";
} |
<reponame>maztheman/client<filename>src/commands.cpp
#include "stdafx.h"
#include "commands.hpp"
#include <sstream>
static std::vector<std::string> to_vector(std::string s, std::string token)
{
std::vector<std::string> retval;
retval.reserve(128);
auto idx = 0UL;
while (1) {
auto found = s.find(token, idx);
if... |
// Check b < a returns 0
@Test
public void testGreaterThanBltA() {
when(_ps.pop()).thenReturn(99).thenReturn(10);
_e.greaterThan();
verify(_ps).push(0);
} |
package behavior
// Limit 限定子行为的执行次数。
// 每次 Tick 只会执行一次子行为。
// 限定子行为的执行次数,达到限定次数之后,返回 Failure,否则返回子行为的执行结果。
// 子行为返回 Success 或者 Failure,算作一次执行。
// count 参数必须大于 0。
type Limit struct {
Decorator
limit int
current int
}
func NewLimit(limit int, child Behavior) *Limit {
var n = &Limit{}
n.SetWorker(n)
n.limit = l... |
def delete_hopper_config_pool(self, hopper_id, config_pool_id):
url = f"{self.endpoints['api_root']}hopper/{hopper_id}/config/pool/{config_pool_id}"
return self._delete_item(url) |
/**
* Binds or unbinds the {@link GLArrayData} lifecycle to this ShaderState.
*
* <p>If an attribute location is cached (ie {@link #bindAttribLocation(GL2ES2, int, String)})
* it is promoted to the {@link GLArrayData} instance.</p>
*
* <p>The attribute will be destroyed with {@link #destro... |
// NewDirectApplier creates a new direct applier object
func NewDirectApplier(c *config.Config, logger *logger.Logger, backend *db.Backend, mysqlDiscoveryAPI *gh.MySQLDiscoveryAPI) *DirectApplier {
return &DirectApplier{
cfg: c,
logger: logger,
backend: backend,
mysqlDiscover... |
Subnet Replacement: Deployment-stage backdoor attack against deep neural networks in gray-box setting
We study the realistic potential of conducting backdoor attack against deep neural networks (DNNs) during deployment stage. Specifically, our goal is to design a deployment-stage backdoor attack algorithm that is both... |
<filename>SpringBoard/SBIconListView.h
#import <SpringBoardHome/SBHIconGridSize.h>
#import <SpringBoardHome/SBHIconGridSizeClass.h>
#import <CoreGraphics/CoreGraphics.h>
API_AVAILABLE(ios(4.0))
@interface SBIconListView : UIView
@property(readonly, nonatomic) NSUInteger maximumIconCount API_AVAILABLE(ios(13.0));
@pro... |
module UI.Utils
( initUIBuilder
, getToolbarWindow
, getDrawingAreaWindow
, runApp
) where
import Control.Concurrent
import Control.Monad.IO.Class
import Data.Maybe
import qualified Data.Text as T
import Graphics.GLUtil (readTexture, texture2D... |
import type { EntityName, EventArgs, EventSubscriber } from '@mikro-orm/core';
import { Author2 } from '../entities-sql';
export class ManualAuthor2Subscriber implements EventSubscriber<Author2> {
static readonly log: [string, EventArgs<Author2>][] = [];
getSubscribedEntities(): EntityName<Author2>[] {
retur... |
package com.nebula.web.aop;
import org.springframework.stereotype.Service;
@Service
public class DoSthServiceImpl implements DoSthService {
@Override
public void doSth() {
System.out.println("do sth ....");
}
}
|
<filename>src/storage/txn/commands/scan_lock.rs<gh_stars>0
// Copyright 2020 TiKV Project Authors. Licensed under Apache-2.0.
use crate::storage::txn::commands::{Command, CommandExt, TypedCommand};
use crate::storage::txn::LockInfo;
use txn_types::{Key, TimeStamp};
command! {
/// Scan locks from `start_key`, and ... |
Today, Trump confirmed that he will pull out of the Paris Climate Accord. This is the peak of the war between the environment and the economy.
This doesn’t have to be a battle. We are more than capable of coexisting with our environment while sparking economic growth. In fact, going green actually benefits the economy... |
def add_quasi_copy_row_to_dataset(dataframe):
quasi_copy = dataframe.iloc[0]
quasi_copy['td'] = (dataframe.iloc[0]['td']) + (dataframe.iloc[0]['td'] / 1000)
dataframe = dataframe.append(quasi_copy, ignore_index=True)
print(dataframe)
return dataframe |
#include<bits/stdc++.h>
using namespace std;
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, ... |
/*
Request model is the Material Indent model
*/
@Entity
public class Request extends Model {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
public Long id;
@Required
@ManyToOne()
@Column(nullable=false)
public User requester;
@Required
@Column(nullable=false)
publi... |
<filename>back/src/features/notification/controller/notification.controller.ts
import { Controller, Get, UseGuards } from '@nestjs/common';
import { notificationConfig } from '../config/notification.config';
import { JwtAuthGuard } from '../../auth/guard/jwt-auth.guard';
@UseGuards(JwtAuthGuard)
@Controller('noti... |
/**
* Copyright © 2014-2018 Darwino, Inc.
*
* 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 ... |
Oracle is sharing plans for building a DIY tablet called the DukePad using a Raspberry Pi with the world. Yes, that Oracle — the same people who develop the Java platform that runs on billions of devices.
It’ll cost you around $370 to build your own DukePad. Beyond the Raspberry Pi, you’ll also need to pick up an LCD ... |
Review: Cinematic Projections: The Analytical Psychology of C.G. Jung and Film Theory
The major difference Hockley draws with Lacanian-based psychoanalysis is that, while it emphasised an irrevocably split subject, Jung attributes a positive and therapeutic function to the traces of the unconscious. Rather than sympto... |
export * from '@fuse/lib/mock-api/public-api';
|
def solve(n):
map = ["Sheldon", "Leonard", "Penny", "Rajesh", "Howard"]
rate = 1
#estimating the row
while (5 * rate) <= n:
n -= (5 * rate)
rate *= 2
#estimating the column in that row
return map[(n-1)/rate]
if __name__ == "__main__":
n = int(raw_input()... |
/**
* This method check if the string is a blank string.
* @param cs - the char sequence.
* @return - Returns (true) if the char sequence is totally blank, return (false) if the char sequence have a character.
*/
public static boolean isBlank(final CharSequence cs) {
int strl = cs.length();
if (cs == null |... |
<reponame>tbuchi888/golang-slashcommand-k8s<gh_stars>0
package main
import (
"bytes"
"encoding/json"
"net/http"
"os"
"github.com/favclip/ucon"
)
func main() {
ucon.Orthodox()
ucon.HandleFunc("POST", "/", func(w http.ResponseWriter, r *http.Request) {
... |
<reponame>kuumies/sunne<filename>src/renderer/opengl/sunne_opengl_renderer.h
/* ---------------------------------------------------------------- *
<NAME> <<EMAIL>>
Definition of kuu::sunne::OpenGLRenderer class.
* ---------------------------------------------------------------- */
#pragma once
#include <memory... |
#include <stdatomic.h>
#include <unrelacy.h>
#define LOOP_BOUND 2
template <typename t_element, size_t t_size>
struct mpmc_boundq_1_alt
{
private:
// elements should generally be cache-line-size padded :
t_element m_array[t_size];
// rdwr counts the reads & writes that have started
atomic<unsigned... |
<gh_stars>1-10
import * as React from 'react';
import ComponentBestPractices from '../../../../components/ComponentBestPractices';
const doList = [
'Use `aria-roledescription` with the value of `splitbutton` on the `button` slot to announce the proper semantics of the component.',
'Use `aria-describedby` on the `... |
<reponame>yupbank/sympy<gh_stars>1-10
"""Grover's algorithm and helper functions.
Todo:
* W gate construction (or perhaps -W gate based on Mermin's book)
* Generalize the algorithm for an unknown function that returns 1 on multiple
qubit states, not just one.
* Implement _represent_ZGate in OracleGate
"""
from sym... |
.
Authors conducted a clinical-instrumental examination of 97 patients in the post-operative phase of reconstructive surgery of carotid arteries. Evaluation of neurological status, Luria's syndrome neuropsychological analysis for assessment of higher mental functions dynamics (HMF) were carried out. Pre-operative ultr... |
def _fetch_from_remote(batch):
remote = '%s@%s:%s/' % (batch.remote_user, batch.remote_node, STORAGE_DIR)
with tempfile.NamedTemporaryFile('w', delete=False) as f:
for m in batch.metrics_fs:
print(m, file=f)
f.flush()
ssh_cmd = 'ssh ' + ' '.join(MANDATORY_SSH_OPTIONS + batch.... |
package cmd
import (
"path/filepath"
"github.com/Sukhavati-Labs/go-miner/database/ldb"
"github.com/Sukhavati-Labs/go-miner/database/storage"
"github.com/Sukhavati-Labs/go-miner/logging"
"github.com/spf13/cobra"
)
var (
defaultDbDir = "./chain"
)
var checkCmd = &cobra.Command{
Use: "check [db_dir]",
Short:... |
import sys
S = input()
T = input()
if len(S)!=len(T):
print('No')
sys.exit()
S = S+S
for i in range(len(T)):
flag = True
for j in range(len(T)):
if S[i+j] != T[j]:
flag = False
if flag:
print('Yes')
sys.exit()
print('No')
|
<gh_stars>1-10
import tensorflow as tf
import tensorflow_model_analysis as tfma
import tensorflow_transform as tft
from tensorflow_transform.tf_metadata import schema_utils
NUMERIC_FEATURE_KEYS = ['Elevation', 'Aspect', 'Slope', 'Horizontal_Distance_To_Hydrology',
'Vertical_Distance_To_Hydrology', 'Horizontal_Di... |
import React from 'react';
import Layout from '@/layouts/layout';
import Link from 'next/link';
import tw from "twin.macro";
import NewsletterSubscribe from "@/components/newsletter-subscribe";
const StyledDiv = tw.div``;
const IndexPage = () => {
return (
<Layout>
<StyledDiv className="article-content-wr... |
/**
* Constants that help the usage of all {@link SessionDataStore} components.
*/
public final class CommonSessionDataStoreFactoryConstants {
public static final String ATTR_GRACE_PERIOD_SEC = "gracePeriodSec";
public static final String ATTR_SAVE_PERIOD_SEC = "savePeriodSec";
/**
* One hour.
*/
pub... |
Optimal risk management in critical infrastructures against cyber-adversaries
One of the biggest cyber-security problems that our critical infrastructures face is the underinvestment in cyber-security solutions by private firms operating these systems. A healthy market insurance may incentivize asset owners to invest ... |
<reponame>msakai/ghc
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE MagicHash #-}
module GHC.Exts.Heap.ProfInfo.PeekProfInfo_ProfilingEnabled(
peekStgTSOProfInfo
, peekTopCCS
) where
#if __GLASGOW_HASKELL__ >= 811
-- See [hsc and CPP workaround]
#define PROFILING
#include "Rts.h"
#undef BLOCK_SIZE
#undef MBLO... |
/* eslint-disable @typescript-eslint/interface-name-prefix */
import { Action, PayloadAction, TypeConstant } from 'typesafe-actions';
interface IMeta {
method: string;
route: string;
}
/**
* @desc Action with only Meta
*/
interface IMetaAction<TType extends TypeConstant, TMeta> {
type: TType;
meta?: TMeta;
... |
<reponame>cevadtokatli/smart-react-components
import React from "react"
import renderTheme from "../test/renderTheme"
import mountTheme from "../test/mountTheme"
import Button from "./Button"
describe("<Button />", () => {
it("should match snapshot", () => {
const wrapper = renderTheme(<Button>Button</Butt... |
/*
Clear the inputs and indexes kept in the current and next layer.
*/
public void clear() {
for (Neuron neuron : neurons) {
neuron.clear();
}
for (Neuron neuron : nextLayer.getNeurons()) {
neuron.clear();
}
} |
// Generate a mock server that will send packet through a udp connection and communicate back
// received packet.
func genMockServer(port uint) mockServer {
addr, err := net.ResolveUDPAddr("udp", fmt.Sprintf("0.0.0.0:%d", port))
if err != nil {
panic(err)
}
conn, err := net.DialUDP("udp", nil, addr)
if err != ni... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.