text stringlengths 8.04k 46.5k |
|---|
#
# This file is part of the GROMACS molecular simulation package.
#
# Copyright (c) 2019, by the GROMACS development team, led by
# <NAME>, <NAME>, <NAME>, and <NAME>,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
#
# GROMACS is free softw... |
#############################################################################
# Concentration and flow profile of suspension flow in CF UF #
# Using a general concentration-dependent diffusivity and viscosity #
# One must give the experssion for D and eta on top of the Pi #
# ... |
# -*- coding: utf-8 -*-
import itertools
import math
import six
def __get_target_length(size):
"""
Figures out the increased size of the string per
IBM Globalization Design Guideline A3: UI Expansion.
https://www-01.ibm.com/software/globalization/guidelines/a3.html
:param size: Current size of... |
# coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
from typing import List, Union, Tuple
from multiprocessing import Pool
import numpy as np
from scipy import ndimage
from skimage import color
from skimage.feature import canny
from skimage.transform import hough_circle, hough_circle_peaks
from skimage.draw import circle_perimeter
from sklearn.cluster import KMeans
... |
# -*- encoding: utf-8 -*-
r"""
pyparser -- module for parsing Python files.
This module provides capabilities for parsing Python files into logical pieces. It relies on standard
module :mod:`tokenize` to break the file into tokens, and then combines those tokens into high-level
code constructs. Unlike :mod:`ast`, this... |
#!/usr/bin/python3
#
import argparse
import math
import pprint
import subprocess
import fnmatch
import re
__doc__ = """Window Organizer for any "EHWN" window manager"""
__PAD__ = ' '
def print_obj(obj, inline=False, depth=8):
if depth == 0 or isinstance(obj, str):
return _print_str_obj(obj, inline)
depth -= ... |
import itertools as itl
import NodosAST as ast
import visitor
from cool_utils import *
from cool_errors import *
ERROR = 0
INTEGER = 1
class TypeCollectorVisitor:
def __init__(self,scope):
self.context = scope
@visitor.on('node')
def visit(self, node):
pass
@visitor.when(ast.Progra... |
"""Code for extracting geometry data from ETABS text files (*.E2K & *.$ET).
Functions exist for pushing the data out to a GSA text file.
TODO:
- openings in floor diaphragms
- revise default parsing so that two keys at the beginning become nested keys
of nested dictionaries. Also, single key and value become a di... |
##############################################################################
#
# Copyright (c) 2009 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... |
# -*- coding:utf-8 -*-
#######################################################################
# Copyright (C) 2016 <NAME> (<EMAIL>) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
######################################... |
# coding=utf-8
# Copyright 2020 The Meta-Dataset Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
import aiohttp
import bs4
import feedparser
import html
import re
import tomd
import discord
from discord.ext import commands
from typing import List, Tuple, Union
BASE_API_URL = "https://lua-api.factorio.com/latest/"
headerEx = re.compile(r"((^<br/>$)|(This (article|page)))")
referEx = re.compile(r".*? may refer t... |
import numpy as np
import os
import cv2
import copy
import json
import dill
import psutil
import sys
class Layer_Dense:
def __init__(self, n_inputs, n_neurons, weight_regulator=0., bias_regulator=0.):
# Initialise weights and biases
self.weights = 0.0001 * np.random.randn(n_inputs, ... |
from pathlib import Path
import datetime
import os
import yaml
from typing import (Any, List, Dict, Tuple)
import glob
from typing import Optional
from gtmcore.labbook import LabBook
from gtmcore.environment.repository import BaseRepository # type: ignore
from gtmcore.logging import LMLogger
from gtmcore.activity ... |
# -*- coding: utf-8 -*-
# Built-in
import os
import inspect
import itertools as itt
import warnings
import time
import copy
# common
import numpy as np
# library specific
import models
_PATH_HERE = os.path.dirname(__file__)
_PATH_MODELS = os.path.join(os.path.dirname(_PATH_HERE), 'models')
# ##################... |
from tkinter import Tk
from tkinter import Button
from tkinter import Menu
from tkinter import Text
from tkinter import messagebox
from tkinter import filedialog
from tkinter import Entry
from tkinter import Label
from tkinter import StringVar
from ttkthemes import themed_tk as tk
from tkinter import ttk
import numpy a... |
# Copyright 2019 École Polytech<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/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
import math
import time
import threading
import json
from app import app
from app.database.database import *
from app.components.mqtt import MQTT_PUBLISH, CHECK_ZIGBEE2MQTT_SETTING
from app.components.email import SEND_EMAIL
""" ################### """
""" led basic functions """
""" ################### """
# This ... |
"""This module is made to parse osc metadata file version 2"""
from typing import Optional, Dict, List, Tuple, Type
from common.models import SensorItem, PhotoMetadata, ExifParameters, Attitude, Acceleration
from common.models import Compass, CameraParameters, DeviceMotion, OBD, GPS, Pressure, Gravity
from common.mode... |
import sys
from PIL import Image
import numpy as np
import math
import random
import SDFGenerator
'''Lines are based on the assumption that they are horizontal or vertical and
therefore are identified by a range over x or y and a single value for the coordinate
axis thus:
Vertical Lines = [ x, [y_min, ... |
import os
__file__ = os.path.realpath(__file__)
os.chdir(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
import sys
sys.path.insert(0, os.getcwd())
from core.tokenizer import tokenize
import gzip
# Prepare all files
def prepare():
global vocab, written_lines
# Files to be prepared
files = {... |
"""
tools related to processing SUNTANS output for DWAQ input.
requires instrument version of SUNTANS code for the flux
integration
"""
import glob
import numpy as np
import os
from ... import utils
from ..suntans import sunreader
from ...io import qnc
from . import waq_scenario
from ..suntans import forcing
from ...s... |
# Copyright (c) 2020-present, <NAME>
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree
#
import time
import torch
import torch.nn as nn
import torch.nn.functional as F
import math
import random
from autoattack.other_utils im... |
import discord
from discord import Option, OptionChoice
from discord.ext import commands, pages
import random
from Utilities import Checks, Vars, PlayerObject, ItemObject
from Utilities.Analytics import stringify_gains
from Utilities.Finances import Transaction
from Utilities.AyeshaBot import Ayesha
cla... |
# coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
# Version 3.1; <NAME>; Polar Geospatial Center, University of Minnesota; 2018
from __future__ import division
import inspect
import os
import re
import sys
import warnings
from glob import glob
from warnings import warn
if sys.version_info[0] < 3:
from StringIO import StringIO
else:
from io import StringIO
... |
import json
import os
import pickle
import VORDInstance
root_path = "/home/david/PycharmProjects/VVRD_Dataset10k/10kDataSet"
data_type_paths = ['json_list_result_train_data.pkl',
'json_list_result_val_data.pkl']
def get_data_list():
all_file_dict = {}
for path, dir_list, _ in os.walk(os.p... |
import torch
import torch.distributions
import torch.nn as nn
from torch.nn import init
import functools
from torch.optim import lr_scheduler
import numpy as np
from . import layers
from scipy.ndimage.filters import gaussian_filter
import time
###########################################################################... |
from collections import Counter, Callable, Hashable
import itertools
import warnings
import numbers
import numpy as np
from sppa.constants import *
import sys
import re
from copy import copy
from scipy.optimize import newton
class SPPAWarning(Warning):
pass
class SPPAIllegalArgumentError(ValueEr... |
from item import Item
import sqlite3
from kivy.app import App, runTouchApp
from kivy.uix.button import Button
from kivy.uix.widget import Widget
from kivy.uix.textinput import TextInput
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.gridlayout import GridLayout
from ... |
# -*- coding: UTF-8 -*-
# This file is part of the orbot package (https://github.com/officinerobotiche/orbot or http://www.officinerobotiche.it).
# Copyright (C) 2020, <NAME> <<EMAIL>>
# All rights reserved
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided tha... |
"""
ECCO v4 Python: read_bin_llc
This module includes utility routines for loading binary files in the
llc 13-tile native flat binary layout. This layout is the default for
MITgcm input and output for global setups using lat-lon-cap (llc) layout.
The llc layout is used for ECCO v4.
.. _ecco_v4_py Documentation :... |
# Copyright Cloudinary
import zlib, hashlib, re, struct, uuid, base64, time, random, string, json, copy
from fractions import Fraction
import cloudinary
from cloudinary.compat import (PY3, to_bytes, to_bytearray, to_string, string_types, unquote, urlencode)
""" @deprecated: use cloudinary.SHARED_CDN """
SHARED_CDN = c... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Module containing a class which allows access to disparate Python neural
network implementations and architectures, united through a common interface.
This interface is modelled on the scikit-learn interface.
'''
import warnings
import math
import timeit
from sklearn... |
# -*- coding: utf-8 -*-
"""
A set of routines for analysing an isolated run
<NAME>
University of Zurich
"""
import warnings
import numpy as np
import pynbody
import scipy as sp
from pynbody.analysis.angmom import faceon
from pynbody.analysis.profile import Profile, VerticalProfile
from . import diskfitting, paral... |
import torch
import src.utils.visualise as vis_tools
import logging
import numpy as np
import cv2
import scipy.ndimage as ndimage
from scipy.spatial.distance import cdist
from scipy.optimize import linear_sum_assignment
#from mean_average_precision import MeanAveragePrecision
def render_polygon(mask, polygon, shape, va... |
#! /bin/python3
import os
import re
import sys
import HTSeq
import argparse
import textwrap
import itertools
import pandas as pd
from tqdm import tqdm
from pandas import Series, DataFrame
from collections import defaultdict
# Regular expression patterns for parsing SAM alignment read names (mainly use NOT_COLLAPSED)
... |
import asyncio
import errno
import fractions
import logging
import threading
import time
import sys
from typing import Dict, Optional, Set
import numpy as np
import concurrent.futures
import os
import datetime
import av
from av import AudioFrame, VideoFrame
from av.frame import Frame
from ..mediastreams import AUDIO_... |
from itertools import groupby
from itertools import islice
from itertools import product
from operator import itemgetter
from multiprocessing import Pool
import numpy as np
from probability2 import Key
from probability2 import DiscreteRV
from probability2 import MultiDiscreteRV
from probability2 import Distribution
fr... |
from dataclasses import dataclass
from raytkUtil import RaytkContext, simplifyNames
import re
from typing import Callable, Dict, List, Tuple, Union, Optional
# noinspection PyUnreachableCode
if False:
# noinspection PyUnresolvedReferences
from _stubs import *
class _ConfigPar(ParCollection):
Parammode: 'Union[st... |
########
# Copyright (c) 2014 GigaSpaces Technologies Ltd. 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... |
import pandas as pd
import numpy as np
import random
import sys
import pickle
import sys
import math
import gc
import os
import warnings
sys.path.append("..")
warnings.filterwarnings("ignore")
from .strategy import Strategy
import time
import copy
from tqdm import tqdm
from sklearn.preprocessing import MinMaxScaler
f... |
from __future__ import absolute_import, print_function
from unittest import TestCase
import pytest
from conda import text_type
from conda.base.context import context
from conda.cli.common import arg2spec, spec_from_line
from conda.common.path import expand
from conda.common.url import path_to_url
from conda.exceptio... |
#!/home/twixtrom/miniconda3/envs/analogue/bin/python
##############################################################################################
# run_wrf.py - Code for calculating the best member over a date range
#
#
# by <NAME>
# Texas Tech University
# 22 January 2019
#
##########################################... |
# --------------------------------------------------------
# Pytorch multi-GPU Faster R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by <NAME>, <NAME>, based on code from Ross Girshick
# --------------------------------------------------------
from __future__ import absolute_import
from __fu... |
#!/usr/bin/env python
"""
Main process for updating audio files metadata from parsed configuration files.
All options defining specific metadata fields (``--artist``, ``--year``, etc.) override any
corresponding information fields found in configurations files from options ``--info`` or ``--all``.
Applied changes list... |
# -*- coding: utf-8 -*-
from .context import datasets
import unittest
import csv
import lzma
import json
import tempfile
from os.path import join, isfile, abspath, dirname
from datetime import date
from pkg_resources import resource_string, resource_stream, resource_listdir
class SucupiraTests(unittest.TestCase):
... |
import PythonQt
from PythonQt import QtCore, QtGui
import director.objectmodel as om
import director.visualization as vis
from director import affordanceitems
from director import callbacks
from director import cameracontrol
from director import splinewidget
from director import transformUtils
from director.debugpolyda... |
import ctypes
from ctypes import c_long, byref, cast
import time
from . import api
from . import utils
# from .base.constant import *
from .base.type import *
from .protocol import Protocol
# from .sequence import Sequence
from .stimulus.base import Stimulus
def allocate(device_number=ALP_DEFAULT, verbo... |
# Copyright 2016 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
#
# Unless required by applica... |
import pandas as pd
pd.set_option('display.width', 200)
import asyncio, asyncpg
import concurrent.futures
import logging
import json
import etl.io_config.server_protocol as protocol
from etl.io_config.database import Database
from etl.alerts.predictor_manager import PredictorManager
import datetime as dt
from dateutil ... |
"""
Look inside HDF5 files from the terminal, especially those created by deepdish.
"""
from flammkuchen.hdf5io import (DEEPDISH_IO_VERSION_STR, DEEPDISH_IO_PREFIX,
DEEPDISH_IO_UNPACK, DEEPDISH_IO_ROOT_IS_SNS,
IO_VERSION, _sns, is_pandas_dataframe)
import tables
import numpy as... |
import sys
import time
import math
from typing import List, Dict
from contextlib import contextmanager
from pathlib import Path
import warnings
import tarfile
import gshhg
import timm
import albumentations as albu
import cv2
import rasterio
from rasterio.enums import Resampling
import rasterio.warp
import pandas as pd... |
import streamlit as st
import logging
import json
import os
from streamlit_ace import st_ace
from typing import Union
from math import floor, trunc
from tei_entity_enricher.interface.postprocessing.entity_library import EntityLibrary
from tei_entity_enricher.interface.postprocessing.io import FileReader, FileWriter, C... |
import cv2, time, numpy as np
# test pictures
pic1 = 'test_images/i_robot_1.jpg' # robot body image
pic2 = 'test_images/i_robot_2.jpg' # robot full body image
pic3 = 'test_images/i_robot_3.jpg' # robot face image
pic4 = 'test_images/human_face.jpg' # human face
pic5 = 'test_images/human_upper_body.jpg' # human up... |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# Description: generate inputs and targets for the DLRM benchmark
#
# Utility function(s) to download and pre-process public data sets
# - ... |
# -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
# Copyright (c) 2015, Battelle Memorial Institute
# 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. Redistri... |
import re
import gi
import dace
gi.require_version('Gtk', '3.0')
from gi.repository import Gdk, Gtk, GtkSource
import astunparse
import xdot.ui.elements
def _get_edge_label(edge: xdot.ui.elements.Edge) -> str:
""" Helper function to get the label of an xdot Edge from its shape. """
labels = [
s.t for... |
#!/usr/bin/env python
# coding: utf-8
# ## ERCOT Web Scrape
import sys
import os
from bs4 import BeautifulSoup
import requests
import zipfile, io
from datetime import datetime
import re
from threading import Thread
import timeit
import time
# Holy Grail of ERCOT Web Scrape, main function, call function with or with... |
from ..utils.core import _check_df_load, _check_geom, get_files_recursively
from ..utils.geo import bbox_corners_to_coco, polygon_to_coco, split_multi_geometries
from ..utils.log import _get_logging_level
from ..vector.polygon import geojson_to_px_gdf, remove_multipolygons
import numpy as np
import rasterio
from tqdm.a... |
"""Backend for the Flurstückssuche (cadaster parlcels search) form."""
import os
import re
import gws.base.printer.job
import gws.base.printer.types
import gws.base.db.postgres.provider
import gws
import gws.types as t
import gws.base.api
import gws.base.template
import gws.base.model
import gws.base.storage
import ... |
import PyDAQmx
import ctypes
from enum import IntEnum
import numpy as np
from pymodaq.daq_utils.daq_utils import set_logger, get_module_name
logger = set_logger(get_module_name(__file__))
class DAQ_NIDAQ_source(IntEnum):
"""
Enum class of NIDAQ_source
=============== ==========
**Attribut... |
# coding: utf-8
'''
This script generates ODB schema code for direct inclusion into the ASKAP Sky Model Service code.
It also generates the Ice DTO objects from the same definitions.
Requirements:
* Python 3
* Pandas >= 0.18 (older versions do not work)
* xlrd (used by Pandas for reading Excel files)
'''
... |
import copy as _copy
import reprlib
import dask
import numpy as _np
import xarray as _xr
# metric variables defined at vector points, defined as global within this file
metrics = ["dxC", "dyC", "dxG", "dyG", "hFacW", "hFacS", "rAs", "rAw", "maskS", "maskW"]
_datype = _xr.core.dataarray.DataArray
_dstype = _xr.core.... |
import base64
import json
import random
import re
import sys
import time
import urllib
from typing import List
from bs4 import BeautifulSoup
import requests
import requests_cache
from mediawiki import mediawiki
import mwparserfromhell as mwph
from requests.adapters import HTTPAdapter
from ceimport import chunks, logg... |
# Copyright 2015 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 a... |
# --------------------------------------------------------
# Written by <NAME> (https://github.com/JudyYe)
# --------------------------------------------------------
import numpy as np
import math
from collections import OrderedDict
import torch
import torch.nn as nn
import torch.nn.functional as F
import absl.flags ... |
import scipy
import scipy.stats as ss
import numpy as np
import pandas as pd
import random
import math
import sys
import sklearn.decomposition as decomp
import sklearn.linear_model as linear_model
import sklearn.datasets as sk_data
from sklearn.preprocessing import StandardScaler
import numpy.linalg as nla
import sklea... |
#!/usr/bin/env python3
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import glob, re, argparse, sys, os
import sklearn.metrics
import scipy.stats
import seaborn as sns
import seaborn.utils, seaborn.palettes
from seaborn.palettes import blend_palette
from inspect import sign... |
import unittest
import itertools
import logging
import os
import pprint
import asyncio
import unittest.mock
import sys
import datetime
from unittest.mock import MagicMock
import degiroasync
import degiroasync.webapi
import degiroasync.api
import degiroasync.core
import degiroasync.core.helpers
from degiroasync.core i... |
import doctest
import math
import os
import random
import sklearn
import pandas as pd
import numpy as np
from datetime import timedelta
from sklearn.utils.estimator_checks import check_transformer_general, check_transformers_unfitted
from unittest2 import TestSuite, TextTestRunner, TestCase # or `from unittest import .... |
#!/usr/bin/env python
# Copyright (c) 2013 VMware, 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
#
... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import inspect
from torch.nn.parameter import Parameter
import torch
import torch.nn as nn
from src.utils import glorot, zeros, uniform, reset
from torch_geometric.utils import remove_self_loops, add_self_loops... |
import math
from typing import Optional, Iterable, Tuple, Union, List
import torch
import torch.nn as nn
import einops as eo
from torch.utils.hooks import RemovableHandle
from neural_interpreters.core.kernels import Kernel, DotProductKernel
from neural_interpreters.core.modfc import ModSequential, get_modfc_cls
fro... |
"""
iterative
~~~~~~~~~~~~~~~
Test functions in iterative.py
"""
# test_count, test_count_with_stride and pickletest
# adapted from https://github.com/python/cpython/blob/master/Lib/test/test_itertools.py
# Licensed under the Python Software Foundation License Version 2.
# Copyright © 2001-2021 Python Software F... |
import time
import machine
import struct
import uctypes
from micropython import const
import rp2_dma
ST77XX_NOP = const(0x00)
ST77XX_SWRESET = const(0x01)
ST77XX_RDDID = const(0x04)
ST77XX_RDDST = const(0x09)
ST77XX_SLPIN = const(0x10)
ST77XX_SLPOUT = const(0x11)
ST77XX_PTLON = const(0x12)
ST77XX_NORON = const(0x13)... |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 TH<NAME>, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in complianc... |
import bpy
import mathutils
import math
import bmesh
import re
from . tools import *
# TODO: run through each command and make a checklist of what to fix
#
# Constraint Operations
#
class Toggle_Constraints(bpy.types.Operator):
bl_idname = "armature.toggle_constraints"
bl_label = "toggle constraints"
b... |
#!python3
"""
Simple HTTP server for monitoring Duet Status and sending change notifications emails via gmail.
Copyright (C) 2021 <NAME> all rights reserved.
Released under The MIT License. Full text available via https://opensource.org/licenses/MIT
Developed on WSL with Debian Buster. Tested on Raspberry pi, Windows... |
#! /usr/bin/env python
# ToDo:
# 1) move all the header material to a utility in .templates.common
# 2) add plots of residuals of I and Q
# 3) add vertical lines to indiv. kid plots for tune value
# 4) add switch to convert between radial plot and histogram of phi values
from dasha.web.templates import ComponentTempl... |
# coding: utf8
import sys
import time
import socket
import tkinter
import threading
from math import inf
from tkinter import *
from tkinter import messagebox
from Modules import ChiffrementRSA, Kripiti, Fonctions
def ArrêtServeur():
ConnexionSocket.close()
# Fermeture de la connexion
sys.exit()
def Tro... |
import logging
import json
import datetime
import typing
import uuid
from flask import g
from driftbase.models.db import Match
from driftbase import flexmatch
from driftbase.lobbies import InvalidRequestException, NotFoundException, UnauthorizedException, ConflictException, _post_lobby_event_to_members, _get_lobby_memb... |
#!/usr/bin/env python
import rospy
import numpy as np
import tf
import tf.msg
from tf.transformations import quaternion_from_euler, euler_from_quaternion
from geometry_msgs.msg import PoseStamped, Quaternion, AccelStamped, TwistStamped, TransformStamped, PointStamped, Point
from visualization_msgs.msg import Marker
imp... |
# Copyright 2021, <NAME>.
#
# Developed as a thesis project at the TORSEC research group of the Polytechnic of Turin (Italy) under the supervision
# of professor <NAME> and engineer <NAME> and with the support of engineer <NAME>.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this f... |
#!/usr/bin/python
"""
HBC by FinlayDaG33k under the MIT License
"""
import wx
import wx.grid
import wx.lib.agw.aui as aui
import Pyro4
import os
import threading
from encoder_cfg import pyro_host, pyro_port, ftp_host, ftp_port, ftp_user, ftp_pass
from ftplib import FTP
import textwrap
statusMapping = {
'Encodi... |
"""
生成domain文件
"""
import os
import re
from plan2dance.Plan2Dance.common.chars import (
SpecialDomainHeadStr,
SpecialFuncAndPreStr,
SpecialActionStr,
ActionTransition,
DummyAction
)
from plan2dance.Plan2Dance.config import IOConfig
from plan2dance.Plan2Dance.prepare import PopActionsDefine
from ... |
"""Actually define models
Style Guidelines:
- You SHOULD not use auto_now_add=True on DateTimeFields because it makes
Django’s admin panel not show the field by default and absolutely not be
able to edit the field.
"""
import re
import markdown2
from django.contrib.postgres import fields as psql
from django... |
import time
import random
import csv
import pandas as pd
import numpy as np
import gym
from stable_baselines3 import PPO
from stable_baselines3.ppo import MlpPolicy
from stable_baselines3.common.callbacks import EvalCallback
from gym import spaces, ObservationWrapper, RewardWrapper, ActionWrapper
import matplotlib.pypl... |
# -*- coding: utf-8 -*-
"""
@author: <NAME> (<EMAIL>), 2019
"""
import abc
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
# pylint: disable=C0103 # snake_case
# pylint: disable=R0914 # too many local variable
# pylint: disable=R0913 # too many arguments
# pylint: disable=W05... |
#!/usr/bin/python3
# 使用Python内置GUI模块tkinter
# 深拷贝时需要用到copy模块
import copy
import tkinter.messagebox
from tkinter import *
# 围棋应用对象定义
class Application(Tk):
# 初始化棋盘,默认九路棋盘
def __init__(self, my_mode_num=9):
Tk.__init__(self)
# 模式,九路棋:9,十三路棋:13,十九路棋:19
self.mode_num = my_mode_num
... |
from math import radians, degrees, sin, cos, tan, asin, acos, atan2
import numpy as np
import matplotlib.pyplot as plt
#Define Latitude in radians
lat=radians(49.3978620896919)
#Define hoirzontal limit in altitude in degree
horizon_limit=12
def equ_to_altaz(ha,dec):
""" Transforms equatorial coordinates (houra... |
import os, sys, pdb, time, gzip, pickle, math
from collections import OrderedDict as odict
from copy import copy
import torch, osqp
import cvxpy as cp, numpy as np, matplotlib.pyplot as plt, line_profiler as lp
import scipy.sparse as sp, scipy.sparse.linalg as spla
from matplotlib.patches import Rectangle
from tqdm im... |
import datetime
import io
from decimal import Decimal
import xlsxwriter
from django.db.models import Count, F, Sum, Min, Max
from django.http import HttpResponse
from django.utils import timezone
from django.views import View
from django.views.generic import TemplateView
from project_core.models import Call, Project,... |
###############################################################################
#
# Fabric2 management script, to be invoked by fab command
#
###############################################################################
import glob
import math
import os
import signal
import sys
from os.path import *
from fabric imp... |
"""This module contains the public api of the EasyAgents reinforcement learning library.
It consist mainly of the class hierarchy of the available agents (algorithms), registrations and
the management of the available backends. In their implementation the agents forward their calls
to the chosen backend.
"... |
import hashlib
import io
import json
import os
from datetime import datetime
import random
import string
import pandas as pd
from github import Github, GithubObject, UnknownObjectException
from uuid import UUID
from lxml import etree
from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException
from l... |
import numpy as np
import os
from PIL import Image
from Detection.CTPN_vertical.utils import cal_rpn,readxml,generate_anchors,bbox_trasfor_inv,nms
import Detection.CTPN_vertical.CP as cp
from Detection.CTPN_vertical.model_keras import proposal_model
from Detection.CTPN_vertical.utils import drawRect,TextProposalConnect... |
#!/usr/bin/env python
# coding: utf-8
# # Welcome to Kijang Emas analysis!
#
# 
#
# I was found around last week (18th March 2019), our Bank Negara opened public APIs for certain data, it was really cool and I want to help people get around with the... |
import os
import re
from datetime import datetime
import numpy as np
from cdflib.epochs import CDFepoch as cdfepoch
from .cdf_factory import CDF
def _dtype_to_cdf_type(var):
epoch_regex_1 = re.compile('epoch$')
epoch_regex_2 = re.compile('epoch_[0-9]+$')
if epoch_regex_1.match(var.name.lower()) or epoc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.