hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a02853e5bb0ab7ebe63cdf1b789207013fbe2bb | 2,334 | py | Python | estimagic/tests/differentiation/test_differentiation.py | Pascalheid/estimagic | 2503eaf9553c9e09fab9014aa54e84ed83d563fa | [
"BSD-3-Clause"
] | null | null | null | estimagic/tests/differentiation/test_differentiation.py | Pascalheid/estimagic | 2503eaf9553c9e09fab9014aa54e84ed83d563fa | [
"BSD-3-Clause"
] | null | null | null | estimagic/tests/differentiation/test_differentiation.py | Pascalheid/estimagic | 2503eaf9553c9e09fab9014aa54e84ed83d563fa | [
"BSD-3-Clause"
] | null | null | null | from itertools import product
from pathlib import Path
import pandas as pd
import pytest
from pandas.testing import assert_frame_equal
from pandas.testing import assert_series_equal
from estimagic.differentiation.differentiation import gradient
from estimagic.differentiation.differentiation import hessian
from estima... | 29.923077 | 74 | 0.702656 |
4a0286f28a0983db381a730b8c8a3c02d2ffc624 | 2,130 | py | Python | dbt_cloud/command/job/run.py | ernestoongaro/dbt-cloud-cli | 4a6e88564d16991a7a6ae4f76820e58674dc353d | [
"Apache-2.0"
] | null | null | null | dbt_cloud/command/job/run.py | ernestoongaro/dbt-cloud-cli | 4a6e88564d16991a7a6ae4f76820e58674dc353d | [
"Apache-2.0"
] | null | null | null | dbt_cloud/command/job/run.py | ernestoongaro/dbt-cloud-cli | 4a6e88564d16991a7a6ae4f76820e58674dc353d | [
"Apache-2.0"
] | null | null | null | import os
import requests
from typing import Optional, List
from pydantic import Field, validator
from dbt_cloud.command.command import DbtCloudCommand
from dbt_cloud.field import JOB_ID_FIELD
class DbtCloudJobRunCommand(DbtCloudCommand):
"""Triggers a dbt Cloud job run and returns a status JSON response."""
... | 34.918033 | 91 | 0.682629 |
4a028714477c1cf639ea0944ac9355e57a0236b5 | 392 | py | Python | examples/introduction.to.programming.with.turtle/for_all/5-2-3.Outer.triangle.py | strakam/PyEasyGraphics | 57a586aa92385d26725d4ec3d61b2bbbe970195d | [
"BSD-3-Clause"
] | 5 | 2019-09-23T05:15:47.000Z | 2021-01-17T08:06:47.000Z | examples/introduction.to.programming.with.turtle/for_all/5-2-3.Outer.triangle.py | strakam/PyEasyGraphics | 57a586aa92385d26725d4ec3d61b2bbbe970195d | [
"BSD-3-Clause"
] | 3 | 2019-05-03T05:25:17.000Z | 2021-04-15T04:53:16.000Z | examples/introduction.to.programming.with.turtle/for_all/5-2-3.Outer.triangle.py | strakam/PyEasyGraphics | 57a586aa92385d26725d4ec3d61b2bbbe970195d | [
"BSD-3-Clause"
] | 4 | 2019-05-04T13:42:40.000Z | 2021-04-15T10:38:48.000Z | from easygraphics.turtle import *
def outward_tri(size, level):
if level == 0:
return
for i in range(3):
forward(size / 2)
lt(120)
outward_tri(size / 2, level - 1)
rt(120)
forward(size / 2)
rt(120)
def main():
create_world(800, 600)
set_speed(10... | 17.818182 | 40 | 0.556122 |
4a0287a86b2fbb9578b7c13333948d663626f7ec | 4,052 | py | Python | entities/models.py | AdirthaBorgohain/Agency-CRM | 9e9f377c5967fdd20230ab8b558623dc2a1a6403 | [
"MIT"
] | null | null | null | entities/models.py | AdirthaBorgohain/Agency-CRM | 9e9f377c5967fdd20230ab8b558623dc2a1a6403 | [
"MIT"
] | null | null | null | entities/models.py | AdirthaBorgohain/Agency-CRM | 9e9f377c5967fdd20230ab8b558623dc2a1a6403 | [
"MIT"
] | null | null | null | from django.db import models
from datetime import datetime
# Create your models here.
CATEGORY_CHOICES = (
("Newspaper", "Newspaper"),
("Magazine", "Magazine")
)
LANGUAGE_CHOICES = (
("Assamese", "Assamese"),
("English", "English"),
("Hindi", "Hindi"),
("Bengali", "Bengali"),
("Others", ... | 34.931034 | 121 | 0.695459 |
4a0287f13e8f3080817e0cf7cf336e72d3888f0a | 14,316 | py | Python | person-detection-yolo-master/preprocessing.py | Jeevananthamcse/Palanisamy | 9b62f7dbcb9f7a747e5ef5b722e07111a6648b3c | [
"Unlicense"
] | 2 | 2021-08-30T08:04:04.000Z | 2021-09-27T06:01:05.000Z | person-detection-yolo-master/preprocessing.py | Jeevananthamcse/Palanisamy | 9b62f7dbcb9f7a747e5ef5b722e07111a6648b3c | [
"Unlicense"
] | 1 | 2022-02-08T00:01:16.000Z | 2022-02-08T00:01:16.000Z | person-detection-yolo-master/preprocessing.py | Jeevananthamcse/Palanisamy | 9b62f7dbcb9f7a747e5ef5b722e07111a6648b3c | [
"Unlicense"
] | 1 | 2021-09-13T07:03:11.000Z | 2021-09-13T07:03:11.000Z | import os
import cv2
import copy
import numpy as np
import imgaug as ia
from imgaug import augmenters as iaa
from keras import Sequence
import xml.etree.ElementTree as ET
from utils import BoundBox, bbox_iou
def parse_annotation(ann_dir, img_dir, labels=[]):
all_imgs = []
seen_labels = {}
for ann in s... | 47.092105 | 186 | 0.475552 |
4a0288ab30c23ec7533cd0cd74423c0de03523d6 | 9,784 | py | Python | src/pytezos/michelson/macros.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 98 | 2019-02-07T16:33:38.000Z | 2022-03-31T15:53:41.000Z | src/pytezos/michelson/macros.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 152 | 2019-05-20T16:38:56.000Z | 2022-03-30T14:24:38.000Z | src/pytezos/michelson/macros.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 34 | 2019-07-25T12:03:51.000Z | 2021-11-11T22:23:38.000Z | import functools
import re
from collections import namedtuple
from typing import Tuple
from pytezos.michelson.tags import prim_tags
COMPARE = dict(prim='COMPARE')
UNIT = dict(prim='UNIT')
FAILWITH = dict(prim='FAILWITH')
DUP = dict(prim='DUP')
SWAP = dict(prim='SWAP')
CAR = dict(prim='CAR')
CDR = dict(prim='CDR')
CAR... | 27.560563 | 108 | 0.621525 |
4a02890f12d30c602a1055b4693274cf48e82cfa | 1,382 | py | Python | unet/resizeData.py | MartimChaves/ret_detect | 774521a079be4324d542a841c7b3be808c18356b | [
"MIT"
] | null | null | null | unet/resizeData.py | MartimChaves/ret_detect | 774521a079be4324d542a841c7b3be808c18356b | [
"MIT"
] | null | null | null | unet/resizeData.py | MartimChaves/ret_detect | 774521a079be4324d542a841c7b3be808c18356b | [
"MIT"
] | null | null | null | import cv2.cv2 as cv2
import numpy as np
import os
def myShowImage(img,name = "from_show_function"):
cv2.imshow(name, img)
cv2.waitKey(0) # waits until a key is pressed
cv2.destroyAllWindows() # destroys the window showing image
return
for i in range(1,41):
os.chdir("C:/Users/Ma... | 34.55 | 101 | 0.656295 |
4a0289da758f294dd6c6ae6dd31118eb4b001ff1 | 85,751 | py | Python | dbReports/iondb/rundb/migrations/0143_auto__del_field_dmfilestat_filesys_status__add_field_globalconfig_auto.py | konradotto/TS | bf088bd8432b1e3f4b8c8c083650a30d9ef2ae2e | [
"Apache-2.0"
] | 125 | 2015-01-22T05:43:23.000Z | 2022-03-22T17:15:59.000Z | dbReports/iondb/rundb/migrations/0143_auto__del_field_dmfilestat_filesys_status__add_field_globalconfig_auto.py | konradotto/TS | bf088bd8432b1e3f4b8c8c083650a30d9ef2ae2e | [
"Apache-2.0"
] | 59 | 2015-02-10T09:13:06.000Z | 2021-11-11T02:32:38.000Z | dbReports/iondb/rundb/migrations/0143_auto__del_field_dmfilestat_filesys_status__add_field_globalconfig_auto.py | konradotto/TS | bf088bd8432b1e3f4b8c8c083650a30d9ef2ae2e | [
"Apache-2.0"
] | 98 | 2015-01-17T01:25:10.000Z | 2022-03-18T17:29:42.000Z | # Copyright (C) 2013 Ion Torrent Systems, Inc. All Rights Reserved
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Update state for any existing DMFileSt... | 85.57984 | 199 | 0.566839 |
4a028aa923bfb6546f5a22b342f4fdf8b2702942 | 2,972 | py | Python | ada/node_naming.py | carter-e-veldhuizen/RACK | 8ae9b4ecd17d812966aed985d6bc51b1b7ca6e79 | [
"BSD-3-Clause"
] | null | null | null | ada/node_naming.py | carter-e-veldhuizen/RACK | 8ae9b4ecd17d812966aed985d6bc51b1b7ca6e79 | [
"BSD-3-Clause"
] | null | null | null | ada/node_naming.py | carter-e-veldhuizen/RACK | 8ae9b4ecd17d812966aed985d6bc51b1b7ca6e79 | [
"BSD-3-Clause"
] | null | null | null | """
This module contains facilities for extracting traceability-comments Ada program.
"""
__copyright__ = "Copyright (c) 2020, Galois, Inc."
import logging
from typing import Callable, Dict, NewType, Optional, Set
import urllib.parse
import re
import libadalang as lal
from ada_visitor import AdaVisitor
logger = lo... | 32.659341 | 93 | 0.702557 |
4a028b4129e3757b72078490e8e7b253610a3474 | 2,110 | py | Python | Chapter 2/bhp_ssh_server.py | carloocchiena/blackhat_python_book_code | ce181b084e9416dff4c6fba8f4fe7976e6216ba8 | [
"MIT"
] | 36 | 2021-11-16T07:59:39.000Z | 2022-03-20T21:23:35.000Z | Chapter 2/bhp_ssh_server.py | carloocchiena/blackhat_python_book_code | ce181b084e9416dff4c6fba8f4fe7976e6216ba8 | [
"MIT"
] | null | null | null | Chapter 2/bhp_ssh_server.py | carloocchiena/blackhat_python_book_code | ce181b084e9416dff4c6fba8f4fe7976e6216ba8 | [
"MIT"
] | 5 | 2022-01-16T22:59:05.000Z | 2022-02-16T17:23:00.000Z | import socket
import paramiko
import threading
import sys
# using the server host key from the paramiko demo files
host_key = paramiko.RSAKey(filename="test_rsa.key")
class Server(paramiko.ServerInterface):
def __init__(self):
self.event = threading.Event()
def check_channel_request(self, kind, chani... | 27.402597 | 69 | 0.61327 |
4a028c133f6187829a7df97eec65aa0ec7da3de2 | 289 | py | Python | blog/signals.py | alexnazarov090/Django_DIY_BLog | 9daeacff780726e986247782ebccfc70bd529016 | [
"MIT"
] | null | null | null | blog/signals.py | alexnazarov090/Django_DIY_BLog | 9daeacff780726e986247782ebccfc70bd529016 | [
"MIT"
] | null | null | null | blog/signals.py | alexnazarov090/Django_DIY_BLog | 9daeacff780726e986247782ebccfc70bd529016 | [
"MIT"
] | null | null | null | from django.db.models.signals import post_delete
from django.dispatch import receiver
from blog.models import BlogAuthor
@receiver(post_delete, sender=BlogAuthor)
def delete_blogger_status(sender, instance, **kwargs):
instance.username.is_blogger = False
instance.username.save() | 32.111111 | 54 | 0.809689 |
4a028c3cc0e5992d7d3fef54961983964ff84cf0 | 3,837 | py | Python | twobody/utils.py | adrn/TwoBody | 3af41d642e3485aec9ddc18e582e73c561c4df96 | [
"BSD-3-Clause"
] | 3 | 2020-09-14T17:36:20.000Z | 2022-03-05T11:18:54.000Z | twobody/utils.py | adrn/TwoBody | 3af41d642e3485aec9ddc18e582e73c561c4df96 | [
"BSD-3-Clause"
] | 11 | 2017-08-10T14:57:23.000Z | 2021-07-13T19:20:58.000Z | twobody/utils.py | adrn/TwoBody | 3af41d642e3485aec9ddc18e582e73c561c4df96 | [
"BSD-3-Clause"
] | 3 | 2017-08-09T10:41:27.000Z | 2020-12-11T14:17:34.000Z | # Third-party
from astropy.time import Time
from astropy.utils import check_broadcast
import numpy as np
__all__ = ['ArrayProcessor']
class ArrayProcessor:
def __init__(self, *arrs):
self.arrs = [np.array(arr) for arr in arrs]
def prepare_arrays(self):
"""Make sure input arrays are all C-co... | 36.542857 | 79 | 0.624967 |
4a028c5056e21ab06079ebeb07df52e087c37fe0 | 7,955 | py | Python | tellopy/_internal/protocol.py | cstansbu/TelloPy | d1b8d486866421a7a28558238eb420eb0147d95a | [
"Apache-2.0"
] | 3 | 2021-07-28T16:06:28.000Z | 2021-09-10T18:07:01.000Z | tellopy/_internal/protocol.py | cstansbu/TelloPy | d1b8d486866421a7a28558238eb420eb0147d95a | [
"Apache-2.0"
] | 6 | 2020-07-27T13:04:44.000Z | 2021-09-22T19:27:12.000Z | bot/lib/python3.7/site-packages/tellopy/_internal/protocol.py | carlosrh18/DavinciBot | d73a6b7f68d7bab25d134d3f85c6b63a86c206c5 | [
"MIT"
] | 1 | 2021-03-05T19:26:15.000Z | 2021-03-05T19:26:15.000Z | import datetime
from io import BytesIO
from . import crc
from . utils import *
START_OF_PACKET = 0xcc
WIFI_MSG = 0x1a
VIDEO_RATE_QUERY = 40
LIGHT_MSG = 53
FLIGHT_MSG = 0x56
LOG_MSG = 0x1050
VIDEO_ENCODER_RATE_CMD = 0x20
VIDEO_START_CMD = 0x25
VIDEO_MODE_CMD = 0x0031
EXPOSURE_CMD = 0x34
TIME_CMD = 70
STICK_CMD = 80
T... | 31.318898 | 93 | 0.56807 |
4a028c6172cb880e5ac4035dd4fa1c536ff2cc03 | 73,173 | py | Python | src/sage/schemes/toric/divisor.py | bopopescu/sagesmc | e8d1d31f6f598dba2d763baa2d2e804338f9e89e | [
"BSL-1.0"
] | 5 | 2015-01-04T07:15:06.000Z | 2022-03-04T15:15:18.000Z | src/sage/schemes/toric/divisor.py | bopopescu/sagesmc | e8d1d31f6f598dba2d763baa2d2e804338f9e89e | [
"BSL-1.0"
] | null | null | null | src/sage/schemes/toric/divisor.py | bopopescu/sagesmc | e8d1d31f6f598dba2d763baa2d2e804338f9e89e | [
"BSL-1.0"
] | 10 | 2016-09-28T13:12:40.000Z | 2022-02-12T09:28:34.000Z | r"""
Toric divisors and divisor classes
Let `X` be a :class:`toric variety
<sage.schemes.toric.variety.ToricVariety_field>` corresponding to a
:class:`rational polyhedral fan <sage.geometry.fan.RationalPolyhedralFan>`
`\Sigma`. A :class:`toric divisor <ToricDivisor_generic>` `D` is a T-Weil
divisor over a given coeffi... | 34.192991 | 123 | 0.543807 |
4a028c6b34adf03688041f1814d251ac44f3a1f2 | 1,361 | py | Python | main/forms.py | ggetzie/timekeeper | 8db8295a72c5b54558207dd5082a5463803ce74d | [
"MIT"
] | null | null | null | main/forms.py | ggetzie/timekeeper | 8db8295a72c5b54558207dd5082a5463803ce74d | [
"MIT"
] | null | null | null | main/forms.py | ggetzie/timekeeper | 8db8295a72c5b54558207dd5082a5463803ce74d | [
"MIT"
] | null | null | null | from django import forms
from django.urls import reverse
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Submit, Field, Div
from main.models import Hours, Project
class HoursForm(forms.ModelForm):
project = forms.ModelChoiceField(queryset=(Project
... | 35.815789 | 84 | 0.542983 |
4a028d21e56bb3d96d4d7a60559ddf9793801145 | 10,668 | py | Python | allennlp/models/semantic_parsing/nlvr/nlvr_direct_semantic_parser.py | unendin/allennlp | 0dcbaea6dbc6cc43e24a3564d6d37f8a1421484c | [
"Apache-2.0"
] | null | null | null | allennlp/models/semantic_parsing/nlvr/nlvr_direct_semantic_parser.py | unendin/allennlp | 0dcbaea6dbc6cc43e24a3564d6d37f8a1421484c | [
"Apache-2.0"
] | 1 | 2019-07-31T20:12:41.000Z | 2019-07-31T20:12:41.000Z | allennlp/models/semantic_parsing/nlvr/nlvr_direct_semantic_parser.py | unendin/allennlp | 0dcbaea6dbc6cc43e24a3564d6d37f8a1421484c | [
"Apache-2.0"
] | null | null | null | import logging
from typing import List, Dict
from overrides import overrides
import torch
from allennlp.common import Params
from allennlp.data.fields.production_rule_field import ProductionRuleArray
from allennlp.data.vocabulary import Vocabulary
from allennlp.modules import TextFieldEmbedder, Seq2SeqEncoder
from a... | 53.34 | 101 | 0.61886 |
4a028dc7b4415340944f44d577fedf42895f0042 | 395 | py | Python | pages/migrations/0007_coachingcontact_city.py | yogeshprasad/spa-development | 1bee9ca64da5815e1c9a2f7af43b44b59ee2ca7b | [
"Apache-2.0"
] | null | null | null | pages/migrations/0007_coachingcontact_city.py | yogeshprasad/spa-development | 1bee9ca64da5815e1c9a2f7af43b44b59ee2ca7b | [
"Apache-2.0"
] | 7 | 2020-06-05T19:11:22.000Z | 2022-03-11T23:30:57.000Z | pages/migrations/0007_coachingcontact_city.py | yogeshprasad/spa-development | 1bee9ca64da5815e1c9a2f7af43b44b59ee2ca7b | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.0.6 on 2018-11-05 15:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pages', '0006_courseprice'),
]
operations = [
migrations.AddField(
model_name='coachingcontact',
name='city',
... | 20.789474 | 63 | 0.594937 |
4a028e711dcd528c6f12fbe9db6a2d0cc34358dc | 3,826 | py | Python | caspy/query.py | altaurog/django-caspy | c4ec0d39ed94b74a68784878018d6a3ff5e2dba3 | [
"BSD-3-Clause"
] | 1 | 2017-01-30T23:37:27.000Z | 2017-01-30T23:37:27.000Z | caspy/query.py | altaurog/django-caspy | c4ec0d39ed94b74a68784878018d6a3ff5e2dba3 | [
"BSD-3-Clause"
] | null | null | null | caspy/query.py | altaurog/django-caspy | c4ec0d39ed94b74a68784878018d6a3ff5e2dba3 | [
"BSD-3-Clause"
] | null | null | null | from django.db import utils
from . import models, django_orm
class IntegrityError(Exception):
pass
class BaseQuery(object):
def __init__(self, model):
self.model = model
self.qset = model.objects
self.to_domain = django_orm.orm_to_domain
self.to_orm = django_orm.domain_to_orm... | 29.206107 | 70 | 0.611605 |
4a028ea8f78591a986f6b78ba2ede2017b23d8c7 | 4,444 | py | Python | winguhub/share/models.py | movicha/winguhub | 8a82615952db47bc332d5691b1ef6dea521b422c | [
"Apache-2.0"
] | null | null | null | winguhub/share/models.py | movicha/winguhub | 8a82615952db47bc332d5691b1ef6dea521b422c | [
"Apache-2.0"
] | null | null | null | winguhub/share/models.py | movicha/winguhub | 8a82615952db47bc332d5691b1ef6dea521b422c | [
"Apache-2.0"
] | null | null | null | import datetime
from django.db import models
from winguhub.utils import normalize_file_path, normalize_dir_path, gen_token
class AnonymousShare(models.Model):
"""
Model used for sharing repo to unregistered email.
"""
repo_owner = models.EmailField(max_length=255)
repo_id = models.CharField(max_le... | 38.310345 | 84 | 0.65414 |
4a028ec3928449072264f9623b3b1db6b36005c7 | 5,474 | py | Python | scripts/movie_search.py | pnavais/python-lab | a6c4f47674be79762ae4ab9aed5bee04e8d73f47 | [
"Apache-2.0"
] | null | null | null | scripts/movie_search.py | pnavais/python-lab | a6c4f47674be79762ae4ab9aed5bee04e8d73f47 | [
"Apache-2.0"
] | null | null | null | scripts/movie_search.py | pnavais/python-lab | a6c4f47674be79762ae4ab9aed5bee04e8d73f47 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2019 Pablo Navais
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 23.493562 | 109 | 0.655462 |
4a028f110965475fb6684d0d12f2935d39142edc | 1,538 | py | Python | lib/kover_amr/models/scm.py | aldro61/kb_kover_amr | 0b5ed1cfd31a486caa31145711a26b32bc81cb72 | [
"MIT"
] | null | null | null | lib/kover_amr/models/scm.py | aldro61/kb_kover_amr | 0b5ed1cfd31a486caa31145711a26b32bc81cb72 | [
"MIT"
] | null | null | null | lib/kover_amr/models/scm.py | aldro61/kb_kover_amr | 0b5ed1cfd31a486caa31145711a26b32bc81cb72 | [
"MIT"
] | 2 | 2018-08-23T16:09:36.000Z | 2020-03-20T08:02:35.000Z | """
Set Covering Machine model
"""
import json
import os
from Bio.Seq import Seq
class SCMModel():
def __init__(self, path):
"""
Initialize the model based on description files
"""
self.path = path
model_info = json.load(open(os.path.join(path, "results.json"), "r"))["mo... | 28.481481 | 87 | 0.563719 |
4a02911fcedb0a3e01fc697f8f6c86bf8cf719ce | 12,433 | py | Python | test/test_numpy.py | tomaskrehlik/orjson | 53d0704db3330295dda6184e262bfaeb60a16418 | [
"Apache-2.0",
"MIT"
] | null | null | null | test/test_numpy.py | tomaskrehlik/orjson | 53d0704db3330295dda6184e262bfaeb60a16418 | [
"Apache-2.0",
"MIT"
] | null | null | null | test/test_numpy.py | tomaskrehlik/orjson | 53d0704db3330295dda6184e262bfaeb60a16418 | [
"Apache-2.0",
"MIT"
] | null | null | null | # SPDX-License-Identifier: (Apache-2.0 OR MIT)
import unittest
import pytest
import orjson
try:
import numpy
except ImportError:
numpy = None
def numpy_default(obj):
return obj.tolist()
@pytest.mark.skipif(numpy is None, reason="numpy is not installed")
class NumpyTests(unittest.TestCase):
def t... | 28.780093 | 87 | 0.492801 |
4a0292de48aba4eb417c72d5fbd7777762130ff1 | 140 | py | Python | LuoguCodes/AT1978.py | Anguei/OI-Codes | 0ef271e9af0619d4c236e314cd6d8708d356536a | [
"MIT"
] | null | null | null | LuoguCodes/AT1978.py | Anguei/OI-Codes | 0ef271e9af0619d4c236e314cd6d8708d356536a | [
"MIT"
] | null | null | null | LuoguCodes/AT1978.py | Anguei/OI-Codes | 0ef271e9af0619d4c236e314cd6d8708d356536a | [
"MIT"
] | null | null | null | n = int(raw_input().split()[0])
a = []
for i in range(n):
a.append(raw_input())
a.sort()
ans = ';';
for i in a:
ans += i;
print ans
| 14 | 31 | 0.535714 |
4a02935fda4fe010a940b678138731cbc5d30260 | 2,991 | py | Python | addons14/storage_image_product/tests/test_product_image_relation.py | odoochain/addons_oca | 55d456d798aebe16e49b4a6070765f206a8885ca | [
"MIT"
] | 1 | 2021-06-10T14:59:13.000Z | 2021-06-10T14:59:13.000Z | addons14/storage_image_product/tests/test_product_image_relation.py | odoochain/addons_oca | 55d456d798aebe16e49b4a6070765f206a8885ca | [
"MIT"
] | null | null | null | addons14/storage_image_product/tests/test_product_image_relation.py | odoochain/addons_oca | 55d456d798aebe16e49b4a6070765f206a8885ca | [
"MIT"
] | 1 | 2021-04-09T09:44:44.000Z | 2021-04-09T09:44:44.000Z | # Copyright 2017 Akretion (http://www.akretion.com).
# @author Sébastien BEAU <sebastien.beau@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from .common import ProductImageCommonCase
class ProductImageCase(ProductImageCommonCase):
def test_available_attribute_value(self):
... | 43.347826 | 82 | 0.625878 |
4a0293fe1a2cdc37fb00ec504d5c50f2fdf8be89 | 1,188 | py | Python | examples/options.py | dvvolynkin/socratic | d7b7aea41e65bb1a72ba439e6ea7368346b20c4d | [
"MIT"
] | 1 | 2020-04-24T08:58:17.000Z | 2020-04-24T08:58:17.000Z | examples/options.py | dvvolynkin/socratic | d7b7aea41e65bb1a72ba439e6ea7368346b20c4d | [
"MIT"
] | null | null | null | examples/options.py | dvvolynkin/socratic | d7b7aea41e65bb1a72ba439e6ea7368346b20c4d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Socratic - very simple question-answer dialogue system based on python generators.
#
# Daniil Volynkin
# foxezzz@gmail.com
#
# License: MIT
#
from dataclasses import dataclass
from typing import List, Optional
from socratic import Dialogue
@dataclass
class AnswerWithOptions:
message:... | 21.214286 | 84 | 0.627946 |
4a02944115a456b201583fb164cafe357ae8eb72 | 5,779 | py | Python | intuition_experiments.py | wangsiqinudt/AnomalyDetectionTransformations | 999d4eceacb12c7debdb49f5b58971ef4af5110d | [
"MIT"
] | 152 | 2018-11-06T14:41:21.000Z | 2022-03-20T03:53:37.000Z | intuition_experiments.py | PramuPerera/OCDA | 05e6872e74c0de83be45fb4002c103cb85586b4a | [
"MIT"
] | 7 | 2018-12-13T08:49:13.000Z | 2021-08-30T12:58:18.000Z | intuition_experiments.py | PramuPerera/OCDA | 05e6872e74c0de83be45fb4002c103cb85586b4a | [
"MIT"
] | 44 | 2018-12-05T08:42:10.000Z | 2022-03-13T09:52:00.000Z | import itertools
import numpy as np
from scipy.ndimage.filters import gaussian_filter
import matplotlib.pyplot as plt
from transformations import SimpleTransformer
from utils import load_mnist
from keras.utils import to_categorical
from keras.layers import Flatten, Conv2D, Dense, BatchNormalization, MaxPool2D, I... | 39.855172 | 118 | 0.62381 |
4a0295bcad7d232319f1535baf3a93c9e7e35601 | 21,588 | py | Python | tests/fib/test_fib.py | EchoUUU/sonic-mgmt-999 | 716d519afd04ee144475846d1b681d6b4a6e8b13 | [
"Apache-2.0"
] | 1 | 2020-12-21T02:13:59.000Z | 2020-12-21T02:13:59.000Z | tests/fib/test_fib.py | EchoUUU/sonic-mgmt-999 | 716d519afd04ee144475846d1b681d6b4a6e8b13 | [
"Apache-2.0"
] | 1 | 2021-12-15T07:02:04.000Z | 2021-12-15T07:02:04.000Z | tests/fib/test_fib.py | EchoUUU/sonic-mgmt | 716d519afd04ee144475846d1b681d6b4a6e8b13 | [
"Apache-2.0"
] | null | null | null | import time
import json
import logging
import tempfile
import random
from datetime import datetime
import pytest
import requests
from tests.common.fixtures.ptfhost_utils import run_icmp_responder # lgtm[py/unused-import]
from tests.common.fixtures.ptfhost_utils import copy_ptftests_directory # lgtm[py/u... | 40.578947 | 150 | 0.590328 |
4a0295bf7c49570bbaab4a92f9f0c81be6207405 | 2,184 | py | Python | neural_loop_combiner/dataset/dataSampler.py | mir-aidj/neural-Loop-combiner | 0bda8a5e68ef3fe7c05bf8ff440ddde86c21a2cc | [
"MIT"
] | 22 | 2020-07-31T08:11:03.000Z | 2021-08-23T07:50:24.000Z | neural_loop_combiner/dataset/dataSampler.py | mir-aidj/neural-Loop-combiner | 0bda8a5e68ef3fe7c05bf8ff440ddde86c21a2cc | [
"MIT"
] | null | null | null | neural_loop_combiner/dataset/dataSampler.py | mir-aidj/neural-Loop-combiner | 0bda8a5e68ef3fe7c05bf8ff440ddde86c21a2cc | [
"MIT"
] | 1 | 2021-02-26T09:14:47.000Z | 2021-02-26T09:14:47.000Z | import warnings
warnings.filterwarnings("ignore")
import os
import random
import librosa
import numpy as np
from spleeter.separator import Separator
from spleeter.audio.adapter import get_default_audio_adapter
from neural_loop_combiner.utils.utils import log_message, data_exclude
from neural_loop_combiner.conf... | 35.803279 | 114 | 0.622711 |
4a02960e4d6960e9d096a32b27e38e203fdd9421 | 397 | py | Python | 03/03-1.py | pak21/aoc2017 | 622ca0df32cbe22f147c3aeb0dc07a8edfc17095 | [
"MIT"
] | null | null | null | 03/03-1.py | pak21/aoc2017 | 622ca0df32cbe22f147c3aeb0dc07a8edfc17095 | [
"MIT"
] | null | null | null | 03/03-1.py | pak21/aoc2017 | 622ca0df32cbe22f147c3aeb0dc07a8edfc17095 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import math
import sys
def calc(n):
f = math.floor(math.sqrt(n - 1))
d = n - f * f - 1
if f % 2:
dp = d % (f + 1)
m = f - dp if dp < f / 2 else dp + 1
else:
dp = d % f
m = f - dp if dp <= f / 2 else dp
print('{} {}'.format(n, m))
for n in range(... | 15.88 | 44 | 0.460957 |
4a02963ef361ad9fbaa8c5998ecf612a8a0946d2 | 5,520 | py | Python | Documentation/conf.py | ZirakZaheer/cilium | 4fed9902a6342dc54d853dca2e22fd148590ed26 | [
"Apache-2.0"
] | 1 | 2019-10-16T04:01:13.000Z | 2019-10-16T04:01:13.000Z | Documentation/conf.py | jukylin/cilium | cc7a4cb6881639caeae4b34512741e82e2b4c041 | [
"Apache-2.0"
] | null | null | null | Documentation/conf.py | jukylin/cilium | cc7a4cb6881639caeae4b34512741e82e2b4c041 | [
"Apache-2.0"
] | 1 | 2020-09-02T04:07:20.000Z | 2020-09-02T04:07:20.000Z | # -*- coding: utf-8 -*-
#
# Cilium documentation build configuration file, created by
# sphinx-quickstart on Sun Feb 12 18:34:43 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | 30.837989 | 79 | 0.685688 |
4a02965bc010a53280e087f571870082a9b547a8 | 18,152 | py | Python | pyqtgraph/exporters/SVGExporter.py | Tillsten/pyqtgraph | 0045863165fe526988c58cf4f8232ae2d261a5ee | [
"MIT"
] | null | null | null | pyqtgraph/exporters/SVGExporter.py | Tillsten/pyqtgraph | 0045863165fe526988c58cf4f8232ae2d261a5ee | [
"MIT"
] | null | null | null | pyqtgraph/exporters/SVGExporter.py | Tillsten/pyqtgraph | 0045863165fe526988c58cf4f8232ae2d261a5ee | [
"MIT"
] | null | null | null | from .Exporter import Exporter
from ..python2_3 import asUnicode
from ..parametertree import Parameter
from ..Qt import QtGui, QtCore, QtSvg
from .. import debug
from .. import functions as fn
import re
import xml.dom.minidom as xml
import numpy as np
__all__ = ['SVGExporter']
class SVGExporter(Exporter):
Name =... | 39.290043 | 123 | 0.551344 |
4a029740fffa1005ad0b4b3ac1b51b4c140f4b10 | 11,056 | py | Python | src/pyvesync/vesyncswitch.py | webdjoe-bot/pyvesync | 48242e70b15221c0bfa6e7c4391cf171f949280d | [
"MIT"
] | null | null | null | src/pyvesync/vesyncswitch.py | webdjoe-bot/pyvesync | 48242e70b15221c0bfa6e7c4391cf171f949280d | [
"MIT"
] | 1 | 2021-02-01T06:27:47.000Z | 2021-02-08T23:22:24.000Z | src/pyvesync/vesyncswitch.py | webdjoe-bot/pyvesync | 48242e70b15221c0bfa6e7c4391cf171f949280d | [
"MIT"
] | null | null | null | """Classes for VeSync Switch Devices."""
import logging
import json
from abc import ABCMeta, abstractmethod
from pyvesync.helpers import Helpers as helpers
from pyvesync.vesyncbasedevice import VeSyncBaseDevice
logger = logging.getLogger(__name__)
feature_dict = {
'ESWL01': [],
'ESWD16': ['dimmable'],
'E... | 31.770115 | 79 | 0.568379 |
4a029744352c4353bb3c7e2c5bc3b66dd45e1037 | 13,838 | py | Python | src/omop_cdm_classes_5_2.py | jhajagos/CommonDataModelMapper | 65d2251713e5581b76cb16e36424d61fb194c901 | [
"Apache-2.0"
] | 1 | 2019-06-14T02:26:35.000Z | 2019-06-14T02:26:35.000Z | src/omop_cdm_classes_5_2.py | jhajagos/CommonDataModelMapper | 65d2251713e5581b76cb16e36424d61fb194c901 | [
"Apache-2.0"
] | null | null | null | src/omop_cdm_classes_5_2.py | jhajagos/CommonDataModelMapper | 65d2251713e5581b76cb16e36424d61fb194c901 | [
"Apache-2.0"
] | 1 | 2019-08-12T20:19:28.000Z | 2019-08-12T20:19:28.000Z | from mapping_classes import OutputClass
class DomainObject(OutputClass):
def fields(self):
return ["domain_id", "domain_name", "domain_concept_id"]
def table_name(self):
return "domain"
class ConceptObject(OutputClass):
def fields(self):
return ["concept_id", "concept_name", "do... | 37.603261 | 116 | 0.686949 |
4a02981b4b3acdbd49c0e08c541a92828b219d75 | 2,804 | py | Python | docs/tools/github.py | Schnappi618/ClickHouse | a87e1124b5711890c38c06b30b6b3741121ad094 | [
"Apache-2.0"
] | null | null | null | docs/tools/github.py | Schnappi618/ClickHouse | a87e1124b5711890c38c06b30b6b3741121ad094 | [
"Apache-2.0"
] | null | null | null | docs/tools/github.py | Schnappi618/ClickHouse | a87e1124b5711890c38c06b30b6b3741121ad094 | [
"Apache-2.0"
] | null | null | null | import collections
import copy
import io
import logging
import os
import sys
import tarfile
import jinja2
import requests
import util
def choose_latest_releases():
logging.info('Collecting release candidates')
seen = collections.OrderedDict()
candidates = []
for page in range(1, 10):
url = '... | 32.229885 | 99 | 0.560271 |
4a0298a28b9e06066c66617ce17c034d2d130683 | 24,762 | py | Python | myslideslive/slideslive.py | So-Cool/myslideslive | 7b5a02d2421d283114f99ec18a070573c0ff1680 | [
"BSD-3-Clause"
] | 1 | 2021-09-27T12:14:14.000Z | 2021-09-27T12:14:14.000Z | myslideslive/slideslive.py | So-Cool/myslideslive | 7b5a02d2421d283114f99ec18a070573c0ff1680 | [
"BSD-3-Clause"
] | 1 | 2021-11-11T03:42:21.000Z | 2021-11-11T05:51:08.000Z | myslideslive/slideslive.py | So-Cool/myslideslive | 7b5a02d2421d283114f99ec18a070573c0ff1680 | [
"BSD-3-Clause"
] | 2 | 2021-08-15T10:04:34.000Z | 2021-09-27T12:14:19.000Z | # AUTOGENERATED! DO NOT EDIT! File to edit: src/slideslive.ipynb (unless otherwise specified).
__all__ = ['SL_REGEX', 'SL_INFO', 'SL_HTML', 'SL_CDN', 'YODA_CDN', 'url2id', 'get_sl_info', 'parse_slide_xml',
'get_slide_metadata', 'get_urls', 'download_slides', 'ffmpeg_concat_script', 'compose_ffmpeg_video',
... | 41.477387 | 111 | 0.598175 |
4a0299131bc15c683e45abe3af7b130c7603b24a | 12,664 | py | Python | mars/api.py | xccheng/mars | 8146d1b7d3f3bc2a652c414a336a2f884a06a108 | [
"Apache-2.0"
] | 1 | 2020-11-05T05:53:00.000Z | 2020-11-05T05:53:00.000Z | mars/api.py | xccheng/mars | 8146d1b7d3f3bc2a652c414a336a2f884a06a108 | [
"Apache-2.0"
] | null | null | null | mars/api.py | xccheng/mars | 8146d1b7d3f3bc2a652c414a336a2f884a06a108 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 45.884058 | 109 | 0.691646 |
4a0299733b858066401e09c8c033ed2d3fd8b1aa | 2,845 | py | Python | tests/test_spacingd.py | crtrentz/MONAI | 355db48e46047a18e3bb9dbd83f424a8ad0a2622 | [
"Apache-2.0"
] | null | null | null | tests/test_spacingd.py | crtrentz/MONAI | 355db48e46047a18e3bb9dbd83f424a8ad0a2622 | [
"Apache-2.0"
] | null | null | null | tests/test_spacingd.py | crtrentz/MONAI | 355db48e46047a18e3bb9dbd83f424a8ad0a2622 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 MONAI Consortium
# 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, s... | 43.769231 | 105 | 0.608084 |
4a029a9c81093b8013f1ef982017e27094b9b606 | 3,477 | py | Python | osbuild/inputs.py | PaulWay/osbuild | 3731a323084896dd172733ac72f6b8f4ac42c318 | [
"Apache-2.0"
] | 81 | 2019-08-05T15:43:27.000Z | 2022-03-27T11:10:58.000Z | osbuild/inputs.py | PaulWay/osbuild | 3731a323084896dd172733ac72f6b8f4ac42c318 | [
"Apache-2.0"
] | 604 | 2019-07-29T09:34:19.000Z | 2022-03-30T13:13:36.000Z | osbuild/inputs.py | PaulWay/osbuild | 3731a323084896dd172733ac72f6b8f4ac42c318 | [
"Apache-2.0"
] | 50 | 2019-07-28T19:35:45.000Z | 2022-03-09T08:57:25.000Z | """
Pipeline inputs
A pipeline input provides data in various forms to a `Stage`, like
files, OSTree commits or trees. The content can either be obtained
via a `Source` or have been built by a `Pipeline`. Thus an `Input`
is the bridge between various types of content that originate from
different types of sources.
Th... | 28.5 | 71 | 0.605695 |
4a029ab518c1e0e3d2b714054b4229f5f7648d8b | 600 | py | Python | day-11-string-concatenation.py | roshansinghbisht/hello-python | 595418a47e66217ed8759c91cdb535e8fa88412b | [
"MIT"
] | null | null | null | day-11-string-concatenation.py | roshansinghbisht/hello-python | 595418a47e66217ed8759c91cdb535e8fa88412b | [
"MIT"
] | null | null | null | day-11-string-concatenation.py | roshansinghbisht/hello-python | 595418a47e66217ed8759c91cdb535e8fa88412b | [
"MIT"
] | null | null | null | # You’ll be provided with example data for a user, the time of their
# visit and the site they accessed. You should use the variables provided
# and the techniques you’ve learned to print a log message like this one
# (with the username, url, and timestamp replaced with values from the
# appropriate variables):
#
# Y... | 35.294118 | 73 | 0.738333 |
4a029acef1d3e70c4ba772916ea991af5f8bec50 | 265 | py | Python | setup.py | jlaine/auditwheel | f3c7691f258de76c11f679ab85826b730c658c14 | [
"BSD-2-Clause"
] | null | null | null | setup.py | jlaine/auditwheel | f3c7691f258de76c11f679ab85826b730c658c14 | [
"BSD-2-Clause"
] | null | null | null | setup.py | jlaine/auditwheel | f3c7691f258de76c11f679ab85826b730c658c14 | [
"BSD-2-Clause"
] | 1 | 2022-03-04T14:09:27.000Z | 2022-03-04T14:09:27.000Z | from setuptools import setup
extras = {
"test": ["pytest>=3.4", "jsonschema", "pypatchelf", "pretend", "docker"],
"coverage": ["pytest-cov"],
}
extras["develop"] = sum(extras.values(), [])
extras["coverage"] += extras["test"]
setup(extras_require=extras)
| 24.090909 | 77 | 0.641509 |
4a029b243262d7637e1d54d82d270173c68aae9c | 2,406 | py | Python | tests/analysis/manager.py | pyllyukko/plaso | 7533db2d1035ca71d264d6281ebd5db2d073c587 | [
"Apache-2.0"
] | 1,253 | 2015-01-02T13:58:02.000Z | 2022-03-31T08:43:39.000Z | tests/analysis/manager.py | pyllyukko/plaso | 7533db2d1035ca71d264d6281ebd5db2d073c587 | [
"Apache-2.0"
] | 3,388 | 2015-01-02T11:17:58.000Z | 2022-03-30T10:21:45.000Z | tests/analysis/manager.py | pyllyukko/plaso | 7533db2d1035ca71d264d6281ebd5db2d073c587 | [
"Apache-2.0"
] | 376 | 2015-01-20T07:04:54.000Z | 2022-03-04T23:53:00.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the analysis plugin manager."""
import unittest
from plaso.analysis import interface
from plaso.analysis import manager
from tests import test_lib as shared_test_lib
class TestAnalysisPlugin(interface.AnalysisPlugin):
"""Test analysis plugin."""
NAME... | 29.703704 | 74 | 0.741895 |
4a029c87cc996c6d6b66ef634e2ce8d2ae388296 | 4,114 | py | Python | plugins/module_utils/linode/instance.py | muradm/ansible-linode-cloud | dea06d529cf4725f9ee631de844c905614aa5c9b | [
"Apache-2.0"
] | 3 | 2021-01-25T15:10:35.000Z | 2021-09-19T20:39:16.000Z | plugins/module_utils/linode/instance.py | muradm/ansible-linode-cloud | dea06d529cf4725f9ee631de844c905614aa5c9b | [
"Apache-2.0"
] | 1 | 2021-03-02T16:24:31.000Z | 2021-03-02T17:27:17.000Z | plugins/module_utils/linode/instance.py | muradm/ansible-linode-cloud | dea06d529cf4725f9ee631de844c905614aa5c9b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright: (c) 2020, muradm <mail@muradm.net>
# Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from copy import deepcopy
from datetime import datetime
from .client import li... | 31.646154 | 119 | 0.592854 |
4a029cc29604fe4c4140eb677d0343388b2cb266 | 35,464 | py | Python | tests/test_unit_pyosirix.py | osirixgrpc/pyosirix | 8b738728192d877352832467efc9462d6ce7562a | [
"BSD-3-Clause"
] | 1 | 2021-11-08T08:35:21.000Z | 2021-11-08T08:35:21.000Z | tests/test_unit_pyosirix.py | osirixgrpc/pyosirix | 8b738728192d877352832467efc9462d6ce7562a | [
"BSD-3-Clause"
] | 2 | 2022-02-10T10:53:17.000Z | 2022-02-14T11:45:14.000Z | tests/test_unit_pyosirix.py | osirixgrpc/pyosirix | 8b738728192d877352832467efc9462d6ce7562a | [
"BSD-3-Clause"
] | null | null | null | import unittest
import sys
import os
from osirix import ViewerController
import grpc
import pytest
import numpy as np
import matplotlib.pyplot as pl
from osirix.osirix_utils import Osirix, OsirixService
from osirix.Exceptions import GrpcException
import osirix.pb2.osirix_pb2 as osirix_pb2
import osirix.pb2.utilitie... | 42.986667 | 128 | 0.774983 |
4a029e7c108836c3c90a446ce5f0c3c10617d411 | 2,580 | py | Python | mygrations/formats/mysql/file_reader/comment_parser.py | cmancone/mygrations | 30d1d568ca7d6c38dbc5211834dd2d04c0bcf078 | [
"MIT"
] | 10 | 2018-04-09T08:39:42.000Z | 2022-03-14T15:36:05.000Z | mygrations/formats/mysql/file_reader/comment_parser.py | cmancone/mygrations | 30d1d568ca7d6c38dbc5211834dd2d04c0bcf078 | [
"MIT"
] | 14 | 2018-05-02T11:14:08.000Z | 2022-01-15T18:48:54.000Z | mygrations/formats/mysql/file_reader/comment_parser.py | cmancone/mygrations | 30d1d568ca7d6c38dbc5211834dd2d04c0bcf078 | [
"MIT"
] | 5 | 2018-07-18T02:20:48.000Z | 2022-02-19T09:32:07.000Z | from mygrations.core.parse.parser import parser
class comment_parser(parser):
rules = ['nope']
sql = ''
def __init__(self, rules=[]):
# we're not yet a rules-based parser (I may do that eventually), so
# I don't want to run the normal parser __init__()
self.errors = []
sel... | 35.342466 | 96 | 0.537597 |
4a029ef19f2f5150fdbffd4042c4d5c6a8d87659 | 7,199 | py | Python | src/launch_ros/test_launch_ros/test/test_launch_ros/frontend/test_node_frontend.py | househear/_ws_moveit2 | ea5c43ddd412ade6b4bebbdb929b6e08b7a5e888 | [
"Apache-2.0"
] | null | null | null | src/launch_ros/test_launch_ros/test/test_launch_ros/frontend/test_node_frontend.py | househear/_ws_moveit2 | ea5c43ddd412ade6b4bebbdb929b6e08b7a5e888 | [
"Apache-2.0"
] | null | null | null | src/launch_ros/test_launch_ros/test/test_launch_ros/frontend/test_node_frontend.py | househear/_ws_moveit2 | ea5c43ddd412ade6b4bebbdb929b6e08b7a5e888 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Open Source Robotics Foundation, Inc.
#
# 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... | 39.338798 | 161 | 0.54327 |
4a029f16d5c8a7222921374d41efacfa5fc9ad86 | 340 | py | Python | app/__init.py | Hackit321/flask_ip2 | 6a26e0ace048207671272beb680b3172adf91a77 | [
"MIT"
] | null | null | null | app/__init.py | Hackit321/flask_ip2 | 6a26e0ace048207671272beb680b3172adf91a77 | [
"MIT"
] | null | null | null | app/__init.py | Hackit321/flask_ip2 | 6a26e0ace048207671272beb680b3172adf91a77 | [
"MIT"
] | null | null | null | from config import config_option
from flask import Flask
from flask_bootstrap import Bootstrap
def create_app(config_name):
app = Flask(__name__,)
app.config.from_object(config_option[config_name])
from .news_request import configure_request
configure_request(app)
bootstrap = Bootstrap(app)... | 17.894737 | 54 | 0.752941 |
4a02a1c5b78b913c3e2756ff2921af8673cfa50d | 3,417 | py | Python | bin/utils/tsc/valuewriter.py | kurakihx/py-tsz | b6aca805e9bb43493649656491416fdeb053f23b | [
"BSD-3-Clause"
] | 1 | 2020-11-16T05:52:45.000Z | 2020-11-16T05:52:45.000Z | bin/utils/tsc/valuewriter.py | kurakihx/py-tsz | b6aca805e9bb43493649656491416fdeb053f23b | [
"BSD-3-Clause"
] | null | null | null | bin/utils/tsc/valuewriter.py | kurakihx/py-tsz | b6aca805e9bb43493649656491416fdeb053f23b | [
"BSD-3-Clause"
] | null | null | null | import sys, numpy as np
from bin.utils.tsc.bitbuffer import BitBuffer
from bin.utils.tsc.blockinfo import BlockInfo
from bin.utils.tsc.constants import Constants
class ValueWriter(object):
def __init__(self, bitBuffer, bitnum = 64):
self._buffer = bitBuffer
self._previousBlockInfo = None #BlockInfo... | 43.807692 | 124 | 0.652619 |
4a02a1e87ebc40ac6a55e1151ac46038b860a640 | 1,666 | py | Python | lace/shapes.py | bodylabs/lace | a6ae80787c8c6ba197bd9bad9254b503f4e05c73 | [
"BSD-2-Clause"
] | 2 | 2020-05-30T10:28:34.000Z | 2021-02-17T13:47:23.000Z | lace/shapes.py | lace/lace | a6ae80787c8c6ba197bd9bad9254b503f4e05c73 | [
"BSD-2-Clause"
] | 11 | 2019-08-29T16:53:29.000Z | 2021-07-01T06:24:37.000Z | lace/shapes.py | bodylabs/lace | a6ae80787c8c6ba197bd9bad9254b503f4e05c73 | [
"BSD-2-Clause"
] | 5 | 2017-05-09T16:18:16.000Z | 2018-05-08T16:16:09.000Z | from polliwog import shapes
def _shape_as_mesh(shape_factory_fn, *args, **kwargs):
from lace.mesh import Mesh
vertices, faces = shape_factory_fn(*args, ret_unique_vertices_and_faces=True, **kwargs)
return Mesh(v=vertices, f=faces)
def create_rectangular_prism(*args, **kwargs):
'''
Return a Mesh ... | 24.865672 | 91 | 0.660864 |
4a02a1ef1bc7df3b1a0b0cd2f4755f445023ca99 | 190 | py | Python | riscv_isac/__init__.py | edwin7026/riscv-isac | bb2e6d12c3d25f344191c89309dd98830aeef336 | [
"BSD-3-Clause"
] | 5 | 2021-11-04T18:13:32.000Z | 2022-03-17T23:40:38.000Z | riscv_isac/__init__.py | edwin7026/riscv-isac | bb2e6d12c3d25f344191c89309dd98830aeef336 | [
"BSD-3-Clause"
] | 9 | 2021-10-20T10:38:42.000Z | 2022-03-25T16:54:50.000Z | riscv_isac/__init__.py | edwin7026/riscv-isac | bb2e6d12c3d25f344191c89309dd98830aeef336 | [
"BSD-3-Clause"
] | 10 | 2021-09-27T15:04:05.000Z | 2022-03-19T14:50:51.000Z | # See LICENSE.incore for details
"""Top-level package for RISC-V ISA Coverage."""
__author__ = """InCore Semiconductors Pvt Ltd"""
__email__ = 'info@incoresemi.com'
__version__ = '0.13.2'
| 23.75 | 48 | 0.721053 |
4a02a3a08bb04beaa41367215d427605820cd26f | 6,251 | py | Python | data_pre-processing/xml2json.py | AlongRide/CenterNet_anchor_free | 836b5a3666756ef38f34ed4c021e541d0b5c1fa2 | [
"MIT"
] | null | null | null | data_pre-processing/xml2json.py | AlongRide/CenterNet_anchor_free | 836b5a3666756ef38f34ed4c021e541d0b5c1fa2 | [
"MIT"
] | null | null | null | data_pre-processing/xml2json.py | AlongRide/CenterNet_anchor_free | 836b5a3666756ef38f34ed4c021e541d0b5c1fa2 | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
import os
import json
coco = dict()
coco['images'] = []
coco['type'] = 'instances'
coco['annotations'] = []
coco['categories'] = []
category_set = dict()
image_set = set()
category_item_id = 0
image_id = 20180000000
annotation_id = 0
def addCatItem(name):
global category_i... | 36.132948 | 125 | 0.557671 |
4a02a3aac81b347968518ebf37d603b4ff06b168 | 1,585 | py | Python | pysamples/pytictoc/txc7.py | ranarashadmahmood/OMNETPY | 13ab49106a3ac700aa633a8eb37acdad5e3157ab | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 31 | 2020-06-23T13:53:47.000Z | 2022-03-28T08:09:00.000Z | pysamples/pytictoc/txc7.py | ranarashadmahmood/OMNETPY | 13ab49106a3ac700aa633a8eb37acdad5e3157ab | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 8 | 2020-11-01T21:35:47.000Z | 2021-08-29T11:40:50.000Z | pysamples/pytictoc/txc7.py | ranarashadmahmood/OMNETPY | 13ab49106a3ac700aa633a8eb37acdad5e3157ab | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 8 | 2021-03-22T15:32:22.000Z | 2022-02-02T14:57:56.000Z | from pyopp import cSimpleModule, cMessage, EV, WATCH, simTime
EV << "---- Loading module {} ----\n".format(__name__)
class PyTxc7(cSimpleModule):
def initialize(self):
self.event = cMessage('event')
self.tictocmsg = None
if self.getName() == 'tic':
EV << "Scheduling first sen... | 37.738095 | 84 | 0.555205 |
4a02a3b724ef1b727ed5e3c0ff491f1f55f429bf | 3,504 | py | Python | core/polyaxon/proxies/schemas/gateway/services.py | Ohtar10/polyaxon | 1e41804e4ae6466b6928d06bc6ee6d2d9c7b8931 | [
"Apache-2.0"
] | null | null | null | core/polyaxon/proxies/schemas/gateway/services.py | Ohtar10/polyaxon | 1e41804e4ae6466b6928d06bc6ee6d2d9c7b8931 | [
"Apache-2.0"
] | 51 | 2021-04-06T07:59:21.000Z | 2022-03-29T01:08:22.000Z | core/polyaxon/proxies/schemas/gateway/services.py | Ohtar10/polyaxon | 1e41804e4ae6466b6928d06bc6ee6d2d9c7b8931 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, Inc.
#
# 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 ... | 31.854545 | 102 | 0.665525 |
4a02a3bda0f7ac1a5477869f014b7a41b87e406d | 14,880 | py | Python | frappe/website/doctype/web_form/web_form.py | mohamedesmail235/frappe | b175ac407ff01092b5fdec6299f5fc0757f3b53e | [
"MIT"
] | null | null | null | frappe/website/doctype/web_form/web_form.py | mohamedesmail235/frappe | b175ac407ff01092b5fdec6299f5fc0757f3b53e | [
"MIT"
] | 89 | 2017-09-19T15:17:44.000Z | 2022-03-31T00:52:42.000Z | frappe/website/doctype/web_form/web_form.py | mohamedesmail235/frappe | b175ac407ff01092b5fdec6299f5fc0757f3b53e | [
"MIT"
] | 1 | 2018-02-08T01:14:48.000Z | 2018-02-08T01:14:48.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, json, os
from frappe.website.website_generator import WebsiteGenerator
from frappe import _, scrub
from frappe.utils import cstr
from frappe.util... | 29.119374 | 112 | 0.720632 |
4a02a3bdafdfbd993b6e316d6ce07a9a6eef50cd | 4,044 | py | Python | indico/modules/attachments/models/legacy_mapping.py | uxmaster/indico | ecd19f17ef6fdc9f5584f59c87ec647319ce5d31 | [
"MIT"
] | 1 | 2019-11-03T11:34:16.000Z | 2019-11-03T11:34:16.000Z | indico/modules/attachments/models/legacy_mapping.py | NP-compete/indico | 80db7ca0ef9d1f3240a16b9ff2d84bf0bf26c549 | [
"MIT"
] | null | null | null | indico/modules/attachments/models/legacy_mapping.py | NP-compete/indico | 80db7ca0ef9d1f3240a16b9ff2d84bf0bf26c549 | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from sqlalchemy.ext.declarative import declared_attr
from indico... | 27.510204 | 100 | 0.636499 |
4a02a5e3baad80bffa5465e99f3e8bdef69ec287 | 1,125 | py | Python | app/core/models.py | anuwarr/recipe-app-api | 9ea342c7c2e627dd00d47e3db1c526bd0b44b60e | [
"MIT"
] | null | null | null | app/core/models.py | anuwarr/recipe-app-api | 9ea342c7c2e627dd00d47e3db1c526bd0b44b60e | [
"MIT"
] | null | null | null | app/core/models.py | anuwarr/recipe-app-api | 9ea342c7c2e627dd00d47e3db1c526bd0b44b60e | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \
PermissionsMixin
class UserManager(BaseUserManager):
def create_user(self, email, password=None, **extra_fields):
"""Creates and saves a new User"""
if not email:
raise ValueEr... | 31.25 | 76 | 0.691556 |
4a02a5e741a59bcc11535537d11bb313a8d68d93 | 414 | py | Python | qiskit_addon_sympy/__init__.py | ajavadia/qiskit-addon-sympy | eac15d3a20dbe4754415ac0f3678cf0015169cbe | [
"Apache-2.0"
] | null | null | null | qiskit_addon_sympy/__init__.py | ajavadia/qiskit-addon-sympy | eac15d3a20dbe4754415ac0f3678cf0015169cbe | [
"Apache-2.0"
] | null | null | null | qiskit_addon_sympy/__init__.py | ajavadia/qiskit-addon-sympy | eac15d3a20dbe4754415ac0f3678cf0015169cbe | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""Local Sympy Backends."""
from .sympy_statevector_simulator import SympyStatevectorSimulator
from .sympy_unitary_simulator... | 27.6 | 77 | 0.777778 |
4a02a60d71771d715cbcadb1d0b2064c53f2b363 | 17,731 | py | Python | eegpy/ui/event_editor.py | thorstenkranz/eegpy | 0f9461456999874abbb774896ca832eb27740a9d | [
"BSD-2-Clause-FreeBSD"
] | 10 | 2015-05-12T10:42:51.000Z | 2021-07-20T02:08:03.000Z | eegpy/ui/event_editor.py | thorstenkranz/eegpy | 0f9461456999874abbb774896ca832eb27740a9d | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2015-11-19T11:36:30.000Z | 2018-03-21T05:00:09.000Z | eegpy/ui/event_editor.py | thorstenkranz/eegpy | 0f9461456999874abbb774896ca832eb27740a9d | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2016-09-21T22:41:34.000Z | 2019-01-28T13:55:19.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#################
# Module-Import #
#################
#eegpy-modules
try:
import eegpy
from eegpy.events import EventTable
from eegpy.misc import FATALERROR
from eegpy.ui.widgets.windowwidgets import EegpyBaseWin
from eegpy.ui.icon import image_from_ee... | 41.043981 | 184 | 0.61525 |
4a02a6437b00502b8d9a396c6abc17a465aa253b | 4,366 | py | Python | flask_app/match_score.py | crazynayan/ipl2020 | b7fcbc326452807b88d5cad6706d886661c178b1 | [
"MIT"
] | 1 | 2022-03-04T19:44:36.000Z | 2022-03-04T19:44:36.000Z | flask_app/match_score.py | crazynayan/ipl2020 | b7fcbc326452807b88d5cad6706d886661c178b1 | [
"MIT"
] | 4 | 2020-09-14T12:59:04.000Z | 2022-03-17T09:15:41.000Z | flask_app/match_score.py | crazynayan/ipl2020 | b7fcbc326452807b88d5cad6706d886661c178b1 | [
"MIT"
] | null | null | null | from typing import Dict, List, Tuple
from firestore_ci import FirestoreDocument
from config import Config
class ScoreData:
def __init__(self, score_data: Dict):
self.score_data = score_data
def get_value(self, pid: str, key: str, score_type: str) -> float:
player_record = next((player for ... | 31.868613 | 114 | 0.599404 |
4a02a71d5be52aeb4c37e90002079a1efd8889ab | 410 | py | Python | utils/make_hash.py | AndroidModLoader/gta3sc | 07504a7334eb67cfac14e1f788331d1ba2b9343a | [
"MIT"
] | 54 | 2016-06-22T22:26:58.000Z | 2022-02-23T09:25:59.000Z | utils/make_hash.py | GTAResources/gta3sc | a4f3f16574c4e0461ff3c14f8a2839cf3040d952 | [
"MIT"
] | 112 | 2016-06-21T22:52:17.000Z | 2022-02-08T14:15:13.000Z | utils/make_hash.py | thelink2012/gta3sc | 07504a7334eb67cfac14e1f788331d1ba2b9343a | [
"MIT"
] | 9 | 2016-06-24T22:27:55.000Z | 2021-01-11T16:37:36.000Z | #!/usr/bin/env python2
"""
"""
import gta3sc
from gta3sc.config import one_at_a_time
import sys
def main(xmlfile):
config = gta3sc.read_config(xmlfile)
for cmd in config.commands:
cmd.hash = one_at_a_time(cmd.name)
config.save_config(xmlfile)
if __name__ == "__main__":
if len(sys.argv) < 2:... | 18.636364 | 46 | 0.653659 |
4a02a734f9b78e198293d4fdaff66e39655b57c7 | 213 | py | Python | app/config/settings.py | emanuelaguna/rakm | 2d24f32611c866ab00ca2f521b5a1cc0ec473492 | [
"Ruby"
] | 1 | 2020-10-31T16:10:34.000Z | 2020-10-31T16:10:34.000Z | app/config/settings.py | emanuelaguna/rakm | 2d24f32611c866ab00ca2f521b5a1cc0ec473492 | [
"Ruby"
] | null | null | null | app/config/settings.py | emanuelaguna/rakm | 2d24f32611c866ab00ca2f521b5a1cc0ec473492 | [
"Ruby"
] | null | null | null | """app.config.settings.py"""
import os
# Load enviroment variables from .env file.
from dotenv import load_dotenv
load_dotenv()
# The port to serve the app application on.
PORT = int(os.getenv("PORT", "5000"))
| 19.363636 | 43 | 0.7277 |
4a02a7d5d12abc263b57f4f73bbe6cafad2c56e6 | 9,527 | py | Python | pair-finder/pair_finder/pipeline/steps/get_jobs_from_travis_api.py | lxylxy123456/bugswarm | 522ea76ede28811463efda7551509f07b3951961 | [
"BSD-3-Clause"
] | 18 | 2019-12-27T06:53:39.000Z | 2022-03-03T03:05:35.000Z | pair-finder/pair_finder/pipeline/steps/get_jobs_from_travis_api.py | lxylxy123456/bugswarm | 522ea76ede28811463efda7551509f07b3951961 | [
"BSD-3-Clause"
] | 13 | 2020-01-10T17:11:38.000Z | 2021-12-13T20:34:38.000Z | pair-finder/pair_finder/pipeline/steps/get_jobs_from_travis_api.py | lxylxy123456/bugswarm | 522ea76ede28811463efda7551509f07b3951961 | [
"BSD-3-Clause"
] | 10 | 2020-01-10T17:36:57.000Z | 2021-09-13T19:51:43.000Z | """
Download metadata via the Travis API for all jobs for a repository.
"""
import os
import time
from threading import Lock
from typing import Any
from typing import Optional
from typing import Tuple
from requests.exceptions import RequestException
from bugswarm.common import log
from bugswarm.common.json import re... | 47.874372 | 119 | 0.614254 |
4a02a7f106ecc78c47b3bf2ec8949d5a991458bd | 24,289 | py | Python | petgem/preprocessing.py | ocastilloreyes/petgem | 3b6ab012874d2e1787c7644acab889d9d4d748c7 | [
"BSD-3-Clause"
] | 20 | 2018-11-08T19:04:59.000Z | 2022-03-22T22:49:54.000Z | petgem/preprocessing.py | ocastilloreyes/petgem | 3b6ab012874d2e1787c7644acab889d9d4d748c7 | [
"BSD-3-Clause"
] | 1 | 2019-08-17T08:18:16.000Z | 2019-08-17T11:46:22.000Z | petgem/preprocessing.py | ocastilloreyes/petgem | 3b6ab012874d2e1787c7644acab889d9d4d748c7 | [
"BSD-3-Clause"
] | 9 | 2018-07-18T14:59:27.000Z | 2021-10-15T08:58:13.000Z | #!/usr/bin/env python3
# Author: Octavio Castillo Reyes
# Contact: octavio.castillo@bsc.es
"""Define data preprocessing operations for **PETGEM**."""
# ---------------------------------------------------------------
# Load python modules
# ---------------------------------------------------------------
import numpy ... | 43.763964 | 150 | 0.489728 |
4a02a8252c9608966f3f125316c0f2fda689c4e0 | 2,685 | py | Python | cli/polyaxon/polypod/custom_resources/job.py | polyaxon/cli | 3543c0220a8a7c06fc9573cd2a740f8ae4930641 | [
"Apache-2.0"
] | null | null | null | cli/polyaxon/polypod/custom_resources/job.py | polyaxon/cli | 3543c0220a8a7c06fc9573cd2a740f8ae4930641 | [
"Apache-2.0"
] | 1 | 2022-01-24T11:26:47.000Z | 2022-03-18T23:17:58.000Z | cli/polyaxon/polypod/custom_resources/job.py | polyaxon/cli | 3543c0220a8a7c06fc9573cd2a740f8ae4930641 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2022 Polyaxon, Inc.
#
# 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 ... | 33.148148 | 88 | 0.741155 |
4a02a82726b13e3547e1da248566fd6f69aa89b4 | 337 | py | Python | src/entities/__init__.py | Truta446/cardapio-digital-python-printer | 5e69e445e5fb1b5a73837f27ef9e7f88c2c4efa9 | [
"MIT"
] | null | null | null | src/entities/__init__.py | Truta446/cardapio-digital-python-printer | 5e69e445e5fb1b5a73837f27ef9e7f88c2c4efa9 | [
"MIT"
] | null | null | null | src/entities/__init__.py | Truta446/cardapio-digital-python-printer | 5e69e445e5fb1b5a73837f27ef9e7f88c2c4efa9 | [
"MIT"
] | null | null | null | from ._Category import Category
from ._Complement import Complement
from ._Customer import Customer
from ._Item import Item
from ._Printer import Printer
from ._Product import Product
from ._Restaurant import Restaurant
from ._Order import Order
from ._Table import Table
from ._Combo import Combo
from ._Caste... | 28.083333 | 36 | 0.804154 |
4a02a88084d30b030b8c0f5e5ac28dd92d407375 | 80,286 | py | Python | tests/unit/gapic/dialogflow_v2beta1/test_contexts.py | martini9393/python-dialogflow | 69bf02c733c7116840b15992f505cc298ed55b86 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/dialogflow_v2beta1/test_contexts.py | martini9393/python-dialogflow | 69bf02c733c7116840b15992f505cc298ed55b86 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/dialogflow_v2beta1/test_contexts.py | martini9393/python-dialogflow | 69bf02c733c7116840b15992f505cc298ed55b86 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 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 o... | 37.22114 | 111 | 0.68464 |
4a02a97ac177359c8e97d263ded4f6d61b8ae022 | 1,709 | py | Python | src/distributed/rffl/rffl_clientmanager.py | Koukyosyumei/NAIST-Experiments | 2795f6d7f59e7881ba4fe08a37881b8c2b7b4498 | [
"Apache-2.0"
] | 4 | 2021-08-10T03:16:38.000Z | 2021-08-17T13:26:49.000Z | src/distributed/rffl/rffl_clientmanager.py | Koukyosyumei/NAIST-Experiments | 2795f6d7f59e7881ba4fe08a37881b8c2b7b4498 | [
"Apache-2.0"
] | null | null | null | src/distributed/rffl/rffl_clientmanager.py | Koukyosyumei/NAIST-Experiments | 2795f6d7f59e7881ba4fe08a37881b8c2b7b4498 | [
"Apache-2.0"
] | 2 | 2021-11-04T03:56:01.000Z | 2022-02-14T06:22:12.000Z | import logging
import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.getcwd(), "../../")))
from core.utils import transform_list_to_grad
from distributed.inflator.inflator_client_manager import FedAVGInflatorClientManager
sys.path.insert(0, os.path.abspath(os.path.join(os.getcwd(), "../../../FedML/"... | 43.820513 | 86 | 0.74488 |
4a02a9d1212371427c06e4fd1e313e75bbb594f3 | 420 | py | Python | venv/Scripts/pip-script.py | frozzi18/Assignment | dfa6a463bf6b24ed0a346737be722ad00857309e | [
"MIT"
] | null | null | null | venv/Scripts/pip-script.py | frozzi18/Assignment | dfa6a463bf6b24ed0a346737be722ad00857309e | [
"MIT"
] | null | null | null | venv/Scripts/pip-script.py | frozzi18/Assignment | dfa6a463bf6b24ed0a346737be722ad00857309e | [
"MIT"
] | null | null | null | #!C:\Users\ROZZI\PycharmProjects\Power\Assignment\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', s... | 32.307692 | 73 | 0.67381 |
4a02a9e7a20278042b3eedf76488900072794733 | 1,075 | py | Python | abstractFactory.py | findman/python-patterns | 6fe37cd2df31ffc22369bed9fb592f34c67cd36e | [
"MIT"
] | null | null | null | abstractFactory.py | findman/python-patterns | 6fe37cd2df31ffc22369bed9fb592f34c67cd36e | [
"MIT"
] | null | null | null | abstractFactory.py | findman/python-patterns | 6fe37cd2df31ffc22369bed9fb592f34c67cd36e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
from abc import ABCMeta
class StandardFactory(object):
'''这就是那个抽象工厂'''
@staticmethod
def get_factory(factory):
'''根据参数查找对实际操作的工厂'''
if factory == 'cat':
return CatFactory()
elif factory == 'dog':
return DogFacto... | 18.859649 | 80 | 0.614884 |
4a02aa672e70a26beb535f5058d4dd7f65357c58 | 1,460 | py | Python | aliyun-python-sdk-imm/aliyunsdkimm/request/v20170906/DeleteTagJobRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-imm/aliyunsdkimm/request/v20170906/DeleteTagJobRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-imm/aliyunsdkimm/request/v20170906/DeleteTagJobRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | 1 | 2021-02-23T11:27:54.000Z | 2021-02-23T11:27:54.000Z | # 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... | 34.761905 | 71 | 0.760274 |
4a02ac4afa27275e48ae710d8792ba594c64d1d9 | 2,136 | py | Python | server.py | DarknessRisesFromBelow/server-Updated-App | f218335e9cc82c0eb27b6309db7bc1745fc9a8be | [
"Unlicense"
] | null | null | null | server.py | DarknessRisesFromBelow/server-Updated-App | f218335e9cc82c0eb27b6309db7bc1745fc9a8be | [
"Unlicense"
] | null | null | null | server.py | DarknessRisesFromBelow/server-Updated-App | f218335e9cc82c0eb27b6309db7bc1745fc9a8be | [
"Unlicense"
] | null | null | null | import socketserver
import os
from http.server import BaseHTTPRequestHandler, HTTPServer
version = 0
versionIncrementation = 1
strings = []
previousStringsContents = []
stringsContent = []
os.chdir("Your projects files path here.")
def GetLatestVersion():
global strings
global version
GetAllFilesConten... | 30.514286 | 121 | 0.603464 |
4a02ac6172c0a1e19a95d60a260e7f0d589aec47 | 814 | bzl | Python | gitops/defs.bzl | apesternikov/rules_gitops | 591e101db2c7fdfb0b38b8b6703a4b5e349e36e0 | [
"Apache-2.0"
] | 94 | 2020-03-06T02:48:39.000Z | 2022-03-31T06:25:20.000Z | gitops/defs.bzl | apesternikov/rules_gitops | 591e101db2c7fdfb0b38b8b6703a4b5e349e36e0 | [
"Apache-2.0"
] | 30 | 2020-03-06T21:46:08.000Z | 2022-02-08T20:12:03.000Z | gitops/defs.bzl | apesternikov/rules_gitops | 591e101db2c7fdfb0b38b8b6703a4b5e349e36e0 | [
"Apache-2.0"
] | 32 | 2020-03-06T19:55:41.000Z | 2022-03-03T04:15:14.000Z | # Copyright 2020 Adobe. All rights reserved.
# This file is licensed to you 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 ... | 42.842105 | 111 | 0.780098 |
4a02acb99b70b26b958a94173c4e86d900531a55 | 28,653 | py | Python | Core/Python/invoke_refresh_inventory.py | Anon-Artist/OpenManage-Enterprise | 9d807204a6bacf060d72f5ac4f88ca4abdb5e972 | [
"Apache-2.0"
] | null | null | null | Core/Python/invoke_refresh_inventory.py | Anon-Artist/OpenManage-Enterprise | 9d807204a6bacf060d72f5ac4f88ca4abdb5e972 | [
"Apache-2.0"
] | null | null | null | Core/Python/invoke_refresh_inventory.py | Anon-Artist/OpenManage-Enterprise | 9d807204a6bacf060d72f5ac4f88ca4abdb5e972 | [
"Apache-2.0"
] | null | null | null | #
# _author_ = Grant Curell <grant_curell@dell.com>
#
# Copyright (c) 2021 Dell EMC Corporation
#
# 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... | 44.770313 | 120 | 0.606638 |
4a02ae3711656c86f400ae0c0aaf42541f075662 | 154 | py | Python | python-codes/m2_curso_em_video_estruturas_de_controle/ex071.5.py | lucasportella/learning_repo | a9449dffd489e7e1f1619e3acef86bc2c64f0f14 | [
"MIT"
] | null | null | null | python-codes/m2_curso_em_video_estruturas_de_controle/ex071.5.py | lucasportella/learning_repo | a9449dffd489e7e1f1619e3acef86bc2c64f0f14 | [
"MIT"
] | null | null | null | python-codes/m2_curso_em_video_estruturas_de_controle/ex071.5.py | lucasportella/learning_repo | a9449dffd489e7e1f1619e3acef86bc2c64f0f14 | [
"MIT"
] | null | null | null | saque = int(input('Valor do saque: '))
for notas in [50, 20, 10, 1]:
quant = saque // notas
print(f'{quant} notas de {notas}')
saque %= notas
| 25.666667 | 38 | 0.584416 |
4a02ae5121fd2b0f3d5b79c4eae90ffd96ee15ca | 21,283 | py | Python | sdk/tables/azure-data-tables/tests/test_table_cosmos.py | aiven/azure-sdk-for-python | 8764dc07423beca46ed0b51212d81289d9e52c60 | [
"MIT"
] | 1 | 2020-03-05T18:10:35.000Z | 2020-03-05T18:10:35.000Z | sdk/tables/azure-data-tables/tests/test_table_cosmos.py | aiven/azure-sdk-for-python | 8764dc07423beca46ed0b51212d81289d9e52c60 | [
"MIT"
] | 2 | 2020-03-03T23:11:13.000Z | 2020-03-30T18:50:55.000Z | sdk/tables/azure-data-tables/tests/test_table_cosmos.py | aiven/azure-sdk-for-python | 8764dc07423beca46ed0b51212d81289d9e52c60 | [
"MIT"
] | null | null | null | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------... | 36.506003 | 130 | 0.642015 |
4a02ae65b7c0c891325046e4c0d8e7b4230963b9 | 1,318 | py | Python | common/src/stack/command/stack/commands/remove/appliance/route/__init__.py | shivanshs9/stacki | 258740748281dfe89b0f566261eaf23102f91aa4 | [
"BSD-3-Clause"
] | null | null | null | common/src/stack/command/stack/commands/remove/appliance/route/__init__.py | shivanshs9/stacki | 258740748281dfe89b0f566261eaf23102f91aa4 | [
"BSD-3-Clause"
] | null | null | null | common/src/stack/command/stack/commands/remove/appliance/route/__init__.py | shivanshs9/stacki | 258740748281dfe89b0f566261eaf23102f91aa4 | [
"BSD-3-Clause"
] | null | null | null | # @copyright@
# Copyright (c) 2006 - 2018 Teradata
# All rights reserved. Stacki(r) v5.x stacki.com
# https://github.com/Teradata/stacki/blob/master/LICENSE.txt
# @copyright@
#
# @rocks@
# Copyright (c) 2000 - 2010 The Regents of the University of California
# All rights reserved. Rocks(r) v5.4 www.rocksclusters.org
# ... | 27.458333 | 71 | 0.710926 |
4a02ae92d473fc8891f88738d5f6d3ecef96cc8d | 13,245 | py | Python | code/test2.py | lfearnley/TRAPD | ebdd8dc92badcd85f7c7cd6654a5e9235c309fac | [
"MIT"
] | null | null | null | code/test2.py | lfearnley/TRAPD | ebdd8dc92badcd85f7c7cd6654a5e9235c309fac | [
"MIT"
] | null | null | null | code/test2.py | lfearnley/TRAPD | ebdd8dc92badcd85f7c7cd6654a5e9235c309fac | [
"MIT"
] | null | null | null | #!/usr/bin/python
import bisect
import gzip
import operator
import optparse
import sys
#Parse options
parser = optparse.OptionParser()
parser.add_option("-v", "--vcffile", action="store",dest="vcffilename")
parser.add_option("-o", "--outfile", action="store",dest="outfilename", default="snpfile.txt")
parser.add_option... | 31.238208 | 189 | 0.670668 |
4a02aefdaa84cd3c60bfd7601924b4fe7c9a42e3 | 3,802 | py | Python | lib/db_helper.py | mrsiesta/reddit_music_collector | 53af5db9869015d0d315f13aac6a3604ff18563b | [
"Apache-2.0"
] | 1 | 2021-08-15T21:33:22.000Z | 2021-08-15T21:33:22.000Z | lib/db_helper.py | mrsiesta/reddit_music_collector | 53af5db9869015d0d315f13aac6a3604ff18563b | [
"Apache-2.0"
] | null | null | null | lib/db_helper.py | mrsiesta/reddit_music_collector | 53af5db9869015d0d315f13aac6a3604ff18563b | [
"Apache-2.0"
] | null | null | null | import sqlite3
import tabulate
import time
from sqlite3 import Error
class sqliteHelper:
def __init__(self, sqlite_path='content-cache.db', ):
"""Initialize our database and ensure the required tables exist"""
required_tables = {
'content': {
'create_statement':
... | 34.563636 | 93 | 0.576276 |
4a02afdb3fd944c81fe9ce3c0b2e5ead948ea138 | 38,981 | py | Python | quspin/basis/basis_general/base_general.py | Alehud/QuSpin | c72d5fb2b2e9cd9a37d6917bba0337faf3b6c201 | [
"BSD-3-Clause"
] | 195 | 2016-10-24T18:05:31.000Z | 2022-03-29T10:11:56.000Z | quspin/basis/basis_general/base_general.py | Alehud/QuSpin | c72d5fb2b2e9cd9a37d6917bba0337faf3b6c201 | [
"BSD-3-Clause"
] | 303 | 2016-10-25T20:08:11.000Z | 2022-03-31T16:52:09.000Z | quspin/basis/basis_general/base_general.py | Alehud/QuSpin | c72d5fb2b2e9cd9a37d6917bba0337faf3b6c201 | [
"BSD-3-Clause"
] | 54 | 2017-01-03T18:47:52.000Z | 2022-03-16T06:54:33.000Z | import numpy as _np
import scipy.sparse as _sp
import os,numexpr
from ._basis_general_core.general_basis_utils import basis_int_to_python_int,_get_basis_index
from ._basis_general_core import basis_zeros
from ..lattice import lattice_basis
import warnings
class GeneralBasisWarning(Warning):
pass
def process_map(map,... | 32.674769 | 289 | 0.699161 |
4a02b150473e8782f17a3bf4f5af48b8aebcaf16 | 19,442 | py | Python | src/FACE_DIARIZATION/C_FacialDetection/FaceDetectorAndEncoder.py | cristinalunaj/WI-IAT20_PopularityModule | 0a4894e2b889bf31ea1a8beab3025d5dd0b1ed47 | [
"MIT"
] | null | null | null | src/FACE_DIARIZATION/C_FacialDetection/FaceDetectorAndEncoder.py | cristinalunaj/WI-IAT20_PopularityModule | 0a4894e2b889bf31ea1a8beab3025d5dd0b1ed47 | [
"MIT"
] | null | null | null | src/FACE_DIARIZATION/C_FacialDetection/FaceDetectorAndEncoder.py | cristinalunaj/WI-IAT20_PopularityModule | 0a4894e2b889bf31ea1a8beab3025d5dd0b1ed47 | [
"MIT"
] | null | null | null |
"""
Face detection and encoding
Our approach is based on visual information.
Run through the frames of a program, and detect as many faces as
possible using MTCNN [1] or HaarCascade [2]
For each detected face, encode its features as a vector
embedding, thanks to the Facenet model [3].
That way, each face, no ma... | 54.920904 | 168 | 0.619638 |
4a02b151c3004ca3244a7bb0c3f041e3f6dd8aef | 820 | py | Python | Problem Solving/Data Structures/Stacks/Waiter.py | MonwarAdeeb/HackerRank-Solutions | 571327e9688061745000ae81c5fd74ff7a2976d4 | [
"MIT"
] | null | null | null | Problem Solving/Data Structures/Stacks/Waiter.py | MonwarAdeeb/HackerRank-Solutions | 571327e9688061745000ae81c5fd74ff7a2976d4 | [
"MIT"
] | null | null | null | Problem Solving/Data Structures/Stacks/Waiter.py | MonwarAdeeb/HackerRank-Solutions | 571327e9688061745000ae81c5fd74ff7a2976d4 | [
"MIT"
] | null | null | null | #!/bin/python3
import sys
n, q = input().strip().split(' ')
n, q = [int(n), int(q)]
number = list(map(int, input().strip().split(' ')))
# get the prime numbers
lower = 2
upper = 10000
prime = [i for i in range(lower, upper + 1) if all(i %
j != 0 for j in range(2, i)... | 21.578947 | 80 | 0.486585 |
4a02b1ea7efaccbef4949de5a93be0830d7f819b | 25,911 | py | Python | retrace/dxgiretrace.py | groleo/apitrace | b192ca20379790c942ab448fa7cf52891f901d0b | [
"MIT"
] | null | null | null | retrace/dxgiretrace.py | groleo/apitrace | b192ca20379790c942ab448fa7cf52891f901d0b | [
"MIT"
] | null | null | null | retrace/dxgiretrace.py | groleo/apitrace | b192ca20379790c942ab448fa7cf52891f901d0b | [
"MIT"
] | null | null | null | ##########################################################################
#
# Copyright 2011 Jose Fonseca
# All Rights Reserved.
#
# 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 res... | 49.354286 | 180 | 0.563544 |
4a02b233f71c5c573b7ff6c230dfbab5aefcb422 | 1,219 | py | Python | code/solver/meta_heur/__init__.py | ahillbs/minimum_scan_cover | e41718e5a8e0e3039d161800da70e56bd50a1b97 | [
"MIT"
] | null | null | null | code/solver/meta_heur/__init__.py | ahillbs/minimum_scan_cover | e41718e5a8e0e3039d161800da70e56bd50a1b97 | [
"MIT"
] | null | null | null | code/solver/meta_heur/__init__.py | ahillbs/minimum_scan_cover | e41718e5a8e0e3039d161800da70e56bd50a1b97 | [
"MIT"
] | null | null | null | from .genetic_algorithm import AngularGeneticMinSumSolver, AngularGeneticLocalMinSumSolver, AngularGeneticMakespanSolver
from .iterated_local_search import AngularIteratedMinSumSolver, AngularIteratedLocalMinSumSolver, AngularIteratedMakespanSolver
from .simulated_annealing import AngularSimulatedAnnealingMinSumSolver,... | 60.95 | 155 | 0.876128 |
4a02b2e5e6d45705f660ec0fef1979bb99b3d1de | 1,204 | py | Python | pymeasure/instruments/thorlabs/__init__.py | NeoBeats/pymeasure | e48f9d679d6ee970e2e875d2fc9a5679378b07aa | [
"MIT"
] | null | null | null | pymeasure/instruments/thorlabs/__init__.py | NeoBeats/pymeasure | e48f9d679d6ee970e2e875d2fc9a5679378b07aa | [
"MIT"
] | null | null | null | pymeasure/instruments/thorlabs/__init__.py | NeoBeats/pymeasure | e48f9d679d6ee970e2e875d2fc9a5679378b07aa | [
"MIT"
] | null | null | null | #
# This file is part of the PyMeasure package.
#
# Copyright (c) 2013-2020 PyMeasure Developers
#
# 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 limit... | 46.307692 | 79 | 0.780731 |
4a02b3504591c793ab0957112c3b06c9aecebce1 | 845 | py | Python | torch_glow/tests/nodes/avgpool2d_test.py | 842974287/glow | 7d77eb9a1c00dbba77321f62ad9c9078beb2b725 | [
"Apache-2.0"
] | null | null | null | torch_glow/tests/nodes/avgpool2d_test.py | 842974287/glow | 7d77eb9a1c00dbba77321f62ad9c9078beb2b725 | [
"Apache-2.0"
] | null | null | null | torch_glow/tests/nodes/avgpool2d_test.py | 842974287/glow | 7d77eb9a1c00dbba77321f62ad9c9078beb2b725 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
import unittest
import torch
import torch.nn.functional as F
from tests.utils import jitVsGlow
class TestAvgPool2d(unittest.TestCase):
def test_avg_pool2d_basic(self):
"""Basic test of the PyTorch avg_pool2d Node on Glow.... | 28.166667 | 82 | 0.688757 |
4a02b3bf9c689e2728ce73db4ccd78d732f85094 | 28,754 | py | Python | OpenSeesAPI/Model/Element/Element.py | alok230460/Open | ccd7c43c82c13bc87e6c208302f7448060b856ba | [
"MIT",
"Unlicense"
] | 41 | 2015-09-08T09:41:13.000Z | 2022-03-26T08:40:02.000Z | OpenSeesAPI/Model/Element/Element.py | alok230460/Open | ccd7c43c82c13bc87e6c208302f7448060b856ba | [
"MIT",
"Unlicense"
] | 4 | 2015-09-11T17:20:46.000Z | 2016-05-02T20:42:58.000Z | OpenSeesAPI/Model/Element/Element.py | alok230460/Open | ccd7c43c82c13bc87e6c208302f7448060b856ba | [
"MIT",
"Unlicense"
] | 31 | 2015-09-11T17:01:36.000Z | 2021-11-08T17:48:27.000Z | """
This class is used to create the following OpenSees TCL Commands:
This command is used to construct an element and add it to the Domain.
element eleType? arg1? ...
The type of element created and the additional arguments required depends on the eleType? provided in the command.
NOTE:
The valid queries to any ele... | 50.712522 | 458 | 0.703241 |
4a02b48c9e0a81f07d16d67796e4429247675fc9 | 1,192 | py | Python | 2020/muggle_ocr/muggle_ocr_dome.py | aleimu/code-puzzle | 1aaa86e6b49e1fe15a2a6c6be22badd783594024 | [
"MIT"
] | null | null | null | 2020/muggle_ocr/muggle_ocr_dome.py | aleimu/code-puzzle | 1aaa86e6b49e1fe15a2a6c6be22badd783594024 | [
"MIT"
] | null | null | null | 2020/muggle_ocr/muggle_ocr_dome.py | aleimu/code-puzzle | 1aaa86e6b49e1fe15a2a6c6be22badd783594024 | [
"MIT"
] | null | null | null | import time
# 1. 导入包
import muggle_ocr
"""
使用预置模型,预置模型包含了[ModelType.OCR, ModelType.Captcha] 两种
其中 ModelType.OCR 用于识别普通印刷文本, ModelType.Captcha 用于识别4-6位简单英数验证码
"""
# 打开印刷文本图片
with open("test14.png", "rb") as f:
ocr_bytes = f.read()
# 打开验证码图片
with open("test10.png", "rb") as f:
captcha_bytes = f.read()
# 2. ... | 25.361702 | 69 | 0.689597 |
4a02b6c689f480ac9caf9838aee5e048fd719f3d | 793 | py | Python | modules/intelligence-gathering/masscan.py | nimert007/The-Penetration-Testers-Framework-PTF- | d8f7ae02b6655df93e1cabbca8481b5df55bd4c0 | [
"FTL"
] | 4 | 2020-09-03T02:26:23.000Z | 2022-02-25T06:57:25.000Z | modules/intelligence-gathering/masscan.py | Ben0xA/ptf | ebcc7a192c1286b962a826ec8e6f48334926b675 | [
"FTL"
] | null | null | null | modules/intelligence-gathering/masscan.py | Ben0xA/ptf | ebcc7a192c1286b962a826ec8e6f48334926b675 | [
"FTL"
] | 3 | 2016-03-22T11:24:57.000Z | 2019-03-28T11:31:25.000Z | #!/usr/bin/env python
#####################################
# Installation module for masscan
#####################################
# AUTHOR OF MODULE NAME
AUTHOR="Mauro Risonho de Paula Assumpcao (firebits)"
# DESCRIPTION OF THE MODULE
DESCRIPTION="This module will install/update masscan - a quick TCP/SYN port scann... | 26.433333 | 84 | 0.698613 |
4a02b6eddd7ea360a036fed3a64bb299fe7b019a | 89 | py | Python | tests/test_jax_util.py | shawwn/jax-util | 08fa4e49137ad1e3789c78f654c4c8e919cdf294 | [
"MIT"
] | null | null | null | tests/test_jax_util.py | shawwn/jax-util | 08fa4e49137ad1e3789c78f654c4c8e919cdf294 | [
"MIT"
] | null | null | null | tests/test_jax_util.py | shawwn/jax-util | 08fa4e49137ad1e3789c78f654c4c8e919cdf294 | [
"MIT"
] | null | null | null | from jax_util import __version__
def test_version():
assert __version__ == '0.1.0'
| 14.833333 | 33 | 0.719101 |
4a02b79ab5b69fcb199a6b61bbe54fbed524b355 | 49,949 | py | Python | eland/series.py | ailanmar/eland | c14bc2403276ad989ef6adb9215db5906813d648 | [
"Apache-2.0"
] | 335 | 2020-01-10T10:47:21.000Z | 2022-03-31T12:33:03.000Z | eland/series.py | ailanmar/eland | c14bc2403276ad989ef6adb9215db5906813d648 | [
"Apache-2.0"
] | 255 | 2020-01-10T11:09:32.000Z | 2022-03-31T21:34:54.000Z | eland/series.py | ailanmar/eland | c14bc2403276ad989ef6adb9215db5906813d648 | [
"Apache-2.0"
] | 51 | 2020-01-10T10:53:54.000Z | 2022-03-15T15:48:18.000Z | # Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use ... | 29.67855 | 150 | 0.544555 |
4a02b8041679e30b176c1408caca95295fab81f5 | 5,593 | py | Python | src/highdicom/sr/utils.py | malaterre/highdicom | 1d02c328d1f7aee028d5d61c124d2aff11396603 | [
"MIT"
] | 64 | 2020-02-28T13:46:47.000Z | 2022-02-16T15:48:58.000Z | src/highdicom/sr/utils.py | malaterre/highdicom | 1d02c328d1f7aee028d5d61c124d2aff11396603 | [
"MIT"
] | 80 | 2020-02-29T01:32:19.000Z | 2022-02-14T23:54:38.000Z | src/highdicom/sr/utils.py | malaterre/highdicom | 1d02c328d1f7aee028d5d61c124d2aff11396603 | [
"MIT"
] | 18 | 2020-02-28T15:11:17.000Z | 2022-01-02T13:23:54.000Z | """Utilities for working with SR document instances."""
from typing import List, Optional, Union
from pydicom.dataset import Dataset
from pydicom.sr.coding import Code
from highdicom.sr.coding import CodedConcept
from highdicom.sr.enum import ValueTypeValues, RelationshipTypeValues
from highdicom.sr.value_types impor... | 32.9 | 86 | 0.639371 |
4a02b8deef77ac2acd6a1ed67de6a626264865d8 | 2,161 | py | Python | wip_bots/bot.py | axu8888/pc-bot | 8a51f7c6069ea9189ecfd283040772677bc02a1b | [
"MIT"
] | null | null | null | wip_bots/bot.py | axu8888/pc-bot | 8a51f7c6069ea9189ecfd283040772677bc02a1b | [
"MIT"
] | null | null | null | wip_bots/bot.py | axu8888/pc-bot | 8a51f7c6069ea9189ecfd283040772677bc02a1b | [
"MIT"
] | null | null | null | from discord.ext import tasks, commands
import pandas
import praw
import time
import asyncio
import discord
# @bot.command(name = "scrape")
# async def scrape():
# print("i am here")
# subreddit = reddit.subreddit('buildapcsales')
# channel = bot.get_channel(411692488177483787)
# if(channel == None)... | 21.61 | 123 | 0.633966 |
4a02b9d79022079c08b0eedbf2731a6923333dd0 | 2,522 | py | Python | src/first_partial_exercises/ex_5.py | soyalextreme/estructura-datos-algoritmos | e82729fb4a4babad7c9d781e7abcb97aaafdfaab | [
"Unlicense"
] | 1 | 2020-09-09T14:31:28.000Z | 2020-09-09T14:31:28.000Z | src/first_partial_exercises/ex_5.py | soyalextreme/estructura-datos-algoritmos | e82729fb4a4babad7c9d781e7abcb97aaafdfaab | [
"Unlicense"
] | null | null | null | src/first_partial_exercises/ex_5.py | soyalextreme/estructura-datos-algoritmos | e82729fb4a4babad7c9d781e7abcb97aaafdfaab | [
"Unlicense"
] | null | null | null | """
27-09-2020
Excersice 5
Estructura de Datos y algoritmos
6to Semestre
Client Ticket Shop
Alejandro AS
"""
from first_partial_exercises.ex_2 import Report
from lib.menu.epp_menu import Menu
from lib.inputs import input_int, input_float, input_str_non_empty
from lib.util import still_bool, cl... | 23.137615 | 74 | 0.587232 |
4a02bb458bd27f6a76f6e731e3857441285c8221 | 18,949 | py | Python | lib/plugins.py | Durendal/electrum-rby | 0dadd13467d44bcc7128f0dec0fa1aeff8d22576 | [
"MIT"
] | null | null | null | lib/plugins.py | Durendal/electrum-rby | 0dadd13467d44bcc7128f0dec0fa1aeff8d22576 | [
"MIT"
] | 1 | 2021-11-15T17:47:29.000Z | 2021-11-15T17:47:29.000Z | lib/plugins.py | Durendal/electrum-rby | 0dadd13467d44bcc7128f0dec0fa1aeff8d22576 | [
"MIT"
] | 1 | 2017-11-13T23:19:46.000Z | 2017-11-13T23:19:46.000Z | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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... | 35.551595 | 118 | 0.603145 |
4a02bba8c714acd649803766b340633564522772 | 1,725 | py | Python | pioreactor_logs2slack/__init__.py | Pioreactor/pioreactor-logs2slack | ddf27d850b15291b212f4259fbf540e0b49da02b | [
"MIT"
] | null | null | null | pioreactor_logs2slack/__init__.py | Pioreactor/pioreactor-logs2slack | ddf27d850b15291b212f4259fbf540e0b49da02b | [
"MIT"
] | 1 | 2021-11-11T00:34:49.000Z | 2021-11-11T00:34:49.000Z | pioreactor_logs2slack/__init__.py | Pioreactor/pioreactor-logs2slack | ddf27d850b15291b212f4259fbf540e0b49da02b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import logging
import click
from requests import post
from pioreactor.background_jobs.base import BackgroundJob
from pioreactor.config import config
from pioreactor.whoami import get_unit_name, get_latest_experiment_name
class Logs2Slack(BackgroundJob):
def __init__(self, unit... | 31.944444 | 98 | 0.675362 |
4a02bc3ba744bc63f0bb5cc2a2238f885d07bf2b | 2,761 | py | Python | hail/python/hailtop/hailctl/dataproc/submit.py | joonan30/hail | aa5d906be9d4182b22b73ce6dd5bae5967acf9ce | [
"MIT"
] | null | null | null | hail/python/hailtop/hailctl/dataproc/submit.py | joonan30/hail | aa5d906be9d4182b22b73ce6dd5bae5967acf9ce | [
"MIT"
] | null | null | null | hail/python/hailtop/hailctl/dataproc/submit.py | joonan30/hail | aa5d906be9d4182b22b73ce6dd5bae5967acf9ce | [
"MIT"
] | null | null | null | from subprocess import check_call
import os
import tempfile
import zipfile
def init_parser(parser):
parser.add_argument('name', type=str, help='Cluster name.')
parser.add_argument('script', type=str)
parser.add_argument('--files', required=False, type=str, help='Comma-separated list of files to add to the... | 36.328947 | 161 | 0.594712 |
4a02bcd08bb896a55119557307037e8f649f3c33 | 6,971 | py | Python | tests/test_spec_frequency_mask.py | jeongyoonlee/audiomentations | 7f0112ae310989430e0ef7eb32c4116114810966 | [
"MIT"
] | 930 | 2019-02-14T10:21:22.000Z | 2022-03-31T03:49:48.000Z | tests/test_spec_frequency_mask.py | jeongyoonlee/audiomentations | 7f0112ae310989430e0ef7eb32c4116114810966 | [
"MIT"
] | 169 | 2019-02-12T21:16:14.000Z | 2022-03-18T07:53:43.000Z | tests/test_spec_frequency_mask.py | jeongyoonlee/audiomentations | 7f0112ae310989430e0ef7eb32c4116114810966 | [
"MIT"
] | 122 | 2019-02-26T05:12:45.000Z | 2022-03-24T08:45:51.000Z | import os
import unittest
import librosa
import numpy as np
from audiomentations import SpecFrequencyMask
from audiomentations.core.audio_loading_utils import load_sound_file
from demo.demo import DEMO_DIR
from .utils import plot_matrix
DEBUG = False
class TestSpecFrequencyMask(unittest.TestCase):
def test_fil... | 35.030151 | 87 | 0.620571 |
4a02bd9401180eb17b602beea384160b64772ea1 | 12,247 | py | Python | cogs/follow.py | smehlhoff/twitch-discord-bot | e1b91b589f47fe61a2d07efaf712225514ae2801 | [
"MIT"
] | null | null | null | cogs/follow.py | smehlhoff/twitch-discord-bot | e1b91b589f47fe61a2d07efaf712225514ae2801 | [
"MIT"
] | null | null | null | cogs/follow.py | smehlhoff/twitch-discord-bot | e1b91b589f47fe61a2d07efaf712225514ae2801 | [
"MIT"
] | null | null | null | import locale
import textwrap
import discord
from discord.ext import commands
from sqlalchemy import exc
from core.models import session, Follows
from core.utils import check_follows_exist, twitch_api_call, twitch_convert_timestamp, twitch_channel_uptime, \
retrieve_twitch_channel_id, retrieve_twitch_game, retrie... | 38.152648 | 115 | 0.477015 |
4a02bdb4f88c44684854b4451ee6fa39f0e995dd | 22,710 | py | Python | sdk/python/pulumi_azure_native/apimanagement/v20200601preview/api_diagnostic.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/apimanagement/v20200601preview/api_diagnostic.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/apimanagement/v20200601preview/api_diagnostic.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 49.049676 | 1,498 | 0.671907 |
4a02be4a7c201789ba63099add8f660b14f424d0 | 401 | py | Python | nanome/_internal/_volumetric/_volume_data.py | nanome-ai/nanome-plugin-api | f2ce6a5e3123ee7449a90c2659f3891124289f4a | [
"MIT"
] | 3 | 2020-07-02T13:08:27.000Z | 2021-11-24T14:32:53.000Z | nanome/_internal/_volumetric/_volume_data.py | nanome-ai/nanome-plugin-api | f2ce6a5e3123ee7449a90c2659f3891124289f4a | [
"MIT"
] | 11 | 2020-09-14T17:01:47.000Z | 2022-02-18T04:00:52.000Z | nanome/_internal/_volumetric/_volume_data.py | nanome-ai/nanome-plugin-api | f2ce6a5e3123ee7449a90c2659f3891124289f4a | [
"MIT"
] | 5 | 2020-08-12T16:30:03.000Z | 2021-12-06T18:04:23.000Z | from nanome.util import enums
from . import _UnitCell
class _VolumeData(object):
VolumeType = enums.VolumeType
def __init__(self):
self._data = []
self._width = 0
self._height = 0
self._depth = 0
self._mean = 0.0
self._rmsd = 0.0
self._type = _VolumeD... | 19.095238 | 51 | 0.586035 |
4a02be56e21466ad79d4febb5791cb1bacbd5c6b | 418 | py | Python | Python/7/HalvingSum/test_halving_sum.py | hwakabh/codewars | 7afce5a7424d35abc55c350301ac134f2d3edd3d | [
"MIT"
] | null | null | null | Python/7/HalvingSum/test_halving_sum.py | hwakabh/codewars | 7afce5a7424d35abc55c350301ac134f2d3edd3d | [
"MIT"
] | 6 | 2020-02-21T17:01:59.000Z | 2021-05-04T07:04:41.000Z | Python/7/HalvingSum/test_halving_sum.py | hwakabh/codewars | 7afce5a7424d35abc55c350301ac134f2d3edd3d | [
"MIT"
] | null | null | null | from unittest import TestCase
from unittest import main
from halving_sum import halving_sum
class TestHalvingSum(TestCase):
def test_halving_sum(self):
ptr = [
(25, 47),
(127, 247),
]
for inp, exp in ptr:
with self.subTest(inp=inp, exp=exp):
... | 20.9 | 57 | 0.595694 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.