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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
67bb468d4e8788f36e1783f576c1ab1f1ae90543 | 834 | py | Python | leetcode/binary_search/search_for_a_range.py | phantomnat/python-learning | addc7ba5fc4fb8920cdd2891d4b2e79efd1a524a | [
"MIT"
] | null | null | null | leetcode/binary_search/search_for_a_range.py | phantomnat/python-learning | addc7ba5fc4fb8920cdd2891d4b2e79efd1a524a | [
"MIT"
] | null | null | null | leetcode/binary_search/search_for_a_range.py | phantomnat/python-learning | addc7ba5fc4fb8920cdd2891d4b2e79efd1a524a | [
"MIT"
] | null | null | null | from typing import List
class Solution:
def searchRange(self, nums: List[int], target: int) -> List[int]:
l,r=0,len(nums)-1
ans = -1
while l<r:
m = (l+r)//2
if nums[m] < target:
l = m+1
else:
r = m
if nums[r] != tar... | 23.828571 | 69 | 0.425659 | 535 | 0.641487 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
67bbf09857ef02050b6c12ecac3ac6f6bf74d30b | 770 | py | Python | pi/Cart/main.py | polycart/polycart | 2c36921b126df237b109312a16dfb04f2b2ab20f | [
"Apache-2.0"
] | 3 | 2020-01-10T15:54:57.000Z | 2020-03-14T13:04:14.000Z | pi/Cart/main.py | polycart/polycart | 2c36921b126df237b109312a16dfb04f2b2ab20f | [
"Apache-2.0"
] | null | null | null | pi/Cart/main.py | polycart/polycart | 2c36921b126df237b109312a16dfb04f2b2ab20f | [
"Apache-2.0"
] | 1 | 2020-01-29T06:07:39.000Z | 2020-01-29T06:07:39.000Z | #!/usr/bin/python3
import cartinit
from kivy.app import App
from kivy.uix.screenmanager import Screen, ScreenManager, SlideTransition
from kivy.lang import Builder
from buttons import RoundedButton
cartinit.init()
# create ScreenManager as root, put all screens into
sm = ScreenManager()
sm.transition = SlideTransiti... | 18.780488 | 73 | 0.720779 | 248 | 0.322078 | 0 | 0 | 0 | 0 | 0 | 0 | 204 | 0.264935 |
67bece9167131625c374de6477b0b045ebb3b193 | 160 | py | Python | docs.bak/test.py | goujou/CompartmentalSystems | 4724555c33f11395ddc32738e8dfed7349ee155f | [
"MIT"
] | null | null | null | docs.bak/test.py | goujou/CompartmentalSystems | 4724555c33f11395ddc32738e8dfed7349ee155f | [
"MIT"
] | null | null | null | docs.bak/test.py | goujou/CompartmentalSystems | 4724555c33f11395ddc32738e8dfed7349ee155f | [
"MIT"
] | null | null | null | from CompartmentalSystems import smooth_reservoir_model
from CompartmentalSystems import smooth_model_run
from CompartmentalSystems import start_distributions
| 32 | 55 | 0.91875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
67bee977fd10b6b9e05e382910c3fcfaf854728d | 6,482 | py | Python | src/functions_DJTB.py | QTGTech/DJTB-Generator | 96c36516b4bede5fee7a538d79e1e7b380f9d31f | [
"Apache-2.0"
] | null | null | null | src/functions_DJTB.py | QTGTech/DJTB-Generator | 96c36516b4bede5fee7a538d79e1e7b380f9d31f | [
"Apache-2.0"
] | null | null | null | src/functions_DJTB.py | QTGTech/DJTB-Generator | 96c36516b4bede5fee7a538d79e1e7b380f9d31f | [
"Apache-2.0"
] | 1 | 2017-12-08T18:39:01.000Z | 2017-12-08T18:39:01.000Z | import numpy as np
import re
"""
"""
OCC_LIMIT = 10
def load_and_parse(filepath, verbose=True, pad_to_tweets=False, tweet_length=280):
"""
Le nom est plutot equivoque. Charge le fichier txt de chemin 'filepath' et retire les artefacts de parsing
:param filepath: chemin d'acces vers le fichier (.tx... | 38.583333 | 120 | 0.611848 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,547 | 0.392329 |
67bfb2a09270657736e8e4b32cff8a3a6b09b92a | 141 | py | Python | src/tsp_c/__init__.py | kjudom/tsp-c | 2ed4ba83ac14443533e6167edf20a4199e871657 | [
"MIT"
] | null | null | null | src/tsp_c/__init__.py | kjudom/tsp-c | 2ed4ba83ac14443533e6167edf20a4199e871657 | [
"MIT"
] | null | null | null | src/tsp_c/__init__.py | kjudom/tsp-c | 2ed4ba83ac14443533e6167edf20a4199e871657 | [
"MIT"
] | null | null | null | from . import _tsp_c
from .tsp_c import solve_greedy
from .tsp_c import solve_SA
from .tsp_c import set_param_SA
from .tsp_c import solve_PSO | 28.2 | 31 | 0.829787 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
67bff67472f4b5e6324ab64de0cd6d6f2c3905b9 | 4,496 | py | Python | biosimulators_test_suite/results/data_model.py | Ryannjordan/Biosimulators_test_suite | 5f79f157ee8927df277b1967e9409ccfc6baf45f | [
"CC0-1.0",
"MIT"
] | null | null | null | biosimulators_test_suite/results/data_model.py | Ryannjordan/Biosimulators_test_suite | 5f79f157ee8927df277b1967e9409ccfc6baf45f | [
"CC0-1.0",
"MIT"
] | null | null | null | biosimulators_test_suite/results/data_model.py | Ryannjordan/Biosimulators_test_suite | 5f79f157ee8927df277b1967e9409ccfc6baf45f | [
"CC0-1.0",
"MIT"
] | null | null | null | """ Data model for results of test cases
:Author: Jonathan Karr <[email protected]>
:Date: 2021-01-01
:Copyright: 2021, Center for Reproducible Biomedical Modeling
:License: MIT
"""
from .._version import __version__
from ..warnings import TestCaseWarning # noqa: F401
import enum
__all__ = [
'TestCaseResultType',
... | 37.157025 | 119 | 0.61121 | 4,119 | 0.916148 | 0 | 0 | 0 | 0 | 0 | 0 | 2,670 | 0.593861 |
67c0cd97d0c8bd3cb2723928b3e6589de9cc3b73 | 8,834 | py | Python | Projects/Project1/regan/regression.py | adelezaini/MachineLearning | dc3f34f5d509bed6a993705373c46be4da3f97db | [
"MIT"
] | null | null | null | Projects/Project1/regan/regression.py | adelezaini/MachineLearning | dc3f34f5d509bed6a993705373c46be4da3f97db | [
"MIT"
] | 1 | 2021-10-03T15:16:07.000Z | 2021-10-03T15:16:07.000Z | Projects/Project1/regan/regression.py | adelezaini/MachineLearning | dc3f34f5d509bed6a993705373c46be4da3f97db | [
"MIT"
] | null | null | null | # The MIT License (MIT)
#
# Copyright © 2021 Fridtjof Gjengset, Adele Zaini, Gaute Holen
#
# 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
... | 38.745614 | 191 | 0.695381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,236 | 0.365774 |
67c210c665f75559fb74fd11831d3b0f31fccc08 | 3,521 | py | Python | habittracker/commands/list-habits.py | anjakuchenbecker/oofpp_habits_project | 5db8e46fedc7ce839008bf8a7f00eabfee2ba901 | [
"MIT"
] | 2 | 2021-02-16T16:49:16.000Z | 2021-05-13T13:22:02.000Z | habittracker/commands/list-habits.py | anjakuchenbecker/oofpp_habits_project | 5db8e46fedc7ce839008bf8a7f00eabfee2ba901 | [
"MIT"
] | null | null | null | habittracker/commands/list-habits.py | anjakuchenbecker/oofpp_habits_project | 5db8e46fedc7ce839008bf8a7f00eabfee2ba901 | [
"MIT"
] | null | null | null | import json
import shelve
import sys
import os
import click
from prettytable import PrettyTable
import app_config as conf
import analytics
def get_json_out(raw_text):
"""Convert input raw text and return JSON."""
return json.dumps(raw_text, indent=4, sort_keys=False)
def get_human_out(raw... | 44.0125 | 113 | 0.585345 | 0 | 0 | 0 | 0 | 2,780 | 0.789548 | 0 | 0 | 1,400 | 0.397614 |
67c2e5278bdfc21f2e207b4643b01e0663656b3d | 4,065 | py | Python | src/zhinst/toolkit/helpers/shf_waveform.py | MadSciSoCool/zhinst-toolkit | 5ea884db03f53029552b7898dae310f22ce622ba | [
"MIT"
] | null | null | null | src/zhinst/toolkit/helpers/shf_waveform.py | MadSciSoCool/zhinst-toolkit | 5ea884db03f53029552b7898dae310f22ce622ba | [
"MIT"
] | null | null | null | src/zhinst/toolkit/helpers/shf_waveform.py | MadSciSoCool/zhinst-toolkit | 5ea884db03f53029552b7898dae310f22ce622ba | [
"MIT"
] | null | null | null | # Copyright (C) 2020 Zurich Instruments
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
import numpy as np
class SHFWaveform(object):
"""Implements a waveform for single channel.
The 'data' attribute holds the waveform samples with th... | 34.74359 | 87 | 0.60861 | 3,880 | 0.95449 | 0 | 0 | 185 | 0.04551 | 0 | 0 | 1,999 | 0.491759 |
67c3fb858e01fe9489719be010810d56f24cb176 | 3,905 | py | Python | mongoadmin/auth/forms.py | hywhut/django-mongoadmin | 7252f9724e4d556878a907914424745f5fdb0d42 | [
"BSD-3-Clause"
] | null | null | null | mongoadmin/auth/forms.py | hywhut/django-mongoadmin | 7252f9724e4d556878a907914424745f5fdb0d42 | [
"BSD-3-Clause"
] | null | null | null | mongoadmin/auth/forms.py | hywhut/django-mongoadmin | 7252f9724e4d556878a907914424745f5fdb0d42 | [
"BSD-3-Clause"
] | 1 | 2020-05-10T13:57:36.000Z | 2020-05-10T13:57:36.000Z | # from django.utils.translation import ugettext_lazy as _
# from django import forms
# from django.contrib.auth.forms import ReadOnlyPasswordHashField
#
# from mongoengine.django.auth import User
#
# from mongodbforms import DocumentForm
#
# class UserCreationForm(DocumentForm):
# """
# A form that creates a us... | 40.257732 | 81 | 0.589245 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,809 | 0.975416 |
67c4dc33394c474c6cabe97b41d6b2b8fa22728a | 2,554 | py | Python | odin-libraries/python/odin_test.py | gspu/odin | a01d039e809eca257fa78d358fe72eb3ad2a09f2 | [
"MIT"
] | 447 | 2020-05-21T11:22:16.000Z | 2022-03-13T01:28:25.000Z | odin-libraries/python/odin_test.py | gspu/odin | a01d039e809eca257fa78d358fe72eb3ad2a09f2 | [
"MIT"
] | 40 | 2020-05-21T13:17:57.000Z | 2022-03-02T08:44:45.000Z | odin-libraries/python/odin_test.py | gspu/odin | a01d039e809eca257fa78d358fe72eb3ad2a09f2 | [
"MIT"
] | 25 | 2020-05-28T21:23:13.000Z | 2022-03-18T19:31:31.000Z | """ Runs tests for Ptyhon Odin SDK """
import unittest
from os import environ
import random
from pymongo import MongoClient
import pyodin as odin
class OdinSdkTest(unittest.TestCase):
""" Establish OdinSdkTest object """
def setUp(self):
client = MongoClient(environ.get('ODIN_MONGODB'))
mongo... | 34.513514 | 94 | 0.664056 | 2,341 | 0.916601 | 0 | 0 | 0 | 0 | 0 | 0 | 705 | 0.276038 |
67c4e469d6bfee9cfc7c187e94df576f7ce20488 | 657 | py | Python | artemis/general/test_dict_ops.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | 235 | 2016-08-26T14:18:51.000Z | 2022-03-13T10:54:39.000Z | artemis/general/test_dict_ops.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | 112 | 2016-04-30T11:48:38.000Z | 2021-01-12T20:17:32.000Z | artemis/general/test_dict_ops.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | 31 | 2016-11-05T19:09:19.000Z | 2021-09-13T07:35:40.000Z | from artemis.general.dict_ops import cross_dict_dicts, merge_dicts
__author__ = 'peter'
def test_cross_dict_dicts():
assert cross_dict_dicts({'a':{'aa': 1}, 'b':{'bb': 2}}, {'c': {'cc': 3}, 'd': {'dd': 4}}) == {
('a','c'):{'aa':1, 'cc':3},
('a','d'):{'aa':1, 'dd':4},
('b','c'):{'bb':2, 'c... | 22.655172 | 98 | 0.427702 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 137 | 0.208524 |
67c5e84b87b6ce3f11354746686bb279c5332a32 | 1,317 | py | Python | plur/eval/cubert_swapped_operand_classification_eval.py | VHellendoorn/plur | 63ea4b8dd44b43d26177fb23b0572e0b7c20f4cd | [
"Apache-2.0"
] | 52 | 2021-12-03T17:54:27.000Z | 2022-03-30T13:38:16.000Z | plur/eval/cubert_swapped_operand_classification_eval.py | VHellendoorn/plur | 63ea4b8dd44b43d26177fb23b0572e0b7c20f4cd | [
"Apache-2.0"
] | 2 | 2022-02-18T01:04:45.000Z | 2022-03-31T17:20:25.000Z | plur/eval/cubert_swapped_operand_classification_eval.py | VHellendoorn/plur | 63ea4b8dd44b43d26177fb23b0572e0b7c20f4cd | [
"Apache-2.0"
] | 6 | 2021-12-21T06:00:44.000Z | 2022-03-30T21:10:46.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 38.735294 | 112 | 0.742597 | 488 | 0.370539 | 0 | 0 | 0 | 0 | 0 | 0 | 687 | 0.52164 |
67c77d71f1fdbcad027edc06ae60ed4f292fc007 | 908 | py | Python | Dynamic Programming/Paint House II.py | ikaushikpal/DS-450-python | 9466f77fb9db9e6a5bb3f20aa89ba6332f49e848 | [
"MIT"
] | 3 | 2021-06-28T12:04:19.000Z | 2021-09-07T07:23:41.000Z | Dynamic Programming/Paint House II.py | ikaushikpal/DS-450-python | 9466f77fb9db9e6a5bb3f20aa89ba6332f49e848 | [
"MIT"
] | null | null | null | Dynamic Programming/Paint House II.py | ikaushikpal/DS-450-python | 9466f77fb9db9e6a5bb3f20aa89ba6332f49e848 | [
"MIT"
] | 1 | 2021-06-28T15:42:55.000Z | 2021-06-28T15:42:55.000Z | class Solution:
def paintHouse(self, cost:list, houses:int, colors:int)->int:
if houses == 0: # no houses to paint
return 0
if colors == 0: # no colors to paint houses
return 0
dp = [[0]*colors for _ in range(houses)]
dp[0] = cost[0]... | 29.290323 | 66 | 0.4163 | 652 | 0.718062 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.064978 |
67c9536255b8a2a78151de4a15608734a1f092c8 | 6,445 | py | Python | dufi/gui/balloontip/__init__.py | Shura1oplot/dufi | c9c25524020e57d3670c298acca305900b6490e7 | [
"MIT"
] | null | null | null | dufi/gui/balloontip/__init__.py | Shura1oplot/dufi | c9c25524020e57d3670c298acca305900b6490e7 | [
"MIT"
] | null | null | null | dufi/gui/balloontip/__init__.py | Shura1oplot/dufi | c9c25524020e57d3670c298acca305900b6490e7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, division, print_function, absolute_import
import sys
import os
import threading
import warnings
import locale
import logging
import win32api
import win32con
import win32gui
import win32ts
PY2 = sys.version_info < (3,)
if PY2:
... | 31.286408 | 84 | 0.611482 | 4,885 | 0.757952 | 0 | 0 | 593 | 0.092009 | 0 | 0 | 716 | 0.111094 |
67caf9eed648abdd18c55cb059b56dcfdeff5272 | 7,893 | py | Python | ProxyIP.py | plumefox/BiliTrend | 449bade3cbaa92878fab866457f513aa81dcd567 | [
"Apache-2.0"
] | 2 | 2019-05-11T18:05:34.000Z | 2022-02-18T13:34:21.000Z | ProxyIP.py | plumefox/BiliTrend | 449bade3cbaa92878fab866457f513aa81dcd567 | [
"Apache-2.0"
] | null | null | null | ProxyIP.py | plumefox/BiliTrend | 449bade3cbaa92878fab866457f513aa81dcd567 | [
"Apache-2.0"
] | null | null | null | # * coding:utf-8 *
# Author : Lucy Cai
# Create Time : 2019/4/12
# IDE : PyCharm
# Copyright(C) 2019 Lucy Cai/plumefox ([email protected])
# Github:https://github.com/plumefox/BiliTrend/
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | 33.444915 | 149 | 0.548714 | 6,534 | 0.825313 | 0 | 0 | 0 | 0 | 0 | 0 | 2,190 | 0.27662 |
67cc334615da33b43cc91dce1c8d5fcb9a162b36 | 29,914 | py | Python | name_matching/test/test_name_matcher.py | DeNederlandscheBank/name_matching | 366a376596403a1fd912cbf130062016b82306bf | [
"MIT"
] | null | null | null | name_matching/test/test_name_matcher.py | DeNederlandscheBank/name_matching | 366a376596403a1fd912cbf130062016b82306bf | [
"MIT"
] | null | null | null | name_matching/test/test_name_matcher.py | DeNederlandscheBank/name_matching | 366a376596403a1fd912cbf130062016b82306bf | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import os.path as path
import abydos.distance as abd
import abydos.phonetic as abp
import pytest
from scipy.sparse import csc_matrix
from sklearn.feature_extraction.text import TfidfVectorizer
import name_matching.name_matcher as nm
@pytest.fixture
def name_match():
package... | 55.499072 | 197 | 0.526576 | 0 | 0 | 0 | 0 | 28,443 | 0.950699 | 0 | 0 | 7,513 | 0.25112 |
67ccd647dc5505b2bf0b3f2efbfadce995daded7 | 645 | py | Python | data/train/python/67ccd647dc5505b2bf0b3f2efbfadce995daded7create_new_default.py | harshp8l/deep-learning-lang-detection | 2a54293181c1c2b1a2b840ddee4d4d80177efb33 | [
"MIT"
] | 84 | 2017-10-25T15:49:21.000Z | 2021-11-28T21:25:54.000Z | data/train/python/67ccd647dc5505b2bf0b3f2efbfadce995daded7create_new_default.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 5 | 2018-03-29T11:50:46.000Z | 2021-04-26T13:33:18.000Z | data/train/python/67ccd647dc5505b2bf0b3f2efbfadce995daded7create_new_default.py | vassalos/deep-learning-lang-detection | cbb00b3e81bed3a64553f9c6aa6138b2511e544e | [
"MIT"
] | 24 | 2017-11-22T08:31:00.000Z | 2022-03-27T01:22:31.000Z | '''
Created on Dec 21, 2014
@author: Ben
'''
def create_new_default(directory: str, dest: dict, param: dict):
'''
Creates new default parameter file based on parameter settings
'''
with open(directory, 'w') as new_default:
new_default.write(
'''TARGET DESTINATION = {}
SAVE DESTINATION = {}... | 23.888889 | 70 | 0.612403 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 383 | 0.593798 |
67cdceeb2a0e37311849079ddc2d4d94bc900a6a | 4,129 | py | Python | analysis/SiPMPE_reader.py | akira-okumura/isee_sipm | dff98c82ed8ef950c450c83ad8951743e3799e94 | [
"MIT"
] | 1 | 2019-07-08T02:43:12.000Z | 2019-07-08T02:43:12.000Z | analysis/SiPMPE_reader.py | akira-okumura/ISEE_SiPM | dff98c82ed8ef950c450c83ad8951743e3799e94 | [
"MIT"
] | null | null | null | analysis/SiPMPE_reader.py | akira-okumura/ISEE_SiPM | dff98c82ed8ef950c450c83ad8951743e3799e94 | [
"MIT"
] | null | null | null | import numpy as np
import math
import ROOT
import sys
class DistrReader:
def __init__(self, dataset):
self.stat_error = 0
self.sys_error = 0
self.plambda = 0
self.dataset = str(dataset)
self.hist = ROOT.TH1D('','', 100, -0.2, 0.2)
self.distr = ROOT.TH1D('','', 64, 0,... | 34.123967 | 102 | 0.534996 | 3,627 | 0.878421 | 0 | 0 | 0 | 0 | 0 | 0 | 509 | 0.123274 |
67cde7d5e3ff3451bd18f756ff702549907cc3a3 | 2,364 | py | Python | bad_apps_blog/__init__.py | bkesk/bad-apps-blog | 86df1e848cd17f17bce9bb06d6c1ac1f81b23b9e | [
"BSD-3-Clause"
] | null | null | null | bad_apps_blog/__init__.py | bkesk/bad-apps-blog | 86df1e848cd17f17bce9bb06d6c1ac1f81b23b9e | [
"BSD-3-Clause"
] | 1 | 2022-03-31T00:30:57.000Z | 2022-03-31T21:31:17.000Z | bad_apps_blog/__init__.py | bkesk/bad-apps-blog | 86df1e848cd17f17bce9bb06d6c1ac1f81b23b9e | [
"BSD-3-Clause"
] | null | null | null | """
Bad Apps Blog
Author: Brandon Eskridge (a.k.a. 7UR7L3)
(Initial commit is based on the official Flask tutorial)
About: This app began as an (essentially) exact copy
of the official Flask tutorial (linke below). It is
intented as an opportunity to practice application
security, secure design, and secure coding t... | 29.55 | 112 | 0.706853 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,280 | 0.541455 |
67ce55c048774bb454c705b23d4003d7370d1d13 | 204 | py | Python | status/urls.py | Khryptooo/infra_api | 15b69dea8e0ce1795525f96d9362722151b3c8f7 | [
"BSD-2-Clause"
] | null | null | null | status/urls.py | Khryptooo/infra_api | 15b69dea8e0ce1795525f96d9362722151b3c8f7 | [
"BSD-2-Clause"
] | null | null | null | status/urls.py | Khryptooo/infra_api | 15b69dea8e0ce1795525f96d9362722151b3c8f7 | [
"BSD-2-Clause"
] | null | null | null | from django.conf.urls import patterns, url
from status import views
urlpatterns = patterns('',
url(r'^ups$', views.ups_status, name='ups_status'),
url(r'^tor$', views.tor_status, name='tor_status'),
)
| 25.5 | 52 | 0.720588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.205882 |
67ce7c38eacf87bac8bd21b2a7cec718eeabebeb | 9,100 | py | Python | automation/auto_update_image_pr.py | WaqasAhmedLatif/cloud-native-edition | 1e6002f27ea971c153df59373e30d4506e9932dc | [
"Apache-2.0"
] | 23 | 2020-04-18T14:51:41.000Z | 2022-03-31T19:59:40.000Z | automation/auto_update_image_pr.py | WaqasAhmedLatif/cloud-native-edition | 1e6002f27ea971c153df59373e30d4506e9932dc | [
"Apache-2.0"
] | 236 | 2020-04-22T08:59:27.000Z | 2022-03-31T07:21:12.000Z | automation/auto_update_image_pr.py | WaqasAhmedLatif/cloud-native-edition | 1e6002f27ea971c153df59373e30d4506e9932dc | [
"Apache-2.0"
] | 23 | 2020-04-19T15:25:59.000Z | 2022-03-16T17:17:36.000Z | import os
import json
from common import update_json_file, get_logger, exec_cmd
from yamlparser import Parser
from pathlib import Path
logger = get_logger("update-image")
# Functions that work to update gluu_versions.json
def determine_final_official_and_dev_version(tag_list):
"""
Determine official version... | 42.325581 | 120 | 0.656703 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,357 | 0.259011 |
67ce95b83726624dc137a006b385290c23c7bf1c | 2,767 | py | Python | es_reporting_tool/generate_report.py | yugendra/elasticsearch_reporting_tool | bdbb5ae95efdc7552d9dfe771ecf44432246d7bb | [
"Apache-2.0"
] | null | null | null | es_reporting_tool/generate_report.py | yugendra/elasticsearch_reporting_tool | bdbb5ae95efdc7552d9dfe771ecf44432246d7bb | [
"Apache-2.0"
] | 4 | 2021-06-01T21:49:24.000Z | 2022-01-13T00:39:06.000Z | es_reporting_tool/generate_report.py | yugendra/elasticsearch_reporting_tool | bdbb5ae95efdc7552d9dfe771ecf44432246d7bb | [
"Apache-2.0"
] | null | null | null | from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.lib.units import inch
from reportlab.lib.pagesizes import A3
from reportlab.platypus import Paragraph, SimpleDocTemplate, Table, TableStyle
from reportlab.lib.enums import TA_CENTER
import datetime
class Crea... | 36.893333 | 118 | 0.550777 | 2,455 | 0.887243 | 0 | 0 | 0 | 0 | 0 | 0 | 203 | 0.073365 |
67cee025d3929b6dcb02f8283d7e7b80eb2a3619 | 2,958 | py | Python | fe/functional.py | proteneer/timemachine | feee9f24adcb533ab9e1c15a3f4fa4dcc9d9a701 | [
"Apache-2.0"
] | 91 | 2019-01-05T17:03:04.000Z | 2022-03-11T09:08:46.000Z | fe/functional.py | proteneer/timemachine | feee9f24adcb533ab9e1c15a3f4fa4dcc9d9a701 | [
"Apache-2.0"
] | 474 | 2019-01-07T14:33:15.000Z | 2022-03-31T19:15:12.000Z | fe/functional.py | proteneer/timemachine | feee9f24adcb533ab9e1c15a3f4fa4dcc9d9a701 | [
"Apache-2.0"
] | 12 | 2019-01-13T00:40:36.000Z | 2022-01-14T10:23:54.000Z | from jax import config
config.update("jax_enable_x64", True)
from jax import custom_jvp, numpy as np
from timemachine.lib.potentials import SummedPotential
def _make_selection_mask(compute_du_dx=False, compute_du_dp=False, compute_du_dl=False, compute_u=False):
return (compute_du_dx, compute_du_dp, compute_du_... | 36.975 | 111 | 0.713658 | 0 | 0 | 0 | 0 | 226 | 0.076403 | 0 | 0 | 829 | 0.280257 |
67cf0d02161a3633d1e7bda727c4a5909dae5bbc | 996 | py | Python | utilityfiles/race.py | IronicNinja/covid19api | f96a18c646379fe144db228eaa3c69d66125628d | [
"MIT"
] | 1 | 2020-09-16T05:18:54.000Z | 2020-09-16T05:18:54.000Z | utilityfiles/race.py | IronicNinja/covid19api | f96a18c646379fe144db228eaa3c69d66125628d | [
"MIT"
] | null | null | null | utilityfiles/race.py | IronicNinja/covid19api | f96a18c646379fe144db228eaa3c69d66125628d | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup as soup
from urllib.request import Request, urlopen
from datetime import date
import math
import openpyxl
import pandas as pd
fname = 'https://www.governing.com/gov-data/census/state-minority-population-data-estimates.html'
req = Request(fname, headers={'User-Agent': 'Mozilla/5.0'})
webpa... | 25.538462 | 97 | 0.63755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 248 | 0.248996 |
67d227f164d327f585654ba9c51b22b4d48f67c1 | 7,601 | py | Python | prioListe/utils.py | FelixTheC/allSales | 76d955b80bf9b5bb58bd53d8ee644249cf04e1a3 | [
"Apache-2.0"
] | null | null | null | prioListe/utils.py | FelixTheC/allSales | 76d955b80bf9b5bb58bd53d8ee644249cf04e1a3 | [
"Apache-2.0"
] | null | null | null | prioListe/utils.py | FelixTheC/allSales | 76d955b80bf9b5bb58bd53d8ee644249cf04e1a3 | [
"Apache-2.0"
] | null | null | null | from django.core.exceptions import FieldError
from staff.models import Staff
import re
def get_choices():
# choices in a seperated funtion to change it easier
STATUS_CHOICES = (
('', ''),
('Test', 'Test'),
('Fertig', 'Fertig'),
('Löschen', 'Löschen'),
('Vertrieb', 'Vert... | 32.482906 | 104 | 0.568215 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,766 | 0.232246 |
67d23e8a7d069e05acd374ed761b417602e522e5 | 287 | py | Python | app/pydantic_models/phone.py | matiasbavera/fastapi-tortoise-fk-example | b61b202e20604a03bb36291fc534935048f17187 | [
"Apache-2.0"
] | null | null | null | app/pydantic_models/phone.py | matiasbavera/fastapi-tortoise-fk-example | b61b202e20604a03bb36291fc534935048f17187 | [
"Apache-2.0"
] | null | null | null | app/pydantic_models/phone.py | matiasbavera/fastapi-tortoise-fk-example | b61b202e20604a03bb36291fc534935048f17187 | [
"Apache-2.0"
] | null | null | null | from pydantic import BaseModel
from app.orm_models.phone import Phone
from tortoise.contrib.pydantic import pydantic_model_creator
Phone_Pydantic = pydantic_model_creator(Phone, name="Phone")
PhoneIn_Pydantic = pydantic_model_creator(
Phone, name="PhoneIn", exclude_readonly=True)
| 31.888889 | 60 | 0.832753 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.055749 |
67d27163450c56993ca54027a1f3ba12395df50b | 6,403 | py | Python | suls/mealymachine.py | TCatshoek/lstar | 042b0ae3a0627db7a412c828f3752a9c30928ec1 | [
"MIT"
] | 2 | 2019-10-15T11:28:12.000Z | 2021-01-28T15:14:09.000Z | suls/mealymachine.py | TCatshoek/lstar | 042b0ae3a0627db7a412c828f3752a9c30928ec1 | [
"MIT"
] | null | null | null | suls/mealymachine.py | TCatshoek/lstar | 042b0ae3a0627db7a412c828f3752a9c30928ec1 | [
"MIT"
] | null | null | null |
# Need this to fix types
from __future__ import annotations
import tempfile
import threading
from typing import Union, Iterable, Dict, Tuple
from suls.sul import SUL
from graphviz import Digraph
import random
from itertools import product
class MealyState:
def __init__(self, name: str, edges: Dict[str, Tuple[M... | 34.240642 | 116 | 0.562236 | 6,099 | 0.952522 | 0 | 0 | 0 | 0 | 0 | 0 | 1,195 | 0.186631 |
67d2e3d4874353fb5ea93748eaef79e0a94659bb | 636 | py | Python | app/email.py | DXYyang/shenNeng_gasAnalysis | d94e2451d1938c090d1377dfbd487d0c6a649188 | [
"MIT"
] | 1 | 2020-02-16T04:32:15.000Z | 2020-02-16T04:32:15.000Z | app/email.py | DXYyang/shenNeng_gasAnalysis | d94e2451d1938c090d1377dfbd487d0c6a649188 | [
"MIT"
] | null | null | null | app/email.py | DXYyang/shenNeng_gasAnalysis | d94e2451d1938c090d1377dfbd487d0c6a649188 | [
"MIT"
] | null | null | null | from threading import Thread
from flask import current_app,render_template
from flask_mail import Message
from . import mail
def send_async_email(app,msg):
with app.app_context():
mail.send(msg)
def send_email(to,subject,template,**kwargs):
app=current_app._get_current_object()
msg=Message(app.con... | 35.333333 | 72 | 0.72956 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.100629 |
67d3514f1ace46de9127a9a4a21e892c7ad712e0 | 29,708 | py | Python | MAIN_FIGURES.py | tortugar/Schott_etal_2022 | 5cccec4d59184397df39f0bae3544b9c8294ffe2 | [
"MIT"
] | null | null | null | MAIN_FIGURES.py | tortugar/Schott_etal_2022 | 5cccec4d59184397df39f0bae3544b9c8294ffe2 | [
"MIT"
] | null | null | null | MAIN_FIGURES.py | tortugar/Schott_etal_2022 | 5cccec4d59184397df39f0bae3544b9c8294ffe2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Oct 10 18:30:46 2021
@author: fearthekraken
"""
import AS
import pwaves
import sleepy
import pandas as pd
#%%
### FIGURE 1C - example EEGs for NREM, IS, and REM ###
ppath = '/home/fearthekraken/Documents/Data/photometry'
AS.plot_example(ppath, 'ha... | 60.752556 | 150 | 0.660832 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10,127 | 0.340885 |
67d3ce8adb8ddc67219cf049efed17f327e1aab1 | 42 | py | Python | bitmovin/services/filters/__init__.py | camberbridge/bitmovin-python | 3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95 | [
"Unlicense"
] | 44 | 2016-12-12T17:37:23.000Z | 2021-03-03T09:48:48.000Z | bitmovin/services/filters/__init__.py | camberbridge/bitmovin-python | 3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95 | [
"Unlicense"
] | 38 | 2017-01-09T14:45:45.000Z | 2022-02-27T18:04:33.000Z | bitmovin/services/filters/__init__.py | camberbridge/bitmovin-python | 3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95 | [
"Unlicense"
] | 27 | 2017-02-02T22:49:31.000Z | 2019-11-21T07:04:57.000Z | from .filter_service import FilterService
| 21 | 41 | 0.880952 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
67d3edf3fcff0ea5f8066746c234cf386931fcea | 4,177 | py | Python | inspect_population.py | puzis/OverflowPrediction | 01341df701e513025cb427d4cdf1db0868a5963b | [
"MIT"
] | 5 | 2019-11-19T11:53:23.000Z | 2022-03-11T05:54:46.000Z | inspect_population.py | puzis/OverflowPrediction | 01341df701e513025cb427d4cdf1db0868a5963b | [
"MIT"
] | 5 | 2020-05-29T23:53:14.000Z | 2022-03-12T00:05:11.000Z | inspect_population.py | erap129/EEGNAS | 1d9c94b106d40317146f7f09d79fad489f1059dc | [
"MIT"
] | 1 | 2021-12-17T14:25:04.000Z | 2021-12-17T14:25:04.000Z | import pickle
from copy import deepcopy
from graphviz import Digraph
from torch.nn import Conv2d, MaxPool2d, ELU, Dropout, BatchNorm2d
import pandas as pd
from EEGNAS.model_generation.abstract_layers import IdentityLayer, ConvLayer, PoolingLayer, ActivationLayer
from EEGNAS.model_generation.custom_modules import Ident... | 44.913978 | 201 | 0.677041 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,170 | 0.280105 |
67d91682b7361980dedb029fa4ec3aa3743a4f6d | 3,910 | py | Python | implementations/rest/bin/authhandlers.py | djsincla/SplunkModularInputsPythonFramework | 1dd215214f3d2644cb358e41f4105fe40cff5393 | [
"Apache-2.0"
] | 3 | 2020-08-31T00:59:26.000Z | 2021-10-19T22:01:00.000Z | implementations/rest/bin/authhandlers.py | djsincla/SplunkModularInputsPythonFramework | 1dd215214f3d2644cb358e41f4105fe40cff5393 | [
"Apache-2.0"
] | null | null | null | implementations/rest/bin/authhandlers.py | djsincla/SplunkModularInputsPythonFramework | 1dd215214f3d2644cb358e41f4105fe40cff5393 | [
"Apache-2.0"
] | null | null | null | from requests.auth import AuthBase
import hmac
import base64
import hashlib
import urlparse
import urllib
#add your custom auth handler class to this module
class MyEncryptedCredentialsAuthHAndler(AuthBase):
def __init__(self,**args):
# setup any auth-related data here
#self.username = args['usern... | 29.179104 | 100 | 0.586701 | 3,584 | 0.916624 | 0 | 0 | 0 | 0 | 0 | 0 | 1,082 | 0.276726 |
67d9abf1948658a2c5e38ae12ec4d8b8adf3bd58 | 1,515 | py | Python | sdk/core/azure-core/azure/core/pipeline/policies/authentication_async.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/core/azure-core/azure/core/pipeline/policies/authentication_async.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/core/azure-core/azure/core/pipeline/policies/authentication_async.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from azure... | 48.870968 | 113 | 0.681848 | 990 | 0.653465 | 0 | 0 | 0 | 0 | 612 | 0.40396 | 937 | 0.618482 |
67da024b54f0853f0965d1f566e700aad7c2a74c | 152 | py | Python | pbt/population/__init__.py | automl/HPO_for_RL | d82c7ddd6fe19834c088137570530f11761d9390 | [
"Apache-2.0"
] | 9 | 2021-06-22T08:54:19.000Z | 2022-03-28T09:10:59.000Z | pbt/population/__init__.py | automl/HPO_for_RL | d82c7ddd6fe19834c088137570530f11761d9390 | [
"Apache-2.0"
] | null | null | null | pbt/population/__init__.py | automl/HPO_for_RL | d82c7ddd6fe19834c088137570530f11761d9390 | [
"Apache-2.0"
] | null | null | null | from .trial import Trial, NoTrial
from .member import Member
from .population import Population
__all__ = ['Trial', 'NoTrial', 'Member', 'Population']
| 25.333333 | 54 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.236842 |
67da0e87556ec7b055d13f1258cbac356a9a64d2 | 7,003 | py | Python | darth/process.py | OOXXXXOO/DARTH | bd899acc7a777157f393c7078b9deccbf6e7e461 | [
"Apache-2.0"
] | 11 | 2020-06-30T03:57:41.000Z | 2021-05-20T13:19:41.000Z | darth/process.py | ceresman/darth | 038cd7cdc18771b73873bd5a8653c89655336448 | [
"Apache-2.0"
] | 3 | 2021-09-08T02:14:52.000Z | 2022-03-12T00:37:29.000Z | darth/process.py | ceresman/darth | 038cd7cdc18771b73873bd5a8653c89655336448 | [
"Apache-2.0"
] | 6 | 2020-07-01T06:11:43.000Z | 2020-09-11T05:57:41.000Z | import multiprocessing
from tqdm import tqdm
import os
import gdal
from .downloader import downloader
from .obsclient import bucket
from .vector import Vector
def Process(
VectorDataSource,
WgsCord,
Class_key,
DataSourcesType='Google China',
DataSetName="DataSet",
Remote_dataset_root="DataS... | 31.977169 | 109 | 0.456519 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,157 | 0.450807 |
67dbe149e9deb1f839afee4ecf248d5698ff9007 | 1,016 | py | Python | setup.py | Willd14469/cj8-patient-panthers | b977091c19cd0e7299f91ebd94ce25c086661fd7 | [
"MIT"
] | 1 | 2021-10-04T09:42:58.000Z | 2021-10-04T09:42:58.000Z | setup.py | Willd14469/cj8-patient-panthers | b977091c19cd0e7299f91ebd94ce25c086661fd7 | [
"MIT"
] | 5 | 2021-07-17T13:24:42.000Z | 2021-07-17T13:35:32.000Z | setup.py | Willd14469/cj8-patient-panthers | b977091c19cd0e7299f91ebd94ce25c086661fd7 | [
"MIT"
] | null | null | null | import sys
from setuptools import setup
required_packages = ["boombox", "Pillow", "PyYAML", "rich"]
win_packages = ["keyboard"]
unix_packages = ["pynput"]
WIN = "win32"
LINUX = "linux"
MACOS = "darwin"
if sys.platform == WIN:
required_packages += win_packages
elif sys.platform in (LINUX, MACOS):
required_pa... | 23.627907 | 73 | 0.616142 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 387 | 0.380906 |
67dc3420f8889bf1e85452c17cc2bb0c45148c0c | 2,609 | py | Python | lunch_handler.py | wimo7083/Wheel-Of-Lunch-Slack-Bot | 7bcb8cc6a4ccd1b6034a9e3a60b470a1934962ef | [
"MIT"
] | 1 | 2018-03-27T04:01:19.000Z | 2018-03-27T04:01:19.000Z | lunch_handler.py | wimo7083/Wheel-Of-Lunch-Slack-Bot | 7bcb8cc6a4ccd1b6034a9e3a60b470a1934962ef | [
"MIT"
] | 2 | 2018-04-22T22:25:44.000Z | 2018-05-26T03:10:08.000Z | lunch_handler.py | wimo7083/Wheel-Of-Lunch-Slack-Bot | 7bcb8cc6a4ccd1b6034a9e3a60b470a1934962ef | [
"MIT"
] | null | null | null | from zipcodes import is_valid
from random import randint
from all_lunch_locs import call_lunch_api
default_max = 30
default_range = 20
def random_zip():
# because what matters is good food, not close food.
random_zip = 0
# because strings are required for this module
while not is_valid(str(random_zip... | 31.817073 | 156 | 0.690303 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 858 | 0.328862 |
67e03d999e85af82b3115a02553d48dddb7a3aa2 | 1,414 | py | Python | py-insta/__init__.py | ItsTrakos/Py-insta | 483725f13b7c7eab0261b461c7ec507d1109a9f4 | [
"Unlicense"
] | null | null | null | py-insta/__init__.py | ItsTrakos/Py-insta | 483725f13b7c7eab0261b461c7ec507d1109a9f4 | [
"Unlicense"
] | null | null | null | py-insta/__init__.py | ItsTrakos/Py-insta | 483725f13b7c7eab0261b461c7ec507d1109a9f4 | [
"Unlicense"
] | null | null | null |
"""
# -*- coding: utf-8 -*-
__author__ = "Trakos"
__email__ = "[email protected]"
__version__ = 1.0.0"
__copyright__ = "Copyright (c) 2019 -2021 Leonard Richardson"
# Use of this source code is governed by the MIT license.
__license__ = "MIT"
Description:
py-Insta Is A Python Library
... | 32.883721 | 117 | 0.562942 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 89 | 0.062942 |
67e244309b1b3c160456702586e33422cb197d21 | 1,182 | py | Python | pyopenproject/business/services/command/membership/create.py | webu/pyopenproject | 40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966 | [
"MIT"
] | 5 | 2021-02-25T15:54:28.000Z | 2021-04-22T15:43:36.000Z | pyopenproject/business/services/command/membership/create.py | webu/pyopenproject | 40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966 | [
"MIT"
] | 7 | 2021-03-15T16:26:23.000Z | 2022-03-16T13:45:18.000Z | pyopenproject/business/services/command/membership/create.py | webu/pyopenproject | 40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966 | [
"MIT"
] | 6 | 2021-06-18T18:59:11.000Z | 2022-03-27T04:58:52.000Z | from pyopenproject.api_connection.exceptions.request_exception import RequestError
from pyopenproject.api_connection.requests.post_request import PostRequest
from pyopenproject.business.exception.business_error import BusinessError
from pyopenproject.business.services.command.membership.membership_command import Member... | 43.777778 | 99 | 0.685279 | 797 | 0.674281 | 0 | 0 | 0 | 0 | 0 | 0 | 242 | 0.204738 |
67e2f36fcb3cfb98bcd8a0637b9a6793dd11a7cc | 5,783 | py | Python | lottery/branch/singular_values.py | NogaBar/open_lth | 09bcea21e69708549ecff2659690162a6c45f9ca | [
"MIT"
] | null | null | null | lottery/branch/singular_values.py | NogaBar/open_lth | 09bcea21e69708549ecff2659690162a6c45f9ca | [
"MIT"
] | null | null | null | lottery/branch/singular_values.py | NogaBar/open_lth | 09bcea21e69708549ecff2659690162a6c45f9ca | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
from lottery.branch import base
import models.registry
from pruning.mask import Mask
from pruning.pruned_model import PrunedModel... | 45.896825 | 187 | 0.649144 | 4,845 | 0.8378 | 0 | 0 | 137 | 0.02369 | 0 | 0 | 829 | 0.143351 |
67e342235525736d0490c23bf879ad0c51964c88 | 6,400 | py | Python | parser.py | Saevon/DMP-Career-Share | e3486080d1e17b93b6676bdf59e0dc89c524c9f6 | [
"MIT"
] | null | null | null | parser.py | Saevon/DMP-Career-Share | e3486080d1e17b93b6676bdf59e0dc89c524c9f6 | [
"MIT"
] | null | null | null | parser.py | Saevon/DMP-Career-Share | e3486080d1e17b93b6676bdf59e0dc89c524c9f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from collections import OrderedDict
from decimal import Decimal
from parser_data import InlineList, DuplicationList
from state import State, StateMachine
from type_check import is_int, is_float, is_sci_notation
from format import format
from error import DMPException
cl... | 26.122449 | 90 | 0.569688 | 4,440 | 0.69375 | 0 | 0 | 508 | 0.079375 | 0 | 0 | 1,089 | 0.170156 |
67e41af80998f84e9f552dffe5a9fc7f2b6c4124 | 1,795 | py | Python | scripts/redact_cli_py/redact/io/blob_reader.py | jhapran/OCR-Form-Tools | 77e80227f7285c419f72b12edbbc8c316b973874 | [
"MIT"
] | 412 | 2020-03-02T21:43:17.000Z | 2022-03-24T17:20:33.000Z | scripts/redact_cli_py/redact/io/blob_reader.py | jhapran/OCR-Form-Tools | 77e80227f7285c419f72b12edbbc8c316b973874 | [
"MIT"
] | 388 | 2020-03-05T14:08:31.000Z | 2022-03-25T19:07:05.000Z | scripts/redact_cli_py/redact/io/blob_reader.py | jhapran/OCR-Form-Tools | 77e80227f7285c419f72b12edbbc8c316b973874 | [
"MIT"
] | 150 | 2020-03-03T17:29:11.000Z | 2022-03-16T23:55:27.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project
# root for license information.
from typing import List
from pathlib import Path
from azure.storage.blob import ContainerClient
from redact.types.file_bundle import FileBundle
class BlobRead... | 37.395833 | 78 | 0.640111 | 1,488 | 0.828969 | 0 | 0 | 0 | 0 | 0 | 0 | 166 | 0.092479 |
67e4a190f4b21b618d8a69e714cec31032c3687f | 8,111 | py | Python | layers/util/mapping_functions.py | meder411/spherical-package | 73d51a25da5891d12e4c04d8ad2e6f1854ffa121 | [
"BSD-3-Clause"
] | 8 | 2020-06-13T19:49:06.000Z | 2022-02-24T07:16:02.000Z | layers/util/mapping_functions.py | meder411/spherical-package | 73d51a25da5891d12e4c04d8ad2e6f1854ffa121 | [
"BSD-3-Clause"
] | 4 | 2020-07-03T08:44:13.000Z | 2021-09-17T12:18:57.000Z | layers/util/mapping_functions.py | meder411/spherical-package | 73d51a25da5891d12e4c04d8ad2e6f1854ffa121 | [
"BSD-3-Clause"
] | 3 | 2020-06-10T23:30:20.000Z | 2020-12-29T13:50:01.000Z | import torch
import math
from .grids import *
from .conversions import *
# =============================================================================
# Equirectangular mapping functions
# =============================================================================
#
# Note that there is no concept of padding for ... | 33.378601 | 198 | 0.601159 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,307 | 0.407718 |
67e4a6a4b62a36140c3ec2606810cde8cf6567ae | 8,164 | py | Python | src/lambda_router/routers.py | jpaidoussi/lambda-router | c7909e6667f2fc837f34f54ccffcc409e33cebb6 | [
"BSD-3-Clause"
] | null | null | null | src/lambda_router/routers.py | jpaidoussi/lambda-router | c7909e6667f2fc837f34f54ccffcc409e33cebb6 | [
"BSD-3-Clause"
] | null | null | null | src/lambda_router/routers.py | jpaidoussi/lambda-router | c7909e6667f2fc837f34f54ccffcc409e33cebb6 | [
"BSD-3-Clause"
] | 1 | 2021-03-05T06:50:26.000Z | 2021-03-05T06:50:26.000Z | import json
from typing import Any, Callable, Dict, Optional
import attr
from .interfaces import Event, Router
@attr.s(kw_only=True)
class SingleRoute(Router):
"""
Routes to a single defined route without any conditions.
:param route: The single defined route. Only set via ``add_route``.
"""
... | 32.268775 | 114 | 0.614037 | 7,925 | 0.970725 | 0 | 0 | 8,035 | 0.984199 | 0 | 0 | 3,731 | 0.457006 |
67e5a6a6c74d4339ea14061f1806e706d149cac0 | 6,026 | py | Python | Modules/ego_planner/ego-planner-swarm/src/uav_simulator/Utils/multi_map_server/src/multi_map_server/msg/_VerticalOccupancyGridList.py | 473867143/Prometheus | df1e1b0d861490223ac8b94d8cc4796537172292 | [
"BSD-3-Clause"
] | 1,217 | 2020-07-02T13:15:18.000Z | 2022-03-31T06:17:44.000Z | Modules/ego_planner/ego-planner-swarm/src/uav_simulator/Utils/multi_map_server/src/multi_map_server/msg/_VerticalOccupancyGridList.py | 473867143/Prometheus | df1e1b0d861490223ac8b94d8cc4796537172292 | [
"BSD-3-Clause"
] | 167 | 2020-07-12T15:35:43.000Z | 2022-03-31T11:57:40.000Z | Modules/ego_planner/ego-planner-swarm/src/uav_simulator/Utils/multi_map_server/src/multi_map_server/msg/_VerticalOccupancyGridList.py | 473867143/Prometheus | df1e1b0d861490223ac8b94d8cc4796537172292 | [
"BSD-3-Clause"
] | 270 | 2020-07-02T13:28:00.000Z | 2022-03-28T05:43:08.000Z | """autogenerated by genpy from multi_map_server/VerticalOccupancyGridList.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
class VerticalOccupancyGridList(genpy.Message):
_md5sum = "7ef85cc95b82747f51eb01a16bd7c795"
_type = "multi_map_server/Verti... | 32.397849 | 123 | 0.623963 | 5,771 | 0.957683 | 0 | 0 | 0 | 0 | 0 | 0 | 1,778 | 0.295055 |
67e63c84e17221da6f00d66f3c8761be24cd93e2 | 2,718 | py | Python | examples/plot_benchmark.py | MrNuggelz/glvq | 1eba279a07fd7abe2ee18ccdba27fba22755f877 | [
"BSD-3-Clause"
] | 27 | 2018-04-11T06:46:07.000Z | 2022-03-24T06:15:31.000Z | examples/plot_benchmark.py | MrNuggelz/glvq | 1eba279a07fd7abe2ee18ccdba27fba22755f877 | [
"BSD-3-Clause"
] | 11 | 2018-04-13T02:04:06.000Z | 2021-09-26T21:32:50.000Z | examples/plot_benchmark.py | MrNuggelz/glvq | 1eba279a07fd7abe2ee18ccdba27fba22755f877 | [
"BSD-3-Clause"
] | 17 | 2018-04-05T13:46:06.000Z | 2022-03-24T06:15:35.000Z | """
==============
GLVQ Benchmark
==============
This example shows the differences between the 4 different GLVQ implementations and LMNN.
The Image Segmentation dataset is used for training and test. Each plot shows the projection
and classification from each implementation. Because Glvq can't project the data on its ... | 27.734694 | 92 | 0.654893 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 485 | 0.17844 |
67e6967f9057bb9fe14cc5543b93fd2036edcf8d | 2,662 | py | Python | 8/star2.py | nfitzen/advent-of-code-2020 | 774b7db35aaf31b0e72a569b3441343d50f4d079 | [
"CC0-1.0",
"MIT"
] | null | null | null | 8/star2.py | nfitzen/advent-of-code-2020 | 774b7db35aaf31b0e72a569b3441343d50f4d079 | [
"CC0-1.0",
"MIT"
] | null | null | null | 8/star2.py | nfitzen/advent-of-code-2020 | 774b7db35aaf31b0e72a569b3441343d50f4d079 | [
"CC0-1.0",
"MIT"
] | null | null | null | #!/usr/bin/env python3
# SPDX-FileCopyrightText: 2020 Nathaniel Fitzenrider <https://github.com/nfitzen>
#
# SPDX-License-Identifier: CC0-1.0
# Jesus Christ this was overengineered to Hell and back.
from typing import List, Tuple, Union
with open('input.txt') as f:
instructions = f.readlines()
class Console():
... | 31.690476 | 98 | 0.583396 | 1,872 | 0.703231 | 0 | 0 | 0 | 0 | 0 | 0 | 407 | 0.152893 |
67e77f21e80bffc6d63b3d609643ba3804770c10 | 1,010 | py | Python | projects/20151163/api/api.py | universe3306/WebStudio2019 | f6827875c449e762bae21e0d4d4fc76187626930 | [
"MIT"
] | 14 | 2019-03-06T10:32:40.000Z | 2021-11-18T01:44:28.000Z | projects/20151163/api/api.py | universe3306/WebStudio2019 | f6827875c449e762bae21e0d4d4fc76187626930 | [
"MIT"
] | 35 | 2019-03-13T07:04:02.000Z | 2019-10-08T06:26:45.000Z | projects/20151163/api/api.py | universe3306/WebStudio2019 | f6827875c449e762bae21e0d4d4fc76187626930 | [
"MIT"
] | 22 | 2019-03-11T11:00:24.000Z | 2019-09-14T06:53:30.000Z | from flask import Flask, request, jsonify
from flask_restful import Api, Resource
from flask_cors import CORS
import json, os
from models import db, User
from UserList import UserList
from PicturesList import Picture, PicturesList, Uploader
basedir = os.path.dirname(os.path.abspath(__file__))
SQLALCHEMY_DATABASE_URI ... | 26.578947 | 72 | 0.725743 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 164 | 0.162376 |
67e793c1f1db4accdabd37b5f3ae0c798f19a953 | 40,518 | py | Python | app.py | sharonytlau/dash-loan-calculator | b789d30953c8836cc5e861f36a66e73aace24e2c | [
"Apache-2.0"
] | 1 | 2021-10-30T14:41:15.000Z | 2021-10-30T14:41:15.000Z | app.py | sharonytlau/dash-loan-calculator | b789d30953c8836cc5e861f36a66e73aace24e2c | [
"Apache-2.0"
] | null | null | null | app.py | sharonytlau/dash-loan-calculator | b789d30953c8836cc5e861f36a66e73aace24e2c | [
"Apache-2.0"
] | null | null | null | # Ying Tung Lau - [email protected]
# Jiaying Yan - [email protected]
# <editor-fold desc="import modules">
import pandas as pd
import numpy as np
import json
import os
import re
import dash
import dash_table
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_compon... | 45.88675 | 145 | 0.542722 | 0 | 0 | 0 | 0 | 24,972 | 0.616273 | 0 | 0 | 12,960 | 0.319834 |
67e7da06bf5b0c480be1e68da30d3dd8280232f5 | 2,888 | py | Python | examples/advanced-topics/IIR-FIR/delay_channels.py | qua-platform/qua-libs | 805a3b1a69980b939b370b3ba09434bc26dc45ec | [
"BSD-3-Clause"
] | 21 | 2021-05-21T08:23:34.000Z | 2022-03-25T11:30:55.000Z | examples/advanced-topics/IIR-FIR/delay_channels.py | qua-platform/qua-libs | 805a3b1a69980b939b370b3ba09434bc26dc45ec | [
"BSD-3-Clause"
] | 9 | 2021-05-13T19:56:00.000Z | 2021-12-21T05:11:04.000Z | examples/advanced-topics/IIR-FIR/delay_channels.py | qua-platform/qua-libs | 805a3b1a69980b939b370b3ba09434bc26dc45ec | [
"BSD-3-Clause"
] | 2 | 2021-06-21T10:56:40.000Z | 2021-12-19T14:21:33.000Z | import scipy.signal as sig
import numpy as np
from qm.qua import *
import matplotlib.pyplot as plt
import warnings
from qm.QuantumMachinesManager import (
SimulationConfig,
QuantumMachinesManager,
LoopbackInterface,
)
ntaps = 40
delays = [0, 22, 22.25, 22.35]
def delay_gaussian(delay, ntap... | 28.594059 | 88 | 0.480956 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 550 | 0.190443 |
67e7dfe8a3a11d78c472c0f64358e33daa1e6979 | 1,696 | py | Python | listener.py | chrismarget/ios-icmp-channel | b2a09f1c345816f525a3f7aed6a562631b0fc7e6 | [
"Apache-2.0"
] | 1 | 2018-01-30T01:53:20.000Z | 2018-01-30T01:53:20.000Z | listener.py | chrismarget/ios-icmp-channel | b2a09f1c345816f525a3f7aed6a562631b0fc7e6 | [
"Apache-2.0"
] | null | null | null | listener.py | chrismarget/ios-icmp-channel | b2a09f1c345816f525a3f7aed6a562631b0fc7e6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
class message(object):
def add(self, idx, b):
self.message[idx] = b
if (b == '\x04') and self.is_complete():
self.print_message()
def get_eom_idx(self):
for i in sorted(self.message.keys()):
if self.message[i] == '\x04':
... | 27.803279 | 71 | 0.56191 | 967 | 0.570165 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.044811 |
67e8afbf9560d8370d86399ad38f91aac9488a9d | 478 | py | Python | Integer to Roman.py | HalShaw/Leetcode | 27c52aac5a8ecc5b5f02e54096a001920661b4bb | [
"MIT"
] | 1 | 2016-12-22T04:09:25.000Z | 2016-12-22T04:09:25.000Z | Integer to Roman.py | HalShaw/Leetcode | 27c52aac5a8ecc5b5f02e54096a001920661b4bb | [
"MIT"
] | null | null | null | Integer to Roman.py | HalShaw/Leetcode | 27c52aac5a8ecc5b5f02e54096a001920661b4bb | [
"MIT"
] | null | null | null | class Solution(object):
def intToRoman(self, num):
"""
数字到罗马数字的转换
:type num: int
:rtype: str
"""
dic = ["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]
nums = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]#两个数组,从高到低
res = ""
... | 34.142857 | 79 | 0.451883 | 580 | 0.986395 | 0 | 0 | 0 | 0 | 0 | 0 | 289 | 0.491497 |
67e9dd76bdad3ed45018c88774b6229ebe78a253 | 12,780 | py | Python | hapiclient/util.py | hbatta/client-python | 1c1d32fce9e84bc1a4938ae7adc30cef8d682aa4 | [
"BSD-3-Clause"
] | null | null | null | hapiclient/util.py | hbatta/client-python | 1c1d32fce9e84bc1a4938ae7adc30cef8d682aa4 | [
"BSD-3-Clause"
] | null | null | null | hapiclient/util.py | hbatta/client-python | 1c1d32fce9e84bc1a4938ae7adc30cef8d682aa4 | [
"BSD-3-Clause"
] | null | null | null | def setopts(defaults, given):
"""Override default keyword dictionary options.
kwargs = setopts(defaults, kwargs)
A warning is shown if kwargs contains a key not found in default.
"""
# Override defaults
for key, value in given.items():
if type(given[key]) == dict:
setopts(... | 30.356295 | 103 | 0.590141 | 76 | 0.005947 | 0 | 0 | 0 | 0 | 0 | 0 | 4,642 | 0.363224 |
67ea232a964b415b5c48734cb2b31e366146e901 | 269 | py | Python | docs/examples/combine-configs/convert.py | Mbompr/fromconfig | eb34582c79a9a9e3b9e60d41fec2ac6a619e9c27 | [
"Apache-2.0"
] | 19 | 2021-03-18T16:48:03.000Z | 2022-03-02T13:09:21.000Z | docs/examples/combine-configs/convert.py | Mbompr/fromconfig | eb34582c79a9a9e3b9e60d41fec2ac6a619e9c27 | [
"Apache-2.0"
] | 3 | 2021-04-23T23:03:29.000Z | 2021-05-11T14:09:16.000Z | docs/examples/combine-configs/convert.py | Mbompr/fromconfig | eb34582c79a9a9e3b9e60d41fec2ac6a619e9c27 | [
"Apache-2.0"
] | 3 | 2021-04-19T22:05:34.000Z | 2022-02-21T11:32:16.000Z | """Convert file format."""
import fire
import fromconfig
def convert(path_input, path_output):
"""Convert input into output with load and dump."""
fromconfig.dump(fromconfig.load(path_input), path_output)
if __name__ == "__main__":
fire.Fire(convert)
| 17.933333 | 61 | 0.717472 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 0.32342 |
67eb8e7c17780b803858f13f5e39eadc802e465d | 11,257 | py | Python | pyfibot/modules/module_rss.py | aapa/pyfibot | a8a4330d060b05f0ce63cbcfc6915afb8141955f | [
"BSD-3-Clause"
] | null | null | null | pyfibot/modules/module_rss.py | aapa/pyfibot | a8a4330d060b05f0ce63cbcfc6915afb8141955f | [
"BSD-3-Clause"
] | null | null | null | pyfibot/modules/module_rss.py | aapa/pyfibot | a8a4330d060b05f0ce63cbcfc6915afb8141955f | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals, print_function, division
import feedparser
import dataset
from twisted.internet.reactor import callLater
from threading import Thread
import twisted.internet.error
import logging
logger = logging.getLogger('module_rss')
DATABASE = None
updater = None
botref = None
config = {}
... | 32.819242 | 111 | 0.587634 | 5,762 | 0.511859 | 0 | 0 | 0 | 0 | 0 | 0 | 3,474 | 0.308608 |
67ec5c96d81577346cea04b4409e2275d4e56466 | 15,335 | py | Python | main.py | omidsakhi/progressive_introvae | 8f052ca7202196fe214ea238afe60e806660d6d4 | [
"MIT"
] | 5 | 2018-10-19T03:30:27.000Z | 2019-03-25T06:01:27.000Z | main.py | omidsakhi/progressive_introvae | 8f052ca7202196fe214ea238afe60e806660d6d4 | [
"MIT"
] | 1 | 2019-03-27T08:39:55.000Z | 2019-03-27T08:39:55.000Z | main.py | omidsakhi/progressive_introvae | 8f052ca7202196fe214ea238afe60e806660d6d4 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os, ops, utils
# Standard Imports
from absl import flags
import absl.logging as _logging # pylint: disable=unused-import
import numpy as np
import tensorflow as tf
from PIL import Image
import input_pi... | 44.708455 | 159 | 0.637105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,639 | 0.17209 |
67ecb4f05375d9a4dfbfec0d8b5a28b3678e0e4e | 172 | py | Python | docs/examples/timer.py | vlcinsky/nameko | 88d7e5211de4fcc1c34cd7f84d7c77f0619c5f5d | [
"Apache-2.0"
] | 3,425 | 2016-11-10T17:12:42.000Z | 2022-03-31T19:07:49.000Z | docs/examples/timer.py | vlcinsky/nameko | 88d7e5211de4fcc1c34cd7f84d7c77f0619c5f5d | [
"Apache-2.0"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | docs/examples/timer.py | vlcinsky/nameko | 88d7e5211de4fcc1c34cd7f84d7c77f0619c5f5d | [
"Apache-2.0"
] | 420 | 2016-11-17T05:46:42.000Z | 2022-03-23T12:36:06.000Z | from nameko.timer import timer
class Service:
name ="service"
@timer(interval=1)
def ping(self):
# method executed every second
print("pong")
| 17.2 | 38 | 0.627907 | 139 | 0.80814 | 0 | 0 | 99 | 0.575581 | 0 | 0 | 45 | 0.261628 |
67ed812b563acfcc4e10ecbff190182561180c0d | 752 | py | Python | app/controllers/config/system/slack.py | grepleria/SnitchDNS | 24f98b01fd5fca9aa2c660d6ee15742f2e44915c | [
"MIT"
] | 152 | 2020-12-07T13:26:53.000Z | 2022-03-23T02:00:04.000Z | app/controllers/config/system/slack.py | grepleria/SnitchDNS | 24f98b01fd5fca9aa2c660d6ee15742f2e44915c | [
"MIT"
] | 16 | 2020-12-07T17:04:36.000Z | 2022-03-10T11:12:52.000Z | app/controllers/config/system/slack.py | grepleria/SnitchDNS | 24f98b01fd5fca9aa2c660d6ee15742f2e44915c | [
"MIT"
] | 36 | 2020-12-09T13:04:40.000Z | 2022-03-12T18:14:36.000Z | from .. import bp
from flask import request, render_template, flash, redirect, url_for
from flask_login import current_user, login_required
from app.lib.base.provider import Provider
from app.lib.base.decorators import admin_required
@bp.route('/slack', methods=['GET'])
@login_required
@admin_required
def slack():
... | 26.857143 | 85 | 0.743351 | 0 | 0 | 0 | 0 | 512 | 0.680851 | 0 | 0 | 127 | 0.168883 |
67edef8325e323ad0e7a7ee375973574e5b9dbb3 | 845 | py | Python | setup.py | 7AM7/Arabic-dialects-segmenter-with-flask | a69e060fa25a5905864dae7d500c4f46436e0c40 | [
"MIT"
] | 1 | 2021-07-07T06:54:43.000Z | 2021-07-07T06:54:43.000Z | setup.py | 7AM7/Arabic-dialects-segmenter-with-flask | a69e060fa25a5905864dae7d500c4f46436e0c40 | [
"MIT"
] | null | null | null | setup.py | 7AM7/Arabic-dialects-segmenter-with-flask | a69e060fa25a5905864dae7d500c4f46436e0c40 | [
"MIT"
] | null | null | null |
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='FarasaPy3',
version='3.0.0',
packages=find_packages(exclude=['tests*']),
license='MIT',
description='Farasa (which means “insight” in Arabic), is a fast and accurate te... | 32.5 | 124 | 0.673373 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 417 | 0.491166 |
67eef460ddcba049717ee205dce3da7ab1a62a5b | 45,026 | py | Python | oldversion/crystIT_v0.1.py | GKieslich/crystIT | 2632b544b3ec0f4893f84aa6bb73f03a7f3c0890 | [
"MIT"
] | 4 | 2020-10-14T04:35:40.000Z | 2022-03-31T08:11:40.000Z | oldversion/crystIT_v0.1.py | GKieslich/crystIT | 2632b544b3ec0f4893f84aa6bb73f03a7f3c0890 | [
"MIT"
] | null | null | null | oldversion/crystIT_v0.1.py | GKieslich/crystIT | 2632b544b3ec0f4893f84aa6bb73f03a7f3c0890 | [
"MIT"
] | null | null | null | import ase
from ase.spacegroup import crystal
from ase.units import kB,mol,kJ
import spglib
import pyxtal
from pyxtal.symmetry import Group
import numpy # arrays
import math # log
import os.path # isfile, isdir
import copy # copy dictionary
imp... | 47.296218 | 525 | 0.58042 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16,636 | 0.369402 |
67ef29d1d4ce47e0f4c946159c2b8e5e9239317e | 2,166 | py | Python | bin-opcodes-vec/top50opcodes.py | laurencejbelliott/Ensemble_DL_Ransomware_Detector | 0cae02c2425e787a810513537a47897f3a42e5b5 | [
"MIT"
] | 18 | 2019-04-10T21:16:45.000Z | 2021-11-03T00:22:14.000Z | bin-opcodes-vec/top50opcodes.py | laurencejbelliott/Ensemble_DL_Ransomware_Detector | 0cae02c2425e787a810513537a47897f3a42e5b5 | [
"MIT"
] | null | null | null | bin-opcodes-vec/top50opcodes.py | laurencejbelliott/Ensemble_DL_Ransomware_Detector | 0cae02c2425e787a810513537a47897f3a42e5b5 | [
"MIT"
] | 9 | 2019-06-29T18:09:24.000Z | 2021-11-10T22:15:13.000Z | __author__ = "Laurence Elliott - 16600748"
from capstone import *
import pefile, os
# samplePaths = ["testSamples/" + sample for sample in os.listdir("testSamples")]
samplePaths = ["../bin-utf8-vec/benignSamples/" + sample for sample in os.listdir("../bin-utf8-vec/benignSamples")] + \
["../bin-utf8-vec/malwareSamples... | 31.391304 | 119 | 0.612188 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 647 | 0.298707 |
67f01ead8301ab0d013d90c2874dceeac2e0f7b9 | 233 | py | Python | chat/messaging/apps.py | VsevolodOkhrimenko/enchad | eca2790b374d336dfc5e109657d25ab0616196ee | [
"MIT"
] | null | null | null | chat/messaging/apps.py | VsevolodOkhrimenko/enchad | eca2790b374d336dfc5e109657d25ab0616196ee | [
"MIT"
] | null | null | null | chat/messaging/apps.py | VsevolodOkhrimenko/enchad | eca2790b374d336dfc5e109657d25ab0616196ee | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class MessagingConfig(AppConfig):
name = 'chat.messaging'
def ready(self):
try:
import chat.messaging.signals # noqa F401
except ImportError:
pass
| 19.416667 | 54 | 0.622318 | 196 | 0.841202 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.11588 |
67f15b64983f5eafc8f2961a8adfe37568e44cb9 | 2,051 | py | Python | tests/test_keepalived2.py | khosrow/lvsm | 516ee1422f736d016ccc198e54f5f019102504a6 | [
"MIT"
] | 15 | 2015-03-18T21:45:24.000Z | 2021-02-22T09:41:30.000Z | tests/test_keepalived2.py | khosrow/lvsm | 516ee1422f736d016ccc198e54f5f019102504a6 | [
"MIT"
] | 12 | 2016-01-15T19:32:36.000Z | 2016-10-27T14:21:14.000Z | tests/test_keepalived2.py | khosrow/lvsm | 516ee1422f736d016ccc198e54f5f019102504a6 | [
"MIT"
] | 8 | 2015-03-20T00:24:56.000Z | 2021-11-19T06:21:19.000Z | import unittest
import os
import sys
import StringIO
path = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../lvsm')))
from lvsm.modules import keepalived
class Keepalived(unittest.TestCase):
"""Tests for the functionality of the keepalive... | 42.729167 | 113 | 0.376889 | 1,770 | 0.862994 | 0 | 0 | 0 | 0 | 0 | 0 | 788 | 0.384203 |
67f2b9d79410dba976d86159718de46c71935384 | 1,416 | py | Python | faeAuditor/auditGroupResults/urlsCSV.py | opena11y/fae-auditor | ea9099b37b77ddc30092b0cdd962647c92b143a7 | [
"Apache-2.0"
] | 2 | 2018-02-28T19:03:28.000Z | 2021-09-30T13:40:23.000Z | faeAuditor/auditGroupResults/urlsCSV.py | opena11y/fae-auditor | ea9099b37b77ddc30092b0cdd962647c92b143a7 | [
"Apache-2.0"
] | 6 | 2020-02-11T21:53:58.000Z | 2022-02-10T07:57:58.000Z | faeAuditor/auditGroupResults/urlsCSV.py | opena11y/fae-auditor | ea9099b37b77ddc30092b0cdd962647c92b143a7 | [
"Apache-2.0"
] | 1 | 2019-12-05T06:05:20.000Z | 2019-12-05T06:05:20.000Z | """
Copyright 2014-2018 University of Illinois
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writ... | 29.5 | 100 | 0.735169 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 995 | 0.702684 |
67f2d1af7b93140433f3b44d8d6f9fbf50549676 | 912 | py | Python | microcosm_caching/base.py | globality-corp/microcosm-caching | 9e4ddb60d95e1344bf97f69248d1f7ac36a92cc8 | [
"Apache-2.0"
] | 1 | 2019-08-29T16:47:18.000Z | 2019-08-29T16:47:18.000Z | microcosm_caching/base.py | globality-corp/microcosm-caching | 9e4ddb60d95e1344bf97f69248d1f7ac36a92cc8 | [
"Apache-2.0"
] | 2 | 2019-10-29T19:25:16.000Z | 2019-11-12T00:00:04.000Z | microcosm_caching/base.py | globality-corp/microcosm-caching | 9e4ddb60d95e1344bf97f69248d1f7ac36a92cc8 | [
"Apache-2.0"
] | null | null | null | """
Cache abstractions for use with API resources.
"""
from abc import ABC, abstractmethod
class CacheBase(ABC):
"""
A simple key-value cache interface.
"""
@abstractmethod
def get(self, key):
pass
@abstractmethod
def set(self, key, value, ttl=None):
"""
Set a ke... | 19.404255 | 63 | 0.574561 | 817 | 0.895833 | 0 | 0 | 716 | 0.785088 | 0 | 0 | 536 | 0.587719 |
67f2fda918bbde7a4b1b415f81dab3ffab386200 | 876 | py | Python | randomizer.py | shane1027/PollDaddySlurp | 6cc17156f38427379d095277681dbe1a68baa49d | [
"MIT"
] | null | null | null | randomizer.py | shane1027/PollDaddySlurp | 6cc17156f38427379d095277681dbe1a68baa49d | [
"MIT"
] | null | null | null | randomizer.py | shane1027/PollDaddySlurp | 6cc17156f38427379d095277681dbe1a68baa49d | [
"MIT"
] | 1 | 2019-10-10T15:19:33.000Z | 2019-10-10T15:19:33.000Z | #!/usr/bin/env python2.7
import time
from http_request_randomizer.requests.proxy.requestProxy import RequestProxy
if __name__ == '__main__':
start = time.time()
req_proxy = RequestProxy()
print "Initialization took: {0} sec".format((time.time() - start))
print "Size : ", len(req_proxy.get_proxy_list()... | 35.04 | 109 | 0.643836 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 226 | 0.257991 |
67f38cc9e41435b2a8a8c22aa5a456b1d76fb88e | 555 | py | Python | examples/nni_data_augmentation/basenet/data.py | petuum/tuun | 8eec472dbf0e5e695449b0fa2d98985469fd5b30 | [
"Apache-2.0"
] | 33 | 2020-08-30T16:22:35.000Z | 2022-02-26T13:48:32.000Z | examples/nni_data_augmentation/basenet/data.py | petuum/tuun | 8eec472dbf0e5e695449b0fa2d98985469fd5b30 | [
"Apache-2.0"
] | 2 | 2021-01-18T19:46:43.000Z | 2021-03-24T09:59:14.000Z | examples/nni_data_augmentation/basenet/data.py | petuum/tuun | 8eec472dbf0e5e695449b0fa2d98985469fd5b30 | [
"Apache-2.0"
] | 2 | 2020-08-25T17:02:15.000Z | 2021-04-21T16:40:44.000Z | #!/usr/bin/env python
"""
data.py
"""
import itertools
def loopy_wrapper(gen):
while True:
for x in gen:
yield x
class ZipDataloader:
def __init__(self, dataloaders):
self.dataloaders = dataloaders
self._len = len(dataloaders[0])
def __len__(self):
return... | 18.5 | 60 | 0.578378 | 409 | 0.736937 | 299 | 0.538739 | 0 | 0 | 0 | 0 | 38 | 0.068468 |
67f3afbe3c2036ebfbec72e16288761010482211 | 1,180 | py | Python | tools_box/_selling/report/sales_representative_scorecard/sales_representative_scorecard.py | maisonarmani/Tools_Box | 4f8cc3a0deac1be50a3ac80758a10608faf58454 | [
"MIT"
] | null | null | null | tools_box/_selling/report/sales_representative_scorecard/sales_representative_scorecard.py | maisonarmani/Tools_Box | 4f8cc3a0deac1be50a3ac80758a10608faf58454 | [
"MIT"
] | null | null | null | tools_box/_selling/report/sales_representative_scorecard/sales_representative_scorecard.py | maisonarmani/Tools_Box | 4f8cc3a0deac1be50a3ac80758a10608faf58454 | [
"MIT"
] | 1 | 2022-01-30T12:15:41.000Z | 2022-01-30T12:15:41.000Z | # Copyright (c) 2013, [email protected] and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
def execute(filters=None):
columns, data = ["Sales Person: Link/Sales Person200", "Item:Link/Item:200","Item Name:Data:200","Qty:Float:200","Amount:Cu... | 39.333333 | 183 | 0.691525 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 751 | 0.636441 |
67f3bbd2cd29eb37f8dc56a77c4074bc640a2a29 | 484 | py | Python | Google-IT-Automation-with-Python-Professional-Certificate/3-Introduction-to-Git-and-Github/Week-1/disk_usage.py | fengjings/Coursera | 54098a9732faa4b37afe69d196e27805b1ac73aa | [
"MIT"
] | null | null | null | Google-IT-Automation-with-Python-Professional-Certificate/3-Introduction-to-Git-and-Github/Week-1/disk_usage.py | fengjings/Coursera | 54098a9732faa4b37afe69d196e27805b1ac73aa | [
"MIT"
] | null | null | null | Google-IT-Automation-with-Python-Professional-Certificate/3-Introduction-to-Git-and-Github/Week-1/disk_usage.py | fengjings/Coursera | 54098a9732faa4b37afe69d196e27805b1ac73aa | [
"MIT"
] | 1 | 2021-06-09T08:59:48.000Z | 2021-06-09T08:59:48.000Z | import shutil
import sys
def check_disk_usage(disk, min_absolute, min_percent):
'''return true if there is enough free disk space, else false'''
du = shutil.disk_usage(disk)
percent_free= 100*du.free/du.total
gigabytes_free = du.free/2**30
if percent_free<min_percent or gigabytes_free < min_absolut... | 26.888889 | 68 | 0.708678 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 0.219008 |
67f441ca489816b005f268005b6753cf7c38a180 | 1,796 | py | Python | src/utils/tests/test_www.py | nuuuwan/utils | d5085d9bddd1ffc79544241b43aaa8269c5806f0 | [
"MIT"
] | null | null | null | src/utils/tests/test_www.py | nuuuwan/utils | d5085d9bddd1ffc79544241b43aaa8269c5806f0 | [
"MIT"
] | 1 | 2021-07-06T11:16:58.000Z | 2021-07-06T11:16:58.000Z | src/utils/tests/test_www.py | nuuuwan/utils | d5085d9bddd1ffc79544241b43aaa8269c5806f0 | [
"MIT"
] | null | null | null | """Test."""
import os
import unittest
import pytest
from utils import www
TEST_JSON_URL = os.path.join(
'https://raw.githubusercontent.com',
'nuuuwan/misc-sl-data/master',
'sl_power_station_info.json',
)
TEST_TSV_URL = os.path.join(
'https://raw.githubusercontent.com',
'nuuuwan/gig-data/master',... | 24.60274 | 72 | 0.604677 | 1,336 | 0.743875 | 0 | 0 | 444 | 0.247216 | 0 | 0 | 483 | 0.268931 |
67f6677df6c93e2d632b899ab9dc98b595479ae0 | 19,511 | py | Python | src/qrl/core/State.py | scottdonaldau/QRL | fb78c1cdf227330ace46f590a36cc6a52c7af3fe | [
"MIT"
] | 1 | 2020-07-12T23:40:48.000Z | 2020-07-12T23:40:48.000Z | src/qrl/core/State.py | scottdonaldau/QRL | fb78c1cdf227330ace46f590a36cc6a52c7af3fe | [
"MIT"
] | null | null | null | src/qrl/core/State.py | scottdonaldau/QRL | fb78c1cdf227330ace46f590a36cc6a52c7af3fe | [
"MIT"
] | null | null | null | # coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
from typing import Optional
from statistics import median
import functools
from google.protobuf.json_format import MessageToJson, Parse
from pyqrllib.pyqrllib import b... | 38.559289 | 125 | 0.602788 | 18,439 | 0.945057 | 0 | 0 | 2,471 | 0.126647 | 0 | 0 | 2,599 | 0.133207 |
67f6729eb5c33b2e9485a361bcba852adc1d1e4b | 2,670 | py | Python | data/make_stterror_data/main.py | gcunhase/StackedDeBERT | 82777114fd99cafc6e2a3d760e774f007c563245 | [
"MIT"
] | 32 | 2020-01-03T09:53:03.000Z | 2021-09-07T07:23:26.000Z | data/make_stterror_data/main.py | gcunhase/StackedDeBERT | 82777114fd99cafc6e2a3d760e774f007c563245 | [
"MIT"
] | null | null | null | data/make_stterror_data/main.py | gcunhase/StackedDeBERT | 82777114fd99cafc6e2a3d760e774f007c563245 | [
"MIT"
] | 6 | 2020-01-21T06:50:21.000Z | 2021-01-22T08:04:00.000Z | import os.path
from timeit import default_timer as timer
import data.make_stterror_data.utils as utils
from data.make_stterror_data.handler import HandlerIntent
from data.make_stterror_data.parser import snips_parser
__author__ = "Gwena Cunha"
""" Main module for Snips
text -> TTS -> STT -> wrong text
"""
def ... | 45.254237 | 131 | 0.695506 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 486 | 0.182022 |
67f6d526ab4ecec5625261ee10602db862d65a55 | 5,591 | py | Python | src/tk_live_model_test.py | KarlWithK/gesture | d60204684c1e3868177e76b62d74d899d39d287d | [
"MIT"
] | null | null | null | src/tk_live_model_test.py | KarlWithK/gesture | d60204684c1e3868177e76b62d74d899d39d287d | [
"MIT"
] | null | null | null | src/tk_live_model_test.py | KarlWithK/gesture | d60204684c1e3868177e76b62d74d899d39d287d | [
"MIT"
] | 2 | 2021-09-01T01:06:23.000Z | 2021-09-06T00:18:54.000Z | import tkinter as tk
from PIL import Image, ImageTk
from cv2 import cv2
import numpy as np
import mediapipe as mp
from keyboard import press_and_release as press
from json import load
from data_preprocessor import DataGenerator
from gestures import GESTURES
import tensorflow as tf
TARGET_FRAMERATE... | 34.512346 | 104 | 0.597746 | 4,899 | 0.87623 | 0 | 0 | 0 | 0 | 0 | 0 | 973 | 0.17403 |
67f86eeb953024e2463d4d73c584b0e83d0b4555 | 12,761 | py | Python | wykop/api/client.py | selfisekai/wykop-sdk-reborn | 7f17c5b2a3d282b5aaf72475a0f58ba66d5c5c5d | [
"MIT"
] | null | null | null | wykop/api/client.py | selfisekai/wykop-sdk-reborn | 7f17c5b2a3d282b5aaf72475a0f58ba66d5c5c5d | [
"MIT"
] | null | null | null | wykop/api/client.py | selfisekai/wykop-sdk-reborn | 7f17c5b2a3d282b5aaf72475a0f58ba66d5c5c5d | [
"MIT"
] | null | null | null | import logging
from typing import Dict, List
from wykop.api.api_const import PAGE_NAMED_ARG, BODY_NAMED_ARG, FILE_POST_NAME
from wykop.core.credentials import Credentials
from wykop.core.requestor import Requestor
log = logging.getLogger(__name__)
class WykopAPI:
"""Wykop API version 2."""
def __init__(se... | 37.754438 | 114 | 0.587728 | 12,507 | 0.980096 | 0 | 0 | 657 | 0.051485 | 0 | 0 | 1,439 | 0.112765 |
67f9a1f6ffa0fc0bfe7226b1e9ede9e0f2fe3d7a | 1,461 | py | Python | brainbox/tests/test_singlecell.py | SebastianBruijns/ibllib | 49f2091b7a53430c00c339b862dfc1a53aab008b | [
"MIT"
] | null | null | null | brainbox/tests/test_singlecell.py | SebastianBruijns/ibllib | 49f2091b7a53430c00c339b862dfc1a53aab008b | [
"MIT"
] | null | null | null | brainbox/tests/test_singlecell.py | SebastianBruijns/ibllib | 49f2091b7a53430c00c339b862dfc1a53aab008b | [
"MIT"
] | null | null | null | from brainbox.singlecell import acorr, calculate_peths
import unittest
import numpy as np
class TestPopulation(unittest.TestCase):
def test_acorr_0(self):
spike_times = np.array([0, 10, 10, 20])
bin_size = 1
winsize_bins = 2 * 3 + 1
c_expected = np.zeros(7, dtype=np.int32)
... | 31.085106 | 88 | 0.644764 | 1,249 | 0.854894 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.006845 |
67f9b6a00e2c9b6075dbb4dc4f6b1acedc0ffc2d | 11,958 | py | Python | test/test_base_metric.py | Spraitazz/metric-learn | 137880d9c6ce9a2b81a8af24c07d80e528f657cd | [
"MIT"
] | 547 | 2019-08-01T23:21:30.000Z | 2022-03-31T10:23:04.000Z | test/test_base_metric.py | Spraitazz/metric-learn | 137880d9c6ce9a2b81a8af24c07d80e528f657cd | [
"MIT"
] | 104 | 2019-08-02T10:15:53.000Z | 2022-03-29T20:33:55.000Z | test/test_base_metric.py | Spraitazz/metric-learn | 137880d9c6ce9a2b81a8af24c07d80e528f657cd | [
"MIT"
] | 69 | 2019-08-12T16:22:57.000Z | 2022-03-10T15:10:02.000Z | import pytest
import re
import unittest
import metric_learn
import numpy as np
from sklearn import clone
from test.test_utils import ids_metric_learners, metric_learners, remove_y
from metric_learn.sklearn_shims import set_random_state, SKLEARN_AT_LEAST_0_22
def remove_spaces(s):
return re.sub(r'\s+', '', s)
def ... | 42.860215 | 79 | 0.647516 | 6,700 | 0.560294 | 0 | 0 | 4,409 | 0.368707 | 0 | 0 | 3,149 | 0.263338 |
67fa9c3bff783bccc4fb93e62dd21fe1343fce47 | 881 | py | Python | examples/geomopt/20-callback.py | QuESt-Calculator/pyscf | 0ed03633b699505c7278f1eb501342667d0aa910 | [
"Apache-2.0"
] | 501 | 2018-12-06T23:48:17.000Z | 2022-03-31T11:53:18.000Z | examples/geomopt/20-callback.py | QuESt-Calculator/pyscf | 0ed03633b699505c7278f1eb501342667d0aa910 | [
"Apache-2.0"
] | 710 | 2018-11-26T22:04:52.000Z | 2022-03-30T03:53:12.000Z | examples/geomopt/20-callback.py | QuESt-Calculator/pyscf | 0ed03633b699505c7278f1eb501342667d0aa910 | [
"Apache-2.0"
] | 273 | 2018-11-26T10:10:24.000Z | 2022-03-30T12:25:28.000Z | #!/usr/bin/env python
'''
Optimize molecular geometry within the environment of QM/MM charges.
'''
from pyscf import gto, scf
from pyscf.geomopt import berny_solver
from pyscf.geomopt import geometric_solver
mol = gto.M(atom='''
C 0.000000 0.000000 -0.542500
O 0.000000 0.000000 ... | 22.589744 | 68 | 0.659478 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 472 | 0.535755 |
67fa9dc096cb1ead50c5acc747b6ed866a1988a5 | 8,251 | py | Python | Q1_final_project_v2.py | wolhandlerdeb/clustering | d84b0ff91d20b8dbf45e235fc8204f8cedf1ecc5 | [
"MIT"
] | null | null | null | Q1_final_project_v2.py | wolhandlerdeb/clustering | d84b0ff91d20b8dbf45e235fc8204f8cedf1ecc5 | [
"MIT"
] | null | null | null | Q1_final_project_v2.py | wolhandlerdeb/clustering | d84b0ff91d20b8dbf45e235fc8204f8cedf1ecc5 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import scipy as sc
from scipy.stats import randint, norm, multivariate_normal, ortho_group
from scipy import linalg
from scipy.linalg import subspace_angles, orth
from scipy.optimize import fmin
import math
from statistics import mean
import seaborn as sns
from sklearn.cluster imp... | 37.848624 | 141 | 0.630105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,538 | 0.186402 |
67facec68d3d68647d57845cc972fe7ead4b3012 | 793 | py | Python | lnbits/extensions/usermanager/models.py | blackcoffeexbt/lnbits-legend | a9f2877af77ea56d1900e2b5bc1c21b9b7ac2f64 | [
"MIT"
] | 76 | 2021-11-02T22:19:59.000Z | 2022-03-30T18:01:33.000Z | lnbits/extensions/usermanager/models.py | blackcoffeexbt/lnbits-legend | a9f2877af77ea56d1900e2b5bc1c21b9b7ac2f64 | [
"MIT"
] | 100 | 2021-11-04T16:33:28.000Z | 2022-03-30T15:03:52.000Z | lnbits/extensions/usermanager/models.py | blackcoffeexbt/lnbits-legend | a9f2877af77ea56d1900e2b5bc1c21b9b7ac2f64 | [
"MIT"
] | 57 | 2021-11-08T06:43:59.000Z | 2022-03-31T08:53:16.000Z | from sqlite3 import Row
from fastapi.param_functions import Query
from pydantic import BaseModel
from typing import Optional
class CreateUserData(BaseModel):
user_name: str = Query(...)
wallet_name: str = Query(...)
admin_id: str = Query(...)
email: str = Query("")
password: str = Query("")
cla... | 19.341463 | 45 | 0.630517 | 655 | 0.825977 | 0 | 0 | 90 | 0.113493 | 0 | 0 | 13 | 0.016393 |
67fbc8dcaaaab886066c2cc01da3a3bc0ee4a485 | 3,215 | py | Python | Operator.py | zijieli-Jlee/FGN | f707ed31687ea355ab62a1eaf43b5756a6ed883e | [
"MIT"
] | 2 | 2022-02-28T07:36:47.000Z | 2022-03-10T04:45:57.000Z | Operator.py | BaratiLab/FGN | 04729eaebfa8395a7d2ebb275761f98dc0342933 | [
"MIT"
] | null | null | null | Operator.py | BaratiLab/FGN | 04729eaebfa8395a7d2ebb275761f98dc0342933 | [
"MIT"
] | null | null | null | import numba as nb
import numpy as np
import torch
from torch.autograd import Function
from Constants import MPS_KERNEL as w
from Constants import BASE_RADIUS, ND_RAIUS, GRAD_RADIUS, LAP_RADIUS
class DivOp(Function):
"""Compute the divergence of a given physics value.
Implement in terms of pytorch autogra... | 31.213592 | 123 | 0.601244 | 2,953 | 0.918507 | 0 | 0 | 2,614 | 0.813064 | 0 | 0 | 238 | 0.074028 |
67fc163e324d1273cf478cbfac97cd26f437a946 | 5,274 | py | Python | pythia/LinearRegression.py | MaudBoucherit/Pythia | 0076d8008350c3a323e28c400b26628be34302e6 | [
"MIT"
] | null | null | null | pythia/LinearRegression.py | MaudBoucherit/Pythia | 0076d8008350c3a323e28c400b26628be34302e6 | [
"MIT"
] | 4 | 2018-02-09T01:16:14.000Z | 2018-03-04T07:48:49.000Z | pythia/LinearRegression.py | MaudBoucherit/Pythia | 0076d8008350c3a323e28c400b26628be34302e6 | [
"MIT"
] | 3 | 2018-02-08T22:52:27.000Z | 2018-02-08T22:53:05.000Z | # LinearRegression.py
# March 2018
#
# This script builds a Linear regression class to analyse data.
# It supports a continuous response and several continuous features.
# The class has a constructor building and fitting the model, and
# a plotting method for residuals.
#
# Dependencies:
#
# Usage:
# from pythia.Li... | 32.555556 | 154 | 0.603527 | 4,544 | 0.861585 | 0 | 0 | 0 | 0 | 0 | 0 | 2,464 | 0.467198 |
67fc89d1bcce49307c043c31ae573dd5205a3395 | 289 | py | Python | src/renault_api/exceptions.py | slater0013/renault-api | 13c784b6af09331368341c93888f1eb32c46cb19 | [
"MIT"
] | 44 | 2020-11-01T15:52:33.000Z | 2022-03-31T04:40:03.000Z | src/renault_api/exceptions.py | slater0013/renault-api | 13c784b6af09331368341c93888f1eb32c46cb19 | [
"MIT"
] | 334 | 2020-11-01T13:00:01.000Z | 2022-03-31T17:17:40.000Z | src/renault_api/exceptions.py | slater0013/renault-api | 13c784b6af09331368341c93888f1eb32c46cb19 | [
"MIT"
] | 22 | 2020-11-20T08:26:26.000Z | 2022-03-11T18:58:31.000Z | """Exceptions for Renault API."""
class RenaultException(Exception): # noqa: N818
"""Base exception for Renault API errors."""
pass
class NotAuthenticatedException(RenaultException): # noqa: N818
"""You are not authenticated, or authentication has expired."""
pass
| 20.642857 | 67 | 0.702422 | 249 | 0.861592 | 0 | 0 | 0 | 0 | 0 | 0 | 164 | 0.567474 |
67fce63714fc2695753fbce893969560aebb15c1 | 203 | py | Python | algorithms/Grayscale.py | AadityaMunjal/image-processing-algorithms | ff7bba1a4bb3dce930f9481f92a29277084e33d9 | [
"MIT"
] | 2 | 2021-03-09T03:54:10.000Z | 2021-03-22T21:35:29.000Z | algorithms/Grayscale.py | AadityaMunjal/image-processing-algorithms | ff7bba1a4bb3dce930f9481f92a29277084e33d9 | [
"MIT"
] | 1 | 2022-01-20T03:06:27.000Z | 2022-01-22T12:04:16.000Z | algorithms/Grayscale.py | AadityaMunjal/image-processing-algorithms | ff7bba1a4bb3dce930f9481f92a29277084e33d9 | [
"MIT"
] | null | null | null | def grayscale(image):
for row in range(image.shape[0]):
for col in range(image.shape[1]):
avg = sum(image[row][col][i] for i in range(3)) // 3
image[row][col] = [avg for _ in range(3)]
| 33.833333 | 58 | 0.600985 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
67fd6116ebb01570250dd4cf9fbbcabbf9f0ae67 | 5,945 | py | Python | analysis/playing_with_pykalman.py | rafaelvalero/covid_forecast | 4e009ade5481f4e3bd48fd8048ca7d293d5d19b4 | [
"MIT"
] | 3 | 2020-03-20T14:23:51.000Z | 2020-03-29T18:55:12.000Z | analysis/playing_with_pykalman.py | rafaelvalero/covid_forecast | 4e009ade5481f4e3bd48fd8048ca7d293d5d19b4 | [
"MIT"
] | 2 | 2020-03-21T14:07:17.000Z | 2020-03-22T07:38:11.000Z | analysis/playing_with_pykalman.py | rafaelvalero/covid_forecast | 4e009ade5481f4e3bd48fd8048ca7d293d5d19b4 | [
"MIT"
] | 1 | 2020-05-12T14:37:28.000Z | 2020-05-12T14:37:28.000Z | '''
=============================
EM for Linear-Gaussian Models
=============================
This example shows how one may use the EM algorithm to estimate model
parameters with a Kalman Filter.
The EM algorithm is a meta-algorithm for learning parameters in probabilistic
models. The algorithm works by first fixing t... | 49.541667 | 348 | 0.697056 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,526 | 0.593103 |
67fd71b159a22e60b64a07348a0a3e35c2a3b7e5 | 382 | py | Python | phyutil/__init__.py | frib-high-level-controls/phyhlc | 6486607e3aa0212054a12e9f2ad1a3ef15542f48 | [
"BSD-3-Clause"
] | 1 | 2018-03-22T15:18:54.000Z | 2018-03-22T15:18:54.000Z | phyutil/__init__.py | frib-high-level-controls/phyhlc | 6486607e3aa0212054a12e9f2ad1a3ef15542f48 | [
"BSD-3-Clause"
] | null | null | null | phyutil/__init__.py | frib-high-level-controls/phyhlc | 6486607e3aa0212054a12e9f2ad1a3ef15542f48 | [
"BSD-3-Clause"
] | null | null | null | # encoding: UTF-8
"""Physics Applications Utility"""
__copyright__ = "Copyright (c) 2015, Facility for Rare Isotope Beams"
__author__ = "Dylan Maxwell"
__version__ = "0.0.1"
import logging
import phylib
import machine
from machine import *
from phylib.libCore import *
# configure the root logger
logging.basicConfi... | 21.222222 | 79 | 0.740838 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 204 | 0.534031 |
67fdbf96ac87d3b403bf853041d7bc6c394c1dfd | 1,902 | py | Python | pydyn/explicit_blocks.py | chhokrad/PYPOWER-Dynamics | e6e42fc6975828a51cd01c42a81d7a45844f323f | [
"BSD-3-Clause"
] | null | null | null | pydyn/explicit_blocks.py | chhokrad/PYPOWER-Dynamics | e6e42fc6975828a51cd01c42a81d7a45844f323f | [
"BSD-3-Clause"
] | null | null | null | pydyn/explicit_blocks.py | chhokrad/PYPOWER-Dynamics | e6e42fc6975828a51cd01c42a81d7a45844f323f | [
"BSD-3-Clause"
] | 1 | 2021-09-13T14:34:41.000Z | 2021-09-13T14:34:41.000Z | #!python3
#
# Copyright (C) 2014-2015 Julius Susanto. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
"""
PYPOWER-Dynamics
Functions for standard blocks (solves a step)
"""
import numpy as np
# Gain block
# yo = p * yi
# p is a scalar gain c... | 15.463415 | 69 | 0.532072 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 880 | 0.462671 |
67ff40cfd4c8a6b2e69d26c388ef6020f73b4c94 | 2,151 | py | Python | river/migrations/0012_auto_20191113_1550.py | xuziheng1002/django-river | 7c7f23aa4790e451019c3e2b4d29f35852de17e6 | [
"BSD-3-Clause"
] | null | null | null | river/migrations/0012_auto_20191113_1550.py | xuziheng1002/django-river | 7c7f23aa4790e451019c3e2b4d29f35852de17e6 | [
"BSD-3-Clause"
] | null | null | null | river/migrations/0012_auto_20191113_1550.py | xuziheng1002/django-river | 7c7f23aa4790e451019c3e2b4d29f35852de17e6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.25 on 2019-11-13 21:50
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('river', '0011_auto_20191110_1411'),
]
operations =... | 45.765957 | 191 | 0.664807 | 1,959 | 0.910739 | 0 | 0 | 0 | 0 | 0 | 0 | 641 | 0.298001 |
db00271e05f78081485f6f0bf77fff9b5da0dd36 | 929 | py | Python | nesta/packages/examples/tests/test_example_package.py | anniyanvr/nesta | 4b3ae79922cebde0ad33e08ac4c40b9a10e8e7c3 | [
"MIT"
] | 13 | 2019-06-18T16:53:53.000Z | 2021-03-04T10:58:52.000Z | nesta/packages/examples/tests/test_example_package.py | nestauk/old_nesta_daps | 4b3ae79922cebde0ad33e08ac4c40b9a10e8e7c3 | [
"MIT"
] | 208 | 2018-08-10T13:15:40.000Z | 2021-07-21T10:16:07.000Z | nesta/packages/examples/tests/test_example_package.py | nestauk/old_nesta_daps | 4b3ae79922cebde0ad33e08ac4c40b9a10e8e7c3 | [
"MIT"
] | 8 | 2018-09-20T15:19:23.000Z | 2020-12-15T17:41:34.000Z | from collections import namedtuple
import pytest
from nesta.packages.examples.example_package import some_func
@pytest.fixture
def mocked_row():
def _mocked_row(*, id, name):
Row = namedtuple('Row', ['id', 'name'])
return Row(id=id, name=name)
return _mocked_row
class TestSomeFunc:
def... | 33.178571 | 85 | 0.697524 | 635 | 0.683531 | 0 | 0 | 175 | 0.188375 | 0 | 0 | 79 | 0.085038 |
db0097f13bc0f850f8b50c6cc9087132aa46c5fd | 6,408 | py | Python | test/test_misc.py | mhthies/smarthomeconnect | d93d1038145285af66769ebf10589c1088b323ed | [
"Apache-2.0"
] | 5 | 2021-07-02T21:48:45.000Z | 2021-12-12T21:55:42.000Z | test/test_misc.py | mhthies/smarthomeconnect | d93d1038145285af66769ebf10589c1088b323ed | [
"Apache-2.0"
] | 49 | 2020-09-18T20:05:55.000Z | 2022-03-05T19:51:33.000Z | test/test_misc.py | mhthies/smarthomeconnect | d93d1038145285af66769ebf10589c1088b323ed | [
"Apache-2.0"
] | 1 | 2021-12-10T14:50:43.000Z | 2021-12-10T14:50:43.000Z | import asyncio
import unittest
import unittest.mock
import shc.misc
from test._helper import ExampleSubscribable, ExampleWritable, async_test, ExampleReadable
class MiscTests(unittest.TestCase):
@async_test
async def test_two_way_pipe(self) -> None:
pipe = shc.misc.TwoWayPipe(float)
pub_lef... | 37.473684 | 106 | 0.666042 | 6,245 | 0.974563 | 0 | 0 | 6,168 | 0.962547 | 6,056 | 0.945069 | 204 | 0.031835 |
db00bdc9b4970c171632e8c7e85bbb5706127395 | 27,709 | py | Python | pysatSpaceWeather/instruments/sw_f107.py | JonathonMSmith/pysatSpaceWeather | b403a14bd9a37dd010e97be6e5da15c54a87b888 | [
"BSD-3-Clause"
] | 3 | 2021-02-02T05:33:46.000Z | 2022-01-20T16:54:35.000Z | pysatSpaceWeather/instruments/sw_f107.py | JonathonMSmith/pysatSpaceWeather | b403a14bd9a37dd010e97be6e5da15c54a87b888 | [
"BSD-3-Clause"
] | 48 | 2020-08-13T22:05:06.000Z | 2022-01-21T22:48:14.000Z | pysatSpaceWeather/instruments/sw_f107.py | JonathonMSmith/pysatSpaceWeather | b403a14bd9a37dd010e97be6e5da15c54a87b888 | [
"BSD-3-Clause"
] | 3 | 2021-02-02T05:33:54.000Z | 2021-08-19T17:14:24.000Z | # -*- coding: utf-8 -*-
"""Supports F10.7 index values. Downloads data from LASP and the SWPC.
Properties
----------
platform
'sw'
name
'f107'
tag
- 'historic' LASP F10.7 data (downloads by month, loads by day)
- 'prelim' Preliminary SWPC daily solar indices
- 'daily' Daily SWPC solar indices (cont... | 40.688693 | 80 | 0.521383 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10,619 | 0.383233 |
db031f4543bacf2c603d4a3ccb452d553dc3e0d6 | 486 | py | Python | user/migrations/0004_auto_20200813_1948.py | VladimirZubavlenko/ikaf42-app | 240e012675e4347370289554f34d9c60c8b6f35d | [
"MIT"
] | null | null | null | user/migrations/0004_auto_20200813_1948.py | VladimirZubavlenko/ikaf42-app | 240e012675e4347370289554f34d9c60c8b6f35d | [
"MIT"
] | null | null | null | user/migrations/0004_auto_20200813_1948.py | VladimirZubavlenko/ikaf42-app | 240e012675e4347370289554f34d9c60c8b6f35d | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-08-13 19:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('user', '0003_auto_20200813_1943'),
]
operations = [
migrations.AlterField(
model_name='user',
name='emailConfirmToke... | 25.578947 | 144 | 0.652263 | 416 | 0.817289 | 0 | 0 | 0 | 0 | 0 | 0 | 195 | 0.383104 |
db03fc21b23af129e340ee65486e184e179cf632 | 1,394 | py | Python | vfoot/graphics/__init__.py | filipecn/vfoot | 3059f5bb471b6bdf92a18a7cdb6b33a2c8852046 | [
"MIT"
] | null | null | null | vfoot/graphics/__init__.py | filipecn/vfoot | 3059f5bb471b6bdf92a18a7cdb6b33a2c8852046 | [
"MIT"
] | null | null | null | vfoot/graphics/__init__.py | filipecn/vfoot | 3059f5bb471b6bdf92a18a7cdb6b33a2c8852046 | [
"MIT"
] | null | null | null | import glfw
import OpenGL.GL as gl
import imgui
from imgui.integrations.glfw import GlfwRenderer
def app(render):
imgui.create_context()
window = impl_glfw_init()
impl = GlfwRenderer(window)
while not glfw.window_should_close(window):
glfw.poll_events()
impl.process_inputs()
gl... | 27.333333 | 67 | 0.677188 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 211 | 0.151363 |
db04b4c5b6cb46accefdb0e93dbb064e76e6bb44 | 1,472 | py | Python | master/rabbitvcs-master/rabbitvcs-master/rabbitvcs/util/_locale.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/rabbitvcs-master/rabbitvcs-master/rabbitvcs/util/_locale.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/rabbitvcs-master/rabbitvcs-master/rabbitvcs/util/_locale.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | from __future__ import absolute_import
import locale
import os
from rabbitvcs.util.log import Log
import rabbitvcs.util.settings
import rabbitvcs.util.helper
log = Log("rabbitvcs.util.locale")
def initialize_locale():
try:
settings = rabbitvcs.util.settings.SettingsManager()
sane_default = local... | 36.8 | 87 | 0.63587 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 568 | 0.38587 |
db05538cc85061ce7b28bead1b966a843722b5be | 7,378 | py | Python | vectorize_enriched_api.py | mfejzer/tracking_buggy_files | 161095f315a94709ef74ab4bb6696889537aaa6a | [
"MIT"
] | 3 | 2019-08-06T05:29:53.000Z | 2021-05-23T08:23:10.000Z | vectorize_enriched_api.py | mfejzer/tracking_buggy_files | 161095f315a94709ef74ab4bb6696889537aaa6a | [
"MIT"
] | 5 | 2020-04-23T18:29:06.000Z | 2021-12-09T21:21:57.000Z | vectorize_enriched_api.py | mfejzer/tracking_buggy_files | 161095f315a94709ef74ab4bb6696889537aaa6a | [
"MIT"
] | 1 | 2021-05-23T08:23:12.000Z | 2021-05-23T08:23:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Usage: %(scriptName) <bug_report_file> <data_prefix>
"""
import json
from timeit import default_timer
import datetime
import numpy as np
import pickle
import sys
from multiprocessing import Pool
from operator import itemgetter
from scipy import sparse
from sklearn.fe... | 33.234234 | 126 | 0.719301 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 951 | 0.128897 |
db063dcff6ca568e771df05b7ae7f650c6cd2aea | 4,270 | py | Python | interpreter.py | bendmorris/beaver | 4db3e1690145dee89d30144f3632396313218214 | [
"MIT"
] | 2 | 2018-10-06T08:35:41.000Z | 2019-04-03T21:15:02.000Z | interpreter.py | bendmorris/beaver | 4db3e1690145dee89d30144f3632396313218214 | [
"MIT"
] | null | null | null | interpreter.py | bendmorris/beaver | 4db3e1690145dee89d30144f3632396313218214 | [
"MIT"
] | null | null | null | import argparse
import os
import sys
from lib.graph import Graph
from lib.types import BeaverException, Uri
from lib.command import OutCommand
import sys
reload(sys)
sys.setdefaultencoding('utf8')
from __init__ import __version__
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('--version', help='print ... | 32.846154 | 154 | 0.544028 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 735 | 0.172131 |
db0693e026c74e759573c7252d4aff5ef90ae5ad | 242 | py | Python | euler/28.py | DevStarSJ/algorithmExercise | 66b42c54cdd594ff3f229613fd83446f8c1f9153 | [
"MIT"
] | null | null | null | euler/28.py | DevStarSJ/algorithmExercise | 66b42c54cdd594ff3f229613fd83446f8c1f9153 | [
"MIT"
] | null | null | null | euler/28.py | DevStarSJ/algorithmExercise | 66b42c54cdd594ff3f229613fd83446f8c1f9153 | [
"MIT"
] | null | null | null | def get_cross_sum(n):
start = 1
total = 1
for i in range(1, n):
step = i * 2
start = start + step
total += start * 4 + step * 6
start = start + step * 3
return total
print(get_cross_sum(501)) | 18.615385 | 37 | 0.516529 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
db06e9490bbc299985803b6daf8dbca9d83d6fc3 | 1,509 | py | Python | titan/react_view_pkg/router/resources.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | titan/react_view_pkg/router/resources.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | titan/react_view_pkg/router/resources.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | import typing as T
from dataclasses import dataclass, field
from moonleap import Resource
from titan.react_pkg.component import Component
class Router(Component):
pass
@dataclass
class RouterConfig(Resource):
component: Component
url: str
params: T.List[str] = field(default_factory=list)
wraps:... | 32.106383 | 88 | 0.713718 | 240 | 0.159046 | 0 | 0 | 218 | 0.144467 | 0 | 0 | 186 | 0.12326 |
db077393470e53a796d0d72580ad3f3064dd2bda | 2,119 | py | Python | lab-taxi/agent.py | JunShern/deep-reinforcement-learning | 4c99d8e3b5c6df0ec7985a33611a16a791eb0041 | [
"MIT"
] | null | null | null | lab-taxi/agent.py | JunShern/deep-reinforcement-learning | 4c99d8e3b5c6df0ec7985a33611a16a791eb0041 | [
"MIT"
] | null | null | null | lab-taxi/agent.py | JunShern/deep-reinforcement-learning | 4c99d8e3b5c6df0ec7985a33611a16a791eb0041 | [
"MIT"
] | null | null | null | import numpy as np
from collections import defaultdict
class Agent:
def __init__(self, nA=6):
""" Initialize agent.
Params
======
- nA: number of actions available to the agent
"""
self.nA = nA
self.actions = list(range(nA))
self.Q = defaultdict(lam... | 33.634921 | 153 | 0.591789 | 2,063 | 0.973572 | 0 | 0 | 0 | 0 | 0 | 0 | 842 | 0.397357 |
db07a7ea8e4f0634af5cfc5dde1a21fb51caf3b5 | 11,271 | py | Python | visicom_reverse_geocoding.py | zimirrr/visicom_reverse_geocoding | 3da913f80e934f8352bcc8abe9d24ba54bbc482a | [
"MIT"
] | null | null | null | visicom_reverse_geocoding.py | zimirrr/visicom_reverse_geocoding | 3da913f80e934f8352bcc8abe9d24ba54bbc482a | [
"MIT"
] | null | null | null | visicom_reverse_geocoding.py | zimirrr/visicom_reverse_geocoding | 3da913f80e934f8352bcc8abe9d24ba54bbc482a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
/***************************************************************************
VisicomReverseGeocoder
A QGIS plugin
plugin for reverse geocoding from visicom api
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
... | 35.332288 | 126 | 0.58167 | 9,662 | 0.857244 | 0 | 0 | 0 | 0 | 0 | 0 | 5,321 | 0.472097 |