text stringlengths 3 1.05M |
|---|
import pywidevine.downloader.wvdownloaderconfig as wvdl_cfg
class WvDecryptConfig(object):
def __init__(self, filename, tracktype, trackno, license, init_data_b64, cert_data_b64=None):
self.filename = filename
self.tracktype = tracktype
self.trackno = trackno
self.init_data_b64 = in... |
/* eslint-disable no-return-assign */
// // Import the individual autotrack plugins you want to use.
import '@bolt/polyfills/platform/symbol';
import 'autotrack/lib/plugins/clean-url-tracker';
import 'autotrack/lib/plugins/media-query-tracker';
import 'autotrack/lib/plugins/outbound-link-tracker';
import 'autotrack/lib... |
import json
import pytest
from eth_utils import (
keccak,
)
from hexbytes import (
HexBytes,
)
CONTRACT_ABI = json.loads('[{"constant":false,"inputs":[],"name":"return13","outputs":[{"name":"result","type":"int256"}],"type":"function"},{"constant":true,"inputs":[],"name":"counter","outputs":[{"name":"","type"... |
from django.urls import path, re_path
from photo.views import *
from photo.models import Photo
app_name = 'photo'
urlpatterns = [
path('', photo_list, name='photo_list'),
path('detail/<int:pk>/', PhotoDetailView.as_view(), name='photo_detail'),
path('upload/', PhotoUploadView.as_view(), name='photo_upload... |
// Copyright 2020 Salesforce.com, Inc. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-OptionalExpression
description: >
template string passed to tail position of optional chain
info: |
Static Semantics: Early Errors
OptionalChain:
?.TemplateLi... |
#!/usr/bin/env python
# encoding: utf-8
"""
A new example showing how to use `TaskRejectError` to handle dependencies
in the IPython task system.
To run this example, do::
$ ipcluster local -n 4
Then, in another terminal start up IPython and do::
In [0]: %run taskreject.py
In [1]: mec.execute('run=Tru... |
import lz4.block
import numpy
def compress(data: bytes, compression_level=0) -> bytes:
if compression_level > 0:
return lz4.block.compress(data,
mode='high_compression',
compression=compression_level)
else:
return lz4.block.co... |
#pragma once
// system
#include <memory>
#include <functional>
// local
#include <appimage/utils/logging.h>
namespace appimage {
namespace utils {
/**
* Provides a global logger to be used in the libappimage context. It follows the singleton pattern.
*/
class Logger {
pu... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import _ from 'lodash';
import enUS from 'antd/lib/locale-provider/en_US';
import { LocaleProvider, message, Modal, Spin } from 'antd';
import SplitPane from '... |
import createUsage from 'command-line-usage';
import pkg from '../package.json';
import help from './commands/help';
import triggerDownstreamBuilds from './commands/trigger-downstream-builds';
import updateBuildConfig from './commands/update-build-config';
import updateDependencyGraph from './commands/update-dependency... |
const multer = require('multer');
const path = require('path');
module.exports = {
storage: multer.diskStorage({
destination: path.resolve(__dirname, '..', '..', 'uploads'),
filename(req, file, cb) {
cb(null, file.originalname);
},
}),
};
|
import os
import time
import platform
from datetime import timedelta
try:
import psutil
except ImportError:
psutil = None
from cloudbot import hook
from cloudbot.util.filesize import size as format_bytes
import cloudbot
@hook.command(autohelp=False)
def about(text, conn):
"""-- Gives information about C... |
/**
* Search through a table looking for a given string (optionally the search
* can be restricted to a single column). The return value is an array with
* the data indexes (from DataTables' internal data store) for any rows which
* match.
* @name fnFindCellRowIndexes
* @anchor fnFindCellRowIndexes
* @author ... |
from django.contrib.sessions.tests import SessionTestsMixin
from django.test import TestCase
from riak_sessions.backends import riak
class RiakSessionTest(SessionTestsMixin, TestCase):
backend = riak.SessionStore
|
$( document ).ready(function() {
console.log( "ready!" );
colorElements()
});
function colorElements(){
var colors = ['#EC7063','#A569BD','#5DADE2','#45B39D','#58D68D','#F4D03F','#DC7633','#CC0099','#339900']
var rows = $(".gantt-row-bars");
var bars = $(rows).find('li')
for (i = 0; i < bars.length; i... |
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is govered by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""Business objects for the Monorail features.
These are classes and functions that operate on ... |
#!/usr/bin/python
import sys
hitsTotal = 0
oldKey = None
maxHits = 0
maxPath = None
for line in sys.stdin:
thisKey = line.strip()
if oldKey and oldKey != thisKey:
if hitsTotal > maxHits:
maxHits = hitsTotal
maxPath = oldKey
oldKey = thisKey;
... |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.compiler import Compiler
class Oneapi(Compiler):
# Subclasses use possible names of C compiler
cc_nam... |
/**
* Wrapper for built-in http.js to emulate the browser XMLHttpRequest object.
*
* This can be used with JS designed for browsers to improve reuse of code and
* allow the use of existing libraries.
*
* Usage: include("XMLHttpRequest.js") and use XMLHttpRequest per W3C specs.
*
* @author Dan DeFelippi <dan@dri... |
/*
This file is part of mikroSDK.
Copyright (c) 2017, MikroElektonika - http://www.mikroe.com
All rights reserved.
----------------------------------------------------------------------------- */
#include "__t_DSPIC.h"
#ifndef __DSPIC_BOARDEF__
#define __DSPIC_BOARDEF__
// ---------------------------------... |
import React, { useState } from 'react';
import {DndContext, DragOverlay, MouseSensor, TouchSensor, useSensor, useSensors} from '@dnd-kit/core';
import {LetterSpace} from './LetterSpace';
import {LetterTile} from './LetterTile';
import {Draggable} from './Draggable';
import { LetterSet } from './LetterSet';
const siz... |
import sys
import nltk
#import numpy as np
from nltk.tokenize import word_tokenize
from nltk.stem import WordNetLemmatizer
from nltk.corpus import stopwords
from nltk.stem.porter import PorterStemmer
from sqlalchemy import create_engine
import pandas as pd
import re
from sklearn.multioutput import MultiOutputClassi... |
import React from 'react';
import { useMainContext } from '../../context/MainContext';
import ForecastDayItem from './ForecastDayItem';
import convertDate from '../../hooks/useWeather';
import Title from './Title';
import Loading from 'components/Sidebar/Loading';
function AllForecast() {
const { weatherData, loadin... |
"""Legacy editable installation process, i.e. `setup.py develop`.
"""
import logging
from typing import List, Optional, Sequence
from pip._internal.build_env import BuildEnvironment
from pip._internal.utils.logging import indent_log
from pip._internal.utils.setuptools_build import make_setuptools_develop_args
from pip... |
import asyncio
import logging
import random
import typing as t
import pytest
import ubii.proto as ub
from ubii.framework.topics import DataConnection, TopicStore, BasicTopic, StreamSplitRoutine
pytestmark = pytest.mark.asyncio
log = logging.getLogger(__name__)
class MockConnection(DataConnection):
"""
Mock... |
import logging
import numpy as np
import torch
import sys
sys.path.append('/repos/SpaceNetExploration')
from training.models.unet.unet import Unet
from training.models.unet.unet_baseline import UnetBaseline
"""
Performs inference on a tile of image of arbitrary size.
Functions here reference https://gith... |
"""Policies
Note that Dispatchers are now implemented in "dispatcher.py", but
are still documented here.
Policies
A policy is an object which manages the interaction between a public
Python object, and COM . In simple terms, the policy object is the
object which is actually called by COM, and it invo... |
import React, { Component } from 'react';
import StockInfo from '../../components/Profile/StockInfo';
class Hog extends Component {
constructor(props){
super(props);
this.state = {
isLoading: false,
error: null,
results: [],
};
this.fetchHogStockInfo = this.fetchHogStockInfo.bind(t... |
const { version, name } = require('../package.json')
hexo.extend.helper.register('theme_version', () => version)
const source = (path, cache, ext) => {
if (cache) {
const minFile = `${path}${ext === '.js' ? '.min' : ''}${ext}`
return hexo.theme.config.cdn ? `//unpkg.com/${name}@latest${minFile}` :... |
/*--------------------------------------------------------------------------
Copyright (c) 2009, Code Aurora Forum. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code mu... |
from abc import ABCMeta, abstractmethod
import mmcv
import numpy as np
import pycocotools.mask as maskUtils
import torch.nn as nn
from mmdet.core import auto_fp16, get_classes, tensor2imgs
from mmdet.utils import print_log
class BaseDetector(nn.Module, metaclass=ABCMeta):
"""Base class for detectors"""
def... |
import { LOAD_ALL_NEWS } from '../actions';
const initialState = {
news: [],
};
export default function (state = initialState, action) {
switch (action.type) {
case LOAD_ALL_NEWS:
return {
...state,
news: action.payload.data,
};
default:
return state;
}
}
|
# Copyright Bruno da Silva de Oliveira 2003. Use, modification and
# distribution is subject to the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
from Exporter import Exporter
from settings import *
import utils
#===========... |
/*
3APA3A simpliest proxy server
(c) 2002-2016 by Vladimir Dubrovin <3proxy@3proxy.ru>
please read License Agreement
*/
#include "proxy.h"
#include "client_limits.h"
#ifndef _WIN32
#include <sys/resource.h>
#include <pwd.h>
#include <grp.h>
#ifndef NOPLUGINS
#include <dlfcn.h>
#endif
#endif
#ifndef DEFAUL... |
from VideoStreamView import VideoStreamView
from FastVideoLoad import FastVideoLoad
from pyqtgraph.Qt import QtCore, QtGui
if __name__ == '__main__':
import sys
vidlist = [ '/Users/nickgravish/Dropbox/Harvard/HighThroughputExpt/2016-08-05_12.41.20/1_08-05-16_12-41-31.770_Fri_Aug_05_12-41-20.543_115.mp4',
... |
/*
* Copyright 2018 Google
*
* 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 agreed to in w... |
//-----------------------------------------------------------------------------
// Copyright (C) 1993-1996 by id Software, Inc.
//
// This source is available for distribution and/or modification
// only under the terms of the DOOM Source Code License as
// published by id Software. All rights reserved.
//
// The sourc... |
/*
* TrustedParty.h
*
*/
#ifndef PROTOCOL_TRUSTEDPARTY_H_
#define PROTOCOL_TRUSTEDPARTY_H_
#include "BooleanCircuit.h"
#include "network/Node.h"
#include <atomic>
#include "Register.h"
#include "CommonParty.h"
class BaseTrustedParty : virtual public CommonFakeParty {
public:
vector<ReceivedMsg> prf_outputs;
v... |
import unittest
from auth.identification import IpBasedIdentification
from auth.tornado_auth import TornadoAuth
from tests.test_utils import mock_object
from utils import date_utils
COOKIE_KEY = 'client_id_token'
def mock_request_handler(ip=None, x_forwarded_for=None, x_real_ip=None, saved_token=None):
handler_... |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_project_lsc_04.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. En... |
//
// OSSUtil.h
// oss_ios_sdk
//
// Created by zhouzhuo on 8/16/15.
// Copyright (c) 2015 aliyun.com. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "OSSFileLogger.h"
@class OSSFederationToken;
@interface OSSUtil : NSObject
+ (NSString *)calBase64Sha1WithData:(NSString *)data withSecret:(NSS... |
# -*- coding: utf-8 -*-
def int_or_none(value):
res = None
try:
res = int(float(value))
except TypeError:
pass
except ValueError:
pass
return res
def float_or_none(value):
res = None
try:
res = float(value)
except TypeError:
pass
except Val... |
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.9 (Sat, 24 May 2014 14:59:03 GMT)
*
* @copyright
* Copyright (C) 2004-2013 Alex Gorbatc... |
/* global extendPrototype, BaseElement, TransformElement, CVBaseElement,HierarchyElement, FrameElement,
RenderableElement, SVGShapeElement, IImageElement, createTag */
function CVImageElement(data, globalData, comp) {
this.assetData = globalData.getAssetData(data.refId);
this.img = globalData.imageLoader.getAsset(... |
#!/usr/bin/env python
import asyncore
from websocket import WebSocketServer
class BroadcastHandler(object):
"""
The BroadcastHandler repeats incoming strings to every connected
WebSocket.
"""
def __init__(self, conn):
self.conn = conn
def dispatch(self, data):
for session in... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const process = require("process");
const path = require("path");
const child_process_1 = require("child_process");
const uuid_1 = require("uuid");
const Logger_1 = require("./Logger");
const EnhancedEventEmitter_1 = require("./EnhancedEventEm... |
"""
Advent of Code 2021: Day 16 Part 2
tldr: parsing packets and doing operations
"""
from dataclasses import dataclass
from functools import reduce
from typing import List, Protocol, Tuple
@dataclass
class Packet(Protocol):
version: int
type_id: int
def version_sum(self) -> int:
...
@prop... |
"""
ulog2pandas converter
"""
# pylint: disable=no-member, invalid-name, broad-except, too-many-locals
from __future__ import print_function
import os
import pickle
import re
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pyulog
import scipy.signal
import transforms3d.quaternions as q... |
import sstable_to_pyarrow as sstopy
print(sstopy.greet())
table = sstopy.create_table()
print(table.to_string())
table = sstopy.read_sstables("/workspaces/sstable-to-arrow/cpp/sample_data/baselines/iot-5b608090e03d11ebb4c1d335f841c590")
print('read table:')
print(table)
print(table[0].to_string())
print('first column... |
# Generated by Django 2.0.7 on 2018-07-18 19:44
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... |
from traitlets import HasTraits, Unicode
import json
from sepal_ui import sepalwidgets as sw
from ipywidgets import jslink
from component import widget as cw
from component.message import cm
class PriorityTile (sw.Tile, HasTraits):
custom_v_model = Unicode().tag(sync=True)
def ... |
#import <Foundation/Foundation.h>
//! Project version number for FiskalySDK.
FOUNDATION_EXPORT double FiskalySDKVersionNumber;
//! Project version string for FiskalySDK.
FOUNDATION_EXPORT const unsigned char FiskalySDKVersionString[];
|
/*
* Copyright (C) 2017 Dremio Corporation
*
* 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... |
/*
* xmlIO.c : implementation of the I/O interfaces used by the parser
*
* See Copyright for the status of this software.
*
* Daniel.Veillard@w3.org
*/
#ifdef WIN32
#include "win32config.h"
#else
#include "config.h"
#endif
#include <stdio.h>
#include <string.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#e... |
# Copyright (C) 2010, 2011 Sebastian Thiel (byronimo@gmail.com) and contributors
#
# This module is part of async and is released under
# the New BSD License: http://www.opensource.org/licenses/bsd-license.php
from .graph import Node
from .util import ReadOnly
from .channel import IteratorReader
import threading
impor... |
import { E } from '@agoric/eventual-send';
import { Far } from '@endo/marshal';
const log = console.log;
function makePR() {
let r;
const p = new Promise((resolve, _reject) => {
r = resolve;
});
return [p, r];
}
function hush(p) {
p.then(
() => undefined,
() => undefined,
);
}
export functio... |
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* 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/. */
//--------------------------------------------------------... |
OC.L10N.register(
"updatenotification",
{
"{version} is available. Get more information on how to update." : "{version} är tillgänglig. Få mer information om hur du uppdaterar.",
"Channel updated" : "Uppdateringskanal uppdaterad",
"Update notifications" : "Uppdateringsaviseringar",
"The update s... |
from clawpack.geoclaw import topotools
import os
import numpy as np
import matplotlib.pyplot as plt
topo = topotools.Topography()
def read_bathy(file, topo):
"""
:param file: bathymetry file name/path
:return:
"""
topo.read(file, topo_type=3)
print("The extent of the data in lon... |
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... |
# todo/views.py
from django.shortcuts import render
from rest_framework import viewsets
from .serializers import TodoSerializer
from .models import Todo
class TodoView(viewsets.ModelViewSet):
serializer_class = TodoSerializer
queryset = Todo.objects.all() ... |
from __future__ import print_function
import torch
import torch.nn as nn
import torch.utils.data
from torch.autograd import Variable
import torch.nn.functional as F
import math
import submodule as sb
class CFPNet_b(nn.Module):
def __init__(self, maxdisp):
super(CFPNet_b, self).__init__()
self.maxd... |
"use strict"
var test = require("tape")
var fs = require("fs")
var path = require("path")
var ndarray = require("ndarray")
var getPixels =require("../node-pixels.js");
var EXPECTED_IMAGE = ndarray(
[0,0,0,255,255,0,0,255,255,255,0,255,255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = []
setup_requirements = ['pytest-runn... |
#
# Copyright (c) 2020 Xilinx, Inc. All rights reserved.
# SPDX-License-Identifier: MIT
#
import logging
from roast.testlibs.linux.baselinux import BaseLinux
from roast.testlibs.linux.mtd import MtdLinux
from roast.testlibs.linux.kconfig import Kconfig
from roast.testlibs.linux.dts import DtsLinux
from roast.testlibs... |
// Copyright (c) 2012 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.
#ifndef CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_LIST_H_
#define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_LIST_H_
#include <stddef.h>
#inc... |
import json
from .urls import url_follow
def follow(self, user_id):
if self.login_status:
url = url_follow % (user_id)
try:
follow = self.s.post(url)
if follow.status_code == 200:
response = json.loads(follow.text)
return True, response['resu... |
#!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This program wraps an arbitrary command since gn currently can only execute
scripts."""
from __future__ import print_function
im... |
/*
* 使用说明:
* window.popWindow.Pop(popHtml, [type], [options])
* popHtml:html字符串
* type:window.popWindow.dialog.typeEnum集合中的元素
* options:扩展对象
* 用法:
* 1. window.popWindow.dialog("我是弹窗<span>lalala</span>");
* 2. window.popWindow.dialog("成功","success");
* 3. window.popWindow.dialog("请输入","input",{onOk:function(){}... |
from django.contrib import admin
from models import Food ,Water , Firstaid,Rescuetool,Machine,TransportHuman,TransportGoods,Messagebox
class MessageboxAdmin (admin.ModelAdmin):
list_display = ('fromaddr', 'toaddr','topic','message','parameter','nack','ack')
class RescuetoolAdmin(admin.ModelAdmin):
list_displa... |
# 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 agreed to in writing, software
# d... |
import numpy as np
import pandas as pd
from sklearn import preprocessing
main_in = "/data/hydro/users/Hossein/analog/"
us_features_dir = main_in + "usa/ready_features/"
all_data_usa = pd.read_csv(us_features_dir + "all_data_usa.csv")
local_feat_main = main_in + "local/ready_features/"
avg_dir = local_feat_main + "a... |
{"mlist":[],"rlist":{},"page":{"page":1,"count":0,"size":10,"type":0,"id":21057}} |
import discord
import asyncio
client = discord.Client()
@client.event
async def on_ready():
print('Connected!')
print('Username: ' + client.user.name)
print('ID: ' + client.user.id)
@client.event
async def on_message(message):
if message.content.startswith('!editme'):
msg = await client.send_... |
// Copyright 2017 Open Source Robotics Foundation, 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 appli... |
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
'... |
/* Copyright (c) 2016, Nordic Semiconductor ASA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* l... |
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/searchlib/common/serialnum.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/vespalib/util/buffer.h>
namespace search::transactionlog {
/// This represent... |
object user;
int duration, effect;
hit_player(int dam, arg2,arg3,arg4,arg5,arg6) {
int damage;
damage = dam;
user->reduce_sp(damage*2);
if(user->query_sp() < 10) { user->set_sp(0); tell_object(user, "The shimmering shield around you vanished!\n"); destruct(this_object()); }
retu... |
/*************************************************************
* Copyright Locomote Limited 2018 ---- All Rights Reserved. *
* Unauthorized copying of this file is strictly prohibited. *
*************************************************************/
const Git = require('../git');
const Cheerio = require('cheeri... |
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/type.proto
#import "GPBProtocolBuffers.h"
#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000
#error This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources.
#endif
// @@p... |
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Increasing(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "candlestick"
_path_str = "candlestick.increasing"
_valid_props = {"fillcolor", "line"}
... |
const BigNumber = require('bignumber.js');
const { bscWeb3: web3 } = require('../../../utils/web3');
const MasterChef = require('../../../abis/PumpyFarm.json');
const Strat = require('../../../abis/AutoStratX.json');
const fetchPrice = require('../../../utils/fetchPrice');
const pools = require('../../../data/pumpyLpP... |
const { User } = require('./model')
!(async function() {
const updateRes = await User.update({ // 传入要修改的内容和条件两个参数即可
nickName: '帝国'
},{
where: {
id: 1
}
})
console.log(updateRes[0]) // 1
})()
// 这里就是来更新信息的
/*
Executing (default): UPDATE `users` SET `nickName`=?,`updat... |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { filledOrdersLoadedSelector, filledOrdersSelector } from '../store/selectors'
import Spinner from './spinner'
const showFilledOrders = (filledOrders) => {
return(
<tbody>
{ filledOrders.map((order) => {
return(
... |
/**
* @typedef {Object} WorkerPoolOptions
* @property {number | 'max'} [minWorkers]
* @property {number} [maxWorkers]
* @property {number} [maxQueueSize]
* @property {'auto' | 'web' | 'process' | 'thread'} [workerType]
* @property {*} [forkArgs]
* @property {*} [forkOpts]
* @property {number} [debugPortStart]
... |
from functools import partial
from dragn.dice.die_and_roller import roller
D4 = partial(roller, 4)
D6 = partial(roller, 6)
D8 = partial(roller, 8)
D10 = partial(roller, 10)
D12 = partial(roller, 12)
D20 = partial(roller, 20)
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf.urls import url
from .views import TokenInfoView
urlpatterns = [
url(r'^info/$', TokenInfoView.as_view()),
]
|
/** \file
* \brief Frame Control
*
* See Copyright Notice in "iup.h"
*/
#include <Xm/Xm.h>
#include <Xm/Frame.h>
#include <Xm/Label.h>
#include <Xm/BulletinB.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <memory.h>
#include <stdarg.h>
#include "iup.h"
#include "iup_object.h"
#include "i... |
#pragma once
struct OutputBuffer {
GLuint dataBuffer = 0;
GLuint stateObject = 0;
};
|
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Accurate Systems and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class MRMInput(Document):
pass
|
import re
import sys
import json
from http.server import BaseHTTPRequestHandler
from urllib.error import HTTPError
from auth import gh_token
from client import fetch, CONCURRENT_REQUESTS_MAX
from ghapi.all import GhApi
from fastcore.utils import parallel
ROUTE_RE = re.compile(r'^/users/([^/]+)/stats/languages$')
def... |
# -*- coding: utf-8 -*-
"""
pygments.lexers.scripting
~~~~~~~~~~~~~~~~~~~~~~~~~
Lexer for scripting and embedded languages.
:copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, byg... |
/*
* Translated default messages for bootstrap-select.
* Locale: RU (Russian; руÑÑкий)
* Region: RU (Russian Federation)
*/
(function($) {
$.fn.selectpicker.defaults = {
style: 'btn-default',
size: 'auto',
title: null,
selectedTextFormat : 'values',
noneSelectedText ... |
(function(e){function t(t){for(var s,n,i=t[0],c=t[1],l=t[2],d=0,u=[];d<i.length;d++)n=i[d],Object.prototype.hasOwnProperty.call(o,n)&&o[n]&&u.push(o[n][0]),o[n]=0;for(s in c)Object.prototype.hasOwnProperty.call(c,s)&&(e[s]=c[s]);p&&p(t);while(u.length)u.shift()();return r.push.apply(r,l||[]),a()}function a(){for(var e,... |
#!/usr/bin/python2.4
#
# Copyright (c) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list ... |
import axios from 'axios'
export default {
getNews: function(name){
return axios.get(`https://bing-news-search1.p.rapidapi.com/news/search?freshness=Day&textFormat=Raw&safeSearch=Strict&q=${name}&count=3`, {
"method": "GET",
"headers": {
"x-rapidapi-host": "bing-news-search1.p.rap... |
import unittest
import sys
from ppci.utils.bitfun import rotate_left, rotate_right, BitView
class BitRotationTestCase(unittest.TestCase):
def test_right_rotation(self):
self.assertEqual(0xFF000000, rotate_right(0xFF, 8))
self.assertEqual(0x0FF00000, rotate_right(0xFF, 12))
def test_left_rotat... |
#!/usr/bin/env python3
"""
Jsonable
"""
from json import dumps
from .base import Base
class Jsonable(Base):
def __repr__(self):
dict_ = self.json()
string = dumps(dict_, indent=4, sort_keys=True)
repr_string = f"Job({string})"
return repr_string
def json(self):
item ... |
"""5. Longest Palindromic Substring
Given a string s, find the longest palindromic substring in s. You may assume
that the maximum length of s is 1000.
"""
from collections import defaultdict
import unittest
def is_palindrome(s):
low = 0
high = len(s) - 1
while low < high:
if s[low] != s[high]:
... |