hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
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
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
9acba3f3e984b404f52702964805732f03965048
213,308
py
Python
Lib/site-packages/pyparsing/core.py
edupyter/EDUPYTER38
396183cea72987506f1ef647c0272a2577c56218
[ "bzip2-1.0.6" ]
1
2020-10-05T05:38:26.000Z
2020-10-05T05:38:26.000Z
Lib/site-packages/pyparsing/core.py
edupyter/EDUPYTER38
396183cea72987506f1ef647c0272a2577c56218
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/pyparsing/core.py
edupyter/EDUPYTER38
396183cea72987506f1ef647c0272a2577c56218
[ "bzip2-1.0.6" ]
null
null
null
# # core.py # import os import typing from typing import ( NamedTuple, Union, Callable, Any, Generator, Tuple, List, TextIO, Set, Sequence, ) from abc import ABC, abstractmethod from enum import Enum import string import copy import warnings import re import sys from collections....
36.682373
174
0.57822
e0bdfff5218bdfdc4516efbb92e45ba51f8b08b9
3,284
py
Python
kubernetes_asyncio/client/models/v1_limit_range_spec.py
PidgeyBE/kubernetes_asyncio
14d15dc309890253c26b6274a022e84441e05217
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1_limit_range_spec.py
PidgeyBE/kubernetes_asyncio
14d15dc309890253c26b6274a022e84441e05217
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1_limit_range_spec.py
PidgeyBE/kubernetes_asyncio
14d15dc309890253c26b6274a022e84441e05217
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.13.5 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class V1LimitRan...
28.310345
124
0.573386
a33dc0d41d298998ece9029ad250f45a6040eed2
3,163
py
Python
torch_sparse/__init__.py
KonstantinKlepikov/pytorch_sparse
468aea5b8a94a037659adb632900ad90f680be34
[ "MIT" ]
1
2020-06-29T19:15:59.000Z
2020-06-29T19:15:59.000Z
torch_sparse/__init__.py
KonstantinKlepikov/pytorch_sparse
468aea5b8a94a037659adb632900ad90f680be34
[ "MIT" ]
null
null
null
torch_sparse/__init__.py
KonstantinKlepikov/pytorch_sparse
468aea5b8a94a037659adb632900ad90f680be34
[ "MIT" ]
null
null
null
import importlib import os.path as osp import torch __version__ = '0.6.5' for library in [ '_version', '_convert', '_diag', '_spmm', '_spspmm', '_metis', '_rw', '_saint', '_sample' ]: torch.ops.load_library(importlib.machinery.PathFinder().find_spec( library, [osp.dirname(__file__)]).orig...
28.754545
77
0.662662
a32716ef7c3226e6e3a4b90e6da889524ff3add3
2,175
py
Python
magnetics/processBp123T_GhkFix.py
golfit/work-archive
bdd37d46fda3fde15ec2164d3335d6b4ed576bd7
[ "MIT" ]
null
null
null
magnetics/processBp123T_GhkFix.py
golfit/work-archive
bdd37d46fda3fde15ec2164d3335d6b4ed576bd7
[ "MIT" ]
null
null
null
magnetics/processBp123T_GhkFix.py
golfit/work-archive
bdd37d46fda3fde15ec2164d3335d6b4ed576bd7
[ "MIT" ]
null
null
null
''' Created on August 12, 2014 based on processAllFix.py, which, itself, was used to process timebase fix. Correct ordering mapping of Mirnov coils, BP123T_GHK, to correct digitizer inputs. Correct mapping at patch panel was lost after coil leads were all ripped during repair during up-to-air prior to 2014 campaign. ...
36.25
251
0.730115
b319e7bb6e077cd8799b82949f240e37870cdba9
5,218
py
Python
colossalai/nn/lr_scheduler/onecycle.py
RichardoLuo/ColossalAI
797a9dc5a9e801d7499b8667c3ef039a38aa15ba
[ "Apache-2.0" ]
1,630
2021-10-30T01:00:27.000Z
2022-03-31T23:02:41.000Z
colossalai/nn/lr_scheduler/onecycle.py
RichardoLuo/ColossalAI
797a9dc5a9e801d7499b8667c3ef039a38aa15ba
[ "Apache-2.0" ]
166
2021-10-30T01:03:01.000Z
2022-03-31T14:19:07.000Z
colossalai/nn/lr_scheduler/onecycle.py
RichardoLuo/ColossalAI
797a9dc5a9e801d7499b8667c3ef039a38aa15ba
[ "Apache-2.0" ]
253
2021-10-30T06:10:29.000Z
2022-03-31T13:30:06.000Z
from torch.optim.lr_scheduler import OneCycleLR as _OneCycleLR from colossalai.registry import LR_SCHEDULERS @LR_SCHEDULERS.register_module class OneCycleLR(_OneCycleLR): r"""Sets the learning rate of each parameter group according to the 1cycle learning rate policy. The 1cycle policy anneals the learning ...
57.977778
139
0.68647
31df6692b9c7d7aac22142f21469bcdc6cf30cce
1,939
py
Python
tests/utils/stacks/__init__.py
lavr/apm-agent-python
a67d57b991931d66b871668156e917bd3be466c9
[ "BSD-3-Clause" ]
350
2017-08-17T12:27:08.000Z
2022-03-30T10:01:33.000Z
tests/utils/stacks/__init__.py
lavr/apm-agent-python
a67d57b991931d66b871668156e917bd3be466c9
[ "BSD-3-Clause" ]
1,115
2017-08-17T15:30:35.000Z
2022-03-31T16:02:52.000Z
tests/utils/stacks/__init__.py
lavr/apm-agent-python
a67d57b991931d66b871668156e917bd3be466c9
[ "BSD-3-Clause" ]
180
2017-08-17T12:26:53.000Z
2022-03-25T09:25:37.000Z
# BSD 3-Clause License # # Copyright (c) 2019, Elasticsearch BV # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, t...
42.152174
93
0.750903
1cdb1e3c28c9f76716b00a73a76a763621098945
1,370
py
Python
elastic_agent_setup/platform/platform.py
MSAdministrator/elastic-agent-setup
5cb8202aaed281f73706556a86657f5525495b56
[ "MIT" ]
1
2022-02-04T16:59:53.000Z
2022-02-04T16:59:53.000Z
elastic_agent_setup/platform/platform.py
MSAdministrator/elastic-agent-setup
5cb8202aaed281f73706556a86657f5525495b56
[ "MIT" ]
1
2021-07-21T11:30:13.000Z
2021-11-09T14:30:10.000Z
elastic_agent_setup/platform/platform.py
MSAdministrator/elastic-agent-setup
5cb8202aaed281f73706556a86657f5525495b56
[ "MIT" ]
null
null
null
import abc import os import subprocess from ..settings import Settings class Platform: def __init__(self): if not os.path.exists(Settings.download_path): from ..download import Download Download().run() @abc.abstractmethod def extract(self): raise NotImplemented ...
34.25
142
0.650365
ff14d062964ca96cc48126d1f00c472815e3b32b
18,876
py
Python
safe_il/agents/pets/pets_utils.py
Justin-Yuan/safe_imitation
7528e9649f9921ee70a1386bd0c00b1e462717fd
[ "MIT" ]
null
null
null
safe_il/agents/pets/pets_utils.py
Justin-Yuan/safe_imitation
7528e9649f9921ee70a1386bd0c00b1e462717fd
[ "MIT" ]
null
null
null
safe_il/agents/pets/pets_utils.py
Justin-Yuan/safe_imitation
7528e9649f9921ee70a1386bd0c00b1e462717fd
[ "MIT" ]
null
null
null
from collections import defaultdict from functools import partial import numpy as np import torch from torch import nn as nn from torch.nn import functional as F import scipy.stats as stats from safe_il.utils import random_sample from safe_il.agents.mpc.mpc_utils import CEMOptimizer # --------------------------------...
39.655462
124
0.581532
4f0db40b934bb080f6e0cc5bff83aa49d6f28cb0
1,022
py
Python
tests/data23/recipe-579126.py
JohannesBuchner/pystrict3
f442a89ac6a23f4323daed8ef829d8e9e1197f90
[ "BSD-2-Clause" ]
1
2020-06-05T08:53:26.000Z
2020-06-05T08:53:26.000Z
tests/data23/recipe-579126.py
JohannesBuchner/pystrict3
f442a89ac6a23f4323daed8ef829d8e9e1197f90
[ "BSD-2-Clause" ]
1
2020-06-04T13:47:19.000Z
2020-06-04T13:47:57.000Z
tests/data23/recipe-579126.py
JohannesBuchner/pystrict3
f442a89ac6a23f4323daed8ef829d8e9e1197f90
[ "BSD-2-Clause" ]
1
2020-11-07T17:02:46.000Z
2020-11-07T17:02:46.000Z
# This code converts an url to pdf in Python using SelectPdf REST API through a POST request. # The parameters are JSON encoded. # The content is saved into a file on the disk. import json import urllib.request, urllib.error, urllib.parse api_endpoint = 'http://selectpdf.com/api2/convert/' key = 'your license key he...
30.058824
94
0.74364
8f2084e410016f7fd05709ddecc090993fe94ba2
9,129
py
Python
prostate_cancer_segmentation/datasets/lapa.py
vpeopleonatank/pytorch_lightning_segmentation_template
4637062d9de840714b2914583c51c4694646a6ab
[ "Apache-2.0" ]
1
2021-02-23T15:37:22.000Z
2021-02-23T15:37:22.000Z
prostate_cancer_segmentation/datasets/lapa.py
vpeopleonatank/pytorch_lightning_segmentation_template
4637062d9de840714b2914583c51c4694646a6ab
[ "Apache-2.0" ]
null
null
null
prostate_cancer_segmentation/datasets/lapa.py
vpeopleonatank/pytorch_lightning_segmentation_template
4637062d9de840714b2914583c51c4694646a6ab
[ "Apache-2.0" ]
null
null
null
import enum import random from pathlib import Path from typing import List, Optional, Tuple, Union import albumentations as A import cv2 import numpy as np import pytorch_lightning as pl import torch import torchvision from torch.utils.data import DataLoader, Dataset from prostate_cancer_segmentation.utils.path_check...
35.111538
118
0.634133
bdeddde8a030d2714ec3601222a43d925f496c00
4,679
py
Python
training/sklearn/structured/custom_routines/trainer/utils.py
renovate-bot/ai-platform-samples
f4ab48a8ff461f6de8f9e7fdc2a389757a1c05ce
[ "Apache-2.0" ]
null
null
null
training/sklearn/structured/custom_routines/trainer/utils.py
renovate-bot/ai-platform-samples
f4ab48a8ff461f6de8f9e7fdc2a389757a1c05ce
[ "Apache-2.0" ]
13
2022-01-04T22:18:52.000Z
2022-03-15T01:36:15.000Z
training/sklearn/structured/custom_routines/trainer/utils.py
renovate-bot/ai-platform-samples
f4ab48a8ff461f6de8f9e7fdc2a389757a1c05ce
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 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, s...
30.986755
81
0.663176
cb03832a62e65e794ac0b155609ffef30a3cf785
24,939
py
Python
tests/data_context/test_data_context_utils.py
arunnthevapalan/great_expectations
97f1481bcd1c3f4d8878c6f383f4e6f008b20cd1
[ "Apache-2.0" ]
null
null
null
tests/data_context/test_data_context_utils.py
arunnthevapalan/great_expectations
97f1481bcd1c3f4d8878c6f383f4e6f008b20cd1
[ "Apache-2.0" ]
null
null
null
tests/data_context/test_data_context_utils.py
arunnthevapalan/great_expectations
97f1481bcd1c3f4d8878c6f383f4e6f008b20cd1
[ "Apache-2.0" ]
null
null
null
import os from contextlib import contextmanager from unittest import mock import pytest import great_expectations.exceptions as gee from great_expectations.data_context.util import ( PasswordMasker, parse_substitution_variable, secretmanager, substitute_value_from_aws_secrets_manager, substitute_v...
34.209877
181
0.656402
452b6428e476369698c15cbb4cd290b477592212
191
py
Python
setup.py
datafields-team/gym-cryptotrading
96cf28b07175fb2fbf2daa7060494db81ea8d58d
[ "MIT" ]
104
2018-04-26T06:30:45.000Z
2022-03-31T17:58:33.000Z
setup.py
datafields-team/gym-cryptotrading
96cf28b07175fb2fbf2daa7060494db81ea8d58d
[ "MIT" ]
1
2018-06-21T06:06:17.000Z
2019-02-09T20:23:17.000Z
setup.py
perara/gym-cryptotrading
96cf28b07175fb2fbf2daa7060494db81ea8d58d
[ "MIT" ]
42
2018-05-04T12:00:35.000Z
2022-03-30T18:33:08.000Z
from setuptools import setup setup(name='gym_cryptotrading', version='0.0.1', install_requires=['gym>=0.2.3', 'numpy', 'pandas'] )
23.875
37
0.492147
7f81bf97f74c24c3ec4d9e9e573714f77e19a031
2,268
py
Python
pyclam/tests/test_functional.py
BurntSushi/clam
e374c08d016018d6be4d2fc4e8b0999b52f82929
[ "MIT" ]
1
2020-07-31T16:55:45.000Z
2020-07-31T16:55:45.000Z
pyclam/tests/test_functional.py
BurntSushi/clam
e374c08d016018d6be4d2fc4e8b0999b52f82929
[ "MIT" ]
null
null
null
pyclam/tests/test_functional.py
BurntSushi/clam
e374c08d016018d6be4d2fc4e8b0999b52f82929
[ "MIT" ]
null
null
null
import unittest import numpy as np from pyclam import Manifold, criterion from pyclam.tests.utils import linear_search class TestManifoldFunctional(unittest.TestCase): def test_random_no_limits(self): # We begin by getting some data and building with no constraints. data = np.random.randn(100, 3...
42
113
0.645503
c416eb4fc4eaf6c08474414a37e2cecdff6235f7
1,318
py
Python
build/plugins/docs.py
wikman/catboost
984989d556a92f4978df193b835dfe98afa77bc2
[ "Apache-2.0" ]
null
null
null
build/plugins/docs.py
wikman/catboost
984989d556a92f4978df193b835dfe98afa77bc2
[ "Apache-2.0" ]
null
null
null
build/plugins/docs.py
wikman/catboost
984989d556a92f4978df193b835dfe98afa77bc2
[ "Apache-2.0" ]
null
null
null
import json def extract_macro_calls(unit, macro_value_name): if not unit.get(macro_value_name): return [] return filter(None, unit.get(macro_value_name).replace('$' + macro_value_name, '').split()) def macro_calls_to_dict(unit, calls): def split_args(arg): if arg is None: re...
29.954545
149
0.650986
157f1c915c5d801010a8428a23e9766fd52d7cb0
4,522
py
Python
ecs/bin/ecsctl.py
lejmr/ecsctl
688c5d5e10536ee74ded9de187309134a4b7effc
[ "MIT" ]
null
null
null
ecs/bin/ecsctl.py
lejmr/ecsctl
688c5d5e10536ee74ded9de187309134a4b7effc
[ "MIT" ]
1
2021-02-14T19:53:08.000Z
2021-02-14T19:53:08.000Z
ecs/bin/ecsctl.py
lejmr/ecsctl
688c5d5e10536ee74ded9de187309134a4b7effc
[ "MIT" ]
null
null
null
#!/usr/bin/env python import click from ecs import project_loader, ecs import yaml import json from pprint import pprint import os import boto3 import botocore # Shared options _shared_options = [ click.option('-p', '--project-path', 'project_path', show_default=True, default="ecs/"), click.option('-v', '-...
30.146667
95
0.6318
07fcbbe17dcb85754cd142c303928cfe3acbcfb3
2,577
py
Python
src/plugins/grass/scripts/qgis.v.kernel.rast.py
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
null
null
null
src/plugins/grass/scripts/qgis.v.kernel.rast.py
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
null
null
null
src/plugins/grass/scripts/qgis.v.kernel.rast.py
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
1
2021-12-25T08:40:30.000Z
2021-12-25T08:40:30.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ *************************************************************************** qgis.v.kernel.rast.py --------------------- Date : February 2010 Copyright : (C) 2010 by Radim Blazek Email : radim dot blazek at ...
30.317647
115
0.523477
44959ec57df995358247aceb8dcf60c36c9ee4f6
3,150
py
Python
ietf/review/admin.py
hassanakbar4/ietfdb
cabee059092ae776015410640226064331c293b7
[ "BSD-3-Clause" ]
25
2022-03-05T08:26:52.000Z
2022-03-30T15:45:42.000Z
ietf/review/admin.py
hassanakbar4/ietfdb
cabee059092ae776015410640226064331c293b7
[ "BSD-3-Clause" ]
219
2022-03-04T17:29:12.000Z
2022-03-31T21:16:14.000Z
ietf/review/admin.py
hassanakbar4/ietfdb
cabee059092ae776015410640226064331c293b7
[ "BSD-3-Clause" ]
22
2022-03-04T15:34:34.000Z
2022-03-28T13:30:59.000Z
# Copyright The IETF Trust 2016-2020, All Rights Reserved # -*- coding: utf-8 -*- import simple_history from django.contrib import admin from ietf.review.models import (ReviewerSettings, ReviewSecretarySettings, UnavailablePeriod, ReviewWish, NextReviewerInTeam, ReviewRequest, ReviewAssignment, ReviewTeamSettin...
37.5
145
0.725714
2ca1cbb12e0cc81816c6eec679e6f453251f9dec
5,789
py
Python
amt_eval/upload_human_eval_results.py
chateval/archive
70896454f270d9e04fc36342f33dbc04ba563c5f
[ "Apache-2.0" ]
1
2021-01-30T12:43:36.000Z
2021-01-30T12:43:36.000Z
amt_eval/upload_human_eval_results.py
chateval/archive
70896454f270d9e04fc36342f33dbc04ba563c5f
[ "Apache-2.0" ]
null
null
null
amt_eval/upload_human_eval_results.py
chateval/archive
70896454f270d9e04fc36342f33dbc04ba563c5f
[ "Apache-2.0" ]
null
null
null
import sys import argparse from time import gmtime, strftime from analyze_2choice_responses import * def arguments(): parser = argparse.ArgumentParser(description="Arguments to upload the results into the ChatEval DB") parser.add_argument("--username", "-u", required=False, default='jsedoc', ...
48.241667
293
0.648989
afb298e8268114b83aaa96c02238bc5f0ffa86e7
2,757
py
Python
setup.py
derpferd/smart_open
8f64d5b491b3f2f559059f8e16755e30ad2382fa
[ "MIT" ]
null
null
null
setup.py
derpferd/smart_open
8f64d5b491b3f2f559059f8e16755e30ad2382fa
[ "MIT" ]
null
null
null
setup.py
derpferd/smart_open
8f64d5b491b3f2f559059f8e16755e30ad2382fa
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Radim Rehurek <me@radimrehurek.com> # # This code is distributed under the terms and conditions # from the MIT License (MIT). import io import os import sys from setuptools import setup, find_packages def _get_version(): curr_dir = os.path.di...
25.766355
91
0.636924
6d1baf57b3d5956c146f40d1392263d2a10a1022
1,738
py
Python
setup.py
open-data-toronto/ckan-customization-open-data-toronto
43c8ddd2161cc5416c46741385468168147bf6ea
[ "MIT" ]
2
2019-06-21T15:27:57.000Z
2019-08-15T11:47:48.000Z
setup.py
open-data-toronto/ckan-customization-open-data-toronto
43c8ddd2161cc5416c46741385468168147bf6ea
[ "MIT" ]
1
2019-08-12T18:37:53.000Z
2019-08-12T18:37:53.000Z
setup.py
open-data-toronto/ckan-customization-open-data-toronto
43c8ddd2161cc5416c46741385468168147bf6ea
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup, find_packages # Always prefer setuptools over distutils from codecs import open # To use a consistent encoding from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file with open(path.join(here, "README.rst...
33.423077
127
0.644419
36e30cd5f41273f46639024876180d00af1ebb5e
8,135
py
Python
hexrd/ui/material_site_editor.py
bnmajor/hexrdgui
d19f7cf4a4469b0d3b6978f2f65c5e8a6bd81785
[ "BSD-3-Clause" ]
null
null
null
hexrd/ui/material_site_editor.py
bnmajor/hexrdgui
d19f7cf4a4469b0d3b6978f2f65c5e8a6bd81785
[ "BSD-3-Clause" ]
null
null
null
hexrd/ui/material_site_editor.py
bnmajor/hexrdgui
d19f7cf4a4469b0d3b6978f2f65c5e8a6bd81785
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from PySide2.QtCore import QObject, QSignalBlocker, Signal from PySide2.QtWidgets import QSizePolicy, QTableWidgetItem from hexrd.material import Material from hexrd.ui.periodic_table_dialog import PeriodicTableDialog from hexrd.ui.scientificspinbox import ScientificDoubleSpinBox from hexrd.ui.ui_...
28.745583
79
0.638844
2b55fcc3fa90f37554f936ff9165628cbc778e3a
3,441
py
Python
rich/highlighter.py
furunkel/rich
5cf16ae44efdc6d0db9797f00a2ff8aa744a7550
[ "MIT" ]
null
null
null
rich/highlighter.py
furunkel/rich
5cf16ae44efdc6d0db9797f00a2ff8aa744a7550
[ "MIT" ]
null
null
null
rich/highlighter.py
furunkel/rich
5cf16ae44efdc6d0db9797f00a2ff8aa744a7550
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from typing import List, Union from .text import Text class Highlighter(ABC): """Abstract base class for highlighters.""" def __call__(self, text: Union[str, Text]) -> Text: """Highlight a str or Text instance. Args: text (Union[str, ~...
31.861111
111
0.553618
1ef436ba4409779ba22f64805880a5a71796ad0f
3,032
py
Python
sheet06/exercise06_2.py
chlewe/spatiotemporal-modelling
e99450f66825eed346dd2efe6590138ac56eae59
[ "Unlicense" ]
null
null
null
sheet06/exercise06_2.py
chlewe/spatiotemporal-modelling
e99450f66825eed346dd2efe6590138ac56eae59
[ "Unlicense" ]
null
null
null
sheet06/exercise06_2.py
chlewe/spatiotemporal-modelling
e99450f66825eed346dd2efe6590138ac56eae59
[ "Unlicense" ]
null
null
null
import math import matplotlib.pyplot as plt import numpy as np import os import sys sys.path.append(os.path.dirname(os.path.abspath(os.curdir))) import sim from evaluation import plot_nxm from kernel import kernel_e_2d_gaussian from lists import CellList2D, VerletList from typing import Tuple from numpy import ndarray...
31.257732
97
0.610158
1eb7b7f32752257ce0976816f4a5e0ab9b290d7d
325
py
Python
networking_p4/db/migration/alembic_migrations/versions/pike/contract/dfd1a1f22c4180_initial.py
osinstom/networking-p4
3b82025090b6b2bf1e9faa58492d13ed1da6c34f
[ "Apache-2.0" ]
2
2019-12-26T08:53:25.000Z
2020-05-13T11:53:51.000Z
networking_p4/db/migration/alembic_migrations/versions/pike/contract/dfd1a1f22c4180_initial.py
osinstom/networking-dppx
3b82025090b6b2bf1e9faa58492d13ed1da6c34f
[ "Apache-2.0" ]
null
null
null
networking_p4/db/migration/alembic_migrations/versions/pike/contract/dfd1a1f22c4180_initial.py
osinstom/networking-dppx
3b82025090b6b2bf1e9faa58492d13ed1da6c34f
[ "Apache-2.0" ]
null
null
null
"""start networking-p4 contract branch Revision ID: dfd1a1f22c4180 Create Date: 2018-03-13 12:34:56.789098 """ from neutron.db.migration import cli # revision identifiers, used by Alembic. revision = 'dfd1a1f22c4180' down_revision = 'start_networking_p4' branch_labels = (cli.CONTRACT_BRANCH,) def upgrade(): ...
17.105263
40
0.76
943076f8a67e8c67acf2c71aaaa1ebe68de98b01
2,949
py
Python
src/app/api/material.py
SLeRest/3DSliceServer
3f93b240ef2b55200a7bf725bb983c8146b1cc9a
[ "MIT" ]
1
2021-05-21T10:27:08.000Z
2021-05-21T10:27:08.000Z
src/app/api/material.py
SLeRest/3DSliceServer
3f93b240ef2b55200a7bf725bb983c8146b1cc9a
[ "MIT" ]
null
null
null
src/app/api/material.py
SLeRest/3DSliceServer
3f93b240ef2b55200a7bf725bb983c8146b1cc9a
[ "MIT" ]
null
null
null
from fastapi import ( APIRouter, Depends, Query ) from fastapi_jwt_auth import AuthJWT from typing import List, Optional from sqlalchemy.orm import Session from schema.material import MaterialOut, MaterialIn, MaterialPatch from dependencies.database import get_db import crud.material as crud_material from f...
35.107143
93
0.666667
64adb0d619f45834b3a3f764d0ea503fca008950
643
py
Python
tests/test_init.py
vbhavsar/scanctl
7fdf8629040d9b0e07f1698ba71ef32c00f620d1
[ "Apache-2.0" ]
3
2018-06-15T17:36:18.000Z
2019-04-02T04:23:47.000Z
tests/test_init.py
vbhavsar/scanctl
7fdf8629040d9b0e07f1698ba71ef32c00f620d1
[ "Apache-2.0" ]
50
2018-09-20T13:30:16.000Z
2021-03-25T21:56:28.000Z
tests/test_init.py
vbhavsar/scanctl
7fdf8629040d9b0e07f1698ba71ef32c00f620d1
[ "Apache-2.0" ]
3
2018-11-26T23:56:11.000Z
2022-03-19T10:04:19.000Z
# Copyright 2018 Spotify AB # # 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 agree...
35.722222
77
0.721617
7f5b8d60d97bab397046ce2f36ee6f2c54f7e6d2
487
py
Python
Curso Python/Aula07/Exercicios/Exercicios07.py
ElHa07/Python
d8014948a6472daa3dd0c9be5e536fc79742f02e
[ "MIT" ]
null
null
null
Curso Python/Aula07/Exercicios/Exercicios07.py
ElHa07/Python
d8014948a6472daa3dd0c9be5e536fc79742f02e
[ "MIT" ]
null
null
null
Curso Python/Aula07/Exercicios/Exercicios07.py
ElHa07/Python
d8014948a6472daa3dd0c9be5e536fc79742f02e
[ "MIT" ]
null
null
null
# Exercício Python 07 Números Primos # Exercício Faça um programa que leia um número inteiro e diga se ele é ou não um número primo. núm = int(input('Digite um número: ')) tot = 0 for c in range(1, núm + 1): if núm % c == 0: print('', end=' ') else: print('', end=' ') print('{}'.format(c),...
28.647059
95
0.593429
f41553b7611d9bda1566d94aebd5cfb93d32c23b
20,624
py
Python
bddm/sampler/sampler.py
tencent-ailab/bddm
8c3f807e84f0ebf1a4942a990f369a92cba79c61
[ "Apache-2.0" ]
76
2022-03-25T08:28:34.000Z
2022-03-31T07:44:25.000Z
bddm/sampler/sampler.py
shaun95/bddm
c78786e6de6b58c7c6ac4f97e22fe08b99a4d88a
[ "Apache-2.0" ]
1
2022-03-29T15:49:16.000Z
2022-03-29T15:49:16.000Z
bddm/sampler/sampler.py
shaun95/bddm
c78786e6de6b58c7c6ac4f97e22fe08b99a4d88a
[ "Apache-2.0" ]
10
2022-03-25T14:26:18.000Z
2022-03-30T03:11:10.000Z
#!/bin/env python # -*- coding: utf-8 -*- ######################################################################## # # BDDM Sampler (Supports Noise Scheduling and Sampling) # # Author: Max W. Y. Lam (maxwylam@tencent.com) # Copyright (c) 2021Tencent. All Rights Reserved # ############################################...
48.756501
103
0.580489
00ac000ff2b3d56862b38c223561d67461b88317
155
py
Python
bag/apps.py
KimLHill/MSP4
2321076c24f3d49caa409b03109fb67330ed63fe
[ "blessing" ]
null
null
null
bag/apps.py
KimLHill/MSP4
2321076c24f3d49caa409b03109fb67330ed63fe
[ "blessing" ]
null
null
null
bag/apps.py
KimLHill/MSP4
2321076c24f3d49caa409b03109fb67330ed63fe
[ "blessing" ]
1
2021-09-30T10:51:36.000Z
2021-09-30T10:51:36.000Z
from django.apps import AppConfig # Config bag app class BagConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'bag'
19.375
56
0.741935
ccff76ba748c9f1cd041066ce75e8ae31c23c772
131
py
Python
9_package_management/code/egg-example/setup.py
lluxury/P_U_S_A
1eb9d1fef74f9ce3618ae950f5223f598510be84
[ "MIT" ]
null
null
null
9_package_management/code/egg-example/setup.py
lluxury/P_U_S_A
1eb9d1fef74f9ce3618ae950f5223f598510be84
[ "MIT" ]
null
null
null
9_package_management/code/egg-example/setup.py
lluxury/P_U_S_A
1eb9d1fef74f9ce3618ae950f5223f598510be84
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name = "HelloWorld", version = "0.1", packages = find_packages(), )
18.714286
43
0.664122
c55c11159a00e9599c89a170431c5ced9752791b
39,541
py
Python
scluster/aws_backend.py
dorgun/ncluster
20ba95fb7250a5f7239d704b01bf468a57e8fb7b
[ "MIT" ]
null
null
null
scluster/aws_backend.py
dorgun/ncluster
20ba95fb7250a5f7239d704b01bf468a57e8fb7b
[ "MIT" ]
null
null
null
scluster/aws_backend.py
dorgun/ncluster
20ba95fb7250a5f7239d704b01bf468a57e8fb7b
[ "MIT" ]
null
null
null
"""AWS implementation of backend.py Not thread-safe """ import glob import os import pprint import shlex import signal import stat import threading import time import logging from typing import Tuple, List import paramiko from . import scluster_globals from . import aws_create_resources as create_lib from . import ...
38.576585
159
0.614628
8ef0f31039f6e87b5466a29befbf7e87317aa28b
835
py
Python
pykl/tiny/grapheneinfo/registry.py
wowngasb/pykl
6dc68acdd5b2598260647ae5dc22eb27d312b0d8
[ "MIT" ]
null
null
null
pykl/tiny/grapheneinfo/registry.py
wowngasb/pykl
6dc68acdd5b2598260647ae5dc22eb27d312b0d8
[ "MIT" ]
null
null
null
pykl/tiny/grapheneinfo/registry.py
wowngasb/pykl
6dc68acdd5b2598260647ae5dc22eb27d312b0d8
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- class Registry(object): def __init__(self): self._registry = {} self._registry_models = {} self._registry_composites = {} def register(self, cls): from .types import SQLAlchemyObjectType assert issubclass( cls, SQLAlchemyObjectType), ...
23.194444
108
0.644311
8b7b3fb5ef10f07b0c347c15d793bb399527a125
3,650
py
Python
analyzers/infer/bugswarm/wrapper.py
patrickjchap/Static-Bug-Detectors-ASE-Artifact
9104a6c9d8105725d3f2351893ff3f4022b02faa
[ "BSD-3-Clause" ]
1
2022-01-07T09:32:48.000Z
2022-01-07T09:32:48.000Z
analyzers/infer/bugswarm/wrapper.py
patrickjchap/Static-Bug-Detectors-ASE-Artifact
9104a6c9d8105725d3f2351893ff3f4022b02faa
[ "BSD-3-Clause" ]
null
null
null
analyzers/infer/bugswarm/wrapper.py
patrickjchap/Static-Bug-Detectors-ASE-Artifact
9104a6c9d8105725d3f2351893ff3f4022b02faa
[ "BSD-3-Clause" ]
1
2021-11-19T00:33:30.000Z
2021-11-19T00:33:30.000Z
import inspect import os import subprocess import sys import time from concurrent.futures import ThreadPoolExecutor from concurrent.futures import as_completed from distutils.dir_util import copy_tree from multiprocessing import Pool from multiprocessing import Queue from multiprocessing import Process from typing imp...
35.096154
136
0.652329
13d8ee4f6751dc79a4f2d5907e27ef7b4f3ef60d
5,866
py
Python
main.py
nishantarora94/jar-scanner
c6001043609232d3dd9ba33ee9c90a9b049bef20
[ "MIT", "Unlicense" ]
null
null
null
main.py
nishantarora94/jar-scanner
c6001043609232d3dd9ba33ee9c90a9b049bef20
[ "MIT", "Unlicense" ]
2
2021-06-20T12:03:53.000Z
2021-07-06T16:59:51.000Z
main.py
nishantarora94/jar-scanner
c6001043609232d3dd9ba33ee9c90a9b049bef20
[ "MIT", "Unlicense" ]
null
null
null
# importing python modules import csv import glob import os import shutil from zipfile import ZipFile import re # path of the parent directory current_dir = os.getcwd() bucket_dir = os.path.join(current_dir, "Bucket") if os.path.exists(bucket_dir): os.chdir(bucket_dir) else: os.chdir(current_d...
31.368984
73
0.617968
d333cdc39e6ca033228f0173a87b5e3859424278
713
py
Python
env/lib/python3.8/site-packages/plotly/validators/waterfall/textfont/__init__.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
env/lib/python3.8/site-packages/plotly/validators/waterfall/textfont/__init__.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
env/lib/python3.8/site-packages/plotly/validators/waterfall/textfont/__init__.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import sys if sys.version_info < (3, 7): from ._sizesrc import SizesrcValidator from ._size import SizeValidator from ._familysrc import FamilysrcValidator from ._family import FamilyValidator from ._colorsrc import ColorsrcValidator from ._color import ColorValidator else: from _plotly_uti...
28.52
55
0.649369
c098ed56d809e83369b65a4c6b2e4679b7964904
34
py
Python
tests/plugins/remove/__init__.py
jtpavlock/moe
6f053c8c53f92686013657bda676b00f97edd230
[ "MIT" ]
14
2021-09-04T11:42:18.000Z
2022-02-04T05:11:46.000Z
tests/plugins/remove/__init__.py
jtpavlock/Moe
6f053c8c53f92686013657bda676b00f97edd230
[ "MIT" ]
56
2021-05-26T00:00:46.000Z
2021-08-08T17:14:31.000Z
tests/plugins/remove/__init__.py
jtpavlock/moe
6f053c8c53f92686013657bda676b00f97edd230
[ "MIT" ]
1
2021-07-22T21:55:21.000Z
2021-07-22T21:55:21.000Z
"""Test the ``remove`` plugin."""
17
33
0.558824
e2f0964c139d7ed363c5556162c19236f910732f
1,086
py
Python
src/capabilities/lint.py
textx-tools/textX-languageserver
292dcecb46e5e180755005f01d8302a491f658ca
[ "MIT" ]
6
2017-11-07T00:48:38.000Z
2018-11-10T00:58:19.000Z
src/capabilities/lint.py
textx-tools/textX-languageserver
292dcecb46e5e180755005f01d8302a491f658ca
[ "MIT" ]
5
2018-03-21T01:10:05.000Z
2018-10-16T18:00:18.000Z
src/capabilities/lint.py
textx-tools/textX-languageserver
292dcecb46e5e180755005f01d8302a491f658ca
[ "MIT" ]
2
2018-12-27T21:58:04.000Z
2019-09-16T15:37:02.000Z
""" This module is responsible for linting document file. """ from ..utils import _utils from ..infrastructure.lsp import Diagnostic __author__ = "Daniel Elero" __copyright__ = "textX-tools" __license__ = "MIT" LINT_DEBOUNCE_S = 0.5 @_utils.debounce(LINT_DEBOUNCE_S) def lint(doc_uri, workspace): """ Create...
29.351351
78
0.601289
10dd1dc6957f1d90f34b2dcff4876a4dadcc7a43
390
py
Python
src/app/migrations/0003_auto_20180313_0622.py
510908220/heartbeats
b59938a6529f79db9a4a25984d3b2573d01b597e
[ "MIT" ]
23
2018-03-11T03:34:29.000Z
2021-01-15T05:18:36.000Z
src/app/migrations/0003_auto_20180313_0622.py
510908220/heartbeats
b59938a6529f79db9a4a25984d3b2573d01b597e
[ "MIT" ]
4
2019-03-29T02:38:38.000Z
2021-04-20T17:13:58.000Z
src/app/migrations/0003_auto_20180313_0622.py
510908220/heartbeats
b59938a6529f79db9a4a25984d3b2573d01b597e
[ "MIT" ]
11
2018-04-12T01:25:54.000Z
2021-01-12T07:39:27.000Z
# Generated by Django 2.0.3 on 2018-03-13 06:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0002_remove_service_owner'), ] operations = [ migrations.AlterField( model_name='tag', name='created', ...
20.526316
58
0.602564
838e1a77693fff1f1292b89240a74ebacdc8f9f0
14,394
py
Python
novaclient/utils.py
alvarolopez/python-novaclient
ef7cb1d44d47a1273810603fd96d982d7f0bd7d6
[ "Apache-1.1" ]
null
null
null
novaclient/utils.py
alvarolopez/python-novaclient
ef7cb1d44d47a1273810603fd96d982d7f0bd7d6
[ "Apache-1.1" ]
null
null
null
novaclient/utils.py
alvarolopez/python-novaclient
ef7cb1d44d47a1273810603fd96d982d7f0bd7d6
[ "Apache-1.1" ]
null
null
null
# # 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 # ...
30.112971
79
0.611713
58b84fef2978a4dd40cacd53e1c4a7317cd0a0ea
66
py
Python
kaggle_utils/__init__.py
upura/solafune-light
ca9357466e8ecd866845da58ae89fcfcdd5c7f40
[ "MIT" ]
2
2021-04-30T14:31:47.000Z
2021-05-01T12:18:10.000Z
kaggle_utils/__init__.py
upura/solafune-light
ca9357466e8ecd866845da58ae89fcfcdd5c7f40
[ "MIT" ]
null
null
null
kaggle_utils/__init__.py
upura/solafune-light
ca9357466e8ecd866845da58ae89fcfcdd5c7f40
[ "MIT" ]
null
null
null
from . import features, models, preprocess, utils, visualizations
33
65
0.80303
4983aed7da2f685f7f8373fd76dfe51b6b9b7782
43,992
py
Python
repo/subcmds/sync.py
oux/google-repo
10d9569981c38550564ee71771cf2df5f32daeb8
[ "Apache-2.0" ]
null
null
null
repo/subcmds/sync.py
oux/google-repo
10d9569981c38550564ee71771cf2df5f32daeb8
[ "Apache-2.0" ]
null
null
null
repo/subcmds/sync.py
oux/google-repo
10d9569981c38550564ee71771cf2df5f32daeb8
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # # 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 re...
35.678832
93
0.634093
ef7787858c17aea9a00858a209849ffc15807e80
3,711
py
Python
modules/residual.py
tansyab1/LightNetPlus
ed226e5454b2144063a6d8132b07c90e6a64e2d3
[ "MIT" ]
240
2019-02-27T08:39:06.000Z
2021-05-31T19:38:17.000Z
modules/residual.py
tansyab1/LightNetPlus
ed226e5454b2144063a6d8132b07c90e6a64e2d3
[ "MIT" ]
8
2019-04-22T10:59:47.000Z
2021-03-19T15:38:52.000Z
modules/residual.py
tansyab1/LightNetPlus
ed226e5454b2144063a6d8132b07c90e6a64e2d3
[ "MIT" ]
56
2019-04-18T03:34:17.000Z
2021-04-25T09:32:50.000Z
import torch.nn as nn from .attentions import SEBlock from collections import OrderedDict from modules.inplace_abn.iabn import ABN class IdentityResidualBlock(nn.Module): def __init__(self, in_channels, channels, stride=1, dilation=1, ...
40.336957
118
0.551334
4ff7404227a619b99c8ad665c500939f7e51250c
1,198
py
Python
ask-sdk-webservice-support/ask_sdk_webservice_support/__version__.py
NotTheEconomist/alexa-skills-kit-sdk-for-python
ecb0c212d7f92dfdd19b873e1e718ed108875108
[ "Apache-2.0" ]
null
null
null
ask-sdk-webservice-support/ask_sdk_webservice_support/__version__.py
NotTheEconomist/alexa-skills-kit-sdk-for-python
ecb0c212d7f92dfdd19b873e1e718ed108875108
[ "Apache-2.0" ]
null
null
null
ask-sdk-webservice-support/ask_sdk_webservice_support/__version__.py
NotTheEconomist/alexa-skills-kit-sdk-for-python
ecb0c212d7f92dfdd19b873e1e718ed108875108
[ "Apache-2.0" ]
null
null
null
# # Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
38.645161
73
0.700334
029b2b23d97fe778a8680492ad41be3735d105f0
664
py
Python
Chapter01/test_simul.py
arifmudi/Advanced-Python-Programming-Second-Edition
55e8fb16127873b5285980301f9a0331d135253c
[ "MIT" ]
19
2021-06-11T11:23:44.000Z
2022-03-27T21:15:26.000Z
Chapter01/test_simul.py
arifmudi/Advanced-Python-Programming-Second-Edition
55e8fb16127873b5285980301f9a0331d135253c
[ "MIT" ]
null
null
null
Chapter01/test_simul.py
arifmudi/Advanced-Python-Programming-Second-Edition
55e8fb16127873b5285980301f9a0331d135253c
[ "MIT" ]
16
2021-04-18T12:43:02.000Z
2022-03-26T05:47:34.000Z
from simul import Particle, ParticleSimulator def test_evolve(benchmark): particles = [ Particle(0.3, 0.5, +1), Particle(0.0, -0.5, -1), Particle(-0.1, -0.4, +3), ] simulator = ParticleSimulator(particles) simulator.evolve(0.1) p0, p1, p2 = particles def fequal(a, b...
22.133333
45
0.634036
37d83f54cd19d048995fc88806ceaa63aefa9442
2,185
py
Python
pyqldbsamples/get_digest.py
simonz-bq/amazon-qldb-dmv-sample-python
ca27d40d992e63e5dec8e1a431517fc745f8185c
[ "MIT-0" ]
null
null
null
pyqldbsamples/get_digest.py
simonz-bq/amazon-qldb-dmv-sample-python
ca27d40d992e63e5dec8e1a431517fc745f8185c
[ "MIT-0" ]
null
null
null
pyqldbsamples/get_digest.py
simonz-bq/amazon-qldb-dmv-sample-python
ca27d40d992e63e5dec8e1a431517fc745f8185c
[ "MIT-0" ]
null
null
null
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 # # 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 wit...
39.017857
87
0.746911
5d8ac58464c237c6175560f650af0ba21f18e58b
13,096
py
Python
src/models.py
le773/open-solution-home-credit
3f3e82ce4dd19b44f3b22d3d86669b2c13b893b5
[ "MIT" ]
1
2019-01-21T08:11:28.000Z
2019-01-21T08:11:28.000Z
src/models.py
le773/open-solution-home-credit
3f3e82ce4dd19b44f3b22d3d86669b2c13b893b5
[ "MIT" ]
null
null
null
src/models.py
le773/open-solution-home-credit
3f3e82ce4dd19b44f3b22d3d86669b2c13b893b5
[ "MIT" ]
null
null
null
from attrdict import AttrDict from deepsense import neptune import lightgbm as lgb import numpy as np import pandas as pd from sklearn.externals import joblib from steppy.base import BaseTransformer from keras import backend as K from keras.models import Sequential from keras.optimizers import Adam, SGD from toolkit.k...
38.180758
118
0.581323
1d9239afaaa201fa5332544fa1063bd635f0e342
1,870
py
Python
blog/models.py
Nayakpriya/sushiksha-website
4880e7f4fad61e73bdfe75bdf9936fd3d252f68d
[ "Apache-2.0" ]
31
2020-11-07T03:23:55.000Z
2022-03-16T18:21:45.000Z
blog/models.py
Nayakpriya/sushiksha-website
4880e7f4fad61e73bdfe75bdf9936fd3d252f68d
[ "Apache-2.0" ]
124
2020-11-07T03:27:49.000Z
2022-03-20T05:28:06.000Z
blog/models.py
Nayakpriya/sushiksha-website
4880e7f4fad61e73bdfe75bdf9936fd3d252f68d
[ "Apache-2.0" ]
44
2020-11-09T04:39:39.000Z
2022-03-12T09:48:19.000Z
from django.db import models from django.contrib.auth.models import User from django.urls import reverse from users.models import Profile from tinymce import HTMLField from PIL import Image class Categories(models.Model): title = models.CharField(max_length=20) def __str__(self): return self.title ...
29.21875
86
0.683957
2fd6ca4682275b67dad573bf786204295ad38243
28,565
py
Python
src/waldur_core/structure/tests/test_project.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
26
2017-10-18T13:49:58.000Z
2021-09-19T04:44:09.000Z
src/waldur_core/structure/tests/test_project.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
14
2018-12-10T14:14:51.000Z
2021-06-07T10:33:39.000Z
src/waldur_core/structure/tests/test_project.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
32
2017-09-24T03:10:45.000Z
2021-10-16T16:41:09.000Z
import datetime from unittest import mock from ddt import data, ddt from django.test import TransactionTestCase from django.urls import reverse from freezegun import freeze_time from mock_django import mock_signal_receiver from rest_framework import status, test from waldur_core.structure import executors, models, pe...
39.951049
94
0.69053
26817ae155a2fc0c1d230b2a0c47a3cb471cc190
4,794
py
Python
isi_sdk/models/node_sensors_node_sensor.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
isi_sdk/models/node_sensors_node_sensor.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
isi_sdk/models/node_sensors_node_sensor.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
# coding: utf-8 """ Copyright 2016 SmartBear Software 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 applica...
27.394286
77
0.565499
64c9a367b172d6194902be36fd462581e274b69a
264
py
Python
polymetis/polymetis/python/torchcontrol/policies/__init__.py
CowherdChris/droidlet
8d965c1ebc38eceb6f8083c52b1146c1bc17d5e1
[ "MIT" ]
26
2021-06-28T15:35:20.000Z
2022-03-12T04:34:34.000Z
polymetis/polymetis/python/torchcontrol/policies/__init__.py
CowherdChris/droidlet
8d965c1ebc38eceb6f8083c52b1146c1bc17d5e1
[ "MIT" ]
2
2021-06-28T20:16:56.000Z
2021-12-16T21:25:44.000Z
polymetis/polymetis/python/torchcontrol/policies/__init__.py
CowherdChris/droidlet
8d965c1ebc38eceb6f8083c52b1146c1bc17d5e1
[ "MIT" ]
3
2021-06-29T14:14:34.000Z
2022-03-12T13:26:12.000Z
# 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. from .ilqr import * from .move_to import * from .joint_pd import * from .ee_pd import *
29.333333
65
0.75
34a78beca13e2901887b23454e62a25032241c52
13,043
py
Python
nidmm_sfp.py
texasaggie97/nimi-sfp
2a0af44c2ceebb7898d66c35837de8ada79a36cc
[ "MIT" ]
2
2018-02-14T16:03:52.000Z
2018-05-23T21:35:36.000Z
nidmm_sfp.py
texasaggie97/nimi-sfp
2a0af44c2ceebb7898d66c35837de8ada79a36cc
[ "MIT" ]
5
2018-05-22T21:15:53.000Z
2018-08-16T15:27:43.000Z
nidmm_sfp.py
texasaggie97/nimi-sfp
2a0af44c2ceebb7898d66c35837de8ada79a36cc
[ "MIT" ]
2
2018-05-14T15:19:12.000Z
2018-05-23T14:00:34.000Z
import math import nidmm import nimodinst import warnings import wx USE_WIT = True AppBaseClass = wx.App if USE_WIT: from wx.lib.mixins.inspection import InspectableApp AppBaseClass = InspectableApp def format_meas(reading, function, range, resolution): unit_modifiers = {-12: "p", -9: "n", -6: "u", -3: ...
39.524242
164
0.62524
ac427ad564ff303ec98b396d9bfe3111f3da1157
305
py
Python
scripts/templates/fastApiModule/partials/handle_route.py
sulthonzh/zaruba
ec9262f43da17d86330da2c593b7da451aabd60f
[ "Apache-2.0" ]
null
null
null
scripts/templates/fastApiModule/partials/handle_route.py
sulthonzh/zaruba
ec9262f43da17d86330da2c593b7da451aabd60f
[ "Apache-2.0" ]
null
null
null
scripts/templates/fastApiModule/partials/handle_route.py
sulthonzh/zaruba
ec9262f43da17d86330da2c593b7da451aabd60f
[ "Apache-2.0" ]
null
null
null
@self.app.zarubaHttpMethod('zarubaUrl') def zarubaHttpMethod_zaruba_url(): try: return 'OK' except HTTPException as error: raise error except Exception as error: print(traceback.format_exc()) raise HTTPException(status_code=500, detail='Internal Server Error')
33.888889
76
0.695082
f51ab0b7c7cb11e209db934958296889dc9a2af1
3,233
py
Python
tests/integration/proxy/test_simple.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
1
2021-09-06T00:14:04.000Z
2021-09-06T00:14:04.000Z
tests/integration/proxy/test_simple.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
2
2021-04-30T21:17:57.000Z
2021-12-13T20:40:23.000Z
tests/integration/proxy/test_simple.py
fake-name/salt
d8f04936e4407f51946e32e8166159778f6c31a5
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Simple Smoke Tests for Connected Proxy Minion """ # Import Python libs from __future__ import absolute_import, print_function, unicode_literals # Import Salt Testing libs from tests.support.case import ModuleCase from tests.support.unit import skipIf class ProxyMinionSimpleTestCase(Modul...
34.763441
84
0.639344
6c6a7f5c42ee31af0a506a5abfa71ec6defaa1b7
9,427
py
Python
Python/libraries/recognizers-number/recognizers_number/number/chinese/extractors.py
Irrelevances/Recognizers-Text
630ce12bb47e201f663d72c31c680f6d40171962
[ "MIT" ]
1
2018-06-07T05:14:03.000Z
2018-06-07T05:14:03.000Z
Python/libraries/recognizers-number/recognizers_number/number/chinese/extractors.py
Irrelevances/Recognizers-Text
630ce12bb47e201f663d72c31c680f6d40171962
[ "MIT" ]
null
null
null
Python/libraries/recognizers-number/recognizers_number/number/chinese/extractors.py
Irrelevances/Recognizers-Text
630ce12bb47e201f663d72c31c680f6d40171962
[ "MIT" ]
1
2018-06-05T05:26:57.000Z
2018-06-05T05:26:57.000Z
from typing import List from enum import Enum from recognizers_number.number.extractors import ReVal, BaseNumberExtractor from recognizers_text.utilities import RegExpUtility from recognizers_number.number.constants import Constants from recognizers_number.resources.chinese_numeric import ChineseNumeric class Chinese...
38.165992
109
0.625756
8f8ef4ffd29d64072046a0469444654d1b6cac98
5,809
py
Python
docs/source/conf.py
akai10tsuki/mkvbatchmultiplex
0a45cf915c4817d377c4b717e95fc4ea21758f85
[ "MIT" ]
22
2019-01-29T23:12:16.000Z
2022-03-26T07:42:19.000Z
docs/source/conf.py
akai10tsuki/mkvbatchmultiplex
0a45cf915c4817d377c4b717e95fc4ea21758f85
[ "MIT" ]
12
2020-06-28T16:53:42.000Z
2021-12-14T00:33:31.000Z
docs/source/conf.py
akai10tsuki/mkvbatchmultiplex
0a45cf915c4817d377c4b717e95fc4ea21758f85
[ "MIT" ]
1
2021-10-18T16:27:47.000Z
2021-10-18T16:27:47.000Z
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
29.789744
79
0.66001
e607528e3a742ab28465920c3cb40caffbcb5103
887
py
Python
other/validate_email.py
Curiouspaul1/Python
b5810c116901160b897aa2a5e3dde46937beec49
[ "MIT" ]
1
2021-10-16T07:34:43.000Z
2021-10-16T07:34:43.000Z
other/validate_email.py
Curiouspaul1/Python
b5810c116901160b897aa2a5e3dde46937beec49
[ "MIT" ]
null
null
null
other/validate_email.py
Curiouspaul1/Python
b5810c116901160b897aa2a5e3dde46937beec49
[ "MIT" ]
null
null
null
""" The code below features a function that can tell whether a given string argument is a valid email address or not. """ import re def validate_email(email: str) -> bool: """ validate_email uses regular expressions to check if the input is a valid email address. ------- :param email: a string tha...
20.627907
69
0.553551
1b38a94d26c7860dc254d5d1e3ef88a6d43179ec
46,842
py
Python
scipy/interpolate/_fitpack_impl.py
Ennosigaeon/scipy
2d872f7cf2098031b9be863ec25e366a550b229c
[ "BSD-3-Clause" ]
12
2017-06-15T18:17:07.000Z
2022-01-26T12:28:19.000Z
scipy/interpolate/_fitpack_impl.py
Ennosigaeon/scipy
2d872f7cf2098031b9be863ec25e366a550b229c
[ "BSD-3-Clause" ]
95
2015-07-04T08:40:38.000Z
2022-03-30T06:04:34.000Z
scipy/interpolate/_fitpack_impl.py
Ennosigaeon/scipy
2d872f7cf2098031b9be863ec25e366a550b229c
[ "BSD-3-Clause" ]
20
2021-11-07T13:55:56.000Z
2021-12-02T10:54:01.000Z
""" fitpack (dierckx in netlib) --- A Python-C wrapper to FITPACK (by P. Dierckx). FITPACK is a collection of FORTRAN programs for curve and surface fitting with splines and tensor product splines. See https://web.archive.org/web/20010524124604/http://www.cs.kuleuven.ac.be:80/cwis/research/nalag/resea...
35.567198
124
0.575915
c454508430405d8b12d4e7cba3c0c3ca30a5a3ef
12,665
py
Python
python/decoder/rv_decoder.py
hossein1387/pito_riscv
94df6f2201798765984017c82d1fdf0355f68d45
[ "MIT" ]
3
2021-05-25T08:40:55.000Z
2022-01-05T07:05:39.000Z
python/decoder/rv_decoder.py
hossein1387/pito_riscv
94df6f2201798765984017c82d1fdf0355f68d45
[ "MIT" ]
5
2021-07-25T01:12:16.000Z
2022-02-17T20:30:38.000Z
python/decoder/rv_decoder.py
hossein1387/pito_riscv
94df6f2201798765984017c82d1fdf0355f68d45
[ "MIT" ]
3
2021-08-11T07:59:07.000Z
2022-01-05T07:05:43.000Z
import json from collections import defaultdict from rv_instruction_table import instruction_table def get_hex(binary_str): """ Returns the hexadecimal string literal for the given binary string literal input :param str binary_str: Binary string to be converted to hex """ return "{0:#0{1}x}...
37.359882
120
0.627161
3d37f5d9ffe3695cd873520f94734ecba012f7ac
6,636
py
Python
BackLogOperacao.py
DanielRoberto72/Automacao_Backlog
a15046b81c083330e81feee83ac3bacf9cfc7e9c
[ "MIT" ]
null
null
null
BackLogOperacao.py
DanielRoberto72/Automacao_Backlog
a15046b81c083330e81feee83ac3bacf9cfc7e9c
[ "MIT" ]
null
null
null
BackLogOperacao.py
DanielRoberto72/Automacao_Backlog
a15046b81c083330e81feee83ac3bacf9cfc7e9c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[ ]: import selenium, os, time, pandas as pd, csv, warnings, shutil, sys, lxml, re, itertools, openpyxl, glob, mysql.connector, smtplib from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selen...
34.38342
159
0.627034
f50e17944809335dd1237c910a89582ccba3c346
1,388
py
Python
setup.py
slafs/honcho
40c308fba078d32f47aa1e6aa55427c32df32278
[ "MIT" ]
null
null
null
setup.py
slafs/honcho
40c308fba078d32f47aa1e6aa55427c32df32278
[ "MIT" ]
null
null
null
setup.py
slafs/honcho
40c308fba078d32f47aa1e6aa55427c32df32278
[ "MIT" ]
1
2020-11-21T19:05:42.000Z
2020-11-21T19:05:42.000Z
import os import sys from setuptools import setup, find_packages from honcho import __version__ requirements = [] export_requirements = [] if sys.version_info[:2] < (2, 7): requirements.append('argparse') requirements.append('ordereddict') if (3, 0) <= sys.version_info[:2] < (3, 3): export_requirements ...
25.703704
95
0.664986
7c83c698d44e2794aa1f7bbfe1deaa4c6a12b75e
2,357
py
Python
train_dqn.py
wbaik/2048-pytorch-DQN
eb27575b30e94e496393f5999d1f567c0d6b40bf
[ "MIT" ]
4
2018-12-10T11:31:06.000Z
2021-11-08T20:37:23.000Z
train_dqn.py
wbaik/2048-pytorch-DQN
eb27575b30e94e496393f5999d1f567c0d6b40bf
[ "MIT" ]
null
null
null
train_dqn.py
wbaik/2048-pytorch-DQN
eb27575b30e94e496393f5999d1f567c0d6b40bf
[ "MIT" ]
3
2018-12-17T05:11:28.000Z
2021-08-02T13:53:57.000Z
import argparse import gym import gym_2048 import pickle from play_2048 import Play2048 import torch import torch.optim as optim from utils.dqn import DQN from utils import device, ReplayMemory parser = argparse.ArgumentParser(description='Hyper-parameters for the DQN training') parser.add_argument('--epsilon', ...
36.261538
99
0.645312
ce03ef1d670c70e01e2c183ee9fff1fd1b1e4de8
2,569
py
Python
shop/migrations/0009_auto_20170325_1625.py
IlyaDjurin/django-shop
0b13a5975ff3e9a601ff13a07bfd3e3beebf28e3
[ "MIT" ]
null
null
null
shop/migrations/0009_auto_20170325_1625.py
IlyaDjurin/django-shop
0b13a5975ff3e9a601ff13a07bfd3e3beebf28e3
[ "MIT" ]
null
null
null
shop/migrations/0009_auto_20170325_1625.py
IlyaDjurin/django-shop
0b13a5975ff3e9a601ff13a07bfd3e3beebf28e3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-25 13:25 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('shop', '0008_tovar_inphoto_tovarinphoto_sim'), ] operations = [ migrations....
38.924242
117
0.599844
1ea3af779701bd128f2fce3091bf1890df421117
3,833
py
Python
flexget/components/sites/sites/nyaa.py
metaMMA/Flexget
a38986422461d7935ead1e2b4ed4c88bcd0a90f5
[ "MIT" ]
null
null
null
flexget/components/sites/sites/nyaa.py
metaMMA/Flexget
a38986422461d7935ead1e2b4ed4c88bcd0a90f5
[ "MIT" ]
1
2017-10-09T23:06:44.000Z
2017-10-09T23:06:44.000Z
flexget/components/sites/sites/nyaa.py
metaMMA/Flexget
a38986422461d7935ead1e2b4ed4c88bcd0a90f5
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from future.moves.urllib.parse import quote import logging import feedparser from flexget import plugin from flexget.entry import Entry from flexget.event import event fr...
30.91129
92
0.549178
6d30b378219db158b440b71dfd80080bd3335090
5,519
py
Python
tests/h/models/annotation_test.py
julien-cheng/h
36c8ec044725720cf36f0986cdf025395aca8929
[ "BSD-2-Clause" ]
2
2019-08-04T07:22:11.000Z
2020-07-17T05:01:41.000Z
tests/h/models/annotation_test.py
fuelpress/i.fuel.press
af7b25895d813af0fef656dcf483afe852a99d76
[ "BSD-2-Clause" ]
null
null
null
tests/h/models/annotation_test.py
fuelpress/i.fuel.press
af7b25895d813af0fef656dcf483afe852a99d76
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import pytest from h.models.annotation import Annotation def test_parent_id_of_direct_reply(): ann = Annotation(references=["parent_id"]) assert ann.parent_id == "parent_id" def test_parent_id_of_reply_to_reply(): ann = Annotation(refer...
26.791262
75
0.714803
d920fe736ba829c886cf351a7284c7cc4ca4319f
6,230
py
Python
solfasol/shop/migrations/0001_initial.py
rekognize/solfasol
c960c3364c753d75161242eccac4f085d800c843
[ "MIT" ]
null
null
null
solfasol/shop/migrations/0001_initial.py
rekognize/solfasol
c960c3364c753d75161242eccac4f085d800c843
[ "MIT" ]
1
2020-06-18T13:08:47.000Z
2020-06-18T13:08:47.000Z
solfasol/shop/migrations/0001_initial.py
Solfasol/solfasol
c960c3364c753d75161242eccac4f085d800c843
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2020-07-03 12:54 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('sessions', '0001_initial'), ] operations = [ migrations.CreateModel( name='...
48.671875
161
0.568218
93df5efc30156d61b8f95a68cce06d27b6235fd1
1,254
py
Python
barracuda_waf/komand_barracuda_waf/actions/update_action_policy/action.py
killstrelok/insightconnect-plugins
911358925f4233ab273dbd8172e8b7b9188ebc01
[ "MIT" ]
1
2020-03-18T09:14:55.000Z
2020-03-18T09:14:55.000Z
barracuda_waf/komand_barracuda_waf/actions/update_action_policy/action.py
killstrelok/insightconnect-plugins
911358925f4233ab273dbd8172e8b7b9188ebc01
[ "MIT" ]
1
2021-02-23T23:57:37.000Z
2021-02-23T23:57:37.000Z
barracuda_waf/komand_barracuda_waf/actions/update_action_policy/action.py
killstrelok/insightconnect-plugins
911358925f4233ab273dbd8172e8b7b9188ebc01
[ "MIT" ]
null
null
null
import komand from .schema import UpdateActionPolicyInput, UpdateActionPolicyOutput class UpdateActionPolicy(komand.Action): def __init__(self): super(self.__class__, self).__init__( name='update_action_policy', description='Updates the values of given parameters in the gi...
38
108
0.645136
b84ad72cc8e3b204f7b8362343869bc7aa190c13
16,547
py
Python
gseapy/gsea.py
ostrokach/gseapy
6d30ec425e59fcadad10a471e312b3f7f24bac21
[ "MIT" ]
7
2017-08-13T16:44:41.000Z
2021-06-29T11:46:27.000Z
gseapy/gsea.py
ostrokach/gseapy
6d30ec425e59fcadad10a471e312b3f7f24bac21
[ "MIT" ]
null
null
null
gseapy/gsea.py
ostrokach/gseapy
6d30ec425e59fcadad10a471e312b3f7f24bac21
[ "MIT" ]
3
2019-01-03T23:32:17.000Z
2021-05-06T12:32:34.000Z
#! python # -*- coding: utf-8 -*- from __future__ import absolute_import, division import os,sys,errno, logging from .parser import gsea_edb_parser, gsea_rank_metric, gsea_gmt_parser, gsea_cls_parser from .algorithm import enrichment_score, gsea_compute, preprocess, ranking_metric from .plot import gsea_plot, heatma...
46.611268
138
0.62392
7ba7949125e8e17f56e523c768036d1c8d6a8bde
71
py
Python
tests/bytecode/mp-tests/try5.py
LabAixBidouille/micropython
11aa6ba456287d6c80598a7ebbebd2887ce8f5a2
[ "MIT" ]
303
2015-07-11T17:12:55.000Z
2018-01-08T03:02:37.000Z
tests/bytecode/mp-tests/try5.py
LabAixBidouille/micropython
11aa6ba456287d6c80598a7ebbebd2887ce8f5a2
[ "MIT" ]
13
2016-05-12T16:51:22.000Z
2018-01-10T22:33:25.000Z
tests/bytecode/mp-tests/try5.py
LabAixBidouille/micropython
11aa6ba456287d6c80598a7ebbebd2887ce8f5a2
[ "MIT" ]
26
2018-01-18T09:15:33.000Z
2022-02-07T13:09:14.000Z
try: f() except A: g() except B as b: h() finally: i()
7.888889
14
0.43662
1677b4e34cd3093aa6d564c0f4c083395c4d968e
2,787
py
Python
aiohttp/base_protocol.py
vananabu/aiohttp
44fe5c74d5d1d1043cfb57bb5dd04a9f2b5e228e
[ "Apache-2.0" ]
null
null
null
aiohttp/base_protocol.py
vananabu/aiohttp
44fe5c74d5d1d1043cfb57bb5dd04a9f2b5e228e
[ "Apache-2.0" ]
null
null
null
aiohttp/base_protocol.py
vananabu/aiohttp
44fe5c74d5d1d1043cfb57bb5dd04a9f2b5e228e
[ "Apache-2.0" ]
null
null
null
import asyncio from typing import Optional, cast from .log import internal_logger class BaseProtocol(asyncio.Protocol): __slots__ = ('_loop', '_paused', '_drain_waiter', '_connection_lost', 'transport') def __init__(self, loop: asyncio.AbstractEventLoop) -> None: self._loop = loop ...
33.178571
73
0.613922
42a5ec1bdfcf097b5f762110cf01fe2d3ac8f404
62,585
py
Python
src/twisted/conch/test/test_keys.py
apjanke/twisted
22f949f7ce187513f0c218b73186c8a73baa00b4
[ "Unlicense", "MIT" ]
1
2021-01-03T01:54:14.000Z
2021-01-03T01:54:14.000Z
src/twisted/conch/test/test_keys.py
zerospam/twisted
e23b5e2040a4d643bc6a43785621358569886a0d
[ "MIT", "Unlicense" ]
null
null
null
src/twisted/conch/test/test_keys.py
zerospam/twisted
e23b5e2040a4d643bc6a43785621358569886a0d
[ "MIT", "Unlicense" ]
null
null
null
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.conch.ssh.keys}. """ import base64 import os from textwrap import dedent from twisted.conch.test import keydata from twisted.python import randbytes from twisted.python.filepath import FilePath from twisted.python.reflec...
38.278287
88
0.644691
53b6b877edaa0302cbb38a7e461542f8813e7855
24,757
py
Python
tests/conftest.py
sti0/homeassistant-core
e4a613a4b33a50ecab7d0ac2c0577aecc94e75da
[ "Apache-2.0" ]
null
null
null
tests/conftest.py
sti0/homeassistant-core
e4a613a4b33a50ecab7d0ac2c0577aecc94e75da
[ "Apache-2.0" ]
null
null
null
tests/conftest.py
sti0/homeassistant-core
e4a613a4b33a50ecab7d0ac2c0577aecc94e75da
[ "Apache-2.0" ]
null
null
null
"""Set up some common test helper things.""" from __future__ import annotations import asyncio from collections.abc import AsyncGenerator import functools import logging import socket import ssl import threading from unittest.mock import AsyncMock, MagicMock, Mock, patch from aiohttp.test_utils import make_mocked_req...
30.677819
129
0.690673
663763de2c0950be428b9158872503f3982373e9
1,319
py
Python
custom_components/zigate/config_flow.py
alexeypetrenko/homeassistant-zigate
954656db06950ca63cb4f742aaf6123b03aecb25
[ "MIT" ]
60
2018-07-11T17:03:15.000Z
2021-03-04T09:44:31.000Z
custom_components/zigate/config_flow.py
alexeypetrenko/homeassistant-zigate
954656db06950ca63cb4f742aaf6123b03aecb25
[ "MIT" ]
159
2018-07-14T19:37:32.000Z
2022-03-20T00:02:45.000Z
custom_components/zigate/config_flow.py
alexeypetrenko/homeassistant-zigate
954656db06950ca63cb4f742aaf6123b03aecb25
[ "MIT" ]
28
2018-07-23T13:24:11.000Z
2021-06-04T21:36:45.000Z
"""Adds config flow for ZiGate.""" from collections import OrderedDict import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_PORT from .const import DOMAIN @config_entries.HANDLERS.register(DOMAIN) class ZiGateConfigFlow(config_entries.ConfigFlow): """ZiGate confi...
33.820513
100
0.692949
0949ca57ede540b8bd84d45a33e8387d4f9db132
1,138
py
Python
benchmark/compute/baremetal/baremetal_wrapper.py
georgianpartners/automl_benchmark
42b641ecdd5d13fc30bed1fb2ef8ea924dea28da
[ "MIT" ]
25
2018-08-20T15:00:47.000Z
2021-02-25T17:45:46.000Z
benchmark/compute/baremetal/baremetal_wrapper.py
georgianpartners/automl_benchmark
42b641ecdd5d13fc30bed1fb2ef8ea924dea28da
[ "MIT" ]
2
2019-01-29T17:33:24.000Z
2020-03-13T00:39:55.000Z
benchmark/compute/baremetal/baremetal_wrapper.py
georgian-io/automl_benchmark
42b641ecdd5d13fc30bed1fb2ef8ea924dea28da
[ "MIT" ]
5
2019-02-11T10:05:34.000Z
2019-08-23T11:59:13.000Z
#!/usr/bin/env python import os import boto3 from ...analysis import process from ...analysis import single_dataset def execute(): s3_bucket = os.getenv("S3_BUCKET") s3_folder = os.getenv("S3_FOLDER","") task = os.getenv("TASK") s3 = boto3.resource('s3') print(task) print(task[1:-1]) ...
26.465116
93
0.571178
69fbffe51a498b2ba86c180b8871507fb0e77237
1,586
py
Python
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/QueryOTAJobRequest.py
liuzheng/aliyun-openapi-python-sdk
1ba6743f3d6f2cef57ec9e3be1754b04293c3150
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/QueryOTAJobRequest.py
liuzheng/aliyun-openapi-python-sdk
1ba6743f3d6f2cef57ec9e3be1754b04293c3150
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/QueryOTAJobRequest.py
liuzheng/aliyun-openapi-python-sdk
1ba6743f3d6f2cef57ec9e3be1754b04293c3150
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
36.045455
74
0.764817
65c668142891d6dd19f5242cd081b1d232feded3
1,313
py
Python
01-code/01-ecmwf-py/b-get-era-int-daily-by-month.py
sebaki/climate-jet-stream
6b07e4327a0c2edee13c112b2e6379032ff23042
[ "MIT" ]
null
null
null
01-code/01-ecmwf-py/b-get-era-int-daily-by-month.py
sebaki/climate-jet-stream
6b07e4327a0c2edee13c112b2e6379032ff23042
[ "MIT" ]
null
null
null
01-code/01-ecmwf-py/b-get-era-int-daily-by-month.py
sebaki/climate-jet-stream
6b07e4327a0c2edee13c112b2e6379032ff23042
[ "MIT" ]
null
null
null
#!/usr/bin/env py27 from ecmwfapi import ECMWFDataServer import numpy as np import datetime as dt import calendar server = ECMWFDataServer() dir = "/automount/agh/Projects/skiefer/" year_first = 2016 year_last = 2016 years_vec = np.arange(year_first, (year_last + 1)) months_vec = np.arange(1, 13) for i in range(...
28.543478
99
0.573496
3aa813e287c63cc9a6c7fdfeecb9d2fc3315f872
12,011
py
Python
data/xueqiu_com/Xueqiu_Rule.py
dingyuanhong/Collection
43bfae16c93b643d1b09d84f27bfdbe5ef8ed497
[ "MIT" ]
1
2021-07-03T13:39:42.000Z
2021-07-03T13:39:42.000Z
data/xueqiu_com/Xueqiu_Rule.py
dingyuanhong/Collection
43bfae16c93b643d1b09d84f27bfdbe5ef8ed497
[ "MIT" ]
null
null
null
data/xueqiu_com/Xueqiu_Rule.py
dingyuanhong/Collection
43bfae16c93b643d1b09d84f27bfdbe5ef8ed497
[ "MIT" ]
1
2020-05-29T23:38:22.000Z
2020-05-29T23:38:22.000Z
import json def stock_screen_parse(content,res): values = json.loads(res.text); stocks = []; for item in values["list"]: stocks.append({"symbol":item["symbol"],"name":item["name"]}); return stocks; def stock_screen_count_parse(content,res): values = json.loads(res.text); count = int(va...
24.313765
203
0.551245
6e23d34c24a2bb1cdacc27dfad4921931fce317f
36,484
py
Python
tests/unit/fake_data_root/vault/var/lib/juju/agents/unit-vault-0/charm/hooks/relations/hacluster/interface_hacluster/common.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
6
2021-10-01T19:46:14.000Z
2022-03-31T17:05:08.000Z
tests/unit/fake_data_root/vault/var/lib/juju/agents/unit-vault-0/charm/hooks/relations/hacluster/interface_hacluster/common.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
111
2021-10-01T18:18:17.000Z
2022-03-29T12:23:20.000Z
tests/unit/fake_data_root/vault/var/lib/juju/agents/unit-vault-0/charm/hooks/relations/hacluster/interface_hacluster/common.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
10
2021-09-29T14:47:54.000Z
2022-03-18T14:52:16.000Z
#!/usr/bin/python # 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 # di...
36.158573
79
0.593932
032c43cbadf0ed11bd8c30dc9efbcdcb4549023e
1,176
py
Python
app/save_utils.py
MJafarMashhadi/keras-glove
43ce3a262a517e2c7aed04f1726bc7ea049fd031
[ "MIT" ]
null
null
null
app/save_utils.py
MJafarMashhadi/keras-glove
43ce3a262a517e2c7aed04f1726bc7ea049fd031
[ "MIT" ]
null
null
null
app/save_utils.py
MJafarMashhadi/keras-glove
43ce3a262a517e2c7aed04f1726bc7ea049fd031
[ "MIT" ]
null
null
null
import pickle from keras.models import Model from keras.preprocessing.text import Tokenizer from sklearn.metrics.pairwise import cosine_similarity import numpy as np from app.config import * def save_model(model: Model, tokenizer: Tokenizer): """ Saves the important parts of the model :param model: Kera...
37.935484
114
0.721088
03001b6df086f536ec51b86ea70897e6c53287d4
2,980
py
Python
FridgeCade-Project/ggpo/gui/ui/savestatesdialog_ui.py
Linuks777/FridgeCade
22de6933ae642d9ed393f86160670a6906c3ff9a
[ "WTFPL" ]
null
null
null
FridgeCade-Project/ggpo/gui/ui/savestatesdialog_ui.py
Linuks777/FridgeCade
22de6933ae642d9ed393f86160670a6906c3ff9a
[ "WTFPL" ]
null
null
null
FridgeCade-Project/ggpo/gui/ui/savestatesdialog_ui.py
Linuks777/FridgeCade
22de6933ae642d9ed393f86160670a6906c3ff9a
[ "WTFPL" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ggpo/gui/ui/savestatesdialog.ui' # # Created: Tue Aug 25 22:55:14 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.f...
47.301587
113
0.745973
62130de2f3924f8f18689482f2d4d468f0bb5b72
7,944
py
Python
transformers/tests/tokenization_bert_japanese_test.py
DaDaMrX/ReaLiSe
25843e0c2c32b3a364cee857b2e4f5ba8b2764e9
[ "MIT" ]
72
2021-05-27T06:32:20.000Z
2022-03-31T03:04:58.000Z
transformers/tests/tokenization_bert_japanese_test.py
DaDaMrX/ReaLiSe
25843e0c2c32b3a364cee857b2e4f5ba8b2764e9
[ "MIT" ]
10
2021-05-27T05:13:50.000Z
2022-03-27T09:10:47.000Z
transformers/tests/tokenization_bert_japanese_test.py
DaDaMrX/ReaLiSe
25843e0c2c32b3a364cee857b2e4f5ba8b2764e9
[ "MIT" ]
13
2021-06-24T04:44:14.000Z
2022-03-03T12:57:23.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
41.375
89
0.567095
f687ca5fc77e91b9befcbb326bbfa65104ccc7f2
2,574
py
Python
src/edge/command/model/subparser.py
fuzzylabs/vertex-edge
97a0df5ebad0dc35e262d9f8269e6e33190f6ad1
[ "Apache-2.0" ]
20
2021-06-25T10:13:33.000Z
2022-01-31T16:34:32.000Z
src/edge/command/model/subparser.py
fuzzylabs/vertex-edge
97a0df5ebad0dc35e262d9f8269e6e33190f6ad1
[ "Apache-2.0" ]
33
2021-07-15T12:22:59.000Z
2021-11-16T09:57:16.000Z
src/edge/command/model/subparser.py
fuzzylabs/vertex-edge
97a0df5ebad0dc35e262d9f8269e6e33190f6ad1
[ "Apache-2.0" ]
9
2021-06-25T10:13:45.000Z
2021-10-20T15:20:27.000Z
import argparse from edge.command.model.deploy import model_deploy from edge.command.model.describe import describe_model from edge.command.model.get_endpoint import get_model_endpoint from edge.command.model.init import model_init from edge.command.model.list import list_models from edge.command.model.remove import r...
45.157895
101
0.737374
7b603284a06ea5cbb7e8ad2becb80525cec2db1f
166
py
Python
mash_place_api/config.py
MashSoftware/geo-api
79b7067729531325ef939ca74924a4044d332b4c
[ "MIT" ]
null
null
null
mash_place_api/config.py
MashSoftware/geo-api
79b7067729531325ef939ca74924a4044d332b4c
[ "MIT" ]
null
null
null
mash_place_api/config.py
MashSoftware/geo-api
79b7067729531325ef939ca74924a4044d332b4c
[ "MIT" ]
1
2018-07-20T20:40:58.000Z
2018-07-20T20:40:58.000Z
import os SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL', 'postgresql+psycopg2://vagrant:vagrant@localhost:5432/vagrant') SQLALCHEMY_TRACK_MODIFICATIONS = False
33.2
115
0.831325
e00354f6d200b9df0d0bf2fe1bf2838b3c540a61
741
py
Python
data.py
byander/predict_stock_market
bf6c6b0e2418dc2520e9376478df579dc71d511b
[ "MIT" ]
null
null
null
data.py
byander/predict_stock_market
bf6c6b0e2418dc2520e9376478df579dc71d511b
[ "MIT" ]
1
2021-06-01T22:47:33.000Z
2021-06-01T22:47:33.000Z
data.py
byander/predict_stock_market
bf6c6b0e2418dc2520e9376478df579dc71d511b
[ "MIT" ]
1
2020-03-22T16:37:55.000Z
2020-03-22T16:37:55.000Z
import pandas as pd from db import connect def get_dataset(): con = connect() sql = '''SELECT symbol, date, open, high, low, close, volume FROM time_series_daily WHERE date >= '2018-01-01' ORDER BY date;''' # sql = '''SELECT symbol, date, open, high, low, close, volume FROM time_series_daily WHERE date < '...
30.875
133
0.649123
e6ae54db453786c81c74fa41c58406f9fb3df5c1
56,140
py
Python
pcdsdevices/interface.py
pcdshub/pcds-devices
82de60f361814ede14e021d8ca03ce4e98f14b9d
[ "BSD-3-Clause-LBNL" ]
null
null
null
pcdsdevices/interface.py
pcdshub/pcds-devices
82de60f361814ede14e021d8ca03ce4e98f14b9d
[ "BSD-3-Clause-LBNL" ]
null
null
null
pcdsdevices/interface.py
pcdshub/pcds-devices
82de60f361814ede14e021d8ca03ce4e98f14b9d
[ "BSD-3-Clause-LBNL" ]
null
null
null
""" Module for defining bell-and-whistles movement features. """ import functools import logging import numbers import re import shutil import signal import subprocess import time import typing from contextlib import contextmanager from pathlib import Path from threading import Event from types import MethodType, Simpl...
33.376932
79
0.57948
ca24bdb9d2d27a4aa6e83f8661d8ec32c04ca7d1
2,525
py
Python
docs/conf.py
watsonpy/watson-html
2e7a7024ce2d9301a8a87c762d5a3c468e002e0a
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
watsonpy/watson-html
2e7a7024ce2d9301a8a87c762d5a3c468e002e0a
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
watsonpy/watson-html
2e7a7024ce2d9301a8a87c762d5a3c468e002e0a
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Watson - Html documentation build configuration file, created by # sphinx-quickstart on Fri Jan 17 14:49:48 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in thi...
24.754902
79
0.656238
7fed0648947965b7cfa081d1d73b4a0451a2aa0a
136
py
Python
zippy/edu.uci.python.test/src/tests/megaguards/reduction/test9.py
securesystemslab/zippy-megaguards
9e3324d6aea0327fe499b9e07b1a67194ddd1db3
[ "BSD-3-Clause" ]
1
2018-07-19T21:15:29.000Z
2018-07-19T21:15:29.000Z
zippy/edu.uci.python.test/src/tests/megaguards/reduction/test9.py
securesystemslab/zippy-megaguards
9e3324d6aea0327fe499b9e07b1a67194ddd1db3
[ "BSD-3-Clause" ]
null
null
null
zippy/edu.uci.python.test/src/tests/megaguards/reduction/test9.py
securesystemslab/zippy-megaguards
9e3324d6aea0327fe499b9e07b1a67194ddd1db3
[ "BSD-3-Clause" ]
null
null
null
from functools import reduce def t(a, b): """ @MG:reduce-on """ return a + b + 3 print(reduce(t, [ i+1 for i in range(100)]))
17
44
0.573529
94266351bbb8a766243a23fa8a3227a6525da284
309
py
Python
easy/leetcode58.py
ayang818/LeetCode
f15276f550997652b81f456134c0b64bcb61f65c
[ "MIT" ]
1
2019-03-12T04:05:41.000Z
2019-03-12T04:05:41.000Z
easy/leetcode58.py
ayang818/LeetCode
f15276f550997652b81f456134c0b64bcb61f65c
[ "MIT" ]
null
null
null
easy/leetcode58.py
ayang818/LeetCode
f15276f550997652b81f456134c0b64bcb61f65c
[ "MIT" ]
null
null
null
class Solution(object): def lengthOfLastWord(self, s): """ :type s: str :rtype: int """ count = 0 for i in s[::-1]: if i != " ": count+=1 else: if count: break return count
20.6
34
0.352751
a8012ef4edec9beba5f3dffbcd796fe6618be483
647
py
Python
gpytorch/functions/dsmm.py
daviswert/gpytorch
b1b546eea573aead6c509c8b23ccf93bd9ce82ec
[ "MIT" ]
1
2021-06-22T11:53:41.000Z
2021-06-22T11:53:41.000Z
gpytorch/functions/dsmm.py
daviswert/gpytorch
b1b546eea573aead6c509c8b23ccf93bd9ce82ec
[ "MIT" ]
null
null
null
gpytorch/functions/dsmm.py
daviswert/gpytorch
b1b546eea573aead6c509c8b23ccf93bd9ce82ec
[ "MIT" ]
null
null
null
import torch from torch.autograd import Function, Variable from ..utils import bdsmm class DSMM(Function): def __init__(self, sparse): if isinstance(sparse, Variable): sparse = sparse.data self.sparse = sparse def forward(self, dense): if self.sparse.ndimension() == 3: ...
28.130435
66
0.619784
795d5ea83b5219aba0764bec9724e9806ccf3bf5
856
py
Python
mysite/urls.py
KaptanSingh2020/pyblog
5b0af8dce4b1c324f0384f27f7331c156e9ad51e
[ "MIT" ]
null
null
null
mysite/urls.py
KaptanSingh2020/pyblog
5b0af8dce4b1c324f0384f27f7331c156e9ad51e
[ "MIT" ]
null
null
null
mysite/urls.py
KaptanSingh2020/pyblog
5b0af8dce4b1c324f0384f27f7331c156e9ad51e
[ "MIT" ]
null
null
null
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
34.24
79
0.689252
7e47f61d45652172f5cee0c818cb082bcedeca55
1,098
py
Python
src/utils/helpers.py
realprocrastinator/DIMY-grp
40fcf111ed8f6c525a5df74ddf84deff0c1b7736
[ "MIT" ]
null
null
null
src/utils/helpers.py
realprocrastinator/DIMY-grp
40fcf111ed8f6c525a5df74ddf84deff0c1b7736
[ "MIT" ]
null
null
null
src/utils/helpers.py
realprocrastinator/DIMY-grp
40fcf111ed8f6c525a5df74ddf84deff0c1b7736
[ "MIT" ]
null
null
null
# can either take bytes type or hex string def bytes_or_hexstr_to_decimal(s, typename): # int in python can handle arbitary large number if typename == "bytes": return int(s.hex(), 16) elif typename == "str": return int(s, 16) else: raise TypeError("Can only handle str or bytes type.") def ephid_b...
32.294118
85
0.700364
3c05c72c78f1c9f4d76df8b143176e3a9e21bbb4
140
py
Python
run.py
natune/AdventCalendar
be36c855aed9cfc22eed91d2a748cbfe24390973
[ "MIT" ]
null
null
null
run.py
natune/AdventCalendar
be36c855aed9cfc22eed91d2a748cbfe24390973
[ "MIT" ]
4
2018-11-10T14:32:54.000Z
2018-11-18T14:51:20.000Z
run.py
natune/AdventCalendar
be36c855aed9cfc22eed91d2a748cbfe24390973
[ "MIT" ]
null
null
null
from app import create_app if __name__ == '__main__': app = create_app() app.run(host=app.config['HOST'], port=app.config['PORT'])
23.333333
61
0.671429
ab388d09cd1dc2870de06b65acb33cfeb4856e17
1,186
py
Python
BFGS.py
QSCTech-Sange/Optimization_Project
a3e1382f8dc4ff8ca6838c0be88f0d65157d5a58
[ "Apache-2.0" ]
null
null
null
BFGS.py
QSCTech-Sange/Optimization_Project
a3e1382f8dc4ff8ca6838c0be88f0d65157d5a58
[ "Apache-2.0" ]
null
null
null
BFGS.py
QSCTech-Sange/Optimization_Project
a3e1382f8dc4ff8ca6838c0be88f0d65157d5a58
[ "Apache-2.0" ]
null
null
null
from func_tools import * import pandas as pd def backtrack(X,func,gX,d,B,alpha=1,gamma=0.01,sigma=0.5): right = gamma*mat2vec(gX).T.dot(mat2vec(d)) ## first vec than T ## right should not include alpha while func(X+alpha*d,B) - func(X,B)> alpha * right: alpha = alpha * sigma return alpha d...
27.581395
116
0.486509
80e882c0cf628a351126c1a93ed9e9f615f08d12
43
py
Python
tests/__init__.py
mattkinsey/bucky-testing
313088a74d7290126e474c38f2fcab3254a34408
[ "MIT" ]
null
null
null
tests/__init__.py
mattkinsey/bucky-testing
313088a74d7290126e474c38f2fcab3254a34408
[ "MIT" ]
84
2020-12-16T06:47:47.000Z
2022-03-28T01:30:18.000Z
tests/__init__.py
mattkinsey/bucky-testing
313088a74d7290126e474c38f2fcab3254a34408
[ "MIT" ]
null
null
null
"""Unit test package for bucky_testing."""
21.5
42
0.72093
2c4888b84cfe297fa8697995a72967921c1956c1
7,064
py
Python
cap2/pipeline/utils/conda.py
nanusefue/CAP2-1
670b343ac7629fe0e64e86263ae420b01952f427
[ "MIT" ]
null
null
null
cap2/pipeline/utils/conda.py
nanusefue/CAP2-1
670b343ac7629fe0e64e86263ae420b01952f427
[ "MIT" ]
null
null
null
cap2/pipeline/utils/conda.py
nanusefue/CAP2-1
670b343ac7629fe0e64e86263ae420b01952f427
[ "MIT" ]
null
null
null
import luigi import os import sys import subprocess import logging import yaml from ..config import PipelineConfig logger = logging.getLogger('cap2') class SpecificationError(Exception): pass class CondaEnv(luigi.Task): name = luigi.Parameter() python = luigi.Parameter(default='3.7') config_filenam...
29.311203
89
0.537231
3caa6a89f68f90e41dbfac34ef61d2c2840ff614
50,569
py
Python
tests/test_model.py
OrquestraDigital/aboutcode-toolkit
d9ff859735a72635563fb5a9e265ecd7023d401a
[ "Apache-2.0" ]
1
2021-08-31T10:58:29.000Z
2021-08-31T10:58:29.000Z
tests/test_model.py
sthagen/aboutcode-toolkit
cd74f15bcc223c7e1b7424f169481af8e55e0f38
[ "Apache-2.0" ]
null
null
null
tests/test_model.py
sthagen/aboutcode-toolkit
cd74f15bcc223c7e1b7424f169481af8e55e0f38
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf8 -*- # ============================================================================ # Copyright (c) nexB Inc. http://www.nexb.com/ - All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with th...
39.140093
162
0.649528
02fa8f7ab940236fee3f65ec6c0cc1aa7d9251f1
1,569
py
Python
nuwa_pytorch/training.py
CurisZhou/nuwa-pytorch
be4f34be819b368def7b065457e5a85997beeee9
[ "MIT" ]
1
2022-02-23T03:00:33.000Z
2022-02-23T03:00:33.000Z
nuwa_pytorch/training.py
CurisZhou/nuwa-pytorch
be4f34be819b368def7b065457e5a85997beeee9
[ "MIT" ]
null
null
null
nuwa_pytorch/training.py
CurisZhou/nuwa-pytorch
be4f34be819b368def7b065457e5a85997beeee9
[ "MIT" ]
null
null
null
import torch from torch import nn from torch.optim import AdamW, Adam from nuwa_pytorch.nuwa_pytorch import VQGanVAE # helper functions def separate_weight_decayable_params(params): no_wd_params = set([param for param in params if param.ndim < 2]) wd_params = set(params) - no_wd_params return wd_params, ...
26.15
78
0.644997
1c98df62f5ac421aa766fe9b19da151cc193fbbb
3,008
py
Python
src/m3_robot_code.py
lcopland18/99-CapstoneProject-201930
34b68b0010d649a9bf503b1da6d9c53a36aad4b7
[ "MIT" ]
null
null
null
src/m3_robot_code.py
lcopland18/99-CapstoneProject-201930
34b68b0010d649a9bf503b1da6d9c53a36aad4b7
[ "MIT" ]
null
null
null
src/m3_robot_code.py
lcopland18/99-CapstoneProject-201930
34b68b0010d649a9bf503b1da6d9c53a36aad4b7
[ "MIT" ]
null
null
null
""" Capstone Project. Code to run on the EV3 robot (NOT on a laptop). Author: Your professors (for the framework) and Ruth Hammond. Spring term, 2018-2019. """ # TODO 1: Put your name in the above. import mqtt_remote_method_calls as mqtt import rosebot import m1_robot_code as m1 import m2_robot_code as m2...
34.574713
79
0.636968
6e8eb55a752fbcafcfdb84ee5e056c3b1ca93073
6,980
py
Python
src/CT_RNN.py
ptolmachev/FORCE_learning
7515d23483600ac7b5ef80bb514aefdc915c57af
[ "MIT" ]
null
null
null
src/CT_RNN.py
ptolmachev/FORCE_learning
7515d23483600ac7b5ef80bb514aefdc915c57af
[ "MIT" ]
null
null
null
src/CT_RNN.py
ptolmachev/FORCE_learning
7515d23483600ac7b5ef80bb514aefdc915c57af
[ "MIT" ]
null
null
null
''' A script containing a continuous-time RNN with feedback loop governed by the equations: tau dv/dt = -v + W_rec * sigma(v) + W_inp * sigma(u) + W_fb * sigma(z) + b z = W_out @ sigma(v) # For now output z is a scalar! sigma(h) function described in 'state_function.py' ''' from matplotlib import pyplot as plt from cop...
36.931217
115
0.579656
b195a238bb574340fe36d03ce93504d9b63bf2ea
13,835
py
Python
updatedb.py
FuelRats/EDDB_JsonAPI
454de1b1b376de70419ffd71cdc7fc2aa2506154
[ "BSD-3-Clause" ]
3
2017-06-28T05:46:05.000Z
2019-05-28T16:10:06.000Z
updatedb.py
FuelRats/EDDB_JsonAPI
454de1b1b376de70419ffd71cdc7fc2aa2506154
[ "BSD-3-Clause" ]
2
2018-04-23T20:14:22.000Z
2019-12-11T20:00:43.000Z
updatedb.py
FuelRats/EDDB_JsonAPI
454de1b1b376de70419ffd71cdc7fc2aa2506154
[ "BSD-3-Clause" ]
2
2019-12-11T05:26:25.000Z
2019-12-11T23:38:23.000Z
import os, sys, transaction, requests from odo import odo, dshape import requests from pyramid.paster import ( get_appsettings, setup_logging, ) from sqlalchemy import engine_from_config, sql, orm, schema from zope.sqlalchemy import mark_changed from eddb_jsonapi.mymodels import ( DBSession, System, ...
53.007663
118
0.642429