hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
743d4a9a855ae115998b48388d8c8ff2fca08302 | 2,769 | py | Python | tests/unit/pywbemcli/conftest.py | pywbem/pywbemtools | 6b7c3f124324fd3ab7cffb82bc98c8f9555317e4 | [
"Apache-2.0"
] | 8 | 2017-04-01T13:55:00.000Z | 2022-03-15T18:28:47.000Z | tests/unit/pywbemcli/conftest.py | pywbem/pywbemtools | 6b7c3f124324fd3ab7cffb82bc98c8f9555317e4 | [
"Apache-2.0"
] | 918 | 2017-03-03T14:29:03.000Z | 2022-03-29T15:32:16.000Z | tests/unit/pywbemcli/conftest.py | pywbem/pywbemtools | 6b7c3f124324fd3ab7cffb82bc98c8f9555317e4 | [
"Apache-2.0"
] | 2 | 2020-01-17T15:56:46.000Z | 2020-02-12T18:49:30.000Z | """
Pytest common fixtures
"""
from __future__ import absolute_import, print_function
import os
import pytest
from pywbemtools._utils import CONNECTIONS_FILENAME, \
DEFAULT_CONNECTIONS_DIR, DEFAULT_CONNECTIONS_FILE
SCRIPT_DIR = os.path.dirname(__file__)
# Backup file of the default connections file
BAK_SUFFIX =... | 35.961039 | 79 | 0.727338 | 0 | 0 | 0 | 0 | 1,746 | 0.630553 | 0 | 0 | 978 | 0.353196 |
743efaed013ebb381bd98fe53bed0e263d0f7320 | 13,143 | py | Python | old/eval_scripts/evaluation_functions.py | konatasick/face-of-art | e796747d0ef2df2df863adf53e217ff5c86c816b | [
"MIT"
] | 220 | 2019-09-01T01:52:04.000Z | 2022-03-28T12:52:07.000Z | old/eval_scripts/evaluation_functions.py | TrueMatthewKirkham/face-of-art | ffa62a579cc8bc389e2088923736c4947a1fad70 | [
"MIT"
] | 16 | 2019-10-24T07:55:11.000Z | 2022-02-10T01:28:13.000Z | old/eval_scripts/evaluation_functions.py | TrueMatthewKirkham/face-of-art | ffa62a579cc8bc389e2088923736c4947a1fad70 | [
"MIT"
] | 33 | 2019-09-23T15:08:50.000Z | 2022-02-08T07:54:52.000Z | import tensorflow as tf
from menpofit.visualize import plot_cumulative_error_distribution
from menpofit.error import compute_cumulative_error
from scipy.integrate import simps
from menpo_functions import load_menpo_image_list, load_bb_dictionary
from logging_functions import *
from data_loading_functions import *
from ... | 43.81 | 120 | 0.640645 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,770 | 0.134672 |
743f8e8a60a48a089d0eae27267518b7437b7876 | 191 | py | Python | src/python_code/gather_ood_experiments.py | ipmach/Thesis2021 | 91dbb0eebba64f1fa2c18562e2c9f35f532ef7c0 | [
"MIT"
] | null | null | null | src/python_code/gather_ood_experiments.py | ipmach/Thesis2021 | 91dbb0eebba64f1fa2c18562e2c9f35f532ef7c0 | [
"MIT"
] | null | null | null | src/python_code/gather_ood_experiments.py | ipmach/Thesis2021 | 91dbb0eebba64f1fa2c18562e2c9f35f532ef7c0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from DataBase_Manager.beta_manager import gather_data
import sys
experiment_path = sys.argv[1]
csv_path = sys.argv[2]
gather_data(experiment_path, save_file=csv_path) | 23.875 | 53 | 0.816754 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.115183 |
7440b717546ee638774417faa2b4dd5418e3f9b2 | 792 | py | Python | data/spacex.py | Apallapuqu/MaxenceR263 | 0278ea56ee15d08068ad9cd542ec5d81704010d5 | [
"MIT"
] | 3 | 2021-10-14T15:46:24.000Z | 2021-10-15T17:29:32.000Z | data/spacex.py | Apallapuqu/MaxenceR263 | 0278ea56ee15d08068ad9cd542ec5d81704010d5 | [
"MIT"
] | 1 | 2021-11-04T14:47:00.000Z | 2021-11-04T15:27:16.000Z | data/spacex.py | Apallapuqu/MaxenceR263 | 0278ea56ee15d08068ad9cd542ec5d81704010d5 | [
"MIT"
] | 1 | 2021-11-04T01:17:06.000Z | 2021-11-04T01:17:06.000Z | import requests
def info_spacex():
url = "https://api.spacexdata.com/v3/info"
request = requests.get(url)
data = request.json()
print(
"SpaceX Info ->\n"
f"• Founder : {data['founder']}\n"
f"• Founded : {data['founded']}\n"
f"• Employees : {data['employees']}\n"
... | 31.68 | 58 | 0.506313 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 568 | 0.694377 |
7440d94d7871edd47482f8141c9c0e81af6169de | 16,430 | py | Python | codes/tests/qs_test.py | madokast/cctpy | b02c64220ea533a4fc9cad0b882d1be6edadf1c0 | [
"MIT"
] | 1 | 2021-12-27T13:20:43.000Z | 2021-12-27T13:20:43.000Z | codes/tests/qs_test.py | madokast/cctpy | b02c64220ea533a4fc9cad0b882d1be6edadf1c0 | [
"MIT"
] | null | null | null | codes/tests/qs_test.py | madokast/cctpy | b02c64220ea533a4fc9cad0b882d1be6edadf1c0 | [
"MIT"
] | null | null | null | import unittest
import numpy as np
from cctpy.baseutils import Vectors, Equal, Stream
from cctpy.constant import M, MM, YI, XI, Protons, ZI, MRAD
from cctpy.particle import RunningParticle, ParticleFactory, PhaseSpaceParticle, ParticleRunner
from cctpy.qs_hard_edge_magnet import QsHardEdgeMagnet
from cctpy.abstract_c... | 43.12336 | 116 | 0.609251 | 16,033 | 0.973231 | 0 | 0 | 0 | 0 | 0 | 0 | 770 | 0.04674 |
744107433714491e0a8e46ba4af32bda59ff3f79 | 8,238 | py | Python | src/nr/util/process/root.py | NiklasRosenstein/python-nr.util | 087f2410d38006c1005a5fb330c47a56bcdb2279 | [
"MIT"
] | null | null | null | src/nr/util/process/root.py | NiklasRosenstein/python-nr.util | 087f2410d38006c1005a5fb330c47a56bcdb2279 | [
"MIT"
] | 3 | 2022-02-16T13:17:28.000Z | 2022-03-14T15:28:41.000Z | src/nr/util/process/root.py | NiklasRosenstein/python-nr.util | 087f2410d38006c1005a5fb330c47a56bcdb2279 | [
"MIT"
] | null | null | null |
from __future__ import annotations
import os
import sys
if __name__ == '__main__':
# Ensure that the parent directory is not in sys.path.
norm = lambda x: os.path.normpath(os.path.abspath(x))
dirname = os.path.dirname(norm(__file__))
sys.path[:] = [x for x in sys.path if norm(x) != dirname]
del norm, dirna... | 30.511111 | 119 | 0.657563 | 2,993 | 0.363316 | 0 | 0 | 1,329 | 0.161326 | 0 | 0 | 1,759 | 0.213523 |
74414156113f70aed599e59e489aec7e8aaa778e | 43,200 | py | Python | sdh/metrics/org/api.py | SmartDeveloperHub/sdh-org-metrics | 78a50501a04ce7c9d8bd55d4688d66c9f6e36766 | [
"Apache-2.0"
] | null | null | null | sdh/metrics/org/api.py | SmartDeveloperHub/sdh-org-metrics | 78a50501a04ce7c9d8bd55d4688d66c9f6e36766 | [
"Apache-2.0"
] | null | null | null | sdh/metrics/org/api.py | SmartDeveloperHub/sdh-org-metrics | 78a50501a04ce7c9d8bd55d4688d66c9f6e36766 | [
"Apache-2.0"
] | null | null | null | """
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
This file is part of the Smart Developer Hub Project:
http://www.smartdeveloperhub.org
Center for Open Middleware
http://www.centeropenmiddleware.com/
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=... | 42.60355 | 116 | 0.673472 | 0 | 0 | 0 | 0 | 33,233 | 0.769282 | 0 | 0 | 9,953 | 0.230394 |
7441ed8754d181a3bbc97faed79497d959d46b12 | 874 | py | Python | daiquiri/jobs/migrations/0004_phases_to_char.py | agy-why/daiquiri | 4d3e2ce51e202d5a8f1df404a0094a4e018dcb4d | [
"Apache-2.0"
] | 14 | 2018-12-23T18:35:02.000Z | 2021-12-15T04:55:12.000Z | daiquiri/jobs/migrations/0004_phases_to_char.py | agy-why/daiquiri | 4d3e2ce51e202d5a8f1df404a0094a4e018dcb4d | [
"Apache-2.0"
] | 40 | 2018-12-20T12:44:05.000Z | 2022-03-21T11:35:20.000Z | daiquiri/jobs/migrations/0004_phases_to_char.py | agy-why/daiquiri | 4d3e2ce51e202d5a8f1df404a0094a4e018dcb4d | [
"Apache-2.0"
] | 5 | 2019-05-16T08:03:35.000Z | 2021-08-23T20:03:11.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-03-31 11:03
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('daiquiri_jobs', '0003_owner_fk'),
]
operations = [
migrations.AlterField(
... | 33.615385 | 302 | 0.584668 | 719 | 0.822654 | 0 | 0 | 0 | 0 | 0 | 0 | 321 | 0.367277 |
7442858aa79374bc0e7c8a884d99101738677bd6 | 4,339 | py | Python | tools/CH_constants.py | hussamnasir/geni-ch | b6626a14e95768ba33bbc1faca9e4e74b0040920 | [
"MIT"
] | 3 | 2015-05-01T12:48:35.000Z | 2017-02-25T07:13:07.000Z | tools/CH_constants.py | GENI-NSF/geni-ch | 184909ef656976071fd891091caeaf892c99deb1 | [
"MIT"
] | 466 | 2015-05-20T03:49:54.000Z | 2020-03-18T23:09:52.000Z | tools/CH_constants.py | hussamnasir/geni-ch | b6626a14e95768ba33bbc1faca9e4e74b0040920 | [
"MIT"
] | 6 | 2015-05-06T13:44:13.000Z | 2017-07-12T17:57:17.000Z | #----------------------------------------------------------------------
# Copyright (c) 2011-2016 Raytheon BBN Technologies
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without restriction, including ... | 40.551402 | 89 | 0.705001 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,113 | 0.717446 |
74437028daada4e5ca6b65cd6259ece7a9695dc3 | 1,657 | py | Python | Simulation-Chernobyl/simulation_chernobyl/graphics/logger.py | AllSafeCyberSecur1ty/Nuclear-Engineering | 302d6dcc7c0a85a9191098366b076cf9cb5a9f6e | [
"MIT"
] | 1 | 2022-03-26T20:01:13.000Z | 2022-03-26T20:01:13.000Z | Simulation-Chernobyl/simulation_chernobyl/graphics/logger.py | AllSafeCyberSecur1ty/Nuclear-Engineering | 302d6dcc7c0a85a9191098366b076cf9cb5a9f6e | [
"MIT"
] | null | null | null | Simulation-Chernobyl/simulation_chernobyl/graphics/logger.py | AllSafeCyberSecur1ty/Nuclear-Engineering | 302d6dcc7c0a85a9191098366b076cf9cb5a9f6e | [
"MIT"
] | 1 | 2022-03-26T19:59:13.000Z | 2022-03-26T19:59:13.000Z | import pygame
class Logger():
def __init__(self):
self.mem_text = "" # to store previous text
self.text1, self.text2, self.text3 = "", "", "" # text buffer
self.text_color1, self.text_color2, self.text_color3 = (0,0,0), (0,0,0), (0,0,0) # text color buffer
self.max_width = 100... | 55.233333 | 133 | 0.63971 | 1,640 | 0.98974 | 0 | 0 | 0 | 0 | 0 | 0 | 374 | 0.225709 |
7443df89c1d0dd9c460536ddbdae972c55cb92f9 | 9,765 | py | Python | ob/models.py | peterkuma/tjrapid | 8813cb0a3633785754d20263f180428688bcb026 | [
"MIT"
] | null | null | null | ob/models.py | peterkuma/tjrapid | 8813cb0a3633785754d20263f180428688bcb026 | [
"MIT"
] | 1 | 2021-05-16T16:40:00.000Z | 2021-05-16T16:40:00.000Z | ob/models.py | peterkuma/tjrapid | 8813cb0a3633785754d20263f180428688bcb026 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2007-2012 Peter Kuma
import os
from datetime import date, datetime
import urllib.request, urllib.error, urllib.parse
import json
from django.utils import timezone
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.conf import setti... | 24.659091 | 171 | 0.725038 | 3,633 | 0.372043 | 0 | 0 | 0 | 0 | 0 | 0 | 5,303 | 0.543062 |
74455e5242de473902ce5c1ce7ac6048af1210c7 | 18,394 | py | Python | tests/test_hal_nav2.py | rdhyee/restnavigator | 507a854ab9ea5fe42dc10d8698f67e43b8657902 | [
"MIT"
] | 21 | 2015-04-26T08:41:33.000Z | 2020-07-22T04:05:37.000Z | tests/test_hal_nav2.py | rdhyee/restnavigator | 507a854ab9ea5fe42dc10d8698f67e43b8657902 | [
"MIT"
] | 17 | 2015-01-09T18:49:50.000Z | 2015-03-09T07:57:17.000Z | tests/test_hal_nav2.py | rdhyee/restnavigator | 507a854ab9ea5fe42dc10d8698f67e43b8657902 | [
"MIT"
] | 11 | 2015-04-21T04:12:56.000Z | 2022-03-27T00:24:25.000Z | '''Refactored tests from test_hal_nav.py'''
import json
import httpretty
import pytest
import conftest
import uritemplate
import restnavigator as RN
from restnavigator import exc
import restnavigator.halnav as HN
def uri_of(doc):
'''Pull out the url from a hal document'''
return doc['_links']['self']['hr... | 31.604811 | 84 | 0.584321 | 15,251 | 0.829129 | 206 | 0.011199 | 9,198 | 0.500054 | 0 | 0 | 3,556 | 0.193324 |
744596be112cd09ec44dc8a6cfce90d30a73ab12 | 405 | py | Python | initialize/application.py | adripo/vonage-python-code-snippets | 443d83a8cb3c052a634c997f1a3e3eccd61541ab | [
"MIT"
] | 8 | 2017-11-10T17:47:40.000Z | 2019-03-09T19:35:01.000Z | initialize/application.py | adripo/vonage-python-code-snippets | 443d83a8cb3c052a634c997f1a3e3eccd61541ab | [
"MIT"
] | 26 | 2017-04-12T18:13:51.000Z | 2019-03-04T15:29:35.000Z | initialize/application.py | adripo/vonage-python-code-snippets | 443d83a8cb3c052a634c997f1a3e3eccd61541ab | [
"MIT"
] | 18 | 2020-10-01T07:23:22.000Z | 2022-01-17T00:20:44.000Z | import os
import vonage
from dotenv import load_dotenv
dotenv_path = join(dirname(__file__), "../.env")
load_dotenv(dotenv_path)
VONAGE_APPLICATION_ID=os.environ.get("VONAGE_APPLICATION_ID")
VONAGE_APPLICATION_PRIVATE_KEY_PATH=os.environ.get("VONAGE_APPLICATION_PRIVATE_KEY_PATH")
client = vonage.Client(
applicat... | 27 | 89 | 0.832099 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.17037 |
74465e288ae568c87d8ee7da98f3d73b7dabf8da | 22 | py | Python | python.py | oguzcan710/mastering-git-august | b165333bdd96552d834350d95f7fd950e5844538 | [
"Apache-2.0"
] | null | null | null | python.py | oguzcan710/mastering-git-august | b165333bdd96552d834350d95f7fd950e5844538 | [
"Apache-2.0"
] | null | null | null | python.py | oguzcan710/mastering-git-august | b165333bdd96552d834350d95f7fd950e5844538 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/bin/python
| 11 | 21 | 0.681818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.954545 |
74473c34a9a7c4a517aae11602ad9b0523cc56e0 | 931 | py | Python | pony_express/solution.py | ijkilchenko/google_code_jam | 4584d0125f79e0420881356e8a722c5afc0c1ca9 | [
"MIT"
] | null | null | null | pony_express/solution.py | ijkilchenko/google_code_jam | 4584d0125f79e0420881356e8a722c5afc0c1ca9 | [
"MIT"
] | null | null | null | pony_express/solution.py | ijkilchenko/google_code_jam | 4584d0125f79e0420881356e8a722c5afc0c1ca9 | [
"MIT"
] | null | null | null | import sys
def read(f):
with open(f) as file:
lines = file.readlines()
T = int(lines[0])
line = 1
for t in range(1, T+1):
N, Q, H, A, UV, line = _get_case(line, lines)
y = solve(N, Q, H, A, UV)
print('Case #%i: %0.6f' % (t, y))
def _get_case(line, lines):
N, Q = ... | 20.688889 | 55 | 0.481203 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 0.049409 |
7448420490dadf79cbb285def423344210d69da7 | 254 | py | Python | apps/products/filters.py | ykyk1229/TurtleDove | 074ed03396d603a920bc382ee916fc0f3adab6ea | [
"MIT"
] | 1 | 2019-09-02T01:17:34.000Z | 2019-09-02T01:17:34.000Z | apps/products/filters.py | ykyk1229/TurtleDove | 074ed03396d603a920bc382ee916fc0f3adab6ea | [
"MIT"
] | null | null | null | apps/products/filters.py | ykyk1229/TurtleDove | 074ed03396d603a920bc382ee916fc0f3adab6ea | [
"MIT"
] | null | null | null | import django_filters
from .models import Product
class ProductFilter(django_filters.rest_framework.FilterSet):
"""
业务线过滤类
"""
pid = django_filters.NumberFilter("pid")
class Meta:
model = Product
fields = ['pid', ]
| 18.142857 | 61 | 0.653543 | 213 | 0.800752 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.165414 |
74488c7384e202632e7b938723fff09c66866753 | 3,724 | py | Python | corpus_process.py | Protostars/CSeg | 1acd301e804de8135310c5d39ed136b4cfd8865f | [
"MIT"
] | 1 | 2019-12-15T06:03:42.000Z | 2019-12-15T06:03:42.000Z | corpus_process.py | Protostars/CSeg | 1acd301e804de8135310c5d39ed136b4cfd8865f | [
"MIT"
] | null | null | null | corpus_process.py | Protostars/CSeg | 1acd301e804de8135310c5d39ed136b4cfd8865f | [
"MIT"
] | 1 | 2019-12-15T06:03:19.000Z | 2019-12-15T06:03:19.000Z | import re
import os
import pickle
import sys
from math import log
DICT_NAME = "dict.txt"
BI_GRAM_FILE = "bi_gram.txt"
HMM_PROB = "hmm_prob"
SMALL_PROB = 1e-200
# 识别汉字、数字和字母、全角字符,及+,#,&,.,%
re_ch = re.compile("([\u4E00-\u9FD5a-zA-Z0-9\uFF10-\uFF5A+#&\._%%]+)", re.U)
re_stop = re.compile("([。,]+)", re.U)
# 处理分词语料,生成词典... | 32.955752 | 108 | 0.475295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 657 | 0.166582 |
744953a33d13dce6a8e313b4de8e7bbc4605a9b1 | 1,954 | py | Python | main.py | tvirus-01/scraping-seekingalpha | 0dedd14195a9f4f354475a3cbe1728325cb45b33 | [
"MIT"
] | 1 | 2021-05-18T16:27:06.000Z | 2021-05-18T16:27:06.000Z | main.py | tvirus-01/scraping-seekingalpha | 0dedd14195a9f4f354475a3cbe1728325cb45b33 | [
"MIT"
] | null | null | null | main.py | tvirus-01/scraping-seekingalpha | 0dedd14195a9f4f354475a3cbe1728325cb45b33 | [
"MIT"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from bs4 import BeautifulSoup
import requests
import time
import os
import csv
root_url = "https://seekingalpha.com"
query = "stock repurchase program"
url = "https://seekingalpha.com/search?q="+query.replcae(" ", "+")
chrome_driver_p... | 30.53125 | 153 | 0.680655 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 575 | 0.294268 |
744e61002cde51c152c53abdd50110f3f6f68a3b | 6,071 | py | Python | falx/utils/generate_random_traces.py | Mestway/falx | fcae5e536f44c19780ae9f00b94e397723924757 | [
"BSD-2-Clause"
] | 10 | 2021-01-29T19:08:55.000Z | 2022-03-03T05:08:53.000Z | falx/utils/generate_random_traces.py | Mestway/falx | fcae5e536f44c19780ae9f00b94e397723924757 | [
"BSD-2-Clause"
] | null | null | null | falx/utils/generate_random_traces.py | Mestway/falx | fcae5e536f44c19780ae9f00b94e397723924757 | [
"BSD-2-Clause"
] | 2 | 2020-06-28T21:52:12.000Z | 2020-09-04T07:18:08.000Z | import eval_utils
import json
from falx.eval_interface import FalxEvalInterface
from falx.utils import table_utils
from timeit import default_timer as timer
import numpy as np
from pprint import pprint
from falx.visualization.chart import VisDesign, LayeredChart
from falx.visualization.matplotlib_chart import Matpl... | 54.205357 | 469 | 0.541591 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,243 | 0.369461 |
745481823c68affcc1265816e955ae79a8aa4353 | 1,180 | py | Python | Python Advanced/3. Multidimensional Lists/Exercise/08. Bombs.py | a-shiro/SoftUni-Courses | 7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77 | [
"MIT"
] | null | null | null | Python Advanced/3. Multidimensional Lists/Exercise/08. Bombs.py | a-shiro/SoftUni-Courses | 7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77 | [
"MIT"
] | null | null | null | Python Advanced/3. Multidimensional Lists/Exercise/08. Bombs.py | a-shiro/SoftUni-Courses | 7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77 | [
"MIT"
] | null | null | null | from collections import deque
def read_matrix(dimensions):
mtrx = []
for _ in range(dimensions):
col = [int(n) for n in input().split(' ')]
mtrx.append(col)
return mtrx
def get_cells(matrix):
cells_alive = 0
cells_sum = 0
for r in matrix:
for c in r:
... | 22.264151 | 99 | 0.555085 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.040678 |
74549295644b9ab856d42ba18aad581d90fa00df | 2,548 | py | Python | section2/src/inference/UNetInferenceAgent.py | taruntalreja08/Alzheimer-progression | e656ecdabe0d14fe7365669113dae13c92252f5d | [
"MIT"
] | null | null | null | section2/src/inference/UNetInferenceAgent.py | taruntalreja08/Alzheimer-progression | e656ecdabe0d14fe7365669113dae13c92252f5d | [
"MIT"
] | 1 | 2020-06-07T15:04:01.000Z | 2020-06-07T15:04:01.000Z | section2/src/inference/UNetInferenceAgent.py | taruntalreja08/Alzheimer-progression | e656ecdabe0d14fe7365669113dae13c92252f5d | [
"MIT"
] | null | null | null | """
Contains class that runs inferencing
"""
import torch
import numpy as np
from networks.RecursiveUNet import UNet
from utils.utils import med_reshape
class UNetInferenceAgent:
"""
Stores model and parameters and some methods to handle inferencing
"""
def __init__(self, parameter_file_path='', mode... | 31.45679 | 100 | 0.600863 | 2,391 | 0.938383 | 0 | 0 | 0 | 0 | 0 | 0 | 1,040 | 0.408163 |
7454dbd88f5a6b8a189be8a7fbf19150aa71b9b0 | 2,666 | py | Python | tests/trans_sec/controller/http_server_flask_tests.py | cablelabs/transparent-security | 28d40c2f0c64e5c6ffde173ba17be235ce3f6f57 | [
"Apache-2.0"
] | 22 | 2020-01-09T00:19:53.000Z | 2022-01-19T18:43:12.000Z | tests/trans_sec/controller/http_server_flask_tests.py | cablelabs/transparent-security | 28d40c2f0c64e5c6ffde173ba17be235ce3f6f57 | [
"Apache-2.0"
] | 334 | 2020-01-06T19:49:45.000Z | 2021-08-18T16:44:44.000Z | tests/trans_sec/controller/http_server_flask_tests.py | cablelabs/transparent-security | 28d40c2f0c64e5c6ffde173ba17be235ce3f6f57 | [
"Apache-2.0"
] | 4 | 2020-06-04T20:44:47.000Z | 2021-09-09T18:50:41.000Z | # Copyright (c) 2019 Cable Television Laboratories, 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 ... | 29.955056 | 74 | 0.650038 | 1,797 | 0.674044 | 0 | 0 | 406 | 0.152288 | 0 | 0 | 1,185 | 0.444486 |
7455ff3dcda7a5add726f7de0d09df9484ff450a | 764 | py | Python | ccgpack/curvelet.py | vafaei-ar/ccgpack | 73cf1d644f747fd2251ed9256cae740e6b052da7 | [
"BSD-3-Clause"
] | 3 | 2019-04-15T08:40:32.000Z | 2019-04-18T22:06:29.000Z | ccgpack/curvelet.py | vafaei-ar/ccgpack | 73cf1d644f747fd2251ed9256cae740e6b052da7 | [
"BSD-3-Clause"
] | null | null | null | ccgpack/curvelet.py | vafaei-ar/ccgpack | 73cf1d644f747fd2251ed9256cae740e6b052da7 | [
"BSD-3-Clause"
] | 2 | 2019-04-15T08:41:35.000Z | 2021-10-02T08:24:22.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import ctypes
import numpy as np
import os
path = '/'.join(os.path.abspath(__file__).split('/')[:-1])
fftw_path = 'cpp_src/fftw-2.1.5/fftw/.libs/libfftw.so.2'
crv_path = 'cpp_src/curvelet.so'
ctypes.cdll.Load... | 30.56 | 76 | 0.739529 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.13089 |
74567795a187febc4b7818b1e7dc40331bc56c8b | 296 | py | Python | django_openapi/utils.py | tokikanno/openapi-router | 884463d43eb472dce3d5fd835390f676f8a672f5 | [
"MIT"
] | 19 | 2020-08-03T06:51:54.000Z | 2022-03-15T14:45:10.000Z | django_openapi/utils.py | tokikanno/openapi-router | 884463d43eb472dce3d5fd835390f676f8a672f5 | [
"MIT"
] | 3 | 2021-01-13T10:01:07.000Z | 2021-04-29T02:17:41.000Z | django_openapi/utils.py | tokikanno/openapi-router | 884463d43eb472dce3d5fd835390f676f8a672f5 | [
"MIT"
] | 4 | 2020-12-20T14:50:29.000Z | 2021-12-14T21:17:46.000Z | # -*- coding:utf-8 -*-
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from django.http import JsonResponse
def json_response(data, status_code=200):
resp = JsonResponse(data)
resp.status_code = status_code
return resp
| 22.769231 | 41 | 0.777027 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.074324 |
74572a2aa855eb547d5395986ea7bf0a29902db0 | 3,058 | py | Python | David S/Textswapping/texteditor.py | daaronr/dr_text_md_tools | 7d74a95c9f3cfd0f66d46f9bee23878e8e783da8 | [
"BSD-2-Clause"
] | null | null | null | David S/Textswapping/texteditor.py | daaronr/dr_text_md_tools | 7d74a95c9f3cfd0f66d46f9bee23878e8e783da8 | [
"BSD-2-Clause"
] | null | null | null | David S/Textswapping/texteditor.py | daaronr/dr_text_md_tools | 7d74a95c9f3cfd0f66d46f9bee23878e8e783da8 | [
"BSD-2-Clause"
] | null | null | null | #texteditor.py
#Description: uses csv-format file 'dictionary' to make a series of replacements in 'oldfile' and create 'newfile'
#Execute as "python texteditor.py oldfile dictionary"
#Creates 'newfile'
#see also README.md
import os
#tells python to use the module 'os'
import sys
#tells python to use the module 'sys'... | 35.149425 | 179 | 0.733813 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,364 | 0.773054 |
745999d132ff9aeafd110c46482e9bd04fc9b1a8 | 9,832 | py | Python | server/app.py | meowterspace/mission_control | c98ff78c9d1e6ad9c70e60f83b8fb2fa6af32887 | [
"MIT"
] | null | null | null | server/app.py | meowterspace/mission_control | c98ff78c9d1e6ad9c70e60f83b8fb2fa6af32887 | [
"MIT"
] | 4 | 2017-10-31T17:26:11.000Z | 2018-01-12T22:11:03.000Z | server/app.py | meowterspace/mission_control | c98ff78c9d1e6ad9c70e60f83b8fb2fa6af32887 | [
"MIT"
] | null | null | null | # Import all external libraries
import json
import datetime
import time
import os
import io
import errno
from flask import Flask, render_template, send_file, request, session, redirect, render_template_string
from flask_socketio import SocketIO, emit, send
from threading import Thread, Lock
import resources
import sys... | 40.79668 | 126 | 0.68572 | 60 | 0.006103 | 0 | 0 | 2,727 | 0.27736 | 0 | 0 | 6,400 | 0.650936 |
745b09ab868c2f65731e7156a385d464a997846f | 5,676 | py | Python | ndd/counts.py | simomarsili/ndd | 3a8f8f80116ddaf8666dd13b246a04c9806447a7 | [
"BSD-3-Clause"
] | 34 | 2017-01-25T21:42:07.000Z | 2022-03-05T02:12:11.000Z | ndd/counts.py | simomarsili/ndd | 3a8f8f80116ddaf8666dd13b246a04c9806447a7 | [
"BSD-3-Clause"
] | 4 | 2018-06-22T19:15:33.000Z | 2020-05-06T12:37:24.000Z | ndd/counts.py | simomarsili/ndd | 3a8f8f80116ddaf8666dd13b246a04c9806447a7 | [
"BSD-3-Clause"
] | 2 | 2019-07-31T07:53:02.000Z | 2019-07-31T07:53:22.000Z | # -*- coding: utf-8 -*-
"""CountsDistribution class."""
import json
import logging
from collections.abc import Mapping, MappingView
from types import GeneratorType
import numpy
import ndd.fnsb
from ndd.exceptions import NddError
logger = logging.getLogger(__name__)
def unique(nk, sort=True):
"""Return nk, zk""... | 28.522613 | 75 | 0.555673 | 3,519 | 0.619979 | 0 | 0 | 1,202 | 0.211769 | 0 | 0 | 1,678 | 0.295631 |
745b6a06e7b05b2a82df687d97773686b7b6c978 | 1,999 | py | Python | events-svc/app/actions/event_actions.py | zerodevgroup/fastapi-referece-architecture | 185e4b3036799fec2044dd415022ba0760b5bb45 | [
"MIT"
] | null | null | null | events-svc/app/actions/event_actions.py | zerodevgroup/fastapi-referece-architecture | 185e4b3036799fec2044dd415022ba0760b5bb45 | [
"MIT"
] | null | null | null | events-svc/app/actions/event_actions.py | zerodevgroup/fastapi-referece-architecture | 185e4b3036799fec2044dd415022ba0760b5bb45 | [
"MIT"
] | null | null | null | import aiohttp
import asyncio
import base64
import os
from events import EventIn, EventOut, EventUpdate
from fastapi.logger import logger
from db import events, database
STRIPE_CHARGES_URL = os.getenv("STRIPE_CHARGES_URL")
STRIPE_API_KEY = os.getenv("STRIPE_API_KEY")
async def add_event(payload: EventIn):
logger.... | 32.241935 | 98 | 0.69935 | 0 | 0 | 0 | 0 | 0 | 0 | 1,718 | 0.85943 | 389 | 0.194597 |
745ce16b8c6283b71d3e3aefb6237ab8e9a44ba5 | 776 | py | Python | datatools/test/number.py | hayj/DataTools | a779a533afe8e176c33b91d17974468ef7c6b17e | [
"MIT"
] | null | null | null | datatools/test/number.py | hayj/DataTools | a779a533afe8e176c33b91d17974468ef7c6b17e | [
"MIT"
] | null | null | null | datatools/test/number.py | hayj/DataTools | a779a533afe8e176c33b91d17974468ef7c6b17e | [
"MIT"
] | null | null | null | # coding: utf-8
from fr.hayj.util.number import *;
from fr.hayj.util.duration import *;
import unittest
import re
# The level allow the unit test execution to choose only the top level test
unittestLevel = 1
if unittestLevel <= 1:
class UtilTest(unittest.TestCase):
def test1(self):
self.a... | 32.333333 | 78 | 0.640464 | 521 | 0.671392 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.117268 |
745d592616ed0c1497992e114b4112aa3cdca55c | 1,006 | py | Python | backend/server_flask.py | sigmarising/Multimedia-Homework-website | 38fdf0c2c539b2d02d4062c55982f1e9df5f5ef4 | [
"MIT"
] | null | null | null | backend/server_flask.py | sigmarising/Multimedia-Homework-website | 38fdf0c2c539b2d02d4062c55982f1e9df5f5ef4 | [
"MIT"
] | null | null | null | backend/server_flask.py | sigmarising/Multimedia-Homework-website | 38fdf0c2c539b2d02d4062c55982f1e9df5f5ef4 | [
"MIT"
] | null | null | null | import os
from flask import Flask, send_from_directory, request, jsonify
# Path settings
SERVER_PATH = os.path.abspath(os.path.dirname(__file__))
FTP_PATH = os.path.abspath(os.path.join(SERVER_PATH, 'ftp/'))
# Flask app settings
app = Flask(__name__)
app.config['JSON_AS_ASCII'] = False
@app.route('/api/getFilesList... | 27.189189 | 72 | 0.709742 | 0 | 0 | 0 | 0 | 588 | 0.584493 | 0 | 0 | 182 | 0.180915 |
745efcdb285c929a84a0e99a3d292fa8280b80d9 | 20 | py | Python | django_project/users/migrations/__init__.py | Manish-Sharma-1810/My-Django-Blog-App | 9dc791bd11c9ff0e3eea21125dd127e8c2435e00 | [
"MIT"
] | null | null | null | django_project/users/migrations/__init__.py | Manish-Sharma-1810/My-Django-Blog-App | 9dc791bd11c9ff0e3eea21125dd127e8c2435e00 | [
"MIT"
] | null | null | null | django_project/users/migrations/__init__.py | Manish-Sharma-1810/My-Django-Blog-App | 9dc791bd11c9ff0e3eea21125dd127e8c2435e00 | [
"MIT"
] | 1 | 2021-12-20T14:15:47.000Z | 2021-12-20T14:15:47.000Z | # This file is empty | 20 | 20 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 1 |
745fc74246c6c357dfc1fd1dc49a06020766a990 | 1,240 | py | Python | Python/468.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | 1 | 2020-12-10T05:36:15.000Z | 2020-12-10T05:36:15.000Z | Python/468.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | null | null | null | Python/468.py | JWang169/LintCodeJava | b75b06fa1551f5e4d8a559ef64e1ac29db79c083 | [
"CNRI-Python"
] | 3 | 2020-04-06T05:55:08.000Z | 2021-08-29T14:26:54.000Z | class Solution:
def validIPAddress(self, IP: str) -> str:
# if not IP:
# return "Neither"
if len(IP.split('.')) == 4:
ips = IP.split('.')
return self.validIPv4(ips)
elif len(IP.split(':')) == 8:
ips = IP.split(':')
return self.valid... | 28.837209 | 67 | 0.429032 | 1,230 | 0.991935 | 0 | 0 | 0 | 0 | 0 | 0 | 192 | 0.154839 |
7461e3bcb8e9c632b051701ae54e04f11972850a | 1,158 | py | Python | buzzmobile/process/bearing/calculate_directions.py | gtagency/buzzmobile | 8f7215d35b3b7fe3c6ca6419f0123ba18e8aca0a | [
"MIT"
] | 25 | 2015-02-18T04:15:09.000Z | 2019-12-11T14:29:02.000Z | buzzmobile/process/bearing/calculate_directions.py | gtagency/buzzmobile | 8f7215d35b3b7fe3c6ca6419f0123ba18e8aca0a | [
"MIT"
] | 173 | 2016-09-16T05:34:27.000Z | 2017-11-15T07:31:53.000Z | buzzmobile/process/bearing/calculate_directions.py | gtagency/buzzmobile | 8f7215d35b3b7fe3c6ca6419f0123ba18e8aca0a | [
"MIT"
] | 4 | 2015-01-18T15:46:35.000Z | 2017-04-08T00:39:05.000Z | """Utilities for calculating directions and distances given coords."""
import math
EARTH_RADIUS = 6.3710088e6
def get_distance(fix1, fix2):
"""Calculates great-circle distance between two positions in meters."""
lat1 = math.radians(fix1.latitude)
lon1 = math.radians(fix1.longitude)
lat2 = math.radia... | 35.090909 | 75 | 0.648532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 207 | 0.178756 |
746248a9a6ff0d428ab94f820ef076b18b48282a | 123 | py | Python | iot_api/user_api/websocket/alerts.py | dolfandringa/rolaguard_backend | d4df7b55fc001aa6e0499edcfa94bf1b1c63b084 | [
"Apache-2.0"
] | null | null | null | iot_api/user_api/websocket/alerts.py | dolfandringa/rolaguard_backend | d4df7b55fc001aa6e0499edcfa94bf1b1c63b084 | [
"Apache-2.0"
] | 7 | 2020-05-05T20:10:59.000Z | 2021-05-26T17:59:24.000Z | iot_api/user_api/websocket/alerts.py | dolfandringa/rolaguard_backend | d4df7b55fc001aa6e0499edcfa94bf1b1c63b084 | [
"Apache-2.0"
] | 1 | 2021-01-28T05:54:11.000Z | 2021-01-28T05:54:11.000Z | from iot_api import socketio
def emit_alert_event(event, recipient):
socketio.emit('new_alert', event, room=recipient) | 30.75 | 53 | 0.788618 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.089431 |
746481340991d95d9f71098fa29212550353d414 | 4,968 | py | Python | chocolate/connection/pandas.py | Intelecy/chocolate | 0ba4f6f0130eab851d32d5534241c8cac3f6666e | [
"BSD-3-Clause"
] | 105 | 2017-10-27T02:14:22.000Z | 2022-01-13T12:57:05.000Z | chocolate/connection/pandas.py | Intelecy/chocolate | 0ba4f6f0130eab851d32d5534241c8cac3f6666e | [
"BSD-3-Clause"
] | 31 | 2017-10-03T13:41:35.000Z | 2021-08-20T21:01:29.000Z | chocolate/connection/pandas.py | areeh/chocolate | 5f946cb9daf42c3ab44508648917d46bc105c2fc | [
"BSD-3-Clause"
] | 38 | 2017-10-05T20:19:42.000Z | 2022-03-28T11:34:04.000Z | from contextlib import contextmanager
import pickle
import numpy
import pandas
from ..base import Connection
class DataFrameConnection(Connection):
"""Connection to a pandas DataFrame.
This connection is meant when it is not possible to use the file system
or other type of traditional database (e.g. a ... | 36.262774 | 103 | 0.63748 | 4,854 | 0.977053 | 151 | 0.030395 | 171 | 0.03442 | 0 | 0 | 2,415 | 0.486111 |
7467690eb0ac6eea07f7e7a2ad3b657c481f13cd | 241 | py | Python | src/__init__.py | Losintech/python-alpha-orm | 01e88c5cf21b881dc670d605b353df8ae52eb83c | [
"MIT"
] | 1 | 2019-12-06T05:18:38.000Z | 2019-12-06T05:18:38.000Z | src/__init__.py | Losintech/python-alpha-orm | 01e88c5cf21b881dc670d605b353df8ae52eb83c | [
"MIT"
] | null | null | null | src/__init__.py | Losintech/python-alpha-orm | 01e88c5cf21b881dc670d605b353df8ae52eb83c | [
"MIT"
] | null | null | null | from alphaorm.AlphaORM import AlphaORM,AlphaRecord
AlphaORM.setup('mysql', {
'host' : 'localhost',
'user' : 'root',
'password' : '',
'database' : 'alphaorm'
})
m = AlphaORM.create('python')
m.name = 'Alpha'
m.age = 10
AlphaORM.store(m) | 18.538462 | 50 | 0.659751 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.344398 |
746ab1f26e2827ead488e3722b6ba0e4f14c48ca | 523 | py | Python | src/proto/player_state_proto.py | edwadli/splendor-ai | 0881924bf59539ba307592a2f546d56732359120 | [
"Apache-2.0"
] | 2 | 2020-02-02T06:01:23.000Z | 2021-09-21T02:49:29.000Z | src/proto/player_state_proto.py | edwadli/splendor-ai | 0881924bf59539ba307592a2f546d56732359120 | [
"Apache-2.0"
] | 3 | 2019-06-04T07:45:33.000Z | 2019-06-07T02:14:27.000Z | src/proto/player_state_proto.py | edwadli/splendor-ai | 0881924bf59539ba307592a2f546d56732359120 | [
"Apache-2.0"
] | 2 | 2019-05-31T06:52:58.000Z | 2019-06-05T19:45:16.000Z | """Data schema for a player's state."""
import collections
PlayerState = collections.namedtuple(
"PlayerState", [
# Dictionary of Gems held by player.
"gems",
# List of purchased DevelopmentCards.
"purchased_cards",
# List of reserved (non-hidden) DevelopmentCards.
"unhidden_reserved_cards... | 22.73913 | 78 | 0.695985 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 388 | 0.741874 |
746ad17c2512eef00d948851110356b09d69b731 | 4,871 | py | Python | sheepdoge/config.py | mattjmcnaughton/sheepdoge | 9c028d6f51cb59afcaf25a5680f961ec7e25676b | [
"Apache-2.0"
] | 7 | 2018-03-18T07:25:10.000Z | 2022-01-28T17:35:08.000Z | sheepdoge/config.py | mattjmcnaughton/sheepdoge | 9c028d6f51cb59afcaf25a5680f961ec7e25676b | [
"Apache-2.0"
] | 15 | 2017-08-19T14:03:10.000Z | 2017-12-29T23:22:05.000Z | sheepdoge/config.py | mattjmcnaughton/sheepdoge | 9c028d6f51cb59afcaf25a5680f961ec7e25676b | [
"Apache-2.0"
] | null | null | null | from configparser import ConfigParser, NoOptionError
from typing import Dict # pylint: disable=unused-import
import os
from sheepdoge.exception import (
SheepdogeConfigurationAlreadyInitializedException,
SheepdogeConfigurationNotInitializedException,
)
DEFAULTS = {
"kennel_playbook_path": "kennel.yml",
... | 34.062937 | 76 | 0.667419 | 4,412 | 0.905769 | 0 | 0 | 3,729 | 0.765551 | 0 | 0 | 2,157 | 0.442825 |
746b61a512fe54bf6d58d51dee7f9f6d9529baf8 | 1,202 | py | Python | _argparse.py | zzyyyl/USTC-Helper | 6f16361bdead655b799da40e3ecd7758745c2568 | [
"MIT"
] | 3 | 2022-03-18T18:24:53.000Z | 2022-03-24T01:50:41.000Z | _argparse.py | zzyyyl/USTC-Helper | 6f16361bdead655b799da40e3ecd7758745c2568 | [
"MIT"
] | null | null | null | _argparse.py | zzyyyl/USTC-Helper | 6f16361bdead655b799da40e3ecd7758745c2568 | [
"MIT"
] | null | null | null | from argparse import ArgumentParser
from USTCHelper import config
import json, base64
import os
class ArgumentError(Exception):
def __init__(self, text):
self.text = text
def __str__(self):
return f"ArgumentError: {self.text}"
def ArgParser():
parser = ArgumentParser()
parser.add_argu... | 36.424242 | 105 | 0.6797 | 155 | 0.128952 | 0 | 0 | 0 | 0 | 0 | 0 | 384 | 0.319468 |
746d2dd92129a5cba7d3203cc33cfadd617835cd | 127 | py | Python | wandering-warriors/modules/__init__.py | python-discord/code-jam-6 | a7eb3b1256ae113c93f0337892c667768e8bc199 | [
"MIT"
] | 76 | 2020-01-17T12:09:48.000Z | 2022-03-26T19:17:26.000Z | wandering-warriors/modules/__init__.py | 1nf1del/code-jam-6 | a7eb3b1256ae113c93f0337892c667768e8bc199 | [
"MIT"
] | 17 | 2020-01-21T23:13:34.000Z | 2020-02-07T00:07:04.000Z | wandering-warriors/modules/__init__.py | 1nf1del/code-jam-6 | a7eb3b1256ae113c93f0337892c667768e8bc199 | [
"MIT"
] | 91 | 2020-01-17T12:01:06.000Z | 2022-03-22T20:38:59.000Z | from .abacus import Abacus
from .draw_pad import DrawPad
from .ledger import Ledger
__all__ = ('Abacus', 'DrawPad', 'Ledger')
| 21.166667 | 41 | 0.748031 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.19685 |
746f96c13dd49fef6cef2fd1b4ab1513df02e05d | 3,920 | py | Python | old/summarize-scripts/python/rank_summarizer.py | kedz/cuttsum | 992c21192af03fd2ef863f5ab7d10752f75580fa | [
"Apache-2.0"
] | 6 | 2015-09-10T02:22:21.000Z | 2021-10-01T16:36:46.000Z | old/summarize-scripts/python/rank_summarizer.py | kedz/cuttsum | 992c21192af03fd2ef863f5ab7d10752f75580fa | [
"Apache-2.0"
] | null | null | null | old/summarize-scripts/python/rank_summarizer.py | kedz/cuttsum | 992c21192af03fd2ef863f5ab7d10752f75580fa | [
"Apache-2.0"
] | 2 | 2018-04-04T10:44:32.000Z | 2021-10-01T16:37:26.000Z | import os
import sys
import argparse
from cuttsum.readers import gold_reader
from cuttsum.summarizers import RankSummarizer
def main():
args = parse_args()
bow_file, lvec_file, sim_file = args[0:3]
dbg_sim_mode, odir, n_return, use_temp, penalty_mode = args[3:]
if sim_file is None:
if dbg_sim_... | 32.666667 | 96 | 0.570663 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 795 | 0.202806 |
746fe9ce70247f8f0f948de126caec9e75bc4ccb | 1,378 | py | Python | app/api/client.py | cloudblue/processor-acronis-customer-centric | fbb022de150818e29cf6cb6205650893acb3613e | [
"Apache-2.0"
] | 3 | 2019-12-21T13:45:28.000Z | 2019-12-24T20:04:34.000Z | app/api/client.py | cloudblue/processor-acronis-customer-centric | fbb022de150818e29cf6cb6205650893acb3613e | [
"Apache-2.0"
] | null | null | null | app/api/client.py | cloudblue/processor-acronis-customer-centric | fbb022de150818e29cf6cb6205650893acb3613e | [
"Apache-2.0"
] | null | null | null | """
This file is property of the Ingram Micro Cloud Blue.
Copyright (c) 2019 Ingram Micro. All Rights Reserved.
"""
import json
from requests import api
from connect.logger import logger
from urllib.parse import urlencode, quote_plus
class Client:
@staticmethod
def send_request(verb, uri, config, body=None):... | 33.609756 | 146 | 0.563135 | 1,141 | 0.828012 | 0 | 0 | 1,122 | 0.814224 | 0 | 0 | 369 | 0.267779 |
7470950ef82ea911ccd94deb0cfaffcdcd9405a5 | 4,048 | py | Python | venmo-sim/leiden/simulate_txs_on_leiden_clustered_venmo_graph.py | akatsarakis/tx_benchmarking | f8233e58bba3f4fb54d82273d7ca8631bae36ebc | [
"MIT"
] | 3 | 2020-07-07T17:08:41.000Z | 2022-01-10T19:25:46.000Z | venmo-sim/leiden/simulate_txs_on_leiden_clustered_venmo_graph.py | akatsarakis/tx_benchmarking | f8233e58bba3f4fb54d82273d7ca8631bae36ebc | [
"MIT"
] | null | null | null | venmo-sim/leiden/simulate_txs_on_leiden_clustered_venmo_graph.py | akatsarakis/tx_benchmarking | f8233e58bba3f4fb54d82273d7ca8631bae36ebc | [
"MIT"
] | null | null | null | import argparse
import csv
import re
# read arg (the num of shards, also the num of distributed nodes) from command line
def parse_args():
global ARGS
parser = argparse.ArgumentParser()
parser.add_argument('node_tot', type=int,
help='total number of distributed-nodes/shards in the system')
ARG... | 34.896552 | 112 | 0.704792 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,546 | 0.381917 |
7471a6cafdc6fccdf2cbf3b0bcfba1e4f01d5df3 | 4,363 | py | Python | custom_components/ampio/__init__.py | pszypowicz/ampio-hacc | 34a929cccc2b0e35f1f5d8aeafbf965bfc7dab6c | [
"MIT"
] | 2 | 2021-08-18T07:18:05.000Z | 2022-01-01T19:07:09.000Z | custom_components/ampio/__init__.py | pszypowicz/ampio-hacc | 34a929cccc2b0e35f1f5d8aeafbf965bfc7dab6c | [
"MIT"
] | null | null | null | custom_components/ampio/__init__.py | pszypowicz/ampio-hacc | 34a929cccc2b0e35f1f5d8aeafbf965bfc7dab6c | [
"MIT"
] | 1 | 2021-11-29T18:16:45.000Z | 2021-11-29T18:16:45.000Z | """Ampio Systems Platform."""
import asyncio
import json
import logging
from typing import Any, Dict, Optional
import voluptuous as vol
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONF_CLIENT_ID,
CONF_DEVICE,
CONF_DEVICE_CLASS,
CONF_FRIENDLY_NAME,
CONF_IC... | 27.789809 | 88 | 0.698602 | 0 | 0 | 0 | 0 | 0 | 0 | 1,782 | 0.408435 | 394 | 0.090305 |
747300fe06e37214b9d4b666eba20905c7e7c63d | 7,096 | py | Python | bsd2/vagrant-ansible/ansible/plugins/inventory/nova.py | dlab-berkeley/collaboratool-archive | fa474e05737f78e628d6b9398c58cf7c966a7bba | [
"Apache-2.0"
] | 1 | 2016-01-20T14:36:02.000Z | 2016-01-20T14:36:02.000Z | bsd2/vagrant-ansible/ansible/plugins/inventory/nova.py | dlab-berkeley/collaboratool-archive | fa474e05737f78e628d6b9398c58cf7c966a7bba | [
"Apache-2.0"
] | null | null | null | bsd2/vagrant-ansible/ansible/plugins/inventory/nova.py | dlab-berkeley/collaboratool-archive | fa474e05737f78e628d6b9398c58cf7c966a7bba | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# (c) 2012, Marco Vito Moscaritolo <marco@agavee.com>
#
# This file is part of Ansible,
#
# Ansible 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
# ... | 29.940928 | 142 | 0.643461 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,816 | 0.678692 |
74737681cf0d8052b62c5b5de4ce70418a73d187 | 61 | py | Python | ml/Graph/scratch.py | Shivams9/pythoncodecamp | e6cd27f4704a407ee360414a8c9236b254117a59 | [
"MIT"
] | 6 | 2021-08-04T08:15:22.000Z | 2022-02-02T11:15:56.000Z | ML/Graph/scratch.py | Maurya232Abhishek/Python-repository-for-basics | 3dcec5c529a0847df07c9dcc1424675754ce6376 | [
"MIT"
] | 14 | 2021-08-02T06:28:00.000Z | 2022-03-25T10:44:15.000Z | ML/Graph/scratch.py | Maurya232Abhishek/Python-repository-for-basics | 3dcec5c529a0847df07c9dcc1424675754ce6376 | [
"MIT"
] | 6 | 2021-07-16T04:56:41.000Z | 2022-02-16T04:40:06.000Z | l=[[1,2,3],[2,2,3],[3,3,3]]
print(l)
a=[2,3]
b=[4,5]
print(b) | 12.2 | 27 | 0.459016 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
747472dbf6c760efb2300b9c6ffbf248dba2c191 | 6,477 | py | Python | pyformlang/rsa/recursive_automaton.py | IlyaEp/pyformlang | eef239844beff5e9da3be4a4a240440ece81c10b | [
"MIT"
] | 15 | 2020-06-25T14:38:27.000Z | 2022-03-09T17:55:07.000Z | pyformlang/rsa/recursive_automaton.py | IlyaEp/pyformlang | eef239844beff5e9da3be4a4a240440ece81c10b | [
"MIT"
] | 11 | 2020-09-23T09:48:35.000Z | 2021-08-24T08:37:47.000Z | pyformlang/rsa/recursive_automaton.py | IlyaEp/pyformlang | eef239844beff5e9da3be4a4a240440ece81c10b | [
"MIT"
] | 5 | 2020-03-08T19:00:17.000Z | 2021-08-15T12:38:05.000Z | """
Representation of a recursive automaton
"""
from typing import AbstractSet
from pyformlang.finite_automaton.finite_automaton import to_symbol
from pyformlang.finite_automaton.symbol import Symbol
from pyformlang.regular_expression import Regex
from pyformlang.cfg import CFG, Epsilon
from pyformlang.rsa.box impor... | 28.915179 | 98 | 0.603366 | 5,408 | 0.834954 | 0 | 0 | 2,125 | 0.328084 | 0 | 0 | 2,486 | 0.38382 |
7475e81fcba007e37fae56c5bb3b0e881ffb33a4 | 17,080 | py | Python | py/ColladaMesh.py | dineshkummarc/Odin | f23719ff05a9d03cebd0d5c4c0179a98eff2d935 | [
"BSD-3-Clause"
] | 1 | 2019-04-22T16:33:55.000Z | 2019-04-22T16:33:55.000Z | py/ColladaMesh.py | dineshkummarc/Odin | f23719ff05a9d03cebd0d5c4c0179a98eff2d935 | [
"BSD-3-Clause"
] | null | null | null | py/ColladaMesh.py | dineshkummarc/Odin | f23719ff05a9d03cebd0d5c4c0179a98eff2d935 | [
"BSD-3-Clause"
] | null | null | null | from bisect import bisect
import ColladaMaterial
# Named array of points.
class PointArray():
def __init__(self, n, ofs):
self.name = n
self.points = []
self.stride = 1
self.offset = int(ofs)
def GetFirstChildElement(node):
for elem in node.childNodes:
if elem.nodeType == elem.ELEMENT_NODE:
... | 37.955556 | 156 | 0.606382 | 15,457 | 0.904977 | 0 | 0 | 0 | 0 | 0 | 0 | 2,837 | 0.166101 |
747904efdd9f1ce7e4568f67aa61e74e2291d27b | 1,757 | py | Python | src/zope/site/tests/test_folder.py | zopefoundation/zope.site | a523fdaab2801d6c2b15d10bd93115c9d53f4fd7 | [
"ZPL-2.1"
] | 3 | 2018-10-09T14:20:30.000Z | 2021-03-09T22:23:50.000Z | src/zope/site/tests/test_folder.py | zopefoundation/zope.site | a523fdaab2801d6c2b15d10bd93115c9d53f4fd7 | [
"ZPL-2.1"
] | 15 | 2015-03-20T09:14:08.000Z | 2021-03-05T16:39:27.000Z | src/zope/site/tests/test_folder.py | zopefoundation/zope.site | a523fdaab2801d6c2b15d10bd93115c9d53f4fd7 | [
"ZPL-2.1"
] | 1 | 2015-04-03T09:43:40.000Z | 2015-04-03T09:43:40.000Z |
import doctest
import unittest
from zope.site.folder import Folder
from zope.site.testing import siteSetUp, siteTearDown, checker
from zope.site.tests.test_site import TestSiteManagerContainer
def setUp(test=None):
siteSetUp()
def tearDown(test=None):
siteTearDown()
class FolderTest(TestSiteManagerCont... | 27.453125 | 65 | 0.690381 | 1,005 | 0.571998 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.017075 |
747a06d2abc8c71978e54d63ef1aeef2b7e2379e | 6,712 | py | Python | stl/ast.py | karen-leung-tri/py-stl | 87f764a2b8b7c756a239f200b77c3875f959cae6 | [
"BSD-3-Clause"
] | null | null | null | stl/ast.py | karen-leung-tri/py-stl | 87f764a2b8b7c756a239f200b77c3875f959cae6 | [
"BSD-3-Clause"
] | null | null | null | stl/ast.py | karen-leung-tri/py-stl | 87f764a2b8b7c756a239f200b77c3875f959cae6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from collections import deque, namedtuple
from functools import lru_cache
import funcy as fn
from lenses import lens, bind
import stl
def flatten_binary(phi, op, dropT, shortT):
def f(x):
return x.args if isinstance(x, op) else [x]
args = [arg for arg in phi.args if arg is n... | 20.975 | 76 | 0.567789 | 5,860 | 0.871116 | 707 | 0.105099 | 1,419 | 0.210941 | 0 | 0 | 908 | 0.134978 |
747a9c5326878d11b9906f17374aa59d5eda3f27 | 5,958 | py | Python | nel-wikipedia/kb_creator.py | nadjet/explosion_projects | 74f09fc97befb429a6db9e3235619c3d7b27ea7a | [
"MIT"
] | 1 | 2020-07-18T19:19:54.000Z | 2020-07-18T19:19:54.000Z | nel-wikipedia/kb_creator.py | JaredDelora/projects | ad0fc26dbc05182a439ffe76a362d40c24e25066 | [
"MIT"
] | null | null | null | nel-wikipedia/kb_creator.py | JaredDelora/projects | ad0fc26dbc05182a439ffe76a362d40c24e25066 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals
import logging
from spacy.kb import KnowledgeBase
from train_descriptions import EntityEncoder
import wiki_io as io
logger = logging.getLogger(__name__)
def create_kb(
nlp,
max_entities_per_alias,
min_entity_freq,
min_occ,
entity_def_pat... | 36.777778 | 158 | 0.648372 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 811 | 0.13612 |
747becfe33166824b286845631f9101c61bac5a1 | 1,045 | py | Python | modulesExecution.py | rando3/leetcode-python | b13bb35fb3cdc9813c62944547d260be2f9cab02 | [
"MIT"
] | null | null | null | modulesExecution.py | rando3/leetcode-python | b13bb35fb3cdc9813c62944547d260be2f9cab02 | [
"MIT"
] | null | null | null | modulesExecution.py | rando3/leetcode-python | b13bb35fb3cdc9813c62944547d260be2f9cab02 | [
"MIT"
] | null | null | null | from collections import deque, defaultdict
GRAY, BLACK = 0, 1
class Graph:
def __init__(self, vertices):
self.graph = defaultdict(list) # dictionary containing adjacency List
self.V = vertices # No. of vertices
def addEdge(self, u, v):
''' Function to add an edge to graph '''
... | 24.302326 | 78 | 0.504306 | 865 | 0.827751 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 0.126316 |
747d2dffa5879ddf1f60b8ac85c5568915e42c9d | 178 | py | Python | boxPrint/printers/printrun_printer.py | bobofei/Mohou_Box-master | 3d1c320a6258422406e2ba2f96ec7986beba1330 | [
"Apache-2.0"
] | null | null | null | boxPrint/printers/printrun_printer.py | bobofei/Mohou_Box-master | 3d1c320a6258422406e2ba2f96ec7986beba1330 | [
"Apache-2.0"
] | null | null | null | boxPrint/printers/printrun_printer.py | bobofei/Mohou_Box-master | 3d1c320a6258422406e2ba2f96ec7986beba1330 | [
"Apache-2.0"
] | null | null | null |
import threaded_printer
class Printer(threaded_printer.Printer):
def __init__(self, profile, usb_info):
threaded_printer.Printer.__init__(self, profile, usb_info)
| 22.25 | 66 | 0.769663 | 151 | 0.848315 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
747ef7880794c3ef33f57ad1412aece6844cc7a6 | 4,661 | py | Python | facebook/messenger/hello-world/webhook.py | imsardine/learning | 925841ddd93d60c740a62e12d9f57ef15b6e0a20 | [
"MIT"
] | null | null | null | facebook/messenger/hello-world/webhook.py | imsardine/learning | 925841ddd93d60c740a62e12d9f57ef15b6e0a20 | [
"MIT"
] | null | null | null | facebook/messenger/hello-world/webhook.py | imsardine/learning | 925841ddd93d60c740a62e12d9f57ef15b6e0a20 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
from flask import Flask, request, abort, jsonify
import requests
SEND_API = 'https://graph.facebook.com/v2.6/me/messages'
WEBHOOK_VERIFY_TOKEN = os.environ['WEBHOOK_VERIFY_TOKEN']
PAGE_ACCESS_TOKEN = os.environ['PAGE_ACCESS_TOKEN']
APP_SECRET = os.environ['APP_SECRET']
app = Flask(__... | 34.272059 | 87 | 0.488307 | 0 | 0 | 0 | 0 | 878 | 0.187567 | 0 | 0 | 1,339 | 0.28605 |
747f3e4104e555a4cdac60485eb1931d3dd4f55a | 18,847 | py | Python | custom_components/midea_dehumidifier_lan/config_flow.py | drthanwho/homeassistant-midea-dehumidifier-lan | b22c609bf07fd540ffa3a3ff28aaa2a184578b69 | [
"MIT"
] | null | null | null | custom_components/midea_dehumidifier_lan/config_flow.py | drthanwho/homeassistant-midea-dehumidifier-lan | b22c609bf07fd540ffa3a3ff28aaa2a184578b69 | [
"MIT"
] | null | null | null | custom_components/midea_dehumidifier_lan/config_flow.py | drthanwho/homeassistant-midea-dehumidifier-lan | b22c609bf07fd540ffa3a3ff28aaa2a184578b69 | [
"MIT"
] | null | null | null | """Config flow for Midea Dehumidifier (Local) integration."""
from __future__ import annotations
import ipaddress
import logging
from typing import Any, Final
from homeassistant import data_entry_flow
from homeassistant.config_entries import ConfigFlow
from homeassistant.const import (
CONF_API_VERSION,
CONF_... | 36.314066 | 88 | 0.607205 | 15,171 | 0.804956 | 0 | 0 | 0 | 0 | 10,281 | 0.545498 | 1,769 | 0.093861 |
747f4ee04719abc2662ba9a8f13f2719e601fb4b | 2,297 | py | Python | solver.py | cserradag96/nqueens | 350dfddb29419560d94f5218e5f2e75d2be9ccf3 | [
"MIT"
] | null | null | null | solver.py | cserradag96/nqueens | 350dfddb29419560d94f5218e5f2e75d2be9ccf3 | [
"MIT"
] | null | null | null | solver.py | cserradag96/nqueens | 350dfddb29419560d94f5218e5f2e75d2be9ccf3 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- encoding: utf-8 -*-
#######################################################################################################################
# DESCRIPTION:
#######################################################################################################################
# Solver for N-Que... | 40.298246 | 119 | 0.252068 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,870 | 0.814105 |
747f76629e7eb85c0e9005d5800b74e6ec8c3805 | 4,793 | py | Python | codango/codango/settings/base.py | andela-ooshodi/codango-debug | fa68f4305586c2d7f28307f10204c3b50f731fef | [
"MIT"
] | null | null | null | codango/codango/settings/base.py | andela-ooshodi/codango-debug | fa68f4305586c2d7f28307f10204c3b50f731fef | [
"MIT"
] | null | null | null | codango/codango/settings/base.py | andela-ooshodi/codango-debug | fa68f4305586c2d7f28307f10204c3b50f731fef | [
"MIT"
] | null | null | null | """
Django settings for codango project.
Generated by 'django-admin startproject' using Django 1.8.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build path... | 25.494681 | 89 | 0.722721 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,018 | 0.629668 |
747fcc5d8e8611eca8dd7a7d6b6a6a5d0dd6a8da | 2,343 | py | Python | pysnmp/DGS1100-24P-MGMT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/DGS1100-24P-MGMT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/DGS1100-24P-MGMT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module DGS1100-24P-MGMT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DGS1100-24P-MGMT-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:30:19 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (defau... | 80.793103 | 477 | 0.788732 | 233 | 0.099445 | 0 | 0 | 0 | 0 | 0 | 0 | 999 | 0.426376 |
7481800efb51f4d1a5766aebafa35170462e666c | 38 | py | Python | autox/autox_ts/metrics/__init__.py | OneToolsCollection/4paradigm-AutoX | f8e838021354de17f5bb9bc44e9d68d12dda6427 | [
"Apache-2.0"
] | null | null | null | autox/autox_ts/metrics/__init__.py | OneToolsCollection/4paradigm-AutoX | f8e838021354de17f5bb9bc44e9d68d12dda6427 | [
"Apache-2.0"
] | null | null | null | autox/autox_ts/metrics/__init__.py | OneToolsCollection/4paradigm-AutoX | f8e838021354de17f5bb9bc44e9d68d12dda6427 | [
"Apache-2.0"
] | null | null | null | from .metrics import _get_score_metric | 38 | 38 | 0.894737 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
74858fe3b513ef3751cf3b9d1d2671162ca352a5 | 1,136 | py | Python | setup.py | abuvanth/framework-identifier | 0619b1831bf29eaabdb8b7a0ef1abfd2328b39f9 | [
"MIT"
] | null | null | null | setup.py | abuvanth/framework-identifier | 0619b1831bf29eaabdb8b7a0ef1abfd2328b39f9 | [
"MIT"
] | null | null | null | setup.py | abuvanth/framework-identifier | 0619b1831bf29eaabdb8b7a0ef1abfd2328b39f9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import setuptools,os
with open("README.md", "r") as fh:
long_description = fh.read()
thelibFolder = os.path.dirname(os.path.realpath(__file__))
requirementPath = thelibFolder + '/requirements.txt'
install_requires = [] # Examples: ["gunicorn", "docutils>=0.3", "lxml==0... | 34.424242 | 78 | 0.680458 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 442 | 0.389085 |
74859fe61f59a2e68fef51e02980d620f6fd3fff | 4,089 | py | Python | convert.py | FlorianPoot/Faroad-PnP | aa31ce80f8a3888a903eac92827e7aef6c58dfe3 | [
"MIT"
] | null | null | null | convert.py | FlorianPoot/Faroad-PnP | aa31ce80f8a3888a903eac92827e7aef6c58dfe3 | [
"MIT"
] | null | null | null | convert.py | FlorianPoot/Faroad-PnP | aa31ce80f8a3888a903eac92827e7aef6c58dfe3 | [
"MIT"
] | null | null | null | import math
import sqlite3
import re
DATABASE_PATH = "line1.db"
class Convert:
model_altium = {"desc": 0, "designator": (1, 10), "position": (2, 3), "rotation": 9}
model_kicad = {"desc": 0, "designator": (1, 2), "position": (3, 4), "rotation": 5}
model_mnt = {"desc": 0, "designator": (4, 5), "position":... | 32.452381 | 118 | 0.512106 | 4,021 | 0.98337 | 0 | 0 | 1,431 | 0.349963 | 0 | 0 | 957 | 0.234043 |
7488b095e308da429d77f9667247659a77a3caeb | 10,490 | py | Python | src/device/Device.py | Electronya/PirBlaster | 804b86b2699183c40f2157cba0e151bec9d4725a | [
"MIT"
] | 1 | 2020-11-02T09:37:43.000Z | 2020-11-02T09:37:43.000Z | src/device/Device.py | Electronya/PirBlasterBackend | 804b86b2699183c40f2157cba0e151bec9d4725a | [
"MIT"
] | 1 | 2021-06-26T14:56:31.000Z | 2021-06-26T14:56:31.000Z | src/device/Device.py | Electronya/PirBlasterBackend | 804b86b2699183c40f2157cba0e151bec9d4725a | [
"MIT"
] | 1 | 2020-11-02T09:34:33.000Z | 2020-11-02T09:34:33.000Z | from logging import Logger
import paho.mqtt.client as mqtt
from ircodec.command import CommandSet
import os
from exceptions import CommandNotFound, \
CommandFileAccess
class Device():
# Constants
STATUS_TOPIC = 'status'
CMD_TOPIC = 'command'
RESULT_TOPIC = 'result'
ONLINE_MSG = 'ONLINE'
... | 33.301587 | 120 | 0.538418 | 10,313 | 0.983127 | 0 | 0 | 0 | 0 | 0 | 0 | 4,752 | 0.453003 |
7488fb87c2da80cc7ce4b43784746c835d6f4aeb | 52 | py | Python | test/inventory/mock_inventories/single_host1.py | oddlama/forge | d09b0f309ce7dcda79dc03765473b48732c71845 | [
"MIT"
] | 14 | 2021-12-17T10:38:27.000Z | 2022-03-02T01:20:01.000Z | test/inventory/mock_inventories/single_host1.py | oddlama/forge | d09b0f309ce7dcda79dc03765473b48732c71845 | [
"MIT"
] | 2 | 2022-01-11T13:31:09.000Z | 2022-02-03T15:41:43.000Z | test/inventory/mock_inventories/single_host1.py | oddlama/forge | d09b0f309ce7dcda79dc03765473b48732c71845 | [
"MIT"
] | 2 | 2022-02-03T15:20:51.000Z | 2022-02-03T15:45:11.000Z | inventory_var = "from_inventory"
hosts = ["host1"]
| 13 | 32 | 0.711538 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 23 | 0.442308 |
748b0cd71a8c5de3ca15b5e64c2515f58ee12902 | 5,459 | py | Python | hrssCalcbulk from folder of .fit files.py | Emberflurry/Bulk-HRSS-TSS-calc-from-Garmin-.fitfiles | d82f064ee0a97b2d826f434b5a21e8869c090e17 | [
"MIT"
] | 2 | 2021-08-21T14:05:45.000Z | 2022-03-26T02:22:02.000Z | hrssCalcbulk from folder of .fit files.py | Emberflurry/Bulk-HRSS-TSS-calc-from-Garmin-.fitfiles | d82f064ee0a97b2d826f434b5a21e8869c090e17 | [
"MIT"
] | 1 | 2021-07-19T17:45:13.000Z | 2021-07-19T19:18:07.000Z | hrssCalcbulk from folder of .fit files.py | Emberflurry/Bulk-HRSS-TSS-calc-from-Garmin-.fitfiles | d82f064ee0a97b2d826f434b5a21e8869c090e17 | [
"MIT"
] | null | null | null | import os
import datetime
from fitparse import *
import pandas as pd
import numpy as np
from tqdm import tqdm
from datetime import datetime
import re
# import matplotlib.pyplot as plt (not needed I guess)
directory = 'fitfiles' # may want to make this more flexible--ie: not just in the directory of the code...works ... | 35.914474 | 179 | 0.63235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,192 | 0.401539 |
748c0c6816a34dc727849d503d55e952ab640086 | 87,762 | py | Python | test/features/pit/fixtures_pit.py | NikkaZ/dbtvault_spark | 383723cd2a35a0bc7b82fd4e77fb1eda0f68cb07 | [
"Apache-2.0"
] | null | null | null | test/features/pit/fixtures_pit.py | NikkaZ/dbtvault_spark | 383723cd2a35a0bc7b82fd4e77fb1eda0f68cb07 | [
"Apache-2.0"
] | null | null | null | test/features/pit/fixtures_pit.py | NikkaZ/dbtvault_spark | 383723cd2a35a0bc7b82fd4e77fb1eda0f68cb07 | [
"Apache-2.0"
] | null | null | null | from behave import fixture
@fixture
def pit(context):
"""
Define the structures and metadata to perform PIT load
"""
context.vault_structure_type = "pit"
context.hashed_columns = {
"STG_CUSTOMER_DETAILS": {
"CUSTOMER_PK": "CUSTOMER_ID",
"HASHDIFF": {"is_hashdiff":... | 33.293627 | 89 | 0.418997 | 0 | 0 | 0 | 0 | 87,708 | 0.999385 | 0 | 0 | 42,078 | 0.479456 |
748c84a6a78daf32f1db550d0822cdb68bd66142 | 1,908 | py | Python | textquote.py | patmanteau/panflutist | 74e56fe6b6873015cfba766bb61277d6d81bbece | [
"BSD-3-Clause"
] | null | null | null | textquote.py | patmanteau/panflutist | 74e56fe6b6873015cfba766bb61277d6d81bbece | [
"BSD-3-Clause"
] | null | null | null | textquote.py | patmanteau/panflutist | 74e56fe6b6873015cfba766bb61277d6d81bbece | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
r"""
Panflute filter supporting \textquote and \foreigntextquote in LaTeX
Issues:
- Nested parens with pandoc-citeproc
Usage:
- Use Pandoc markdown bracketed Spans:
- [Ganz Gallien ist von den Römern besetzt]{.textquote cite="[vgl. @Goscinny_Asterix_1967, 1\psqq]"}
- [Toute la Gau... | 28.058824 | 135 | 0.559224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 842 | 0.440838 |
748cbeedaa4ac6fe4d023634af107928994f029c | 335 | py | Python | sandbox/gff/fixit.py | molecules/bio | 2a86a931162be47beca4d7bf73b2b3978f3ba402 | [
"MIT"
] | 28 | 2020-11-28T01:18:16.000Z | 2022-03-25T16:42:53.000Z | sandbox/gff/fixit.py | molecules/bio | 2a86a931162be47beca4d7bf73b2b3978f3ba402 | [
"MIT"
] | 3 | 2021-09-28T11:52:07.000Z | 2022-03-22T07:47:46.000Z | sandbox/gff/fixit.py | molecules/bio | 2a86a931162be47beca4d7bf73b2b3978f3ba402 | [
"MIT"
] | 8 | 2020-12-01T17:02:26.000Z | 2022-02-14T16:57:46.000Z | """
Adds version number sequence id of a GFF file.
"""
import sys
ACC=sys.argv[1]
VER=sys.argv[2]
for line in sys.stdin:
line = line.strip()
elems = line.split()
if elems and elems[0] == ACC:
elems[0] = f'{elems[0]}.{VER}'
if line.startswith("#"):
print (line)
else:
print("\... | 20.9375 | 46 | 0.570149 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.238806 |
748db5b41786bab067b492eb0b8d340b621d6f8f | 4,626 | py | Python | abacusai/deployment.py | Ankit-RealityEngines/api-python | 3627048d31df5972c5777de2a1c1211ea06a8804 | [
"MIT"
] | null | null | null | abacusai/deployment.py | Ankit-RealityEngines/api-python | 3627048d31df5972c5777de2a1c1211ea06a8804 | [
"MIT"
] | null | null | null | abacusai/deployment.py | Ankit-RealityEngines/api-python | 3627048d31df5972c5777de2a1c1211ea06a8804 | [
"MIT"
] | null | null | null | from .return_class import AbstractApiClass
from .refresh_schedule import RefreshSchedule
class Deployment(AbstractApiClass):
"""
A model deployment
"""
def __init__(self, client, deploymentId=None, name=None, status=None, description=None, deployedAt=None, createdAt=None, projectId=None, modelId=... | 57.111111 | 642 | 0.75508 | 4,534 | 0.980112 | 0 | 0 | 0 | 0 | 0 | 0 | 908 | 0.196282 |
748f173a3418e52d978dedc4b9c8474f56ab2812 | 1,426 | py | Python | tools/buildenv.py | pauldotknopf/protobuf-qml | e10f46567344738563140e8f06d5a2569b961d06 | [
"MIT"
] | 56 | 2015-05-14T16:00:43.000Z | 2022-02-11T20:25:36.000Z | tools/buildenv.py | pauldotknopf/protobuf-qml | e10f46567344738563140e8f06d5a2569b961d06 | [
"MIT"
] | 19 | 2015-05-11T14:50:33.000Z | 2018-09-06T05:45:34.000Z | tools/buildenv.py | pauldotknopf/protobuf-qml | e10f46567344738563140e8f06d5a2569b961d06 | [
"MIT"
] | 16 | 2015-10-29T13:25:48.000Z | 2021-06-30T18:34:32.000Z | import logging
import platform
import os
ROOT_DIR = os.path.realpath(os.path.dirname(os.path.dirname(__file__)))
DEFAULT_DEPS = os.path.join(ROOT_DIR, 'build', 'deps')
DEFAULT_OUT = os.path.join(ROOT_DIR, 'out')
logger = logging.getLogger(__name__)
def prepend_envvar(env, k, v, sep=os.pathsep):
old = env.get(k)
... | 29.102041 | 80 | 0.685133 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 355 | 0.248948 |
7492f98aa56400f8ae0d4988b98264efada3bc27 | 2,010 | py | Python | rstobj/directives/toc.py | MacHu-GWU/rstobj-project | 40601f08e9e7ee2df5c514af04b040f61f76ed78 | [
"MIT"
] | null | null | null | rstobj/directives/toc.py | MacHu-GWU/rstobj-project | 40601f08e9e7ee2df5c514af04b040f61f76ed78 | [
"MIT"
] | null | null | null | rstobj/directives/toc.py | MacHu-GWU/rstobj-project | 40601f08e9e7ee2df5c514af04b040f61f76ed78 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
table of content directive.
"""
import attr
from .base import Directive
@attr.s
class TableOfContent(Directive):
"""
``.. contents::`` directive.
parameter definition see here: http://docutils.sourceforge.net/docs/ref/rst/directives.html#table-of-contents
:param title: ... | 25.769231 | 113 | 0.595025 | 1,897 | 0.943781 | 0 | 0 | 1,905 | 0.947761 | 0 | 0 | 1,023 | 0.508955 |
7493ca43323db77c43ed2fc83412e3ad722c32a7 | 3,256 | py | Python | StaffPage.py | yurunyang1998/XUPT_- | 415c20550b54914b1206cfa3b83ddbe8260e7a6f | [
"MIT"
] | null | null | null | StaffPage.py | yurunyang1998/XUPT_- | 415c20550b54914b1206cfa3b83ddbe8260e7a6f | [
"MIT"
] | null | null | null | StaffPage.py | yurunyang1998/XUPT_- | 415c20550b54914b1206cfa3b83ddbe8260e7a6f | [
"MIT"
] | null | null | null |
from flask import *
import databaseModel
from functools import wraps
import time
bp = Blueprint("StaffPage", __name__, url_prefix='/StaffPage')
def login_required(func):
@wraps(func)
def wrapper(*args, **kwargs):
UserName = session.get('UserName')
if(UserName is not None):
g.Use... | 32.56 | 138 | 0.635749 | 0 | 0 | 0 | 0 | 3,249 | 0.939017 | 0 | 0 | 628 | 0.181503 |
7493cdea568afe3db8cc36c7efb7d3a24d08c8e1 | 1,849 | py | Python | daily_problems/problem_101_to_200/problem_131.py | rrwt/daily-coding-challenge | b16fc365fd142ebab429e605cb146c8bb0bc97a2 | [
"MIT"
] | 1 | 2019-04-18T03:29:02.000Z | 2019-04-18T03:29:02.000Z | daily_problems/problem_101_to_200/problem_131.py | rrwt/daily-coding-challenge | b16fc365fd142ebab429e605cb146c8bb0bc97a2 | [
"MIT"
] | null | null | null | daily_problems/problem_101_to_200/problem_131.py | rrwt/daily-coding-challenge | b16fc365fd142ebab429e605cb146c8bb0bc97a2 | [
"MIT"
] | null | null | null | """
Given the head to a singly linked list, where each node also has a “random” pointer
that points to anywhere in the linked list, deep clone the list.
"""
from typing import Tuple
class Node:
def __init__(self, data: int) -> None:
self.data = data
self.next = None
self.random = None
de... | 26.042254 | 83 | 0.622499 | 131 | 0.070696 | 0 | 0 | 0 | 0 | 0 | 0 | 389 | 0.20993 |
749446711702bf00c7f0f56b3ec4b6af7960f483 | 1,095 | py | Python | view/basev64/__init__.py | desktophzj/wolverine-tkinter | 8e499c877ba7f5da11e63e30ecb25d54f6f3b6e9 | [
"Apache-2.0"
] | null | null | null | view/basev64/__init__.py | desktophzj/wolverine-tkinter | 8e499c877ba7f5da11e63e30ecb25d54f6f3b6e9 | [
"Apache-2.0"
] | null | null | null | view/basev64/__init__.py | desktophzj/wolverine-tkinter | 8e499c877ba7f5da11e63e30ecb25d54f6f3b6e9 | [
"Apache-2.0"
] | null | null | null | import tkinter as tk
from tkinter import ttk
raw_data_label_y_location = 20
raw_data_entry_location = raw_data_label_y_location + 20
encode_button_location = raw_data_entry_location + 20
decode_button_location = encode_button_location + 20
base64_data_label_y_location = decode_button_location + 20
base64_data_entry_y_... | 33.181818 | 64 | 0.699543 | 727 | 0.663927 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.052055 |
749477a57d991a4da5d6d7c1a4757df77ab77a72 | 3,307 | py | Python | research/cv/csd/src/edsr_slim.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/csd/src/edsr_slim.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/csd/src/edsr_slim.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 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... | 38.011494 | 112 | 0.629574 | 2,512 | 0.759601 | 0 | 0 | 0 | 0 | 0 | 0 | 759 | 0.229513 |
7494c2f962bcdfe2ec84fe9915ae2232069d6c59 | 6,317 | py | Python | 1_prepare_data/docker/code/make_tfRecords.py | gianpd/amazon-sagemaker-tensorflow-object-detection-api | 80c654a9767bb26389db468c7e6df3300f2debb4 | [
"MIT-0"
] | null | null | null | 1_prepare_data/docker/code/make_tfRecords.py | gianpd/amazon-sagemaker-tensorflow-object-detection-api | 80c654a9767bb26389db468c7e6df3300f2debb4 | [
"MIT-0"
] | null | null | null | 1_prepare_data/docker/code/make_tfRecords.py | gianpd/amazon-sagemaker-tensorflow-object-detection-api | 80c654a9767bb26389db468c7e6df3300f2debb4 | [
"MIT-0"
] | null | null | null | import os
import sys
import json
from pathlib import Path
import pandas as pd
import random
import tensorflow as tf
import io
import argparse
from PIL import Image
from collections import namedtuple
from object_detection.utils import dataset_util, label_map_util
import logging
logging.basicConfig(strea... | 39.48125 | 104 | 0.614849 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,817 | 0.287637 |
74965fd1310312518af6b17b1aeb671c359c33bf | 3,962 | py | Python | rugosa/emulation/actions.py | Defense-Cyber-Crime-Center/rugosa | 70f5b1db7e3f02ecccb0495fe1c0c77930769276 | [
"MIT"
] | 1 | 2022-03-13T03:03:31.000Z | 2022-03-13T03:03:31.000Z | rugosa/emulation/actions.py | Defense-Cyber-Crime-Center/rugosa | 70f5b1db7e3f02ecccb0495fe1c0c77930769276 | [
"MIT"
] | null | null | null | rugosa/emulation/actions.py | Defense-Cyber-Crime-Center/rugosa | 70f5b1db7e3f02ecccb0495fe1c0c77930769276 | [
"MIT"
] | null | null | null | """
Interface for interesting actions.
"""
from dataclasses import dataclass
import logging
from typing import Union, List, Optional, Iterable
from .call_hooks.win_api import constants as wc
logger = logging.getLogger(__name__)
@dataclass
class Action:
ip: int
class ActionList:
"""
Represents a revers... | 18.342593 | 79 | 0.646643 | 3,460 | 0.873296 | 674 | 0.170116 | 1,680 | 0.424028 | 0 | 0 | 680 | 0.17163 |
7497c1706d2cfdef04eb240c836fa9520fbded1f | 10,037 | py | Python | n2nmn-tensorlayer/models_shapes/nmn3_layers.py | jiaqi-xi/Neural-Module-Networks.Tensorlayer | 3607e6717473aed51c653cf931dc7d80866b0227 | [
"MIT"
] | null | null | null | n2nmn-tensorlayer/models_shapes/nmn3_layers.py | jiaqi-xi/Neural-Module-Networks.Tensorlayer | 3607e6717473aed51c653cf931dc7d80866b0227 | [
"MIT"
] | null | null | null | n2nmn-tensorlayer/models_shapes/nmn3_layers.py | jiaqi-xi/Neural-Module-Networks.Tensorlayer | 3607e6717473aed51c653cf931dc7d80866b0227 | [
"MIT"
] | 3 | 2020-01-12T15:45:44.000Z | 2020-01-31T13:07:46.000Z | from __future__ import absolute_import, division, print_function
import sys
import tensorflow as tf
import tensorlayer as tl
import numpy as np
from tensorflow import convert_to_tensor as to_T
sess = tf.Session()
tl.layers.initialize_global_variables(sess)
def conv_layer(name, bottom, kernel_size, stride, output_dim... | 45.622727 | 115 | 0.672512 | 0 | 0 | 0 | 0 | 656 | 0.065358 | 0 | 0 | 1,660 | 0.165388 |
74984e77e478676a74e3414a580cf3837bbf6e4c | 16,641 | py | Python | reinforcement_learning/q_learn.py | noderod/DARLMID | 5737dbe222ce5a5a847c1d0a8d1af64dda87e5b2 | [
"MIT"
] | null | null | null | reinforcement_learning/q_learn.py | noderod/DARLMID | 5737dbe222ce5a5a847c1d0a8d1af64dda87e5b2 | [
"MIT"
] | null | null | null | reinforcement_learning/q_learn.py | noderod/DARLMID | 5737dbe222ce5a5a847c1d0a8d1af64dda87e5b2 | [
"MIT"
] | null | null | null | """
SUMMARY
Reinforcement learning via q-learning on the provided data, using previous data if requested
"""
import argparse
import json
import random
import sys
import matplotlib.pyplot as plt
import numpy as np
import auxiliary as aux
from vehicle import Vehicle
# Sets seed for reproducibility
random.seed(0)
... | 36.654185 | 180 | 0.607656 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,372 | 0.321561 |
749864186a6dd9c711cc350ae0e33d7867281662 | 162 | py | Python | problem_24.py | MasterScott/project-euler | 643df8258bf9ac84b14b648a3a5a254bc682c473 | [
"MIT"
] | null | null | null | problem_24.py | MasterScott/project-euler | 643df8258bf9ac84b14b648a3a5a254bc682c473 | [
"MIT"
] | null | null | null | problem_24.py | MasterScott/project-euler | 643df8258bf9ac84b14b648a3a5a254bc682c473 | [
"MIT"
] | 1 | 2019-10-28T23:33:46.000Z | 2019-10-28T23:33:46.000Z | from itertools import permutations
for i, p in enumerate(permutations([x for x in '0123456789'])):
if i == 10**6 - 1:
print ''.join(p)
break
| 23.142857 | 63 | 0.604938 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.08642 |
7499a0d47d4f28aa8fbfe508262da370434f71b2 | 12,260 | py | Python | src/sark110.py | EA4FRB/sark110-python | ff5ace7c0d71f9de48772cdb1cedb98f5c22df8a | [
"MIT"
] | 2 | 2019-09-03T18:43:53.000Z | 2019-11-06T18:26:23.000Z | src/sark110.py | EA4FRB/sark110-python | ff5ace7c0d71f9de48772cdb1cedb98f5c22df8a | [
"MIT"
] | 1 | 2020-04-03T22:59:18.000Z | 2020-04-29T16:17:02.000Z | src/sark110.py | EA4FRB/sark110-python | ff5ace7c0d71f9de48772cdb1cedb98f5c22df8a | [
"MIT"
] | 1 | 2019-09-05T16:40:55.000Z | 2019-09-05T16:40:55.000Z | # ---------------------------------------------------------
"""
This file is a part of the "SARK110 Antenna Vector Impedance Analyzer" software
MIT License
@author Copyright (c) 2020 Melchor Varela - EA4FRB
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and as... | 29.757282 | 112 | 0.49633 | 10,587 | 0.86354 | 0 | 0 | 437 | 0.035644 | 0 | 0 | 3,879 | 0.316395 |
749bf7c085175f0c77d7d99fa53fad97cc10c478 | 2,295 | py | Python | Utkarsh1.py | utkarsh7236/SCILLA | e11e4d753823ad522a1b3168283b6e6ffe3ea393 | [
"Apache-2.0"
] | null | null | null | Utkarsh1.py | utkarsh7236/SCILLA | e11e4d753823ad522a1b3168283b6e6ffe3ea393 | [
"Apache-2.0"
] | null | null | null | Utkarsh1.py | utkarsh7236/SCILLA | e11e4d753823ad522a1b3168283b6e6ffe3ea393 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import sqlite3
path = '/Users/Utkarsh/PycharmProjects/SCILLA/Experiments/circuits.db'
def select_all_tasks(conn):
"""
Query all rows in the tasks table
:param conn: the Connection object
:return:
"""
cur = conn.cursor()
cur.execute("SELECT * FROM tasks")
rows = cur.... | 21.650943 | 80 | 0.608715 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,798 | 0.783442 |
749c2c114c339b32826757ee2f0157c48eb8cfa9 | 383 | py | Python | 301-400/377.combination-sum-iv.py | guangxu-li/leetcode-in-python | 8a5a373b32351500342705c141591a1a8f5f1cb1 | [
"MIT"
] | null | null | null | 301-400/377.combination-sum-iv.py | guangxu-li/leetcode-in-python | 8a5a373b32351500342705c141591a1a8f5f1cb1 | [
"MIT"
] | null | null | null | 301-400/377.combination-sum-iv.py | guangxu-li/leetcode-in-python | 8a5a373b32351500342705c141591a1a8f5f1cb1 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=377 lang=python3
#
# [377] Combination Sum IV
#
# @lc code=start
from collections import defaultdict
class Solution:
def combinationSum4(self, nums: list[int], target: int) -> int:
dp = defaultdict(int, {0: 1})
dp.update(map(lambda i: (i, sum(dp[i - n] for n in nums)), ran... | 20.157895 | 89 | 0.624021 | 237 | 0.618799 | 0 | 0 | 0 | 0 | 0 | 0 | 97 | 0.253264 |
749c75778c0228cfbbf366e87be5465e687bc993 | 1,839 | py | Python | inference.py | ShaneTian/Induction-Networks | 5785e13425e3c9020c8699402d546d018ec735bf | [
"Apache-2.0"
] | 5 | 2020-06-13T07:43:33.000Z | 2021-06-14T03:27:11.000Z | inference.py | ShaneTian/Induction-Networks | 5785e13425e3c9020c8699402d546d018ec735bf | [
"Apache-2.0"
] | 2 | 2020-06-15T04:53:18.000Z | 2020-10-24T12:37:27.000Z | inference.py | ShaneTian/Induction-Networks | 5785e13425e3c9020c8699402d546d018ec735bf | [
"Apache-2.0"
] | 1 | 2021-01-08T11:27:07.000Z | 2021-01-08T11:27:07.000Z | import argparse
import numpy as np
from paddle import fluid
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--model_path", type=str,
help="Path of __model__ and __params__")
parser.add_argument("--use_cuda", action="store_true")
args = parser.parse_args()
... | 35.365385 | 90 | 0.641109 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 231 | 0.125612 |
749ca24e3526b586f7bcd5efb10f8d95b181ede2 | 659 | py | Python | dashboard/migrations/0032_auto_20210823_0417.py | zidandff/primaseru | a14fa7326098af220e0671c3bf3870b4016ab4bf | [
"MIT"
] | null | null | null | dashboard/migrations/0032_auto_20210823_0417.py | zidandff/primaseru | a14fa7326098af220e0671c3bf3870b4016ab4bf | [
"MIT"
] | null | null | null | dashboard/migrations/0032_auto_20210823_0417.py | zidandff/primaseru | a14fa7326098af220e0671c3bf3870b4016ab4bf | [
"MIT"
] | 2 | 2021-08-10T09:09:58.000Z | 2021-08-10T10:54:51.000Z | # Generated by Django 3.2.5 on 2021-08-23 04:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0031_participantgraduation_updated_at'),
]
operations = [
migrations.AlterField(
model_name='infosourceppdb',
... | 27.458333 | 117 | 0.626707 | 566 | 0.858877 | 0 | 0 | 0 | 0 | 0 | 0 | 174 | 0.264036 |
749d83fb75da72d4575c40c6649383b7eedc9468 | 3,125 | py | Python | dynaban/pypot/callback.py | laukik-hase/imitation_of_human_arm_on_robotic_manipulator | 995beb1ab41597ca6cbecd0baecdef1ef13450f9 | [
"MIT"
] | 3 | 2021-11-13T16:54:31.000Z | 2021-11-13T20:50:18.000Z | dynaban/pypot/callback.py | laukik-hase/human_arm_imitation | 995beb1ab41597ca6cbecd0baecdef1ef13450f9 | [
"MIT"
] | null | null | null | dynaban/pypot/callback.py | laukik-hase/human_arm_imitation | 995beb1ab41597ca6cbecd0baecdef1ef13450f9 | [
"MIT"
] | null | null | null | import paho.mqtt.client as paho
import time
import Queue as queue
import json
import real_time_manipulator_math_utils
import pprint
pp = pprint.PrettyPrinter(indent=4)
# import rbdl
# import manip motion
def on_connect(client, userdata, flags, rc):
client.subscribe(topic, qos)
def on_message(client, userdata... | 26.939655 | 91 | 0.5984 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 563 | 0.18016 |
749f2f672fb718a35a7272b4f9459c0ee34795d3 | 4,679 | py | Python | emwiki/article/views.py | etmula/emwiki | e162a9976688d543f2e3bd71634913c14cdb9d54 | [
"MIT"
] | 2 | 2019-08-02T01:08:13.000Z | 2020-11-17T12:47:02.000Z | emwiki/article/views.py | g063ff/emwiki | a379b2b2863e9059eac014183cb94c39670e11a0 | [
"MIT"
] | 101 | 2019-07-29T07:44:56.000Z | 2022-03-31T04:11:04.000Z | emwiki/article/views.py | g063ff/emwiki | a379b2b2863e9059eac014183cb94c39670e11a0 | [
"MIT"
] | 11 | 2019-07-24T02:37:35.000Z | 2021-12-09T05:24:31.000Z | import os
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.core import serializers
from django.http import HttpResponse, JsonResponse, Http404
from django.shortcuts import render, get_object_or_404
from django.urls import reverse, reverse_lazy
from django.utils.dec... | 37.432 | 99 | 0.63069 | 4,187 | 0.894849 | 0 | 0 | 868 | 0.18551 | 0 | 0 | 705 | 0.150673 |
749f6d74baed280144d534ef8d72acec4e74fc71 | 3,131 | py | Python | kivy3/objects/lines.py | sb-blueprint/kivy3 | e5d6c5758b610503109eb2c788bcff4f3410bd06 | [
"MIT"
] | null | null | null | kivy3/objects/lines.py | sb-blueprint/kivy3 | e5d6c5758b610503109eb2c788bcff4f3410bd06 | [
"MIT"
] | null | null | null | kivy3/objects/lines.py | sb-blueprint/kivy3 | e5d6c5758b610503109eb2c788bcff4f3410bd06 | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright (c) 2013 Niko Skrypnik
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge... | 36.406977 | 77 | 0.63526 | 1,786 | 0.570425 | 83 | 0.026509 | 0 | 0 | 0 | 0 | 1,334 | 0.426062 |
749fd515c10332cd2c59228ee905ba59c612341a | 6,634 | py | Python | Source/CLI/makedata/makedata.py | dmsovetov/Dreemchest | 39255c88943abc69c7fa0710b7ca8486c08260e0 | [
"MIT"
] | 11 | 2016-02-18T15:24:49.000Z | 2021-01-30T18:26:04.000Z | Source/CLI/makedata/makedata.py | dmsovetov/dreemchest | 39255c88943abc69c7fa0710b7ca8486c08260e0 | [
"MIT"
] | 2 | 2016-05-23T22:48:35.000Z | 2017-02-13T16:43:32.000Z | Source/CLI/makedata/makedata.py | dmsovetov/dreemchest | 39255c88943abc69c7fa0710b7ca8486c08260e0 | [
"MIT"
] | 3 | 2016-08-19T13:26:59.000Z | 2018-08-03T04:28:14.000Z | #!/usr/bin/python
#################################################################################
#
# The MIT License (MIT)
#
# Copyright (c) 2015 Dmitry Sovetov
#
# https://github.com/dmsovetov
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated docume... | 41.204969 | 184 | 0.61833 | 717 | 0.108047 | 0 | 0 | 240 | 0.036166 | 0 | 0 | 2,651 | 0.399488 |
749fd6335e4af9798ed3bf9db18e89282313e71e | 1,262 | py | Python | core/tools/pencil.py | INTJT/conway | 7d3165382b3a691163cae30e33db97c544c043a6 | [
"MIT"
] | null | null | null | core/tools/pencil.py | INTJT/conway | 7d3165382b3a691163cae30e33db97c544c043a6 | [
"MIT"
] | null | null | null | core/tools/pencil.py | INTJT/conway | 7d3165382b3a691163cae30e33db97c544c043a6 | [
"MIT"
] | null | null | null | from core.tools.tool import Tool
from core.editor import Editor
class Pencil(Tool):
def __init__(self, button, board):
super(Pencil, self).__init__(button, board)
self._changed = set()
Editor()["pre-pencil"] = board.copy()
self._fill = button
def _need_change(self, value):
... | 25.24 | 102 | 0.532488 | 1,195 | 0.94691 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 0.043582 |
74a000fd93cbaeff0dd5bb32c3ac3e334a8c69dc | 19,855 | py | Python | packages/gtmcore/gtmcore/workflows/tests/test_gitlab.py | jjwatts/gigantum-client | 88ce0475fb6880322bdd06d987c494e29064f278 | [
"MIT"
] | null | null | null | packages/gtmcore/gtmcore/workflows/tests/test_gitlab.py | jjwatts/gigantum-client | 88ce0475fb6880322bdd06d987c494e29064f278 | [
"MIT"
] | null | null | null | packages/gtmcore/gtmcore/workflows/tests/test_gitlab.py | jjwatts/gigantum-client | 88ce0475fb6880322bdd06d987c494e29064f278 | [
"MIT"
] | null | null | null | # Copyright (c) 2017 FlashX, LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distrib... | 47.27381 | 123 | 0.514279 | 17,907 | 0.901889 | 693 | 0.034903 | 18,346 | 0.923999 | 0 | 0 | 6,731 | 0.339008 |
74a12178988d7dbec19f36ed51efbc1d85879c24 | 3,248 | py | Python | pinsey/thread/LikesBotThread.py | RailKill/Pinsey | 72a283e6c5683b27918b511d80e45c3af4e67539 | [
"MIT"
] | 3 | 2021-02-01T06:47:06.000Z | 2022-01-09T05:54:35.000Z | pinsey/thread/LikesBotThread.py | RailKill/Pinsey | 72a283e6c5683b27918b511d80e45c3af4e67539 | [
"MIT"
] | 4 | 2019-10-23T09:52:36.000Z | 2022-03-11T23:17:23.000Z | pinsey/thread/LikesBotThread.py | RailKill/Pinsey | 72a283e6c5683b27918b511d80e45c3af4e67539 | [
"MIT"
] | null | null | null | import logging
from pynder import errors
from random import randint
from PyQt5 import QtCore
class LikesBotThread(QtCore.QThread):
"""
This is a QThread which runs in the background as a PyQt Signal. It emits the matches object.
To access the matches object, you need to retrieve from the signal, w... | 47.764706 | 112 | 0.591441 | 3,152 | 0.970443 | 0 | 0 | 0 | 0 | 0 | 0 | 1,169 | 0.359914 |
74a2534ab9e9ba29bdec5c71f0832442026ad789 | 13,081 | py | Python | train.py | SkyLLine/Inception-v4-in-mindspore | 9a23261252baad27cbd7bc8028087e4bba48b318 | [
"MIT"
] | 1 | 2020-12-23T12:31:08.000Z | 2020-12-23T12:31:08.000Z | train.py | SkyLLine/Inception-v4-in-mindspore | 9a23261252baad27cbd7bc8028087e4bba48b318 | [
"MIT"
] | null | null | null | train.py | SkyLLine/Inception-v4-in-mindspore | 9a23261252baad27cbd7bc8028087e4bba48b318 | [
"MIT"
] | null | null | null | import mindspore as ms
import mindspore.nn as nn
import mindspore.ops.operations as operator
import os
from lr_generator import get_lr
from CrossEntropy import CrossEntropy
import argparse
from inception_A import inception_A
from inception_B import inception_B
import numpy as np
from inception_C import inception_C
from... | 39.759878 | 125 | 0.690467 | 2,995 | 0.228888 | 0 | 0 | 0 | 0 | 0 | 0 | 4,035 | 0.308368 |
74a435d54372c1ab9bc2bc926f10969db52f3fc9 | 4,238 | py | Python | dash/models.py | lakesite/dash | c64cea5fe4c5aff529e3f121270dbf29f700aeb2 | [
"MIT"
] | null | null | null | dash/models.py | lakesite/dash | c64cea5fe4c5aff529e3f121270dbf29f700aeb2 | [
"MIT"
] | 1 | 2019-09-17T12:22:26.000Z | 2019-09-18T22:58:14.000Z | dash/models.py | lakesite/dash | c64cea5fe4c5aff529e3f121270dbf29f700aeb2 | [
"MIT"
] | 1 | 2019-09-27T03:58:43.000Z | 2019-09-27T03:58:43.000Z | import datetime
from flask_bcrypt import *
from flask import current_app
from flask_sqlalchemy import SQLAlchemy
from flask_security import UserMixin, RoleMixin
db = SQLAlchemy()
roles_users = db.Table('roles_users',
db.Column('user_id', db.Integer(), db.ForeignKey('user.id')),
db.Column('role_id', db.Inte... | 32.106061 | 99 | 0.666116 | 3,862 | 0.911279 | 0 | 0 | 0 | 0 | 0 | 0 | 376 | 0.088721 |
74a4b609cbd07e7dfd15a960bb342cacfe14d3fb | 2,034 | py | Python | setup.py | Jumpscale/ays9 | 63bd414ff06372ba885c55eec528f427e63bcbe1 | [
"Apache-2.0"
] | 4 | 2017-06-07T08:10:06.000Z | 2017-11-10T02:20:38.000Z | setup.py | Jumpscale/ays9 | 63bd414ff06372ba885c55eec528f427e63bcbe1 | [
"Apache-2.0"
] | 242 | 2017-05-18T10:51:48.000Z | 2019-09-18T15:09:47.000Z | setup.py | Jumpscale/ays9 | 63bd414ff06372ba885c55eec528f427e63bcbe1 | [
"Apache-2.0"
] | 5 | 2017-06-16T15:43:25.000Z | 2017-09-29T12:48:06.000Z | from setuptools import setup, find_packages
from setuptools.command.install import install as _install
from setuptools.command.develop import develop as _develop
import os
def _post_install(libname, libpath):
from js9 import j
# add this plugin to the config
c = j.core.state.configGet('plugins', defval={... | 25.746835 | 67 | 0.629302 | 652 | 0.320551 | 0 | 0 | 0 | 0 | 0 | 0 | 502 | 0.246804 |
74a4c95aba95c6ff272c009bc42f15868fc311a3 | 514 | py | Python | misc/build_proto.py | engeg/recipes-py | 9dac536b55887262b4ce846f3db7a7f596542e5e | [
"Apache-2.0"
] | 23 | 2016-01-20T00:45:26.000Z | 2022-02-26T04:25:30.000Z | misc/build_proto.py | engeg/recipes-py | 9dac536b55887262b4ce846f3db7a7f596542e5e | [
"Apache-2.0"
] | 8 | 2016-01-15T19:00:38.000Z | 2018-03-06T00:15:24.000Z | misc/build_proto.py | engeg/recipes-py | 9dac536b55887262b4ce846f3db7a7f596542e5e | [
"Apache-2.0"
] | 13 | 2015-09-05T05:52:43.000Z | 2019-07-08T17:34:27.000Z | #!/usr/bin/env vpython
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
from google.protobuf import json_format as jsonpb
ROOT = os.path.dirname(os.path.dirname(__file__))
sys.path.a... | 30.235294 | 77 | 0.766537 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 200 | 0.389105 |
74a63aca3e7e9199c9e3c65398a87cb9cc5d927d | 12,246 | py | Python | nettruyen_downloader_script.py | quantrancse/nettruyen-downloader-script | 1ff5d67fc3a99009385fd3ab5976c582246a2783 | [
"MIT"
] | 4 | 2020-09-15T16:29:53.000Z | 2022-02-18T17:36:46.000Z | nettruyen_downloader_script.py | quantrancse/nettruyen-downloader-script | 1ff5d67fc3a99009385fd3ab5976c582246a2783 | [
"MIT"
] | null | null | null | nettruyen_downloader_script.py | quantrancse/nettruyen-downloader-script | 1ff5d67fc3a99009385fd3ab5976c582246a2783 | [
"MIT"
] | 4 | 2021-07-06T04:26:15.000Z | 2022-01-07T05:55:46.000Z | import argparse
import signal
import sys
import time
from concurrent.futures import ThreadPoolExecutor
from os import mkdir
from os.path import isdir
from urllib.parse import urlparse
import requests
from bs4 import BeautifulSoup
HEADERS = {
'Connection': 'keep-alive',
'User-Agent': 'Mozilla/5.0... | 38.87619 | 153 | 0.565981 | 10,416 | 0.850563 | 0 | 0 | 0 | 0 | 0 | 0 | 2,086 | 0.170341 |
74a696dadca46d47b083f0630b23c6f4522f990b | 1,237 | py | Python | redash/handlers/__init__.py | fanhaipeng0403/redash | d0b074e21864b358e898d27fc2c01ebe96d7ba26 | [
"BSD-2-Clause"
] | null | null | null | redash/handlers/__init__.py | fanhaipeng0403/redash | d0b074e21864b358e898d27fc2c01ebe96d7ba26 | [
"BSD-2-Clause"
] | null | null | null | redash/handlers/__init__.py | fanhaipeng0403/redash | d0b074e21864b358e898d27fc2c01ebe96d7ba26 | [
"BSD-2-Clause"
] | null | null | null | from flask import jsonify
# redash __init__.py文件里
# setup_authentication(app)
# login_manager.init_app(app)
from flask_login import login_required
from redash.handlers.api import api
from redash.handlers.base import routes
from redash.monitor import get_status
from redash.permissions import require_super_admin
# Ha... | 22.490909 | 108 | 0.717057 | 0 | 0 | 0 | 0 | 207 | 0.134503 | 0 | 0 | 905 | 0.588044 |
74a8fdbcc478237889a10e97a2c4357eca96a428 | 3,017 | py | Python | tenff/__main__.py | rr-/10ff | 9be5cf03eda09f1fe0920d67d9e09d4886c34ef3 | [
"WTFPL"
] | 53 | 2017-09-30T16:05:39.000Z | 2022-02-04T08:19:26.000Z | tenff/__main__.py | rr-/10ff | 9be5cf03eda09f1fe0920d67d9e09d4886c34ef3 | [
"WTFPL"
] | 2 | 2017-12-08T10:07:42.000Z | 2020-05-20T21:46:27.000Z | tenff/__main__.py | rr-/10ff | 9be5cf03eda09f1fe0920d67d9e09d4886c34ef3 | [
"WTFPL"
] | 2 | 2019-12-18T04:23:10.000Z | 2020-09-25T10:31:04.000Z | """Main executable."""
import argparse
import asyncio
from tenff.game import GameSettings, run_game
from tenff.terminal import TerminalInputHandler
from tenff.util import CORPORA_PATH, get_corpus_path, parse_corpus
DEFAULT_TIME = 60
PROLOG = (
"A certain typing contest site spin-off in CLI, without all the "
... | 26.699115 | 78 | 0.608552 | 746 | 0.247265 | 0 | 0 | 0 | 0 | 0 | 0 | 894 | 0.296321 |
74a90fbaab5a1695a359f7f2248d252b5d5d1dbb | 2,248 | py | Python | python-algorithm/leetcode/problem_76.py | isudox/nerd-algorithm | c1fbe153953cf3fc24395f75d102016fdf9ea0fa | [
"MIT"
] | 5 | 2017-06-11T09:19:34.000Z | 2019-01-16T16:58:31.000Z | python-algorithm/leetcode/problem_76.py | isudox/leetcode-solution | 60085e64deaf396a171367affc94b18114565c43 | [
"MIT"
] | 5 | 2020-03-22T13:53:54.000Z | 2020-03-23T08:49:35.000Z | python-algorithm/leetcode/problem_76.py | isudox/nerd-algorithm | c1fbe153953cf3fc24395f75d102016fdf9ea0fa | [
"MIT"
] | 1 | 2019-03-02T15:50:43.000Z | 2019-03-02T15:50:43.000Z | """76. Minimum Window Substring
https://leetcode.com/problems/minimum-window-substring/
Given a string S and a string T, find the minimum window in S which will
contain all the characters in T in complexity O(n).
Example:
Input: S = "ADOBECODEBANC", T = "ABC"
Output: "BANC"
Note:
If there is no such window in S that... | 33.552239 | 77 | 0.479982 | 1,757 | 0.781584 | 0 | 0 | 0 | 0 | 0 | 0 | 572 | 0.254448 |
74ab68465c97b9a682ec0c65d4118ab45c6835b2 | 4,138 | py | Python | inventory/urls.py | common1/newassetcms | 65eee3c2ed9dac4cc56bfff863a6cbaff9830d26 | [
"MIT"
] | null | null | null | inventory/urls.py | common1/newassetcms | 65eee3c2ed9dac4cc56bfff863a6cbaff9830d26 | [
"MIT"
] | 7 | 2020-06-05T20:43:46.000Z | 2022-01-13T01:14:21.000Z | inventory/urls.py | common1/newassetcms | 65eee3c2ed9dac4cc56bfff863a6cbaff9830d26 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = 'inventory'
urlpatterns = [
path('assettypes/',
views.AssetTypesIndexView.as_view(), name='index_assettypes'),
path('assettypes/create/',
views.AssetTypeCreateView.as_view(), name='create_assettype'),
path('assettypes/update/<in... | 45.977778 | 80 | 0.694538 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,644 | 0.397293 |