hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
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
245
max_issues_repo_name
stringlengths
6
130
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
245
max_forks_repo_name
stringlengths
6
130
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
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f722693b45716fdf18743cfb8e07e1164ef19d6a
56,161
py
Python
simba/features_scripts/extract_features_16bp.py
justinshenk/simba
a58ccd0ceeda201c1452d186033ce6b25fbab564
[ "MIT" ]
1
2021-12-15T07:30:33.000Z
2021-12-15T07:30:33.000Z
simba/features_scripts/extract_features_16bp.py
justinshenk/simba
a58ccd0ceeda201c1452d186033ce6b25fbab564
[ "MIT" ]
null
null
null
simba/features_scripts/extract_features_16bp.py
justinshenk/simba
a58ccd0ceeda201c1452d186033ce6b25fbab564
[ "MIT" ]
1
2021-11-14T09:15:30.000Z
2021-11-14T09:15:30.000Z
from __future__ import division import os, glob import pandas as pd import math import numpy as np from scipy.spatial import ConvexHull import scipy from configparser import ConfigParser, NoOptionError, NoSectionError from numba import jit from simba.rw_dfs import * import re def extract_features_wotarge...
83.448737
285
0.656131
from __future__ import division import os, glob import pandas as pd import math import numpy as np from scipy.spatial import ConvexHull import scipy from configparser import ConfigParser, NoOptionError, NoSectionError from numba import jit from simba.rw_dfs import * import re def extract_features_wotarge...
true
true
f7226947df59ea580f5caef7fa0aece55a646706
3,660
py
Python
ros/src/twist_controller/twist_controller.py
uppala75/System-Integration
f8086104858386732f0c9977d6a4c552c22f0e81
[ "MIT" ]
null
null
null
ros/src/twist_controller/twist_controller.py
uppala75/System-Integration
f8086104858386732f0c9977d6a4c552c22f0e81
[ "MIT" ]
null
null
null
ros/src/twist_controller/twist_controller.py
uppala75/System-Integration
f8086104858386732f0c9977d6a4c552c22f0e81
[ "MIT" ]
null
null
null
import rospy from pid import PID from lowpass import LowPassFilter from yaw_controller import YawController """ This file contains a stub of the Controller class. You can use this class to implement vehicle control. For example, the control method can take twist data as input and return throttle, brake, and steering ...
37.346939
110
0.621585
import rospy from pid import PID from lowpass import LowPassFilter from yaw_controller import YawController GAS_DENSITY = 2.858 ONE_MPH = 0.44704 class Controller(object): def __init__(self, **ros_param): self.vehicle_mass = ros_param['vehicle_mass'] self.brake_deadband = ros_p...
true
true
f7226a323835515ea6c0252f49673228d15dc7f9
2,030
py
Python
lab19/thomas.py
Desnord/lab-mc102
470e5d942cf57305d8ba0b272f4c5f9aad4de11f
[ "Apache-2.0" ]
null
null
null
lab19/thomas.py
Desnord/lab-mc102
470e5d942cf57305d8ba0b272f4c5f9aad4de11f
[ "Apache-2.0" ]
null
null
null
lab19/thomas.py
Desnord/lab-mc102
470e5d942cf57305d8ba0b272f4c5f9aad4de11f
[ "Apache-2.0" ]
null
null
null
# Thomas (Desnord) # O objetivo desta tarefa é fazer um programa # que use recursividade e que, dada a matriz # que descreve a hierarquia de uma empresa, # encontre a cadeia hierárquica relativa a # um determinado funcionário. #entrada: # A primeira linha contém dois inteiros: n, # o número de funcionários entre 3 ...
24.166667
51
0.622167
nk = input().split() n = int(nk[0]) k = int(nk[1]) matriz = [] for i in range(n): linha = input().split() matriz.append(linha) resultado = [] resultado.append(k) def cadeiahier(mat, res): aux = res[:] for i in range(len(mat[aux[len(aux)-1]])): if(int(mat[aux[len(aux)-1]][i]) ...
true
true
f7226a34f9a9cf0625f7c12efdf4417b6efcc66d
113
py
Python
sciapp/object/__init__.py
Pad0y/imagepy
23f41b64ade02f94b566b0d23a4b6459c1a1578d
[ "BSD-4-Clause" ]
null
null
null
sciapp/object/__init__.py
Pad0y/imagepy
23f41b64ade02f94b566b0d23a4b6459c1a1578d
[ "BSD-4-Clause" ]
null
null
null
sciapp/object/__init__.py
Pad0y/imagepy
23f41b64ade02f94b566b0d23a4b6459c1a1578d
[ "BSD-4-Clause" ]
null
null
null
from .shape import * from .image import Image from .table import Table from .roi import * from .surface import *
18.833333
24
0.752212
from .shape import * from .image import Image from .table import Table from .roi import * from .surface import *
true
true
f7226af5637df4ce18dc689955e470c333471afd
559
py
Python
prettyqt/quick/quickitemgrabresult.py
phil65/PrettyQt
26327670c46caa039c9bd15cb17a35ef5ad72e6c
[ "MIT" ]
7
2019-05-01T01:34:36.000Z
2022-03-08T02:24:14.000Z
prettyqt/quick/quickitemgrabresult.py
phil65/PrettyQt
26327670c46caa039c9bd15cb17a35ef5ad72e6c
[ "MIT" ]
141
2019-04-16T11:22:01.000Z
2021-04-14T15:12:36.000Z
prettyqt/quick/quickitemgrabresult.py
phil65/PrettyQt
26327670c46caa039c9bd15cb17a35ef5ad72e6c
[ "MIT" ]
5
2019-04-17T11:48:19.000Z
2021-11-21T10:30:19.000Z
from __future__ import annotations from prettyqt import core, gui from prettyqt.qt import QtQuick QtQuick.QQuickItemGrabResult.__bases__ = (core.Object,) class QuickItemGrabResult: def __init__(self, item: QtQuick.QQuickItemGrabResult): self.item = item def __getattr__(self, val): return g...
21.5
59
0.68873
from __future__ import annotations from prettyqt import core, gui from prettyqt.qt import QtQuick QtQuick.QQuickItemGrabResult.__bases__ = (core.Object,) class QuickItemGrabResult: def __init__(self, item: QtQuick.QQuickItemGrabResult): self.item = item def __getattr__(self, val): return g...
true
true
f7226c42efe353297973425885128f29c9a1a476
2,182
py
Python
posts/forms/admin.py
ollkostin/vas3k.club
083af267499fe755ccd717712bc29c92fc78ef0a
[ "MIT" ]
496
2020-04-24T04:20:32.000Z
2022-03-31T21:55:57.000Z
posts/forms/admin.py
YAR-SEN/vas3k.club
0571d726f1e24b2574457a659c9be48c4984b3ac
[ "MIT" ]
642
2020-04-24T11:54:13.000Z
2022-03-26T15:41:06.000Z
posts/forms/admin.py
YAR-SEN/vas3k.club
0571d726f1e24b2574457a659c9be48c4984b3ac
[ "MIT" ]
243
2020-04-24T11:49:11.000Z
2022-03-24T18:38:48.000Z
from django import forms from common.data.labels import LABELS from posts.models.post import Post class PostCuratorForm(forms.Form): change_type = forms.ChoiceField( label="Сменить тип поста", choices=[(None, "---")] + Post.TYPES, required=False, ) new_label = forms.ChoiceField( ...
22.040404
95
0.589826
from django import forms from common.data.labels import LABELS from posts.models.post import Post class PostCuratorForm(forms.Form): change_type = forms.ChoiceField( label="Сменить тип поста", choices=[(None, "---")] + Post.TYPES, required=False, ) new_label = forms.ChoiceField( ...
true
true
f7226d7a5f96836dbd7186da5616d1c93a8446a6
3,039
py
Python
setup.py
TidyData/Orion
3fd9fe64ce3eead87ea5fb8491d2af29c9d8b09f
[ "MIT" ]
3
2021-05-16T09:02:38.000Z
2021-07-04T11:03:54.000Z
setup.py
Jaehoon9201/Orion
1b63b3032d0df84443d83a19713bbf8838121c93
[ "MIT" ]
null
null
null
setup.py
Jaehoon9201/Orion
1b63b3032d0df84443d83a19713bbf8838121c93
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages try: with open('README.md', encoding='utf-8') as readme_file: readme = readme_file.read() except IOError: readme = '' try: with open('HISTORY.md', encoding='utf-8') as history_file: history = history...
24.119048
94
0.571241
from setuptools import setup, find_packages try: with open('README.md', encoding='utf-8') as readme_file: readme = readme_file.read() except IOError: readme = '' try: with open('HISTORY.md', encoding='utf-8') as history_file: history = history_file.read() except IOError: history = '...
true
true
f7226f93d7e8e6860afd6ccd7b534a92597eec05
3,275
py
Python
mediagrains/patterngenerators/video/lumasteps.py
bbc/rd-apmm-python-lib-mediagrains
84c9de511cc53418c277867eaf143f2cc8730d02
[ "ECL-2.0", "Apache-2.0" ]
6
2018-03-26T23:49:34.000Z
2021-12-23T10:06:09.000Z
mediagrains/patterngenerators/video/lumasteps.py
bbc/rd-apmm-python-lib-mediagrains
84c9de511cc53418c277867eaf143f2cc8730d02
[ "ECL-2.0", "Apache-2.0" ]
34
2018-03-21T16:45:10.000Z
2022-03-28T13:27:34.000Z
mediagrains/patterngenerators/video/lumasteps.py
bbc/rd-apmm-python-lib-mediagrains
84c9de511cc53418c277867eaf143f2cc8730d02
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# # Copyright 2020 British Broadcasting Corporation # # 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...
39.939024
82
0.574351
from fractions import Fraction from .still import StillPatternGenerator from .constants import pixel_ranges from ...grain_constructors import VideoGrain from ...cogenums import CogFrameFormat, CogFrameLayout __all__ = ["LumaSteps"] class LumaSteps(StillPatternGenerator): def __init__(self, src_id...
true
true
f7227065422b043e93fa32ab873710d3b7762048
1,105
py
Python
fmriprep/workflows/fieldmap/__init__.py
hstojic/fmriprep
c92bf833fecf645a2fbf3943486c665a9ebc54f7
[ "BSD-3-Clause" ]
1
2018-03-14T03:10:47.000Z
2018-03-14T03:10:47.000Z
fmriprep/workflows/fieldmap/__init__.py
hstojic/fmriprep
c92bf833fecf645a2fbf3943486c665a9ebc54f7
[ "BSD-3-Clause" ]
null
null
null
fmriprep/workflows/fieldmap/__init__.py
hstojic/fmriprep
c92bf833fecf645a2fbf3943486c665a9ebc54f7
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ .. _sdc_estimation : Fieldmap estimation and unwarping workflows ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. automodule:: fmriprep.workflows.fieldmap...
22.1
73
0.676018
from .base import init_sdc_wf from .unwarp import init_sdc_unwarp_wf, init_fmap_unwarp_report_wf from .pepolar import init_pepolar_unwarp_wf from .syn import init_syn_sdc_wf
true
true
f72270d6b9a6b50871d1e93310ec499628718357
1,055
py
Python
setup.py
ohahlev/ahlev-django-auth-rename
fd40aec14df290f59a3c393d4eb926343b76121b
[ "BSD-3-Clause" ]
null
null
null
setup.py
ohahlev/ahlev-django-auth-rename
fd40aec14df290f59a3c393d4eb926343b76121b
[ "BSD-3-Clause" ]
null
null
null
setup.py
ohahlev/ahlev-django-auth-rename
fd40aec14df290f59a3c393d4eb926343b76121b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup, find_packages import auth_rename setup( name='ahlev-django-auth-rename', version=auth_rename.__version__, description='to rename authentication and authorization', long_description='to rename authentication and authorization', long_description_c...
35.166667
96
0.681517
from setuptools import setup, find_packages import auth_rename setup( name='ahlev-django-auth-rename', version=auth_rename.__version__, description='to rename authentication and authorization', long_description='to rename authentication and authorization', long_description_content_type='text/x-rst...
true
true
f722712c2f0aef5079706dcb4b272105c1569f03
629
py
Python
paur/find/find.py
tonybenoy/paur
398b244b95946f8fc4a8817a084f6edf5205e5a4
[ "BSD-3-Clause" ]
null
null
null
paur/find/find.py
tonybenoy/paur
398b244b95946f8fc4a8817a084f6edf5205e5a4
[ "BSD-3-Clause" ]
1
2020-07-26T12:37:26.000Z
2020-07-26T22:25:10.000Z
paur/find/find.py
tonybenoy/paur
398b244b95946f8fc4a8817a084f6edf5205e5a4
[ "BSD-3-Clause" ]
null
null
null
import typer from find.utils import find_package from paur.paur import console findcmd = typer.Typer() @findcmd.command("find") def find( packages: str, in_aur: bool = typer.Option(False, help="Search only in AUR."), in_repo: bool = typer.Option(False, help="Search only in official repo."), ) -> None: ...
27.347826
78
0.661367
import typer from find.utils import find_package from paur.paur import console findcmd = typer.Typer() @findcmd.command("find") def find( packages: str, in_aur: bool = typer.Option(False, help="Search only in AUR."), in_repo: bool = typer.Option(False, help="Search only in official repo."), ) -> None: ...
true
true
f722713e279eaaf12f9403baa402b9aea5845cd7
63,779
py
Python
ckan/tests/logic/action/test_get.py
manishjakhodecdn/ckan-custom
03d0a150fe550841ae43ee1c1bf9ce1d5bbaab0c
[ "Apache-2.0" ]
null
null
null
ckan/tests/logic/action/test_get.py
manishjakhodecdn/ckan-custom
03d0a150fe550841ae43ee1c1bf9ce1d5bbaab0c
[ "Apache-2.0" ]
null
null
null
ckan/tests/logic/action/test_get.py
manishjakhodecdn/ckan-custom
03d0a150fe550841ae43ee1c1bf9ce1d5bbaab0c
[ "Apache-2.0" ]
null
null
null
import nose.tools import ckan.logic as logic import ckan.plugins as p import ckan.tests.helpers as helpers import ckan.tests.factories as factories import ckan.logic.schema as schema eq = nose.tools.eq_ class TestPackageShow(helpers.FunctionalTestBase): def test_package_show(self): dataset1 = factorie...
38.842266
138
0.609401
import nose.tools import ckan.logic as logic import ckan.plugins as p import ckan.tests.helpers as helpers import ckan.tests.factories as factories import ckan.logic.schema as schema eq = nose.tools.eq_ class TestPackageShow(helpers.FunctionalTestBase): def test_package_show(self): dataset1 = factorie...
true
true
f72272527531c2472e42c8f3296ae27996a41b23
27,634
py
Python
src/sage/categories/lie_algebras.py
rekhabiswal/sage
e8633b09919542a65e7e990c8369fee30c7edefd
[ "BSL-1.0" ]
null
null
null
src/sage/categories/lie_algebras.py
rekhabiswal/sage
e8633b09919542a65e7e990c8369fee30c7edefd
[ "BSL-1.0" ]
null
null
null
src/sage/categories/lie_algebras.py
rekhabiswal/sage
e8633b09919542a65e7e990c8369fee30c7edefd
[ "BSL-1.0" ]
null
null
null
r""" Lie Algebras AUTHORS: - Travis Scrimshaw (07-15-2013): Initial implementation """ #***************************************************************************** # Copyright (C) 2013 Travis Scrimshaw <tscrim at ucdavis.edu> # # This program is free software: you can redistribute it and/or modify # it under...
36.360526
104
0.536404
from sage.misc.abstract_method import abstract_method from sage.misc.cachefunc import cached_method from sage.misc.lazy_attribute import lazy_attribute from sage.misc.lazy_import import LazyImport from sage.categories.category import JoinCategory, Category from sage.categories.category_types import Category_...
true
true
f7227294e6071e2f3b324c9a105808e6b102856c
106
py
Python
django_ymap/__init__.py
Syndicat111/django-simple-yandex-map
4f351b2de9e05790483a6a068df30ddd74b58c4e
[ "MIT" ]
13
2015-04-17T21:46:17.000Z
2021-02-16T16:51:33.000Z
django_ymap/__init__.py
Syndicat111/django-simple-yandex-map
4f351b2de9e05790483a6a068df30ddd74b58c4e
[ "MIT" ]
3
2016-07-22T06:23:13.000Z
2018-08-24T04:36:18.000Z
django_ymap/__init__.py
Syndicat111/django-simple-yandex-map
4f351b2de9e05790483a6a068df30ddd74b58c4e
[ "MIT" ]
11
2015-09-21T09:26:37.000Z
2020-04-26T19:42:33.000Z
# coding: utf-8 default_app_config = "django_ymap.apps.SimpleYandexMap" from .apps import SimpleYandexMap
26.5
55
0.820755
default_app_config = "django_ymap.apps.SimpleYandexMap" from .apps import SimpleYandexMap
true
true
f722742646422e65c474d75a884f5c5b160341a1
6,394
py
Python
variants/PointWall.py
christsa/hide-rl
47dc3dfd93b817831473c07137a6a6e7f2eda549
[ "Apache-2.0" ]
3
2021-09-17T15:16:17.000Z
2021-12-15T14:24:39.000Z
variants/PointWall.py
christsa/hide-rl
47dc3dfd93b817831473c07137a6a6e7f2eda549
[ "Apache-2.0" ]
null
null
null
variants/PointWall.py
christsa/hide-rl
47dc3dfd93b817831473c07137a6a6e7f2eda549
[ "Apache-2.0" ]
null
null
null
""" This file provides the template for designing the agent and environment. The below hyperparameters must be assigned to a value for the algorithm to work properly. """ import numpy as np # from environment import Environment from environment_adapter import EnvironmentAdapter from agent import Agent from collection...
52.842975
506
0.700344
import numpy as np from environment_adapter import EnvironmentAdapter from agent import Agent from collections import OrderedDict def design_agent_and_env(FLAGS): FLAGS.layers = 3 FLAGS.time_scale = 10 model_name = "ant_reacher.xml" normalization_dict = N...
true
true
f72274be6eca348123ebbb2cfa1c699b6a3445cf
3,235
py
Python
rl_6_nimmt/play.py
johannbrehmer/rl-6-nimmt
8bc504e0372bb4bc99a3d69e77418991092ffdac
[ "MIT" ]
3
2021-04-21T07:41:45.000Z
2022-02-12T23:43:44.000Z
rl_6_nimmt/play.py
johannbrehmer/rl-6-nimmt
8bc504e0372bb4bc99a3d69e77418991092ffdac
[ "MIT" ]
null
null
null
rl_6_nimmt/play.py
johannbrehmer/rl-6-nimmt
8bc504e0372bb4bc99a3d69e77418991092ffdac
[ "MIT" ]
3
2021-04-20T04:28:58.000Z
2021-12-31T13:06:51.000Z
import torch import numpy as np import logging from .env import SechsNimmtEnv logger = logging.getLogger(__name__) class GameSession: def __init__(self, *agents, device=torch.device("cpu"), dtype=torch.float): """ Initializes a game session, which consists of an arbitrary number of games between the give...
36.761364
136
0.591654
import torch import numpy as np import logging from .env import SechsNimmtEnv logger = logging.getLogger(__name__) class GameSession: def __init__(self, *agents, device=torch.device("cpu"), dtype=torch.float): self.device = device self.dtype = dtype self.agents = [agent.to(self.device, s...
true
true
f72274cbfa432897ee252cd78be990ef01cbf7ec
21,593
py
Python
virt/ansible-2.3.0/lib/python2.7/site-packages/ansible/modules/packaging/language/pip.py
lakhlaifi/RedHat-Ansible
27c5077cced9d416081fcd5d69ea44bca0317fa4
[ "Apache-2.0" ]
null
null
null
virt/ansible-2.3.0/lib/python2.7/site-packages/ansible/modules/packaging/language/pip.py
lakhlaifi/RedHat-Ansible
27c5077cced9d416081fcd5d69ea44bca0317fa4
[ "Apache-2.0" ]
null
null
null
virt/ansible-2.3.0/lib/python2.7/site-packages/ansible/modules/packaging/language/pip.py
lakhlaifi/RedHat-Ansible
27c5077cced9d416081fcd5d69ea44bca0317fa4
[ "Apache-2.0" ]
1
2020-02-13T14:24:57.000Z
2020-02-13T14:24:57.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Matt Wright <matt@nobien.net> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License...
36.660441
142
0.608253
ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview'], 'supported_by': 'curated'} DOCUMENTATION = ''' --- module: pip short_description: Manages Python library dependencies. description: - "Manage Python library dependencies. To use this...
true
true
f7227586a1a0c54933e22c5615c1e4a40039c1df
2,001
py
Python
nix_review/tests/test_rev.py
zimbatm/nix-review
33c31f06b4e8e74e1b48e8df8cb8083041ec14ea
[ "MIT" ]
null
null
null
nix_review/tests/test_rev.py
zimbatm/nix-review
33c31f06b4e8e74e1b48e8df8cb8083041ec14ea
[ "MIT" ]
null
null
null
nix_review/tests/test_rev.py
zimbatm/nix-review
33c31f06b4e8e74e1b48e8df8cb8083041ec14ea
[ "MIT" ]
null
null
null
import unittest from typing import Any, List, Tuple from unittest.mock import MagicMock, patch from io import StringIO from nix_review.cli import main from .cli_mocks import ( CliTestCase, Mock, MockCompletedProcess, build_cmds, read_asset, IgnoreArgument, ) def rev_command_cmds() -> List[Tu...
27.410959
88
0.538231
import unittest from typing import Any, List, Tuple from unittest.mock import MagicMock, patch from io import StringIO from nix_review.cli import main from .cli_mocks import ( CliTestCase, Mock, MockCompletedProcess, build_cmds, read_asset, IgnoreArgument, ) def rev_command_cmds() -> List[Tu...
true
true
f72276336ffbfb188fb8f2fe5c2ebb405446b09d
11,465
py
Python
agents/policy_gradient/modules/generalized_onpolicy_loss.py
mrbermell/seed_rl
9562e178fb8c16d2551d9e5d59594a7f908655dd
[ "Apache-2.0" ]
733
2019-10-14T11:38:22.000Z
2022-03-24T14:55:50.000Z
agents/policy_gradient/modules/generalized_onpolicy_loss.py
mrbermell/seed_rl
9562e178fb8c16d2551d9e5d59594a7f908655dd
[ "Apache-2.0" ]
76
2019-10-30T14:18:17.000Z
2021-12-10T11:52:15.000Z
agents/policy_gradient/modules/generalized_onpolicy_loss.py
mrbermell/seed_rl
9562e178fb8c16d2551d9e5d59594a7f908655dd
[ "Apache-2.0" ]
141
2019-10-14T11:38:25.000Z
2022-02-27T10:36:56.000Z
# coding=utf-8 # Copyright 2019 The SEED 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 required by applicable law or agre...
42.150735
81
0.710772
import abc import inspect import gin from seed_rl.agents.policy_gradient.modules import logging_module import tensorflow as tf @gin.configurable class GeneralizedOnPolicyLoss(tf.Module, logging_module.LoggingModule): def __init__(self, agent, reward_normalizer, parametric_action_distribution, ...
true
true
f7227651dfe93209009ef0e269f56a6d756e56dc
851
py
Python
PotatoTube2.0.py
mrthundergod/PotatoTube
f932ecde0818eb3106fcf1ffbd1eeeea57d6358e
[ "MIT" ]
null
null
null
PotatoTube2.0.py
mrthundergod/PotatoTube
f932ecde0818eb3106fcf1ffbd1eeeea57d6358e
[ "MIT" ]
null
null
null
PotatoTube2.0.py
mrthundergod/PotatoTube
f932ecde0818eb3106fcf1ffbd1eeeea57d6358e
[ "MIT" ]
null
null
null
import youtube_dl,re, os, tkinter def getUrlWindow(data=None): root=tkinter.Tk() root.withdraw() data = root.clipboard_get() if re.match('https://www.youtube.com/',data) != None: print('Downloading as MP3') return data else: return None def sendtoYDL(data): ydl_opts...
35.458333
115
0.615746
import youtube_dl,re, os, tkinter def getUrlWindow(data=None): root=tkinter.Tk() root.withdraw() data = root.clipboard_get() if re.match('https://www.youtube.com/',data) != None: print('Downloading as MP3') return data else: return None def sendtoYDL(data): ydl_opts...
true
true
f72276b0a1729560fa2fd6f7f6080d763f70ca6b
16,829
py
Python
SIPSim/IsoIncorp.py
arischwartz/test
87a8306a294f59b0eef992529ce900cea876c605
[ "MIT" ]
2
2019-03-15T09:46:48.000Z
2019-06-05T18:16:39.000Z
SIPSim/IsoIncorp.py
arischwartz/test
87a8306a294f59b0eef992529ce900cea876c605
[ "MIT" ]
1
2020-11-01T23:18:10.000Z
2020-11-01T23:18:10.000Z
SIPSim/IsoIncorp.py
arischwartz/test
87a8306a294f59b0eef992529ce900cea876c605
[ "MIT" ]
null
null
null
# import ## batteries import os, sys import re from functools import partial import types import logging import tempfile import shutil import glob from collections import defaultdict from random import shuffle from StringIO import StringIO ## 3rd party import numpy as np import pandas as pd from SIPSim_pymix import mix...
31.280669
83
0.576743
sys import re from functools import partial import types import logging import tempfile import shutil import glob from collections import defaultdict from random import shuffle from StringIO import StringIO py as np import pandas as pd from SIPSim_pymix import mixture import scipy.stats as stats import dill from path...
false
true
f72276e645f03d22eb9c7347b11c45627ef65da4
38,018
py
Python
dis_sdk_python/dependency/google/protobuf/descriptor_pool.py
leishanlin/huaweicloud-sdk-python-dis
900317432b9e9b3fea331d2cb9aa402594f9992b
[ "Apache-2.0" ]
null
null
null
dis_sdk_python/dependency/google/protobuf/descriptor_pool.py
leishanlin/huaweicloud-sdk-python-dis
900317432b9e9b3fea331d2cb9aa402594f9992b
[ "Apache-2.0" ]
null
null
null
dis_sdk_python/dependency/google/protobuf/descriptor_pool.py
leishanlin/huaweicloud-sdk-python-dis
900317432b9e9b3fea331d2cb9aa402594f9992b
[ "Apache-2.0" ]
null
null
null
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
35.933837
86
0.698853
# Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # 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 copy...
true
true
f72277a27d70906472f0c9a71c45935812317f3f
1,568
py
Python
tests/io/test_k2sff.py
jorgemarpa/lightkurve
86320a67eabb3a93f60e9faff0447e4b235bccf2
[ "MIT" ]
235
2018-01-22T01:22:10.000Z
2021-02-02T04:57:26.000Z
tests/io/test_k2sff.py
jorgemarpa/lightkurve
86320a67eabb3a93f60e9faff0447e4b235bccf2
[ "MIT" ]
847
2018-01-22T05:49:16.000Z
2021-02-10T17:05:19.000Z
tests/io/test_k2sff.py
jorgemarpa/lightkurve
86320a67eabb3a93f60e9faff0447e4b235bccf2
[ "MIT" ]
121
2018-01-22T01:11:19.000Z
2021-01-26T21:07:07.000Z
import pytest from astropy.io import fits import numpy as np from numpy.testing import assert_array_equal from lightkurve.io.k2sff import read_k2sff_lightcurve from lightkurve import search_lightcurve @pytest.mark.remote_data def test_read_k2sff(): """Can we read K2SFF files?""" url = "http://archive.stsci....
35.636364
126
0.699617
import pytest from astropy.io import fits import numpy as np from numpy.testing import assert_array_equal from lightkurve.io.k2sff import read_k2sff_lightcurve from lightkurve import search_lightcurve @pytest.mark.remote_data def test_read_k2sff(): url = "http://archive.stsci.edu/hlsps/k2sff/c16/212100000/00236...
true
true
f72277a4d50c47c876335e9670a84b3bf178e017
273
py
Python
utils/__init__.py
Douile/royale-bot
c55c0fed5db271a27f5a7663ebd6582392198fbd
[ "Apache-2.0" ]
1
2021-12-22T18:07:45.000Z
2021-12-22T18:07:45.000Z
utils/__init__.py
Douile/royale-bot
c55c0fed5db271a27f5a7663ebd6582392198fbd
[ "Apache-2.0" ]
1
2021-06-08T19:29:56.000Z
2021-06-08T19:29:56.000Z
utils/__init__.py
Douile/royale-bot
c55c0fed5db271a27f5a7663ebd6582392198fbd
[ "Apache-2.0" ]
4
2019-01-15T00:57:48.000Z
2019-04-25T10:54:08.000Z
import os def getEnv(name,default=None): value = os.environ.get(name,None) if value == None: if default == None: value = input("Env variable not found, please enter {}: ".format(name)) else: value = default return value
24.818182
83
0.578755
import os def getEnv(name,default=None): value = os.environ.get(name,None) if value == None: if default == None: value = input("Env variable not found, please enter {}: ".format(name)) else: value = default return value
true
true
f7227820a8a62443b673431d50a0efce4371625c
2,727
py
Python
benchmarks/earthquake/mar2022/benchmark-rivanna.py
laszewsk/mlcommons
0a07ef2904623f9d3f5eb18581c906813bf563ba
[ "Apache-2.0" ]
1
2022-02-06T04:56:41.000Z
2022-02-06T04:56:41.000Z
benchmarks/earthquake/mar2022/benchmark-rivanna.py
laszewsk/mlcommons
0a07ef2904623f9d3f5eb18581c906813bf563ba
[ "Apache-2.0" ]
6
2022-02-22T02:33:38.000Z
2022-03-31T23:14:09.000Z
benchmarks/earthquake/mar2022/prepare-rivanna-a100.py
laszewsk/mlcommons
0a07ef2904623f9d3f5eb18581c906813bf563ba
[ "Apache-2.0" ]
2
2022-02-06T04:40:51.000Z
2022-03-31T03:27:15.000Z
#!/usr/bin/env bash #SBATCH --job-name=mlcommons-science-earthquake-a100 #SBATCH --output=mlcommons-science-earthquake-a100.out #SBATCH --error=mlcommons-science-earthquake-a100.err #SBATCH --partition=gpu #SBATCH --cpus-per-task=6 #SBATCH --mem=32G #SBATCH --time=06:00:00 #SBATCH --gres=gpu:a100:1 #SBATCH --account=d...
28.40625
146
0.685735
GPU_TYPE="a100" PYTHON_VERSION="3.10.2" RESOURCE_DIR="/project/ds6011-sp22-002" BASE=${RESOURCE_DIR}/$USER/${GPU_TYPE} HOME=${BASE} REV="mar2022" VARIANT="-gregor" echo "Working in <$(pwd)>" echo "Base directory in <${BASE}>" echo "Overridden home in <${HOME}>" echo "Revision: <${REV}>" echo "Vari...
false
true
f72278214081544cda312e677f9ea50f74607e24
834
py
Python
alipay/aop/api/domain/FinUserInfo.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/FinUserInfo.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/FinUserInfo.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class FinUserInfo(object): def __init__(self): self._user_id = None @property def user_id(self): return self._user_id @user_id.setter def user_id(self, value): ...
20.341463
65
0.565947
import json from alipay.aop.api.constant.ParamConstants import * class FinUserInfo(object): def __init__(self): self._user_id = None @property def user_id(self): return self._user_id @user_id.setter def user_id(self, value): self._user_id = value def to_alipay_d...
true
true
f722787f0f169fce7598cd63728f38b786bcd0f8
652
py
Python
padawan/users/migrations/0006_auto_20161221_1742.py
Lordaeron12/padawan
05b5b240d10538f31f4b45b67a75e8b7a096bc78
[ "MIT" ]
null
null
null
padawan/users/migrations/0006_auto_20161221_1742.py
Lordaeron12/padawan
05b5b240d10538f31f4b45b67a75e8b7a096bc78
[ "MIT" ]
null
null
null
padawan/users/migrations/0006_auto_20161221_1742.py
Lordaeron12/padawan
05b5b240d10538f31f4b45b67a75e8b7a096bc78
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-21 22:42 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0005_auto_20161221_1710'), ] operations = [ migrations.AlterField(...
31.047619
254
0.622699
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0005_auto_20161221_1710'), ] operations = [ migrations.AlterField( model_name='user', name='id_type', ...
true
true
f72278b9145e01c86e575754887d733dac60acdb
5,194
py
Python
examples/jobs/cobalt.py
wjlei1990/radical.saga
de022ea4fb29d95e8acffff8a68aa8648de807d4
[ "MIT" ]
12
2019-04-13T21:41:45.000Z
2021-08-03T09:43:25.000Z
examples/jobs/cobalt.py
wjlei1990/radical.saga
de022ea4fb29d95e8acffff8a68aa8648de807d4
[ "MIT" ]
103
2019-04-10T14:23:41.000Z
2022-03-15T19:43:56.000Z
examples/jobs/cobalt.py
wjlei1990/radical.saga
de022ea4fb29d95e8acffff8a68aa8648de807d4
[ "MIT" ]
7
2019-07-11T07:59:56.000Z
2022-02-02T22:28:24.000Z
#!/usr/bin/env python __author__ = "RADICAL Team" __copyright__ = "Copyright 2012-2020, The SAGA Project" __license__ = "MIT" """ This examples shows how to run a job on a remote cluster using the 'COBALT' job adaptor. More information about the radical.saga job API can be found at: http://radical-...
29.68
80
0.506739
__author__ = "RADICAL Team" __copyright__ = "Copyright 2012-2020, The SAGA Project" __license__ = "MIT" import sys import radical.saga as rs js_url = "cobalt://localhost/" def start(): try: js = rs.job.Service(js_url) jd = rs.job.Description() jd...
true
true
f72279e7a45aeafb7dcac167948a1193e2044e12
1,386
py
Python
tests/src/objects/test_qudit.py
KaroliShp/Quantumformatics
4166448706c06a1a45abd106da8152b4f4c40a25
[ "MIT" ]
2
2019-10-28T20:26:14.000Z
2019-10-29T08:28:45.000Z
tests/src/objects/test_qudit.py
KaroliShp/Quantumformatics
4166448706c06a1a45abd106da8152b4f4c40a25
[ "MIT" ]
3
2019-10-28T09:19:27.000Z
2019-10-28T13:42:08.000Z
tests/src/objects/test_qudit.py
KaroliShp/Quantumformatics
4166448706c06a1a45abd106da8152b4f4c40a25
[ "MIT" ]
null
null
null
import pytest from pytest_mock import mocker from hamcrest import * import numpy as np from src.objects.quantum_system import SystemType from src.objects.qudit import Qudit from src.dirac_notation.constants import * @pytest.mark.parametrize('input', [ ( comp_ket_x(0, 4) ) ]) def test_init(input): ...
22.354839
66
0.697691
import pytest from pytest_mock import mocker from hamcrest import * import numpy as np from src.objects.quantum_system import SystemType from src.objects.qudit import Qudit from src.dirac_notation.constants import * @pytest.mark.parametrize('input', [ ( comp_ket_x(0, 4) ) ]) def test_init(input): ...
true
true
f7227a990b2080feec7babd7076ac93ac69a025b
2,737
py
Python
onnxruntime/python/tools/transformers/quantize_helper.py
vpisarev/onnxruntime
bab9b80f1f2330d3a115e0abbb4d8278c2be3f44
[ "MIT" ]
null
null
null
onnxruntime/python/tools/transformers/quantize_helper.py
vpisarev/onnxruntime
bab9b80f1f2330d3a115e0abbb4d8278c2be3f44
[ "MIT" ]
null
null
null
onnxruntime/python/tools/transformers/quantize_helper.py
vpisarev/onnxruntime
bab9b80f1f2330d3a115e0abbb4d8278c2be3f44
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import ...
38.549296
108
0.662769
import logging import torch import onnx import os from transformers.modeling_utils import Conv1D logger = logging.getLogger(__name__) def _conv1d_to_linear(module): in_size, out_size = module.weight.shape linear = torch.nn.Linear(in_size, out_size) linear.weight.data = module.weight.data.T.contiguo...
true
true
f7227aa85ca1c59d3b21afa2dec9bf48aab8225c
405
py
Python
src/process/models/viewmodels/integration/CreateDataIntegrationConnectionFileCsvModel.py
PythonDataIntegrator/pythondataintegrator
6167778c36c2295e36199ac0d4d256a4a0c28d7a
[ "MIT" ]
14
2020-12-19T15:06:13.000Z
2022-01-12T19:52:17.000Z
src/process/models/viewmodels/integration/CreateDataIntegrationConnectionFileCsvModel.py
PythonDataIntegrator/pythondataintegrator
6167778c36c2295e36199ac0d4d256a4a0c28d7a
[ "MIT" ]
43
2021-01-06T22:05:22.000Z
2022-03-10T10:30:30.000Z
src/process/models/viewmodels/integration/CreateDataIntegrationConnectionFileCsvModel.py
PythonDataIntegrator/pythondataintegrator
6167778c36c2295e36199ac0d4d256a4a0c28d7a
[ "MIT" ]
4
2020-12-18T23:10:09.000Z
2021-04-02T13:03:12.000Z
from infrastructure.json.JsonConvert import JsonConvert @JsonConvert.register class CreateDataIntegrationConnectionFileModel: def __init__(self, HasHeader: bool = None, Header: str = None, Separator: str = None, ): self.HasHeader: bool =...
28.928571
55
0.604938
from infrastructure.json.JsonConvert import JsonConvert @JsonConvert.register class CreateDataIntegrationConnectionFileModel: def __init__(self, HasHeader: bool = None, Header: str = None, Separator: str = None, ): self.HasHeader: bool =...
true
true
f7227b1aaa44648fa67f742da8bed95f400a4d64
2,127
py
Python
assignments/assignment2/my_NB_hint.py
CryptoTheSuperDog/fds
12795290f5784eb5d218a648aee4edbcfa890078
[ "MIT" ]
17
2020-08-05T16:47:24.000Z
2022-02-28T19:52:49.000Z
assignments/assignment2/my_NB_hint.py
CryptoTheSuperDog/fds
12795290f5784eb5d218a648aee4edbcfa890078
[ "MIT" ]
98
2020-08-11T19:05:39.000Z
2021-05-05T14:10:24.000Z
assignments/assignment2/my_NB_hint.py
CryptoTheSuperDog/fds
12795290f5784eb5d218a648aee4edbcfa890078
[ "MIT" ]
16
2020-08-15T12:18:16.000Z
2021-04-08T13:53:25.000Z
import pandas as pd import numpy as np from collections import Counter class my_NB: def __init__(self, alpha=1): # alpha: smoothing factor # P(xi = t | y = c) = (N(t,c) + alpha) / (N(c) + n(i)*alpha) # where n(i) is the number of available categories (values) of feature i # Setting...
34.868852
126
0.595675
import pandas as pd import numpy as np from collections import Counter class my_NB: def __init__(self, alpha=1): self.alpha = alpha def fit(self, X, y): self.classes_ = list(set(list(y))) self.P_y = Counter(y) ...
true
true
f7227c7ba9bcd083859d4202044f6b22b7cbd5d6
3,260
py
Python
joj/horse/models/problem.py
joint-online-judge/horse
ec08ecd0528f6a4fad3fa5f5932aef1495721437
[ "MIT" ]
6
2020-12-28T07:05:52.000Z
2022-01-16T04:44:02.000Z
joj/horse/models/problem.py
joint-online-judge/horse
ec08ecd0528f6a4fad3fa5f5932aef1495721437
[ "MIT" ]
56
2021-02-02T02:21:52.000Z
2022-03-13T02:39:05.000Z
joj/horse/models/problem.py
joint-online-judge/horse
ec08ecd0528f6a4fad3fa5f5932aef1495721437
[ "MIT" ]
3
2021-01-28T17:52:58.000Z
2021-12-17T17:42:42.000Z
from typing import TYPE_CHECKING, List, Optional, Type from uuid import UUID from sqlalchemy import event from sqlalchemy.schema import Column, ForeignKey, UniqueConstraint from sqlmodel import Field, Relationship from sqlmodel.sql.sqltypes import GUID from joj.horse.models.base import DomainURLORMModel, url_pre_save...
33.608247
86
0.677914
from typing import TYPE_CHECKING, List, Optional, Type from uuid import UUID from sqlalchemy import event from sqlalchemy.schema import Column, ForeignKey, UniqueConstraint from sqlmodel import Field, Relationship from sqlmodel.sql.sqltypes import GUID from joj.horse.models.base import DomainURLORMModel, url_pre_save...
true
true
f7227cd64f6d565b915ee1f7395f067c2c40c918
12,666
py
Python
plistutils/alias.py
sathwikv143/plistutils
fc7783449da1ed222547ceb5c416402216fa9b34
[ "BSD-3-Clause" ]
35
2017-10-17T17:24:16.000Z
2022-03-18T22:10:47.000Z
plistutils/alias.py
sathwikv143/plistutils
fc7783449da1ed222547ceb5c416402216fa9b34
[ "BSD-3-Clause" ]
1
2021-07-09T01:06:30.000Z
2021-07-09T01:06:30.000Z
plistutils/alias.py
sathwikv143/plistutils
fc7783449da1ed222547ceb5c416402216fa9b34
[ "BSD-3-Clause" ]
4
2018-11-17T15:52:36.000Z
2022-02-28T08:01:14.000Z
import binascii import logging import struct from plistutils.utils import HFS_EPOCH_FROM_UNIX_SHIFT, interpret_flags, NamedStruct, parse_timestamp logger = logging.getLogger(__name__) class AliasParser(object): """ Note that for... v2: volume_creation_date, creation_date, and volume_name are prese...
40.466454
137
0.596084
import binascii import logging import struct from plistutils.utils import HFS_EPOCH_FROM_UNIX_SHIFT, interpret_flags, NamedStruct, parse_timestamp logger = logging.getLogger(__name__) class AliasParser(object): HEADER = struct.Struct('> 4sHH') ALIASV3 = NamedStruct('AliasV3', '>', [ ('is_directo...
true
true
f7227db9ad3577ade7c86c8e9376ca6d209a1ec0
2,370
py
Python
Validation/Viscoelastic/PeriodicTimeseriesAnalysis.py
laurentmackay/3d-vertex
6d6e124ecfaca018d979c5ef17d0b83d1cc0f96c
[ "MIT" ]
null
null
null
Validation/Viscoelastic/PeriodicTimeseriesAnalysis.py
laurentmackay/3d-vertex
6d6e124ecfaca018d979c5ef17d0b83d1cc0f96c
[ "MIT" ]
null
null
null
Validation/Viscoelastic/PeriodicTimeseriesAnalysis.py
laurentmackay/3d-vertex
6d6e124ecfaca018d979c5ef17d0b83d1cc0f96c
[ "MIT" ]
null
null
null
import string import numpy as np import matplotlib.pyplot as plt from VertexTissue import globals as const from VertexTissue.Analysis import * from VertexTissue.funcs import euclidean_distance from periodic_2D import forces, omegas if __name__ == '__main__': square_length = lambda G, t : euclidean_distance...
24.6875
99
0.538819
import string import numpy as np import matplotlib.pyplot as plt from VertexTissue import globals as const from VertexTissue.Analysis import * from VertexTissue.funcs import euclidean_distance from periodic_2D import forces, omegas if __name__ == '__main__': square_length = lambda G, t : euclidean_distance...
true
true
f7227e235f5693500e6783740fb4531072475eb2
834
py
Python
new-api/core/settings.py
rtjfarrimond/spotify-recommender
798a0b2bb500fcc1a7165071b8d9583b69a57ae0
[ "MIT" ]
1
2022-02-09T13:18:57.000Z
2022-02-09T13:18:57.000Z
new-api/core/settings.py
rtjfarrimond/spotify-recommender
798a0b2bb500fcc1a7165071b8d9583b69a57ae0
[ "MIT" ]
null
null
null
new-api/core/settings.py
rtjfarrimond/spotify-recommender
798a0b2bb500fcc1a7165071b8d9583b69a57ae0
[ "MIT" ]
null
null
null
import boto3 def __get_parameter(name): if not name or name == "": raise ValueError("name not passed.") system_code = "spot-rec" name = f"/{system_code}/{name}" client = boto3.client('ssm') response = client.get_parameter(Name=name) return response ['Parameter']['Value'] client_id =...
34.75
69
0.77458
import boto3 def __get_parameter(name): if not name or name == "": raise ValueError("name not passed.") system_code = "spot-rec" name = f"/{system_code}/{name}" client = boto3.client('ssm') response = client.get_parameter(Name=name) return response ['Parameter']['Value'] client_id =...
true
true
f7227e314c05b47ccea1162c713451aa3b856aa1
22
py
Python
dexy/version.py
dexy/dexy
323c1806e51f75435e11d2265703e68f46c8aef3
[ "MIT" ]
136
2015-01-06T15:04:47.000Z
2021-12-21T22:52:41.000Z
dexy/version.py
dexy/dexy
323c1806e51f75435e11d2265703e68f46c8aef3
[ "MIT" ]
13
2015-01-26T14:06:58.000Z
2020-03-27T21:16:10.000Z
dexy/version.py
dexy/dexy
323c1806e51f75435e11d2265703e68f46c8aef3
[ "MIT" ]
34
2015-01-02T16:24:53.000Z
2021-11-27T05:38:30.000Z
DEXY_VERSION="2.0.9b"
11
21
0.727273
DEXY_VERSION="2.0.9b"
true
true
f7227e401c083c41cb8ec97664924d845fa44c99
35,441
py
Python
scripts/automation/trex_control_plane/server/trex_server.py
Elvor/trex-core
c518275a922ed99612cd82574ed9574809f055ec
[ "Apache-2.0" ]
null
null
null
scripts/automation/trex_control_plane/server/trex_server.py
Elvor/trex-core
c518275a922ed99612cd82574ed9574809f055ec
[ "Apache-2.0" ]
null
null
null
scripts/automation/trex_control_plane/server/trex_server.py
Elvor/trex-core
c518275a922ed99612cd82574ed9574809f055ec
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import os import stat import sys import time import outer_packages import zmq import yaml from jsonrpclib.SimpleJSONRPCServer import SimpleJSONRPCServer import jsonrpclib from jsonrpclib import Fault import binascii import socket import errno import signal from common.trex_status_e import TRexStatus...
48.153533
236
0.628707
import os import stat import sys import time import outer_packages import zmq import yaml from jsonrpclib.SimpleJSONRPCServer import SimpleJSONRPCServer import jsonrpclib from jsonrpclib import Fault import binascii import socket import errno import signal from common.trex_status_e import TRexStatus from common.trex...
true
true
f72280c4ecf19e33278ffe74061f44bbb7b21709
7,109
py
Python
tensorflow/contrib/factorization/python/ops/gmm.py
harunpehlivan/tensorflow
376e2cfdab31f4da251ea2e50992a9bf97fd171b
[ "Apache-2.0" ]
24
2018-02-01T15:49:22.000Z
2021-01-11T16:31:18.000Z
tensorflow/contrib/factorization/python/ops/gmm.py
hamzabekkouri/tensorflow
d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f
[ "Apache-2.0" ]
3
2018-05-09T11:31:58.000Z
2021-01-27T12:26:21.000Z
tensorflow/contrib/factorization/python/ops/gmm.py
hamzabekkouri/tensorflow
d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f
[ "Apache-2.0" ]
11
2018-04-02T03:37:08.000Z
2020-10-20T09:32:12.000Z
# Copyright 2016 The TensorFlow 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 applica...
37.81383
85
0.683218
from __future__ import absolute_import from __future__ import division from __future__ import print_function import time import numpy as np from tensorflow.contrib import framework from tensorflow.contrib.factorization.python.ops import gmm_ops from tensorflow.contrib.framework.python.framework import ...
true
true
f7228106a822e4677b5701f46b4650fc9f6a1e11
306
py
Python
python/test/testfiles.py
MarcosFernandez/gemtools
b17c4b973e57bbceafe72b6f81b2d4395eaa3b4a
[ "CNRI-Python" ]
14
2015-01-06T20:25:01.000Z
2021-06-17T20:35:34.000Z
python/test/testfiles.py
MarcosFernandez/gemtools
b17c4b973e57bbceafe72b6f81b2d4395eaa3b4a
[ "CNRI-Python" ]
20
2015-01-23T15:02:35.000Z
2020-05-17T03:25:35.000Z
python/test/testfiles.py
MarcosFernandez/gemtools
b17c4b973e57bbceafe72b6f81b2d4395eaa3b4a
[ "CNRI-Python" ]
7
2015-11-09T18:30:14.000Z
2020-04-08T13:53:30.000Z
#!/usr/bin/env python import os ## setup testfiles for easier access __base_dir = os.path.dirname(os.path.abspath(__file__)) __testfiles_dir = os.path.realpath(__base_dir + "/../testdata") testfiles = {} for file in os.listdir(__testfiles_dir): testfiles[file] = "%s/%s" % (__testfiles_dir, file)
21.857143
63
0.715686
import os th.abspath(__file__)) __testfiles_dir = os.path.realpath(__base_dir + "/../testdata") testfiles = {} for file in os.listdir(__testfiles_dir): testfiles[file] = "%s/%s" % (__testfiles_dir, file)
true
true
f722817124e6e06306044d0dc374c72d96c7d4ec
109,433
py
Python
nova/tests/unit/conductor/test_conductor.py
orbitfp7/nova
90f843cdc47b494cd568507820d45868765697b1
[ "Apache-2.0" ]
5
2017-06-23T07:37:39.000Z
2020-10-21T07:07:50.000Z
nova/tests/unit/conductor/test_conductor.py
orbitfp7/nova
90f843cdc47b494cd568507820d45868765697b1
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/conductor/test_conductor.py
orbitfp7/nova
90f843cdc47b494cd568507820d45868765697b1
[ "Apache-2.0" ]
4
2017-06-23T07:37:43.000Z
2020-12-28T09:57:22.000Z
# Copyright 2012 IBM Corp. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
46.946804
79
0.592454
import contextlib import uuid import mock from mox3 import mox from oslo_config import cfg import oslo_messaging as messaging from oslo_utils import timeutils import six from nova.api.ec2 import ec2utils from nova.compute import arch from nova.compute import flavors from nova.compute import task_state...
true
true
f72281c8dec6874aa11aa6ba69bc1dc45cdffafc
5,480
py
Python
rviz_pyplot/python/rviz_pyplot/Plotter.py
uschwes/rviz_pyplot
7080a0730bf20aa12b7f533a78a29e4d9e4b49c1
[ "BSD-3-Clause" ]
1
2017-08-29T10:19:23.000Z
2017-08-29T10:19:23.000Z
rviz_pyplot/python/rviz_pyplot/Plotter.py
uschwes/rviz_pyplot
7080a0730bf20aa12b7f533a78a29e4d9e4b49c1
[ "BSD-3-Clause" ]
null
null
null
rviz_pyplot/python/rviz_pyplot/Plotter.py
uschwes/rviz_pyplot
7080a0730bf20aa12b7f533a78a29e4d9e4b49c1
[ "BSD-3-Clause" ]
null
null
null
import rospy import PointCloud reload(PointCloud) import CoordinateFrames reload(CoordinateFrames) import Lines reload(Lines) import Image as ImagePy reload(ImagePy) import Text reload(Text) from PointCloud import PointCloudMarker from PlotObject import PlotObject from CoordinateFrames import CoordinateFramesMarke...
34.683544
90
0.60438
import rospy import PointCloud reload(PointCloud) import CoordinateFrames reload(CoordinateFrames) import Lines reload(Lines) import Image as ImagePy reload(ImagePy) import Text reload(Text) from PointCloud import PointCloudMarker from PlotObject import PlotObject from CoordinateFrames import CoordinateFramesMarke...
false
true
f722823d99d3774e7583e2201796279320d2e199
7,715
py
Python
MRIAssimilator/MRIAThreads.py
meewa1/BrukerGUI
f71211557f3a61322a8a8bc9bdb1f70f3cc82969
[ "MIT" ]
2
2019-05-16T14:30:21.000Z
2019-10-23T10:42:57.000Z
MRIAssimilator/MRIAThreads.py
meewa1/BrukerGUI
f71211557f3a61322a8a8bc9bdb1f70f3cc82969
[ "MIT" ]
3
2019-05-16T14:34:25.000Z
2021-12-13T20:23:15.000Z
MRIAssimilator/MRIAThreads.py
meewa1/MRI-assimilator
f71211557f3a61322a8a8bc9bdb1f70f3cc82969
[ "MIT" ]
2
2019-05-16T14:34:58.000Z
2021-12-27T06:33:57.000Z
from PyQt5 import QtCore import os, tempfile from scipy.misc import toimage import brukerWriter as bw import utils from FilesTreeWidget import * __all__ = ["FilesTreeThread", "SaveThread"] class FilesTreeThread(QtCore.QThread): def __init__(self, parent = None, mode = "create", dirnames = ""): super()...
40.605263
100
0.423461
from PyQt5 import QtCore import os, tempfile from scipy.misc import toimage import brukerWriter as bw import utils from FilesTreeWidget import * __all__ = ["FilesTreeThread", "SaveThread"] class FilesTreeThread(QtCore.QThread): def __init__(self, parent = None, mode = "create", dirnames = ""): super()...
true
true
f722827390cb58b1a6cd72a02b31a1dfb88f2244
17,043
py
Python
clients/hydra/python/ory_hydra_client/configuration.py
kolotaev/sdk
0dda1becd70be8d7b9d678321ebe780c1ba00485
[ "Apache-2.0" ]
null
null
null
clients/hydra/python/ory_hydra_client/configuration.py
kolotaev/sdk
0dda1becd70be8d7b9d678321ebe780c1ba00485
[ "Apache-2.0" ]
null
null
null
clients/hydra/python/ory_hydra_client/configuration.py
kolotaev/sdk
0dda1becd70be8d7b9d678321ebe780c1ba00485
[ "Apache-2.0" ]
null
null
null
""" ORY Hydra Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501 The version of the OpenAPI document: v1.10.5 Generated by: https://openapi-generator.tech """ import copy import logging import multiprocessing import sys import urllib3 ...
35.88
118
0.619022
import copy import logging import multiprocessing import sys import urllib3 from http import client as http_client from ory_hydra_client.exceptions import ApiValueError JSON_SCHEMA_VALIDATION_KEYWORDS = { 'multipleOf', 'maximum', 'exclusiveMaximum', 'minimum', 'exclusiveMinimum', 'maxLength', 'minLengt...
true
true
f72283ae4e1379a687501776df3b0e07c89cff2f
236
py
Python
boderAroundImage.py
MayankShrivastava17/opencv-operation-on-image
c5ade8fa527ad05d99b65016678d8d25db201132
[ "MIT" ]
1
2021-03-20T13:02:07.000Z
2021-03-20T13:02:07.000Z
boderAroundImage.py
MayankShrivastava17/opencv-operation-on-image
c5ade8fa527ad05d99b65016678d8d25db201132
[ "MIT" ]
null
null
null
boderAroundImage.py
MayankShrivastava17/opencv-operation-on-image
c5ade8fa527ad05d99b65016678d8d25db201132
[ "MIT" ]
null
null
null
import cv2 as cv img = cv.imread("dog.jpg") cv.imshow("Original Image", img) cv.waitKey(0) border = cv.copyMakeBorder(img, 10, 10, 10, 10, cv.BORDER_CONSTANT) cv.imshow("Bordered Image", border) cv.waitKey(0) cv.destoryAllWindows()
18.153846
67
0.720339
import cv2 as cv img = cv.imread("dog.jpg") cv.imshow("Original Image", img) cv.waitKey(0) border = cv.copyMakeBorder(img, 10, 10, 10, 10, cv.BORDER_CONSTANT) cv.imshow("Bordered Image", border) cv.waitKey(0) cv.destoryAllWindows()
true
true
f72283efb5d82450f4772fcd196e0ff640ca6fda
6,696
py
Python
PyStationB/libraries/StaticCharacterization/tests/notebooks/test_introduction.py
BrunoKM/station-b-libraries
ea3591837e4a33f0bef789d905467754c27913b3
[ "MIT" ]
6
2021-09-29T15:46:55.000Z
2021-12-14T18:39:51.000Z
PyStationB/libraries/StaticCharacterization/tests/notebooks/test_introduction.py
BrunoKM/station-b-libraries
ea3591837e4a33f0bef789d905467754c27913b3
[ "MIT" ]
null
null
null
PyStationB/libraries/StaticCharacterization/tests/notebooks/test_introduction.py
BrunoKM/station-b-libraries
ea3591837e4a33f0bef789d905467754c27913b3
[ "MIT" ]
3
2021-09-27T10:35:20.000Z
2021-10-02T17:53:07.000Z
# # Introduction # In this notebook, we will load an example time series, fit a growth model # and plot the signals. # # ## Load example time series # # Let's start by loading example time series data. # ------------------------------------------------------------------------------------------- # Copyright (c) Microsof...
39.157895
119
0.682348
--------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # ------------------------------------------------------------------------------------------- from typing import Iterable, List, Op...
true
true
f722840026be59144b1d690af2f4860ac9af1a7a
1,479
py
Python
nequip/nn/embedding/_one_hot.py
mir-group/nequip
4e6a0914a289cf000da57a6b6e79678efdf3347f
[ "MIT" ]
153
2021-06-20T20:12:01.000Z
2022-03-31T13:57:45.000Z
nequip/nn/embedding/_one_hot.py
mir-group/nequip
4e6a0914a289cf000da57a6b6e79678efdf3347f
[ "MIT" ]
25
2021-06-17T16:00:16.000Z
2022-03-29T07:04:00.000Z
nequip/nn/embedding/_one_hot.py
mir-group/nequip
4e6a0914a289cf000da57a6b6e79678efdf3347f
[ "MIT" ]
25
2021-06-21T22:25:22.000Z
2022-03-30T04:39:46.000Z
import torch import torch.nn.functional from e3nn.o3 import Irreps from e3nn.util.jit import compile_mode from nequip.data import AtomicDataDict from .._graph_mixin import GraphModuleMixin @compile_mode("script") class OneHotAtomEncoding(GraphModuleMixin, torch.nn.Module): num_types: int set_features: bool ...
32.866667
88
0.684246
import torch import torch.nn.functional from e3nn.o3 import Irreps from e3nn.util.jit import compile_mode from nequip.data import AtomicDataDict from .._graph_mixin import GraphModuleMixin @compile_mode("script") class OneHotAtomEncoding(GraphModuleMixin, torch.nn.Module): num_types: int set_features: bool ...
true
true
f7228426f925b777888476c39cb85634ecb6403f
670
py
Python
menu/spof.py
Jolmberg/fn22snesticle
f62d84a2070f0bd728d8822901bc5daaff55981e
[ "MIT" ]
56
2022-01-10T18:01:51.000Z
2022-03-16T23:36:05.000Z
menu/spof.py
Jolmberg/fn22snesticle
f62d84a2070f0bd728d8822901bc5daaff55981e
[ "MIT" ]
2
2022-01-10T19:38:04.000Z
2022-01-18T09:49:54.000Z
menu/spof.py
Jolmberg/fn22snesticle
f62d84a2070f0bd728d8822901bc5daaff55981e
[ "MIT" ]
2
2022-01-12T02:55:55.000Z
2022-01-23T22:20:21.000Z
#!/usr/bin/env python3 import sys import io def decompress(stream): output = io.BytesIO() planes = 0 while planes < 0x30 * 2: favourite = stream.read(1) control = stream.read(1)[0] for x in range(8): if control & 0x80: output.write(stream.read(1)) ...
20.30303
70
0.528358
import sys import io def decompress(stream): output = io.BytesIO() planes = 0 while planes < 0x30 * 2: favourite = stream.read(1) control = stream.read(1)[0] for x in range(8): if control & 0x80: output.write(stream.read(1)) else: ...
true
true
f722842bb61389e16a448f195a271aca78b7749e
20,862
py
Python
telemetry/third_party/altgraph/altgraph/Graph.py
Martijnve23/catapult
5c63b19d221af6a12889e8727acc85d93892cab7
[ "BSD-3-Clause" ]
1,894
2015-04-17T18:29:53.000Z
2022-03-28T22:41:06.000Z
telemetry/third_party/altgraph/altgraph/Graph.py
Martijnve23/catapult
5c63b19d221af6a12889e8727acc85d93892cab7
[ "BSD-3-Clause" ]
4,640
2015-07-08T16:19:08.000Z
2019-12-02T15:01:27.000Z
telemetry/third_party/altgraph/altgraph/Graph.py
Martijnve23/catapult
5c63b19d221af6a12889e8727acc85d93892cab7
[ "BSD-3-Clause" ]
698
2015-06-02T19:18:35.000Z
2022-03-29T16:57:15.000Z
""" altgraph.Graph - Base Graph class ================================= .. #--Version 2.1 #--Bob Ippolito October, 2004 #--Version 2.0 #--Istvan Albert June, 2004 #--Version 1.0 #--Nathan Denny, May 27, 1999 """ from __future__ import division from __future__ import absolute_import from altgraph import ...
30.544656
124
0.564951
from __future__ import division from __future__ import absolute_import from altgraph import GraphError from collections import deque class Graph(object): def __init__(self, edges=None): self.next_edge = 0 self.nodes, self.edges = {}, {} self.hidden_edges, self.hidden_nodes = {}, {} ...
true
true
f7228538402e71c82d83f635f86f69621986543e
43
py
Python
2_from_go_to_python/trysum.py
TihonV/pygoexamples
ca9604862d08145057aefc60cd0f9b77c9f5346a
[ "MIT" ]
18
2020-01-23T21:20:47.000Z
2022-02-20T19:10:02.000Z
2_from_go_to_python/trysum.py
TihonV/pygoexamples
ca9604862d08145057aefc60cd0f9b77c9f5346a
[ "MIT" ]
null
null
null
2_from_go_to_python/trysum.py
TihonV/pygoexamples
ca9604862d08145057aefc60cd0f9b77c9f5346a
[ "MIT" ]
4
2019-08-03T12:59:53.000Z
2022-02-07T23:43:35.000Z
from newmath import sum print(sum(2, 40))
10.75
23
0.72093
from newmath import sum print(sum(2, 40))
true
true
f72285e8d9341b3fdd5f9beb71eb70ee3b71247c
11,503
py
Python
sciibo/server/server.py
fdev/sciibo
984ec1945cd0f371bce148c1eb1e811befadb478
[ "MIT" ]
14
2017-06-16T14:16:57.000Z
2021-02-26T13:53:56.000Z
sciibo/server/server.py
fdev/sciibo
984ec1945cd0f371bce148c1eb1e811befadb478
[ "MIT" ]
1
2018-06-27T16:11:48.000Z
2019-01-23T12:02:17.000Z
sciibo/server/server.py
fdev/sciibo
984ec1945cd0f371bce148c1eb1e811befadb478
[ "MIT" ]
null
null
null
from threading import Thread import random import time from sciibo.bot import Bot from sciibo.core.emitter import Emitter from sciibo.core.helpers import Queue from sciibo.network.broadcast import BroadcastThread from sciibo.network.connection import ConnectionThread from sciibo.network.listen import ListenThread from...
28.332512
90
0.494567
from threading import Thread import random import time from sciibo.bot import Bot from sciibo.core.emitter import Emitter from sciibo.core.helpers import Queue from sciibo.network.broadcast import BroadcastThread from sciibo.network.connection import ConnectionThread from sciibo.network.listen import ListenThread from...
true
true
f7228645fa62a5b2234016ce0f4af3df946424a2
4,120
py
Python
RecoEgamma/EgammaIsolationAlgos/python/egmGedGsfElectronPFIsolation_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
RecoEgamma/EgammaIsolationAlgos/python/egmGedGsfElectronPFIsolation_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
RecoEgamma/EgammaIsolationAlgos/python/egmGedGsfElectronPFIsolation_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms egmGedGsfElectronPFNoPileUpIsolation = cms.EDProducer( "CITKPFIsolationSumProducer", srcToIsolate = cms.InputTag("gedGsfElectrons"), srcForIsolationCone = cms.InputTag('pfNoPileUpCandidates'), isolationConeDefinitions = cms.VPSet( cms.PSet( isolationAlgo...
47.356322
103
0.616505
import FWCore.ParameterSet.Config as cms egmGedGsfElectronPFNoPileUpIsolation = cms.EDProducer( "CITKPFIsolationSumProducer", srcToIsolate = cms.InputTag("gedGsfElectrons"), srcForIsolationCone = cms.InputTag('pfNoPileUpCandidates'), isolationConeDefinitions = cms.VPSet( cms.PSet( isolationAlgo...
true
true
f722864831e45d7a09384c7672276faa4eb8a8f0
1,691
py
Python
pysock/__init__.py
Polidea/SOCK
cfb7a39d375d60ce3e11b36606673842691c7f44
[ "Unlicense" ]
13
2015-11-18T00:58:24.000Z
2020-03-03T00:17:15.000Z
pysock/__init__.py
Polidea/SOCK
cfb7a39d375d60ce3e11b36606673842691c7f44
[ "Unlicense" ]
4
2016-04-15T11:06:51.000Z
2020-03-27T04:27:05.000Z
pysock/__init__.py
Polidea/SOCK
cfb7a39d375d60ce3e11b36606673842691c7f44
[ "Unlicense" ]
4
2016-07-16T04:26:50.000Z
2021-02-05T10:58:12.000Z
# Tomasz Netczuk (netczuk.tomasz at gmail.com) # Dariusz Seweryn (dariusz.seweryn at gmail.com) # # Copyright (c) 2009-2013 Polidea Sp. z o.o. (http://www.polidea.pl) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following c...
58.310345
81
0.784151
true
true
f7228871205a20643787bd41df943154c3bd2e25
971
py
Python
url/resources/percent-encoding.py
xi/wpt
9ebc6151dae4d8200f33d51de12c84e3a3ff9b4e
[ "BSD-3-Clause" ]
1
2021-12-19T09:30:55.000Z
2021-12-19T09:30:55.000Z
url/resources/percent-encoding.py
xi/wpt
9ebc6151dae4d8200f33d51de12c84e3a3ff9b4e
[ "BSD-3-Clause" ]
null
null
null
url/resources/percent-encoding.py
xi/wpt
9ebc6151dae4d8200f33d51de12c84e3a3ff9b4e
[ "BSD-3-Clause" ]
1
2020-11-09T05:05:06.000Z
2020-11-09T05:05:06.000Z
import base64 from wptserve.utils import isomorphic_decode # Use numeric references to let the HTML parser take care of inserting the correct code points # rather than trying to figure out the necessary bytes for each encoding. (The latter can be # especially tricky given that Python does not implement the Encoding St...
40.458333
94
0.69516
import base64 from wptserve.utils import isomorphic_decode def numeric_references(input): output = b"" for cp in input: output += b"&#x" + format(ord(cp), b"X") + b";" return output def main(request, response): value = request.GET.first(b"value").replace(" ", "+") encoding = reques...
true
true
f72288a1068e029afcb77cc16a912627b6584a89
6,138
py
Python
Pyrado/pyrado/environments/mujoco/openai_half_cheetah.py
swami1995/SimuRLacra
795e6ea45fbb722242ddb0c0ea5c62432826411e
[ "DOC", "Zlib", "BSD-3-Clause" ]
52
2020-05-02T13:55:09.000Z
2022-03-09T14:49:36.000Z
Pyrado/pyrado/environments/mujoco/openai_half_cheetah.py
swami1995/SimuRLacra
795e6ea45fbb722242ddb0c0ea5c62432826411e
[ "DOC", "Zlib", "BSD-3-Clause" ]
40
2020-09-01T15:19:22.000Z
2021-11-02T14:51:41.000Z
Pyrado/pyrado/environments/mujoco/openai_half_cheetah.py
swami1995/SimuRLacra
795e6ea45fbb722242ddb0c0ea5c62432826411e
[ "DOC", "Zlib", "BSD-3-Clause" ]
13
2020-07-03T11:39:21.000Z
2022-02-20T01:12:42.000Z
# Copyright (c) 2020, Fabio Muratore, Honda Research Institute Europe GmbH, and # Technical University of Darmstadt. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source ...
44.478261
117
0.70593
import os.path as osp from typing import Optional import numpy as np from init_args_serializer import Serializable import pyrado from pyrado.environments.mujoco.base import MujocoSimEnv from pyrado.spaces.base import Space from pyrado.spaces.box import BoxSpace from pyrado.tasks.base impor...
true
true
f72289075635f87bd323ca7a7f73bad787bdd356
5,548
py
Python
pcstac/pcstac/main.py
hobu/planetary-computer-apis
27f5b8ce78737f43b306fa4738007c207a329b5b
[ "MIT" ]
null
null
null
pcstac/pcstac/main.py
hobu/planetary-computer-apis
27f5b8ce78737f43b306fa4738007c207a329b5b
[ "MIT" ]
null
null
null
pcstac/pcstac/main.py
hobu/planetary-computer-apis
27f5b8ce78737f43b306fa4738007c207a329b5b
[ "MIT" ]
null
null
null
"""FastAPI application using PGStac.""" import logging import os from typing import Any, Awaitable, Callable, Dict, List from fastapi import FastAPI, Request, Response from fastapi.exceptions import RequestValidationError, StarletteHTTPException from fastapi.openapi.utils import get_openapi from fastapi.responses impo...
33.221557
88
0.758291
import logging import os from typing import Any, Awaitable, Callable, Dict, List from fastapi import FastAPI, Request, Response from fastapi.exceptions import RequestValidationError, StarletteHTTPException from fastapi.openapi.utils import get_openapi from fastapi.responses import ORJSONResponse from stac_fastapi.api....
true
true
f722898d294b0b3ae4182e3d3eb04c88b6048abf
4,832
py
Python
py/tests/test_tensor_ops.py
guidj/attx
6a17ed393ab1f1723e7a9d8890da6313bb96c75f
[ "Apache-2.0" ]
null
null
null
py/tests/test_tensor_ops.py
guidj/attx
6a17ed393ab1f1723e7a9d8890da6313bb96c75f
[ "Apache-2.0" ]
5
2020-11-13T19:02:33.000Z
2022-02-10T02:23:14.000Z
py/tests/test_tensor_ops.py
guidj/attx
6a17ed393ab1f1723e7a9d8890da6313bb96c75f
[ "Apache-2.0" ]
null
null
null
import pytest import tensorflow as tf import numpy as np from attx import tensor_ops def test_single_example_batch_single_step_sequence_with_high_dimension(): # (?, k, dk) = (1, 1, 4) query_1 = [[1, 2, 3, 4]] key_1 = [[1, 1, 1, 1]] value_1 = [[10, 10, 10, 10]] query = tf.cast([query_1], tf.float...
34.514286
102
0.619826
import pytest import tensorflow as tf import numpy as np from attx import tensor_ops def test_single_example_batch_single_step_sequence_with_high_dimension(): query_1 = [[1, 2, 3, 4]] key_1 = [[1, 1, 1, 1]] value_1 = [[10, 10, 10, 10]] query = tf.cast([query_1], tf.float32) key = tf.cast([k...
true
true
f7228a1713dc9b4f9227badc946aff093ca9b0cb
1,234
py
Python
decorest/types.py
bkryza/decorest
95070f1d90eef6e0042b51d4391dc3fbf4779b45
[ "Apache-2.0" ]
21
2018-02-24T07:14:47.000Z
2022-02-15T06:50:06.000Z
decorest/types.py
bkryza/decorest
95070f1d90eef6e0042b51d4391dc3fbf4779b45
[ "Apache-2.0" ]
3
2018-09-08T09:54:29.000Z
2022-01-13T08:53:59.000Z
decorest/types.py
bkryza/decorest
95070f1d90eef6e0042b51d4391dc3fbf4779b45
[ "Apache-2.0" ]
4
2018-04-02T14:49:08.000Z
2020-02-12T02:43:44.000Z
# -*- coding: utf-8 -*- # # Copyright 2018-2021 Bartosz Kryza <bkryza@gmail.com> # # 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 r...
24.68
74
0.67423
from six import PY3 DEnum = object DIntEnum = object if PY3: import enum DEnum = enum.Enum DIntEnum = enum.IntEnum class HttpMethod(DEnum): GET = 'GET', POST = 'POST', PUT = 'PUT', PATCH = 'PATCH', DELETE = 'DELETE', HEAD = 'HEAD', OPTIONS = 'OPTIONS' class...
true
true
f7228aa9f30ca6f334bcf414f70343a2d749e3eb
8,298
py
Python
glanceclient/v1/shell.py
dreamhost/python-glanceclient
b9b897252868732763de60d829b5c8de188adf38
[ "Apache-2.0" ]
null
null
null
glanceclient/v1/shell.py
dreamhost/python-glanceclient
b9b897252868732763de60d829b5c8de188adf38
[ "Apache-2.0" ]
null
null
null
glanceclient/v1/shell.py
dreamhost/python-glanceclient
b9b897252868732763de60d829b5c8de188adf38
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 OpenStack LLC. # 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 b...
40.676471
78
0.632683
import copy import sys from glanceclient.common import utils import glanceclient.v1.images def do_image_list(gc, args): """List images.""" images = gc.images.list() columns = ['ID', 'Name', 'Disk Format', 'Container Format', 'Size', 'Status'] utils.print_list(images, col...
false
true
f7228b133082a8f068ce1f75a5ccf3de42329fed
9,290
py
Python
stanza/models/depparse/data.py
andreipruteanu/stanza
cf58ec826e91eba700e5eafbfe3d0acc8f79360d
[ "Apache-2.0" ]
null
null
null
stanza/models/depparse/data.py
andreipruteanu/stanza
cf58ec826e91eba700e5eafbfe3d0acc8f79360d
[ "Apache-2.0" ]
null
null
null
stanza/models/depparse/data.py
andreipruteanu/stanza
cf58ec826e91eba700e5eafbfe3d0acc8f79360d
[ "Apache-2.0" ]
null
null
null
import random import logging # import torch from stanza.models.common.data import map_to_ids, get_long_tensor, get_float_tensor, sort_all from stanza.models.common.vocab import PAD_ID, VOCAB_PREFIX, ROOT_ID, CompositeVocab, CharVocab from stanza.models.pos.vocab import WordVocab, XPOSVocab, FeatureVocab, MultiVocab fr...
41.473214
158
0.614962
import random import logging from stanza.models.common.data import map_to_ids, get_long_tensor, get_float_tensor, sort_all from stanza.models.common.vocab import PAD_ID, VOCAB_PREFIX, ROOT_ID, CompositeVocab, CharVocab from stanza.models.pos.vocab import WordVocab, XPOSVocab, FeatureVocab, MultiVocab from stanza.mode...
true
true
f7228b37933f2ef8265da1cac6a8cd07aa18238b
3,906
py
Python
shamrock/wallet/rl_wallet/rl_wallet_puzzles.py
zcomputerwiz/shamrock-blockchain
2e2d8a134f0147379812085543ac98f37ce28c2b
[ "Apache-2.0" ]
3
2022-02-10T09:46:23.000Z
2022-03-22T17:10:50.000Z
shamrock/wallet/rl_wallet/rl_wallet_puzzles.py
zcomputerwiz/shamrock-blockchain
2e2d8a134f0147379812085543ac98f37ce28c2b
[ "Apache-2.0" ]
null
null
null
shamrock/wallet/rl_wallet/rl_wallet_puzzles.py
zcomputerwiz/shamrock-blockchain
2e2d8a134f0147379812085543ac98f37ce28c2b
[ "Apache-2.0" ]
null
null
null
import math from binascii import hexlify from clvm_tools import binutils from shamrock.types.blockchain_format.program import Program from shamrock.types.blockchain_format.sized_bytes import bytes32 from shamrock.types.condition_opcodes import ConditionOpcode from shamrock.util.ints import uint64 from shamrock.wallet...
31.248
100
0.717614
import math from binascii import hexlify from clvm_tools import binutils from shamrock.types.blockchain_format.program import Program from shamrock.types.blockchain_format.sized_bytes import bytes32 from shamrock.types.condition_opcodes import ConditionOpcode from shamrock.util.ints import uint64 from shamrock.wallet...
true
true
f7228b9da14d8b387c2fb18f0ddd0e1fb36c8436
2,839
py
Python
tests/triangulum_test/test_support.py
PolarNick239/Triangulum3D
85c6a44f5c8f620bdc58164bd50ff89e1897f59d
[ "MIT" ]
10
2016-09-18T01:38:46.000Z
2021-11-18T17:30:28.000Z
tests/triangulum_test/test_support.py
PolarNick239/Triangulum3D
85c6a44f5c8f620bdc58164bd50ff89e1897f59d
[ "MIT" ]
1
2018-06-20T05:48:19.000Z
2018-06-20T09:19:56.000Z
tests/triangulum_test/test_support.py
PolarNick239/Triangulum3D
85c6a44f5c8f620bdc58164bd50ff89e1897f59d
[ "MIT" ]
12
2015-11-29T03:22:37.000Z
2020-07-14T03:08:52.000Z
# # Copyright (c) 2015, Nikolay Polyarnyi # All rights reserved. # import yaml import asyncio import logging import numpy as np import pkg_resources from pathlib import Path from unittest import TestCase from triangulum.utils import support from triangulum.utils.support import str_dict, deep_merge from triangulum.ren...
29.884211
119
0.672772
import yaml import asyncio import logging import numpy as np import pkg_resources from pathlib import Path from unittest import TestCase from triangulum.utils import support from triangulum.utils.support import str_dict, deep_merge from triangulum.rendering.gl import RenderingAsyncExecutor logger = logging.getL...
true
true
f7228c07a8d76a69d53822ccb3d9d7655013d783
995
py
Python
tests/formatters/pls_recall.py
ir4n6/plaso
010f9cbdfc82e21ed6658657fd09a7b44115c464
[ "Apache-2.0" ]
null
null
null
tests/formatters/pls_recall.py
ir4n6/plaso
010f9cbdfc82e21ed6658657fd09a7b44115c464
[ "Apache-2.0" ]
null
null
null
tests/formatters/pls_recall.py
ir4n6/plaso
010f9cbdfc82e21ed6658657fd09a7b44115c464
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the PL/SQL Recall event formatter.""" from __future__ import unicode_literals import unittest from plaso.formatters import pls_recall from tests.formatters import test_lib class PlsRecallFormatterTest(test_lib.EventFormatterTestCase): """Tests for the PL/SQ...
24.875
67
0.734673
from __future__ import unicode_literals import unittest from plaso.formatters import pls_recall from tests.formatters import test_lib class PlsRecallFormatterTest(test_lib.EventFormatterTestCase): def testInitialization(self): event_formatter = pls_recall.PlsRecallFormatter() self.assertIsNotNone(eve...
true
true
f7228c2465be83d0a65bbf9d1d17615ffe63b200
24,139
py
Python
efficientdet/horovod_estimator/hooks.py
itsliupeng/automl
a02038aa60bdf54e689758e5860e19c574d3638f
[ "Apache-2.0" ]
7
2020-04-07T14:24:49.000Z
2020-09-27T08:48:15.000Z
efficientdet/horovod_estimator/hooks.py
itsliupeng/automl
a02038aa60bdf54e689758e5860e19c574d3638f
[ "Apache-2.0" ]
null
null
null
efficientdet/horovod_estimator/hooks.py
itsliupeng/automl
a02038aa60bdf54e689758e5860e19c574d3638f
[ "Apache-2.0" ]
1
2020-04-09T09:15:11.000Z
2020-04-09T09:15:11.000Z
import io import itertools import os import time import cv2 try: import horovod.tensorflow as hvd except ImportError: hvd = None import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import tensorflow.compat.v1 as tf from PIL import Image from PIL import ImageDraw, ImageFont from sklearn...
39.378467
123
0.628154
import io import itertools import os import time import cv2 try: import horovod.tensorflow as hvd except ImportError: hvd = None import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import tensorflow.compat.v1 as tf from PIL import Image from PIL import ImageDraw, ImageFont from sklearn...
true
true
f7228dd35cfbd2798f11c473ce682186c8a88f74
3,626
py
Python
machina/apps/forum_member/receivers.py
jujinesy/initdjango-machina
93c24877f546521867b3ef77fa278237af932d42
[ "BSD-3-Clause" ]
1
2021-10-08T03:31:24.000Z
2021-10-08T03:31:24.000Z
machina/apps/forum_member/receivers.py
jujinesy/initdjango-machina
93c24877f546521867b3ef77fa278237af932d42
[ "BSD-3-Clause" ]
7
2020-02-12T01:11:13.000Z
2022-03-11T23:26:32.000Z
machina/apps/forum_member/receivers.py
jujinesy/initdjango-machina
93c24877f546521867b3ef77fa278237af932d42
[ "BSD-3-Clause" ]
1
2019-04-20T05:26:27.000Z
2019-04-20T05:26:27.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth import get_user_model from django.core.exceptions import ObjectDoesNotExist from django.db.models import F from django.db.models.signals import post_delete from django.db.models.signals import pre_save from django.dispatch import...
34.533333
99
0.704633
from __future__ import unicode_literals from django.contrib.auth import get_user_model from django.core.exceptions import ObjectDoesNotExist from django.db.models import F from django.db.models.signals import post_delete from django.db.models.signals import pre_save from django.dispatch import receiver from machina...
true
true
f7228e2898aabcc8eb0ba58d9c1b268f97c72316
6,547
py
Python
toontown/safezone/Train.py
SuperM0use24/TT-CL-Edition
fdad8394f0656ae122b687d603f72afafd220c65
[ "MIT" ]
null
null
null
toontown/safezone/Train.py
SuperM0use24/TT-CL-Edition
fdad8394f0656ae122b687d603f72afafd220c65
[ "MIT" ]
1
2021-06-08T17:16:48.000Z
2021-06-08T17:16:48.000Z
toontown/safezone/Train.py
SuperM0use24/TT-CL-Edition
fdad8394f0656ae122b687d603f72afafd220c65
[ "MIT" ]
3
2021-06-03T05:36:36.000Z
2021-06-22T15:07:31.000Z
from panda3d.core import * from direct.showbase.DirectObject import DirectObject from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import globalClockDelta from direct.distributed.ClockDelta import NetworkTimePrecision import random from direct.task.Task import Task from direct.directnotify...
40.165644
351
0.653429
from panda3d.core import * from direct.showbase.DirectObject import DirectObject from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import globalClockDelta from direct.distributed.ClockDelta import NetworkTimePrecision import random from direct.task.Task import Task from direct.directnotify...
true
true
f7228e397bfc3956d4478f6abf5814927ced055f
4,511
py
Python
comfort_gallery/settings.py
C-Museo/Core-Django-1
44d501fe8666941cea6a5479ebb2ccb4472d67d0
[ "PostgreSQL", "MIT" ]
null
null
null
comfort_gallery/settings.py
C-Museo/Core-Django-1
44d501fe8666941cea6a5479ebb2ccb4472d67d0
[ "PostgreSQL", "MIT" ]
null
null
null
comfort_gallery/settings.py
C-Museo/Core-Django-1
44d501fe8666941cea6a5479ebb2ccb4472d67d0
[ "PostgreSQL", "MIT" ]
null
null
null
""" Django settings for comfort_gallery project. Generated by 'django-admin startproject' using Django 3.1.2. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ from...
27.674847
91
0.704278
from pathlib import Path import os import cloudinary import django_heroku import dj_database_url MODE=os.environ.get('MODE') BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = os.environ.get('SECRET_KEY') DEBUG = True ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS') # Ap...
true
true
f7228f1c92e0b3d4a4d6b2c2380ff7458091afdb
79,582
py
Python
imaplib2.py
mannkind/imap_encrypt
bf83fea43b750cd0d89c266e046784a9e215797d
[ "MIT" ]
3
2017-06-07T10:58:45.000Z
2019-12-15T18:05:24.000Z
imaplib2.py
mannkind/imap_encrypt
bf83fea43b750cd0d89c266e046784a9e215797d
[ "MIT" ]
null
null
null
imaplib2.py
mannkind/imap_encrypt
bf83fea43b750cd0d89c266e046784a9e215797d
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Threaded IMAP4 client. Based on RFC 3501 and original imaplib module. Public classes: IMAP4 IMAP4_SSL IMAP4_stream Public functions: Internaldate2Time ParseFlags Time2Internaldate """ __all__ = ("IMAP4", "IMAP4_SSL"...
34.797551
190
0.561597
"""Threaded IMAP4 client. Based on RFC 3501 and original imaplib module. Public classes: IMAP4 IMAP4_SSL IMAP4_stream Public functions: Internaldate2Time ParseFlags Time2Internaldate """ __all__ = ("IMAP4", "IMAP4_SSL", "IMAP4_stream", ...
false
true
f7228f888e0c1319b41e87dce8b0a43b5bb32b32
6,784
py
Python
my_tools/test.py
StephenStorm/SlowFast
9e3616ec05bd0433c721d0b9438ac3ac0f145ac5
[ "Apache-2.0" ]
null
null
null
my_tools/test.py
StephenStorm/SlowFast
9e3616ec05bd0433c721d0b9438ac3ac0f145ac5
[ "Apache-2.0" ]
null
null
null
my_tools/test.py
StephenStorm/SlowFast
9e3616ec05bd0433c721d0b9438ac3ac0f145ac5
[ "Apache-2.0" ]
null
null
null
import numpy as np import tensorrt as trt import pycuda.driver as cuda import pycuda.autoinit import sys, os TRT_LOGGER = trt.Logger() def get_engine(onnx_file_path, engine_file_path=""): """Attempts to load a serialized engine if available, otherwise builds a new TensorRT engine and saves it.""" def build_eng...
49.882353
186
0.664652
import numpy as np import tensorrt as trt import pycuda.driver as cuda import pycuda.autoinit import sys, os TRT_LOGGER = trt.Logger() def get_engine(onnx_file_path, engine_file_path=""): def build_engine(): EXPLICIT_BATCH = 1 << (int)(trt.NetworkDefinitionCreationFlag.EXPLICIT_BATCH) with trt.Buil...
true
true
f722909221b9083478adb8e769ef815032038602
1,726
py
Python
aliyun-python-sdk-cloudauth/aliyunsdkcloudauth/request/v20190307/DescribeRPSDKRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1
2021-03-08T02:59:17.000Z
2021-03-08T02:59:17.000Z
aliyun-python-sdk-cloudauth/aliyunsdkcloudauth/request/v20190307/DescribeRPSDKRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1
2020-05-31T14:51:47.000Z
2020-05-31T14:51:47.000Z
aliyun-python-sdk-cloudauth/aliyunsdkcloudauth/request/v20190307/DescribeRPSDKRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "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...
34.52
84
0.757822
from aliyunsdkcore.request import RpcRequest from aliyunsdkcloudauth.endpoint import endpoint_data class DescribeRPSDKRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Cloudauth', '2019-03-07', 'DescribeRPSDK','cloudauth') self.set_method('POST') if hasattr(self, "endpoint...
true
true
f722917f1a19a21949e86991d7e61b514205fbd8
8,535
py
Python
sdk/python/pulumi_azure_nextgen/network/v20200601/service_endpoint_policy.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20200601/service_endpoint_policy.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20200601/service_endpoint_policy.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
47.949438
1,436
0.679555
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['ServiceEndpointPolicy'] class ServiceEndpointPolicy(pulumi.CustomResource): def __init__(__self__, ...
true
true
f72292672e82e154161cc84f8f20433cdbb662d1
61
py
Python
gunpowder/torch/__init__.py
trivoldus28/gunpowder
97e9e64709fb616e2c47567b22d5f11a9234fe48
[ "MIT" ]
43
2017-05-03T22:27:11.000Z
2022-02-11T19:07:28.000Z
gunpowder/torch/__init__.py
trivoldus28/gunpowder
97e9e64709fb616e2c47567b22d5f11a9234fe48
[ "MIT" ]
102
2017-06-09T10:11:06.000Z
2022-03-29T13:56:37.000Z
gunpowder/torch/__init__.py
trivoldus28/gunpowder
97e9e64709fb616e2c47567b22d5f11a9234fe48
[ "MIT" ]
43
2017-04-25T20:25:17.000Z
2022-02-11T19:07:34.000Z
from __future__ import absolute_import from .nodes import *
15.25
38
0.819672
from __future__ import absolute_import from .nodes import *
true
true
f72292c08728b7c797e05de2a8920f385e676e2c
4,065
py
Python
benchmarks.py
belakaria/USeMO
ba0fb128b6cc961864d6d3187b073c071f64ce40
[ "MIT" ]
4
2020-11-25T05:47:57.000Z
2022-01-04T10:50:56.000Z
benchmarks.py
aryandeshwal/USeMO
063fbd8b8c39c3cc54f9abd8c79ff01eda9dc803
[ "MIT" ]
null
null
null
benchmarks.py
aryandeshwal/USeMO
063fbd8b8c39c3cc54f9abd8c79ff01eda9dc803
[ "MIT" ]
1
2021-01-14T06:01:11.000Z
2021-01-14T06:01:11.000Z
import math import numpy as np from scipy.interpolate import interp1d from copy import deepcopy def Rosen(x1, d): x=list(4*np.asarray(x1)-2) sum_i = 0 for i in range(d-1): sum_i =sum_i + (100 * ((x[i]**2) - x[i+1])**2 + (x[i] - 1)**2) return sum_i def Sphere(x1,d): x=list(4*np.asarray(x1)...
27.1
154
0.510209
import math import numpy as np from scipy.interpolate import interp1d from copy import deepcopy def Rosen(x1, d): x=list(4*np.asarray(x1)-2) sum_i = 0 for i in range(d-1): sum_i =sum_i + (100 * ((x[i]**2) - x[i+1])**2 + (x[i] - 1)**2) return sum_i def Sphere(x1,d): x=list(4*np.asarray(x1)...
true
true
f72292fb546b416bad4ea00d66e1f27463821c23
15,741
py
Python
zed_python_sample/darknet_zed.py
ryota2425/zed-yolo
a5672d30e7d11b7542b8cdb0ac1cd882741fb150
[ "MIT" ]
null
null
null
zed_python_sample/darknet_zed.py
ryota2425/zed-yolo
a5672d30e7d11b7542b8cdb0ac1cd882741fb150
[ "MIT" ]
null
null
null
zed_python_sample/darknet_zed.py
ryota2425/zed-yolo
a5672d30e7d11b7542b8cdb0ac1cd882741fb150
[ "MIT" ]
null
null
null
#!python3 """ Python 3 wrapper for identifying objects in images Requires DLL compilation Original *nix 2.7: https://github.com/pjreddie/darknet/blob/0f110834f4e18b30d5f101bf8f1724c34b7b83db/python/darknet.py Windows Python 2.7 version: https://github.com/AlexeyAB/darknet/blob/fc496d52bf22a0bb257300d3c79be9cd80e722cb...
32.590062
155
0.590369
import os import sys import time import logging import random from random import randint import math import statistics import getopt from ctypes import * import numpy as np import cv2 import pyzed.sl as sl log = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) def sample(probs): s = sum(pro...
true
true
f72292fc75e33b34e3a9adbf8068e3f766ac64b5
1,836
py
Python
dvd/__main__.py
MajorcaDevs/dvd
b646f45fe741f69600e6cd1f2417fc70385eaf9a
[ "MIT" ]
2
2021-06-27T14:57:17.000Z
2021-12-04T07:26:23.000Z
dvd/__main__.py
MajorcaDevs/dvd
b646f45fe741f69600e6cd1f2417fc70385eaf9a
[ "MIT" ]
null
null
null
dvd/__main__.py
MajorcaDevs/dvd
b646f45fe741f69600e6cd1f2417fc70385eaf9a
[ "MIT" ]
null
null
null
from datetime import datetime, timedelta from .args import parse_arguments from .ffmpeg_runner import run_ffmpeg from .image_generator import generate_frame, generate_random_color_dvd_logo, get_scaled_dvd_logo from .position_generator import generate_dvd_positions def main(): args = parse_arguments() ffmpeg ...
34
106
0.648693
from datetime import datetime, timedelta from .args import parse_arguments from .ffmpeg_runner import run_ffmpeg from .image_generator import generate_frame, generate_random_color_dvd_logo, get_scaled_dvd_logo from .position_generator import generate_dvd_positions def main(): args = parse_arguments() ffmpeg ...
true
true
f722931e20b014d69e2515142a9b789d4ce53e3f
639
py
Python
Ejercicio_1.py
VeronicaMoise/Trabajo_Git_DGP_VM
af6cfe394235b8eb8906f99f1c9224ea274953af
[ "MIT" ]
null
null
null
Ejercicio_1.py
VeronicaMoise/Trabajo_Git_DGP_VM
af6cfe394235b8eb8906f99f1c9224ea274953af
[ "MIT" ]
1
2017-12-19T19:18:01.000Z
2017-12-19T19:45:20.000Z
Ejercicio_1.py
VeronicaMoise/Trabajo_Git_DGP_VM
af6cfe394235b8eb8906f99f1c9224ea274953af
[ "MIT" ]
null
null
null
# Ejercicio 1 de DGP. Realizado por : # Ramona Verónica Moise. # Funciones en python # La función suma de una lista por recursión: def suma(l): acum=0 for x in l: acum+=x return acum # La función suma de cuadrados de una lista por comprensión: def suma_cuadrados(n): return sum([i**2 for i ...
17.27027
60
0.624413
def suma(l): acum=0 for x in l: acum+=x return acum def suma_cuadrados(n): return sum([i**2 for i in n if i%2==0]) def máximo(l): max_val=-float("inf") for x in l: if x>max_val: max_val=x return max_val def prod_map(x,l) res=[] for n in ...
false
true
f72293db7cf1184566fd00221fdb982d329d1cd5
2,531
py
Python
proto/uploader_pb2_grpc.py
techunits/file-upload-stream-grpc-python
6c61170eb35d8afe522188f68fa3bd32b6dc82db
[ "MIT" ]
1
2021-12-17T23:39:44.000Z
2021-12-17T23:39:44.000Z
proto/uploader_pb2_grpc.py
techunits/file-upload-stream-grpc-python
6c61170eb35d8afe522188f68fa3bd32b6dc82db
[ "MIT" ]
null
null
null
proto/uploader_pb2_grpc.py
techunits/file-upload-stream-grpc-python
6c61170eb35d8afe522188f68fa3bd32b6dc82db
[ "MIT" ]
null
null
null
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from . import uploader_pb2 as uploader__pb2 class UploaderServiceStub(object): """Missing associated documentation comment in .proto file.""" def __in...
37.776119
114
0.68471
import grpc from . import uploader_pb2 as uploader__pb2 class UploaderServiceStub(object): def __init__(self, channel): self.uploadFile = channel.stream_unary( '/UploaderPkg.UploaderService/uploadFile', request_serializer=uploader__pb2.FileUploadRequest.SerializeToString...
true
true
f7229506eda09d6d691231425512d260fa98cec6
4,839
py
Python
sdk/python/pulumi_aws_native/robomaker/get_robot_application.py
pulumi/pulumi-aws-native
1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3
[ "Apache-2.0" ]
29
2021-09-30T19:32:07.000Z
2022-03-22T21:06:08.000Z
sdk/python/pulumi_aws_native/robomaker/get_robot_application.py
pulumi/pulumi-aws-native
1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3
[ "Apache-2.0" ]
232
2021-09-30T19:26:26.000Z
2022-03-31T23:22:06.000Z
sdk/python/pulumi_aws_native/robomaker/get_robot_application.py
pulumi/pulumi-aws-native
1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3
[ "Apache-2.0" ]
4
2021-11-10T19:42:01.000Z
2022-02-05T10:15:49.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from...
38.712
152
0.687125
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._enums import * __all__ = [ 'GetRobotApplicationResult', 'AwaitableGetRobotApplicationResult', 'get_robot_application', 'get...
true
true
f72295c8e8cc927508aed1db8b34de467166c7ee
1,976
py
Python
recipes/visit_struct/all/conanfile.py
dpronin/conan-center-index
5c6e41a618097d04e731c9831118a51dcb39ab3f
[ "MIT" ]
1
2021-11-11T03:07:13.000Z
2021-11-11T03:07:13.000Z
recipes/visit_struct/all/conanfile.py
dpronin/conan-center-index
5c6e41a618097d04e731c9831118a51dcb39ab3f
[ "MIT" ]
null
null
null
recipes/visit_struct/all/conanfile.py
dpronin/conan-center-index
5c6e41a618097d04e731c9831118a51dcb39ab3f
[ "MIT" ]
null
null
null
import os from conans import ConanFile, tools required_conan_version = ">=1.33.0" class VisitStructConan(ConanFile): name = "visit_struct" description = "A miniature library for struct-field reflection in C++" topics = ("reflection", "introspection", "visitor", "struct-field-visitor",) homepage = "htt...
39.52
131
0.674089
import os from conans import ConanFile, tools required_conan_version = ">=1.33.0" class VisitStructConan(ConanFile): name = "visit_struct" description = "A miniature library for struct-field reflection in C++" topics = ("reflection", "introspection", "visitor", "struct-field-visitor",) homepage = "htt...
true
true
f722966edd30cb5077e170925645898dcb7db5bd
5,229
py
Python
qa/Rules/GuideCreatorRules/GuideCreatorRule.py
tartarini/MAF3
f9614d36591754544b23e3a670980799254dfd2c
[ "Apache-2.0" ]
1
2021-05-10T19:01:48.000Z
2021-05-10T19:01:48.000Z
qa/Rules/GuideCreatorRules/GuideCreatorRule.py
examyes/MAF3
f9614d36591754544b23e3a670980799254dfd2c
[ "Apache-2.0" ]
null
null
null
qa/Rules/GuideCreatorRules/GuideCreatorRule.py
examyes/MAF3
f9614d36591754544b23e3a670980799254dfd2c
[ "Apache-2.0" ]
1
2018-02-06T03:51:57.000Z
2018-02-06T03:51:57.000Z
from xml.dom import minidom as xd import re from AbstractRule import AbstractRule import os class GuideCreatorRule(AbstractRule): def __init__(self): AbstractRule.__init__(self) def execute(self): commentTag = "//! " startTitleTag = "//! <title>" startDescriptionTag = "//! <descripti...
43.941176
120
0.571429
from xml.dom import minidom as xd import re from AbstractRule import AbstractRule import os class GuideCreatorRule(AbstractRule): def __init__(self): AbstractRule.__init__(self) def execute(self): commentTag = "//! " startTitleTag = "//! <title>" startDescriptionTag = "//! <descripti...
true
true
f722969bd923c7bf13836a6687a1de7dd1b499db
1,145
py
Python
python/pyhusky/frontend/library/logistic_regression_receiver.py
husky-team/PyHusky
ac3638101d9147890f9360bcfd18293f2ec1a9a3
[ "Apache-2.0" ]
9
2017-02-28T08:14:42.000Z
2019-07-16T19:20:12.000Z
python/pyhusky/frontend/library/logistic_regression_receiver.py
husky-team/PyHusky
ac3638101d9147890f9360bcfd18293f2ec1a9a3
[ "Apache-2.0" ]
13
2017-01-03T08:29:05.000Z
2017-06-05T11:03:57.000Z
python/pyhusky/frontend/library/logistic_regression_receiver.py
husky-team/PyHusky
ac3638101d9147890f9360bcfd18293f2ec1a9a3
[ "Apache-2.0" ]
6
2017-01-05T02:14:19.000Z
2020-01-22T04:07:17.000Z
# Copyright 2016 Husky Team # # 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, softw...
34.69697
115
0.71441
class LogisticRegressionModelReceiver(object): def __init__(self): pass @staticmethod def register(receiver_map): receiver_map["LogisticRegressionModel#LogisticR_train_py"] = LogisticRegressionModelReceiver.train_receiver @staticmethod def train_receiver(reply): ...
true
true
f72296b0800a491f3ac06891ac78f803cd21e285
13,925
py
Python
rasa_core/processor.py
deepak02/rasa_core
2a9c583b6f5277a2ca07b8277af74947c8823b2e
[ "Apache-2.0" ]
46
2017-11-16T06:03:48.000Z
2022-03-06T18:25:15.000Z
rasa_core/processor.py
deepak02/rasa_core
2a9c583b6f5277a2ca07b8277af74947c8823b2e
[ "Apache-2.0" ]
null
null
null
rasa_core/processor.py
deepak02/rasa_core
2a9c583b6f5277a2ca07b8277af74947c8823b2e
[ "Apache-2.0" ]
21
2018-02-05T09:59:40.000Z
2020-09-24T14:39:16.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging from types import LambdaType from apscheduler.schedulers.background import BackgroundScheduler from typing import Optional, List, Dict, Any from typing im...
42.978395
80
0.629731
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging from types import LambdaType from apscheduler.schedulers.background import BackgroundScheduler from typing import Optional, List, Dict, Any from typing im...
true
true
f72296b0c1f3fb301b416f05e7e91ac2c9bab66e
6,171
py
Python
mapclientplugins/gait2392somsomusclestep/step.py
tsalemink/gait2392somsomusclestep
53d8dbc6daf774b013795f8bc7879cb6e12a0a6b
[ "Apache-2.0" ]
null
null
null
mapclientplugins/gait2392somsomusclestep/step.py
tsalemink/gait2392somsomusclestep
53d8dbc6daf774b013795f8bc7879cb6e12a0a6b
[ "Apache-2.0" ]
null
null
null
mapclientplugins/gait2392somsomusclestep/step.py
tsalemink/gait2392somsomusclestep
53d8dbc6daf774b013795f8bc7879cb6e12a0a6b
[ "Apache-2.0" ]
1
2021-12-02T22:50:13.000Z
2021-12-02T22:50:13.000Z
""" MAP Client Plugin Step """ import json from PySide2 import QtGui from mapclient.mountpoints.workflowstep import WorkflowStepMountPoint from mapclientplugins.gait2392somsomusclestep.configuredialog import \ ConfigureDialog from mapclientplugins.gait2392somsomusclestep.gait2392musclecustsomso import \ Gait2...
38.811321
104
0.64479
import json from PySide2 import QtGui from mapclient.mountpoints.workflowstep import WorkflowStepMountPoint from mapclientplugins.gait2392somsomusclestep.configuredialog import \ ConfigureDialog from mapclientplugins.gait2392somsomusclestep.gait2392musclecustsomso import \ Gait2392MuscleCustomiser class Fie...
true
true
f722974799be3549ca3e50e43cb2ae03b134ec36
599
py
Python
setup.py
Mike7477/cta-lstchain
977de95d7dfe046cd402dbf1df628384724a4316
[ "BSD-3-Clause" ]
null
null
null
setup.py
Mike7477/cta-lstchain
977de95d7dfe046cd402dbf1df628384724a4316
[ "BSD-3-Clause" ]
null
null
null
setup.py
Mike7477/cta-lstchain
977de95d7dfe046cd402dbf1df628384724a4316
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst # import sys import setuptools setuptools.setup(name='lstchain', version=0.1, description="DESCRIPTION", # these should be minimum list of what is needed to run packages=setuptools.find_packages(), insta...
27.227273
63
0.617696
import setuptools setuptools.setup(name='lstchain', version=0.1, description="DESCRIPTION", packages=setuptools.find_packages(), install_requires=['h5py' ], tests_require=['pytest'], author='LST collaboration', author_email='', license='...
true
true
f72297cab8de6ba925b4bb00bc467b1588b58081
5,387
py
Python
app/api/service/party.py
ChegeBryan/politico
746ef4c76931928ef145593092c8b391421a50fd
[ "MIT" ]
1
2021-09-08T13:17:03.000Z
2021-09-08T13:17:03.000Z
app/api/service/party.py
ChegeBryan/politico
746ef4c76931928ef145593092c8b391421a50fd
[ "MIT" ]
62
2019-02-04T07:08:32.000Z
2021-05-06T19:49:03.000Z
app/api/service/party.py
ChegeBryan/politico
746ef4c76931928ef145593092c8b391421a50fd
[ "MIT" ]
5
2019-02-11T18:21:14.000Z
2022-02-25T07:41:07.000Z
""" Method for data manipulation in the mock db """ from flask import jsonify from marshmallow import ValidationError from app.api.model.party import Party from app.api.util.dto import party_schema, parties_schema from app.api.db.database import AppDatabase as db def save_new_party(json_data): """saves a new par...
29.437158
75
0.604418
from flask import jsonify from marshmallow import ValidationError from app.api.model.party import Party from app.api.util.dto import party_schema, parties_schema from app.api.db.database import AppDatabase as db def save_new_party(json_data): try: data = party_schema.load(json_data) except...
true
true
f72297f08adb9274b965c4d7aef9072269c53f94
1,397
py
Python
scratchpad/average.py
Outflier/PyAV
f3aa2336a9fddfc2ae46e15a26956da08153af7e
[ "BSD-3-Clause" ]
965
2015-01-08T19:11:16.000Z
2020-04-30T16:27:07.000Z
scratchpad/average.py
Outflier/PyAV
f3aa2336a9fddfc2ae46e15a26956da08153af7e
[ "BSD-3-Clause" ]
542
2015-01-02T12:55:46.000Z
2020-04-30T16:13:56.000Z
scratchpad/average.py
Outflier/PyAV
f3aa2336a9fddfc2ae46e15a26956da08153af7e
[ "BSD-3-Clause" ]
211
2015-01-10T12:10:02.000Z
2020-04-29T14:02:51.000Z
import argparse import os import sys import pprint import itertools import cv2 from av import open parser = argparse.ArgumentParser() parser.add_argument('-f', '--format') parser.add_argument('-n', '--frames', type=int, default=0) parser.add_argument('path', nargs='+') args = parser.parse_args() max_size = 24 * 60...
23.283333
80
0.629921
import argparse import os import sys import pprint import itertools import cv2 from av import open parser = argparse.ArgumentParser() parser.add_argument('-f', '--format') parser.add_argument('-n', '--frames', type=int, default=0) parser.add_argument('path', nargs='+') args = parser.parse_args() max_size = 24 * 60...
true
true
f72298276664ccbcea35dc2655353b5bce68ee5b
589
py
Python
inheritance3.py
Nischal47/Python-basics
bef88076dd06f27f8d175c43933f7e3bb95c935a
[ "MIT" ]
null
null
null
inheritance3.py
Nischal47/Python-basics
bef88076dd06f27f8d175c43933f7e3bb95c935a
[ "MIT" ]
null
null
null
inheritance3.py
Nischal47/Python-basics
bef88076dd06f27f8d175c43933f7e3bb95c935a
[ "MIT" ]
null
null
null
class Person: def __init__(self,fname,lname): self.fname=fname self.lname=lname self.name=self.fname+self.lname class Student(Person): def __init__(self,fname,lname,RollNO):#We can add properties in child class like this. #Using __init__ inside child will disable the inheri...
32.722222
109
0.655348
class Person: def __init__(self,fname,lname): self.fname=fname self.lname=lname self.name=self.fname+self.lname class Student(Person): def __init__(self,fname,lname,RollNO): Person.__init__(self,fname,lname) self.RollNO=RollNO def printname(self): ...
true
true
f722993608435965231718822fcf83ecbd5400dd
132
py
Python
typy/old/_fragment.py
cyrus-/tydy
0fea76d82663e18a809735c02d09529950dbb5ba
[ "MIT" ]
39
2016-09-12T14:44:56.000Z
2017-04-06T16:08:00.000Z
typy/old/_fragment.py
cyrus-/tydy
0fea76d82663e18a809735c02d09529950dbb5ba
[ "MIT" ]
30
2016-10-05T04:14:27.000Z
2017-02-06T20:16:07.000Z
typy/old/_fragment.py
cyrus-/typy
0fea76d82663e18a809735c02d09529950dbb5ba
[ "MIT" ]
1
2016-09-13T13:41:52.000Z
2016-09-13T13:41:52.000Z
"""typy fragments""" __all__ = ("Fragment",) class Fragment(object): def __init__(self): raise FragmentCannotBeInstantiated()
14.666667
38
0.719697
__all__ = ("Fragment",) class Fragment(object): def __init__(self): raise FragmentCannotBeInstantiated()
true
true
f7229aacdf68f7edec0bbb547366c2bcd2683f2a
3,755
py
Python
p_iadabot.py
EdoardoGalletti/PiadaBot
1318ddcc24e682ad2fafea22d8937af69c274dab
[ "MIT" ]
null
null
null
p_iadabot.py
EdoardoGalletti/PiadaBot
1318ddcc24e682ad2fafea22d8937af69c274dab
[ "MIT" ]
1
2021-06-01T23:27:19.000Z
2021-06-01T23:27:19.000Z
p_iadabot.py
EdoardoGalletti/PiadaBot
1318ddcc24e682ad2fafea22d8937af69c274dab
[ "MIT" ]
null
null
null
""" Very stupid bot to indicate the quantities of ingredients to prepare the desired number of piadines Mother"s recipe for 16 piadine: FLOUR: 700g LARD: 100g MILK: 175g WATER: 175g SWEETS YEAST: 15g SALT: q.s. HONEY: q.s. """ class Ingredient: def __init__(self, name, quantity): self.name ...
35.424528
167
0.673502
class Ingredient: def __init__(self, name, quantity): self.name = name self.quantity = quantity wheat = Ingredient("Farina", 700/16) lard = Ingredient("Strutto", 100/16) milk = Ingredient("Latte", 175/16) water = Ingredient("Farina", 175/16) yeast = Ingredient("Lievito per dolci non vanigliato", 15/16)...
true
true
f7229abe4303ac48d874665b1a528a756d171275
1,878
py
Python
reactivex/observable/fromcallback.py
christiansandberg/RxPY
036027d2858ea6c9d45839c863bd791e5bb50c36
[ "MIT" ]
null
null
null
reactivex/observable/fromcallback.py
christiansandberg/RxPY
036027d2858ea6c9d45839c863bd791e5bb50c36
[ "MIT" ]
null
null
null
reactivex/observable/fromcallback.py
christiansandberg/RxPY
036027d2858ea6c9d45839c863bd791e5bb50c36
[ "MIT" ]
null
null
null
from typing import Any, Callable, Optional from reactivex import Observable, abc, typing from reactivex.disposable import Disposable def from_callback_( func: Callable[..., Callable[..., None]], mapper: Optional[typing.Mapper[Any, Any]] = None, ) -> Callable[[], Observable[Any]]: """Converts a callback f...
31.3
76
0.565495
from typing import Any, Callable, Optional from reactivex import Observable, abc, typing from reactivex.disposable import Disposable def from_callback_( func: Callable[..., Callable[..., None]], mapper: Optional[typing.Mapper[Any, Any]] = None, ) -> Callable[[], Observable[Any]]: def function(*args: Any...
true
true
f7229ac8cf11116abf2321d839ce3680a94fd5d0
15,653
py
Python
boa3/model/builtin/interop/interop.py
OnBlockIO/neo3-boa
cb317292a67532a52ed26f2b0f0f7d0b10ac5f5f
[ "Apache-2.0" ]
25
2020-07-22T19:37:43.000Z
2022-03-08T03:23:55.000Z
boa3/model/builtin/interop/interop.py
OnBlockIO/neo3-boa
cb317292a67532a52ed26f2b0f0f7d0b10ac5f5f
[ "Apache-2.0" ]
419
2020-04-23T17:48:14.000Z
2022-03-31T13:17:45.000Z
boa3/model/builtin/interop/interop.py
OnBlockIO/neo3-boa
cb317292a67532a52ed26f2b0f0f7d0b10ac5f5f
[ "Apache-2.0" ]
15
2020-05-21T21:54:24.000Z
2021-11-18T06:17:24.000Z
from enum import Enum from typing import Dict, List from boa3.model.builtin.interop.blockchain import * from boa3.model.builtin.interop.contract import * from boa3.model.builtin.interop.contract.contractmanifest import * from boa3.model.builtin.interop.crypto import * from boa3.model.builtin.interop.iterator import * ...
40.342784
92
0.492493
from enum import Enum from typing import Dict, List from boa3.model.builtin.interop.blockchain import * from boa3.model.builtin.interop.contract import * from boa3.model.builtin.interop.contract.contractmanifest import * from boa3.model.builtin.interop.crypto import * from boa3.model.builtin.interop.iterator import * ...
true
true
f7229b55ecd3993deb78b6e7e2bd6b017d3a0275
866
py
Python
twitoff/models.py
BrianThomasRoss/TwitOff
ae72e546f92719269abaa51b336139ca0992d016
[ "MIT" ]
null
null
null
twitoff/models.py
BrianThomasRoss/TwitOff
ae72e546f92719269abaa51b336139ca0992d016
[ "MIT" ]
2
2022-01-13T02:05:35.000Z
2022-03-12T00:14:39.000Z
twitoff/models.py
lambda-assignments/TwitOff
ae72e546f92719269abaa51b336139ca0992d016
[ "MIT" ]
null
null
null
"""SQL alchemy models for tweettweet""" from flask_sqlalchemy import SQLAlchemy DB = SQLAlchemy() class Tweeter(DB.Model): """Twitter users that we pull and analyze tweets for""" id = DB.Column(DB.BigInteger, primary_key=True) handle = DB.Column(DB.String(15), nullable=False) newest_tweet_id = DB.Colu...
36.083333
86
0.692841
from flask_sqlalchemy import SQLAlchemy DB = SQLAlchemy() class Tweeter(DB.Model): id = DB.Column(DB.BigInteger, primary_key=True) handle = DB.Column(DB.String(15), nullable=False) newest_tweet_id = DB.Column(DB.BigInteger) def __repr__(self): return "<Tweeter {}>".format(self.handle) class ...
true
true
f7229bc239bcd41c8d6326e4b76bcc58c2721b8b
2,939
py
Python
p3/management/commands/create_bulk_coupons.py
zevaverbach/epcon
8352c030ee0d4197f559cdb58a54ee45c7a4471a
[ "BSD-2-Clause" ]
null
null
null
p3/management/commands/create_bulk_coupons.py
zevaverbach/epcon
8352c030ee0d4197f559cdb58a54ee45c7a4471a
[ "BSD-2-Clause" ]
null
null
null
p3/management/commands/create_bulk_coupons.py
zevaverbach/epcon
8352c030ee0d4197f559cdb58a54ee45c7a4471a
[ "BSD-2-Clause" ]
null
null
null
""" Create a batch of single use discount coupons from a CSV file. Parameters: <conference> <csv-file> Creates coupons based on the CSV file contents: code - coupon code max_usage - max. number of uses items_per_usage - max number of items per use value - value of the coupon in percent de...
31.602151
79
0.550527
import sys import csv from django.core.management.base import BaseCommand, CommandError from django.db import transaction from conference import models as cmodels from assopy.models import Coupon lass Command(BaseCommand): args = '<conference> <count>' dry_run = False def add_arguments(self, par...
true
true
f7229c2105148fbd8e6af890f351595b4e547ac9
2,151
py
Python
test/py/test_array.py
aaronenyeshi/AMDMIGraphX
87528938188f0247f3dfcc6ab9b83c22187109fd
[ "MIT" ]
null
null
null
test/py/test_array.py
aaronenyeshi/AMDMIGraphX
87528938188f0247f3dfcc6ab9b83c22187109fd
[ "MIT" ]
null
null
null
test/py/test_array.py
aaronenyeshi/AMDMIGraphX
87528938188f0247f3dfcc6ab9b83c22187109fd
[ "MIT" ]
null
null
null
import migraphx, struct, array, sys try: from functools import reduce except: pass def assert_eq(x, y): if x == y: pass else: raise Exception(str(x) + " != " + str(y)) def read_float(b, index): return struct.unpack_from('f', b, index*4)[0] def write_float(b, index): struct.pac...
23.380435
72
0.610414
import migraphx, struct, array, sys try: from functools import reduce except: pass def assert_eq(x, y): if x == y: pass else: raise Exception(str(x) + " != " + str(y)) def read_float(b, index): return struct.unpack_from('f', b, index*4)[0] def write_float(b, index): struct.pac...
true
true
f7229c7b293e3307f6c5c5470b7fa3313ce1c4e9
3,019
py
Python
runny-christmas/managers/SplashScreen.py
HighSoftWare96/py-games
b2700764b194c23442d04378d4b3773be71adf70
[ "Apache-2.0" ]
null
null
null
runny-christmas/managers/SplashScreen.py
HighSoftWare96/py-games
b2700764b194c23442d04378d4b3773be71adf70
[ "Apache-2.0" ]
null
null
null
runny-christmas/managers/SplashScreen.py
HighSoftWare96/py-games
b2700764b194c23442d04378d4b3773be71adf70
[ "Apache-2.0" ]
null
null
null
from controllers.GameState import state from pygame.font import Font from pygame.surface import Surface from pygame.locals import * from helpers.config import config from helpers.loaders import load_image import os from definitions import ROOT_DIR from controllers.GameState import state, PAUSE_STATE, RUNNING_STATE, GAM...
38.21519
101
0.666446
from controllers.GameState import state from pygame.font import Font from pygame.surface import Surface from pygame.locals import * from helpers.config import config from helpers.loaders import load_image import os from definitions import ROOT_DIR from controllers.GameState import state, PAUSE_STATE, RUNNING_STATE, GAM...
true
true
f7229d180e33f0d2eb3eb9b79f6e4d8eb4f6a7c6
655
py
Python
sheets/auth.py
jdtech3/YouTube-Archive-Tracker
ef2a547a683368af7df0c7c7df175c278ae1c760
[ "MIT" ]
3
2020-01-28T05:30:43.000Z
2021-06-28T10:58:04.000Z
sheets/auth.py
jdtech3/YouTube-Archive-Tracker
ef2a547a683368af7df0c7c7df175c278ae1c760
[ "MIT" ]
null
null
null
sheets/auth.py
jdtech3/YouTube-Archive-Tracker
ef2a547a683368af7df0c7c7df175c278ae1c760
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ auth.py - Creates an authenticated pygsheets object """ # Libs import pygsheets import pathlib from config import config # import config # Grab the service account auth file location from the config SA_auth_file = pathlib.Path(config['auth_file']) # Create the pygsheets obj client = p...
29.772727
80
0.79542
import pygsheets import pathlib from config import config SA_auth_file = pathlib.Path(config['auth_file']) client = pygsheets.authorize(service_file=SA_auth_file) spreadsheet = client.open(config['spreadsheet_name']) tracker_wks = spreadsheet.worksheet_by_title(config['tracker_worksheet_name']) requests_wks...
true
true
f7229d504f1344ccfec139a0b6f51b07a1a0b28b
5,259
py
Python
tools/wptrunner/wptrunner/manifestinclude.py
loonybear/web-platform-tests
9a18bbb6a0243e39d4e2b569281027b3c832e323
[ "BSD-3-Clause" ]
1
2021-06-03T09:31:09.000Z
2021-06-03T09:31:09.000Z
tools/wptrunner/wptrunner/manifestinclude.py
loonybear/web-platform-tests
9a18bbb6a0243e39d4e2b569281027b3c832e323
[ "BSD-3-Clause" ]
null
null
null
tools/wptrunner/wptrunner/manifestinclude.py
loonybear/web-platform-tests
9a18bbb6a0243e39d4e2b569281027b3c832e323
[ "BSD-3-Clause" ]
1
2020-03-31T17:20:54.000Z
2020-03-31T17:20:54.000Z
"""Manifest structure used to store paths that should be included in a test run. The manifest is represented by a tree of IncludeManifest objects, the root representing the file and each subnode representing a subdirectory that should be included or excluded. """ import glob import os import urlparse from wptmanifest...
35.06
85
0.572162
import glob import os import urlparse from wptmanifest.node import DataNode from wptmanifest.backends import conditional from wptmanifest.backends.conditional import ManifestItem class IncludeManifest(ManifestItem): def __init__(self, node): ManifestItem.__init__(self, node) self.child_map = {} ...
true
true
f7229fa565f57720bda3ad416ac604d502083a45
2,182
py
Python
torchFunc.py
ljbuaa/HLDAGN
787462a43d6c0f47dc1ebfd6ef9bfbd1eb5246a7
[ "MIT" ]
null
null
null
torchFunc.py
ljbuaa/HLDAGN
787462a43d6c0f47dc1ebfd6ef9bfbd1eb5246a7
[ "MIT" ]
null
null
null
torchFunc.py
ljbuaa/HLDAGN
787462a43d6c0f47dc1ebfd6ef9bfbd1eb5246a7
[ "MIT" ]
null
null
null
from torch.autograd import Variable import torch.nn.functional as F from torch import nn from torch import Tensor from torch.nn import Parameter def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class SpectralNorm(nn.Module): def __init__(self, module, name='weight', power_iterations=1): sup...
33.569231
83
0.610907
from torch.autograd import Variable import torch.nn.functional as F from torch import nn from torch import Tensor from torch.nn import Parameter def l2normalize(v, eps=1e-12): return v / (v.norm() + eps) class SpectralNorm(nn.Module): def __init__(self, module, name='weight', power_iterations=1): sup...
true
true
f7229fc0ac4d9ca6f1176a89e5615bb3dc9d9a9d
94
py
Python
cryptofeed_werks/exchanges/__init__.py
globophobe/django-cryptofeed-werks
dd7c04189a0d1582b115298fbe44cf1e0cb969f2
[ "MIT" ]
7
2021-12-30T02:38:17.000Z
2022-03-08T16:14:35.000Z
cryptofeed_werks/exchanges/__init__.py
globophobe/django-cryptofeed-werks
dd7c04189a0d1582b115298fbe44cf1e0cb969f2
[ "MIT" ]
null
null
null
cryptofeed_werks/exchanges/__init__.py
globophobe/django-cryptofeed-werks
dd7c04189a0d1582b115298fbe44cf1e0cb969f2
[ "MIT" ]
1
2022-01-28T00:18:45.000Z
2022-01-28T00:18:45.000Z
from .api import api, candles_api, trades_api __all__ = ["api", "trades_api", "candles_api"]
23.5
46
0.723404
from .api import api, candles_api, trades_api __all__ = ["api", "trades_api", "candles_api"]
true
true
f7229fecc8abcfa996481e7128a83b81f606b917
1,314
py
Python
gdmix-trainer/setup.py
seraconlp/gdmix
a7405c4dde9b201741f44d4ac954b7e3492b088d
[ "BSD-2-Clause" ]
null
null
null
gdmix-trainer/setup.py
seraconlp/gdmix
a7405c4dde9b201741f44d4ac954b7e3492b088d
[ "BSD-2-Clause" ]
null
null
null
gdmix-trainer/setup.py
seraconlp/gdmix
a7405c4dde9b201741f44d4ac954b7e3492b088d
[ "BSD-2-Clause" ]
null
null
null
from pathlib import Path from setuptools import find_namespace_packages, setup from sys import platform as _platform import sys VERSION="0.3.0" current_dir = Path(__file__).resolve().parent with open(current_dir.joinpath('README.md'), encoding='utf-8') as f: long_description = f.read() if _platform not in ["lin...
29.2
68
0.619482
from pathlib import Path from setuptools import find_namespace_packages, setup from sys import platform as _platform import sys VERSION="0.3.0" current_dir = Path(__file__).resolve().parent with open(current_dir.joinpath('README.md'), encoding='utf-8') as f: long_description = f.read() if _platform not in ["lin...
true
true