content stringlengths 5 1.05M |
|---|
import requests
import json
from io import BytesIO
from lxml import etree
from django.conf import settings
from bs4 import BeautifulSoup
api_key = settings.WORLDCAT_API
def search_worldcat(query:str):
url = f"http://www.worldcat.org/webservices/catalog/search/worldcat/opensearch?q={query}&wskey={api_key}"
res... |
#!/usr/bin/env python
# coding=utf-8
"""WTF OTP Fields."""
from .secret_key import OTPSecretKeyField
__all__ = ("OTPSecretKeyField", )
|
'''A module for computing the A_lambda given teh Ia_A_poly.pickle
file'''
import pickle
from numpy import power
f = open('Ia_A_poly.pickle')
d = pickle.load(f)
f.close()
def A_lamb(f, EBV, Rv, redlaw='ccm'):
global d
order = d[redlaw]['order'][f]
coefs = d[redlaw][f]
Al = EBV*0
id = 0
for j in ... |
from kgx import LogicTermTransformer, ObanRdfTransformer, RdfOwlTransformer
from rdflib import Namespace
from rdflib.namespace import RDF
import rdflib
import gzip
# TODO: make this a proper test with assertions
def save(g, outfile):
w = LogicTermTransformer(g)
w.save('target/' + outfile + '.sxpr')
w... |
import argparse
import mxnet as mx
import logging
# import os, sys
# import numpy as np
from fa_dataset import get_dataIter_from_rec
from fa_config import fa_config as fc
from fa_eighth_mobile_net import get_symbol
from fa_eval_metric import ClassAccMetric
def get_fine_tune_model(sym, arg_params, num_classes, layer_n... |
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
#About Data
"""
Acknowledgements
Ahmed H, Traore I, Saad S. “Detecting opinion spams and fake news using text classification”, Journal of Security and Privacy, Volume 1, Issue 1, Wiley, January/February 2018.
A... |
from rest_framework import serializers
from api.model.ingredient import Ingredient
from api.model.ateIngredient import AteIngredient
from api.serializer.ingredient import IngredientSerializer
from django.contrib.auth.models import User
class AteIngredientSerializer(serializers.ModelSerializer):
user = serialize... |
class Interval(object):
def __init__(self, bits, low=None, high=None):
assert bits > 0
self.bits = bits
self.max = (2 << (bits - 1)) - 1
self.low = low if low is not None else 0
self.high = high if high is not None else self.max
self.low = self.low & self.max
... |
#!/usr/bin/env python3
# ver 0.1 - coding python by Hyuntae Jung on 9/08/2016
# - (Ref.) Appendix D. Statistical Errors
# in the book Understanding Molecular Simulation
# by Daan Frenkel
# - (Ref.) Chapter2 in annual Reports in Computational Chemistry,
# Vol 5, 2009, doi: 10.1016/S157... |
from .client import Team
|
'''
PROBLEM STATEMENT:
~~~~~~~~~~~~~~~~~~
Design a program to take a word as an input, and then encode it into a Pig Latin.
'''
'''
DESIGN:
~~~~~~
if the first letter is a vowel:
append 'way' to the end of the word and return that
otherwise:
iterate over all chars that are not vowels, keep track on index
s... |
#!/usr/bin/env python3
# See: https://github.com/VirusTrack/COVIDvu/blob/master/LICENSE
# vim: set fileencoding=utf-8:
from covidvu.config import MASTER_DATABASE
from covidvu.config import SITE_DATA
from covidvu.cryostation import Cryostation
import json
import os
# --- constants ---
DEFAULT_OUTPUT_JSON_FILE_NAM... |
from cement.core.controller import CementBaseController, expose
from cement.core import handler, hook
from ee.core.services import EEService
from ee.core.logging import Log
from ee.core.variables import EEVariables
from ee.core.aptget import EEAptGet
class EEStackStatusController(CementBaseController):
class Meta... |
from .Scene import Scene
|
from .encoders import create_encoder_factory, EncoderFactory
from .preprocessing.scalers import create_scaler, Scaler
from .augmentation import create_augmentation, AugmentationPipeline
from .augmentation.base import Augmentation
from .gpu import Device
def check_encoder(value):
""" Checks value and returns Encod... |
###
# Python xz compress/uncompress test.
#
# License - MIT.
###
import os
import lzma
# xz_uncompress - Uncompress xz file.
def xz_uncompress(islines):
# {
with lzma.open(xzip_name, 'rb') as fd_xz:
with open('xz_' + file_name, 'wb') as fd:
if (True == islines):
fd.writelines... |
#!/usr/bin/env python
import os
from dotenv import load_dotenv
from flask import Flask, request, abort
from func import menu, user
from linebot.models import (
MessageEvent, TextMessage, TextSendMessage,
)
from linebot.exceptions import (
InvalidSignatureError
)
from linebot import (
LineBotApi, WebhookHa... |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# __author__ = Lyon
from base.db.mysql import MySQLModel
from peewee import IntegerField, CharField
class FundOptionalRecord(MySQLModel):
"""基金自选记录"""
class Meta:
table_name = 'fund_optional_record'
user_id = IntegerField(verbose_name='用户id', index=... |
res = "1" + "8" * 80
while "18" in res or "288" in res or "3888" in res:
if "18" in res:
res = res.replace("18", "2", 1)
elif "288" in res:
res = res.replace("288", "3", 1)
else:
res = res.replace("3888", "1", 1)
print(res)
|
import cv2
import os
import numpy as np
def convert_format(dir_folder, destination_foler):
imgs_folder_dir = dir_folder
list_images = sorted(os.listdir(imgs_folder_dir))
for image in list_images:
print(dir_folder, image)
img = cv2.imread(''.join([dir_folder, image]))
img = cv2.res... |
import torch
import torch.nn as nn
import torch.nn.functional as F
class Network(nn.Module):
"""Actor (Policy) Model."""
def __init__(self, state_size, action_size, seed):
"""Initialize parameters and build model.
Params
======
state_size (int): Dimension of each state
... |
from django.shortcuts import render,HttpResponse,redirect
from .forms import RegisterForm,LoginForm,UserProfileUpdateForm,UserPasswordChangeForm
from django.contrib.auth import authenticate, login ,logout,update_session_auth_hash
from django.contrib import messages
def user_register(request):
form = RegisterForm(... |
"""empty message
Revision ID: 742c6fcc49cc
Revises:
Create Date: 2020-07-22 04:41:25.722811
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '742c6fcc49cc'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... |
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.image import NonUniformImage
import matplotlib
from matplotlib import cm
from brainbox.core import Bunch
axis_dict = {'x': 0, 'y': 1, 'z': 2}
class DefaultPlot(object):
def __init__(self, plot_type, data):
"""
Bas... |
import time
import logging
import yaml
# dynamic, float
global relative_time_origin
def read_config(filename):
with open(filename, 'r', encoding='utf-8') as f:
result = yaml.load(f.read(), Loader=yaml.FullLoader)
return result
def with_relative_time(func, *args, **kwargs):
global relative_time_... |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... |
from django.contrib import admin
from django.urls import path, include
# para visualização do arquivo no navegador
# necessario por estas linhas para visualizar juntamente
# com a concatenação da linha '+ static()'
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path(''... |
from __future__ import annotations
from typing import Tuple, final
import functools
import numpy as np
import pyccl
from .statistic import Statistic
from ....parameters import ParamsMap, RequiredParameters
# only supported types are here, any thing else will throw
# a value error
SACC_DATA_TYPE_TO_CCL_KIND = {"super... |
import unittest
import os
import sys
sys.path.insert(0, os.path.abspath("."))
from ease4lmp import __version__
print(__version__)
from io import StringIO
io = StringIO()
sys.stdout = io
from test_bonded_atoms import suite as suite_bonded_atoms
from test_lammps_reader import suite as suite_lammps_reader
from test_la... |
import logging
import os
import random
import sys
from time import sleep
import pymysql
import redis
from sqlalchemy import BIGINT, Column, String, UniqueConstraint, create_engine
from sqlalchemy.orm import sessionmaker
from telstar import config as tlconfig
from telstar.com import Message
from telstar.com.sqla impor... |
# -*- coding: utf-8 -*-
from __future__ import division
__copyright__ = "Copyright (C) 2014 Andreas Kloeckner"
__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 Software without restricti... |
from openpack.basepack import Part
class SamplePart(Part):
content_type = "text/pmxtest+xml"
rel_type = "http://polimetrix.com/relationships/test"
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 28 16:27:43 2021
Contains functions to make plots of ScS, SKS and SKKS waveforms prior to inversion
and after corrections for the predicted splitting have been made.
i.e if obs(x,t) = ani*u(x,t) we are plotting obs and u (assuming our model of ani ... |
import numpy as np
import pandas as pd
import argparse
import glob
import os
import time
import re
from multiprocessing import Pool
'''
****************************************************************
GLOBAL VARIABLES
****************************************************************
'''
MAX_ENTITY_LENGTH = 20
MAX_ENTI... |
import h2o
import os, sys
sys.path.insert(1, os.path.join("..", ".."))
from h2o.tree import H2OTree
from h2o.estimators import H2OXGBoostEstimator
from tests import pyunit_utils
# PUBDDEV-7267
def test_terminal_xgboost_nodes():
df = h2o.import_file(pyunit_utils.locate("smalldata/demos/bank-additional-full.csv"))... |
import torch
import torch.nn as nn
from typing import Callable, Union, Tuple
class Conv2dPolicy(nn.Module):
"""
A standard linear policy
"""
def __init__(self,
channel_sizes: Tuple[int, ...],
kernel_sizes: Tuple[Union[int, Tuple[int, int]], ...],
strides: Tuple[Union[int, Tuple... |
__package__ = "blackhat.bin"
from ..helpers import Result
from ..lib.input import ArgParser
from ..lib.output import output
from ..lib.unistd import get_sessions, get_user
import datetime
__COMMAND__ = "who"
__DESCRIPTION__ = "show who is logged on"
__DESCRIPTION_LONG__ = "Print information about users who are curren... |
from .chamfer_metric import *
from .compactness_metric import *
from .CustomLoss import *
from .edge_metric import *
from .GlobalLoss import *
from .hausdorff_metric import *
from .HausdorffLoss import *
from .KLDivergenceLoss import *
from .L2_metric import *
from .L21_metr... |
""" Use YQL to set industries to share companies through fondout CLI """
""" This is a very slow script. new ways found. do not use."""
import stockretriever
from subprocess import call
import sys
sectors = stockretriever.get_industry_ids()
for sector in sectors:
for industry in sector['industry']:
try:... |
"""
Author: https://github.com/CharlieZhao95
"""
|
#! /usr/bin/python
import ply.lex as lex
tokens = (
'COMMENT',
'BINARY',
'ATOM',
'STRING',
'INTEGER',
'FLOAT',
'MAP_ASSIGN',
)
literals = '[]{},.#'
t_ignore = ' \t'
def t_COMMENT(t):
r'%.*'
def t_BINARY(t):
r'<<\s*\"[^\"]*\"\s*>>'
start = t.value.find('"')
end = t.value.r... |
import os
import collections
import queue
from dataclasses import dataclass
from typing import Dict, List, Optional, Tuple, Union, cast
import numpy as np
from loguru import logger
from typing_extensions import Literal
import carla
from .. import physics, process
from ..utils.carla_image import carla_image_to_np
fro... |
# Generated by Django 4.0 on 2021-12-29 20:53
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('accounts', '0011_alter_address_options_alter_customuser_options_and_more'),
]
operations = [
migrations.Creat... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
from bs4 import BeautifulSoup
import argparse
def format_label(label):
return label.lower().replace(' ', '_')
def format_value(value):
return int(value.replace(',', ''))
def parse_hotel(soup):
chart = soup.find('div', id='ratingFilter')
... |
"""
pee.py
====================================
Parameter error estimator functionality.
"""
import numpy as np
from scipy.optimize import minimize
from numdifftools import Jacobian
def parameter_error_estimator(
fun,
x_data,
y_data,
x_err,
y_err,
w_0,
iter_num=None,
rtol=None,
at... |
__author__ = 'yetone'
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.abspath(__file__)))) # noqa
import pytest
import unittest
from script_manager import Manager
from script_manager.compat import PY2
def run(command_line, manager_run):
sys.argv = command_line.split()
exit_c... |
"""A decorator to add a method to an existing class."""
def monkeypatch(cls: type, name: str=None):
"""Decorator. Applied to a function, sets it as a method in a class.
This can be used above a property, too. Example::
@monkeypatch(MyClass)
def some_method(self):
pass
"""
... |
#usage: python rgbhist.py ./pics/auto_seg/ ./hists/ True
import sys
from skimage import io
import matplotlib.pyplot as plt
import os
import argparse
def hist(in_path, out_path, batch=False):
if batch is False:
image = io.imread(path)
fig = plt.figure(figsize = [10, 5])
plt.subplot(1, 2, 1)
... |
import time
while True:
print("I am working!")
time.sleep(2)
|
#import dash
import dash_core_components as dcc
import dash_html_components as html
#from dash.dependencies import Input, Output, State
#import dash_table
import pandas as pd
import plotly.graph_objects as go
import plotly.express as px
from plotly.colors import n_colors
#import warnings
#import sys
#import re
import n... |
__all__ = ('AsyncLifoQueue', 'AsyncQueue',)
from collections import deque
from ...utils import copy_docs, copy_func, ignore_frame, to_coroutine
from ..exceptions import CancelledError
from .future import Future
ignore_frame(__spec__.origin, 'result_no_wait', 'raise exception',)
ignore_frame(__spec__.origin, '__ae... |
# -*- coding: utf-8 -*-
######################################################
# PROJECT : Sentence Similarity Calculator
# AUTHOR : Tarento Technologies
# DATE : May 05, 2020
######################################################
from pyspark.sql import SparkSession
from pyspark.ml import Pipeline, Model, Pipel... |
# Copied to Cyclopath from
# https://priithon.googlecode.com/hg/Priithon/usefulGeo.py
"""
a bunch of 2d geometry functions
points are always defined as y,x tuples or numpy arrays
segments are sequences of pairs-of-nodes
boxes are a sequence of two diagonal edge-points
"""
from __future__ import absolute_import
def ... |
from business_logic import exceptions
from six import with_metaclass
class _LogicErrorsMetaclass(type):
"""
Metaclass automatically creating errors registry and setting error code to attribute name.
You should subclass this and set all possible business logic exceptions.
"""
def __init__(cls, name... |
from LogansRun import *
game = LogansRun();
game.run();
|
from deepl.hacks import calculate_valid_timestamp, generate_id
def test_calculate_valid_timestamp():
assert 10 == calculate_valid_timestamp(timestamp=10, i_count=0)
assert 11 == calculate_valid_timestamp(timestamp=10, i_count=1)
assert 12 == calculate_valid_timestamp(timestamp=10, i_count=2)
assert 12... |
#Faça um programa que leia um número inteiro e diga se ele é ou não um número primo.
n = int(input('Digite um número: '))
div = 0
for c in range(1, n + 1):
if n % c == 0:
print('\033[33m', end=' ')
div += 1
else:
print('\033[m', end=' ')
print('{}'.format(c), end=' ')
print('\nO núm... |
COLORS = {
"NORMAL": "#FFFFFF", # white
"WALL": "#000000", # black
"START": "#FF00FF", # magenta
"GOAL": "#00FF00", # green
"OPEN": "#FF0000", # red
"CLOSE": "#0000FF", # blue
"BT": "#FFFF00" # yellow
}
class Panel:
def __init__(self, canvas, w_x, h_z, pixel, type="NORMAL"):
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ===============================================================
# Copyright (C) 2018 HuangYk.
# Licensed under The MIT Lincese.
#
# Filename : temporal_anchor.py
# Author : HuangYK
# Last Modified: 2019-03-25 20:26
# Description :
# ===========================... |
from . import build_features
from . import Preprocessor
from . import CorpusLoader
from . import PickledCorpusReader
|
import time
import keyboard
def hey_siri(query) -> None:
"""
Simulate key presses to interact with Siri
"""
keyboard.press('command+space')
time.sleep(0.3)
keyboard.release('command+space')
time.sleep(0.2)
keyboard.write(query)
keyboard.send('enter')
print(query)
|
import os
from typing import Tuple
from tensorflow.python.keras.optimizers import SGD
from tqdm import tqdm
from dlex.configs import Configs, Params, ModuleConfigs
from dlex.datasets.torch import Dataset
from dlex.tf.models import BaseModel
from dlex.utils.logging import logger
from dlex.utils.model_utils i... |
"""
@author: Gabriele Girelli
@contact: [email protected]
"""
|
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... |
from dataclasses import dataclass, field
from typing import List
from collections import defaultdict
import numpy as np
from logzero import logger
from interval import interval
from sklearn.neighbors import KernelDensity
from BITS.plot.plotly import make_line, make_rect, make_hist, make_scatter, make_layout, show_plot
... |
# -*- coding: utf-8 -*-
import math
def func():
"""
定义函数
:return:
"""
print 'x'
def nop():
"""
空函数
:return:
"""
pass
# 函数返回多个值
def move(x, y, step, angle=0):
nx = x + step * math.cos(angle)
ny = y - step * math.sin(angle)
return nx, ny
x, y = move(100, 100, ... |
from tests.integration.test_base import QuickbooksTestCase
from datetime import datetime
from intuitquickbooks.objects.detailline import SalesItemLineDetail, \
DiscountLineDetail, SalesItemLine, DiscountLine
from intuitquickbooks.objects.tax import TxnTaxDetail
from intuitquickbooks.objects.customer import Custome... |
# This code is from a pytype bug report
# https://github.com/google/pytype/issues/450
# (I've moved one global binding to the end to make
# it more difficult)
# - pytype has problems with the "i":
# ERROR:pytype.analyze:No visible options for i
# line 12, in test: Name 'x' is not defined [name-error]
# line 12, in ... |
from .GumbraiseInstagram. import * |
#faça um programa que leia o nome completo de uma pessoa,
#mostrando em seguida o primeiro e o último nome separadamente
#Ex.: Ana Maria de Souza
#primeiro=Ana
#último=Souza
nome = str(input('Digite o seu nome: ')).strip()
nomeI = (nome.split())
print('Seu primeiro nome é {}'.format(nomeI[0]))
#print("Seu ultimo nome é... |
# server.py
# Import the Flask class. An instance of this class will be our WSGI application.
from flask import Flask, render_template
# Next we create an instance of this class. The first argument is the name of the application’s module or package.
# If you are using a single module (as in this example), you should ... |
from __future__ import print_function
from docopt import docopt
import random
from collections import defaultdict
if __name__ == "__main__":
args = docopt("""
Usage:
most_frequent_words.py <n> <file_name>
""")
n = int(args["<n>"])
file_name = args["<file_name>"]
words = defaultd... |
from . import cli
from .params import db_options
@cli.command(hidden=True)
@db_options
def repl(engine_uri):
# dynamic includes
import IPython
from traitlets.config import Config
# First create a config object from the traitlets library
c = Config()
c.InteractiveShellApp.extensions = ["autor... |
from functools import partial
import numpy as np
from sklearn.linear_model import LinearRegression, LogisticRegression
from sklearn.metrics import (
accuracy_score,
log_loss,
make_scorer,
mean_squared_error,
)
from sklearn.model_selection import cross_val_score, train_test_split
from sklearn.preprocess... |
import subprocess
def get_diff(path):
if not path.startswith("/"):
path = "/" + path
result = subprocess.run(
["git", "-C", path, "diff", "--staged"], capture_output=True, encoding="utf8"
)
return result.stdout
|
#!/usr/bin/python
# Copyright (c) 2020, 2022 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... |
# 약수의 개수와 덧셈
def DivisorCount(n):
i, cnt = 1,0
divisor = []
while i * i <= n:
if n % i == 0:
divisor.append(i)
if i * i != n:
divisor.append(n//i)
cnt += 1
cnt += 1
i += 1
return n if cnt % 2 == 0 else -n
def solution(le... |
# Copyright 2019 Southwest Research Institute
#
# 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 the following
# dis... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from nlpcda.tools.Basetool import Basetool
from nlpcda.config import similarword_path
class Similarword(Basetool):
'''
近义词,用于大致不改变原文下,【词级别的】,增强数据
'''
def __init__(self, base_file=similarword_path, create_num=5, change_rate=0.05, seed=1):
super(Simila... |
import discord
from ..Bots import Global
from ..Lib import Querier
from discord.ext.tasks import loop
from discord.ext.commands import Cog
class Monitoring(Cog):
def __init__(self, bot: discord.ext.commands.Bot):
self.bot = bot
self.querier = Querier()
@loop(minutes=Global._time)
async d... |
from .const import *
screen_start = f"""
WELCOME TO THE WASTELAND
(1) - START
(2) - LOAD
(3) - HELP
(4) - CHANGE LOG
(5) - QUITE
ENTER A NUMBER TO CONTINUE
"""
screen_class = """
CHOOSE YOUR CLASS
(1) - MAGE
(2) - WARRIOR
(3) - ARCHER
(4) - ASSASSIN
ENTER A NUMBER TO CONTINUE
"""
screen_mage = """
MAGE - MA... |
# -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Jun 17 2015)
## http://www.wxformbuilder.org/
##
## PLEASE DO "NOT" EDIT THIS FILE!
###########################################################################
impo... |
import torch
import matplotlib.pyplot as plt
from examples.test_cases import test_case_factory
from thermodynamicestimators.estimators.tram import TRAM
from thermodynamicestimators.data_sets.infinite_dataloader import InfiniteDataLoader
"""
main.py
Uses MBAR to estimate free energies of the 1D double well.
"""
def ... |
# -*- encoding: utf-8 -*-
from django.shortcuts import render, get_object_or_404
from django.conf import settings
from django.contrib.auth.decorators import login_required
from models import ItemAgenda
from forms import FormItemAgenda
@login_required
def lista(request):
# Recebe records da tabela ItemAgenda
li... |
from django.contrib.auth.models import AbstractUser
class User(AbstractUser):
class Meta:
verbose_name = "User"
verbose_name_plural = "Users"
|
import math
import struct
# Python 2 compat
try:
int_types = (int, long,)
byte_iter = bytearray
except NameError:
int_types = (int,)
byte_iter = lambda x: x
try:
from itertools import zip_longest
except ImportError:
from itertools import izip_longest as zip_longest
from fitparse.utils import ... |
#!/usr/bin/env python3
from tabnanny import check
from to_load import *
from to_visualize import *
import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras import layers
from jagerml.helper import check_other_gpu
check_other_gpu()
data_dir, (img_height, img_width) = get_data_dir(f... |
#!/usr/bin/env python
"""
create_counts_lookup.py
"""
print('3)-->files')
import sys,os
import argparse
import pymysql as MySQLdb
import json
import configparser as ConfigParser
"""
SELECT sum(seq_count), dataset_id, domain_id,domain
FROM sequence_pdr_info
JOIN sequence_uniq_info USING(sequence_id)
JOIN silva_t... |
import bpy
from bpy.props import *
from ...nodes.BASE.node_tree import RenderStackNode
def update_node(self, context):
self.update_parms()
class RSNodeEeveeRenderSettingsNode(RenderStackNode):
"""A simple input node"""
bl_idname = 'RSNodeEeveeRenderSettingsNode'
bl_label = 'Eevee Settings'
samp... |
from multiprocessing import Pool, cpu_count
import os
import random
import numpy as np
from easydict import EasyDict
from dataset.make_all import generate
from utils.geometry import random_spherical_point, get_prospective_location
from utils.io import mkdir, write_serialized, catch_abort
from utils.constants import C... |
from .resource import ResourceAPI
from .connection import REQUEST
class EnvironmentAPI(ResourceAPI):
def __init__(self, connection):
super().__init__(connection, resource_type="environments")
def list(self, params={}, ignore_error=False):
return self.connection._call(
self.LIST,
... |
import ast
import argparse
from pathlib import Path
from .__version__ import __version__
from .core import compile, exec
def main():
argparser = argparse.ArgumentParser(description=f"MíngShé {__version__}")
argparser.add_argument("filepath", type=Path, help="The .she file")
argparser.add_argument(
... |
from ffmpy import FFmpeg
import os, glob
class Normalize_Audio():
def __init__(self):
''' Constructor for this class. '''
pass
def normalize(infile,bitrate):
filename=os.path.splitext(os.path.split(infile)[1])[0]
filepath=os.path.dirname(infile)+"\\normalized"
tr... |
# Generated by Django 3.1.5 on 2021-01-27 16:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('workshop', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='subscription',
name='country',
... |
"""MIT License
Copyright (c) 2020 utilitybot.co
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, ... |
#Reorder a MISO gff file. Miso takes the inclusion isoform as the first listed mRNA. This reorders the file by start coord. All other fields (ID, etc.) are unchanged. Designed to work on AFE and ALE gff3s to sort by "most distal" isoform. This means most upstream isoform for AFEs and most downstream isoform for AL... |
from typing import Any, Callable, Type
import ruamel.yaml
UserType = Any
YamlType = Any
_safe = ruamel.yaml.YAML(typ="safe", pure=True)
_rt = ruamel.yaml.YAML(typ="rt", pure=True)
def register_class(cls: Type) -> None:
_safe.register_class(cls)
_rt.register_class(cls)
def add_representer(
data_type: ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 3 15:47:19 2018
@author: Yann Roussel and Tuan Bui
Editted by: Emine Topcu on Oct 2021
"""
from random import gauss
from Beat_and_glide import Beat_and_glide_base
class Beat_and_glide_V0v_KO(Beat_and_glide_base):
__tV0vKOstart = None #calcula... |
#!/usr/bin/env python3
##########################################################
## Jose F. Sanchez ##
## Copyright (C) 2019-2020 Lauro Sumoy Lab, IGTP, Spain ##
##########################################################
"""
Provides configuration for the pipeline.
.. seealso:: Additional information on... |
# -*- coding: utf-8 -*-
"""Console script for exo."""
import errno
import math
import sys
import click
import numpy as np
# Adapted Java treeview image compression algorithm
def rebin(a, new_shape):
M, N = a.shape
m, n = new_shape
if m >= M:
# repeat rows in data matrix
a = np.repeat(a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.