content
stringlengths
5
1.05M
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # Copyright 2018 New Vector Ltd # # 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...
#!/usr/bin/python # Copyright (c) 2012 Aravinda VK<mail@aravindavk.in> # http://aravindavk.in # MIT 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 restriction, including # w...
import pandas as pd import numpy as np from functools import partial from time import time def main(): df = pd.read_stata("/tmp/St21133.000002") df['price_k'] = df.groupby('j')['price'].transform('std') timer = time() df['priceA3'] = df.groupby( ['foreign'], sort = False ).apply( ...
from enum import IntEnum from typing import NamedTuple class IcmpType(IntEnum): """ Enum of ICMP types, doesn't include deprecated, unassigned, reserved and experimental types """ ECHO_REPLY = 0 DEST_UNREACHABLE = 3 REDIRECT = 5 ECHO_REQUEST = 8 ROUTER_ADVERTISEMENT = 9 ROUTER_...
import argparse import os import urllib.request import caffe_classes import cv2 import numpy as np import sys import tensorflow as tf # todo https://gist.github.com/zhenglaizhang/f672f72d854d89d20c4dd1f1cece662e # todo conv2d http://www.cnblogs.com/welhzh/p/6607581.html def max_pooling_layer(x, kHeight, kWidth, stri...
#!/usr/bin/env python __author__ = 'jessada' import sys import argparse import tempfile from os.path import join as join_path import subprocess # for creating temp file from random import choice from string import ascii_letters # for parsing into ExAC format import numpy as np import numpy.lib.recfunctions as rfn ...
import math # konstanta pi di dapat dari modul math (3.146) import os def main(): # menampilkan informasi program print("Luas dan Keliling Lingkaran\n") # input jari-jari r = float(input("Masukan nilai jari-jari : ")) # menghitung luas lingkaran # luas = pi.r2 l = math.pi * (r**2) #...
import sys import win32com.client openedDoc = win32com.client.Dispatch("Excel.Application") filename= sys.argv[1] password_file = open ( 'wordlist.lst', 'r' ) passwords = password_file.readlines() password_file.close() passwords = [item.rstrip('\n') for item in passwords] results = open('results.txt', 'w') for pass...
""":mod:`GiantOmelette` -- Contains the GiantOmelette class .. module:: GiantOmelette :synopsis: Contains the GiantOmelette class .. moduleauthor:: Joshua Gilman <joshuagilman@gmail.com> """ from neolib.daily.Daily import Daily from neolib.exceptions import dailyAlreadyDone from neolib.exceptions import parseExcep...
# Given a stair with 'n' steps, implement a method to count how many possible ways are there to reach the top of the staircase, # given that, at every step you can either take 1 step, 2 steps, or 3 steps. # Fibonacci Numbers Pattern # From the first sight it looks very similar to Coin Change Problem - Unbounded KS P...
# -*- coding: utf-8 -*- """This script designs a simple diff amp with gain/bandwidth spec for BAG CICC paper.""" import math import os import pprint import matplotlib.pyplot as plt import yaml import numpy as np import scipy.optimize as sciopt import scipy.interpolate as interp import numpy as np import h5py from bag...
import py_gnmicli import json import time from Tkinter import * from Tkinter import W class Application: def __init__(self, master): self.master = master master.title('gNMI GUI') self.mode = self.CreateRadioMode(master) self.getcerts = self.CreateRadioCerts(master) self.apnameentry = self.CreateA...
#encoding: utf-8 """ feedback.py -- Feedback figure showing phase-code retrieval due to single cues Created by Joe Monaco on 2010-10-12. Copyright (c) 2009-2011 Johns Hopkins University. All rights reserved. This software is provided AS IS under the terms of the Open Source MIT License. See http://www.opensource.or...
# Generated by Django 2.0.5 on 2018-06-08 01:04 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Address', fields=[ ('addres...
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
import tokenizer import writeToFile from sys import argv from subprocess import check_output from os import getcwd, system run_list = ["f", "false", "False", "n", "no"] def main(filename, is_run_go): try: from colorama import init, Fore init(autoreset=True) print(Fore.BLUE ...
from custom.apps.gsid.reports.sql_reports import GSIDSQLPatientReport, GSIDSQLByDayReport, GSIDSQLTestLotsReport, \ GSIDSQLByAgeReport, PatientMapReport CUSTOM_REPORTS = ( ('Custom Reports', ( GSIDSQLPatientReport, GSIDSQLByDayReport, GSIDSQLTestLotsReport, GSIDSQLByAgeReport, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import uber_agent.city def simulate(agent, num_trials=2000, time_limit=12 * 3600, training=True): city = uber_agent.city.City.load() trip_generator = uber_agent.city.TripGenerator(city) reward_history = [] for i in range(num_trials): simulator = Si...
import json from server import objects class ScanJson(objects.StrelkaScanner): """Collects keys from JSON files.""" def scan(self, file_object, options): self.metadata.setdefault("keys", []) try: self._get_keys(self, json.loads(file_object.data.decode())) except UnicodeD...
"""Support for retrieving meteorological data from FMI (Finnish Meteorological Institute).""" from datetime import timedelta import logging from dateutil import tz import fmi_weather_client as fmi from fmi_weather_client.errors import ClientError, ServerError import voluptuous as vol # Import homeassistant platform ...
#!/usr/bin/env python """ Merges two unique lists of JSON conformer search results. Uses heuristics to reduce the number of required comparisons. Assumptions: - both files only contain data from the same molecule. - all geometries have the same element ordering (but not necessarily the same atom-atom mapping b...
import unittest from pyswip import Prolog, registerForeign, PL_foreign_context, PL_foreign_control, PL_FIRST_CALL, PL_REDO, PL_PRUNED, PL_retry, PL_FA_NONDETERMINISTIC, Variable class MyTestCase(unittest.TestCase): def test_deterministic_foreign(self): def hello(t): print("Hello,", t) ...
from flask import request, render_template from models.User import * from __init__ import app from services.Account import AccountManager as account from services.Reply import ReplyService as replyService import flask from DTOs.UserDTO import UserDTO from DTOs.ThreadDTO import ThreadDTO from DTOs.ReplyDTO import ReplyD...
import cv2 import numpy as np im = cv2.imread('me.jpg') cv2.imshow('org', im) # 锐化算子 sharpen_1 = np.array([ [-1, -1, -1], [-1, 9, -1], [-1, -1, -1]]) # 使用filter2D进行滤波操作 im_sharpen1 = cv2.filter2D(im, -1, sharpen_1) cv2.imshow('sharpen_1', im_sharpen1) # 锐化算子2 sharpen_2 = np.array([ [0, -1, 0], [-1...
import pygame, time import pong_physics pygame.init() screen = pygame.display.set_mode( pong_physics.field_size ) pygame.display.set_caption("Pong") screen.fill((255,255,255)) pygame.mixer.init(frequency=44100, size=-16, channels=2, buffer=256) pygame.mixer.music.load('tock2.wav') tnext = None dt = 0.05 run = 1 mo...
import unittest import os import utils.log_util as logger from data_cleanup_toolbox import Pipelines class TestRun_gene_prioritization_pipeline(unittest.TestCase): def setUp(self): logger.init() self.run_parameters = { "spreadsheet_name_full_path": "../../data/spreadsheets/TEST_1_gene_...
import os from setuptools import setup, find_packages longDesc = '' if os.path.exists('README.md'): longDesc = open('README.md').read().strip() version = '' version_path = os.path.join('botstory', 'version.txt') if os.path.exists(version_path): version = open(version_path).read().strip() setup( name='bo...
import dash_bootstrap_components as dbc from dash import html from .util import make_subheading cards = html.Div( [ make_subheading("Card", "card"), dbc.CardGroup( [ dbc.Card( [ dbc.CardHeader("Header"), ...
import os # NOQA import sys # NOQA import re # NOQA import math # NOQA import fileinput from string import ascii_uppercase, ascii_lowercase # NOQA from collections import Counter, defaultdict, deque, namedtuple # NOQA from itertools import count, product, permutations, combinations, combinations_with_replacement ...
# -*- coding: utf-8 -*- import abc import time from . import exceptions class IStopStrategy(object): __metaclass__ = abc.ABCMeta @abc.abstractmethod def should_stop(self, attempt): """ Parameters ---------- attempt : clare.common.retry.attempt.Attempt Returns ...
#!/usr/bin/env python # coding: utf-8 import jieba import copy import jieba.posseg as pseg from .tokenizer import Tokens, Tokenizer #jieba.load_userdict('/home/sulixin/relate/DrQA_Sougou/data/user_dict_ans.txt') class JiebaTokenizer(Tokenizer): def __init__(self, **kwargs): """ Args: a...
from django.contrib.admin.decorators import register from ordered_model.admin import OrderedModelAdmin from projetodj.modulos.models import Modulo, Aula @register(Modulo) class ModuloAdmin(OrderedModelAdmin): list_display = ('titulo', 'publico', 'move_up_down_links') prepopulated_fields = {'slug': ('titulo',...
import copy import datetime import json import unittest import mintapi import mintapi.api accounts_example = [{ "accountName": "Chase Checking", "lastUpdated": 1401201492000, "lastUpdatedInString": "25 minutes", "accountType": "bank", "currentBalance": 100.12, }] class MockResponse: def __in...
""" A subpackage with a collection of realized algorithms. """ from .ant_colony import AntColony from .bees_colony import BeesColony from .branch_and_bound import BranchAndBound from .genetic_algorithm import GeneticAlgorithm from .simulated_annealing import SimulatedAnnealing __all__ = [ "AntColony", "BeesC...
# -*- coding: utf-8 -*- import discord from init.bot import Bot from discord.ext import commands from utils.frontend import get_ban_embed, get_unban_embed, get_warn_embed, get_kick_embed, get_warns_message, get_muted_message, get_unmuted_message, get_nickname_message, get_rules_embed from database.users import add_war...
from typing import Any, List, Set, Tuple, Type from google.appengine.ext import ndb from backend.common.models.cached_model import TAffectedReferences from backend.common.models.district_team import DistrictTeam from backend.common.models.event import Event from backend.common.models.event_team import EventTeam from ...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^clientes/$', views.ClienteListView.as_view(), name='cliente-list'), url(r'^clientes/create/$', views.ClienteCreateView.as_view(), name='cliente-create'), url(r'^clie...
from django.apps import AppConfig class ClaimConfig(AppConfig): name = 'trive.apps.claim' verbose_name = "Claims" def ready(self): from . import receivers
from .text import * from .extract import * from .analyze import * from .features import * from .preprocessing import * from .corpus import * from .clustering import *
""" TODO """ from pyderl.utils.gym_wrappers import atari from pyderl.utils.gym_wrappers import general
import numpy as np import matplotlib.pyplot as plt import pandas as pd from pathlib import Path from collections import Counter, defaultdict # Text Processing Packages import re import string import spacy import nltk from nltk.stem import SnowballStemmer from nltk.corpus import stopwords nltk.download('stopwords') # ...
"""Meetup API wrapper.""" from datetime import datetime import json import logging import redis import requests __all__ = 'APIWrapper', _logger = logging.getLogger(__name__) class APIWrapper: """Wrapper around the meetup.com API.""" def __init__(self, api_key): self.api_key = api_key def _g...
# This code is part of Qiskit. # # (C) Copyright IBM 2021. # # 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 modifications or derivative wo...
import discord from discord.ext import commands #https://www.youtube.com/watch?v=4JptXXkqiKU&list=PLSCgthA1Anif1w6mKM3O6xlBGGypXtrtN&index=10 class Cog_Extension(commands.Cog): def __init__(self,bot): self.bot = bot
from .recommendation_base import RecommendationBase, Node, Edge, MultiKNN from .content_recommender import ContentRecommendation from .gcn_ncf import GcnNCF from .embed import BaseEmbed, CategoricalEmbed, NumericEmbed, FlairGlove100Embed, FlairGlove100AndBytePairEmbed, FastTextEmbed, IdentityEmbedding, FeatureHashingEm...
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC. 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 requir...
import data_manager as dm import numpy as np from tokenizers import Tokenizer import pandas as pd import pickle import os import sys data = pd.read_pickle("./CustomRecipesFilter.pkl") #dm.plot_statistic('totInstructions') #dm.plot_statistic('totIngredients') threshold = 0 #1. Select a random query while threshold<0....
from SmartAPI.common.PROPERTY import PROPERTY from SmartAPI.common.RESOURCE import RESOURCE from SmartAPI.model.Obj import Obj from SmartAPI.common.Tools import Tools from SmartAPI.rdf.Resource import Resource from SmartAPI.rdf.types import * from rdflib import XSD import traceback class Address(Obj): def __init__...
# Generated by Django 3.2.3 on 2021-10-05 10:42 import checks.models from django.db import migrations, models import enumfields.fields class Migration(migrations.Migration): dependencies = [ ('checks', '0007_null_mx'), ] operations = [ migrations.AddField( model_name='domain...
import os.path as osp import numpy as np import cv2 import pickle import glob import matplotlib.pyplot as plt from lane import LaneLinesTracker # Read in the saved objpoints and imgpoint TEST_IMG_DIR = 'test_images' OUTPUT_IMG_DIR = 'output_images' CAL_DIR = 'camera_cal' dist_pickle = pickle.load(open(osp.join(CAL_DIR...
from decimal import Decimal import datetime from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.utils.translation import ugettext_lazy as _ import requests from djmoney.models.fields import MoneyField from djmoney.money import Money from pycon.model...
import pytest from munch import Munch, DefaultMunch def test_from_yaml(yaml): data = yaml.load(''' Flow style: !munch.Munch { Clark: Evans, Brian: Ingerson, Oren: Ben-Kiki } Block style: !munch Clark : Evans Brian : Ingerson Oren : Ben-Kiki ''', Loader=yaml.FullLoader) assert da...
from argparse import ArgumentParser import pyperclip import random import string import sys import time def print_animated(text, multiline=False, delay=0.05, base=None): if multiline: if base is not None: for line in text: print(base * len(line)) print("\r"*len(text), end="") for line in text: for c...
# Time: O((R * C)^2) # Space: O(1) # This question is about implementing a basic elimination algorithm for Candy Crush. # # Given a 2D integer array board representing the grid of candy, # different positive integers board[i][j] represent different types of candies. # A value of board[i][j] = 0 represents that the ce...
import numpy as np import logging try: from obspy.signal.invsim import paz_to_freq_resp except: from obspy.signal.invsim import pazToFreqResp as paz_to_freq_resp try: from obspy.signal.invsim import paz_2_amplitude_value_of_freq_resp except: from obspy.signal.invsim import paz2AmpValueOfFreqResp as paz...
"""Methods for creating interesting polynomials, e.g. for benchmarking """ from sympy import Add, Integer, Symbol from sympy.polys.integerpolys import ( zzX_zero, zzX_const, zzX_lift, zzx_from_dict, zzX_add_term, zzX_mul, zzX_sqr, zzX_neg) def fateman_poly_F_1(n): """Fateman's GCD benchmark: trivial GCD ...
print('>' + 'ABC'.center(10) + '<')
import sys import lmdb import binascii from PIL import Image import numpy as np import sympy as sp #from sympy.combinatorics.graycode import bin_to_gray from decbingray import * #from hilbert_curve import d2xy # Mahoney Maps is the thing I was looking for # http://davidbonal.com/karnaugh-and-mahoney-map-m...
from __future__ import absolute_import from ocrd_cis import get_ocrd_tool import re import sys import os.path import json import subprocess from ocrd_utils import ( getLogger, concat_padded, points_from_x0y0x1y1, MIMETYPE_PAGE ) from ocrd_modelfactory import page_from_file from ocrd_models.ocrd_page import ...
# -*- coding: utf-8 -*- # Copyright 2022 Johannes H. # # 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 o...
#!/usr/bin/python3 # -*- coding: utf-8 -*- # folddup_m.py from pathlib import Path from tqdm import tqdm import filecmp import group import itertools import multiprocessing as mp import os def folddup(pair): while True: try: f1,f2 = pair dcmp = filecmp.dircmp(f1,f2) if ...
from abc import abstractmethod import tensorflow as tf import numpy as np import tensorflow.contrib.layers as layers from models import network import libs class VVNet(network.Network): def __init__(self, reuse, is_training, wd=0.0005): super(VVNet, self).__init__() self._original_volume = np.arr...
"""Relaxation methods for linear systems.""" from warnings import warn import numpy as np from scipy import sparse from scipy.linalg import lapack as la from ..util.utils import type_prep, get_diagonal, get_block_diag from ..util.params import set_tol from ..util.linalg import norm from .. import amg_core def mak...
import re from lxml.etree import SubElement from oem import patterns, CURRENT_VERSION from oem.base import ConstraintSpecification, Constraint from oem.tools import require from oem.components.types import State class ConstrainDataSectionEpochOrder(Constraint): """Apply constraints to data section state epochs....
#!/usr/bin/env python import string import re import nltk from nltk import ngrams, tokenize from nltk.corpus import stopwords, machado from nltk.tokenize import RegexpTokenizer def preprocess(sentence, lang='english'): sentence_raw = sentence.lower() tokenizer = RegexpTokenizer(r'\w+') sentence...
from active_projects.ode.part3.staging import * from active_projects.ode.part3.temperature_graphs import * OUTPUT_DIRECTORY = "ode/part3" SCENES_IN_ORDER = [ FourierSeriesIllustraiton, FourierNameIntro, CircleAnimationOfF, LastChapterWrapper, ThreeMainObservations, SimpleSinExpGraph, ]
import numpy as np import sympy from nipy.modalities.fmri import formula, utils, hrf import pylab t = formula.Term('t') def linBspline(t, knots): """ Create a linear B spline that is zero outside [knots[0], knots[-1]] (knots is assumed to be sorted). """ fns = []; symbols=[] knots = np.array(knot...
import pyhive # cursor = hive.connect(host='localhost', port='10000').cursor() # cursor.execute('create table cart(id varchar(50), title varchar(50), actor varchar(50), director varchar(50), \ # time varchar(50), price float, genre varchar(50), review int)') # cursor.close() # cursor.execute('drop ta...
import setuptools import versioneer setuptools.setup(version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass())
from django.apps import AppConfig class GetConfig(AppConfig): name = 'get_'
import click from brownie import ( accounts, Rentable, ORentable, YRentable, WRentable, EmergencyImplementation, ProxyFactoryInitializable, history, ) def main(): dev = accounts.load("dev") governance = "0xC08618375bb20ac1C4BB806Baa027a4362156fE6" operator = "0x49941c69469...
import math arr_CQI_2_MCS = [0,2,4,6,8,9,10,13,16,17,19,21,23,25,28] arr_MCS_2_ITBS = [0,1,2,3,4,5,6,7,8,9,9,10,11,12,13,14,15,15,16,17,18,19,20,21,22,23,24,25,26] # for 25 PRB arr_ITBS_2_TBS = [680,904,1096,1416,1800,2216,2600,3112,3496,4008,4392,4968,5736,6456,7224,7736,7992,9144,9912,10680,11448,12576,13536,1411...
from abc import abstractmethod from dataclasses import dataclass from datetime import datetime from typing import (TYPE_CHECKING, Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union) from frozendict import frozendict from cyan.bot import Bot from cyan.model import ChattableModel...
############################################################################################## #### #### #### data augmentation method "Robust Learning Method", for Video Segmentations #### #### use brightness modifications ...
import json from test.test_helper import TestCase import shopify class PriceRuleTest(TestCase): def setUp(self): super(PriceRuleTest, self).setUp() self.fake("price_rules/1213131", body=self.load_fixture("price_rule")) self.price_rule = shopify.PriceRule.find(1213131) def test_get_pr...
""" """ import logging from django.conf import settings import requests logger = logging.getLogger("quotas") def is_admin(request): # v2 admin_collab = CollabService(request, collab_id="neuromorphic-platform-admin") if admin_collab.is_team_member: return True else: return False cl...
import sys import PyQt5.QtWidgets as Widget from PyQt5.QtCore import Qt from PyQt5.QtWebEngineWidgets import QWebEngineView import networkx as nx from graph_object import Graph, productGraph from pyvis.network import Network class MainProgram(Widget.QComboBox): def __init__(self): super(MainProgram, self)...
import pytest import cased from cased.tests.util import mock_requests from cased.http import HTTPClient import requests import responses from responses import GET, POST, PATCH, PUT, DELETE, HEAD class TestHTTPClient(object): @responses.activate def test_http_client_get(self): mock_requests("/data", ...
# coding: utf-8 """ DataHub API DataHub API OpenAPI spec version: 0.0.11 Generated by: https://github.com/swagger-api/swagger-codegen.git 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...
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2014 Dean Jackson <deanishe@deanishe.net> # # MIT Licence. See http://opensource.org/licenses/MIT # # Created on 2014-02-15 # """ A Python helper library for `Alfred 2 <http://www.alfredapp.com/>`_ Workflow authors. Alfred Workflows typically take user input, ...
from math import pi, log, sqrt import matplotlib as mpl; mpl.use("Qt5Agg") import matplotlib.pyplot as plt def rayleigh(density_melt, thermal_expansivity, gravity, temp_surface, temp_depth, depth, thermal_diffusivity, dynamic_viscosity): temp_difference = temp_depth - temp_surface ra = (density_melt * thermal...
class Script(object): START_MSG = """Hi <b>{}, </b> I'm <b>Samantha v2.O</b> Auto Filter Bot Specially Made For 2kTamilmovies Controlled By [This Person](https://t.me/DChoco_Boy) 😎 """ HELP_MSG = """ <i>No One Gonna Help You 🤣</i> """ ABOUT_MSG = """ Hi I'm <b>Samantha v2.O</b> Auto Filter Bot Spe...
import argparse import itertools from pathlib import Path import shutil import torch def convert_ckpt(src, dest): if not src.exists(): print(f'SKIPPING NON-EXISTING: {src.name}') return if dest.exists(): print(f'SKIPPING CKPT: {src.name} -> {dest}') return ckpt = torch....
def beautify(string): return string.replace('_', ' ').replace('-', ' ').title() def unbeautify(string): return string.replace(' ', '-').lower() MAX_LEN = 40 def generate_short_title(title): short_title = title or 'Untitled' if len(title) >= MAX_LEN: short_title = title[:MAX_LEN - len(' ... ')]...
from rest_framework.authtoken.views import ObtainAuthToken from .throttling import AuthRateThrottle class ObtainAuthTokenView(ObtainAuthToken): throttle_classes = [AuthRateThrottle] obtain_auth_token = ObtainAuthTokenView.as_view()
#!/usr/bin/env python # -*- coding=utf-8 -*- import os from flask import Flask from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) '''优化前端返回中文数据进行正常显示,用于flask restful api接口开发使用''' app.config.update(RESTFUL_JSON=dict(ensure_ascii=False)) app.config['JSON_AS_ASCII'] = False app.secret_key = os.urandom(32) "...
import json import random import requests from requests import Timeout from src.configuration import URL, NEXMO_API_KEY, NEXMO_API_SECRET, DEFAULT_PHONE_NUMBER class TindevQA(): users = ['Sara', 'Alexandra', 'Leia'] # users = ['Sara', 'Alexandra', 'Bryan', 'Luke', 'Leia', 'Daniel', 'Noa', 'Noah', 'Martina',...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not ...
from website.models import Article, Source, CommentAuthor, Comment, History, Tag from wikum.settings import DISQUS_API_KEY, PRAW_USERNAME, PRAW_PASSWORD, PRAW_CLIENT_ID, PRAW_CLIENT_SECRET import urllib import json import praw import datetime from django.utils import timezone import re import requests USER_AGENT = "we...
from ..auth import Auth DEVICE_DEFAULT_PARAMS = { "include": '["Device"]' } class Device: """Class that represents a Device object in the Blastbot Cloud API.""" def __init__(self, raw_data: dict, auth: Auth): self.raw_data = raw_data self.auth = auth @property def id(self) -> in...
#!/usr/bin/env python # Copyright 2018 National Technology & Engineering Solutions of Sandia, LLC # (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. # Government retains certain rights in this software. import sys import os import shlex import time import fnmatch import signal import subprocess ...
import os import itertools import functools from collections import defaultdict import csv import pandas as pd __author__ = 'Junya Kaneko <jyuneko@hotmail.com>' def column_name(model_name, kind, name=None): if name is not None: return '%s__%s__%s' % (model_name, kind, name) else: return '%s_...
# Copyright (C) 2019 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Integration tests for VerifiedDate mixin""" from ggrc.models.assessment import Assessment from integration.ggrc import TestCase from integration.ggrc.models import factories from integration.ggrc import ...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Project' db.create_table('job_runner_project', ( ('id', self.gf('django.db.model...
""" Creates an Xcode Core Data file. """ import os from xml.dom import minidom from lxml import etree from signals.parser.fields import Relationship, Field from signals.generators.ios.conversion import get_proper_name DATA_TYPES = { Field.DATE: "Date", Field.DATETIME: "Date", Field.INTEGER: "Integer 32", ...
import json from multiprocessing import Pool, get_context from itertools import combinations from algorithms.base_matcher import BaseMatcher from data_loader.instance_loader import InstanceLoader import algorithms.distribution_based.discovery as discovery from algorithms.distribution_based.clustering_utils import pro...
from os import path import sys import unittest from test_utils import get_content , PRESETS_DIR from tz import TZ , Article import httpretty class TestGetArticles(unittest.TestCase): def setUp(self): httpretty.HTTPretty.enable() httpretty.register_uri(httpretty.HTTPretty.GET,'http://thezine.biz',body=get_co...
# # PySNMP MIB module FASTPATH-OUTBOUNDTELNET-PRIVATE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/FASTPATH-OUTBOUNDTELNET-PRIVATE-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:12:19 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Usi...
from django.apps import AppConfig class SchemeConfig(AppConfig): name = 'scheme'
import pyblish.api class ExtractAvaModel(pyblish.api.InstancePlugin): """Produce a stripped down Maya file from instance This plug-in takes into account only nodes relevant to models and discards anything else, especially deformers along with their intermediate nodes. """ label = "Model" ...