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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9b45616810286a5ee7a4c35e2e69b5fdc41f90c8 | 1,862 | py | Python | pythonspain/core/api/exceptions.py | python-spain/socios.es.python.org | 993153dcb3f35b928633c933a84e0330aae59524 | [
"MIT"
] | null | null | null | pythonspain/core/api/exceptions.py | python-spain/socios.es.python.org | 993153dcb3f35b928633c933a84e0330aae59524 | [
"MIT"
] | null | null | null | pythonspain/core/api/exceptions.py | python-spain/socios.es.python.org | 993153dcb3f35b928633c933a84e0330aae59524 | [
"MIT"
] | null | null | null | from django.core.exceptions import ValidationError as DjangoValidationError
from django.db.utils import IntegrityError
from rest_framework import status
from rest_framework.exceptions import APIException
from rest_framework.exceptions import ValidationError as DRFValidationError
from rest_framework.response import Resp... | 43.302326 | 85 | 0.72449 |
a5b20a15f7cfdaca8097ea63891213acaedbae23 | 1,142 | py | Python | mongobar/utils.py | ingkebil/mongobar | aded858a8280bd5ac34f2e3733d77d0b95bf5c4d | [
"MIT"
] | 49 | 2017-09-01T20:01:11.000Z | 2021-05-12T15:14:17.000Z | mongobar/utils.py | ingkebil/mongobar | aded858a8280bd5ac34f2e3733d77d0b95bf5c4d | [
"MIT"
] | 1 | 2017-10-27T09:25:42.000Z | 2017-11-30T21:40:35.000Z | mongobar/utils.py | ingkebil/mongobar | aded858a8280bd5ac34f2e3733d77d0b95bf5c4d | [
"MIT"
] | 1 | 2020-07-23T12:46:18.000Z | 2020-07-23T12:46:18.000Z | import os
import copy
def _merge(a, b):
""" a overwrites values in b
"""
for k in a.keys():
if isinstance(a[k], dict) and k in b and isinstance(b[k], dict):
b[k] = _merge(a[k], b[k])
else:
b[k] = a[k]
return b
def merge(a, b):
""" makes copies before merg... | 20.392857 | 72 | 0.579685 |
613093a9e66995af856c0ee567981cdddc89e085 | 659 | py | Python | tilebot/handler.py | developmentseed/tile-watchbot | 5f31ce8c2d01b2294a6ccb4bb3cb61cef5bde1aa | [
"BSD-3-Clause"
] | 1 | 2021-04-14T16:53:31.000Z | 2021-04-14T16:53:31.000Z | tilebot/handler.py | developmentseed/tile-watchbot | 5f31ce8c2d01b2294a6ccb4bb3cb61cef5bde1aa | [
"BSD-3-Clause"
] | null | null | null | tilebot/handler.py | developmentseed/tile-watchbot | 5f31ce8c2d01b2294a6ccb4bb3cb61cef5bde1aa | [
"BSD-3-Clause"
] | null | null | null | """Worker."""
import json
import logging
from tilebot.process import process
logger = logging.getLogger("tilebot")
logging.getLogger("botocore.credentials").disabled = True
logging.getLogger("botocore.utils").disabled = True
logging.getLogger("rio-tiler").setLevel(logging.ERROR)
def _parse_message(message):
if... | 19.382353 | 57 | 0.681335 |
3d039d236d82f59d42a4ec12db178267e92aadd7 | 4,963 | py | Python | opacus_lab/models/GPT2/refactor.py | tginart/Opacus-lab | 563a5eebcb1e3b86993d71ffd824249c4b4494fa | [
"Apache-2.0"
] | null | null | null | opacus_lab/models/GPT2/refactor.py | tginart/Opacus-lab | 563a5eebcb1e3b86993d71ffd824249c4b4494fa | [
"Apache-2.0"
] | null | null | null | opacus_lab/models/GPT2/refactor.py | tginart/Opacus-lab | 563a5eebcb1e3b86993d71ffd824249c4b4494fa | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and its affiliates. All Rights Reserved
import torch
import torch.nn as nn
from transformers import GPT2Tokenizer
from .model.attention import AttentionLayer
from .model.embedding import PositionalEmbedding, TokenEmbedding
from .model.feedforward import Posi... | 34.706294 | 84 | 0.670764 |
bea7023995dda9645e2a768f587015c27f88fe40 | 19,592 | py | Python | eppy/bunch_subclass.py | cristianomariacumer/eppy | 4ed38c2b40121a6bdf3c9f5dc33d1f1243cfc4be | [
"MIT"
] | 116 | 2015-04-07T13:58:34.000Z | 2022-02-23T15:52:35.000Z | eppy/bunch_subclass.py | cristianomariacumer/eppy | 4ed38c2b40121a6bdf3c9f5dc33d1f1243cfc4be | [
"MIT"
] | 324 | 2015-01-01T04:10:46.000Z | 2022-03-16T16:28:13.000Z | eppy/bunch_subclass.py | cristianomariacumer/eppy | 4ed38c2b40121a6bdf3c9f5dc33d1f1243cfc4be | [
"MIT"
] | 65 | 2015-07-14T21:57:02.000Z | 2022-02-14T08:39:02.000Z | # Copyright (c) 2012, 2020 Santosh Philip
# Copyright (c) 2016 Jamie Bull
# Copyright (c) 2020 Cheng Cui
# =======================================================================
# Distributed under the MIT License.
# (See accompanying file LICENSE or copy at
# http://opensource.org/licenses/MIT)
# =================... | 33.954939 | 88 | 0.588965 |
fe2ced25a69665e86a08b674f259f6ab58623d91 | 8,060 | py | Python | tests/test_registration.py | CRLab/python-pcl | 43915afc8e03e23bc2af8c93f38658e25c10c51d | [
"BSD-3-Clause"
] | 46 | 2016-08-27T21:40:41.000Z | 2022-02-27T15:03:26.000Z | tests/test_registration.py | CRLab/python-pcl | 43915afc8e03e23bc2af8c93f38658e25c10c51d | [
"BSD-3-Clause"
] | 1 | 2018-03-13T13:33:59.000Z | 2018-03-14T07:02:05.000Z | tests/test_registration.py | CRLab/python-pcl | 43915afc8e03e23bc2af8c93f38658e25c10c51d | [
"BSD-3-Clause"
] | 23 | 2017-01-11T01:32:54.000Z | 2022-01-11T08:34:54.000Z | from __future__ import print_function
import numpy as np
from numpy import cos, sin
from numpy.testing import assert_equal
import unittest
import pcl
# from pcl.pcl_registration import icp, gicp, icp_nl
from pcl import IterativeClosestPoint, GeneralizedIterativeClosestPoint, IterativeClosestPointNonLinear
class Tes... | 34.444444 | 103 | 0.571712 |
c788c630e11d3147f53b64f84562d25f4c8e0376 | 884 | py | Python | flaskwebapp/kill_supervisor.py | shriah/DevOps-For-AI-Apps | 5b7145417167518f8387df3649dbf0996d57e9ab | [
"MIT"
] | 41 | 2018-06-19T06:07:08.000Z | 2021-10-01T13:50:44.000Z | flaskwebapp/kill_supervisor.py | shriah/DevOps-For-AI-Apps | 5b7145417167518f8387df3649dbf0996d57e9ab | [
"MIT"
] | 6 | 2018-06-20T18:41:09.000Z | 2021-09-24T15:50:14.000Z | flaskwebapp/kill_supervisor.py | shriah/DevOps-For-AI-Apps | 5b7145417167518f8387df3649dbf0996d57e9ab | [
"MIT"
] | 91 | 2018-05-30T14:58:19.000Z | 2022-03-26T00:02:06.000Z | import sys
import os
import signal
def write_stdout(s):
sys.stdout.write(s)
sys.stdout.flush()
# this function is modified from the code and knowledge found here: http://supervisord.org/events.html#example-event-listener-implementation
def main():
while 1:
write_stdout('READY\n')
# wait f... | 32.740741 | 140 | 0.640271 |
0ce08b2fc24d2ad2b2ae502fcb9272481067630d | 10,015 | py | Python | core/datastream/base.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | 1 | 2019-09-20T09:36:48.000Z | 2019-09-20T09:36:48.000Z | core/datastream/base.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | core/datastream/base.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# DataStream
# ----------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# -------------------------------------------------------------------... | 28.451705 | 98 | 0.543684 |
f820bb089a80e47b54b0d6ec8332f05266a8506c | 9,112 | py | Python | configs/example/se.py | ktanikel/GemV | bcba25007a71625de845bad588c1226d2675dea2 | [
"BSD-3-Clause"
] | null | null | null | configs/example/se.py | ktanikel/GemV | bcba25007a71625de845bad588c1226d2675dea2 | [
"BSD-3-Clause"
] | null | null | null | configs/example/se.py | ktanikel/GemV | bcba25007a71625de845bad588c1226d2675dea2 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2012-2013 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functiona... | 34.646388 | 100 | 0.679653 |
0cba50e2de6b7dbbeb0857464c755e148e17461e | 18,459 | py | Python | splauncher/_version.py | nanshe-org/splauncher | fcfcf2952ecd14c8360e19b4c1984a580d9d774d | [
"BSD-3-Clause"
] | null | null | null | splauncher/_version.py | nanshe-org/splauncher | fcfcf2952ecd14c8360e19b4c1984a580d9d774d | [
"BSD-3-Clause"
] | 23 | 2015-05-19T15:59:11.000Z | 2017-07-12T14:44:57.000Z | splauncher/_version.py | nanshe-org/splauncher | fcfcf2952ecd14c8360e19b4c1984a580d9d774d | [
"BSD-3-Clause"
] | 2 | 2015-07-09T18:17:28.000Z | 2015-09-30T12:06:18.000Z |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | 35.429942 | 79 | 0.584701 |
2487d7d20a4f926fadaf8555daebdd4f90c8ae5c | 5,556 | py | Python | angr/analyses/cfg/cfg_job_base.py | zeroSteiner/angr | 90dc141c424a2c4dba5551baf0beac7ce7bc8837 | [
"BSD-2-Clause"
] | 2 | 2018-12-03T23:14:56.000Z | 2018-12-03T23:15:57.000Z | angr/analyses/cfg/cfg_job_base.py | zeroSteiner/angr | 90dc141c424a2c4dba5551baf0beac7ce7bc8837 | [
"BSD-2-Clause"
] | null | null | null | angr/analyses/cfg/cfg_job_base.py | zeroSteiner/angr | 90dc141c424a2c4dba5551baf0beac7ce7bc8837 | [
"BSD-2-Clause"
] | null | null | null |
import logging
from ...errors import SimValueError, SimSolverModeError
from ...state_plugins.callstack import CallStack
l = logging.getLogger("angr.analyses.cfg.cfg_job_base")
# TODO: Make callsite an object and use it in BlockID and FunctionKey
class BlockID(object):
"""
A context-sensitive key for a Si... | 31.568182 | 121 | 0.632109 |
a38d0a385aec82a3e8739195224a51aca0225367 | 11,503 | py | Python | pogo/pogoBot/pogoAPI/pgoapi/pgoapi.py | cqian19/PokeGo-Idle | d6c58b5466f2f3633b69c322e1d9d0e9d6a09554 | [
"MIT"
] | 1 | 2017-04-09T18:00:11.000Z | 2017-04-09T18:00:11.000Z | pogo/pogoBot/pogoAPI/pgoapi/pgoapi.py | cqian19/PokeGo-Idle | d6c58b5466f2f3633b69c322e1d9d0e9d6a09554 | [
"MIT"
] | 3 | 2016-08-12T07:39:29.000Z | 2016-08-23T23:46:11.000Z | pogo/pogoBot/pogoAPI/pgoapi/pgoapi.py | cqian19/PokeGo-Idle | d6c58b5466f2f3633b69c322e1d9d0e9d6a09554 | [
"MIT"
] | 1 | 2016-08-26T10:29:32.000Z | 2016-08-26T10:29:32.000Z | """
pgoapi - Pokemon Go API
Copyright (c) 2016 tjado <https://github.com/tejado>
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... | 37.963696 | 242 | 0.658263 |
e87ec4d505707ab0e3cd9dcc96c1be1f599937f7 | 2,138 | py | Python | day05/day05_part1.py | Nixxen/advent_of_code_2021 | 5dec9eec22272322b75961256d471876437b3597 | [
"CC0-1.0"
] | null | null | null | day05/day05_part1.py | Nixxen/advent_of_code_2021 | 5dec9eec22272322b75961256d471876437b3597 | [
"CC0-1.0"
] | null | null | null | day05/day05_part1.py | Nixxen/advent_of_code_2021 | 5dec9eec22272322b75961256d471876437b3597 | [
"CC0-1.0"
] | null | null | null | RUN_TEST = False
TEST_SOLUTION = 5
TEST_INPUT_FILE = "test_input_day_05.txt"
INPUT_FILE = "input_day_05.txt"
ARGS = []
def get_line_coords_if_horizontal_or_vertical(line):
# Extract the coordinates from the line. Format: X1,Y1 -> X2,Y2
line_coords = []
x_coord = int(line.split(" ")[0].split(",")[0])
... | 31.910448 | 81 | 0.650608 |
47fbc44b828294b2830b987626ed47de6226d7de | 1,266 | py | Python | legacy/legacy/recommenders/gmf.py | csmithchicago/openrec | 5a9cf03abe0db0636107985f9f19d6351e4afe68 | [
"MIT"
] | null | null | null | legacy/legacy/recommenders/gmf.py | csmithchicago/openrec | 5a9cf03abe0db0636107985f9f19d6351e4afe68 | [
"MIT"
] | 6 | 2020-01-28T22:51:16.000Z | 2022-02-10T00:11:19.000Z | legacy/legacy/recommenders/gmf.py | csmithchicago/openrec | 5a9cf03abe0db0636107985f9f19d6351e4afe68 | [
"MIT"
] | null | null | null | from openrec.legacy.recommenders import PMF
from openrec.legacy.modules.interactions import PointwiseGeCE
class GMF(PMF):
def __init__(
self,
batch_size,
dim_embed,
max_user,
max_item,
test_batch_size=None,
l2_reg=None,
opt="SGD",
sess_config... | 28.133333 | 86 | 0.547393 |
2396bab2ff36ebf4e2272cc282a4e16c580c2213 | 606 | py | Python | face_generation/GANN.py | snakedragon/udacity-dlnd | 2e5550f183f4eeb7d7c4a91f022df54f0f63c6f3 | [
"MIT"
] | null | null | null | face_generation/GANN.py | snakedragon/udacity-dlnd | 2e5550f183f4eeb7d7c4a91f022df54f0f63c6f3 | [
"MIT"
] | null | null | null | face_generation/GANN.py | snakedragon/udacity-dlnd | 2e5550f183f4eeb7d7c4a91f022df54f0f63c6f3 | [
"MIT"
] | null | null | null | data_dir = './data'
# FloydHub - Use with data ID "R5KrjnANiKVhLWAkpXhNBe"
#data_dir = '/input'
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
import helper
#helper.download_extract('mnist', data_dir)
#helper.download_extract('celeba', data_dir)
show_n_images = 25
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
import os... | 15.947368 | 105 | 0.729373 |
6b29a20dbadd06f2aaaaf1fa3d83984f24907cc3 | 2,359 | py | Python | autos/notification/email.py | hans-t/autos | 4cb370187cb7a8104cedb1942a4c159033729677 | [
"MIT"
] | 1 | 2016-08-17T15:34:15.000Z | 2016-08-17T15:34:15.000Z | autos/notification/email.py | hans-t/autos | 4cb370187cb7a8104cedb1942a4c159033729677 | [
"MIT"
] | 6 | 2016-08-17T15:34:55.000Z | 2021-04-30T20:38:05.000Z | autos/notification/email.py | hans-t/autos | 4cb370187cb7a8104cedb1942a4c159033729677 | [
"MIT"
] | null | null | null | import os
import base64
import smtplib
from email import encoders
from email.utils import COMMASPACE
from email.utils import formatdate
from email.mime.base import MIMEBase
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
def send_email(
send_from,
send_to,
subject,
... | 25.365591 | 90 | 0.650699 |
e44ee06ca8fcb658643a92b76e0238a0027aadbb | 13,331 | py | Python | scripts/mustpass.py | jingpad-bsp/android_external_deqp | 50f948294cb12f5384633efc9327c571feb0fa21 | [
"Apache-2.0"
] | null | null | null | scripts/mustpass.py | jingpad-bsp/android_external_deqp | 50f948294cb12f5384633efc9327c571feb0fa21 | [
"Apache-2.0"
] | null | null | null | scripts/mustpass.py | jingpad-bsp/android_external_deqp | 50f948294cb12f5384633efc9327c571feb0fa21 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------
# drawElements Quality Program utilities
# --------------------------------------
#
# Copyright 2016 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use t... | 32.045673 | 132 | 0.728903 |
0aadabf123d20a925b7e030aab77ac3ef8789358 | 384 | py | Python | apps/tracker/admin.py | samsafadi/csua-backend | 78855939e69b9bf22a9771427721eec8384628e6 | [
"MIT"
] | null | null | null | apps/tracker/admin.py | samsafadi/csua-backend | 78855939e69b9bf22a9771427721eec8384628e6 | [
"MIT"
] | null | null | null | apps/tracker/admin.py | samsafadi/csua-backend | 78855939e69b9bf22a9771427721eec8384628e6 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import User, Computer
@admin.register(User)
class UserAdmin(admin.ModelAdmin):
readonly_fields = ["username", "last_ping"]
list_display = ["username", "time_spent", "last_ping"]
@admin.register(Computer)
class ComputerAdmin(admin.ModelAdmin):
readonly_field... | 24 | 58 | 0.731771 |
fa48c4738ffbe4abd4535443921ec916e46fdd58 | 16,474 | py | Python | cdp_backend/tests/pipeline/test_event_gather_pipeline.py | CouncilDataProject/cdp-backend | 5b9a478316fe390171c09b59c01ee77714f8db64 | [
"MIT"
] | 9 | 2020-10-08T03:15:16.000Z | 2022-03-18T01:06:20.000Z | cdp_backend/tests/pipeline/test_event_gather_pipeline.py | CouncilDataProject/cdp-backend | 5b9a478316fe390171c09b59c01ee77714f8db64 | [
"MIT"
] | 165 | 2020-10-08T03:18:24.000Z | 2022-03-25T16:15:48.000Z | cdp_backend/tests/pipeline/test_event_gather_pipeline.py | CouncilDataProject/cdp-backend | 5b9a478316fe390171c09b59c01ee77714f8db64 | [
"MIT"
] | 12 | 2020-11-24T08:27:32.000Z | 2022-03-19T20:34:29.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from pathlib import Path
from typing import List, Optional
from unittest import mock
from unittest.mock import MagicMock
import pytest
from prefect import Flow
from cdp_backend.database import constants as db_constants
from cdp_backend.pipeline import event_ga... | 32.557312 | 87 | 0.618793 |
4fd2bc26a9f20b46f03f57e69a93df5188ae30a6 | 14,184 | py | Python | zobs/orecharge/ETRM_distributed/SumPoly_AnMo_21APR16.py | dgketchum/etrm | f74f5771fbc6ba5750a790e384eac422b598325a | [
"Apache-2.0"
] | 1 | 2021-08-11T20:10:52.000Z | 2021-08-11T20:10:52.000Z | zobs/orecharge/ETRM_distributed/SumPoly_AnMo_21APR16.py | dgketchum/etrm | f74f5771fbc6ba5750a790e384eac422b598325a | [
"Apache-2.0"
] | null | null | null | zobs/orecharge/ETRM_distributed/SumPoly_AnMo_21APR16.py | dgketchum/etrm | f74f5771fbc6ba5750a790e384eac422b598325a | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from dateutil import rrule
from osgeo import gdal, ogr
import numpy as np
import os
np.set_printoptions(linewidth=700, precision=2)
def cells(array):
window = array[480:510, 940:970]
return window
start, end = datetime(2000, 1, 1), datetime(2013, 12, 31)
ras_path = 'F:\\Monthly... | 54.553846 | 118 | 0.535462 |
ecbadee8175589c5cb0cef9cb5644bbd685e0d23 | 312 | py | Python | scripts/check/info.py | simonhq/default | 789f7934085e318f715db96c6daf14fec3b03787 | [
"MIT"
] | 2 | 2021-04-28T12:32:42.000Z | 2021-12-09T05:11:36.000Z | scripts/check/info.py | AlexxIT/default | 41fc95a5461276bf7b23e52648f7d4c3c175ccb9 | [
"MIT"
] | null | null | null | scripts/check/info.py | AlexxIT/default | 41fc95a5461276bf7b23e52648f7d4c3c175ccb9 | [
"MIT"
] | null | null | null | from scripts.changed.category import get_category
from scripts.helpers.info import get_info
def check():
print("Information: https://hacs.xyz/docs/publish/include#check-info")
info = get_info()
if not info:
exit("::error::No information provided.")
if __name__ == "__main__":
check()
| 22.285714 | 74 | 0.695513 |
cf3dba848a89dcfb2ccc244824849e4c5db8021d | 8,450 | py | Python | homeassistant/components/light/lifx_legacy.py | mfrueh/home-assistant | 5d64628b5bf4713016883282fd54de9c7d5089d0 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/light/lifx_legacy.py | mfrueh/home-assistant | 5d64628b5bf4713016883282fd54de9c7d5089d0 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/light/lifx_legacy.py | mfrueh/home-assistant | 5d64628b5bf4713016883282fd54de9c7d5089d0 | [
"Apache-2.0"
] | 1 | 2021-03-13T18:15:31.000Z | 2021-03-13T18:15:31.000Z | """
Support for the LIFX platform that implements lights.
This is a legacy platform, included because the current lifx platform does
not yet support Windows.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/light.lifx/
"""
import colorsys
import logging
... | 30.071174 | 79 | 0.597396 |
6196c3dc923383aafe0bbeffd81e59006e827f8b | 4,917 | py | Python | ocr/model/necks/east_fpn.py | mlshenkai/ocr | 08b68b1e52b3f0012774861f5fa7572e04c4341d | [
"Apache-2.0"
] | 3 | 2021-04-23T12:31:07.000Z | 2021-11-17T04:39:38.000Z | ocr/model/necks/east_fpn.py | mlshenkai/ocr | 08b68b1e52b3f0012774861f5fa7572e04c4341d | [
"Apache-2.0"
] | null | null | null | ocr/model/necks/east_fpn.py | mlshenkai/ocr | 08b68b1e52b3f0012774861f5fa7572e04c4341d | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os, sys
import torch
import torch.nn as nn
import torch.nn.functional as F
from ocr.model.common import Activation
class ConvBNLayer(nn.Module):
def __init__(self,
in_channels,
... | 27.316667 | 62 | 0.502339 |
8b8ee18e49133e65e9a9ae4e72b89e035e2e48b0 | 71 | py | Python | Chambers_Jess/Assignments/Multiples_Part_1.py | webguru001/Python-Django-Web | 6264bc4c90ef1432ba0902c76b567cf3caaae221 | [
"MIT"
] | 5 | 2019-05-17T01:30:02.000Z | 2021-06-17T21:02:58.000Z | Chambers_Jess/Assignments/Multiples_Part_1.py | curest0x1021/Python-Django-Web | 6264bc4c90ef1432ba0902c76b567cf3caaae221 | [
"MIT"
] | null | null | null | Chambers_Jess/Assignments/Multiples_Part_1.py | curest0x1021/Python-Django-Web | 6264bc4c90ef1432ba0902c76b567cf3caaae221 | [
"MIT"
] | null | null | null | for count in range(1,1000):
if count % 2 == 1:
print count
| 17.75 | 27 | 0.549296 |
bbcb826d484dda82621be95d9757594f62f1ae36 | 289 | py | Python | competitive-programming/codeforces/archive/p1607c.py | sanchopanca/coding-for-pleasure | fed1910e8a5a4241bd55aed333afd79b4405a71d | [
"MIT"
] | null | null | null | competitive-programming/codeforces/archive/p1607c.py | sanchopanca/coding-for-pleasure | fed1910e8a5a4241bd55aed333afd79b4405a71d | [
"MIT"
] | null | null | null | competitive-programming/codeforces/archive/p1607c.py | sanchopanca/coding-for-pleasure | fed1910e8a5a4241bd55aed333afd79b4405a71d | [
"MIT"
] | null | null | null | t = int(input())
for _ in range(t):
n = int(input())
a = sorted(map(int, input().split()))
to_eliminate = a[0]
maximum = a[0]
for i in range(1, len(a)):
maximum = max(maximum, a[i] - to_eliminate)
to_eliminate += a[i] - to_eliminate
print(maximum)
| 24.083333 | 51 | 0.557093 |
eeb0e72407465a5bd876127621615238181b9242 | 546 | py | Python | engine/constant.py | jessexu117/GQuant | 58e1a7a84f6c173c7ae7a872e8cc067e4ce031d2 | [
"Apache-2.0"
] | 4 | 2018-01-14T14:13:51.000Z | 2018-06-07T12:13:03.000Z | engine/constant.py | jessexu117/GQuant | 58e1a7a84f6c173c7ae7a872e8cc067e4ce031d2 | [
"Apache-2.0"
] | null | null | null | engine/constant.py | jessexu117/GQuant | 58e1a7a84f6c173c7ae7a872e8cc067e4ce031d2 | [
"Apache-2.0"
] | 9 | 2018-06-07T12:13:06.000Z | 2021-05-27T12:34:21.000Z | # -*- coding: utf-8 -*-
"""
Constant Collection
@author: Jesse J. Hsu
@email: jinjie.xu@whu.com.cn
@version: 0.1
"""
# default empty value
EMPTY_INT = 0
EMPTY_FLOAT = 0.0
EMPTY_STRING = ''
EMPTY_LIST = []
# signal direction
SIGNAL_LONG = 'LONG'
SIGNAL_SHORT = 'SHORT'
SIGNAL_EXIT = 'EXIT'
# order direction
ORDER_BU... | 14.368421 | 28 | 0.686813 |
9b3239fd7d05e4b3bb1b96ca7101fc1e11a0c8aa | 591 | py | Python | models/args/PaddleNLP/dialogue_domain_classification/test_args.py | zjjlivein/continuous_integration | c8825f32136fdd425389702c37ded08d6fd28a26 | [
"Apache-2.0"
] | 14 | 2020-03-04T07:52:07.000Z | 2022-02-14T01:39:14.000Z | models/args/PaddleNLP/dialogue_domain_classification/test_args.py | zjjlivein/continuous_integration | c8825f32136fdd425389702c37ded08d6fd28a26 | [
"Apache-2.0"
] | 19 | 2020-03-04T03:52:10.000Z | 2021-12-23T07:02:07.000Z | models/args/PaddleNLP/dialogue_domain_classification/test_args.py | zjjlivein/continuous_integration | c8825f32136fdd425389702c37ded08d6fd28a26 | [
"Apache-2.0"
] | 26 | 2020-03-04T05:39:09.000Z | 2022-02-14T01:43:28.000Z | #!/usr/bin/env python
"""
this is dialogue_domain_classification args
"""
train = {
"use_cuda": [True, False],
"do_train": [True],
"do_eval": [False, True],
"do_test": [False, True],
"build_dict": [False],
"data_dir": ['./data/input/'],
"save_dir": ['./data/output/'],
"config_path": ['.... | 24.625 | 47 | 0.563452 |
acc17158e915109d66afcfbd429b5ff0888f8f94 | 427 | py | Python | Samples/azure-storage/Azure.Python/storagemanagementclient/credentials.py | ratchapol-an/autorest | c419134517972d9c97177180d2a2faaaff4cc36a | [
"MIT"
] | 12 | 2017-03-15T11:05:19.000Z | 2019-08-22T07:47:31.000Z | Samples/azure-storage/Azure.Python/storagemanagementclient/credentials.py | ratchapol-an/autorest | c419134517972d9c97177180d2a2faaaff4cc36a | [
"MIT"
] | 14 | 2018-01-24T05:36:23.000Z | 2019-06-28T10:59:42.000Z | Samples/azure-storage/Azure.Python/storagemanagementclient/credentials.py | ratchapol-an/autorest | c419134517972d9c97177180d2a2faaaff4cc36a | [
"MIT"
] | 15 | 2017-03-23T05:38:05.000Z | 2019-07-23T05:33:37.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
from msrest.authentication import (
BasicAuthentication,
BasicTokenAuthentication,
OAuthTokenAuthentication)
from msrestazure.azure_activ... | 30.5 | 76 | 0.510539 |
eb97ede3d4466a5e7c869a7fc32bb9c79b80c742 | 7,707 | py | Python | pims/ffmpeg_reader.py | nkeim/pims | 3c8f7832113517a37ddd65a2803a6b17f9c33e4c | [
"BSD-3-Clause"
] | 2 | 2021-01-31T23:58:44.000Z | 2021-09-15T06:10:06.000Z | pims/ffmpeg_reader.py | nkeim/pims | 3c8f7832113517a37ddd65a2803a6b17f9c33e4c | [
"BSD-3-Clause"
] | null | null | null | pims/ffmpeg_reader.py | nkeim/pims | 3c8f7832113517a37ddd65a2803a6b17f9c33e4c | [
"BSD-3-Clause"
] | null | null | null | # The MIT License (MIT)
#
# Copyright (c) 2014 Zulko
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | 31.979253 | 79 | 0.615155 |
87581e671b8ab20506bd1c8a85323445092bc6f6 | 795 | py | Python | camomilla/migrations/0003_auto_20210130_1610.py | lotrekagency/camomilla | 549892f95a97df5f8bacd3a54b074e16020bda65 | [
"MIT"
] | 4 | 2021-05-11T20:17:58.000Z | 2022-02-03T11:51:19.000Z | camomilla/migrations/0003_auto_20210130_1610.py | lotrekagency/camomilla | 549892f95a97df5f8bacd3a54b074e16020bda65 | [
"MIT"
] | 3 | 2022-01-04T10:31:42.000Z | 2022-01-21T12:51:16.000Z | camomilla/migrations/0003_auto_20210130_1610.py | lotrekagency/camomilla | 549892f95a97df5f8bacd3a54b074e16020bda65 | [
"MIT"
] | 2 | 2022-02-03T11:51:23.000Z | 2022-03-23T16:52:29.000Z | # Generated by Django 2.2.17 on 2021-01-30 16:10
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("camomilla", "0002_auto_20200214_1127"),
]
operations = [
migrations.AddField(
model_name="medi... | 25.645161 | 60 | 0.554717 |
ea67622547d994c0e60a3fe0462591cfafb2ef9d | 2,593 | py | Python | application/migrations/0002_auto_20200730_1432.py | AhmadTariqAlflahat/Web-Project-Django | 80d8ba5cd04df9781e94a65122aa703999c1bdb8 | [
"MIT"
] | null | null | null | application/migrations/0002_auto_20200730_1432.py | AhmadTariqAlflahat/Web-Project-Django | 80d8ba5cd04df9781e94a65122aa703999c1bdb8 | [
"MIT"
] | 7 | 2021-04-08T21:31:50.000Z | 2022-01-13T03:05:02.000Z | application/migrations/0002_auto_20200730_1432.py | AhmadTariqAlflahat/Web-Project-Django | 80d8ba5cd04df9781e94a65122aa703999c1bdb8 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2020-07-30 11:32
import account.models_addon
import django.core.validators
from django.db import migrations, models
import django.utils.timezone
import stdimage.models
import stdimage.validators
class Migration(migrations.Migration):
dependencies = [
('application', '0001_... | 38.132353 | 440 | 0.6371 |
443b7aa92f2062b662f5545e8f5c3817c8d8b733 | 5,847 | py | Python | safedelete/admin.py | lee-hodg/old-safe-delete | e5a7a7686d7efd8b44e262ad45b1a344ea1c62f7 | [
"BSD-3-Clause"
] | null | null | null | safedelete/admin.py | lee-hodg/old-safe-delete | e5a7a7686d7efd8b44e262ad45b1a344ea1c62f7 | [
"BSD-3-Clause"
] | null | null | null | safedelete/admin.py | lee-hodg/old-safe-delete | e5a7a7686d7efd8b44e262ad45b1a344ea1c62f7 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
import django
from distutils.version import LooseVersion
from django.contrib import admin, messages
from django.contrib.admin import helpers
from django.contrib.admin.models import CHANGE, LogEntry
from django.contrib.admin.utils import model_ngettext
from django.contrib.content... | 34.803571 | 116 | 0.597913 |
15fbcaf36d167dd3eb4127e8928a3a55995c305c | 1,915 | py | Python | composer/profiler/dataloader_profiler.py | ajaysaini725/composer | 00fbf95823cd50354b2410fbd88f06eaf0481662 | [
"Apache-2.0"
] | null | null | null | composer/profiler/dataloader_profiler.py | ajaysaini725/composer | 00fbf95823cd50354b2410fbd88f06eaf0481662 | [
"Apache-2.0"
] | null | null | null | composer/profiler/dataloader_profiler.py | ajaysaini725/composer | 00fbf95823cd50354b2410fbd88f06eaf0481662 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 MosaicML. All Rights Reserved.
from __future__ import annotations
import textwrap
from typing import Iterator, Optional
from composer.core.callback import Callback
from composer.core.profiler import Profiler
from composer.core.state import State
from composer.core.types import Batch, DataLoader, Log... | 36.132075 | 104 | 0.696084 |
ad1ea6e69d0f977a9003d44711ae24e41aad7e3f | 3,882 | py | Python | polls_app/projectlx/polls/tests.py | laxminarayanRaval/DjangoPractixe | 4ac22cdb732fd2443197f4f71662b74c35ae73ff | [
"CC0-1.0"
] | null | null | null | polls_app/projectlx/polls/tests.py | laxminarayanRaval/DjangoPractixe | 4ac22cdb732fd2443197f4f71662b74c35ae73ff | [
"CC0-1.0"
] | null | null | null | polls_app/projectlx/polls/tests.py | laxminarayanRaval/DjangoPractixe | 4ac22cdb732fd2443197f4f71662b74c35ae73ff | [
"CC0-1.0"
] | null | null | null | from django.test import TestCase
import datetime
from django.utils import timezone
from django.urls import reverse
from .models import Question
class QuestionModelTests(TestCase):
def test_was_published_recently_with_future_question(self):
"""was_published_recently() returns False for questions whose pub_... | 51.078947 | 110 | 0.666151 |
8f37477c98c5a3bad5083a80486022e1488f0fc3 | 117,890 | py | Python | saleor/tests/fixtures.py | Kibria7533/saleor | d72f5bff9afeab13d2e2e09c9a32a964bfd9476d | [
"CC-BY-4.0"
] | 2 | 2021-05-16T13:46:07.000Z | 2021-05-16T13:49:21.000Z | saleor/tests/fixtures.py | Kibria7533/saleor | d72f5bff9afeab13d2e2e09c9a32a964bfd9476d | [
"CC-BY-4.0"
] | null | null | null | saleor/tests/fixtures.py | Kibria7533/saleor | d72f5bff9afeab13d2e2e09c9a32a964bfd9476d | [
"CC-BY-4.0"
] | null | null | null | import datetime
import uuid
from contextlib import contextmanager
from decimal import Decimal
from functools import partial
from io import BytesIO
from typing import List, Optional
from unittest.mock import MagicMock, Mock
import graphene
import pytest
import pytz
from django.conf import settings
from django.contrib.a... | 30.329303 | 91 | 0.660879 |
9640c0dc762183fa9e268f646dc72e05c7ecb334 | 2,060 | py | Python | option_greeks.py | srunnikr/options_calculator | ca5079b0e97dc3c7a1a6f3668bfc1c5f3d7c6214 | [
"Apache-2.0"
] | 1 | 2019-06-27T07:15:32.000Z | 2019-06-27T07:15:32.000Z | option_greeks.py | srunnikr/options_calculator | ca5079b0e97dc3c7a1a6f3668bfc1c5f3d7c6214 | [
"Apache-2.0"
] | null | null | null | option_greeks.py | srunnikr/options_calculator | ca5079b0e97dc3c7a1a6f3668bfc1c5f3d7c6214 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import math
from scipy.stats import norm
class BlackScholesCalculator(object):
def __init__(self, spot, strike, vol, rate, div, dte):
self.spot_price = spot
self.strike_price = strike
self.volatility = vol / 100.0
self.risk_free_rate = rate / 100.0
self.a... | 44.782609 | 120 | 0.650971 |
2a05ee470025ddaf56a172152f633777b988d75d | 3,864 | py | Python | app/settings.py | atoivanen/vocabulary_backend | 9336d2b5cbde238ce377c3be047071d7a2f03539 | [
"Apache-2.0"
] | null | null | null | app/settings.py | atoivanen/vocabulary_backend | 9336d2b5cbde238ce377c3be047071d7a2f03539 | [
"Apache-2.0"
] | null | null | null | app/settings.py | atoivanen/vocabulary_backend | 9336d2b5cbde238ce377c3be047071d7a2f03539 | [
"Apache-2.0"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 2.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
import... | 25.932886 | 91 | 0.71118 |
739d98e5c09bb7f371d89d1624156202f565c470 | 59,072 | py | Python | monai/transforms/utils.py | yiheng-wang-nv/MONAI | 08f9bac8b1bc304ee4d61d32e060eb1c3646da3a | [
"Apache-2.0"
] | 3 | 2020-06-22T20:59:14.000Z | 2021-04-09T21:24:45.000Z | monai/transforms/utils.py | ericspod/MONAI | 885d5b947aeafc1a9bee2899cfd48fff9036e68a | [
"Apache-2.0"
] | null | null | null | monai/transforms/utils.py | ericspod/MONAI | 885d5b947aeafc1a9bee2899cfd48fff9036e68a | [
"Apache-2.0"
] | 1 | 2020-05-27T12:53:58.000Z | 2020-05-27T12:53:58.000Z | # Copyright (c) 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, so... | 39.355097 | 120 | 0.650596 |
2b641a95b539d0ec6f76fba31d72b508445bf1c9 | 415 | py | Python | odoo-13.0/addons/web_kanban_gauge/__manifest__.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/web_kanban_gauge/__manifest__.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/addons/web_kanban_gauge/__manifest__.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | 1 | 2021-05-05T07:59:08.000Z | 2021-05-05T07:59:08.000Z | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Gauge Widget for Kanban',
'category': 'Hidden',
'description': """
This widget allows to display gauges using d3 library.
""",
'version': '1.0',
'depends': ['web'],
'data' : [
'... | 21.842105 | 74 | 0.578313 |
c3ac2d214699da6559ef0bb60c4a26c8727e8af0 | 3,965 | py | Python | cherche/retrieve/dpr.py | raphaelsty/cherche | c9db846fc80451d71056803250ff649a063af057 | [
"MIT"
] | 193 | 2022-01-08T13:21:08.000Z | 2022-03-26T17:24:18.000Z | cherche/retrieve/dpr.py | raphaelsty/cherche | c9db846fc80451d71056803250ff649a063af057 | [
"MIT"
] | 3 | 2022-02-08T01:17:22.000Z | 2022-03-17T10:32:57.000Z | cherche/retrieve/dpr.py | raphaelsty/cherche | c9db846fc80451d71056803250ff649a063af057 | [
"MIT"
] | 7 | 2022-01-09T11:27:29.000Z | 2022-01-23T08:58:01.000Z | __all__ = ["DPR"]
import typing
import numpy as np
from .base import BaseEncoder
class DPR(BaseEncoder):
"""DPR as a retriever using Faiss Index.
Parameters
----------
key
Field identifier of each document.
on
Field to use to retrieve documents.
k
Number of document... | 33.041667 | 109 | 0.547541 |
d57b922fd83500347cd23dc0d533103f0174753e | 389 | py | Python | Alumni/asgi.py | Maryan23/Moringa-Alumni-Backend | c75e18ee928ab195a9a13852c5933f0269f101cb | [
"MIT"
] | 2 | 2022-01-30T10:40:34.000Z | 2022-01-31T02:06:27.000Z | Alumni/asgi.py | Maryan23/Moringa-Alumni-Backend | c75e18ee928ab195a9a13852c5933f0269f101cb | [
"MIT"
] | null | null | null | Alumni/asgi.py | Maryan23/Moringa-Alumni-Backend | c75e18ee928ab195a9a13852c5933f0269f101cb | [
"MIT"
] | null | null | null | """
ASGI config for Alumni project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTIN... | 22.882353 | 78 | 0.784062 |
718bbc86d81956eb7d5581ea7574b4b61c5e7f96 | 1,706 | py | Python | build/lib/RadViz/_3D_submodules/plotly_3Dframe.py | elewah/RadViz-Plotly | b92c888b9e599574b9c29b97f805c8d853579bfa | [
"MIT"
] | 2 | 2021-06-07T16:48:24.000Z | 2022-01-11T21:04:58.000Z | build/lib/RadViz/_3D_submodules/plotly_3Dframe.py | elewah/RadViz-Plotly | b92c888b9e599574b9c29b97f805c8d853579bfa | [
"MIT"
] | null | null | null | build/lib/RadViz/_3D_submodules/plotly_3Dframe.py | elewah/RadViz-Plotly | b92c888b9e599574b9c29b97f805c8d853579bfa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 3 23:30:48 2020
@author: elewah
"""
# =============================================================================
# #Dataframe3DPreparation function is created to Concatenate 3 matrixs,
# #S_hat matrix"mapped version of records "& X matrix"Dimensions Anchors" &Circle ... | 37.911111 | 114 | 0.586753 |
ca8c9cebb00194f7b8a7a39cd9aa7dae15caf920 | 472 | py | Python | DivisionBySeven.py | DvorakSimon/Divisibility | d50ff3fef0e988d461f06b924031c85c4ed8f149 | [
"Apache-2.0"
] | null | null | null | DivisionBySeven.py | DvorakSimon/Divisibility | d50ff3fef0e988d461f06b924031c85c4ed8f149 | [
"Apache-2.0"
] | null | null | null | DivisionBySeven.py | DvorakSimon/Divisibility | d50ff3fef0e988d461f06b924031c85c4ed8f149 | [
"Apache-2.0"
] | null | null | null | """
2022048
1946
"""
iNumberToCheck = 1946;
sNumberToCheck = str(iNumberToCheck);
while len(sNumberToCheck) != 2 and iNumberToCheck >= 0 and iNumberToCheck != 0:
print(sNumberToCheck)
prefix = sNumberToCheck[0:len(sNumberToCheck)-1]
lastNumber = int(sNumberToCheck[len(sNumberToCheck)-1])
sNumberToCheck = str(int(p... | 26.222222 | 79 | 0.735169 |
985d8f4bf563d84cfd64f84fe8db1aeb88a58340 | 10,095 | py | Python | scripts/apis_scan.py | rh-tguittet/rapidast | e23b149e272e1b66e7edbbc57e6895f06789f118 | [
"Apache-2.0"
] | null | null | null | scripts/apis_scan.py | rh-tguittet/rapidast | e23b149e272e1b66e7edbbc57e6895f06789f118 | [
"Apache-2.0"
] | null | null | null | scripts/apis_scan.py | rh-tguittet/rapidast | e23b149e272e1b66e7edbbc57e6895f06789f118 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import os, sys, json, time
from datetime import datetime
from pprint import pprint
from zapv2 import ZAPv2
import subprocess
from config import *
contextID = ''
def createSession(session_name):
# Start the ZAP session
print ("Creating session in: " + session_name)
zap.core.new_sess... | 36.709091 | 101 | 0.611689 |
b34694869c689dc4a10f311a64c8f3a59c0b7aa8 | 2,168 | py | Python | ctc_fast/swbd-utils/score_oov_utts.py | SrikarSiddarth/stanford-ctc | c8f8257227ec218c4794a96a089ef0a093dcbdfd | [
"Apache-2.0"
] | 268 | 2015-06-15T20:59:49.000Z | 2021-12-26T15:05:50.000Z | ctc_fast/swbd-utils/score_oov_utts.py | guker/stanford-ctc | 3d3bd9ce92cfdc0173b1bd2096ecea8634d6b62f | [
"Apache-2.0"
] | 16 | 2015-06-16T03:22:31.000Z | 2019-12-11T15:58:57.000Z | ctc_fast/swbd-utils/score_oov_utts.py | guker/stanford-ctc | 3d3bd9ce92cfdc0173b1bd2096ecea8634d6b62f | [
"Apache-2.0"
] | 109 | 2015-07-07T15:36:22.000Z | 2021-07-28T03:48:15.000Z | '''
Look at error rates only scoring utterances that contain OOVs
'''
OOV_FILE = '/deep/u/zxie/ctc_clm_transcripts/oovs.txt'
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('hyp')
parser.add_argument('stm')
parser.add_argument('hyp_out')
parser... | 29.69863 | 95 | 0.582565 |
fb6763f04db2bebed2a7383259d5f9cadcacea1c | 8,734 | py | Python | tools/generatemodel.py | AaronReer/ancp-bids | 4a71d98f2549a5a22704c11bfa1fd260c8135879 | [
"MIT"
] | null | null | null | tools/generatemodel.py | AaronReer/ancp-bids | 4a71d98f2549a5a22704c11bfa1fd260c8135879 | [
"MIT"
] | null | null | null | tools/generatemodel.py | AaronReer/ancp-bids | 4a71d98f2549a5a22704c11bfa1fd260c8135879 | [
"MIT"
] | null | null | null | import math
import sys
from io import StringIO
import yaml
class ClassGenerator:
def read_yaml(self, file):
with open(file, 'r') as f:
s_str = f.read()
return yaml.load_all(s_str, Loader=yaml.FullLoader)
def __init__(self, schema_file):
docs_gen = self.read_yaml(schema_fi... | 38.646018 | 138 | 0.567323 |
687979f59ee4fff06ba309f73cb48cee74e26166 | 38,020 | py | Python | selfsupmotion/zero_shot_pose.py | sbrodeur/selfsupmotion | 32ba34a090e7e575b43a6a6f14c52c0a5f363d40 | [
"Apache-2.0"
] | null | null | null | selfsupmotion/zero_shot_pose.py | sbrodeur/selfsupmotion | 32ba34a090e7e575b43a6a6f14c52c0a5f363d40 | [
"Apache-2.0"
] | null | null | null | selfsupmotion/zero_shot_pose.py | sbrodeur/selfsupmotion | 32ba34a090e7e575b43a6a6f14c52c0a5f363d40 | [
"Apache-2.0"
] | null | null | null | #from notebooks.opencv_install.opencv_contrib.modules.dnn_objdetect.scripts.pascal_preprocess import rescale
import PIL
import numpy
from numpy.core.fromnumeric import argmax
import pandas as pd
import open3d as o3d
import random
import math
import re
import h5py
import io
#import multiprocessing
from multiprocessing i... | 43.106576 | 201 | 0.683614 |
aa4c781da47d0be10274577c31e5202e6086dd29 | 2,554 | py | Python | wapiflapi_exrs/sploit7.py | Ark444/sploit | 8a08024a2c5aa8b12a89863826567d3c1e25886b | [
"WTFPL"
] | null | null | null | wapiflapi_exrs/sploit7.py | Ark444/sploit | 8a08024a2c5aa8b12a89863826567d3c1e25886b | [
"WTFPL"
] | null | null | null | wapiflapi_exrs/sploit7.py | Ark444/sploit | 8a08024a2c5aa8b12a89863826567d3c1e25886b | [
"WTFPL"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import binexpect
import struct
# 0x400630 : read() rbp - 0x20; stuff...; leave; ret
# 0x400687 : puts; leave; ret
# 0x400691 : leave; ret
# 0x400703 : pop rdi; ret
nb_calls = 0
base = 0x601800
def leak(addr):
global base
global nb_calls
nb_calls += 1
pa... | 27.462366 | 85 | 0.580266 |
c704a89108c5097d6d64b93da6d09ebf0d4412f2 | 2,281 | py | Python | mezzanine/generic/managers.py | arundalal/mezzanine-blog | 116f3c2595098a83757f1c6b00ceb7f65ef30d51 | [
"BSD-2-Clause"
] | 3 | 2019-05-14T13:43:26.000Z | 2021-11-09T11:27:16.000Z | mezzanine/generic/managers.py | arundalal/mezzanine-blog | 116f3c2595098a83757f1c6b00ceb7f65ef30d51 | [
"BSD-2-Clause"
] | 9 | 2020-03-24T16:20:31.000Z | 2022-03-11T23:32:38.000Z | mezzanine/generic/managers.py | arundalal/mezzanine-blog | 116f3c2595098a83757f1c6b00ceb7f65ef30d51 | [
"BSD-2-Clause"
] | 19 | 2017-01-12T09:20:03.000Z | 2019-06-18T14:53:32.000Z | from __future__ import unicode_literals
from django_comments.managers import CommentManager as DjangoCM
from mezzanine.conf import settings
from mezzanine.core.managers import CurrentSiteManager
class CommentManager(CurrentSiteManager, DjangoCM):
"""
Provides filter for restricting comments that are not app... | 32.126761 | 73 | 0.638317 |
f1e0909949211475078abf28fcf3901cd0b3a077 | 1,694 | py | Python | ivi/rigol/rigolMSO4032.py | duckythescientist/python-ivi | f2ccf34fedbc5191923a28c22032b5fc23255bf2 | [
"MIT"
] | 46 | 2015-01-30T23:39:47.000Z | 2021-12-15T02:54:33.000Z | ivi/rigol/rigolMSO4032.py | duckythescientist/python-ivi | f2ccf34fedbc5191923a28c22032b5fc23255bf2 | [
"MIT"
] | 1 | 2019-05-01T10:16:43.000Z | 2019-11-11T20:52:22.000Z | ivi/rigol/rigolMSO4032.py | duckythescientist/python-ivi | f2ccf34fedbc5191923a28c22032b5fc23255bf2 | [
"MIT"
] | 14 | 2015-03-12T05:16:47.000Z | 2021-01-20T21:35:16.000Z | """
Python Interchangeable Virtual Instrument Library
Copyright (c) 2017 Alex Forencich
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 righ... | 37.644444 | 86 | 0.757379 |
810f3b321eb0a1531770c722bffd8e0be9e97db3 | 18,300 | py | Python | ansi.py | aziz/SublimeANSI | cb42936e7c8ae5983e0d6a913f9081fb50bbd0b3 | [
"MIT"
] | 201 | 2015-02-07T09:28:54.000Z | 2022-03-24T18:05:38.000Z | ansi.py | aziz/SublimeANSI | cb42936e7c8ae5983e0d6a913f9081fb50bbd0b3 | [
"MIT"
] | 58 | 2015-02-19T08:29:07.000Z | 2021-06-13T06:12:16.000Z | ansi.py | aziz/SublimeANSI | cb42936e7c8ae5983e0d6a913f9081fb50bbd0b3 | [
"MIT"
] | 49 | 2015-03-25T09:53:10.000Z | 2021-04-22T13:55:12.000Z | # -*- coding: utf-8 -*-
from collections import namedtuple
from functools import partial
import bisect
import Default
import inspect
import json
import os
import re
import sublime
import sublime_plugin
DEBUG = False
AnsiDefinition = namedtuple("AnsiDefinition", "scope regex")
regex_obj_cache = {}
def debug(view, m... | 34.078212 | 157 | 0.605464 |
07cdd24b54735d5fea29c54dfcbbe121ee9c96b0 | 14,897 | py | Python | cgn_framework/imagenet/models/u2net.py | anonymous-user-256/mlrc-cgn | 64f43fcb89b3a13c0ae46db4f19060d9f204a6b1 | [
"MIT"
] | 78 | 2021-01-15T09:22:21.000Z | 2022-03-06T12:15:36.000Z | cgn_framework/imagenet/models/u2net.py | anonymous-user-256/mlrc-cgn | 64f43fcb89b3a13c0ae46db4f19060d9f204a6b1 | [
"MIT"
] | 3 | 2021-03-26T07:33:16.000Z | 2022-01-17T14:49:51.000Z | cgn_framework/imagenet/models/u2net.py | anonymous-user-256/mlrc-cgn | 64f43fcb89b3a13c0ae46db4f19060d9f204a6b1 | [
"MIT"
] | 14 | 2021-01-17T10:08:49.000Z | 2022-01-14T06:32:11.000Z | import torch
import torch.nn as nn
from torchvision import models
import torch.nn.functional as F
class REBNCONV(nn.Module):
def __init__(self,in_ch=3,out_ch=3,dirate=1):
super(REBNCONV,self).__init__()
self.conv_s1 = nn.Conv2d(in_ch,out_ch,3,padding=1*dirate,dilation=1*dirate)
self.bn_s1 ... | 27.897004 | 85 | 0.60482 |
86a8e5c605cf86f122b1ab26180b874acb97ad25 | 802 | py | Python | notebooks/utils/model_serializer.py | aitorochotorena/multirotor-all | e0820a0fd32f852549ebde54425177156fdf40db | [
"Apache-2.0"
] | 1 | 2021-01-28T09:57:42.000Z | 2021-01-28T09:57:42.000Z | notebooks/utils/.ipynb_checkpoints/model_serializer-checkpoint.py | SizingLab/droneapp-legacy | b7844810107051bc4bb1861ecedc71188d09e881 | [
"Apache-2.0"
] | null | null | null | notebooks/utils/.ipynb_checkpoints/model_serializer-checkpoint.py | SizingLab/droneapp-legacy | b7844810107051bc4bb1861ecedc71188d09e881 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ======================================================================================================================
# Scott Delbecq
# ISAE Supaero
# ======================================================================================================================... | 28.642857 | 120 | 0.427681 |
453c527601e30fd2f0702b174b3926970a7fadc1 | 7,362 | py | Python | lib/datasets/landcover.py | Cousin-Zan/HRNet-Semantic-Segmentation-pytorch-v1.1 | 9cd85a9e9115a45f152cd5814ea39400cb349320 | [
"MIT"
] | null | null | null | lib/datasets/landcover.py | Cousin-Zan/HRNet-Semantic-Segmentation-pytorch-v1.1 | 9cd85a9e9115a45f152cd5814ea39400cb349320 | [
"MIT"
] | null | null | null | lib/datasets/landcover.py | Cousin-Zan/HRNet-Semantic-Segmentation-pytorch-v1.1 | 9cd85a9e9115a45f152cd5814ea39400cb349320 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by Ke Sun (sunk@mail.ustc.edu.cn)
# ------------------------------------------------------------------------------
import os
import cv2
import numpy as np
from PIL imp... | 38.145078 | 80 | 0.457349 |
b0b8fccf37ac67906a63c5a1a4ab19c72ad0d0ce | 986 | py | Python | isi_sdk_8_2_0/test/test_node_state_servicelight_node.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_0/test/test_node_state_servicelight_node.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_0/test/test_node_state_servicelight_node.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 7
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_2_0
from i... | 24.04878 | 109 | 0.730223 |
6c0de172a1287730093d0b3275b4264f8b93e805 | 478 | py | Python | setup.py | drobilc/StudentskaPrehrana | 01f6c9cd98cdf5e9588bf03dcc72bf476fd9af5b | [
"MIT"
] | 1 | 2017-12-28T14:50:53.000Z | 2017-12-28T14:50:53.000Z | setup.py | drobilc/StudentskaPrehrana | 01f6c9cd98cdf5e9588bf03dcc72bf476fd9af5b | [
"MIT"
] | null | null | null | setup.py | drobilc/StudentskaPrehrana | 01f6c9cd98cdf5e9588bf03dcc72bf476fd9af5b | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name = 'studentskaprehrana',
version = '0.1',
description = 'Scraper for studentska-prehrana.si website.',
url = 'https://github.com/drobilc/studentskaprehrana',
author = 'Niki Bizjak',
author_email = 'drobilc@gmail.com',
license = 'MIT',
packages = ['studentskaprehrana'],
zi... | 29.875 | 83 | 0.723849 |
5b47a03b8cffd2419b5c63f3f37e5331f4834a72 | 5,592 | py | Python | sgtpy/gammamie_pure/association_aux.py | MatKie/SGTPy | 8e98d92fedd2b07d834e547e5154ec8f70d80728 | [
"MIT"
] | 12 | 2020-12-27T17:04:33.000Z | 2021-07-19T06:28:28.000Z | sgtpy/gammamie_pure/association_aux.py | MatKie/SGTPy | 8e98d92fedd2b07d834e547e5154ec8f70d80728 | [
"MIT"
] | 2 | 2021-05-15T14:27:57.000Z | 2021-08-19T15:42:24.000Z | sgtpy/gammamie_pure/association_aux.py | MatKie/SGTPy | 8e98d92fedd2b07d834e547e5154ec8f70d80728 | [
"MIT"
] | 5 | 2021-02-21T01:33:29.000Z | 2021-07-26T15:11:08.000Z | from __future__ import division, print_function, absolute_import
import numpy as np
from numba import jit
from scipy.optimize import fsolve
cpq = np.zeros([11, 11])
cpq[0, 0] = 7.56425183020431E-02
cpq[0, 1] = -1.28667137050961E-01
cpq[0, 2] = 1.28350632316055E-01
cpq[0, 3] = -7.25321780970292E-02
cpq[0, 4] = 2.57782... | 29.277487 | 83 | 0.622675 |
bab3bcd3cb3d9fb6ae38c92aa995b241fd155f38 | 14,388 | py | Python | transtool/config/builder.py | MarcinOrlowski/prop-tool | 894d7a9d65d874e06ccb1f7d7dcb1f6180b7da4f | [
"MIT"
] | 1 | 2021-08-07T08:27:37.000Z | 2021-08-07T08:27:37.000Z | transtool/config/builder.py | MarcinOrlowski/prop-tool | 894d7a9d65d874e06ccb1f7d7dcb1f6180b7da4f | [
"MIT"
] | 14 | 2021-07-16T19:57:39.000Z | 2021-08-05T09:14:36.000Z | transtool/config/builder.py | MarcinOrlowski/trans-tool | 894d7a9d65d874e06ccb1f7d7dcb1f6180b7da4f | [
"MIT"
] | 1 | 2021-07-16T19:43:51.000Z | 2021-07-16T19:43:51.000Z | """
# trans-tool
# The translation files checker and syncing tool.
#
# Copyright ©2021 Marcin Orlowski <mail [@] MarcinOrlowski.com>
# https://github.com/MarcinOrlowski/trans-tool/
#
"""
import argparse
import re
from pathlib import Path
from typing import List, Union
from transtool.checks.brackets import Brackets
fro... | 47.642384 | 125 | 0.636016 |
68e5725e6f61858396fdaa6a27be3966d32bfc76 | 2,724 | py | Python | samples/cli/accelbyte_py_sdk_cli/eventlog/_get_event_by_event_id_handler.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | samples/cli/accelbyte_py_sdk_cli/eventlog/_get_event_by_event_id_handler.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | 1 | 2021-10-13T03:46:58.000Z | 2021-10-13T03:46:58.000Z | samples/cli/accelbyte_py_sdk_cli/eventlog/_get_event_by_event_id_handler.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template_file: python-cli-command.j2
# justice-event-log-service ()
# pylint: disable=duplicate-code
# ... | 32.428571 | 113 | 0.731645 |
0606c35b6df7c520546928e74c7f525ee37f3197 | 413 | py | Python | backend/sneaker_spot_32152/wsgi.py | crowdbotics-apps/sneaker-spot-32152 | 34c2544824c3c48417d0b84531bed35425893355 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/sneaker_spot_32152/wsgi.py | crowdbotics-apps/sneaker-spot-32152 | 34c2544824c3c48417d0b84531bed35425893355 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/sneaker_spot_32152/wsgi.py | crowdbotics-apps/sneaker-spot-32152 | 34c2544824c3c48417d0b84531bed35425893355 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for sneaker_spot_32152 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('D... | 24.294118 | 78 | 0.79661 |
5a4d655c1cc38d01df4f871020bd7719a2da870e | 2,187 | py | Python | uvcgan/cgan/simple_autoencoder.py | LS4GAN/uvcgan | 376439ae2a9be684ff279ddf634fe137aadc5df5 | [
"BSD-2-Clause"
] | 20 | 2022-02-14T22:36:19.000Z | 2022-03-29T06:31:30.000Z | uvcgan/cgan/simple_autoencoder.py | LS4GAN/uvcgan | 376439ae2a9be684ff279ddf634fe137aadc5df5 | [
"BSD-2-Clause"
] | 1 | 2022-03-09T17:23:30.000Z | 2022-03-09T17:23:30.000Z | uvcgan/cgan/simple_autoencoder.py | LS4GAN/uvcgan | 376439ae2a9be684ff279ddf634fe137aadc5df5 | [
"BSD-2-Clause"
] | 3 | 2022-02-14T22:36:41.000Z | 2022-03-20T12:53:29.000Z | from uvcgan.torch.select import select_optimizer, select_loss
from uvcgan.torch.image_masking import select_masking
from uvcgan.models.generator import construct_generator
from .model_base import ModelBase
class SimpleAutoencoder(ModelBase):
def _setup_images(self, _config):
imag... | 29.554054 | 73 | 0.635574 |
b568af9995ca43a899e3e99a8ca004e8a85658eb | 6,057 | py | Python | tws_async/histrequester.py | suuuch/tws_async | 35f4ae77734d0e8dad5b1d7f9aac8102c42c4c0c | [
"Unlicense"
] | 102 | 2017-02-15T08:13:34.000Z | 2022-03-11T02:00:57.000Z | tws_async/histrequester.py | suuuch/tws_async | 35f4ae77734d0e8dad5b1d7f9aac8102c42c4c0c | [
"Unlicense"
] | 8 | 2017-05-03T17:28:57.000Z | 2018-09-10T11:42:48.000Z | tws_async/histrequester.py | suuuch/tws_async | 35f4ae77734d0e8dad5b1d7f9aac8102c42c4c0c | [
"Unlicense"
] | 40 | 2017-02-18T08:17:21.000Z | 2022-02-25T22:23:26.000Z | import os
import datetime
import asyncio
import logging
import csv
import ibapi
from .twsclient import TWSClient, iswrapper, TWSException
from ibapi.wrapper import BarData
UTC = datetime.timezone.utc
__all__ = ['HistRequester', 'HistRequest']
class HistRequest:
"""
Historical request.
"""
def __in... | 37.159509 | 91 | 0.565957 |
6766a3a3e5d82e695ed705a446cb1ab9e990ab06 | 1,867 | py | Python | edipy/parser.py | fakeezz/edipy | 00c125621201e7290add135240c131c22feb3a72 | [
"MIT"
] | 1 | 2018-05-15T18:27:31.000Z | 2018-05-15T18:27:31.000Z | edipy/parser.py | fakeezz/edipy | 00c125621201e7290add135240c131c22feb3a72 | [
"MIT"
] | null | null | null | edipy/parser.py | fakeezz/edipy | 00c125621201e7290add135240c131c22feb3a72 | [
"MIT"
] | 2 | 2020-12-25T16:37:56.000Z | 2021-06-22T13:13:18.000Z | # coding: utf-8
from edipy import fields, exceptions
def parse(model, data):
data = "".join(data.splitlines())
model_fields = model._fields
instance = model()
for (name, fixed_type) in model_fields:
if isinstance(fixed_type, fields.Register):
els, parsed = _parse_register(fixed_t... | 31.644068 | 70 | 0.634172 |
ccf437e13b9a5e260c64164a73c49d41fb3d1dfd | 20,468 | py | Python | fyle_db_connector/extract.py | fylein/fyle-db-connector | 19cc20bb85dae7ad8a78ac3ad0ed2d5c26500d02 | [
"MIT"
] | null | null | null | fyle_db_connector/extract.py | fylein/fyle-db-connector | 19cc20bb85dae7ad8a78ac3ad0ed2d5c26500d02 | [
"MIT"
] | 3 | 2019-10-30T15:48:38.000Z | 2019-12-16T03:48:37.000Z | fyle_db_connector/extract.py | fylein/fyle-db-connector | 19cc20bb85dae7ad8a78ac3ad0ed2d5c26500d02 | [
"MIT"
] | 9 | 2019-11-07T16:15:29.000Z | 2021-01-11T11:19:09.000Z | """
FyleExtractConnector(): Connection between Fyle and Database
"""
import logging
from os import path
import sqlite3
from typing import List
import pandas as pd
class FyleExtractConnector:
"""
- Extract Data from Fyle and load to Database
"""
def __init__(self, fyle_sdk_connection, dbconn):
... | 42.202062 | 155 | 0.599668 |
adfbffd4b8f69efdd6e00a174fa215e1a30cf392 | 11,467 | py | Python | magenta/models/svg_vae/image_vae.py | hologerry/magenta | c08c17a548f97a3f5d294a010c28ea2803718d6f | [
"Apache-2.0"
] | null | null | null | magenta/models/svg_vae/image_vae.py | hologerry/magenta | c08c17a548f97a3f5d294a010c28ea2803718d6f | [
"Apache-2.0"
] | null | null | null | magenta/models/svg_vae/image_vae.py | hologerry/magenta | c08c17a548f97a3f5d294a010c28ea2803718d6f | [
"Apache-2.0"
] | 1 | 2021-09-09T15:30:36.000Z | 2021-09-09T15:30:36.000Z | # Copyright 2020 The Magenta 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 law or agreed to in ... | 43.435606 | 98 | 0.609314 |
aacc3ee13c175da03144d8d03d87a2a1453377ed | 1,674 | py | Python | main.py | sirinoks/pajbot | 6ac9b989ffdf9abd9a36dac27ac99ac9409cfc86 | [
"MIT"
] | 145 | 2019-06-08T15:38:40.000Z | 2022-03-29T22:51:47.000Z | main.py | sirinoks/pajbot | 6ac9b989ffdf9abd9a36dac27ac99ac9409cfc86 | [
"MIT"
] | 671 | 2019-05-26T22:19:08.000Z | 2022-03-31T06:00:49.000Z | main.py | sirinoks/pajbot | 6ac9b989ffdf9abd9a36dac27ac99ac9409cfc86 | [
"MIT"
] | 105 | 2019-05-25T18:22:13.000Z | 2022-02-23T00:57:27.000Z | #!/usr/bin/env python3
import logging
import os
import signal
import sys
from pajbot.bot import Bot
from pajbot.utils import parse_args
try:
basestring
except NameError:
basestring = str
# XXX: What does this achieve exactly?
os.chdir(os.path.dirname(os.path.realpath(__file__)))
log = logging.getLogger(__na... | 22.32 | 116 | 0.664875 |
ae6009b167fd393e57de6c2112d7119796ec36c1 | 3,197 | py | Python | propose_list.py | mongo-tools/text-similarity | 3673d5ab816df2518c6784f9e96fe6f18c2175dc | [
"MIT"
] | 3 | 2015-11-21T02:46:46.000Z | 2022-03-30T11:10:43.000Z | propose_list.py | mongo-tools/text-similarity | 3673d5ab816df2518c6784f9e96fe6f18c2175dc | [
"MIT"
] | 2 | 2018-04-18T13:20:03.000Z | 2018-04-18T13:24:43.000Z | propose_list.py | mongo-tools/text-similarity | 3673d5ab816df2518c6784f9e96fe6f18c2175dc | [
"MIT"
] | null | null | null | '''
Program works for current directory
just be sure to have .txt data there
and to output results to a file or somewhere
'''
import os
import codecs
import numpy as np
import itertools
import glob
import sys
from sklearn.feature_extraction.text import TfidfVectorizer
def allglob(args):
return ... | 30.447619 | 96 | 0.595246 |
9c7823002c5f66e209c968b6ae4a167731b21e2a | 924 | py | Python | ambari-client/src/main/python/ambari_client/model/paths.py | zhanganha/ambari | c99dbff12a6b180c74f14e2fda06a204181e6e2c | [
"Apache-2.0"
] | null | null | null | ambari-client/src/main/python/ambari_client/model/paths.py | zhanganha/ambari | c99dbff12a6b180c74f14e2fda06a204181e6e2c | [
"Apache-2.0"
] | null | null | null | ambari-client/src/main/python/ambari_client/model/paths.py | zhanganha/ambari | c99dbff12a6b180c74f14e2fda06a204181e6e2c | [
"Apache-2.0"
] | 2 | 2020-11-04T06:30:31.000Z | 2020-11-06T11:02:33.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 m... | 34.222222 | 75 | 0.744589 |
dba2da0d7e872f8fd24e8c6412f799be712dd0d0 | 4,630 | py | Python | Extractor/cite-classifications-wiki/libraries/wikiciteparser/wikiciteparser/parser.py | opencitations/wcw | 9d4776c1aa68dedbe9b6a42702fe9a36306035db | [
"0BSD"
] | 8 | 2021-04-29T16:49:45.000Z | 2021-08-09T18:56:35.000Z | Extractor/cite-classifications-wiki/libraries/wikiciteparser/wikiciteparser/parser.py | opencitations/wcw | 9d4776c1aa68dedbe9b6a42702fe9a36306035db | [
"0BSD"
] | null | null | null | Extractor/cite-classifications-wiki/libraries/wikiciteparser/wikiciteparser/parser.py | opencitations/wcw | 9d4776c1aa68dedbe9b6a42702fe9a36306035db | [
"0BSD"
] | 1 | 2021-06-01T08:54:03.000Z | 2021-06-01T08:54:03.000Z | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
import re
import os
import lupa
import json
import mwparserfromhell
import importlib
from time import sleep
from . import en
from . import it
lua = lupa.LuaRuntime()
luacode = ''
luafilepath = os.path.join(os.path.dirname(__file__), 'cs1.lua')
with o... | 29.490446 | 113 | 0.643844 |
0f98cd3958a8063eae073478e9c7878c67928565 | 1,943 | py | Python | src/app.py | arteeh/wasp-companion | e69d20155b0803b3984f8cabf006884981e1f47e | [
"MIT"
] | 4 | 2021-05-23T19:25:51.000Z | 2021-09-18T08:58:38.000Z | src/app.py | arteeh/wasp-companion | e69d20155b0803b3984f8cabf006884981e1f47e | [
"MIT"
] | 1 | 2021-08-29T15:00:45.000Z | 2021-08-30T16:45:41.000Z | src/app.py | arteeh/wasp-companion | e69d20155b0803b3984f8cabf006884981e1f47e | [
"MIT"
] | 2 | 2021-07-15T16:00:47.000Z | 2021-07-19T16:33:01.000Z | import os
import subprocess
import sys
import gi
import threading
# UI library
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
# Mobile GTK widgets
gi.require_version('Handy','1')
from gi.repository import Handy
# Music player control
gi.require_version('Playerctl', '2.0')
from gi.repository import Play... | 23.130952 | 92 | 0.725167 |
85d7dc7bcfd4396382f82e7c0763a44fc1897292 | 909 | py | Python | integration/api/__main__.py | zimventures/libcloud | be0765df384f1baccde24539156119856cb96816 | [
"Apache-2.0"
] | 1,435 | 2015-01-07T05:32:51.000Z | 2022-03-25T19:39:34.000Z | integration/api/__main__.py | zimventures/libcloud | be0765df384f1baccde24539156119856cb96816 | [
"Apache-2.0"
] | 1,158 | 2015-01-04T18:08:42.000Z | 2022-03-24T14:34:57.000Z | integration/api/__main__.py | zimventures/libcloud | be0765df384f1baccde24539156119856cb96816 | [
"Apache-2.0"
] | 832 | 2015-01-05T09:20:21.000Z | 2022-03-24T19:22:19.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 use ... | 41.318182 | 74 | 0.767877 |
af68bd16fcca5e3bcba0a49e6119dad4a49a17fb | 757 | py | Python | kunquat/tracker/ui/model/orderlistmanager.py | kagu/kunquat | 83a2e972121e6a114ecc5ef4392b501ce926bb06 | [
"CC0-1.0"
] | 13 | 2016-09-01T21:52:49.000Z | 2022-03-24T06:07:20.000Z | kunquat/tracker/ui/model/orderlistmanager.py | kagu/kunquat | 83a2e972121e6a114ecc5ef4392b501ce926bb06 | [
"CC0-1.0"
] | 290 | 2015-03-14T10:59:25.000Z | 2022-03-20T08:32:17.000Z | kunquat/tracker/ui/model/orderlistmanager.py | kagu/kunquat | 83a2e972121e6a114ecc5ef4392b501ce926bb06 | [
"CC0-1.0"
] | 7 | 2015-03-19T13:28:11.000Z | 2019-09-03T16:21:16.000Z | # -*- coding: utf-8 -*-
#
# Author: Tomi Jylhä-Ollila, Finland 2015
#
# This file is part of Kunquat.
#
# CC0 1.0 Universal, http://creativecommons.org/publicdomain/zero/1.0/
#
# To the extent possible under law, Kunquat Affirmers have waived all
# copyright and related or neighboring rights to Kunquat.
#
class Orde... | 23.65625 | 70 | 0.708058 |
99c04e49074b95f965603ba2a73f41adbd2c8a94 | 3,596 | py | Python | partiExp/tools/matrix_reduce.py | JovanWang/AdaptiveStreamSpTTMFramework | 3ba43efe0d78a3f93c14c03cb959db0b00927ab4 | [
"BSD-3-Clause"
] | null | null | null | partiExp/tools/matrix_reduce.py | JovanWang/AdaptiveStreamSpTTMFramework | 3ba43efe0d78a3f93c14c03cb959db0b00927ab4 | [
"BSD-3-Clause"
] | null | null | null | partiExp/tools/matrix_reduce.py | JovanWang/AdaptiveStreamSpTTMFramework | 3ba43efe0d78a3f93c14c03cb959db0b00927ab4 | [
"BSD-3-Clause"
] | null | null | null | import os
import shutil
def get_filename(file_dir):
filenames=[]
for root, dirs, files in os.walk(file_dir):
for file in files:
filenames.append(os.path.join(root, file))
return filenames
# True针对行号False针对列号
def refile(filename, newfilename, rerow=True ,recol=True ):
... | 32.396396 | 137 | 0.582592 |
902f4bfd966fcb913a468689f62f49818d04e3c7 | 3,080 | py | Python | finplot/examples/sock2.py | varder/finplot | d8287e05b4b603b089f1399fc42fa984e22a442f | [
"MIT"
] | null | null | null | finplot/examples/sock2.py | varder/finplot | d8287e05b4b603b089f1399fc42fa984e22a442f | [
"MIT"
] | null | null | null | finplot/examples/sock2.py | varder/finplot | d8287e05b4b603b089f1399fc42fa984e22a442f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import socket
import zmq
import time
import json
import finplot as fplt
import pandas as pd
plots = []
ax0 = fplt.create_plot('My Plot AMD', init_zoom_periods=75, maximize=False, rows=2)
# ax,ax2 = fplt.create_plot('S&P 500 MACD', rows=2)
fplt.show()
def update_plot(df):
global orderb... | 29.902913 | 119 | 0.575649 |
235cbb81af7f2b7b16475b8fa65e8f355491ec03 | 830 | py | Python | setup.py | Jasper-Koops/easy-gscv | f02aaf4ebebc122dc912cb60747085598f676620 | [
"MIT"
] | 1 | 2019-02-04T09:52:41.000Z | 2019-02-04T09:52:41.000Z | setup.py | Jasper-Koops/easy-gscv | f02aaf4ebebc122dc912cb60747085598f676620 | [
"MIT"
] | 3 | 2018-08-11T14:30:23.000Z | 2018-08-11T15:09:46.000Z | setup.py | Jasper-Koops/easy-gscv | f02aaf4ebebc122dc912cb60747085598f676620 | [
"MIT"
] | null | null | null | """
Script for packaging.
"""
import setuptools
with open("README.md", "r") as fh:
LONG_DESCRIPTION = fh.read()
setuptools.setup(
name="easy-gscv",
version="0.2",
author="Jasper Koops",
author_email="jasperkoops91@gmail.com",
description=(
"A high level library gridsearch / cross evalu... | 25.151515 | 69 | 0.625301 |
33c44bf5aa032fca8644b36960e7af03e321b8ec | 429 | py | Python | sports/migrations/0004_academy_city.py | DishenMakwana/Sports-Academy-Info | c36e7ccd643869a72308c8af32d2611ca0484dbb | [
"Apache-2.0"
] | 3 | 2020-10-05T05:02:42.000Z | 2020-10-27T16:38:24.000Z | sports/migrations/0004_academy_city.py | DishenMakwana/Sports-Academy-Info | c36e7ccd643869a72308c8af32d2611ca0484dbb | [
"Apache-2.0"
] | 2 | 2020-10-06T03:39:41.000Z | 2020-10-08T05:39:30.000Z | sports/migrations/0004_academy_city.py | DishenMakwana/Sports-Academy-Info | c36e7ccd643869a72308c8af32d2611ca0484dbb | [
"Apache-2.0"
] | 6 | 2020-10-05T04:50:18.000Z | 2021-02-16T12:34:04.000Z | # Generated by Django 3.1.2 on 2020-10-24 17:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sports', '0003_auto_20201020_1153'),
]
operations = [
migrations.AddField(
model_name='academy',
name=... | 22.578947 | 80 | 0.578089 |
5643f95e64cd3e2dda178de1cbc304fc88b25df8 | 188 | py | Python | testing/slides/examples/branching/branching.py | ramosmaria/school2021 | 3e162a05767bbc8fa6ce3f92c858d1bd639fee16 | [
"MIT"
] | 252 | 2021-05-18T11:58:17.000Z | 2022-03-12T06:48:52.000Z | testing/slides/examples/branching/branching.py | ramosmaria/school2021 | 3e162a05767bbc8fa6ce3f92c858d1bd639fee16 | [
"MIT"
] | 44 | 2021-05-21T14:28:34.000Z | 2021-07-12T22:36:06.000Z | testing/slides/examples/branching/branching.py | ramosmaria/school2021 | 3e162a05767bbc8fa6ce3f92c858d1bd639fee16 | [
"MIT"
] | 128 | 2021-05-24T18:32:54.000Z | 2022-03-26T11:24:16.000Z | def do_stuff():
print('stuff')
def do_other_stuff():
print('other stuff')
def branching(some_condition):
if some_condition is True:
do_stuff()
do_other_stuff()
| 14.461538 | 30 | 0.654255 |
4aeb8b52cd4f3e7895da3dac078a09ab416031f9 | 24,223 | py | Python | pdpy/lords.py | olihawkins/pdpy | 9f0058e4de432f09b69d556fa04d0889afac3fab | [
"BSD-3-Clause"
] | 13 | 2018-12-09T14:56:27.000Z | 2019-12-31T00:49:50.000Z | pdpy/lords.py | houseofcommonslibrary/pdpy | 9f0058e4de432f09b69d556fa04d0889afac3fab | [
"BSD-3-Clause"
] | 1 | 2021-04-11T02:03:40.000Z | 2021-04-22T14:57:21.000Z | pdpy/lords.py | houseofcommonslibrary/pdpy | 9f0058e4de432f09b69d556fa04d0889afac3fab | [
"BSD-3-Clause"
] | 2 | 2021-04-11T01:36:06.000Z | 2022-01-12T07:48:31.000Z | # -*- coding: utf-8 -*-
"""Functions for downloading and analysing data on Lords."""
# Imports ---------------------------------------------------------------------
import numpy as np
import pandas as pd
from . import combine
from . import constants
from . import core
from . import filter
from . import members
from ... | 38.81891 | 106 | 0.669777 |
0c8e697c572e89ae2b9597648af2eab488b92c59 | 143,135 | py | Python | env/lib/python3.5/site-packages/pandas/core/series.py | Udolf15/recommedMeMovies | be5ae74acd98e3f93beaaa5bb55623974fb24247 | [
"MIT"
] | 8 | 2019-05-29T09:38:30.000Z | 2021-01-20T03:36:59.000Z | env/lib/python3.5/site-packages/pandas/core/series.py | Udolf15/recommedMeMovies | be5ae74acd98e3f93beaaa5bb55623974fb24247 | [
"MIT"
] | 12 | 2020-06-06T01:22:26.000Z | 2022-03-12T00:13:42.000Z | env/lib/python3.5/site-packages/pandas/core/series.py | Udolf15/recommedMeMovies | be5ae74acd98e3f93beaaa5bb55623974fb24247 | [
"MIT"
] | 7 | 2019-08-01T12:37:54.000Z | 2021-05-12T14:40:06.000Z | """
Data structure for 1-dimensional cross-sectional and time series data
"""
from __future__ import division
from textwrap import dedent
import warnings
import numpy as np
from pandas._libs import iNaT, index as libindex, lib, tslibs
import pandas.compat as compat
from pandas.compat import PY36, OrderedDict, String... | 32.597358 | 79 | 0.529933 |
c731784557694a5c3c10757de54b60e34512a412 | 1,500 | py | Python | release/stubs.min/System/Runtime/InteropServices/__init___parts/UCOMIEnumConnections.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/System/Runtime/InteropServices/__init___parts/UCOMIEnumConnections.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/System/Runtime/InteropServices/__init___parts/UCOMIEnumConnections.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | class UCOMIEnumConnections:
""" Use System.Runtime.InteropServices.ComTypes.IEnumConnections instead. """
def Clone(self, ppenum):
"""
Clone(self: UCOMIEnumConnections) -> UCOMIEnumConnections
Creates another enumerator that contains the same enumeration state as the current one.
... | 26.315789 | 153 | 0.657333 |
0a576abfafe078981a7074eb110b24110254deeb | 3,328 | py | Python | portfolio/Python/scrapy/americanrv/rvplus.py | 0--key/lib | ba7a85dda2b208adc290508ca617bdc55a5ded22 | [
"Apache-2.0"
] | null | null | null | portfolio/Python/scrapy/americanrv/rvplus.py | 0--key/lib | ba7a85dda2b208adc290508ca617bdc55a5ded22 | [
"Apache-2.0"
] | null | null | null | portfolio/Python/scrapy/americanrv/rvplus.py | 0--key/lib | ba7a85dda2b208adc290508ca617bdc55a5ded22 | [
"Apache-2.0"
] | 5 | 2016-03-22T07:40:46.000Z | 2021-05-30T16:12:21.000Z | import re
import os
from scrapy.spider import BaseSpider
from scrapy.selector import HtmlXPathSelector
from scrapy.http import Request, HtmlResponse
from scrapy.utils.response import get_base_url
from scrapy.utils.url import urljoin_rfc
import csv
from product_spiders.items import Product, ProductLoader
HERE = os.p... | 39.152941 | 156 | 0.617488 |
72bc2a6d08de762bcc8ea3a7b44f83962d657268 | 3,398 | py | Python | main.py | Sebastian-Bindler/WS2801-LED-Clock | 5a337b13a5a85d134424d4a492c9e7e3bb7ab2c5 | [
"MIT"
] | null | null | null | main.py | Sebastian-Bindler/WS2801-LED-Clock | 5a337b13a5a85d134424d4a492c9e7e3bb7ab2c5 | [
"MIT"
] | null | null | null | main.py | Sebastian-Bindler/WS2801-LED-Clock | 5a337b13a5a85d134424d4a492c9e7e3bb7ab2c5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Mar 27 19:34:35 2021
@author: Sebi
"""
from datetime import datetime
import random
import time
import os
from inc.ledMin import setMin
from inc.ledHr import setHr
from inc.blink import blink
import RPi.GPIO as GPIO
import Adafruit_WS2801
import Adafruit_GPIO.... | 26.341085 | 100 | 0.505297 |
da9d4fb9bef5ce2911f922c6ce11a8ee5143c889 | 2,395 | py | Python | zenora/impl/mapper.py | MaksymKarunos/zenora | a1886dac5f3c84dcddea3368e21f7986368ad63f | [
"MIT"
] | 1 | 2020-09-12T04:07:32.000Z | 2020-09-12T04:07:32.000Z | zenora/impl/mapper.py | MaksymKarunos/zenora | a1886dac5f3c84dcddea3368e21f7986368ad63f | [
"MIT"
] | null | null | null | zenora/impl/mapper.py | MaksymKarunos/zenora | a1886dac5f3c84dcddea3368e21f7986368ad63f | [
"MIT"
] | null | null | null | # Zenora, a modern Python API wrapper for the Discord REST API
#
# Copyright (c) 2020 K.M Ahnaf Zamil
#
# 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 ... | 38.015873 | 80 | 0.694781 |
510e09bc0894fb788920666a8863cc0e7ada51db | 2,491 | py | Python | pennylane/ops/snapshot.py | MoritzWillmann/pennylane | 2b07d22cfcc6406ba28e5c647062340b240a4ee5 | [
"Apache-2.0"
] | 539 | 2018-11-13T08:45:42.000Z | 2020-07-27T18:17:16.000Z | pennylane/ops/snapshot.py | MoritzWillmann/pennylane | 2b07d22cfcc6406ba28e5c647062340b240a4ee5 | [
"Apache-2.0"
] | 588 | 2018-11-14T10:21:47.000Z | 2020-07-28T06:27:14.000Z | pennylane/ops/snapshot.py | MoritzWillmann/pennylane | 2b07d22cfcc6406ba28e5c647062340b240a4ee5 | [
"Apache-2.0"
] | 165 | 2018-11-13T18:58:56.000Z | 2020-07-27T17:18:17.000Z | # Copyright 2018-2022 Xanadu Quantum Technologies 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 or... | 31.1375 | 84 | 0.653553 |
da1f3eb3c569af9ea57d7dfecadaad0490af05ed | 437 | py | Python | setup.py | USFgeodesy/gpsMSSA | 66065b4d40835b9c55a3c2aa95f2f1513026f6c2 | [
"MIT"
] | 1 | 2017-08-10T01:01:39.000Z | 2017-08-10T01:01:39.000Z | setup.py | USFgeodesy/gpsMSSA | 66065b4d40835b9c55a3c2aa95f2f1513026f6c2 | [
"MIT"
] | null | null | null | setup.py | USFgeodesy/gpsMSSA | 66065b4d40835b9c55a3c2aa95f2f1513026f6c2 | [
"MIT"
] | 1 | 2021-11-10T11:23:58.000Z | 2021-11-10T11:23:58.000Z | # -*- coding: utf-8 -*-
"""
setup file for creating python package pjInvert
"""
from setuptools import setup, find_packages
compile_args = ['-O3']
setup(name='gpsMSSA',
version='0.1',
description='Multi Channel Singular Spectrum Analysis',
url='https://github.com/USFgeodesy/gpsMSSA.git',
author=... | 27.3125 | 61 | 0.643021 |
305da0332c6c3a144e83b459ceda2d33f8282a2a | 13,136 | py | Python | scripts/group-readlen.py | danielltb/f5c | bf6e0717fb859624ba945e1bfbc6de74914c0107 | [
"MIT"
] | 84 | 2018-12-03T12:34:58.000Z | 2022-03-26T07:55:56.000Z | scripts/group-readlen.py | danielltb/f5c | bf6e0717fb859624ba945e1bfbc6de74914c0107 | [
"MIT"
] | 42 | 2018-08-25T11:30:33.000Z | 2022-03-24T10:07:36.000Z | scripts/group-readlen.py | danielltb/f5c | bf6e0717fb859624ba945e1bfbc6de74914c0107 | [
"MIT"
] | 26 | 2018-07-31T17:58:16.000Z | 2022-02-16T03:48:21.000Z | #!/usr/bin/env python3
"""
This script groups fasta reads by their length, and output them as new files.
Although being first developed as processing only fasta files, it can take in
fastq files as well, but the final output will always be a fasta file.
Usage:
python group-fasta-readlen.py reads.fasta
"""
import ar... | 41.56962 | 84 | 0.634973 |
7624554807d158454383c7f86c768947ec629c4e | 4,411 | py | Python | scopetools/featurecounts.py | SingleronBio/SCOPE-tools | b2552c9e04b1a86d9d8610f670cc33622545d6f9 | [
"Apache-2.0"
] | 14 | 2020-05-26T03:48:32.000Z | 2021-07-14T03:55:54.000Z | scopetools/featurecounts.py | SingleronBio/CeleScope | b2552c9e04b1a86d9d8610f670cc33622545d6f9 | [
"Apache-2.0"
] | 2 | 2020-06-22T12:44:13.000Z | 2020-06-28T04:41:52.000Z | scopetools/featurecounts.py | SingleronBio/CeleScope | b2552c9e04b1a86d9d8610f670cc33622545d6f9 | [
"Apache-2.0"
] | 2 | 2020-06-23T07:15:14.000Z | 2020-08-01T07:23:34.000Z | # -*- coding: utf-8 -*-
import sys
from pathlib import Path
import pysam
import re
from collections import defaultdict
from .report import Reporter
from .utils import getlogger, CommandWrapper
logger = getlogger(__name__)
logger.setLevel(10)
class GeneName(object):
def __init__(self, annot):
self.gtf_... | 33.165414 | 188 | 0.622988 |
7c2a0d9464b36ca03728553764914a4d817bd23a | 1,340 | py | Python | jobs/migrations/0011_auto_20210723_1056.py | digitaloxford/do-wagtail | 49dd75b95109ebb38bf66aca13d3fdeb8e25d319 | [
"MIT"
] | 2 | 2021-04-11T11:59:51.000Z | 2021-04-12T06:56:23.000Z | jobs/migrations/0011_auto_20210723_1056.py | digitaloxford/do-wagtail | 49dd75b95109ebb38bf66aca13d3fdeb8e25d319 | [
"MIT"
] | 8 | 2021-04-10T10:40:27.000Z | 2022-01-25T16:32:22.000Z | jobs/migrations/0011_auto_20210723_1056.py | digitaloxford/do-wagtail | 49dd75b95109ebb38bf66aca13d3fdeb8e25d319 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2021-07-23 10:56
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('jobs', '0010_auto_20210723_1039'),
]
operations = [
migrations.RemoveField(
model_name='recruiterpage',
name='address1',
... | 24.814815 | 47 | 0.523881 |
aae0817dfc71af5862e64b3e63fca3fdbfaf0a26 | 3,965 | py | Python | sdk/python/pulumi_aws/mediastore/container.py | michael-golden/pulumi-aws | 165e876e166ecab1870e857822247585d78aef64 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/mediastore/container.py | michael-golden/pulumi-aws | 165e876e166ecab1870e857822247585d78aef64 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/mediastore/container.py | michael-golden/pulumi-aws | 165e876e166ecab1870e857822247585d78aef64 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** 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 Union
from .. import utilities, tables
class Container(pulumi.... | 38.495146 | 134 | 0.649937 |
6272271d63fc40761867eb40d1c284d96dbdc9ca | 8,484 | py | Python | docs/conf.py | GoCarrot/teak-air | be45fd0a09b56b74e6bd8fc8b63e87452ca1521e | [
"Apache-2.0"
] | null | null | null | docs/conf.py | GoCarrot/teak-air | be45fd0a09b56b74e6bd8fc8b63e87452ca1521e | [
"Apache-2.0"
] | 3 | 2019-02-25T23:25:18.000Z | 2020-08-25T18:34:26.000Z | docs/conf.py | GoCarrot/teak-air | be45fd0a09b56b74e6bd8fc8b63e87452ca1521e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Teak for Adobe AIR documentation build configuration file, created by
# sphinx-quickstart on Thu Aug 31 12:44:59 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 ... | 30.517986 | 96 | 0.640736 |
3434cfe0a8e7ce23bb7bb1081a9ea75497f0a6cf | 1,653 | py | Python | graph.py | duffj/coreos-dependency-graph | ab10728102b703c13a753558a4454ac95828d513 | [
"MIT"
] | null | null | null | graph.py | duffj/coreos-dependency-graph | ab10728102b703c13a753558a4454ac95828d513 | [
"MIT"
] | null | null | null | graph.py | duffj/coreos-dependency-graph | ab10728102b703c13a753558a4454ac95828d513 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
from os import listdir
import re
import servicefiles
import simplejson
# PATTERN_REQUIRES = re.compile("^Requires=(.*)$")
# PATTERN_WANTS = re.compile("^Wants=(.*)$")
# PATTERN_WANTS = re.compile("^Description=(.*)$")
BASE_PATH = '../../up-service-files'
def run():
files = get_fi... | 27.55 | 128 | 0.562613 |
2d6cc049175c64d1ce0a1e2beee80b54f8034b23 | 10,476 | py | Python | tgap_ng/edge_simplify/reumann_witkam.py | erbasualex/tgap-ng | 3e9ec9e93ee8dfd79d9878b34ed12296a8af6301 | [
"MIT"
] | 2 | 2022-01-12T17:11:49.000Z | 2022-01-14T09:23:46.000Z | tgap_ng/edge_simplify/reumann_witkam.py | erbasualex/tgap-ng | 3e9ec9e93ee8dfd79d9878b34ed12296a8af6301 | [
"MIT"
] | null | null | null | tgap_ng/edge_simplify/reumann_witkam.py | erbasualex/tgap-ng | 3e9ec9e93ee8dfd79d9878b34ed12296a8af6301 | [
"MIT"
] | 1 | 2022-02-26T16:50:45.000Z | 2022-02-26T16:50:45.000Z | from simplegeom.geometry import LineString, LinearRing, Polygon
from .vectorops import sub, cross, norm
from .box2d import init_box, increase_box, as_polygon
from .point_in_poly import point_in_polygon__is_inside_sm as is_point_in_polygon
# from .point_in_poly import point_in_polygon__pnpoly as is_point_in_polygon
i... | 33.257143 | 97 | 0.514987 |
6a57cbc8abfaa6aa46cfab928c2f5ba2c25d68b8 | 1,200 | py | Python | utils/work_flow.py | littlePrince126/HRNet_Pose_Estimation_TensorFlow2 | 7c7ebbb7eb642dbdecddb0adebfbce01c027984b | [
"MIT"
] | 1 | 2020-11-02T01:39:46.000Z | 2020-11-02T01:39:46.000Z | utils/work_flow.py | littlePrince126/HRNet_Pose_Estimation_TensorFlow2 | 7c7ebbb7eb642dbdecddb0adebfbce01c027984b | [
"MIT"
] | null | null | null | utils/work_flow.py | littlePrince126/HRNet_Pose_Estimation_TensorFlow2 | 7c7ebbb7eb642dbdecddb0adebfbce01c027984b | [
"MIT"
] | 1 | 2020-11-02T01:39:48.000Z | 2020-11-02T01:39:48.000Z | from core.hrnet import HRNet
from configuration.base_config import Config
from utils.tools import get_config_params
import numpy as np
def get_model(cfg):
model = HRNet(cfg)
return model
def print_model_summary(network):
config_params = get_config_params(Config.TRAINING_CONFIG_NAME)
network.build(in... | 33.333333 | 116 | 0.7 |
3dfb74e46cde53054fc3eb549bbaab8e1761c64c | 13,178 | py | Python | repo2docker/buildpacks/base.py | s-mawjee/repo2docker | 6bf6c5f3a1a5d6af49b63ebac02eaa81dbc47b95 | [
"BSD-3-Clause"
] | null | null | null | repo2docker/buildpacks/base.py | s-mawjee/repo2docker | 6bf6c5f3a1a5d6af49b63ebac02eaa81dbc47b95 | [
"BSD-3-Clause"
] | null | null | null | repo2docker/buildpacks/base.py | s-mawjee/repo2docker | 6bf6c5f3a1a5d6af49b63ebac02eaa81dbc47b95 | [
"BSD-3-Clause"
] | null | null | null | import textwrap
import jinja2
import tarfile
import io
import os
import re
import logging
import docker
TEMPLATE = r"""
FROM nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04
# avoid prompts from apt
ENV DEBIAN_FRONTEND=noninteractive
# Set up locales properly
RUN apt-get update && \
apt-get install --yes --no-install-... | 30.43418 | 90 | 0.597359 |
797ad4c408ce0eb7498ae025727ac09094a6d766 | 4,914 | py | Python | src/test/python/rashBot/Handling.py | azeemba/ReliefBot | 55a96b22690bd2d9e111e374cd404f99e25fb1b7 | [
"MIT"
] | 8 | 2018-11-18T01:32:25.000Z | 2022-03-28T06:33:42.000Z | src/test/python/rashBot/Handling.py | azeemba/ReliefBot | 55a96b22690bd2d9e111e374cd404f99e25fb1b7 | [
"MIT"
] | null | null | null | src/test/python/rashBot/Handling.py | azeemba/ReliefBot | 55a96b22690bd2d9e111e374cd404f99e25fb1b7 | [
"MIT"
] | 6 | 2018-12-14T11:50:17.000Z | 2020-10-22T23:19:14.000Z | from Util import *
def controls(s):
s.throttle = curve1((s.y - .63 * s.brakes * s.pyv / ((1 - s.pyv / 2300) * 3 + 1)) / 999)
s.steer = curve1(Range180(s.a - s.av / 55, 1))
s.pitch = regress(-s.i - s.iv / 17)
s.yaw = regress(Range180(s.a - s.av / 12, 1))
s.roll = regress(Range180(- s.r + s.rv / 2... | 32.543046 | 92 | 0.489825 |
427c8f1cbf0e625e51887a7936c86c1fc8adf35c | 3,239 | py | Python | hard-gists/4243633/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/4243633/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/4243633/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | '''
Key wrapping and unwrapping as defined in RFC 3394.
Also a padding mechanism that was used in openssl at one time.
The purpose of this algorithm is to encrypt a key multiple times to add an extra layer of security.
Personally, I wouldn't recommend using this for most applications.
Just use AES/mode CTR to en... | 40.4875 | 103 | 0.661006 |
aa9d5795a1e1aecaccfe5b73302a4512c3fdd6e2 | 978 | py | Python | source_py2/combi/_python_toolbox/freezing/freezer_property_freezer.py | cool-RR/combi | 9c5c143a792ffd8fb38b6470f926268c8bacbc31 | [
"MIT"
] | 23 | 2015-01-16T03:45:10.000Z | 2021-08-11T20:46:44.000Z | source_py2/combi/_python_toolbox/freezing/freezer_property_freezer.py | cool-RR/combi | 9c5c143a792ffd8fb38b6470f926268c8bacbc31 | [
"MIT"
] | 3 | 2015-01-30T15:59:45.000Z | 2021-09-18T08:52:38.000Z | source_py2/combi/_python_toolbox/freezing/freezer_property_freezer.py | cool-RR/combi | 9c5c143a792ffd8fb38b6470f926268c8bacbc31 | [
"MIT"
] | 1 | 2021-08-11T19:57:47.000Z | 2021-08-11T19:57:47.000Z | # Copyright 2009-2017 Ram Rachum.
# This program is distributed under the MIT license.
from .freezer import Freezer
class FreezerPropertyFreezer(Freezer):
'''
Freezer used internally by `FreezerProperty`.
It uses the `FreezerProperty`'s internal freeze/thaw handlers as its own
freeze/thaw handle... | 28.764706 | 76 | 0.633947 |
355d9c995896605beb0e271aedce7eeca2884378 | 1,342 | py | Python | gramat/linking/linker.py | gramat-lang/python-gramat | c3edb7cf045b109596bb4cfdf43d58e04763ac19 | [
"MIT"
] | null | null | null | gramat/linking/linker.py | gramat-lang/python-gramat | c3edb7cf045b109596bb4cfdf43d58e04763ac19 | [
"MIT"
] | null | null | null | gramat/linking/linker.py | gramat-lang/python-gramat | c3edb7cf045b109596bb4cfdf43d58e04763ac19 | [
"MIT"
] | null | null | null | from typing import List, Dict
from gramat.expressions import RuleExp, Element, Expression, ReferenceExp
from gramat.linking.link_context import LinkContext
def link_elements(elements: List[Element]):
ctx = LinkContext()
rule_hits: Dict[str, int] = {}
for element in elements:
if isinstance(eleme... | 27.958333 | 74 | 0.640089 |
c77f2a82f1f279360f72dd3f3fa81d911426b6bf | 2,759 | py | Python | tests/test_seeds.py | daymxn/sapai | 70c8e3da7e73b61363b1be45d827797f43424c34 | [
"MIT"
] | 24 | 2022-01-03T18:47:56.000Z | 2022-03-28T15:11:01.000Z | tests/test_seeds.py | daymxn/sapai | 70c8e3da7e73b61363b1be45d827797f43424c34 | [
"MIT"
] | 47 | 2022-01-05T12:12:14.000Z | 2022-03-31T21:41:00.000Z | tests/test_seeds.py | daymxn/sapai | 70c8e3da7e73b61363b1be45d827797f43424c34 | [
"MIT"
] | 17 | 2021-12-29T16:10:27.000Z | 2022-03-25T13:50:38.000Z | import unittest
import numpy as np
from sapai import *
from sapai.compress import compress,decompress
class TestSeeds(unittest.TestCase):
def test_battle_reproducibility(self):
state = np.random.RandomState(seed=4).get_state()
state2 = np.random.RandomState(seed=4).get_state()
winner_se... | 33.646341 | 69 | 0.544763 |
fa4cdda8648494b19d50419d74a83a24fc106b00 | 26,184 | py | Python | api/tests/integration/common/thread_pool.py | f1nzer/Indigo | 59efbd0be0b42f449f706c3a3c8d094e483e5ef4 | [
"Apache-2.0"
] | null | null | null | api/tests/integration/common/thread_pool.py | f1nzer/Indigo | 59efbd0be0b42f449f706c3a3c8d094e483e5ef4 | [
"Apache-2.0"
] | null | null | null | api/tests/integration/common/thread_pool.py | f1nzer/Indigo | 59efbd0be0b42f449f706c3a3c8d094e483e5ef4 | [
"Apache-2.0"
] | null | null | null | #
# Module providing the `Pool` class for managing a process pool
#
# multiprocessing/pool.py
#
# Copyright (c) 2006-2008, R Oudkerk
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redist... | 29.061043 | 80 | 0.542774 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.