hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
209
max_issues_repo_name
stringlengths
5
121
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
209
max_forks_repo_name
stringlengths
5
121
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
411981c69d25299d4317dcf18a801f1135b8878b
323
py
Python
people/migrations/0009_remove_image_img.py
bethwelkip/IG-Clone
84a763de4985a446863dcbb7a954460c1015b880
[ "MIT" ]
null
null
null
people/migrations/0009_remove_image_img.py
bethwelkip/IG-Clone
84a763de4985a446863dcbb7a954460c1015b880
[ "MIT" ]
null
null
null
people/migrations/0009_remove_image_img.py
bethwelkip/IG-Clone
84a763de4985a446863dcbb7a954460c1015b880
[ "MIT" ]
null
null
null
# Generated by Django 3.1.3 on 2020-11-22 22:06 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('people', '0008_auto_20201122_2155'), ] operations = [ migrations.RemoveField( model_name='image', name='img', ), ...
17.944444
47
0.585139
e70270d8890327fc5d13ac42bf7e5ebcccc8de67
2,681
py
Python
accounts/forms.py
sammiearchie77/fpt-bank
93c4a9b8ec3e88470fcdcaa2b41a5249cd6797a0
[ "MIT" ]
null
null
null
accounts/forms.py
sammiearchie77/fpt-bank
93c4a9b8ec3e88470fcdcaa2b41a5249cd6797a0
[ "MIT" ]
null
null
null
accounts/forms.py
sammiearchie77/fpt-bank
93c4a9b8ec3e88470fcdcaa2b41a5249cd6797a0
[ "MIT" ]
null
null
null
from django import forms from django.conf import settings from django.contrib.auth.forms import UserCreationForm from django.db import transaction from .models import User, BankAccountType, UserBankAccount, UserAddress from .constants import GENDER_CHOICE class UserAddressForm(forms.ModelForm): class...
30.816092
72
0.522566
a687ae530c334456ddaa0437c39e4911977f0713
197
py
Python
Week 7/Tutorial/Q3.py
Lmao5/Data-Structures-Algorithms
b702cf8b11bc25c2a1c06ae540553c47fa7b9d6b
[ "Unlicense" ]
null
null
null
Week 7/Tutorial/Q3.py
Lmao5/Data-Structures-Algorithms
b702cf8b11bc25c2a1c06ae540553c47fa7b9d6b
[ "Unlicense" ]
null
null
null
Week 7/Tutorial/Q3.py
Lmao5/Data-Structures-Algorithms
b702cf8b11bc25c2a1c06ae540553c47fa7b9d6b
[ "Unlicense" ]
null
null
null
def main(): y = foo(4) bar(2) def foo(x): if x % 2 != 0: return 0 else: return x + foo(x-1) def bar(n): if n > 0: bar(n-1) print(n) main()
9.85
27
0.390863
76be79da2995d7f592d0f2c30b3b58b19808e8be
742
py
Python
recipes/Python/435757_use_getattr_fake_unlimited_depth/recipe-435757.py
tdiprima/code
61a74f5f93da087d27c70b2efe779ac6bd2a3b4f
[ "MIT" ]
2,023
2017-07-29T09:34:46.000Z
2022-03-24T08:00:45.000Z
recipes/Python/435757_use_getattr_fake_unlimited_depth/recipe-435757.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
32
2017-09-02T17:20:08.000Z
2022-02-11T17:49:37.000Z
recipes/Python/435757_use_getattr_fake_unlimited_depth/recipe-435757.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
780
2017-07-28T19:23:28.000Z
2022-03-25T20:39:41.000Z
class MagicObject: def __call__(self,*args,**kwargs): return MagicObject.__dict__['_stop'](self,self.n,*args,**kwargs) def __getattr__(self,name): if name in ('__str__','__repr__'): return lambda:'instance of %s at %s' % (str(self.__class__),id(self)) if not self.__dict__.has_key('n'):...
29.68
112
0.543127
c6b0103be0538542f4e7a5c2267582a8929204b7
3,426
py
Python
floreria/floreria/settings.py
Oswaldinho24k/Floreria
2edaedec73548250147688052dd2016c79ec21fb
[ "MIT" ]
null
null
null
floreria/floreria/settings.py
Oswaldinho24k/Floreria
2edaedec73548250147688052dd2016c79ec21fb
[ "MIT" ]
null
null
null
floreria/floreria/settings.py
Oswaldinho24k/Floreria
2edaedec73548250147688052dd2016c79ec21fb
[ "MIT" ]
null
null
null
""" Django settings for floreria project. Generated by 'django-admin startproject' using Django 1.10.3. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import o...
25.759398
91
0.690018
ae1dbe12012159f2b6ea172d24e5d3f5c28e2e5a
3,144
py
Python
test/nnUNetV1/loss_functions/lovasz_loss.py
jianhuasong/medical-image-segmentation2
cd13caeff4b583b30ee85df340e877463fcadd06
[ "Apache-2.0" ]
2,774
2019-05-31T02:32:52.000Z
2022-03-31T02:03:10.000Z
test/nnUNetV1/loss_functions/lovasz_loss.py
shenlong95/SegLoss
f3c1188ab32a0920be9f871e99418bc3a4f02291
[ "Apache-2.0" ]
36
2019-08-21T00:50:43.000Z
2022-02-17T12:12:50.000Z
test/nnUNetV1/loss_functions/lovasz_loss.py
shenlong95/SegLoss
f3c1188ab32a0920be9f871e99418bc3a4f02291
[ "Apache-2.0" ]
497
2019-08-02T09:23:23.000Z
2022-03-30T12:54:44.000Z
import torch import torch.nn as nn #from torch.autograd import Function def lovasz_grad(gt_sorted): """ Computes gradient of the Lovasz extension w.r.t sorted errors See Alg. 1 in paper """ p = len(gt_sorted) gts = gt_sorted.sum() intersection = gts - gt_sorted.float().cumsum(0) union...
31.757576
106
0.596692
2bb810bdba7be9525564fb62e474d9ebc002a9f6
537
py
Python
solution/greedy/2812/main.py
jungyoonoh/baekjoon-1
2b4437a4b5e06244fa47fae6c7b7be0157d0f94f
[ "MIT" ]
2,236
2019-08-05T00:36:59.000Z
2022-03-31T16:03:53.000Z
solution/greedy/2812/main.py
jungyoonoh/baekjoon-1
2b4437a4b5e06244fa47fae6c7b7be0157d0f94f
[ "MIT" ]
225
2020-12-17T10:20:45.000Z
2022-01-05T17:44:16.000Z
solution/greedy/2812/main.py
jungyoonoh/baekjoon-1
2b4437a4b5e06244fa47fae6c7b7be0157d0f94f
[ "MIT" ]
602
2019-08-05T00:46:25.000Z
2022-03-31T13:38:23.000Z
# Authored by : cieske # Co-authored by : - # Link : http://boj.kr/632e2f63fb4a44caacbddb53207f2279 import sys def input(): return sys.stdin.readline().rstrip() n, k = map(int, input().split()) t = k # 미래를 위해 저장 num = list(input()) stack = [] # 정답 저장 및 지울 후보 저장 for i in range(n): while k>0 and stack: # 지울 수 있...
24.409091
61
0.554935
2e6087af1c0e2d6c476191326766ce9747b91ec3
483
py
Python
env/lib/python3.8/site-packages/plotly/validators/layout/scene/annotation/_bordercolor.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
env/lib/python3.8/site-packages/plotly/validators/layout/scene/annotation/_bordercolor.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
env/lib/python3.8/site-packages/plotly/validators/layout/scene/annotation/_bordercolor.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import _plotly_utils.basevalidators class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="layout.scene.annotation", **kwargs ): super(BordercolorValidator, self).__init__( plotly_name=plotly_name, ...
32.2
88
0.650104
8666a5aa92f1901d57acb84ba69e76f10bd1c27f
6,098
py
Python
libs/trimap_module.py
chris-rgr/image-background-remove-tool
b57b44099e0e35c90833bed010b071aa39efdc80
[ "Apache-2.0" ]
null
null
null
libs/trimap_module.py
chris-rgr/image-background-remove-tool
b57b44099e0e35c90833bed010b071aa39efdc80
[ "Apache-2.0" ]
null
null
null
libs/trimap_module.py
chris-rgr/image-background-remove-tool
b57b44099e0e35c90833bed010b071aa39efdc80
[ "Apache-2.0" ]
null
null
null
""" Name: Trimap Module Description: This file contains Trimap generation functions. Source url: https://github.com/lnugraha/trimap_generator Modified by Anodev (OPHoperHPO)[https://github.com/OPHoperHPO]. License: MIT License License: Copyright (c) 2019 Leo Nugraha Permission is hereby granted, free of charge...
36.08284
107
0.61512
2248d01d0f85fe48aaa1a62be827fa629ae2008e
12,947
py
Python
util/eval_utils.py
zyxia1009/OadTR
ec6e4dafcb465719e80cbf39dcd2099e51927d51
[ "MIT" ]
53
2021-06-21T14:31:54.000Z
2022-03-30T14:37:49.000Z
util/eval_utils.py
zyxia1009/OadTR
ec6e4dafcb465719e80cbf39dcd2099e51927d51
[ "MIT" ]
15
2021-06-23T06:06:12.000Z
2022-03-25T14:30:30.000Z
util/eval_utils.py
zyxia1009/OadTR
ec6e4dafcb465719e80cbf39dcd2099e51927d51
[ "MIT" ]
9
2021-06-27T04:29:56.000Z
2022-03-29T07:25:53.000Z
import os import os.path as osp import json from collections import OrderedDict import numpy as np from sklearn.metrics import average_precision_score from sklearn.metrics import confusion_matrix __all__ = [ 'compute_result_multilabel', 'compute_result_multilabel_test', 'compute_result', 'frame_level_m...
42.44918
126
0.580057
c1bd0e8b56893b34b8b0b0653b71b0ca2b018bb0
2,375
py
Python
lapis_tests/storage_io/test_storage.py
MatterMiners/lapis.caching
f03de0a174542a38e17fca1a9a5f44b09009444c
[ "MIT" ]
null
null
null
lapis_tests/storage_io/test_storage.py
MatterMiners/lapis.caching
f03de0a174542a38e17fca1a9a5f44b09009444c
[ "MIT" ]
28
2020-10-20T09:45:43.000Z
2021-06-23T05:47:38.000Z
lapis_tests/storage_io/test_storage.py
MatterMiners/lapis.caching
f03de0a174542a38e17fca1a9a5f44b09009444c
[ "MIT" ]
null
null
null
from tempfile import NamedTemporaryFile from lapis.caching.storageelement import StorageElement from lapis.storage_io.storage import storage_reader class TestStorageReader(object): def _create_simple_config(self, to_string=False): storage_config = NamedTemporaryFile(suffix=".csv") with open(stora...
40.254237
83
0.586105
5dfa0a0a7d8dc08a0484473911621b9ba6054316
765
py
Python
myproject/myproject/urls.py
carpincho/django-startproject
f2521dd3d5b7f604e9c15f8405fd4178cba84f9f
[ "MIT" ]
4
2018-01-17T06:51:24.000Z
2019-05-01T15:45:17.000Z
myproject/urls.py
thinkAmi-sandbox/Django_pytest_setup_teardown_fixture-sample
f47f9dcf35f7b401ed173ce9535308ea6b4f455e
[ "Unlicense" ]
null
null
null
myproject/urls.py
thinkAmi-sandbox/Django_pytest_setup_teardown_fixture-sample
f47f9dcf35f7b401ed173ce9535308ea6b4f455e
[ "Unlicense" ]
3
2018-04-04T06:54:08.000Z
2019-03-06T02:31:16.000Z
"""myproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-b...
34.772727
79
0.704575
42fc9527c39fdc486d943415fa9275b47c6a4086
1,675
py
Python
BioClients/pubtator/Utils.py
jeremyjyang/BioClients
b78ab2b948c79616fed080112e31d383346bec58
[ "CC0-1.0" ]
10
2020-05-26T07:29:14.000Z
2021-12-06T21:33:40.000Z
BioClients/pubtator/Utils.py
jeremyjyang/BioClients
b78ab2b948c79616fed080112e31d383346bec58
[ "CC0-1.0" ]
1
2021-10-05T12:25:30.000Z
2021-10-05T17:05:56.000Z
BioClients/pubtator/Utils.py
jeremyjyang/BioClients
b78ab2b948c79616fed080112e31d383346bec58
[ "CC0-1.0" ]
2
2021-03-16T03:20:24.000Z
2021-08-08T20:17:10.000Z
#!/usr/bin/env python3 ### import sys,os,time,json,argparse,re,logging # from ..util import rest # ############################################################################# def GetAnnotations(base_url, mode, pmids, fout): n_assn=0; n_hit=0; fout.write('sourcedb\tsourceid\tbegin\tend\tobj_type\tobj\n') for pmi...
39.880952
99
0.569552
362e5feaa81586c6005586b782dcd05a49f4bc8a
1,407
py
Python
test/rostest/test_server/test_remapping.py
fravizel/capabilities
d170f764d6687c439807b4874261ff34eb8c9a50
[ "BSD-3-Clause" ]
7
2016-08-11T18:57:54.000Z
2021-08-12T15:50:12.000Z
test/rostest/test_server/test_remapping.py
fravizel/capabilities
d170f764d6687c439807b4874261ff34eb8c9a50
[ "BSD-3-Clause" ]
18
2015-04-30T15:07:03.000Z
2022-02-01T13:30:06.000Z
test/rostest/test_server/test_remapping.py
fravizel/capabilities
d170f764d6687c439807b4874261ff34eb8c9a50
[ "BSD-3-Clause" ]
12
2015-07-17T03:09:44.000Z
2022-01-25T10:52:24.000Z
#!/usr/bin/env python from __future__ import print_function import unittest import rostest import rospy from rospy.service import ServiceException from test_ros_services import assert_raises from test_ros_services import call_service TEST_NAME = 'test_remapping' class Test(unittest.TestCase): def test_remap...
39.083333
106
0.7285
9e0f074d473ed910b72962219ed874ac40e0105f
3,303
py
Python
mgz/model/inputs.py
AoEInsights/aoc-mgz
6b7e10143d584fd50f4bd48518111c157b713ac8
[ "MIT" ]
null
null
null
mgz/model/inputs.py
AoEInsights/aoc-mgz
6b7e10143d584fd50f4bd48518111c157b713ac8
[ "MIT" ]
null
null
null
mgz/model/inputs.py
AoEInsights/aoc-mgz
6b7e10143d584fd50f4bd48518111c157b713ac8
[ "MIT" ]
null
null
null
"""Refine player actions into inputs.""" from mgz.fast import Action as ActionEnum from mgz.model.definitions import Input ACTION_TRANSLATE = { ActionEnum.DE_QUEUE: 'Queue', ActionEnum.DE_ATTACK_MOVE: 'Attack Move' } class Inputs: """Normalize player inputs.""" def __init__(self, gaia): ""...
40.280488
125
0.603088
f3c4eac87c9b425dec41fc2bc3b7373e8dac7603
404
py
Python
tests/regressions/python/808_print_twice.py
frzfrsfra4/phylanx
001fe7081f3a24e56157cdb21b2d126b8953ff5d
[ "BSL-1.0" ]
83
2017-08-27T15:09:13.000Z
2022-01-18T17:03:41.000Z
tests/regressions/python/808_print_twice.py
frzfrsfra4/phylanx
001fe7081f3a24e56157cdb21b2d126b8953ff5d
[ "BSL-1.0" ]
808
2017-08-27T15:35:01.000Z
2021-12-14T17:30:50.000Z
tests/regressions/python/808_print_twice.py
frzfrsfra4/phylanx
001fe7081f3a24e56157cdb21b2d126b8953ff5d
[ "BSL-1.0" ]
55
2017-08-27T15:09:22.000Z
2022-03-25T12:07:34.000Z
# Copyright (c) 2019 Steven R. Brandt # # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) from phylanx import Phylanx from phylanx.util import debug_output def debug(s): # silence flake pass @Phylanx def ...
16.16
79
0.70297
1b1803e109ed195bfdcfcb9df4d9e6ae796ac5e3
829
py
Python
network/__init__.py
jamiecook/AequilibraE
b1013d59cbeaf6fc4e1a944cf31f20460a2a4156
[ "MIT" ]
null
null
null
network/__init__.py
jamiecook/AequilibraE
b1013d59cbeaf6fc4e1a944cf31f20460a2a4156
[ "MIT" ]
null
null
null
network/__init__.py
jamiecook/AequilibraE
b1013d59cbeaf6fc4e1a944cf31f20460a2a4156
[ "MIT" ]
null
null
null
""" ----------------------------------------------------------------------------------------------------------- Package: AequilibraE Name: AequilibraE NETWORK folder initializer (Dialogs and procedures) Purpose: Initialize plugin Original Author: Pedro Camargo (c@margo.co) Contributors: Last edite...
34.541667
108
0.577805
09ceaf8105f5770c1fe445d2c864a7b991ef0f5d
604
py
Python
Locators/checkout_information_locator.py
gykudo/sauce_demo
313b4bd956cad4807d225b0a7ed98ca0be9f3371
[ "MIT" ]
null
null
null
Locators/checkout_information_locator.py
gykudo/sauce_demo
313b4bd956cad4807d225b0a7ed98ca0be9f3371
[ "MIT" ]
null
null
null
Locators/checkout_information_locator.py
gykudo/sauce_demo
313b4bd956cad4807d225b0a7ed98ca0be9f3371
[ "MIT" ]
null
null
null
from selenium.webdriver.common.by import By class CheckoutInforLocator(object): FIRSTNAME_TEXTBOX = (By.XPATH, '//div[@class="checkout_info_container"]//input[@id="first-name"]') LASTNAME_TEXTBOX = (By.XPATH, '//div[@class="checkout_info_container"]//input[@id="last-name"]') POSTALCODE_TEXTBOX = (By.XPATH, '//d...
60.4
118
0.730132
e5a70ac775c89f4015dd6514cfc3692f42d45460
14,173
py
Python
nodeum_sdk/models/by_secondary_storage_facet.py
nodeum-io/nodeum-sdk-python
205536491bff507dea7be44af46202c17e7121d9
[ "MIT" ]
null
null
null
nodeum_sdk/models/by_secondary_storage_facet.py
nodeum-io/nodeum-sdk-python
205536491bff507dea7be44af46202c17e7121d9
[ "MIT" ]
null
null
null
nodeum_sdk/models/by_secondary_storage_facet.py
nodeum-io/nodeum-sdk-python
205536491bff507dea7be44af46202c17e7121d9
[ "MIT" ]
null
null
null
# coding: utf-8 """ Nodeum API The Nodeum API makes it easy to tap into the digital data mesh that runs across your organisation. Make requests to our API endpoints and we’ll give you everything you need to interconnect your business workflows with your storage. All production API requests are made to: http...
39.811798
2,886
0.677133
443a5c359fb38e8e3ebe7760fa301fe638fe5a75
75,436
py
Python
python/ccxt/poloniex.py
Dan-krm/ccxt
2ed8b7b8598e2934559822d81a8d14885b4d4ad3
[ "MIT" ]
null
null
null
python/ccxt/poloniex.py
Dan-krm/ccxt
2ed8b7b8598e2934559822d81a8d14885b4d4ad3
[ "MIT" ]
null
null
null
python/ccxt/poloniex.py
Dan-krm/ccxt
2ed8b7b8598e2934559822d81a8d14885b4d4ad3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import Authenticati...
42.764172
206
0.5149
35a10cff8d15360cf0f286ca558692c4bccaa683
3,704
py
Python
sidechainnet/structure/BatchedStructureBuilder.py
engomarwasfy/sidechainnet
6f111826985bdc9b1e3160f605eaf3016fd92590
[ "BSD-3-Clause" ]
2
2021-03-15T03:16:40.000Z
2021-03-15T03:16:42.000Z
sidechainnet/structure/BatchedStructureBuilder.py
SuperXiang/sidechainnet
cb6452689533c6a7fb4c055fb0af9739bc5415e2
[ "BSD-3-Clause" ]
null
null
null
sidechainnet/structure/BatchedStructureBuilder.py
SuperXiang/sidechainnet
cb6452689533c6a7fb4c055fb0af9739bc5415e2
[ "BSD-3-Clause" ]
null
null
null
from sidechainnet.dataloaders.collate import pad_for_batch from sidechainnet.utils.sequence import VOCAB from sidechainnet.structure.build_info import NUM_COORDS_PER_RES import sidechainnet as scn class BatchedStructureBuilder(object): # Assumes sequence of integers def __init__(self, seq_batch, ang_batch=N...
37.414141
90
0.643898
66fef8a3222abcf8d30fe584745da49970d66e67
8,856
py
Python
Lib/defcon/objects/guideline.py
typesupply/defcon
8e26c6f6d4d20db20f3eadb7659a4f1f1e7221b1
[ "MIT" ]
25
2015-03-05T13:56:01.000Z
2019-01-15T08:33:07.000Z
Lib/defcon/objects/guideline.py
typesupply/defcon
8e26c6f6d4d20db20f3eadb7659a4f1f1e7221b1
[ "MIT" ]
154
2015-07-05T15:55:47.000Z
2018-12-23T22:04:00.000Z
Lib/defcon/objects/guideline.py
typesupply/defcon
8e26c6f6d4d20db20f3eadb7659a4f1f1e7221b1
[ "MIT" ]
22
2015-09-09T01:55:39.000Z
2018-03-20T20:33:33.000Z
from __future__ import absolute_import import weakref from defcon.objects.base import BaseDictCompareObject from defcon.objects.color import Color from defcon.tools.identifiers import makeRandomIdentifier class Guideline(BaseDictCompareObject): """ This object represents a guideline. **This object posts...
32.321168
279
0.609756
6e5c254e5d44f63bf644fba8bf7685b23286bfc7
736
py
Python
CursoEmVideo/curso em video/ex39.py
elisio-ricardo/ExerciciosPythonCursoEmVideo
47a10b2118a76f4f95a762876ef9ab90e92f4fd3
[ "MIT" ]
null
null
null
CursoEmVideo/curso em video/ex39.py
elisio-ricardo/ExerciciosPythonCursoEmVideo
47a10b2118a76f4f95a762876ef9ab90e92f4fd3
[ "MIT" ]
null
null
null
CursoEmVideo/curso em video/ex39.py
elisio-ricardo/ExerciciosPythonCursoEmVideo
47a10b2118a76f4f95a762876ef9ab90e92f4fd3
[ "MIT" ]
null
null
null
from datetime import date anoN = int(input('Digite o seu ano de Nasimento: ')) anoA = date.today().year idade = anoA - anoN idadeF = 18 - idade idadeP = idade - 18 print('A sua idade atual é de {} anos no ano de {}.'.format(idade, anoA)) if idade < 18: ano = anoN + 18 print('Você ainda não esta na idade de alis...
43.294118
111
0.683424
1272c5dd61cab4df8a4a99c6bc72e62c8af75364
26,163
py
Python
src/vehicle.py
steviet91/furmulaone_source
ca738b271fa346da4234c5ffc781abc12a5ac49f
[ "MIT" ]
null
null
null
src/vehicle.py
steviet91/furmulaone_source
ca738b271fa346da4234c5ffc781abc12a5ac49f
[ "MIT" ]
24
2020-04-14T12:38:07.000Z
2020-04-29T08:18:33.000Z
src/vehicle.py
steviet91/furmulaone_source
ca738b271fa346da4234c5ffc781abc12a5ac49f
[ "MIT" ]
null
null
null
import json import os import numpy as np import time from copy import deepcopy from .track import Track from .geom import Circle from .geom import Line from .geom import check_for_intersection_lineseg_lineseg from .geom import calc_angle_between_unit_vectors from .lidar import Lidar class Vehicle(object): def __in...
43.532446
186
0.611474
04c7c5f7030c2edf83ee7e95b8438c4997fcd3f3
4,317
py
Python
test_terra_bonobo_nodes/tests/test_osm.py
Terralego/terra-bonobo-nodes
13b45348cd2becc9222dc6a77e0de68f7f6d60d4
[ "MIT" ]
1
2019-08-08T15:18:55.000Z
2019-08-08T15:18:55.000Z
test_terra_bonobo_nodes/tests/test_osm.py
Terralego/terra-bonobo-nodes
13b45348cd2becc9222dc6a77e0de68f7f6d60d4
[ "MIT" ]
14
2019-09-11T14:34:51.000Z
2022-03-10T10:33:07.000Z
test_terra_bonobo_nodes/tests/test_osm.py
Terralego/terra-bonobo-nodes
13b45348cd2becc9222dc6a77e0de68f7f6d60d4
[ "MIT" ]
null
null
null
import json import unittest from unittest import mock import requests from terra_bonobo_nodes import osm class Test_TestOsm_OverpassExtract(unittest.TestCase): def test_osm_overpassextract_logg_error(self): query = "query" request = requests.Session() overpassextract = osm.OverpassExtrac...
36.897436
87
0.631457
e8f1c5fe95fabaaaf769d88b8d1352b17f979618
848
py
Python
Algo and DSA/LeetCode-Solutions-master/Python/guess-number-higher-or-lower-ii.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
3,269
2018-10-12T01:29:40.000Z
2022-03-31T17:58:41.000Z
Algo and DSA/LeetCode-Solutions-master/Python/guess-number-higher-or-lower-ii.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
53
2018-12-16T22:54:20.000Z
2022-02-25T08:31:20.000Z
Algo and DSA/LeetCode-Solutions-master/Python/guess-number-higher-or-lower-ii.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
1,236
2018-10-12T02:51:40.000Z
2022-03-30T13:30:37.000Z
# Time: O(n^3) # Space: O(n^2) class Solution(object): def getMoneyAmount(self, n): """ :type n: int :rtype: int """ dp = [[0]*(n+1) for _ in xrange(n+1)] # dp[i][j]: min pay in [i+1, j+1) for j in xrange(n+1): for i in reversed(xrange(j-1)): ...
29.241379
87
0.445755
596db9fc1c7cd69cd04d14c2b625e4fdb06b7c52
276
py
Python
examples/spot/futures/futures_loan_repay_history.py
Banging12/binance-connector-python
dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b
[ "MIT" ]
512
2021-06-15T08:52:44.000Z
2022-03-31T09:49:53.000Z
examples/spot/futures/futures_loan_repay_history.py
Banging12/binance-connector-python
dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b
[ "MIT" ]
75
2021-06-20T13:49:50.000Z
2022-03-30T02:45:31.000Z
examples/spot/futures/futures_loan_repay_history.py
Banging12/binance-connector-python
dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b
[ "MIT" ]
156
2021-06-18T11:56:36.000Z
2022-03-29T16:34:22.000Z
#!/usr/bin/env python import logging from binance.spot import Spot as Client from binance.lib.utils import config_logging config_logging(logging, logging.DEBUG) key = "" secret = "" client = Client(key, secret) logging.info(client.futures_loan_repay_history(coin="USDT"))
19.714286
60
0.775362
e0c9d6462748c1b596ecc1064553e21a459feb16
139
py
Python
libkludge/__init__.py
zhangxiao6776/kludge
17a561f4b15399edd8175c883f8410a1b23c4d90
[ "BSD-3-Clause" ]
null
null
null
libkludge/__init__.py
zhangxiao6776/kludge
17a561f4b15399edd8175c883f8410a1b23c4d90
[ "BSD-3-Clause" ]
null
null
null
libkludge/__init__.py
zhangxiao6776/kludge
17a561f4b15399edd8175c883f8410a1b23c4d90
[ "BSD-3-Clause" ]
2
2017-12-01T20:44:14.000Z
2021-08-21T21:47:04.000Z
# # Copyright (c) 2010-2016, Fabric Software Inc. All rights reserved. # import discover import generate commands = [discover, generate]
15.444444
68
0.748201
dd914e3eea48a661588acf134d836acec0e25d42
4,704
py
Python
alttprbot/database/role.py
skyscooby/sahasrahbot
16fce824bd024f6357a8f260e2447ba477dcdac2
[ "MIT" ]
15
2019-10-15T21:35:59.000Z
2022-03-31T19:49:39.000Z
alttprbot/database/role.py
skyscooby/sahasrahbot
16fce824bd024f6357a8f260e2447ba477dcdac2
[ "MIT" ]
12
2019-10-06T01:33:13.000Z
2022-03-10T14:35:16.000Z
alttprbot/database/role.py
skyscooby/sahasrahbot
16fce824bd024f6357a8f260e2447ba477dcdac2
[ "MIT" ]
28
2019-11-25T23:49:56.000Z
2022-03-10T04:03:31.000Z
import aiocache from alttprbot.exceptions import SahasrahBotException from ..util import orm CACHE = aiocache.Cache(aiocache.SimpleMemoryCache) async def get_role_by_group_emoji(channel_id, message_id, emoji, guild_id): roles = await orm.select( 'SELECT rr.role_id from reaction_group rg LEFT J...
35.908397
191
0.663265
cca84c4f9d7b68d5e3d7176db5ba1f3ebf833469
59,308
py
Python
toontown/toon/InventoryNewOLD.py
philicheese2003/ToontownProjectAltisServer
cfa225d1bdddacdbd29b621382347fce17e1dc66
[ "Apache-2.0" ]
3
2020-01-02T08:43:36.000Z
2020-07-05T08:59:02.000Z
toontown/toon/InventoryNewOLD.py
philicheese2003/ToontownProjectAltisServer
cfa225d1bdddacdbd29b621382347fce17e1dc66
[ "Apache-2.0" ]
null
null
null
toontown/toon/InventoryNewOLD.py
philicheese2003/ToontownProjectAltisServer
cfa225d1bdddacdbd29b621382347fce17e1dc66
[ "Apache-2.0" ]
1
2020-03-11T17:38:45.000Z
2020-03-11T17:38:45.000Z
from direct.gui.DirectGui import * from panda3d.core import * from panda3d.direct import * from toontown.toonbase.ToontownBattleGlobals import * from toontown.toon import InventoryBase from toontown.toonbase import TTLocalizer from toontown.battle import BattleGlobals from toontown.quest import BlinkingArrows from dire...
45.586472
471
0.616527
003cac505b21038fa9e47b69f88bc88d65732592
586
py
Python
tests/test_basics.py
simpen/flaskz
49efe908cd8a325b51453d960155f5ad20fa1e16
[ "MIT" ]
null
null
null
tests/test_basics.py
simpen/flaskz
49efe908cd8a325b51453d960155f5ad20fa1e16
[ "MIT" ]
null
null
null
tests/test_basics.py
simpen/flaskz
49efe908cd8a325b51453d960155f5ad20fa1e16
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- import unittest from flask import current_app from app import create_app, db class BasicsTestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') self.app_context = self.app.app_context() self.app_context.push() db.create_all() def ...
24.416667
54
0.658703
8871968559ed4593975bf6eec232ee1d5507e602
703
py
Python
Lintcode/Ladder_61_G1806/1086. Repeated String Match.py
ctc316/algorithm-python
ac4580d55e05e93e407c6156c9bb801808027d60
[ "MIT" ]
null
null
null
Lintcode/Ladder_61_G1806/1086. Repeated String Match.py
ctc316/algorithm-python
ac4580d55e05e93e407c6156c9bb801808027d60
[ "MIT" ]
null
null
null
Lintcode/Ladder_61_G1806/1086. Repeated String Match.py
ctc316/algorithm-python
ac4580d55e05e93e407c6156c9bb801808027d60
[ "MIT" ]
null
null
null
class Solution: """ @param A: a string @param B: a string @return: return an integer """ def repeatedStringMatch(self, A, B): for i in range(len(A)): if A[i] == B[0]: result = self.search(A, B, i) if result > 0: return resul...
21.96875
55
0.394026
cc58b0eef2137a7a13e7edd7f2c1dd8623874d14
458
py
Python
packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ypad.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ypad.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/scatter3d/marker/colorbar/_ypad.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class YpadValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="scatter3d.marker.colorbar", **kwargs ): super(YpadValidator, self).__init__( plotly_name=plotly_name, parent_name=...
30.533333
83
0.633188
19455917dbb28b46d2b560db086304e4a812d830
2,788
py
Python
homeassistant/components/linode/binary_sensor.py
VirtualL/home-assistant
301829d02be8d865ab46c8901ac046d060849320
[ "Apache-2.0" ]
2
2017-10-26T19:43:55.000Z
2017-12-30T23:29:00.000Z
homeassistant/components/linode/binary_sensor.py
VirtualL/home-assistant
301829d02be8d865ab46c8901ac046d060849320
[ "Apache-2.0" ]
3
2021-09-08T03:34:57.000Z
2022-03-12T00:59:48.000Z
homeassistant/components/linode/binary_sensor.py
VirtualL/home-assistant
301829d02be8d865ab46c8901ac046d060849320
[ "Apache-2.0" ]
1
2022-02-20T07:41:14.000Z
2022-02-20T07:41:14.000Z
"""Support for monitoring the state of Linode Nodes.""" import logging import voluptuous as vol from homeassistant.components.binary_sensor import ( PLATFORM_SCHEMA, BinarySensorDevice) import homeassistant.helpers.config_validation as cv from . import ( ATTR_CREATED, ATTR_IPV4_ADDRESS, ATTR_IPV6_ADDRESS, AT...
29.659574
70
0.627331
314f331af8f9facbff718d7ecf3520e86193278e
2,564
py
Python
figure.py
juanoj/streamlit_example
9c328f1bb03e56eaaaffea11593444927d416d9c
[ "MIT" ]
9
2020-08-27T01:16:42.000Z
2022-02-25T02:32:18.000Z
figure.py
juanoj/streamlit_example
9c328f1bb03e56eaaaffea11593444927d416d9c
[ "MIT" ]
null
null
null
figure.py
juanoj/streamlit_example
9c328f1bb03e56eaaaffea11593444927d416d9c
[ "MIT" ]
3
2021-04-23T15:42:57.000Z
2021-08-28T03:15:02.000Z
# ============================================================== # Author: Rodolfo Ferro # Twitter: @FerroRodolfo # # ABOUT COPYING OR USING PARTIAL INFORMATION: # This script has been originally created by Rodolfo Ferro. # Any explicit usage of this script or its contents is granted # according to the license provided...
26.708333
64
0.50195
2c4f31cf861e310be78431a52076e1f29246da7e
4,181
py
Python
venv/Lib/site-packages/pandas/tests/frame/methods/test_rename_axis.py
OliviaNabbosa89/Disaster_Responses
1e66d77c303cec685dfc2ca94f4fca4cc9400570
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pandas/tests/frame/methods/test_rename_axis.py
OliviaNabbosa89/Disaster_Responses
1e66d77c303cec685dfc2ca94f4fca4cc9400570
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pandas/tests/frame/methods/test_rename_axis.py
OliviaNabbosa89/Disaster_Responses
1e66d77c303cec685dfc2ca94f4fca4cc9400570
[ "MIT" ]
1
2021-04-26T22:41:56.000Z
2021-04-26T22:41:56.000Z
import numpy as np import pytest from pandas import DataFrame, Index, MultiIndex import pandas._testing as tm class TestDataFrameRenameAxis: def test_rename_axis_inplace(self, float_frame): # GH#15704 expected = float_frame.rename_axis("foo") result = float_frame.copy() ...
38.712963
89
0.584549
5a8c68368dcd36ef22b58f71750d516ade91945e
573
py
Python
FamilyFood/store/migrations/0003_auto_20220105_1140.py
ZST-Devs/HomeFood
337edef7d6d567b1c0c6e4699d7b8c8ee4d91397
[ "MIT" ]
2
2022-01-15T16:58:40.000Z
2022-03-11T09:42:59.000Z
FamilyFood/store/migrations/0003_auto_20220105_1140.py
ZST-Devs/HomeFood
337edef7d6d567b1c0c6e4699d7b8c8ee4d91397
[ "MIT" ]
null
null
null
FamilyFood/store/migrations/0003_auto_20220105_1140.py
ZST-Devs/HomeFood
337edef7d6d567b1c0c6e4699d7b8c8ee4d91397
[ "MIT" ]
1
2022-01-08T17:06:37.000Z
2022-01-08T17:06:37.000Z
# Generated by Django 3.2.7 on 2022-01-05 05:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('store', '0002_rename_product_name_product_name'), ] operations = [ migrations.AlterField( model_name='product', name...
23.875
62
0.588133
2fd350f407a4e00e10d80bfeb11009d6c35b96de
6,958
py
Python
gemelli/tests/test_factorization.py
gwarmstrong/gemelli
0398d4b068abb1542d9afd3b773740047b8f9a20
[ "BSD-3-Clause" ]
null
null
null
gemelli/tests/test_factorization.py
gwarmstrong/gemelli
0398d4b068abb1542d9afd3b773740047b8f9a20
[ "BSD-3-Clause" ]
null
null
null
gemelli/tests/test_factorization.py
gwarmstrong/gemelli
0398d4b068abb1542d9afd3b773740047b8f9a20
[ "BSD-3-Clause" ]
null
null
null
import unittest import numpy as np from scipy.linalg import qr from gemelli.factorization import TensorFactorization, khatri_rao class TestTenAls(unittest.TestCase): def setUp(self): # generate random noiseless low-rank orthogonal tensor r = 3 # rank is 2 self.r = r n1 = 10 ...
40.453488
79
0.471687
66b960322315b4f1428f8ff5e62db2d089340244
3,797
py
Python
DP_CAP_plot_main.py
VinnyS88/Plot_DP_CAP
1c2d62793ad0d6c8dc06c70422d582b4d60418c2
[ "MIT" ]
1
2022-01-04T23:53:04.000Z
2022-01-04T23:53:04.000Z
DP_CAP_plot_main.py
VinnyS88/Plot_DP_CAP
1c2d62793ad0d6c8dc06c70422d582b4d60418c2
[ "MIT" ]
null
null
null
DP_CAP_plot_main.py
VinnyS88/Plot_DP_CAP
1c2d62793ad0d6c8dc06c70422d582b4d60418c2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Dec 27 13:57:14 2021 @author: vinicius fiocco sciuti """ import numpy as np import matplotlib.pyplot as plt from dataclasses import dataclass, field class Tensor: """ Creates a tensor object with apropriate 3x3 size. It Starts with 3x3 zeros...
25.483221
101
0.473795
e857ce3d70c99beb62da4e76a7bc657a64c061f8
4,889
py
Python
app/user/tests/test_user_api.py
jahirgg/recipe-app-api
3606194240977c25825e41104e027714978ecbe7
[ "MIT" ]
null
null
null
app/user/tests/test_user_api.py
jahirgg/recipe-app-api
3606194240977c25825e41104e027714978ecbe7
[ "MIT" ]
null
null
null
app/user/tests/test_user_api.py
jahirgg/recipe-app-api
3606194240977c25825e41104e027714978ecbe7
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework.test import APIClient from rest_framework import status CREATE_USER_URL = reverse('user:create') TOKEN_URL = reverse('user:token') ME_URL = reverse('user:me') def create_user(**params...
35.427536
77
0.657394
13cc7ccbcff043d4f9b5263f4c3c8c827751c389
172
py
Python
spec_classes/_version.py
matthewwardrop/spec-classes
d50c9ded426b5becd445c255e45b88ccc8961672
[ "MIT" ]
1
2021-07-10T11:43:16.000Z
2021-07-10T11:43:16.000Z
spec_classes/_version.py
matthewwardrop/spec-classes
d50c9ded426b5becd445c255e45b88ccc8961672
[ "MIT" ]
1
2021-09-02T18:15:10.000Z
2021-09-02T18:15:10.000Z
spec_classes/_version.py
matthewwardrop/spec-classes
d50c9ded426b5becd445c255e45b88ccc8961672
[ "MIT" ]
null
null
null
import pkg_resources __version__ = pkg_resources.get_distribution("spec_classes").version or "git" __author__ = "Matthew Wardrop" __author_email__ = "mpwardrop@gmail.com"
28.666667
77
0.813953
cfff4c5e558af10554a059aad3cc908e495704f0
1,475
py
Python
authors/apps/notifications/migrations/0001_initial.py
james-chege/ah-shakas
d1ed11097bd1f9e9cf1b867a0b29909df6262cf0
[ "BSD-3-Clause" ]
null
null
null
authors/apps/notifications/migrations/0001_initial.py
james-chege/ah-shakas
d1ed11097bd1f9e9cf1b867a0b29909df6262cf0
[ "BSD-3-Clause" ]
null
null
null
authors/apps/notifications/migrations/0001_initial.py
james-chege/ah-shakas
d1ed11097bd1f9e9cf1b867a0b29909df6262cf0
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 2.1.2 on 2018-11-27 17:37 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), ('arti...
42.142857
159
0.634576
573786c07154c87824c667996d2476e4762dc564
2,407
py
Python
tests_interop/test_net_stream.py
g-r-a-n-t/py-libp2p
36a4a9150dcc53b42315b5c6868fccde5083963b
[ "Apache-2.0", "MIT" ]
315
2019-02-13T01:29:09.000Z
2022-03-28T13:44:07.000Z
tests_interop/test_net_stream.py
g-r-a-n-t/py-libp2p
36a4a9150dcc53b42315b5c6868fccde5083963b
[ "Apache-2.0", "MIT" ]
249
2019-02-22T05:00:07.000Z
2022-03-29T16:30:46.000Z
tests_interop/test_net_stream.py
g-r-a-n-t/py-libp2p
36a4a9150dcc53b42315b5c6868fccde5083963b
[ "Apache-2.0", "MIT" ]
77
2019-02-24T19:45:17.000Z
2022-03-30T03:20:09.000Z
import pytest import trio from libp2p.network.stream.exceptions import StreamClosed, StreamEOF, StreamReset from libp2p.tools.constants import MAX_READ_LEN DATA = b"data" @pytest.mark.trio async def test_net_stream_read_write(py_to_daemon_stream_pair, p2pds): stream_py, stream_daemon = py_to_daemon_stream_pair ...
31.671053
84
0.773993
63dde1e0fe43c689c4be164c465f4716d9b5fe77
1,331
py
Python
palindrome_checker.py
dicksonagbemazi/python_programs
f5a2911a82efb2f81696b28403c18a76e9f5a562
[ "MIT" ]
null
null
null
palindrome_checker.py
dicksonagbemazi/python_programs
f5a2911a82efb2f81696b28403c18a76e9f5a562
[ "MIT" ]
2
2021-03-10T14:38:12.000Z
2021-03-11T22:38:32.000Z
palindrome_checker.py
dicksonagbemazi/python_programs
f5a2911a82efb2f81696b28403c18a76e9f5a562
[ "MIT" ]
null
null
null
def is_palindrome(input_string): """Check if a string is a palindrome irrespective of capitalisation Returns: True if string is a palindrome e.g >>> is_palindrome("kayak") OUTPUT : True False if string is not a palindrome e.g >>> is_palindro...
30.25
68
0.584523
cbfd40ce5f1da3f4f4e229b2bc3a8f35f40c1a34
1,641
py
Python
tests/test_edalizer.py
SystematIC-Design/fusesoc
886bd9c7ce86281710ef197198e8e613e9eabb38
[ "BSD-2-Clause" ]
829
2015-03-10T12:28:42.000Z
2022-03-28T02:44:12.000Z
tests/test_edalizer.py
SystematIC-Design/fusesoc
886bd9c7ce86281710ef197198e8e613e9eabb38
[ "BSD-2-Clause" ]
460
2015-01-26T18:03:19.000Z
2022-03-30T08:30:41.000Z
tests/test_edalizer.py
SystematIC-Design/fusesoc
886bd9c7ce86281710ef197198e8e613e9eabb38
[ "BSD-2-Clause" ]
177
2015-02-02T13:58:12.000Z
2022-03-30T20:56:21.000Z
# Copyright FuseSoC contributors # Licensed under the 2-Clause BSD License, see LICENSE for details. # SPDX-License-Identifier: BSD-2-Clause def test_generators(): import os import tempfile from fusesoc.config import Config from fusesoc.coremanager import CoreManager from fusesoc.edalizer import ...
32.176471
88
0.698355
72f466426e29876eb7950c2a035c1dab14702188
448
py
Python
.Python Challenges - 101Computing/Random Library Challenges/card_deck.py
Gustavo-daCosta/Projetos
459cbf6fc0b67532c1bf2043ccdb915d16ba0df2
[ "MIT" ]
2
2021-09-13T22:04:30.000Z
2022-01-05T14:01:43.000Z
.Python Challenges - 101Computing/Random Library Challenges/card_deck.py
Gustavo-daCosta/Projetos
459cbf6fc0b67532c1bf2043ccdb915d16ba0df2
[ "MIT" ]
null
null
null
.Python Challenges - 101Computing/Random Library Challenges/card_deck.py
Gustavo-daCosta/Projetos
459cbf6fc0b67532c1bf2043ccdb915d16ba0df2
[ "MIT" ]
null
null
null
# Your task is to write a Python script to randomly pick and output a card from a deck of 52 playing cards. # The program should output the suit and value of the card (e.g. 7 of hearts, Queen of clubs, etc…). from random import choice value = ['Ace', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', 'Ki...
44.8
108
0.633929
77d76bd89fb378eec36b52f5f7cb2ade2c17afde
12,058
py
Python
src/python3/sdp/visualization/visit.py
LeiShi/Synthetic-Diagnostics-Platform
870120d3fd14b2a3c89c6e6e85625d1e9109a2de
[ "BSD-3-Clause" ]
5
2019-08-16T22:08:19.000Z
2021-02-24T02:47:05.000Z
src/python3/sdp/visualization/visit.py
justthepython/Synthetic-Diagnostics-Platform
5f1cb5c29d182490acbd4f3c167f0e09ec211236
[ "BSD-3-Clause" ]
1
2016-05-11T12:58:00.000Z
2016-05-11T17:18:36.000Z
src/python3/sdp/visualization/visit.py
justthepython/Synthetic-Diagnostics-Platform
5f1cb5c29d182490acbd4f3c167f0e09ec211236
[ "BSD-3-Clause" ]
5
2018-04-29T12:35:59.000Z
2020-01-10T03:38:30.000Z
"""This module contains functions useful for drawing 3D reflectometry plots in VisIt program. """ import numpy as np import scipy.io.netcdf as nc from ..settings.unitsystem import cgs class VisItError(Exception): def __init__(this,*p): this.args = p class Point: """class of single grid po...
35.99403
79
0.512108
767d4840d8e8df39e937498cea7df916523d880f
874
py
Python
test/test_local_cache.py
hirosassa/thunderbolt
4faba6f7842caefc635bf5bb3e6951e507a0f6e2
[ "MIT" ]
21
2019-10-03T09:11:56.000Z
2022-01-29T13:49:25.000Z
test/test_local_cache.py
hirosassa/thunderbolt
4faba6f7842caefc635bf5bb3e6951e507a0f6e2
[ "MIT" ]
41
2019-09-15T09:29:57.000Z
2022-03-28T01:14:12.000Z
test/test_local_cache.py
hirosassa/thunderbolt
4faba6f7842caefc635bf5bb3e6951e507a0f6e2
[ "MIT" ]
9
2019-09-07T17:53:48.000Z
2022-01-31T07:37:47.000Z
import unittest import os from pathlib import Path from thunderbolt.client.local_cache import LocalCache class TestLocalCache(unittest.TestCase): def setUp(self): self.base_path = './resources' self.local_cache = LocalCache(self.base_path, True) def test_init(self): self.assertTrue(o...
30.137931
107
0.671625
ea39cea45caf41f342369343948a6186d1108762
898
py
Python
azure-mgmt-web/azure/mgmt/web/models/api_definition_info.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-web/azure/mgmt/web/models/api_definition_info.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-web/azure/mgmt/web/models/api_definition_info.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.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 ...
30.965517
76
0.567929
5372efc5d15273640a6257fbaf9f332a9b60bada
1,120
py
Python
notebooks/_solutions/case3_bacterial_resistance_lab_experiment19.py
rprops/Python_DS-WS
b2fc449a74be0c82863e5fcf1ddbe7d64976d530
[ "BSD-3-Clause" ]
3
2019-07-23T15:14:03.000Z
2020-11-10T06:12:18.000Z
notebooks/_solutions/case3_bacterial_resistance_lab_experiment19.py
rprops/Python_DS-WS
b2fc449a74be0c82863e5fcf1ddbe7d64976d530
[ "BSD-3-Clause" ]
null
null
null
notebooks/_solutions/case3_bacterial_resistance_lab_experiment19.py
rprops/Python_DS-WS
b2fc449a74be0c82863e5fcf1ddbe7d64976d530
[ "BSD-3-Clause" ]
3
2020-03-04T23:40:20.000Z
2021-11-04T16:41:10.000Z
# precalculate the median value end_of_experiment["Phage_median"] = end_of_experiment.groupby(["Phage_t", "Bacterial_genotype"])['optical_density'].transform('median') pn.options.figure_size = (8, 10) (pn.ggplot(end_of_experiment, pn.aes(x='Bacterial_genotype', y='optical_density'...
56
135
0.574107
7a5ffa6993354e9127eb15cacda2bd2d44db715d
19
py
Python
contrib/tools/python/src/Lib/plat-mac/Carbon/Evt.py
HeyLey/catboost
f472aed90604ebe727537d9d4a37147985e10ec2
[ "Apache-2.0" ]
6,989
2017-07-18T06:23:18.000Z
2022-03-31T15:58:36.000Z
python/src/Lib/plat-mac/Carbon/Evt.py
weiqiangzheng/sl4a
d3c17dca978cbeee545e12ea240a9dbf2a6999e9
[ "Apache-2.0" ]
1,978
2017-07-18T09:17:58.000Z
2022-03-31T14:28:43.000Z
python/src/Lib/plat-mac/Carbon/Evt.py
weiqiangzheng/sl4a
d3c17dca978cbeee545e12ea240a9dbf2a6999e9
[ "Apache-2.0" ]
1,228
2017-07-18T09:03:13.000Z
2022-03-29T05:57:40.000Z
from _Evt import *
9.5
18
0.736842
4a0636656e9d56bcef81330f4eb0e8bca6d34297
266
py
Python
test/tests/wrapperdesc.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
test/tests/wrapperdesc.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
test/tests/wrapperdesc.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
class C(object): pass print C.__str__ is object.__str__ print type(C).__str__ is object.__str__ print type(None).__str__ is object.__str__ print type(None).__str__ is None.__str__ print type(None.__str__) print type(type(None).__str__.__get__(None, type(None)))
29.555556
56
0.778195
41d4115265d6f49fe08749eb95f40ac3b0acf216
7,773
py
Python
Fig_S3/alignmentQuantification_v1_20190501.py
nimitjainFireLab/JainEtAl_T7rnaReplication
1a6111ee70cd99ec531a92f49e7fe8a0f1de0145
[ "MIT" ]
null
null
null
Fig_S3/alignmentQuantification_v1_20190501.py
nimitjainFireLab/JainEtAl_T7rnaReplication
1a6111ee70cd99ec531a92f49e7fe8a0f1de0145
[ "MIT" ]
null
null
null
Fig_S3/alignmentQuantification_v1_20190501.py
nimitjainFireLab/JainEtAl_T7rnaReplication
1a6111ee70cd99ec531a92f49e7fe8a0f1de0145
[ "MIT" ]
null
null
null
from moduleUsefulFunctions_20180215 import * import itertools def returnNumberMutations(alignInfoList): numberMutations=0 for eachEl in alignInfoList: if eachEl.typeOfEvent=='Start': startPosition=eachEl.position elif eachEl.typeOfEvent=='End': endPosition=eachEl.positio...
47.981481
243
0.713495
4050f096a47ade219ee09b014ac6fd632a580680
334
py
Python
platform/core/polyaxon/conf/options/k8s_config_maps.py
hackerwins/polyaxon
ff56a098283ca872abfbaae6ba8abba479ffa394
[ "Apache-2.0" ]
null
null
null
platform/core/polyaxon/conf/options/k8s_config_maps.py
hackerwins/polyaxon
ff56a098283ca872abfbaae6ba8abba479ffa394
[ "Apache-2.0" ]
null
null
null
platform/core/polyaxon/conf/options/k8s_config_maps.py
hackerwins/polyaxon
ff56a098283ca872abfbaae6ba8abba479ffa394
[ "Apache-2.0" ]
null
null
null
import conf from options.registry import k8s_config_maps conf.subscribe(k8s_config_maps.K8SConfigMapsBuildJobs) conf.subscribe(k8s_config_maps.K8SConfigMapsJobs) conf.subscribe(k8s_config_maps.K8SConfigMapsExperiments) conf.subscribe(k8s_config_maps.K8SConfigMapsNotebooks) conf.subscribe(k8s_config_maps.K8SConfigMaps...
33.4
57
0.898204
9bc5abd63d88fbdf5be1e89f0ba8260559d83173
11,413
py
Python
mpisppy/tests/test_conf_int_farmer.py
vishalbelsare/mpi-sppy
019fa1c04396a5bcadf758a31bc96217c17b43c9
[ "BSD-3-Clause" ]
null
null
null
mpisppy/tests/test_conf_int_farmer.py
vishalbelsare/mpi-sppy
019fa1c04396a5bcadf758a31bc96217c17b43c9
[ "BSD-3-Clause" ]
null
null
null
mpisppy/tests/test_conf_int_farmer.py
vishalbelsare/mpi-sppy
019fa1c04396a5bcadf758a31bc96217c17b43c9
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2020 by B. Knueven, D. Mildebrath, C. Muir, J-P Watson, and D.L. Woodruff # This software is distributed under the 3-clause BSD License. # Provide some test for confidence intervals """ """ import os import tempfile import numpy as np import unittest import subprocess import importlib import mpi4py.MPI a...
41.053957
130
0.551038
b2fc2e0528b8936460cd0fb6312ccfe9619f2949
11,621
py
Python
examples/vision/randaugment.py
IMvision12/keras-io
44997b0610db078e1109d0dbca58db8319dbc744
[ "Apache-2.0" ]
null
null
null
examples/vision/randaugment.py
IMvision12/keras-io
44997b0610db078e1109d0dbca58db8319dbc744
[ "Apache-2.0" ]
null
null
null
examples/vision/randaugment.py
IMvision12/keras-io
44997b0610db078e1109d0dbca58db8319dbc744
[ "Apache-2.0" ]
1
2022-01-21T11:34:34.000Z
2022-01-21T11:34:34.000Z
""" Title: RandAugment for Image Classification for Improved Robustness Author: [Sayak Paul](https://twitter.com/RisingSayak) Date created: 2021/03/13 Last modified: 2021/03/17 Description: RandAugment for training an image classification model with improved robustness. """ """ Data augmentation is a very useful techni...
34.897898
142
0.748128
dff53e92a1cf3578a21be9b7da608a46a47109e6
13,304
py
Python
examples/textbook/hydrodynamics_class.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
1
2019-12-28T22:47:51.000Z
2019-12-28T22:47:51.000Z
examples/textbook/hydrodynamics_class.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
null
null
null
examples/textbook/hydrodynamics_class.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
2
2021-11-19T04:41:37.000Z
2021-11-20T02:11:17.000Z
import time import numpy from amuse.lab import * from amuse.units import units,nbody_system from amuse.datamodel import Particles from amuse.community.fi.interface import Fi from amuse.community.gadget2.interface import Gadget2 from cooling_class import Cooling, SimplifiedThermalModelEvolver #from amuse.ext.sink imp...
47.177305
188
0.577044
87600a750c6378002631121be40e01375b914912
951
py
Python
ch01/setup.py
oooooolr/blueprints-text
f1be13113cd8fa48e3e9e2e9b40324ff61b5f023
[ "Apache-2.0" ]
97
2020-09-14T13:42:48.000Z
2022-03-27T16:03:11.000Z
ch01/setup.py
oooooolr/blueprints-text
f1be13113cd8fa48e3e9e2e9b40324ff61b5f023
[ "Apache-2.0" ]
13
2021-05-09T12:20:19.000Z
2022-03-21T08:57:33.000Z
ch01/setup.py
oooooolr/blueprints-text
f1be13113cd8fa48e3e9e2e9b40324ff61b5f023
[ "Apache-2.0" ]
49
2020-10-12T19:33:26.000Z
2022-03-28T17:38:57.000Z
# setup for chapter 01 import os if ON_COLAB: BASE_DIR = "/content" print("You are working on Google Colab.") print(f'Files will be downloaded to "{BASE_DIR}".') else: BASE_DIR = ".." print("You are working on a local system.") print(f'Files will be searched relative to "{BASE_DIR}".') if ON_C...
27.970588
93
0.580442
6ac1d3069bd78674040698eb015824d3a4b3012e
5,854
py
Python
resotocore/tests/core/worker_task_queue_test.py
someengineering/cloudkeeper
b5fcb30bf4e727eabe93e536d925d0f76926630d
[ "Apache-2.0" ]
316
2021-07-08T12:54:19.000Z
2022-01-12T18:50:17.000Z
resotocore/tests/core/worker_task_queue_test.py
someengineering/cloudkeeper
b5fcb30bf4e727eabe93e536d925d0f76926630d
[ "Apache-2.0" ]
80
2021-07-30T23:55:50.000Z
2022-01-12T15:39:31.000Z
resotocore/tests/core/worker_task_queue_test.py
someengineering/cloudkeeper
b5fcb30bf4e727eabe93e536d925d0f76926630d
[ "Apache-2.0" ]
14
2021-08-23T08:29:29.000Z
2022-01-08T04:42:28.000Z
import asyncio from collections import defaultdict from datetime import timedelta from typing import AsyncGenerator, Dict, List, Tuple from pytest import fixture, mark from core.model.graph_access import Section from core.model.resolve_in_graph import GraphResolver, NodePath from core.util import group_by, identity, ...
37.767742
108
0.637854
b4c6caed6dda11ecc6716aab3cfa98e0a13b1b94
10,914
py
Python
src/stormtrack/scripts/project_tracks.py
ruestefa/stormtrack
e9378f013c406d387ea944c97e5adc68df864dee
[ "MIT" ]
null
null
null
src/stormtrack/scripts/project_tracks.py
ruestefa/stormtrack
e9378f013c406d387ea944c97e5adc68df864dee
[ "MIT" ]
2
2021-01-06T17:37:42.000Z
2021-02-05T18:40:52.000Z
src/stormtrack/scripts/project_tracks.py
ruestefa/stormtrack
e9378f013c406d387ea944c97e5adc68df864dee
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Standard library import argparse import os import sys from functools import partial from multiprocessing import Manager from multiprocessing import Pool # Third-party import netCDF4 as nc4 import numpy as np # Local from stormtrack.core.io import read_feature_file from stormtrack.utils.netcd...
28.348052
88
0.584295
8287394d7e7febc11ff808e1bce4e2323ffc06f4
69,719
py
Python
cirq/ops/pauli_string_test.py
alex-treebeard/Cirq
10594c0edf7a4c26d5d21f985c6dc391197d3075
[ "Apache-2.0" ]
1
2021-03-07T19:34:28.000Z
2021-03-07T19:34:28.000Z
cirq/ops/pauli_string_test.py
alex-treebeard/Cirq
10594c0edf7a4c26d5d21f985c6dc391197d3075
[ "Apache-2.0" ]
4
2021-01-11T10:35:37.000Z
2021-01-28T19:17:02.000Z
cirq/ops/pauli_string_test.py
alex-treebeard/Cirq
10594c0edf7a4c26d5d21f985c6dc391197d3075
[ "Apache-2.0" ]
1
2022-01-04T22:00:47.000Z
2022-01-04T22:00:47.000Z
# Copyright 2018 The Cirq Developers # # 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 ...
35.882141
129
0.616417
140d9fc18715129ce4df3ee2291a9af73b8ddedf
22
py
Python
src/dpsrvf/__init__.py
drewrl3v/dpsrvf
b78a83417bb59e5df7ebd831db6511116d16b638
[ "BSD-3-Clause" ]
null
null
null
src/dpsrvf/__init__.py
drewrl3v/dpsrvf
b78a83417bb59e5df7ebd831db6511116d16b638
[ "BSD-3-Clause" ]
1
2021-12-02T00:04:29.000Z
2021-12-02T00:04:29.000Z
src/dpsrvf/__init__.py
drewrl3v/dpsrvf
b78a83417bb59e5df7ebd831db6511116d16b638
[ "BSD-3-Clause" ]
null
null
null
from .dpsrvf import *
11
21
0.727273
5e222c7348a2cf2563bd54bff58eb191de32dd45
2,709
py
Python
babynames/babynames.py
Jhong098/google-python-practice
ea7f11e8d9cfc9c2ddde1904db7478ca05a48828
[ "Apache-2.0" ]
null
null
null
babynames/babynames.py
Jhong098/google-python-practice
ea7f11e8d9cfc9c2ddde1904db7478ca05a48828
[ "Apache-2.0" ]
null
null
null
babynames/babynames.py
Jhong098/google-python-practice
ea7f11e8d9cfc9c2ddde1904db7478ca05a48828
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import sys import re """Baby Names exercise Define the extract_names() function below and c...
25.317757
79
0.667036
69c422b1913aa21e1f10699b70dc9fa11df60409
9,214
py
Python
second/pytorch/models/pointpillars.py
leon-liangwu/PillarsRNN
b6e7d64af4e2819098ae9a87a9dd676ee8288874
[ "MIT" ]
1
2019-07-30T08:09:24.000Z
2019-07-30T08:09:24.000Z
second/pytorch/models/pointpillars.py
leon-liangwu/second.pytorch
b6e7d64af4e2819098ae9a87a9dd676ee8288874
[ "MIT" ]
null
null
null
second/pytorch/models/pointpillars.py
leon-liangwu/second.pytorch
b6e7d64af4e2819098ae9a87a9dd676ee8288874
[ "MIT" ]
null
null
null
""" PointPillars fork from SECOND. Code written by Alex Lang and Oscar Beijbom, 2018. Licensed under MIT License [see LICENSE]. """ import torch from torch import nn from torch.nn import functional as F from second.pytorch.utils import get_paddings_indicator from torchplus.nn import Empty from torchplus.tools import ...
36.856
117
0.593119
13df51fade147a6892ecf91880b8698e54291c6e
121,456
py
Python
scripts/slave/unittests/gatekeeper_ng_test.py
mithro/chromium-build
98d83e124dc08510756906171922a22ba27b87fa
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/unittests/gatekeeper_ng_test.py
mithro/chromium-build
98d83e124dc08510756906171922a22ba27b87fa
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/unittests/gatekeeper_ng_test.py
mithro/chromium-build
98d83e124dc08510756906171922a22ba27b87fa
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for gatekeeper_ng.py. This is a basic check that gatekeeper_ng.py can properly interpret builds and close...
41.982717
80
0.607981
790592ca158e7920ce9710711ea9d87850f00b5e
4,040
py
Python
samples/v1/language_entities_gcs.py
busunkim96/python-language
f16bd6dae66990516320941748325b59f4eeebc6
[ "Apache-2.0" ]
null
null
null
samples/v1/language_entities_gcs.py
busunkim96/python-language
f16bd6dae66990516320941748325b59f4eeebc6
[ "Apache-2.0" ]
40
2019-07-16T10:04:48.000Z
2020-01-20T09:04:59.000Z
samples/v1/language_entities_gcs.py
busunkim96/python-language
f16bd6dae66990516320941748325b59f4eeebc6
[ "Apache-2.0" ]
2
2019-07-18T00:05:31.000Z
2019-11-27T14:17:22.000Z
# -*- coding: utf-8 -*- # # Copyright 2020 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...
38.113208
120
0.70297
0ebdc891d9a79319140b50d0828d732d37657420
275
py
Python
lessons/ObjectOrientedProgramming/IdeFiles/5_exercise_upload_to_pypi/setup.py
GooseHuang/Udacity-Data-Scientist-Nanodegree
96980d6f7ce82a961c7f41d26c25fbe5f11ca773
[ "MIT" ]
null
null
null
lessons/ObjectOrientedProgramming/IdeFiles/5_exercise_upload_to_pypi/setup.py
GooseHuang/Udacity-Data-Scientist-Nanodegree
96980d6f7ce82a961c7f41d26c25fbe5f11ca773
[ "MIT" ]
1
2021-06-02T02:39:02.000Z
2021-06-02T02:39:02.000Z
lessons/ObjectOrientedProgramming/IdeFiles/5_exercise_upload_to_pypi/setup.py
GooseHuang/Udacity-Data-Scientist-Nanodegree
96980d6f7ce82a961c7f41d26c25fbe5f11ca773
[ "MIT" ]
null
null
null
from setuptools import setup setup(name='goose_probability', version='0.2', description='Gaussian and Binomial distributions', packages=['goose_probability'], auther='Goose Huang', auther_email='goosehuangmatt@gmail.com', zip_safe=False)
27.5
56
0.694545
4b40f7bd0f5ad4e44e92fa85c936411269a999cb
13,860
py
Python
scripts/TestHarness/testers/UnorderedCSVDiffer.py
JiaZhou-PU/raven
a1fd82facb0f02f20770ea4df39d55a999c49017
[ "Apache-2.0" ]
1
2018-07-02T21:12:48.000Z
2018-07-02T21:12:48.000Z
scripts/TestHarness/testers/UnorderedCSVDiffer.py
JiaZhou-PU/raven
a1fd82facb0f02f20770ea4df39d55a999c49017
[ "Apache-2.0" ]
null
null
null
scripts/TestHarness/testers/UnorderedCSVDiffer.py
JiaZhou-PU/raven
a1fd82facb0f02f20770ea4df39d55a999c49017
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
41.497006
100
0.63824
79fc6b42bc36588c1072d4432567d8258b265ffb
2,682
py
Python
opensanctions/core/addresses.py
opensanctions/opennames
39675797b0e70e71f54edff2b8e623e23aef9c15
[ "MIT" ]
3
2017-04-14T21:27:07.000Z
2017-04-25T14:57:22.000Z
opensanctions/core/addresses.py
opensanctions/opennames
39675797b0e70e71f54edff2b8e623e23aef9c15
[ "MIT" ]
null
null
null
opensanctions/core/addresses.py
opensanctions/opennames
39675797b0e70e71f54edff2b8e623e23aef9c15
[ "MIT" ]
null
null
null
import structlog from typing import Dict, Set from itertools import combinations from nomenklatura import Resolver from nomenklatura.judgement import Judgement from opensanctions.core.dataset import Dataset from opensanctions.core.context import Context from opensanctions.core.loader import Database from opensanctions...
33.111111
86
0.578673
9a3baf0ab50bfd51d12779905448d2f76452354f
1,453
py
Python
app/recipe/serializers.py
HiagoAC/recipe-app-api
0e4b78ac802f91eafcd9b583c6a3a9375dc899d6
[ "MIT" ]
null
null
null
app/recipe/serializers.py
HiagoAC/recipe-app-api
0e4b78ac802f91eafcd9b583c6a3a9375dc899d6
[ "MIT" ]
null
null
null
app/recipe/serializers.py
HiagoAC/recipe-app-api
0e4b78ac802f91eafcd9b583c6a3a9375dc899d6
[ "MIT" ]
null
null
null
from rest_framework import serializers from core.models import Ingredient, Recipe, Tag class TagSerializer(serializers.ModelSerializer): """Serializer for tag object""" class Meta: model = Tag fields = ('id', 'name') read_only_fields = ('id',) class IngredientSerializer(serializers...
25.491228
65
0.643496
3b16f8cf383a1ea46ea992045845b5628a218c8a
1,395
py
Python
imperative/python/megengine/module/quantized/elemwise.py
yang-shuohao/MegEngine
2e8742086563ea442c357b14560245c54e0aa0a3
[ "Apache-2.0" ]
1
2020-12-11T04:08:25.000Z
2020-12-11T04:08:25.000Z
imperative/python/megengine/module/quantized/elemwise.py
yang-shuohao/MegEngine
2e8742086563ea442c357b14560245c54e0aa0a3
[ "Apache-2.0" ]
null
null
null
imperative/python/megengine/module/quantized/elemwise.py
yang-shuohao/MegEngine
2e8742086563ea442c357b14560245c54e0aa0a3
[ "Apache-2.0" ]
null
null
null
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2020 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ...
37.702703
88
0.715412
932731dd0519bd4a07b95fc8374830d86f18ed82
269
py
Python
tests/artificial/transf_BoxCox/trend_LinearTrend/cycle_0/ar_12/test_artificial_32_BoxCox_LinearTrend_0_12_100.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/artificial/transf_BoxCox/trend_LinearTrend/cycle_0/ar_12/test_artificial_32_BoxCox_LinearTrend_0_12_100.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/artificial/transf_BoxCox/trend_LinearTrend/cycle_0/ar_12/test_artificial_32_BoxCox_LinearTrend_0_12_100.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "LinearTrend", cycle_length = 0, transform = "BoxCox", sigma = 0.0, exog_count = 100, ar_order = 12);
38.428571
164
0.732342
a87cf2ceddf9deed1c0d4a855ae6e8b0f1ff1038
2,509
py
Python
h5Nastran/h5Nastran/post_process/result_readers/punch/_punch_reader.py
ACea15/pyNastran
5ffc37d784b52c882ea207f832bceb6b5eb0e6d4
[ "BSD-3-Clause" ]
293
2015-03-22T20:22:01.000Z
2022-03-14T20:28:24.000Z
h5Nastran/h5Nastran/post_process/result_readers/punch/_punch_reader.py
ACea15/pyNastran
5ffc37d784b52c882ea207f832bceb6b5eb0e6d4
[ "BSD-3-Clause" ]
512
2015-03-14T18:39:27.000Z
2022-03-31T16:15:43.000Z
h5Nastran/h5Nastran/post_process/result_readers/punch/_punch_reader.py
ACea15/pyNastran
5ffc37d784b52c882ea207f832bceb6b5eb0e6d4
[ "BSD-3-Clause" ]
136
2015-03-19T03:26:06.000Z
2022-03-25T22:14:54.000Z
from __future__ import print_function, absolute_import from six import iteritems, itervalues from six.moves import range from ._file_reader import FileReader from ._table_data import PunchTableData # python 2/3 compatibility for chr, is there a better way? _test_chr = b'abcd' try: chr(_test_chr[0]) except TypeEr...
24.598039
88
0.557593
7db370224c83abca437809f2cd7064f0663fd989
24,882
py
Python
oscar/lib/python2.7/site-packages/_pytest/terminal.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/_pytest/terminal.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
oscar/lib/python2.7/site-packages/_pytest/terminal.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
""" terminal reporting of the full testing process. This is a good source for looking at the various reporting hooks. """ from __future__ import absolute_import, division, print_function import itertools from _pytest.main import EXIT_OK, EXIT_TESTSFAILED, EXIT_INTERRUPTED, \ EXIT_USAGEERROR, EXIT_NOTESTSC...
38.28
108
0.541918
f674a9bba2308bdc3e1841aa2e27034aa2abc64e
15,437
py
Python
oadenv/lib/python2.7/site-packages/django/utils/functional.py
isabernardes/Archaeodatabase
86090e8f840d5d202c15906e614d683f8a12d3bc
[ "MIT" ]
7
2017-02-12T06:03:00.000Z
2020-12-31T11:57:35.000Z
oadenv/lib/python2.7/site-packages/django/utils/functional.py
isabernardes/Archaeodatabase
86090e8f840d5d202c15906e614d683f8a12d3bc
[ "MIT" ]
10
2017-07-13T00:24:03.000Z
2017-07-17T07:39:03.000Z
oadenv/lib/python2.7/site-packages/django/utils/functional.py
isabernardes/Archaeodatabase
86090e8f840d5d202c15906e614d683f8a12d3bc
[ "MIT" ]
7
2017-08-01T04:02:07.000Z
2018-10-06T21:07:20.000Z
import copy import operator import warnings from functools import total_ordering, wraps from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning # You can't trivially replace this with `functools.partial` because this binds # to classes and returns bound instances, whereas functools...
34.846501
92
0.622336
08f56c6b19d9e1dc7ffd36a66c64d2001338aa12
3,014
py
Python
migrations/env.py
torbjomg/pwa_flask_app
eb84e81bee7045c46c799ea9fb62822fb5497aad
[ "MIT" ]
null
null
null
migrations/env.py
torbjomg/pwa_flask_app
eb84e81bee7045c46c799ea9fb62822fb5497aad
[ "MIT" ]
1
2021-06-08T21:02:25.000Z
2021-06-08T21:02:25.000Z
web_app/migrations/env.py
JamesBarciz/class_twitoff_new
dffe312cb7b1a5f699275eb8046d1fbccbd03a61
[ "MIT" ]
1
2021-07-07T18:23:54.000Z
2021-07-07T18:23:54.000Z
from __future__ import with_statement import logging from logging.config import fileConfig from sqlalchemy import engine_from_config from sqlalchemy import pool from alembic import context # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = co...
31.072165
78
0.689781
4eeec6acd9eaf3981aeea34d9236a6b68865b95d
8,488
py
Python
examples/deadline/All-In-AWS-Infrastructure-Basic/python/package/lib/storage_tier.py
ryyakobe/aws-rfdk
9b03a901a5f0cbc5f9747702c8151a294cd95356
[ "Apache-2.0" ]
null
null
null
examples/deadline/All-In-AWS-Infrastructure-Basic/python/package/lib/storage_tier.py
ryyakobe/aws-rfdk
9b03a901a5f0cbc5f9747702c8151a294cd95356
[ "Apache-2.0" ]
96
2021-01-21T06:50:45.000Z
2022-03-25T08:39:35.000Z
examples/deadline/All-In-AWS-Infrastructure-Basic/python/package/lib/storage_tier.py
ryyakobe/aws-rfdk
9b03a901a5f0cbc5f9747702c8151a294cd95356
[ "Apache-2.0" ]
null
null
null
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import json from dataclasses import dataclass from typing import Optional from aws_cdk.core import ( Construct, Duration, RemovalPolicy, Stack, StackProps ) from aws_cdk.aws_docdb import ( ...
32.273764
112
0.604972
4742ce175b0980518a1ef2c985fed818807a8140
389
py
Python
MSD-django/song/urls.py
bigbugbb/MSD
74764c6bb27bcdd9c69da2dc3d46980e92196cd8
[ "MIT" ]
3
2016-08-31T15:49:38.000Z
2018-08-28T14:53:10.000Z
MSD-django/song/urls.py
bigbugbb/MSD
74764c6bb27bcdd9c69da2dc3d46980e92196cd8
[ "MIT" ]
null
null
null
MSD-django/song/urls.py
bigbugbb/MSD
74764c6bb27bcdd9c69da2dc3d46980e92196cd8
[ "MIT" ]
null
null
null
from django.conf.urls import url from song import views urlpatterns = [ url(r'^profile/$', views.profile_index, name='profile_index'), url(r'^updates/$', views.update_data, name='update_data'), url(r'^predict/(?P<release_id>[0-9]+)/$', views.predict_year, name='predict_year'), url(r'^recommend/(?P<re...
27.785714
94
0.686375
eb98be1edd7a7092dec74fd4b2eaa4dc32997bbe
2,038
py
Python
examples/core_examples/linear_regression_pymc3.py
Samanwaya1301/bilby-BHNS
5670212daf48e5c54c26e1978f3e0ff66c5c3f83
[ "MIT" ]
null
null
null
examples/core_examples/linear_regression_pymc3.py
Samanwaya1301/bilby-BHNS
5670212daf48e5c54c26e1978f3e0ff66c5c3f83
[ "MIT" ]
null
null
null
examples/core_examples/linear_regression_pymc3.py
Samanwaya1301/bilby-BHNS
5670212daf48e5c54c26e1978f3e0ff66c5c3f83
[ "MIT" ]
1
2019-10-15T05:17:57.000Z
2019-10-15T05:17:57.000Z
#!/usr/bin/env python """ An example of how to use bilby to perform paramater estimation for non-gravitational wave data. In this case, fitting a linear function to data with background Gaussian noise """ from __future__ import division import bilby import numpy as np import matplotlib.pyplot as plt from bilby.core.l...
31.353846
76
0.750736
2b2fa4c821cd6537b02466ca995b2798f309b4bc
3,349
py
Python
run/executors.py
runyml/run-py
f5fdace171ca67416cb1e6d36646355db2bd1178
[ "MIT" ]
1
2017-06-19T07:14:40.000Z
2017-06-19T07:14:40.000Z
run/executors.py
runyml/run.yml-py
f5fdace171ca67416cb1e6d36646355db2bd1178
[ "MIT" ]
null
null
null
run/executors.py
runyml/run.yml-py
f5fdace171ca67416cb1e6d36646355db2bd1178
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import sys import click import select import subprocess from . import helpers from .faketty import apply_faketty # Module API def execute_sync(...
32.833333
82
0.594506
d6f87d7a9ea5dea78111471dc440de8e6337d2c6
1,197
py
Python
Communication_220114/Modules/Lidar_recv.py
zhaocy14/SmartWalker
b025a7b4a2b305838a22fe4e6116ddb951c4d7bf
[ "MIT" ]
2
2021-11-13T14:16:06.000Z
2022-01-12T06:07:32.000Z
Communication_220114/Modules/Lidar_recv.py
zhaocy14/SmartWalker
b025a7b4a2b305838a22fe4e6116ddb951c4d7bf
[ "MIT" ]
null
null
null
Communication_220114/Modules/Lidar_recv.py
zhaocy14/SmartWalker
b025a7b4a2b305838a22fe4e6116ddb951c4d7bf
[ "MIT" ]
3
2021-08-30T04:40:39.000Z
2022-01-09T11:34:04.000Z
# # Created on Wed Sep 22 2021 # Author: Owen Yip # Mail: me@owenyip.com # # Socket number: # RpLidar is 5450, IMU is 5451, Driver is 5452 # import os,sys pwd = os.path.abspath(os.path.abspath(__file__)) father_path = os.path.abspath(os.path.dirname(pwd) + os.path.sep + "..") sys.path.append(father_path) import threa...
26.6
72
0.634085
7086e911072bc9d02117dcf9aa853492add1ed47
2,761
py
Python
inspect_tree.py
ishizakiyu/neurocuts
69cf8d3a58a31f22535a5515b9c07de052976678
[ "Apache-2.0" ]
null
null
null
inspect_tree.py
ishizakiyu/neurocuts
69cf8d3a58a31f22535a5515b9c07de052976678
[ "Apache-2.0" ]
null
null
null
inspect_tree.py
ishizakiyu/neurocuts
69cf8d3a58a31f22535a5515b9c07de052976678
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Use this to visualize and check the correctness of pickled tree files. import argparse import pickle import random parser = argparse.ArgumentParser() parser.add_argument( "file", type=str, help="The tree pkl file to load and analyze.") def print_info(tree): print("This tree has {} r...
31.735632
79
0.594712
c3177acfccb484695162b9b54c0e7d317fc17f42
7,354
py
Python
Carrier_csv/csv_example.py
OSabb/dedupe-examples
c32383e15effcb169a1ec5310a52195f926a66d4
[ "MIT" ]
null
null
null
Carrier_csv/csv_example.py
OSabb/dedupe-examples
c32383e15effcb169a1ec5310a52195f926a66d4
[ "MIT" ]
null
null
null
Carrier_csv/csv_example.py
OSabb/dedupe-examples
c32383e15effcb169a1ec5310a52195f926a66d4
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ This code demonstrates how to use dedupe with a comma separated values (CSV) file. All operations are performed in memory, so will run very quickly on datasets up to ~10,000 rows. We start with a CSV file containing our messy data. In this example, it is listings of early ...
36.587065
85
0.606201
f604f3d5e4709dcb46e778d4e6985d9907bdee61
2,205
py
Python
yearn/prices/constants.py
0xean/yearn-exporter
4afe6cd8d2342bf63e0e9a6a45f6f4531b46903c
[ "MIT" ]
64
2021-03-14T22:10:08.000Z
2022-03-30T17:41:11.000Z
yearn/prices/constants.py
mariuspod/yearn-exporter
9140038ef8c208f409ad83358e2e1ba395cc5094
[ "MIT" ]
130
2021-03-03T17:11:51.000Z
2022-03-30T22:51:17.000Z
yearn/prices/constants.py
mariuspod/yearn-exporter
9140038ef8c208f409ad83358e2e1ba395cc5094
[ "MIT" ]
74
2021-03-03T17:06:39.000Z
2022-03-30T11:28:09.000Z
from brownie import chain from yearn.networks import Network tokens_by_network = { Network.Mainnet: { 'weth': '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 'usdc': '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', 'dai': '0x6B175474E89094C44Da98b954EedeAC495271d0F', }, Network.Fantom: {...
40.833333
64
0.723356
6a9854a035e130affa4348bcc1409dba6d4ac0f6
34,819
py
Python
geone/imgplot.py
alecomunian/geone
182879f017f3e92638e2d798a3f60c56d653316a
[ "BSD-4-Clause-UC" ]
null
null
null
geone/imgplot.py
alecomunian/geone
182879f017f3e92638e2d798a3f60c56d653316a
[ "BSD-4-Clause-UC" ]
null
null
null
geone/imgplot.py
alecomunian/geone
182879f017f3e92638e2d798a3f60c56d653316a
[ "BSD-4-Clause-UC" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Python module: 'imgplot.py' author: Julien Straubhaar date: dec-2017 Definition of functions for plotting images (geone.Img class). """ from geone import img from geone.img import Img from geone import customcolors as ccol from geone.customcolors i...
37.642162
105
0.523392
d3d5abd4e551c21581e9c2d5ab6b4e3ba6e1a9d2
22,605
py
Python
tests/test_firewall.py
sofyat/paasta
6765ed992ec224bf78741ffcd615a6a6c6ffb780
[ "Apache-2.0" ]
null
null
null
tests/test_firewall.py
sofyat/paasta
6765ed992ec224bf78741ffcd615a6a6c6ffb780
[ "Apache-2.0" ]
null
null
null
tests/test_firewall.py
sofyat/paasta
6765ed992ec224bf78741ffcd615a6a6c6ffb780
[ "Apache-2.0" ]
null
null
null
import mock import pytest from paasta_tools import firewall from paasta_tools import iptables from paasta_tools.utils import DEFAULT_SOA_DIR from paasta_tools.utils import NoConfigurationForServiceError EMPTY_RULE = iptables.Rule( protocol="ip", src="0.0.0.0/0.0.0.0", dst="0.0.0.0/0.0.0.0", target=No...
34.354103
90
0.528998
281cba6842977a0192d221f346105fcac415da6b
1,925
py
Python
experiments/data/utils.py
moeraza/ali-g
342e24e139fc1e75f4bf576d0784ed886f305cf8
[ "MIT" ]
50
2018-11-23T08:53:01.000Z
2022-03-04T04:15:26.000Z
experiments/data/utils.py
moeraza/ali-g
342e24e139fc1e75f4bf576d0784ed886f305cf8
[ "MIT" ]
5
2018-12-18T19:15:40.000Z
2019-05-21T12:08:56.000Z
experiments/data/utils.py
moeraza/ali-g
342e24e139fc1e75f4bf576d0784ed886f305cf8
[ "MIT" ]
11
2018-11-26T17:46:15.000Z
2020-06-13T03:01:37.000Z
import torch import numpy as np import torch.utils.data as data class Subset(data.Dataset): def __init__(self, dataset, indices=None): """ Subset of dataset given by indices. """ super(Subset, self).__init__() self.dataset = dataset self.indices = indices i...
31.048387
90
0.605714
c85f529e99086058a9477d75587a85a90882ee53
2,503
py
Python
hydra/_internal/core_plugins/basic_launcher.py
dylanturpin/hydra
6478511aee837491aab34a1e62c43c1c6ef730b9
[ "MIT" ]
2
2019-06-12T17:22:38.000Z
2020-06-10T07:58:37.000Z
hydra/_internal/core_plugins/basic_launcher.py
dylanturpin/hydra
6478511aee837491aab34a1e62c43c1c6ef730b9
[ "MIT" ]
null
null
null
hydra/_internal/core_plugins/basic_launcher.py
dylanturpin/hydra
6478511aee837491aab34a1e62c43c1c6ef730b9
[ "MIT" ]
2
2019-01-16T05:31:35.000Z
2020-04-10T22:00:01.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging from pathlib import Path from typing import List, Optional, Sequence from omegaconf import DictConfig, open_dict from hydra.core.config_loader import ConfigLoader from hydra.core.hydra_config import HydraConfig from hydra.core.utils...
34.763889
85
0.652817
a4bba7a789f39a0a92b5932c9717983503796391
377
py
Python
src/druid_query/components/to_include.py
scimas/druid_query
7b281ef83e032a2765c9840400baf08c75818fb5
[ "MIT" ]
null
null
null
src/druid_query/components/to_include.py
scimas/druid_query
7b281ef83e032a2765c9840400baf08c75818fb5
[ "MIT" ]
null
null
null
src/druid_query/components/to_include.py
scimas/druid_query
7b281ef83e032a2765c9840400baf08c75818fb5
[ "MIT" ]
null
null
null
from dataclasses import dataclass @dataclass class ToInclude: pass @dataclass class All(ToInclude): def __post_init__(self): self.type = 'all' @dataclass class Nothing(ToInclude): def __post_init__(self): self.type = 'nothing' @dataclass class List(ToInclude): columns: list[str] ...
13.962963
33
0.668435
b79742e681872a0bff898e041c1cacd8cec45e06
8,144
py
Python
tests/parquet_test.py
Ethan-DeBandi99/arkouda
c07ba2ef034ee824a21aafa6168d53b098ebd724
[ "MIT" ]
null
null
null
tests/parquet_test.py
Ethan-DeBandi99/arkouda
c07ba2ef034ee824a21aafa6168d53b098ebd724
[ "MIT" ]
null
null
null
tests/parquet_test.py
Ethan-DeBandi99/arkouda
c07ba2ef034ee824a21aafa6168d53b098ebd724
[ "MIT" ]
null
null
null
import glob import os import numpy as np import pytest from base_test import ArkoudaTest from context import arkouda as ak TYPES = ("int64", "uint64", "bool", "float64", "str") SIZE = 100 NUMFILES = 5 verbose = True def read_write_test(dtype): if dtype == "int64": ak_arr = ak.randint(0, 2**32, SIZE) ...
31.444015
82
0.577726
6dde6077e6e093c2b39491fdf7489c9d4bdbd7ab
425
py
Python
setup.py
sumit-1492/own_pypi_package
649d790d0b9509919882466d15481ace0891bd29
[ "MIT" ]
null
null
null
setup.py
sumit-1492/own_pypi_package
649d790d0b9509919882466d15481ace0891bd29
[ "MIT" ]
null
null
null
setup.py
sumit-1492/own_pypi_package
649d790d0b9509919882466d15481ace0891bd29
[ "MIT" ]
null
null
null
import setuptools setuptools.setup( name='dataprocessingml', version='0.1', author="Sumit Kumar sahoo", author_email="sumitlala99@gmail.com", description="Basic Machine Learing data processing", packages=setuptools.find_packages(), classifiers=[ "Programming Language :: Python :: 3",...
32.692308
57
0.658824
16ef38ff3f01bd5bcc00e29ca6801fc3e3b5e71c
5,380
py
Python
checkov/common/util/docs_generator.py
jthan24/checkov
dc3f1973c7f81050daf5177dd1e3e5747e87bf18
[ "Apache-2.0" ]
null
null
null
checkov/common/util/docs_generator.py
jthan24/checkov
dc3f1973c7f81050daf5177dd1e3e5747e87bf18
[ "Apache-2.0" ]
null
null
null
checkov/common/util/docs_generator.py
jthan24/checkov
dc3f1973c7f81050daf5177dd1e3e5747e87bf18
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import re from typing import List, Optional, Tuple, Union from tabulate import tabulate from checkov.arm.registry import arm_resource_registry, arm_parameter_registry from checkov.bitbucket.registry import registry as bitbucket_configuration_registry from checkov.cloudformation.checks.resource....
54.343434
120
0.743494
47748d967df6da8de44a64f842d1f536c3177fa2
2,415
py
Python
examples/plot_pole_ladder_s2.py
SaitejaUtpala/geomstats
5d4e16b3f30a86aab4725142f2263d8f10a30508
[ "MIT" ]
null
null
null
examples/plot_pole_ladder_s2.py
SaitejaUtpala/geomstats
5d4e16b3f30a86aab4725142f2263d8f10a30508
[ "MIT" ]
null
null
null
examples/plot_pole_ladder_s2.py
SaitejaUtpala/geomstats
5d4e16b3f30a86aab4725142f2263d8f10a30508
[ "MIT" ]
null
null
null
"""Plot the pole ladder scheme for parallel transport on S2. Sample a point on S2 and two tangent vectors to transport one along the other. """ import matplotlib.pyplot as plt import geomstats.backend as gs import geomstats.visualization as visualization from geomstats.geometry.hypersphere import Hypersphere from ge...
30.961538
76
0.686957
7a3fb852b50ad314f8c810e479029e2d763db806
6,612
py
Python
scripts/test.py
al093/pytorch_connectomics
52821951233b061102380fc0d2521843652c580a
[ "MIT" ]
2
2019-11-16T23:14:00.000Z
2020-09-25T09:51:46.000Z
scripts/test.py
al093/pytorch_connectomics
52821951233b061102380fc0d2521843652c580a
[ "MIT" ]
1
2020-09-22T08:49:04.000Z
2020-09-22T08:49:04.000Z
scripts/test.py
al093/pytorch_connectomics
52821951233b061102380fc0d2521843652c580a
[ "MIT" ]
null
null
null
import os,sys import numpy as np import torch import h5py, time, itertools, datetime from torch_connectomics.utils.net import * from torch_connectomics.utils.vis import visualize_aff def test(args, test_loader, model, device, model_io_size, volume_shape, pad_size): # switch to eval mode model.eval() volume...
38.894118
116
0.55974
3926bb7ffb48369ffb8931957292bf1a1be5a235
3,403
py
Python
opal_common/s3/bucket_watcher.py
NateKat/opal
6906efc793eb02da894e186484e4f4f0b18f985c
[ "Apache-2.0" ]
null
null
null
opal_common/s3/bucket_watcher.py
NateKat/opal
6906efc793eb02da894e186484e4f4f0b18f985c
[ "Apache-2.0" ]
null
null
null
opal_common/s3/bucket_watcher.py
NateKat/opal
6906efc793eb02da894e186484e4f4f0b18f985c
[ "Apache-2.0" ]
null
null
null
from opal_server.config import opal_server_config from opal_common.logger import logger from boto3 import session import time class BucketWatcher(object): """ Watches s3 bucket for changes and can trigger callbacks when detecting new versions of objects in the tracked bucket. """ def __init__(sel...
39.114943
116
0.651484
d1461455425a495eeb5dbdd1af78ac48405a53ed
5,887
py
Python
doc/conf.py
1e-to/dpnp
4a347d2d93a890a5435629c971ef6f05ae0c1d30
[ "BSD-2-Clause" ]
null
null
null
doc/conf.py
1e-to/dpnp
4a347d2d93a890a5435629c971ef6f05ae0c1d30
[ "BSD-2-Clause" ]
null
null
null
doc/conf.py
1e-to/dpnp
4a347d2d93a890a5435629c971ef6f05ae0c1d30
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config try: import comparison_generator except ImportError: # If extensions...
29.732323
97
0.655852
dd56abd16272ca391cd01a1f05b159824b2c1942
44,857
py
Python
tests/test_converter.py
rmoyard/pennylane-forest
b52dc0964e539fd2afcf2320e1b188f1ee317e11
[ "BSD-3-Clause" ]
27
2019-02-08T20:57:25.000Z
2020-09-21T01:29:22.000Z
tests/test_converter.py
stjordanis/pennylane-forest
64e877cb6e71a12d3b392fe77091e0dbe8e588db
[ "BSD-3-Clause" ]
41
2019-02-11T18:33:57.000Z
2020-09-23T16:18:35.000Z
tests/test_converter.py
stjordanis/pennylane-forest
64e877cb6e71a12d3b392fe77091e0dbe8e588db
[ "BSD-3-Clause" ]
18
2019-02-10T19:20:19.000Z
2020-09-19T07:05:14.000Z
import os import textwrap import numpy as np import pennylane as qml import pyquil import pyquil.gates as g import pytest from pennylane.tape import OperationRecorder from pennylane_forest.converter import * @pytest.mark.xfail class TestProgramConverter: """Test that PyQuil Program instances are properly convert...
35.292683
108
0.529193
b801dfedd490aff05626fb9ce25e93ff47620582
6,840
py
Python
bindings/python/ensmallen_graph/datasets/string/rhodovulumsulfidophilum.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/rhodovulumsulfidophilum.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/rhodovulumsulfidophilum.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Rhodovulum sulfidophilum. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 20...
35.811518
223
0.710234
b4327cc929b5d73b36825131fb955df83a65be44
3,793
py
Python
doc/conf.py
ceball/topographica
ec0eea614409ceb7473e04bc2f6b6c888099160f
[ "BSD-3-Clause" ]
null
null
null
doc/conf.py
ceball/topographica
ec0eea614409ceb7473e04bc2f6b6c888099160f
[ "BSD-3-Clause" ]
null
null
null
doc/conf.py
ceball/topographica
ec0eea614409ceb7473e04bc2f6b6c888099160f
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import os, sys sys.path.append(os.path.abspath('.')) from builder.shared_conf import * # pyflakes:ignore (API import) paths = ['../external/imagen/', '../external/lancet/', '../external/param/', '../external/paramtk/', '../external/dataviews/', '../external/featuremapper/', ...
33.866071
88
0.660163
fc3f0cf8143f40efb7ffd12a6887d96fcf8235ce
2,938
py
Python
examples/simple_chat/chat.py
benthomasson/gevent-socketio
0f9bd2744af033b7cba57bfd5b82106592e9f667
[ "BSD-3-Clause" ]
625
2015-01-05T04:11:59.000Z
2022-03-14T13:29:59.000Z
examples/simple_chat/chat.py
benthomasson/gevent-socketio
0f9bd2744af033b7cba57bfd5b82106592e9f667
[ "BSD-3-Clause" ]
53
2015-01-30T07:55:45.000Z
2021-02-28T10:50:34.000Z
examples/simple_chat/chat.py
benthomasson/gevent-socketio
0f9bd2744af033b7cba57bfd5b82106592e9f667
[ "BSD-3-Clause" ]
213
2015-01-05T10:18:51.000Z
2022-01-23T08:57:38.000Z
from gevent import monkey; monkey.patch_all() from socketio import socketio_manage from socketio.server import SocketIOServer from socketio.namespace import BaseNamespace from socketio.mixins import RoomsMixin, BroadcastMixin class ChatNamespace(BaseNamespace, RoomsMixin, BroadcastMixin): def on_nickname(self, n...
34.564706
78
0.616065