text stringlengths 6.04k 39.5k |
|---|
import os
import sys
import h5py
import numpy as np
from datetime import datetime
import gfunc2d.gridtools as gt
from gfunc2d.marg_mu import marginalise_mu as margm
from gfunc2d.marg_mu import marginalise_mu_simple as margm2
from gfunc2d.gplot import loglik_save, contour_save, hr_save
from gfunc2d.gstats import print_a... |
from datetime import timedelta
from astropy import units as u
import numpy as np
from sunpy.time import parse_time
def get_sky_position(time, offset):
"""Code for converting solar offsets to pointing position.
Parameters
----------
time: Date that is parsable by sunpy.time.parse_time()
i.e.,
... |
#!/usr/bin/env python
# Copyright (C) 2009-2010 <NAME> (<EMAIL>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ... |
import io
import aiofiles
import aiofiles.os
import aiohttp
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
import requests
from PIL import Image
from matplotlib.dates import DateFormatter
from nio import MatrixRoom, UploadResponse
import config
from dors import command_hook, Jenny, HookMessage
... |
#!/usr/bin/env python
# coding=utf-8
#
# Copyright © 2021 bvchirkov
#
# 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 b... |
# -*- coding: utf-8 -*-
"""
@file
@brief Defines a :epkg:`sphinx` extension to give a title to a mathematical
definition, theorem...
Inspired from `math.py <https://github.com/sphinx-doc/sphinx/blob/master/sphinx/ext/math.py>`_.
"""
import os
from docutils import nodes
from docutils.parsers.rst import directives
from d... |
from tkinter import *
import math
import random
import planeVec as pv
root = Tk()
root.title('City Simulator')
canvas = Canvas(root, width = 600, height = 600)
canvas.pack()
regType = dict()#this list contains all the types of regions
lines = list()#this is the list of all line objects in the document
fen... |
# ==================================
# Game actions:
# Steer left/right
# Accelerate back/forward
# Fire
# Nitro
# Skidding
# Look back
# ==================================
import pathlib
import re
import struct
import argparse
import os
from typing import List, Tuple, Callable
from client import ClientSo... |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, cint, getdate, get_last_day, get_first_day, add_days
from frappe import msgprint, _
from calendar import mo... |
"""
********************************************************************************
* Name: gen_commands.py
* Author: <NAME>
* Created On: 2015
* Copyright: (c) Brigham Young University 2015
* License: BSD 2-Clause
********************************************************************************
"""
import os
import st... |
"""
Distributed training using Horovod on Spark
-------------------------------------------
"""
import datetime
import os
import pathlib
import subprocess
import sys
import typing
from dataclasses import dataclass
from distutils.version import LooseVersion
import flytekit
import horovod.spark.keras as hvd
import pysp... |
from typing import List, Tuple
import mlflow
import mlflow.lightgbm
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.metrics import precision_recall_fscore_support, accuracy_score
from sklearn.metrics import roc_auc_score
from lightgbm import LGBMClassifier, LGB... |
"""Copyright (c) 2015, Dilithium Power Systems LLC 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
list of conditions an... |
#!/usr/bin/env python3
"""
"""
import pytorch_lightning as pl
from torch import optim
from argparse import ArgumentParser
import torch
import numpy as np
from sklearn.linear_model import LogisticRegression
from sklearn import metrics
import torch_optimizer
from sklearn.neighbors import NearestCentroid
from learn2lea... |
import autograd.numpy as np
import scipy.linalg as lg
from scipy.stats import multivariate_normal
from autograd import value_and_grad
from autograd import grad as automatic_grad
from scipy.optimize import minimize
from tools import create_splits
def compute_h(kernel,base_density, Y, K_X):
# computes the vector ... |
#!/usr/bin/env python
#
# Copyright 2014 Tuenti Technologies S.L.
#
# 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 app... |
import os
import re
from pathlib import Path
from capanno_utils.config import config, main_tool_subtool_name, tools_dir_name, scripts_dir_name, workflows_dir_name, \
instances_dir_name, instance_file_pattern, instance_metadata_file_pattern, script_common_metadata_file_pattern, \
common_dir_name, root_repo_name,... |
#
# Copyright (c) 2021 Intel 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... |
# -*- coding: utf-8 -*-
"""
http://www.nature.com/nature/journal/v482/n7385/full/nature10886.html
Module: pypub.scrapers.nature
Status: In progress
#TODO: Add tests, this stuff will break!
#TODO: Allow extraction of the refs as a csv,json,xml, etc - this might go into utils
#TODO: STANDARDIZE THE FUNCTION INPUTS!!!... |
#! /usr/bin/python
# -*- coding: utf-8 -*-
import os
import numpy as np
import tensorflow as tf
from tensorflow.contrib import rnn
import matplotlib.pyplot as plt
__author__ = 'fyabc'
DataPath = 'G:/Data/PatternRecognition/preprocessing/output_normalized'
RealDataPath = 'G:/Data/PatternRecognition/preprocessing/tes... |
#!/usr/bin/env python3
import argparse
import json
import logging
import logging.config
import os
import re
import requests
import sys
from datetime import datetime
from dcicutils.ff_utils import (
get_authentication_with_server,
get_metadata,
patch_metadata,
post_metadata,
search_metadata,
)
from... |
# -*- coding: utf-8 -*-
from openerp import models,fields,api
from openerp.tools.translate import _
import datetime
from openerp.exceptions import Warning
import codecs
import unicodedata
import base64
import csv, cStringIO
import sys
import os
import logging
_logger = logging.getLogger(__name__)
def date2txt(date):
... |
#%%
import numpy as np
import ansatz_class_package as acp
import pauli_class_package as pcp
import hamiltonian_class_package as hcp
import matrix_class_package as mcp
import post_processing as pp
import scipy as scp
import scipy.io
import qutip
import plotting_package as plotp
import pickle
import os
if not os.p... |
import math
from copy import deepcopy
from datetime import timedelta
from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404
from django.urls import reverse, reverse_lazy
from django.utils.html... |
import copy
import json
from itertools import product
import numpy as np
import pandas as pd
import pytest
from evalml.model_understanding.prediction_explanations._user_interface import (
_BinarySHAPTable,
_make_json_serializable,
_make_rows,
_make_text_table,
_MultiClassSHAPTable,
_Regression... |
# Copyright IBM Corp. 2016 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 ag... |
#!/usr/bin/env python
"""
Classes and functions for image correlation.
Hazen 07/09
"""
import math
import matplotlib
import matplotlib.pyplot as pyplot
import numpy
import scipy
import scipy.optimize
import scipy.signal
import storm_analysis.sa_library.gaussfit as gaussfit
class ImageCorrelationException(Exception)... |
# -*- coding: UTF-8 -*-
# YaBlog
# (c) <NAME>
# 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 of conditions and the following... |
#!/usr/bin/env python
# Cluster_Ensembles/src/Cluster_Ensembles/Cluster_Ensembles.py;
# Author: <NAME> for the GC Yuan Lab
# Affiliation: Harvard University
# Contact: <EMAIL>, <EMAIL>
"""Cluster_Ensembles is a package for combining multiple partitions
into a consolidated clustering.
The combinatorial optimization... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
pipreqs - Generate pip requirements.txt file based on imports.
"""
from pdb import set_trace as breakpoint
from contextlib import contextmanager
import os
import sys
import re
import logging
import codecs
import ast
import traceback
from docopt import docopt
import requ... |
# Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... |
import occ.spawn as mspawn
import time
import datetime
import occ.yeshup as yeshup
import os
import traceback
import functools
bind = functools.partial
from occ.inbox import *
SHORT_WAIT = 0.01
#############################################################################
# utility functions
# this runs f in anot... |
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objs as go
import os
import numpy as np
import pandas as pd
pd.options.mode.chained_assignment = None # default='warn'
import scipy.spatial.distance as dist
import scipy.cluster.hierarchy as sch
# fn = os.path.... |
#!/usr/bin/env python
"""
<NAME>
Feb 2021
external calibration of two odometries
"""
import rospy
from nav_msgs.msg import Odometry
import numpy as np
import message_filters
import tf
import random
from geometry_msgs.msg._Pose import Pose
from sklearn.linear_model import RANSACRegressor
from utils import so3_estimatio... |
# 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 License, Version 2.0 (the
# "License"); you may not u... |
"""
A classification model build with PyTorch, mediapipe and
openCV for live gesture detection from webcam
"""
# import dependencies
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import mediapipe as mp
import cv2
import time
import os
import traceback
from datetime impo... |
import csv
import hashlib
import logging
import shutil
from datetime import datetime, timedelta
from ntpath import basename
from typing import Dict
from colorama import Fore
from dateutil import parser
from scp import SCPException
from sauronx import append_log_to_submission_log, stamp
from .alive import SauronxAliv... |
import json
import logging
import numpy as np
import pandas as pd
import xlearn as xl
from lightgbm import LGBMRegressor
from pandas.io.json import json_normalize
from pystacknet.pystacknet import StackNetRegressor
from sklearn.ensemble import RandomForestRegressor, ExtraTreesRegressor
from sklearn.linear_model import... |
import math
import itertools
import torch
from torch.nn import functional as F
from nitorch import core
from nitorch.core import utils, math
from nitorch.core.utils import to_max_backend, unsqueeze, movedim
from nitorch.core.py import make_list
from ._affine import affine_conv
def conv(dim, tensor, kernel, bias=None,... |
#!/usr/bin/env python3
import pitches as p
from math import ceil
import itertools as it
# from timeit import timeit
unplayedString = "" # we use this to indicate that there is a string which is left alone :)
tunings = {4:tuple([-8 + i*5 for i in range(4)]), #4-string bass
5:tuple([-13 + i*5 for i in ... |
"""Decorators to declare signals and remote functions
==================================================
ALso define common functions for allowing (or not) signal calls to user, and several tools for checking arguments
provided to the signal (or function).
Decorators
----------
Three decorators are provided, for cre... |
import numpy as np
import cv2, serial, time, os, sys
from scipy import stats
def getSerialPort(intASCII): # intASCII is the integer which can be recognized as a correct signal (e.g. laser level) by our Arduino UNO
for portNum in range(1, 11):
try:
portName = 'COM' + str(portNum)
... |
# Copyright (c) 2015, <NAME> and <NAME> 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
# list of conditions and ... |
'''
2017-02-28
place a colorbar.
'''
import sys
import scipy
import pickle
import scipy.misc
import numpy as np
import SimpleITK as sitk
import PyQt5
import pyqtgraph.opengl as gl
import matplotlib.pyplot as plt
import pyqtgraph as pg
from scipy import ndimage
from PyQt5 import QtCore, QtGui
# from pyqtgr... |
# Code for plan-net
# <NAME>, Feb 2019
# Keras
import keras
from keras import backend as K
from keras.models import Sequential, Model
from keras.metrics import binary_accuracy
from keras.layers import Convolution1D, Dense, MaxPooling1D, Flatten, Input, Lambda, Wrapper, merge, concatenate
from keras.engine import Input... |
# %% Definitions
#
# # The idea here is to
# (see flow_deck_graph in prefect_flows)
#
# 1. Load the previously ETLelled outgoing and incoming graphs
# 2. Build simple paths from card to its entity nodes
# 3. Build a paths df keyed by card_id, entity and orders with some common attributes of these paths:
# paragraph typ... |
"""
The :mod:`sklearnext.model_selection.search` includes utilities to search
the parameter and model space.
"""
# Author: <NAME> <<EMAIL>>
# License: BSD 3 clause
from warnings import warn, filterwarnings
import re
from dask_searchcv.utils import copy_estimator
from sklearn.metrics import r2_score, accuracy_score
fr... |
'''
Functions for loading and slicing data
'''
from datetime import datetime
from pkg_resources import resource_filename
import numpy as np
from scipy.io import loadmat
__all__ = ['get_data',
'get_samplerate_mstimer',
'get_samplerate_datetime',
'_sliding_window',
'rolling_... |
# TODO
# color(a, a) est identique à color(a)
# birmanie ajouter étoile + vérif couleur
# le cadre n'est pas tjs là, il faut gérer cela autrement avec une fonction?
# Liens internet vers la description des drapeaux du monde
# https://fr.wikipedia.org/wiki/Galerie_des_drapeaux_des_pays_du_monde
# https://fr.wikipedia.o... |
# -*- coding: utf-8 -*-
"""
Converts OpenURLs to BibJSON and back.
"""
import logging, pprint, urllib
log = logging.getLogger(__name__)
try:
from urlparse import parse_qs
except ImportError:
from cgi import parse_qs
#List of keys that should be present in any bibjson object.
REQUIRED_KE... |
'''
Atomix project, orapp.py, (TODO: summary)
Copyright (c) 2015 Stanford University
Released under the Apache License v2.0. See the LICENSE file for details.
Author(s): <NAME>
'''
import abc
INFINITY = 999999
class OrApp:
__metaclass__ = abc.ABCMeta
def __init__(self):
self.states = []
self.blocksUsed ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Feb 2 16:06:09 2019
@author:
<NAME>
MIT Kavli Institute for Astrophysics and Space Research,
Massachusetts Institute of Technology,
77 Massachusetts Avenue,
Cambridge, MA 02109,
USA
Email: <EMAIL>
Web: www.mnguenther.com
"""
from __future__ import p... |
import numpy as np
from psychopy import visual,core,monitors,event,gui, data
import os
import sys
import time
import wx
# #################
# Store info about the experiment session
expName = u'WCST' # from the Builder filename that created this script
task = ''
expInfo = {u'session': u'01', u'Participant ID': u'9999... |
import operator
from math import cos, sin, atan2, radians, degrees, sqrt
import koko.lib.shapes2d as s2d
from koko.lib.text import text
class PCB(object):
def __init__(self, x0, y0, width, height):
self.x0 = x0
self.y0 = y0
self.width = width
self.height = height
self.comp... |
from __future__ import absolute_import, division, print_function, unicode_literals
from keras.utils import to_categorical
from consensus.cfa_ongraphs import CFA_process
# from consensus.cfa_ge_2stage import CFA_ge_process # for static, k regular networks only, see paper
import numpy as np
# import tensorflow as tf # tf... |
"""
Reference tag taxonomy
======================
References are built up by tokens which come in four groups "axis", "value",
"general expression", and "named_entity"; i.e.
Each group has several possible tag-values
1) axis: Specifies the type of referred snippet.
Implemented by class RefAxis
E.g.: Article... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file gets imported by stl_create_mesh.py
import sys, os
import numpy as np
def triangle_contains_point(triangle, point):
""" check if a point lies inside a triangle, 2D """
# barycentric coordinates
# x(xi1,xi2) = (1-xi1-xi2)*x^{1} + xi1*x^{2} + xi2*x^{3},... |
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Name: find.py
# Purpose:
#
# Author: wukan
#
# Created: 2019-03-14
# Copyright: (c) wukan 2019
# Licence: GPL-3.0
#----------------------------------------------------------------------------... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: Jared
"""
import random
from ase.visualize import view
from ase import Atoms
from collections import Counter
import pandas as pd
import csv
import math
import matplotlib.pyplot as plt
import itertools
from builder import perovskiteBuilderConfig as c
def mai... |
import torch
from torch import nn
from qm9.satorras.gcl import E_GCL, unsorted_segment_sum
class Swish(nn.Module):
def __init__(self):
super(Swish, self).__init__()
self.sigmoid = nn.Sigmoid()
def forward(self, x):
return x * self.sigmoid(x)
class BatchNorm1dMask(nn.Module):
def... |
"""
This file contains data models for queries, results and arguments to algorithm
functions.
"""
# todo:
# - Use constr(to_lower=True) in appropriate places to enforce lowercase:
# + node_blacklist
# + allowed_ns
# + stmt_filter (allowed statement types)
# - Use constr(min_length=N) to enforce that str f... |
from megastone.debug.hooks import Hook
from megastone.arch.arches.x86 import ARCH_X86_64
import pytest
from megastone import (Debugger, Emulator, ARCH_ARM, HOOK_STOP, HOOK_STOP_ONCE,
StopType, HookFunc, AccessType, InvalidInsnError, MemFaultError, Access, FaultCause,
ARCH_X86, CPUError, HookType)
CODE_ADDRES... |
# -*-coding:utf-8-*-
"""
工具模块
@author <NAME>
"""
import ctypes
import imghdr
import json
import os
import pickle
import re
import shutil
import threading
import time
import typing
import urllib.request
import webbrowser
from typing import List, Union
import pythoncom
import requests
import win32api
import win32com.c... |
#
# lupus-hue server - Automate Philips Hue lights from LUPUS XT2+ alarm system
#
# Copyright (c) 2017 stadtplandienst
#
# MIT License
#
# 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 Soft... |
"""
Methods for identifying space-time interaction in spatio-temporal event
data.
"""
__author__ = "<NAME> <<EMAIL>>", "<NAME> \
<<EMAIL>>", "<NAME> <<EMAIL>"
__all__ = ['SpaceTimeEvents', 'knox', 'mantel', 'jacquez', 'modified_knox']
import os
import libpysal as lps
import numpy as np
import scipy.stats as stats
fro... |
"""
File: connect4.py
Date: 2019.02.04
Authors : Nissa and Terence
Connect 4
The goal is to place 4 discs in a row
"""
from sense_hat import SenseHat
# from sense_emu import SenseHat
from time import sleep, time
from gamelib import *
sense = SenseHat()
# sense.set_rotation(180)
repeat = 1 # Repeats the program i... |
# -*- coding: utf-8 -*-
#Copyright © 2021 toinsson
#Copyright © 2018 Naturalpoint
# Licensed under the Apache-2.0 License, see LICENSE for details.
import struct
import logging
import threading
from distutils.version import LooseVersion
from .protocol import *
class ExposedData(object):
"""docstring for Exposed... |
from problog.program import PrologString, PrologFile, LogicProgram
from problog.logic import Term, Constant, Clause, AnnotatedDisjunction, Not
from problog.engine import ClauseDB, DefaultEngine
from problog.tasks.sample import sample
import random
import re
def create_observations(processed_model_filename, n=2):
... |
import sys, pygame, math,time,numpy,re
from hashlib import sha1
import xml.etree.ElementTree as ET
pygame.init()
pygame.font.init()
def cthread(func,args):
t = Process(target = func, args = args)
t.start()
def calculate_circle_points(x, y, r):
points = []
for i in range(-r, r + 1):
s = math.sq... |
#!/usr/bin/env python
'''
Author: <NAME> @ RIKEN
Copyright (c) 2020 RIKEN
All Rights Reserved
See file LICENSE for details.
'''
import os
import utils
import pybedtools
from pybedtools import BedTool
import log,traceback
# list up simple repeat in the ref genome
def load_ref_simple_rep_as_bed(filenames):
mes,a... |
import numpy as np
from nilearn import image
from nibabel.nifti1 import Nifti1Image, Nifti1Pair
from nibabel.affines import apply_affine
from PyQt5 import QtCore
from PyQt5.QtGui import QCloseEvent
from PyQt5.QtCore import QObject, pyqtSignal, QThread
from PyQt5.QtWidgets import QDialog, QPushButton
# Internal import... |
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 05 11:47:30 2015
@author: Laurent
"""
'''
ex, 1 graph with subgraphs: --points 1 --xlim 20 --cumul --title default values
1 graph per video: --points 739 --xlim 20 --concat --cumul --title calibrated values
1 graph in english --xlim 10 --cumul -... |
import time
import numpy as np
import cytnx as cy
from ncon import ncon
from numpy import linalg
from scipy.sparse.linalg import LinearOperator, eigsh, eigs, bicgstab
'''
1. Need Arnoldi
2. Need bicgstab or gmres (LW and RW are calculated in numpy)
3. Lanczos_ER much slower than scipy.eigsh, Lanczos_Gnd doesn't work.
... |
#############################################################
#collatrix_functions.py
#this script contains the functions used in all collatrix code
#created by <NAME> (<EMAIL>), October 2020
#updated by <NAME>, June 2021
##############################################################
#import modules
import pandas as p... |
#!/usr/bin/env python
'''
mcu: Modeling and Crystallographic Utilities
Copyright (C) 2019 <NAME>. 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/lice... |
#!/bin/bash
# Copyright (c) 2015, <NAME>. All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ... |
################################################################################
# Module: utils.py
# Reusable functions and methods used throughout the simulator
# <NAME> @ TU Delft
################################################################################
import json
import math
import os
import random
import ... |
import copy
import torch
import logging
import numpy as np
import six
from functools import wraps
from contextlib import contextmanager
from .backend_base import BackendBase, FunctionBase, DeviceDecorator
class TorchPlaceholder(object):
def __init__(self, dtype, shape, device, name=None):
self.dtype = dty... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2018 <NAME> <<EMAIL>>
#
# Distributed under terms of the MIT license.
"""
testManifoldFirstOrder.py
Implement mposa's paper with first order thing.
I temporarily give up analytic gradient now and only subclass probFun for quick implementa... |
"""
# Name: Rapid Benefit Indicator Assessment - Download NHDPlus Data
# Purpose: Download NHDPlus using sites
# Author: <NAME>
# <EMAIL>
#
# Version Notes:
# Developed in ArcGIS 10.3
#0.1.0 converted from .pyt
"""
###########IMPORTS###########
import os
import arcpy
import subprocess
from urllib import urlretrieve
fro... |
from bs4 import BeautifulSoup
import re
import time
import requests
import json
import traceback
from urllib import parse
class Personal(object):
def __init__(self, cookies):
self.login_url = 'http://ids.xcc.edu.cn/authserver/login?service=http%3A%2F%2Fopac.xcc.edu.cn%3A8080%2Freader%2Fhwthau.php'
... |
import sys
import time
import logging
import requests
from os import path
from enum import Enum
from shutil import rmtree
from itertools import chain as iter_chain
from app.plugins.views import TaskView
from app.plugins.worker import task
from app.plugins.data_store import GlobalDataStore
from app.plugins import logge... |
from glob import glob
from types import NoneType
from typing import List, Sequence
import tarfile
import bz2
import math
import gzip
import os
import unittest.mock
import betfairlightweight
# types
from betfair_data import bflw as bfd_bflw
import betfairlightweight.resources.bettingresources as bflw
import betfairlig... |
# -*- coding: utf-8 -*-
import packages.rmutil as rmutil
from packages.rmgui import *
import TextEditDialog as txtDlg
import ScrollableImageView as siv
from packages.lang.Localizer import *
import os, sys, platform, ast, time, threading, shutil, copy, json
import webbrowser
import wx
from wx.lib import imagebrowser
fr... |
#!/usr/bin/python
# pmanalysis.py
# Main driver for the phenotype microarray analysis
#
# Author: <NAME>
# Created on 22 Nov 2013
# Updated on 14 Nov 2017
from __future__ import absolute_import, division, print_function
import argparse
import PMUtil as util
import PMData
import GrowthCurve
import pylab as py
import wa... |
# from saliency.vanilla import *
# from saliency.guided import *
# from saliency.deconv import *
# from saliency.excitation_bp import *
# from saliency.test import *
# from saliency.perturbation import *
from saliency.perturbation_2 import *
# from saliency.lime import *
from .types import *
import torch
import torchvi... |
from __future__ import division, print_function
import time
from IPython.display import display
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn import metrics
from sklearn.externals import joblib
from sklearn.co... |
from __main__ import vtk, qt, ctk, slicer
#
# LabelStatistics
#
class BenderLabelStatistics:
def __init__(self, parent):
import string
parent.title = "Bender Label Statistics"
parent.categories = ["Quantification"]
parent.contributors = ["<NAME> (Isomics), <NAME> (Kitware)"]
parent.dependencies ... |
'''
A generic target capture task
'''
import numpy as np
import time
import os
import math
import traceback
from collections import OrderedDict
from riglib.experiment import traits, Sequence, FSMTable, StateTransitions
from riglib.stereo_opengl import ik
from riglib import plants
from .target_graphics import *
####... |
from __future__ import print_function
import argparse
import os
import random
import torch
import torch.nn.parallel
import torch.optim as optim
import torch.utils.data
from pointnet.dataset import PoseDataset
from pointnet.model import PointNetCls, feature_transform_regularizer
from pointnet.fusion_model import PoseNet... |
#!/usr/bin/env python
"""
This is the core module for manipulating the dataset metadata
"""
import os, sys, copy, fnmatch, re, shutil
import yaml, json, tempfile, mimetypes
import webbrowser, traceback, collections
import subprocess, string, random, pipes
from collections import OrderedDict
import shelve, getpass
from ... |
import copy
import random
import datetime
import math
import numpy as np
import tensorflow as tf
import pandas as pd
from .mutate import mutate_normal, mutate_rank_base
from .terminate import terminate
from .make_active_lst import make_active_lst
from .get_info_about_params import get_max_params, \
get_max_fitnes... |
# from numpy import array, pi, einsum
from pymtensor.symmetry import (deg2rad, rotx, rotz, roty, rotu,
SgSymOps)
from pymtensor.sym_tensor import SymbolicTensor, SparseSymbolicTensor
from pymtensor.rot_tensor import to_voigt
# We use the NumPy testing suite to make it easier to compare arrays
from numpy.testing impo... |
import datetime
import logging
import os
import pprint
import time
import torch
import torch.distributed as dist
import torch.utils.data
from configargparse import ArgumentParser
from tensorboardX import SummaryWriter
from torch import nn
from torch.utils.data import DataLoader
from torchvision import transforms
from ... |
import os
import sys
import numpy as np
import matplotlib
matplotlib.use('pdf')
# import matplotlib.pyplot as plt
import importlib
import argparse
import tensorflow as tf
import pickle
import socket
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(BASE_DIR)
sys.path.append(os.path.join(BASE_DIR, ... |
"""
repurpose_trans_rules_agrosuccess.py
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The objectives of this script are are:
1. Map land cover types represented in Millington 2009 to land cover types
represented in AgroSuccess.
2. Identify land cover types present in Millington 2009 and not in AgroSuccess,
and vice vers... |
# -*- coding: utf-8 -*-
"""@author: andresberejnoi
TODO: During training, if the network gets stuck in a local minima for several epochs,
then randomly modify certain weights in the matrix. This might allow the network to get out
of that minima and converge.
"""
import numpy as np
from . import _param_keys as keys #... |
"""Twitter class for f451 Communications module.
This module adds an abstraction layer to the Tweepy Twitter API package and the main
purpose is to provide a standard interface for some core methods for sending Twitter
status updates and DMs to specific recipients.
Note:
This module assumes that we have an active... |
from enum import Enum
import os
"""
This is a simple parser for a MIDI file that outputs a human readable text file of the instruction in the file
It is an adaptation of the parser created by Javidx9 (OneLoneCoder), hence the credit of the logic of this parser is completely for him
You can read the source c... |
# encoding: UTF-8
import os
import json
from datetime import datetime
from time import sleep
from copy import copy
from threading import Condition
from Queue import Queue
from threading import Thread
from time import sleep
from vnpy.api.okcoin import vnokcoin
from vnpy.trader.language.english.constant import *
from vn... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.