text
stringlengths
957
885k
<gh_stars>0 from __future__ import print_function import msgpackrpc #install as admin: pip install msgpack-rpc-python import numpy as np #pip install numpy import msgpack import math import time import sys import os import inspect import types import re class MsgpackMixin: def to_msgpack(self, *args, **kwargs): ...
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/paraparser.py __version__=''' $Id$ ''' __doc__='''The parser used to process markup within paragraphs''' import string import re from types im...
import json import sqlite3 class ProductHelper: DEBUG = False CONN = None def create_db_connection(self, filename): self.CONN = sqlite3.connect(filename) def debug_print(self, s): if self.DEBUG: print(s) def close_db(self): try: self.CONN.close() ...
#!/usr/bin/env python3 import requests import argparse import re import logging import time from bs4 import BeautifulSoup from slackclient import SlackClient schedule_url = 'http://m.cgv.co.kr/Schedule/cont/ajaxMovieSchedule.aspx' movieidx_url = 'http://m.cgv.co.kr/WebApp/MovieV4/movieDetail.aspx?cgvCode={}' moviein...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging from unittest import TestCase, main from io import BytesIO from pdfmajor.parser.PSStackParser import KWD, LIT, PSBaseParser, PSStackParser from pdfmajor.execptions import PSEOF ## Simplistic Test cases ## TESTDATA = br'''%!PS begin end " @ # /a/BCD /So...
<reponame>elif-furkan-celik/KNN_Regression_and_Decision_Tree # -*- coding: utf-8 -*- """knn_dtc_.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1xd8oJeNQ0RiUtMXUhNaMfrc4eoT8mJkv """ import pandas as pd from sklearn.neighbors import KNeighborsCla...
<gh_stars>1-10 import pandas as pd from sklearn.model_selection import train_test_split import numpy as np from collections import Counter from tensorflow import keras from tensorflow.python.ops import math_ops import tensorflow as tf import os import pickle import re from urllib.request import urlretrieve from os.path...
import os import sys sys.path.append(os.path.join(os.path.dirname( __file__), "../src")) import numpy as np import matplotlib.pyplot as plt from scipy import interpolate import collections from vtk.util.numpy_support import vtk_to_numpy, numpy_to_vtk import label_io import utils """ Functions to write interpolated sur...
<filename>input_handlers.py from __future__ import annotations from typing import Optional, TYPE_CHECKING import tcod.event from actions import Action, BumpAction, EscapeAction, WaitAction if TYPE_CHECKING: from engine import Engine MOVE_KEYS = { # Arrow keys. tcod.event.K_UP: (0, -1), tcod.event.K...
<reponame>AlexJew/CityEnergyAnalyst """ MIT License Copyright (c) 2019 TUMCREATE <https://tum-create.edu.sg/> 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 withou...
# coding: utf-8 """***************************************************************************** * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries. * * Subject to your compliance with these terms, you may use Microchip software * and any derivatives exclusively with Microchip products. It is your...
# -*- coding: utf-8 -*- """ Created on Mon Mar 14 10:44:23 2016 @author: wexiao """ from rpca.pcp import pcp from rpca.utility import solve_proj2 import numpy as np from sklearn.utils.extmath import randomized_svd from collections import deque import itertools def omwrpca_cp(M, burnin, win_size, track_cp...
<reponame>anastasia-spb/CarND-Advanced-Lane-Lines import numpy as np import cv2 import os import glob import ntpath import matplotlib.pyplot as plt class ParamsStruct(): def __init__(self, count=0, window_name="", img=None, points=[], draw_help_lines=True): self.count = count self.window_name = wi...
<gh_stars>1-10 import unittest import os from requests import get import json class ParticipantQuerySessionsTest(unittest.TestCase): host = '127.0.0.1' port = 40075 login_endpoint = '/api/participant/login' sessions_endpoint = '/api/participant/sessions' def setUp(self): pass def te...
#!/usr/bin/env python3 '''VisibleV8 Builder Tool Actually a generic chromium-building tool that facilitates checking out specific [release] revisions of chromium, building selected targets in a checked-out source tree, and installing artifacts from a build into a fresh Docker container image. ''' import argparse impo...
<filename>plga_evaluate_bleu_score.py import os import common as cm import sacrebleu import nmt_data_prep as nmtdp import plga_transformer_run_model as plga_run def evaluate_bleu(model_dict, model_name, model_type, src_lang='pt', tgt_lang='en',...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This script builds the domain specific language model for the Public Transport Info domain (Czech) The training procedure is as follows: #. Append bootstrap text, possibly handwritten, to the text extracted from the indomain data. #. Build a class based language mode...
# coding: utf-8 # Python libs from __future__ import absolute_import import datetime # Salt libs from salt.beacons import telegram_bot_msg # Salt testing libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase, skipIf from tests.support.mock import NO_MOCK, NO_MOCK_REASON,...
import sys import nltk import sklearn import pandas as pd import numpy as np df= pd.read_table('SMSSpamCollection',header= None, encoding='utf-8') classes = df[0] print(classes.value_counts()) #Preprocess the data """ 0= ham 1=spam for this we use label encoder """ from sklearn.preprocessing import LabelEncoder ...
<filename>SiteAlert_bot.py __author__ = 'iLTeoooD' from io import StringIO from telebot import types from SiteAlert import * TOKEN = os.environ['SITE_ALERT_TOKEN'] site_alert = SiteAlert() leng = "" Array = {} gen_markup = types.ReplyKeyboardRemove(selective=False) wlcm_msg = "!\nWelcome to @SiteAlert_...
<reponame>d4nnyk/DarunGrim import sys sys.path.append(r'.') sys.path.append(r'T:\mat\Projects\ResearchTools\Binary\StaticAnalysis\DarunGrim2\Bin\DarunGrim2') sys.path.append(r'..') sys.path.append(r'..\Diff Inspector') import os import PatchTimeline import DarunGrimEngine import PatchDatabaseWrapper import DarunGrimAn...
# -*- coding: utf-8 -*- # 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/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright (c) 2017 <NAME> <<EMAIL>> # # Licensed under BSD3. See the LICENSE.txt file in the root of this distribution. from simulation.aivika.modeler.model import * from simulation.aivika.modeler.port import * from simulation.aivika.modeler.stream import * from simulation.aivika.modeler.data_type import * from simu...
<filename>pointnet2/train/train_cls.py from __future__ import ( division, absolute_import, with_statement, print_function, unicode_literals, ) import torch import torch.optim as optim import torch.nn as nn from torch.utils.data import DataLoader from torchvision import transforms import etw_pytorch_...
<filename>cinder/volume/drivers/dothill/dothill_iscsi.py<gh_stars>0 # Copyright 2014 <NAME> # Copyright 2015 DotHill Systems # # 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 # #...
<filename>src/oci/database/models/create_data_guard_association_to_existing_vm_cluster_details.py<gh_stars>0 # coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.or...
<filename>Driving/gen_gauge.py<gh_stars>1-10 ''' usage: python gen_diff.py -h ''' from __future__ import print_function import argparse from scipy.misc import imsave from driving_models import * from utils import * import pickle parser = argparse.ArgumentParser( description='Main function for difference-induc...
<filename>tests/devices/test_inkbird_thermostat.py from unittest import IsolatedAsyncioTestCase, skip from unittest.mock import AsyncMock, patch from homeassistant.components.climate.const import ( SUPPORT_PRESET_MODE, SUPPORT_TARGET_TEMPERATURE_RANGE, ) from homeassistant.const import TEMP_CELSIUS, TEM...
# 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 # distributed under the ...
<reponame>robbrockbank/felix<gh_stars>0 # -*- coding: utf-8 -*- # Copyright (c) 2015 Metaswitch Networks # 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 # # ...
<reponame>fossabot/xclim # noqa: D100 import warnings from typing import Optional import numpy as np import xarray from xclim.core.calendar import get_calendar from xclim.core.units import ( convert_units_to, declare_units, rate2amount, str2pint, to_agg_units, ) from xclim.core.utils import DayOfY...
'''Build full state representation''' import numpy as np from pandas import DataFrame class StateRepresentationBuilder(): ''' Implements section 3.2 of the paper. Builds state representation \ of raw entities ''' def __init__(self, neighbor_radius=25): self.tracked_entities = [] sel...
import math from panda3d.core import * from otp.nametag import NametagGlobals from otp.nametag.MarginPopup import MarginPopup from otp.nametag.Nametag import Nametag from otp.nametag.NametagConstants import * class Nametag2d(Nametag, MarginPopup): def __init__(self): Nametag.__init__(self, 8.0) ...
# coding=utf-8 import pstats from collections import OrderedDict from operator import itemgetter import jieba import time import scipy import numpy as np import pandas as pd from scipy.sparse import csr_matrix, spmatrix, coo_matrix from sklearn.feature_extraction.text import CountVectorizer from sklearn.metrics.pairwis...
<reponame>ZengTaoxu/azure-cli # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------...
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: python 2.7 # # Imports ===================================================================== import pytest import dhtmlparser from harvester.scrappers import cpress_cz # Variables =================================================================...
"""TEMPLATES COMMANDS""" import mimetypes import logging from pathlib import Path import click from mldock.config_managers.cli import ModelConfigManager, CliConfigureManager from mldock.config_managers.project import MLDockConfigManager from mldock.terminal import ProgressLogger from mldock.platform_helpers.mldock.sto...
from lib import * # TODO: optional parameters:PFC, frame_filter_available, half_duplex_capable, statistics_counters_available, capable_1g, capable_100m, capable_10m def Ethernet(base, size): d = Device('Ethernet', base, size) ETH_BASE = base # For the device specified in # https://www.xilinx.com/supp...
# -*- coding:utf-8 -*- """ rule based query generation ------------ book person """ from refo import Star, Any from inference.basic_inference import W, Rule, KeywordRule from inference.basic_inference import SPARQL_PREFIX, SPARQL_ASK_TEM, SPARQL_COUNT_TEM, SPARQL_SELECT_TEM, SPARQL_SELECT_TEM_FD, SPARQL_COUNT_TEM_FD fr...
r""" Keywords manipulation ================================================================================================== This object contains a list of unique keywords (terms of interest). Regular expressions recipes -----------------------------------------------------------------------------------------------...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """This module contains the class Bounded_Manager, which manages a cloud""" __Lisence__ = "BSD" __maintainer__ = "<NAME>" __email__ = "<EMAIL>, <EMAIL>" __status__ = "Development" import random from .manager import Manager from ..utils import split_list class Bounde...
import pandas as pd import numpy as np from modele_autoregresyjne.sarima_functions import sarima_forecast, grid_search from preprocessing_danych.dataset_config import train_index, val_index, test_index from LSTM.train_lstm.lstm_functions import preprocesing_data import re from sklearn.preprocessing import StandardSca...
<gh_stars>1-10 # utils import os import numpy as np from PIL import Image import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.nn.functional as F ######### # Utils # ######### def convert_arg_line_to_args(arg_line): for arg in arg_line.split(): ...
<reponame>Young-Excavator/meta_LSM """ Utility functions. """ import numpy as np import os import random import tensorflow as tf import pandas as pd from tensorflow.contrib.layers.python import layers as tf_layers from tensorflow.python.platform import flags FLAGS = flags.FLAGS def normalize(inp, activation, reuse, ...
<filename>_broken/caffe-segnet-stuff/backend/find_segnet_caffe.py #!/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import os import platform import sys import ubelt as ub from os.path import expanduser, join, exists, abspath # NOQA from pysseg...
<filename>Plots/Contours/NCL_color_1.py<gh_stars>1-10 """ NCL_color_1.py =============== This script illustrates the following concepts: - Drawing a horizonal color bar - Adjusting a colorbar position relative to plot axes - Recreating a default NCL colormap See following URLs to see the reproduced NCL plot &...
<reponame>rahulgupta9202/ColossalAI<filename>colossalai/communication/p2p.py #!/usr/bin/env python # -*- encoding: utf-8 -*- import torch import torch.distributed as dist from colossalai.context.parallel_mode import ParallelMode from colossalai.core import global_context as gpc from colossalai.utils import get_curren...
#!/usr/bin/python3 # File: test_review.py # Authors: <NAME> - <NAME> # email(s): <<EMAIL>> # <<EMAIL>> """ This Module Defines Unittest for models/review.py. Unittest classes: TestAmenity_instantiation TestAmenity_save TestAmenity_to_dict """ import os import models import unittest from datetime...
<reponame>xingjianleng/cogent3 __author__ = "<NAME>" __copyright__ = "Copyright 2007-2022, The Cogent Project" __credits__ = ["<NAME>", "<NAME>"] __license__ = "BSD-3" __version__ = "2022.4.20a1" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "Production" def pog_traceback(pogs, aligned_positions): ...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import logging from itertools import chain from pants.backend.java.dependency_inference.rules import ( JavaInferredDependencies, JavaInferredDe...
<gh_stars>0 #!/usr/bin/env python # coding: utf-8 # In[1]: from __future__ import nested_scopes #import findspark #findspark.init() # In[2]: import re import os import pandas pandas.set_option('display.max_rows', None) # In[3]: import threading import collections import gzip # In[4]: import pyspark impor...
import requests import json import pandas as pd import numpy as np from requests.auth import HTTPBasicAuth from datetime import datetime import time import re import sys import numpy as np delay_conn = 60 clients = [('your_clinet_id_1', 'your_clinet_secret_1'), ('your_clinet_id_2', 'your_clinet_secret_2'), ...
<gh_stars>0 from bs4 import BeautifulSoup import requests from googlesearch import search import whois_script import geolocation_script import re # all us states us_states = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illi...
<reponame>30blay/pyamplitude<filename>pyamplitude/tests/test_amplituderestapi.py # !/usr/bin/python # -*- coding: utf-8 -*- import unittest from pyamplitude.apiresources import ProjectsHandler from pyamplitude.amplituderestapi import AmplitudeRestApi class Test_AmplitudeRestApi(unittest.TestCase): """ I...
import base64 import hashlib import json import requests from Cryptodome import Random from Cryptodome.Cipher import AES class ProtectedTextApi: def __init__(self, site_id, passwd): self.siteHash = hashlib.sha512(("/" + site_id).encode("latin1")).hexdigest() self.pas = passwd ...
<reponame>AndreasGocht/PyOgg import ctypes from .pyogg_error import PyOggError from .ogg import PYOGG_OGG_AVAIL from .vorbis import PYOGG_VORBIS_AVAIL, PYOGG_VORBIS_FILE_AVAIL, PYOGG_VORBIS_ENC_AVAIL from .opus import PYOGG_OPUS_AVAIL, PYOGG_OPUS_FILE_AVAIL, PYOGG_OPUS_ENC_AVAIL from .flac import PYOGG_FLAC_AVAIL #:...
<reponame>TeddyGlass/MLpipeline<filename>src/pipeline/optimizer.py from trainer import Trainer from sklearn.metrics import log_loss from utils import root_mean_squared_error from sklearn.model_selection import StratifiedKFold, KFold from xgboost import XGBRegressor, XGBClassifier from lightgbm import LGBMRegressor, LGB...
import os import argparse import configparser from google_email_api.quickstart import main as google_email_service from oauth2client.service_account import ServiceAccountCredentials as SAC import gspread from google_email_api.Google import Create_Service import base64 from email.mime.multipart import MIMEMultipart fro...
<reponame>miu200521358/segmentation-kit-mmd<filename>mmd/mmd/PmxData.py # -*- coding: utf-8 -*- # import _pickle as cPickle from abc import ABCMeta, abstractmethod from collections import OrderedDict import math import numpy as np from mmd.module.MParams import BoneLinks from mmd.module.MMath import MRect, MVector2D, ...
<gh_stars>1-10 import datetime import json from django.db.models import Count from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from ..models import Task class TaskTestCase(TestCase): def setUp(self): self.user = self.create_user()...
<gh_stars>1-10 from PyMIPS.Datastructure.instruction_types import IType, RType, JType from PyMIPS.AST.validator import validate import unittest class TestRType(unittest.TestCase): def test_all(self): try: RType("add", "$t3", "$t2", "$t1") RType("addu", "$t3", "$t2", "$t1") ...
#!/usr/bin/env python # Colored Logger from https://stackoverflow.com/questions/384076/how-can-i-color-python-logging-output import os import logging import time import random BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8) # The background is set with 40 plus the number of the color, and the # for...
<reponame>ntkleynhans/stp-app #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals, division, print_function import requests import sys import json import os import codecs import logging import logging.handlers # Some constants BASEURL = None # Format the logger output class CustomFo...
import math import torch import torch.nn as nn from sparsemax import Sparsemax class TabNetModel(nn.Module): params = {} def __init__(self, **kwargs): super(TabNetModel, self).__init__() self.params.update(kwargs) self.__batch_norm = nn.BatchNorm1d(self.params["n_input_dims"], momentu...
from project import app from flask import render_template, redirect, request, url_for, session from project.com.dao.LoginDAO import LoginDAO from project.com.vo.LoginVO import LoginVO from project.com.dao.BankDAO import BankDAO from project.com.vo.BankVO import BankVO from project.com.dao.BranchDAO import BranchDAO fro...
from __future__ import annotations from typing import TextIO, Union import abc import pathlib import re Stack = "list[Union[Value, Operator]]" def process_input(file: TextIO) -> list[Parser]: return [ Parser(line).parse() for line in file if not line.isspace() ] class Parser: t...
#!usr/bin/env python import rospy import numpy as np import math import cvxpy import tf from geometry_msgs.msg import Twist from nav_msgs.msg import Path from nav_msgs.msg import Odometry from prius_msgs.msg import Control from geometry_msgs.msg import PoseStamped global current_state global path_message global state_...
<reponame>aidden-laoch/sabre """ This module provides functionality for steganography. It uses a configuration string with custom syntax to describe *where* and *how* will data be injected in a template. **Stego Configuration Syntax Description** * Tags Tags are used to specify the functions that will be applied on ...
<reponame>gitter-badger/Py.Html from io import StringIO #Create, edit and read Html files class HtmlPy(): _menuHtmlConst="<nav id=""{Menuname}"">\n <ul>\n <li>Item</li>\n <li>Item</li>\n <li>Item</li>\n </ul>\n</nav>\n" _formHtmlConst="<form action='{actForm1}'>\n <label>Label</label>\n <input id='{idName...
import csv import pprint from datetime import datetime count_by_state = {} count_by_category = {} count_by_area_of_significance = {} count_by_year_listed = {} pp = pprint.PrettyPrinter(indent=4) #create counters for properties by state, category, area of significance, and year listed with open("/Users/juliecarlson/D...
import settings import manager import utils import pexpect from pexpect.replwrap import REPLWrapper import os import time def logpath(tty): return os.path.join(settings.log_dir, tty+'.log') log_error_re = settings.make_log_error_re() class NoTTYError(Exception): pass class Mspdebug(object): def __ini...
<reponame>t-mcneal/miurl from flask import Flask, render_template, request, redirect, url_for, flash, abort, session, jsonify import json import os.path from werkzeug.utils import secure_filename app = Flask(__name__) # NOTE: Change the secret key below to a new random string for security purposes since # the "app.p...
<gh_stars>100-1000 #!/usr/bin/env python # This file is part of the pyMOR project (https://www.pymor.org). # Copyright 2013-2021 pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (https://opensource.org/licenses/BSD-2-Clause) import sys import time import numpy as np import OpenGL...
<filename>test/table_request.py # # Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved. # # Licensed under the Universal Permissive License v 1.0 as shown at # https://oss.oracle.com/licenses/upl/ # import unittest from time import sleep from borneo import ( GetTableRequest, IllegalArgume...
# import kivy module import os import kivy import cv2 import numpy as np from tkinter import Tk from tkinter.filedialog import askopenfilename # base Class of your App inherits from the App class. # app:always refers to the instance of your application from gtts import gTTS from kivy.app import App from ki...
""" Parallel & Distributed Algorithms - laboratory Examples: - Launch 8 workers with default parameter values: > python arir.py 8 - Launch 12 workers with custom parameter values: > python arir.py 12 --shared-memory-size 128 --delay-connect 2.0 --delay-transmit 0.5 --delay-process 0.75 """ __author__ = 'moorglad...
""" admintools.py utilities to add users, courses, etc. --- courses_jan2018.csv ---- name,name_as_title,path,faculty Programming Workshop,Programming<br>Workshop,spring2018/workshop,mahoney Jim's Tutorials,Jim's<br>Tutorials,spring2018/jims_tutorials,mahoney ... --- students_2018.csv --- name,username,course <NAME...
class Levenshtein: def __init__(self, alphabet, symbols, weight_dict = {}, language = None): """ Initialize the levenshtein distance with a specific alphabet and set of symbols and an optional predefined set of weights. Parameters ---------- alphabet: string ...
<gh_stars>1-10 import os import sys import io import filecmp import pytest from pathlib import Path from pyneid.neid import Neid from astropy.table import Table,Column # These tests are designed to be run inside the # Docker container built with the Dockerfile # at the top level of the repo. # dummy user pyneidpr...
<gh_stars>0 #!/usr/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM SYSTEMS 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 Li...
<gh_stars>1-10 import server as s import functions as f import accounts as a import os import json def mainMenu(): """ Displays the main menu of the setup script. """ os.system('cls' if os.name == 'nt' else 'clear') print('Main Menu') print('1 - Set Canvas Instance URL') print('2 - Set Di...
### Copyright 2014, MTA SZTAKI, www.sztaki.hu ### ### 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 applicab...
<gh_stars>0 # -*- coding: utf-8 -*- """ IO - bpRNA ================ It help process the result file from the tool - 'bpRNA'. """ import os from typing import Tuple, Optional from neoRNA.sequence.sequence import Sequence from neoRNA.sequence.base_pair import BasePair from neoRNA.structure.secondary_structure_eleme...
<reponame>jhover/rubygem-rpmbuild #!/bin/env python __author__ = "<NAME>" __copyright__ = "2017 <NAME>" __credits__ = [] __license__ = "GPL" __version__ = "0.9.0" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "Production" import argparse import datetime import logging import os import subprocess import ...
# Copyright (c) OpenMMLab. All rights reserved. import math import os import tempfile from copy import deepcopy from itertools import chain from unittest import TestCase import torch from mmcv.runner import load_checkpoint, save_checkpoint from mmcv.utils.parrots_wrapper import _BatchNorm from mmcls.models.backbones ...
#!/usr/bin/python import time import pprint import json import os import copy import shutil import requesocks as requests #import requests from scrapy.selector import Selector import urllib3 import sys from datetime import datetime, timedelta import mr_gov_il class exemption_extended_data_web_page(mr_gov_il.extended_d...
# Copyright (c) Microsoft 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 agreed to in wri...
# # 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 # ...
<reponame>volodymyrss/astromodels<filename>astromodels/tests/test_tree.py import pytest import os os.environ["ASTROMODELS_DEBUG"] = "debug" from astromodels.core.tree import Node from astromodels.core import node_ctype import gc def clean(): gc.collect() class _SimpleInheritance(Node): def __init__(self...
<reponame>hidaruma/caty<gh_stars>0 #coding: utf-8 import xjson import urllib import cgi BLOCK = [ 'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'table', 'tr', 'li', 'ul', 'ol', 'pre', 'dt', 'dd', 'dl', 'div', 'blockquote', ] def markup(input...
# # Copyright 2021 Mobvista # # 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, s...
<gh_stars>1-10 import os from scipy.spatial import KDTree import ttide as tt import datetime import numpy as np import scipy.io as sio from .log_progress import log_progress from .haversine import haversine def read_atg(atg_data,site_id,constit_list): site_data = {} for key in ['site_id','name','lat','lon','a...
import locale import os from shutil import copyfile import numpy as np from scipy.io import wavfile from timecode import Timecode from edit_point import EditPoint from parameters import InputParameter from shell_utils import do_shell OS_ENCODING = locale.getpreferredencoding() class BaseOutput(object): def __...
<gh_stars>1-10 #!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from typing import Any, List, Sized, Tuple import torch as torch import torch.nn as nn from pytext.utils.cuda_utils import xaviervar # token/non-terminal/sub-tree element on a stack. # need this value for co...
from datetime import datetime, timedelta from NodeDefender.db.sql import SQL, HeatModel, NodeModel, iCPEModel, GroupModel from sqlalchemy import func from sqlalchemy.sql import label from itertools import groupby def current(group): group = SQL.session.query(GroupModel).filter(GroupModel.name == ...
<reponame>cuttlefishh/papers #!/usr/bin/env python import urllib import sys import os ##### totalannotation.py by <NAME> ##### This script takes an input fasta file of sequence names and sequences, and blast results files of blasts against ##### nr (parsed .txt with 1 hit per line) and swissprot and tremble (in -outf...
__author__ = 'adrian.suciu' import urllib.request import sys import os import json import random import time import urllib.parse as urlparse from common import log import common import db import settings client_id = 0 client_secret = 0 current_token = {} def get_token_from_imgur(param): json_data = json.dumps(p...
import math from functools import reduce, update_wrapper, wraps from inspect import signature from itertools import accumulate, chain, repeat from typing import Callable from ..utils.cells import combine_cells, fix_cells, mark_graphemes, split_graphemes def spinner_player(spinner): """Create an infinite generato...
from __future__ import division from models import * from utils.utils import * from utils.datasets import * import os import sys import time import datetime import argparse from PIL import Image import numpy as np import torch from torch.utils.data import DataLoader from torchvision import datasets from torch.autog...