content
stringlengths
5
1.05M
# Filenames : <Sazxt> # python bytecode : 2.7 # Time Succses Parser : Mon Jul 6 13:43:34 2020 # Auto Parser Dis Version : 1.1.0 # Source : https://www.github.com/Datez-Kun import os, sys, time from time import sleep m = '\x1b[31;1m' h = '\x1b[32;1m' k = '\x1b[33;1m' b = '\x1b[34;1m' u = '\x1b[35;1m' bi = '\x1b[36;1m'...
import asyncio import datetime import colorama import random def main(): loop = asyncio.get_event_loop() t0 = datetime.datetime.now() print(colorama.Fore.WHITE + "App started.", flush=True) data = asyncio.Queue() task1 = loop.create_task(generate_data(20, data)) task2 = loop.create_task(ge...
from smartcard.System import readers # define the APDUs used in this script SelectAPDU = [ 0x00, 0xA4, 0x04, 0x00, 0x10, 0xD1, 0x58, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00 ] ReadProfileAPDU = [ 0x00, 0xca, 0x11, 0x00, 0x02, 0x00, 0x00 ] # get all the available readers r =...
# https://leetcode.com/problems/longest-palindrome/ # Given a string s which consists of lowercase or uppercase letters, return the # length of the longest palindrome that can be built with those letters. # Letters are case sensitive, for example, "Aa" is not considered a palindrome # here. #########################...
import os import astropy.units as u from astropy.coordinates import SkyCoord from banzai.stages import Stage from banzai import logs class PointingTest(Stage): """ A test to determine whether or not the poiting error on the frame (as determined by a WCS solve) is within tolerance. """ # Typical...
# Generated by Django 3.1.7 on 2021-04-15 15:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0016_profile_match_list'), ] operations = [ migrations.AddField( model_name='property', name='on_grounds', ...
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # Copyright (C) 2020 Daniel Rodriguez # Use of this source code is governed by the MIT License ###############################################################################...
from lean_client.commands import SyncRequest, InfoRequest from test.test_trio_server.mock_lean import \ LeanShouldGetRequest, LeanSendsBytes, LeanSendsResponse, LeanTakesTime, start_with_mock_lean from lean_client.trio_server import TrioLeanServer import trio # type: ignore import trio.testing # type: ignore de...
import unittest from . helpers import get_tickers class TestEndpointsResponseCodes(unittest.TestCase): def test_info(self): tickers = get_tickers() self.assertEqual(len(tickers), 270) if __name__ == '__main__': unittest.main()
from discord.ext import commands from discord import Embed import requests import asyncpraw import random from geopy.geocoders import Nominatim from dotenv import load_dotenv load_dotenv() import os from googlesearch import search class scraping(commands.Cog): def __init__(self, bot): self.bot=bot ...
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html from .bloomfilterOnRedis import BloomFilter from scrapy.exceptions import IgnoreRequest class QcPipeline(object): def proce...
import jax.numpy as jnp from jax import jit from jaxdsp.processors.constants import DEFAULT_SAMPLE_RATE from jaxdsp.param import Param NAME = "Sine Wave" PARAMS = [ Param("frequency_hz", 440.0, 55.0, 7_040, log_scale=True), ] PRESETS = {} def init_state(): return {"phase_radians": 0.0, "sample_rate": DEFAUL...
# Copyright 2012 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Handling of MAAS API credentials. The API client deals with credentials consisting of 3 elements: consumer key, resource token, and resource secret. These are in OAuth, but th...
""" PASSENGERS """ numPassengers = 34598 passenger_arriving = ( (6, 11, 8, 4, 9, 4, 4, 4, 8, 2, 0, 1, 0, 6, 9, 9, 8, 12, 6, 7, 6, 3, 3, 1, 1, 0), # 0 (14, 11, 7, 10, 3, 4, 6, 0, 2, 2, 0, 2, 0, 8, 5, 4, 7, 9, 8, 3, 0, 2, 4, 3, 0, 0), # 1 (9, 8, 4, 14, 14, 3, 3, 7, 2, 1, 3, 0, 0, 11, 9, 7, 5, 9, 6, 6, 3, 5, 1, 0,...
import os from contextlib import closing from multiprocessing import cpu_count from multiprocessing.dummy import Pool as ThreadPool from urllib.parse import urljoin from bs4 import BeautifulSoup import requests from .files import management THREADS_NUMBER = cpu_count() class WebCrawler: project_name = '' ...
# coding=utf-8 # 引用Flask from app import create_app app = create_app('config.py') if __name__ == '__main__': app.run('127.0.0.1', 8088)
from config import * from ibm_datastage_api import DSAPI dsapi = DSAPI() hproj = None hjob = None try: _, err = dsapi.DSLoadLibrary(API_LIB_FILE) if err: raise Exception("Loading the library failed: {}".format(err)) print("Setting the parameters to connect to DataStage server") d...
print("This is file 2 in folder 2")
"""Entry point of the Detectron2 container that is used to train models on SKU-110k dataset""" import os import argparse import logging import sys import ast import json from pathlib import Path from detectron2.engine import launch from detectron2.config import get_cfg, CfgNode from detectron2 import model_zoo from de...
from pymed import PubMed # Create a PubMed object that GraphQL can use to query # Note that the parameters are not required but kindly requested by PubMed Central # https://www.ncbi.nlm.nih.gov/pmc/tools/developers/ pubmed = PubMed(tool="MyTool", email="my@email.address") # Create a GraphQL query in plain text query ...
import scrapy from scrapy.http.request import Request class BBCSpider(scrapy.Spider): name = 'soccer' start_urls= [ "https://soccerethiopia.net/football/category/news-2/" ] def parse(self,response): links = response.css('h2.entry-title>a::attr(href)').getall() for link in links...
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from generate_docs import html_safe, markdown_safe def test_markdown_safe(): assert "\\*A\\_B&lt;C&amp;" == markdown_safe("*A_B<C&") def test_html_safe(): assert "foo <code>bar...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-02-13 08:30 from __future__ import unicode_literals import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('workflow', '0013_auto_20180122_1057'), ] oper...
import rospy import sys from spot_tools_tests_common.test_class import TestClass from asa_ros_msgs.msg import FoundAnchor import tf2_ros as tf from geometry_msgs.msg import TransformStamped, PoseStamped from spot_tools_tests_common.asa_mock_utils import get_mock_tf_frame from nav_msgs.msg import Odometry class Odome...
from typing import Dict, Iterable class Machine(object): """ The interface to devilsmachine functionality from a module. """ def __init__(self, tool_args: Iterable[str]) -> None: self.tools: Dict[str, str] = {} for arg in tool_args: parts = arg.split('=', maxsplit=2) ...
""" :py:class:`QWFileNameV2` - widget to enter file name ===================================================== Usage:: # Import from psana.graphqt.QWFileNameV2 import QWFileNameV2 # Methods - see test See: - :py:class:`QWFileNameV2` - `lcls2 on github <https://github.com/slac-lcls/lcls2>`_. Th...
from .root import root_blueprint
from typing import * import pandas as pd from .api import TBARawAPI from .client import TBACachedSession, TBAQueryArguments from .exceptions import * __all__ = ["query_args", "event_helper"] class TBABaseHelper: def __init__(self, session: "TBACachedSession"): self._api = TBARawAPI(session) def _g...
# -*- coding: utf-8 -*- ############################################################################### # # DescribeImages # Returns information about Amazon Machine Image(s) that are available to you. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 ...
import numpy as np import random import os from PIL import Image import matplotlib.pyplot as plt import matplotlib.patches as mpatches class NeuralNetwork(): def __init__(self, layers): self.parameters, self.velocity, self.training = {}, {}, True self.layer_number = len(layers) for l in ran...
# app.py - a minimal flask api from flask import Flask, request, jsonify, make_response import requests, json, jwt, time, sys, os, logging from flask_restful import Resource, Api from logging.config import dictConfig import nnUtils as nn import io import csv import codecs import numpy as np # main_path = os.getcwd() ...
import pyaudio import socket import sys import wave CHUNK = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 2 RATE = 44100 p = pyaudio.PyAudio() stream = p.open(format = FORMAT, channels = CHANNELS, rate = RATE, input = True, frames_per_buffer = CHUNK) sock =...
import json import os from io import StringIO from django.core.management import call_command from django.test import TestCase from scan_models.tests.constances import standard_output class TestCommand(TestCase): maxDiff = None def call_command(self, *args, **kwargs): out = StringIO() call_...
"""Qikify: Chip model. """ class Chip(object): """This class encapsulates chip-level data. """ def __init__(self, chip_dict=None, LCT=None, HCT=None, gnd=None, LCT_prefix=''): """Expects a dictionary of ch...
import sys from collections import deque def bfs(): visit = [[False for __ in range(m)] for _ in range(n)] for y in range(n): for x in range(m): if graph[y][x] is 2 and visit[y][x] is False: queue = deque() queue.append((x,y)) visit[y][x] = T...
# vim:set ts=4 sw=4 et: ''' LeashServerTests ---------------- ''' import base64 import json from docker_leash.leash_server import app from . import is_success, post from .test_base import LeashServerFunctionnalBaseTests class LeashServerTests(LeashServerFunctionnalBaseTests): """Functionnal validation of :cls:...
import unittest import numpy as np import openmdao.api as om import wisdem.drivetrainse.hub as hub class TestHub(unittest.TestCase): def testMaxTorque(self): torq = hub.FindMaxTorque() inputs = {} outputs = {} inputs["blades_I"] = np.ones(6) inputs["blades_I"][0] = 1e3 ...
import matplotlib.pyplot as plt import numpy as np import sys dictionary_quartets = {} # dictionary to store quartets def sort_quartets(tax1, tax2, tax3, tax4): list_custom = [] list_custom.append(tax1) list_custom.append(tax2) list_custom.append(tax3) list_custom.append(tax4) list_custom.sort...
import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.version_info <= (2, 4): error = 'Requires Python Version 2.5 or above... exiting.' print >> sys.stderr, error sys.exit(1) requirements = [ 'requests>=2.20.0,<3.0', ] setup(name='googlemaps', ...
"""Test Module for Puzzles in Day 16: Packet Decoder""" import logging from pathlib import Path from pytest import fixture, mark from puzzle import load, part1, part2 from puzzle import __day__, __title__ LOGGER = logging.getLogger(__name__) LOGGER.warning(f"Test AoC21 Day {__day__}: {__title__}") class AoCTest: ...
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2018, 2019, 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. #...
STORAGE_FOUND = 'rhobot::storage::found' STORAGE_LOST = 'rhobot::storage::lost'
""" esiset.py - Code to perform actions on multiple 2d ESI data sets """ from os import path from matplotlib import pyplot as plt from specim.specfuncs.specset1d import SpecSet1d from specim.specfuncs.ech1dset import Ech1dSet from .esi2d import Esi2d class EsiSet(list): """ The EsiSet class is effectively...
import logging import azure.functions as func flexitarian_recipe = { "meat": 0.45359237, "onion": 1, "garlic": 4, "cumin": 1.5, "sumac": 1.5, "salt": 0.5, "pepper": 0.25, "red pepper flakes": 0.25, "water": 2, "serves": 4, "makes": 48 } vegan_recipe = { "chickpeas": 0....
import binaryninja as binja from binaryninja.enums import ( SymbolType, TypeClass, LowLevelILOperation, RegisterValueType ) import logging import os from Queue import Queue import CFG_pb2 import util import xrefs import jmptable log = logging.getLogger(util.LOGNAME) BINJA_DIR = os.path.dirname(os.path.abspat...
from .forms import RegistrationForm
#!/usr/bin/env python2.7 # Copyright 2014 Virantha Ekanayake 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 ...
''' Send email module of the LS CI/CD Integration toolkit, implements the necessary methods to notify of the results of the CI/CD process''' import os import smtplib import sys from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from string import Template import traceback from ...
# -*- coding: utf-8 -*- # Generated by Django 1.11.17 on 2021-07-19 04:42 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('zawadi', '0001_initial'), ] operations = [ migrations.AlterField( ...
from functools import partial import pytest from . import Route from .matcher import Matcher from .cmatcher import Matcher as CMatcher class FakeRequest: def __init__(self, method, path): self.method = method self.path = path @classmethod def from_str(cls, value): return cls(*va...
from .curls_untargeted import L2BasicIterativeAttack as curls_untargeted from .curls_targeted import L2BasicIterativeAttack as curls_targeted
from django.shortcuts import render, get_object_or_404, redirect from django.http import JsonResponse, Http404 from django.urls import reverse_lazy from django.contrib.auth.decorators import login_required from rest_framework import status from rest_framework.views import APIView from rest_framework.response import...
from nose.tools import assert_equal from mock import Mock import codecs from . import BaseS3EncryptTest class BaseHandlerTest(BaseS3EncryptTest): @staticmethod def bytes_to_str(data): t = type(b''.decode('utf-8')) if not isinstance(data, t): return data.decode('utf-8') re...
from typing import Dict, Sequence, Optional from ...arch.native_funcs import ( HWND, WINDOWS_FUNCTIONS, ) from ...arch.native_funcs.monitor import WindowsMonitor from ......aid.std import ( ComponentId, log, WARN, DEBUG, VERBOSE, ) from ......core.platform.api.defs import ( ScreenRect, NATIVE_S...
import gevent.pywsgi import os import pytest import six import tempfile if six.PY2: from cookielib import CookieJar else: from http.cookiejar import CookieJar from contextlib import contextmanager from geventhttpclient.useragent import UserAgent, BadStatusCode @contextmanager def wsgiserver(handler): se...
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='sklearn & cookiecutter - learn and demo', author='Xukun(Frank)LIU', license='MIT', )
class InvalidArguments(Exception): pass def existed(db_conn=None, table_name=None, key_cols=None, key_vals=None) -> bool: """데이터의 중복을 검사한다. Parameters: db_conn (connection of psycopg2): Connection Object table_name (str): Table name key_cols (tu...
# -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2013, 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, dist...
#!/usr/bin/env python import json class BooksOfTheBible: """ Data class containing the books of the Bible and the Chapters """ def __init__(self, input_file): ifile = open(input_file,'r') rawData = ''.join(ifile.readlines()) self.data = json.loads(rawData) def returnBooks...
import matplotlib2tikz import matplotlib.pyplot as plt import numpy as np powers = np.arange(0, 1.1, 0.1) H_constants = np.arange(0.3, 1.4, 0.3) f_0 = 50 dfs = [5, 10, 2, 1] powers = np.linspace(0.01, 1) data = [] for df in dfs: for H in H_constants: t = [2*H*df/(f_0*power) for power in powers] t...
def cheeese_and_crackers(cheeese_count, boxes_of_crackers): print "You have %d cheeses!" % cheeese_count print "You have %d boxes of crackers!" % boxes_of_crackers print "Man that's enough for a party!" print "Get a blanket.\n" print "We can just give the function numbers directly:" c...
DB_HOST = "localhost" DB_PORT = 27017 DB_NAME = "paste2image"
import argparse import requests import time import random def get_arguments(): parser = argparse.ArgumentParser(description="path") parser.add_argument("--url-file", type=str, default='', help="url file path", required=True) parser.add_argument("--output-dir"...
'''#what is this script? from skimage.color import rgb2gray import cv2 from SAMAE.apoCont import apoContour import SAMAE.data as dt # Import sample images cirimg = rgb2gray(dt.circle()) # circle sample img skimg = rgb2gray(dt.skmuscimg()) # ultrasound sample img # Let's test apoContour pt1 = [76,85] contour, n, max...
import numpy as np import roboverse.bullet as bullet class DrawerOpenTransfer: def __init__(self, env, close_drawer=False, suboptimal=False): self.env = env self.xyz_action_scale = 7.0 self.gripper_dist_thresh = 0.06 self.gripper_xy_dist_thresh = 0.04 self.ending_z = -0.25...
from countershape import Page pages = [ Page("anticache.html", "Anticache"), Page("clientreplay.html", "Client-side replay"), Page("filters.html", "Filter expressions"), Page("setheaders.html", "Set Headers"), Page("serverreplay.html", "Server-side replay"), Page("sticky.html", "Sticky cookies ...
import pytest import salt.utils.platform from tests.support.case import ModuleCase from tests.support.helpers import destructiveTest, slowTest from tests.support.unit import skipIf @skipIf(not salt.utils.platform.is_windows(), "windows test only") @pytest.mark.windows_whitelisted class WinDNSTest(ModuleCase): """...
import celery import redis from scrapy.crawler import CrawlerProcess from scrapy.utils.project import get_project_settings from basic_app import app from bargin_spider.spiders.bargin_spider import bargin_spider celery = celery.Celery(app.name, broker=app.config['CELERY_BROKER_URL']) celery.conf.update(app.co...
from __future__ import absolute_import from collections import defaultdict import importlib import inspect import re from django.core.cache import cache from django.db import connections from .constants import ( DONT_MEASURE_QUERY_SQL_SUFFIX, DONT_MEASURE_QUERY_SUFFIXES ) from .middleware import get_current_r...
#!/usr/bin/env python import argparse,logging,time,sys,os,json sys.path.append('..') os.environ['TF_CPP_MIN_VLOG_LEVEL'] = '3' os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' logger = logging.getLogger(__name__) import tensorflow as tf from tensorflow.keras.layers import Dense, Flatten, Conv2D from tensorflow.keras import ...
from inflammation import models, serializers def test_patients_json_serializer(): # Create some test data patients = [ models.Patient('Alice', [models.Observation(i, i + 1) for i in range(3)]), models.Patient('Bob', [models.Observation(i, 2 * i) for i in range(3)]), ] # Save and reloa...
from .ansiCommander import AnsiCommander as Ansi import re import os class AnsiTerm: pattern = re.compile(r'\<!(\s*[a-zA-Z0-9]+|\/)\s*\>') def __init__(self): self.useColor = True self.undo_stack = [] self.states = Ansi.getDefaultStates() self.styles = {} def setStyle(self...
# coding = utf-8 # Create date: 2019-4-1 # Author :Hailong from utils.connect_to_os import executor def test_cli_config_merge(ros_kvm_init, cloud_config_url): kwargs = dict(cloud_config='{url}default.yml'.format(url=cloud_config_url), is_install_to_hard_drive=True) tuple_return = ros_kvm_init(**kwargs) c...
# Incremental readline compatible with micropython/lib/readline.c, credits https://github.com/dhylands import sys try: import ulogging as logging except: import logging try: import signal except: signal = None DEBUG = 0 CTRL_A = b"\x01" CTRL_C = b"\x03" CTRL_D = b"\x04" CTRL_E = b"\x05" CTRL_U = b"...
"""the method `create_table` is adapted from https://github.com/google-research/language/tree/master/language/totto""" from nltk.tokenize import word_tokenize from utils import FileIterable import argparse import tqdm import json import os DELIM = u"│" # delim used by onmt def create_table(json_example, for_par...
# -*- coding: utf-8 -*- # %% from astropy.io import fits import numpy as np import matplotlib.pyplot as plt from scipy.optimize import curve_fit from scipy import stats import datetime; now = datetime.datetime.now() import tkinter from tkinter import filedialog # we don't want a full GUI, so keep the root window from...
from django.db import models class UserUniModel(models.Model): telegram_id_str = 'telegram_id' user_types_str = 'user_types' STUDENT = 'student' TEACHER = 'teacher' MANAGEMENT = 'manager' ADMIN = 'admin' CHOICE_USER_TYPES = ( (STUDENT, 'Студент'), (TEACHER, 'В...
# Generated by Django 3.0.5 on 2020-05-01 10:28 import ckeditor.fields from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER...
## While True Loop and break statement # This loop's structure can be simplified if we receive the first input inside the loop # and break out of the loop if a test shows that the continuation condition is false theSum = 0 while True: # condition is Boolean value True: ensure body of loop will execute at least once ...
from anuvaad_auditor.loghandler import log_info from anuvaad_auditor.loghandler import log_exception from anuvaad_auditor.loghandler import log_debug from src.utilities.request_parse import File from src.services.ocr import TextExtraction def process_input(app_context): try: sentences = [] file_pr...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Basic Implementation of a multi layer perceptron. """ from __future__ import division, print_function import ConfigSpace as CS import ConfigSpace.hyperparameters as CSH import torch.nn as nn from autoPyTorch.components.networks.base_net import BaseFeatureNet from au...
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() athlete_teams = db.Table('athlete_teams', db.Column('athlete_id', db.Integer, db.ForeignKey('athletes.id')), db.Column('team_id', db.Integer, db.ForeignKey('teams.id')) ) class Athlete(db.Model): __tablename__ = 'athletes' id = d...
import httplib import os import time import weakref from tornado.escape import utf8 from tornado import httputil from tornado.ioloop import IOLoop from tornado.util import import_object class HTTPClient(object): """A blocking HTTP client. Typical usage looks like this: http_client = httpclient.HTTPC...
#!/usr/bin/env python from argparse import Namespace from pathlib import Path # consts are loaded into one directory above path = Path('../data/books') work_dir=path/'work_dir' consts = Namespace( path=path, work_dir=work_dir, proc_dataset_csv=path/'frankenstein_with_splits.csv', # proc_dataset_csv=p...
from pandac.PandaModules import Point3 from toontown.nametag.NametagFloat3d import NametagFloat3d class NametagFloat2d(NametagFloat3d): def doBillboardEffect(self): pass def update(self): NametagFloat3d.update(self) self.updateClickRegion() def setClickRegionFrame(self, left, ri...
class Grammar(object): """Grammar may represent any formal grammar. """ commutative_ops = ['+', '*', 'and', 'or'] def __init__(self, rules = None): if rules is None: rules = {} self.rules = rules def add_rule(self, rule): assert(type(rule) == GrammarRule) ...
import dataclasses from dataclasses import field from typing import ClassVar, Dict, List, Optional, Type import marshmallow import marshmallow.fields as mfields import marshmallow_dataclass from starkware.cairo.lang.compiler.error_handling import Location from starkware.cairo.lang.compiler.preprocessor.flow import Fl...
# -*- coding: utf-8 -*- from django.conf.urls import url, patterns urlpatterns = patterns('external_links.views', url(r'^$', 'external_link', name='external_link') )
# Copyright: 2021, Diez B. Roggisch, Berlin . All rights reserved. import pathlib import argparse import datetime as dt from collections import defaultdict from bokeh.plotting import figure from bokeh.layouts import column, row from bokeh.models.annotations import Label from bokeh.io import show import scipy.stats WI...
# Copyright 2021-present, Nike, Inc. # All rights reserved. # # This source code is licensed under the Apache-2.0 license found in # the LICENSE file in the root directory of this source tree. from knockoff.utilities.mixin import ResourceLocatorMixin class SinkDumpStrategyFactory(ResourceLocatorMixin, object): e...
# -*- coding: utf-8 -*- """This module provides an implementation of radagrad.""" from __future__ import division from base import Minimizer from mathadapt import sqrt, ones_like, clip, zero_like from scipy.linalg import pinv as scipy_pinv, polar import numpy as np from fjlt.SubsampledRandomizedFourrierTransform imp...
from pygame import * from random import randint import json #fonts and captions font.init() font1 = font.SysFont('Comic Sans', 60) win = font1.render('Dam you actually poggers', True, (255, 255, 255)) lose = font1.render('Yeah you suck, you lost', True, (180, 0, 0)) font2 = font.SysFont('Comic Sans', 36) ammo_lose ...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="hera_gpu", version="2020.05.11", author="Jackson Sipple and Aaron Parsons", author_email="jsipple@berkeley.edu", description="Drop-in replacement functions that run on NVIDIA GPUs, parallelized for speed", ...
formatter+"%r %r %r %r" print formatter %(1,2,3,4) print formatter %("One","two","three","four") print formatter %(True,False,True, False) print formatter %(formatter,formatter,formatter,formatter) print formatter.format("Try you","Own text here"."May be a poen","Or a song about fear")
if 1 == 1: print('hello from PyNames comminuty') import sys, random, webbrowser from termcolor import colored dict_list = ['en', 'tr', 'fr', 'ar', 'es'] gender_list = ['male', 'female'] gender_list_langauge = ['en'] names = [] all_names = [] suggestions = [] def as_languag...
from .ApiClientMixin import ApiClientMixin
import argparse import io import os import pandas as pd from pybedtools import BedTool def parse_args(args): """define arguments""" parser = argparse.ArgumentParser(description="TATA_enrichment") parser.add_argument( "file_names", type=str, help="Name of folder and filenames for t...
from __future__ import unicode_literals from django.db.models.signals import post_save from django.dispatch import receiver from django.utils.translation import ugettext_lazy as _ from common.utils import encapsulate from documents.models import Document from navigation.api import register_links, register_model_list_...
# -*- coding: utf-8 -*- from copy import deepcopy import re from scrapy.spiders import Spider from admincode.items import AdmincodeItem class StatsSpider(Spider): name = 'stats' allowed_domains = ['stats.gov.cn'] start_urls = [ 'http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/{}/index....
# # Pyserini: Reproducible IR research with sparse and dense representations # # 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...