hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 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 251 | max_forks_repo_name stringlengths 4 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5123e05085506d3c4a0cddba95732e9a820b4b89 | 1,001 | py | Python | code/python/teenie_mosaic.py | CreativeInquiry/TeenieHarrisProject | c7c2e1730ade29ed086a4bd21d5d21315fcde5e5 | [
"MIT"
] | null | null | null | code/python/teenie_mosaic.py | CreativeInquiry/TeenieHarrisProject | c7c2e1730ade29ed086a4bd21d5d21315fcde5e5 | [
"MIT"
] | 9 | 2019-03-27T18:42:41.000Z | 2019-03-31T17:04:24.000Z | code/python/teenie_mosaic.py | CreativeInquiry/TeenieHarrisProject | c7c2e1730ade29ed086a4bd21d5d21315fcde5e5 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import json
meta = json.loads(open("meta.json",'r').read())
meta_by_shade = sorted(meta,key=lambda x: x['COLOR_AVG']);
W = 214
H = 277
uw = 0.1
for i in range(len(meta)):
file = meta[i]['FILE']
a = meta[i]['AREA_BIGFACE']
b = a > 40000
print(file,a,b)
if not b:
continue
im = cv... | 17.875 | 58 | 0.587413 |
51246251518c088b066874ea4f40b82f548660f5 | 2,045 | py | Python | tests/lib/durak/test_draw_pile.py | maximpertsov/durak-sockets | 53e47980a5456f44df4c2f140d74504ae8ad43a6 | [
"MIT"
] | null | null | null | tests/lib/durak/test_draw_pile.py | maximpertsov/durak-sockets | 53e47980a5456f44df4c2f140d74504ae8ad43a6 | [
"MIT"
] | 1 | 2020-10-23T14:12:47.000Z | 2020-11-03T17:33:11.000Z | tests/lib/durak/test_draw_pile.py | maximpertsov/durak-sockets | 53e47980a5456f44df4c2f140d74504ae8ad43a6 | [
"MIT"
] | null | null | null | import pytest
from lib.durak.draw_pile import DrawPile
def test_draw_pile_size(default_parameters, mocked_draw_cards):
subject = DrawPile(**default_parameters)
assert subject.serialize() == {
**default_parameters,
"drawn_cards": set(),
"cards_left": 6,
"last_card": "2C",
... | 27.266667 | 68 | 0.634719 |
5125398c9d1db11163223e92f131821d631feca4 | 37,976 | py | Python | conference.py | robertkohl125/ConferenceCentral | 29a58b20717730343dfc9529e3cd7ac82d4b1c46 | [
"Apache-2.0"
] | null | null | null | conference.py | robertkohl125/ConferenceCentral | 29a58b20717730343dfc9529e3cd7ac82d4b1c46 | [
"Apache-2.0"
] | null | null | null | conference.py | robertkohl125/ConferenceCentral | 29a58b20717730343dfc9529e3cd7ac82d4b1c46 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
"""
conference.py -- Udacity conference server-side Python App Engine API;
uses Google Cloud Endpoints
$Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $
created by wesc on 2014 apr 21
"""
__author__ = 'wesc+api@google.com (Wesley Chun)'
from datetime import datetime
import datetime ... | 31.281713 | 80 | 0.581236 |
5126df55db07533e80af8cb011974663ad79b0a2 | 2,442 | py | Python | labellab-flask/api/models/Issue.py | M-A-D-A-R-A/LabelLab | 4e86ff52f6bd78ede853e001b5e9a38ebb234b83 | [
"Apache-2.0"
] | null | null | null | labellab-flask/api/models/Issue.py | M-A-D-A-R-A/LabelLab | 4e86ff52f6bd78ede853e001b5e9a38ebb234b83 | [
"Apache-2.0"
] | null | null | null | labellab-flask/api/models/Issue.py | M-A-D-A-R-A/LabelLab | 4e86ff52f6bd78ede853e001b5e9a38ebb234b83 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from email.policy import default
from flask import current_app
from api.extensions import db, Base
| 44.4 | 190 | 0.618346 |
512889aa7d8884a615563804875a0c84c20d6faf | 6,310 | py | Python | src/dumpBuggyPatches/dumpLogs.py | dSar-UVA/repoMiner | 8f75074e388ff13419a0a37b4337c0cdcb459f74 | [
"BSD-3-Clause"
] | null | null | null | src/dumpBuggyPatches/dumpLogs.py | dSar-UVA/repoMiner | 8f75074e388ff13419a0a37b4337c0cdcb459f74 | [
"BSD-3-Clause"
] | null | null | null | src/dumpBuggyPatches/dumpLogs.py | dSar-UVA/repoMiner | 8f75074e388ff13419a0a37b4337c0cdcb459f74 | [
"BSD-3-Clause"
] | null | null | null | import sys, os
#import psycopg2
import logging
import codecs
sys.path.append("../util")
from DatabaseCon import DatabaseCon
#from Config import Config
import Util
| 37.337278 | 132 | 0.581775 |
5128a6095d0bda0d89d5e42437c19a409e1f4631 | 3,275 | py | Python | usaspending_api/awards/v2/lookups/matview_lookups.py | animatecitizen/usaspending-api | 556511ff51fe80a8be8361daa5876fd684a04efe | [
"CC0-1.0"
] | null | null | null | usaspending_api/awards/v2/lookups/matview_lookups.py | animatecitizen/usaspending-api | 556511ff51fe80a8be8361daa5876fd684a04efe | [
"CC0-1.0"
] | 3 | 2020-02-12T01:16:46.000Z | 2021-06-10T20:36:57.000Z | usaspending_api/awards/v2/lookups/matview_lookups.py | mikepsinn/usaspending-api | ef61e13c286eb51949e16b760fa7516255b2bfd3 | [
"CC0-1.0"
] | null | null | null | default_mapping = {
'Recipient Name': 'recipient_name',
'Recipient DUNS Number': 'recipient_unique_id',
'Awarding Agency': 'awarding_toptier_agency_name',
'Awarding Agency Code': 'awarding_toptier_agency_code',
'Awarding Sub Agency': 'awarding_subtier_agency_name',
'Awarding Sub Agency Code': 'a... | 40.432099 | 118 | 0.712977 |
5129fb2575eab078132f342aff13007a4b5635a4 | 687 | py | Python | app/apiv2/internal/tasking/mobius_task.py | Joey-Wondersign/Staffjoy-suite-Joey | b6d0d87b8e60e6b866810ebeed631fb02fadad48 | [
"MIT"
] | 890 | 2017-02-25T07:11:09.000Z | 2022-03-08T05:49:20.000Z | app/apiv2/internal/tasking/mobius_task.py | Joey-Wondersign/Staffjoy-suite-Joey | b6d0d87b8e60e6b866810ebeed631fb02fadad48 | [
"MIT"
] | 11 | 2017-02-25T18:07:11.000Z | 2020-10-19T13:09:41.000Z | app/apiv2/internal/tasking/mobius_task.py | nfriedly/suite | c58c772d98d1476cad0531b8a296f27ad2ab945c | [
"MIT"
] | 276 | 2017-02-25T09:01:23.000Z | 2022-03-19T02:24:02.000Z | from flask_restful import marshal, abort, Resource
from app.models import Schedule2
from app.apiv2.decorators import permission_sudo
from app.apiv2.marshal import tasking_schedule_fields
| 27.48 | 53 | 0.682678 |
512b001cbb24a856260c600fb88d20ffbbd24028 | 508 | py | Python | cla_frontend/apps/status/urls.py | ministryofjustice/cla_frontend | 51a6c5a05597384c780041dd810c9108c9b575bb | [
"MIT"
] | 3 | 2018-02-19T09:50:06.000Z | 2022-01-13T10:17:05.000Z | cla_frontend/apps/status/urls.py | ministryofjustice/cla_frontend | 51a6c5a05597384c780041dd810c9108c9b575bb | [
"MIT"
] | 171 | 2015-01-02T09:27:37.000Z | 2022-03-24T08:56:57.000Z | cla_frontend/apps/status/urls.py | ministryofjustice/cla_frontend | 51a6c5a05597384c780041dd810c9108c9b575bb | [
"MIT"
] | 3 | 2019-03-14T08:31:47.000Z | 2021-05-04T16:01:42.000Z | from django.conf.urls import patterns, url
from moj_irat.views import HealthcheckView
from . import views
urlpatterns = patterns(
"",
url(r"^live/$", views.status, {"probe_type": "live"}, name="live_probe"),
url(r"^ready/$", views.status, {"probe_type": "ready"}, name="ready_probe"),
url(r"^status.jso... | 36.285714 | 83 | 0.685039 |
512b0ff03116ecbbfa2490a86b31c8bef5a16fbc | 2,630 | py | Python | test/test_npu/test_ones_like.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_ones_like.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_ones_like.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 32.469136 | 74 | 0.6 |
512f4ff31b7bb6eea818794d069b861f895637f3 | 419 | py | Python | Algorithms/Math/Angle between hands in a clock.py | Praggya17/HacktoberFestContribute | 098cb1012f1f2ed6ca6b3544a7b962b6c49e2643 | [
"MIT"
] | 98 | 2018-10-09T15:42:41.000Z | 2021-10-04T15:25:44.000Z | Algorithms/Math/Angle between hands in a clock.py | Praggya17/HacktoberFestContribute | 098cb1012f1f2ed6ca6b3544a7b962b6c49e2643 | [
"MIT"
] | 141 | 2018-10-06T16:55:20.000Z | 2021-10-31T18:25:35.000Z | Algorithms/Math/Angle between hands in a clock.py | Praggya17/HacktoberFestContribute | 098cb1012f1f2ed6ca6b3544a7b962b6c49e2643 | [
"MIT"
] | 885 | 2018-10-06T17:14:44.000Z | 2022-01-29T03:16:21.000Z | import math
t = int(input())
for _ in range(t):
x,y = map(float,input().split())
if (x==0 or x==12):
if (y==0 or y==60):
diff = abs((x*30)-(y*6))
else:
diff = abs((y*6)-(y*0.5))
else :
if (y==0 or y==60):
diff = abs((x*30)-(y*6))
else:
... | 24.647059 | 43 | 0.422434 |
5130695836f69d3767c643d9186227a5de4c2625 | 1,388 | py | Python | Scripts/simulation/sims/university/university_enums.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/sims/university/university_enums.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/sims/university/university_enums.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | # uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\sims\university\university_enums.py
# Compiled at: 2019-08-26 20:01:13
# Size of source mod 2**32: 4... | 21.030303 | 107 | 0.680115 |
51307dc4def953e2365771e44c68ad9746c668dd | 472 | py | Python | scripts/estimate_acc.py | iQua/fl-lottery | 360d9c2d54c12e2631ac123a4dd5ac9184d913f0 | [
"MIT"
] | 1 | 2021-10-05T12:27:32.000Z | 2021-10-05T12:27:32.000Z | scripts/estimate_acc.py | iQua/fl-lottery | 360d9c2d54c12e2631ac123a4dd5ac9184d913f0 | [
"MIT"
] | null | null | null | scripts/estimate_acc.py | iQua/fl-lottery | 360d9c2d54c12e2631ac123a4dd5ac9184d913f0 | [
"MIT"
] | 2 | 2021-11-15T10:46:34.000Z | 2022-01-05T11:33:41.000Z | import os, sys
if __name__ == "__main__":
main()
| 29.5 | 77 | 0.565678 |
5132a18e10327c76ac7e1f41f76399315fe8da2f | 2,995 | py | Python | customize_notifications/customize-notifications.py | renjunok/customize-notifications-python-sdk | 759d9bee278595e6f800451648301564a250e3ab | [
"MIT"
] | null | null | null | customize_notifications/customize-notifications.py | renjunok/customize-notifications-python-sdk | 759d9bee278595e6f800451648301564a250e3ab | [
"MIT"
] | null | null | null | customize_notifications/customize-notifications.py | renjunok/customize-notifications-python-sdk | 759d9bee278595e6f800451648301564a250e3ab | [
"MIT"
] | null | null | null | import random
import time
import json
import hashlib
import requests
# def change_type(byte):
# if isinstance(byte, bytes):
# return str(byte, encoding="utf-8")
# return json.JSONEncoder.default(byte)
if __name__ == '__main__':
try:
m = Message(title="test title", msg_type=0, content=... | 32.554348 | 117 | 0.573289 |
5133295a58dcc8605ff18584eaaa6dfc518cf80e | 761 | py | Python | certificate_generator/txx_tools/txx_consts.py | SleepAqua/certificate_generator | 94605394ac68aa9edbbea548acc4f541bfef8aa2 | [
"MIT"
] | 1 | 2020-10-10T08:55:29.000Z | 2020-10-10T08:55:29.000Z | certificate_generator/txx_tools/txx_consts.py | SleepAqua/certificate_generator | 94605394ac68aa9edbbea548acc4f541bfef8aa2 | [
"MIT"
] | null | null | null | certificate_generator/txx_tools/txx_consts.py | SleepAqua/certificate_generator | 94605394ac68aa9edbbea548acc4f541bfef8aa2 | [
"MIT"
] | null | null | null | '''
@version: Python 3.7.3
@Author: Louis
@Date: 2020-06-15 13:27:40
LastEditors: Louis
LastEditTime: 2020-08-19 15:06:25
'''
import os
import sys
from enum import Enum
from datetime import datetime
TODAY = datetime.now().strftime("%Y%m%d")
TODAY_ = datetime.now().strftime("%Y-%m-%d")
TIME = datetime.now().strftime("... | 26.241379 | 88 | 0.646518 |
51337874245c3ee667e619871bcb80cf5b620260 | 8,865 | py | Python | dashboard_viewer/uploader/models.py | EHDEN/NetworkDashboards | 8f67debe0e62606c1067eea8f27f2935242c62b4 | [
"MIT"
] | 4 | 2021-05-24T15:12:44.000Z | 2022-03-13T11:51:36.000Z | dashboard_viewer/uploader/models.py | EHDEN/NetworkDashboards | 8f67debe0e62606c1067eea8f27f2935242c62b4 | [
"MIT"
] | 111 | 2020-07-27T14:48:31.000Z | 2022-01-06T17:40:11.000Z | dashboard_viewer/uploader/models.py | EHDEN/NetworkDashboards | 8f67debe0e62606c1067eea8f27f2935242c62b4 | [
"MIT"
] | null | null | null | import datetime
import json
import os
import pathlib
import uuid
from django.conf import settings
from django.db import models
from django_celery_results.models import TaskResult
def hash_generator():
return uuid.uuid4().hex
# Not following the relational rules in the database_type field, but it will simplif... | 32.95539 | 118 | 0.676593 |
51341e2322007046ce7610e475fc608433c5d8ed | 439 | py | Python | write_new_table.py | Cassiel60/python | 3f451e398a8705a5859d347d5fcdcfd9a5671e1c | [
"MIT"
] | null | null | null | write_new_table.py | Cassiel60/python | 3f451e398a8705a5859d347d5fcdcfd9a5671e1c | [
"MIT"
] | null | null | null | write_new_table.py | Cassiel60/python | 3f451e398a8705a5859d347d5fcdcfd9a5671e1c | [
"MIT"
] | 1 | 2019-12-19T00:34:02.000Z | 2019-12-19T00:34:02.000Z | import sys
import pandas as pd
varFil = sys.argv[1]
df = pd.read_csv(varFil, header=0, sep='\t')
print len(df)
df_new = df[df['Allele Call'].isin(['Heterozygous', 'Homozygous'])]
print len(df_new)
df_res = df_new[df_new['Allele Cov'] >= 30]
print len(df_res)
df_res.to_csv('output.xls', index=False, header=True, s... | 21.95 | 67 | 0.697039 |
51345d720644f68cfe8ae3612d256ced63eb8aee | 3,066 | py | Python | tests/integration/cartography/intel/aws/ec2/test_ec2_volumes.py | ramonpetgrave64/cartography | 031f282f096b9bc3b3dbad52653f25539f8bf76f | [
"Apache-2.0"
] | 1 | 2022-02-02T18:57:43.000Z | 2022-02-02T18:57:43.000Z | tests/integration/cartography/intel/aws/ec2/test_ec2_volumes.py | ramonpetgrave64/cartography | 031f282f096b9bc3b3dbad52653f25539f8bf76f | [
"Apache-2.0"
] | null | null | null | tests/integration/cartography/intel/aws/ec2/test_ec2_volumes.py | ramonpetgrave64/cartography | 031f282f096b9bc3b3dbad52653f25539f8bf76f | [
"Apache-2.0"
] | null | null | null | import cartography.intel.aws.ec2.instances
import cartography.intel.aws.ec2.volumes
import tests.data.aws.ec2.instances
import tests.data.aws.ec2.volumes
TEST_ACCOUNT_ID = '000000000000'
TEST_REGION = 'eu-west-1'
TEST_UPDATE_TAG = 123456789
| 26.894737 | 120 | 0.650033 |
513560c2982f0246b4627dd184d69ec56e1a83d4 | 1,583 | py | Python | challenges/repeated_word/test_repeated_word.py | nastinsk/python-data-structures-and-algorithms | 505b26a70fb846f6e9d0681bbe4f77e3797acf2d | [
"MIT"
] | null | null | null | challenges/repeated_word/test_repeated_word.py | nastinsk/python-data-structures-and-algorithms | 505b26a70fb846f6e9d0681bbe4f77e3797acf2d | [
"MIT"
] | null | null | null | challenges/repeated_word/test_repeated_word.py | nastinsk/python-data-structures-and-algorithms | 505b26a70fb846f6e9d0681bbe4f77e3797acf2d | [
"MIT"
] | 3 | 2020-05-31T03:25:49.000Z | 2020-12-05T21:03:13.000Z | from repeated_word import find_first_repeat
import pytest
| 45.228571 | 628 | 0.721415 |
513759d13dd5462b1537f2db4b0063b913418839 | 285 | py | Python | flask_restly/exception/too_many_requests.py | gorzechowski/flask-restly | 54f28b66f35b0ab12ba4ee37bcd6d39aaf24111a | [
"MIT"
] | 16 | 2018-10-16T20:07:02.000Z | 2021-01-07T13:01:05.000Z | flask_restly/exception/too_many_requests.py | gorzechowski/flask-restly | 54f28b66f35b0ab12ba4ee37bcd6d39aaf24111a | [
"MIT"
] | 16 | 2018-10-16T14:09:55.000Z | 2020-01-16T07:52:22.000Z | flask_restly/exception/too_many_requests.py | gorzechowski/flask-restly | 54f28b66f35b0ab12ba4ee37bcd6d39aaf24111a | [
"MIT"
] | 1 | 2019-04-17T03:20:41.000Z | 2019-04-17T03:20:41.000Z | from werkzeug.exceptions import TooManyRequests as WerkzeugTooManyRequests
| 28.5 | 74 | 0.754386 |
513799080335e27a87d9d53d12c63255df8de4ad | 1,369 | py | Python | study/day01_spider/03_urllib2_useragentlist.py | Youngfellows/HPython2-Spider | 24e51e81f926b5c5dbc1c9f1cc87050e733d376c | [
"Apache-2.0"
] | null | null | null | study/day01_spider/03_urllib2_useragentlist.py | Youngfellows/HPython2-Spider | 24e51e81f926b5c5dbc1c9f1cc87050e733d376c | [
"Apache-2.0"
] | null | null | null | study/day01_spider/03_urllib2_useragentlist.py | Youngfellows/HPython2-Spider | 24e51e81f926b5c5dbc1c9f1cc87050e733d376c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
import urllib2
import random
url = "http://www.baidu.com/"
# User-Agent
ua_list = [
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv2.0.1) Gecko/20100101 Firefox/4.0.1",
"Mozilla/5.0 (Windows NT 6.1; rv2.0.1) Gecko/20100101 Firefox/4.0.1",
"Opera/9.80 (Macintosh; Intel Mac OS X 10... | 28.520833 | 125 | 0.699781 |
513879b46eed9121763c814ec735a00ff6dc4b80 | 60,220 | py | Python | skills.py | chombatant/python-kik-chatbot | 9f5d966378df683efed6f3d74eafded150b2579b | [
"MIT"
] | 1 | 2021-11-19T02:20:50.000Z | 2021-11-19T02:20:50.000Z | skills.py | chombatant/python-kik-chatbot | 9f5d966378df683efed6f3d74eafded150b2579b | [
"MIT"
] | null | null | null | skills.py | chombatant/python-kik-chatbot | 9f5d966378df683efed6f3d74eafded150b2579b | [
"MIT"
] | 1 | 2018-04-13T14:11:14.000Z | 2018-04-13T14:11:14.000Z | import re
import regex as re2
from regex import sub as sub2
from collections import defaultdict
from datetime import datetime
from ngrams.ngrams import corrections, Pw
import nltk
# ===========================================================================================
# # ... | 30.352823 | 143 | 0.410628 |
5138cede2eeb0a02e75d32181a0ad8730776bb5a | 4,390 | py | Python | anki_alert_script.py | FerriteGiant/automated_anki_notifications | 851557a64ae5d565d4337c43afc665499bc60b0a | [
"MIT"
] | null | null | null | anki_alert_script.py | FerriteGiant/automated_anki_notifications | 851557a64ae5d565d4337c43afc665499bc60b0a | [
"MIT"
] | null | null | null | anki_alert_script.py | FerriteGiant/automated_anki_notifications | 851557a64ae5d565d4337c43afc665499bc60b0a | [
"MIT"
] | null | null | null | from datetime import datetime as dt
import os
import sys
from bs4 import BeautifulSoup as bs
from requests import Session,post
import yaml
DIR_PATH = os.path.dirname(os.path.realpath(__file__))
LOG_FILE = "{}/history.log".format(DIR_PATH)
PARAMS_FILE = "{}/config_params.yaml".format(DIR_PATH)
def create_timestamp(... | 29.662162 | 118 | 0.679271 |
5138ec159276014af27e1b670679a30bbeede1cb | 6,483 | py | Python | segment_classifier/charCNN_classifier/charCNN_main.py | liuhongbing1220/fundanNLP_task | 20c7b3b5d21d4b030dc936b2f0bc54fc17f9a619 | [
"MIT"
] | null | null | null | segment_classifier/charCNN_classifier/charCNN_main.py | liuhongbing1220/fundanNLP_task | 20c7b3b5d21d4b030dc936b2f0bc54fc17f9a619 | [
"MIT"
] | null | null | null | segment_classifier/charCNN_classifier/charCNN_main.py | liuhongbing1220/fundanNLP_task | 20c7b3b5d21d4b030dc936b2f0bc54fc17f9a619 | [
"MIT"
] | 1 | 2019-12-14T01:31:56.000Z | 2019-12-14T01:31:56.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 29 15:44:44 2019
@author: liuhongbing
"""
# coding=utf-8
import tensorflow as tf
import time
import os
from charCNN_model import CharCNN
import datetime
from read_data import Config,Dataset
# Load data
print("...")
# dataset_read,,
# embedding_wv... | 34.854839 | 111 | 0.625019 |
513949adf11c0fd87d8a5108cae256144cf2e0d8 | 2,404 | py | Python | determine_steady_state.py | JoerivanEngelen/Nile_Delta_post | d2bebe759d16b1fab9235aa8d03f31c713e232ad | [
"MIT"
] | null | null | null | determine_steady_state.py | JoerivanEngelen/Nile_Delta_post | d2bebe759d16b1fab9235aa8d03f31c713e232ad | [
"MIT"
] | null | null | null | determine_steady_state.py | JoerivanEngelen/Nile_Delta_post | d2bebe759d16b1fab9235aa8d03f31c713e232ad | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Jun 27 11:26:25 2019
@author: engelen
"""
import xarray as xr
import pandas as pd
from glob import glob
import os
import numpy as np
from collections import defaultdict
#%%Path management
fw_path = r"./plots/FW_volumes/*-S_fw.nc"
fw_paths = glob(fw_path)
or_path = r"./plot... | 27.632184 | 98 | 0.68178 |
513d10cc8c7e94f6157cf7b1bc732ab90ec7a284 | 11,967 | py | Python | utils/scripts/debug/data_utils.py | eflows4hpc/compss | c497f6d34722103c6c8f83ebc314b495573ce054 | [
"Apache-2.0"
] | 31 | 2018-03-06T09:30:03.000Z | 2022-03-23T09:51:05.000Z | utils/scripts/debug/data_utils.py | eflows4hpc/compss | c497f6d34722103c6c8f83ebc314b495573ce054 | [
"Apache-2.0"
] | 3 | 2020-08-28T17:16:50.000Z | 2021-11-11T21:58:02.000Z | utils/scripts/debug/data_utils.py | eflows4hpc/compss | c497f6d34722103c6c8f83ebc314b495573ce054 | [
"Apache-2.0"
] | 15 | 2018-06-07T10:03:27.000Z | 2022-02-23T14:59:42.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# For better print formatting
from __future__ import print_function
# Imports
from abc import abstractmethod
from enum import Enum
| 30.296203 | 112 | 0.637587 |
513e4314d9b2d1e51623388038f421309b12843c | 8,272 | py | Python | test/vm.py | yslib/ruston | e818f9067c37682b68be8c59f9369cfb79291be1 | [
"MIT"
] | null | null | null | test/vm.py | yslib/ruston | e818f9067c37682b68be8c59f9369cfb79291be1 | [
"MIT"
] | null | null | null | test/vm.py | yslib/ruston | e818f9067c37682b68be8c59f9369cfb79291be1 | [
"MIT"
] | null | null | null | from opcode import hasconst
from types import CodeType
import types
from typing import Collection, List, Any, Dict
import collections
import dis
import operator
Block = collections.namedtuple('Block', 'type, handler, level')
def make_cell(value):
return (lambda x: lambda: x)(value).__closure__[0]
... | 23.838617 | 90 | 0.655222 |
513f8b2b3ad77a1e2e4aaf2e3dec47663884c43a | 27,595 | py | Python | src/features/preprocessing/huawei.py | lenaWitterauf/Domain-Guided-Monitoring | b2b96faa66951e8dd6831e90da6f86b27ba2e9c3 | [
"MIT"
] | 1 | 2021-10-20T14:59:41.000Z | 2021-10-20T14:59:41.000Z | src/features/preprocessing/huawei.py | lenaWitterauf/Domain-Guided-Monitoring | b2b96faa66951e8dd6831e90da6f86b27ba2e9c3 | [
"MIT"
] | null | null | null | src/features/preprocessing/huawei.py | lenaWitterauf/Domain-Guided-Monitoring | b2b96faa66951e8dd6831e90da6f86b27ba2e9c3 | [
"MIT"
] | null | null | null | from src.features.preprocessing.huawei_traces import HuaweiTracePreprocessor
import dataclass_cli
import dataclasses
import logging
import pandas as pd
from pathlib import Path
from tqdm import tqdm
from typing import List, Dict, Set
import http
import re
from .base import Preprocessor
from collections import Counter
f... | 38.379694 | 90 | 0.555753 |
5142fe4ce72945b27f6b98b88093c27e12051fda | 9,843 | py | Python | tools/download_secuityhub_event_files.py | xen0l/python-asff | 6b043dd4200084b9999aea2995ea1222309ac42c | [
"BSD-3-Clause"
] | 2 | 2020-12-15T20:49:46.000Z | 2021-10-05T15:59:04.000Z | tools/download_secuityhub_event_files.py | xen0l/python-asff | 6b043dd4200084b9999aea2995ea1222309ac42c | [
"BSD-3-Clause"
] | 68 | 2020-12-13T20:29:58.000Z | 2021-12-20T05:11:08.000Z | tools/download_secuityhub_event_files.py | xen0l/python-asff | 6b043dd4200084b9999aea2995ea1222309ac42c | [
"BSD-3-Clause"
] | 1 | 2022-01-04T23:34:26.000Z | 2022-01-04T23:34:26.000Z | #!/usr/bin/env python
#
# This script is meant to be run when new security hub events are added or we need
# to regenerate sample securityhub event files
#
import json
import os
import boto3
# To get all supported TTPs, it's easiest to fetch it from the AWS console:
# https://eu-west-1.console.aws.amazon.com/securit... | 54.683333 | 181 | 0.722239 |
51435d897e226fc136654a5ded40c1b260922fd7 | 151 | py | Python | uploads/core/admin.py | AsciencioAlex/simple-file-upload | bfd00a4d04147772027fd55454ac813813a11f19 | [
"MIT"
] | null | null | null | uploads/core/admin.py | AsciencioAlex/simple-file-upload | bfd00a4d04147772027fd55454ac813813a11f19 | [
"MIT"
] | null | null | null | uploads/core/admin.py | AsciencioAlex/simple-file-upload | bfd00a4d04147772027fd55454ac813813a11f19 | [
"MIT"
] | null | null | null | from django.contrib import admin
from uploads.core.forms import DocumentForm
from uploads.core.models import Document
admin.site.register(Document)
| 18.875 | 43 | 0.834437 |
5143a930ff33b9a0eb7adad59c1687c5c52a46b5 | 833 | py | Python | conduit_ui_tests/sign_in/signin_steps.py | dduleba/tw2019-ui-tests | 5f149c6c2bdb9f2d69a02c038248374f6b0b5903 | [
"MIT"
] | 1 | 2019-09-27T23:12:07.000Z | 2019-09-27T23:12:07.000Z | conduit_ui_tests/sign_in/signin_steps.py | dduleba/conduit-tests | 5f149c6c2bdb9f2d69a02c038248374f6b0b5903 | [
"MIT"
] | null | null | null | conduit_ui_tests/sign_in/signin_steps.py | dduleba/conduit-tests | 5f149c6c2bdb9f2d69a02c038248374f6b0b5903 | [
"MIT"
] | null | null | null | from radish import steps, after
from radish_selenium.radish.selenium_base_steps import attach_screenshot_on_failure, \
attach_page_source_on_failure, attach_console_log_on_failure, close_web_browser
# from realworld_ui.sdk.page_objects.general import LoggedPageObject
from conduit_rest.radish.conduit_rest_steps imp... | 25.242424 | 86 | 0.836735 |
5147530649530bff1e43f6ddfa42de775a8fb701 | 1,256 | py | Python | codes/counting_sort.py | pedh/CLRS-Solutions | 7bc77deb9a7c2ccae55afebc764111496e992daf | [
"BSD-3-Clause"
] | 3 | 2019-05-11T01:05:23.000Z | 2019-12-16T12:46:43.000Z | codes/counting_sort.py | pedh/CLRS-Solutions | 7bc77deb9a7c2ccae55afebc764111496e992daf | [
"BSD-3-Clause"
] | null | null | null | codes/counting_sort.py | pedh/CLRS-Solutions | 7bc77deb9a7c2ccae55afebc764111496e992daf | [
"BSD-3-Clause"
] | null | null | null | """
Counting sort.
"""
import random
def counting_sort(array, key_length, key_func):
"""Counting sort."""
counts = [0] * key_length
result = [0] * len(array)
for i in array:
counts[key_func(i)] += 1
for i in range(1, key_length):
counts[i] += counts[i - 1]
for i in range(len(a... | 23.259259 | 56 | 0.547771 |
51482ecdf63ce79d790ef49cc3ab5fbfd053a0f3 | 9,861 | py | Python | tests/test_aufabschlagregional.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_aufabschlagregional.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_aufabschlagregional.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | from datetime import datetime, timezone
from decimal import Decimal
import pytest # type:ignore[import]
from bo4e.com.aufabschlagproort import AufAbschlagProOrt
from bo4e.com.aufabschlagregional import AufAbschlagRegional, AufAbschlagRegionalSchema
from bo4e.com.aufabschlagstaffelproort import AufAbschlagstaffelProO... | 41.961702 | 108 | 0.434642 |
51488898afd53e31d12d75974c4760345f73c53b | 3,150 | py | Python | model/DPF.py | SQD1/DPCC-Net | 20a9783e545072d7984e2970e16c7cdfa70771d0 | [
"MIT"
] | null | null | null | model/DPF.py | SQD1/DPCC-Net | 20a9783e545072d7984e2970e16c7cdfa70771d0 | [
"MIT"
] | null | null | null | model/DPF.py | SQD1/DPCC-Net | 20a9783e545072d7984e2970e16c7cdfa70771d0 | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from einops import rearrange
| 32.8125 | 124 | 0.562222 |
5148f36cd03e31e87b7d0060e35d755d0443ed5d | 125 | py | Python | constants.py | melodily/wordle-with-friends | 2485c8b3127db3a921410463bab6a61f486aeb1d | [
"MIT"
] | null | null | null | constants.py | melodily/wordle-with-friends | 2485c8b3127db3a921410463bab6a61f486aeb1d | [
"MIT"
] | null | null | null | constants.py | melodily/wordle-with-friends | 2485c8b3127db3a921410463bab6a61f486aeb1d | [
"MIT"
] | null | null | null | SERVER_ERROR = 'Error encountered in the server. Please try again or email wordlewithfriendsbot@gmail.com with a bug report.' | 125 | 125 | 0.816 |
514938d6e5f155ccafb92cff10d67e8a7f542275 | 4,528 | py | Python | torchvision/prototype/datasets/_builtin/cifar.py | yassineAlouini/vision-1 | ee26e9c260a255e2afb5e691e713349529170c8b | [
"BSD-3-Clause"
] | 1 | 2022-02-14T09:16:02.000Z | 2022-02-14T09:16:02.000Z | torchvision/prototype/datasets/_builtin/cifar.py | yassineAlouini/vision-1 | ee26e9c260a255e2afb5e691e713349529170c8b | [
"BSD-3-Clause"
] | null | null | null | torchvision/prototype/datasets/_builtin/cifar.py | yassineAlouini/vision-1 | ee26e9c260a255e2afb5e691e713349529170c8b | [
"BSD-3-Clause"
] | null | null | null | import abc
import io
import pathlib
import pickle
from typing import Any, Dict, List, Optional, Tuple, Iterator, cast, BinaryIO, Union
import numpy as np
from torchdata.datapipes.iter import (
IterDataPipe,
Filter,
Mapper,
)
from torchvision.prototype.datasets.utils import Dataset, HttpResource, OnlineReso... | 31.444444 | 91 | 0.662323 |
514a3655520a7dce0f052bf57a90bc4fbe0b65d6 | 3,238 | py | Python | Interfas Grafica VIII (GUI)/InterfasGraficaVIII.py | BrianMarquez3/Python-Course | 2622b4ddfd687505becfd246e82a2ed0cb9b76f3 | [
"MIT"
] | 20 | 2020-08-19T23:27:01.000Z | 2022-02-03T12:02:17.000Z | Interfas Grafica VIII (GUI)/InterfasGraficaVIII.py | BrianMarquez3/Python-Course | 2622b4ddfd687505becfd246e82a2ed0cb9b76f3 | [
"MIT"
] | 1 | 2021-04-10T18:06:05.000Z | 2021-04-10T18:06:05.000Z | Interfas Grafica VIII (GUI)/InterfasGraficaVIII.py | BrianMarquez3/Python-Course | 2622b4ddfd687505becfd246e82a2ed0cb9b76f3 | [
"MIT"
] | 2 | 2020-12-03T19:35:36.000Z | 2021-11-10T14:58:39.000Z | # Interfas Grafica VIII
# Operacion Matematicas
from tkinter import *
raiz = Tk()
miFrame=Frame(raiz)
miFrame.pack()
operacion =""
resultado=0
#Entry
#------------------------------Pantalla---------------------------------
numeroPantalla=StringVar()
pantalla=Entry(miFrame, textvariable=numeroPantalla)
pantalla.gr... | 28.910714 | 97 | 0.607165 |
514b893e9dabf740f6f5f3329c8d11363b3adc75 | 2,396 | py | Python | btsprice/aba.py | Zapata/btsprice | 0a81fea023678cee176ae5f4084a486789c99601 | [
"MIT"
] | null | null | null | btsprice/aba.py | Zapata/btsprice | 0a81fea023678cee176ae5f4084a486789c99601 | [
"MIT"
] | null | null | null | btsprice/aba.py | Zapata/btsprice | 0a81fea023678cee176ae5f4084a486789c99601 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
import time
import math
ABA = ["HERTZ", "HERO"]
SECONDS_PER_DAY = 60 * 60 * 24
def _get_hertz_feed(reference_timestamp, current_timestamp, period_days, phase_days, reference_asset_value, amplitude):
"""
Given the reference timestamp, the current timestamp, the period (... | 52.086957 | 200 | 0.752087 |
514c76cd5cdbcebe4713f627287bda1e28cfc687 | 286 | py | Python | has_keyword_extractor/hwo.py | 360medics/has-keyword-extractor | 054555f91483d022d49430f53de6efc61971db5a | [
"Apache-2.0"
] | null | null | null | has_keyword_extractor/hwo.py | 360medics/has-keyword-extractor | 054555f91483d022d49430f53de6efc61971db5a | [
"Apache-2.0"
] | null | null | null | has_keyword_extractor/hwo.py | 360medics/has-keyword-extractor | 054555f91483d022d49430f53de6efc61971db5a | [
"Apache-2.0"
] | null | null | null | from typing import Dict
| 31.777778 | 77 | 0.748252 |
514de535fdf325f4e1d44a01fdbaeb3102b2e32e | 122 | py | Python | mmdet/models/classifiers/__init__.py | anorthman/mmdetection | 52e28154364f0e19d11c206bb357d88f29fc4a2d | [
"Apache-2.0"
] | 5 | 2019-06-11T11:08:54.000Z | 2021-03-25T10:06:01.000Z | mmdet/models/classifiers/__init__.py | anorthman/mmdetection | 52e28154364f0e19d11c206bb357d88f29fc4a2d | [
"Apache-2.0"
] | null | null | null | mmdet/models/classifiers/__init__.py | anorthman/mmdetection | 52e28154364f0e19d11c206bb357d88f29fc4a2d | [
"Apache-2.0"
] | 1 | 2019-06-11T11:08:55.000Z | 2019-06-11T11:08:55.000Z | from .classifier import Classifier
from .loss_heads import MultilabelsHead
__all__ = ['Classifier', 'MultilabelsHead']
| 17.428571 | 43 | 0.795082 |
515340d5df9076a903630f0baa3a3d059fd7609e | 3,085 | py | Python | info.py | wanjun-group-seu/AQUARIUM | a65fe93b6ae85ec52f535d0651b6956c6a4b0d3f | [
"MIT"
] | null | null | null | info.py | wanjun-group-seu/AQUARIUM | a65fe93b6ae85ec52f535d0651b6956c6a4b0d3f | [
"MIT"
] | null | null | null | info.py | wanjun-group-seu/AQUARIUM | a65fe93b6ae85ec52f535d0651b6956c6a4b0d3f | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# -*- coding:utf-8 -*-
# author : zerodel
# Readme:
#
import pysrc.body.config
import pysrc.wrapper.bwa
import pysrc.wrapper.ciri
import pysrc.wrapper.ciri2
import pysrc.wrapper.ciri_full
import pysrc.wrapper.knife
import pysrc.wrapper.rsem
import pysrc.wrapper.sailfish
import pysrc.wrapper.salmo... | 35.45977 | 117 | 0.707293 |
5153d6084fdd3569b11a69aa419a452d20099424 | 4,983 | py | Python | performance_measures.py | kkeya1/FCPH | 49ba2f925f81e3fdbe22558961568d809ec5bb83 | [
"Apache-2.0"
] | null | null | null | performance_measures.py | kkeya1/FCPH | 49ba2f925f81e3fdbe22558961568d809ec5bb83 | [
"Apache-2.0"
] | null | null | null | performance_measures.py | kkeya1/FCPH | 49ba2f925f81e3fdbe22558961568d809ec5bb83 | [
"Apache-2.0"
] | null | null | null | #%%
# Main source = Deep hit model, 'https://github.com/chl8856/DeepHit'
#%%
'''
This provide time-dependent Concordance index and Brier Score:
- Use weighted_c_index and weighted_brier_score, which are the unbiased estimates.
See equations and descriptions eq. (11) and (12) of the following paper:
... | 32.357143 | 122 | 0.562111 |
51570a9faeec15d79e98610eade09eabcd72d3f8 | 5,517 | py | Python | callGitServer/models/gitlabHandler.py | isabella232/ALM-SF-DX-Python-Tools | 8a29c1d056653999542e9d7048641d5fb5c36bed | [
"Apache-2.0"
] | 5 | 2020-09-30T14:56:29.000Z | 2022-02-09T09:23:47.000Z | callGitServer/models/gitlabHandler.py | Accenture/ALM-SF-DX-Python-Tools | 14e9d7fea66f77ee71e945cd272c7b1f7f303692 | [
"Apache-2.0"
] | 3 | 2020-11-23T11:11:57.000Z | 2021-04-30T15:28:12.000Z | callGitServer/models/gitlabHandler.py | isabella232/ALM-SF-DX-Python-Tools | 8a29c1d056653999542e9d7048641d5fb5c36bed | [
"Apache-2.0"
] | 4 | 2020-09-30T14:57:52.000Z | 2021-11-10T13:56:53.000Z | ''' Bitbucket Server Interface '''
import urllib
from modules.utils import INFO_TAG, WARNING_TAG, ERROR_LINE, SUCCESS_LINE, print_key_value_list
from modules.git_server_callout import http_request
from modules.comment_operations import get_last_comment, append_new_comments, save_comment_to_file | 44.136 | 121 | 0.685336 |
5159026a43d2614b364cf658b67b1bdd4e74349b | 8,581 | py | Python | vegaops2n9e.py | vegaops/vegaops2n9e | 95371b1fd0c35e94eb93ee85516775714a9e5eb1 | [
"MIT"
] | 1 | 2021-02-20T11:21:05.000Z | 2021-02-20T11:21:05.000Z | vegaops2n9e.py | vegaops/vegaops2n9e | 95371b1fd0c35e94eb93ee85516775714a9e5eb1 | [
"MIT"
] | null | null | null | vegaops2n9e.py | vegaops/vegaops2n9e | 95371b1fd0c35e94eb93ee85516775714a9e5eb1 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
import json
import logging
import os
import re
import requests
import schedule
import sys
import threading
import time
import yaml
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger('VegaOps2N9e')
reload(sys)
sys.setdefaultencoding('utf8')
if __name__ == "__main... | 31.317518 | 77 | 0.534903 |
515a7c44d4bf10b0c82b13a48527ba4e8278af94 | 3,045 | py | Python | orange3/Orange/canvas/canvas/items/utils.py | rgschmitz1/BioDepot-workflow-builder | f74d904eeaf91ec52ec9b703d9fb38e9064e5a66 | [
"MIT"
] | 54 | 2017-01-08T17:21:49.000Z | 2021-11-02T08:46:07.000Z | orange3/Orange/canvas/canvas/items/utils.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 22 | 2017-03-28T06:03:14.000Z | 2021-07-28T05:43:55.000Z | orange3/Orange/canvas/canvas/items/utils.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 21 | 2017-01-26T21:12:09.000Z | 2022-01-31T21:34:59.000Z | import numpy
from AnyQt.QtGui import QColor, QRadialGradient, QPainterPathStroker
def saturated(color, factor=150):
"""Return a saturated color.
"""
h = color.hsvHueF()
s = color.hsvSaturationF()
v = color.valueF()
a = color.alphaF()
s = factor * s / 100.0
s = max(min(1.0, s), 0.0)
... | 29.278846 | 85 | 0.680131 |
515ae96a561a1c35551edb67a4d8a1065b12af4d | 538 | py | Python | morphablegraphs/construction/preprocessing/__init__.py | dfki-asr/morphablegraphs | 02c77aab72aa4b58f4067c720f5d124f0be3ea80 | [
"MIT"
] | 5 | 2020-03-03T21:07:01.000Z | 2021-05-12T16:59:28.000Z | morphablegraphs/construction/preprocessing/__init__.py | dfki-asr/morphablegraphs | 02c77aab72aa4b58f4067c720f5d124f0be3ea80 | [
"MIT"
] | null | null | null | morphablegraphs/construction/preprocessing/__init__.py | dfki-asr/morphablegraphs | 02c77aab72aa4b58f4067c720f5d124f0be3ea80 | [
"MIT"
] | 1 | 2020-07-20T06:57:08.000Z | 2020-07-20T06:57:08.000Z | LEN_ROOT = 3
LEN_QUATERNION = 4
LEN_EULER = 3
from .bitvector import gen_foot_contact_annotation
from .semantic_annotation import gen_walk_annotation, gen_synthetic_semantic_annotation_pick_and_place, \
gen_synthetic_semantic_annotation_for_screw, \
gen_... | 53.8 | 105 | 0.732342 |
515c7b307795d870ca65375e3e91e11c6692821e | 9,665 | py | Python | main.py | esp32wrangler/ESP32-Garage-Door-Watcher | f718186b6b5438a3bec4d6da7d9c2a6ba197b5dd | [
"BSD-3-Clause"
] | null | null | null | main.py | esp32wrangler/ESP32-Garage-Door-Watcher | f718186b6b5438a3bec4d6da7d9c2a6ba197b5dd | [
"BSD-3-Clause"
] | null | null | null | main.py | esp32wrangler/ESP32-Garage-Door-Watcher | f718186b6b5438a3bec4d6da7d9c2a6ba197b5dd | [
"BSD-3-Clause"
] | null | null | null | import socket
import time
import utime
import machine
import os
import ntptime
from machine import Pin
from machine import Timer
from machine import RTC
from math import cos, sin, acos as arccos, asin as arcsin, tan as tg, degrees, radians
s = socket.socket()
#configuration
CONFIG_IFTTT_KEY='MY_IFTTT_... | 35.929368 | 224 | 0.658665 |
515cd4a8a58ec1116897bfd19eee72f4e6a75756 | 273 | py | Python | IPython/lib/tests/test_imports.py | pyarnold/ipython | c4797f7f069d0a974ddfa1e4251c7550c809dba0 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-12-18T01:07:55.000Z | 2020-12-18T01:07:55.000Z | IPython/lib/tests/test_imports.py | pyarnold/ipython | c4797f7f069d0a974ddfa1e4251c7550c809dba0 | [
"BSD-3-Clause-Clear"
] | null | null | null | IPython/lib/tests/test_imports.py | pyarnold/ipython | c4797f7f069d0a974ddfa1e4251c7550c809dba0 | [
"BSD-3-Clause-Clear"
] | null | null | null | # encoding: utf-8
from IPython.testing import decorators as dec
| 18.2 | 45 | 0.776557 |
515d5a4f2131e3b73733314b0b0066c68448ed59 | 1,843 | py | Python | api/TelegramApi.py | juanmafn/telegram-framework-python | 771cf0f88dcc018a7dbfae315c6768b9c2375bd3 | [
"Apache-2.0"
] | null | null | null | api/TelegramApi.py | juanmafn/telegram-framework-python | 771cf0f88dcc018a7dbfae315c6768b9c2375bd3 | [
"Apache-2.0"
] | null | null | null | api/TelegramApi.py | juanmafn/telegram-framework-python | 771cf0f88dcc018a7dbfae315c6768b9c2375bd3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# coding: utf8
__author__ = "Juan Manuel Fernndez Ncher"
# Librera bot telegram
# doc: https://github.com/python-telegram-bot/python-telegram-bot
from telegram import InlineKeyboardButton, InlineKeyboardMarkup
from telegram.ext import Updater, CommandHandler, MessageHandler, CallbackQueryHandler... | 32.910714 | 103 | 0.622355 |
515e6016ab981fef14aba771dd1e8745df2000d2 | 24,147 | py | Python | libspn/tests/test_partition.py | pronobis/libspn | b98141ea5a609a02706433220758e58f46bd3f5e | [
"MIT"
] | 22 | 2019-03-01T15:58:20.000Z | 2022-02-18T10:32:04.000Z | libspn/tests/test_partition.py | pronobis/libspn | b98141ea5a609a02706433220758e58f46bd3f5e | [
"MIT"
] | 10 | 2019-03-03T18:15:24.000Z | 2021-05-04T09:02:55.000Z | libspn/tests/test_partition.py | pronobis/libspn | b98141ea5a609a02706433220758e58f46bd3f5e | [
"MIT"
] | 8 | 2019-03-22T20:45:20.000Z | 2021-05-03T13:22:09.000Z | #!/usr/bin/env python3
from context import libspn as spn
from test import TestCase
import numpy as np
import random
import tensorflow as tf
def assert_list_elements_equal(list1, list2):
"""Check if lists have the same elements."""
for l1 in list1:
if l1 not in list2:
raise AssertionError(... | 48.487952 | 92 | 0.44755 |
515f039ce8de13a1a9168df8be2a64c24d2921e7 | 183 | py | Python | setup.py | Giwasawa/dcdevaluation | 99de135829fb7247199465bb15d7851fb54aea76 | [
"MIT"
] | null | null | null | setup.py | Giwasawa/dcdevaluation | 99de135829fb7247199465bb15d7851fb54aea76 | [
"MIT"
] | 1 | 2020-12-22T19:20:29.000Z | 2020-12-22T19:20:29.000Z | setup.py | Giwasawa/dcdevaluation | 99de135829fb7247199465bb15d7851fb54aea76 | [
"MIT"
] | 1 | 2021-02-25T19:58:36.000Z | 2021-02-25T19:58:36.000Z | from setuptools import setup
setup(name = 'dcdevaluation',
version = '0.8.0' ,
packages = ['dcdevaluation'] ,
zip_safe = False )
| 26.142857 | 40 | 0.497268 |
515fa3ff76697e6746dee4ee8fc9c5a7ae1f1930 | 1,325 | py | Python | cv2.py | PiAreSquared/RFPresence | 5670e2e2cdf6161b311665e097ae9c58f32fbc89 | [
"BSD-2-Clause"
] | null | null | null | cv2.py | PiAreSquared/RFPresence | 5670e2e2cdf6161b311665e097ae9c58f32fbc89 | [
"BSD-2-Clause"
] | null | null | null | cv2.py | PiAreSquared/RFPresence | 5670e2e2cdf6161b311665e097ae9c58f32fbc89 | [
"BSD-2-Clause"
] | null | null | null | #Created by Vishal Muthuraja
#12 September 2018
#import the necessary packages
import numpy as np
import argparse
import imutils
import cv2
#reads the images
img_rgb = cv2.imread('/home/vishal/Downloads/simpsons.jpg')
img_gray = cv2.cvtColor(img_rgb, cv2.COLOR_BGR2GRAY)
template = cv2.imread('/home/vishal/Downloads/... | 28.191489 | 70 | 0.706415 |
515ff9d70a03bd916a813d03ff79f40b0a4d32a2 | 358 | py | Python | dist/snippets/maps_http_places_textsearch_incomplete_address/maps_http_places_textsearch_incomplete_address.py | Mike-Tran/openapi-specification | 3cbe1afa3539143943538b51a49fa621a3a3ab66 | [
"Apache-2.0"
] | 37 | 2021-05-01T20:55:14.000Z | 2022-03-28T12:35:20.000Z | dist/snippets/maps_http_places_textsearch_incomplete_address/maps_http_places_textsearch_incomplete_address.py | Mike-Tran/openapi-specification | 3cbe1afa3539143943538b51a49fa621a3a3ab66 | [
"Apache-2.0"
] | 244 | 2021-03-16T00:07:42.000Z | 2022-03-29T17:21:42.000Z | dist/snippets/maps_http_places_textsearch_incomplete_address/maps_http_places_textsearch_incomplete_address.py | Mike-Tran/openapi-specification | 3cbe1afa3539143943538b51a49fa621a3a3ab66 | [
"Apache-2.0"
] | 28 | 2021-05-03T02:41:49.000Z | 2022-03-31T12:07:52.000Z | # [START maps_http_places_textsearch_incomplete_address]
import requests
url = "https://maps.googleapis.com/maps/api/place/textsearch/json?query=123%20main%20street&key=YOUR_API_KEY"
payload={}
headers = {}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
# [END maps_http... | 27.538462 | 109 | 0.801676 |
51622d8d280219828a67dff8026ea26e97683b57 | 4,578 | py | Python | tests/test_properties.py | Kapiche/gcloud-python-orm | c2f452f18c9bd549a77b5f3312c1329b1bb6413c | [
"Apache-2.0"
] | 1 | 2017-07-11T14:00:24.000Z | 2017-07-11T14:00:24.000Z | tests/test_properties.py | Kapiche/gcloud-python-orm | c2f452f18c9bd549a77b5f3312c1329b1bb6413c | [
"Apache-2.0"
] | null | null | null | tests/test_properties.py | Kapiche/gcloud-python-orm | c2f452f18c9bd549a77b5f3312c1329b1bb6413c | [
"Apache-2.0"
] | 1 | 2019-02-01T08:56:41.000Z | 2019-02-01T08:56:41.000Z | import six
import unittest2
from gcloud.datastore import helpers, key, set_default_dataset_id
from gcloudorm import model, properties
| 28.08589 | 67 | 0.616208 |
516363767adb5e46529c4c8a6d02a33469f596dd | 2,681 | py | Python | main.py | cmungall/ontology-term-usage | 8fcb42cb95d45db4bb6b1589293bcea019113326 | [
"CC0-1.0"
] | 2 | 2021-11-11T08:32:42.000Z | 2021-12-07T22:06:20.000Z | main.py | cmungall/ontology-term-usage | 8fcb42cb95d45db4bb6b1589293bcea019113326 | [
"CC0-1.0"
] | 1 | 2021-11-11T02:58:37.000Z | 2021-11-11T02:58:37.000Z | main.py | cmungall/ontology-term-usage | 8fcb42cb95d45db4bb6b1589293bcea019113326 | [
"CC0-1.0"
] | null | null | null | # TODO: figure out how to put this in the app/ folder and still use serverless
# This line: `handler: main.handler`
# How do we specify a path here, as per uvicorn?
import os
from enum import Enum
from typing import Optional
from pydantic import BaseModel
from fastapi import FastAPI, Query
# for lambda; see https://... | 31.541176 | 112 | 0.666915 |
516366f3ce6321c828167d27328552506084f971 | 881 | py | Python | migrations/versions/0035.py | NewAcropolis/api | 61ffe14cb64407ffe1f58d0e970703bf07d60ea3 | [
"MIT"
] | 1 | 2018-10-12T15:04:31.000Z | 2018-10-12T15:04:31.000Z | migrations/versions/0035.py | NewAcropolis/api | 61ffe14cb64407ffe1f58d0e970703bf07d60ea3 | [
"MIT"
] | 169 | 2017-11-07T00:45:25.000Z | 2022-03-12T00:08:59.000Z | migrations/versions/0035.py | NewAcropolis/api | 61ffe14cb64407ffe1f58d0e970703bf07d60ea3 | [
"MIT"
] | 1 | 2019-08-15T14:51:31.000Z | 2019-08-15T14:51:31.000Z | """empty message
Revision ID: 0035 add basic email template
Revises: 0034 add send_after to emails
Create Date: 2019-10-30 00:01:13.441215
"""
# revision identifiers, used by Alembic.
revision = '0035 add basic email template'
down_revision = '0034 add send_after to emails'
from alembic import op
import sqlalchemy ... | 25.171429 | 87 | 0.702611 |
516449ad56fd22be182bebd7d0966d8cd7b29a0d | 2,598 | py | Python | 1/7/Project/utils/iloc.py | ZacksAmber/Udacity-Data-Structure-Algorithms | b5e008ab111b6bc9765acd58d7e1771852eb1d30 | [
"MIT"
] | 1 | 2021-09-27T10:18:14.000Z | 2021-09-27T10:18:14.000Z | 1/7/Project/utils/iloc.py | ZacksAmber/Udacity-Data-Structure-Algorithms | b5e008ab111b6bc9765acd58d7e1771852eb1d30 | [
"MIT"
] | null | null | null | 1/7/Project/utils/iloc.py | ZacksAmber/Udacity-Data-Structure-Algorithms | b5e008ab111b6bc9765acd58d7e1771852eb1d30 | [
"MIT"
] | null | null | null | def iloc(records, rows=':', cols=':') -> list:
"""A Pandas .iloc-like function.
Args:
records (list): A 2-D list.
rows (str or int): The indices of rows. Default is ':'.
cols (str or int): The indices of columns. Default is ':'.
Returns:
list: The sliced records.
Examp... | 28.23913 | 70 | 0.428022 |
5166eb8771a6e99003d7a3deae5a69bf5c9516a0 | 1,061 | py | Python | app/services/user.py | StakeBeat/api-server | c23c235a1813c422d0369cb71a448f15340651cc | [
"MIT"
] | null | null | null | app/services/user.py | StakeBeat/api-server | c23c235a1813c422d0369cb71a448f15340651cc | [
"MIT"
] | null | null | null | app/services/user.py | StakeBeat/api-server | c23c235a1813c422d0369cb71a448f15340651cc | [
"MIT"
] | null | null | null | from typing import Dict, List
import bcrypt
from app.session import SessionManager
from app.models.user import User
from app.models.validator import Validator
| 32.151515 | 81 | 0.67295 |
5166fc145085e98c095d8f99f327e0e0b81d9de9 | 10,402 | py | Python | txtorcon/circuit.py | kneufeld/txtorcon | fbe2fc70cae00aa6228a2920ef048b282872dbab | [
"MIT"
] | null | null | null | txtorcon/circuit.py | kneufeld/txtorcon | fbe2fc70cae00aa6228a2920ef048b282872dbab | [
"MIT"
] | null | null | null | txtorcon/circuit.py | kneufeld/txtorcon | fbe2fc70cae00aa6228a2920ef048b282872dbab | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import with_statement
import time
import datetime
from twisted.python.failure import Failure
from twisted.python import log
from twisted.internet import defer
f... | 34.330033 | 81 | 0.608633 |
51693d983dbdb9e8a3c0e6a2b046c58c72c14680 | 2,263 | py | Python | setup.py | cowanml/samplemangler | cd2b772beb74cf5d2106cd67e74e95ebafc74735 | [
"BSD-3-Clause"
] | null | null | null | setup.py | cowanml/samplemangler | cd2b772beb74cf5d2106cd67e74e95ebafc74735 | [
"BSD-3-Clause"
] | null | null | null | setup.py | cowanml/samplemangler | cd2b772beb74cf5d2106cd67e74e95ebafc74735 | [
"BSD-3-Clause"
] | null | null | null | # -*- encoding: utf-8 -*-
import glob
import io
import re
from os.path import basename
from os.path import dirname
from os.path import join
from os.path import splitext
from setuptools import find_packages
from setuptools import setup
setup(
name="sampleMangler",
version="0.1.1",
license="BSD",
descr... | 31.430556 | 113 | 0.604507 |
516adb054f9d8040e8884b18e04338d797104ab6 | 291 | py | Python | Mundo 1/ex030.py | judigunkel/judi-exercicios-python | c61bb75b1ae6141defcf42214194e141a70af15d | [
"MIT"
] | null | null | null | Mundo 1/ex030.py | judigunkel/judi-exercicios-python | c61bb75b1ae6141defcf42214194e141a70af15d | [
"MIT"
] | null | null | null | Mundo 1/ex030.py | judigunkel/judi-exercicios-python | c61bb75b1ae6141defcf42214194e141a70af15d | [
"MIT"
] | 1 | 2021-03-06T02:41:36.000Z | 2021-03-06T02:41:36.000Z | """
30 - Crie um programa que leia um nmero inteiro qualquer e mostre na tela se
ele par ou mpar
"""
num = int(input('\033[35mDigite um nmero qualquer: \033[m'))
if num % 2 == 0:
print(f'O nmero {num} \033[34mPAR\033[m')
else:
print(f'O nmero {num} \033[34mMPAR\033[m.')
| 29.1 | 77 | 0.656357 |
5a8c45b620d79f635c96d387b1c36d837c1ad948 | 978 | py | Python | scripts/pastry.py | arthurwpessoa/machine_learning | a63e4d0f1effc5ab07eedeb5664d845708edfb05 | [
"MIT"
] | 2 | 2021-03-16T16:58:29.000Z | 2021-11-08T13:05:45.000Z | scripts/pastry.py | arthurwpessoa/machine_learning | a63e4d0f1effc5ab07eedeb5664d845708edfb05 | [
"MIT"
] | null | null | null | scripts/pastry.py | arthurwpessoa/machine_learning | a63e4d0f1effc5ab07eedeb5664d845708edfb05 | [
"MIT"
] | null | null | null | # Required libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import datetime, re
#Reading pastry dataset
df = pd.read_csv('../datasets/coffee_shop/pastry.csv')
# Drops null values
df.dropna(inplace = True)
# Replaces column to remove special character
df = df.rena... | 30.5625 | 100 | 0.736196 |
5a8ce4bdcee556442797bf38719e0cd5e80d0426 | 789 | py | Python | pyexcel_io/writers/__init__.py | vinraspa/pyexcel-io | 1b4fde5b79c42c57ebed54ed94272d700c6f9317 | [
"BSD-3-Clause"
] | 52 | 2016-06-15T17:11:23.000Z | 2022-02-07T12:44:07.000Z | pyexcel_io/writers/__init__.py | vinraspa/pyexcel-io | 1b4fde5b79c42c57ebed54ed94272d700c6f9317 | [
"BSD-3-Clause"
] | 100 | 2015-12-28T17:58:50.000Z | 2022-01-29T19:48:39.000Z | pyexcel_io/writers/__init__.py | vinraspa/pyexcel-io | 1b4fde5b79c42c57ebed54ed94272d700c6f9317 | [
"BSD-3-Clause"
] | 20 | 2016-05-09T16:44:36.000Z | 2021-09-27T11:54:00.000Z | """
pyexcel_io.writers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
file writers
:copyright: (c) 2014-2020 by Onni Software Ltd.
:license: New BSD License, see LICENSE for more details
"""
from pyexcel_io.plugins import IOPluginInfoChainV2
IOPluginInfoChainV2(__name__).add_a_writer(
relative_plugin_cla... | 28.178571 | 63 | 0.667934 |
5a8d4ff267f1f6e9f7b7483ab60f7aa4ea7e7bcc | 1,387 | py | Python | genpac/template.py | kaixinguo360/genpac | 2979ff95192c111dd7fdb612dc1c59552f5907c2 | [
"MIT"
] | 2,331 | 2015-01-22T02:59:22.000Z | 2022-03-25T14:31:52.000Z | genpac/template.py | surichard/genpac | 2f466d28f403a9a5624e02edcd538475fe475fc8 | [
"MIT"
] | 38 | 2015-04-25T10:06:23.000Z | 2022-03-07T08:22:41.000Z | genpac/template.py | surichard/genpac | 2f466d28f403a9a5624e02edcd538475fe475fc8 | [
"MIT"
] | 398 | 2015-02-06T03:35:49.000Z | 2022-02-19T18:20:33.000Z | # -*- coding: utf-8 -*-
from __future__ import (unicode_literals, absolute_import,
division, print_function)
from ._compat import string_types
from .util import get_resource_path, read_file
#
# is_buildin == True
PAC = TemplateFile('res/tpl-pac.js', True)
PAC_MIN = TemplateFile('res/tpl-pa... | 23.116667 | 71 | 0.710887 |
5a92929a801360fca7e2ef955eaa75513452cf91 | 12,400 | py | Python | datawinners/questionnaire/tests/test_questionnaire_builder.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/questionnaire/tests/test_questionnaire_builder.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/questionnaire/tests/test_questionnaire_builder.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | import unittest
from mock import Mock, MagicMock
from mangrove.form_model.validators import UniqueIdExistsValidator
from mangrove.utils.test_utils.database_utils import safe_define_type, uniq
from mangrove.bootstrap import initializer
from mangrove.datastore.database import DatabaseManager, get_db_manager, _delete_db... | 48.249027 | 134 | 0.637016 |
5a93a24f1d966360aa485fed2cc52caa6f59d647 | 144 | py | Python | changelog/constants.py | automation-liberation/deployment-helper | 9a048e03a8c9648f37f8936065eaacfa60c6c5ca | [
"Apache-2.0"
] | null | null | null | changelog/constants.py | automation-liberation/deployment-helper | 9a048e03a8c9648f37f8936065eaacfa60c6c5ca | [
"Apache-2.0"
] | null | null | null | changelog/constants.py | automation-liberation/deployment-helper | 9a048e03a8c9648f37f8936065eaacfa60c6c5ca | [
"Apache-2.0"
] | null | null | null | from enum import Enum
| 16 | 31 | 0.645833 |
5a966f94b9c16f0705907add44bb45e9dcfe5e10 | 2,777 | py | Python | copy_release_bin.py | AlexanderYunker1983/YBuild | ad34bb01983d2bac83cecc772efffaeba8717750 | [
"MIT"
] | null | null | null | copy_release_bin.py | AlexanderYunker1983/YBuild | ad34bb01983d2bac83cecc772efffaeba8717750 | [
"MIT"
] | null | null | null | copy_release_bin.py | AlexanderYunker1983/YBuild | ad34bb01983d2bac83cecc772efffaeba8717750 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-*- coding: utf-8 -*-
import threading
import traceback
import sys
import os
import shutil
import zipfile
from subprocess import Popen, PIPE
from re import search
from datetime import datetime
from call_helper import CallHelper
from os.path import basename
#use valid login and password
def hgcm... | 29.542553 | 131 | 0.540151 |
5a99982380d5effeca0f6dd6c5b36321143294e3 | 243 | py | Python | lists/fruits.py | renataeva/python-basics | 0d8a2c6eda3aa31cca61fb2c727956f82642ebc8 | [
"Apache-2.0"
] | 1 | 2021-02-14T10:43:43.000Z | 2021-02-14T10:43:43.000Z | lists/fruits.py | renataeva/python-basics | 0d8a2c6eda3aa31cca61fb2c727956f82642ebc8 | [
"Apache-2.0"
] | null | null | null | lists/fruits.py | renataeva/python-basics | 0d8a2c6eda3aa31cca61fb2c727956f82642ebc8 | [
"Apache-2.0"
] | null | null | null | fruits = ['pineapple', 'lemon', 'pear', 'watermelon', 'tomato', 'apple']
first, second, *middle, firstlast, last = fruits
print(f''' : {first}
: {second}
: {middle}
: {firstlast}
: {last}''')
| 30.375 | 72 | 0.691358 |
5a9ab115f2258955efb5d2d040e1eb60a73c3bf6 | 4,113 | py | Python | turterra/utils/sequence_utility.py | BTheDragonMaster/turterra | 2498397e930fb1e384fb39a2e5ef4b2c42636ce7 | [
"MIT"
] | null | null | null | turterra/utils/sequence_utility.py | BTheDragonMaster/turterra | 2498397e930fb1e384fb39a2e5ef4b2c42636ce7 | [
"MIT"
] | null | null | null | turterra/utils/sequence_utility.py | BTheDragonMaster/turterra | 2498397e930fb1e384fb39a2e5ef4b2c42636ce7 | [
"MIT"
] | null | null | null | from collections import Counter
import typing
from pathlib import Path
import subprocess
import os
def get_sequences_from_fasta(fasta_file: typing.Union[str, Path]) -> dict:
"""
Returns dict of accession to sequence from fasta file
Parameters
----------
fasta_file
Returns
-------
{a... | 26.707792 | 107 | 0.612205 |
5a9ce6c0edd67edbe3166aed6346ccb38bb03a9b | 1,231 | py | Python | full-problems/nextSparseBinaryNum.py | vikas-t/DS-Algo | ea654d1cad5374c824c52da9d3815a9546eb43fa | [
"Apache-2.0"
] | null | null | null | full-problems/nextSparseBinaryNum.py | vikas-t/DS-Algo | ea654d1cad5374c824c52da9d3815a9546eb43fa | [
"Apache-2.0"
] | null | null | null | full-problems/nextSparseBinaryNum.py | vikas-t/DS-Algo | ea654d1cad5374c824c52da9d3815a9546eb43fa | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# https://practice.geeksforgeeks.org/problems/next-sparse-binary-number/0
def sol(num):
"""
By definition of sparse number two 1s cannot be adjacent but zeroes can be
If two 1s are adjacent and we want to make a bigger number we cannot
make the either of the bits 0, so only option le... | 26.76087 | 78 | 0.549147 |
5a9cf2e6db7b7cec2470aeb414ded6f658743f59 | 26 | py | Python | Baekjoon/Python/18108.py | KHJcode/Algorithm-study | fa08d3c752fcb3557fd45fb394157926afc0de4a | [
"MIT"
] | 2 | 2020-05-23T01:55:38.000Z | 2020-07-07T15:59:00.000Z | Baekjoon/Python/18108.py | KHJcode/Algorithm-study | fa08d3c752fcb3557fd45fb394157926afc0de4a | [
"MIT"
] | null | null | null | Baekjoon/Python/18108.py | KHJcode/Algorithm-study | fa08d3c752fcb3557fd45fb394157926afc0de4a | [
"MIT"
] | null | null | null | print(int(input()) - 543)
| 13 | 25 | 0.615385 |
5a9e75b52f1bf9688e00d1510faa4e2a786d6e6f | 244 | py | Python | week_2/invertendo_strings.py | angelitabrg/lih_lab_python2 | 88d19d20704552e1a82c29793073e59dcf4b78c6 | [
"MIT"
] | null | null | null | week_2/invertendo_strings.py | angelitabrg/lih_lab_python2 | 88d19d20704552e1a82c29793073e59dcf4b78c6 | [
"MIT"
] | null | null | null | week_2/invertendo_strings.py | angelitabrg/lih_lab_python2 | 88d19d20704552e1a82c29793073e59dcf4b78c6 | [
"MIT"
] | null | null | null | '''
A funo inverte strings e coloca todas as letras em maisculo:
'''
fazAlgo("amora")
| 15.25 | 63 | 0.586066 |
5a9eed27c33e629bc1e08035dd959f61cb18df2d | 527 | py | Python | py_projects_boilerplates/sphinx_loguru_pytest_boiler/app/modules/hello_world/tools/tools.py | rypaik/PYTHON | 283ffb90321153c66036ab0282b44918d422f645 | [
"MIT"
] | null | null | null | py_projects_boilerplates/sphinx_loguru_pytest_boiler/app/modules/hello_world/tools/tools.py | rypaik/PYTHON | 283ffb90321153c66036ab0282b44918d422f645 | [
"MIT"
] | null | null | null | py_projects_boilerplates/sphinx_loguru_pytest_boiler/app/modules/hello_world/tools/tools.py | rypaik/PYTHON | 283ffb90321153c66036ab0282b44918d422f645 | [
"MIT"
] | null | null | null | #from config import console, log
from config import console
from loguru import logger
import sys
#TODO: factory function to create logger
# setting up Logger
logger.add(sys.stderr, format="{time} {level} {message}", level="INFO")
logger.add("./common/loguru_log/Tools_{time}.log", rotation="500 MB")
# @logger.catch
#... | 31 | 82 | 0.73055 |
5aa38547981cb84e89fb42625053885586dfc2f0 | 5,289 | py | Python | scripts/write_quran_pages.py | AmmarRabie/auto-combine-moshaf | d5b99dea8fda67783d49a1b826f37e05a7c62007 | [
"MIT"
] | null | null | null | scripts/write_quran_pages.py | AmmarRabie/auto-combine-moshaf | d5b99dea8fda67783d49a1b826f37e05a7c62007 | [
"MIT"
] | null | null | null | scripts/write_quran_pages.py | AmmarRabie/auto-combine-moshaf | d5b99dea8fda67783d49a1b826f37e05a7c62007 | [
"MIT"
] | null | null | null | '''
Write quran pages for in each aya. creates folder quran_pages, this folder conatains 604 file equals the number of
quran pages. each file corresponds ayat in this page.
also find all beginning of each sura and ending.
'''
import xml.etree.ElementTree as ET
import os
import json
from whoosh import index, fields
... | 35.736486 | 119 | 0.607109 |
5aa4965d05eff5ebc34040b449d9caf90a0b7c32 | 5,501 | py | Python | fairways/io/generic/net.py | dan-win/fairways_py | 771623c6f9ec40e8016b5cebb7951613d01e31f7 | [
"Apache-2.0"
] | null | null | null | fairways/io/generic/net.py | dan-win/fairways_py | 771623c6f9ec40e8016b5cebb7951613d01e31f7 | [
"Apache-2.0"
] | null | null | null | fairways/io/generic/net.py | dan-win/fairways_py | 771623c6f9ec40e8016b5cebb7951613d01e31f7 | [
"Apache-2.0"
] | null | null | null | from .base import (BaseQuery, ReaderMixin, WriterMixin)
from .serde import (serialize_json, deserialize_json)
import pickle
import urllib.parse
# DEFAULT_EXCHANGE_SETTINGS = dict(
# durable = True,
# auto_delete = False,
# internal = False,
# passive = True,
# content_type = 'text/plain'... | 30.561111 | 204 | 0.600618 |
5aa550d43acad6bab83523c7d1beec9a789cf0eb | 1,380 | py | Python | perfrunner/tests/gsi.py | bochun/perfrunner | e215c73240381cf82fddc40856f560369c9b75a8 | [
"Apache-2.0"
] | 18 | 2015-10-28T23:12:07.000Z | 2022-01-04T14:23:37.000Z | perfrunner/tests/gsi.py | bochun/perfrunner | e215c73240381cf82fddc40856f560369c9b75a8 | [
"Apache-2.0"
] | 11 | 2019-03-19T12:02:31.000Z | 2022-02-11T03:39:44.000Z | perfrunner/tests/gsi.py | bochun/perfrunner | e215c73240381cf82fddc40856f560369c9b75a8 | [
"Apache-2.0"
] | 39 | 2015-06-07T09:17:16.000Z | 2022-03-06T20:32:01.000Z | from perfrunner.helpers.cbmonitor import timeit, with_stats
from perfrunner.tests import PerfTest
from perfrunner.workloads.kvgen import kvgen
class InitialIndexTest(IndexTest):
class FastIndexTest(PerfTest):
class FastInitialIndexTest(FastIndexTest, InitialIndexTest):
pass
| 21.5625 | 81 | 0.665217 |
5aa5725e42d13f5a6a7774b1b35b4621d256b17c | 495 | py | Python | Exam24-25/ChristmasGifts.py | Mirkonito/Softuni-Python-Basic | 762b80ea1e0d087613925cde9a03312c83b78168 | [
"MIT"
] | 1 | 2020-09-22T13:25:34.000Z | 2020-09-22T13:25:34.000Z | Exam24-25/ChristmasGifts.py | Mirkonito/Softuni-Python-Basic | 762b80ea1e0d087613925cde9a03312c83b78168 | [
"MIT"
] | null | null | null | Exam24-25/ChristmasGifts.py | Mirkonito/Softuni-Python-Basic | 762b80ea1e0d087613925cde9a03312c83b78168 | [
"MIT"
] | 1 | 2020-10-17T09:27:46.000Z | 2020-10-17T09:27:46.000Z | command = input()
kids = 0
adults = 0
while command != "Christmas":
peoples_age = int(command)
if peoples_age <= 16:
kids += 1
elif peoples_age > 16:
adults += 1
command = input()
if command == "Christmas":
total_toys_price = kids * 5
total_sweater_price = adults * 15
pri... | 23.571429 | 55 | 0.628283 |
5aa73db2dce5893a806725ba2b1afb9ca746f08c | 1,003 | py | Python | main.py | endeesa/optimization-algorithms | bb2f18101e27bc28167c456ef842aef6a22b3fbc | [
"MIT"
] | null | null | null | main.py | endeesa/optimization-algorithms | bb2f18101e27bc28167c456ef842aef6a22b3fbc | [
"MIT"
] | null | null | null | main.py | endeesa/optimization-algorithms | bb2f18101e27bc28167c456ef842aef6a22b3fbc | [
"MIT"
] | null | null | null | import os
import logging
import conjugatedescent
import coordinatedescent
import gradientdescent
logging.basicConfig(level=logging.DEBUG)
log = logging.getLogger(__name__)
if __name__ == '__main__':
main()
| 27.108108 | 106 | 0.70987 |
5aa83b96362baef92bbabc498a99e7ddfae72bea | 421 | py | Python | wall.py | Kimeg/Raycasting-Visualization-in-3D | 77f6cc06f0d03c454fc5d8e0b98820fe6aa0f407 | [
"MIT"
] | null | null | null | wall.py | Kimeg/Raycasting-Visualization-in-3D | 77f6cc06f0d03c454fc5d8e0b98820fe6aa0f407 | [
"MIT"
] | null | null | null | wall.py | Kimeg/Raycasting-Visualization-in-3D | 77f6cc06f0d03c454fc5d8e0b98820fe6aa0f407 | [
"MIT"
] | null | null | null | from static import *
from point import Point
| 24.764706 | 101 | 0.555819 |
5aa86d20c6cc95191053b38a5b1e5cc77507fe57 | 1,919 | py | Python | dll_test.py | heicj/data-structures | 6a55abf7108d0a3157e372e9122b716158a22d94 | [
"MIT"
] | null | null | null | dll_test.py | heicj/data-structures | 6a55abf7108d0a3157e372e9122b716158a22d94 | [
"MIT"
] | null | null | null | dll_test.py | heicj/data-structures | 6a55abf7108d0a3157e372e9122b716158a22d94 | [
"MIT"
] | null | null | null | import unittest
from dll import Node, DoubleLinkedList
| 22.313953 | 74 | 0.627931 |
5aa8acb1efba4c1a44c6d995a66e27205d16a8e4 | 8,727 | py | Python | spectrassembler.py | antrec/spectrassembler | 0ddec382a93512a989085669d4fb93090e779edc | [
"MIT"
] | 11 | 2016-09-30T11:04:37.000Z | 2021-04-01T14:48:14.000Z | spectrassembler.py | antrec/spectrassembler | 0ddec382a93512a989085669d4fb93090e779edc | [
"MIT"
] | 2 | 2017-01-09T16:07:16.000Z | 2017-11-22T02:23:19.000Z | spectrassembler.py | antrec/spectrassembler | 0ddec382a93512a989085669d4fb93090e779edc | [
"MIT"
] | 3 | 2016-09-30T11:38:05.000Z | 2017-11-28T05:54:19.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Spectrassembler main program
@author: Antoine Recanati
"""
from __future__ import print_function
from time import time
import sys
import argparse
from functools import partial
from multiprocessing import Pool
import numpy as np
from Bio import SeqIO
from scipy.sparse ... | 42.15942 | 120 | 0.684313 |
5aa96091626ad42c5d306a62910ed2be6278004e | 2,513 | py | Python | comprobo_final_project/scripts/models/robot.py | comprobo-final-project/genetic_racer | edf5d3a6f2a99aa8138962dc880341285f73530e | [
"MIT"
] | null | null | null | comprobo_final_project/scripts/models/robot.py | comprobo-final-project/genetic_racer | edf5d3a6f2a99aa8138962dc880341285f73530e | [
"MIT"
] | null | null | null | comprobo_final_project/scripts/models/robot.py | comprobo-final-project/genetic_racer | edf5d3a6f2a99aa8138962dc880341285f73530e | [
"MIT"
] | null | null | null | #!usr/bin/env python
"""
The real world robot class which has been made modular to mirror the simulation
robot class. It connects to april tags in the real world (or Gazebo) and can run
the most fit organism in the same way as done in simulation.
"""
import rospy
import tf
import numpy as np
from geometry_msgs.msg i... | 28.235955 | 90 | 0.67688 |
5aaa28a690c6e1584850efdf1d5b6728335284be | 9,466 | py | Python | stab.py | disulfidebond/STAB | c27110d005abc443436b2f092baf6c7ec7421757 | [
"MIT"
] | null | null | null | stab.py | disulfidebond/STAB | c27110d005abc443436b2f092baf6c7ec7421757 | [
"MIT"
] | null | null | null | stab.py | disulfidebond/STAB | c27110d005abc443436b2f092baf6c7ec7421757 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
import time
import hashlib
import argparse
if __name__ == "__main__":
main()
| 35.992395 | 178 | 0.613776 |
5aab624e84de09b77067a987ac3e4588aace992a | 3,368 | py | Python | data_processing/ddh5_Plotting/ddH5_Fluxsweep_Plotting.py | PITT-HATLAB/data_processing | ad49bb921e0fc90b90f0b696e2cbb662019f5f40 | [
"MIT"
] | null | null | null | data_processing/ddh5_Plotting/ddH5_Fluxsweep_Plotting.py | PITT-HATLAB/data_processing | ad49bb921e0fc90b90f0b696e2cbb662019f5f40 | [
"MIT"
] | null | null | null | data_processing/ddh5_Plotting/ddH5_Fluxsweep_Plotting.py | PITT-HATLAB/data_processing | ad49bb921e0fc90b90f0b696e2cbb662019f5f40 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jan 18 16:59:08 2021
@author: Hatlab_3
"""
from data_processing.ddh5_Plotting.utility_modules.FS_utility_functions import fit_fluxsweep
from data_processing.Helper_Functions import find_all_ddh5
from plottr.apps.autoplot import autoplotDDH5, script, main
import numpy as np
im... | 53.460317 | 316 | 0.727138 |
5aac6aeef929b677663f77d811347364275e7247 | 7,088 | py | Python | super32assembler/assembler/assembler.py | xsjad0/Super32 | 75cf5828b17cdbce144447a69ff3d1be7ad601f2 | [
"BSD-3-Clause"
] | 1 | 2019-12-07T01:56:31.000Z | 2019-12-07T01:56:31.000Z | super32assembler/assembler/assembler.py | xsjad0/Super32 | 75cf5828b17cdbce144447a69ff3d1be7ad601f2 | [
"BSD-3-Clause"
] | 42 | 2019-11-30T12:57:07.000Z | 2020-02-26T16:30:33.000Z | super32assembler/assembler/assembler.py | xsjad0/Super32 | 75cf5828b17cdbce144447a69ff3d1be7ad601f2 | [
"BSD-3-Clause"
] | 4 | 2019-11-27T15:05:33.000Z | 2020-05-13T06:51:21.000Z | """
Assembler Module
"""
import logging
from bitstring import Bits
REG_SIZE = 4 # bytes
| 32.513761 | 91 | 0.542184 |
5aad16869e98dc66ff1b17b701a95290d46df4a6 | 1,930 | py | Python | demo/caya/dataobj.py | sugarflower/caya | 40acc237a1e367c757356e8754d11928b01b3f82 | [
"MIT"
] | null | null | null | demo/caya/dataobj.py | sugarflower/caya | 40acc237a1e367c757356e8754d11928b01b3f82 | [
"MIT"
] | 1 | 2021-11-15T11:38:15.000Z | 2021-11-15T16:16:01.000Z | demo/caya/dataobj.py | sugarflower/caya | 40acc237a1e367c757356e8754d11928b01b3f82 | [
"MIT"
] | null | null | null | import json
import os
import zipfile
if __name__ == "__main__":
d = DataObj("test","wow")
d["hello"] = "hello world"
del d
d = DataObj("test","wow")
print(d["hello"])
| 23.536585 | 65 | 0.546632 |
5aae1c5dc2546b48f5b575eea5de40a4bdea0ce2 | 1,339 | py | Python | manager/urls.py | amshula/DetectiveDragons | 59dc8375fcf6eb9c3fadec3b15e85a0265b2bacb | [
"MIT"
] | 5 | 2018-11-20T14:08:02.000Z | 2021-12-18T11:22:34.000Z | manager/urls.py | amshula/DetectiveDragons | 59dc8375fcf6eb9c3fadec3b15e85a0265b2bacb | [
"MIT"
] | null | null | null | manager/urls.py | amshula/DetectiveDragons | 59dc8375fcf6eb9c3fadec3b15e85a0265b2bacb | [
"MIT"
] | 5 | 2019-01-31T05:40:19.000Z | 2021-07-20T13:40:36.000Z | """app URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... | 43.193548 | 85 | 0.677371 |
5aae793749131e5c12149cc30b15c354c2140860 | 265 | py | Python | kube/tools/repr.py | nearmap/kubefs | e2f6c019f04e436d031874e40c59ba0ee61d8c58 | [
"MIT"
] | 3 | 2021-05-31T06:45:37.000Z | 2021-10-05T22:36:37.000Z | kube/tools/repr.py | nearmap/kubefs | e2f6c019f04e436d031874e40c59ba0ee61d8c58 | [
"MIT"
] | 8 | 2021-09-06T00:43:13.000Z | 2021-10-01T00:22:53.000Z | kube/tools/repr.py | nearmap/kubefs | e2f6c019f04e436d031874e40c59ba0ee61d8c58 | [
"MIT"
] | null | null | null | from typing import Optional
| 26.5 | 67 | 0.709434 |
5aaea3333962b6733643671d3d1fc84d7e4300a3 | 10,209 | py | Python | orchid_app/utils/pushbullet.py | ktheiss22/Orchids | bdd129d0c899db4a8f3cdb5630c690b48d534cae | [
"MIT"
] | 3 | 2018-01-24T19:08:30.000Z | 2018-12-29T08:08:26.000Z | orchid_app/utils/pushbullet.py | ktheiss22/Orchids | bdd129d0c899db4a8f3cdb5630c690b48d534cae | [
"MIT"
] | 20 | 2017-02-22T21:21:47.000Z | 2022-03-11T23:15:02.000Z | orchid_app/utils/pushbullet.py | ktheiss22/Orchids | bdd129d0c899db4a8f3cdb5630c690b48d534cae | [
"MIT"
] | 1 | 2022-02-17T18:10:00.000Z | 2022-02-17T18:10:00.000Z | # -*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed i... | 33.916944 | 103 | 0.553433 |
5ab023d3b4d08b6b253b4636f203eeb741daa602 | 2,940 | py | Python | tests/ut/datavisual/data_transform/test_data_loader.py | fapbatista/mindinsight | db5769eb80cbd13a2a9af7682c11f5667d8bf141 | [
"Apache-2.0"
] | 216 | 2020-03-28T02:11:56.000Z | 2022-03-31T06:20:09.000Z | tests/ut/datavisual/data_transform/test_data_loader.py | fapbatista/mindinsight | db5769eb80cbd13a2a9af7682c11f5667d8bf141 | [
"Apache-2.0"
] | 13 | 2020-03-31T03:00:12.000Z | 2021-01-03T13:01:06.000Z | tests/ut/datavisual/data_transform/test_data_loader.py | fapbatista/mindinsight | db5769eb80cbd13a2a9af7682c11f5667d8bf141 | [
"Apache-2.0"
] | 21 | 2020-03-28T02:41:06.000Z | 2021-11-24T12:20:25.000Z | # Copyright 2019 Huawei Technologies Co., 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 agreed to... | 35.421687 | 83 | 0.684014 |
5ab1e9a94f908b30528aa5f6d00edfbe543e9126 | 2,567 | py | Python | data-structures/linked_list/test_linked_list.py | GeorgeCloud/data-structures-and-algorithms | 0c2a95e91b4a318e345d4621dac21df6fcf9daff | [
"MIT"
] | null | null | null | data-structures/linked_list/test_linked_list.py | GeorgeCloud/data-structures-and-algorithms | 0c2a95e91b4a318e345d4621dac21df6fcf9daff | [
"MIT"
] | 3 | 2018-03-26T18:02:48.000Z | 2018-05-01T06:40:26.000Z | data-structures/linked_list/test_linked_list.py | GeorgeCloud/data-structures-and-algorithms | 0c2a95e91b4a318e345d4621dac21df6fcf9daff | [
"MIT"
] | null | null | null | from linked_list import LinkedList
from node import Node
from mergeList import ll_merge
# import pytest
def test_linked_list_creation():
"""Validating if Linked List was Created."""
ll = LinkedList([2, 3, 4, 5])
assert Node(2).val is ll.head.val
assert isinstance(ll.head.val, int)
def test_insert_i... | 26.193878 | 80 | 0.636541 |
5ab20730a57bcaa71251d96f19e2430ef2c9443f | 4,529 | py | Python | skyportal/models/taxonomy.py | bparazin/skyportal | c160610ca0cc28eef9f36c2d11cc15bd9bcbfe56 | [
"BSD-3-Clause"
] | 52 | 2018-11-02T00:53:21.000Z | 2022-03-08T16:03:52.000Z | skyportal/models/taxonomy.py | bparazin/skyportal | c160610ca0cc28eef9f36c2d11cc15bd9bcbfe56 | [
"BSD-3-Clause"
] | 1,944 | 2017-04-27T18:51:20.000Z | 2022-03-31T20:17:44.000Z | skyportal/models/taxonomy.py | bparazin/skyportal | c160610ca0cc28eef9f36c2d11cc15bd9bcbfe56 | [
"BSD-3-Clause"
] | 63 | 2017-05-13T01:40:47.000Z | 2022-03-12T11:32:11.000Z | __all__ = ['Taxonomy']
import sqlalchemy as sa
from sqlalchemy.orm import relationship
from sqlalchemy.dialects.postgresql import JSONB
from baselayer.app.models import (
Base,
DBSession,
restricted,
AccessibleIfRelatedRowsAreAccessible,
CustomUserAccessControl,
)
from .group import Group, access... | 31.894366 | 86 | 0.680945 |
5ab2f8f53f541f369ac664e04727862fd908a074 | 2,873 | py | Python | src/modules/podcast/tasks/rss.py | DmitryBurnaev/podcast-service | 53349a3f9aed22a8024d0c83380f9a02464962a3 | [
"MIT"
] | 5 | 2021-07-01T16:31:29.000Z | 2022-01-29T14:32:13.000Z | src/modules/podcast/tasks/rss.py | DmitryBurnaev/podcast-service | 53349a3f9aed22a8024d0c83380f9a02464962a3 | [
"MIT"
] | 45 | 2020-10-25T19:41:26.000Z | 2022-03-25T06:31:58.000Z | src/modules/podcast/tasks/rss.py | DmitryBurnaev/podcast-service | 53349a3f9aed22a8024d0c83380f9a02464962a3 | [
"MIT"
] | 1 | 2022-01-27T11:30:07.000Z | 2022-01-27T11:30:07.000Z | import os
from jinja2 import Template
from core import settings
from common.storage import StorageS3
from common.utils import get_logger
from modules.podcast.models import Podcast, Episode
from modules.podcast.tasks.base import RQTask, FinishCode
logger = get_logger(__name__)
__all__ = ["GenerateRSSTask"]
| 37.311688 | 96 | 0.669683 |
5ab302ab4df0af198345e6c5a8acf2ac20fe3b00 | 10,899 | py | Python | crawler/chengdulib.py | zixinzeng-jennifer/public-culture-activity | abe908cb10407e7e4753ef541476e4267d24a1b8 | [
"CC0-1.0"
] | null | null | null | crawler/chengdulib.py | zixinzeng-jennifer/public-culture-activity | abe908cb10407e7e4753ef541476e4267d24a1b8 | [
"CC0-1.0"
] | null | null | null | crawler/chengdulib.py | zixinzeng-jennifer/public-culture-activity | abe908cb10407e7e4753ef541476e4267d24a1b8 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
from bs4 import BeautifulSoup
from cultureBigdata.items import CultureNewsItem, CultureBasicItem, CultureEventItem
from selenium import webdriver
import re
import time
| 44.125506 | 160 | 0.439857 |
5ab42c0cfa09ae93182186024e84fdbb9f3f5541 | 5,145 | py | Python | acoustic_fixture/testing/acoustic_fixture_calibration.py | XDleader555/acoustic_laser | f1c209fa3d945c126f085801a4d04695c193c2e6 | [
"Apache-2.0"
] | 1 | 2021-12-19T01:47:29.000Z | 2021-12-19T01:47:29.000Z | acoustic_fixture/testing/acoustic_fixture_calibration.py | XDleader555/acoustic_laser | f1c209fa3d945c126f085801a4d04695c193c2e6 | [
"Apache-2.0"
] | null | null | null | acoustic_fixture/testing/acoustic_fixture_calibration.py | XDleader555/acoustic_laser | f1c209fa3d945c126f085801a4d04695c193c2e6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" calibration_rig.py: trilateration microphone calibration
Since trilateration doesn't account for the acoustic properties of the sound
source, the results will be skewed. To account for this, it's possible
to use machine learning to build a lookup table-like... | 34.763514 | 177 | 0.635569 |
5ab46212a1be30838a20f7ab299c2694e14f7afb | 3,014 | py | Python | startup/users/30-user-Kim.py | mrakitin/profile_collection-smi | 1eea45a3b886b2c0daeec715ce94f27da24d0ba3 | [
"BSD-3-Clause"
] | null | null | null | startup/users/30-user-Kim.py | mrakitin/profile_collection-smi | 1eea45a3b886b2c0daeec715ce94f27da24d0ba3 | [
"BSD-3-Clause"
] | 13 | 2018-09-25T19:35:08.000Z | 2021-01-15T20:42:26.000Z | startup/users/30-user-Kim.py | mrakitin/profile_collection-smi | 1eea45a3b886b2c0daeec715ce94f27da24d0ba3 | [
"BSD-3-Clause"
] | 3 | 2019-09-06T01:40:59.000Z | 2020-07-01T20:27:39.000Z | #Align GiSAXS sample
import numpy as np
####
#
# Modify file (sample name, x pos), Save file
#
# Check sample stage (SmarAct Y) is around 5600, 6000
#
# %run -i /home/xf12id/.ipython/profile_collection/startup/users/30-user-Kim.py
# if do ctrl+C: RE.abort()
#
# Data/result: /GPFS/xf12id1/data/images/users/2019_2/3... | 34.643678 | 167 | 0.544791 |
5ab4fc794c36d5f0a1b8b67b0fd3261bb0d2784b | 285 | py | Python | __init__.py | HAL-42/AlchemyCat | ca924755ff48e2ff74543bb0e446376eb2b1f150 | [
"Apache-2.0"
] | 8 | 2020-01-08T19:42:01.000Z | 2021-12-28T08:30:56.000Z | __init__.py | HAL-42/AlchemyCat | ca924755ff48e2ff74543bb0e446376eb2b1f150 | [
"Apache-2.0"
] | 2 | 2020-09-10T12:22:57.000Z | 2022-02-17T05:21:22.000Z | __init__.py | HAL-42/AlchemyCat | ca924755ff48e2ff74543bb0e446376eb2b1f150 | [
"Apache-2.0"
] | 1 | 2021-05-12T01:50:27.000Z | 2021-05-12T01:50:27.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: Xiaobo Yang
@contact: hal_42@zju.edu.cn
@software: PyCharm
@file: __init__.py
@time: 2020/1/8 0:15
@desc:
"""
from alchemy_cat.acplot.utils import CHW2HWC, HWC2CHW, RGB2BGR, BGR2RGB
from alchemy_cat.py_tools import quick_init | 21.923077 | 71 | 0.726316 |
5ab574781671ffe46d32f9a44876e2d5bdff2e85 | 1,730 | py | Python | dev/add_images_to_db.py | johncoleman83/stamp | bc7b1ad56accdcbb8230ebbd7e5dd57ee137fc0e | [
"MIT"
] | null | null | null | dev/add_images_to_db.py | johncoleman83/stamp | bc7b1ad56accdcbb8230ebbd7e5dd57ee137fc0e | [
"MIT"
] | null | null | null | dev/add_images_to_db.py | johncoleman83/stamp | bc7b1ad56accdcbb8230ebbd7e5dd57ee137fc0e | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
generates DB from Getty API
"""
import json
import models
User = models.User
Image = models.Image
storage = models.storage
def load_from_json_file(filename):
"""creates json object from file"""
with open(filename, mode='r', encoding='utf-8') as f_io:
my_dict = json.loads(f_io.re... | 26.212121 | 60 | 0.531214 |
5ab5da5b1f8def87091eaf68f26bffa8829437f1 | 9,638 | py | Python | virtualscreening/vina/spark/vina_utils.py | rodrigofaccioli/drugdesign | de15880af361a010729b1f4fbc8a75a2b36688a6 | [
"Apache-2.0"
] | 3 | 2015-01-19T20:12:59.000Z | 2019-02-21T18:43:04.000Z | virtualscreening/vina/spark/vina_utils.py | rodrigofaccioli/drugdesign | de15880af361a010729b1f4fbc8a75a2b36688a6 | [
"Apache-2.0"
] | 22 | 2015-01-05T16:48:54.000Z | 2017-01-21T16:36:10.000Z | virtualscreening/vina/spark/vina_utils.py | rodrigofaccioli/drugdesign | de15880af361a010729b1f4fbc8a75a2b36688a6 | [
"Apache-2.0"
] | 11 | 2015-03-03T13:32:24.000Z | 2020-04-03T11:22:24.000Z | import os
import ntpath
import json
from math import sqrt
#from json_utils import create_json_file
""" This function obtains all pdb files
in mypath
"""
""" This function obtains all pdb files
in mypath filtered by reference
"""
""" This function obtains all pdbqt files
in mypa... | 29.206061 | 102 | 0.638618 |
5ab640dc94ad392106bb0e025a68cc833f01ccf9 | 17,618 | py | Python | toadie/toadie.py | dgonzo/toadie | c733a23e52f5ddabe926cceeeaa1f01ebd09d91b | [
"Apache-2.0"
] | 1 | 2017-03-24T03:04:34.000Z | 2017-03-24T03:04:34.000Z | toadie/toadie.py | dgonzo/toadie | c733a23e52f5ddabe926cceeeaa1f01ebd09d91b | [
"Apache-2.0"
] | null | null | null | toadie/toadie.py | dgonzo/toadie | c733a23e52f5ddabe926cceeeaa1f01ebd09d91b | [
"Apache-2.0"
] | null | null | null | __author__ = "David 'Gonzo' Gonzalez"
__email__ = "davidbgonzalez@gmail.com"
__copyright__ = "Copyright (C) 2016 David Gonzalez"
__license__ = "Apache License 2.0"
__version__ = "0.1.1a1"
import click
from .libs.dependencies import Tools
from .libs.components import StackComponent
import logging
import os
import errn... | 36.47619 | 441 | 0.631002 |
5ab70bed713059dc5d9646a545b06cdd4390cbaa | 6,437 | py | Python | nfproc.py | tvaleev/NATSimTools | 06f31b6093a88538bba1380fc55dea7595bc1b7c | [
"Apache-2.0"
] | null | null | null | nfproc.py | tvaleev/NATSimTools | 06f31b6093a88538bba1380fc55dea7595bc1b7c | [
"Apache-2.0"
] | null | null | null | nfproc.py | tvaleev/NATSimTools | 06f31b6093a88538bba1380fc55dea7595bc1b7c | [
"Apache-2.0"
] | null | null | null | import os
import sys
import fileinput
import re
import random
import math
from operator import itemgetter, attrgetter
import subprocess
from optparse import OptionParser
import copy
import time
import argparse
from dateutil import parser as dparser
import calendar
import pylab as P
import numpy as np
from scipy.stats... | 34.239362 | 172 | 0.58723 |