text stringlengths 3 1.05M |
|---|
from scipy.optimize import differential_evolution
'''
Consider a SINGLE customer at a SINGLE location at a two operating points, with a SINGLE emission type.
Map out the functional depenencies. Limit indirection (if you see multiple arguments, there could be another function.)
This idea can be continued to encompass... |
__all__ = ["Accelerometer", "AdvancedServo", "Analog", "Bridge", "Encoder", "FrequencyCounter", "GPS", "InterfaceKit", "IR", "LED", "MotorControl", "PHSensor", "RFID", "Servo", "Spatial", "Stepper", "TemperatureSensor", "TextLCD"]
|
/**
* @author https://github.com/silence717
* @date on 2016/12/7
*/
import _ from 'lodash';
function $RootScopeProvider() {
let TTL = 10;
this.digestTtl = value => {
if (_.isNumber(value)) {
TTL = value;
}
return TTL;
};
this.$get = ['$parse', $parse => {
// 引入一个初始化函数
function initWatchVal() {}
... |
import React, { Component } from 'react'
import {Navbar,Container,Nav} from 'react-bootstrap'
import 'bootstrap/dist/css/bootstrap.min.css';
export class Header extends Component {
render() {
return (
<Navbar bg="dark" variant="dark">
<Container>
<Navbar.Brand href="/">Co... |
'use strict';
const os = require('os');
const path = require('path');
const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
const shell = electron.shell;
const appName = app.getName();
function sendAction(action) {
const win = BrowserWindow.getAllWindows()[0];
... |
/**
* @author Dmitriy Yurchenko <evildev@evildev.ru>
* @link http://nyama.evildev.ru/
* @copyright Copyright (c) Dmitriy Yurchenko <evildev@evildev.ru>, 2014-2015
* @license MIT
*/
module.exports = {
basePath: __dirname + '/..',
components: {
parser: {
useProxy: false
},
db: {
database: 'nyama',
... |
import logging
from base64 import b64decode
from pprint import pformat
from typing import Any, Dict, Optional, Tuple, Union
import waiting
from kubernetes.client import ApiClient, CustomObjectsApi
import consts
from .base_resource import BaseCustomResource, ObjectReference
from .cluster_image_set import ClusterImage... |
# Copyright 2018-2019 Leland Lucius
#
# 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 wr... |
import json
import socket
import datetime
import redis
from redis.sentinel import Sentinel
from logger import crawler
from config import (
get_redis_args,
get_share_host_count,
get_running_mode,
get_cookie_expire_time
)
# 爬虫运行的方式
MODE = get_running_mode()
SHARE_HOST_COUNT = get_share_host_count()
RED... |
export const getEntries = state => state.entries;
|
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app.api.v1.api import api_router
from app.core.config import settings
def get_application():
_app = FastAPI(title=settings.PROJECT_NAME)
_app.add_middleware(
CORSMiddleware,
allow_origins=[str(origin) for ori... |
const path = require("path");
const glob = require("glob");
const webpack = require("webpack");
const WebpackBar = require("webpackbar");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugi... |
#!/usr/bin/env python
"""Twitter capture client code."""
import logging
from time import sleep
from datetime import datetime
import tweepy
from listeners.file import RotatingFileListener
from configfile import ConfigFile
from server_messenger import ServerMessenger
from streamer import SourceAddrStreamer
import re
... |
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import random
import itertools
import math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.dis... |
import json
from urllib.parse import parse_qsl, urlencode
import falcon
import requests
from requests_oauthlib import OAuth1Session
from sikre import settings
from sikre.models.users import User
from sikre.resources.auth import utils
from sikre.utils.logs import logger
class LinkedinAuth(object):
def on_post(s... |
import codecs
with codecs.open('data/news.en.heldout-00001-of-00050','r','utf-8') as f:
total = 0
k = 0
ll = []
for line in f:
ll += ["aa"]
total += len(line.strip().split())
k += 1
print ll
print total
print k
|
from conans import ConanFile, CMake, tools
from conans.errors import ConanInvalidConfiguration
import os
required_conan_version = ">=1.33.0"
class QCoroConan(ConanFile):
name = "qcoro"
license = "MIT"
homepage = "https://github.com/danvratil/qcoro"
url = "https://github.com/conan-io/conan-center-inde... |
{"frequencies":[261.6255653006,269.31534001393,278.64197723942,286.83190328195,296.76515515861,305.48776291796,316.06708432391,325.35701999957,336.62443200122,346.51859521924,358.51885197895,369.0565423573,381.83730669135,393.06038214356,406.67242132093,418.62545783369,433.12283887627,445.85331391262,461.29362042034,47... |
(self.webpackChunkdocusaurus_template=self.webpackChunkdocusaurus_template||[]).push([[8590],{3905:function(e,t,r){"use strict";r.d(t,{Zo:function(){return u},kt:function(){return f}});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}... |
import os
import astropy.table as atable
def get_gama():
flgama = '/global/cfs/cdirs/desi/target/analysis/truth/dr9.0/south/matched/ls-dr9.0-GAMA-DR3-SpecObj-match.fits'
fzgama = '/global/cfs/cdirs/desi/target/analysis/truth/dr9.0/south/matched/GAMA-DR3-SpecObj-match.fits'
if not os.path.isfile(flgama): ... |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache... |
from django.shortcuts import get_object_or_404
from rest_framework import serializers
from rest_framework.utils.serializer_helpers import (
BindingDict, BoundField, JSONBoundField, NestedBoundField, ReturnDict,
ReturnList
)
from .models import Duty, DutyManager
class DutySerializer(serializers.ModelSerialize... |
# -*- coding: utf-8 -*-
# This work is part of the Core Imaging Library (CIL) developed by CCPi
# (Collaborative Computational Project in Tomographic Imaging), with
# substantial contributions by UKRI-STFC and University of Manchester.
# Licensed under the Apache License, Version 2.0 (the "License");
# you... |
"""
Given a 2d grid map of '1's (land) and '0's (water), count the number of
islands. An island is surrounded by water and is formed by connecting adjacent
lands horizontally or vertically. You may assume all four edges of the grid are
all surrounded by water.
Example 1:
11110
11010
11000
00000
An... |
/**
* pubfood
*/
/* global */
/*eslint no-unused-vars: 0*/
'use strict';
module.exports = {
valid: [
{
name: 'provider1',
libUri: '../test/fixture/lib.js',
init: function(slots, bids, done) {
},
refresh: function(slots, targeting, done) {
},
trigger: function(done) {... |
"""
This module lets you practice DEBUGGING when RUN-TIME EXCEPTIONS occur.
Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher,
Valerie Galluzzi, Mark Hays, Amanda Stouder, Aaron Wilkin,
their colleagues, and John Neill.
""" # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE.
import rosegrap... |
/**
* Copyright 2019 Google LLC
* 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 2020,2021 Sony Corporation.
# Copyright 2021 Sony Group 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 ... |
import '@mdi/font/css/materialdesignicons.css'
import Vue from 'vue'
import Vuetify from 'vuetify/lib'
Vue.use(Vuetify)
let hasLocalStorage = typeof Storage !== 'undefined'
try {
localStorage.setItem('foo', 'bar')
localStorage.getItem('foo')
localStorage.removeItem('foo')
} catch {
hasLocalStorage = false
}
... |
# Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0
import os
from typing import Any, Optional
STATS_FEATURE_KEY = 'STATS'
# Elasticsearch client configuration
PROXY_ENDPOINT = 'PROXY_ENDPOINT'
PROXY_USER = 'PROXY_USER'
PROXY_PASSWORD = 'PROXY_PASSWORD'
ELASTICSEARCH_CLIENT = 'ELA... |
#!/usr/bin/env python
#
# Copyright 2007 Google 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 o... |
'''Defines a pipeline step which aquires data from the yak data source.
'''
import datetime
import http
import os
import requests
from bs4 import BeautifulSoup
from src import datasets
from src.step import Step
class GetYakData(Step):
'''Defines a pipeline step which aquires data from the yak data source.
... |
#!/usr/bin/env python
# coding: utf-8
# Forward prediction function for waveforms
import sys
import numpy as np
import matplotlib.pyplot as plt
import gc
#import synthetic as syn
import synthetic as syn
import helpers as hp
import ButterWorth as bw
import mogi as mogi
import cmp_Er as cmp_Er
import calcol as calcol
... |
""" Helpers for syncing packages into the cache in AWS Lambda """
from __future__ import print_function
import os
import sys
from distutils.spawn import find_executable # pylint: disable=E0611,F0401
import argparse
import boto3
import json
import logging
import shutil
import six
import subprocess
import tempfile
imp... |
let express = require("express");
let app = express();
let converter = require("./converter");
app.get("/rgbToHex", function(req, res) {
let red = parseInt(req.query.red, 10);
let green = parseInt(req.query.green, 10);
let blue = parseInt(req.query.blue, 10);
let hex = converter.rgbToHex(red, green, b... |
/* Copyright (c) 2016 Baidu, Inc. All Rights Reserve.
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 ... |
def print_karo():
print("PYMAIN KARO NA")
import time
from core import lookup
from utils import serial_ports_setup
from comm import arduino1
from comm import dynamixel
from comm import arduino2
from utils.debug import debug
CURRENT_ARRAY_LENGTH = 0
CURRENT_ARRAY = []
DISPLAY_AREA_POSITIONS = []
DISPLAY_AREA_TEM... |
import numpy as np
from twodunet import TwoDUnet
from imageparser import ImageParser
from imageaugmentator import ImageAugmentator
from sklearn.model_selection import train_test_split
import cv2
import matplotlib.pyplot as plt
parser = ImageParser()
utrech_dataset, singapore_dataset, amsterdam_dataset = parser.get_al... |
// 4.5.2 (2017-01-04)
!function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;i<e.length;++i){if(n=s[e[i]]||o(e[i]),!n)throw"module definition dependecy not found: "+e[i];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";... |
import inspect
import json
import os
import sys
import validators
from attrdict import AttrDict
from datacatalog.extensible import ExtensibleAttrDict
from datacatalog.identifiers import tacc
from datacatalog.identifiers.typeduuid import catalog_uuid, get_uuidtype
from datacatalog.linkedstores.basestore import Heritabl... |
module.exports = {
extends: ["@commitlint/config-conventional"],
// "scope-enum": [2, "always", ["components", "pages", "utils"]],
"scope-case": [2, "always", "kebab-case"],
};
|
import os
import re
import argparse
import requests
from urllib.parse import urlparse
import hashlib
import imghdr
import magic
import mimetypes
import asyncio
import aiohttp
def read_lines(file_path):
with open(file_path) as f:
return f.read().strip().split("\n")
# TODO: Delete this method and use the a... |
import numpy as np
import cv2 as cv
from matplotlib import pyplot as plt
def getTwoBoundingBox(array):
full_array = np.full(len(array[1]), 255)
for i in range(len(array)):
if not np.array_equal(array[i],full_array):
left_bound = i
break
for j in reversed(range(len(array))... |
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
// vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisa... |
import tensorflow as tf
import numpy as np
def get_dataset(data, batch_size=128, train_buf=10000, test_buf=1000):
(train_images, _), (test_images, _) = data
train_images = np.expand_dims(train_images, -1).astype("float32") / 255
test_images = np.expand_dims(test_images, -1).astype("float32") / 255
tr... |
# flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
from .logger import *
|
import sys
from pydev_console.protocol import KeyboardInterruptException
# =======================================================================================================================
# BaseStdIn
# ============================================================================================================... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020 Huawei Device Co., Ltd.
# 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
... |
from pyspreedly.api import Client
from mock import MagicMock
import requests
from urlparse import urljoin
from helpers import SpreedlySubscriptionXML
from pyspreedly.objectify import objectify_spreedly
def get_client_mock(site_name, API_VERSION='v4'):
base_host = 'https://spreedly.com'
base_path = '/api/{api_... |
#
# Python script using OME API to get device list.
#
# _author_ = Raajeev Kalyanaraman <Raajeev.Kalyanaraman@Dell.com>
# _version_ = 0.1
#
#
# Copyright (c) 2018 Dell EMC Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
... |
from django.db import models
# Create your models here.
# from meiduo_mall.utils.BaseModel import BaseModel
from meiduo_mall.utils.BaseModel import BaseModel
class ContentCategory(BaseModel):
"""广告类别表"""
# 广告类别名称
name = models.CharField(max_length=50,
verbose_name='名称')
# 广... |
#!/usr/bin/env node
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var _regeneratorRuntime = _interopDefault(require('@babel/runtime/regenerator'));
var _asyncToGenerator = _interopDefault(require('@babel/runtime/helpers/asyncToGenerato... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 11 13:33:16 2018
@author: dalton
"""
import numpy as np
class Perceptron():
"""
Variaveis
=========
lr: learn rate (float, valores de 0.0 a 1.0)
taxa de aprendizado.
itmax: numero de epocas do treinamento
... |
from io import open
from setuptools import setup, find_packages
with open("README.md") as read_me:
long_description = read_me.read()
setup(
name="EelForkExcludeFiles",
version="0.14.8",
author="Chris Knott",
packages=find_packages(),
package_data={
"": ["eel.js"],
},
include_pa... |
// VERSION: 2.3 LAST UPDATE: 11.07.2013
/*
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*
* Made by Wilq32, wilq32@gmail.com, Wroclaw, Poland, 01.2009
* Website: http://jqueryrotate.com
*/
(function($) {
var supportedCSS,supportedCSSOrigin, styles=document.getElementsBy... |
//
// Copyright (c) .NET Foundation and Contributors
// Portions Copyright (c) 2014 Uladzimir Pylinsky aka barthess
// See LICENSE file in the project root for full license information.
//
#include <hal.h>
#include <hal_nf_community.h>
#include "hal_stm32_fsmc.h"
#if (HAL_NF_USE_FSMC == TRUE)
////////////////////////... |
/*!
* jQuery JavaScript Library v1.11.1
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2014-05-01T17:42Z
*/
String.prototype.format = function (... |
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Mar 11 2021 20:53:35).
//
// Copyright (C) 1997-2019 Steve Nygard.
//
#import <Ozone/OZProViewModule.h>
#import <Ozone/OZTimeAxisFrameChangedTarget-Protocol.h>
#import <Ozone/OZTimeAxisRangeSelect-Protocol.h>
#import <Ozone/OZTimelineLayerControl... |
class Automovil:
def __init__(self, modelo, marca, color):
self.modelo = modelo
self.marca = marca
self.color = color
self._estado = 'en_reposo'
self._motor = Motor(cilindros=4)
def acelerar(self, tipo='despacio'):
if tipo == 'rapida':
self._mot... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE78_OS_Command_Injection__wchar_t_listen_socket_system_53c.c
Label Definition File: CWE78_OS_Command_Injection.one_string.label.xml
Template File: sources-sink-53c.tmpl.c
*/
/*
* @description
* CWE: 78 OS Command Injection
* BadSource: listen_socket Read data u... |
import io
from pathlib import Path
from textwrap import dedent
import numpy as np
import openpyxl
import pandas as pd
import pytest
from pytest import fixture, raises
try:
from openpyxl.worksheet.worksheet import Worksheet
except ImportError:
# openpyxl < 2.6
from openpyxl.worksheet import Worksheet
from o... |
import os, decimal
def format_str(float_num):
if isinstance(float_num, str):
return float_num
return str(decimal.Decimal.from_float(float_num).quantize(decimal.Decimal('0.000')))
def parse_line(line):
if 'ms' in line:
return int(line.split(':')[-1][:-len(' ms\n') + 1])
else:
... |
from django.contrib import admin
from web.models import GeneralExpertise, OERExpertise, OpenAccessExpertise, \
MOOCExpertise, Region, Country, Person
class CountryAdmin(admin.ModelAdmin):
list_filter = ('name', 'iso_code')
admin.site.register(GeneralExpertise)
admin.site.register(OERExpertise)
admin.site.register(... |
/**
* @author Titus Wormer
* @copyright 2015 Titus Wormer
* @license MIT
* @module no-duplicate-headings-in-section
* @fileoverview
* Warn when duplicate headings are found, but only when on the same level,
* “in” the same section.
*
* @example {"name": "ok.md"}
*
* ## Alpha
*
* ### Bravo
*
* #... |
var JoinTables = require('../lib/waterline-schema/joinTables'),
assert = require('assert');
describe('JoinTables', function() {
describe('auto mapping of foreign keys', function() {
var collections = {};
before(function() {
collections.foo = {
tableName: 'foo',
connection: 'bar',... |
/* Microsoft Reference Implementation for TPM 2.0
*
* The copyright in this software is being made available under the BSD License,
* included below. This software may be subject to other third party and
* contributor rights, including patent rights, and no such rights are granted
* under this license.
*
* ... |
//
// Created by damien.lachouette on 23/11/2020.
//
#pragma once
#include "bases.h"
namespace math {
/**
* @brief class to handle complex number
*/
class Complex {
public:
Complex() = default;
explicit Complex(float re, float im) : real{re}, imaginary{im} {}
explicit Co... |
import { throwSoft } from "./log"
import { snake2camel } from "./utilities"
const apply = {
html: ((html, dom) => {
dom.innerHTML = html
}),
pcss: ((pcss, dom) => {
for (let [key, value] of parse.cssToDict(pcss)){
dom.style[snake2camel(key)] = value
}
})
}
const parse = {
cssToDict: ((... |
# Generated by Django 3.1.2 on 2020-10-09 16:42
import app.models
from django.db import migrations
import django_resized.forms
class Migration(migrations.Migration):
dependencies = [
("app", "0003_auto_20201009_1941"),
]
operations = [
migrations.AlterField(
model_name="book... |
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.lang['ru']={"editor":"Визуальный текстовый редактор","editorPanel":"Визуальный редактор текста","common":{"editorHelp":"Нажмите ALT-0 для открытия справки","browseServ... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Domain... |
import math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision.models.resnet as resnet
from detectron2.layers import ShapeSpec
# from centernet.network.backbone import Backbone
from detectron2.modeling import Backbone
from detectron2.modeling.backbone import build... |
import types from "./types";
import SerializerImpl from "./serializer";
var uint8 = types.uint8,
uint16 = types.uint16,
uint32 = types.uint32,
int64 = types.int64,
uint64 = types.uint64,
string = types.string,
bytes = types.bytes,
bool = types.bool,
array = types.array,
fixed_array ... |
import cocaColaImg from 'images/coca-cola.png';
import cocaColaZeroImg from 'images/coca-cola-zero.png';
import spriteImg from 'images/sprite.png';
import fantaImg from 'images/fanta.png';
import fantaZeroImg from 'images/fanta-zero.png';
const products = [
{
id: 'product-1',
name: 'Coca-Cola',
img: coca... |
# Generated by Django 2.2.10 on 2020-03-17 00:16
from django.db import migrations
class Migration(migrations.Migration):
def asterism_values(apps, schema_editor):
Package = apps.get_model('transformer', 'Package')
for package in Package.objects.all():
package.bag_identifier = package... |
/*!
* ConservatoireEMRTM.
* Langage de programmation : nodeJS (l'installation du framework Express est requis).
* Version 0.1
* Original author: Andy Del Risco & Ricardo Mendoza
* Released with the MIT License: http://www.opensource.org/licenses/mit-license.php
* Copyright (c) 2018 Andy Del Risco and Ricardo Mend... |
import React from 'react'
import {
errorValidator,
HandledErrorType,
mandatoryValueValidator
} from "../components/graph/node-modal/editors/Validators"
import ValidationLabels from "../components/modals/ValidationLabels"
import {render} from '@testing-library/react'
import {getAllByText, queryAllByText} from "@te... |
# -*- coding: utf-8 -*-
from __future__ import print_function
import click
import os
import re
import face_recognition.api as face_recognition
import multiprocessing
import itertools
import sys
import PIL.Image
import numpy as np
files_recognized = []
best_performance_recognition = {}
def scan_known_people(known_peop... |
import abc
import json
import logging
import re
from abc import ABC
import jsonpickle
import time
import uuid
from dateutil import parser
from datetime import datetime
from typing import (
List,
Dict,
Text,
Any,
Type,
Optional,
TYPE_CHECKING,
Iterable,
cast,
Tuple,
)
import ras... |
"""
summary: dump (some) information about the current function.
description:
Dump some of the most interesting bits of information about
the function we are currently looking at.
"""
import binascii
import ida_kernwin
import ida_funcs
def dump_flags(fn):
"dump some flags of the func_t object"
print("F... |
import copy
class Script:
def __init__(self, commands, global_vars):
self.commands = commands
self.vars, self.types = self._decl_commands()
self.global_vars = global_vars
self.free_var_occs = []
self.op_occs = []
for cmd in self.commands:
if isinstance(c... |
# -*- coding: utf-8 -*-
"""Cisco Identity Services Engine Network Access - Profiles API wrapper.
Copyright (c) 2021 Cisco and/or its affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software wi... |
# -*- coding: utf-8 -*-
import requests
from django.db import models
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
from urlparse import urlparse
from cabot.cabotapp.models import StatusCheck, StatusCheckResult
def process_matrix(data):
metrics = []
values =... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright (c) 2010 Citrix Systems, Inc.
# Copyright (c) 2011 Piston Cloud Computing, Inc
#
# Licensed under the A... |
/*
* Unit tests for Media Detector
*
* Copyright (C) 2008 Google (Lei Zhang, Dan Hipschman)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, ... |
#!/usr/bin/env python
# -*- coding: windows-1251 -*-
# Copyright (C) 2005 Roman V. Kiseliov
# 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 re... |
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2019. ALL RIGHTS RESERVED.
* See file LICENSE for terms.
*/
#ifndef UCT_TCP_MD_H
#define UCT_TCP_MD_H
#include "tcp_base.h"
#include <uct/base/uct_md.h>
#include <uct/base/uct_iface.h>
#include <uct/base/uct_iov.inl>
#include <ucs/sys/sock.h>
#include <ucs/sys/... |
import re
import requests
from django.conf import settings
from django.contrib.auth.forms import AuthenticationForm, UserCreationForm
from django import forms
from django.utils.safestring import mark_safe
from django.utils.text import format_lazy
from capapi.models import CapUser, ResearchRequest, ResearchContract, H... |
a = "rosa"
b = "saco"
c = a[:2] + b[:2]
print(c)
|
#ifndef MALLOC_H
#define MALLOC_H
void* malloc(unsigned int size);
void free(void* ptr);
#endif |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = _interopRequireWildcard(require("react"));
var _urlParse = _interopRequireDefault(require("url-parse"));
var _htmlEntities = require("html-entities");
function _interopRequireDefault(obj) { retu... |
import json
import frappe
from frappe.utils import getdate, flt
from frappe.utils.background_jobs import enqueue
@frappe.whitelist()
def send_so_notification(sales_order):
try:
so = frappe.get_doc("Sales Order", sales_order)
#get email ids
recipients = [frappe.db.get_value("Customer", so.customer, "email_id")]... |
'use strict';
'use strict'
var unirest = require('unirest');
var RemoteStorageService = require('../services/remote/RemoteStorageService')
var adapters = require('../services/remote/adapters')
/**
* RemoteStorageController
*/
var RemoteStorageController = {
loadAdapters : function(req,res) {
return ad... |
#--------------------
"""
:py:class:`CGWMainControl` - widget for configuration
============================================================================================
Usage::
# Import
from psdaq.control_gui.CGWMainControl import CGWMainControl
# Methods - see test
See:
- :py:class:`CGWMainCont... |
module.exports = function (gulp) {
var gutil = require('gulp-util');
var tasks = {
'first': {
fn: firstTask,
description: 'Shows info about this task',
options: {
'-f, --foo': 'Foo option'
}
},
'second': {
fn: secondTask,
description: 'Show info about the se... |
import React from 'react';
import { NavLink, useLocation } from 'react-router-dom';
import './style.css';
function TopMenu() {
const { pathname } = useLocation();
const isActive = () => {
return ['/cnpj', '/'].includes(pathname);
}
return (
<nav>
<ul>
<li>... |
from typing import List
class GroupContainerMixin(object):
_groups: dict
@property
def group_names(self) -> List[str]:
return list(self._groups.keys())
|
import os
from pcm.__main__ import prepare, sb, test
from onlinejudge.implementation.main import main as oj
os.chdir("/home/koji0708/go/src/github.com/kjnh10/pcw/work/atcoder")
# oj(['download', 'https://arc096.contest.atcoder.jp/tasks/arc096_a'])
prepare(['https://arc096.contest.atcoder.jp'])
|
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* 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 a... |
/*****************************************************************************
* Copyright (c) 2019, Nations Technologies Inc.
*
* All rights reserved.
* ****************************************************************************
*
* Redistribution and use in source and binary forms, with or without
* mo... |