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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c992994f6028cb87c2268ffceabfca70874f4d48 | 194 | py | Python | src/superannotate/lib/app/exceptions.py | xalgorithm/superannotate-python-sdk | 8f28ff3fdfc7bbae41946c79847ad1f6cf8a9300 | [
"MIT"
] | 26 | 2020-09-25T06:25:06.000Z | 2022-01-30T16:44:07.000Z | src/superannotate/lib/app/exceptions.py | xalgorithm/superannotate-python-sdk | 8f28ff3fdfc7bbae41946c79847ad1f6cf8a9300 | [
"MIT"
] | 12 | 2020-12-21T19:59:48.000Z | 2022-01-21T10:32:07.000Z | src/superannotate/lib/app/exceptions.py | xalgorithm/superannotate-python-sdk | 8f28ff3fdfc7bbae41946c79847ad1f6cf8a9300 | [
"MIT"
] | 11 | 2020-09-17T13:39:19.000Z | 2022-03-02T18:12:29.000Z | from lib.core.exceptions import AppException
class PathError(AppException):
"""
User input Error
"""
class EmptyOutputError(AppException):
"""
Empty Output Error
"""
| 13.857143 | 44 | 0.659794 | 143 | 0.737113 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.340206 |
c993d47a6ac0a9f61ec7fa06b4e0b59229dbea51 | 527 | py | Python | tests/resources/greeting_resoource.py | NoeCruzMW/zpy-flask-msc | 9c2fdcc7e7bdbe3eed4522bfc68afcc00ad5994a | [
"MIT"
] | null | null | null | tests/resources/greeting_resoource.py | NoeCruzMW/zpy-flask-msc | 9c2fdcc7e7bdbe3eed4522bfc68afcc00ad5994a | [
"MIT"
] | null | null | null | tests/resources/greeting_resoource.py | NoeCruzMW/zpy-flask-msc | 9c2fdcc7e7bdbe3eed4522bfc68afcc00ad5994a | [
"MIT"
] | null | null | null | from zpy.api.resource import ZResource, HTTP_METHODS
class GreetingResource(ZResource):
blocked_methods = [
HTTP_METHODS.POST,
HTTP_METHODS.DELETE,
HTTP_METHODS.PATCH,
HTTP_METHODS.PUT,
]
def __init__(self, **kwargs) -> None:
super().__init__()
def get(self):... | 23.954545 | 71 | 0.601518 | 471 | 0.893738 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.045541 |
c9941d5b23d70a37ae7fb2286ed5ef0edd392a4d | 227 | py | Python | tinned_django/project_name/config/apps_config/pymorphy.py | futurecolors/tinned-django | 9603c1bb746c733e1248abddb0097642702070b7 | [
"MIT"
] | 1 | 2015-05-08T10:54:59.000Z | 2015-05-08T10:54:59.000Z | tinned_django/project_name/config/apps_config/pymorphy.py | futurecolors/tinned-django | 9603c1bb746c733e1248abddb0097642702070b7 | [
"MIT"
] | null | null | null | tinned_django/project_name/config/apps_config/pymorphy.py | futurecolors/tinned-django | 9603c1bb746c733e1248abddb0097642702070b7 | [
"MIT"
] | null | null | null | # coding: utf-8
import os
class PyMorphy(object):
@property
def PYMORPHY_DICTS(self):
return {
'ru': {
'dir': os.path.join(self.ROOT_PATH, 'data/pymorphy'),
},
} | 18.916667 | 69 | 0.493392 | 199 | 0.876652 | 0 | 0 | 171 | 0.753304 | 0 | 0 | 39 | 0.171806 |
c99498c0faf71a46ad1d7a4f4be4a7ad4fc54402 | 172 | py | Python | Coursera/separa_palavras.py | tobiaspontes/ScriptsPython | 21ed779e49adca500ce5815dd100f4ec999a2571 | [
"MIT"
] | null | null | null | Coursera/separa_palavras.py | tobiaspontes/ScriptsPython | 21ed779e49adca500ce5815dd100f4ec999a2571 | [
"MIT"
] | null | null | null | Coursera/separa_palavras.py | tobiaspontes/ScriptsPython | 21ed779e49adca500ce5815dd100f4ec999a2571 | [
"MIT"
] | null | null | null | import re
def separa_palavras(frase):
'''A funcao recebe uma frase e devolve uma lista das palavras dentro da frase'''
print('lista de palavras: ', frase.split())
| 28.666667 | 84 | 0.709302 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.587209 |
c9954ca69e09619ef1665a4df64483f61ffee3c4 | 1,253 | py | Python | janggi/utils.py | sungho-cho/pyjanggi | cecaaa8f30fb2c2c319bab28197c786576cfe92d | [
"MIT"
] | 1 | 2020-09-23T09:40:59.000Z | 2020-09-23T09:40:59.000Z | janggi/utils.py | sungho-cho/pyjanggi | cecaaa8f30fb2c2c319bab28197c786576cfe92d | [
"MIT"
] | null | null | null | janggi/utils.py | sungho-cho/pyjanggi | cecaaa8f30fb2c2c319bab28197c786576cfe92d | [
"MIT"
] | null | null | null | import logging
import random
from .base.camp import Camp
from .base.formation import Formation
from .game.janggi_game import JanggiGame
from .game.game_log import GameLog
from .ui.game_player import GamePlayer
from .ui.replay_viewer import ReplayViewer
from .proto import log_pb2
logging.basicConfig()
logging.root.set... | 25.571429 | 62 | 0.710295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 304 | 0.242618 |
c998cff8c1a24f25ddb54c9444ec21d5f87c9ecc | 1,762 | py | Python | brainforest/s_create_inputs.py | binello7/swisssmartfarming | 40eef7b1726bc47d320ab12507479d836592138b | [
"MIT"
] | 2 | 2020-08-03T10:05:14.000Z | 2021-03-30T13:18:39.000Z | brainforest/s_create_inputs.py | binello7/swisssmartfarming | 40eef7b1726bc47d320ab12507479d836592138b | [
"MIT"
] | 6 | 2021-03-19T12:41:16.000Z | 2021-09-26T21:21:40.000Z | brainforest/s_create_inputs.py | binello7/swisssmartfarming | 40eef7b1726bc47d320ab12507479d836592138b | [
"MIT"
] | 3 | 2020-05-13T23:57:04.000Z | 2020-06-18T09:37:17.000Z | from data_interface import Dataset, Data_Interface
from utils import functions as ufunc
import geopandas as gpd
import matplotlib.pyplot as plt
import numpy as np
import os
import rasterio as rio
import rasterio.mask as riom
import shapely
from IPython import embed
import sys
sys.path.append('/home/seba/Projects/swis... | 28.885246 | 95 | 0.746311 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 794 | 0.450624 |
c99a5abd3c9530802736be82134167242a054f72 | 574 | py | Python | profiles_api/views.py | Vinutha2905/Python_RestAPI | 4c185d37d32c3b5f00154f4be1b4ad0d2fab6d66 | [
"MIT"
] | null | null | null | profiles_api/views.py | Vinutha2905/Python_RestAPI | 4c185d37d32c3b5f00154f4be1b4ad0d2fab6d66 | [
"MIT"
] | null | null | null | profiles_api/views.py | Vinutha2905/Python_RestAPI | 4c185d37d32c3b5f00154f4be1b4ad0d2fab6d66 | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework.response import Response
class HelloApiView(APIView):
"""TEST API VIEW"""
def get(self, request, format=None):
"""Returns a list of API features"""
an_apiview=[
'Uses HTTP methods as function (get,post, put, delete, patc... | 31.888889 | 74 | 0.642857 | 485 | 0.844948 | 0 | 0 | 0 | 0 | 0 | 0 | 274 | 0.477352 |
c99e1e3eaa5ae563327d390c5f49ea33d97c4ae8 | 911 | py | Python | forumdb.py | fatih-iver/Intro-to-Relational-Databases | 28528132378436d6dd1f1bdec96d1e7e285b4e4d | [
"MIT"
] | null | null | null | forumdb.py | fatih-iver/Intro-to-Relational-Databases | 28528132378436d6dd1f1bdec96d1e7e285b4e4d | [
"MIT"
] | null | null | null | forumdb.py | fatih-iver/Intro-to-Relational-Databases | 28528132378436d6dd1f1bdec96d1e7e285b4e4d | [
"MIT"
] | null | null | null | # "Database code" for the DB Forum.
import psycopg2
import bleach
DNAME = "forum"
#POSTS = [("This is the first post.", datetime.datetime.now())]
def get_posts():
"""Return all posts from the 'database', most recent first."""
db = psycopg2.connect(database=DNAME)
c = db.cursor()
c.execute("select content,... | 24.621622 | 71 | 0.675082 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 551 | 0.60483 |
c9a08b6c821aa60ac0ac2219e490a38ed9d96387 | 19,553 | py | Python | src/apps/Door.py | sdunlap-afit/hilics | ae06113365817e4240fe894d3dfd784991c78102 | [
"Apache-2.0"
] | 2 | 2019-09-27T15:45:46.000Z | 2021-07-28T15:02:21.000Z | src/apps/Door.py | sdunlap-afit/hilics | ae06113365817e4240fe894d3dfd784991c78102 | [
"Apache-2.0"
] | 3 | 2020-09-25T13:40:56.000Z | 2020-11-03T20:38:32.000Z | src/apps/Door.py | sdunlap-afit/hilics | ae06113365817e4240fe894d3dfd784991c78102 | [
"Apache-2.0"
] | 2 | 2020-05-29T16:58:55.000Z | 2021-04-27T23:52:17.000Z | #!/usr/bin/env python3
#
# IP: HILICS
#
# 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 i... | 28.012894 | 138 | 0.646499 | 18,659 | 0.954278 | 0 | 0 | 0 | 0 | 0 | 0 | 2,297 | 0.117476 |
c9a1e099a815ae4cb966de4d518a0c2e63b69ddd | 1,925 | py | Python | java/run.py | foxtrotzulu94/LanguageBenchmarkGame | 29c92c47c860d426409047a8408eaa52284a0cff | [
"MIT"
] | null | null | null | java/run.py | foxtrotzulu94/LanguageBenchmarkGame | 29c92c47c860d426409047a8408eaa52284a0cff | [
"MIT"
] | null | null | null | java/run.py | foxtrotzulu94/LanguageBenchmarkGame | 29c92c47c860d426409047a8408eaa52284a0cff | [
"MIT"
] | null | null | null | #!/usr/bin/env python
output_name = './build/libs/java.jar'
def setup():
import os, datetime, subprocess
if os.path.exists(os.path.join(os.getcwd(), "setup.log")):
print("'setup.log' exists. Java implementation setup correctly")
return
print("Watch for Errors - Requires Java SDK and Runti... | 34.375 | 117 | 0.61974 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 678 | 0.352208 |
c9a2771f62caa857ef11e61807ee5881fe3bec39 | 353 | py | Python | schemas/tag.py | airflow-plugins/pardot_plugin | 163a33dd1eb0fd750821824a67f1a83e1c5b188e | [
"Apache-2.0"
] | null | null | null | schemas/tag.py | airflow-plugins/pardot_plugin | 163a33dd1eb0fd750821824a67f1a83e1c5b188e | [
"Apache-2.0"
] | null | null | null | schemas/tag.py | airflow-plugins/pardot_plugin | 163a33dd1eb0fd750821824a67f1a83e1c5b188e | [
"Apache-2.0"
] | 2 | 2019-03-26T14:15:40.000Z | 2021-03-24T11:33:55.000Z | """
Tags
http://developer.pardot.com/kb/api-version-4/tags/
http://developer.pardot.com/kb/object-field-references/#tag
"""
tag = [{'name': 'id',
'type': 'integer'},
{'name': 'name',
'type': 'varchar(512)'},
{'name': 'created_at',
'type': 'timestamp'},
{'name': 'updated_at... | 22.0625 | 59 | 0.529745 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 251 | 0.711048 |
c9a32c37376f6fbf21ec0007633081e608e34031 | 125 | py | Python | packages/vic_kubuntu_14_10/vlc/__init__.py | warvariuc/mykde | 01c2f617d8556e279870d32247d07216a49a41da | [
"BSD-3-Clause"
] | 5 | 2016-01-31T18:32:45.000Z | 2019-12-22T07:16:22.000Z | packages/vic_kubuntu_14_10/vlc/__init__.py | warvariuc/mykde | 01c2f617d8556e279870d32247d07216a49a41da | [
"BSD-3-Clause"
] | null | null | null | packages/vic_kubuntu_14_10/vlc/__init__.py | warvariuc/mykde | 01c2f617d8556e279870d32247d07216a49a41da | [
"BSD-3-Clause"
] | 1 | 2019-06-17T16:02:36.000Z | 2019-06-17T16:02:36.000Z | import mykde
class Action(mykde.BaseAction):
name = "VLC"
description = "VLC Media Player"
packages = ['vlc']
| 13.888889 | 36 | 0.64 | 109 | 0.872 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.224 |
c9a5727c7ae854b7f8c58b9738a3f08c161ea5b6 | 26 | py | Python | exercise-1_from-pull-to-push/jenny02221995.py | choznerol/c4lab-git-tutorial | 0b8d9a49002df3c669ddb3713574eb13c5b28cb8 | [
"MIT"
] | 1 | 2017-12-29T08:43:10.000Z | 2017-12-29T08:43:10.000Z | exercise-1_from-pull-to-push/jenny02221995.py | choznerol/c4lab-git-tutorial | 0b8d9a49002df3c669ddb3713574eb13c5b28cb8 | [
"MIT"
] | null | null | null | exercise-1_from-pull-to-push/jenny02221995.py | choznerol/c4lab-git-tutorial | 0b8d9a49002df3c669ddb3713574eb13c5b28cb8 | [
"MIT"
] | null | null | null | hello everyone,
fighting~
| 8.666667 | 15 | 0.807692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c9a902b8d915c544016edb40caeb6192c52c369d | 3,914 | py | Python | hightime/util.py | tkrebes/hightime | 5312266c808556f11bde1725bc968564180df0f1 | [
"MIT"
] | null | null | null | hightime/util.py | tkrebes/hightime | 5312266c808556f11bde1725bc968564180df0f1 | [
"MIT"
] | null | null | null | hightime/util.py | tkrebes/hightime | 5312266c808556f11bde1725bc968564180df0f1 | [
"MIT"
] | null | null | null | import sys
from .sitimeunit import SITimeUnit
isPython3Compat = (sys.version_info.major == 3)
isPython36Compat = (isPython3Compat and (sys.version_info.minor >= 6))
def normalize_frac_seconds(a, b):
"""Returns 3-tuple containing (normalized frac_seconds for a, normalized
frac_seconds for b, most precise (sm... | 42.543478 | 80 | 0.699796 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,607 | 0.410577 |
c9a91a5cf9ffb0b7d6c657ce1005cb03ff51c2eb | 1,784 | py | Python | src/scse/modules/customer/demo_newsvendor_poisson_customer_order.py | bellmast/supply-chain-simulation-environment | af797c1d057e216184727fdd934ebd372d90f4d5 | [
"Apache-2.0"
] | 26 | 2021-06-23T00:58:25.000Z | 2022-03-29T19:41:18.000Z | src/scse/modules/customer/demo_newsvendor_poisson_customer_order.py | bellmast/supply-chain-simulation-environment | af797c1d057e216184727fdd934ebd372d90f4d5 | [
"Apache-2.0"
] | null | null | null | src/scse/modules/customer/demo_newsvendor_poisson_customer_order.py | bellmast/supply-chain-simulation-environment | af797c1d057e216184727fdd934ebd372d90f4d5 | [
"Apache-2.0"
] | 13 | 2021-06-23T09:16:38.000Z | 2022-03-22T20:01:19.000Z | """
An agent representing the (retail) customer behavior following a Poisson distribution for demand.
"""
import networkx as nx
from scse.api.module import Agent
import numpy as np
import logging
logger = logging.getLogger(__name__)
class PoissonCustomerOrder(Agent):
_DEFAULT_MAX_MEAN = 10
def __init__(self... | 35.68 | 98 | 0.623318 | 1,547 | 0.867152 | 0 | 0 | 0 | 0 | 0 | 0 | 506 | 0.283632 |
c9ab0ef6affb1be12f6d367b89eb7c08b1fd954b | 2,340 | py | Python | time_to_get_rewards.py | GJuceviciute/MineRL-2020 | 095ca6598b6a58120dcc5dcee05c995fc58d540a | [
"MIT"
] | 4 | 2021-03-23T21:12:57.000Z | 2021-07-03T16:22:01.000Z | time_to_get_rewards.py | GJuceviciute/MineRL-2020 | 095ca6598b6a58120dcc5dcee05c995fc58d540a | [
"MIT"
] | null | null | null | time_to_get_rewards.py | GJuceviciute/MineRL-2020 | 095ca6598b6a58120dcc5dcee05c995fc58d540a | [
"MIT"
] | null | null | null | import numpy as np
import os
from utils import MINERL_DATA_ROOT, CUMULATIVE_REWARDS
import sys
import pandas
def time_to_rewards(data_set, trajectory):
"""
Takes a data_set and a trajectory, and returns times (in ticks) to achieve each cumulative reward (from the last
cumulative reward, not from... | 34.925373 | 117 | 0.624359 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 548 | 0.234188 |
c9ab86e75a48317e7194cbc265fb079c04b726b2 | 2,224 | py | Python | ooobuild/lo/document/x_view_data_supplier.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/document/x_view_data_supplier.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/lo/document/x_view_data_supplier.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | 41.185185 | 341 | 0.747752 | 1,230 | 0.553058 | 0 | 0 | 350 | 0.157374 | 0 | 0 | 1,677 | 0.754047 |
c9ab9f36bed5aec87ea9576f35b5c24866acecd2 | 634 | py | Python | pyflarum/client/extensions/flarum/FoF_PreventNecrobumping.py | CWKevo/pyflarum | bdf162a6c94e3051843ec7299a4302054927498a | [
"MIT"
] | 9 | 2021-06-23T21:26:29.000Z | 2021-11-16T13:25:34.000Z | pyflarum/client/extensions/flarum/FoF_PreventNecrobumping.py | CWKevo/pyflarum | bdf162a6c94e3051843ec7299a4302054927498a | [
"MIT"
] | 3 | 2021-09-11T00:08:14.000Z | 2022-02-07T15:34:27.000Z | pyflarum/client/extensions/flarum/FoF_PreventNecrobumping.py | CWKevo/pyFlarum | 2c4e17a16b00367f140c3436f7a9148072ddd2d3 | [
"MIT"
] | 1 | 2021-08-18T12:45:14.000Z | 2021-08-18T12:45:14.000Z | import typing as t
from ....extensions import ExtensionMixin
from ...flarum.core.discussions import DiscussionFromBulk
class PreventNecrobumpingDiscussionMixin(DiscussionFromBulk):
@property
def fof_prevent_necrobumping(self) -> t.Optional[int]:
"""
I have no idea what this does either, ... | 23.481481 | 77 | 0.712934 | 506 | 0.798107 | 0 | 0 | 329 | 0.518927 | 0 | 0 | 125 | 0.197161 |
c9abcbc9f24259365718e0b6fb124db1e9b1a358 | 30,988 | py | Python | gsflow_prep/gsflow_model_prep.py | dgketchum/MT_RSense | 0048c1ccb1ff6e48bd630edd477f95ae29fea06d | [
"Apache-2.0"
] | null | null | null | gsflow_prep/gsflow_model_prep.py | dgketchum/MT_RSense | 0048c1ccb1ff6e48bd630edd477f95ae29fea06d | [
"Apache-2.0"
] | null | null | null | gsflow_prep/gsflow_model_prep.py | dgketchum/MT_RSense | 0048c1ccb1ff6e48bd630edd477f95ae29fea06d | [
"Apache-2.0"
] | null | null | null | import os
import json
from copy import copy
from subprocess import call, Popen, PIPE, STDOUT
import time
import numpy as np
import pandas as pd
from pyproj import Transformer
import rasterio
import fiona
from affine import Affine
from shapely.geometry import shape
from scipy.ndimage.morphology import binary_erosion
fr... | 41.932341 | 108 | 0.538499 | 28,576 | 0.922163 | 0 | 0 | 0 | 0 | 0 | 0 | 3,693 | 0.119175 |
c9ad6518f65c2c95cc6e2e31c3f0906ae816c864 | 1,147 | py | Python | Interview Questions/readmail.py | Shivams9/pythoncodecamp | e6cd27f4704a407ee360414a8c9236b254117a59 | [
"MIT"
] | 6 | 2021-08-04T08:15:22.000Z | 2022-02-02T11:15:56.000Z | Interview Questions/readmail.py | Shivams9/pythoncodecamp | e6cd27f4704a407ee360414a8c9236b254117a59 | [
"MIT"
] | 14 | 2021-08-02T06:28:00.000Z | 2022-03-25T10:44:15.000Z | Interview Questions/readmail.py | Shivams9/pythoncodecamp | e6cd27f4704a407ee360414a8c9236b254117a59 | [
"MIT"
] | 6 | 2021-07-16T04:56:41.000Z | 2022-02-16T04:40:06.000Z | # Importing libraries
import imaplib, email
user = '[email protected]'
password = 'TestMa1lPass'
imap_url = 'imap.gmail.com'
# Function to get email content part i.e its body part
def get_body(msg):
if msg.is_multipart():
return get_body(msg.get_payload(0))
else:
return msg.get_payload(None, True)
# Functi... | 24.934783 | 65 | 0.727114 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 553 | 0.482127 |
c9af346978608c3c30e9cd43ee6263e02cda79fe | 5,695 | py | Python | openstack_dashboard/dashboards/admin/rbac_policies/views.py | stackhpc/horizon | 0899f67657e0be62dd9e6be327c63bccb4607dc6 | [
"Apache-2.0"
] | 930 | 2015-01-04T08:06:03.000Z | 2022-03-13T18:47:13.000Z | openstack_dashboard/dashboards/admin/rbac_policies/views.py | stackhpc/horizon | 0899f67657e0be62dd9e6be327c63bccb4607dc6 | [
"Apache-2.0"
] | 26 | 2015-02-23T16:37:31.000Z | 2020-07-02T08:37:41.000Z | openstack_dashboard/dashboards/admin/rbac_policies/views.py | stackhpc/horizon | 0899f67657e0be62dd9e6be327c63bccb4607dc6 | [
"Apache-2.0"
] | 1,040 | 2015-01-01T18:48:28.000Z | 2022-03-19T08:35:18.000Z | # 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, software
# distributed under t... | 39.275862 | 78 | 0.657419 | 4,476 | 0.785953 | 0 | 0 | 852 | 0.149605 | 0 | 0 | 1,406 | 0.246883 |
c9af8bee70751d27aa98a3e3c87e41286832285c | 522 | py | Python | config.py | navidsalehi/blockchain | 0add1e6e4898097360cafd006e391d1b8735da08 | [
"MIT"
] | 2 | 2021-11-30T05:16:39.000Z | 2021-12-01T10:13:29.000Z | config.py | navidsalehi/blockchain | 0add1e6e4898097360cafd006e391d1b8735da08 | [
"MIT"
] | null | null | null | config.py | navidsalehi/blockchain | 0add1e6e4898097360cafd006e391d1b8735da08 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
@dataclass
class Config:
"""Blockchain configs"""
# persistence configs
BLOCKS_FILE_NAME = "data/blocks.json"
MEMPOOL_FILE_NAME = "data/mempool.json"
WALLET_BALANCE_FILE_NAME = "data/balance.json"
SEED_WORDS_FILE_NAME = "data/seed_word_list.txt"
NODE_LIST... | 26.1 | 52 | 0.731801 | 474 | 0.908046 | 0 | 0 | 485 | 0.929119 | 0 | 0 | 199 | 0.381226 |
c9b0a85450199612c6bc6f56c812cbb9f71f501d | 3,585 | py | Python | legacy/text_classification/utils.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 4 | 2020-01-04T13:15:02.000Z | 2021-07-21T07:50:02.000Z | legacy/text_classification/utils.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 2 | 2019-06-26T03:21:49.000Z | 2019-09-19T09:43:42.000Z | legacy/text_classification/utils.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 3 | 2019-10-31T07:18:49.000Z | 2020-01-13T03:18:39.000Z | import logging
import os
import argparse
from collections import defaultdict
logger = logging.getLogger("paddle")
logger.setLevel(logging.INFO)
def parse_train_cmd():
parser = argparse.ArgumentParser(
description="PaddlePaddle text classification example.")
parser.add_argument(
"--nn_type",
... | 33.194444 | 80 | 0.577406 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,146 | 0.319665 |
c9b413225370fcaafee9296e6fca98be93952f44 | 2,188 | py | Python | cards/views.py | KrTG/CardLabeling | 8d267cf5d2dcc936005850a8f791115b3f716c92 | [
"Apache-2.0"
] | null | null | null | cards/views.py | KrTG/CardLabeling | 8d267cf5d2dcc936005850a8f791115b3f716c92 | [
"Apache-2.0"
] | null | null | null | cards/views.py | KrTG/CardLabeling | 8d267cf5d2dcc936005850a8f791115b3f716c92 | [
"Apache-2.0"
] | null | null | null | from .models import Card
from .helpers import fetch_unidentified, populate_db
from django.shortcuts import render, redirect
from django.http import Http404, HttpResponse
import json
def index(request):
next = fetch_unidentified()
if next:
return redirect('card', card_num=next)
else:
retur... | 30.388889 | 64 | 0.55713 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 278 | 0.127057 |
c9b43f16dd23711b256eacbc743cd82a999578fd | 2,439 | py | Python | cptm/experiment_calculate_perplexity.py | egpbos/cptm | c5f310858c341040b4afd166cf628aeee6845159 | [
"Apache-2.0"
] | 13 | 2016-03-14T14:58:04.000Z | 2020-11-03T22:48:59.000Z | cptm/experiment_calculate_perplexity.py | egpbos/cptm | c5f310858c341040b4afd166cf628aeee6845159 | [
"Apache-2.0"
] | 5 | 2015-10-30T12:34:16.000Z | 2017-10-27T04:55:07.000Z | cptm/experiment_calculate_perplexity.py | egpbos/cptm | c5f310858c341040b4afd166cf628aeee6845159 | [
"Apache-2.0"
] | 3 | 2016-03-03T10:49:05.000Z | 2018-02-03T14:36:59.000Z | """Calculate opinion perplexity for different numbers of topics
Calclulate opinion perplexity for the test set as described in [Fang et al.
2012] section 5.1.1.
This script should be run after experiment_number_of_topics.py.
Usage: python cptm/experiment_calculate_perplexity.py /path/to/experiment.json.
"""
import p... | 33.410959 | 79 | 0.727347 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 738 | 0.302583 |
c9b4d11f803a768b9c496032b0ea1a63387421c9 | 133 | py | Python | app/services/v1/healthcheck.py | rvmoura96/flask-template | d1383be7e17bff580e3ddf61ae580271c30201c4 | [
"MIT"
] | 2 | 2019-09-25T19:19:11.000Z | 2019-10-08T01:05:35.000Z | app/services/v1/healthcheck.py | rvmoura96/flask-template | d1383be7e17bff580e3ddf61ae580271c30201c4 | [
"MIT"
] | 10 | 2019-09-13T23:41:42.000Z | 2020-05-10T21:12:32.000Z | app/services/v1/healthcheck.py | rvmoura96/flask-template | d1383be7e17bff580e3ddf61ae580271c30201c4 | [
"MIT"
] | 9 | 2019-09-30T15:26:23.000Z | 2020-09-28T23:36:25.000Z | from flask_restful import Resource
import app
from app.services.healthcheck import HealthApi
class HealthApiV1(HealthApi):
pass
| 19 | 46 | 0.827068 | 38 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c9b5574ee7cafcbc4a7c1273ed0bb1bc35434615 | 819 | py | Python | Eulers method.py | pramotharun/Numerical-Methods-with-Python | bd5676bcc4ac5defd13608728df2387b5fdcdfcb | [
"MIT"
] | null | null | null | Eulers method.py | pramotharun/Numerical-Methods-with-Python | bd5676bcc4ac5defd13608728df2387b5fdcdfcb | [
"MIT"
] | null | null | null | Eulers method.py | pramotharun/Numerical-Methods-with-Python | bd5676bcc4ac5defd13608728df2387b5fdcdfcb | [
"MIT"
] | null | null | null | #Eulers method
import numpy as np
def dy(ynew,xnew,y,x,h):
dyvalue = y-x
return dyvalue
#Note: change the derivative function based on question!!!!!! Example: y-x
y0 = 0.5 #float(input"what is the y(0)?")
h = 0.1 #float(input"h?")
x_final = 0.3 #float(input"x_final")
#initiating input variables
x = 0
y ... | 19.5 | 76 | 0.543346 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 365 | 0.445665 |
c9b764a791904b90c564bbc7b72661cf5b307b36 | 18,896 | py | Python | modules/network_dictionary_builder.py | shartzog/CovidCNN | 68bafe185c53f98b896ee01fdcf99f828f251036 | [
"MIT"
] | null | null | null | modules/network_dictionary_builder.py | shartzog/CovidCNN | 68bafe185c53f98b896ee01fdcf99f828f251036 | [
"MIT"
] | null | null | null | modules/network_dictionary_builder.py | shartzog/CovidCNN | 68bafe185c53f98b896ee01fdcf99f828f251036 | [
"MIT"
] | null | null | null | """
Contains Net and NetDictionary class for creating a random collection of CNN structures
or loading a previously created collection.
"""
from __future__ import division, print_function
from random import random
import os.path
import torch
from torch import nn
from torch import optim
from torch.nn import functional... | 48.953368 | 116 | 0.556467 | 18,196 | 0.962955 | 0 | 0 | 0 | 0 | 0 | 0 | 7,567 | 0.400455 |
c9b7d5c05e7bdbe4c159664bc93dea9d1f8df223 | 1,917 | py | Python | src/vmshepherd/app.py | DreamLab/VmShepherd | f602bb814080d2d3f62c6cb5fa6b9dd685833c24 | [
"Apache-2.0"
] | 10 | 2018-06-10T17:54:57.000Z | 2022-02-07T19:37:07.000Z | src/vmshepherd/app.py | DreamLab/VmShepherd | f602bb814080d2d3f62c6cb5fa6b9dd685833c24 | [
"Apache-2.0"
] | 10 | 2018-06-10T18:46:07.000Z | 2021-05-13T13:01:22.000Z | src/vmshepherd/app.py | DreamLab/VmShepherd | f602bb814080d2d3f62c6cb5fa6b9dd685833c24 | [
"Apache-2.0"
] | 3 | 2019-07-18T14:10:10.000Z | 2022-02-07T19:37:08.000Z | import asyncio
import logging
import os
from vmshepherd.drivers import Drivers
from vmshepherd.http import WebServer
from vmshepherd.utils import gen_id, prefix_logging
from vmshepherd.worker import Worker
class VmShepherd:
def __init__(self, config):
self.config = config
self.root_dir = os.path.... | 32.491525 | 96 | 0.639019 | 1,708 | 0.890975 | 0 | 0 | 0 | 0 | 156 | 0.081377 | 145 | 0.075639 |
c9b84e52e79d954ea22decc10bdcb695a3cc56e1 | 1,762 | py | Python | opsdroid/connector/slack/events.py | himanshu1root/opsdroid | 26699c5e7cc014a0d3ab74baf66fbadce939ab73 | [
"Apache-2.0"
] | 1 | 2020-04-29T20:44:44.000Z | 2020-04-29T20:44:44.000Z | opsdroid/connector/slack/events.py | himanshu1root/opsdroid | 26699c5e7cc014a0d3ab74baf66fbadce939ab73 | [
"Apache-2.0"
] | 10 | 2019-06-22T11:18:55.000Z | 2019-09-03T13:26:47.000Z | opsdroid/connector/slack/events.py | himanshu1root/opsdroid | 26699c5e7cc014a0d3ab74baf66fbadce939ab73 | [
"Apache-2.0"
] | 1 | 2019-06-11T22:30:49.000Z | 2019-06-11T22:30:49.000Z | """Classes to describe different kinds of Slack specific event."""
import json
from opsdroid.events import Message
class Blocks(Message):
"""A blocks object.
Slack uses blocks to add advenced interactivity and formatting to messages.
https://api.slack.com/messaging/interactivity
Blocks are provided... | 39.155556 | 79 | 0.648127 | 1,642 | 0.931896 | 0 | 0 | 0 | 0 | 0 | 0 | 1,456 | 0.826334 |
c9b8a09501b36968a133bb1816fb52f2dd36b599 | 42 | py | Python | examples/modules/object_tracker/__init__.py | jagin/dvg-utils | a7d19ead75398b09a9f1e146464cf4227f06a476 | [
"MIT"
] | 7 | 2020-09-02T08:39:22.000Z | 2021-10-13T18:13:04.000Z | examples/modules/object_tracker/__init__.py | jagin/dvg-utils | a7d19ead75398b09a9f1e146464cf4227f06a476 | [
"MIT"
] | null | null | null | examples/modules/object_tracker/__init__.py | jagin/dvg-utils | a7d19ead75398b09a9f1e146464cf4227f06a476 | [
"MIT"
] | null | null | null | from .object_tracker import ObjectTracker
| 21 | 41 | 0.880952 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c9b95e3837c6ec2e9141c7cfae3e53054b21d5b5 | 3,449 | py | Python | src/train.py | SYHPARK/MalConv-keras | 2b68ba82e2201290130bed6d58f5725b17a87867 | [
"MIT"
] | null | null | null | src/train.py | SYHPARK/MalConv-keras | 2b68ba82e2201290130bed6d58f5725b17a87867 | [
"MIT"
] | null | null | null | src/train.py | SYHPARK/MalConv-keras | 2b68ba82e2201290130bed6d58f5725b17a87867 | [
"MIT"
] | null | null | null | from os.path import join
import argparse
import pickle
import warnings
import pandas as pd
from keras.callbacks import ModelCheckpoint, EarlyStopping
from keras.models import load_model
import utils
from malconv import Malconv
from preprocess import preprocess
warnings.filterwarnings("ignore")
parser = argparse.Argu... | 40.104651 | 116 | 0.684836 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 790 | 0.229052 |
c9bc28a5d5d38a212f5e0f03eba96a2a3f217595 | 1,870 | py | Python | unittesting.py | slobbishbody/routegetter | b6c279c1734530fd2aec08da9317575b66150092 | [
"MIT"
] | null | null | null | unittesting.py | slobbishbody/routegetter | b6c279c1734530fd2aec08da9317575b66150092 | [
"MIT"
] | null | null | null | unittesting.py | slobbishbody/routegetter | b6c279c1734530fd2aec08da9317575b66150092 | [
"MIT"
] | null | null | null | '''We will test all routegetter methods in this test suite'''
from os.path import join, abspath, sep
import unittest
import logging
import routesparser
from faker import Faker
LOG_FILE = join(sep.join(sep.split(abspath(__file__))[:-1]), 'log', 'testing', 'testing.log')
class RoutesGetterTests(unittest.TestCase):
... | 33.392857 | 93 | 0.673797 | 1,488 | 0.795722 | 0 | 0 | 771 | 0.412299 | 0 | 0 | 295 | 0.157754 |
c9bc5072826fedfaeb9d7bc762e8a4e79ddf3354 | 961 | py | Python | side8/k8s/operator/utils.py | side8/k8s-operator | 4097d91c39596993fcd21c2e9158796f83f7ea6f | [
"Apache-2.0"
] | 29 | 2017-12-12T04:51:47.000Z | 2021-12-16T13:33:30.000Z | side8/k8s/operator/utils.py | side8/k8s-operator | 4097d91c39596993fcd21c2e9158796f83f7ea6f | [
"Apache-2.0"
] | 18 | 2017-11-16T17:57:59.000Z | 2018-01-30T11:05:29.000Z | side8/k8s/operator/utils.py | side8/k8s-operator | 4097d91c39596993fcd21c2e9158796f83f7ea6f | [
"Apache-2.0"
] | 6 | 2018-10-01T16:37:45.000Z | 2021-05-07T02:34:44.000Z | def parse(o, prefix=""):
def flatten(lis):
new_lis = []
for item in lis:
if isinstance(item, list):
new_lis.extend(flatten(item))
else:
new_lis.append(item)
return new_lis
try:
return {
"str": lambda: (prefix, o... | 41.782609 | 136 | 0.522373 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.104058 |
c9bca9a508473ab1f3f0748890578a6eb5bddb04 | 710 | py | Python | setup.py | thetongs/hello_world | 5c2ab413cd104ed6d8a5640ee6fd3476d0f1e846 | [
"MIT"
] | null | null | null | setup.py | thetongs/hello_world | 5c2ab413cd104ed6d8a5640ee6fd3476d0f1e846 | [
"MIT"
] | null | null | null | setup.py | thetongs/hello_world | 5c2ab413cd104ed6d8a5640ee6fd3476d0f1e846 | [
"MIT"
] | null | null | null | from setuptools import setup
VERSION = '0.0.4'
DESCRIPTION = 'Hello world checking'
# Setting up
setup(
name="hello_world",
version=VERSION,
author="Kishan Tongrao",
author_email="[email protected]",
description=DESCRIPTION,
long_description_content_type="text/markdown",
... | 28.4 | 52 | 0.625352 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 335 | 0.471831 |
c9bd340296dec5cc98f4fa44de42146d4f90d4d2 | 123 | py | Python | python/basic_utils.py | goten-team/Goten | 690f1429b62c70caec72f4010ee5b7a9786f0d25 | [
"MIT"
] | 17 | 2020-04-28T09:18:28.000Z | 2021-12-28T08:38:00.000Z | python/basic_utils.py | goten-team/Goten | 690f1429b62c70caec72f4010ee5b7a9786f0d25 | [
"MIT"
] | 2 | 2021-09-26T04:10:51.000Z | 2022-03-31T05:28:25.000Z | python/basic_utils.py | goten-team/Goten | 690f1429b62c70caec72f4010ee5b7a9786f0d25 | [
"MIT"
] | 2 | 2021-09-26T05:06:17.000Z | 2021-12-14T16:25:06.000Z | import hashlib
def str_hash(s):
return int(int(hashlib.sha224(s.encode('utf-8')).hexdigest(), 16) % ((1 << 62) - 1))
| 20.5 | 88 | 0.617886 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0.056911 |
c9bfafc48a06f70a20cac8ad26dc2486eeccba0a | 4,354 | py | Python | MSspeechAPI_class.py | houhry/AutosubBehindWall | 3903ee457d90c31db9a39957ad06468d556023ee | [
"MIT"
] | 14 | 2019-03-14T03:12:25.000Z | 2020-12-23T14:28:05.000Z | MSspeechAPI_class.py | houhry/AutosubBehindWall | 3903ee457d90c31db9a39957ad06468d556023ee | [
"MIT"
] | null | null | null | MSspeechAPI_class.py | houhry/AutosubBehindWall | 3903ee457d90c31db9a39957ad06468d556023ee | [
"MIT"
] | 6 | 2019-03-12T03:46:14.000Z | 2021-12-11T13:55:47.000Z | # -*- coding:utf-8 -*-
import certifi
import pycurl
import requests
import os
import json
import uuid
from StringIO import StringIO
def byteify(input_data):
# convert json to list
if isinstance(input_data, dict):
return {byteify(key): byteify(value) for key, value in input_data.iteritems(... | 36.588235 | 124 | 0.589113 | 3,451 | 0.778655 | 204 | 0.046029 | 0 | 0 | 0 | 0 | 1,176 | 0.265343 |
c9c3b89ba882bb0aa6a88e4ec97e3255252d24db | 1,565 | py | Python | projects/gettingStarted/CannyStill.py | lucasbrsa/OpenCV3.2 | b6db40bd43dce7847dce1a808fd29bb1b140dea3 | [
"MIT"
] | null | null | null | projects/gettingStarted/CannyStill.py | lucasbrsa/OpenCV3.2 | b6db40bd43dce7847dce1a808fd29bb1b140dea3 | [
"MIT"
] | null | null | null | projects/gettingStarted/CannyStill.py | lucasbrsa/OpenCV3.2 | b6db40bd43dce7847dce1a808fd29bb1b140dea3 | [
"MIT"
] | null | null | null | # CannyStill.py
import cv2
import numpy as np
import os
###################################################################################################
def main():
imgOriginal = cv2.imread("image.jpg") # open image
if imgOriginal is None: # if image was not read ... | 42.297297 | 124 | 0.502236 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 722 | 0.461342 |
c9c4069353131d5a64d6da6f767d0fbe4eba61e3 | 212 | py | Python | examples/timeseries_from_dataframe.py | yarikoptic/seaborn | ed4baa32267cc4a44abb40dc243ae75a1d180e85 | [
"MIT",
"BSD-3-Clause"
] | 3 | 2016-01-25T16:54:25.000Z | 2020-05-01T15:15:30.000Z | examples/timeseries_from_dataframe.py | PureW/seaborn | f400d86002c6d4b2d67eb9740adad908e84f8328 | [
"MIT",
"BSD-3-Clause"
] | 1 | 2021-06-23T16:40:53.000Z | 2021-06-23T16:40:53.000Z | examples/timeseries_from_dataframe.py | PureW/seaborn | f400d86002c6d4b2d67eb9740adad908e84f8328 | [
"MIT",
"BSD-3-Clause"
] | 2 | 2019-04-02T19:52:25.000Z | 2021-07-06T21:17:27.000Z | """
Timeseries from DataFrame
=========================
"""
import seaborn as sns
sns.set(style="darkgrid")
gammas = sns.load_dataset("gammas")
sns.tsplot(gammas, "timepoint", "subject", "ROI", "BOLD signal")
| 17.666667 | 64 | 0.617925 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 0.54717 |
c9c71fc7edb4fb9a65e3ae3dd552c204669f2537 | 533 | py | Python | bc/ed/definition.py | ajah/represent-canada-data | f79092442767faa0b4babe50a377408e8576c8c4 | [
"OML"
] | null | null | null | bc/ed/definition.py | ajah/represent-canada-data | f79092442767faa0b4babe50a377408e8576c8c4 | [
"OML"
] | null | null | null | bc/ed/definition.py | ajah/represent-canada-data | f79092442767faa0b4babe50a377408e8576c8c4 | [
"OML"
] | null | null | null | from datetime import date
import boundaries
boundaries.register('British Columbia electoral districts',
domain='British Columbia',
last_updated=date(2011, 12, 12),
name_func=boundaries.attr('edname'),
id_func=boundaries.attr('edabbr'),
authority='Elections BC',
source_url='http://www.elections... | 38.071429 | 140 | 0.744841 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 287 | 0.538462 |
c9c93db3dbc0d8e8af8b81d596af15d7ca55058b | 2,228 | py | Python | src/cms/medias/hooks.py | UniversitaDellaCalabria/uniCMS | b0af4e1a767867f0a9b3c135a5c84587e713cb71 | [
"Apache-2.0"
] | 6 | 2021-01-26T17:22:53.000Z | 2022-02-15T10:09:03.000Z | src/cms/medias/hooks.py | UniversitaDellaCalabria/uniCMS | b0af4e1a767867f0a9b3c135a5c84587e713cb71 | [
"Apache-2.0"
] | 5 | 2020-12-24T14:29:23.000Z | 2021-08-10T10:32:18.000Z | src/cms/medias/hooks.py | UniversitaDellaCalabria/uniCMS | b0af4e1a767867f0a9b3c135a5c84587e713cb71 | [
"Apache-2.0"
] | 2 | 2020-12-24T14:13:39.000Z | 2020-12-30T16:48:52.000Z | import logging
import magic
import os
from cms.medias.utils import get_file_type_size
from django.conf import settings
from django.core.files.uploadedfile import InMemoryUploadedFile
from . import settings as app_settings
from . utils import to_webp
logger = logging.getLogger(__name__)
FILETYPE_IMAGE = getattr(sett... | 32.289855 | 91 | 0.609964 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 331 | 0.148564 |
c9ca952daadbee6b22e4cb8d53f17d4f335031b8 | 222 | py | Python | accounts/urls.py | afg984/happpycoding | d881de4d70abea3062928454d55dcc816d37b3a5 | [
"MIT"
] | 6 | 2015-11-28T13:34:38.000Z | 2016-10-11T11:59:50.000Z | accounts/urls.py | afg984/happpycoding | d881de4d70abea3062928454d55dcc816d37b3a5 | [
"MIT"
] | null | null | null | accounts/urls.py | afg984/happpycoding | d881de4d70abea3062928454d55dcc816d37b3a5 | [
"MIT"
] | null | null | null | from django_fsu import url
from . import views
urlpatterns = [
url('login/', views.login, name='login'),
url('logout/', views.logout, name='logout'),
url('profile/<int:pk>', views.profile, name='profile'),
]
| 22.2 | 59 | 0.648649 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.265766 |
c9cb7becdd0922382057eaf8cf2a26ecd9e3c101 | 747 | py | Python | setup.py | Coldwave96/PocLibrary | 4bdc069c257f441379e9fd428ac8df7d4f5e9ca9 | [
"Apache-2.0"
] | 11 | 2020-08-24T03:31:23.000Z | 2022-01-15T12:19:31.000Z | setup.py | Coldwave96/PocLibrary | 4bdc069c257f441379e9fd428ac8df7d4f5e9ca9 | [
"Apache-2.0"
] | null | null | null | setup.py | Coldwave96/PocLibrary | 4bdc069c257f441379e9fd428ac8df7d4f5e9ca9 | [
"Apache-2.0"
] | 3 | 2020-08-24T03:31:28.000Z | 2021-09-19T14:54:46.000Z | """
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
APP = ['PocLibrary.py']
APP_NAME = "PocLibrary"
DATA_FILES = []
OPTIONS = {
'iconfile': 'logo.icns',
'plist': {
'CFBundleName': APP_NAME,
'CFBundleDisplayName': APP_NAME,
... | 21.970588 | 86 | 0.631861 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 419 | 0.56016 |
c9cba2d718dc17bd9bd34864d1e448f3f16a9751 | 8,840 | py | Python | tests/thumbor.py | hurbcom/libthumbor | 8362f08071ed1ce345be59713825844808873a80 | [
"MIT"
] | null | null | null | tests/thumbor.py | hurbcom/libthumbor | 8362f08071ed1ce345be59713825844808873a80 | [
"MIT"
] | null | null | null | tests/thumbor.py | hurbcom/libthumbor | 8362f08071ed1ce345be59713825844808873a80 | [
"MIT"
] | null | null | null | # encoding: utf-8
import base64
import hashlib
import hmac
import re
import six
from six.moves.urllib.parse import quote
from Crypto.Cipher import AES
class Url(object):
unsafe_or_hash = r'(?:(?:(?P<unsafe>unsafe)|(?P<hash>[^/]{28,}?))/)?'
debug = '(?:(?P<debug>debug)/)?'
meta = '(?:(?P<meta>meta)/)?'
... | 30.801394 | 119 | 0.508145 | 8,679 | 0.981787 | 0 | 0 | 4,192 | 0.474208 | 0 | 0 | 1,478 | 0.167195 |
c9ce4ccacd1980f9dcbf0a2c852bfa9e74a3ad5a | 4,420 | py | Python | config.py | NYU-DICE-Lab/graph_invnet | 166db79ac9ab3bff0e67ab0ec978da7efea042e2 | [
"MIT"
] | null | null | null | config.py | NYU-DICE-Lab/graph_invnet | 166db79ac9ab3bff0e67ab0ec978da7efea042e2 | [
"MIT"
] | 4 | 2021-06-08T23:01:47.000Z | 2022-03-12T00:53:53.000Z | config.py | NYU-DICE-Lab/graph_invnet | 166db79ac9ab3bff0e67ab0ec978da7efea042e2 | [
"MIT"
] | null | null | null | """ Config class for training the InvNet """
import argparse
from dp_layer.graph_layer.edge_functions import edge_f_dict as d
def get_parser(name):
"""
:param name: String for Config Name
:return: parser
"""
parser = argparse.ArgumentParser(name, formatter_class=argparse.ArgumentDefaultsHelpFo... | 53.253012 | 122 | 0.682579 | 4,068 | 0.920362 | 0 | 0 | 0 | 0 | 0 | 0 | 1,533 | 0.346833 |
c9d237ae48e81118b5aaea91722859235e40aa06 | 1,599 | py | Python | flaskrst/modules/tags.py | jarus/flask-rst | 05b6a817f5986d6f6a4552d16a133deb8859ce3e | [
"BSD-3-Clause"
] | 7 | 2015-01-22T14:32:55.000Z | 2021-07-14T02:54:42.000Z | flaskrst/modules/tags.py | jarus/flask-rst | 05b6a817f5986d6f6a4552d16a133deb8859ce3e | [
"BSD-3-Clause"
] | null | null | null | flaskrst/modules/tags.py | jarus/flask-rst | 05b6a817f5986d6f6a4552d16a133deb8859ce3e | [
"BSD-3-Clause"
] | 2 | 2016-03-14T01:06:13.000Z | 2016-04-15T13:26:54.000Z | # -*- coding: utf-8 -*-
"""
flask-rst.modules.tags
~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2011 by Christoph Heer.
:license: BSD, see LICENSE for more details.
"""
from math import log
from flask import Blueprint, render_template
from jinja2 import Markup
from flaskrst.modules.blog import posts
d... | 26.213115 | 72 | 0.605378 | 0 | 0 | 0 | 0 | 382 | 0.238899 | 0 | 0 | 296 | 0.185116 |
c9d4af05e2b5e939ee1aea3341e906f371d84c8b | 12,560 | py | Python | tests/test_apsw.py | hideaki-t/sqlite-fts-python | 2afdc4ad6d3d7856d801bd3f9106160825f49d00 | [
"MIT"
] | 35 | 2015-05-06T13:37:02.000Z | 2022-01-06T02:52:49.000Z | tests/test_apsw.py | polyrand/sqlite-fts-python | 2afdc4ad6d3d7856d801bd3f9106160825f49d00 | [
"MIT"
] | 18 | 2015-11-21T19:00:57.000Z | 2021-12-31T12:41:08.000Z | tests/test_apsw.py | polyrand/sqlite-fts-python | 2afdc4ad6d3d7856d801bd3f9106160825f49d00 | [
"MIT"
] | 11 | 2015-01-12T12:20:29.000Z | 2021-04-07T21:43:48.000Z | # coding: utf-8
from __future__ import print_function, unicode_literals
import re
import pytest
import sqlitefts as fts
from sqlitefts import fts5, fts5_aux
apsw = pytest.importorskip("apsw")
class SimpleTokenizer(fts.Tokenizer):
_p = re.compile(r"\w+", re.UNICODE)
def tokenize(self, text):
for m... | 34.31694 | 143 | 0.525398 | 652 | 0.050285 | 477 | 0.036789 | 1,031 | 0.079516 | 0 | 0 | 4,545 | 0.350532 |
c9d7bec33f61ca45367ed74051d9e674ed9eb713 | 211 | py | Python | unit_03/random/passwd1.py | janusnic/21v-pyqt | 8ee3828e1c6e6259367d6cedbd63b9057cf52c24 | [
"MIT"
] | null | null | null | unit_03/random/passwd1.py | janusnic/21v-pyqt | 8ee3828e1c6e6259367d6cedbd63b9057cf52c24 | [
"MIT"
] | null | null | null | unit_03/random/passwd1.py | janusnic/21v-pyqt | 8ee3828e1c6e6259367d6cedbd63b9057cf52c24 | [
"MIT"
] | 2 | 2019-11-14T15:04:22.000Z | 2021-10-31T07:34:46.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
генератор случайных чисел
"""
import random
print ''.join([random.choice(list('123456789qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM')) for x in range(12)]) | 26.375 | 120 | 0.739336 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 161 | 0.688034 |
c9d8ca7a24eddf8714bfa4046edd0feee39e2a38 | 1,283 | py | Python | lib/core/network.py | lck1201/seq2seq-3Dpose | 3f45cc0f001ac5d25705834541d55938bf1907b6 | [
"MIT"
] | 13 | 2019-03-29T13:39:36.000Z | 2021-09-07T11:15:45.000Z | lib/core/network.py | lck1201/seq2seq-3Dpose | 3f45cc0f001ac5d25705834541d55938bf1907b6 | [
"MIT"
] | 1 | 2019-12-14T21:12:17.000Z | 2019-12-14T21:12:17.000Z | lib/core/network.py | lck1201/seq2seq-3Dpose | 3f45cc0f001ac5d25705834541d55938bf1907b6 | [
"MIT"
] | null | null | null | import mxnet as mx
from mxnet import nd
from mxnet import gluon
from mxnet.gluon import nn, rnn
from config import config
nJoints = config.NETWORK.nJoints
class MyLSTM(gluon.Block):
def __init__(self, cfg, **kwargs):
super(MyLSTM, self).__init__(**kwargs)
self.hidden_dim = cfg.NETWORK.hidden_dim
... | 36.657143 | 87 | 0.639127 | 1,085 | 0.845674 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.038971 |
c9d97586e443bc62d5fe8b8784de68a2c4bfe273 | 536 | py | Python | Session1_2018/Practice/karatsuba_multiplication.py | vedantc6/LCode | 43aec4da9cc22ef43e877a16dbee380b98d9089f | [
"MIT"
] | 1 | 2018-09-21T10:51:15.000Z | 2018-09-21T10:51:15.000Z | Session1_2018/Practice/karatsuba_multiplication.py | vedantc6/LCode | 43aec4da9cc22ef43e877a16dbee380b98d9089f | [
"MIT"
] | null | null | null | Session1_2018/Practice/karatsuba_multiplication.py | vedantc6/LCode | 43aec4da9cc22ef43e877a16dbee380b98d9089f | [
"MIT"
] | null | null | null | from math import ceil, floor
def k_multiply(a, b):
if len(str(a)) == 1 or len(str(b)) == 1:
return int(a)*int(b)
n = max(len(str(a)), len(str(b)))
al = a // 10**(n//2)
ar = a % 10**(n//2)
bl = b // 10**(n//2)
br = b % 10**(n//2)
p1 = k_multiply(al, bl)
p2 = k_multiply(ar, br)
... | 26.8 | 59 | 0.507463 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.018657 |
c9da6ebaaad2c77b2b6e79ec9dbb080561fa3b98 | 1,138 | py | Python | day10/day10.py | ecly/a | 73642e7edae484984430492ca9b62bd52b315a50 | [
"MIT"
] | null | null | null | day10/day10.py | ecly/a | 73642e7edae484984430492ca9b62bd52b315a50 | [
"MIT"
] | null | null | null | day10/day10.py | ecly/a | 73642e7edae484984430492ca9b62bd52b315a50 | [
"MIT"
] | null | null | null | import sys
def print_lights(lights):
x = [x for x,y in lights.keys()]
y = [y for x,y in lights.keys()]
minx, maxx = min(x), max(x)
miny, maxy = min(y), max(y)
if maxy - miny < 18:
result = []
for y in range(miny, maxy+1):
for x in range(minx, maxx+1):
re... | 23.708333 | 78 | 0.516696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.038664 |
c9dbe4020052218bd87d8a5c72620da1aa4c792c | 1,850 | py | Python | fuzzystring.py | ZackDev/fuzzystring | 70d5e55f8cf90bcebdb491ba26baa3e05d479189 | [
"MIT"
] | null | null | null | fuzzystring.py | ZackDev/fuzzystring | 70d5e55f8cf90bcebdb491ba26baa3e05d479189 | [
"MIT"
] | null | null | null | fuzzystring.py | ZackDev/fuzzystring | 70d5e55f8cf90bcebdb491ba26baa3e05d479189 | [
"MIT"
] | null | null | null | import re
import random
import string
import os
supported_types = ['a', 'n', 's']
count_types = []
def fuzzyfy(types, length):
# check type and length parameters for validity
try:
int(length)
except Exception:
return None
if types == '' or types == "":
return None
elif ... | 22.02381 | 78 | 0.571351 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 242 | 0.130811 |
c9dcd26ab8ee7882eebaee13880a0044570deca1 | 787 | py | Python | tests/conftest.py | m-schmoock/lightning | 5ffc516133d07aa653c680cf96d5316a614dbc1f | [
"MIT"
] | 1 | 2021-01-20T05:46:35.000Z | 2021-01-20T05:46:35.000Z | tests/conftest.py | m-schmoock/lightning | 5ffc516133d07aa653c680cf96d5316a614dbc1f | [
"MIT"
] | 5 | 2020-12-16T13:44:59.000Z | 2021-06-06T06:11:12.000Z | tests/conftest.py | m-schmoock/lightning | 5ffc516133d07aa653c680cf96d5316a614dbc1f | [
"MIT"
] | 7 | 2019-10-07T23:53:49.000Z | 2021-11-23T18:26:30.000Z | import pytest
# This function is based upon the example of how to
# "[make] test result information available in fixtures" at:
# https://pytest.org/latest/example/simple.html#making-test-result-information-available-in-fixtures
# and:
# https://github.com/pytest-dev/pytest/issues/288
@pytest.hookimpl(tryfirst=True,... | 32.791667 | 101 | 0.707751 | 0 | 0 | 297 | 0.377382 | 347 | 0.440915 | 0 | 0 | 477 | 0.606099 |
c9dcfb8d245f4e4c379ad41c4bae671d93734033 | 1,236 | py | Python | perfkitbenchmarker/context.py | robfrut135/PerfKitBenchmarker | ccaf81b47ed5e3f27065e8f8d9fc42d071bfc22c | [
"Apache-2.0"
] | 3 | 2018-04-28T13:06:14.000Z | 2020-06-09T02:39:44.000Z | perfkitbenchmarker/context.py | robfrut135/PerfKitBenchmarker | ccaf81b47ed5e3f27065e8f8d9fc42d071bfc22c | [
"Apache-2.0"
] | 1 | 2018-03-15T21:01:27.000Z | 2018-03-15T21:01:27.000Z | perfkitbenchmarker/context.py | robfrut135/PerfKitBenchmarker | ccaf81b47ed5e3f27065e8f8d9fc42d071bfc22c | [
"Apache-2.0"
] | 6 | 2019-06-11T18:59:57.000Z | 2021-03-02T19:14:42.000Z | # Copyright 2015 PerfKitBenchmarker Authors. All rights reserved.
#
# 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 appli... | 30.9 | 78 | 0.771036 | 88 | 0.071197 | 0 | 0 | 0 | 0 | 0 | 0 | 910 | 0.736246 |
c9df6ba0ed0d28f7270862edcecc5a88bc403d3d | 615 | py | Python | arcade/rainbow.py | itsMadesh/python-personal-programs | 05355aa098afd87b345c9a2ca21b48552bf5a23b | [
"MIT"
] | null | null | null | arcade/rainbow.py | itsMadesh/python-personal-programs | 05355aa098afd87b345c9a2ca21b48552bf5a23b | [
"MIT"
] | null | null | null | arcade/rainbow.py | itsMadesh/python-personal-programs | 05355aa098afd87b345c9a2ca21b48552bf5a23b | [
"MIT"
] | null | null | null | import arcade
arcade.open_window(500,750,"Rainbow")
arcade.set_background_color(arcade.color.SKY_BLUE)
arcade.start_render()
arcade.draw_parabola_filled(25,80,500,300,arcade.color.RED,0)
arcade.draw_parabola_filled(50,80,470,280,arcade.color.ORANGE,0)
arcade.draw_parabola_filled(75,80,440,260,arcade.color.YELLOW ,0)
ar... | 43.928571 | 65 | 0.827642 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.014634 |
c9e0e47d0408e03065a4fc6bb39fcef4c8c2b570 | 403 | py | Python | portal/migrations/0017_remove_professor_nome_abreviado.py | leodiasp/abcmobile | 470966239230becc1d52cbd7c2794d9572915dfd | [
"MIT"
] | null | null | null | portal/migrations/0017_remove_professor_nome_abreviado.py | leodiasp/abcmobile | 470966239230becc1d52cbd7c2794d9572915dfd | [
"MIT"
] | null | null | null | portal/migrations/0017_remove_professor_nome_abreviado.py | leodiasp/abcmobile | 470966239230becc1d52cbd7c2794d9572915dfd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2019-02-13 18:49
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('portal', '0016_auto_20190213_1645'),
]
operations = [
migrations.RemoveField(
... | 20.15 | 48 | 0.622829 | 253 | 0.627792 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.325062 |
c9e2dcad41a62fabe6d852cdc47cfde976426a83 | 1,510 | py | Python | modules/drop.py | a-wing/mavelous | eef41c096cc282bb3acd33a747146a88d2bd1eee | [
"MIT"
] | 80 | 2015-01-02T23:23:19.000Z | 2021-11-02T16:03:07.000Z | modules/drop.py | Y-H-T/mavelous | eef41c096cc282bb3acd33a747146a88d2bd1eee | [
"MIT"
] | 1 | 2016-04-13T15:44:23.000Z | 2016-04-13T15:44:23.000Z | modules/drop.py | Y-H-T/mavelous | eef41c096cc282bb3acd33a747146a88d2bd1eee | [
"MIT"
] | 63 | 2015-01-03T19:35:39.000Z | 2022-02-08T17:15:44.000Z | #!/usr/bin/env python
''' simple bottle drop module'''
import time
mpstate = None
hold_pwm = 983
release_pwm = 1776
drop_channel = 5
drop_time = 2.0
class drop_state(object):
def __init__(self):
self.waiting = False
self.start_drop = 0
def name():
'''return module name'''
return "drop"
... | 26.491228 | 92 | 0.660265 | 106 | 0.070199 | 0 | 0 | 0 | 0 | 0 | 0 | 388 | 0.256954 |
c9e3019d7f86a0fcc9bd9c9aa1f3b2b74e02646a | 9,232 | py | Python | tests/data/pandas_valid_data.py | craft-ai/craft-ai-client-python | 3d8b3d9a49c0c70964deaeb9645130dd54f9a0b3 | [
"BSD-3-Clause"
] | 14 | 2016-08-26T07:06:57.000Z | 2020-09-22T07:41:21.000Z | tests/data/pandas_valid_data.py | craft-ai/craft-ai-client-python | 3d8b3d9a49c0c70964deaeb9645130dd54f9a0b3 | [
"BSD-3-Clause"
] | 94 | 2016-08-02T14:07:59.000Z | 2021-10-06T11:50:52.000Z | tests/data/pandas_valid_data.py | craft-ai/craft-ai-client-python | 3d8b3d9a49c0c70964deaeb9645130dd54f9a0b3 | [
"BSD-3-Clause"
] | 8 | 2017-02-07T12:05:57.000Z | 2021-10-14T09:45:30.000Z | import pandas as pd
import numpy as np
from numpy.random import randn
from craft_ai.pandas import MISSING_VALUE, OPTIONAL_VALUE
from random import random, randint
NB_OPERATIONS = 300
NB_MANY_OPERATIONS = 1000
SIMPLE_AGENT_BOOSTING_CONFIGURATION = {
"model_type": "boosting",
"context": {
"a": {"type": ... | 26.682081 | 86 | 0.517006 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,314 | 0.358969 |
c9e4abe60b90e60426a219ee6fec07063b3f40f3 | 305 | py | Python | src/api/pages.py | nhardy/py-js-web-scaffold | adf3e3ada0b21cdb9620676de795579107442dd7 | [
"MIT"
] | null | null | null | src/api/pages.py | nhardy/py-js-web-scaffold | adf3e3ada0b21cdb9620676de795579107442dd7 | [
"MIT"
] | null | null | null | src/api/pages.py | nhardy/py-js-web-scaffold | adf3e3ada0b21cdb9620676de795579107442dd7 | [
"MIT"
] | null | null | null | import tornado.web
from content import PAGES
def page_controller(handler_instance, path):
if path in PAGES:
handler_instance.write(PAGES[path].serialize())
else:
handler_instance.set_status(404)
handler_instance.write({
'message': 'A resource was not found for this path.'
})
| 21.785714 | 58 | 0.721311 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.163934 |
c9e532019c14012309cd048823903e390b14f730 | 3,767 | py | Python | retropie/influx-retropie.py | Epaphus/personal-influxdb | 6357bc8a1b362280b0ce79674ddd8e804573f2a9 | [
"Apache-2.0"
] | 217 | 2020-01-07T20:25:46.000Z | 2022-03-29T06:09:58.000Z | retropie/influx-retropie.py | Epaphus/personal-influxdb | 6357bc8a1b362280b0ce79674ddd8e804573f2a9 | [
"Apache-2.0"
] | 16 | 2020-02-10T12:40:23.000Z | 2022-02-26T13:01:55.000Z | retropie/influx-retropie.py | Epaphus/personal-influxdb | 6357bc8a1b362280b0ce79674ddd8e804573f2a9 | [
"Apache-2.0"
] | 34 | 2020-01-15T15:42:20.000Z | 2022-02-22T17:29:15.000Z | #!/usr/bin/python3
# Copyright (C) 2020 Sam Steele
# 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... | 27.297101 | 123 | 0.689673 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,577 | 0.418636 |
c9e56f5f70dd474993a40687a674f32c37bed1cb | 7,470 | py | Python | molecule.py | Ved-P/molecule | 9727a9e7f8c0412feee27bbe034a1540cff7534e | [
"MIT"
] | null | null | null | molecule.py | Ved-P/molecule | 9727a9e7f8c0412feee27bbe034a1540cff7534e | [
"MIT"
] | 1 | 2022-01-03T20:07:31.000Z | 2022-01-04T18:45:21.000Z | molecule.py | Ved-P/molecule | 9727a9e7f8c0412feee27bbe034a1540cff7534e | [
"MIT"
] | null | null | null | # Molecule
#
# This program takes in a molecular formula and creates a Lewis diagram and a 3D
# model of the molecule as the output.
#
# Author: Ved Pradhan
# Since: December 31, 2021
import json
import matplotlib.pyplot as plt
import sys
import math
# Opens the JSON file for use.
with open("elements.json", "r", enc... | 30.995851 | 107 | 0.58822 | 1,437 | 0.192369 | 0 | 0 | 0 | 0 | 0 | 0 | 1,830 | 0.24498 |
c9e7b5a8abbdd10976c1ff71d253777d5ecde531 | 9,185 | py | Python | app/transaction/attendence.py | rrsk/hiwayPay | c84b7581475164751f64540a521b803bdf08a9fb | [
"MIT"
] | 31 | 2020-07-01T06:40:16.000Z | 2022-03-30T18:49:02.000Z | app/transaction/attendence.py | rrsk/hiwayPay | c84b7581475164751f64540a521b803bdf08a9fb | [
"MIT"
] | 2 | 2020-11-02T06:21:23.000Z | 2021-06-02T00:31:06.000Z | app/transaction/attendence.py | rrsk/hiwayPay | c84b7581475164751f64540a521b803bdf08a9fb | [
"MIT"
] | 13 | 2020-07-02T07:06:05.000Z | 2022-03-15T11:34:41.000Z | from flask import Blueprint
from flask import render_template, redirect, url_for, request, session, jsonify
from flask_login import login_user, logout_user, current_user
from app.transaction import bp
from app.transaction.model_att import Attendence, AttendenceSchema , CompanySchema
from app.employee.model import Emplo... | 38.919492 | 157 | 0.507349 | 0 | 0 | 0 | 0 | 8,258 | 0.899075 | 0 | 0 | 1,717 | 0.186935 |
c9e83e673a43a955f85b17deeccd1c24bc0579dc | 3,385 | py | Python | examples/monitor.py | seba-1511/randopt | 74cefcc734c6a38418151025b0a4d8b6cb41eb14 | [
"Apache-2.0"
] | 115 | 2016-11-21T06:44:19.000Z | 2022-01-21T22:21:27.000Z | examples/monitor.py | seba-1511/randopt | 74cefcc734c6a38418151025b0a4d8b6cb41eb14 | [
"Apache-2.0"
] | 26 | 2016-11-21T07:31:37.000Z | 2019-01-16T14:13:23.000Z | examples/monitor.py | seba-1511/randopt | 74cefcc734c6a38418151025b0a4d8b6cb41eb14 | [
"Apache-2.0"
] | 9 | 2018-04-02T19:54:20.000Z | 2020-02-11T09:12:41.000Z | #!/usr/bin/env python3
"""
Usage:
python monitor.py randopt_results/simple_example/
"""
import sys
import os
import time
import curses
import randopt as ro
USE_MPL = True
USE_CURSES = True
try:
from terminaltables import AsciiTable, SingleTable
except:
raise('run pip install terminaltables')
try:
... | 27.08 | 80 | 0.576662 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 587 | 0.173412 |
c9e841e014e87b7075f87ca19eeab4f20f7fce6c | 355 | py | Python | RoomsOnRent/Blog/admin.py | DX9807/RoomsOnRent.com | 4147efdce8e13930672c3c7cb12a1f25a70708ed | [
"MIT"
] | null | null | null | RoomsOnRent/Blog/admin.py | DX9807/RoomsOnRent.com | 4147efdce8e13930672c3c7cb12a1f25a70708ed | [
"MIT"
] | null | null | null | RoomsOnRent/Blog/admin.py | DX9807/RoomsOnRent.com | 4147efdce8e13930672c3c7cb12a1f25a70708ed | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Post, Comment
class PostAdmin(admin.ModelAdmin):
list_display = ('author','title','created_date','published_date','image')
class CommentAdmin(admin.ModelAdmin):
list_display = ('post','author','created_date')
admin.site.register(Post,PostAdmin)
admin.s... | 22.1875 | 77 | 0.760563 | 201 | 0.566197 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.225352 |
c9e940d8a93717c521e40ddaeecaaa28cbc83b2f | 403 | py | Python | rllib/examples/gpu_test.py | anaskn/ray | 81db5f8060cb093085470ffdc71d8fdecc7bf381 | [
"Apache-2.0"
] | null | null | null | rllib/examples/gpu_test.py | anaskn/ray | 81db5f8060cb093085470ffdc71d8fdecc7bf381 | [
"Apache-2.0"
] | null | null | null | rllib/examples/gpu_test.py | anaskn/ray | 81db5f8060cb093085470ffdc71d8fdecc7bf381 | [
"Apache-2.0"
] | 1 | 2021-05-20T22:00:15.000Z | 2021-05-20T22:00:15.000Z | import os
import ray
from ray import tune
@ray.remote(num_gpus=1)
def use_gpu():
print("ray.get_gpu_ids(): {}".format(ray.get_gpu_ids()))
print("CUDA_VISIBLE_DEVICES: {}".format(os.environ["CUDA_VISIBLE_DEVICES"]))
if __name__ == "__main__":
ray.init()
print("ray.get_gpu_ids(): {}".format(ray.get_gpu_ids(... | 25.1875 | 80 | 0.707196 | 0 | 0 | 0 | 0 | 180 | 0.44665 | 0 | 0 | 181 | 0.449132 |
c9eb836d5b59ca6961666fd615625d09250cf88f | 42,230 | py | Python | bin/toldiff.py | comscope/comsuite | d51c43cad0d15dc3b4d1f45e7df777cdddaa9d6c | [
"BSD-3-Clause"
] | 18 | 2019-06-15T18:08:21.000Z | 2022-01-30T05:01:29.000Z | bin/toldiff.py | comscope/Comsuite | b80ca9f34c519757d337487c489fb655f7598cc2 | [
"BSD-3-Clause"
] | null | null | null | bin/toldiff.py | comscope/Comsuite | b80ca9f34c519757d337487c489fb655f7598cc2 | [
"BSD-3-Clause"
] | 11 | 2019-06-05T02:57:55.000Z | 2021-12-29T02:54:25.000Z | #!/usr/bin/env python
#
# Copyright (C) 2006 Huub van Dam, Science and Technology Facilities Council,
# Daresbury Laboratory.
# All rights reserved.
#
# Developed by: Huub van Dam
# Science and Technology Facilities Council
# Daresbury Laboratory
# C... | 36.499568 | 175 | 0.673336 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24,842 | 0.588255 |
c9ec67e739da8431aa5c39d649a7e5eb15794f15 | 6,973 | py | Python | LOG.py | viniciusdc/Protein_structure_SPGm | 861672071f2a47b54e4624fc1f69cf3fff0ff356 | [
"MIT"
] | null | null | null | LOG.py | viniciusdc/Protein_structure_SPGm | 861672071f2a47b54e4624fc1f69cf3fff0ff356 | [
"MIT"
] | null | null | null | LOG.py | viniciusdc/Protein_structure_SPGm | 861672071f2a47b54e4624fc1f69cf3fff0ff356 | [
"MIT"
] | null | null | null | from Methods.utils import rmsd, mde
from datetime import datetime
import logging
import json
import sys
def os_display_call(test_path, main, data, multistart=False):
(
filename,
num_atom_init,
total_atoms_ord,
m,
prop_dist,
convex,
fo_non_scaled,
fo_... | 43.855346 | 113 | 0.443711 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,482 | 0.499355 |
c9ee06d94f8d8d17974a31803833016ac95dc1d7 | 1,968 | py | Python | test/test_a69DisjointProperties.py | IDLabResearch/lovstats | dd33183574eed692ee89059ff3c6494160dfb8a9 | [
"MIT"
] | 1 | 2018-12-11T13:57:38.000Z | 2018-12-11T13:57:38.000Z | test/test_a69DisjointProperties.py | IDLabResearch/lovstats | dd33183574eed692ee89059ff3c6494160dfb8a9 | [
"MIT"
] | null | null | null | test/test_a69DisjointProperties.py | IDLabResearch/lovstats | dd33183574eed692ee89059ff3c6494160dfb8a9 | [
"MIT"
] | null | null | null | import unittest
import sys
import helpers
sys.path.append('../LODStats')
sys.path.append('../src/restriction-types-stats')
from A69DisjointProperties import A69DisjointProperties
import lodstats
from lodstats import RDFStats
testfile_path = helpers.resources_path
class TestA69DisjointProperties(unittest.TestCase):
... | 41.87234 | 113 | 0.701728 | 1,701 | 0.864329 | 0 | 0 | 0 | 0 | 0 | 0 | 427 | 0.216972 |
c9f038d1fb5d0607ea396a1c5e9bb4c50b48b589 | 449 | py | Python | src/services/sms.py | HutRubberDuck/super-mini-divar | 191c2f9a412ef879b52f4a71e0fe74743138ab13 | [
"Apache-2.0"
] | null | null | null | src/services/sms.py | HutRubberDuck/super-mini-divar | 191c2f9a412ef879b52f4a71e0fe74743138ab13 | [
"Apache-2.0"
] | null | null | null | src/services/sms.py | HutRubberDuck/super-mini-divar | 191c2f9a412ef879b52f4a71e0fe74743138ab13 | [
"Apache-2.0"
] | null | null | null | from kavenegar import KavenegarAPI, APIException, HTTPException
from src.core.settings import OTP_API_KEY
def send_sms(phone, message):
try:
api = KavenegarAPI(OTP_API_KEY)
response = api.sms_send({
'sender': '10008663',
'receptor': phone,
'message': message,
... | 23.631579 | 63 | 0.605791 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37 | 0.082405 |
c9f1e7cdebfd2710c6c2b7bf206e8cee0c794ff2 | 43 | py | Python | test.py | Taraxa-project/taraxa-py | 95aa0d8054bf4eba2c3200f3298421575b7bb5a0 | [
"MIT"
] | null | null | null | test.py | Taraxa-project/taraxa-py | 95aa0d8054bf4eba2c3200f3298421575b7bb5a0 | [
"MIT"
] | 1 | 2022-03-02T15:51:17.000Z | 2022-03-02T15:51:17.000Z | test.py | Taraxa-project/taraxa-py | 95aa0d8054bf4eba2c3200f3298421575b7bb5a0 | [
"MIT"
] | null | null | null | from pytaraxa.test import *
blockNumber()
| 10.75 | 27 | 0.767442 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c9f2d64566db5376ed467678309c5e2282462dda | 923 | py | Python | src/ground/drainbow_mcc/src/drainbow_mcc/emitter/imu.py | granum-space/cansat-2017-2018 | 4d9db6f2d55c726e11abbb60fd436ec3eafc2373 | [
"MIT"
] | null | null | null | src/ground/drainbow_mcc/src/drainbow_mcc/emitter/imu.py | granum-space/cansat-2017-2018 | 4d9db6f2d55c726e11abbb60fd436ec3eafc2373 | [
"MIT"
] | 9 | 2017-10-31T19:20:05.000Z | 2018-06-17T19:08:52.000Z | src/ground/drainbow_mcc/src/drainbow_mcc/emitter/imu.py | granum-space/cansat-2018 | 4d9db6f2d55c726e11abbb60fd436ec3eafc2373 | [
"MIT"
] | 1 | 2018-06-12T11:30:10.000Z | 2018-06-12T11:30:10.000Z | import random
import logging
import time
from datetime import timedelta
from pymavlink import mavutil
_log = logging.getLogger(__name__)
def now():
return int(round(time.time()*1000))
def random_scaled_imu_test(url: str, pause: timedelta):
connection = mavutil.mavlink_connection(url)
mav = connection.m... | 23.666667 | 60 | 0.612134 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 0.109504 |
c9f4af671dfa98273bbb6368b1d6afc8208adaae | 12,548 | py | Python | tests/test_locator.py | somnathrakshit/geograpy3 | 8a247cc2b164cf48b5ce4e7f9349adfef39e7ea4 | [
"Apache-2.0"
] | 53 | 2020-09-09T06:58:29.000Z | 2022-03-08T19:16:12.000Z | tests/test_locator.py | somnathrakshit/geograpy3 | 8a247cc2b164cf48b5ce4e7f9349adfef39e7ea4 | [
"Apache-2.0"
] | 51 | 2020-09-09T09:31:27.000Z | 2022-01-17T07:12:27.000Z | tests/test_locator.py | somnathrakshit/geograpy3 | 8a247cc2b164cf48b5ce4e7f9349adfef39e7ea4 | [
"Apache-2.0"
] | 9 | 2020-09-09T09:13:03.000Z | 2021-12-14T11:04:34.000Z | '''
Created on 2020-09-19
@author: wf
'''
import os.path
import tempfile
import unittest
from pathlib import Path
from lodstorage.storageconfig import StorageConfig
import geograpy
import getpass
from geograpy.locator import Locator, City,CountryManager, Location, LocationContext
from collections import Counter
from... | 34.190736 | 172 | 0.582483 | 12,052 | 0.960395 | 0 | 0 | 0 | 0 | 0 | 0 | 4,207 | 0.335246 |
c9fafb5b1dfbe210783fd95968a164f6159dfcac | 685 | py | Python | Python/threadingProcess.py | GuruprasadaShridharHegde/Coder-Mansion | 14529a6d5d4e674ecaf0c771e9cc428ba34b0a2d | [
"MIT"
] | 1 | 2022-01-19T04:22:21.000Z | 2022-01-19T04:22:21.000Z | Python/threadingProcess.py | GuruprasadaShridharHegde/Coder-Mansion | 14529a6d5d4e674ecaf0c771e9cc428ba34b0a2d | [
"MIT"
] | null | null | null | Python/threadingProcess.py | GuruprasadaShridharHegde/Coder-Mansion | 14529a6d5d4e674ecaf0c771e9cc428ba34b0a2d | [
"MIT"
] | null | null | null | # example of automatically starting a thread
from time import sleep
from threading import Thread
# custom thread class that automatically starts threads when they are constructed
class AutoStartThread(Thread):
# constructor
def __init__(self, *args, **kwargs):
# call the the parent constructor... | 27.4 | 82 | 0.668613 | 227 | 0.331387 | 0 | 0 | 0 | 0 | 0 | 0 | 340 | 0.49635 |
c9fbf38f83d878c53f0d81d49f3d590917067274 | 4,332 | py | Python | bin/cora_edit_singletoken.py | comphist/cora | 71555df9a520ccab063a8c5eb907feaa1dd88b38 | [
"MIT"
] | 10 | 2017-07-08T12:05:32.000Z | 2019-09-22T17:39:12.000Z | bin/cora_edit_singletoken.py | comphist/cora | 71555df9a520ccab063a8c5eb907feaa1dd88b38 | [
"MIT"
] | 31 | 2017-02-24T19:29:51.000Z | 2020-11-09T15:58:44.000Z | bin/cora_edit_singletoken.py | comphist/cora | 71555df9a520ccab063a8c5eb907feaa1dd88b38 | [
"MIT"
] | 7 | 2017-02-27T12:25:55.000Z | 2022-01-13T08:55:01.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2015 Marcel Bollmann <[email protected]>
#
# 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 ... | 40.111111 | 140 | 0.593029 | 1,472 | 0.339797 | 0 | 0 | 0 | 0 | 0 | 0 | 1,929 | 0.445291 |
c9ff48db97e05614b8ced49da35379affb1221e8 | 1,851 | py | Python | datasets/utils.py | lulindev/UNet-pytorch | cf91e251891a2926f46b628985ebdda66bc637a2 | [
"MIT"
] | 3 | 2021-04-07T08:05:44.000Z | 2021-06-25T16:55:56.000Z | datasets/utils.py | lulindev/UNet-pytorch | cf91e251891a2926f46b628985ebdda66bc637a2 | [
"MIT"
] | null | null | null | datasets/utils.py | lulindev/UNet-pytorch | cf91e251891a2926f46b628985ebdda66bc637a2 | [
"MIT"
] | 2 | 2021-08-19T10:23:32.000Z | 2021-12-15T03:26:11.000Z | from typing import Union
import matplotlib.pyplot as plt
import torch
import torchvision
def decode_segmap_to_color_image(masks: torch.Tensor,
colormap: Union[list, tuple],
num_classes: int,
ignore_index: int = None,
... | 35.596154 | 81 | 0.611021 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 304 | 0.159748 |
c9ffd31b49092a967f11f75892dae5ddf2b9ea57 | 1,373 | py | Python | src/lm_based/translate_start_end.py | vered1986/time_expressions | 32d182d7f741eec007141f5ca89c0d419e23a9a7 | [
"Apache-2.0"
] | 1 | 2022-02-25T15:00:42.000Z | 2022-02-25T15:00:42.000Z | src/lm_based/translate_start_end.py | vered1986/time_expressions | 32d182d7f741eec007141f5ca89c0d419e23a9a7 | [
"Apache-2.0"
] | null | null | null | src/lm_based/translate_start_end.py | vered1986/time_expressions | 32d182d7f741eec007141f5ca89c0d419e23a9a7 | [
"Apache-2.0"
] | null | null | null | import os
import json
import logging
import argparse
from src.common.translate import translate_time_expression_templates, get_client
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(name)s - %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
def main():
parser = argparse.Argument... | 32.690476 | 118 | 0.680991 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 330 | 0.24035 |
c9ffdbe67a40939dca316bf68000c8d9a8156ccf | 1,477 | py | Python | overlord/views.py | kimani-njoroge/Uber_Clone | 610a242c75e2873897f8dc9458371c32e52d11ef | [
"MIT"
] | null | null | null | overlord/views.py | kimani-njoroge/Uber_Clone | 610a242c75e2873897f8dc9458371c32e52d11ef | [
"MIT"
] | 4 | 2020-06-05T18:47:50.000Z | 2021-09-08T00:00:03.000Z | overlord/views.py | kimani-njoroge/Uber_Clone | 610a242c75e2873897f8dc9458371c32e52d11ef | [
"MIT"
] | null | null | null | from django.contrib.auth.decorators import login_required
from django.shortcuts import render, redirect
from django.contrib.auth import get_user_model
from .forms import DriverSignupForm, RiderSignupForm
from driver.models import Driver
User = get_user_model()
# Create your views here.
def index(request):
return ... | 30.142857 | 92 | 0.65606 | 0 | 0 | 0 | 0 | 215 | 0.145565 | 0 | 0 | 194 | 0.131347 |
a0011285cd812341126bdf7a6b702e5a57d05603 | 23,485 | py | Python | old/Lissajous/Lissajous.py | Tony031218/manim-projects | b243dec0f0a007649a92938e90d60eccb4c7dd15 | [
"Apache-2.0"
] | 45 | 2019-10-08T23:58:20.000Z | 2020-05-20T03:49:15.000Z | old/Lissajous/Lissajous.py | Tony031218/manim-projects | b243dec0f0a007649a92938e90d60eccb4c7dd15 | [
"Apache-2.0"
] | null | null | null | old/Lissajous/Lissajous.py | Tony031218/manim-projects | b243dec0f0a007649a92938e90d60eccb4c7dd15 | [
"Apache-2.0"
] | 12 | 2019-08-15T08:07:22.000Z | 2020-05-09T12:34:14.000Z | from manimlib.imports import *
from manim_projects.tony_useful.imports import *
class Test2DLissajousFromLinesIntersection(Scene):
def construct(self):
circle_x = Circle(color=RED).shift(UP * 2.5)
circle_y = Circle(color=RED).shift(LEFT * 2.5)
theta = ValueTracker(0)
point_x = Do... | 39.60371 | 157 | 0.584245 | 23,265 | 0.986934 | 0 | 0 | 0 | 0 | 0 | 0 | 1,293 | 0.054851 |
a001a953fb7ca73d48a5c0947ed5285912738fe8 | 3,612 | py | Python | socatlord/operations.py | Cervi-Robotics/socatlord | e4d8964cb696c789807d2276698d596dfb68dc2b | [
"MIT"
] | 2 | 2021-05-30T01:05:38.000Z | 2021-12-21T21:20:00.000Z | socatlord/operations.py | Cervi-Robotics/socatlord | e4d8964cb696c789807d2276698d596dfb68dc2b | [
"MIT"
] | null | null | null | socatlord/operations.py | Cervi-Robotics/socatlord | e4d8964cb696c789807d2276698d596dfb68dc2b | [
"MIT"
] | 2 | 2021-05-30T01:05:44.000Z | 2021-12-21T21:19:46.000Z | import os
import subprocess
import sys
import time
import pkg_resources
from satella.coding import silence_excs
from satella.coding.sequences import smart_enumerate
from satella.files import write_to_file, read_in_file
from socatlord.parse_config import parse_etc_socatlord
def install_socatlord(verbose: bool = Fals... | 36.857143 | 99 | 0.622647 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,158 | 0.320598 |
a002a3319b840c90608c40a67a87ec1a46bcac4f | 2,303 | py | Python | src/authutils/oauth2/client/blueprint.py | dvenckusuchgo/authutils | 4b43a250f448815f1ea0e7fa22fa0b02c9a2cb1d | [
"Apache-2.0"
] | null | null | null | src/authutils/oauth2/client/blueprint.py | dvenckusuchgo/authutils | 4b43a250f448815f1ea0e7fa22fa0b02c9a2cb1d | [
"Apache-2.0"
] | 31 | 2018-02-12T22:32:49.000Z | 2022-01-06T21:39:44.000Z | src/authutils/oauth2/client/blueprint.py | dvenckusuchgo/authutils | 4b43a250f448815f1ea0e7fa22fa0b02c9a2cb1d | [
"Apache-2.0"
] | 2 | 2021-01-05T22:54:28.000Z | 2021-11-29T20:57:20.000Z | """
Provide a basic set of endpoints for an application to implement OAuth client
functionality.
These endpoints assume that the ``current_app`` has already been configured
with an OAuth client instance from the ``authlib`` package as follows:
.. code-block:: python
from authutils.oauth2.client import OAuthClien... | 28.7875 | 84 | 0.685627 | 0 | 0 | 0 | 0 | 1,304 | 0.566218 | 0 | 0 | 1,341 | 0.582284 |
a0032619f7b2be9a51cd2a3915144c4401d3f01e | 655 | py | Python | tests/unit/utils/test_utils.py | jadami10/flower | 05e848d37a5abbdd4b34156d57a23166fc5efc3d | [
"BSD-3-Clause"
] | 7 | 2019-10-07T11:16:06.000Z | 2021-09-24T11:57:56.000Z | tests/unit/utils/test_utils.py | KonstantinKlepikov/flower | 89e71c8c00dcb51bc584e908fc6b2ba97706e89a | [
"BSD-3-Clause"
] | 3 | 2016-07-25T04:16:40.000Z | 2018-08-08T05:05:10.000Z | tests/unit/utils/test_utils.py | Gabriel-Desharnais/flowest | a8c6bdaa24317124c3ba27eed07d62f8c4cc8531 | [
"BSD-3-Clause"
] | 8 | 2019-08-27T16:05:32.000Z | 2021-12-15T17:29:03.000Z | import unittest
from flower.utils import bugreport
from celery import Celery
class BugreportTests(unittest.TestCase):
def test_default(self):
report = bugreport()
self.assertFalse('Unknown Celery version' in report)
self.assertTrue('tornado' in report)
self.assertTrue('humanize' i... | 29.772727 | 60 | 0.674809 | 574 | 0.876336 | 0 | 0 | 0 | 0 | 0 | 0 | 102 | 0.155725 |
a005c8c77f2a7cfe589eb886411a380fd3864a2b | 4,124 | py | Python | swhlab/analysis/glance.py | swharden/SWHLab | a86c3c65323cec809a4bd4f81919644927094bf5 | [
"MIT"
] | 15 | 2017-03-09T03:08:32.000Z | 2021-11-16T11:31:55.000Z | swhlab/analysis/glance.py | swharden/SWHLab | a86c3c65323cec809a4bd4f81919644927094bf5 | [
"MIT"
] | 2 | 2016-12-06T16:27:54.000Z | 2017-11-04T23:48:49.000Z | swhlab/analysis/glance.py | swharden/SWHLab | a86c3c65323cec809a4bd4f81919644927094bf5 | [
"MIT"
] | 9 | 2016-10-19T13:32:10.000Z | 2020-04-01T21:53:40.000Z | """Methods to generate a SINGLE image to represent any ABF.
There are several categories which are grossly analyzed.
gain function:
* current clamp recording where command traces differ by sweep.
* must also have something that looks like an action potential
* will be analyzed with AP detection information... | 35.247863 | 92 | 0.626576 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,586 | 0.384578 |
a005db92c36fe0ec0c9db64cfb4a8341416d95de | 24,671 | py | Python | catalog/bindings/csw/dictionary_entry_type.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | catalog/bindings/csw/dictionary_entry_type.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | catalog/bindings/csw/dictionary_entry_type.py | NIVANorge/s-enda-playground | 56ae0a8978f0ba8a5546330786c882c31e17757a | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass, field
from typing import List, Optional
from bindings.csw.abstract_general_operation_parameter_ref_type import (
OperationParameterGroup,
)
from bindings.csw.actuate_type import ActuateType
from bindings.csw.base_unit import BaseUnit
from bindings.csw.cartesian_cs import Cartesian... | 31.588988 | 81 | 0.592963 | 21,094 | 0.855012 | 0 | 0 | 21,160 | 0.857687 | 0 | 0 | 9,426 | 0.382068 |
a00686acf3a82fe67d9e295e22aaec66f4b36661 | 2,468 | py | Python | txt2epub_pdf/console.py | drthomas246/txt2epub-pdf | 09d12a61e0d6f66512af7fdf9abfd4b384a5c648 | [
"MIT"
] | null | null | null | txt2epub_pdf/console.py | drthomas246/txt2epub-pdf | 09d12a61e0d6f66512af7fdf9abfd4b384a5c648 | [
"MIT"
] | null | null | null | txt2epub_pdf/console.py | drthomas246/txt2epub-pdf | 09d12a61e0d6f66512af7fdf9abfd4b384a5c648 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from .package import txt2epub as txt2epub
from .package import txt2pdf as txt2pdf
import argparse
__version__ = "0.1.0"
def epub():
parser = argparse.ArgumentParser(
prog='txt2epub.exe',
description='テキストを電子書籍(epub)化する'
)
metadata = parser2m... | 37.393939 | 120 | 0.657212 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 873 | 0.323813 |
a006b38b61a96ab48414b8fa22ea5745e9fed4bd | 22 | py | Python | Scripts.py | MattOstgard/HLSL_ST3 | fbb3dcc7acfeb9c04208dc68b8ff020c76d483b1 | [
"MIT"
] | 10 | 2017-11-30T19:43:48.000Z | 2022-02-02T11:10:43.000Z | Scripts.py | MattOstgard/HLSL_ST3 | fbb3dcc7acfeb9c04208dc68b8ff020c76d483b1 | [
"MIT"
] | 27 | 2018-11-06T16:10:57.000Z | 2022-02-25T22:55:33.000Z | Scripts.py | MattOstgard/HLSL_ST3 | fbb3dcc7acfeb9c04208dc68b8ff020c76d483b1 | [
"MIT"
] | 2 | 2018-03-24T04:09:45.000Z | 2018-11-06T14:54:10.000Z | from .Scripts import * | 22 | 22 | 0.772727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a00725d52685ae75cf07ae5d77c3ada997c869be | 3,150 | py | Python | tests/test_fileio_operators.py | ptrthomas/blender_mmd_tools | 8b5053b9f2e7391cb9ac1e5114824cbbfd9d80cc | [
"MIT"
] | 2 | 2021-01-22T05:11:50.000Z | 2021-02-19T11:58:00.000Z | tests/test_fileio_operators.py | jiastku98/blender_mmd_tools | ac26c55a985d62ae9439a961d27e796444d09069 | [
"MIT"
] | 1 | 2022-01-29T05:46:50.000Z | 2022-01-29T05:46:50.000Z | tests/test_fileio_operators.py | yhong3/blender_mmd_tools | 53e16a46459328bccc444c84e50f22436e9cbc11 | [
"MIT"
] | 1 | 2021-11-07T19:41:34.000Z | 2021-11-07T19:41:34.000Z | import os
import shutil
import unittest
import bpy
from mmd_tools.core import pmx
from mmd_tools.core.model import Model
TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
SAMPLES_DIR = os.path.join(os.path.dirname(TESTS_DIR), 'samples')
class TestFileIoOperators(unittest.TestCase):
@classmethod
def se... | 39.873418 | 108 | 0.626349 | 2,746 | 0.871746 | 0 | 0 | 502 | 0.159365 | 0 | 0 | 870 | 0.27619 |
a008c9a8ae43052aa04c604f338705e7dbe4bc71 | 1,939 | py | Python | gocdapi/stage.py | andrewphilipsmith/gocdapi | 82eb37c6b00a918b6bcf4184a66cad7344cfaa2e | [
"MIT"
] | 8 | 2015-01-23T12:50:30.000Z | 2020-01-21T11:00:19.000Z | gocdapi/stage.py | andrewphilipsmith/gocdapi | 82eb37c6b00a918b6bcf4184a66cad7344cfaa2e | [
"MIT"
] | 7 | 2015-01-27T23:17:05.000Z | 2016-06-08T15:27:07.000Z | gocdapi/stage.py | andrewphilipsmith/gocdapi | 82eb37c6b00a918b6bcf4184a66cad7344cfaa2e | [
"MIT"
] | 2 | 2015-11-23T18:33:24.000Z | 2020-07-15T09:01:34.000Z | """
Module for gocdapi Stage class
"""
from gocdapi.gobase import GoBase
class Stage(GoBase):
"""
Class to hold Go Server Stage information
"""
def __init__(self, go_server, pipeline, data):
"""Inits Stage objects.
Args:
go_server (Go): A Go object which this Stage belon... | 29.378788 | 112 | 0.625064 | 1,862 | 0.960289 | 0 | 0 | 0 | 0 | 0 | 0 | 1,295 | 0.66787 |
a008eb9d3812a49e20b4001c7d7b0873ff6642c9 | 106 | py | Python | tests/exog/random/random_exog_32_20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/exog/random/random_exog_32_20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/exog/random/random_exog_32_20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.tests.exog.test_random_exogenous as testrandexog
testrandexog.test_random_exogenous( 32,20); | 26.5 | 60 | 0.858491 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a00c8ca9d15e99fb1ab604b2860c37b77ff6ba5e | 602 | py | Python | cursoemvideopython/desafio_035.py | edmilsonlibanio/Ola-Mundo-Python | 33fb08da5878f2784983c623df04d2bbdfb30f25 | [
"MIT"
] | null | null | null | cursoemvideopython/desafio_035.py | edmilsonlibanio/Ola-Mundo-Python | 33fb08da5878f2784983c623df04d2bbdfb30f25 | [
"MIT"
] | null | null | null | cursoemvideopython/desafio_035.py | edmilsonlibanio/Ola-Mundo-Python | 33fb08da5878f2784983c623df04d2bbdfb30f25 | [
"MIT"
] | null | null | null | # Desenvolva um programa que leia o comprimento de três retas e diga ao usuário se elas podem ou não formar um triângulo (pesquisar o princípio matemático que explica a formação de um triangulo).
r1 = float(input('Informe o comprimento da primeira reta: '))
r2 = float(input('Informe o comprimento da segunda reta: '))
... | 54.727273 | 195 | 0.709302 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 471 | 0.765854 |
a00cf121c8cf260456f4a0552e06a0dd6ae84b59 | 1,070 | py | Python | cv_lib/detection/models/__init__.py | zhfeing/deep-learning-lib-PyTorch | 1a4e1c1939a42c30fe32dd8d6aff210e8604e77b | [
"MIT"
] | 4 | 2021-03-29T07:34:21.000Z | 2021-04-25T08:25:30.000Z | cv_lib/detection/models/__init__.py | zhfeing/deep-learning-lib | f96e3a71ae2dbeb44696725ec127ff8f37d4c6e9 | [
"MIT"
] | null | null | null | cv_lib/detection/models/__init__.py | zhfeing/deep-learning-lib | f96e3a71ae2dbeb44696725ec127ff8f37d4c6e9 | [
"MIT"
] | 1 | 2021-03-30T07:13:31.000Z | 2021-03-30T07:13:31.000Z | from functools import partial
from typing import Dict
import copy
from torch.nn import Module
from torchvision.models.resnet import *
from .ssd_resnet import SSD300_ResNet
from .ssd_vgg import SSD300_VGG16
from .backbones import *
__REGISTERED_MODELS__ = {
"SSD300_ResNet": SSD300_ResNet,
"SSD3... | 24.883721 | 63 | 0.715888 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 94 | 0.08785 |
a00dbbabf32006769aba7ac26d4086798f8f5b92 | 75 | py | Python | Py26/01/main.py | xhexe/Py8R | 44238c5403e7f76988760a040bf5c292824c22e7 | [
"WTFPL"
] | null | null | null | Py26/01/main.py | xhexe/Py8R | 44238c5403e7f76988760a040bf5c292824c22e7 | [
"WTFPL"
] | null | null | null | Py26/01/main.py | xhexe/Py8R | 44238c5403e7f76988760a040bf5c292824c22e7 | [
"WTFPL"
] | null | null | null | inp = input("Enter string: ")
input_string = ord(inp)
print(input_string)
| 15 | 29 | 0.72 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.213333 |
a00e66d67e176d4d6033c07dcac431c71cafe77f | 533 | py | Python | no_bool_bubble_sort.py | Ji19283756/sorting_stuff | 9d2912446946906ffa1e62f4d25232b047087db4 | [
"MIT"
] | null | null | null | no_bool_bubble_sort.py | Ji19283756/sorting_stuff | 9d2912446946906ffa1e62f4d25232b047087db4 | [
"MIT"
] | null | null | null | no_bool_bubble_sort.py | Ji19283756/sorting_stuff | 9d2912446946906ffa1e62f4d25232b047087db4 | [
"MIT"
] | null | null | null | def no_bool_bubble_sort(unsorted_list):
for y in range(1, len(unsorted_list) - 1):
for x in range(len(unsorted_list) - y):
try:
value = \
(((unsorted_list[x] - unsorted_list[x + 1]) // abs(
unsorted_list[x + 1] - unsorted_list[x])) + 1)... | 35.533333 | 111 | 0.5197 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a00ec424e1b91d1ccc45e241094dd421a5923bf0 | 430 | py | Python | codewars/tour.py | Imbafar/Codewars_solutions | 1b1bb2ba59bcea0d609e97df00b0fd14a61771ca | [
"BSD-3-Clause"
] | null | null | null | codewars/tour.py | Imbafar/Codewars_solutions | 1b1bb2ba59bcea0d609e97df00b0fd14a61771ca | [
"BSD-3-Clause"
] | null | null | null | codewars/tour.py | Imbafar/Codewars_solutions | 1b1bb2ba59bcea0d609e97df00b0fd14a61771ca | [
"BSD-3-Clause"
] | null | null | null | # https://www.codewars.com/kata/5536a85b6ed4ee5a78000035
import math
def tour(friends, friend_towns, home_to_town_distances):
arr = []
for a in friends:
for b in friend_towns:
if a in b:
arr.append(home_to_town_distances[b[-1]])
dist = arr[0] + arr[-1]
i = 1
whi... | 25.294118 | 57 | 0.562791 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.130233 |
a0100c7225ae95c3cbbf519ce214f82cef36e0ce | 733 | py | Python | csr/kernels/mkl/multiply.py | mdekstrand/csr | 665ceefff882d7e42db41034246b6ddb1f93e372 | [
"MIT"
] | 11 | 2021-02-07T16:37:31.000Z | 2022-03-19T15:19:16.000Z | csr/kernels/mkl/multiply.py | mdekstrand/csr | 665ceefff882d7e42db41034246b6ddb1f93e372 | [
"MIT"
] | 25 | 2021-02-11T22:42:01.000Z | 2022-01-27T21:04:31.000Z | csr/kernels/mkl/multiply.py | lenskit/csr | 03fde2d8c3cb7eb330028f34765ff2a06f849631 | [
"MIT"
] | 2 | 2021-02-07T02:05:04.000Z | 2021-06-01T15:23:09.000Z | import numpy as np
from numba import njit
from ._api import * # noqa: F403
from .handle import mkl_h
__all__ = [
'mult_ab',
'mult_abt'
]
@njit(nogil=True)
def mult_ab(a_h, b_h):
if a_h.H and b_h.H:
h = lk_mkl_spmab(a_h.H, b_h.H)
else:
h = 0
return mkl_h(h, a_h.nrows, b_h.ncols, ... | 17.452381 | 47 | 0.587995 | 0 | 0 | 0 | 0 | 576 | 0.785812 | 0 | 0 | 31 | 0.042292 |
a0108081c8dab4089a37cbfc386521591e071aeb | 4,088 | py | Python | acos_client/v30/glm/license.py | hthompson-a10/acos-client | d480a4f239ae824c9dc9ea49a94b84a5bd9d33f8 | [
"Apache-2.0"
] | 33 | 2015-02-11T16:42:04.000Z | 2021-08-24T16:06:23.000Z | acos_client/v30/glm/license.py | hthompson-a10/acos-client | d480a4f239ae824c9dc9ea49a94b84a5bd9d33f8 | [
"Apache-2.0"
] | 154 | 2015-01-12T18:46:28.000Z | 2022-01-22T13:59:48.000Z | acos_client/v30/glm/license.py | hthompson-a10/acos-client | d480a4f239ae824c9dc9ea49a94b84a5bd9d33f8 | [
"Apache-2.0"
] | 68 | 2015-01-12T22:29:57.000Z | 2021-07-13T07:21:05.000Z | # Copyright (C) 2021, A10 Networks Inc. All rights reserved.
# 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 requi... | 36.176991 | 84 | 0.604452 | 3,365 | 0.823141 | 0 | 0 | 0 | 0 | 0 | 0 | 1,151 | 0.281556 |
a0114944e8b3edca3a0286ac5a5fb5a714ad3f65 | 310 | py | Python | engine/gamestate.py | Yooooomi/py-drives | 6a9dd1a1684b1b65ab553d91eebc77fe099301e7 | [
"MIT"
] | null | null | null | engine/gamestate.py | Yooooomi/py-drives | 6a9dd1a1684b1b65ab553d91eebc77fe099301e7 | [
"MIT"
] | null | null | null | engine/gamestate.py | Yooooomi/py-drives | 6a9dd1a1684b1b65ab553d91eebc77fe099301e7 | [
"MIT"
] | null | null | null | from engine.gameobject import Gameobject
objects = []
def create(obj: Gameobject):
objects.append(obj)
obj.start()
def delete(obj: Gameobject):
for child in obj.children:
delete(child)
obj.end()
objects.remove(obj)
def find(typ):
for o in objects:
if isinstance(o, typ):
return o
| 16.315789 | 40 | 0.680645 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a013e70e32f34350be8bc00a3ce5fb9e45e8fb9c | 4,912 | py | Python | Day3.py | Swicano/AdventCode | 3b6f425c773f05911bcc8d8d2f3cf5eb64bfdeff | [
"MIT"
] | null | null | null | Day3.py | Swicano/AdventCode | 3b6f425c773f05911bcc8d8d2f3cf5eb64bfdeff | [
"MIT"
] | null | null | null | Day3.py | Swicano/AdventCode | 3b6f425c773f05911bcc8d8d2f3cf5eb64bfdeff | [
"MIT"
] | null | null | null | input1str = 'R998,U367,R735,U926,R23,U457,R262,D473,L353,U242,L930,U895,R321,U683,L333,U623,R105,D527,R437,D473,L100,D251,L958,U384,R655,U543,L704,D759,R529,D176,R835,U797,R453,D650,L801,U437,L468,D841,R928,D747,L803,U677,R942,D851,R265,D684,L206,U763,L566,U774,L517,U337,L86,D585,R212,U656,L799,D953,L24,U388,L465,U656,... | 72.235294 | 1,495 | 0.725366 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,633 | 0.739617 |
a015a79f3a34467630656ad6b59d1a4c00a2d976 | 13,757 | py | Python | arcfire/arcfire/models.py | allanberry/arcfire | c41bad3ae7792406e169f9f7acd02f7e52467cbe | [
"MIT"
] | null | null | null | arcfire/arcfire/models.py | allanberry/arcfire | c41bad3ae7792406e169f9f7acd02f7e52467cbe | [
"MIT"
] | 38 | 2015-10-21T19:10:36.000Z | 2015-12-18T11:57:12.000Z | arcfire/arcfire/models.py | allanberry/arcfire | c41bad3ae7792406e169f9f7acd02f7e52467cbe | [
"MIT"
] | null | null | null | from django.db import models
from django.utils import timezone
from django.core.validators import MaxValueValidator, MinValueValidator
from django.core.urlresolvers import reverse
from django.conf import settings
# # # # # # # # # # # # # # # # # # # # # # # # # # #
# Level 0: base abstract and infrastructure classes... | 31.993023 | 460 | 0.622301 | 11,456 | 0.83274 | 0 | 0 | 0 | 0 | 0 | 0 | 6,775 | 0.492477 |
a016b1851ba12bcb3c409fda497f638b8a707e19 | 953 | py | Python | sdk-py/update_user_attributes.py | kg0r0/cognito-examples | 54b7a68a9113b231ead99fa4f531d46243e04566 | [
"MIT"
] | null | null | null | sdk-py/update_user_attributes.py | kg0r0/cognito-examples | 54b7a68a9113b231ead99fa4f531d46243e04566 | [
"MIT"
] | null | null | null | sdk-py/update_user_attributes.py | kg0r0/cognito-examples | 54b7a68a9113b231ead99fa4f531d46243e04566 | [
"MIT"
] | null | null | null | import os
import boto3
from getpass import getpass
from dotenv import load_dotenv
dotenv_path = os.path.join(os.path.dirname(__file__), ".env")
load_dotenv(dotenv_path)
client = boto3.client("cognito-idp", region_name=os.getenv("REGION_NAME"))
username = input("[*] Enter Your Email Address: ")
password = getpass("[*]... | 27.228571 | 74 | 0.704092 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 288 | 0.302204 |
a0173627d1c723757b35d4f6e9573e1f4a571e05 | 259 | py | Python | echome/network/serializers.py | jasoncolburne/echome | a5ab87666ae859d1ca8e4902d5c441c0ce36547a | [
"MIT"
] | 2 | 2022-01-31T19:32:51.000Z | 2022-01-31T22:42:13.000Z | echome/network/serializers.py | jasoncolburne/echome | a5ab87666ae859d1ca8e4902d5c441c0ce36547a | [
"MIT"
] | 7 | 2021-04-04T01:15:53.000Z | 2022-02-07T03:34:48.000Z | echome/network/serializers.py | jasoncolburne/echome | a5ab87666ae859d1ca8e4902d5c441c0ce36547a | [
"MIT"
] | 1 | 2022-02-01T11:34:50.000Z | 2022-02-01T11:34:50.000Z | from rest_framework import serializers
from .models import VirtualNetwork
class NetworkSerializer(serializers.ModelSerializer):
# specify model and fields
class Meta:
model = VirtualNetwork
exclude = ['id', 'deactivated', 'account'] | 32.375 | 53 | 0.72973 | 182 | 0.702703 | 0 | 0 | 0 | 0 | 0 | 0 | 52 | 0.200772 |