text
stringlengths
957
885k
# Copyright 2021 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
################################################################################ # https://github.com/rhoposit/style_factors # # Centre for Speech Technology Research # University of Edinburgh, UK # Copyright (c) 2014-2015 # A...
import json from functools import partial, reduce from collections import namedtuple from urllib.parse import unquote from itertools import groupby import boto3 import time import re s3 = boto3.resource('s3') pipe = lambda *args: lambda x: reduce(lambda a, fn: fn(a), args, x) S3Object = namedtuple('S3MetaData', ('buc...
<reponame>celio-jpeg/bev import datetime import time from sawtooth_sdk.processor.handler import TransactionHandler from sawtooth_sdk.processor.exceptions import InvalidTransaction from simple_supply_addressing import addresser from simple_supply_protobuf import payload_pb2 from simple_supply_tp.payload import BevPa...
<gh_stars>0 import os import cv2 import sys import json import copy import collections import numpy as np from tqdm import tqdm import paddle from paddle.io import Dataset sys.path.insert(0, "../") class DocVQAExample(object): def __init__(self, question, doc_tokens, ...
#coding:utf-8 # # id: bugs.core_4403 # title: Allow referencing cursors as record variables in PSQL # decription: # tracker_id: CORE-4403 # min_versions: ['3.0'] # versions: 3.0, 4.0 # qmid: None import pytest from firebird.qa import db_factory, isql_act, Action # version: 3.0 # reso...
# (c) Copyright [2017] Hewlett Packard Enterprise Development LP # # 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...
from mental_models import utils from itertools import combinations from collections import defaultdict class AutoMap(object): def __init__(self, text=None, nlp=None, delete_list=None): nlp = nlp if not nlp: nlp = utils.nlp_en self.raw_text = text.strip()\ ...
<filename>10_for.py<gh_stars>0 # chapter04_02 # For 반복문 # for in <집합의모음(튜플 리스트 딕셔너리 등등)>: # (반복문) 형식 for v1 in range(10): # 0부터시작해서 9까지 print('v1 is :', v1) for v2 in range(1, 11): # 1부터 10까지 print('v2 is', v2) for v3 in range(1, 11, 2): # 1부터 10까지중 2단위로 print('v3 is', v3) # 1~1000...
<reponame>liangleslie/core """Support for ONVIF Cameras with FFmpeg as decoder.""" from __future__ import annotations from haffmpeg.camera import CameraMjpeg from onvif.exceptions import ONVIFError import voluptuous as vol from yarl import URL from homeassistant.components import ffmpeg from homeassistant.components....
<gh_stars>0 # -*- coding: utf-8 -*- from sklearn.datasets import fetch_olivetti_faces from sklearn.model_selection import train_test_split from os import mkdir, listdir, getcwd from os.path import join, exists from cv2 import imwrite from shutil import rmtree from torchvision.datasets import ImageFolder from torchvisio...
"""Simple module providing a quaternion class for manipulating rotations easily. Note: all angles are assumed to be specified in radians. Note: this is an entirely separate implementation from the PyOpenGL quaternion class. This implementation assumes that Numeric python will be available, and provides only t...
<filename>Vocoder_train.py<gh_stars>0 #encoding:utf-8 import random import numpy as np import glob import os import itertools import time import torch import torch.nn as nn import torch.optim as optim import torch.utils.data as data import torchvision from torchvision import models,transforms import torchvision.utils...
from pykeepass import PyKeePass class MoreThanOneServersGroupError(Exception): """if there is more than one servers group outside recycle bin in KP""" class NoServerGroupError(Exception): """No server group was found to get data.""" class ServersGroupPresentError(Exception): """If first run, there sho...
import sys from db_handler import DBHandler from osm_handler import OSMHandler def get_args(): import argparse p = argparse.ArgumentParser(description="Data preparation for Miami's OSM Building import") p.add_argument('-setup', '--setup', help='Set up Postgres DB.', action='store_true') p.add_argument(...
import abc import logging import os import random import tempfile import threading from streamlink.compat import is_py3, is_win32 if is_win32: from ctypes import windll, cast, c_ulong, c_void_p, byref log = logging.getLogger(__name__) _lock = threading.Lock() _id = 0 ABC = abc.ABCMeta('ABC', (object,), {'__slo...
<gh_stars>0 from datetime import datetime from epaper.appconfig import AppConfig from epaper.epaper import EPaper from epaper.scraper import Scraper from epaper.ui import UI import click import epaper import json import logging import os logger = logging.getLogger('cli') def doit(interactive=True, publicati...
try: from . import generic as g except BaseException: import generic as g class VoxelTest(g.unittest.TestCase): def test_voxel(self): """ Test that voxels work at all """ for m in [g.get_mesh('featuretype.STL'), g.trimesh.primitives.Box(), ...
<reponame>cjshearer/project-athena<gh_stars>0 from utils.model import load_pool, load_lenet from utils.file import load_from_json from utils.metrics import error_rate, get_corrections from models.athena import Ensemble, ENSEMBLE_STRATEGY import os import numpy as np def collect_raw_prediction(trans_configs, model_co...
<filename>klever/core/vtg/emg/common/process/test_process.py # # Copyright (c) 2021 ISP RAS (http://www.ispras.ru) # Ivannikov Institute for System Programming of the Russian Academy of Sciences # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the...
<reponame>stjordanis/catalyst-1<filename>catalyst/engines/xla.py from typing import Any, Callable, Dict, Optional import numpy as np import torch from torch.utils.data import DataLoader from catalyst.engines.torch import DeviceEngine from catalyst.settings import SETTINGS if SETTINGS.xla_required: import torch_...
<filename>benchmarks/midi_msg.py """ msg.py - MIDI messages http://www.midi.org/techspecs/midimessages.php New messages are created with mido.new() or mido.Message(), which both return a message object. """ from __future__ import print_function from collections import namedtuple # Pitchwheel is a 14 bit signed int...
import torch import torch.nn as nn import torch.nn.functional as F from DiffNet.networks.dgcnn import DGCNN2D class ConvNet(nn.Module): def __init__(self, inchannels, outchannels, hchannels, kernel=2, nonlin=nn.ReLU(), final_nonlin=nn.Identity()): super(ConvNet, self).__init__() self.in_c...
<gh_stars>1-10 from django.http import Http404 from rest_framework.views import APIView from pandas_drf_tools import mixins class GenericDataFrameAPIView(APIView): """Base class for all other generic DataFrame views. It is based on GenericAPIView.""" # You'll need to either set these attributes, # or ov...
import time import numpy as np import rospy import tf from nav_msgs.msg import Odometry from geometry_msgs.msg import Point, Pose, Quaternion, Twist, Vector3 from tracker.filters.robot_kalman_filter import RobotFilter from tracker.vision.vision_receiver import VisionReceiver from tracker.constants import TrackerConst...
from __future__ import print_function import subprocess import tempfile import os import argparse import sys import stat import logging def popen(cmd): logger.info('Running the following command: %s', ' '.join(cmd)) proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stde...
''' Python bindings for libmit. (c) Mit authors 2019-2020 The package is distributed under the MIT/X11 License. THIS PROGRAM IS PROVIDED AS IS, WITH NO WARRANTY. USE IS AT THE USER’S RISK. ''' from ctypes import ( CDLL, CFUNCTYPE, POINTER, c_char_p, c_int, c_size_t, c_ssize_t, c_void_p, pointer, sizeof ) fr...
<filename>models/np.py import torch from torch import nn from torch.distributions import Normal from torch.nn import functional as F from utils import img_mask_to_np_input class Encoder(nn.Module): """Maps an (x_i, y_i) pair to a representation r_i. Parameters ---------- x_dim : int Dimensio...
import pandas as pd from pandas import Series, DataFrame # numpy, matplotlib, seaborn import numpy as np import matplotlib.pyplot as plt import seaborn as sns #To display header rows and description of the loaded dataset stud_df=pd.read_csv('StudentsPerformance.csv') print("======Data Headers=======") print(stud_df.h...
<reponame>LanetheGreat/mcmaps # Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # Ported by <NAME> 2020. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public Licen...
<reponame>minhooo/Sweetheart<gh_stars>0 import cv2 import numpy as np from os import makedirs from os.path import isdir from flask import Flask, jsonify from flask_restful import Resource, Api, reqparse from flask_cors import CORS import os from os import listdir from os.path import isfile, join import sys #얼굴 저장 함수 f...
<reponame>JurgenVanGorp/MCP23017-multi-IO-control-on-a-Raspberry-Pi-with-I2C<gh_stars>0 #!/usr/bin/env python """ MCP23017 Control Service. A service that acts as an interface between (e.g. Home Assistant) clients and the I2C bus on a Raspberry Pi. Author: find me on codeproject.com --> JurgenVanGorp """ import traceb...
# import modules ---------------------------------------- import trimesh from shapely.geometry import LineString import numpy as np import matplotlib.pyplot as plt import timeit # Load in STL file -------------------------------------- start = timeit.default_timer() #start timer stl_mesh = trimesh.load_mesh("3DBenchy...
<reponame>InnovArul/DIGITS # Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import from flask.ext.wtf import Form import os from wtforms import validators from digits import utils from digits.utils import subclass from digits.utils.forms import validate_required_if_set ...
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 from collections import namedtuple import torch SymmArrowhead = namedtuple("SymmArrowhead", ["top", "bottom_diag"]) TriuArrowhead = namedtuple("TriuArrowhead", ["top", "bottom_diag"]) def sqrt(x): """ EXPERIMENTAL Computes...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2022, pysat development team # Full license can be found in License.md # ----------------------------------------------------------------------------- """Routines to match modelled and observational data.""" import datetime as dt import numpy as np import p...
<filename>bokeh/models/markers.py #----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------...
<filename>tensorflow/pmctree.py # !/usr/bin/python # -*- coding:utf-8 -*- import multiprocessing as mp import tensorflow as tf from sub_tree import sub_tree from sub_tree import node import sys import logging import time import Queue import numpy as np from treelib import Tree import copy from utils import compute_bl...
<gh_stars>1-10 import numpy as np import time import cv2 import torch from torch.autograd import Variable import OCR.lib.utils.utils as utils import OCR.lib.models.crnn as crnn import OCR.lib.config.alphabets as alphabets import yaml from easydict import EasyDict as edict import argparse def parse_arg(): parser = ...
def ReadWebFile(url, time_range, filter = None): import http.client import ssl timeout = 5 try: [proto, _] = url.split("://") hostname = _.split("/")[0] path = _[len(hostname):] if proto == "https": ssl_context = ssl._create_unverified_context() ...
import datetime import glob import json import logging import os import re import shutil import socket import subprocess import sys import work_queue as wq from collections import defaultdict, Counter from hashlib import sha1 from lobster import fs, util from lobster.cmssw import dash from lobster.core import unit fr...
<gh_stars>1-10 #Author: <NAME> import matplotlib.pyplot as plt import math import logging log = logging.getLogger(__name__) from .img_utils import * def calculate_rdf(filteredvertices,rows,cols,scale, increment = 4, progress = False): '''Calculates RDF from list of vertices of particles. :param list filte...
<reponame>jacklee1792/spiggy import base64 import gzip import io import json import re import struct from pathlib import Path from typing import Any, BinaryIO, Dict, List, Optional, Tuple, Union from backend import constants _here = Path(__file__).parent with open(_here/'exceptions/enchants.json') as f: ENCHANT_...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jan 18 2021 CO2 emissions for MSOAs or LSOAs combining 2 years at a time, IO part adapted from code by <NAME> @author: lenakilian """ import pandas as pd import pickle import numpy as np df = pd.DataFrame ################ # IO functions # ##########...
import unittest import ast import mock from kalliope.core.Models.Player import Player from kalliope.core.Models.Tts import Tts from kalliope.core.Models.Trigger import Trigger from kalliope.core.Models.Stt import Stt from kalliope.core.Models.RestAPI import RestAPI from kalliope.core.Models.Dna import Dna from ka...
<gh_stars>10-100 # !/usr/bin/env python # -*- coding: utf-8 -*- """ Defines the unit tests for the :mod:`colour_hdri.exposure.common` module. """ import numpy as np import unittest from colour_hdri.exposure import ( average_luminance, average_illuminance, luminance_to_exposure_value, illuminance_to_exposure_v...
# -*- coding: utf-8 -*- """ @author: hsowan <<EMAIL>> @date: 2019/10/28 爬取稻壳网站上的word """ import json import os import re import time from pymongo import MongoClient from selenium import webdriver from time import sleep from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.web...
<gh_stars>1-10 from xml.dom.pulldom import default_bufsize import preprocessor as p import matplotlib.pyplot as plt import re import string import numpy as np from nltk.corpus import stopwords import nltk import matplotlib.pyplot as plt from wordcloud import WordCloud, STOPWORDS from datetime import datetime from PIL i...
<gh_stars>10-100 from __future__ import absolute_import, print_function import numpy as np import warnings def _bit_length_26(x): if x == 0: return 0 elif x == 1: return 1 else: return len(bin(x)) - 2 try: from scipy.lib._version import NumpyVersion except ImportError: i...
<reponame>HaujetZhao/Caps_Writer<filename>src/moduels/gui/Tab_Config.py import webbrowser from PySide2.QtCore import Signal from PySide2.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QGridLayout, QGroupBox, QPushButton, QCheckBox from moduels.component.NormalValue import 常量 from moduels.gui.Group_EditableList imp...
import tkinter as tk from tkinter import ttk from tkinter import filedialog import PyPDF2 class Application(tk.Frame): def __init__(self, root=None): super().__init__(root) self.root = root self.file_list = [] self.btn_frame = tk.Frame(self) # Buttons self.input_but...
from time import time import json import hashlib import re from cryptonote.address import validate from .constants import * from .errors import * from . import database, credit, blocks, fee, wallet, daemon, rpc, log def record_payment(uid, txid, time, amount, fee): """Record payment""" try: database....
# -*- coding: utf-8 -*- """Advent of Code 2021 - Day 11: Dumbo Octopus.""" from copy import deepcopy from aoclib.geometry import Position from aoclib.helpers import timing def load_and_parse_input(input_file: str): puzzle: list[list[int]] = [] with open(input_file) as inf: for line in inf.readlines...
<filename>transcode/pyqtgui/qzones.py from PyQt5.QtGui import QIcon from PyQt5.QtCore import QTime, pyqtSignal, pyqtSlot from PyQt5.QtWidgets import (QAction, QVBoxLayout, QHBoxLayout, QScrollArea, QPushButton, QLabel, QWidget, QGridLayout, QComboBox, QMessageBo...
<reponame>BUT-GRAPH-at-FIT/Automatic-Camera-Calibration import tensorflow as tf import numpy as np import sys def fun(paramsVec): return tf.reduce_prod(paramsVec*paramsVec, axis=1) def funND(paramsVec): return tf.reduce_prod(paramsVec*paramsVec, axis=2) def my_differential_evolution_single(func, bounds, p...
<gh_stars>0 """ Module containing the SecureStompMessenger class, used for communicating using the STOMP protocol. """ from encrypt_utils import encrypt_message, decrypt_message, verify_message, \ sign_message, verify_certificate, from_file, get_certificate_subject, \ check_cert_key, message_hash import get_b...
#!/usr/bin/env python3 import sys import os, subprocess import argparse import socket import time import random import string import ssl parser = argparse.ArgumentParser( description="SIP extension enumeration" ) parser.add_argument( '--proto', dest="PROTOCOL", type=str, default="udp", help=...
<reponame>quizlet/abracadabra<filename>abra/inference/frequentist/means.py #!/usr/bin/python # -*- coding: utf-8 -*- from abra.config import DEFAULT_ALPHA, MIN_OBS_FOR_Z from abra.stats import Samples, MeanComparison from abra.inference.frequentist.results import FrequentistTestResults from abra.inference import Frequ...
<gh_stars>1-10 # -*- coding: utf-8 -*- # # Copyright: (c) 2019, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.ve...
"""Test asyncpraw.models.comment_forest.""" import pytest from asynctest import mock from asyncpraw.exceptions import DuplicateReplaceException from asyncpraw.models import Comment, MoreComments, Submission from .. import IntegrationTest class TestCommentForest(IntegrationTest): def setUp(self): super()...
<reponame>ctuning/ck-spack<filename>package/spack-octopus/package.py<gh_stars>1-10 ############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack...
import pytest, numpy as np from sequentia.internals import _Validator from ...support import assert_equal, assert_not_equal, assert_all_equal val = _Validator() # ================================== # # _Validator.observation_sequences() # # ================================== # def test_single_observation_sequence_wi...
from SolidSpheral3d import * import Gnuplot # We'll work in CGS units. units = PhysicalConstants(0.01, # Unit length in meters 0.001, # Unit mass in kg 1.0) # Unit time in sec #------------------------------------------------------------------------------- # Buil...
import json from app import create_app, db from app.models import User, UserType from .base import BaseTest class TestMeals(BaseTest): def setUp(self): self.app = create_app(config_name='testing') self.client = self.app.test_client() with self.app.app_context(): db.create_all()...
<reponame>Sanjaykkukreja/AIML # -*- coding: utf-8 -*- #import pyaudio #import wave import pyaudio import wave import keyboard as kb import librosa import numpy as np import matplotlib.pyplot as plt; plt.rcdefaults() import matplotlib.pyplot as plt import torch import os from torch.autograd import Variable BASE_DIR ...
<reponame>michael-ross-ven/vengeance<filename>dist/vengeance-1.0.3.tar/dist/vengeance-1.0.3/vengeance/classes/log_cls.py<gh_stars>1-10 import os import sys import textwrap from logging import Logger from logging import Formatter from logging import FileHandler from logging import StreamHandler from logging import DEB...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import inspect import itertools import warnings from collections import defaultdict from contextlib import contextmanager from typing import Any, List, Dict from pathlib import Path def import_(target: str, allow_none: bool = False) -> Any: ...
""" Copyright (c) 2015-2018 Wind River Systems, Inc. SPDX-License-Identifier: Apache-2.0 """ from __future__ import print_function from six.moves import configparser import os import subprocess import sys import textwrap import time from controllerconfig import utils import uuid from controllerconfig.common import ...
# WARNING: Do not edit by hand, this file was generated by Crank: # # https://github.com/gocardless/crank # import json import requests import responses from nose.tools import assert_equals, assert_in, assert_raises from gocardless_pro import api_client from gocardless_pro import errors from . import helpers acc...
<filename>src/openprocurement/framework/core/views/submission.py from openprocurement.api.utils import ( APIResourceListing, json_view, generate_id, set_ownership, context_unpack, upload_objects_documents, ) from openprocurement.framework.core.design import ( SUBMISSION_FIELDS, submissio...
from __future__ import annotations from typing import Any, Dict, List, Optional from bson import ObjectId from pymongo import MongoClient from pymongo.collection import Collection from pymongo.database import Database from pymongo.results import DeleteResult, UpdateResult from .codes_options import ask_codec_options...
from os import listdir, path import csv from datetime import datetime from matcher import Matcher from student import Student from validate import unique_items SIGNUP_DATA_DIR_NAME = "signup_data" # Map of column names in the CSV files. # Names just need to partially match # (i.e. "your gender" in "What's your gende...
import torch import numpy as np import math class ClassifierDetector(): def __init__(self,epsilon,class_size): self.epsilon = epsilon self.class_size = class_size self.x = torch.zeros([class_size,1]) self.y = torch.zeros([class_size,1]) ...
<gh_stars>1-10 import numpy as np import pandas as pd import matplotlib.pyplot as plt def read_table(filename): df = pd.read_csv(filename) return df def result_allfactor_effect(df, result, order=False, factor_filter=None): ''' one result (e.g. f1 or acc) for all experiment factor plot t...
import os import csv import wave import sys import numpy as np import pandas as pd import glob def split_wav(wav, features, emotions): (nchannels, sampwidth, framerate, nframes, comptype, compname), samples = wav left = samples[0::nchannels] right = samples[1::nchannels] shift = len(left) // np.a...
import functools import pathlib import time from typing import Any, Callable, Optional import peewee from .utils import CACHING_DISABLED, USER_DATA_DIR, abspath SCHEMA_VERSION = 1 DATABASE_PATH = pathlib.Path(USER_DATA_DIR).joinpath("data.db") CACHE_EXPIRY_THRESHOLD = 3600 * 24 * 7 # A week database = peewee.Sqli...
"""Stream new Reddit posts and notify for matching posts.""" import datetime import os import sys import time import apprise import praw import prawcore import yaml CONFIG_PATH = os.getenv("RPN_CONFIG", "config.yaml") LOGGING = os.getenv("RPN_LOGGING", "FALSE") YAML_KEY_APPRISE = "apprise" YAML_KEY_REDDIT = "reddit"...
<reponame>OceansAus/cosima-cookbook import matplotlib.pyplot as plt import cosima_cookbook as cc from tqdm import tqdm_notebook import IPython.display def wind_stress(expts=[]): """ Plot zonally averaged wind stress. Parameters ---------- expts : str or list of str Experiment name(s). ...
#!/usr/bin/env python #coding: utf-8 """ This module simply sends request to the Online Labs API, and returns their response as a dict. """ import requests from json import dumps API_COMPUTE = 'https://api.cloud.online.net' API_ACCOUNT = "https://account.cloud.online.net" class OlError(RuntimeError): pass ...
import gym import torch import torch.nn.functional as F from dqn.agents.cartpole.model import DQN from dqn.replay_memory import ReplayMemory, Sample from dqn.agents.cartpole.config import CartPoleConfig from dqn.agents.base_agent import BaseAgent from dqn.agents.cartpole.utils import preprocess_observation, preproces...
import copy import json import logging import os import sys import tempfile import time import traceback import h5py import numpy as np import tables import tensorflow as tf from opentamp.src.policy_hooks.vae.vae_networks import * ''' Random things to remember: - End with no-op task (since we go obs + task -> next...
# # Electrum - lightweight Bitcoin client # Copyright (C) 2011 <NAME> # # 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, ...
# -*- coding: utf-8 -*- """ Контейнер для вычисления скользящей суммы. В него можно постоянно можно добавлять элементы и быстро получать сумму Пример работы с контейнером: m = MovingSum(window=4) # сумма равна 0 m.push(8) # сумма равна 8 m.push(41) # сумма равна 49 m.push(9) # сум...
import tkinter as tk from tkinter import messagebox from client import Client import pyperclip class GUI: def __init__(self): self.root = tk.Tk() self.root.title('Sesame') self.root.pack_propagate(True) self.root.resizable(False, False) self.client = Client() def reset...
''' MIT License Copyright (c) 2018 <NAME> 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, distri...
<reponame>ambasta/grpc #!/usr/bin/env python # Copyright 2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyrig...
<reponame>thehyve/python_fhir2transmart<gh_stars>1-10 #!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for the fhir2transmart module. """ import pytest from fhir2transmart.fhir_reader import FhirReader from fhir2transmart.mapper import Mapper from transmart_loader.transmart import DataCollection @pytest.fix...
<gh_stars>0 """ Django settings for shark project. Generated by 'django-admin startproject' using Django 3.2.7. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ fr...
#! /usr/bin/env python # -*- coding: utf-8 -*- import random import itertools from collections import defaultdict, OrderedDict def pct(x, total): return '%04.1f%%' % (100*float(x)/total) x=[8,4,6,2]; a = [1]*x[0] + [2]*x[1] + [3]*x[2] + [4]*x[3] x=[5,6,5,4]; b = [1]*x[0] + [2]*x[1] + [3]*x[2] + [4]*x[3] x=[4,5,6...
<filename>sensha_uncompiled_version05-06-2019/main.py # main.py """ Importe le code du fichier <<display.py>> """ from display import * """ Programme - But : la base des operations du programme - Fonctionnement : contient le jeu, les variables, etc... / permet de demarrer et de fermer le jeu correctement (avec sauveg...
import discord from discord.ext import commands from dataIO import dataIO import logging from tabulate import tabulate import Checker import os log = logging.getLogger('blagotron.buyrole') class Buyrole: """Allows the user to buy a role with economy balance""" # --- Format # { # Server : { # To...
<reponame>rajancolab/blogsite """Easily update version numbers across your project. """ import argparse from functools import reduce import re import sys import toml from . import deltas __version__ = "0.2" class ConfigError(ValueError): pass def read_config(): with open('reversion.toml') as f: conf...
#!/usr/bin/python3 # coding: utf-8 # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in ...
<reponame>auto-bwcx-me/scenario_runner #!/usr/bin/env python # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ Basic CARLA Autonomous Driving training scenario """ import py_trees from srunner.scenarioconfigs.route_scenario_configuration impor...
from time import strftime import time import threading import sys from PySide2.QtWidgets import QWidget, QVBoxLayout, QApplication from PySide2.QtCore import Qt, QRectF from PySide2.QtGui import QColor, QFont, QImage, QPainter, QPen, QPainterPath, QConicalGradient, QGradient, QColor, \ QPalette, QGuiApplication f...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2014-2018 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
from roundup import date def import_data_12 (db, user, dep, olo) : sd = dict (months = 1.0, required_overtime = 1, weekly = 0) otp = db.overtime_period.filter (None, sd) assert len (otp) == 1 otp = otp [0] db.user_dynamic.create \ ( hours_fri = 7.5 , hours_sun ...
<filename>Assets/compilers/shader.bzl ShaderLibraryInfo = provider( fields = { "include_directories": "directories where the library files reside", }, ) def _bengine_shader_library_impl(ctx): library_directory = "{}_shader_includes".format(ctx.label.name) isolated_files = [] for src in ctx...
<reponame>tirkarthi/python-cybox<filename>cybox/bindings/win_executable_file_object.py # Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import sys from mixbox.binding_utils import * from . import cybox_common from . import win_file_object class PEChecksumType(G...