hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f77a97aa915f6fd63a4d5ed0d95752c6ca022eb1
2,387
py
Python
python/paddle/fluid/tests/unittests/collective_allgather_op.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
17,085
2016-11-18T06:40:52.000Z
2022-03-31T22:52:32.000Z
python/paddle/fluid/tests/unittests/collective_allgather_op.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
29,769
2016-11-18T06:35:22.000Z
2022-03-31T16:46:15.000Z
python/paddle/fluid/tests/unittests/collective_allgather_op.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
4,641
2016-11-18T07:43:33.000Z
2022-03-31T15:15:02.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
33.152778
74
0.674487
from __future__ import print_function import numpy as np import argparse import os import sys import signal import time from contextlib import closing from six import string_types import math import paddle import paddle.fluid as fluid import paddle.fluid.profiler as profiler import paddle.fluid.unique_name as nameGen...
true
true
f77a9985dabc1cd0a093721da6f146ac0773d951
3,222
py
Python
myapp/migrations/0001_initial.py
thinkAmi-sandbox/Django_factory_boy_sample
fb1af42e4f13dcba22148da5b5ac437246466308
[ "Unlicense" ]
2
2016-04-30T08:16:03.000Z
2021-01-12T06:44:56.000Z
myapp/migrations/0001_initial.py
thinkAmi-sandbox/Django_factory_boy_sample
fb1af42e4f13dcba22148da5b5ac437246466308
[ "Unlicense" ]
null
null
null
myapp/migrations/0001_initial.py
thinkAmi-sandbox/Django_factory_boy_sample
fb1af42e4f13dcba22148da5b5ac437246466308
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-21 13:57 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Creat...
36.613636
114
0.555866
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Author', fields=[ ...
true
true
f77a9994f74e647738aba3df86d433766877b6a4
2,841
py
Python
check_os.py
sarjodas/check-os
7bd9866bf0e5d335e27ecc461660f98034ecab99
[ "Apache-2.0" ]
1
2018-07-19T11:42:53.000Z
2018-07-19T11:42:53.000Z
check_os.py
sarjodas/check-os
7bd9866bf0e5d335e27ecc461660f98034ecab99
[ "Apache-2.0" ]
null
null
null
check_os.py
sarjodas/check-os
7bd9866bf0e5d335e27ecc461660f98034ecab99
[ "Apache-2.0" ]
null
null
null
import argparse import json import logging.config from keystoneauth1.exceptions import Unauthorized from sdk.softfire.os_utils import OSClient log = logging.getLogger(__name__) def image_list(): file_path = '/net/u/dsa/Projects/Softfire/check-os/etc/images_list.json' image_names = [] with open(file_path...
35.5125
89
0.567758
import argparse import json import logging.config from keystoneauth1.exceptions import Unauthorized from sdk.softfire.os_utils import OSClient log = logging.getLogger(__name__) def image_list(): file_path = '/net/u/dsa/Projects/Softfire/check-os/etc/images_list.json' image_names = [] with open(file_path...
true
true
f77a9aa5b76e55593413298b7356ed476aa341b5
2,811
py
Python
daisy_world_exc_4.py
chrisgans/Daisy_World
29d76707101f8036300977508555619be442ae34
[ "MIT" ]
null
null
null
daisy_world_exc_4.py
chrisgans/Daisy_World
29d76707101f8036300977508555619be442ae34
[ "MIT" ]
1
2019-07-26T14:48:29.000Z
2019-07-26T14:48:29.000Z
daisy_world_exc_4.py
chrisgans/Daisy_World
29d76707101f8036300977508555619be442ae34
[ "MIT" ]
1
2019-07-26T14:16:00.000Z
2019-07-26T14:16:00.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- if __name__ == "__main__": print("In __main__") import numpy as np import matplotlib.pyplot as plt import model_functions as mf ### 4) luminosities = np.arange(0.5, 1.6, 0.002) # Stelar luminosities alphaw_out = np.ones(len(luminosities)) * n...
36.038462
84
0.575596
if __name__ == "__main__": print("In __main__") import numpy as np import matplotlib.pyplot as plt import model_functions as mf luminosities = np.arange(0.5, 1.6, 0.002) alphaw_out = np.ones(len(luminosities)) * np.nan alphab_out = np.ones(len(luminosities)) * np.nan temp_out = np...
true
true
f77a9c23827fd4a4565f3d5652a3e27461c3470e
119
py
Python
okta/models/app/AppLinks.py
xmercury-qb/okta-sdk-python
a668a963b13fc61177b36c5438c6ec5fa6f17c4e
[ "ECL-2.0", "Apache-2.0" ]
1
2020-09-09T12:59:19.000Z
2020-09-09T12:59:19.000Z
okta/models/app/AppLinks.py
xmercury-qb/okta-sdk-python
a668a963b13fc61177b36c5438c6ec5fa6f17c4e
[ "ECL-2.0", "Apache-2.0" ]
3
2018-10-09T22:14:33.000Z
2018-10-09T23:10:40.000Z
okta/models/app/AppLinks.py
xmercury-qb/okta-sdk-python
a668a963b13fc61177b36c5438c6ec5fa6f17c4e
[ "ECL-2.0", "Apache-2.0" ]
2
2018-11-08T19:32:46.000Z
2021-03-30T06:35:48.000Z
class AppLinks: types = { 'login': bool } def __init__(self): self.login = None # bool
11.9
33
0.495798
class AppLinks: types = { 'login': bool } def __init__(self): self.login = None
true
true
f77a9c3c9bb72db0830a1016f3fc871287721790
15,814
py
Python
python/ccxt/async_support/__init__.py
zsyh/ccxt
ac0d0ac2a20166b8b5dc0523ed2d1e4e7f505b80
[ "MIT" ]
null
null
null
python/ccxt/async_support/__init__.py
zsyh/ccxt
ac0d0ac2a20166b8b5dc0523ed2d1e4e7f505b80
[ "MIT" ]
null
null
null
python/ccxt/async_support/__init__.py
zsyh/ccxt
ac0d0ac2a20166b8b5dc0523ed2d1e4e7f505b80
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """CCXT: CryptoCurrency eXchange Trading Library (Async)""" # ----------------------------------------------------------------------------- __version__ = '1.41.4' # ----------------------------------------------------------------------------- from ccxt.async_support.base.exchange import Exc...
50.848875
86
0.557038
__version__ = '1.41.4' from ccxt.async_support.base.exchange import Exchange from ccxt.base.decimal_to_precision import decimal_to_precision from ccxt.base.decimal_to_precision import TRUNCATE from ccxt.base.decimal_to_precision import ROUND from ccxt.base.decimal_t...
true
true
f77a9c93528346a44831482b8f06c270230949e0
9,173
py
Python
src/poliastro/core/angles.py
TreshUp/poliastro
602eb3c39d315be6dc1edaa12d72ab0e361334f6
[ "MIT" ]
null
null
null
src/poliastro/core/angles.py
TreshUp/poliastro
602eb3c39d315be6dc1edaa12d72ab0e361334f6
[ "MIT" ]
null
null
null
src/poliastro/core/angles.py
TreshUp/poliastro
602eb3c39d315be6dc1edaa12d72ab0e361334f6
[ "MIT" ]
null
null
null
import numpy as np from numba import njit as jit @jit def _kepler_equation(E, M, ecc): return E_to_M(E, ecc) - M @jit def _kepler_equation_prime(E, M, ecc): return 1 - ecc * np.cos(E) @jit def _kepler_equation_hyper(F, M, ecc): return F_to_M(F, ecc) - M @jit def _kepler_equation_prime_hyper(F, M, ec...
19.352321
94
0.548566
import numpy as np from numba import njit as jit @jit def _kepler_equation(E, M, ecc): return E_to_M(E, ecc) - M @jit def _kepler_equation_prime(E, M, ecc): return 1 - ecc * np.cos(E) @jit def _kepler_equation_hyper(F, M, ecc): return F_to_M(F, ecc) - M @jit def _kepler_equation_prime_hyper(F, M, ec...
true
true
f77a9dc8740f155fbde135f29d71004a0e69644a
4,480
py
Python
config.py
jesusjoaquin/MIT-GIS-DataLab
3c309ddf8e8ee3d83100b76aa278723d4437f2ef
[ "MIT" ]
null
null
null
config.py
jesusjoaquin/MIT-GIS-DataLab
3c309ddf8e8ee3d83100b76aa278723d4437f2ef
[ "MIT" ]
null
null
null
config.py
jesusjoaquin/MIT-GIS-DataLab
3c309ddf8e8ee3d83100b76aa278723d4437f2ef
[ "MIT" ]
1
2021-03-02T22:18:49.000Z
2021-03-02T22:18:49.000Z
import os # Given a relative path, the full path is returned def get_full_path(rel_path): cur_dir = os.path.dirname(os.path.realpath(__file__)) return os.path.join(cur_dir, rel_path) # ============================================================ # Constants that actually need to be changed. # Be sure to...
35.275591
113
0.604688
import os def get_full_path(rel_path): cur_dir = os.path.dirname(os.path.realpath(__file__)) return os.path.join(cur_dir, rel_path) PHOTOS_DIR = 'E:/UserFiles/jesusg/testing/SpoonOnlyImages' PTS_SHP = 'E:\\UserFiles\\jesusg\\testing\\produce_products_test\\products\\D2M.gdb\\ImagePoints' DSM_FLIGHT = ...
true
true
f77a9e636329fc32474f6258e69b9b8ca706a2a3
427
py
Python
employee/migrations/0003_profile_img_profile.py
somkiet073/LeaveManagement
753c6497bb1094deb86809135b25e558d4912700
[ "MIT" ]
null
null
null
employee/migrations/0003_profile_img_profile.py
somkiet073/LeaveManagement
753c6497bb1094deb86809135b25e558d4912700
[ "MIT" ]
null
null
null
employee/migrations/0003_profile_img_profile.py
somkiet073/LeaveManagement
753c6497bb1094deb86809135b25e558d4912700
[ "MIT" ]
null
null
null
# Generated by Django 2.2.12 on 2020-06-05 15:52 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('employee', '0002_auto_20200605_2224'), ] operations = [ migrations.AddField( model_name='profile', name='img_profil...
22.473684
85
0.615925
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('employee', '0002_auto_20200605_2224'), ] operations = [ migrations.AddField( model_name='profile', name='img_profile', field=models.ImageField(blank=Tru...
true
true
f77a9ea0f3618a5481814e4c659d9a972f7a5c92
12,054
py
Python
toto/workerconnection.py
VNUELIVE/Toto
6940b4114fc6b680e0d40ae248b7d2599c954f81
[ "MIT" ]
null
null
null
toto/workerconnection.py
VNUELIVE/Toto
6940b4114fc6b680e0d40ae248b7d2599c954f81
[ "MIT" ]
null
null
null
toto/workerconnection.py
VNUELIVE/Toto
6940b4114fc6b680e0d40ae248b7d2599c954f81
[ "MIT" ]
null
null
null
import toto import zmq import cPickle as pickle import zlib import logging from threading import Thread from tornado.options import options from tornado.gen import Task from collections import deque from zmq.eventloop.ioloop import ZMQPoller, IOLoop, PeriodicCallback from zmq.eventloop.zmqstream import ZMQStream from t...
50.860759
348
0.717355
import toto import zmq import cPickle as pickle import zlib import logging from threading import Thread from tornado.options import options from tornado.gen import Task from collections import deque from zmq.eventloop.ioloop import ZMQPoller, IOLoop, PeriodicCallback from zmq.eventloop.zmqstream import ZMQStream from t...
false
true
f77aa01bd2a084ea18d9416039a618760b7d1aaa
1,992
py
Python
Services/NeuralNetwork/NeuralNetwork.py
shell-done/Spongo_IHM
3492c889b1d60cf50b4b2625b496fd6958309a8e
[ "MIT" ]
7
2021-04-24T20:28:08.000Z
2021-06-09T16:32:31.000Z
Services/NeuralNetwork/NeuralNetwork.py
shell-done/Spongo
3492c889b1d60cf50b4b2625b496fd6958309a8e
[ "MIT" ]
8
2021-04-08T08:33:29.000Z
2021-04-09T15:33:45.000Z
Services/NeuralNetwork/NeuralNetwork.py
shell-done/Spongo_IHM
3492c889b1d60cf50b4b2625b496fd6958309a8e
[ "MIT" ]
null
null
null
import cv2 import torch from Services.NeuralNetwork.tool.torch_utils import do_detect from Services.NeuralNetwork.tool.darknet2pytorch import Darknet class NeuralNetwork: @staticmethod def isCudaAvailable() -> bool: return torch.cuda.is_available() @staticmethod def getAvailableCa...
31.125
102
0.541165
import cv2 import torch from Services.NeuralNetwork.tool.torch_utils import do_detect from Services.NeuralNetwork.tool.darknet2pytorch import Darknet class NeuralNetwork: @staticmethod def isCudaAvailable() -> bool: return torch.cuda.is_available() @staticmethod def getAvailableCa...
true
true
f77aa02786eba1535f72bfa1cf4a751418d7defb
728
py
Python
src/setup.py
RePierre/lelantos
6f6f84f39f509f24deb9e9ff2215841168d4efcf
[ "MIT" ]
null
null
null
src/setup.py
RePierre/lelantos
6f6f84f39f509f24deb9e9ff2215841168d4efcf
[ "MIT" ]
null
null
null
src/setup.py
RePierre/lelantos
6f6f84f39f509f24deb9e9ff2215841168d4efcf
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages version = '0.1' install_requires = [ 'numpy', 'tensorflow', 'keras' ] dev_requires = [ 'elpy', 'jedi', 'rope', 'yapf' ] tests_requires = [ ] setup( name='lelantos', version=version, description="A deep learning attempt at splitting...
17.333333
77
0.625
from setuptools import setup, find_packages version = '0.1' install_requires = [ 'numpy', 'tensorflow', 'keras' ] dev_requires = [ 'elpy', 'jedi', 'rope', 'yapf' ] tests_requires = [ ] setup( name='lelantos', version=version, description="A deep learning attempt at splitting...
true
true
f77aa05004c82a0c1195cfa8178d989432bb2bfd
5,604
py
Python
odoo/addons/test_performance/tests/test_performance.py
jjiege/odoo
fd5b8ad387c1881f349d125cbd56433f4d49398f
[ "MIT" ]
null
null
null
odoo/addons/test_performance/tests/test_performance.py
jjiege/odoo
fd5b8ad387c1881f349d125cbd56433f4d49398f
[ "MIT" ]
null
null
null
odoo/addons/test_performance/tests/test_performance.py
jjiege/odoo
fd5b8ad387c1881f349d125cbd56433f4d49398f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import defaultdict import json from odoo.tests.common import TransactionCase, users, warmup from odoo.tools import pycompat class TestPerformance(TransactionCase): @users('__system__', 'demo') ...
38.648276
98
0.60546
from collections import defaultdict import json from odoo.tests.common import TransactionCase, users, warmup from odoo.tools import pycompat class TestPerformance(TransactionCase): @users('__system__', 'demo') @warmup def test_read_base(self): records = self.env['test_performance.base'].search(...
true
true
f77aa05e1ce8d55a900816d932f0f5be191969fd
3,050
py
Python
Validation/HGCalValidation/test/python/testHGCalWaferValidation_cfg.py
menglu21/cmssw
c3d6cb102c0aaddf652805743370c28044d53da6
[ "Apache-2.0" ]
null
null
null
Validation/HGCalValidation/test/python/testHGCalWaferValidation_cfg.py
menglu21/cmssw
c3d6cb102c0aaddf652805743370c28044d53da6
[ "Apache-2.0" ]
null
null
null
Validation/HGCalValidation/test/python/testHGCalWaferValidation_cfg.py
menglu21/cmssw
c3d6cb102c0aaddf652805743370c28044d53da6
[ "Apache-2.0" ]
null
null
null
############################################################################### # Way to use this: # cmsRun testHGCalWaferValidation_cfg.py geometry=D83 # # Options for geometry D77, D82, D83, D88, D92 # ############################################################################### import FWCore.ParameterSet.Confi...
42.361111
79
0.668525
import FWCore.ParameterSet.Config as cms import os, sys, imp, re import FWCore.ParameterSet.VarParsing as VarParsing options = VarParsing.VarParsing('standard') options.register('geometry', "D83", VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.v...
true
true
f77aa143b8779701f4af463a7b4f97c9e6b11bad
891
py
Python
{{ cookiecutter.name }}_project/{{ cookiecutter.name }}/core/behaviors.py
artinnok/django-big
c00281b705ac90706a8a5b70c3b6d9ba771e68b5
[ "MIT" ]
2
2016-10-17T09:03:36.000Z
2017-03-13T11:29:39.000Z
{{ cookiecutter.name }}_project/{{ cookiecutter.name }}/core/behaviors.py
artinnok/django-big
c00281b705ac90706a8a5b70c3b6d9ba771e68b5
[ "MIT" ]
11
2016-05-14T19:03:34.000Z
2016-10-01T10:38:40.000Z
{{ cookiecutter.name }}_project/{{ cookiecutter.name }}/core/behaviors.py
artinnok/django-big
c00281b705ac90706a8a5b70c3b6d9ba771e68b5
[ "MIT" ]
1
2017-03-13T07:03:09.000Z
2017-03-13T07:03:09.000Z
from django.db import models from imagekit.models import ProcessedImageField class Titleable(models.Model): title = models.CharField( verbose_name='Название', max_length=200 ) class Meta: abstract = True class Textable(models.Model): text = models.TextField( verbose_...
17.470588
47
0.62963
from django.db import models from imagekit.models import ProcessedImageField class Titleable(models.Model): title = models.CharField( verbose_name='Название', max_length=200 ) class Meta: abstract = True class Textable(models.Model): text = models.TextField( verbose_...
true
true
f77aa18e5baaa4b335ab3dba225dc31464b25a98
60,158
py
Python
readthedocs/projects/models.py
isabella232/readthedocs.org
3a9c1c3b142f4a2b703c877e83ebcd81dc62bd1e
[ "MIT" ]
null
null
null
readthedocs/projects/models.py
isabella232/readthedocs.org
3a9c1c3b142f4a2b703c877e83ebcd81dc62bd1e
[ "MIT" ]
1
2021-02-23T18:30:28.000Z
2021-04-09T23:08:10.000Z
readthedocs/projects/models.py
isabella232/readthedocs.org
3a9c1c3b142f4a2b703c877e83ebcd81dc62bd1e
[ "MIT" ]
null
null
null
"""Project models.""" import fnmatch import logging import os import re from shlex import quote from urllib.parse import urlparse from allauth.socialaccount.providers import registry as allauth_registry from django.conf import settings from django.conf.urls import include from django.contrib.auth.models import User f...
33.181467
156
0.605289
import fnmatch import logging import os import re from shlex import quote from urllib.parse import urlparse from allauth.socialaccount.providers import registry as allauth_registry from django.conf import settings from django.conf.urls import include from django.contrib.auth.models import User from django.core.files....
true
true
f77aa21d65dd9620de37b1083529e9baf6a0b5f4
987
py
Python
rosidl_typesupport_microxrcedds_c/rosidl_typesupport_microxrcedds_c/__init__.py
gavanderhoorn/rosidl_typesupport_microxrcedds
d41a3103458636d1e9df88508077d657d01d5ccb
[ "Apache-2.0" ]
3
2020-11-30T08:51:44.000Z
2021-07-18T18:15:45.000Z
rosidl_typesupport_microxrcedds_c/rosidl_typesupport_microxrcedds_c/__init__.py
gavanderhoorn/rosidl_typesupport_microxrcedds
d41a3103458636d1e9df88508077d657d01d5ccb
[ "Apache-2.0" ]
17
2019-10-24T12:40:03.000Z
2022-01-31T13:15:00.000Z
rosidl_typesupport_microxrcedds_c/rosidl_typesupport_microxrcedds_c/__init__.py
gavanderhoorn/rosidl_typesupport_microxrcedds
d41a3103458636d1e9df88508077d657d01d5ccb
[ "Apache-2.0" ]
3
2021-02-09T04:30:56.000Z
2021-08-12T16:16:24.000Z
# Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). # # 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...
41.125
104
0.774063
from rosidl_cmake import generate_files def generate_typesupport_microxrcedds_c(generator_arguments_file): mapping = { 'idl__rosidl_typesupport_microxrcedds_c.h.em': 'detail/%s__rosidl_typesupport_microxrcedds_c.h', 'idl__type_support_c.c.em': 'detail/microxrcedds/%s__type_support_c.c', } ...
true
true
f77aa22ba4e8a7e6b3446b8d2e22da11ac601732
18,970
py
Python
cms/tests/management.py
jrief/django-cms
e32eca878be0f0ead9a4fb6713256f4359b3e451
[ "BSD-3-Clause" ]
1
2015-06-11T19:25:26.000Z
2015-06-11T19:25:26.000Z
cms/tests/management.py
damianmoore/django-cms
2d3e10a01e792ec7da5c1418811c1be5ac84e5e2
[ "BSD-3-Clause" ]
5
2021-03-19T15:39:27.000Z
2021-09-08T02:47:21.000Z
cms/tests/management.py
Acidburn0zzz/django-cms
5a105a1c75eeb4c8a4c1c34301d93855e6724407
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import with_statement import uuid from django.contrib.sites.models import Site from django.core.management import CommandError from cms.models import Page, StaticPlaceholder from django.core import management from cms.test_utils.fixtures.navextenders import NavextendersFixture f...
42.438479
140
0.633105
from __future__ import with_statement import uuid from django.contrib.sites.models import Site from django.core.management import CommandError from cms.models import Page, StaticPlaceholder from django.core import management from cms.test_utils.fixtures.navextenders import NavextendersFixture from cms.test_utils.testc...
true
true
f77aa4076cd3de22797056265439280ce6b2e2d7
3,375
py
Python
catstrace/events/disk_events.py
dsrhaslab/catstrace
03c7130f8181b05880645b9d8a8de573b3c64380
[ "MIT" ]
null
null
null
catstrace/events/disk_events.py
dsrhaslab/catstrace
03c7130f8181b05880645b9d8a8de573b3c64380
[ "MIT" ]
null
null
null
catstrace/events/disk_events.py
dsrhaslab/catstrace
03c7130f8181b05880645b9d8a8de573b3c64380
[ "MIT" ]
null
null
null
from catstrace.events.base_event import Event, EventType import simplejson as json import codecs class DiskEvent(Event): def __init__(self, timestamp, host, pid, filename, fd): self._fd = fd if (fd == 0): self._filename = "STDIN" elif (fd == 1): self._filename = "STDOUT" elif (fd == 2): self._filename = "STD...
27.892562
103
0.674667
from catstrace.events.base_event import Event, EventType import simplejson as json import codecs class DiskEvent(Event): def __init__(self, timestamp, host, pid, filename, fd): self._fd = fd if (fd == 0): self._filename = "STDIN" elif (fd == 1): self._filename = "STDOUT" elif (fd == 2): self._filename = "STD...
true
true
f77aa60ead7dc8a4f8132037ac3468ea45e0218f
2,079
py
Python
scripts/nick/import_pyEPR.py
sjezouin/pyEPR
6a53b9ea83c26259ba776d222ba21e1466ec3909
[ "BSD-3-Clause" ]
3
2019-12-25T10:13:33.000Z
2020-01-08T15:56:08.000Z
scripts/nick/import_pyEPR.py
asafdi/pyEPR
253c14361dc25bc21e3c15ce47a26360ce98b54b
[ "BSD-3-Clause" ]
null
null
null
scripts/nick/import_pyEPR.py
asafdi/pyEPR
253c14361dc25bc21e3c15ce47a26360ce98b54b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Aug 22 11:21:01 2017 @author: Zlatko """ from pyEPR import * if 0: # Specify the HFSS project to be analyzed project_info = Project_Info(r"X:\Simulation\\hfss\\KC\\") project_info.project_name = '2013-12-03_9GHzCavity' # Name of the project file (string). "Non...
45.195652
143
0.692641
from pyEPR import * if 0: project_info = Project_Info(r"X:\Simulation\\hfss\\KC\\") project_info.project_name = '2013-12-03_9GHzCavity' project_info.design_name = '9GHz_EM_center_SNAIL' project_info.setup_name = None project_info.junctions['snail'] = {'rect':'qubit', 'line'...
true
true
f77aa734a83339589110bd09bae70e1ed5511962
1,606
py
Python
CIM15/IEC61968/Assets/ComMedia.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
58
2015-04-22T10:41:03.000Z
2022-03-29T16:04:34.000Z
CIM15/IEC61968/Assets/ComMedia.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
12
2015-08-26T03:57:23.000Z
2020-12-11T20:14:42.000Z
CIM15/IEC61968/Assets/ComMedia.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
35
2015-01-10T12:21:03.000Z
2020-09-09T08:18:16.000Z
# Copyright (C) 2010-2011 Richard Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish...
40.15
155
0.731631
from CIM15.IEC61968.Assets.Asset import Asset class ComMedia(Asset): def __init__(self, *args, **kw_args): super(ComMedia, self).__init__(*args, **kw_args) _attrs = [] _attr_types = {} _defaults = {} _enums = {} _refs = [] _many_refs = []
true
true
f77aa82c3799b1511182a2ea8beb5f6556a3a82e
1,175
py
Python
nomadgram/notifications/migrations/0001_initial.py
KyeMyoungU/nomadgram
a684860c06c82ea41ea9f6b4b0b9350c4f4ae838
[ "MIT" ]
null
null
null
nomadgram/notifications/migrations/0001_initial.py
KyeMyoungU/nomadgram
a684860c06c82ea41ea9f6b4b0b9350c4f4ae838
[ "MIT" ]
10
2020-06-05T18:23:14.000Z
2022-03-03T22:33:37.000Z
nomadgram/notifications/migrations/0001_initial.py
KyeMyoungU/nomadgram
a684860c06c82ea41ea9f6b4b0b9350c4f4ae838
[ "MIT" ]
null
null
null
# Generated by Django 2.0.5 on 2018-06-14 02:39 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('imag...
40.517241
156
0.650213
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('images', '0005_image_tags'), ] operations =...
true
true
f77aabad92f1fe8cda98682b2927a953fb4cc3ec
10,476
py
Python
fairseq/fairseq/models/simple_lstm.py
zixiliuUSC/deep_grammar_error_corrector
d18ebe1fa3b0a50fb96835d1f47c6fe1e73461ad
[ "MIT" ]
2
2020-11-13T22:54:49.000Z
2021-11-15T14:44:47.000Z
fairseq/fairseq/models/simple_lstm.py
zixiliuUSC/deep_grammar_error_corrector
d18ebe1fa3b0a50fb96835d1f47c6fe1e73461ad
[ "MIT" ]
null
null
null
fairseq/fairseq/models/simple_lstm.py
zixiliuUSC/deep_grammar_error_corrector
d18ebe1fa3b0a50fb96835d1f47c6fe1e73461ad
[ "MIT" ]
1
2021-06-06T17:00:23.000Z
2021-06-06T17:00:23.000Z
import torch.nn as nn from fairseq import utils from fairseq.models import FairseqEncoder class SimpleLSTMEncoder(FairseqEncoder): def __init__( self, args, dictionary, embed_dim=128, hidden_dim=128, dropout=0.1, ): super().__init__(dictionary) self.args = args # Our encoder w...
38.944238
80
0.641657
import torch.nn as nn from fairseq import utils from fairseq.models import FairseqEncoder class SimpleLSTMEncoder(FairseqEncoder): def __init__( self, args, dictionary, embed_dim=128, hidden_dim=128, dropout=0.1, ): super().__init__(dictionary) self.args = args self.em...
true
true
f77aabbbb9d860fd7e14c88c12e6a5d3c5df3201
664
py
Python
test/test_utils_data_iterator.py
t-k-/tinynn
969eb96020406885d081a961084d9328e2939622
[ "MIT" ]
27
2019-09-16T01:54:19.000Z
2022-03-14T04:50:26.000Z
test/test_utils_data_iterator.py
t-k-/tinynn
969eb96020406885d081a961084d9328e2939622
[ "MIT" ]
null
null
null
test/test_utils_data_iterator.py
t-k-/tinynn
969eb96020406885d081a961084d9328e2939622
[ "MIT" ]
6
2019-09-16T01:54:33.000Z
2022-03-07T12:00:55.000Z
"""test unit for utils/data_iterator.py""" import runtime_path # isort:skip import numpy as np from utils.data_iterator import BatchIterator def test_batch_iterator(): batch_size = 10 n_data = 10 * batch_size # 10 batches iterator = BatchIterator(batch_size=batch_size) x_dim, y_dim = 10, 5 fa...
26.56
60
0.679217
import runtime_path import numpy as np from utils.data_iterator import BatchIterator def test_batch_iterator(): batch_size = 10 n_data = 10 * batch_size iterator = BatchIterator(batch_size=batch_size) x_dim, y_dim = 10, 5 fake_x = np.random.randint(0, 100, size=(n_data, x_dim)) fake_y = n...
true
true
f77aacbd64b5b77682d1f53369118268d52e135a
308
py
Python
wolframclient/serializers/encoders/fractions.py
Theorvolt/PyMathProblemGenerator
6965b1b2d377320b345ce7c9f20cd3776b979a2c
[ "MIT" ]
1
2020-02-25T08:20:42.000Z
2020-02-25T08:20:42.000Z
wolframclient/serializers/encoders/fractions.py
Theorvolt/PyMathProblemGenerator
6965b1b2d377320b345ce7c9f20cd3776b979a2c
[ "MIT" ]
null
null
null
wolframclient/serializers/encoders/fractions.py
Theorvolt/PyMathProblemGenerator
6965b1b2d377320b345ce7c9f20cd3776b979a2c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import fractions from wolframclient.utils.dispatch import Dispatch encoder = Dispatch() @encoder.dispatch(fractions.Fraction) def encode_faction(serializer, o): return serializer.serialize_fraction(o)
20.533333
72
0.792208
from __future__ import absolute_import, print_function, unicode_literals import fractions from wolframclient.utils.dispatch import Dispatch encoder = Dispatch() @encoder.dispatch(fractions.Fraction) def encode_faction(serializer, o): return serializer.serialize_fraction(o)
true
true
f77aaccbb4dc3553d88c4483f92deadea1ae8848
4,588
py
Python
app/app/utils/auth.py
czr1803/kryptos
2e8e20b81c7486283ab39df053146048f5496474
[ "MIT" ]
45
2019-01-27T13:47:51.000Z
2022-03-13T00:25:21.000Z
app/app/utils/auth.py
czr1803/kryptos
2e8e20b81c7486283ab39df053146048f5496474
[ "MIT" ]
64
2019-01-24T06:43:13.000Z
2020-03-09T17:14:52.000Z
app/app/utils/auth.py
produvia/kryptos
2e8e20b81c7486283ab39df053146048f5496474
[ "MIT" ]
4
2019-11-21T10:49:17.000Z
2021-09-30T03:33:00.000Z
import os import json from typing import Dict, Tuple from flask import current_app from google.cloud import storage, kms_v1 from google.cloud.kms_v1 import enums from google.cloud.kms_v1.types import CryptoKey from google.api_core.exceptions import NotFound, FailedPrecondition key_client = kms_v1.KeyManagementServic...
37.606557
101
0.740628
import os import json from typing import Dict, Tuple from flask import current_app from google.cloud import storage, kms_v1 from google.cloud.kms_v1 import enums from google.cloud.kms_v1.types import CryptoKey from google.api_core.exceptions import NotFound, FailedPrecondition key_client = kms_v1.KeyManagementServic...
true
true
f77aad0dc2e805001342a789f8caa3d6b86084ef
31,750
py
Python
Release/validationDataProcessing.py
AleksanderLidtke/ConjunctionDetection
c21596737757d87ea5bd2353c4b128c0795632d0
[ "MIT" ]
1
2019-03-20T21:38:30.000Z
2019-03-20T21:38:30.000Z
Release/validationDataProcessing.py
AleksanderLidtke/ConjunctionDetection
c21596737757d87ea5bd2353c4b128c0795632d0
[ "MIT" ]
null
null
null
Release/validationDataProcessing.py
AleksanderLidtke/ConjunctionDetection
c21596737757d87ea5bd2353c4b128c0795632d0
[ "MIT" ]
1
2021-12-09T01:09:53.000Z
2021-12-09T01:09:53.000Z
# -*- coding: utf-8 -*- """ Parse and analyse orbital conjunctions' data. Created on Wed Apr 23 15:12:47 2014 TO be used to analyse one on all data for Envisat and compare those to STK CAT results. @author: Aleksander Lidtke @version 1.0.0 @since 22/05/2014 15:42:00 CHANGELOG: """ import datetime, pylab, scipy.integ...
55.410122
256
0.648661
import datetime, pylab, scipy.integrate, matplotlib.pyplot, matplotlib, numpy, csv, math, utilities, sys def computeMaximumCollisionProbabilityRelative(relativePosition, collisionRadius): covarianceScalingFactor = numpy.linalg.norm(relativePosition)/math.sqrt(2) projectedCovarianceMatrixInPlane = numpy.ar...
true
true
f77aadb1a8300f3980338c3873142149680e9b5d
3,510
py
Python
lib/extras/cocoa_definitions.py
cduhard/vimconfig
caf4eb276aafb92ebd6bec7f36f4fc04fba70605
[ "MIT" ]
1
2016-05-09T09:06:18.000Z
2016-05-09T09:06:18.000Z
lib/extras/cocoa_definitions.py
cduhard/vimconfig
caf4eb276aafb92ebd6bec7f36f4fc04fba70605
[ "MIT" ]
null
null
null
lib/extras/cocoa_definitions.py
cduhard/vimconfig
caf4eb276aafb92ebd6bec7f36f4fc04fba70605
[ "MIT" ]
null
null
null
#!/usr/bin/python '''Creates a folder containing text files of Cocoa keywords.''' import os, commands, re from sys import argv def find(searchpath, ext): '''Mimics the "find searchpath -name *.ext" unix command.''' results = [] for path, dirs, files in os.walk(searchpath): for filename in files: ...
37.741935
80
0.601994
'''Creates a folder containing text files of Cocoa keywords.''' import os, commands, re from sys import argv def find(searchpath, ext): '''Mimics the "find searchpath -name *.ext" unix command.''' results = [] for path, dirs, files in os.walk(searchpath): for filename in files: if filen...
false
true
f77aade25621a146825e45b5f997f295f24b0997
4,865
py
Python
code/solver/BaseSolver.py
Steve-Tod/DeformSyncNet
c4e6628ae4fd80e6e6aa702f4cd5885368047b4f
[ "MIT" ]
19
2020-09-09T10:38:25.000Z
2021-09-08T03:24:02.000Z
code/solver/BaseSolver.py
Steve-Tod/DeformSyncNet
c4e6628ae4fd80e6e6aa702f4cd5885368047b4f
[ "MIT" ]
null
null
null
code/solver/BaseSolver.py
Steve-Tod/DeformSyncNet
c4e6628ae4fd80e6e6aa702f4cd5885368047b4f
[ "MIT" ]
4
2020-09-16T10:59:50.000Z
2022-01-07T00:10:18.000Z
import logging import os from collections import OrderedDict import torch import torch.nn as nn from torch.nn.parallel import DistributedDataParallel logger = logging.getLogger('base') class BaseSolver: def __init__(self, opt): self.opt = opt if opt['gpu_id'] is not None and torch.cuda.is_availabl...
37.137405
100
0.607194
import logging import os from collections import OrderedDict import torch import torch.nn as nn from torch.nn.parallel import DistributedDataParallel logger = logging.getLogger('base') class BaseSolver: def __init__(self, opt): self.opt = opt if opt['gpu_id'] is not None and torch.cuda.is_availabl...
true
true
f77aae20f481fae3b9fcdca82f13638129453387
5,104
py
Python
kubernetes/client/models/v1_projected_volume_source.py
carloscastrojumo/python
f461dd42d48650a4ae1b41d630875cad9fcb68ad
[ "Apache-2.0" ]
2
2021-03-09T12:42:05.000Z
2021-03-09T13:27:50.000Z
kubernetes/client/models/v1_projected_volume_source.py
carloscastrojumo/python
f461dd42d48650a4ae1b41d630875cad9fcb68ad
[ "Apache-2.0" ]
7
2021-04-13T03:04:42.000Z
2022-03-02T03:10:18.000Z
kubernetes/client/models/v1_projected_volume_source.py
carloscastrojumo/python
f461dd42d48650a4ae1b41d630875cad9fcb68ad
[ "Apache-2.0" ]
1
2021-06-13T09:21:37.000Z
2021-06-13T09:21:37.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.17 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
33.578947
294
0.624608
import pprint import re import six from kubernetes.client.configuration import Configuration class V1ProjectedVolumeSource(object): openapi_types = { 'default_mode': 'int', 'sources': 'list[V1VolumeProjection]' } attribute_map = { 'default_mode': 'defaultMode', 'sou...
true
true
f77aaeae2c5fb65e0a63d474c4928371331b9e22
6,895
py
Python
src/lifelong_dnn.py
jdey4/progressive-learning
410b3525ab63e1f7c32e9838460b2c9af7b9d256
[ "Apache-2.0" ]
1
2022-01-03T12:36:28.000Z
2022-01-03T12:36:28.000Z
src/lifelong_dnn.py
jdey4/progressive-learning
410b3525ab63e1f7c32e9838460b2c9af7b9d256
[ "Apache-2.0" ]
null
null
null
src/lifelong_dnn.py
jdey4/progressive-learning
410b3525ab63e1f7c32e9838460b2c9af7b9d256
[ "Apache-2.0" ]
null
null
null
''' Primary Author: Will LeVine Email: levinewill@icloud.com ''' from sklearn.base import clone import numpy as np from joblib import Parallel, delayed class LifeLongDNN(): def __init__(self, acorn = None, verbose = False, model = "uf", parallel = True, n_jobs = None): self.X_across_tasks = [] ...
44.483871
160
0.60029
from sklearn.base import clone import numpy as np from joblib import Parallel, delayed class LifeLongDNN(): def __init__(self, acorn = None, verbose = False, model = "uf", parallel = True, n_jobs = None): self.X_across_tasks = [] self.y_across_tasks = [] self.transformers_acros...
true
true
f77aaf0f7a77e5756b106f5189a3eeaeba9b465f
797
py
Python
cyclonedx/BomValidator.py
emnetag/cyclonedx-python
51a17274d913cc08c1b55014dda6b7151436d321
[ "Apache-2.0" ]
5
2020-07-29T01:36:54.000Z
2022-03-31T02:26:18.000Z
cyclonedx/BomValidator.py
emnetag/cyclonedx-python
51a17274d913cc08c1b55014dda6b7151436d321
[ "Apache-2.0" ]
null
null
null
cyclonedx/BomValidator.py
emnetag/cyclonedx-python
51a17274d913cc08c1b55014dda6b7151436d321
[ "Apache-2.0" ]
1
2021-06-16T08:50:56.000Z
2021-06-16T08:50:56.000Z
# This file is part of CycloneDX Python module. # # 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 agr...
34.652174
74
0.759097
import xmlschema bom_schema = xmlschema.XMLSchema("http://cyclonedx.org/schema/bom/1.0") def is_valid(bom): return bom_schema.is_valid(bom)
true
true
f77aaf187bc6130c003f710b48218ca1a74aa527
55,241
py
Python
lib/third_party/google/bigtable/v2/data_pb2.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
null
null
null
lib/third_party/google/bigtable/v2/data_pb2.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
null
null
null
lib/third_party/google/bigtable/v2/data_pb2.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
1
2020-07-24T20:13:29.000Z
2020-07-24T20:13:29.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/bigtable/v2/data.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import refl...
43.462628
4,974
0.756304
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google.p...
true
true
f77ab042bbfeac41481c283c6aa770841ee264c1
2,663
py
Python
synapse_pay_rest/api/subnets.py
EquityZen/SynapseFI-Python
caf069d63f0a7bcdbc8b9180648638ab0bc83ef7
[ "MIT", "Unlicense" ]
null
null
null
synapse_pay_rest/api/subnets.py
EquityZen/SynapseFI-Python
caf069d63f0a7bcdbc8b9180648638ab0bc83ef7
[ "MIT", "Unlicense" ]
null
null
null
synapse_pay_rest/api/subnets.py
EquityZen/SynapseFI-Python
caf069d63f0a7bcdbc8b9180648638ab0bc83ef7
[ "MIT", "Unlicense" ]
null
null
null
from synapse_pay_rest.http_client import HttpClient class Subnets(): """Abstraction of the /subnets endpoint. Used to make subnets-related calls to the API. https://docs.synapsepay.com/docs/subnets """ def __init__(self, client): self.client = client def create_subnet_path(self, use...
34.584416
76
0.623733
from synapse_pay_rest.http_client import HttpClient class Subnets(): def __init__(self, client): self.client = client def create_subnet_path(self, user_id, node_id, subnet_id=None): path = '/users/{0}/nodes/{1}/subnets'.format(user_id, node_id) if subnet_id: return path +...
true
true
f77ab0bb6ed7b5cf315f03b36c36ec165127a312
12,301
py
Python
plugins/trustedcoin/qt.py
aghamir/electrum
586aee45eb36bd797333cf23440ed6a8e2bc8ec4
[ "MIT" ]
null
null
null
plugins/trustedcoin/qt.py
aghamir/electrum
586aee45eb36bd797333cf23440ed6a8e2bc8ec4
[ "MIT" ]
2
2020-04-12T02:45:18.000Z
2020-04-12T02:46:01.000Z
plugins/trustedcoin/qt.py
aghamir/electrum
586aee45eb36bd797333cf23440ed6a8e2bc8ec4
[ "MIT" ]
3
2018-06-22T20:24:10.000Z
2018-07-27T15:36:07.000Z
#!/usr/bin/env python # # Electrum - Lightweight Bitcoin Client # Copyright (C) 2015 Thomas Voegtlin # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without...
39.175159
236
0.630599
from functools import partial import threading from threading import Thread import re from decimal import Decimal from PyQt5.QtGui import * from PyQt5.QtCore import * from electrum_gui.qt.util import * from electrum_gui.qt.qrcodewidget import QRCodeWidget from electrum_gui.qt.amountedit import AmountEdit from electr...
true
true
f77ab0e354e516e8a294e85fa95607c9cdbb387f
2,215
py
Python
src/sentry/api/endpoints/user_index.py
apragacz/sf-sentry
2fdd6c1195c29a1d401d1cd538c22ea68556699a
[ "BSD-3-Clause" ]
1
2018-03-05T15:40:12.000Z
2018-03-05T15:40:12.000Z
src/sentry/api/endpoints/user_index.py
pkaminski/sentry
27e948283e27d93ca5192ca7b580830e092c25c7
[ "BSD-3-Clause" ]
5
2020-07-17T11:20:41.000Z
2021-05-09T12:16:53.000Z
src/sentry/api/endpoints/user_index.py
zaasmi/codeerrorhelp
1ab8d3e314386b9b2d58dad9df45355bf6014ac9
[ "BSD-3-Clause" ]
2
2021-01-26T09:53:39.000Z
2022-03-22T09:01:47.000Z
from __future__ import absolute_import import six from django.db.models import Q from sentry.api.base import Endpoint from sentry.api.paginator import DateTimePaginator from sentry.api.permissions import SuperuserPermission from sentry.api.serializers import serialize from sentry.db.models.query import in_iexact fro...
34.076923
85
0.560722
from __future__ import absolute_import import six from django.db.models import Q from sentry.api.base import Endpoint from sentry.api.paginator import DateTimePaginator from sentry.api.permissions import SuperuserPermission from sentry.api.serializers import serialize from sentry.db.models.query import in_iexact fro...
true
true
f77ab22e3e88ddf0936666a8bbadbaa8c12a2d79
3,069
py
Python
twerk/gui.py
jacebrowning/twerk
228dc8c2247b044fcf420819eef79d75b7403768
[ "MIT" ]
null
null
null
twerk/gui.py
jacebrowning/twerk
228dc8c2247b044fcf420819eef79d75b7403768
[ "MIT" ]
5
2019-10-15T23:17:37.000Z
2019-10-16T03:48:23.000Z
twerk/gui.py
jacebrowning/twerk
228dc8c2247b044fcf420819eef79d75b7403768
[ "MIT" ]
null
null
null
"""A sample GUI.""" from tkinter import * from tkinter.ttk import * # type: ignore import log class Application: """A sample class.""" def __init__(self): log.info("Starting the application...") # Configure the root window self.root = Tk() self.root.title("Feet to Meters")...
27.401786
76
0.55523
from tkinter import * from tkinter.ttk import * import log class Application: def __init__(self): log.info("Starting the application...") self.root = Tk() self.root.title("Feet to Meters") self.root.minsize(400, 150) self.feet = StringVar() sel...
true
true
f77ab2ee383e333d7b36d43e5a45f5e32d175754
74,410
py
Python
timm/models/efficientnet.py
mk-michal/pytorch-image-models
9c77a1dfbff5ddc229d9ef6578ab19409ba7ca93
[ "Apache-2.0" ]
1
2021-09-30T07:52:42.000Z
2021-09-30T07:52:42.000Z
timm/models/efficientnet.py
mk-michal/pytorch-image-models
9c77a1dfbff5ddc229d9ef6578ab19409ba7ca93
[ "Apache-2.0" ]
null
null
null
timm/models/efficientnet.py
mk-michal/pytorch-image-models
9c77a1dfbff5ddc229d9ef6578ab19409ba7ca93
[ "Apache-2.0" ]
null
null
null
""" PyTorch EfficientNet Family An implementation of EfficienNet that covers variety of related models with efficient architectures: * EfficientNet (B0-B8, L2 + Tensorflow pretrained AutoAug/RandAug/AdvProp/NoisyStudent weight ports) - EfficientNet: Rethinking Model Scaling for CNNs - https://arxiv.org/abs/1905.119...
41.384872
139
0.698253
import torch import torch.nn as nn import torch.nn.functional as F from typing import List from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD, IMAGENET_INCEPTION_MEAN, IMAGENET_INCEPTION_STD from .efficientnet_blocks import round_channels, resolve_bn_args, resolve_act_layer, BN_EPS_TF_DEFAULT from .eff...
true
true
f77ab381d217406acd41cea17474abfd0c9c228a
15,798
py
Python
samples/openapi3/client/petstore/python/petstore_api/model/user.py
jackma46/openapi-generator
eeb00e27d13fb0c578c1c4159c0c7bddfcb21082
[ "Apache-2.0" ]
11,868
2018-05-12T02:58:07.000Z
2022-03-31T21:19:39.000Z
samples/openapi3/client/petstore/python/petstore_api/model/user.py
jackma46/openapi-generator
eeb00e27d13fb0c578c1c4159c0c7bddfcb21082
[ "Apache-2.0" ]
9,672
2018-05-12T14:25:43.000Z
2022-03-31T23:59:30.000Z
samples/openapi3/client/petstore/python/petstore_api/model/user.py
jackma46/openapi-generator
eeb00e27d13fb0c578c1c4159c0c7bddfcb21082
[ "Apache-2.0" ]
4,776
2018-05-12T12:06:08.000Z
2022-03-31T19:52:51.000Z
""" OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import re # noq...
52.66
370
0.593113
import re import sys from petstore_api.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) from ..m...
true
true
f77ab405e9fc282aad95d2ff116bc223f5656e59
1,414
py
Python
get_blocks.py
davidgonchar/btcbflminer
332af9943f61ce21b037a21acde13302da8c6297
[ "Apache-2.0" ]
null
null
null
get_blocks.py
davidgonchar/btcbflminer
332af9943f61ce21b037a21acde13302da8c6297
[ "Apache-2.0" ]
null
null
null
get_blocks.py
davidgonchar/btcbflminer
332af9943f61ce21b037a21acde13302da8c6297
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import os import glob from time import sleep import blocktrail while True: try: client = blocktrail.APIClient(api_key="731ac7a92afe05e7640b3e89d69ecce514d3ea1d", api_secret="cb816f06d9722244f7489deb71cc65c43b97bccd", network="BTC", testnet=False) # address =...
30.73913
174
0.545969
from __future__ import print_function import os import glob from time import sleep import blocktrail while True: try: client = blocktrail.APIClient(api_key="731ac7a92afe05e7640b3e89d69ecce514d3ea1d", api_secret="cb816f06d9722244f7489deb71cc65c43b97bccd", network="BTC", testnet=False) tr...
true
true
f77ab4e542ebe98f9be92bd847c47ed470b29478
7,714
py
Python
geminidr/doc/tutorials/GMOSImg-DRTutorial/conf.py
astrochun/DRAGONS
041cdeeaf3eca9751085f6e01222d48c8e63cd3c
[ "BSD-3-Clause" ]
1
2020-06-03T15:13:18.000Z
2020-06-03T15:13:18.000Z
geminidr/doc/tutorials/GMOSImg-DRTutorial/conf.py
b1quint/DRAGONS
0f5814caaa791bda47edf00407722247095f8427
[ "BSD-3-Clause" ]
null
null
null
geminidr/doc/tutorials/GMOSImg-DRTutorial/conf.py
b1quint/DRAGONS
0f5814caaa791bda47edf00407722247095f8427
[ "BSD-3-Clause" ]
null
null
null
# # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or ...
32.141667
111
0.657895
import os import sys on_rtd = os.environ.get('READTHEDOCS') == 'True' relative_path = './../../../../' dragons_path = os.path.normpath(os.path.join(os.getcwd(), relative_path)) sys.path.append(dragons_path) import astrodata print('\n Printing current working directory for debugging:') print((' Current working di...
true
true
f77ab502de64c0c657237714599704e037308fb5
12,074
py
Python
yandex/cloud/mdb/redis/v1/maintenance_pb2.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
36
2018-12-23T13:51:50.000Z
2022-03-25T07:48:24.000Z
yandex/cloud/mdb/redis/v1/maintenance_pb2.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
15
2019-02-28T04:55:09.000Z
2022-03-06T23:17:24.000Z
yandex/cloud/mdb/redis/v1/maintenance_pb2.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
18
2019-02-23T07:10:57.000Z
2022-03-28T14:41:08.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: yandex/cloud/mdb/redis/v1/maintenance.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _...
42.514085
1,237
0.779361
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from google.protobuf import timestamp_pb2 as google_dot_prot...
true
true
f77ab506d70fe636499dcc421a30eb3f5b1b3493
109,576
py
Python
netskope_connector.py
crestdatasystems/netskope
89839a28604e0db0e8976900f6422f93312f7e9c
[ "Apache-2.0" ]
null
null
null
netskope_connector.py
crestdatasystems/netskope
89839a28604e0db0e8976900f6422f93312f7e9c
[ "Apache-2.0" ]
null
null
null
netskope_connector.py
crestdatasystems/netskope
89839a28604e0db0e8976900f6422f93312f7e9c
[ "Apache-2.0" ]
null
null
null
# File: netskope_connector.py # # Copyright (c) 2018-2022 Splunk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
50.310376
164
0.454652
import hashlib import json import os import sys import time import uuid from datetime import datetime import phantom.app as phantom import phantom.rules as phantom_rules import requests from bs4 import BeautifulSoup, UnicodeDammit from phantom.action_result import ActionResult from phantom.base_connector import BaseCo...
true
true
f77ab5aebd97e6ffcb6aa27b833ce0457650eca9
1,437
py
Python
tasks/application.py
webtweakers/deploy
59c1c95ca3e0efb6c228f6ad35937a29e28aa6ae
[ "MIT" ]
4
2021-07-01T15:39:09.000Z
2022-03-29T21:26:36.000Z
tasks/application.py
webtweakers/deploy
59c1c95ca3e0efb6c228f6ad35937a29e28aa6ae
[ "MIT" ]
null
null
null
tasks/application.py
webtweakers/deploy
59c1c95ca3e0efb6c228f6ad35937a29e28aa6ae
[ "MIT" ]
null
null
null
from ._util import get_app_id, create_app, get_app_info from ._constants import * def get_id(c): """ Find app-id by project name. Add id to config. """ app_name = c.config.project.name app_id = get_app_id(c, app_name) if not isinstance(app_id, str): return app_id c.config.data.app...
31.23913
103
0.662491
from ._util import get_app_id, create_app, get_app_info from ._constants import * def get_id(c): app_name = c.config.project.name app_id = get_app_id(c, app_name) if not isinstance(app_id, str): return app_id c.config.data.app_id = app_id print(f'{GREEN}Found app-id: {c.config.data.app_id...
true
true
f77ab60c4bab0bd92b8211bd260dae9f80eea63a
6,528
py
Python
proyectos/3/CardenasJorge-GarridoSamuel/jsmap.py
josecarlosah25/sistop-2020-2
954c3e5c177b0da77385accc3ad0987b8a7b5d4f
[ "CC-BY-4.0" ]
1
2020-02-21T05:36:20.000Z
2020-02-21T05:36:20.000Z
proyectos/3/CardenasJorge-GarridoSamuel/jsmap.py
josecarlosah25/sistop-2020-2
954c3e5c177b0da77385accc3ad0987b8a7b5d4f
[ "CC-BY-4.0" ]
null
null
null
proyectos/3/CardenasJorge-GarridoSamuel/jsmap.py
josecarlosah25/sistop-2020-2
954c3e5c177b0da77385accc3ad0987b8a7b5d4f
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/python3 import re import sys import os # Función que genera el MAP de un proceso: def map(pid): try: # Se abre el archivo /proc/pid/maps para obtener la informacion del proceso with open('/proc/' + pid + '/maps' , 'r') as file: buffer = [] # Arreglo donde se almacenara cada ...
43.231788
108
0.525582
import re import sys import os def map(pid): try: with open('/proc/' + pid + '/maps' , 'r') as file: buffer = [] with open('/proc/' + pid + '/cmdline' , 'r') as f_name: name = f_name.readline() if(not name): ex...
true
true
f77ab617b82aad8b0300e1682a02d86fdb93acaf
479
py
Python
app/apis/namespaces.py
alexanderzimmerman/smart-vp-server
3aa57b5fa32e90a8406684d0d0a2860e224d7916
[ "Apache-2.0" ]
null
null
null
app/apis/namespaces.py
alexanderzimmerman/smart-vp-server
3aa57b5fa32e90a8406684d0d0a2860e224d7916
[ "Apache-2.0" ]
null
null
null
app/apis/namespaces.py
alexanderzimmerman/smart-vp-server
3aa57b5fa32e90a8406684d0d0a2860e224d7916
[ "Apache-2.0" ]
null
null
null
from flask_restx import Namespace # This is the index of which models are available per user api_ns_geomodels = Namespace('geomodels', description='This is the logic that manage the ' 'different model stored in the server.' ...
43.545455
81
0.551148
from flask_restx import Namespace api_ns_geomodels = Namespace('geomodels', description='This is the logic that manage the ' 'different model stored in the server.' 'Also deals with editing.') api_ns_smar...
true
true
f77ab6fd2ace3a5a0efd94f3b8947c12fa8a401f
11,476
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_extension_images_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_extension_images_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_extension_images_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
45.904
211
0.661729
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.cor...
true
true
f77ab71c97f53414ae61fd5ca0fc8353d3326803
215
py
Python
app/views/mqttc/__init__.py
RedFalsh/flask-example
561b04d31356cf1a4a0324a89ebc4f3dcd94e16c
[ "MIT" ]
1
2019-02-26T07:40:07.000Z
2019-02-26T07:40:07.000Z
app/views/mqttc/__init__.py
RedFalsh/flask-example
561b04d31356cf1a4a0324a89ebc4f3dcd94e16c
[ "MIT" ]
null
null
null
app/views/mqttc/__init__.py
RedFalsh/flask-example
561b04d31356cf1a4a0324a89ebc4f3dcd94e16c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 from flask import Blueprint route_mqtt = Blueprint( 'mqtt_page',__name__ ) from app.views.mqttc.Client import * @route_mqtt.route("/") def index(): return "mqtt v1.0"
16.538462
46
0.706977
from flask import Blueprint route_mqtt = Blueprint( 'mqtt_page',__name__ ) from app.views.mqttc.Client import * @route_mqtt.route("/") def index(): return "mqtt v1.0"
true
true
f77ab7b979c1cfb01bcda98706d8e53e2253eabe
739
py
Python
tensorflow_datasets/d4rl/d4rl_adroit_hammer/__init__.py
shubhamkumaR630/datasets
fe9ee91849cefed0953141ea3588f73b7def78fd
[ "Apache-2.0" ]
2
2022-02-14T09:51:39.000Z
2022-02-14T13:27:49.000Z
tensorflow_datasets/d4rl/d4rl_adroit_hammer/__init__.py
shubhamkumaR630/datasets
fe9ee91849cefed0953141ea3588f73b7def78fd
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/d4rl/d4rl_adroit_hammer/__init__.py
shubhamkumaR630/datasets
fe9ee91849cefed0953141ea3588f73b7def78fd
[ "Apache-2.0" ]
1
2020-12-13T22:11:33.000Z
2020-12-13T22:11:33.000Z
# coding=utf-8 # Copyright 2022 The TensorFlow Datasets 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 appl...
38.894737
91
0.780785
from tensorflow_datasets.d4rl.d4rl_adroit_hammer.d4rl_adroit_hammer import D4rlAdroitHammer
true
true
f77ab895d65d784be4a1d039c8fbd7f38b2c86f3
3,838
py
Python
aliyun-python-sdk-vpc/aliyunsdkvpc/request/v20160428/ModifyIPv6TranslatorEntryRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-vpc/aliyunsdkvpc/request/v20160428/ModifyIPv6TranslatorEntryRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-vpc/aliyunsdkvpc/request/v20160428/ModifyIPv6TranslatorEntryRequest.py
sdk-team/aliyun-openapi-python-sdk
384730d707e6720d1676ccb8f552e6a7b330ec86
[ "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...
33.666667
84
0.777488
from aliyunsdkcore.request import RpcRequest class ModifyIPv6TranslatorEntryRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Vpc', '2016-04-28', 'ModifyIPv6TranslatorEntry','vpc') def get_BackendIpv4Port(self): return self.get_query_params().get('BackendIpv4Port') def set_BackendIpv4P...
true
true
f77ab8dd564c1717fa4842ef4e22151a50dc5833
640
py
Python
Chapter03/terminal_02.py
vabyte/Modern-Python-Standard-Library-Cookbook
4f53e3ab7b61aca1cca9343e7421e170280cd5b5
[ "MIT" ]
84
2018-08-09T09:30:03.000Z
2022-01-04T23:20:38.000Z
Chapter03/terminal_02.py
jiro74/Modern-Python-Standard-Library-Cookbook
4f53e3ab7b61aca1cca9343e7421e170280cd5b5
[ "MIT" ]
1
2019-11-04T18:57:40.000Z
2020-09-07T08:52:25.000Z
Chapter03/terminal_02.py
jiro74/Modern-Python-Standard-Library-Cookbook
4f53e3ab7b61aca1cca9343e7421e170280cd5b5
[ "MIT" ]
33
2018-09-26T11:05:55.000Z
2022-03-15T10:31:10.000Z
import logging, sys if __name__ == '__main__': if len(sys.argv) < 2: print('Please provide logging file name as argument') sys.exit(1) logging_file = sys.argv[1] logging.basicConfig(level=logging.INFO, filename=logging_file, format='%(asctime)s %(name)s %(levelname)...
26.666667
81
0.603125
import logging, sys if __name__ == '__main__': if len(sys.argv) < 2: print('Please provide logging file name as argument') sys.exit(1) logging_file = sys.argv[1] logging.basicConfig(level=logging.INFO, filename=logging_file, format='%(asctime)s %(name)s %(levelname)...
true
true
f77ab904a04f967921403f3015b783ea3376cb18
7,879
py
Python
releasetool/commands/start/ruby.py
michaelbausor/releasetool
5bac8a5ab8f9d993c0b52312ff04e847c322d525
[ "Apache-2.0" ]
null
null
null
releasetool/commands/start/ruby.py
michaelbausor/releasetool
5bac8a5ab8f9d993c0b52312ff04e847c322d525
[ "Apache-2.0" ]
null
null
null
releasetool/commands/start/ruby.py
michaelbausor/releasetool
5bac8a5ab8f9d993c0b52312ff04e847c322d525
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.961207
90
0.677624
import getpass import os import textwrap from typing import Optional import attr import click import datetime import glob import releasetool.filehelpers import releasetool.git import releasetool.github import releasetool.secrets import releasetool.commands.common _CHANGELOG_TEMPLATE = """\ # Release History [Rub...
true
true
f77ab987291280ffbbdecc2bc456e5c4491e8881
2,315
py
Python
nnplot/pyexamples/unet.py
jhaux/PlotNeuralNet
a2eb86912cd84f63176520c7b1db4655d1e45187
[ "MIT" ]
null
null
null
nnplot/pyexamples/unet.py
jhaux/PlotNeuralNet
a2eb86912cd84f63176520c7b1db4655d1e45187
[ "MIT" ]
null
null
null
nnplot/pyexamples/unet.py
jhaux/PlotNeuralNet
a2eb86912cd84f63176520c7b1db4655d1e45187
[ "MIT" ]
null
null
null
import sys sys.path.append('../') from nnplot.pycore.tikzeng import * from nnplot.pycore.blocks import * arch = [ to_head('..'), to_cor(), to_begin(), #input to_input( 'examples/fcn8s/cats.jpg' ), #block-001 to_ConvConvRelu( name='ccr_b1', s_filer=500, n_filer=(64,64), offset="(0,...
43.679245
164
0.609071
import sys sys.path.append('../') from nnplot.pycore.tikzeng import * from nnplot.pycore.blocks import * arch = [ to_head('..'), to_cor(), to_begin(), to_input( 'examples/fcn8s/cats.jpg' ), to_ConvConvRelu( name='ccr_b1', s_filer=500, n_filer=(64,64), offset="(0,0,0)", to="(0,0,0)...
true
true
f77ab9b672feb7b8d8df088a7ed49983572b2146
515
py
Python
app/utils/mask_url.py
yogeshwaran01/Projects
281d760b140d5fe212b8e3819aebbe3117ef2ead
[ "MIT" ]
2
2021-03-08T15:19:51.000Z
2021-04-13T01:30:29.000Z
app/utils/mask_url.py
yogeshwaran01/Projects
281d760b140d5fe212b8e3819aebbe3117ef2ead
[ "MIT" ]
7
2021-02-22T04:55:51.000Z
2022-03-12T00:54:47.000Z
app/utils/mask_url.py
yogeshwaran01/Projects
281d760b140d5fe212b8e3819aebbe3117ef2ead
[ "MIT" ]
null
null
null
from urllib.parse import urlparse from requests import post def Shortner(big_url: str) -> str: """ Function short the big urls to short """ return post(f"https://is.gd/create.php?format=json&url={big_url}").json()[ "shorturl" ] def MaskUrl(target_url: str, mask_domain: str, keyword: str...
24.52381
81
0.654369
from urllib.parse import urlparse from requests import post def Shortner(big_url: str) -> str: return post(f"https://is.gd/create.php?format=json&url={big_url}").json()[ "shorturl" ] def MaskUrl(target_url: str, mask_domain: str, keyword: str) -> str: url = Shortner(target_url) return f"{ma...
true
true
f77abb30824cdba6e31a2f60c8fbd79347571d19
3,644
py
Python
Challenges-in-Machine-Learning/code.py
nagnath001/ga-learner-dsmp-repo
7035fd2ebe967182a44011dde59cb8ae411badb6
[ "MIT" ]
null
null
null
Challenges-in-Machine-Learning/code.py
nagnath001/ga-learner-dsmp-repo
7035fd2ebe967182a44011dde59cb8ae411badb6
[ "MIT" ]
null
null
null
Challenges-in-Machine-Learning/code.py
nagnath001/ga-learner-dsmp-repo
7035fd2ebe967182a44011dde59cb8ae411badb6
[ "MIT" ]
null
null
null
# -------------- import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split # Code starts here df=pd.read_csv(path) #print(df.head()) #print(df.info) df['INCOME'] = df['INCOME'].str.replace('$','') df['INCOME'] = df['INCOME'].str.rep...
27.816794
106
0.710757
import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split df=pd.read_csv(path) df['INCOME'] = df['INCOME'].str.replace('$','') df['INCOME'] = df['INCOME'].str.replace(',','') df['HOME_VAL'] = df['HOME_VAL'].str.replace('$','') df['H...
true
true
f77abb75052e4a3aa3d28e7e2fe6746df3c83221
3,252
py
Python
store/migrations/0001_initial.py
kevgathuku/compshop
385fcb608d492921d41072d2d634fc46164ee0f8
[ "BSD-3-Clause" ]
1
2015-07-04T08:24:59.000Z
2015-07-04T08:24:59.000Z
store/migrations/0001_initial.py
kevgathuku/compshop
385fcb608d492921d41072d2d634fc46164ee0f8
[ "BSD-3-Clause" ]
null
null
null
store/migrations/0001_initial.py
kevgathuku/compshop
385fcb608d492921d41072d2d634fc46164ee0f8
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import autoslug.fields import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0001_initial'), ] operations = [ migrations.CreateModel( ...
45.166667
182
0.566421
from __future__ import unicode_literals from django.db import models, migrations import autoslug.fields import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0001_initial'), ] operations = [ migrations.CreateModel( name='Category', ...
true
true
f77abbc8f781a21fa05c6dadbc286d1d509b07ce
275
py
Python
examples/effects.py
zycelium/python-ansiformat
671f25002d61cef520c9f81ce6c9cd37fecaa4e0
[ "BSD-3-Clause" ]
null
null
null
examples/effects.py
zycelium/python-ansiformat
671f25002d61cef520c9f81ce6c9cd37fecaa4e0
[ "BSD-3-Clause" ]
null
null
null
examples/effects.py
zycelium/python-ansiformat
671f25002d61cef520c9f81ce6c9cd37fecaa4e0
[ "BSD-3-Clause" ]
null
null
null
from zycelium.ansiformat import AnsiFormat af = AnsiFormat() print(af("Bold").bold) print(af("Dim").dim) print(af("Italic").italic) print(af("Underline").underline) print(af("Blink").blink) print(af("Inverse").inverse) print(af("Hidden").hidden) print(af("Strike").strike)
21.153846
42
0.72
from zycelium.ansiformat import AnsiFormat af = AnsiFormat() print(af("Bold").bold) print(af("Dim").dim) print(af("Italic").italic) print(af("Underline").underline) print(af("Blink").blink) print(af("Inverse").inverse) print(af("Hidden").hidden) print(af("Strike").strike)
true
true
f77abd6b072947a7a99118aebb2c8e67656a8413
21,097
py
Python
pytorch3d/io/experimental_gltf_io.py
theycallmepeter/pytorch3d_PBR
bc83c23969ff7843fc05d2da001952b368926174
[ "BSD-3-Clause" ]
null
null
null
pytorch3d/io/experimental_gltf_io.py
theycallmepeter/pytorch3d_PBR
bc83c23969ff7843fc05d2da001952b368926174
[ "BSD-3-Clause" ]
null
null
null
pytorch3d/io/experimental_gltf_io.py
theycallmepeter/pytorch3d_PBR
bc83c23969ff7843fc05d2da001952b368926174
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. """ This module implements loading meshes from glTF 2 assets stored in a GLB container file or a glTF J...
36.754355
95
0.612646
import json import struct import warnings from base64 import b64decode from collections import deque from enum import IntEnum from io import BytesIO from typing import Any, BinaryIO, Dict, List, Optional, Tuple, Union, cast import numpy as np import torch from iopath.common.file_io import PathManager ...
true
true
f77abd7cadca0a85dd0963ddf216c56cffa91541
56,921
py
Python
py/desispec/fluxcalibration.py
segasai/desispec
4786347a8ad44effa4985671423f7ba0129ba6c3
[ "BSD-3-Clause" ]
null
null
null
py/desispec/fluxcalibration.py
segasai/desispec
4786347a8ad44effa4985671423f7ba0129ba6c3
[ "BSD-3-Clause" ]
null
null
null
py/desispec/fluxcalibration.py
segasai/desispec
4786347a8ad44effa4985671423f7ba0129ba6c3
[ "BSD-3-Clause" ]
null
null
null
""" desispec.fluxcalibration ======================== Flux calibration routines. """ from __future__ import absolute_import import numpy as np from .resolution import Resolution from .linalg import cholesky_solve, cholesky_solve_and_invert, spline_fit from .interpolation import resample_flux from desiutil.log import g...
40.484353
186
0.645052
from __future__ import absolute_import import numpy as np from .resolution import Resolution from .linalg import cholesky_solve, cholesky_solve_and_invert, spline_fit from .interpolation import resample_flux from desiutil.log import get_logger from .io.filters import load_legacy_survey_filter from desispec import util ...
true
true
f77abdb09efdbf9267e0e29149707facc8d1b9af
3,125
py
Python
day05/login_app/views.py
General-ITer/Django-Introduction
e88b12682f9abc46a90a0fc79e7443537230a506
[ "Apache-2.0" ]
null
null
null
day05/login_app/views.py
General-ITer/Django-Introduction
e88b12682f9abc46a90a0fc79e7443537230a506
[ "Apache-2.0" ]
1
2020-12-09T18:26:36.000Z
2020-12-09T18:26:36.000Z
day05/login_app/views.py
General-ITer/Django-Introduction
e88b12682f9abc46a90a0fc79e7443537230a506
[ "Apache-2.0" ]
null
null
null
from django.contrib.auth.backends import ModelBackend from django.contrib.auth.models import User from django.contrib.auth import get_user_model from django.shortcuts import render,reverse,redirect from django.http import HttpResponse from django.contrib.auth import authenticate, login, logout from django.db.models imp...
29.761905
116
0.61216
from django.contrib.auth.backends import ModelBackend from django.contrib.auth.models import User from django.contrib.auth import get_user_model from django.shortcuts import render,reverse,redirect from django.http import HttpResponse from django.contrib.auth import authenticate, login, logout from django.db.models imp...
true
true
f77abe0364f49b4c941f138ccd3b709f62b3d25e
25,122
py
Python
gui/plugins/hunt_view_test.py
scudette/grr
d4257c5259af881e28a7d62e9837fa13352e2bf6
[ "Apache-2.0" ]
6
2015-04-03T02:25:28.000Z
2021-11-17T21:42:59.000Z
gui/plugins/hunt_view_test.py
scudette/grr
d4257c5259af881e28a7d62e9837fa13352e2bf6
[ "Apache-2.0" ]
null
null
null
gui/plugins/hunt_view_test.py
scudette/grr
d4257c5259af881e28a7d62e9837fa13352e2bf6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- mode: python; encoding: utf-8 -*- """Test the hunt_view interface.""" import traceback from grr.gui import runtests_test from grr.lib import aff4 from grr.lib import flags from grr.lib import flow from grr.lib import hunts from grr.lib import rdfvalue from grr.lib import test_lib cla...
36.461538
80
0.689356
import traceback from grr.gui import runtests_test from grr.lib import aff4 from grr.lib import flags from grr.lib import flow from grr.lib import hunts from grr.lib import rdfvalue from grr.lib import test_lib class TestHuntView(test_lib.GRRSeleniumTest): reason = "Felt like it!" def CreateSampleHunt(sel...
true
true
f77abe9667a77e3f0dd2085b775d4d91794f1e30
499
py
Python
coma/plot.py
swederik/structurefunction
5c5583bb26d6092fa3b7a630192d8e79199f8df0
[ "MIT" ]
2
2017-04-04T20:32:01.000Z
2017-04-11T20:31:17.000Z
coma/plot.py
GIGA-Consciousness/structurefunction
5c5583bb26d6092fa3b7a630192d8e79199f8df0
[ "MIT" ]
null
null
null
coma/plot.py
GIGA-Consciousness/structurefunction
5c5583bb26d6092fa3b7a630192d8e79199f8df0
[ "MIT" ]
null
null
null
import os from surfer import Brain, io subj_id = 'Bend1' subjects_dir = "/media/BlackBook_/ERIKPETDTIFMRI/ComaSample/subjects" os.environ['SUBJECTS_DIR'] = subjects_dir brain = Brain(subj_id, "lh", "pial", subjects_dir=subjects_dir, config_opts=dict(background="white")) """Project the volume file and r...
33.266667
70
0.741483
import os from surfer import Brain, io subj_id = 'Bend1' subjects_dir = "/media/BlackBook_/ERIKPETDTIFMRI/ComaSample/subjects" os.environ['SUBJECTS_DIR'] = subjects_dir brain = Brain(subj_id, "lh", "pial", subjects_dir=subjects_dir, config_opts=dict(background="white")) mri_file = "petmr.nii" surf_dat...
true
true
f77abf5266f3e3e524d5d71a28a56879f5ea7b31
8,721
py
Python
Metamer_Transform.py
ArturoDeza/NeuroFovea_PyTorch
cf8f3e41ccc08b9f631f5f59776c01f92d52e944
[ "MIT" ]
11
2021-04-09T22:22:24.000Z
2022-02-28T00:18:03.000Z
Metamer_Transform.py
ArturoDeza/NeuroFovea_PyTorch
cf8f3e41ccc08b9f631f5f59776c01f92d52e944
[ "MIT" ]
null
null
null
Metamer_Transform.py
ArturoDeza/NeuroFovea_PyTorch
cf8f3e41ccc08b9f631f5f59776c01f92d52e944
[ "MIT" ]
2
2021-11-18T23:51:57.000Z
2021-12-13T04:44:28.000Z
import argparse from pathlib import Path import torch import torch.nn as nn from PIL import Image from torchvision import transforms from torchvision.utils import save_image import numpy as np import math import time import net from function import adaptive_instance_normalization, coral # Example code: # python Meta...
40.562791
181
0.684211
import argparse from pathlib import Path import torch import torch.nn as nn from PIL import Image from torchvision import transforms from torchvision.utils import save_image import numpy as np import math import time import net from function import adaptive_instance_normalization, coral parser = argparse.ArgumentPa...
true
true
f77abfa4dd1434b9bcee6a4aad5d9c771e563fd5
6,584
py
Python
flask_mab/bandits.py
DeaconDesperado/flask_mab
877ad0a344a91f667a606930914c8b0ff083acc9
[ "BSD-3-Clause" ]
54
2015-01-13T10:54:29.000Z
2021-09-13T03:30:35.000Z
flask_mab/bandits.py
DeaconDesperado/flask_mab
877ad0a344a91f667a606930914c8b0ff083acc9
[ "BSD-3-Clause" ]
5
2015-01-05T17:14:14.000Z
2021-09-13T03:56:45.000Z
flask_mab/bandits.py
DeaconDesperado/flask_mab
877ad0a344a91f667a606930914c8b0ff083acc9
[ "BSD-3-Clause" ]
15
2015-03-14T06:14:41.000Z
2021-09-17T05:29:30.000Z
from random import random, choice, uniform, betavariate from math import log, exp, expm1 class Bandit(object): """The primary bandit interface. Don't use this unless you really want uniform random arm selection (which defeats the whole purpose, really) Used as a control to test against and as an interfac...
32.27451
158
0.606774
from random import random, choice, uniform, betavariate from math import log, exp, expm1 class Bandit(object): @classmethod def fromdict(cls, dict_spec): extra_args = dict([(key, value) for key, value in dict_spec.items() if key not in ["arms", "pulls", "reward", "values", "bandit_type", "confidence"]...
true
true
f77abfaa029a466d4328d51bec3587ffe1bf872c
1,333
py
Python
solutions/python3/problem951.py
tjyiiuan/LeetCode
abd10944c6a1f7a7f36bd9b6218c511cf6c0f53e
[ "MIT" ]
null
null
null
solutions/python3/problem951.py
tjyiiuan/LeetCode
abd10944c6a1f7a7f36bd9b6218c511cf6c0f53e
[ "MIT" ]
null
null
null
solutions/python3/problem951.py
tjyiiuan/LeetCode
abd10944c6a1f7a7f36bd9b6218c511cf6c0f53e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ 951. Flip Equivalent Binary Trees For a binary tree T, we can define a flip operation as follows: choose any node, and swap the left and right child subtrees. A binary tree X is flip equivalent to a binary tree Y if and only if we can make X equal to Y after some number of flip operations....
32.512195
106
0.657914
class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def flipEquiv(self, root1: TreeNode, root2: TreeNode) -> bool: if root1 is None and root2 is None: return True elif root1 i...
true
true
f77ac059d60edfadc519272190ce2af871106406
477
py
Python
src/Chapter2/exercise_5.py
SimeonGerginov/Python-For-Everybody
a320df7dbdb85bf8e4b8d9f40b8bcad8e047b487
[ "MIT" ]
null
null
null
src/Chapter2/exercise_5.py
SimeonGerginov/Python-For-Everybody
a320df7dbdb85bf8e4b8d9f40b8bcad8e047b487
[ "MIT" ]
null
null
null
src/Chapter2/exercise_5.py
SimeonGerginov/Python-For-Everybody
a320df7dbdb85bf8e4b8d9f40b8bcad8e047b487
[ "MIT" ]
null
null
null
# Exercise 2.5: Write a program which prompts the user for a Celsius temperature, # convert the temperature to Fahrenheit, and print out the converted temperature. # Python for Everybody: Exploring Data Using Python 3 # by Charles R. Severance celsius_temperature = float(input("Enter Celsius temperature: ")) fahrenh...
39.75
104
0.784067
celsius_temperature = float(input("Enter Celsius temperature: ")) fahrenheit_temperature = (celsius_temperature * 1.8) + 32 print(celsius_temperature, "Celsius is equal to", round(fahrenheit_temperature, 2), "degree Fahrenheit")
true
true
f77ac0ef1ee84d0ec0cfdfaecbb8569e0b60cc55
745
py
Python
ftp_s3/S3Authorizer.py
avacariu/ftp-s3
b1395bad703dd4ef9a0bf0032526f71f9c9e16fe
[ "MIT" ]
8
2016-08-31T16:58:34.000Z
2020-08-25T09:16:41.000Z
ftp_s3/S3Authorizer.py
vlad003/ftp-s3
b1395bad703dd4ef9a0bf0032526f71f9c9e16fe
[ "MIT" ]
null
null
null
ftp_s3/S3Authorizer.py
vlad003/ftp-s3
b1395bad703dd4ef9a0bf0032526f71f9c9e16fe
[ "MIT" ]
2
2016-09-02T21:11:54.000Z
2016-12-15T09:29:07.000Z
import boto from pyftpdlib.authorizers import DummyAuthorizer, AuthenticationFailed class S3Authorizer(DummyAuthorizer): def __init__(self, *args, **kwargs): DummyAuthorizer.__init__(self, *args, **kwargs) self.conn = None def validate_authentication(self, aws_access_key_id, aws_secret_access_...
35.47619
89
0.669799
import boto from pyftpdlib.authorizers import DummyAuthorizer, AuthenticationFailed class S3Authorizer(DummyAuthorizer): def __init__(self, *args, **kwargs): DummyAuthorizer.__init__(self, *args, **kwargs) self.conn = None def validate_authentication(self, aws_access_key_id, aws_secret_access_...
true
true
f77ac14ca7afdb53a8350dcdf87bf6bd9914ddf2
14,237
py
Python
cogdl/configs.py
zhangdan0602/cogdl
35a338f29066e4b1a5d7f46217f09ebceaf13106
[ "MIT" ]
1,072
2019-08-02T05:46:21.000Z
2022-03-31T07:51:53.000Z
cogdl/configs.py
zhangdan0602/cogdl
35a338f29066e4b1a5d7f46217f09ebceaf13106
[ "MIT" ]
96
2019-08-05T17:27:22.000Z
2022-03-03T08:36:57.000Z
cogdl/configs.py
zhangdan0602/cogdl
35a338f29066e4b1a5d7f46217f09ebceaf13106
[ "MIT" ]
299
2019-08-08T07:33:10.000Z
2022-03-31T09:30:07.000Z
BEST_CONFIGS = { "node_classification": { "chebyshev": {"general": {}}, "dropedge_gcn": {"general": {}}, "gat": { "general": {"lr": 0.005, "max_epoch": 1000}, "citeseer": {"weight_decay": 0.001}, "pubmed": {"weight_decay": 0.001}, "ppi-large": ...
28.136364
65
0.314462
BEST_CONFIGS = { "node_classification": { "chebyshev": {"general": {}}, "dropedge_gcn": {"general": {}}, "gat": { "general": {"lr": 0.005, "max_epoch": 1000}, "citeseer": {"weight_decay": 0.001}, "pubmed": {"weight_decay": 0.001}, "ppi-large": ...
true
true
f77ac29333bd50659622bab88a2971cedaccdaa6
8,346
py
Python
test/functional/proxy_test.py
alstn3726/Yamacoin
6a9a45fea890d142faeb3f6b20a9063a961aa0d1
[ "MIT" ]
null
null
null
test/functional/proxy_test.py
alstn3726/Yamacoin
6a9a45fea890d142faeb3f6b20a9063a961aa0d1
[ "MIT" ]
null
null
null
test/functional/proxy_test.py
alstn3726/Yamacoin
6a9a45fea890d142faeb3f6b20a9063a961aa0d1
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind with different proxy configuration. Test plan: - Start bitcoind's with different proxy c...
41.316832
121
0.62485
import socket import os from test_framework.socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( PORT_MIN, PORT_RANGE, assert_equal, ) from test_framework.netutil import test_ipv6_local ...
true
true
f77ac384e5f13cb3bc350ec2a7a7760613e47402
5,946
py
Python
tests/pytests/unit/states/test_ssh_auth.py
waynegemmell/salt
88056db3589cccab8956c2ae4f9b733acce89461
[ "Apache-2.0" ]
9,425
2015-01-01T05:59:24.000Z
2022-03-31T20:44:05.000Z
tests/pytests/unit/states/test_ssh_auth.py
waynegemmell/salt
88056db3589cccab8956c2ae4f9b733acce89461
[ "Apache-2.0" ]
33,507
2015-01-01T00:19:56.000Z
2022-03-31T23:48:20.000Z
tests/pytests/unit/states/test_ssh_auth.py
waynegemmell/salt
88056db3589cccab8956c2ae4f9b733acce89461
[ "Apache-2.0" ]
5,810
2015-01-01T19:11:45.000Z
2022-03-31T02:37:20.000Z
""" :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ import pytest import salt.states.ssh_auth as ssh_auth from tests.support.mock import MagicMock, patch @pytest.fixture def configure_loader_modules(): return {ssh_auth: {}} def test_present(): """ Test to verifies that the specified SSH key ...
37.1625
87
0.538009
import pytest import salt.states.ssh_auth as ssh_auth from tests.support.mock import MagicMock, patch @pytest.fixture def configure_loader_modules(): return {ssh_auth: {}} def test_present(): name = "sshkeys" user = "root" source = "salt://ssh_keys/id_rsa.pub" ret = {"name": name, "changes": {...
true
true
f77ac3d922a8631b495da88154cb2eba7a735891
2,424
py
Python
tests/profiles/post_test.py
eliheuer/fontbakery
4d69dd9ec69bea297139746559977a7821312bbe
[ "Apache-2.0" ]
null
null
null
tests/profiles/post_test.py
eliheuer/fontbakery
4d69dd9ec69bea297139746559977a7821312bbe
[ "Apache-2.0" ]
null
null
null
tests/profiles/post_test.py
eliheuer/fontbakery
4d69dd9ec69bea297139746559977a7821312bbe
[ "Apache-2.0" ]
1
2020-06-14T17:13:59.000Z
2020-06-14T17:13:59.000Z
import pytest from fontbakery.utils import TEST_FILE from fontbakery.checkrunner import ( DEBUG , INFO , WARN , ERROR , SKIP , PASS , FAIL ) check_statuses = (ERROR, FAIL, SKIP, PASS, WARN, INFO, DEBUG) from fontTools.t...
31.480519
97
0.70462
import pytest from fontbakery.utils import TEST_FILE from fontbakery.checkrunner import ( DEBUG , INFO , WARN , ERROR , SKIP , PASS , FAIL ) check_statuses = (ERROR, FAIL, SKIP, PASS, WARN, INFO, DEBUG) from fontTools.t...
true
true
f77ac3e7334b995561ce77cd5a858f155fbeccbb
739
py
Python
docs/source/examples/zeffclient_example_csv/generator.py
ziff/ZeffClient
4a3c4a34711ff84bb528063af974171685168f92
[ "ECL-2.0", "Apache-2.0" ]
1
2020-04-30T16:33:45.000Z
2020-04-30T16:33:45.000Z
docs/source/examples/zeffclient_example_csv/generator.py
ziff/ZeffClient
4a3c4a34711ff84bb528063af974171685168f92
[ "ECL-2.0", "Apache-2.0" ]
2
2020-01-21T22:04:06.000Z
2020-01-21T22:06:02.000Z
docs/source/examples/zeffclient_example_csv/generator.py
ziff/ZeffClient
4a3c4a34711ff84bb528063af974171685168f92
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """Zeff record config generator for HousePrice records.""" import logging import urllib.parse import csv LOGGER = logging.getLogger("zeffclient.record.generator") def HousePriceRecordGenerator(arg: str): """Return house primary key value.""" with open(arg, "r") as csvfile: for ...
26.392857
58
0.696888
import logging import urllib.parse import csv LOGGER = logging.getLogger("zeffclient.record.generator") def HousePriceRecordGenerator(arg: str): with open(arg, "r") as csvfile: for row in csv.DictReader(csvfile): url = f"file://{arg}/?id={row['id']}" yield url if __name__ == "__...
true
true
f77ac4659a9b877829f7ae52dd005d9dd11dac07
1,905
py
Python
python/paddle/v2/fluid/tests/test_ftrl_op.py
QingshuChen/Paddle
25a92be3e123ed21fd98c7be6bd7e3a6320756a3
[ "Apache-2.0" ]
3
2018-04-16T23:35:32.000Z
2019-08-12T01:01:07.000Z
python/paddle/v2/fluid/tests/test_ftrl_op.py
hero9968/PaddlePaddle-book
1ff47b284c565d030b198705d5f18b4bd4ce53e5
[ "Apache-2.0" ]
9
2017-09-13T07:39:31.000Z
2017-10-18T05:58:23.000Z
python/paddle/v2/fluid/tests/test_ftrl_op.py
QingshuChen/Paddle
25a92be3e123ed21fd98c7be6bd7e3a6320756a3
[ "Apache-2.0" ]
2
2020-11-04T08:07:46.000Z
2020-11-06T08:33:24.000Z
import unittest import numpy as np from op_test import OpTest class TestFTRLOp(OpTest): def setUp(self): self.op_type = "ftrl" w = np.random.random((102, 105)).astype("float32") g = np.random.random((102, 105)).astype("float32") sq_accum = np.full((102, 105), 0.1).astype("float32")...
30.238095
80
0.507612
import unittest import numpy as np from op_test import OpTest class TestFTRLOp(OpTest): def setUp(self): self.op_type = "ftrl" w = np.random.random((102, 105)).astype("float32") g = np.random.random((102, 105)).astype("float32") sq_accum = np.full((102, 105), 0.1).astype("float32")...
true
true
f77ac4e10533e93667c1c4be414f3f131f75cd6e
201
py
Python
mycloud/drive/filesync/__init__.py
ThomasGassmann/swisscom-my-cloud-backup
97e222c45a54197c82c8f3a5d59aa20bf3382ed8
[ "MIT" ]
4
2019-11-28T22:10:43.000Z
2022-01-23T15:18:26.000Z
mycloud/drive/filesync/__init__.py
ThomasGassmann/swisscom-my-cloud-backup
97e222c45a54197c82c8f3a5d59aa20bf3382ed8
[ "MIT" ]
18
2019-01-20T22:30:48.000Z
2020-06-09T21:16:07.000Z
mycloud/drive/filesync/__init__.py
thomasgassmann/mycloud-cli
97e222c45a54197c82c8f3a5d59aa20bf3382ed8
[ "MIT" ]
null
null
null
from mycloud.drive.filesync.downsync import downsync_file, downsync_folder from mycloud.drive.filesync.tree import RelativeFileTree from mycloud.drive.filesync.upsync import upsync_file, upsync_folder
50.25
74
0.875622
from mycloud.drive.filesync.downsync import downsync_file, downsync_folder from mycloud.drive.filesync.tree import RelativeFileTree from mycloud.drive.filesync.upsync import upsync_file, upsync_folder
true
true
f77ac53dedcca15dd38e02e1306dd3bc36584b89
3,093
py
Python
eelbrain/save/_besa.py
jpkulasingham/Eelbrain
1061ce0b781a8e55ec187723b58491a5cde32e08
[ "BSD-3-Clause" ]
32
2015-04-05T15:38:55.000Z
2022-03-12T02:35:09.000Z
eelbrain/save/_besa.py
jpkulasingham/Eelbrain
1061ce0b781a8e55ec187723b58491a5cde32e08
[ "BSD-3-Clause" ]
22
2015-07-14T14:55:44.000Z
2022-03-15T17:46:11.000Z
eelbrain/save/_besa.py
jpkulasingham/Eelbrain
1061ce0b781a8e55ec187723b58491a5cde32e08
[ "BSD-3-Clause" ]
29
2015-04-23T13:51:09.000Z
2021-08-12T11:28:21.000Z
""" Export events for use in the Besa pipeline. Use :func:`meg160_triggers` to export a trigger list for MEG160, then reject unwanted events, and finally use :func:`besa_evt` to export a corresponding ``.evt`` file. """ import numpy as np from .._data_obj import Var, Dataset from .._utils import ui from . import _tx...
28.118182
78
0.607177
import numpy as np from .._data_obj import Var, Dataset from .._utils import ui from . import _txt def meg160_triggers(ds, dest=None, pad=1): sfreq = ds.info['raw'].info['sfreq'] times = ds['i_start'] / sfreq if dest is None: dest = ui.ask_saveas("Save MEG-160 Triggers", "Please pick a " ...
true
true
f77ac7bcfd8c364aeb2a3553a980edafaa31680a
889
py
Python
problems/perfect_square.py
smartdolphin/recommandation-tutorial
3bfa8f91a6d2d064db42dfb61c3640e1775e4c31
[ "MIT" ]
1
2018-10-14T14:19:05.000Z
2018-10-14T14:19:05.000Z
problems/perfect_square.py
smartdolphin/recommandation-tutorial
3bfa8f91a6d2d064db42dfb61c3640e1775e4c31
[ "MIT" ]
null
null
null
problems/perfect_square.py
smartdolphin/recommandation-tutorial
3bfa8f91a6d2d064db42dfb61c3640e1775e4c31
[ "MIT" ]
null
null
null
# 279. Perfect Squares # https://leetcode.com/problems/perfect-squares import unittest class Solution(object): def numSquares(self, n): if n < 2: return n squares = [i ** 2 for i in range(1, int(n ** 0.5) + 1)] queue, depth = {n}, 1 while queue: next_nodes =...
25.4
63
0.501687
import unittest class Solution(object): def numSquares(self, n): if n < 2: return n squares = [i ** 2 for i in range(1, int(n ** 0.5) + 1)] queue, depth = {n}, 1 while queue: next_nodes = set() for val in queue: for sq in squares:...
true
true
f77ac82bbf0c9c2cc6bc53febdface2e3bb682cf
129
py
Python
misc/misc_task.py
lmbaeza/Crypto
2cbb085e625713b387d99720fbdeadb0b74f31a1
[ "MIT" ]
1
2020-08-31T12:17:06.000Z
2020-08-31T12:17:06.000Z
misc/misc_task.py
lmbaeza/Cripto
2cbb085e625713b387d99720fbdeadb0b74f31a1
[ "MIT" ]
null
null
null
misc/misc_task.py
lmbaeza/Cripto
2cbb085e625713b387d99720fbdeadb0b74f31a1
[ "MIT" ]
null
null
null
class Task: @testcases def solveOne(self): pass if __name__ == '__main__': task = Task() task.solveOne()
16.125
26
0.581395
class Task: @testcases def solveOne(self): pass if __name__ == '__main__': task = Task() task.solveOne()
true
true
f77ac903a0d4423387025313e7d5ac8b34815c3b
53,875
py
Python
RecoTauTag/Configuration/python/HPSPFTaus_cff.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
1
2018-07-25T03:57:34.000Z
2018-07-25T03:57:34.000Z
RecoTauTag/Configuration/python/HPSPFTaus_cff.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
7
2016-07-17T02:34:54.000Z
2019-08-13T07:58:37.000Z
RecoTauTag/Configuration/python/HPSPFTaus_cff.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
2
2019-09-27T08:33:22.000Z
2019-11-14T10:52:30.000Z
import FWCore.ParameterSet.Config as cms import copy from Configuration.Eras.Modifier_phase2_common_cff import phase2_common ''' Sequences for HPS taus ''' ## Discriminator sources from RecoTauTag.RecoTau.PFRecoTauDiscriminationByIsolation_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscrimin...
59.008762
252
0.835824
import FWCore.ParameterSet.Config as cms import copy from Configuration.Eras.Modifier_phase2_common_cff import phase2_common from RecoTauTag.RecoTau.PFRecoTauDiscriminationByIsolation_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationByLeadingTrackFinding_cfi import * from Re...
true
true
f77ac92e8bc531dc9c9e853e70ce726cd4e1dcbc
4,380
py
Python
models/model.py
Aggrathon/MtGan
81bc78f9dee485a0f5704109fe4a5a28650feaf3
[ "Apache-2.0" ]
null
null
null
models/model.py
Aggrathon/MtGan
81bc78f9dee485a0f5704109fe4a5a28650feaf3
[ "Apache-2.0" ]
null
null
null
models/model.py
Aggrathon/MtGan
81bc78f9dee485a0f5704109fe4a5a28650feaf3
[ "Apache-2.0" ]
null
null
null
""" Tensorflow GAN model """ import os from pathlib import Path import tensorflow as tf DIRECTORY = Path('network') DATA = Path('data') IMAGE_LIST = DATA / 'images.txt' ART_LIST = DATA / 'art.txt' ART_BLACK_LIST = DATA / 'art_black.txt' ART_GREEN_LIST = DATA / 'art_green.txt' ART_WHITE_LIST = DATA / 'art_white.txt...
33.692308
142
0.652968
import os from pathlib import Path import tensorflow as tf DIRECTORY = Path('network') DATA = Path('data') IMAGE_LIST = DATA / 'images.txt' ART_LIST = DATA / 'art.txt' ART_BLACK_LIST = DATA / 'art_black.txt' ART_GREEN_LIST = DATA / 'art_green.txt' ART_WHITE_LIST = DATA / 'art_white.txt' IMAGE_WIDTH = 176 IMAGE_HEIGHT ...
true
true
f77ac98a9c5f1d5440cb745339f3e65de33ee594
7,644
py
Python
tests/integration/ssh/test_state.py
major0/salt
2019cc89602d296d060e24111df8f9702a8c6bc9
[ "Apache-2.0" ]
12
2015-01-21T00:18:25.000Z
2021-07-11T07:35:26.000Z
tests/integration/ssh/test_state.py
major0/salt
2019cc89602d296d060e24111df8f9702a8c6bc9
[ "Apache-2.0" ]
1
2015-02-23T19:37:47.000Z
2015-02-23T19:37:47.000Z
tests/integration/ssh/test_state.py
major0/salt
2019cc89602d296d060e24111df8f9702a8c6bc9
[ "Apache-2.0" ]
12
2015-01-05T09:50:42.000Z
2019-08-19T01:43:40.000Z
# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import, print_function, unicode_literals import os import shutil import threading import time import logging # Import Salt Testing Libs from tests.support.case import SSHCase from tests.support.helpers import flaky from tests.support.paths i...
34.125
99
0.595892
from __future__ import absolute_import, print_function, unicode_literals import os import shutil import threading import time import logging from tests.support.case import SSHCase from tests.support.helpers import flaky from tests.support.paths import TMP from salt.ext import six from salt.ext.six.moves import range...
true
true
f77ac99891ae8bea98d5db7580fe3378e5f6af56
2,709
py
Python
Chapter06/Python 3.5/bidirectional_RNN_1.py
Deeptituscano/Deep-Learning-with-TensorFlow
4813bd451438894a125db1f10988e98227bc9e95
[ "MIT" ]
194
2017-04-27T08:15:33.000Z
2022-03-23T19:56:03.000Z
Chapter06/Python 3.5/bidirectional_RNN_1.py
weiwanling/Deep-Learning-with-TensorFlow
7ea73195922bce6919864352b529b84194ec9d30
[ "MIT" ]
6
2017-07-23T14:47:14.000Z
2021-09-23T08:38:32.000Z
Chapter06/Python 3.5/bidirectional_RNN_1.py
weiwanling/Deep-Learning-with-TensorFlow
7ea73195922bce6919864352b529b84194ec9d30
[ "MIT" ]
163
2017-04-28T16:39:23.000Z
2021-11-25T08:38:39.000Z
import tensorflow as tf import numpy as np from tensorflow.contrib import rnn from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("/tmp/data/", one_hot=True) learning_rate = 0.001 training_iters = 100000 batch_size = 128 display_step = 10 n_input = 28 n_steps = ...
38.7
86
0.643042
import tensorflow as tf import numpy as np from tensorflow.contrib import rnn from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("/tmp/data/", one_hot=True) learning_rate = 0.001 training_iters = 100000 batch_size = 128 display_step = 10 n_input = 28 n_steps = ...
true
true
f77ac9bc03b46c2eab07af8add6aa70c24b3b999
1,917
py
Python
Week2/ManualNN.py
JoyeBright/nlp981
94267f4c3030319ca753d32fa02df492dda1acae
[ "MIT" ]
2
2019-12-31T10:55:49.000Z
2020-02-18T10:24:10.000Z
Week2/ManualNN.py
JoyeBright/nlp981
94267f4c3030319ca753d32fa02df492dda1acae
[ "MIT" ]
null
null
null
Week2/ManualNN.py
JoyeBright/nlp981
94267f4c3030319ca753d32fa02df492dda1acae
[ "MIT" ]
3
2019-12-16T14:43:08.000Z
2020-01-08T17:27:58.000Z
import numpy as np # Mini Dataset input_data = np.array([5, 7, 8, 1]) weights = {'node0': np.array([1, 1]), 'node1': np.array([-1, 1]), 'output': np.array([2, -1])} # Activation Function def ReLu(x): out = max(0, x) return out def predict_with_NN(input_data_row, weights): print("...
32.491525
81
0.694314
import numpy as np input_data = np.array([5, 7, 8, 1]) weights = {'node0': np.array([1, 1]), 'node1': np.array([-1, 1]), 'output': np.array([2, -1])} def ReLu(x): out = max(0, x) return out def predict_with_NN(input_data_row, weights): print("\nFirst element of input data: %s" % ...
true
true
f77ac9e6a67ead5499d4b1c699eced4de1f733e4
1,138
py
Python
kubernetes/test/test_policy_v1beta1_run_as_user_strategy_options.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_policy_v1beta1_run_as_user_strategy_options.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_policy_v1beta1_run_as_user_strategy_options.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
1
2020-05-09T07:16:55.000Z
2020-05-09T07:16:55.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
25.288889
125
0.753954
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.policy_v1beta1_run_as_user_strategy_options import PolicyV1beta1RunAsUserStrategyOptions class TestPolicyV1beta1RunAsUserStrategyOptio...
true
true
f77acb1561466b8f8877afc5b88d1e5b4d4e56f1
1,438
py
Python
port_scanner/scanner.py
wrona96/coolscripts
34900936147a1479537b16b6e55bbcb31795d4af
[ "MIT" ]
null
null
null
port_scanner/scanner.py
wrona96/coolscripts
34900936147a1479537b16b6e55bbcb31795d4af
[ "MIT" ]
null
null
null
port_scanner/scanner.py
wrona96/coolscripts
34900936147a1479537b16b6e55bbcb31795d4af
[ "MIT" ]
null
null
null
import argparse from tools import Scanner def main(): # Init parser parser = argparse.ArgumentParser(usage='%(prog)s [options]', description='Basic port scanner with cmd line handler') # Add arguments parser.add_argument('-t', '--target', type=str, default='w3c.com', help='Set ...
39.944444
120
0.602921
import argparse from tools import Scanner def main(): parser = argparse.ArgumentParser(usage='%(prog)s [options]', description='Basic port scanner with cmd line handler') parser.add_argument('-t', '--target', type=str, default='w3c.com', help='Set target. (default: w3c.pl)') ...
true
true
f77acd6733e7ec92bd6c750372c722428f74f839
2,154
py
Python
test/test_viewer.py
sckevmit/profiling
824ae554b35909ecbb8aead8853429573e70aeee
[ "BSD-3-Clause" ]
2,287
2015-01-02T19:46:01.000Z
2022-03-26T17:46:15.000Z
test/test_viewer.py
sckevmit/profiling
824ae554b35909ecbb8aead8853429573e70aeee
[ "BSD-3-Clause" ]
43
2015-02-06T11:16:40.000Z
2020-04-05T23:38:40.000Z
test/test_viewer.py
sckevmit/profiling
824ae554b35909ecbb8aead8853429573e70aeee
[ "BSD-3-Clause" ]
118
2015-01-12T04:53:26.000Z
2021-01-29T06:15:43.000Z
# -*- coding: utf-8 -*- from profiling.viewer import fmt def test_fmt(): assert fmt.markup_percent(1.00) == ('danger', '100') assert fmt.markup_percent(0.80) == ('caution', '80.0') assert fmt.markup_percent(0.50) == ('warning', '50.0') assert fmt.markup_percent(0.20) == ('notice', '20.0') assert f...
37.137931
67
0.632776
from profiling.viewer import fmt def test_fmt(): assert fmt.markup_percent(1.00) == ('danger', '100') assert fmt.markup_percent(0.80) == ('caution', '80.0') assert fmt.markup_percent(0.50) == ('warning', '50.0') assert fmt.markup_percent(0.20) == ('notice', '20.0') assert fmt.markup_percent(0.05) ...
true
true
f77ace6cfd688609481e6bdb241b243eacc0baf5
650
py
Python
utils/rsa-encrypt.py
yezz123/Athena
7924e61b459811ec3602d1ed9d0a2dca144491ed
[ "MIT" ]
41
2021-03-26T17:07:16.000Z
2022-02-14T23:09:38.000Z
utils/rsa-encrypt.py
GDGSNF/Athena
7924e61b459811ec3602d1ed9d0a2dca144491ed
[ "MIT" ]
25
2021-03-26T23:41:02.000Z
2021-09-17T16:23:30.000Z
utils/rsa-encrypt.py
GDGSNF/Athena
7924e61b459811ec3602d1ed9d0a2dca144491ed
[ "MIT" ]
9
2020-10-16T00:33:30.000Z
2021-03-03T23:37:25.000Z
#!/usr/bin/env python3 import sys from binascii import hexlify from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes, serialization from cryptography.hazmat.primitives.asymmetric import padding msg = sys.argv[1].encode() with open("/tmp/gdgsnf.pub", "rb") as key_...
24.074074
64
0.726154
import sys from binascii import hexlify from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes, serialization from cryptography.hazmat.primitives.asymmetric import padding msg = sys.argv[1].encode() with open("/tmp/gdgsnf.pub", "rb") as key_file: public_key = ...
true
true
f77ace9b0f2afbed06400169303f56e2c3c97452
166
py
Python
monoplySolutions/monoplySolutions/urls.py
CCecilia/MonoplyPropertySoltuions
6445fa8a2622fbba2812dc49dd1f20d41b2e2e2d
[ "MIT" ]
null
null
null
monoplySolutions/monoplySolutions/urls.py
CCecilia/MonoplyPropertySoltuions
6445fa8a2622fbba2812dc49dd1f20d41b2e2e2d
[ "MIT" ]
null
null
null
monoplySolutions/monoplySolutions/urls.py
CCecilia/MonoplyPropertySoltuions
6445fa8a2622fbba2812dc49dd1f20d41b2e2e2d
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('', include('website.urls')), path('admin/', admin.site.urls), ]
20.75
38
0.686747
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('', include('website.urls')), path('admin/', admin.site.urls), ]
true
true
f77aceb07ee412d22a43f84380954b31b5e41d3b
3,047
py
Python
lib/config.py
SovCoinX/sentinel
bff6d3aee7a83ecceb96e1b686c1485f2d8cc791
[ "MIT" ]
null
null
null
lib/config.py
SovCoinX/sentinel
bff6d3aee7a83ecceb96e1b686c1485f2d8cc791
[ "MIT" ]
null
null
null
lib/config.py
SovCoinX/sentinel
bff6d3aee7a83ecceb96e1b686c1485f2d8cc791
[ "MIT" ]
1
2019-05-20T19:39:40.000Z
2019-05-20T19:39:40.000Z
""" Set up defaults and read sentinel.conf """ import sys import os from sov_config import SovereignConfig default_sentinel_config = os.path.normpath( os.path.join(os.path.dirname(__file__), '../sentinel.conf') ) sentinel_config_file = os.environ.get('SENTINEL_CONFIG', default_sentinel_config) sentinel_cfg = S...
28.476636
95
0.665901
import sys import os from sov_config import SovereignConfig default_sentinel_config = os.path.normpath( os.path.join(os.path.dirname(__file__), '../sentinel.conf') ) sentinel_config_file = os.environ.get('SENTINEL_CONFIG', default_sentinel_config) sentinel_cfg = SovereignConfig.tokenize(sentinel_config_file) senti...
true
true
f77acf0b788d566e36eb2b973cca8a89cd151a3f
14,782
py
Python
backend/metadata_writer/src/metadata_helpers.py
shrivs3/kfp-tekton
b7c1d542d43ea24e70f24a874a7c972199e8f976
[ "Apache-2.0" ]
102
2019-10-23T20:35:41.000Z
2022-03-27T10:28:56.000Z
backend/metadata_writer/src/metadata_helpers.py
shrivs3/kfp-tekton
b7c1d542d43ea24e70f24a874a7c972199e8f976
[ "Apache-2.0" ]
891
2019-10-24T04:08:17.000Z
2022-03-31T22:45:40.000Z
backend/metadata_writer/src/metadata_helpers.py
shrivs3/kfp-tekton
b7c1d542d43ea24e70f24a874a7c972199e8f976
[ "Apache-2.0" ]
85
2019-10-24T04:04:36.000Z
2022-03-01T10:52:57.000Z
# Copyright 2019 The Kubeflow 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 agreed to in...
34.618267
146
0.702408
import json import os import sys import ml_metadata from time import sleep from ml_metadata.proto import metadata_store_pb2 from ml_metadata.metadata_store import metadata_store from ipaddress import ip_address, IPv4Address def value_to_mlmd_value(value) -> metadata_store_pb2.Value: if value is None: retu...
true
true
f77acfb6e2a9658f0fc3dbe832e03934746d81fd
9,162
py
Python
biostar/forum/api.py
tangibleai/biostar-central
8c1cce4d3d95d49071db8ec225aa88a66b0b3910
[ "MIT" ]
477
2015-01-01T00:18:54.000Z
2022-03-21T10:29:29.000Z
biostar/forum/api.py
tangibleai/biostar-central
8c1cce4d3d95d49071db8ec225aa88a66b0b3910
[ "MIT" ]
247
2015-01-02T08:12:03.000Z
2022-02-24T15:20:58.000Z
biostar/forum/api.py
tangibleai/biostar-central
8c1cce4d3d95d49071db8ec225aa88a66b0b3910
[ "MIT" ]
251
2015-01-01T16:05:57.000Z
2022-03-25T21:32:44.000Z
import json import os import logging from os.path import join, normpath from django.core.cache import cache from django.conf import settings from datetime import datetime, timedelta from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from biostar.accounts.models import Profile, U...
26.71137
114
0.63305
import json import os import logging from os.path import join, normpath from django.core.cache import cache from django.conf import settings from datetime import datetime, timedelta from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from biostar.accounts.models import Profile, U...
true
true
f77ad19a6e44963cdce5a981c249071cc5d8ff12
30,737
py
Python
venv/lib/python2.7/site-packages/astroid/inference.py
zwachtel11/fruitful-backend
45b8994917182e7b684b9e25944cc79c9494c9f3
[ "MIT" ]
5
2017-11-15T10:33:42.000Z
2021-11-16T02:21:31.000Z
venv/lib/python2.7/site-packages/astroid/inference.py
zwachtel11/fruitful-backend
45b8994917182e7b684b9e25944cc79c9494c9f3
[ "MIT" ]
26
2020-03-24T18:07:06.000Z
2022-03-12T00:12:27.000Z
venv/lib/python2.7/site-packages/astroid/inference.py
zwachtel11/fruitful-backend
45b8994917182e7b684b9e25944cc79c9494c9f3
[ "MIT" ]
6
2017-11-30T00:34:20.000Z
2021-05-20T02:58:02.000Z
# Copyright (c) 2006-2011, 2013-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2013-2014 Google, Inc. # Copyright (c) 2014-2016 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2015-2016 Cara Vinson <ceridwenv@gmail.com> # Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/l...
37.621787
91
0.641995
import functools import itertools import operator from astroid import bases from astroid import context as contextmod from astroid import exceptions from astroid import decorators from astroid import helpers from astroid import manager from astroid import nodes from astroid.interpreter import dunder_lookup from ast...
true
true
f77ad1c2cb7267097aaa97ec1e66f9e33570774f
2,119
py
Python
uwallet/constants.py
JustinQP/Uwallet
00c9390cda80c7a46796a700d478ebbe7874da25
[ "MIT" ]
null
null
null
uwallet/constants.py
JustinQP/Uwallet
00c9390cda80c7a46796a700d478ebbe7874da25
[ "MIT" ]
null
null
null
uwallet/constants.py
JustinQP/Uwallet
00c9390cda80c7a46796a700d478ebbe7874da25
[ "MIT" ]
null
null
null
RECOMMENDED_FEE = 50000 COINBASE_MATURITY = 100 COIN = 100000000 # supported types of transaction outputs TYPE_ADDRESS = 1 TYPE_PUBKEY = 2 TYPE_SCRIPT = 4 TYPE_CLAIM = 8 TYPE_SUPPORT = 16 TYPE_UPDATE = 32 # claim related constants EXPIRATION_BLOCKS = 262974 RECOMMENDED_CLAIMTRIE_HASH_CONFIRMS = 1 NO_...
32.6
95
0.691836
RECOMMENDED_FEE = 50000 COINBASE_MATURITY = 100 COIN = 100000000 TYPE_ADDRESS = 1 TYPE_PUBKEY = 2 TYPE_SCRIPT = 4 TYPE_CLAIM = 8 TYPE_SUPPORT = 16 TYPE_UPDATE = 32 EXPIRATION_BLOCKS = 262974 RECOMMENDED_CLAIMTRIE_HASH_CONFIRMS = 1 NO_SIGNATURE = 'ff' NULL_HASH = '000000000000000000000000000000000000...
true
true
f77ad2fbec45e6eb1e8c4cf3ae6272c2cff3cb90
8,395
py
Python
workflows/cloudify_system_workflows/snapshots/credentials.py
ilan-WS/cloudify-manager
510d8a277c848db351f38fc5b264806b2cb36d0b
[ "Apache-2.0" ]
null
null
null
workflows/cloudify_system_workflows/snapshots/credentials.py
ilan-WS/cloudify-manager
510d8a277c848db351f38fc5b264806b2cb36d0b
[ "Apache-2.0" ]
2
2021-05-31T15:12:21.000Z
2021-05-31T19:03:05.000Z
workflows/cloudify_system_workflows/snapshots/credentials.py
ilan-WS/cloudify-manager
510d8a277c848db351f38fc5b264806b2cb36d0b
[ "Apache-2.0" ]
null
null
null
######## # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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...
36.820175
79
0.593806
import os import re import pickle import shutil import string import itertools from cloudify._compat import text_type from cloudify.manager import get_rest_client from cloudify.workflows import ctx from .constants import V_4_1_0, SECRET_STORE_AGENT_KEY_PREFIX from .utils import is_compute, run, get_dep_contexts, get...
true
true
f77ad375726261ecdeba2b2f211e658a2573c3f0
2,250
py
Python
common/xrd-ui-tests-python/tests/xroad_cs_ocsp_responder/XroadDeleteOcspResponder.py
nordic-institute/X-Road-tests
e030661a0ad8ceab74dd8122b751e88025a3474a
[ "MIT" ]
1
2019-02-09T00:16:54.000Z
2019-02-09T00:16:54.000Z
common/xrd-ui-tests-python/tests/xroad_cs_ocsp_responder/XroadDeleteOcspResponder.py
nordic-institute/X-Road-tests
e030661a0ad8ceab74dd8122b751e88025a3474a
[ "MIT" ]
1
2018-06-06T08:33:32.000Z
2018-06-06T08:33:32.000Z
common/xrd-ui-tests-python/tests/xroad_cs_ocsp_responder/XroadDeleteOcspResponder.py
nordic-institute/X-Road-tests
e030661a0ad8ceab74dd8122b751e88025a3474a
[ "MIT" ]
3
2018-07-09T08:51:00.000Z
2020-07-23T18:40:24.000Z
import unittest from main.maincontroller import MainController import ocsp_responder class XroadDeleteOcspResponder(unittest.TestCase): """ TRUST_11 Delete an OCSP Responder of a CA RIA URL: https://jira.ria.ee/browse/XT-437, https://jira.ria.ee/browse/XTKB-67 Depends on finishing other test(...
38.135593
107
0.556889
import unittest from main.maincontroller import MainController import ocsp_responder class XroadDeleteOcspResponder(unittest.TestCase): def __init__(self, methodName='test_xroad_delete_ocsp_responder'): unittest.TestCase.__init__(self, methodName) def test_xroad_delete_ocsp_responder(self): ...
true
true
f77ad38211a519424054de39126f929ce8aa4fbc
1,425
py
Python
app/api.py
eugenekoran/twitter_disaster_project
addb719ff68418a9e2a51c520c67c86e84bcf1f4
[ "MIT" ]
2
2018-01-19T07:31:05.000Z
2018-10-16T13:03:54.000Z
app/api.py
eugenekoran/twitter_disaster_project
addb719ff68418a9e2a51c520c67c86e84bcf1f4
[ "MIT" ]
null
null
null
app/api.py
eugenekoran/twitter_disaster_project
addb719ff68418a9e2a51c520c67c86e84bcf1f4
[ "MIT" ]
null
null
null
# encoding: utf-8 from flask import Flask from flask_restful import Resource, Api from flask_restful import reqparse import cPickle as pickle from keras.preprocessing import sequence from keras.preprocessing.text import Tokenizer from utils import load_production_model app = Flask(__name__) api = Api(app) with open...
27.403846
80
0.666667
from flask import Flask from flask_restful import Resource, Api from flask_restful import reqparse import cPickle as pickle from keras.preprocessing import sequence from keras.preprocessing.text import Tokenizer from utils import load_production_model app = Flask(__name__) api = Api(app) with open('tokenizer.pkl', ...
false
true
f77ad416b29d1807fda87f5feb478ddb1e39ec3e
6,422
py
Python
mmdet/models/backbones/imgclsmob.py
morkovka1337/mmdetection
5187d94b6c96084b17817249622d6e4520213ae6
[ "Apache-2.0" ]
58
2020-09-21T08:17:26.000Z
2022-03-31T19:38:14.000Z
mmdet/models/backbones/imgclsmob.py
morkovka1337/mmdetection
5187d94b6c96084b17817249622d6e4520213ae6
[ "Apache-2.0" ]
170
2020-09-08T12:29:06.000Z
2022-03-31T18:28:09.000Z
mmdet/models/backbones/imgclsmob.py
morkovka1337/mmdetection
5187d94b6c96084b17817249622d6e4520213ae6
[ "Apache-2.0" ]
21
2020-10-06T13:49:41.000Z
2022-03-30T14:52:45.000Z
# Copyright (C) 2020-2021 Intel 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 agreed to i...
44.597222
136
0.527562
import logging import os import tempfile import torch.nn as nn from pytorchcv.model_provider import _models from pytorchcv.models.model_store import download_model from torch import distributed from torch.nn.modules.batchnorm import _BatchNorm from mmcv.runner import get_dist_info from mmdet.utils.logger import get_...
true
true
f77ad5ae4387fcda9f3483eee01db84f620db24b
7,912
py
Python
src/main.py
riseup32/XLNetSumExtAbs
61fcaa8ca9004f65753b6393ff63b155fc62536f
[ "MIT" ]
null
null
null
src/main.py
riseup32/XLNetSumExtAbs
61fcaa8ca9004f65753b6393ff63b155fc62536f
[ "MIT" ]
null
null
null
src/main.py
riseup32/XLNetSumExtAbs
61fcaa8ca9004f65753b6393ff63b155fc62536f
[ "MIT" ]
null
null
null
import easydict import os import time import re import warnings from selenium import webdriver from others.logging import init_logger from train_abstractive import validate_abs, train_abs, baseline, test_abs, test_text_abs from train_extractive import train_ext, validate_ext, test_ext, test_text_ext url = "https://ed...
27.09589
125
0.571031
import easydict import os import time import re import warnings from selenium import webdriver from others.logging import init_logger from train_abstractive import validate_abs, train_abs, baseline, test_abs, test_text_abs from train_extractive import train_ext, validate_ext, test_ext, test_text_ext url = "https://ed...
true
true
f77ad731fbe42c44acccfc5bd5aae1262f6e661e
6,294
py
Python
posthog/api/test/test_feature_flag.py
satheesh1997/posthog
dead5d895f7859f91d67d61775890050a90ec694
[ "MIT" ]
null
null
null
posthog/api/test/test_feature_flag.py
satheesh1997/posthog
dead5d895f7859f91d67d61775890050a90ec694
[ "MIT" ]
null
null
null
posthog/api/test/test_feature_flag.py
satheesh1997/posthog
dead5d895f7859f91d67d61775890050a90ec694
[ "MIT" ]
null
null
null
from unittest.mock import patch from rest_framework import status from posthog.models import FeatureFlag, User from .base import APIBaseTest, TransactionBaseTest class TestFeatureFlag(TransactionBaseTest): TESTS_API = True def test_key_exists(self): feature_flag = self.client.post( "/a...
41.137255
119
0.624086
from unittest.mock import patch from rest_framework import status from posthog.models import FeatureFlag, User from .base import APIBaseTest, TransactionBaseTest class TestFeatureFlag(TransactionBaseTest): TESTS_API = True def test_key_exists(self): feature_flag = self.client.post( "/a...
true
true
f77ad8345937f3609e828a9aef6fdcffd44c4ab3
496
py
Python
test/utils.py
TTitcombe/tfShell2
a95cbc6cb1f2168c1ea51096dcfb9e4a8e33d699
[ "MIT" ]
null
null
null
test/utils.py
TTitcombe/tfShell2
a95cbc6cb1f2168c1ea51096dcfb9e4a8e33d699
[ "MIT" ]
5
2019-04-23T11:41:48.000Z
2019-04-26T07:48:10.000Z
test/utils.py
TTitcombe/tfShell2
a95cbc6cb1f2168c1ea51096dcfb9e4a8e33d699
[ "MIT" ]
null
null
null
import tensorflow as tf class MockModel(tf.keras.Model): """ A Mock keras model to test basic tester functionality. This model only has one variable: a weight matrix of shape 2x1. This model accepts 2-dimensional input data and outputs 1-d data """ def __init__(self): super(MockModel, ...
31
68
0.681452
import tensorflow as tf class MockModel(tf.keras.Model): def __init__(self): super(MockModel, self).__init__() self.weight = tf.Variable(tf.ones((2, 1)), dtype=tf.float32) def call(self, input_data): return tf.linalg.matmul(input_data, self.weight)
true
true
f77ad99885a464dec0c4fcbd0a44bd6ae4660261
7,927
py
Python
aiuti/tests/test_filelock.py
aiudirog/Aiuti
ef3aec72d8b42074f9f4b84b30631745b09bde89
[ "MIT" ]
1
2021-05-21T16:34:24.000Z
2021-05-21T16:34:24.000Z
aiuti/tests/test_filelock.py
aiudirog/Aiuti
ef3aec72d8b42074f9f4b84b30631745b09bde89
[ "MIT" ]
3
2021-12-19T22:45:43.000Z
2022-02-28T19:44:46.000Z
aiuti/tests/test_filelock.py
aiudirog/Aiuti
ef3aec72d8b42074f9f4b84b30631745b09bde89
[ "MIT" ]
null
null
null
""" Tests adapted and expanded from: https://github.com/benediktschmitt/py-filelock/blob /b30bdc4fb998f5f4350257235eb51147f9e81862/test.py """ import gc from pathlib import Path from itertools import repeat, chain from concurrent.futures import ThreadPoolExecutor import pytest from aiuti.filelock import FileLock fro...
25.570968
79
0.673773
import gc from pathlib import Path from itertools import repeat, chain from concurrent.futures import ThreadPoolExecutor import pytest from aiuti.filelock import FileLock from aiuti.typing import Yields @pytest.fixture def lock_file(tmp_path: Path) -> Yields[str]: lock_file = tmp_path / 'file.lock' if lock...
true
true