text
stringlengths
957
885k
<gh_stars>0 import cv2 import numpy as np import keras from keras.layers import * from keras.models import Model , load_model from keras.preprocessing import image from keras.utils import np_utils from keras.applications.resnet50 import ResNet50 from keras.optimizers import Adam import matplotlib.pyplot as plt...
<reponame>jzabl/mpdaf<gh_stars>0 """ Copyright (c) 2010-2018 CNRS / Centre de Recherche Astrophysique de Lyon Copyright (c) 2019 <NAME> <<EMAIL>> Copyright (c) 2019 <NAME> <<EMAIL>> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided t...
<reponame>korcsmarosgroup/ARN2DataBase ''' miRNA-lncRNA interactions ''' # Imports from SLKlib.SQLiteDBApi.sqlite_db_api import PsimiSQL # Defining constants SQL_SEED = '../../../../../SLKlib/SQLiteDBApi/network-db-seed.sql' DB_DESTINATION = '../../output/starbase' FILE_TO_TAXID = { 'files/starbase_v3_miRN...
import os import unittest import sys topdir = os.path.join(os.path.dirname(__file__), "..") sys.path.append(topdir) from Prescient import app, db from Prescient.config import basedir # Integration tests class AuthorisationTests(unittest.TestCase): def setUp(self): # sets up the database app.config["TES...
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\statistics\tunable.py # Compiled at: 2020-10-09 19:17:02 # Size of source mod 2**32: 5281 bytes from...
<reponame>ManjushreeRao/FinalProject-WebApplication from __future__ import print_function from __future__ import print_function import datetime import os.path from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request from google...
# 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. import csv import datetime import logging import requests from simplejson.scanner import JSONDecodeError import subprocess from urlparse import urlparse imp...
<reponame>M155K4R4/Tensorflow # Copyright 2017 The TensorFlow Authors. 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 ...
"""Load dataset and examples. This function loads different data set for unitary test or tutorial purpose, either theoretical-synthetic or real dataset from scikit-learn https://scikit-learn.org/stable/datasets/index.html * dataset = 1 load iris dataset * dataset = 2 load Boston house prices * dataset = ...
<reponame>bfloch/tink<filename>python/tink/mac/mac_key_manager_test.py # Copyright 2020 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/LIC...
<reponame>ringw/reikna """ This example demonstrates how to implement a FFT frequency shift (``reikna.fft.FFTShift``) as a transformation instead of a computation. A peculiarity of this transformation is the repositioning of elements it performs (as opposed to more common ``load_same``/``store_same`` pair which keel th...
import os import pandas as pd import pyspark from pyspark.ml.classification import LogisticRegression from pyspark.ml.feature import VectorAssembler from pyspark.ml.pipeline import Pipeline from pyspark.version import __version__ as pyspark_version import pytest from sklearn import datasets import shutil from mlflow ...
<reponame>tomerhekredis/RedisGraph from base import FlowTestsBase import os import sys from RLTest import Env from redisgraph import Graph, Node, Edge redis_con = None class test_v7_encode_decode(FlowTestsBase): def __init__(self): self.env = Env(decodeResponses=True, moduleArgs='VKEY_MAX_ENTITY_COUNT 10'...
import numpy as np c16 = np.complex128() f8 = np.float64() i8 = np.int64() u8 = np.uint64() c8 = np.complex64() f4 = np.float32() i4 = np.int32() u4 = np.uint32() dt = np.datetime64(0, "D") td = np.timedelta64(0, "D") b_ = np.bool_() b = bool() c = complex() f = float() i = int() AR = np.array([0], dtype=np.int64...
# # Copyright Cloudlab URV 2020 # # 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 writin...
<gh_stars>100-1000 from __future__ import print_function import unittest import numpy as np import tensorflow as tf from parameterized import parameterized from . import run_on_rpc_and_cpu, assertAllClose, gradients class TestOpGradients(unittest.TestCase): def setUp(self): tf.reset_default_graph() ...
""" openconfig_bfd An OpenConfig model of Bi\-Directional Forwarding Detection (BFD) configuration and operational state. """ import sys from collections import OrderedDict from ydk.types import Entity as _Entity_ from ydk.types import EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, LeafDataList, Bits, ...
""" Tests for the cooperator service calls. """ import json from unittest import mock from waterdata.services import sifta MOCK_RESPONSE = """ {"Site": "06864000", "Date": "6/19/2018", "Customers":[{"Name":"Kansas Water Office","URL":"http://www.kwo.org/","IconURL":"http://water.usgs.gov/customer/icons/6737.gif"},{...
import numpy import cv2 from zipfile import ZipFile from .EyetrackingUtilities import SaveNPY, ReadNPY class VideoReader(object): """ Base class that loads video rawFrames to an array """ def __init__(self, videoFileName = None, other = None): """ Constructor @param videoFileName: video file name @param ot...
import tensorflow as tf import renderer import helpers def l1(x, y): return tf.reduce_mean(tf.abs(x-y)) def SSIMLoss(x, y, scale): ssim = tf.reduce_mean(tf.image.ssim_multiscale(x, y, scale)) return 1.0 - ssim epsilonL1 = 0.01 epsilonRender = 0.01 class Loss: lossType = "render" batchSize = 8 ...
<gh_stars>1-10 import os import pycuda.driver as cuda import tensorrt as trt import ctypes import cv2 import numpy as np from thanos.dataset import IPN def GiB(val): """Calculate Gibibit in bits, used to set workspace for TensorRT engine builder.""" return val * 1 << 30 class HostDeviceMem(object): """ ...
from struct import pack, unpack from binascii import hexlify GATT_PERMIT_READ = 0x01 GATT_PERMIT_WRITE = 0x02 GATT_PERMIT_AUTH_READ = 0x04 GATT_PERMIT_AUTH_WRITE = 0x08 GATT_PROP_BCAST = 0x01 GATT_PROP_READ = 0x02 GATT_PROP_WRITE_NO_RSP = 0x04 GATT_PROP_WRITE = 0x08 GATT_PROP_NOTIFY =...
#!/usr/bin/python3 # coding=utf-8 # Copyright 2020 getcarrier.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 req...
<filename>ipmi/console.py<gh_stars>1-10 # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 IBM 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...
from PIL import Image, ImageEnhance import random def GetPatches(im, patchSize, numPatches): out = [] cursorx = 0 cursory = 0 for i in range(numPatches): cx, cy = cursorx, cursory patch = im.crop((cx, cy, cx+patchSize[0], cy+patchSize[1])) out.append(patch.convert("RGBA")) cursorx += patchSize[0] if c...
<filename>whitepaper_extract.py #Importing packages import requests, bs4, re, json, os, copy from collections import Counter #Reusable Functions def retrieve_links(url, href = re.compile('(?s).*'), string = re.compile('(?s).*')): """This function retrieves all links on a webpage and returns a list of them, w...
#!/usr/bin/env python import re import os import socket import urllib2 import xml.etree.ElementTree as ET import logging import time from tvst import Tvst def get_plex_access_token(config): if os.path.exists(config.get('plex-tvst-scrobbler', 'plex_access_token_location')): plexfp = open(config.get('plex-t...
<reponame>timvink/flee from flee import flee from flee.datamanager import handle_refugee_data from flee.datamanager import DataTable # DataTable.subtract_dates() from flee import InputGeography import numpy as np import flee.postprocessing.analysis as a import sys def AddInitialRefugees(e, d, loc): """ Add the i...
<reponame>fperignon/sandbox<gh_stars>100-1000 """Simulation of a slider-crank system. Check examples manual for details. """ import numpy as np import array import siconos.mechanisms.mbtb as mbtb WITH_CLEARANCE_ON_RODE = 1 """if true, add clearance between rodes 1 and 2.""" # -- Slider-crank system parameters -- l...
import traceback import importlib import pkgutil from PyQt5.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QFrame , QMenu from PyQt5.QtCore import Qt, QThread, pyqtSignal from gpi.widgets import terminalWidgets, simpleWidgets from gpi.widgets.templateWidget import nodeHandler from gpi.helpers import astHelpers,...
# ------------------------------------------------------------- # NDN Hydra MainLoop # ------------------------------------------------------------- # @Project: NDN Hydra # @Date: 2021-01-25 # @Authors: Please check AUTHORS.rst # @Source-Code: https://github.com/justincpresley/ndn-hydra # @Documentatio...
import math import random import requests import abc import itertools """[summary] This file handles the logic for getting picture information from K-samsok. Info such as item id,service organization,thumbnail,item type and kringla link Author: <NAME> 2019-05-21 Sources: Some code is taken/based on Abbe98 co...
<reponame>roadnarrows-robotics/rnr-sdk ################################################################################ # # GuiDlgKheCalIrLed.py # """ Graphical User Interface vKhepera IR LED Calibration Dialog Module Graphical User Interface (GUI) Tkinter vKhepera calibration dialog module for the built-in Khepera p...
<reponame>bpatel28/practice_python from concepts.linked_list.linked_list_node import LinkedListNode class LinkedList: def __init__(self, head=None, tail=None): if head is not None and type(head) is not LinkedListNode: raise TypeError("head must be type of LinkedListNode.") if tail is n...
<reponame>fanfank/aap # -*- coding: utf8 -*- """ @author xuruiqi @date 20160608 @desc 初始化form记录 """ from common import * form_list = [ # 添加页面 { "name": "添加页面", "post_api": "/api/page/add_page", "urlmark": "add_page", "content_type": "application/x-www-form-urlencoded;charset=utf-8", "component...
from hitchstory import HitchStoryException, StoryCollection from hitchrun import expected from commandlib import CommandError from strictyaml import Str, Map, Bool, load from pathquery import pathquery from hitchrun import DIR import dirtemplate import hitchpylibrarytoolkit from engine import Engine """ --------------...
<reponame>sankhesh/vtk-examples<filename>src/Python/Meshes/ClipDataSetWithPolyData1.py import numpy as np import vtk def main(): colors = vtk.vtkNamedColors() # Create polydata to slice the grid with. In this case, use a cone. This could # be any polydata including a stl file. cone = vtk.vtkConeSourc...
# # Copyright 2013 Google Inc. 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 by applicable law or...
<gh_stars>0 #!/usr/bin/env python #The MIT License (MIT) # #Copyright (C) 2014 OpenBet Limited # #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 without restriction, including without limitation...
"""Bridge to sublime functionality.""" import sublime import logging import re _log = logging.getLogger("ECC") class SublBridge: """A small help class that bridges with sublime (maybe will grow).""" NO_DEFAULT_COMPLETIONS = sublime.INHIBIT_WORD_COMPLETIONS \ | sublime.INHIBIT_EXPLICIT_COMPLETIONS ...
<filename>versioneer.py """versioneer.py (like a rocketeer, but for versions) * https://github.com/warner/python-versioneer * <NAME> * License: Public Domain * Version: 0.7+ This file helps distutils-based projects manage their version number by just creating version-control tags. For developers who work from a VCS...
#!/usr/bin/env python import sys import logging from pkg_resources import Requirement from setuptools.package_index import PackageIndex _logger = logging.getLogger() _pypi = 'http://pypi.python.org/simple' def _enable_console(level): """ Configure logging to receive log messages at the console. """ global ...
import os from typing import Optional, Union, List import numpy as np from persia.prelude import _PersiaBatch from persia.logger import get_default_logger _logger = get_default_logger() # Maximum batch_size supported. MAX_BATCH_SIZE = 65535 # Skip all PERSIA data checks except batch size. # Raise RuntimeError w...
<gh_stars>0 # Copyright 2014 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. { 'variables': { 'chromium_code': 1, }, 'targets': [ { 'target_name': 'ios_chrome_browser', 'type': 'static_library', ...
import torch import torch.nn as nn import functools from torch.nn import init class Unet(nn.Module): def __init__(self, in_dim=1, c_dim=3, conv_dim=64, out_dim=1): super(Unet, self).__init__() self.conv1 = nn.Sequential( nn.Conv2d(in_dim + c_dim, conv_dim, kernel_size=3, stride=2, pad...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2016-2018 by I3py Authors, see AUTHORS for more details. # # Distributed under the terms of the BSD license. # # The full license is in the file LICENCE, distributed with this software. # ----------------...
<gh_stars>10-100 import types import json from collections import deque, OrderedDict import macropy.core.macros from macropy.core.macros import ast, expr from macropy.core.hquotes import macros, u, hq, unhygienic from macropy.core.quotes import ast as quotes_ast # the four types below are ostensibly not used but are us...
<filename>tests/cupy_tests/math_tests/test_rounding.py import unittest import numpy import pytest import cupy from cupy import testing @testing.gpu class TestRounding(unittest.TestCase): @testing.for_all_dtypes(no_complex=True) @testing.numpy_cupy_allclose(atol=1e-5) def check_unary(self, name, xp, dty...
<filename>scripts/plot_uph.py #!/usr/bin/python3 # -*- coding: utf-8 -*- import getopt import logging import os import sys import matplotlib.pyplot as plt import numpy as np logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) # plot both results def read_pystella_swd_uph(fname, path=None): if ...
""" Entry point for the command-line interface (CLI). """ # Copyright 2018-2022 The emsig community. # # This file is part of emg3d. # # 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 # # h...
<gh_stars>0 #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ """ import meep as mp import numpy as np # import h5py as h5 #import scipy as sp from scipy import optimize as op from scipy import interpolate as itp from matplotlib import pyplot as plt # from multiprocessing import Pool # from mpl_toolkits.mplot3d impo...
<filename>Brain/agent.py import numpy as np from .model import PolicyNetwork, QvalueNetwork, ValueNetwork, Discriminator import torch from .replay_memory import Memory, Transition from torch import from_numpy from torch.optim.adam import Adam from torch.nn.functional import log_softmax class SACAgent: def __init_...
# coding: utf8 from __future__ import unicode_literals import itertools from ..char_classes import LIST_PUNCT, LIST_ELLIPSES, LIST_QUOTES, LIST_CURRENCY from ..char_classes import LIST_ICONS, CURRENCY from ..char_classes import CONCAT_QUOTES, ALPHA_LOWER, ALPHA_UPPER, ALPHA, PUNCT _list_icons = [x for x in LIST_ICO...
import os import subprocess import threading from typing import Callable, Optional, List from platypush.plugins import Plugin, action class FfmpegPlugin(Plugin): """ Generic FFmpeg plugin to interact with media files and devices. Requires: * **ffmpeg-python** (``pip install ffmpeg-python``) ...
# from matplotlib import pyplot as plt from matplotlib import figure import pygtk pygtk.require("2.0") import gtk try: from twisted.internet import gtk2reactor gtk2reactor.install() except: pass from twisted.internet import reactor import numpy as np from twisted.internet import task from cPickle import loa...
import base64 import logging import lxml.etree import mimetypes import pkg_resources import re import six import six.moves.http_client import six.moves.urllib.parse import socket import sys # This is for debugging, *NOT TO BE USED IN PRODUCTION* DEBUG_REQUEST = False DEBUG_CONNECTION = False XML_CONTENT_TYPE = 'text/...
<gh_stars>0 """ Test casefile conversion """ import os import pytest import context from nemde.core.casefile import lookup from nemde.io.casefile import load_base_case @pytest.fixture(scope='module') def casefile(): year = int(os.environ['TEST_YEAR']) month = int(os.environ['TEST_MONTH']) case_id = f'{y...
<reponame>rissom/RC3MUD<filename>python/system/config.py from xml.dom import minidom from system.log import log import os class Config(object): singleton = None workingpath = "../gamedata" xmlconfig = None configdict = dict() config = { "gui.show" : { "default": "false", "type": "...
<filename>efloras/patterns/range.py """Shared range patterns.""" from traiter.actions import REJECT_MATCH from traiter.patterns.matcher_patterns import MatcherPatterns from efloras.pylib.const import COMMON_PATTERNS DECODER = COMMON_PATTERNS | { 'ambiguous': {'LOWER': {'IN': ['few', 'many']}}, } RANGE_LOW = Mat...
import math from Learning_Info import Learning_Info """ tiles of the map """ home_tile = 0 finished_tile = 59 safe_corridor = [54, 55, 56, 57, 58, 59] globe_tiles = [9, 14, 22, 35, 48] star_tiles = [5, 12, 18, 25, 31, 38, 44, 51] def get_epsilon_greedy(steps_done): """ when 1200 batch size then the net star...
#!/usr/bin/env python3 # Report stats (mapped reads and identity to reference) from samtools stats # for bam file(s) ignoring secondary, suplementary and qc failed alignments # # USAGE: bam2stats.py bam1 bam2 ... bamN import os, subprocess, sys def bam2stats(fn, flag=3840): """Get stats from samtools stats""" ...
# coding: utf-8 """ Jamf Pro API ## Overview This is a sample Jamf Pro server which allows for usage without any authentication. The Jamf Pro environment which supports the Try it Out functionality does not run the current beta version of Jamf Pro, thus any newly added endpoints will result in an error and sh...
<filename>backend/image_migrate.py import hashlib import json import os import sys import uuid import time import docker # 获取docker client client = docker.from_env() def logs(args): print(args) pass # 获取文件的sha256sum def get_file_sha256(filename): # 如果不是文件,返回空 if not os.path.isfile(filename): ...
#!/usr/bin/env python3 import argparse from mako.template import Template import os import json from progress.bar import ChargingBar import multiprocessing import re from subprocess import PIPE import platform import time import sys import touch import unittest import psutil import numpy as np import matplotlib.pyplot...
<reponame>yjbanov/chromium_build # 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. from recipe_engine import recipe_api class LegionApi(recipe_api.RecipeApi): """Provides a recipes interface for the Legi...
""" 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 writing, software di...
<gh_stars>0 import pandas as pd import constants as c class DataManager: """ This class encapsulates the logic for reading and processing the datasets. """ def __init__(self, heights_csv, gdps_csv): """ Initialize the DataManager with the given CSV inputs. The DataManager holds the in...
""" MIT License Copyright (c) 2018 AlessioNetti 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 without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
#!/usr/bin/python """ Two Column Virtual Terminal. """ # Copyright 2011 <NAME> <<EMAIL>>. 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 abo...
#!/usr/bin/env python """ Subscribes T_goal {Pose()}, publishes joint angles {JointState()} """ # imports # import Data.data_logger_module as data_logger import sys, os import rospy from math import sqrt, pi import numpy as np from sensor_msgs.msg import JointState from geometry_msgs.msg import Vector3 from geometr...
import logging import dateutil.parser from mypy_extensions import NoReturn from copy import deepcopy from src.hard_correctness_checks.normal_forms import eliminate_must, reset_ancestor_statement_pointers from src.model.EventsAndTraces import breachActionId, interveneOnDelayId from src.independent.util_for_sequences i...
#!/usr/bin/env python3 """Fetch hierarchical mappings and descriptions of a given list of KEGG Orthology (KO) entries from the KEGG server. Usage: python me.py ko.list Notes: This script utilizes the official KEGG API (https://www.kegg.jp/kegg/rest/ keggapi.html) to query the KEGG database and retrieve re...
# Copyright 2020 SAS Project Authors. 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 requ...
# Copyright © 2018 VMware, Inc. All Rights Reserved. # SPDX-License-Identifier: BSD-2-Clause # !/usr/bin/python ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } DOCUMENTATION = ''' --- module: vcd_catalog short_description: Ansible module to manage (cre...
from __future__ import unicode_literals import logging import urlparse from mopidy.audio import PlaybackState from . import listener logger = logging.getLogger(__name__) class PlaybackController(object): pykka_traversable = True def __init__(self, audio, backends, core): self.audio = audio ...
<filename>splendiferous/splendcards.py import pygame import random import splendconstants as ants pass # this is all unused now def draw_gem(screen, color, x, y): #pygame.draw.polygon(screen, color, [[x+10, y+10], [x, y+20], [x+20, y+20]], 5) pygame.draw.polygon(screen, color, [[x+10, y], [x, y+10], [x, y+20...
#!/usr/bin/env python # Copyright (c) 2019, IRIS-HEP # 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 o...
<reponame>Firefly-Drone-Shows/flight_review """ Methods for sending notification emails """ from __future__ import print_function import sys import os from smtplib import SMTP_SSL as SMTP # this invokes the secure SMTP protocol # (port 465, uses SSL) # from smtplib imp...
<filename>geosoft/gxapi/GXFFT.py ### extends 'class_empty.py' ### block ClassImports # NOTICE: Do not edit anything here, it is generated code from . import gxapi_cy from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref ### endblock ClassImports ### block Header # NOTICE: The code generator will not repla...
<gh_stars>10-100 #!/usr/bin/env python3 from datetime import datetime import traceback from enum import Enum import logging.config import sys import re from hashlib import sha1 from zeep import Client import hmac from binascii import hexlify,unhexlify import struct import base64 import xml.etree.ElementTree as etree im...
""" Copyright 2020 ShipChain, 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 agreed to in writing, softwar...
<reponame>ourcwj/MoyuSystem2.0<filename>ver/MoyuSystem/Network_communication/GUI/login/conn.py # -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file '连接.ui' ## ## Created by: Qt User Interface Compiler version 6.3.0 ## ## WARNING...
<reponame>rapidpro/chpro-microsite<gh_stars>0 # -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-17 22:19 from __future__ import unicode_literals import autoslug.fields import cms.models.fields from django.conf import settings from django.db import migrations, models import django.db.models.deletion impo...
# Copyright (c) 2012-2013, <NAME> <<EMAIL>> # All rights reserved. # # See LICENSE file for full license. from __future__ import annotations import json from re import compile from typing import ( TYPE_CHECKING, Any, Callable, Dict, List, SupportsFloat, SupportsInt, TypeVar, Union, ...
<filename>code/WV.py # https://dhhr.wv.gov/COVID-19/Pages/default.aspx import csv from datetime import datetime import json import os from urllib.request import urlopen, Request import requests from selenium import webdriver from selenium.webdriver import ActionChains from selenium.webdriver.common.by import By from se...
# ================================================================= # # Author: <NAME> <<EMAIL>>, # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # Copyright (c) 2020 <NAME> # Copyright (c) 2020 <NAME> # Copyright (c) 2022 <NAME> # # Permission is hereby granted, free of charge, to any person # obtaining a copy...
<reponame>mbsantiago/irekua-marco-geoestadistico<filename>irekua_marco_geoestadistico/migrations/migrate_geostatistical_framework.py import os import datetime import zipfile import json import logging from tqdm import tqdm from django.contrib.gis.gdal import DataSource from django.contrib.gis.gdal import CoordTransfo...
<gh_stars>0 from magma import * from mantle.lattice.mantle40.MUX import Mux2 from mantle.lattice.mantle40.FF import FFs from mantle.lattice.mantle40.register import _RegisterName, Register __all__ = ['DefineSIPO', 'SIPO'] __all__ += ['DefineSISO', 'SISO'] __all__ += ['DefinePIPO', 'PIPO'] __all__ += ['DefinePISO', 'P...
<reponame>zhangjianting/cuspatial<gh_stars>0 # Copyright (c) 2019, NVIDIA CORPORATION. import numpy as np import pytest import cudf from cudf.tests.utils import assert_eq import cuspatial def test_subset_id_zeros(): result = cuspatial.subset_trajectory_id( cudf.Series([0]), cudf.Series([0]), ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # test_recoverstats.py # # Copyright 2016 <NAME> <<EMAIL>> # import os import shlex import subprocess import sys sys.path.insert(0, os.path.abspath('..')) import numpy as np import matplotlib.pyplot as plt from astropy.time import Time from astropy.io import fits fr...
<gh_stars>1-10 """Unit test for treadmill master. """ # Disable C0302: Too many lines in the module # pylint: disable=C0302 import os import shutil import tempfile import time import unittest import kazoo import mock import numpy as np import treadmill import treadmill.exc from treadmill import master from treadmil...
<filename>utils/extractionUtils.py<gh_stars>0 import numpy as np import json import string from string import punctuation import nltk from nltk.corpus import stopwords import sys import os stopwords = stopwords.words('english') def leaves(tree): ''' Finds NP (nounphrase) leaf nodes of a chunk tree. ''' ...
<reponame>bopopescu/cndw<gh_stars>0 # -*- coding: utf-8 -*- # # Copyright 2019 Google LLC. 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/li...
<gh_stars>0 """Tests for useful utilities for higher level polynomial classes.""" import pytest from diofant import (ZZ, GeneratorsNeeded, I, Integer, Integral, Mul, PolynomialError, Rational, cos, erf, exp, factor, integrate, pi, sin, sqrt, symbols) from diofant.abc import p...
<gh_stars>0 import utils import re from room import Room simpleWallPattern = re.compile("([\|])") lowerWallPattern = re.compile(r"[\+\-*\+]+") multipleLowerWallPattern = re.compile("\+\-*\+\-*\+") class LineParser: def __init__(self): self.last_line = "" self.in_house_rooms = [] # Only roo...
<filename>CouncilTag/api/views.py<gh_stars>0 from django.shortcuts import render from rest_framework import status, generics from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.pagination import LimitOffsetPagination from django.contrib.auth.models import Anon...
# Copyright (c) Code Written and Tested by <NAME> in 21/02/2020, 17:27 from django.contrib.auth.models import User from django.test import TestCase from django.utils import timezone from orders.models import OrderItemModel, Choice, OrderItemsGroupModel, OrderModel from shops.models import ShopProfileModel, ProductMod...
# -*- coding: UTF-8 -*- ############################################################################## # # # Copyright (c) 2007-2010 <NAME> <<EMAIL>> # # ...
import os import cv2 import glob import json from tqdm import tqdm import numpy as np from pathlib import Path from PIL import Image import torch from torch.utils.data import Dataset from lib.utils.general import xyxy2xywh, xywh2xyxy def create_dataloader(image_path, imgsz, batch_size, hyp=None, augment=False, worke...
<filename>automatic_search.py import requests, bs4, time, os from openpyxl import Workbook from tqdm import tqdm def main(): header() researchesList = getResearchesList() WorkSheetXLSX(researchesList).sheet() print("\nFeito!\n") os.system("PAUSE") def header(): print("="*50) ...