content
stringlengths
5
1.05M
import datetime import json import os import random from time import sleep import requests def main(): location_ids = list(map(int, os.getenv('LOCATION_IDS').split(','))) with open('global-entry.json') as stream: locations = {location['id']: location for location in json.load(stream)} print(f'Sear...
# # Copyright 2019 The FATE 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 appli...
import torch from zerovl.core.hooks import Hook from zerovl.utils import ENV, logger, all_gather from zerovl.utils.collections import AttrDict from zerovl.tasks.clip.hooks.utils import RetrievalMetric, IndexedEmbInfo class RetrievalEvalHook(Hook): def __init__(self, runner): self.retrieval = RetrievalMe...
import argparse import cv2 as cv import os import pickle import sys import time from operator import itemgetter import numpy as np np.set_printoptions(precision=2) import pandas as pd import openface from sklearn.svm import SVC from sklearn.preprocessing import LabelEncoder from sklearn.lda import LDA from sklearn.m...
#code without list comprehension myl1 = [] for a in range(4,6): for b in range(3,5): myl1.append(a*b) print(myl1) #code with list comprehension lic1 = [a*b for a in range(4,6) for b in range(3,5)] print(lic1)
from trezor.messages.NEMProvisionNamespace import NEMProvisionNamespace from trezor.messages.NEMTransactionCommon import NEMTransactionCommon from ..helpers import NEM_TRANSACTION_TYPE_PROVISION_NAMESPACE from ..writers import ( serialize_tx_common, write_bytes_with_len, write_uint32_le, write_uint64_l...
#!/usr/bin/env python # Copyright 2014 Open Connectome Project (http://openconnecto.me) # # 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 # #...
import sys sys.path.append("..") from driver_risk_utils import argument_utils, general_utils import speed_estimator import cv2 args = argument_utils.parse_args() args.use_gps = False args.lane_based_speed = True def test_with_display(): print("Testing on images with display!") time = 0.0 fps = 30.0 ...
from .frame import AudioFrame
import numpy as np import numpy.testing as npt from nitime import utils as ut import nitime.timeseries as ts import nitime.analysis as nta import nose.tools as nt import decotest def test_SpectralAnalyzer(): Fs = np.pi t = np.arange(1024) x = np.sin(10*t) + np.random.rand(t.shape[-1]) y = np.sin(10*t)...
# from django.test import Client, client from projetodj.django_assertions import assert_contains import pytest from django.urls import reverse @pytest.fixture def resp(client): resp = client.get(reverse('base:home')) return resp def test_status_code(resp): assert resp.status_code == 200 def test_title...
import importlib.util import os from pathlib import Path from .environment import EnvironmentConf class PathsConf(EnvironmentConf): """ Configure the default paths for a Django project """ def get_repo_dir(self): """ Return the repository directory. """ # Try to guess...
""" httplib2test_appengine A set of unit tests for httplib2.py on Google App Engine """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2011, Joe Gregorio" import os import sys import unittest # The test resources base uri base = 'http://bitworking.org/projects/httplib2/test/' #base = '...
# Program 34 : Python program to count Even and Odd numbers in a List # list of numbers list1 = [19, 222, 43, 4, 86, 3, 1] even_count, odd_count = 0, 0 # iterating each number in list for num in list1: # checking condition if num % 2 == 0: even_count += 1 else: odd_count += 1 print("Even numbers in the ...
from mongoengine import Document, StringField, ObjectIdField, ReferenceField from . import Language class Author(Document): _id = ObjectIdField() name = StringField(required=True) url_name = StringField(required=True) language_id = ReferenceField(Language) def __init__(self, name, language_id, u...
import urllib.request import os import numpy as np from meld_classifier.paths import BASE_PATH, DEFAULT_HDF5_FILE_ROOT, EXPERIMENT_PATH, MODEL_NAME, MODEL_PATH, MELD_DATA_PATH import sys import shutil import tempfile # --- download data from figshare --- def _fetch_url(url, fname): def dlProgress(count, blockSize,...
class Scrub(object): health = 0 def __init__(self,health): self.health = health def printHealth(self): print(self.health)
default_app_config = 'izi.apps.voucher.config.VoucherConfig'
import sys import os import yaml import glob import shutil try: from conda_build.config import config except ImportError: # For older versions of conda-build from conda_build import config with open(os.path.join(sys.argv[1], 'meta.yaml')) as f: name = yaml.load(f)['package']['name'] binary_package_glo...
from django.shortcuts import render, HttpResponse,get_object_or_404 from django.contrib.auth.mixins import LoginRequiredMixin from .models import Message from users.models import User from django.views.generic import DetailView, ListView , CreateView class MessageInboxView(ListView,LoginRequiredMixin): model = Mes...
# ------------------------------------------------------------------------------------ # BaSSL # Copyright (c) 2021 KakaoBrain. All Rights Reserved. # Licensed under the Apache License, Version 2.0 [see LICENSE for details] # ------------------------------------------------------------------------------------ import r...
# -*- coding: utf-8 -*- # # 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 ...
import pytest from bddrest import status, response, when from yhttp import statuses def test_httpstatus(app, Given): @app.route() def get(req): raise statuses.badrequest() @app.route('/foo') def get(req): return statuses.badrequest() with Given(): assert status == '400 ...
for c in range(1, 5): nome: str = str(input("Digite o nome: ")) sexo = str(input("Sexo[M][F]: ")) idade = int(input("Idade: ")) media = 0 idadehomem = 0 idademulher = 0 if sexo.upper() == "M": if idade < idadehomem: media += idade elif idade > idadehomem: ...
from asposepdf import Settings from com.aspose.pdf import Document from com.aspose.pdf import SvgSaveOptions class PdfToSvg: def __init__(self): dataDir = Settings.dataDir + 'WorkingWithDocumentConversion/PdfToSvg/' # Open the target document pdf = Document(dataDir + 'in...
SG_PATH = '/work/awilf/Standard-Grid' import sys sys.path.append(SG_PATH) import standard_grid import pickle if __name__=="__main__": hash_in = sys.argv[1] grid=pickle.load(open(f'.{hash_in}.pkl',"rb")) csv_path=f"results/{hash_in}/csv_results.csv" grid.json_interpret("output/results.txt",csv_path)
# note that the entire code here is my own import numpy as np # Util Functions def random_action(): """ This function returns a random integer corresponding in range [0,5)""" moves = np.random.random(size=2)*2 - 1 return moves def one_hot(moves): """ This function converts a 1d array to a one-hot ...
#for mutable then things += extend sthe object and operation wluld be reflected on the previouslly created #object no new ojec tis created def SomeListHeck(test_list): ''' here we are going to add new elemnts and want reflection back ''' test_list+=[2,2,3,3] def SomeListHeck2(test_list): '''here we ...
# -*- coding: utf-8 -*- # @Time : 2018/7/9 20:14 # @Author : QuietWoods # @FileName: url_config.py # @Software: PyCharm # @Email :1258481281@qq.com import requests url_index = { 'url': 'http://www.pss-system.gov.cn/sipopublicsearch/patentsearch/tableSearch-showTableSearchIndex.shtml', 'headers': {} } #...
# # Contains State Variables # # FT0300 Invalid Statements # Invalid data / null / max / min defines import threading INVALID_DATA_8 = 0x7a # Invalid value (corresponding to 8bit value) INVALID_DATA_16 = 0x7ffa # Invalid value (corresponding to 16bit value) INVALID_DATA_32 = 0x7ffffffa # Invalid ...
import argparse from pathlib import Path import sys import time from googleapiclient.discovery import build from googleapiclient.errors import HttpError import srt class Translator(object): """ Source: https://github.com/agermanidis/autosub Class for translating a sentence from a one language to another. ...
# !/usr/bin/env python # -*- coding: utf-8 -*- """Dataverse data-types data model.""" from __future__ import absolute_import from pyDataverse.utils import dict_to_json from pyDataverse.utils import read_file_json from pyDataverse.utils import write_file_json """ Data-structure to work with data and metadata of Datave...
#! /usr/bin/env python3 import sys def print_usage_and_exit(): print(f"Usage: {sys.argv[0]} <workload> <ufs_data_dir> <ext4_data_dir>") exit(1) if len(sys.argv) != 4: print_usage_and_exit() workload = sys.argv[1] ufs_data_dir = sys.argv[2] ext4_data_dir = sys.argv[3] valid_workloads = [f"ycsb-{name}" f...
__author__ = 'Maxim Dutkin (max@dutkin.ru)' import unittest from m2core import M2Core from m2core.common import Permission, And, Or, Not, PermissionsEnum from m2core.data_schemes.db_system_scheme import M2PermissionCheckMixin class User(M2PermissionCheckMixin): def __init__(self, permissions: set): self...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from .common import _findRawContent from telegram_util import matchKey def getAttrString(attrs): if not attrs: return '' r = [] for k, v in attrs.items(): if k in ['content']: continue r.append(k + ': ' + str(v)) return '\n'.join(r) def _yieldPossibleAuthor...
# -*- coding: utf-8 -*- # Copyright (c) 2020-2021 Ramon van der Winkel. # All rights reserved. # Licensed under BSD-3-Clause-Clear. See LICENSE file for details. # maak een account HWL van specifieke vereniging, vanaf de commandline from django.core.management.base import BaseCommand from Competitie.models import...
# Generated by Django 4.0 on 2021-12-12 04:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('CheckersGame', '0003_alter_game_turn'), ] operations = [ migrations.AlterField( model_name='game', name='room_code', ...
from dateutil.parser import parse def is_date(string, fuzzy=False): """ Return whether the string can be interpreted as a date. Parameters ---------- string: str str, string to check for date fuzzy: bool ignore unknown tokens in string if True """ try: parse(str...
# Copyright (c) 2018 Red Hat, Inc. # All Rights Reserved. # Python import logging # Django from django.utils.translation import gettext_lazy as _ # Django REST Framework from rest_framework.response import Response from rest_framework.exceptions import PermissionDenied # AWX # from awx.main.analytics import collec...
from django.apps import AppConfig from django.conf import settings from django.utils.autoreload import autoreload_started def schema_watchdog(sender, **kwargs): sender.watch_dir(settings.BASE_DIR, "**/*.graphql") class DirectorConfig(AppConfig): name = "director" def ready(self): autoreload_sta...
from .player import * from .projectile import * from .asteroids import * from .powerups import *
from django import forms from django.conf import settings from django.core.mail import EmailMessage from captcha.fields import CaptchaField from localflavor.us.forms import USPhoneNumberField class ContactForm(forms.Form): name = forms.CharField() email_address = forms.EmailField() phone_number = USPhoneN...
import random import numpy as np from .mutate_method_call import MutateMethodCall def flip_bit(pos, chrom: bytearray): chrom[pos >> 3] ^= (128 >> (pos & 7)) def get_bit(pos, chrom: bytearray): return chrom[pos >> 3] >> (7 - (pos & 7)) & 1 def mutation_reserve_bytes(self: MutateMethodCall, chrom: bytearr...
#pylint: disable=W0703,R0912,R0904,E1101,R0904,E1124,W0105 """ Copyright 2014 eBay Software 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....
for _ in range(int(input())): n=int(input()) s=input() for i in range(5): if s[0:i]+s[n-(4-i):n]=='2020': print('YES') break else: print('NO')
import numpy as np import math from distance import euclidean, manhattan, cosine from time import time VALID_DISTANCE_ARG = { "euclidean": euclidean, "manhattan": manhattan, "cosine": cosine } VALID_INIT_CENTROID_ARG = ["random", "naive_sharding"] class KMeans(): ''' Initialization of KMeans model pa...
# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def isValidBST(self, root: TreeNode) -> bool: def helper(node, lower = float('-inf'), upper = float(...
import threading from slackbot.bot import Bot from app.rtm.emoji_fetcher import connect import app def main(): rtm_reaction_loop = threading.Thread(target=connect) rtm_reaction_loop.start() bot = Bot() bot.run() if __name__ == "__main__": main()
# dict.py cities = {"CA":'San Francisco', "MI":'Detroit', "FL":'Jacksonville'} # 定义dict cities['NY'] = 'New York' # 添加元素 cities['OR'] = 'Portland' def find_city(themap, state): # 定义函数 if state in themap: return themap[state] else: return "Not found." cities['_find'] = find_city # 把函数 find_c...
from discord.ext import commands from bolt.optional_cogs.base import OptionalCog class Example(OptionalCog): """ An example file to demonstrate the function of optional cog usage. """ RESTRICTED = False @commands.command() async def hello(self, ctx): await ctx.send("Hello from a...
#!/usr/bin/env python # # Templite+ # A light-weight, fully functional, general purpose templating engine # # Copyright (c) 2009 joonis new media # Author: Thimo Kraemer <thimo.kraemer@joonis.de> # # Based on Templite by Tomer Filiba # http://code.activestate.com/recipes/496702/ # # This program is free software...
class Solution: def mostCommonWord(self, paragraph: str, banned: List[str]) -> str: banset = set(banned) return collections.Counter([w for w in re.findall(r'\w+', paragraph.lower()) if w not in banset]).most_common(1)[0][0]
# The contents of this file are subject to the BitTorrent Open Source License # Version 1.1 (the License). You may not copy or use this file, in either # source code or executable form, except in compliance with the License. You # may obtain a copy of the License at http://www.bittorrent.com/license/. # # Software di...
from openstuder import SIAsyncGatewayClient, SIProtocolError, SIStatus def on_error(error: SIProtocolError): print(f'Unable to connect: {error.reason()}') def on_connected(access_level: str, gateway_version: str): client.find_properties('*.*.3136') def on_properties_found(status: SIStatus, id_: str, count...
import argparse import sdkhttp DEFAULT_HOST = "https://salkku.co" options = { 'verbose': False } def parse_command_line(): # type: () -> Namespace parser = argparse.ArgumentParser(description='CLI commands for paaomat.fi.') parser.add_argument('command', help='Main command name') parser.add_argu...
import hashlib import random from pathlib import Path def current_data_hash(): paths = [str(p) for p in Path("data").iterdir()] path_strs = " ".join(paths) hex = hashlib.md5(path_strs.encode()).hexdigest() return hex def random_shuffle(str_list: list): data = " ".join(str_list) digit = from_...
#!/usr/bin/env python from __future__ import print_function import os import subprocess import sys import numpy import contextlib from distutils.command.build_ext import build_ext from distutils.sysconfig import get_python_inc from distutils import ccompiler, msvccompiler from setuptools import Extension, setup, find_p...
""" Class that facilitates FITS header standardization to keys required by models. """ from abc import ABC, abstractmethod import warnings import logging import numpy as np from astropy.io.fits import PrimaryHDU, CompImageHDU from astropy.io import fits from astropy.wcs import WCS import astropy.units as u from astro...
# -*- coding: utf-8 -* from expects import * from expects.aliases import * from expects.testing import failure with describe('have_len'): with it('passes if string has the expected length'): expect('foo').to(have_len(3)) with it('passes if string has length matching'): expect('foo').to(have...
__version__ = "0.1.0" from .main import Optic, OpticConfig
#!/usr/bin/python3 from collections import OrderedDict from uuid import uuid1 import dash import json import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Event, State, Input, Output from pprint import pprint from app import app from app import app_controller import files...
# -*- coding: utf-8 -*- import random import re import struct import six from py_zipkin.util import generate_random_64bit_string from py_zipkin.zipkin import ZipkinAttrs from pyramid.interfaces import IRoutesMapper DEFAULT_REQUEST_TRACING_PERCENT = 0.5 def get_trace_id(request): """Gets the trace id based on a...
import os import pdb import re import sys empirical_base_path = "../../empirical_results/" formal_base_path = "../../../synthesis_analysis/formal_results" devices = ["Quadro RTX 4000 (IWS)", "Quadro RTX 4000"] device_alias = {"Quadro RTX 4000 (IWS)": "CUDA/toucan_quadro_rtx4000_subgroup_sm70.csv", "Q...
from ..datasets.ss_dataset import SSDataset from ..features.ss_feature import SSFeature from ..models.ss_crf import SS_CRF train_set = SSDataset('ViNLP/data/sentence-segmentation/train.txt') dev_set = SSDataset('ViNLP/data/sentence-segmentation/dev.txt') ss_feature = SSFeature() X_train, y_train = ss_feature.transfor...
#!/usr/bin/env python import diamond.plist as plist import unittest class PyListModule(unittest.TestCase): ''' #1: A simple list of integers, with cardinality ''. (One element only). ''' def testSimple(self): l = plist.List(int) self.assertEqual(l.__str__(), "list of <type 'int'> of cardinality: ") self.asse...
from llvmlite import ir, binding class CodeGen(): def __init__(self): self.binding = binding self.binding.initialize() self.binding.initialize_native_target() self.binding.initialize_native_asmprinter() self._setup_llvm() self._setup_engine() def _setup_llvm(se...
import torch import torch.nn as nn from model import recons_video from model import flow_pwc from utils import utils def make_model(args): device = 'cpu' if args.cpu else 'cuda' load_flow_net = True load_recons_net = False flow_pretrain_fn = args.pretrain_models_dir + 'network-default.pytorch' rec...
import unittest import simplejson class TestSimpleJson(unittest.TestCase): def testUseSimpleJson(self): loaded = simplejson.loads('{"foo": 1}') self.assertEqual(loaded, {"foo": 1}) if __name__ == "__main__": unittest.main()
from django.apps import AppConfig class GolocalsConfig(AppConfig): name = 'golocals'
# author: Fei Gao # # Search In Rotated Sorted Array # # Suppose a sorted array is rotated at some pivot unknown to you beforehand. # (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). # You are given a target value to search. If found in the array return its # index, otherwise return -1. # You may assume no duplicate e...
#!/usr/bin/python3.8 import sys import os import time from os.path import join, dirname from dotenv import load_dotenv sys.path.append('/home/pit/Documents/py_env/general_env/lib/python3.8/site-packages') from selenium import webdriver def github_login(): dotenv_path = join(dirname(__file__), '.env') load_do...
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # 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. # # Any...
from pyspark.sql.functions import explode, col, lit, rand, asc, regexp_replace, lower, array, udf, collect_set, rank, collect_list, log from pyspark.sql.window import Window hdfs_mpdDir = "hdfs:///recsys_spotify_2018/mpd.v1/mpd.slice.*.json" hdfs_challengeDir = "hdfs:///recsys_spotify_2018/challenge.v1/*.json" hdfs_us...
# Doubly LinkedList ''' head second third | | | | | | +----+------+ +----+------+ +----+------+ | 1 | o-------->| 2 | o-------->| 3 | null | | | o<--------| | o<--------|...
""" Usage: python main.py parse_raw_athlete_events_to_csv python main.py identify_unique_games_to_json > olympics/import_json/games.json python main.py parse_countries_csv_to_json > olympics/import_json/countries.json python main.py generate_games_script_commands > tmp/games_script_commands.txt pyth...
######################### # Imports ######################### import requests, json, base64 from secrets import * ######################### # Headers ######################### headers = { 'Authorization': "Basic " + str(base64.urlsafe_b64encode((CLIENT_ID + ':' + CLIENT_SECRET).encode())).decode() } data = [ ...
import os from categorias import * from proveedores import * from productos import * from clientes import * Datos = [] Email = [] def logueo(): os.system("clear") print(":::: MENU ACCESO ::::") print("[1.] INGRESAR") print("[2.] CREAR CUENTA DE USUARIO") print("[3.] SALIR") op = input("SELECCIONA UNA OPCION: ") ...
# MIT License # # Copyright (c) 2020 Jonathan Zernik # # 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, mer...
# AmazonのProduct Advertising APIを使って商品情報を取得する # 取得した商品情報の利用目的はAmazonのサイトにエンドユーザーを誘導し商品の販売を促進することに限定されている # APIの利用にはAmazonアソシエイト・プログラムへの登録が必要。一定期間売上が発生しないと利用できなくなる場合があるので注意 # 実行方法 # forego run python amazon_product_search.py # 上記のように実行するとforegoがカレントディレクトリに存在する「.env」という名前のファイルから環境変数を読み取ってプログラムにわたす。 # これを実行すると次々とツイートが表示さ...
# Authors: Jonas Schluter <jonas.schluter@nyulangone.org>, Grant Hussey <grant.hussey@nyulangone.org> # License: MIT import os import shutil import unittest from pathlib import Path import logging import taxumap.taxumap as t # The data for unittests is from Olin and Axel: # Olin, Axel (2018), “Stereotypic Immune Sys...
import argparse import logging import sys from .fetch import download_fns logger = logging.getLogger("mne") AVAILABLE_DATASETS = set(download_fns.keys()) def download_dataset(output_dir, n_first=None, cohort="eegbci"): download_fns[cohort](output_dir, n_first) if __name__ == "__main__": parser = argpa...
/home/runner/.cache/pip/pool/85/03/a8/e8d26fae6c7b3b8548be18e886767b946dd069a8481930ee9dda2adccd
#%% #! python import h5py import matplotlib.pyplot as plt import mcmc.image_cupy as im import mcmc.plotting as p import numpy as np import scipy.linalg as sla import scipy.special as ssp import mcmc.util_cupy as util import cupy as cp import importlib import datetime import pathlib,os import argparse import parser_help...
import json import requests import time import multiprocessing as mp import src.PathSolving.path_solver as ps import logging logging.getLogger("requests").setLevel(logging.WARNING) class Package: coordinates: (float, float, float)=None weight: float = None id :str = None def __init__(self, coordinate...
# -*- coding: utf-8 -*- """ This module contains a HTMLExportDefinition Model """ import re from loglan_db import db from loglan_db.model_db.base_definition import BaseDefinition from loglan_db.model_html import DEFAULT_HTML_STYLE from loglan_db.model_html.html_word import HTMLExportWord class DefinitionFormatter: ...
## # File: PdbxReadWriteTests.py # Author: jdw # Date: 9-Oct-2011 # Version: 0.001 # # Updated: # 24-Oct-2012 jdw update path details and reorganize. # ## """ Various tests caess for PDBx/mmCIF data file and dictionary reader and writer. """ from __future__ import absolute_import __docformat__ = "rest...
#!/usr/bin/env python """ :module: contextManager :platform: None :synopsis: This module contains classes related to module attributes :plans: """ __author__ = "Andres Weber" __email__ = "andresmweber@gmail.com" __version__ = 1.0 #py import import collections as _collections import os #mpc import impo...
import time import numpy import json import utils import pypot.robot import pypot.dynamixel import motorTrajectoryManager listOfTraj = [ [0.0029282637700648157, 532.49287882689293, 29.07849099701108, -1058.1470413492355, 459.3664329672057], [169.9973127875532, 1.21189047395...
import sys sys.path.append(".") from ai.action.movement.movements.basic import * import ai.actionplanner speed_one = 0.6 def main(mars, times=6): stretchingInit(mars) for i in range(times): stretching(mars) #init(mars) stretchingEnd(mars) def stretchingInit(mars): mars....
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Software License Agreement (BSD License) # # Copyright (c) 2010-2011, Antons Rebguns. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Re...
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Research into bias in Google Ads conducted for CS520 at Umass-Amherst', author='Jenn Halbleib', license='MIT', )
# -*- coding: utf-8 -*- import os import csv import yaml """ Facades for accessing the configuration data. """ __author__ = 'Bernardo Martínez Garrido' __license__ = 'MIT' __status__ = 'Development' class _FileReader(object): """ Offers methods to read the data files. """ # Singleton control obje...
""" Check whether a commit message contains the jira ticket in the message """ import re JIRA_KEYS = 'VFTEST|VFG|VFA|VFS|VFW' def check_message(message): """ Check whether a message contains the Jira-specific header """ match_str = ".*({0})-[0-9]+".format(JIRA_KEYS) match = re.match(match_str, message)...
# decorator for registering the survey footprint loaders and projections projection_register = {} def register_projection(cls): projection_register[cls.__name__] = cls survey_register = {} def register_survey(cls): survey_register[cls.__name__] = cls # [blatant copy from six to avoid dependency] # python 2 an...
# Generated by Django 2.1.5 on 2019-01-31 21:47 from django.db import migrations, models import django.db.models.deletion import taggit.managers class Migration(migrations.Migration): dependencies = [("question", "0002_auto_20190131_2055")] operations = [ migrations.CreateModel( name="Q...
from setuptools import setup, find_packages def readme(): with open('README.rst') as f: return f.read() setup(name='dupfileremover', version='0.2.2', description='A command line utility that helps you find and remove duplicate files', long_description=readme(), url='http://github...
"""Test parsing arguments. Test target: - :py:meth:`lmp.script.gen_txt.parse_args`. """ import lmp.infer import lmp.script.gen_txt from lmp.infer import Top1Infer, TopKInfer, TopPInfer def test_top_1_parse_results(ckpt: int, exp_name: str, max_seq_len: int, seed: int) -> None: """Must correctly parse all argument...
from .se_gcn import SE_GCN
from __future__ import division, print_function, unicode_literals # This code is so you can run the samples without installing the package import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # testinfo = "t 0.1, s, t 1.1, s, t 3.1, s, t 4.1, s, q" tags = "RotateBy, Reverse" autotest...
from setuptools import setup, find_packages from setuptools.extension import Extension from Cython.Build import cythonize import os current_dir = os.path.dirname(os.path.realpath(__file__)) setup(name='pngpack-py', version='1.0.0', url='https://github.com/axiom-data-science/pngpack/', author='Axiom...