hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bfa12344ac2672d04af709f36d9c0e347ff905c3 | 5,698 | py | Python | core/loaders.py | nishantb21/yolov3 | 0305b01d805b7b2429e8304d5f27eff52bbd262e | [
"MIT"
] | null | null | null | core/loaders.py | nishantb21/yolov3 | 0305b01d805b7b2429e8304d5f27eff52bbd262e | [
"MIT"
] | null | null | null | core/loaders.py | nishantb21/yolov3 | 0305b01d805b7b2429e8304d5f27eff52bbd262e | [
"MIT"
] | null | null | null | import os
import torch
from tqdm import tqdm
from torchvision import transforms, datasets
from PIL import ImageOps
import numpy as np
class DatasetLoader():
def __init__(self):
self.dataset_loader = None
def get_loader(self):
return self.dataset_loader
class ImageNetDatasetLoader(DatasetLoad... | 41.897059 | 129 | 0.62285 |
c294ba377d1e35ec870bb075369fe4ec1dec6b13 | 3,911 | py | Python | pvdn/metrics/convert.py | larsOhne/pvdn | 0b6a8d0463909009152973f2edddbe49a054d4a2 | [
"CC0-1.0"
] | 13 | 2021-01-02T06:08:01.000Z | 2021-12-15T17:23:19.000Z | pvdn/metrics/convert.py | larsOhne/pvdn | 0b6a8d0463909009152973f2edddbe49a054d4a2 | [
"CC0-1.0"
] | 2 | 2021-01-28T07:53:28.000Z | 2021-07-29T15:50:40.000Z | pvdn/metrics/convert.py | larsOhne/pvdn | 0b6a8d0463909009152973f2edddbe49a054d4a2 | [
"CC0-1.0"
] | 1 | 2021-02-11T10:58:39.000Z | 2021-02-11T10:58:39.000Z | import json
import numpy as np
from tqdm import tqdm
import os
from warnings import warn
def gt_to_results_format(gt_bbox_dir):
"""
Converts the ground truth bounding box annotation files to the format used for the custom
evaluation metric.
:param gt_bbox_dir: Directory path of the stored bounding box... | 39.908163 | 97 | 0.613909 |
067f232d9187e859e5843245d72e94f4353d64ec | 488,688 | py | Python | seleniumbase/fixtures/base_case.py | aichemydev/SeleniumBase | 34479f7377217013a1bbff23cfd12abe8363bc13 | [
"MIT"
] | null | null | null | seleniumbase/fixtures/base_case.py | aichemydev/SeleniumBase | 34479f7377217013a1bbff23cfd12abe8363bc13 | [
"MIT"
] | null | null | null | seleniumbase/fixtures/base_case.py | aichemydev/SeleniumBase | 34479f7377217013a1bbff23cfd12abe8363bc13 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
r""" ------------> ------------> ------------> ------------>
______ __ _ ____
/ ____/__ / /__ ____ (_)_ ______ ___ / _ \____ ________
\__ \/ _ \/ / _ \/ __ \/ / / / / __ `__ \/ /_) / __ \/ ___/ _ \
___/ / __/ / __/ / / / / /_/ / / / / / / /_) / ... | 42.505697 | 79 | 0.562692 |
a241b3b62ae171f83d428f85cc6d0ebc7acfc555 | 474 | py | Python | revolt/errors.py | MutedByte/revolt.py | be2af590af458e926dd6364f6fc4a16008840e47 | [
"MIT"
] | 28 | 2021-08-17T23:25:48.000Z | 2021-12-16T00:13:05.000Z | revolt/errors.py | MutedByte/revolt.py | be2af590af458e926dd6364f6fc4a16008840e47 | [
"MIT"
] | 14 | 2021-08-31T06:00:12.000Z | 2021-12-28T22:59:08.000Z | revolt/errors.py | MutedByte/revolt.py | be2af590af458e926dd6364f6fc4a16008840e47 | [
"MIT"
] | 12 | 2021-08-18T00:55:53.000Z | 2021-11-20T16:58:18.000Z | __all__ = (
"RevoltError",
"HTTPError",
"ServerError",
"FeatureDisabled",
"AutumnDisabled",
)
class RevoltError(Exception):
"Base exception for revolt"
class HTTPError(RevoltError):
"Base exception for http errors"
class ServerError(RevoltError):
"Internal server error"
class Feature... | 20.608696 | 49 | 0.706751 |
2faf28ac5183c73554cd5b7a991dbc47c54f0338 | 383 | py | Python | app/migrations/0004_auto_20210714_1444.py | peterken674/instagram-clone | 950ff7902d8fd29ea9f94bf17b1ae0d69e0b2614 | [
"MIT"
] | null | null | null | app/migrations/0004_auto_20210714_1444.py | peterken674/instagram-clone | 950ff7902d8fd29ea9f94bf17b1ae0d69e0b2614 | [
"MIT"
] | null | null | null | app/migrations/0004_auto_20210714_1444.py | peterken674/instagram-clone | 950ff7902d8fd29ea9f94bf17b1ae0d69e0b2614 | [
"MIT"
] | 1 | 2022-03-07T13:04:35.000Z | 2022-03-07T13:04:35.000Z | # Generated by Django 3.0 on 2021-07-14 11:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0003_auto_20210714_1436'),
]
operations = [
migrations.AlterField(
model_name='post',
name='image',
... | 20.157895 | 56 | 0.590078 |
03b03a537ca78a666a3633ded71c8d2514238fff | 1,884 | py | Python | lib/app/reportdatasources/report_objectdetaillinks.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | lib/app/reportdatasources/report_objectdetaillinks.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | lib/app/reportdatasources/report_objectdetaillinks.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ----------------------------------------------------------------------
# ReportObjectDetailLinks datasource
# ----------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# -------------------------------------------------------------------... | 31.4 | 77 | 0.381635 |
80f995a8b87b3a58afd9f02109f0a44679396b54 | 374 | py | Python | profile/generate-singly-bbn.py | gitter-badger/py-bbn | badb5073bb1640e376f6d9db871e91365fd5d20f | [
"Apache-2.0"
] | 48 | 2017-03-21T21:13:39.000Z | 2022-03-11T08:13:01.000Z | profile/generate-singly-bbn.py | SourangshuGhosh/py-bbn | f1e296ea4bb9d1392ec585fbafe34011ea2f85fd | [
"Apache-2.0"
] | 7 | 2018-07-18T16:01:15.000Z | 2022-02-10T14:42:33.000Z | profile/generate-singly-bbn.py | SourangshuGhosh/py-bbn | f1e296ea4bb9d1392ec585fbafe34011ea2f85fd | [
"Apache-2.0"
] | 14 | 2017-09-19T18:34:08.000Z | 2022-03-04T11:52:51.000Z | import json
import numpy as np
from pybbn.generator.bbngenerator import generate_singly_bbn, convert_for_exact_inference
from pybbn.graph.dag import Bbn
np.random.seed(37)
g, p = generate_singly_bbn(900, max_iter=10)
s_bbn = convert_for_exact_inference(g, p)
with open('singly-bbn.json', 'w') as f:
f.write(json... | 24.933333 | 89 | 0.775401 |
67c73c85324abb5087b68a0a9d15b9d78f35e7fe | 159 | py | Python | 06_Django_Basico/blog/views.py | Joao-Inacio/Curso-de-Python3 | 179d85f43f77dced640ffb143a87214538254cf3 | [
"MIT"
] | 1 | 2021-07-19T12:31:49.000Z | 2021-07-19T12:31:49.000Z | 06_Django_Basico/blog/views.py | Joao-Inacio/Curso-de-Python3 | 179d85f43f77dced640ffb143a87214538254cf3 | [
"MIT"
] | null | null | null | 06_Django_Basico/blog/views.py | Joao-Inacio/Curso-de-Python3 | 179d85f43f77dced640ffb143a87214538254cf3 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def index(request):
return HttpResponse('Olá mundo')
| 17.666667 | 36 | 0.773585 |
3411a962236bde964d5306c9112f576e46b17d73 | 1,278 | py | Python | bustime/wsocket_cmd.py | norn/bustime | 5817951ce6b569589182784c890e064e4713ded7 | [
"MIT"
] | 52 | 2015-12-22T06:39:34.000Z | 2022-01-15T11:41:08.000Z | bustime/wsocket_cmd.py | oostap/bustime | 5817951ce6b569589182784c890e064e4713ded7 | [
"MIT"
] | null | null | null | bustime/wsocket_cmd.py | oostap/bustime | 5817951ce6b569589182784c890e064e4713ded7 | [
"MIT"
] | 14 | 2015-10-06T03:52:46.000Z | 2021-06-30T06:25:52.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from autobahn.asyncio import wamp, websocket
from autobahn.wamp import types
try:
import asyncio
except ImportError:
import trollius as asyncio
def magic_box(sproto, extra):
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
component_confi... | 28.4 | 77 | 0.701095 |
b38d447be23e79b6f9ab3cab28d873c2464e24d1 | 577 | py | Python | 001.Two Sum/solution.py | lovexln001/LeetCode | 5ca0e743a4f10ac5f6cdf3314f6c81d356181f81 | [
"MIT"
] | null | null | null | 001.Two Sum/solution.py | lovexln001/LeetCode | 5ca0e743a4f10ac5f6cdf3314f6c81d356181f81 | [
"MIT"
] | null | null | null | 001.Two Sum/solution.py | lovexln001/LeetCode | 5ca0e743a4f10ac5f6cdf3314f6c81d356181f81 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
class Solution:
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
d = {}
for index, num in enumerate(nums):
if num in d:
return [d[num], index... | 21.37037 | 45 | 0.481802 |
fab69b8191cdc6642dc09e3cd37bbbbca1eb6def | 2,790 | py | Python | Software/Estadística/MCMC/Paper/graficar_todo.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | Software/Estadística/MCMC/Paper/graficar_todo.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | Software/Estadística/MCMC/Paper/graficar_todo.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | import numpy as np
from getdist import plots, MCSamples
from matplotlib import pyplot as plt
import emcee
import sys
import os
from pc_path import definir_path
path_git, path_datos_global = definir_path()
os.chdir(path_git)
sys.path.append('./Software/Funcionales/Clases')
from funciones_graficador import Graficador
... | 37.2 | 175 | 0.751613 |
f68a38f7515f47e2f64f38306c78ac41d741d30a | 28,606 | py | Python | test/test_punt.py | artem-belov/vpp | 09267f705f408c061e03d07a559efba661900f2d | [
"Apache-2.0"
] | null | null | null | test/test_punt.py | artem-belov/vpp | 09267f705f408c061e03d07a559efba661900f2d | [
"Apache-2.0"
] | null | null | null | test/test_punt.py | artem-belov/vpp | 09267f705f408c061e03d07a559efba661900f2d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import binascii
import random
import socket
import os
import threading
import struct
from struct import unpack, unpack_from
try:
import unittest2 as unittest
except ImportError:
import unittest
from util import ppp, ppc
from re import compile
import scapy.compat
from scapy.packet import ... | 33.575117 | 79 | 0.575718 |
06ea958434bbb60aa993e32b18da405a48eee728 | 3,695 | py | Python | vk/bot_framework/dispatcher/storage.py | PythonReforker/vk.py | 71e4d914140d0ed054d47912e1303132caf87c51 | [
"MIT"
] | 2 | 2020-02-28T11:31:11.000Z | 2020-09-16T06:11:11.000Z | vk/bot_framework/dispatcher/storage.py | Cl0ckHvH/vk.py-1.0.0a6 | 02128b6e5043d6ebf98724ec8b09dce09aa2a669 | [
"MIT"
] | null | null | null | vk/bot_framework/dispatcher/storage.py | Cl0ckHvH/vk.py-1.0.0a6 | 02128b6e5043d6ebf98724ec8b09dce09aa2a669 | [
"MIT"
] | 1 | 2020-03-03T20:49:57.000Z | 2020-03-03T20:49:57.000Z | """
A simple util for dispatcher for storage your data. e.g: database connection, messages count.
"""
import typing
from abc import ABC
from abc import abstractmethod
class AbstractStorage(ABC):
@abstractmethod
def place(self, key: typing.AnyStr, value: typing.Any) -> None:
"""
Place value to ... | 24.150327 | 93 | 0.564547 |
6dc42d07e203879ea2e1816469bd740b334feb39 | 2,844 | py | Python | djasana/admin.py | zaptim/django-asana | ab6d7166f28945292d5632ef766fc13cc2ea4cf3 | [
"MIT"
] | null | null | null | djasana/admin.py | zaptim/django-asana | ab6d7166f28945292d5632ef766fc13cc2ea4cf3 | [
"MIT"
] | null | null | null | djasana/admin.py | zaptim/django-asana | ab6d7166f28945292d5632ef766fc13cc2ea4cf3 | [
"MIT"
] | null | null | null | from django import forms
from django.contrib import admin
from django.contrib.admin import widgets
from django.utils.safestring import mark_safe
from djasana import models
def asana_link(obj):
return mark_safe('<a href="{}" target="_blank">View on Asana</a>'.format(obj.asana_url()))
class ParentRawIdWidget(wid... | 30.580645 | 96 | 0.669128 |
cacc92b2885500112ab062a72dd0bcb33924ce34 | 5,489 | py | Python | houdini/handlers/games/__init__.py | AllinolCP/houdini-asyncio | a2ae7957eaa26b9a2e96da37eee8982034cd2c6c | [
"MIT"
] | null | null | null | houdini/handlers/games/__init__.py | AllinolCP/houdini-asyncio | a2ae7957eaa26b9a2e96da37eee8982034cd2c6c | [
"MIT"
] | null | null | null | houdini/handlers/games/__init__.py | AllinolCP/houdini-asyncio | a2ae7957eaa26b9a2e96da37eee8982034cd2c6c | [
"MIT"
] | null | null | null | import random
import time
from sqlalchemy.dialects.postgresql import insert
from houdini import handlers
from houdini.constants import ClientType
from houdini.converters import OptionalConverter
from houdini.data.game import PenguinGameData
from houdini.data.room import Room
from houdini.handlers import XTPacket
from... | 38.384615 | 117 | 0.672982 |
f9fa6a993550b6b1307afe3086f925ecd30cf451 | 7,172 | py | Python | Liquid-job-benchmarks/perfzero/lib/benchmark.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | 2 | 2021-08-30T14:12:09.000Z | 2022-01-20T02:14:22.000Z | Liquid-job-benchmarks/perfzero/lib/benchmark.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | null | null | null | Liquid-job-benchmarks/perfzero/lib/benchmark.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The TensorFlow 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... | 42.946108 | 122 | 0.657278 |
8f54fbd630e2a314b2535bfbe2b20396b48c315a | 2,809 | py | Python | aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/DescribeEniMonitorDataRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/DescribeEniMonitorDataRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ecs/aliyunsdkecs/request/v20140526/DescribeEniMonitorDataRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | # 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 u... | 33.047059 | 80 | 0.764685 |
bc12665de4a31310b536606837e1750925d5217a | 12,207 | py | Python | glance/gateway.py | kfwang/Glance-OVA-OVF | e983c3c79987e59d644917646edc6b0b7fd219d0 | [
"Apache-2.0"
] | null | null | null | glance/gateway.py | kfwang/Glance-OVA-OVF | e983c3c79987e59d644917646edc6b0b7fd219d0 | [
"Apache-2.0"
] | null | null | null | glance/gateway.py | kfwang/Glance-OVA-OVF | e983c3c79987e59d644917646edc6b0b7fd219d0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
# Copyright 2013 IBM Corp.
# 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/LIC... | 46.770115 | 78 | 0.709921 |
16b395970659274a4f2a8cf357348497720aef6d | 23,154 | py | Python | src/datasets/formatting/formatting.py | Jebrankhan/datasets | 920faf40c0766cb71d2dbba71554181881cc3e7b | [
"Apache-2.0"
] | null | null | null | src/datasets/formatting/formatting.py | Jebrankhan/datasets | 920faf40c0766cb71d2dbba71554181881cc3e7b | [
"Apache-2.0"
] | null | null | null | src/datasets/formatting/formatting.py | Jebrankhan/datasets | 920faf40c0766cb71d2dbba71554181881cc3e7b | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The HuggingFace 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 applicable l... | 41.794224 | 133 | 0.667574 |
dcfa4d4b533ef7b43e668b87982822a53a8f7f55 | 822 | py | Python | app/migrations/0003_auto_20200813_1551.py | codesankalp/E-commerce-Website | 9091a7e27a9e63242b9067377a697196879fc707 | [
"CC0-1.0"
] | null | null | null | app/migrations/0003_auto_20200813_1551.py | codesankalp/E-commerce-Website | 9091a7e27a9e63242b9067377a697196879fc707 | [
"CC0-1.0"
] | null | null | null | app/migrations/0003_auto_20200813_1551.py | codesankalp/E-commerce-Website | 9091a7e27a9e63242b9067377a697196879fc707 | [
"CC0-1.0"
] | null | null | null | # Generated by Django 3.0.8 on 2020-08-13 10:21
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('app', '0002_auto_2020081... | 30.444444 | 134 | 0.654501 |
8d5d83690f6037c91662ff7f79cb35b47730b1c3 | 21,756 | py | Python | geomstats/_backend/pytorch/__init__.py | tfunatomi/geomstats | a5651680f98dea95c1f82a48af1a6dccf3e26bd1 | [
"MIT"
] | 2 | 2020-01-23T04:01:02.000Z | 2020-08-18T19:20:27.000Z | geomstats/_backend/pytorch/__init__.py | tfunatomi/geomstats | a5651680f98dea95c1f82a48af1a6dccf3e26bd1 | [
"MIT"
] | null | null | null | geomstats/_backend/pytorch/__init__.py | tfunatomi/geomstats | a5651680f98dea95c1f82a48af1a6dccf3e26bd1 | [
"MIT"
] | null | null | null | """Pytorch based computation backend."""
import math
from functools import wraps
import numpy as _np
import torch
from torch import ( # NOQA
acos as arccos,
arange,
argmin,
asin as arcsin,
atan2 as arctan2,
bool as t_bool,
broadcast_tensors as broadcast_arrays,
ceil,
clamp as clip... | 26.243667 | 78 | 0.605166 |
8eb062f404e960f61163405d427830fcc03bc732 | 1,811 | py | Python | growth-marketing-churn-analyses/more/campaign_vis.py | DanielMabadeje/Artificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials | 7adab3877fc1d3f1d5f57e6c1743dae8f76f72c5 | [
"Apache-2.0"
] | 3,266 | 2017-08-06T16:51:46.000Z | 2022-03-30T07:34:24.000Z | growth-marketing-churn-analyses/more/campaign_vis.py | nuhaltinsoy/Artificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials | 6017441f2d476f9c6c568dd886da43c6c0fd89bd | [
"Apache-2.0"
] | 150 | 2017-08-28T14:59:36.000Z | 2022-03-11T23:21:35.000Z | growth-marketing-churn-analyses/more/campaign_vis.py | nuhaltinsoy/Artificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials | 6017441f2d476f9c6c568dd886da43c6c0fd89bd | [
"Apache-2.0"
] | 1,449 | 2017-08-06T17:40:59.000Z | 2022-03-31T12:03:24.000Z | import matplotlib.pyplot as plt
from sqlalchemy import *
import numpy as np
from sqlalchemy.orm import sessionmaker
from churndata import *
from pandas import DataFrame
from util import query_to_df
from util import campaign_to_num,event_to_num,transform_column,hist_and_show,vectorize
db = create_engine('sqlite:///forja... | 19.265957 | 86 | 0.66593 |
a08dfb07ca949b79c8f003ebd21c05ce3769992e | 8,814 | py | Python | cleanrl/experiments/a2c_gae_continuous_tanh.py | timtody/cleanrl | 1e1736bf49f98d94d71d1b51a75dd4f02f4b600f | [
"MIT"
] | 1 | 2019-12-15T14:12:32.000Z | 2019-12-15T14:12:32.000Z | cleanrl/experiments/a2c_gae_continuous_tanh.py | timtody/cleanrl | 1e1736bf49f98d94d71d1b51a75dd4f02f4b600f | [
"MIT"
] | null | null | null | cleanrl/experiments/a2c_gae_continuous_tanh.py | timtody/cleanrl | 1e1736bf49f98d94d71d1b51a75dd4f02f4b600f | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torch.distributions.categorical import Categorical
from torch.distributions.normal import Normal
from torch.utils.tensorboard import SummaryWriter
from cleanrl.common import preprocess_obs_space, preprocess_ac_space
imp... | 44.969388 | 143 | 0.657477 |
268a0bcab861a087cb597933f8f7c328ebed4a5f | 74,424 | py | Python | django/db/models/fields/__init__.py | simone/django-gb | 5233b366935dcc81e47546921ab4eb5007c83719 | [
"BSD-3-Clause"
] | 1 | 2015-01-07T10:29:03.000Z | 2015-01-07T10:29:03.000Z | django/db/models/fields/__init__.py | pchiquet/django | 45ef4baf5cb018acba16c269e3d470ee1de146e0 | [
"BSD-3-Clause"
] | null | null | null | django/db/models/fields/__init__.py | pchiquet/django | 45ef4baf5cb018acba16c269e3d470ee1de146e0 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import collections
import copy
import datetime
import decimal
import math
import warnings
from base64 import b64decode, b64encode
from itertools import tee
from django.apps import apps
from django.db import connection
from django.db.models.lookups import... | 36.953327 | 107 | 0.59419 |
6d27cc0261876b03983118f03d640a13ea9281bd | 4,782 | py | Python | qa/rpc-tests/wallet-dump.py | modong/qtum | e2d7f5e7b588443ac10ac31f7af18527e54abcb5 | [
"MIT"
] | 2 | 2017-07-31T14:18:36.000Z | 2021-07-19T21:35:56.000Z | qa/rpc-tests/wallet-dump.py | yelongbao/qtum | e2d7f5e7b588443ac10ac31f7af18527e54abcb5 | [
"MIT"
] | null | null | null | qa/rpc-tests/wallet-dump.py | yelongbao/qtum | e2d7f5e7b588443ac10ac31f7af18527e54abcb5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (start_nodes, s... | 43.87156 | 114 | 0.592848 |
803bc62502d2725993175d1a99a7fe6c5c6e44c0 | 1,582 | py | Python | lib/csv_exporter.py | phareeser/workouts | 36be728402e5829b5f32000ff7d315b96d9f00a2 | [
"MIT"
] | null | null | null | lib/csv_exporter.py | phareeser/workouts | 36be728402e5829b5f32000ff7d315b96d9f00a2 | [
"MIT"
] | null | null | null | lib/csv_exporter.py | phareeser/workouts | 36be728402e5829b5f32000ff7d315b96d9f00a2 | [
"MIT"
] | null | null | null | # coding=utf-8
from lib.workout_exporter import WorkoutExporter
from lib.workout import Workout, Sport, SportsType, WorkoutsDatabase
import logging
import csv
logger = logging.getLogger(__name__)
class CsvExporter(WorkoutExporter):
"""
Exports workouts from database to CSV file
"""
def __init__(sel... | 28.763636 | 77 | 0.616941 |
2af6399c9ff2271d95a840cc072d8a64d4e023b7 | 7,623 | py | Python | fhir/resources/relatedartifact.py | chgl/fhir.resources | 35b22314642640c0b25960ab5b2855e7c51749ef | [
"BSD-3-Clause"
] | null | null | null | fhir/resources/relatedartifact.py | chgl/fhir.resources | 35b22314642640c0b25960ab5b2855e7c51749ef | [
"BSD-3-Clause"
] | null | null | null | fhir/resources/relatedartifact.py | chgl/fhir.resources | 35b22314642640c0b25960ab5b2855e7c51749ef | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Profile: http://hl7.org/fhir/StructureDefinition/RelatedArtifact
Release: R4
Version: 4.0.1
Build ID: 9346c8cc45
Last updated: 2019-11-01T09:29:23.356+11:00
"""
import typing
from pydantic import Field, root_validator
from pydantic.error_wrappers import ErrorWrapper, ValidationError
from py... | 37.185366 | 93 | 0.598059 |
e5dbaedc76d81166f41b40038a50db6aab01a8cc | 2,478 | py | Python | tests/test_depthcache.py | rzchangcheng/python-binance-chain | 9193517f6272fdf39f34ef630c4be94be5ce43a4 | [
"MIT"
] | 241 | 2019-03-02T06:41:39.000Z | 2022-03-31T11:40:36.000Z | tests/test_depthcache.py | rzchangcheng/python-binance-chain | 9193517f6272fdf39f34ef630c4be94be5ce43a4 | [
"MIT"
] | 47 | 2019-04-16T11:31:58.000Z | 2022-03-03T06:10:17.000Z | tests/test_depthcache.py | rzchangcheng/python-binance-chain | 9193517f6272fdf39f34ef630c4be94be5ce43a4 | [
"MIT"
] | 90 | 2019-03-31T21:11:25.000Z | 2022-03-12T09:30:21.000Z | import pytest
from binance_chain.depthcache import DepthCache, DepthCacheManager
from binance_chain.environment import BinanceEnvironment
from binance_chain.http import HttpApiClient
class TestDepthCache:
clear_price = "0.00000000"
def test_init_depth_cache(self):
symbol = 'BNB_ETH'
dc = D... | 20.146341 | 100 | 0.575868 |
7107cb081e78a958d18df66d849f715270e9263c | 1,220 | py | Python | conversationApi.py | jithinsunnyofficial/TeleVital-MicrosoftHack | a957605456d2895dab0357ab3b31f353253f8d3c | [
"MIT"
] | 4 | 2020-05-31T13:57:10.000Z | 2020-10-29T04:59:51.000Z | conversationApi.py | jithinsunnyofficial/TeleVital-MicrosoftHack | a957605456d2895dab0357ab3b31f353253f8d3c | [
"MIT"
] | 3 | 2021-04-30T21:17:07.000Z | 2021-09-08T02:06:04.000Z | conversationApi.py | jithinsunnyofficial/TeleVital-MicrosoftHack | a957605456d2895dab0357ab3b31f353253f8d3c | [
"MIT"
] | null | null | null | import os
import dialogflow
from google.api_core.exceptions import InvalidArgument
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = 'private-key.json'
DIALOGFLOW_PROJECT_ID = 'televital-hack-4dd77'
DIALOGFLOW_LANGUAGE_CODE = 'en'
def analyze_text(input_text = 'Hi',session_id = 'random'):
SESSION_ID = ses... | 42.068966 | 110 | 0.770492 |
d761a496302424089adeb9fdbef5cfdb69475cf1 | 716 | py | Python | bin/rstpep2html.py | j-windsor/iRiot-WebApp | 2af059f88bd010b98e50b9ee593c89027dcc53e0 | [
"MIT"
] | null | null | null | bin/rstpep2html.py | j-windsor/iRiot-WebApp | 2af059f88bd010b98e50b9ee593c89027dcc53e0 | [
"MIT"
] | null | null | null | bin/rstpep2html.py | j-windsor/iRiot-WebApp | 2af059f88bd010b98e50b9ee593c89027dcc53e0 | [
"MIT"
] | null | null | null | #!/Users/jameswindsor/Documents/Capstone/iRiot-WebApp/bin/python
# $Id: rstpep2html.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing HTML from PEP
(Python Enha... | 27.538462 | 76 | 0.734637 |
55c42301d946241ebfa1348d2edfbc62dda0176b | 2,902 | py | Python | bigtable/test_bigtable.py | bsnisar/dataproc-initialization-actions | 90174ed577feff278d6895a6c814c9227f42f51d | [
"Apache-2.0"
] | 1 | 2019-06-07T09:19:13.000Z | 2019-06-07T09:19:13.000Z | bigtable/test_bigtable.py | bsnisar/dataproc-initialization-actions | 90174ed577feff278d6895a6c814c9227f42f51d | [
"Apache-2.0"
] | 2 | 2019-05-08T02:51:28.000Z | 2020-01-11T18:19:50.000Z | bigtable/test_bigtable.py | bsnisar/dataproc-initialization-actions | 90174ed577feff278d6895a6c814c9227f42f51d | [
"Apache-2.0"
] | null | null | null | """
This module provides testing functionality of the BigTable Init Action.
Test logic:
1. Create test table and fill it with some data by injecting commands into hbase shell.
2. Validate from local station that BigTable has test table created with right data.
Note:
Test REQUIRES cbt tool installed which provides... | 34.547619 | 87 | 0.636113 |
bf43de859bf6b4f42600223a5d4c400021877e1a | 2,452 | py | Python | audioLightSensorAnalogDemo.py | fredericaltorres/fCircuitPython | 4185799c2eae1fd2d38963ff08f442f46ca02463 | [
"MIT"
] | null | null | null | audioLightSensorAnalogDemo.py | fredericaltorres/fCircuitPython | 4185799c2eae1fd2d38963ff08f442f46ca02463 | [
"MIT"
] | null | null | null | audioLightSensorAnalogDemo.py | fredericaltorres/fCircuitPython | 4185799c2eae1fd2d38963ff08f442f46ca02463 | [
"MIT"
] | null | null | null | """
Circuit Playground Express
https://learn.adafruit.com/adafruit-circuit-playground-express/pinouts
- Audio
- LED
- Buttons
- NeoPixels
- Analog In
- Play wav file on internal speaker
"""
import time
import board
from digitalio import DigitalInOut, Direction, Pull
import neopixel
from cpe... | 29.902439 | 107 | 0.64845 |
d97f123e5884710975d7012722f6da37743439d5 | 5,576 | py | Python | PyYaMusic/radio.py | AlexRoar/YaMusic-Python | d709f8920ab4c66dafae9b5bcb8e623512d60b3a | [
"MIT"
] | 2 | 2020-07-14T08:15:34.000Z | 2020-08-25T07:13:25.000Z | PyYaMusic/radio.py | AlexRoar/YaMusic-Python | d709f8920ab4c66dafae9b5bcb8e623512d60b3a | [
"MIT"
] | null | null | null | PyYaMusic/radio.py | AlexRoar/YaMusic-Python | d709f8920ab4c66dafae9b5bcb8e623512d60b3a | [
"MIT"
] | null | null | null | # Copyright (c) 2019.
# Designed and codded with love by Aleksander Dremov
#
#
import json
from PyYaMusic.track import Track
import subprocess
import requests
import time
# Queue work not good
# TODO: make normal query
class Radio:
def __init__(self, login='', raw_edit=''):
self.now = ()
self.ne... | 41.61194 | 192 | 0.54609 |
fbc1c3a6dc69cfff020e1293d598d81cd0602dcc | 5,839 | py | Python | oookbooksite/settings/base.py | janpipek/oookbook | 69524ca95206080454eae4e97f0830225ac863ae | [
"MIT"
] | 1 | 2020-06-20T13:36:52.000Z | 2020-06-20T13:36:52.000Z | oookbooksite/settings/base.py | janpipek/oookbook | 69524ca95206080454eae4e97f0830225ac863ae | [
"MIT"
] | null | null | null | oookbooksite/settings/base.py | janpipek/oookbook | 69524ca95206080454eae4e97f0830225ac863ae | [
"MIT"
] | null | null | null | # Django settings for oookbooksite project.
import os
BASE_DIR = os.path.join(os.path.dirname(__file__), "..")
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'post... | 32.438889 | 127 | 0.693098 |
914d7a7e2f0e65ec41e6b4a201eff1b5bc74aab5 | 5,286 | py | Python | train_code/train_crnn/crnn_recognizer.py | RuslanOm/ocr.pytorch | 21f62d358b2c6e186cc460c8a50d9ae70414a54f | [
"MIT"
] | 387 | 2019-04-30T14:20:45.000Z | 2022-03-30T02:34:57.000Z | train_code/train_crnn/crnn_recognizer.py | makao007/ocr.pytorch | 6c51bda6b49e378c904d200ae02157dbe6e0e03c | [
"MIT"
] | 57 | 2019-06-27T13:22:34.000Z | 2022-03-27T09:41:03.000Z | train_code/train_crnn/crnn_recognizer.py | makao007/ocr.pytorch | 6c51bda6b49e378c904d200ae02157dbe6e0e03c | [
"MIT"
] | 100 | 2019-05-01T14:18:08.000Z | 2022-03-29T09:18:42.000Z | import torch.nn as nn
# import torchvision.models as models
import torch, os
from PIL import Image
import cv2
import torchvision.transforms as transforms
from torch.autograd import Variable
import numpy as np
import random
from crnn import CRNN
import config
# copy from mydataset
class resizeNormalize(obj... | 34.54902 | 116 | 0.518918 |
6fd31b2b3d3f85704a6c522680c8adbe4b95e262 | 610 | py | Python | setup.py | sanzaru/bleutrade_python | 412b553e5b7d64dc790a215ff69001a8ee7ffad7 | [
"MIT"
] | 1 | 2016-03-14T13:52:44.000Z | 2016-03-14T13:52:44.000Z | setup.py | sanzaru/bleutrade_python | 412b553e5b7d64dc790a215ff69001a8ee7ffad7 | [
"MIT"
] | null | null | null | setup.py | sanzaru/bleutrade_python | 412b553e5b7d64dc790a215ff69001a8ee7ffad7 | [
"MIT"
] | 1 | 2018-03-11T02:39:19.000Z | 2018-03-11T02:39:19.000Z | from distutils.core import setup
setup(
name = 'bleutradeapi',
packages = ['bleutradeapi'], # this must be the same as the name above
version = '0.3',
description = 'Python client library implementation of the Bleutrade API',
author = 'Martin Albrecht',
author_email = 'iwuerstchen@gmail.com',
url = 'https... | 46.923077 | 107 | 0.716393 |
710d80ca52008d7a0a0a0e09bb63a07173821053 | 9,517 | py | Python | mrcnn/config.py | anton-cid-mejias/Mask_RCNN | 226b97f590c40f884cb12d88da22966732e618ac | [
"MIT"
] | null | null | null | mrcnn/config.py | anton-cid-mejias/Mask_RCNN | 226b97f590c40f884cb12d88da22966732e618ac | [
"MIT"
] | null | null | null | mrcnn/config.py | anton-cid-mejias/Mask_RCNN | 226b97f590c40f884cb12d88da22966732e618ac | [
"MIT"
] | null | null | null | """
Mask R-CNN
Base Configurations class.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
"""
import numpy as np
# Base Configuration Class
# Don't use this class directly. Instead, sub-class it and override
# the configurations you need to chan... | 39.489627 | 80 | 0.689188 |
e901d226f1a32afe69b0570f35e332eeeeeded09 | 930 | py | Python | ejercicios_resueltos/t03/t03ejer09.py | workready/pythonbasic | 59bd82caf99244f5e711124e1f6f4dec8de22141 | [
"MIT"
] | null | null | null | ejercicios_resueltos/t03/t03ejer09.py | workready/pythonbasic | 59bd82caf99244f5e711124e1f6f4dec8de22141 | [
"MIT"
] | null | null | null | ejercicios_resueltos/t03/t03ejer09.py | workready/pythonbasic | 59bd82caf99244f5e711124e1f6f4dec8de22141 | [
"MIT"
] | null | null | null | # Estos son los módulos que necesitas
import datetime
import calendar
import locale
def get_today_as_string():
"""
Funcion que me dice el día de la semana que es hoy, en formato string.
Pequeña guia de implementación:
1. Obtén el día de la semana que es hoy, en formato entero (1, 2, 3, et... | 31 | 105 | 0.67957 |
28ea9175de8616d7ac0d112a729548969f3855fb | 6,121 | py | Python | ecowitt2mqtt/data.py | akleber/ecowitt2mqtt | e8ffd9f8f36d9065353d67b4580d92d15a5aaba2 | [
"MIT"
] | null | null | null | ecowitt2mqtt/data.py | akleber/ecowitt2mqtt | e8ffd9f8f36d9065353d67b4580d92d15a5aaba2 | [
"MIT"
] | null | null | null | ecowitt2mqtt/data.py | akleber/ecowitt2mqtt | e8ffd9f8f36d9065353d67b4580d92d15a5aaba2 | [
"MIT"
] | null | null | null | """Define helpers to process data from an Ecowitt device."""
import argparse
from functools import partial
import inspect
from typing import Any, Callable, Dict, Optional, Union
from ecowitt2mqtt.const import (
DATA_POINT_DEWPOINT,
DATA_POINT_FEELSLIKE,
DATA_POINT_GLOB_BAROM,
DATA_POINT_GLOB_BATT,
... | 32.908602 | 82 | 0.695311 |
d8a67d7685b8ac93328110f05ddb1e9409cdfc39 | 984 | py | Python | tests/test_eminq_parser.py | chargehound/pyxmex | 49349b770af64be6cbe738ef734c9dc24c9f3d3b | [
"MIT"
] | null | null | null | tests/test_eminq_parser.py | chargehound/pyxmex | 49349b770af64be6cbe738ef734c9dc24c9f3d3b | [
"MIT"
] | null | null | null | tests/test_eminq_parser.py | chargehound/pyxmex | 49349b770af64be6cbe738ef734c9dc24c9f3d3b | [
"MIT"
] | null | null | null | import os
import unittest
import datetime
from pyxmex import EMINQParser
class TestEMINQParser(unittest.TestCase):
def setUp(self, session=None):
self.parser = EMINQParser()
self.dummy_file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'support/dummy_eminq_raw')
def test_pro... | 37.846154 | 115 | 0.691057 |
bf8ff9d9211f8ad54ac827e2b0312a475d7b7d6b | 918 | py | Python | octodns/cmds/dump.py | nexcess/octodns | 68fcd69f228fcfff6c8c6a970dcd40170994218e | [
"MIT"
] | null | null | null | octodns/cmds/dump.py | nexcess/octodns | 68fcd69f228fcfff6c8c6a970dcd40170994218e | [
"MIT"
] | null | null | null | octodns/cmds/dump.py | nexcess/octodns | 68fcd69f228fcfff6c8c6a970dcd40170994218e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Octo-DNS Dumper
'''
from __future__ import absolute_import, division, print_function, \
unicode_literals
from octodns.cmds.args import ArgumentParser
from octodns.manager import Manager
def main():
parser = ArgumentParser(description=__doc__.split('\n')[1])
parser.add_argument... | 31.655172 | 76 | 0.651416 |
ef5f369a6a4f87a352ee3516c2cdd5f7a81df88e | 1,599 | py | Python | powerline/segments/pdb.py | PH111P/powerline | f8dfe7e7e3d021cd66bc0e19b19ea4a51949cb9a | [
"MIT"
] | 23 | 2016-12-16T09:03:18.000Z | 2022-02-25T19:19:23.000Z | powerline/segments/pdb.py | PH111P/powerline | f8dfe7e7e3d021cd66bc0e19b19ea4a51949cb9a | [
"MIT"
] | 30 | 2016-12-20T11:11:42.000Z | 2019-11-19T15:23:59.000Z | powerline/segments/pdb.py | PH111P/powerline | f8dfe7e7e3d021cd66bc0e19b19ea4a51949cb9a | [
"MIT"
] | 4 | 2016-12-11T18:29:11.000Z | 2018-04-22T07:51:28.000Z | import os
from powerline.theme import requires_segment_info
@requires_segment_info
def current_line(pl, segment_info):
'''Displays line number that is next to be run
'''
return str(segment_info['curframe'].f_lineno)
@requires_segment_info
def current_file(pl, segment_info, basename=True):
'''Displa... | 27.101695 | 76 | 0.712946 |
80168c5757accabd8b92e1a76baf4a8585f24ec4 | 13,511 | py | Python | ansible_var_checker/scope/scope.py | KlutzyBubbles/jinja2schema | 6e04e8b2b1cdef6dbecab80f0d28129873d3f82b | [
"BSD-3-Clause"
] | null | null | null | ansible_var_checker/scope/scope.py | KlutzyBubbles/jinja2schema | 6e04e8b2b1cdef6dbecab80f0d28129873d3f82b | [
"BSD-3-Clause"
] | null | null | null | ansible_var_checker/scope/scope.py | KlutzyBubbles/jinja2schema | 6e04e8b2b1cdef6dbecab80f0d28129873d3f82b | [
"BSD-3-Clause"
] | null | null | null | from .access_type import AccessType
import pprint
MAGIC_VARS = {
"ansible_check_mode": True,
"ansible_config_file": True,
"ansible_dependent_role_names": True,
"ansible_diff_mode": True,
"ansible_forks": True,
"ansible_inventory_sources": True,
"ansible_limit": True,
"ansible_loop": True,
"ansible_lo... | 29.759912 | 107 | 0.6041 |
9876317f85359f023b8cfa21c030a1e62204b85a | 6,545 | py | Python | ironic/tests/unit/drivers/modules/irmc/test_bios.py | armohamm/ironic | 21093ca886ed736a7a25bf5e71e05d41e132fd2f | [
"Apache-2.0"
] | 2 | 2019-06-17T21:37:53.000Z | 2020-07-11T03:58:39.000Z | ironic/tests/unit/drivers/modules/irmc/test_bios.py | armohamm/ironic | 21093ca886ed736a7a25bf5e71e05d41e132fd2f | [
"Apache-2.0"
] | 13 | 2019-04-12T21:55:36.000Z | 2020-05-26T14:07:13.000Z | ironic/tests/unit/drivers/modules/irmc/test_bios.py | armohamm/ironic | 21093ca886ed736a7a25bf5e71e05d41e132fd2f | [
"Apache-2.0"
] | 11 | 2019-04-10T04:43:33.000Z | 2020-01-31T10:34:14.000Z | # Copyright 2018 FUJITSU LIMITED
#
# 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 writ... | 41.687898 | 75 | 0.574637 |
15fffffe1e1558d84bb70de8a2e15d2124ced15b | 870 | py | Python | lab2/multi_echo_server.py | carrolji/cmput404 | fda7c3f3d8edcd900f73c0667ded4b9d6e5a113d | [
"Apache-2.0"
] | null | null | null | lab2/multi_echo_server.py | carrolji/cmput404 | fda7c3f3d8edcd900f73c0667ded4b9d6e5a113d | [
"Apache-2.0"
] | null | null | null | lab2/multi_echo_server.py | carrolji/cmput404 | fda7c3f3d8edcd900f73c0667ded4b9d6e5a113d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import socket
import time
from multiprocessing import Process
HOST = ""
PORT = 8001
BUFFER_SIZE = 1024
def main():
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind((HOST, PORT))
s.listen(2)
... | 22.894737 | 64 | 0.588506 |
c6120042516b240fe72841e1a027c611ab72ea29 | 374 | py | Python | tests/test_tag_list_comparison.py | bennorth/python-xml-serdes | fb1c44e1630bdbf1fc0ae97a51fb5adac498ffc0 | [
"Apache-2.0"
] | 5 | 2017-02-04T21:17:47.000Z | 2022-03-06T03:15:39.000Z | tests/test_tag_list_comparison.py | bennorth/python-xml-serdes | fb1c44e1630bdbf1fc0ae97a51fb5adac498ffc0 | [
"Apache-2.0"
] | 3 | 2016-10-12T18:06:34.000Z | 2019-08-20T16:00:27.000Z | tests/test_tag_list_comparison.py | bennorth/python-xml-serdes | fb1c44e1630bdbf1fc0ae97a51fb5adac498ffc0 | [
"Apache-2.0"
] | null | null | null | from xmlserdes.errors import TagListComparison
def test_length():
x = list(map(str, range(10)))
y = []
c = TagListComparison(x, y)
assert len(c) == len(x)
def test_helper_lines():
x = ['hello-world']
y = ['hellO-world']
c = TagListComparison(x, y)
assert len(c) == 2
assert str(c)... | 22 | 70 | 0.612299 |
3fc79a0fcb7a243588aa1f02308a9cb900553430 | 542 | py | Python | Mundo #02/ex-040-a11notas-aluno-2.0(1).py | freitasSystemOutPrint/Python3 | e5e88fbe8e7e0c5472573d2c901844270385194b | [
"MIT"
] | 1 | 2020-06-02T07:31:16.000Z | 2020-06-02T07:31:16.000Z | Mundo #02/ex-040-a11notas-aluno-2.0.py | freitasSystemOutPrint/Python3 | e5e88fbe8e7e0c5472573d2c901844270385194b | [
"MIT"
] | null | null | null | Mundo #02/ex-040-a11notas-aluno-2.0.py | freitasSystemOutPrint/Python3 | e5e88fbe8e7e0c5472573d2c901844270385194b | [
"MIT"
] | null | null | null | n = input('Digite seu nome: ')
n1 = float(input('Digite sua primeira nota: '))
n2 = float(input('Digite sua segunda nota: '))
r = (n1 + n2) / 2
if r <5:
print('{}, você está REPROVADO, com média {} !'.format(n,r))
elif r >= 5 and r <=6.9:
print('{} você está de RECUPERAÇÃO, com média {}'.format(n,r))
elif r... | 24.636364 | 66 | 0.605166 |
9847ba0db6c12f29ea98225bfdbff7fa88574ca3 | 4,998 | py | Python | services/web/apps/fm/reportoutages/views.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | 1 | 2019-09-20T09:36:48.000Z | 2019-09-20T09:36:48.000Z | services/web/apps/fm/reportoutages/views.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | services/web/apps/fm/reportoutages/views.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# fm.reportoutages
# ---------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------... | 37.022222 | 96 | 0.498199 |
2026ba93f5ae4dac049ebde5117dbbb932e22cc2 | 1,017 | py | Python | autogluon/utils/tabular/ml/constants.py | jhutchings1/autogluon | 9a0eb8a8f7c88cd09b081adf5d4c6c281d113d75 | [
"Apache-2.0"
] | null | null | null | autogluon/utils/tabular/ml/constants.py | jhutchings1/autogluon | 9a0eb8a8f7c88cd09b081adf5d4c6c281d113d75 | [
"Apache-2.0"
] | null | null | null | autogluon/utils/tabular/ml/constants.py | jhutchings1/autogluon | 9a0eb8a8f7c88cd09b081adf5d4c6c281d113d75 | [
"Apache-2.0"
] | null | null | null | # Do not change these!
BINARY = 'binary'
MULTICLASS = 'multiclass'
REGRESSION = 'regression'
SOFTCLASS = 'softclass' # classification with soft-target (rather than classes, labels are probabilities of each class).
PROBLEM_TYPES_CLASSIFICATION = [BINARY, MULTICLASS]
PROBLEM_TYPES_REGRESSION = [REGRESSION]
PROBLEM_TYPES... | 59.823529 | 165 | 0.794494 |
d8aca93793f0d10300410d3dc868054303e7243d | 69 | py | Python | pymessagefocus/__init__.py | TriggeredMessaging/pymessagefocus | 4f75ce508b526f96c71bd2cf09848ddff7de3c30 | [
"MIT"
] | null | null | null | pymessagefocus/__init__.py | TriggeredMessaging/pymessagefocus | 4f75ce508b526f96c71bd2cf09848ddff7de3c30 | [
"MIT"
] | null | null | null | pymessagefocus/__init__.py | TriggeredMessaging/pymessagefocus | 4f75ce508b526f96c71bd2cf09848ddff7de3c30 | [
"MIT"
] | 3 | 2016-08-11T20:11:16.000Z | 2020-06-01T15:34:34.000Z | from __future__ import absolute_import
from .pymessagefocus import *
| 23 | 38 | 0.855072 |
c232db35b1915a6fd3d7b55e5ba50e5f54eaf144 | 5,311 | py | Python | dataloader.py | rKrishna97/TRACER | 9f3b76ac40a1780755260b1b3360b5e5adb4301f | [
"Apache-2.0"
] | null | null | null | dataloader.py | rKrishna97/TRACER | 9f3b76ac40a1780755260b1b3360b5e5adb4301f | [
"Apache-2.0"
] | null | null | null | dataloader.py | rKrishna97/TRACER | 9f3b76ac40a1780755260b1b3360b5e5adb4301f | [
"Apache-2.0"
] | null | null | null | import cv2
import glob
import torch
import numpy as np
import albumentations as albu
from pathlib import Path
from albumentations.pytorch.transforms import ToTensorV2
from torch.utils.data import Dataset, DataLoader
from sklearn.model_selection import train_test_split
class DatasetGenerate(Dataset):
def __init__(... | 36.376712 | 118 | 0.562606 |
2845890d8762da152b894bbe104dd74f5059a820 | 9,637 | py | Python | system/indy-node-tests/test_libsovtoken.py | devinleighsmith/indy-test-automation | 32d27c8cf8e233d5e365672358752ae3a8b5bf00 | [
"Apache-2.0"
] | 7 | 2019-03-14T10:52:50.000Z | 2021-12-03T00:02:15.000Z | system/indy-node-tests/test_libsovtoken.py | devinleighsmith/indy-test-automation | 32d27c8cf8e233d5e365672358752ae3a8b5bf00 | [
"Apache-2.0"
] | 27 | 2018-10-24T15:28:32.000Z | 2022-03-29T21:30:35.000Z | system/indy-node-tests/test_libsovtoken.py | devinleighsmith/indy-test-automation | 32d27c8cf8e233d5e365672358752ae3a8b5bf00 | [
"Apache-2.0"
] | 22 | 2018-10-03T17:05:23.000Z | 2021-12-03T00:02:04.000Z | from system.utils import *
from indy import pool, did, payment
import pytest
import asyncio
@pytest.mark.skip(reason='ST-580')
@pytest.mark.asyncio
async def test_libsovtoken_acceptance(docker_setup_and_teardown):
await pool.set_protocol_version(2)
await payment_initializer('libsovtoken.so', 'sovtoken_init')
... | 54.755682 | 120 | 0.715887 |
dd8a9e784350033c192d37a23d28e6c4b3147123 | 958 | py | Python | Exercicios/ex107_108_109_110_111/modulos/moeda/__init__.py | GabrielMendesMelo/CursoEmVideo-Python | 74e3a4df29406a9fc6859e3f3e9b824ee8a997b2 | [
"Unlicense"
] | null | null | null | Exercicios/ex107_108_109_110_111/modulos/moeda/__init__.py | GabrielMendesMelo/CursoEmVideo-Python | 74e3a4df29406a9fc6859e3f3e9b824ee8a997b2 | [
"Unlicense"
] | null | null | null | Exercicios/ex107_108_109_110_111/modulos/moeda/__init__.py | GabrielMendesMelo/CursoEmVideo-Python | 74e3a4df29406a9fc6859e3f3e9b824ee8a997b2 | [
"Unlicense"
] | null | null | null | def moeda(n, moeda="R$"):
return f"{moeda}{n:.2f}".replace(".", ",")
def metade(n=0, formato=False):
res = n / 2
return res if not formato else moeda(res)
def dobro(n=0, formato=False):
res = n * 2
return res if not formato else moeda(res)
def aumentar(n=0, porc=0, formato=False):
res = n + (... | 33.034483 | 68 | 0.604384 |
afcd2bc55ae5cc5cbab330929622a06da091d12e | 1,681 | py | Python | wxbtool/norms/minmax.py | caiyunapp/wxbtool | 7a019e1c0b9d454d07ed5cecbbf5ed00951d3ce7 | [
"MIT"
] | 3 | 2021-03-14T03:15:40.000Z | 2021-09-30T16:32:52.000Z | wxbtool/norms/minmax.py | caiyunapp/wxbtool | 7a019e1c0b9d454d07ed5cecbbf5ed00951d3ce7 | [
"MIT"
] | null | null | null | wxbtool/norms/minmax.py | caiyunapp/wxbtool | 7a019e1c0b9d454d07ed5cecbbf5ed00951d3ce7 | [
"MIT"
] | 1 | 2021-03-14T03:15:40.000Z | 2021-03-14T03:15:40.000Z | # -*- coding: utf-8 -*-
def norm_gpt(x):
min, max = -10000, 500000
return (x - min) / (max - min)
def norm_tmp(x):
min, max = 173, 373
return (x - min) / (max - min)
def norm_shm(x):
x = x * (x > 0)
min, max = 0, 0.1
return (x - min) / (max - min)
def norm_rhm(x):
x = x * (x > 0)... | 16.81 | 48 | 0.610351 |
d4aa5e35acfb36cc9569df24fd69c5b6a5e909ce | 5,420 | py | Python | ml_lineage_helper/utils.py | aws-samples/ml-lineage-helper | 3562fa35a5480e7f0a06c6de55a26407774a9edb | [
"Apache-2.0"
] | 7 | 2021-09-28T13:31:31.000Z | 2022-03-26T17:17:07.000Z | ml_lineage_helper/utils.py | aws-samples/ml-lineage-helper | 3562fa35a5480e7f0a06c6de55a26407774a9edb | [
"Apache-2.0"
] | null | null | null | ml_lineage_helper/utils.py | aws-samples/ml-lineage-helper | 3562fa35a5480e7f0a06c6de55a26407774a9edb | [
"Apache-2.0"
] | null | null | null | import sys
import os
import subprocess
import numpy as np
import sagemaker
import boto3
from botocore.config import Config
class StatusIndicator:
def __init__(self):
self.previous_status = None
self.need_newline = False
def update(self, status):
if self.previous_status != status:
... | 33.875 | 157 | 0.602214 |
a2686e292fa363821ef57f933e461d28b76c428f | 268 | py | Python | regionalSwordFernDieOff/import/extract.py | paul-shannon/annotatedMap | f4181c970886561950f8e1242fd18e9f08b5c6ba | [
"MIT"
] | null | null | null | regionalSwordFernDieOff/import/extract.py | paul-shannon/annotatedMap | f4181c970886561950f8e1242fd18e9f08b5c6ba | [
"MIT"
] | null | null | null | regionalSwordFernDieOff/import/extract.py | paul-shannon/annotatedMap | f4181c970886561950f8e1242fd18e9f08b5c6ba | [
"MIT"
] | null | null | null | # status: abandoned for now
from xml.etree import ElementTree as etree
filename = "doc.kml"
xmlDoc = etree.parse(filename)
len(xmlDoc.findall("Folder")) # /Placemark"))
len(placeMarks)
from pykml import parser
with open(filename) as f:
doc.parser.parse(f)
| 20.615385 | 46 | 0.723881 |
10690bfbc499410d860d28dbfec50bfeb70e05cf | 4,831 | py | Python | abcpy/summaryselections.py | shoshijak/abcpy | ad12808782fa72c0428122fc659fd3ff22d3e854 | [
"BSD-3-Clause-Clear"
] | null | null | null | abcpy/summaryselections.py | shoshijak/abcpy | ad12808782fa72c0428122fc659fd3ff22d3e854 | [
"BSD-3-Clause-Clear"
] | null | null | null | abcpy/summaryselections.py | shoshijak/abcpy | ad12808782fa72c0428122fc659fd3ff22d3e854 | [
"BSD-3-Clause-Clear"
] | null | null | null | from abc import ABCMeta, abstractmethod
from abcpy.graphtools import GraphTools
from abcpy.acceptedparametersmanager import *
import numpy as np
from sklearn import linear_model
class Summaryselections(metaclass=ABCMeta):
"""This abstract base class defines a way to choose the summary statistics.
"""
@... | 42.752212 | 117 | 0.694266 |
d59020eac2f967dc1fb3817ccd9858b0c17a29b6 | 2,274 | py | Python | examples/service_migration/server.py | fabrizio-granelli/comnetsemu | 598a4347076c423c4887d4243f49d3c94fe1d075 | [
"MIT"
] | 11 | 2020-10-29T13:13:09.000Z | 2022-01-28T10:30:43.000Z | examples/service_migration/server.py | fabrizio-granelli/comnetsemu | 598a4347076c423c4887d4243f49d3c94fe1d075 | [
"MIT"
] | 12 | 2020-11-25T11:23:18.000Z | 2022-03-28T12:36:49.000Z | examples/service_migration/server.py | fabrizio-granelli/comnetsemu | 598a4347076c423c4887d4243f49d3c94fe1d075 | [
"MIT"
] | 12 | 2020-11-09T03:27:41.000Z | 2022-01-17T11:37:47.000Z | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
About: Simple server for counting.
"""
import argparse
import signal
import socket
import time
INTERNAL_IP_H2 = "192.168.0.12"
INTERNAL_IP_H3 = "192.168.0.13"
INTERNAL_PORT = 9999
SERVICE_IP = "10.0.0.12"
SERVICE_PORT = 8888
HOST_NAME = None
def recv_state(host_n... | 26.44186 | 79 | 0.641161 |
1191606d48b1a0c6add0b6b61e9a39cc1e7e4176 | 4,706 | py | Python | openpnm/metrics/_porosimetry.py | lixuekai2001/OpenPNM | 9026f0fed427d37f4caf1a79e4a7684490d52cf6 | [
"MIT"
] | 1 | 2021-12-06T03:20:55.000Z | 2021-12-06T03:20:55.000Z | openpnm/metrics/_porosimetry.py | lixuekai2001/OpenPNM | 9026f0fed427d37f4caf1a79e4a7684490d52cf6 | [
"MIT"
] | 2 | 2020-06-26T19:58:23.000Z | 2021-12-14T07:16:41.000Z | openpnm/metrics/_porosimetry.py | lixuekai2001/OpenPNM | 9026f0fed427d37f4caf1a79e4a7684490d52cf6 | [
"MIT"
] | null | null | null | import numpy as np
from openpnm.algorithms import OrdinaryPercolation
from openpnm.utils import logging, SettingsAttr, Docorator
docstr = Docorator()
logger = logging.getLogger(__name__)
__all__ = ['Porosimetry']
@docstr.dedent
class PorosimetrySettings:
r"""
%(OrdinaryPercolationSettings.parameters)s
po... | 37.349206 | 83 | 0.630684 |
e9e8842d1381ccb2226a36ac113d7a65a7e0d3e2 | 8,659 | py | Python | plugins/callback.py | Pumudu-railway/MusicPlayer | cdce0966e1a599b02c7b95afd0d851cc70f03fb5 | [
"MIT"
] | null | null | null | plugins/callback.py | Pumudu-railway/MusicPlayer | cdce0966e1a599b02c7b95afd0d851cc70f03fb5 | [
"MIT"
] | null | null | null | plugins/callback.py | Pumudu-railway/MusicPlayer | cdce0966e1a599b02c7b95afd0d851cc70f03fb5 | [
"MIT"
] | null | null | null | #MIT License
#Copyright (c) 2021 SUBIN
#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, distr... | 38.314159 | 150 | 0.519229 |
593150126c8da01b179bbd766ce7fb07fdacc423 | 4,303 | py | Python | test/test.py | FredHappyface/StegStash | c5e3f0d2df5ccbbb270d1e7f79c439b8be126535 | [
"MIT"
] | 1 | 2021-02-07T07:03:43.000Z | 2021-02-07T07:03:43.000Z | test/test.py | FredHappyface/StegStash | c5e3f0d2df5ccbbb270d1e7f79c439b8be126535 | [
"MIT"
] | null | null | null | test/test.py | FredHappyface/StegStash | c5e3f0d2df5ccbbb270d1e7f79c439b8be126535 | [
"MIT"
] | null | null | null | """ tests """
import sys
import os
from pathlib import Path
THISDIR = str(Path(__file__).resolve().parent)
sys.path.insert(0, os.path.dirname(THISDIR))
from stegstash import (imagelsb, fileappend, soundlsb, homoglyphs, msoffice, odf, zerowidth)
# Simple imagelsb
print("\n# simple imagelsb")
imagelsb.simpleEncode(THIS... | 44.360825 | 92 | 0.736463 |
b7942be7a8f9be78e13585bde3962085a009b5c8 | 21,811 | py | Python | src/lib/datasets/dataset/jde_kd.py | wisematch/KDMOT | 03be0a148fc5d5a43c13a0427c429305b92e6838 | [
"MIT"
] | null | null | null | src/lib/datasets/dataset/jde_kd.py | wisematch/KDMOT | 03be0a148fc5d5a43c13a0427c429305b92e6838 | [
"MIT"
] | null | null | null | src/lib/datasets/dataset/jde_kd.py | wisematch/KDMOT | 03be0a148fc5d5a43c13a0427c429305b92e6838 | [
"MIT"
] | null | null | null | import glob
import math
import os
import os.path as osp
import random
import time
from collections import OrderedDict
import cv2
import json
import numpy as np
import torch
import copy
from torch.utils.data import Dataset
from torchvision.transforms import transforms as T
from cython_bbox import bbox_overlaps as bbox... | 37.866319 | 125 | 0.538627 |
0b4a4419b81f0695c9bb59a4382257a548ede0c7 | 1,956 | py | Python | collectors/pfizer/parser.py | almeidaah/collectors | f03096855b8d702969d22af0b20a4d6a0d820bd0 | [
"MIT"
] | 17 | 2016-06-28T21:20:21.000Z | 2022-03-02T16:31:25.000Z | collectors/pfizer/parser.py | almeidaah/collectors | f03096855b8d702969d22af0b20a4d6a0d820bd0 | [
"MIT"
] | 41 | 2016-04-04T10:36:45.000Z | 2017-04-24T10:04:57.000Z | collectors/pfizer/parser.py | kenferrara/collectors | e6c1f45df3a1ffd5d60dada1816484812eb51417 | [
"MIT"
] | 25 | 2016-05-18T09:27:42.000Z | 2021-03-21T14:44:31.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from .record import Record
# Module API
def parse_record(res):
# Init data
data = {}
# Description
key = 'study_type'
pa... | 26.08 | 75 | 0.639059 |
e3a02a053528e3efaf8b742b455f4761e4465adf | 5,949 | py | Python | app.py | shuvanon/Memory-Board | 0615b20c36c42290ee0c3d64e1a2c45fddfdd98b | [
"MIT"
] | 2 | 2017-01-23T20:01:54.000Z | 2022-03-15T15:38:27.000Z | app.py | shuvanon/Memory-Board | 0615b20c36c42290ee0c3d64e1a2c45fddfdd98b | [
"MIT"
] | null | null | null | app.py | shuvanon/Memory-Board | 0615b20c36c42290ee0c3d64e1a2c45fddfdd98b | [
"MIT"
] | null | null | null | from flask import (Flask, g,render_template, flash, redirect, url_for, abort,send_from_directory,request)
from flask.ext.bcrypt import check_password_hash
from flask.ext.login import LoginManager, login_user,logout_user,login_required,current_user
from werkzeug import secure_filename
import os
DEBUG =True
PORT=5000
H... | 28.600962 | 147 | 0.632375 |
21d69f9ac9ea6cb4310fbd52982cce40aa1bc7e1 | 5,471 | py | Python | warpseq/api/support.py | simian-terminal/warpseq | f61e68d1e6a9ad15a5e0c899237be784bcff7093 | [
"Apache-2.0"
] | 3 | 2021-01-22T01:20:20.000Z | 2022-03-10T20:58:42.000Z | warpseq/api/support.py | simianterminal/warpseq | f61e68d1e6a9ad15a5e0c899237be784bcff7093 | [
"Apache-2.0"
] | 1 | 2020-08-13T00:28:28.000Z | 2020-08-13T00:28:28.000Z | warpseq/api/support.py | simianterminal/warpseq | f61e68d1e6a9ad15a5e0c899237be784bcff7093 | [
"Apache-2.0"
] | null | null | null | # ------------------------------------------------------------------
# Warp Sequencer
# (C) 2020 Michael DeHaan <michael@michaeldehaan.net> & contributors
# Apache2 Licensed
# ------------------------------------------------------------------
# code supporting public API boilerplate reduction - a bit too much meta-pro... | 33.564417 | 105 | 0.550174 |
708d7c088a8aed037f3dee9e24e215a3d70f542b | 5,499 | py | Python | .ycm_extra_conf.py | oledahle/mongo-cxx-driver | 60509b2d430b94d8e52d05502fb60e7b91c63cba | [
"Apache-2.0"
] | 934 | 2015-01-02T14:49:43.000Z | 2022-03-16T01:21:42.000Z | .ycm_extra_conf.py | oledahle/mongo-cxx-driver | 60509b2d430b94d8e52d05502fb60e7b91c63cba | [
"Apache-2.0"
] | 533 | 2015-01-07T18:45:30.000Z | 2022-03-23T00:44:26.000Z | .ycm_extra_conf.py | oledahle/mongo-cxx-driver | 60509b2d430b94d8e52d05502fb60e7b91c63cba | [
"Apache-2.0"
] | 570 | 2015-01-04T05:47:04.000Z | 2022-03-28T11:12:38.000Z | # This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either... | 33.944444 | 115 | 0.684488 |
0bd9b662ae298bc2a82e4cabf4bc14c19965c668 | 2,012 | py | Python | precon/re_reference.py | ONSBigData/precon | 4e441a780f72c2e399478abdbc5c0059003cbd17 | [
"MIT"
] | 2 | 2020-10-15T08:48:03.000Z | 2021-03-10T15:39:30.000Z | precon/re_reference.py | ONSBigData/precon | 4e441a780f72c2e399478abdbc5c0059003cbd17 | [
"MIT"
] | 19 | 2020-10-30T15:08:41.000Z | 2021-03-30T11:01:30.000Z | precon/re_reference.py | ONSBigData/precon | 4e441a780f72c2e399478abdbc5c0059003cbd17 | [
"MIT"
] | 1 | 2021-03-17T19:44:48.000Z | 2021-03-17T19:44:48.000Z | # -*- coding: utf-8 -*-
import pandas as pd
def set_reference_period(df, period):
""" A function to re-reference an index series on a given period."""
base_mean = df[period].mean()
re_referenced = df.div(base_mean) * 100
# Fill NaNs from division with zeros
re_referenced.fillna(0, inplace=True)
... | 30.029851 | 79 | 0.671968 |
b803d5266df2366f44f1d8cdf40281bab285e332 | 3,462 | py | Python | run_video_output.py | vamos23467/tf-pose-estimation | 4b951e19be6e9365d72645da292d6e3a559db55a | [
"Apache-2.0"
] | null | null | null | run_video_output.py | vamos23467/tf-pose-estimation | 4b951e19be6e9365d72645da292d6e3a559db55a | [
"Apache-2.0"
] | null | null | null | run_video_output.py | vamos23467/tf-pose-estimation | 4b951e19be6e9365d72645da292d6e3a559db55a | [
"Apache-2.0"
] | null | null | null | import argparse
import logging
import time
import cv2
import numpy as np
from tf_pose.estimator import TfPoseEstimator
from tf_pose.networks import get_graph_path, model_wh
logger = logging.getLogger('TfPoseEstimator-Video')
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
forma... | 39.340909 | 143 | 0.590121 |
fcddaf69a2d770a1b78534ceec28808b09d034c0 | 654 | py | Python | parser/fase2/team10/InstruccionesPL/IndicesPL/IndicePLUsing.py | Gabriel-15/tytus | fb00718bf3fcc5211a3604fba1a551f44bdc6deb | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | parser/fase2/team10/InstruccionesPL/IndicesPL/IndicePLUsing.py | Gabriel-15/tytus | fb00718bf3fcc5211a3604fba1a551f44bdc6deb | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | parser/fase2/team10/InstruccionesPL/IndicesPL/IndicePLUsing.py | Gabriel-15/tytus | fb00718bf3fcc5211a3604fba1a551f44bdc6deb | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z | from InstruccionesPL.TablaSimbolosPL.InstruccionPL import InstruccionPL
class IndicePLUsing(InstruccionPL):
def __init__(self, nombreIndice, nombreTabla , opracion, nombreCampo,tipo, strGram, linea, columna):
InstruccionPL.__init__(self, tipo, linea, columna, strGram)
self.nombreIndice= nom... | 36.333333 | 104 | 0.697248 |
ddc37367cab899b84173f75457eb4162a876ef25 | 2,660 | py | Python | preprocessing/text_embedding.py | affjljoo3581/Job-Recommend-Competition | bb41cdd02161d97813f03eb9d23ff8c186b7da83 | [
"Apache-2.0"
] | 24 | 2022-02-15T09:04:33.000Z | 2022-03-30T05:45:50.000Z | preprocessing/text_embedding.py | affjljoo3581/Job-Recommend-Competition | bb41cdd02161d97813f03eb9d23ff8c186b7da83 | [
"Apache-2.0"
] | 2 | 2022-03-13T13:12:55.000Z | 2022-03-15T03:01:29.000Z | preprocessing/text_embedding.py | affjljoo3581/Job-Recommend-Competition | bb41cdd02161d97813f03eb9d23ff8c186b7da83 | [
"Apache-2.0"
] | 3 | 2022-02-15T14:36:02.000Z | 2022-03-21T16:24:36.000Z | import sys
import numpy as np
import torch
import tqdm
from torch.utils.data import DataLoader, TensorDataset
from transformers import AutoModel, AutoTokenizer
@torch.no_grad()
def get_text_embeddings_from_simcse(
package_dir: str, model_ckpt: str, texts: list[str], batch_size: int = 1024
) -> np.ndarray:
""... | 34.102564 | 80 | 0.707519 |
62347165b1d720ec51bb3e2c84d6a96f72bee666 | 5,826 | py | Python | forte/process_manager.py | jzpang/forte | 489fb9cafba6faf5739bda935836b61b5e3d02b6 | [
"Apache-2.0"
] | 163 | 2019-11-01T19:25:40.000Z | 2022-03-30T22:49:45.000Z | forte/process_manager.py | jzpang/forte | 489fb9cafba6faf5739bda935836b61b5e3d02b6 | [
"Apache-2.0"
] | 633 | 2019-11-01T20:07:08.000Z | 2022-03-31T23:11:20.000Z | forte/process_manager.py | jzpang/forte | 489fb9cafba6faf5739bda935836b61b5e3d02b6 | [
"Apache-2.0"
] | 62 | 2019-11-01T19:41:33.000Z | 2022-03-24T11:14:21.000Z | # Copyright 2019 The Forte 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 applicable ... | 36.641509 | 80 | 0.643666 |
b3bec88a0854761084641e926089b24ad33b6040 | 1,274 | py | Python | Betsy/Betsy/modules/extract_platform_annotations.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | 9 | 2017-01-13T02:38:41.000Z | 2021-04-08T00:44:39.000Z | Betsy/Betsy/modules/extract_platform_annotations.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | null | null | null | Betsy/Betsy/modules/extract_platform_annotations.py | jefftc/changlab | 11da8c415afefcba0b0216238387c75aeb3a56ac | [
"MIT"
] | 4 | 2017-01-05T16:25:25.000Z | 2019-12-12T20:07:38.000Z | from Module import AbstractModule
class Module(AbstractModule):
def __init__(self):
AbstractModule.__init__(self)
def run(
self, network, in_data, out_attributes, user_options, num_cores,
outfile):
from genomicode import filelib
outhandle = open(outfile, 'w')
... | 27.695652 | 72 | 0.635793 |
45902193c6022f1899f4179e29d2d99abb83a452 | 2,534 | py | Python | credentials.py | prettyflyforabeeguy/Arbibot | 7c11184bcbd105c42890ae6afcd281986a667e9b | [
"MIT"
] | null | null | null | credentials.py | prettyflyforabeeguy/Arbibot | 7c11184bcbd105c42890ae6afcd281986a667e9b | [
"MIT"
] | null | null | null | credentials.py | prettyflyforabeeguy/Arbibot | 7c11184bcbd105c42890ae6afcd281986a667e9b | [
"MIT"
] | null | null | null | # Retrieve the credentials and needed URIs from the creds.json
from datetime import datetime, timezone
import hashlib
import hmac
import time
import json
import api_client as _api
class Creds:
def __init__(self):
self.creds_file = "./config/creds.json"
self.creds_dict = {}
self.read_credsj... | 33.342105 | 123 | 0.625099 |
417b66f772a14438b2162b59ecc66d30f0b8bc91 | 4,504 | py | Python | test/algorithms/test_warm_start_qaoa.py | MartinBeseda/qiskit-optimization | 11a924bd7b7f8508149d051827fe82591a12caba | [
"Apache-2.0"
] | null | null | null | test/algorithms/test_warm_start_qaoa.py | MartinBeseda/qiskit-optimization | 11a924bd7b7f8508149d051827fe82591a12caba | [
"Apache-2.0"
] | null | null | null | test/algorithms/test_warm_start_qaoa.py | MartinBeseda/qiskit-optimization | 11a924bd7b7f8508149d051827fe82591a12caba | [
"Apache-2.0"
] | null | null | null | # 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... | 34.914729 | 77 | 0.657194 |
22619f220fa726cec2795343e028e7b06a184f94 | 1,985 | py | Python | GeneratorInterface/Pythia8Interface/test/Py8JetGun_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | GeneratorInterface/Pythia8Interface/test/Py8JetGun_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | GeneratorInterface/Pythia8Interface/test/Py8JetGun_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("TEST")
process.load("FWCore.Framework.test.cmsExceptionsFatal_cff")
process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
process.source = cms.Source("EmptySource")
process.generator = cms.EDFilter("Pythia8JetGun",
maxEventsToPrint = cms.untrack... | 28.357143 | 82 | 0.68262 |
b9dff35f62ddf4feb76c22e777e0cf76411193f3 | 16,632 | py | Python | sopel/modules/meetbot.py | RickardBremer/sopomania | bc336860e53475aea786ca5f2a067f2bf0197294 | [
"EFL-2.0"
] | null | null | null | sopel/modules/meetbot.py | RickardBremer/sopomania | bc336860e53475aea786ca5f2a067f2bf0197294 | [
"EFL-2.0"
] | null | null | null | sopel/modules/meetbot.py | RickardBremer/sopomania | bc336860e53475aea786ca5f2a067f2bf0197294 | [
"EFL-2.0"
] | null | null | null | # coding=utf-8
"""
meetbot.py - Sopel meeting logger module
Copyright © 2012, Elad Alfassa, <elad@fedoraproject.org>
Licensed under the Eiffel Forum License 2.
This module is an attempt to implement at least some of the functionallity of Debian's meetbot
"""
import time
import os
from sopel.config.types import (
... | 38.059497 | 275 | 0.666186 |
17c11596d76e181c7c1e809f0d3c52709de8b448 | 3,185 | py | Python | Vol1B/GMRES/gmres.py | joshualy/numerical_computing | 9f474e36fe85ae663bd20e2f2d06265d1f095173 | [
"CC-BY-3.0"
] | null | null | null | Vol1B/GMRES/gmres.py | joshualy/numerical_computing | 9f474e36fe85ae663bd20e2f2d06265d1f095173 | [
"CC-BY-3.0"
] | null | null | null | Vol1B/GMRES/gmres.py | joshualy/numerical_computing | 9f474e36fe85ae663bd20e2f2d06265d1f095173 | [
"CC-BY-3.0"
] | 1 | 2019-11-05T14:45:03.000Z | 2019-11-05T14:45:03.000Z | """
Vol I Lab __: GMRES
Name:
Date:
"""
#Problem 1: Implement the following function
def gmres(A, b, x0, k=100, tol=1e-8):
'''Calculate approximate solution of Ax=b using GMRES algorithm.
INPUTS:
A - Callable function that calculates Ax for any input vector x.
b - A NumPy array of length m.
... | 35.786517 | 80 | 0.669702 |
39e0b45eaefc01e65453322b327208514a6de46a | 3,404 | py | Python | test/models/test_rbm.py | pascal-vecsei/netket | 3985355234183e3f5a5a97d542a6240d490dcda2 | [
"Apache-2.0"
] | 1 | 2022-03-06T03:41:57.000Z | 2022-03-06T03:41:57.000Z | test/models/test_rbm.py | balakrish181/netket | fc96a828e1ac71a7ecd16b4b178ca689e1871958 | [
"Apache-2.0"
] | 4 | 2022-02-21T01:35:07.000Z | 2022-03-28T01:32:58.000Z | test/models/test_rbm.py | tobiaswiener/netket | ab1fc406f7765e7191fc9ebbb01f766fa4c627a2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The NetKet 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 applicable ... | 29.094017 | 76 | 0.658049 |
62f31c94abc4d349173982411e04fe55b17f315f | 300 | py | Python | abstract.py | vasmedvedev/automation | 98cdf5c577fc4dd57b2d9b7ccfd96e849394cc95 | [
"MIT"
] | null | null | null | abstract.py | vasmedvedev/automation | 98cdf5c577fc4dd57b2d9b7ccfd96e849394cc95 | [
"MIT"
] | null | null | null | abstract.py | vasmedvedev/automation | 98cdf5c577fc4dd57b2d9b7ccfd96e849394cc95 | [
"MIT"
] | null | null | null | class Proxy(object):
"""
Wrapper aroung xmlrpclib.ServerProxy with platform API methods
"""
def __init__(self, server_proxy):
"""
:param server_proxy: XMLRPC server proxy
:type server_proxy: xmlrpclib.ServerProxy
"""
self.proxy = server_proxy
| 25 | 66 | 0.63 |
13615efa3c0777524b45382ac9b6791566f230de | 8,956 | py | Python | old_envs/yahtzee_singleV5.py | tomarbeiter/yahtzee-rl | 51b09ca059740e798061fdeb31cda2b56255ca07 | [
"Apache-2.0"
] | null | null | null | old_envs/yahtzee_singleV5.py | tomarbeiter/yahtzee-rl | 51b09ca059740e798061fdeb31cda2b56255ca07 | [
"Apache-2.0"
] | null | null | null | old_envs/yahtzee_singleV5.py | tomarbeiter/yahtzee-rl | 51b09ca059740e798061fdeb31cda2b56255ca07 | [
"Apache-2.0"
] | null | null | null | from yahtzee_api.game import Game
import ast
import copy
import numpy as np
class YahtzeeSinglePlayerV5:
"""Built to work with compressed state space of agentV6."""
def __init__(self):
self.ytz = Game(1) # Initialize 1-player game of Yahtzee
def step(self, action, action_space, state_space):
... | 43.057692 | 121 | 0.571572 |
63d7871485577b7d796c3cfeb13b6a03aa0e0e0d | 1,275 | py | Python | sdb/commands/tail.py | alan-maguire/sdb | f8ce7f8571785dc7b9e3a80200df46b80a483f58 | [
"Apache-2.0"
] | null | null | null | sdb/commands/tail.py | alan-maguire/sdb | f8ce7f8571785dc7b9e3a80200df46b80a483f58 | [
"Apache-2.0"
] | null | null | null | sdb/commands/tail.py | alan-maguire/sdb | f8ce7f8571785dc7b9e3a80200df46b80a483f58 | [
"Apache-2.0"
] | 1 | 2020-08-18T07:57:43.000Z | 2020-08-18T07:57:43.000Z | #
# Copyright 2019 Delphix
#
# 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, so... | 28.977273 | 74 | 0.702745 |
91bcb9a378056ab268122cd158264fd9fe155808 | 4,200 | py | Python | paragen/utils/data.py | godweiyang/ParaGen | 9665d1244ea38a41fc06b4e0a7f6411985e2221f | [
"Apache-2.0"
] | 50 | 2022-01-18T07:25:46.000Z | 2022-03-14T13:06:18.000Z | paragen/utils/data.py | JiangtaoFeng/ParaGen | 509334bf16e3674e009bb9dc37ecc38ae3b5c977 | [
"Apache-2.0"
] | 2 | 2022-01-19T09:36:42.000Z | 2022-02-23T07:16:02.000Z | paragen/utils/data.py | JiangtaoFeng/ParaGen | 509334bf16e3674e009bb9dc37ecc38ae3b5c977 | [
"Apache-2.0"
] | 6 | 2022-01-19T09:28:53.000Z | 2022-03-10T10:20:08.000Z | from typing import Dict, List
import json
import random
import numpy as np
from paragen.utils.io import SPACE_NORMALIZER
def split_tgt_sequence(tgt, bos, eos):
"""
Split gold target into previous tokens and prediction target.
For examples in text, `[hello, world, !] -> [<bos>, hello, world, !], [hello, ... | 19.905213 | 99 | 0.568095 |
6f73b52c0a0e5b8112d50f2a6f8d35820cc1243c | 9,083 | py | Python | process/TatFeedback.py | donasaur/hiv-model | 97dc3f1461b08067331178e1038a2a21463156bb | [
"MIT"
] | null | null | null | process/TatFeedback.py | donasaur/hiv-model | 97dc3f1461b08067331178e1038a2a21463156bb | [
"MIT"
] | null | null | null | process/TatFeedback.py | donasaur/hiv-model | 97dc3f1461b08067331178e1038a2a21463156bb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
This is a process class whose evolve_state method is called
at each timestep.
An instance of TatFeedback is initialized once per Simulation
with the State as input. The states 'host_factors', 'proteins',
and 'reaction_rates' are modified in this process.
At each timestep, evolve_state read... | 54.389222 | 227 | 0.703182 |
c551541385c78b134194ab0afae77eb677143ef1 | 467 | py | Python | plotly/validators/scatter3d/error_z/_visible.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/scatter3d/error_z/_visible.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scatter3d/error_z/_visible.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(
self, plotly_name='visible', parent_name='scatter3d.error_z', **kwargs
):
super(VisibleValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | 29.1875 | 78 | 0.638116 |
c43b6b0c6f01ec48221671029bd2b87c3534ed7f | 3,423 | py | Python | tests/BlazingSQLTest/EndToEndTests/oldScripts/mainE2ELegacyTests.py | mario21ic/blazingsql | 92ed45f5af438fedc8cad82e4ef8ed3f3fb7eed6 | [
"Apache-2.0"
] | null | null | null | tests/BlazingSQLTest/EndToEndTests/oldScripts/mainE2ELegacyTests.py | mario21ic/blazingsql | 92ed45f5af438fedc8cad82e4ef8ed3f3fb7eed6 | [
"Apache-2.0"
] | null | null | null | tests/BlazingSQLTest/EndToEndTests/oldScripts/mainE2ELegacyTests.py | mario21ic/blazingsql | 92ed45f5af438fedc8cad82e4ef8ed3f3fb7eed6 | [
"Apache-2.0"
] | null | null | null | from Configuration import Settings
from Configuration import ExecutionMode
from EndToEndTests.oldScripts import hiveFileTest
from EndToEndTests.oldScripts import unsignedTypeTest
from EndToEndTests.oldScripts import columnBasisTest
from EndToEndTests.oldScripts import dateTest
from EndToEndTests.oldScripts import file... | 46.256757 | 120 | 0.730646 |
c5fcc439fea34210f0fe52cf80f9e6fa2f32e6a5 | 1,263 | py | Python | backend/venv/src/api/user/admin.py | AkashSDas/camps_for_champs | 1bf7e51905b5b3efc47f94ffcfde7167dace4475 | [
"MIT"
] | null | null | null | backend/venv/src/api/user/admin.py | AkashSDas/camps_for_champs | 1bf7e51905b5b3efc47f94ffcfde7167dace4475 | [
"MIT"
] | null | null | null | backend/venv/src/api/user/admin.py | AkashSDas/camps_for_champs | 1bf7e51905b5b3efc47f94ffcfde7167dace4475 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from .forms import UserAdminChangeForm, UserAdminCreationForm
# User model
User = get_user_model()
# =========================================================
# Customizin... | 28.066667 | 80 | 0.561362 |
08d15caf63683ffe576dc9467b0013e2c29fc7ef | 44,352 | py | Python | scripts/automation/trex_perf.py | alialnu/trex-core | ae4ab05a6215fd0a859adde40dac6afa8bf0f950 | [
"Apache-2.0"
] | null | null | null | scripts/automation/trex_perf.py | alialnu/trex-core | ae4ab05a6215fd0a859adde40dac6afa8bf0f950 | [
"Apache-2.0"
] | null | null | null | scripts/automation/trex_perf.py | alialnu/trex-core | ae4ab05a6215fd0a859adde40dac6afa8bf0f950 | [
"Apache-2.0"
] | null | null | null | #!/router/bin/python-2.7.4
import h_avc
import ConfigParser
import threading
import time,signal
import argparse
import sys
import os
sys.path.append(os.path.join('trex_control_plane', 'stf', 'trex_stf_lib'))
from trex_client import CTRexClient
import subprocess
from time import sleep
import signal
import textwrap
imp... | 35.005525 | 223 | 0.59605 |
aead9dc73ed063e1c5865040eaa2652b26aa3ad3 | 5,571 | py | Python | basicsr/data/transforms.py | RuijiaoSun/BasicSR | b60162e9a0f17c63b87fce36092d08ab81304ab3 | [
"Apache-2.0",
"MIT"
] | 2 | 2021-08-07T02:15:31.000Z | 2021-09-09T02:52:15.000Z | basicsr/data/transforms.py | kuijiang0802/BasicSR | 5c757162b348a09d236e00c2cc04463c0a8bba45 | [
"Apache-2.0",
"MIT"
] | null | null | null | basicsr/data/transforms.py | kuijiang0802/BasicSR | 5c757162b348a09d236e00c2cc04463c0a8bba45 | [
"Apache-2.0",
"MIT"
] | null | null | null | import cv2
import random
def mod_crop(img, scale):
"""Mod crop images, used during testing.
Args:
img (ndarray): Input image.
scale (int): Scale factor.
Returns:
ndarray: Result image.
"""
img = img.copy()
if img.ndim in (2, 3):
h, w = img.shape[0], img.shape[... | 33.560241 | 103 | 0.591635 |
66bb4fb986f69b2d491f15868e0fe6d89ebddf80 | 845 | py | Python | bitmovin_api_sdk/analytics/insights/organizations/organizations_api.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 11 | 2019-07-03T10:41:16.000Z | 2022-02-25T21:48:06.000Z | bitmovin_api_sdk/analytics/insights/organizations/organizations_api.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 8 | 2019-11-23T00:01:25.000Z | 2021-04-29T12:30:31.000Z | bitmovin_api_sdk/analytics/insights/organizations/organizations_api.py | jaythecaesarean/bitmovin-api-sdk-python | 48166511fcb9082041c552ace55a9b66cc59b794 | [
"MIT"
] | 13 | 2020-01-02T14:58:18.000Z | 2022-03-26T12:10:30.000Z | # coding: utf-8
from __future__ import absolute_import
from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase
from bitmovin_api_sdk.common.poscheck import poscheck_except
from bitmovin_api_sdk.analytics.insights.organizations.settings.settings_api import SettingsApi
class OrganizationsApi(BaseApi):
... | 30.178571 | 95 | 0.688757 |
19de75d35fef9d4e5727b85a571e6a8c67bf9022 | 3,196 | py | Python | desihigh/prep/prep_data.py | AlbertoRosado1/desihigh | a9f9d78c0c7605a704ae8008633f7aa9f641f7e4 | [
"BSD-3-Clause"
] | 22 | 2021-01-29T05:34:05.000Z | 2022-03-19T19:02:07.000Z | desihigh/prep/prep_data.py | AlbertoRosado1/desihigh | a9f9d78c0c7605a704ae8008633f7aa9f641f7e4 | [
"BSD-3-Clause"
] | 34 | 2021-01-18T02:22:52.000Z | 2022-02-18T15:17:42.000Z | desihigh/prep/prep_data.py | AlbertoRosado1/desihigh | a9f9d78c0c7605a704ae8008633f7aa9f641f7e4 | [
"BSD-3-Clause"
] | 28 | 2021-02-01T02:02:25.000Z | 2022-02-25T18:15:00.000Z | import astropy.io.fits as fits
import numpy as np
import pylab as pl
from astropy.table import Table, join, vstack
from scipy.ndimage.filters import gaussian_filter
from desitarget.cmx import cmx_targetmask
# Coma on petal 0 of 70510.
tiles = {'mws': 66003, 'bgs'... | 29.592593 | 123 | 0.592929 |
9247de22b6ef0b72ec5b1f6be429473622f2f09a | 570 | py | Python | website/archive/binaries/mac/src/globplot/biopython-1.50/Bio/Writer.py | homiak/jabaws | f9c48c1311a07bffd99866f3d70a82e889f10493 | [
"Apache-2.0"
] | 2 | 2016-05-09T04:20:06.000Z | 2017-03-07T10:25:53.000Z | website/archive/binaries/mac/src/globplot/biopython-1.50/Bio/Writer.py | homiak/jabaws | f9c48c1311a07bffd99866f3d70a82e889f10493 | [
"Apache-2.0"
] | null | null | null | website/archive/binaries/mac/src/globplot/biopython-1.50/Bio/Writer.py | homiak/jabaws | f9c48c1311a07bffd99866f3d70a82e889f10493 | [
"Apache-2.0"
] | 1 | 2019-08-19T22:05:14.000Z | 2019-08-19T22:05:14.000Z | """Part of an old unused and undocumented sequence writing framework (DEPRECATED)."""
import warnings
warnings.warn("Bio.Writer and Bio.writer.* are deprecated. If you do use"\
+" these modules, please get in touch via the mailing list or"\
+" bugzilla to avoid their permanent removal from ... | 31.666667 | 85 | 0.64386 |
bbc1533dfe80d66256486b5b58e09dd921ab83f8 | 2,047 | py | Python | generated/nifake/setup.py | imranadamjee/nimi-python | 1931d17326e13556c46b1cdeb58b7bd36c57b1f3 | [
"MIT"
] | null | null | null | generated/nifake/setup.py | imranadamjee/nimi-python | 1931d17326e13556c46b1cdeb58b7bd36c57b1f3 | [
"MIT"
] | null | null | null | generated/nifake/setup.py | imranadamjee/nimi-python | 1931d17326e13556c46b1cdeb58b7bd36c57b1f3 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This file was generated
from setuptools.command.test import test as test_command
from setuptools import setup
class PyTest(test_command):
def finalize_options(self):
test_command.finalize_options(self)
self.test_args = []
self.test_suite = True... | 28.041096 | 70 | 0.621397 |
fefbe072dae79cd5bb4ab22b788fa841fa67986a | 11,603 | py | Python | v1.0.0.test/toontown/uberdog/TTGameServicesManagerUD.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-01T15:46:43.000Z | 2021-07-23T16:26:48.000Z | v1.0.0.test/toontown/uberdog/TTGameServicesManagerUD.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 1 | 2019-06-29T03:40:05.000Z | 2021-06-13T01:15:16.000Z | v1.0.0.test/toontown/uberdog/TTGameServicesManagerUD.py | TTOFFLINE-LEAK/ttoffline | bb0e91704a755d34983e94288d50288e46b68380 | [
"MIT"
] | 4 | 2019-07-28T21:18:46.000Z | 2021-02-25T06:37:25.000Z | from otp.uberdog.GameServicesManagerUD import *
from toontown.makeatoon.NameGenerator import NameGenerator
from toontown.toon.ToonDNA import ToonDNA
from toontown.toonbase import TTLocalizer
def judgeName(name):
return True
class SetNamePatternOperation(AvatarOperation):
notify = DirectNotifyGlobal.directNot... | 43.294776 | 278 | 0.633715 |
31642be85a92db77a7c7e0f5e138b323ce3d5838 | 51 | py | Python | salesforce_oauth2/__init__.py | RealtyShares/salesforce-oauth2 | 2e5f9a6deaa6b8acf556ca8bd968359f36a9cdbc | [
"Apache-2.0"
] | 26 | 2015-01-08T13:39:23.000Z | 2020-09-03T19:28:41.000Z | salesforce_oauth2/__init__.py | RealtyShares/salesforce-oauth2 | 2e5f9a6deaa6b8acf556ca8bd968359f36a9cdbc | [
"Apache-2.0"
] | null | null | null | salesforce_oauth2/__init__.py | RealtyShares/salesforce-oauth2 | 2e5f9a6deaa6b8acf556ca8bd968359f36a9cdbc | [
"Apache-2.0"
] | 14 | 2015-03-14T17:19:03.000Z | 2021-06-06T15:13:07.000Z | from salesforce_oauth2.auth import SalesforceOAuth2 | 51 | 51 | 0.921569 |
dd5de8146eb76e0b1ffc904f960c1faec7baf533 | 1,889 | py | Python | core/GraphDataBlock.py | giuseppefutia/GraphTSNE | 88d0ad97fe0d79b34ae9af3867f82a0d96f58bd1 | [
"MIT"
] | 120 | 2019-04-17T03:43:55.000Z | 2022-02-20T03:44:58.000Z | core/GraphDataBlock.py | giuseppefutia/GraphTSNE | 88d0ad97fe0d79b34ae9af3867f82a0d96f58bd1 | [
"MIT"
] | 1 | 2020-04-20T21:21:51.000Z | 2022-01-27T12:49:39.000Z | core/GraphDataBlock.py | giuseppefutia/GraphTSNE | 88d0ad97fe0d79b34ae9af3867f82a0d96f58bd1 | [
"MIT"
] | 16 | 2019-04-21T02:45:37.000Z | 2022-03-18T03:05:31.000Z | import numpy as np
import scipy.sparse as sp
from sklearn import manifold
import torch
class GraphDataBlock(object):
"""
Attributes:
edge_to_starting_vertex (scipy coo matrix): matrix of size E x V mapping edges to start vertices
edge_to_ending_vertex (scipy coo matrix): matrix of size E x V m... | 38.55102 | 104 | 0.60667 |
2cd63c9d794496c2722049f8dd6e01b83b01bff5 | 1,166 | py | Python | pyps/gwinstek.py | LevyHe/PyUds | 5d9297578790996d2d83c8fd13eb2b335cc38e4b | [
"MIT"
] | 2 | 2021-03-30T02:02:39.000Z | 2021-04-09T11:00:30.000Z | pyps/gwinstek.py | xinkunlong/PyUds | 5d9297578790996d2d83c8fd13eb2b335cc38e4b | [
"MIT"
] | 1 | 2020-12-03T14:23:11.000Z | 2020-12-03T14:23:11.000Z | pyps/gwinstek.py | xinkunlong/PyUds | 5d9297578790996d2d83c8fd13eb2b335cc38e4b | [
"MIT"
] | 4 | 2021-03-30T02:02:41.000Z | 2021-12-24T03:00:07.000Z | '''
Created on 16 jun 2014
@author: Anders Gertz
'''
import serial
import time
import pyps
class PSP2010(pyps.base.Base):
'''
API for PSP-2010 and equivalents.
'''
def __init__(self, port, baud=2400):
self.sleeptime = 0.5
self.ser = None
self.ser = serial.Se... | 23.32 | 71 | 0.538593 |
30cb6f3dd66229cbe84a8ea977fe7b95c36e9d40 | 36,032 | py | Python | torchdrug/data/molecule.py | jspisak/torchdrug | e02cd7d16bd1a3e5ee1e60efd35e2937b6b39cf7 | [
"Apache-2.0"
] | 2 | 2022-01-02T10:54:15.000Z | 2022-01-13T11:09:27.000Z | torchdrug/data/molecule.py | jspisak/torchdrug | e02cd7d16bd1a3e5ee1e60efd35e2937b6b39cf7 | [
"Apache-2.0"
] | null | null | null | torchdrug/data/molecule.py | jspisak/torchdrug | e02cd7d16bd1a3e5ee1e60efd35e2937b6b39cf7 | [
"Apache-2.0"
] | 1 | 2022-01-02T10:54:19.000Z | 2022-01-02T10:54:19.000Z | import math
import warnings
from matplotlib import pyplot as plt
from rdkit import Chem, RDLogger
from rdkit.Chem.Scaffolds import MurckoScaffold
import torch
from torch_scatter import scatter_add, scatter_min, scatter_max
from torchdrug import utils
from torchdrug.data import constant, Graph, PackedGraph
from torchd... | 42.340776 | 121 | 0.601465 |
068a8cc8ac6499bd4df641c7df3b3e890fb262a3 | 5,548 | py | Python | imageio/core/findlib.py | gerlero/imageio | 4b3550ddedf99ecdfa71768d20a4a6251adcbabf | [
"BSD-2-Clause"
] | null | null | null | imageio/core/findlib.py | gerlero/imageio | 4b3550ddedf99ecdfa71768d20a4a6251adcbabf | [
"BSD-2-Clause"
] | null | null | null | imageio/core/findlib.py | gerlero/imageio | 4b3550ddedf99ecdfa71768d20a4a6251adcbabf | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015-1018, imageio contributors
# Copyright (C) 2013, Zach Pincus, Almar Klein and others
""" This module contains generic code to find and load a dynamic library.
"""
import os
import sys
import ctypes
LOCALDIR = os.path.abspath(os.path.dirname(__file__))
# Flag that can be... | 34.246914 | 78 | 0.638789 |
5c5d42d0a91bf12adac458a20b9a350084dcceda | 1,467 | py | Python | pkgbuild/archlinux/python3/dirname.py | GameMaker2k/Neo-Hockey-Test | 5737bfedf0d83f69964e85ac1dbf7e6a93c13f44 | [
"BSD-3-Clause"
] | 1 | 2020-04-04T10:25:42.000Z | 2020-04-04T10:25:42.000Z | pkgbuild/archlinux/python3/dirname.py | GameMaker2k/Neo-Hockey-Test | 5737bfedf0d83f69964e85ac1dbf7e6a93c13f44 | [
"BSD-3-Clause"
] | null | null | null | pkgbuild/archlinux/python3/dirname.py | GameMaker2k/Neo-Hockey-Test | 5737bfedf0d83f69964e85ac1dbf7e6a93c13f44 | [
"BSD-3-Clause"
] | 3 | 2021-09-07T08:44:33.000Z | 2021-12-07T23:49:39.000Z | #!/usr/bin/env python3
'''
This program is free software; you can redistribute it and/or modify
it under the terms of the Revised BSD License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS F... | 40.75 | 127 | 0.732106 |
28759764eabc28d1f4b8a315ff2b7d54597bdae1 | 1,919 | py | Python | localized_fields/lookups.py | GabLeRoux/django-localized-fields | f0ac0f7f2503317fde5d75ba8481e34db83512bd | [
"MIT"
] | null | null | null | localized_fields/lookups.py | GabLeRoux/django-localized-fields | f0ac0f7f2503317fde5d75ba8481e34db83512bd | [
"MIT"
] | null | null | null | localized_fields/lookups.py | GabLeRoux/django-localized-fields | f0ac0f7f2503317fde5d75ba8481e34db83512bd | [
"MIT"
] | null | null | null | from django.conf import settings
from django.contrib.postgres.fields.hstore import KeyTransform
from django.contrib.postgres.lookups import (SearchLookup, TrigramSimilar,
Unaccent)
from django.db.models.expressions import Col
from django.db.models.lookups import (Contains, E... | 23.691358 | 76 | 0.729026 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.