text stringlengths 8.04k 46.5k |
|---|
from ANN_simulation import *
import datetime, os, argparse
from simtk.openmm.app import *
from simtk.openmm import *
from simtk.unit import *
from sys import stdout
import ast
from config import *
############################ PARAMETERS BEGIN ###############################################################
parser = ar... |
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
from collections import defaultdic... |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2020 The HuggingFace Team All and <NAME> 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/licens... |
#!/usr/bin/env python
import sys
import os
import re
import argparse
import codecs
from functools import partial
import contextlib
from threading import RLock
from urllib import request
from tempfile import NamedTemporaryFile
from base64 import b64encode, b64decode
import pathspec
#also in README.rst
__version__ = "2... |
"""
saves 64x64 pixel cutouts of each source in a Data Release as HDF5 files
"""
import numpy as np
import os
from glob import glob
import h5py
import pandas as pd
from obiwan.qa.visual import readImage,sliceImage
from obiwan.common import dobash
# try:
from astrometry.util.fits import fits_table
from legacypipe.sur... |
""" Bungie.net API module """
import urllib.request
import urllib.parse
import urllib.error
import json
import configparser
import os.path
import sys
# enum DestinyClass { Titan = 0, Hunter = 1, Warlock = 2, Unknown = 3 }
CONFIG_FILE_NAME = '.bungie_net_api.rc'
# API_KEY = <secret API key>
# put a BungieNet API-KE... |
import os
os.environ["MKL_NUM_THREADS"] = "1"
os.environ["NUMEXPR_NUM_THREADS"] = "1"
os.environ["OMP_NUM_THREADS"] = "1"
from os import path, makedirs, listdir
import sys
import numpy as np
np.random.seed(1)
import random
random.seed(1)
import torch
from torch import nn
from torch.backends import cudnn
from torch... |
import os
import sys
import time
import glob
import json
import shlex
import shutil
import plistlib
import subprocess
import pickle
from urllib.parse import urlparse, unquote, quote
from tkinter import filedialog
from slugify import *
import tkinter as tk
#-----------------
FNULL = open(os.devnull, 'w')
# Functions... |
import pygame as pg
import numpy as np
from numba import njit
def main():
pg.init()
pg.mixer.init()
(step, step2, swoosh, hurt, deadmonster, hitmonster,
hitmonster2, healthup, died, won, music) = load_sounds()
stepdelay = pg.time.get_ticks()/200
stepdelay2 = stepdelay
screen = p... |
from __future__ import unicode_literals, division, print_function, absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import object, range, next
import logging
import pickle as pkl
import re
import unicodedata
from copy import deepcopy
import numpy as np
from scipy.spar... |
# Licensed under the Apache License Version 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
"""Celery tasks relating to Twitter."""
__author__ = '<NAME>'
from datetime import datetime
from celery import chain, group
from celery.task.control import revoke
from celery.utils.log import get_task_logger
from iterto... |
"""Command line interface for kipoi env
"""
from __future__ import absolute_import
from __future__ import print_function
from io import open
import argparse
import logging
import os
import subprocess
import time
from builtins import input
from sys import platform
import yaml
import kipoi
import kipoi_conda
from kipo... |
"""Parser for Promela, using Python Lex-Yacc (PLY).
References
==========
<NAME>., The SPIN Model Checker,
Addison-Wesley, 2004, pp. 365--368
http://spinroot.com/spin/Man/Quick.html
"""
from __future__ import absolute_import
from __future__ import division
import logging
import os
import subprocess
import wa... |
#! /usr/bin/env python
import os
import time
import pickle
import pandas as pd
import numpy as np
import tensorflow as tf
from keras.models import load_model
import cv2
import scipy.ndimage as ndimage
import seaborn as sns
import matplotlib.pyplot as plt
from skimage.draw import circle
from skimage.feature import pea... |
"""
Models and functions for tracking XBlog Objects:
- Post
- Author
- Blog
- Category
- Tag
"""
import logging
import os
import string
import bs4
import markdown2
import django.utils.timezone
import random
try:
from urllib.parse import urlparse, urljoin
except ImportError:
from urlparse import urlparse, url... |
# Copyright (c) 2010-2012 OpenStack Foundation
#
# 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 agree... |
#!/usr/bin/env python3
#
# Copyright (C) <NAME> 2020
# MIT License
import os
import base64
import tempfile
from flask import Flask, Blueprint
from flask import render_template
from flask import send_from_directory
from flask import send_file
from flask import request
from flask import flash
from flask import redirect... |
"""\
Implementation of Head-Gordon & Pople's scheme for electron repulsion
integrals (ref), which, in turn, derives from Saika and Obarra's scheme.
Routines:
hrr performs the horizontal recursion relationships
vrr performs the vertical recursion relationship
This program is part of the PyQuante quantum chemist... |
#!/usr/bin/python3
"""
the Chronicler -- Discord bot
=============================
A fun Discord bot meant for saving and repeating quotes--usually without
context.
The quoting function is first and foremost, with any additions of functionality
later on being a bonus.
"""
__title__ = 'the Chronicler bot'
__author__... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Dell EMC OpenManage Ansible Modules
# Version 3.0.0
# Copyright (C) 2020-2021 Dell Inc. or its subsidiaries. All Rights Reserved.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
from __future__ import (absolute_import, divi... |
"""Trains a tensorflow.keras model for car following behavior."""
import tensorflow as tf
import numpy as np
from havsim import helper
import math
from IPython import embed
def generate_lane_data(veh_data):
"""
Generates Labels for Lane-Changing Model for a given vehicle
Args:
veh_data: (helper.Veh... |
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
"""
BLIS - Balancing Load of Intermittent Solar:
A characteristic-based transient power plant model
Copyright (C) 2020. University of Virginia Licensing & Ventures Group (UVA LVG). All Rights Reserved.
Permission is hereby granted, free ... |
"""
Copyright (c) 2020 Cisco Systems Inc or its affiliates.
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 appl... |
#
# Copyright (c) 2016, <NAME>.
#
# Research and development sponsored by the nucl.ai Conference!
# http://events.nucl.ai/
# July 18-20, 2016 in Vienna/Austria.
#
import os
import sys
import bz2
import pickle
import argparse
import warnings
# Configure all options first so we can custom load other libraries (Th... |
"""This module houses the LockBuddy class for analog lockbox management."""
import asyncio
import enum
import logging
import typing
from typing import Any, Awaitable, Callable, List, Optional, Tuple, Union
import numpy as np
from .subsystems import Tuners as Ts
from .. import constants as cs
from ..constants import D... |
from typing import Dict
from code.front_end.our_ast import *
import itertools as itl
from collections import OrderedDict
class SemanticAnalysisError(Exception):
#Esception que voy a utilizar para detectar los errores semanticos, recive una lista de strings con los problemas y en su __str__ los imprime ... |
# -*- coding: utf-8 -*-
"""
author: <NAME> (github Boyne272)
Last updated on Tue Aug 27 18:37:15 2019
"""
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import convolve2d
from skimage import morphology
from ..tools import progress_bar
# ---------------------------------------------... |
import collections.abc
import functools
import os
import wx
class KeyExistError(KeyError):
def __init__(self, arg):
self.arg = arg
class BasicInfo(object):
def __init__(self, name, val):
self.name = name
self._val = val
def __str__(self):
return f'Ke... |
"""Matrix algebra for counting triplet motifs"""
import numpy as np
import pandas as pd
from itertools import permutations, combinations_with_replacement
from util import index_to_directed_triplet_motif_matrix, basis_vector, bin_subsets, binary_digits
def tupp(m):
return tuple(m.ravel())
def matt(m):
retur... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#################################################
# Snort Alert Log Reader #
# author: <NAME> #
# https://github.com/goooroooX #
# https://gooorooo.com #
#######################################... |
import act
import numpy as np
import xarray as xr
import datetime
from .DMTGlobals import DMTGlobals
def calc_diams_masses(input_ds, debug=True, factor=1.0,
Globals=None):
"""
Calculates the scattering and incadescence diameters/BC masses for each particle.
Parameters
----------... |
# coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import collections
i... |
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
import typing
import json
import azlmbr.scene as sceneApi
from enum import IntEnum
# Wraps the AZ.SceneAPI... |
"""
Definition of the SqliteCaseReader.
"""
from __future__ import print_function, absolute_import
import re
import sys
import sqlite3
import numpy as np
from collections import OrderedDict
from openmdao.recorders.base_case_reader import BaseCaseReader
from openmdao.recorders.case import DriverCase, SystemCase, Solve... |
"""
Ketra Controller module for interacting with a Ketra N4 module for LED Lighting
Basic operations for enumerating and controlling the loads are supported.
Author: <NAME>
Based on pyvantage which was written by Greg but was based on
pylutron written by <NAME>
To use with home assistant and its virtual python envir... |
import tkinter
from tkinter import ttk
from PIL import ImageTk, Image, ImageFilter
from tkinter import messagebox
from tkinter import tix
import random
import threading
import time
from Data import teachers
class Login:
def __init__(self):
path = 'Source/unnamed.jpg'
image_old = Imag... |
# Copyright 2011 <NAME>
#
# 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,... |
from __future__ import print_function
import argparse
import os
import sys
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import torch.optim as optim
import torchvision
import torchvision.transforms as transforms
from sklearn.linear_model impo... |
# -*- coding: utf-8 -*-
"""
powerbi_push_datasets - Power BI Push Datasets Mgmt
----
The main class **PushDatasetsMgmt** encapsulates the Power BI REST operations on `Push Datasets <https://docs.microsoft.com/en-us/rest/api/power-bi/pushdatasets>`_
(which allows programmatic access for pushing data into PowerBI) into... |
#!/usr/bin/env python3
"""
Web-based event display for ArgonCube detectors
"""
import shutil
import atexit
from os.path import basename
from pathlib import Path
import fire
import h5py
import numpy as np
import dash_bootstrap_components as dbc
import dash_uploader as du
import dash_daq as daq
from dash import no_... |
import unittest
import os
import scipy
import numpy
import gensim
import cPickle as pkl
import ujson as json
from datetime import datetime, timedelta
from nose.tools import assert_equal, assert_true, assert_almost_equal
from scipy.spatial.distance import euclidean, cosine, jaccard
from scipy.sparse import issparse
f... |
## NOTE: web-app to receive commands from phone
## Author: <NAME> (<EMAIL>)
## Date: 03/22/2019
## TEST
## [go home]: curl -H "Content-Type: application/json" --data '{"command":"home_phone", "device":"ZY323LH272"}' http://localhost:8080/command
## [wake]: curl -H "Content-Type: application/json" --data '{"command":"w... |
from __future__ import print_function
from __future__ import division
import sys, os
import numpy as np
"""
Illuminance Module:
- Module containing algorithmic approaches that quantify based on amount of "light hitting the surface of a target object".
"""
currentMillis = lambda: int(round(time.time() * 1000)... |
import re
import string
def p2to3isunicode(s, t):
""" Helper for python 2/3 to detect unicode string """
try:
return isinstance(s, unicode) or isinstance(t, unicode) # p2
except NameError:
return isinstance(s, str) or isinstance(t, str) # p3
def p2to3itervalues(g):
""" Helper for itervalues ... |
"""
Smart Virtual Thermostat FOR trv python plugin for Domoticz
Author: Erwanweb,
adapted from the SVT By Logread V0.4.4 and Anthor, see:
https://github.com/999LV/SmartVirtualThermostat
http://www.antor.fr/apps/smart-virtual-thermostat-eng-2/?lang=en
https://github.com/AntorF... |
import abc
import numpy as np
import os
import tempfile
import collections
import xml.etree.ElementTree as ET
from xml.dom import minidom
from collections import namedtuple
from typing import Dict, Optional, Sequence, Tuple, Union
from robel.dkitty.base_env import BaseDKittyEnv
from robel.dkitty.base_env import DEFAUL... |
"""
Entry point for producing WOfS products.
Specifically intended for running in the PBS job queue system at the NCI.
The three entry points are:
1. datacube-wofs submit
2. datacube-wofs generate
3. datacube-wofs run
"""
import copy
import logging
import os
import pickle
import signal
import sys
from collections imp... |
from .util import robust_min, robust_max
from .path_utils import ensure_dir
from .timers import Timer, Timer
from .loading_utils import get_device
from os.path import join
from math import ceil, floor
from torch.nn import ReflectionPad2d
import numpy as np
import torch
import cv2
from collections import deque
import at... |
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""Unittests for monorail.feature.alert2issue."""
from __future__ import print_function
from __... |
""" ROM disassembly/dumping tools. """
import sys
import os.path
import pkg_resources
from math import inf as INF
from bisect import bisect_left, bisect_right
from io import BytesIO
from collections import defaultdict
from tqdm import tqdm
from luvdis import __version__
from luvdis.common import DEBUG, eprint, warn, ... |
# Adapted from sphinxcontrib.napoleon
# See https://github.com/sphinx-contrib/napoleon
import inspect
import re
from typing import Any, Dict, List, Tuple, Type, Union, Callable
from functools import partial
from six import string_types, u
from six.moves import range
from sphinx.locale import _
from pockets import m... |
"""
run_model.py
Purpose: Predict gene expression given graph structure and node features
Usage: python ./run_model.py [-c <str>] [-e <int>] [-lr <float>] [-cn <int]
[-gs <int>] [-ln <int>] [-ls <int>]
Arguments:
'-c', '--cell_line', default='E116', type=str)
'-e', '--max_epoch', default=1000,typ... |
import os
import pickle
import numpy as np
import torch
import torch.nn.functional as F
from collections import Counter
from collections import OrderedDict
import copy
from sys import argv
import json
import pandas as pd
import argparse
from tqdm.auto import tqdm
from IPython.core.debugger import Pdb
split_files = { ... |
""" --- Stonehenge Game ---
=== CSC148 Winter 2018 ===
University of Toronto
Assignment 2
Submitted by: <NAME>
=== Module Description ===
This module contains the Stonehenge game and Stonehenge game state.
"""
from typing import Any, List, Union, Dict, Tuple
from copy import deepcopy
from game import Game
from game_s... |
"""
Test dbcollection utils.
"""
import os
import pytest
from dbcollection.core.exceptions import (
GoogleDriveFileIdDoesNotExist,
InvalidURLDownloadSource,
MD5HashNotEqual,
URLDoesNotExist
)
from dbcollection.utils.url import (
check_if_url_files_exist,
download_extract_urls,
extract_arc... |
"""The implicit quantile networks (IQN) agent.
The agent follows the description given in "Implicit Quantile Networks for
Distributional RL" (Dabney et. al, 2018).
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy
import functools
import time... |
########## The following part is copied from Transformers' trainer (3.4.0) ##########
# coding=utf-8
# Copyright 2020-present the HuggingFace Inc. team.
#
# 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... |
#!/usr/bin/env python3
import argparse
import datetime
import glob
import hashlib
import itertools
import json
import logging
import multiprocessing.pool
import os
import re
import shutil
import socket
import sys
import tempfile
import urllib.request
import git
import toml
VERSION = '1.0.0'
class Config(object):
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of REANA.
# Copyright (C) 2021 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""reana_bench script - benchmark script for REANA cluster"""
import co... |
import sys, os, random, scipy
import numpy as np
import pandas as pd
from numba.typed import List
import statsmodels.api as sm
from statsmodels.stats.multitest import multipletests
from tqdm import tqdm
from sklearn.cluster import AgglomerativeClustering
from anndata import AnnData
from .base import lr, calc_neighbou... |
"""Registration networks
These are mostly re-implementations of VoxelMorph and its derivatives.
VoxelMorph : pair-wise registration network
AtlasMorph : (unconditional) atlas building
References
----------
.. [1] "An Unsupervised Learning Model for Deformable Medical Image Registration"
<NAME>, <NAME>, <NAME>, <... |
"""
Gait detection, processing, and analysis from wearable inertial sensor data
<NAME>
Copyright (c) 2021. Pfizer Inc. All rights reserved.
"""
from sys import gettrace
from collections.abc import Iterable
from warnings import warn
from pathlib import Path
from datetime import date as dt_date
import h5py
from numpy i... |
import logging
import time
import re
import requests
import unicodedata
import shutil
import json
from datetime import datetime
from os import path
from pathlib import Path
from PIL import Image
from requests.exceptions import ConnectionError
from xml.etree.ElementTree import SubElement, Element, Comment,... |
r"""Este arquivo contém as classes que implementam os comportamentos
fundamentais dos principais componentes elétricos de uma unidade
consumidora/produtora de energia, tais como:
- Load;
- Generation;
- Storage;
- Prosumer.
"""
from random import uniform
import datetime as dt
import json
import enlopy as el
import num... |
import copy
import torch.nn as nn
from mmcv.cnn import (build_conv_layer, build_norm_layer, constant_init,
normal_init)
from torch.nn.modules.batchnorm import _BatchNorm
from mmpose.utils import get_root_logger
from ..registry import BACKBONES
from .resnet import BasicBlock, Bottleneck, get_expa... |
####################################
# articy:draft to Ren'Py Converter
####################################
#
# Copyright (c) 2020 TheSchnappi
#
# For the current version of this converter please look at:
# GitHub: https://github.com/TheSchnappi/articy2renpy
# LemmaSoft Forum: https://lemmasoft.renai.us/forums/viewtop... |
import torch
import random
from torch import nn
from torch.autograd import Variable
from torch.nn import ModuleList, Embedding
from torch.optim.lr_scheduler import CyclicLR
import pytorch_lightning as pl
from tqdm import tqdm
import torch.nn.functional as F
import numpy as np
import os
def cuda_variable(tensor, vo... |
#!/usr/bin/env python3
"""Classes and functions to insert cache file data into the database."""
# Standard libraries
import os
import time
import shutil
from collections import defaultdict
from multiprocessing import Pool
import re
import pymysql
# PIP libraries
from sqlalchemy import and_
# Infoset libraries
from i... |
# Volatility
# Copyright (C) 2007-2013 Volatility Foundation
# Copyright (c) 2010, 2011, 2012 <NAME> <<EMAIL>>
#
# This file is part of Volatility.
#
# Volatility 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... |
# Copyright 2021 NVIDIA 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 wr... |
from __future__ import absolute_import, division, print_function, unicode_literals
from collections import defaultdict, OrderedDict
import numpy as np
import chronic
from ase import Atoms
from ase.data import covalent_radii
from ase.io import write
import matid.geometry
from matid.data import constants
import netw... |
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 21 17:15:22 2020
@author: james.z.hare
"""
import sys, os
sys.path.append(os.path.realpath('..'))
import socket
from _thread import *
import dill as pickle
import src
from src.StateTypes.TeamState import TeamStateClass
from src.Games.TeamCaptureFlagGame import TeamCaptu... |
# torch
import torch
import torch.nn.init as init
import torch.nn as nn
from torchvision.transforms import ToTensor
import torch
import torch.nn as nn
import torch.nn.functional as F
import math
# from .util import *
# from ..siren.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d
# debug
from util import *
impor... |
"""Dahua device specification for Dahua package"""
__all__ = [
'_BaseDevice',
'Device',
'EventsListener'
]
import asyncio
import logging
import threading
import urllib.request
from base64 import b64encode
from socket import timeout as socket_timeout_exception
from typing import Optional, List,... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
enjoy the mess ;) #13
the transition of the legacy code into class-based looks... ummm...
"not very pretty"... but it works so it's good enough for now.
"""
import datetime as dt
import glob
import json
import logging
import os
import random
import string
import sys
fr... |
import numpy as np
from scipy.special import erf
from scipy.interpolate import interp1d
from scipy.integrate import quad,cumtrapz,trapz,solve_ivp
from scipy.optimize import fmin,brentq,fixed_point
import scipy.linalg as linalg
import time
# helper function for the peak number density (BBKS 1986)
def f(x):
... |
from NER.utils import *
from NER.model import *
import re
import os
class Handler():
def __init__(self ):
self.cti = None
self.wti = None
self.tti_iob = None
self.tti_ner = None
self.tti = None
self.itt = None
self.itt_iob = None
self.i... |
# -*- coding: utf-8 -*-
"""
Created on Mon July 24 16:35:13 2017
@author: <NAME>
"""
from PyQt5.QtCore import QObject, pyqtSlot, pyqtSignal
class Worker_spectro(QObject):
# # pyqtSignals
spectro_values_display_signal = pyqtSignal(int, str, str)
spectro_msg_handler_sign... |
import torch
import torch.nn as nn
import torchvision.models as models
import torchvision
import torch.nn.functional as F
# ATTENTION
class EncoderCNN(nn.Module):
def __init__(self, embed_size):
super(EncoderCNN, self).__init__()
#resnet = models.resnet50(pretrained=True)
resnet = models.re... |
# standard library imports
import datetime
import os
import pickle
import select
import socket
import time
from copy import deepcopy
from threading import Lock, Thread
# third-party imports
import numpy as np
import torch
from requests import get
# local imports
import tmrl.config.config_constants as cfg
from tmrl.sa... |
#Hello world
print("Hello world Machine Learning")
print("hello world owen in |AI")
# printing shapes
print(" / |")
print(" / | ")
print(" / | ")
print(" / |")
print("/________|")
# Variables and print
char_name = "Owen"
char_age = "24"
print("my name is " + char_name + " and ... |
# %% [markdown]
# # Trying out the Surpr!se Library
# %%
from IPython.display import display, HTML
display(HTML(data="""
<style>
div#notebook-container { width: 95%; }
div#menubar-container { width: 65%; }
div#maintoolbar-container { width: 99%; }
</style>
"""))
# %%
# !{sys.executable} -m pip ins... |
import os
import twitter
from twitter import TwitterError
import random
import time
import json
import pickle
import hashlib
from datetime import datetime, timedelta
from copy import deepcopy
import traceback
random.seed(datetime.now())
BOT_FOLDER = os.path.dirname(__file__)
BOT_CONFIGS = os.path.join(BOT_FOLDER, 'c... |
import Tkinter as tk
from copy import copy, deepcopy
from common.parameters import PARAM
from common.styles import (BODY_COLOR, BODY_FONT, CELL_TYPE_HEADER_COLOR,
CELL_TYPE_HEADER_FONT, CELL_TYPE_LABELS,
HEADER_COLOR, HEADER_FONT)
BODY_LEFT_MARGIN = 30
LABEL_WIDTH... |
#!/usr/bin/env python3
""" Prestic is a profile manager and task scheduler for restic """
import logging
import os
import shlex
import sys
import time
from argparse import ArgumentParser
from configparser import ConfigParser
from copy import deepcopy
from datetime import datetime, timedelta
from getpass import getpass... |
from collections import OrderedDict
from django.utils.translation import ugettext_lazy as _
from ecs.core.models import (
Submission, SubmissionForm, ParticipatingCenterNonSubject,
ForeignParticipatingCenter, Measure, NonTestedUsedDrug, Investigator,
InvestigatorEmployee,
)
from ecs.notifications.models i... |
"""Test cases for pyquil conversion."""
from copy import deepcopy
import pyquil
import pyquil.gates
from pyquil import quilatom
import sympy
from pyquil.simulation.matrices import QUANTUM_GATES
from .. import Circuit
from ..gates import ControlledGate, CustomGate
from .pyquil_conversions import (
convert_to_pyquil,... |
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2019, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
#
# The full license is in the file COPYING.txt, distributed with this s... |
#!/usr/bin/env python
import logging
import sys
import threading
import time
import urlparse
import uuid
import datetime
import requests
import tornado.ioloop
import tornado.web
import tornado.httpserver
from tornado import httputil
__version_info__ = (1, 0)
__version__ = '.'.join(map(str, __version_info__))
# Th... |
# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
''' This module contains:
* all low-level code for extracting, linking and unlinking package... |
"""
This is the core of FeinCMS
All models defined here are abstract, which means no tables are created in
the feincms\_ namespace.
"""
from __future__ import absolute_import, unicode_literals
try:
from collections import OrderedDict
except ImportError:
from django.utils.datastructures import SortedDict as O... |
#!/usr/bin/env python3
"""syscfg is a lightweight system configurator with a declarative API."""
from __future__ import annotations
import logging
import multiprocessing
import os
import platform
import re
import selectors
import shutil
import subprocess
import sys
from abc import ABC
from argparse import ArgumentPars... |
# pyOCD debugger
# Copyright (c) 2021 <NAME>
# Copyright (c) 2021 <NAME>
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Author: <NAME>
Email: <EMAIL>
Updated: <NAME>
Email: <EMAIL>
"""
import logging
import os
from math import log
import cv2
import numpy as np
import numpy.linalg as la
from scipy.spatial import distance as spd
import pywt
import Tyf
import tifffile as tiff
import rawpy
... |
import io
import six
import packaging
import packaging.version
import packaging.specifiers
import packaging.requirements
import serial_port
import serial
import platform
import re
from time import localtime, sleep
from kivy.app import App
from kivy.logger import Logger
from kivy.lang import Builder
from kivy.uix.wid... |
# Authors: <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
#
# License: BSD (3-clause)
import numpy as np
from scipy import linalg
from .. import EvokedArray, Evoked
from ..cov import Covariance, _regularized_covariance
from ..decoding import TransformerMixin, BaseEstimator
from ..epochs impo... |
# Copyright 2011 OpenStack Foundation
# Copyright 2012-2013 Hewlett-Packard Development Company, L.P.
# 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
#
# ... |
from omegaconf import DictConfig, OmegaConf
import hydra
from hydra.core.hydra_config import HydraConfig
import numpy as np
import os
import os.path as osp
import pandas as pd
import geopandas as gpd
import pickle
from yaml import Loader, load
import itertools as it
import networkx as nx
import scipy.stats as stats
... |
from __future__ import unicode_literals
import os
import sys
import datetime
import logging
import subprocess
import eeUtil
import requests
import time
import urllib
import urllib.request
import json
# url for NOAA wave height data
SOURCE_URL = 'ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/wave/prod/multi_1.{date}/'
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.