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
1c1357b7ae863a5222ab425c228e4925476ffe33
562
py
Python
inventories/migrations/0050_auto_20200603_2331.py
amado-developer/ReadHub-RestfulAPI
8d8b445c4a84810d52bbf78a2593e0b48351590c
[ "MIT" ]
null
null
null
inventories/migrations/0050_auto_20200603_2331.py
amado-developer/ReadHub-RestfulAPI
8d8b445c4a84810d52bbf78a2593e0b48351590c
[ "MIT" ]
7
2021-03-19T03:09:53.000Z
2022-01-13T02:48:44.000Z
inventories/migrations/0050_auto_20200603_2331.py
amado-developer/ReadHub-RestfulAPI
8d8b445c4a84810d52bbf78a2593e0b48351590c
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2020-06-03 23:31 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('digital_books', '0008_digital_book_rating'), ('inventories', '0049_auto_20200603_2327'), ] operations = [ ...
26.761905
125
0.660142
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('digital_books', '0008_digital_book_rating'), ('inventories', '0049_auto_20200603_2327'), ] operations = [ migrations.AlterField( model_...
true
true
1c1357c535746c64f9fb3d084bd849508cef3d63
5,203
py
Python
sunkit_image/tests/test_asda.py
PyDL/sunkit-image
bdfe7b402f204dc204d5e78bf9ca12ad81e1e686
[ "BSD-2-Clause-NetBSD", "BSD-2-Clause" ]
null
null
null
sunkit_image/tests/test_asda.py
PyDL/sunkit-image
bdfe7b402f204dc204d5e78bf9ca12ad81e1e686
[ "BSD-2-Clause-NetBSD", "BSD-2-Clause" ]
null
null
null
sunkit_image/tests/test_asda.py
PyDL/sunkit-image
bdfe7b402f204dc204d5e78bf9ca12ad81e1e686
[ "BSD-2-Clause-NetBSD", "BSD-2-Clause" ]
null
null
null
import numpy as np import pytest from sunkit_image import asda from sunkit_image.data.test import get_test_filepath def test_asda_artificial(): """ Generate an artificial vortex using the Lamb_Oseen class in asda, then perform the vortex detection. """ # Generate an artificial vortex vmax = 2...
35.155405
105
0.620411
import numpy as np import pytest from sunkit_image import asda from sunkit_image.data.test import get_test_filepath def test_asda_artificial(): vmax = 2.0 rmax = 50 ratio = 0.2 with pytest.raises(ValueError, match="Keyword 'r' must be an integer"): lo = asda.Lamb_Oseen(vmax=vmax, rmax=...
true
true
1c1358096bf4207ef27794cfc01301969edd65f4
1,342
py
Python
SentenceToQuery/use_core_model.py
DLR-SC/RiQue
0a85eecd777cc7f2414a228682a3932873e048cf
[ "Apache-2.0" ]
3
2019-02-01T05:58:02.000Z
2019-06-04T10:21:25.000Z
SentenceToQuery/use_core_model.py
DLR-SC/RiQue
0a85eecd777cc7f2414a228682a3932873e048cf
[ "Apache-2.0" ]
5
2018-11-26T11:10:02.000Z
2020-01-07T13:27:37.000Z
SentenceToQuery/use_core_model.py
DLR-SC/RiQue
0a85eecd777cc7f2414a228682a3932873e048cf
[ "Apache-2.0" ]
2
2019-02-07T13:50:40.000Z
2020-08-05T21:32:27.000Z
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import logging import json from rasa.core.agent import Agent from rasa.core.policies.keras_policy import KerasPolicy from rasa.core.policies.memoization import MemoizationPolicy from rasa.nlu.model import In...
28.553191
89
0.657973
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import logging import json from rasa.core.agent import Agent from rasa.core.policies.keras_policy import KerasPolicy from rasa.core.policies.memoization import MemoizationPolicy from rasa.nlu.model import In...
true
true
1c1358d7b60a9944fe9b80b1aa44750ee863b183
959
py
Python
my_lambdata/assignment_inheritance.py
jiobu1/lambdata-jiobu1_1
88f1f52ce342e363d17dbc013fdf2512ba3b0912
[ "MIT" ]
null
null
null
my_lambdata/assignment_inheritance.py
jiobu1/lambdata-jiobu1_1
88f1f52ce342e363d17dbc013fdf2512ba3b0912
[ "MIT" ]
1
2020-05-08T03:05:35.000Z
2020-05-08T03:05:35.000Z
my_lambdata/assignment_inheritance.py
jiobu1/lambdata-jiobu1
88f1f52ce342e363d17dbc013fdf2512ba3b0912
[ "MIT" ]
null
null
null
#assignment_inheritance.py from pandas import DataFrame class MyFrame(DataFrame): #writing a class that inherits from the DataFrame class # most classes do not have an argument passing through def add_state_names(self): #adding methods to the DataFrame class """ Adds a column of state names t...
38.36
117
0.662148
from pandas import DataFrame class MyFrame(DataFrame): def add_state_names(self): names_map = {"CA": "California", "CO": "Colorado", "CT": "Connecticut", "DC": "Washington DC", "TX": "Texas"} self["name"] = self["abbrev"].map(names_map) if __name__ == "__main__": my_frame ...
true
true
1c1358f51b9c97a17bb8fd569f82b4ebaa57f76c
1,204
py
Python
zuoyangblog/public/forms.py
xzyduoduo/zuoyangblog
f22930c234b2cda3b93f6d5871179e0c11c02763
[ "BSD-3-Clause" ]
null
null
null
zuoyangblog/public/forms.py
xzyduoduo/zuoyangblog
f22930c234b2cda3b93f6d5871179e0c11c02763
[ "BSD-3-Clause" ]
null
null
null
zuoyangblog/public/forms.py
xzyduoduo/zuoyangblog
f22930c234b2cda3b93f6d5871179e0c11c02763
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Public forms.""" from flask_wtf import Form from wtforms import PasswordField, StringField from wtforms.validators import DataRequired from zuoyangblog.user.models import User class LoginForm(Form): """Login form.""" username = StringField('Username', validators=[DataRequired()]) ...
30.1
77
0.641196
from flask_wtf import Form from wtforms import PasswordField, StringField from wtforms.validators import DataRequired from zuoyangblog.user.models import User class LoginForm(Form): username = StringField('Username', validators=[DataRequired()]) password = PasswordField('Password', validators=[DataRequired(...
true
true
1c135a6ce24424c63d4f3274a2de820b521bdd09
1,569
py
Python
snucovery/__init__.py
socrata-platform/snucovery
5ebd8b9dd5d6fff93eca996b8de29d30a1c8607e
[ "Apache-2.0" ]
null
null
null
snucovery/__init__.py
socrata-platform/snucovery
5ebd8b9dd5d6fff93eca996b8de29d30a1c8607e
[ "Apache-2.0" ]
1
2020-07-20T20:38:58.000Z
2020-07-20T20:38:58.000Z
snucovery/__init__.py
socrata-platform/snucovery
5ebd8b9dd5d6fff93eca996b8de29d30a1c8607e
[ "Apache-2.0" ]
2
2020-07-27T20:28:26.000Z
2020-07-28T15:22:07.000Z
import pyjq from snucovery.cli import Arguments from snucovery.aws import AwsServices from snucovery.excel import ExcelWorkbooks def main(): # Get arguments passed from the command line args = Arguments().get_args() # Instantiate an Aws session based on the profile name aws = AwsServices(args.profile...
34.866667
83
0.680688
import pyjq from snucovery.cli import Arguments from snucovery.aws import AwsServices from snucovery.excel import ExcelWorkbooks def main(): args = Arguments().get_args() aws = AwsServices(args.profile) items = aws.scan_services() excel = ExcelWorkbooks(args.workbook_name) serv...
true
true
1c135a843479ee6c98475c1734ffbb7e3594066e
3,991
py
Python
pipeline/variables/collections/cc.py
dtlisir/bk_sops
c39a23681e1fb2408ae93cebea20eb2a7dcec8ea
[ "Apache-2.0" ]
1
2019-05-21T06:44:18.000Z
2019-05-21T06:44:18.000Z
pipeline/variables/collections/cc.py
dtlisir/bk_sops
c39a23681e1fb2408ae93cebea20eb2a7dcec8ea
[ "Apache-2.0" ]
9
2020-06-05T21:29:02.000Z
2021-06-10T21:39:17.000Z
pipeline/variables/collections/cc.py
dtlisir/bk_sops
c39a23681e1fb2408ae93cebea20eb2a7dcec8ea
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
41.572917
305
0.566274
import json import re import logging from pipeline.conf import settings from pipeline.exceptions import VariableHydrateException from pipeline.components.utils import (cc_get_ips_info_by_str, cc_get_ips_by_set_and_module) from pipeline.core.data.var import LazyVariable from pipel...
true
true
1c135afd16f3a7ad9c11d5dcf1b2d1a442372bb4
5,181
py
Python
new/basecomu.py
Deepakbaskar94/Autonomous_car_base_program
9ab79aacccabb4720f9eb419838497c565d01665
[ "Apache-2.0" ]
null
null
null
new/basecomu.py
Deepakbaskar94/Autonomous_car_base_program
9ab79aacccabb4720f9eb419838497c565d01665
[ "Apache-2.0" ]
null
null
null
new/basecomu.py
Deepakbaskar94/Autonomous_car_base_program
9ab79aacccabb4720f9eb419838497c565d01665
[ "Apache-2.0" ]
null
null
null
import RPi.GPIO as GPIO from time import sleep import time import ova from device_data import get_device from luma.core.render import canvas import os #os.system('python3 ova.py') in1 = 11 in2 = 12 in3 = 13 in4 = 15 #sp = 16 en1 = 21 en = 22 TRIGM = 23 ECHOM = 24 TRIGL = 31 ECHOL = 32 TRIGR = 29 ECHOR = 26 i=0 x=0 ...
22.723684
71
0.589848
import RPi.GPIO as GPIO from time import sleep import time import ova from device_data import get_device from luma.core.render import canvas import os in1 = 11 in2 = 12 in3 = 13 in4 = 15 en1 = 21 en = 22 TRIGM = 23 ECHOM = 24 TRIGL = 31 ECHOL = 32 TRIGR = 29 ECHOR = 26 i=0 x=0 GPIO.setmode(GPIO.BOARD) GPIO.setup(i...
true
true
1c135b0c6f2ff9823640ae584806cfb75adb3df0
103
py
Python
7KYU/find_short.py
yaznasivasai/python_codewars
25493591dde4649dc9c1ec3bece8191a3bed6818
[ "MIT" ]
4
2021-07-17T22:48:03.000Z
2022-03-25T14:10:58.000Z
7KYU/find_short.py
yaznasivasai/python_codewars
25493591dde4649dc9c1ec3bece8191a3bed6818
[ "MIT" ]
null
null
null
7KYU/find_short.py
yaznasivasai/python_codewars
25493591dde4649dc9c1ec3bece8191a3bed6818
[ "MIT" ]
3
2021-06-14T14:18:16.000Z
2022-03-16T06:02:02.000Z
def find_short(s): split_str = s.split() split_str.sort(key=len) return (len(split_str[0]))
25.75
30
0.650485
def find_short(s): split_str = s.split() split_str.sort(key=len) return (len(split_str[0]))
true
true
1c135b937e16572d50f7c5e216f5fda8bd4b78bc
9,904
py
Python
core/arxiv/submission/services/compiler/tests.py
woutersj/arxiv-submission-core
6077ce4e0685d67ce7010800083a898857158112
[ "MIT" ]
14
2019-05-26T22:52:17.000Z
2021-11-05T12:26:46.000Z
core/arxiv/submission/services/compiler/tests.py
woutersj/arxiv-submission-core
6077ce4e0685d67ce7010800083a898857158112
[ "MIT" ]
30
2018-01-31T19:16:08.000Z
2018-12-08T08:41:04.000Z
core/arxiv/submission/services/compiler/tests.py
cul-it/arxiv-submission-core
6077ce4e0685d67ce7010800083a898857158112
[ "MIT" ]
8
2019-01-10T22:01:39.000Z
2021-11-20T21:44:51.000Z
"""Tests for :mod:`.compiler`.""" from unittest import TestCase, mock from flask import Flask from arxiv.integration.api import status, exceptions from . import compiler from ... import domain class TestRequestCompilation(TestCase): """Tests for :mod:`compiler.compile` with mocked responses.""" def setUp...
41.613445
89
0.553211
from unittest import TestCase, mock from flask import Flask from arxiv.integration.api import status, exceptions from . import compiler from ... import domain class TestRequestCompilation(TestCase): def setUp(self): self.app = Flask('test') self.app.config.update({ 'COMPILER_ENDPO...
true
true
1c135c3538869d5d06838483d3606014d7203513
194
py
Python
Module2/mqtt-pub.py
maxkaustav/intro-to-IoT
af68c59fc5688b5598e960895e257c1cc1a48036
[ "MIT" ]
9
2021-04-06T16:38:19.000Z
2021-07-11T18:59:16.000Z
Module2/mqtt-pub.py
spandyhub/intro-to-IoT
af68c59fc5688b5598e960895e257c1cc1a48036
[ "MIT" ]
null
null
null
Module2/mqtt-pub.py
spandyhub/intro-to-IoT
af68c59fc5688b5598e960895e257c1cc1a48036
[ "MIT" ]
7
2021-04-06T16:39:09.000Z
2021-06-02T09:16:06.000Z
import paho.mqtt.client as mqtt sensor_data = '24.3' client = mqtt.Client() client.connect("mqtt.eclipseprojects.io", 1883, 60) client.publish('topic/test', sensor_data) client.disconnect()
17.636364
51
0.747423
import paho.mqtt.client as mqtt sensor_data = '24.3' client = mqtt.Client() client.connect("mqtt.eclipseprojects.io", 1883, 60) client.publish('topic/test', sensor_data) client.disconnect()
true
true
1c135dd2f48f2e2d16b995da230130548411ec65
4,019
py
Python
tests/test_orientationd.py
davidiommi/MONAI
c470c1a67b33d7dbbce0f8b8c5ffdad84b76d60f
[ "Apache-2.0" ]
1
2022-01-04T21:38:23.000Z
2022-01-04T21:38:23.000Z
tests/test_orientationd.py
davidiommi/MONAI
c470c1a67b33d7dbbce0f8b8c5ffdad84b76d60f
[ "Apache-2.0" ]
null
null
null
tests/test_orientationd.py
davidiommi/MONAI
c470c1a67b33d7dbbce0f8b8c5ffdad84b76d60f
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 - 2021 MONAI Consortium # 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 wri...
42.755319
90
0.584971
import unittest import nibabel as nib import numpy as np from monai.transforms import Orientationd class TestOrientationdCase(unittest.TestCase): def test_orntd(self): data = {"seg": np.ones((2, 1, 2, 3)), "seg_meta_dict": {"affine": np.eye(4)}} ornt = Orientationd(keys="seg", axcodes="RAS") ...
true
true
1c135dde09d0601dfcb124fe9a8bc53f0fdd13de
1,572
py
Python
permute_without_identical_adjacencies.py
UIUCLearningLanguageLab/Balanced
c08e117f618f3eac2492b8b056e5d980795b9557
[ "MIT" ]
1
2020-02-11T14:40:31.000Z
2020-02-11T14:40:31.000Z
permute_without_identical_adjacencies.py
UIUCLearningLanguageLab/Balanced
c08e117f618f3eac2492b8b056e5d980795b9557
[ "MIT" ]
null
null
null
permute_without_identical_adjacencies.py
UIUCLearningLanguageLab/Balanced
c08e117f618f3eac2492b8b056e5d980795b9557
[ "MIT" ]
null
null
null
""" Re-used code that first appeared here: https://stackoverflow.com/questions/25285792/generate-all-permutations-of-a-list-without-adjacent-equal-elements """ import random from collections import Counter from operator import itemgetter def get_mode(count): return max(count.items(), key=itemgetter(1))[0] def...
28.581818
112
0.639313
import random from collections import Counter from operator import itemgetter def get_mode(count): return max(count.items(), key=itemgetter(1))[0] def enum2(prefix, x, count, total, mode): prefix.append(x) count_x = count[x] if count_x == 1: del count[x] else: count[x] = count_x...
true
true
1c136107c0d520de6946421322fc15c676011ca7
4,367
py
Python
instagram/tests.py
nickobrad/instagram_clone
4a1ff565e25d4a02140e468b984df5c5385e471c
[ "MIT" ]
null
null
null
instagram/tests.py
nickobrad/instagram_clone
4a1ff565e25d4a02140e468b984df5c5385e471c
[ "MIT" ]
null
null
null
instagram/tests.py
nickobrad/instagram_clone
4a1ff565e25d4a02140e468b984df5c5385e471c
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth.models import User from .models import Image, Profile, Comment from django.contrib.auth import get_user_model # Create your tests here. class ProfileTestCase(TestCase): # Set up method def setUp(self): self.new_user = User(id = 1, first_name =...
37.008475
141
0.647584
from django.test import TestCase from django.contrib.auth.models import User from .models import Image, Profile, Comment from django.contrib.auth import get_user_model class ProfileTestCase(TestCase): def setUp(self): self.new_user = User(id = 1, first_name = 'James', last_name = 'Bond', username = '...
true
true
1c1361e37c2b2e522250c65d11a5302da97e599c
20,521
py
Python
riptable/benchmarks/bench_merge.py
972d5defe3218bd62b741e6a2f11f5b3/riptable
bb928c11752e831ec701f91964979b31db53826a
[ "BSD-2-Clause-Patent" ]
307
2020-08-27T20:25:11.000Z
2022-03-08T15:51:19.000Z
riptable/benchmarks/bench_merge.py
972d5defe3218bd62b741e6a2f11f5b3/riptable
bb928c11752e831ec701f91964979b31db53826a
[ "BSD-2-Clause-Patent" ]
206
2020-08-17T19:07:15.000Z
2022-03-18T11:53:55.000Z
riptable/benchmarks/bench_merge.py
972d5defe3218bd62b741e6a2f11f5b3/riptable
bb928c11752e831ec701f91964979b31db53826a
[ "BSD-2-Clause-Patent" ]
10
2020-08-28T00:22:05.000Z
2021-04-30T20:22:28.000Z
""" Benchmarks for 'merge' functions. """ __all__ = [ "bench_merge", "bench_merge2", "bench_merge2_with_settings", "bench_merge_pandas", "compare_merge", ] import itertools import logging import numpy as np from numpy.random import default_rng from itertools import product from ty...
39.924125
223
0.597778
__all__ = [ "bench_merge", "bench_merge2", "bench_merge2_with_settings", "bench_merge_pandas", "compare_merge", ] import itertools import logging import numpy as np from numpy.random import default_rng from itertools import product from typing import List, Tuple from .benchmark im...
true
true
1c136272bf941b35b449393cd1a8da0edfb36ec0
773
py
Python
contatos/models.py
MatheusAfinovicz/Agenda
4bf25ce6fcf64dcc186b274b9433be7d7763411c
[ "MIT" ]
null
null
null
contatos/models.py
MatheusAfinovicz/Agenda
4bf25ce6fcf64dcc186b274b9433be7d7763411c
[ "MIT" ]
null
null
null
contatos/models.py
MatheusAfinovicz/Agenda
4bf25ce6fcf64dcc186b274b9433be7d7763411c
[ "MIT" ]
null
null
null
from django.db import models from django.utils import timezone class Categoria(models.Model): nome = models.CharField(max_length=250) def __str__(self): return self.nome class Contato(models.Model): nome = models.CharField(max_length=250) sobrenome = models.CharField(max_length=250, blank=T...
30.92
73
0.732212
from django.db import models from django.utils import timezone class Categoria(models.Model): nome = models.CharField(max_length=250) def __str__(self): return self.nome class Contato(models.Model): nome = models.CharField(max_length=250) sobrenome = models.CharField(max_length=250, blank=T...
true
true
1c1362f56b1f08a7dfd1f7c5142c31f7dbbb9e25
8,505
py
Python
sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/operations/_alerts_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/operations/_alerts_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_05_01_preview/operations/_alerts_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.481283
208
0.654086
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpR...
true
true
1c136406cb6cfd3cede9bd60621104d268a0cdcf
18,816
py
Python
tensorflow/compiler/tf2xla/python/xla.py
ashutom/tensorflow-upstream
c16069c19de9e286dd664abb78d0ea421e9f32d4
[ "Apache-2.0" ]
3
2021-07-24T07:19:49.000Z
2021-07-25T04:04:36.000Z
tensorflow/compiler/tf2xla/python/xla.py
ashutom/tensorflow-upstream
c16069c19de9e286dd664abb78d0ea421e9f32d4
[ "Apache-2.0" ]
null
null
null
tensorflow/compiler/tf2xla/python/xla.py
ashutom/tensorflow-upstream
c16069c19de9e286dd664abb78d0ea421e9f32d4
[ "Apache-2.0" ]
1
2021-09-08T07:26:06.000Z
2021-09-08T07:26:06.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
34.335766
81
0.752392
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.compiler.tf2xla.ops import gen_xla_ops from tensorflow.core.framework import attr_value_pb2 from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes fr...
true
true
1c13643482f67eae2851005d36184d6c689f20c1
2,384
py
Python
yardstick/tests/unit/benchmark/scenarios/lib/test_get_flavor.py
upfront710/yardstick
2c3898f2ca061962cedbfc7435f78b59aa39b097
[ "Apache-2.0" ]
28
2017-02-07T07:46:42.000Z
2021-06-30T08:11:06.000Z
yardstick/tests/unit/benchmark/scenarios/lib/test_get_flavor.py
upfront710/yardstick
2c3898f2ca061962cedbfc7435f78b59aa39b097
[ "Apache-2.0" ]
6
2018-01-18T08:00:54.000Z
2019-04-11T04:51:41.000Z
yardstick/tests/unit/benchmark/scenarios/lib/test_get_flavor.py
upfront710/yardstick
2c3898f2ca061962cedbfc7435f78b59aa39b097
[ "Apache-2.0" ]
46
2016-12-13T10:05:47.000Z
2021-02-18T07:33:06.000Z
############################################################################## # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, ...
41.103448
78
0.645554
from oslo_utils import uuidutils import unittest import mock from yardstick.common import openstack_utils from yardstick.common import exceptions from yardstick.benchmark.scenarios.lib import get_flavor class GetFlavorTestCase(unittest.TestCase): def setUp(self): self._mock_get_flavor = mock.patch.obje...
true
true
1c1364c4dd91e039ad13580d9d34d9bd7266570d
4,457
py
Python
rapid7_insightvm/komand_rapid7_insightvm/actions/get_asset_vulnerabilities/action.py
emartin-merrill-r7/insightconnect-plugins
a589745dbcc9f01d3e601431e77ab7221a84c117
[ "MIT" ]
1
2020-03-18T09:14:55.000Z
2020-03-18T09:14:55.000Z
rapid7_insightvm/komand_rapid7_insightvm/actions/get_asset_vulnerabilities/action.py
OSSSP/insightconnect-plugins
846758dab745170cf1a8c146211a8bea9592e8ff
[ "MIT" ]
null
null
null
rapid7_insightvm/komand_rapid7_insightvm/actions/get_asset_vulnerabilities/action.py
OSSSP/insightconnect-plugins
846758dab745170cf1a8c146211a8bea9592e8ff
[ "MIT" ]
null
null
null
import komand from .schema import GetAssetVulnerabilitiesInput, GetAssetVulnerabilitiesOutput # Custom imports below import requests from komand_rapid7_insightvm.util import endpoints from collections import namedtuple import json from komand.exceptions import PluginException class GetAssetVulnerabilities(komand.Acti...
46.427083
150
0.565178
import komand from .schema import GetAssetVulnerabilitiesInput, GetAssetVulnerabilitiesOutput import requests from komand_rapid7_insightvm.util import endpoints from collections import namedtuple import json from komand.exceptions import PluginException class GetAssetVulnerabilities(komand.Action): _ERRORS = { ...
true
true
1c1364f7e48f8dba1dcf484ec121912dcf6c3859
507
py
Python
Algorithms/0011_Container_With_Most_Water.py
drjordy66/LeetCode
ba0c04ee5ddc8c9177dd2995be95dd6d0640bc38
[ "MIT" ]
null
null
null
Algorithms/0011_Container_With_Most_Water.py
drjordy66/LeetCode
ba0c04ee5ddc8c9177dd2995be95dd6d0640bc38
[ "MIT" ]
null
null
null
Algorithms/0011_Container_With_Most_Water.py
drjordy66/LeetCode
ba0c04ee5ddc8c9177dd2995be95dd6d0640bc38
[ "MIT" ]
null
null
null
class Solution: def maxArea(self, height): """ :type height: List[int] :rtype: int """ most_water = 0 a_left = 0 a_right = len(height) - 1 while a_left < a_right: water = min(height[a_left], height[a_right]) * (a_right - a_left) ...
28.166667
77
0.487179
class Solution: def maxArea(self, height): most_water = 0 a_left = 0 a_right = len(height) - 1 while a_left < a_right: water = min(height[a_left], height[a_right]) * (a_right - a_left) most_water = max(most_water, water) if height[a_left] < height[...
true
true
1c1366d122b7a259e36882525d3d0ce37e1f85d3
621
py
Python
tests/pdk/finfet/test_pnr.py
pretl/ALIGN-public
4b03042d9e96fa669740427842b0bf268b0c9a86
[ "BSD-3-Clause" ]
null
null
null
tests/pdk/finfet/test_pnr.py
pretl/ALIGN-public
4b03042d9e96fa669740427842b0bf268b0c9a86
[ "BSD-3-Clause" ]
null
null
null
tests/pdk/finfet/test_pnr.py
pretl/ALIGN-public
4b03042d9e96fa669740427842b0bf268b0c9a86
[ "BSD-3-Clause" ]
null
null
null
import textwrap try: from .utils import get_test_id, build_example, run_example from . import circuits except ImportError: from utils import get_test_id, build_example, run_example import circuits cleanup = False def test_cs_grid(): name = f'ckt_{get_test_id()}' netlist = circuits.common_sour...
28.227273
95
0.676329
import textwrap try: from .utils import get_test_id, build_example, run_example from . import circuits except ImportError: from utils import get_test_id, build_example, run_example import circuits cleanup = False def test_cs_grid(): name = f'ckt_{get_test_id()}' netlist = circuits.common_sour...
true
true
1c1367198050ac5e64f3effd7e81b31e5cdfaeec
10,480
py
Python
Document_Retrieval_Assignment_Files/eval_ir.py
ace18zz/COM3110-Document-Retrieval-Assignment
5c2d936319e3ab97212118db25c3ac2367a61d77
[ "MIT" ]
3
2019-12-16T00:07:41.000Z
2020-02-26T04:48:23.000Z
Document_Retrieval_Assignment_Files/eval_ir.py
ace18zz/COM3110-Document-Retrieval-Assignment
5c2d936319e3ab97212118db25c3ac2367a61d77
[ "MIT" ]
3
2020-03-24T17:52:35.000Z
2021-08-23T20:29:52.000Z
Document_Retrieval_Assignment_Files/eval_ir.py
ace18zz/COM3110-Document-Retrieval-Assignment
5c2d936319e3ab97212118db25c3ac2367a61d77
[ "MIT" ]
2
2020-02-27T09:32:29.000Z
2021-11-23T14:21:51.000Z
"""\ -------------------------------------------------------------------------------- USE: python <PROGNAME> (options) keyfile response ACTION: computes IR system performance measures, given input files: * 'keyfile' - a "gold standard" indicating the documents that are relevant to...
37.971014
104
0.539027
import sys, re import getopt class CommandLine: def __init__(self): opts, args = getopt.getopt(sys.argv[1:],'hn:qfFi:I') opts = dict(opts) if '-h' in opts: self.printHelp() if len(args) == 2: self.keyfile = args[0] self.responsefile = args[1] ...
true
true
1c13688c3c542c463b79a8dcb22fc76daddc50cb
45
py
Python
src/hub/dataload/sources/uniprot/__init__.py
erikyao/myvariant.info
a4eaaca7ab6c069199f8942d5afae2dece908147
[ "Apache-2.0" ]
39
2017-07-01T22:34:39.000Z
2022-03-15T22:25:59.000Z
src/hub/dataload/sources/uniprot/__init__.py
erikyao/myvariant.info
a4eaaca7ab6c069199f8942d5afae2dece908147
[ "Apache-2.0" ]
105
2017-06-28T17:26:06.000Z
2022-03-17T17:49:53.000Z
src/hub/dataload/sources/uniprot/__init__.py
erikyao/myvariant.info
a4eaaca7ab6c069199f8942d5afae2dece908147
[ "Apache-2.0" ]
15
2015-10-15T20:46:50.000Z
2021-07-12T19:17:49.000Z
from .uniprot_upload import UniprotUploader
15
43
0.866667
from .uniprot_upload import UniprotUploader
true
true
1c1369d873f8f561b744141983323292fd74d028
15,693
py
Python
sdk/python/pulumi_aws/sns/platform_application.py
mdop-wh/pulumi-aws
05bb32e9d694dde1c3b76d440fd2cd0344d23376
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/sns/platform_application.py
mdop-wh/pulumi-aws
05bb32e9d694dde1c3b76d440fd2cd0344d23376
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/sns/platform_application.py
mdop-wh/pulumi-aws
05bb32e9d694dde1c3b76d440fd2cd0344d23376
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from .. import ...
58.775281
394
0.70592
import warnings import pulumi import pulumi.runtime from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from .. import _utilities, _tables __all__ = ['PlatformApplication'] class PlatformApplication(pulumi.CustomResource): def __init__(__self__, resource_name: str, ...
true
true
1c136b20b4c39a40f3c7eb295582ab60c1b317bd
6,621
py
Python
scanpy/api/__init__.py
dhb2128/scanpy
78649a991197af4685a8fe2f7a0d24064e3056bd
[ "BSD-3-Clause" ]
null
null
null
scanpy/api/__init__.py
dhb2128/scanpy
78649a991197af4685a8fe2f7a0d24064e3056bd
[ "BSD-3-Clause" ]
null
null
null
scanpy/api/__init__.py
dhb2128/scanpy
78649a991197af4685a8fe2f7a0d24064e3056bd
[ "BSD-3-Clause" ]
null
null
null
from anndata import AnnData from ..neighbors import Neighbors from anndata import read as read_h5ad from anndata import read_csv, read_excel, read_hdf, read_loom, read_mtx, read_text, read_umi_tools from .. import __version__ from . import tl from . import pl from . import pp from ..readwrite import read, read_10x_h...
21.153355
107
0.631476
from anndata import AnnData from ..neighbors import Neighbors from anndata import read as read_h5ad from anndata import read_csv, read_excel, read_hdf, read_loom, read_mtx, read_text, read_umi_tools from .. import __version__ from . import tl from . import pl from . import pp from ..readwrite import read, read_10x_h...
true
true
1c136b9a478eee80035db479bf8c62d59f56459f
1,798
py
Python
setup.py
mramospe/confmgr
f70023bcd40d6844b6aa279348dee44a610309bd
[ "MIT" ]
null
null
null
setup.py
mramospe/confmgr
f70023bcd40d6844b6aa279348dee44a610309bd
[ "MIT" ]
null
null
null
setup.py
mramospe/confmgr
f70023bcd40d6844b6aa279348dee44a610309bd
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' Setup script for the "confmgr" package ''' __author__ = 'Miguel Ramos Pernas' __email__ = 'miguel.ramos.pernas@cern.ch' # Python import os from setuptools import setup, find_packages # # Version of the package. Before a new release is made # just the "version_info" must be changed. # vers...
21.662651
76
0.634038
__author__ = 'Miguel Ramos Pernas' __email__ = 'miguel.ramos.pernas@cern.ch' import os from setuptools import setup, find_packages version_info = (0, 0, 0, 'dev', 1) tag = version_info[3] if tag != 'final': if tag == 'alpha': frmt = '{}a{}' elif tag == 'beta': frmt = '{}b{}' elif tag ...
true
true
1c136bcf69b2cee4f48657613ae63d60e4bee765
606
py
Python
core/entities/cannon_create.py
TheArchives/Nexus
5482def8b50562fdbae980cda9b1708bfad8bffb
[ "BSD-2-Clause" ]
1
2021-04-06T18:54:31.000Z
2021-04-06T18:54:31.000Z
core/entities/cannon_create.py
TheArchives/Nexus
5482def8b50562fdbae980cda9b1708bfad8bffb
[ "BSD-2-Clause" ]
null
null
null
core/entities/cannon_create.py
TheArchives/Nexus
5482def8b50562fdbae980cda9b1708bfad8bffb
[ "BSD-2-Clause" ]
1
2021-12-20T18:11:25.000Z
2021-12-20T18:11:25.000Z
# The Nexus software is licensed under the BSD 2-Clause license. # # You should have recieved a copy of this license with the software. # If you did not, you can find one at the following link. # # http://opensource.org/licenses/bsd-license.php if ph >= 224 or ph < 32: var_orientation = 0 elif 32 <= ph < 96: ...
31.894737
105
0.711221
if ph >= 224 or ph < 32: var_orientation = 0 elif 32 <= ph < 96: var_orientation = 1 elif 96 <= ph < 160: var_orientation = 2 elif 160 <= ph < 224: var_orientation = 3 entitylist.append(["cannon",(x,y,z),8,8,None,var_orientation,False]) self.client.sendSplitServerMessage("A cannon was created, load it...
true
true
1c136be4dde9c97c01649b1dab62135eed8062d8
8,821
py
Python
dygraph/deploy/python/visualize.py
syyxsxx/PaddleDetection
da0e1eed6472d492abc9db1db324569f9be62a5f
[ "Apache-2.0" ]
27
2020-12-07T10:46:39.000Z
2021-08-01T08:56:33.000Z
dygraph/deploy/python/visualize.py
syyxsxx/PaddleDetection
da0e1eed6472d492abc9db1db324569f9be62a5f
[ "Apache-2.0" ]
4
2020-12-18T08:06:15.000Z
2021-08-01T02:54:50.000Z
dygraph/deploy/python/visualize.py
syyxsxx/PaddleDetection
da0e1eed6472d492abc9db1db324569f9be62a5f
[ "Apache-2.0" ]
4
2020-12-18T04:37:42.000Z
2020-12-31T02:08:33.000Z
# coding: utf-8 # copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
35.284
87
0.552318
from __future__ import division import cv2 import numpy as np from PIL import Image, ImageDraw from scipy import ndimage def visualize_box_mask(im, results, labels, mask_resolution=14, threshold=0.5): if isinstance(im, str): im = Image.open(im).convert('RGB') else: im = Image.fromarray(im) ...
true
true
1c136d950898339db23dda7ef1d4b38f83185661
352
py
Python
setup.py
Ryuk17/lawliet
ba4734557260b255896707210fca3e2fff311e87
[ "Apache-2.0" ]
2
2021-04-20T03:51:32.000Z
2021-06-16T11:48:06.000Z
setup.py
Ryuk17/lawliet
ba4734557260b255896707210fca3e2fff311e87
[ "Apache-2.0" ]
null
null
null
setup.py
Ryuk17/lawliet
ba4734557260b255896707210fca3e2fff311e87
[ "Apache-2.0" ]
null
null
null
""" @FileName: setup.py @Description: Implement setup @Author: Ryuk @CreateDate: 2021/06/27 @LastEditTime: 2021/06/27 @LastEditors: Please set LastEditors @Version: v0.1 """ from setuptools import setup NAME = 'lawliet' VERSION = '1.0' PY_MODULES = ['lawliet','test'] setup(name = NAME , version = VERSION ...
17.6
36
0.6875
from setuptools import setup NAME = 'lawliet' VERSION = '1.0' PY_MODULES = ['lawliet','test'] setup(name = NAME , version = VERSION , py_modules = PY_MODULES)
true
true
1c136dfeaf0730cab39c72a679afcb32bbe85f5d
3,319
py
Python
atl/conv_abund_format_anders.py
rtagirov/python_scr_pc_imperial
423204964ddbc9c117bd2b3bb4397ee98b89a56d
[ "MIT" ]
null
null
null
atl/conv_abund_format_anders.py
rtagirov/python_scr_pc_imperial
423204964ddbc9c117bd2b3bb4397ee98b89a56d
[ "MIT" ]
null
null
null
atl/conv_abund_format_anders.py
rtagirov/python_scr_pc_imperial
423204964ddbc9c117bd2b3bb4397ee98b89a56d
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import importlib import re import sys if not '../aux/' in sys.path: sys.path.append('../aux/') import paths; importlib.reload(paths) import phys; importlib.reload(phys) from decimal import Decimal ab_all = np.loadtxt(paths.inp + 'CARDS_DEF_AB_ONLY') atmean = ab...
19.296512
67
0.52335
import numpy as np import matplotlib.pyplot as plt import importlib import re import sys if not '../aux/' in sys.path: sys.path.append('../aux/') import paths; importlib.reload(paths) import phys; importlib.reload(phys) from decimal import Decimal ab_all = np.loadtxt(paths.inp + 'CARDS_DEF_AB_ONLY') atmean = ab...
true
true
1c136ed86440548e429d3a2b43e47c56cd786465
382
py
Python
examples/neopixel_crawl.py
r1val/123
65c8455a3f6982f743261d41eb4bd43eaf788b47
[ "MIT" ]
null
null
null
examples/neopixel_crawl.py
r1val/123
65c8455a3f6982f743261d41eb4bd43eaf788b47
[ "MIT" ]
null
null
null
examples/neopixel_crawl.py
r1val/123
65c8455a3f6982f743261d41eb4bd43eaf788b47
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2017 Richard Hull and contributors # See LICENSE.rst for details. import time from luma.led_matrix.device import neopixel from luma.core.render import canvas device = neopixel(cascaded=32) for i in range(device.cascaded): with canvas(device) as draw:...
22.470588
50
0.701571
import time from luma.led_matrix.device import neopixel from luma.core.render import canvas device = neopixel(cascaded=32) for i in range(device.cascaded): with canvas(device) as draw: draw.point((i, 0), fill="green") time.sleep(0.5)
true
true
1c136f6034b5004144d3dec3a973631a6f25adf8
1,543
py
Python
src/training/preprocessing_divert.py
zhichul/pi-bob
b9ed7cb3614f50c51c6273665d8cd2b62dcab886
[ "MIT" ]
null
null
null
src/training/preprocessing_divert.py
zhichul/pi-bob
b9ed7cb3614f50c51c6273665d8cd2b62dcab886
[ "MIT" ]
null
null
null
src/training/preprocessing_divert.py
zhichul/pi-bob
b9ed7cb3614f50c51c6273665d8cd2b62dcab886
[ "MIT" ]
null
null
null
import sys import os import numpy as np import cv2 def parseData(path): # res = {"l":[],"r":[],"s":[]} res = {"l":[],"r":[],"s":[],"n":[],"d":[]} for file in os.listdir(path): img = cv2.imread(os.path.join(path,file),0) decision = file.split("-")[0] t = [0] # t = [0] * 4 if decision == "left": pass e...
27.553571
97
0.604018
import sys import os import numpy as np import cv2 def parseData(path): res = {"l":[],"r":[],"s":[],"n":[],"d":[]} for file in os.listdir(path): img = cv2.imread(os.path.join(path,file),0) decision = file.split("-")[0] t = [0] if decision == "left": pass elif decision == "right": pass elif decis...
true
true
1c136fd8110a8f96b6143e907df31b18189a4197
365
py
Python
dotloop/participant.py
spentaur/dotloop-python
5374ab5f5e16f9b826438a9c4f051a4be53d433b
[ "MIT" ]
null
null
null
dotloop/participant.py
spentaur/dotloop-python
5374ab5f5e16f9b826438a9c4f051a4be53d433b
[ "MIT" ]
null
null
null
dotloop/participant.py
spentaur/dotloop-python
5374ab5f5e16f9b826438a9c4f051a4be53d433b
[ "MIT" ]
1
2021-07-28T14:28:17.000Z
2021-07-28T14:28:17.000Z
from .bases import DotloopObject class Participant(DotloopObject, id_field='participant_id'): def delete(self): return self.fetch('delete') def get(self): return self.fetch('get') def patch(self, **kwargs): return self.fetch('patch', json=kwargs) def post(self, **kwargs): ...
22.8125
60
0.643836
from .bases import DotloopObject class Participant(DotloopObject, id_field='participant_id'): def delete(self): return self.fetch('delete') def get(self): return self.fetch('get') def patch(self, **kwargs): return self.fetch('patch', json=kwargs) def post(self, **kwargs): ...
true
true
1c1374951fb09a9dab7304a44f74722b23c762ec
2,256
py
Python
version.py
groupserver/gs.auth.token
5b653f6664fc34cf543ce81bbec12057d04dd2dd
[ "ZPL-2.1" ]
null
null
null
version.py
groupserver/gs.auth.token
5b653f6664fc34cf543ce81bbec12057d04dd2dd
[ "ZPL-2.1" ]
null
null
null
version.py
groupserver/gs.auth.token
5b653f6664fc34cf543ce81bbec12057d04dd2dd
[ "ZPL-2.1" ]
null
null
null
# -*- coding: utf-8 -*- version = '2.1.1' release = False #--------------------------------------------------------------------------# import sys if (sys.version_info < (3, )): from commands import getstatusoutput else: from subprocess import getstatusoutput # lint:ok import datetime import os import glob c...
29.298701
76
0.596188
version = '2.1.1' release = False import sys if (sys.version_info < (3, )): from commands import getstatusoutput else: from subprocess import getstatusoutput import datetime import os import glob class CommandError(Exception): pass def execute_command(commandstring): status, output = getstatusoutp...
true
true
1c137519a3d17db1818e0c8718ac9a36b37cc70f
9,072
py
Python
finetune_stage1/config_our_3dpoint.py
wangkangkan/LearningDenseCorrespondences
724eb9521de1abeda551ede6d93cbecaba90efbd
[ "MIT" ]
null
null
null
finetune_stage1/config_our_3dpoint.py
wangkangkan/LearningDenseCorrespondences
724eb9521de1abeda551ede6d93cbecaba90efbd
[ "MIT" ]
null
null
null
finetune_stage1/config_our_3dpoint.py
wangkangkan/LearningDenseCorrespondences
724eb9521de1abeda551ede6d93cbecaba90efbd
[ "MIT" ]
null
null
null
""" Sets default args Note all data format is NHWC because slim resnet wants NHWC. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys from absl import flags import os.path as osp from os import makedirs from glob import glob from datetime impor...
38.769231
289
0.64914
from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys from absl import flags import os.path as osp from os import makedirs from glob import glob from datetime import datetime import json import numpy as np curr_path = osp.dirname(osp.abspath(__file__...
true
true
1c137532846bc39f9fda58c59b7b9f2d3dc074f9
954
py
Python
Topic_5_data-structures/randomQueue.py
Izardo/myWork
f2a6fd46f31f840589108963d6c0e9d7fdc9ddde
[ "MIT" ]
null
null
null
Topic_5_data-structures/randomQueue.py
Izardo/myWork
f2a6fd46f31f840589108963d6c0e9d7fdc9ddde
[ "MIT" ]
null
null
null
Topic_5_data-structures/randomQueue.py
Izardo/myWork
f2a6fd46f31f840589108963d6c0e9d7fdc9ddde
[ "MIT" ]
null
null
null
# This program outputs a list of 10 random integers # using the pop function, it removes the int at index 0 # printing the current list after each pop # Author: Isabella Doyle import random # imports 'random' module queue = [] # creates empty list amountOfNumber = 10 # variable equals 10 #...
38.16
83
0.703354
import random queue = [] amountOfNumber = 10 for i in range(0, 10): queue.append(random.randint(0, 100)) print("The queue is {}".format(queue)) while len(queue) != 0: currentNum = queue.pop(0) print("The current number is {} and the queue is {}".format(currentNum, queu...
true
true
1c1375c53bef4c1b457d615f57061a389efe4123
10,123
py
Python
test/autests/gold_tests/field_verification/not_nocase.test.py
keesspoelstra/proxy-verifier
1b219d68783a453c2271108bbea5a9529d018498
[ "Apache-2.0" ]
31
2020-03-03T04:37:36.000Z
2022-03-31T15:43:07.000Z
test/autests/gold_tests/field_verification/not_nocase.test.py
keesspoelstra/proxy-verifier
1b219d68783a453c2271108bbea5a9529d018498
[ "Apache-2.0" ]
33
2020-02-11T19:34:12.000Z
2021-06-21T20:07:32.000Z
test/autests/gold_tests/field_verification/not_nocase.test.py
keesspoelstra/proxy-verifier
1b219d68783a453c2271108bbea5a9529d018498
[ "Apache-2.0" ]
13
2020-02-07T20:04:02.000Z
2021-12-21T21:26:40.000Z
''' Verify correct field and URL verification behavior for not and nocase modifiers. ''' # @file # # Copyright 2021, Verizon Media # SPDX-License-Identifier: Apache-2.0 # Test.Summary = ''' Verify correct field and URL verification behavior for equals, absent, present, contains, prefix, and suffix with not, nocase, a...
53.560847
136
0.712042
Test.Summary = ''' Verify correct field and URL verification behavior for equals, absent, present, contains, prefix, and suffix with not, nocase, and both not and nocase modifiers ''' r = Test.AddTestRun("Verify 'not' and 'nocase' directives work for a single HTTP transaction") client = r.AddClientProcess("client1",...
true
true
1c1375e7943509146163f37114e51496085618bb
34
py
Python
tests/integration/bot/utils/__init__.py
RaenonX/Jelly-Bot-API
c7da1e91783dce3a2b71b955b3a22b68db9056cf
[ "MIT" ]
5
2020-08-26T20:12:00.000Z
2020-12-11T16:39:22.000Z
tests/integration/bot/utils/__init__.py
RaenonX/Jelly-Bot
c7da1e91783dce3a2b71b955b3a22b68db9056cf
[ "MIT" ]
234
2019-12-14T03:45:19.000Z
2020-08-26T18:55:19.000Z
tests/integration/bot/utils/__init__.py
RaenonX/Jelly-Bot-API
c7da1e91783dce3a2b71b955b3a22b68db9056cf
[ "MIT" ]
2
2019-10-23T15:21:15.000Z
2020-05-22T09:35:55.000Z
from .calculator import * # noqa
17
33
0.705882
from .calculator import *
true
true
1c137631de49c45572e00ed3f2a9600857bb1095
11,789
py
Python
parse.py
Whisprin/seedvault_backup_parser
cd73357229a13a10c03f01059b5d41ddb27c6916
[ "Apache-2.0" ]
null
null
null
parse.py
Whisprin/seedvault_backup_parser
cd73357229a13a10c03f01059b5d41ddb27c6916
[ "Apache-2.0" ]
null
null
null
parse.py
Whisprin/seedvault_backup_parser
cd73357229a13a10c03f01059b5d41ddb27c6916
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import re import os import sys import getpass import glob import string import struct import hashlib from Crypto.Cipher import AES from base64 import urlsafe_b64decode, urlsafe_b64encode # separator can't be in urlsafe b64 alphabet. -> no A-Za-Z0-9-_ -> choose . B64_SEPARATOR = "." # parses fi...
31.270557
121
0.611417
import re import os import sys import getpass import glob import string import struct import hashlib from Crypto.Cipher import AES from base64 import urlsafe_b64decode, urlsafe_b64encode B64_SEPARATOR = "." # parses file-path, where file is a base64 encoded key into the decoded filename def filepath_to_key(filepath)...
true
true
1c1376d5f21d7329d8d9b3b267c1295775abb86d
110
py
Python
addons14/web_access_rule_buttons/tests/__init__.py
odoochain/addons_oca
55d456d798aebe16e49b4a6070765f206a8885ca
[ "MIT" ]
1
2021-06-10T14:59:13.000Z
2021-06-10T14:59:13.000Z
addons14/web_access_rule_buttons/tests/__init__.py
odoochain/addons_oca
55d456d798aebe16e49b4a6070765f206a8885ca
[ "MIT" ]
null
null
null
addons14/web_access_rule_buttons/tests/__init__.py
odoochain/addons_oca
55d456d798aebe16e49b4a6070765f206a8885ca
[ "MIT" ]
1
2021-04-09T09:44:44.000Z
2021-04-09T09:44:44.000Z
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from . import test_access_rule_buttons
27.5
69
0.763636
from . import test_access_rule_buttons
true
true
1c1376db7d05a8cf5652a42ecf2e563958899afb
11,721
py
Python
Add_buttons.py
njcuk9999/matplotlib_select
f36546805f0b511b558bf1cae491c0e699f60c4c
[ "MIT" ]
null
null
null
Add_buttons.py
njcuk9999/matplotlib_select
f36546805f0b511b558bf1cae491c0e699f60c4c
[ "MIT" ]
null
null
null
Add_buttons.py
njcuk9999/matplotlib_select
f36546805f0b511b558bf1cae491c0e699f60c4c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on 17/02/17 at 11:48 PM @author: neil Program description here Version 0.0.1 """ import matplotlib.pyplot as plt from matplotlib.widgets import Button import sys # detect python version # if python 3 do this: if (sys.version_info > (3, 0)): import tkint...
37.091772
79
0.491767
import matplotlib.pyplot as plt from matplotlib.widgets import Button import sys if (sys.version_info > (3, 0)): import tkinter import tkinter.simpledialog as tksimpledialog else: import Tkinter as tkinter import tkSimpleDialog as tksimpledialog class Add_Buttons(object): def __init__(self, ax=Non...
true
true
1c1378bfa4600f2e87afe2215f9590c9b3ad831b
17,359
py
Python
test/hummingbot/strategy/test_strategy_base.py
cardosofede/hummingbot
d1df085bb879a06a7dc77d4fdc8ff6f13d8726ca
[ "Apache-2.0" ]
542
2021-12-17T22:34:31.000Z
2022-03-31T14:36:23.000Z
test/hummingbot/strategy/test_strategy_base.py
cardosofede/hummingbot
d1df085bb879a06a7dc77d4fdc8ff6f13d8726ca
[ "Apache-2.0" ]
291
2021-12-17T20:07:53.000Z
2022-03-31T11:07:23.000Z
test/hummingbot/strategy/test_strategy_base.py
cardosofede/hummingbot
d1df085bb879a06a7dc77d4fdc8ff6f13d8726ca
[ "Apache-2.0" ]
220
2021-12-17T12:41:23.000Z
2022-03-31T23:03:22.000Z
import asyncio import logging import time import unittest import unittest.mock from datetime import datetime from decimal import Decimal from typing import ( Any, Dict, List, Union, Tuple, ) from hummingbot.client.hummingbot_application import HummingbotApplication from hummingbot.connector.exchang...
38.921525
123
0.667838
import asyncio import logging import time import unittest import unittest.mock from datetime import datetime from decimal import Decimal from typing import ( Any, Dict, List, Union, Tuple, ) from hummingbot.client.hummingbot_application import HummingbotApplication from hummingbot.connector.exchang...
true
true
1c1379bcd205d607399bf657b59ae1207072a0a9
35,647
py
Python
rlkit/torch/sac/agent.py
pairlab/ocean
f416c836e26fe8813c1d345cc391b56d948d22f0
[ "BSD-3-Clause" ]
5
2020-10-02T03:24:35.000Z
2021-07-22T15:09:04.000Z
rlkit/torch/sac/agent.py
pairlab/ocean
f416c836e26fe8813c1d345cc391b56d948d22f0
[ "BSD-3-Clause" ]
5
2021-02-02T22:58:51.000Z
2022-03-12T00:46:31.000Z
rlkit/torch/sac/agent.py
pairlab/ocean
f416c836e26fe8813c1d345cc391b56d948d22f0
[ "BSD-3-Clause" ]
2
2020-08-07T14:41:52.000Z
2020-09-28T15:19:13.000Z
import numpy as np import torch from torch import nn as nn import torch.nn.functional as F import rlkit.torch.pytorch_util as ptu import pdb import os eps = 1e-11 def _product_of_categorical_all(z_means): z_means = torch.log(z_means+eps) z_mean = torch.sum(z_means, dim=-2) cc = torch.max(z_mean).detach...
57.0352
183
0.625719
import numpy as np import torch from torch import nn as nn import torch.nn.functional as F import rlkit.torch.pytorch_util as ptu import pdb import os eps = 1e-11 def _product_of_categorical_all(z_means): z_means = torch.log(z_means+eps) z_mean = torch.sum(z_means, dim=-2) cc = torch.max(z_mean).detach...
true
true
1c1379f8163e0e26e55edadba7d1773359d09d1e
211
py
Python
JDjango/api/djangotools/__init__.py
JIYANG-PLUS/JDjango
57cbb13b2b4c07f34d546c0c637c22f60c1e692a
[ "MIT" ]
3
2020-12-28T05:09:02.000Z
2021-06-23T10:02:03.000Z
JDjango/api/djangotools/__init__.py
JIYANG-PLUS/JDjango
57cbb13b2b4c07f34d546c0c637c22f60c1e692a
[ "MIT" ]
null
null
null
JDjango/api/djangotools/__init__.py
JIYANG-PLUS/JDjango
57cbb13b2b4c07f34d546c0c637c22f60c1e692a
[ "MIT" ]
null
null
null
from . import config as SCONFIGS from .app import * from .models import * from .urls import * from .views import * from .settings import * from .templates import * from .admin import * from .basetools import *
19.181818
32
0.734597
from . import config as SCONFIGS from .app import * from .models import * from .urls import * from .views import * from .settings import * from .templates import * from .admin import * from .basetools import *
true
true
1c137d2751d09eef1905f443fc3c4f9599f3d34e
58,527
py
Python
win/devkit/other/pymel/extras/completion/py/maya/OpenMayaUI.py
leegoonz/Maya-devkit
b81fe799b58e854e4ef16435426d60446e975871
[ "ADSL" ]
10
2018-03-30T16:09:02.000Z
2021-12-07T07:29:19.000Z
win/devkit/other/pymel/extras/completion/py/maya/OpenMayaUI.py
leegoonz/Maya-devkit
b81fe799b58e854e4ef16435426d60446e975871
[ "ADSL" ]
null
null
null
win/devkit/other/pymel/extras/completion/py/maya/OpenMayaUI.py
leegoonz/Maya-devkit
b81fe799b58e854e4ef16435426d60446e975871
[ "ADSL" ]
9
2018-06-02T09:18:49.000Z
2021-12-20T09:24:35.000Z
from . import OpenMaya import weakref import _OpenMayaUI from . import OpenMayaRender import __builtin__ as ___builtin__ from __builtin__ import object as _object from __builtin__ import property as _swig_property class MEvent(_object): def __init__(self, *args): pass def __repr__(self): ...
14.828224
73
0.524578
from . import OpenMaya import weakref import _OpenMayaUI from . import OpenMayaRender import __builtin__ as ___builtin__ from __builtin__ import object as _object from __builtin__ import property as _swig_property class MEvent(_object): def __init__(self, *args): pass def __repr__(self): ...
true
true
1c137d4da61465828dc476305898effe91e9fa34
2,937
py
Python
tests/test_time.py
jaebradley/flix
adc02c2f08d01e1acd6f18065be70a8c87e71e55
[ "MIT" ]
null
null
null
tests/test_time.py
jaebradley/flix
adc02c2f08d01e1acd6f18065be70a8c87e71e55
[ "MIT" ]
4
2017-06-13T12:40:03.000Z
2021-06-01T21:54:58.000Z
tests/test_time.py
jaebradley/flix
adc02c2f08d01e1acd6f18065be70a8c87e71e55
[ "MIT" ]
null
null
null
from unittest import TestCase from datetime import date, timedelta from dateutil.relativedelta import relativedelta from mock import patch from data.time import get_next_weekday_date, identify_month_integer_from_abbreviation, get_next_date, get_date from data.exceptions import InvalidDateException class TestGetNex...
40.791667
110
0.758938
from unittest import TestCase from datetime import date, timedelta from dateutil.relativedelta import relativedelta from mock import patch from data.time import get_next_weekday_date, identify_month_integer_from_abbreviation, get_next_date, get_date from data.exceptions import InvalidDateException class TestGetNex...
true
true
1c137d9b5c41151d2b49cd896cbc1b800eb276a5
3,240
py
Python
nautobot/utilities/git.py
jfach/nautobot
8965c30ffb0c1ea64f9710eada7fb49a6f2a4b62
[ "Apache-2.0" ]
2
2021-11-01T10:17:02.000Z
2021-11-08T08:35:44.000Z
nautobot/utilities/git.py
jfach/nautobot
8965c30ffb0c1ea64f9710eada7fb49a6f2a4b62
[ "Apache-2.0" ]
null
null
null
nautobot/utilities/git.py
jfach/nautobot
8965c30ffb0c1ea64f9710eada7fb49a6f2a4b62
[ "Apache-2.0" ]
1
2021-02-24T23:02:28.000Z
2021-02-24T23:02:28.000Z
"""General-purpose Git utilities.""" import logging import os from git import Repo logger = logging.getLogger("nautobot.utilities.git") class BranchDoesNotExist(Exception): pass class GitRepo: def __init__(self, path, url): """ Ensure that we have a clone of the given remote Git reposito...
42.631579
120
0.629938
import logging import os from git import Repo logger = logging.getLogger("nautobot.utilities.git") class BranchDoesNotExist(Exception): pass class GitRepo: def __init__(self, path, url): if os.path.isdir(path): self.repo = Repo(path=path) else: self.repo = Repo.cl...
true
true
1c137e14a1fb96af619db665a945b8296e301f52
1,335
py
Python
tests/resources/generator/ode_multiple_dependent_odes/model.py
nickerso/libcellml
9fe5ecabc3e63c49d5ee8539ed2c8ce572a9712a
[ "Apache-2.0" ]
null
null
null
tests/resources/generator/ode_multiple_dependent_odes/model.py
nickerso/libcellml
9fe5ecabc3e63c49d5ee8539ed2c8ce572a9712a
[ "Apache-2.0" ]
null
null
null
tests/resources/generator/ode_multiple_dependent_odes/model.py
nickerso/libcellml
9fe5ecabc3e63c49d5ee8539ed2c8ce572a9712a
[ "Apache-2.0" ]
null
null
null
# The content of this file was generated using the Python profile of libCellML 0.2.0. from enum import Enum from math import * __version__ = "0.3.0" LIBCELLML_VERSION = "0.2.0" STATE_COUNT = 2 VARIABLE_COUNT = 1 class VariableType(Enum): VARIABLE_OF_INTEGRATION = 1 STATE = 2 CONSTANT = 3 COMPUTED_...
22.627119
117
0.677154
from enum import Enum from math import * __version__ = "0.3.0" LIBCELLML_VERSION = "0.2.0" STATE_COUNT = 2 VARIABLE_COUNT = 1 class VariableType(Enum): VARIABLE_OF_INTEGRATION = 1 STATE = 2 CONSTANT = 3 COMPUTED_CONSTANT = 4 ALGEBRAIC = 5 VOI_INFO = {"name": "t", "units": "second", "componen...
true
true
1c137f66278dd2a9cab23673126b7c72638e8f5e
10,104
py
Python
model/backup.py
leokb24/BIMPM-pytorch
0f3267e33b26a63732f5a7487a74570cf9df9aed
[ "MIT" ]
3
2019-12-29T10:23:32.000Z
2020-08-04T01:49:50.000Z
model/backup.py
leokb24/BIMPM-pytorch
0f3267e33b26a63732f5a7487a74570cf9df9aed
[ "MIT" ]
1
2019-08-04T09:02:04.000Z
2019-08-04T09:02:04.000Z
model/backup.py
leokb24/BIMPM-pytorch
0f3267e33b26a63732f5a7487a74570cf9df9aed
[ "MIT" ]
2
2020-03-07T10:14:16.000Z
2020-08-04T01:49:56.000Z
import torch import torch.nn as nn import torch.nn.functional as F from pdb import set_trace as bp class BiMPM(nn.Module): def __init__(self, args, data): super(BiMPM, self).__init__() self.args = args self.d = self.args.word_dim + int(self.args.use_char_emb) * self.args.char_hidden_size ...
42.453782
107
0.591251
import torch import torch.nn as nn import torch.nn.functional as F from pdb import set_trace as bp class BiMPM(nn.Module): def __init__(self, args, data): super(BiMPM, self).__init__() self.args = args self.d = self.args.word_dim + int(self.args.use_char_emb) * self.args.char_hidden_size ...
true
true
1c1380c43b16defa937d8b0e635dcd8cbca56d29
16,335
py
Python
scannet/utils/pc_utils.py
googleinterns/deep-3d-reconstruction
cd4e1ddb5a410b3629341fad21582c9d7ce07de8
[ "Apache-2.0" ]
4
2020-05-29T21:58:33.000Z
2021-09-05T11:26:00.000Z
scannet/utils/pc_utils.py
googleinterns/deep-3d-reconstruction
cd4e1ddb5a410b3629341fad21582c9d7ce07de8
[ "Apache-2.0" ]
4
2020-06-22T16:08:44.000Z
2022-03-31T03:59:00.000Z
scannet/utils/pc_utils.py
googleinterns/deep-3d-reconstruction
cd4e1ddb5a410b3629341fad21582c9d7ce07de8
[ "Apache-2.0" ]
null
null
null
""" Utility functions for processing point clouds. Author: Charles R. Qi, Hao Su Date: November 2016 """ import os import sys import warnings BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) # Draw point cloud from eulerangles import euler2mat # Point cloud IO import numpy as np from ...
37.551724
104
0.590695
import os import sys import warnings BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) from eulerangles import euler2mat import numpy as np from plyfile import PlyData, PlyElement def point_cloud_to_volume_batch(point_clouds, vsize=12, radius=1.0, flatten=True): vol_list = [] ...
true
true
1c1380dc634296cc12318f42979ce9eef227f152
1,402
py
Python
docs/conf.py
iris-dni/iris-backend
680aadb1d9dd02e031b1902a4f9ef19440959465
[ "Apache-2.0" ]
2
2017-08-28T14:26:54.000Z
2017-09-15T20:49:35.000Z
docs/conf.py
iris-dni/iris-backend
680aadb1d9dd02e031b1902a4f9ef19440959465
[ "Apache-2.0" ]
27
2016-09-16T09:44:44.000Z
2017-03-27T12:05:31.000Z
docs/conf.py
iris-dni/iris-backend
680aadb1d9dd02e031b1902a4f9ef19440959465
[ "Apache-2.0" ]
null
null
null
# Shared Source Software # Copyright (c) 2015, Lovely Systems GmbH # -*- coding: utf-8 -*- import os # inject the VERSION constant used below # This can be used because the build script updates the version number before # building the RPM. here = os.path.dirname(__file__) project_root = os.path.dirname(here) VERSIO...
26.961538
79
0.715407
import os here = os.path.dirname(__file__) project_root = os.path.dirname(here) VERSION = '?' execfile(os.path.join(project_root, 'src/iris/service/__init__.py')) docs_version = VERSION pyramid_conf = os.path.join(project_root, 'etc', 'development.ini') source_suffix = '.rst' master_doc = 'index' nitpicky = Tru...
true
true
1c13819c61c66e10f60e9d9c97421dff8dc986f5
1,935
py
Python
pyramid_oauth2_provider/__init__.py
elliotpeele/pyramid_oauth2_provider
d781f8091e60b727437443cdf3c680ee184dc600
[ "MIT" ]
23
2015-03-05T22:14:57.000Z
2021-02-19T20:53:15.000Z
pyramid_oauth2_provider/__init__.py
elliotpeele/pyramid_oauth2_provider
d781f8091e60b727437443cdf3c680ee184dc600
[ "MIT" ]
8
2016-06-09T17:31:52.000Z
2017-06-01T02:19:18.000Z
pyramid_oauth2_provider/__init__.py
elliotpeele/pyramid_oauth2_provider
d781f8091e60b727437443cdf3c680ee184dc600
[ "MIT" ]
16
2015-06-12T13:13:04.000Z
2022-02-13T06:15:46.000Z
# # Copyright (c) Elliot Peele <elliot@bentlogic.net> # # This program is distributed under the terms of the MIT License as found # in a file called LICENSE. If it is not present, the license # is always available at http://www.opensource.org/licenses/mit-license.php. # # This program is distributed in the hope that it...
35.833333
77
0.769509
from sqlalchemy import engine_from_config from pyramid.config import Configurator from pyramid.exceptions import ConfigurationError from pyramid.interfaces import IAuthenticationPolicy from .models import initialize_sql from .interfaces import IAuthCheck from .authentication import OauthAuthenticationPolicy from . ...
true
true
1c1382c3baff226b22873540d037ffbc5e079f60
1,138
py
Python
proxys_ip/proxy_ip_pool/setup.py
oloeye/Anti-Anti-Crawler
122554de4a7cf5664a37c116fa7b85e7afda4176
[ "MIT" ]
2
2018-03-16T14:15:39.000Z
2020-01-07T08:39:20.000Z
proxys_ip/proxy_ip_pool/setup.py
oloeye/Anti-Anti-Crawler
122554de4a7cf5664a37c116fa7b85e7afda4176
[ "MIT" ]
null
null
null
proxys_ip/proxy_ip_pool/setup.py
oloeye/Anti-Anti-Crawler
122554de4a7cf5664a37c116fa7b85e7afda4176
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Author: Hobo # @Date: 2017-10-31 15:42:03 # @Last Modified by: Hobo # @Last Modified time: 2018-01-02 12:10:53 try: from setuptools import setup except ImportError: from distutils.core import setup setup( name='proxy_ip_pool', version='0.1.0', url='http...
27.756098
71
0.600176
try: from setuptools import setup except ImportError: from distutils.core import setup setup( name='proxy_ip_pool', version='0.1.0', url='https://github.com/luxux/Anti-reptile', license='BSD', author='Hobo', author_email='Hoboalia@gmail.com', description='requests+sqli...
true
true
1c1384045b3e299ef725d4f9ac04b8c5e39ccb44
1,853
py
Python
src/hypernevus/models.py
thomasjo/hypernevus
7ebb56d38e52f202c687bebf8108ecffe247964a
[ "MIT" ]
null
null
null
src/hypernevus/models.py
thomasjo/hypernevus
7ebb56d38e52f202c687bebf8108ecffe247964a
[ "MIT" ]
null
null
null
src/hypernevus/models.py
thomasjo/hypernevus
7ebb56d38e52f202c687bebf8108ecffe247964a
[ "MIT" ]
null
null
null
import torch.nn as nn class Autoencoder(nn.Module): def __init__(self, input_size): super().__init__() c, h, w = input_size assert h == w, "spatial dimensions of input must be square" self.input_size = input_size self.encoder = nn.Sequential( # conv1 ...
28.075758
67
0.50027
import torch.nn as nn class Autoencoder(nn.Module): def __init__(self, input_size): super().__init__() c, h, w = input_size assert h == w, "spatial dimensions of input must be square" self.input_size = input_size self.encoder = nn.Sequential( nn.Co...
true
true
1c13847c413fe71a59e8c7b065231c9872b85c30
269
py
Python
tests/mocks/apps.py
OohlaLabs/django-pods
64d950e1db6193cc3d6f20b77629c622a89e689d
[ "MIT" ]
6
2015-01-30T09:20:13.000Z
2015-03-16T09:56:20.000Z
tests/mocks/apps.py
OohlaLabs/django-pods
64d950e1db6193cc3d6f20b77629c622a89e689d
[ "MIT" ]
1
2018-01-09T23:07:36.000Z
2018-01-11T22:29:52.000Z
tests/mocks/apps.py
OohlaLabs/django-pods
64d950e1db6193cc3d6f20b77629c622a89e689d
[ "MIT" ]
2
2016-06-08T09:12:43.000Z
2018-01-09T22:11:05.000Z
from pods.apps import AppSettings class MockAppConfig(AppSettings): settings_key = 'MOCK' settings_module = 'tests.mocks.app_test_settings' settings_imports = ( 'APP_MODULE', 'MULTIPLE_APP_MODULES', 'NON_EXISTENT_APP_MODULE' )
22.416667
53
0.687732
from pods.apps import AppSettings class MockAppConfig(AppSettings): settings_key = 'MOCK' settings_module = 'tests.mocks.app_test_settings' settings_imports = ( 'APP_MODULE', 'MULTIPLE_APP_MODULES', 'NON_EXISTENT_APP_MODULE' )
true
true
1c1385a04cf971471b3585c0070f4d5d00ada3f0
416
py
Python
routes/user_bp.py
BashirAljounaidy/Flask-MVC
fca4b10a57dd8194d570eb62e66c60d5f022eaca
[ "MIT" ]
null
null
null
routes/user_bp.py
BashirAljounaidy/Flask-MVC
fca4b10a57dd8194d570eb62e66c60d5f022eaca
[ "MIT" ]
null
null
null
routes/user_bp.py
BashirAljounaidy/Flask-MVC
fca4b10a57dd8194d570eb62e66c60d5f022eaca
[ "MIT" ]
null
null
null
from flask import Blueprint from controllers.UserController import index, store, show, update, destroy user_bp = Blueprint('user_bp', __name__) user_bp.route('/', methods=['GET'])(index) user_bp.route('/create', methods=['POST'])(store) user_bp.route('/<int:user_id>', methods=['GET'])(show) user_bp.route('/<int:user_id...
46.222222
74
0.71875
from flask import Blueprint from controllers.UserController import index, store, show, update, destroy user_bp = Blueprint('user_bp', __name__) user_bp.route('/', methods=['GET'])(index) user_bp.route('/create', methods=['POST'])(store) user_bp.route('/<int:user_id>', methods=['GET'])(show) user_bp.route('/<int:user_id...
true
true
1c1386a179718325c8f3198bad998901fe50c72e
6,406
py
Python
app.py
turbotardigrade/fly
b2f2675c9b5f921aecbc0ee1c5a78b4435bc642c
[ "MIT" ]
null
null
null
app.py
turbotardigrade/fly
b2f2675c9b5f921aecbc0ee1c5a78b4435bc642c
[ "MIT" ]
null
null
null
app.py
turbotardigrade/fly
b2f2675c9b5f921aecbc0ee1c5a78b4435bc642c
[ "MIT" ]
null
null
null
from flask import Flask, flash, request, redirect, url_for, render_template, jsonify from werkzeug.utils import secure_filename import sys import os import json import logging import urllib import location_analyzer import suggester import db import precomputed app = Flask(__name__, static_url_path='/static') mode...
30.798077
136
0.615517
from flask import Flask, flash, request, redirect, url_for, render_template, jsonify from werkzeug.utils import secure_filename import sys import os import json import logging import urllib import location_analyzer import suggester import db import precomputed app = Flask(__name__, static_url_path='/static') mode...
false
true
1c1386f366fff4142d439ed4c7e98e9fb5529054
1,038
py
Python
setup.py
dstao3489/pyvesync
5cf2c8b667aae0dd7b82d93619f277fc6e7c8800
[ "MIT" ]
null
null
null
setup.py
dstao3489/pyvesync
5cf2c8b667aae0dd7b82d93619f277fc6e7c8800
[ "MIT" ]
null
null
null
setup.py
dstao3489/pyvesync
5cf2c8b667aae0dd7b82d93619f277fc6e7c8800
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='pyvesync', version='1.1.0', description='pyvesync is a library to ma...
31.454545
73
0.659923
from setuptools import setup, find_packages from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='pyvesync', version='1.1.0', description='pyvesync is a library to ma...
true
true
1c13887755399fc89d5e64b9b9c23f95166dbb84
743
py
Python
InjectionLog/migrations/0011_auto_20200525_1809.py
JKesslerPhD/FIPInjectionLogger
f6ad4956552409a75ef75287b764bcd1863781b1
[ "Apache-2.0" ]
1
2020-12-01T19:08:42.000Z
2020-12-01T19:08:42.000Z
InjectionLog/migrations/0011_auto_20200525_1809.py
JKesslerPhD/FIPInjectionLogger
f6ad4956552409a75ef75287b764bcd1863781b1
[ "Apache-2.0" ]
49
2020-07-15T16:56:30.000Z
2021-12-27T21:38:10.000Z
InjectionLog/migrations/0011_auto_20200525_1809.py
JKesslerPhD/FIPInjectionLogger
f6ad4956552409a75ef75287b764bcd1863781b1
[ "Apache-2.0" ]
1
2021-11-15T20:20:42.000Z
2021-11-15T20:20:42.000Z
# Generated by Django 3.0.6 on 2020-05-25 18:09 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('InjectionLog', '0010_auto_20200525_1805'), ] operations = [ migrations.AlterField( model_name='cats', ...
24.766667
80
0.581427
import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('InjectionLog', '0010_auto_20200525_1805'), ] operations = [ migrations.AlterField( model_name='cats', name='birthday', field=models.Date...
true
true
1c1388929a540cec45600471ad7006e4e23b4f00
799
py
Python
feed/migrations/0009_preferences.py
DeanBiton/JobSeeker
ed60ec1ab4a047700d72b44d7a042dd834e43abd
[ "MIT" ]
null
null
null
feed/migrations/0009_preferences.py
DeanBiton/JobSeeker
ed60ec1ab4a047700d72b44d7a042dd834e43abd
[ "MIT" ]
null
null
null
feed/migrations/0009_preferences.py
DeanBiton/JobSeeker
ed60ec1ab4a047700d72b44d7a042dd834e43abd
[ "MIT" ]
null
null
null
from django.db import migrations from job_board.models.preference import Preference, JobType, Location from feed.resources.preferences import PREFERENCES class Migration(migrations.Migration): dependencies = [ ('feed', '0008_users'), ('job_board', '0004_preference_work_schedule_and_more'), ] ...
31.96
77
0.665832
from django.db import migrations from job_board.models.preference import Preference, JobType, Location from feed.resources.preferences import PREFERENCES class Migration(migrations.Migration): dependencies = [ ('feed', '0008_users'), ('job_board', '0004_preference_work_schedule_and_more'), ] ...
true
true
1c1388abbd54edbea2be7e0d4f61c7db847a0086
5,960
py
Python
password_reset/views.py
shrestha013/django-password-reset
3f793fc43bfc2a2ddc07829ee1c755e49e52b5f3
[ "BSD-3-Clause" ]
194
2015-01-18T17:15:37.000Z
2021-11-18T12:09:43.000Z
password_reset/views.py
shrestha013/django-password-reset
3f793fc43bfc2a2ddc07829ee1c755e49e52b5f3
[ "BSD-3-Clause" ]
46
2015-01-29T09:11:06.000Z
2022-02-06T14:35:58.000Z
password_reset/views.py
shrestha013/django-password-reset
3f793fc43bfc2a2ddc07829ee1c755e49e52b5f3
[ "BSD-3-Clause" ]
115
2015-01-13T23:28:19.000Z
2021-11-15T19:37:29.000Z
import datetime from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.sites.shortcuts import get_current_site from django.core import signing from django.core.mail import send_mail from django.http import Http404 from django.shortcuts import get_object_or_404, redirect fro...
32.928177
77
0.648993
import datetime from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.sites.shortcuts import get_current_site from django.core import signing from django.core.mail import send_mail from django.http import Http404 from django.shortcuts import get_object_or_404, redirect fro...
true
true
1c138bfa3a7c934ebcc4d1ea295ba31e71441165
816
py
Python
Day_4/Binomial_Distribution_1_.py
Kasun-se-2018-023/HackerRank_10_days_statistics_course
7a3c34def304b5c4d201a9efc9cf94dfafc4cc57
[ "MIT" ]
1
2021-10-10T06:43:55.000Z
2021-10-10T06:43:55.000Z
Day_4/Binomial_Distribution_1_.py
Kasun-se-2018-023/HackerRank_10_days_statistics_course
7a3c34def304b5c4d201a9efc9cf94dfafc4cc57
[ "MIT" ]
null
null
null
Day_4/Binomial_Distribution_1_.py
Kasun-se-2018-023/HackerRank_10_days_statistics_course
7a3c34def304b5c4d201a9efc9cf94dfafc4cc57
[ "MIT" ]
1
2021-08-04T17:29:40.000Z
2021-08-04T17:29:40.000Z
# Enter your code here. Read input from STDIN. Print output to STDOUT '''at least 3 boys means family can have also 4,5 or 6 boys A - baby is a girl B - baby is a boy P(B) = 1.09/ 2.09 P(A) = 1/ 2.09 families with exactly 6 children will have at least 3 boys means : family = {3 boys, 4 boys, 5 boys, 6 boys} ''' #th...
22.054054
99
0.582108
def factorial(n): fact =1 for i in range(n): fact = fact * (i+1) return fact if __name__ == "__main__": n = 6 girl = 1 boy = 1.09 P_girl = girl/(girl + boy) P_boy = 1-P_girl val =0 for i in range(3): r = i val = val + ((factorial(n)/(factorial(n-r)* fa...
true
true
1c138d057c24b79b17e95f8cf23e4a152f3a9e3e
7,371
py
Python
bungieapi/generated/components/responses/destiny/responses.py
itemmanager/bungieapi
0c4326f88ea0f28a1dcab683dc08c8d21c940fc1
[ "MIT" ]
5
2022-01-06T21:05:53.000Z
2022-02-12T19:58:11.000Z
bungieapi/generated/components/responses/destiny/responses.py
itemmanager/bungieapi
0c4326f88ea0f28a1dcab683dc08c8d21c940fc1
[ "MIT" ]
8
2021-12-25T02:40:56.000Z
2022-03-28T03:31:41.000Z
bungieapi/generated/components/responses/destiny/responses.py
itemmanager/bungieapi
0c4326f88ea0f28a1dcab683dc08c8d21c940fc1
[ "MIT" ]
1
2022-01-30T23:53:25.000Z
2022-01-30T23:53:25.000Z
# generated by update to not change manually import dataclasses as dt import typing as t from bungieapi.json import to_json @dt.dataclass(frozen=True) class DestinyLinkedProfilesClientResponse: detailed_error_trace: str error_code: "PlatformErrorCodes" error_status: str message: str message_data:...
33.352941
84
0.667888
import dataclasses as dt import typing as t from bungieapi.json import to_json @dt.dataclass(frozen=True) class DestinyLinkedProfilesClientResponse: detailed_error_trace: str error_code: "PlatformErrorCodes" error_status: str message: str message_data: t.Mapping[str, str] response: "DestinyLi...
true
true
1c138d06485b5c1915c0083db1d8c5da41699ad1
1,181
py
Python
django_geoip/management/commands/geoip_update.py
artofhuman/django-geoip
c8dab365f00e59a2d79119faa7094d5ba707a5fb
[ "MIT" ]
1
2017-04-24T05:47:12.000Z
2017-04-24T05:47:12.000Z
django_geoip/management/commands/geoip_update.py
dd/django-geoip
c8634d138ee3151fa5fa7ddeb37ed0e564fb0734
[ "MIT" ]
null
null
null
django_geoip/management/commands/geoip_update.py
dd/django-geoip
c8634d138ee3151fa5fa7ddeb37ed0e564fb0734
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import logging from optparse import make_option from django.core.management.base import BaseCommand from ..ipgeobase import IpGeobase class Command(BaseCommand): help = 'Updates django-geoip data stored in db' option_list = BaseCommand.option_list + ( make_option('--clear', ...
29.525
60
0.623201
import logging from optparse import make_option from django.core.management.base import BaseCommand from ..ipgeobase import IpGeobase class Command(BaseCommand): help = 'Updates django-geoip data stored in db' option_list = BaseCommand.option_list + ( make_option('--clear', action='store...
true
true
1c138d34a9898c52d4f003fb352649578465ce81
119
py
Python
Algumas_coisas_que_fiz/mexendo com arquivo e erros.py
TheCarvalho/Curso-Em-Video-Python
8bd5128023ddf8b0f59eab46463c95e47569da73
[ "Unlicense" ]
null
null
null
Algumas_coisas_que_fiz/mexendo com arquivo e erros.py
TheCarvalho/Curso-Em-Video-Python
8bd5128023ddf8b0f59eab46463c95e47569da73
[ "Unlicense" ]
null
null
null
Algumas_coisas_que_fiz/mexendo com arquivo e erros.py
TheCarvalho/Curso-Em-Video-Python
8bd5128023ddf8b0f59eab46463c95e47569da73
[ "Unlicense" ]
null
null
null
try: a = open('porra.txt', 'rt') a.close() except FileNotFoundError: print('ok') else: print('erro')
11.9
31
0.563025
try: a = open('porra.txt', 'rt') a.close() except FileNotFoundError: print('ok') else: print('erro')
true
true
1c138d71c0a7654c352964776233da61e7905824
1,436
py
Python
qa/rpc-tests/signmessages.py
zahidaliayub/straks
c55ada5e0f3749c4f7f710e55aade2a442effd6a
[ "MIT" ]
67
2017-11-21T01:32:30.000Z
2022-03-17T10:17:53.000Z
qa/rpc-tests/signmessages.py
zahidaliayub/straks
c55ada5e0f3749c4f7f710e55aade2a442effd6a
[ "MIT" ]
22
2017-11-21T15:43:59.000Z
2019-06-19T12:40:30.000Z
qa/rpc-tests/signmessages.py
zahidaliayub/straks
c55ada5e0f3749c4f7f710e55aade2a442effd6a
[ "MIT" ]
52
2017-11-21T06:05:34.000Z
2022-03-17T10:18:47.000Z
#!/usr/bin/env python3 # Copyright (c) 2016 The Straks Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import StraksTestFramework from test_framework.util import * class SignMes...
34.190476
74
0.706825
from test_framework.test_framework import StraksTestFramework from test_framework.util import * class SignMessagesTest(StraksTestFramework): def __init__(self): super().__init__() self.setup_clean_chain = True self.num_nodes = 1 def setup_network(self, split=False): self.nod...
true
true
1c138e23368ac4a09df134c3ee9a8236077251a0
2,829
py
Python
model.py
KrishPro/Reverse-Seqs
1729170c93693a4b0b96d55a573b722772c9f8af
[ "Apache-2.0" ]
null
null
null
model.py
KrishPro/Reverse-Seqs
1729170c93693a4b0b96d55a573b722772c9f8af
[ "Apache-2.0" ]
null
null
null
model.py
KrishPro/Reverse-Seqs
1729170c93693a4b0b96d55a573b722772c9f8af
[ "Apache-2.0" ]
null
null
null
""" Written by KrishPro @ KP """ import torch.nn as nn import torch import math class PositionalEncoding(nn.Module): def __init__(self, emb_size: int, dropout: float, maxlen: int = 5000): super(PositionalEncoding, self).__init__() den = torch.exp...
41.602941
162
0.67515
import torch.nn as nn import torch import math class PositionalEncoding(nn.Module): def __init__(self, emb_size: int, dropout: float, maxlen: int = 5000): super(PositionalEncoding, self).__init__() den = torch.exp(- torch.arange(0, emb_size, 2)* ...
true
true
1c138e2ad833ef250d107a3c905b0c0ec90490f8
2,047
py
Python
plugins/neighbors/neighbors.py
qrilka/this-week-in-rust
f8d52595802c29c7ac950c6d6d48c0e89f3d79c3
[ "MIT" ]
533
2020-10-02T23:11:23.000Z
2022-03-31T17:25:25.000Z
plugins/neighbors/neighbors.py
qrilka/this-week-in-rust
f8d52595802c29c7ac950c6d6d48c0e89f3d79c3
[ "MIT" ]
304
2020-10-03T14:45:20.000Z
2022-03-31T06:28:58.000Z
plugins/neighbors/neighbors.py
qrilka/this-week-in-rust
f8d52595802c29c7ac950c6d6d48c0e89f3d79c3
[ "MIT" ]
423
2020-10-09T17:09:41.000Z
2022-03-30T14:37:52.000Z
# -*- coding: utf-8 -*- """ Neighbor Articles Plugin for Pelican ==================================== This plugin adds ``next_article`` (newer) and ``prev_article`` (older) variables to the article's context. Adapted from: https://github.com/getpelican/pelican-plugins/blob/master/neighbors/neighbors.py """ from colle...
29.666667
94
0.653639
from collections import namedtuple from pelican import signals Neighbors = namedtuple('Neighbors', ['next', 'current', 'previous']) def iter_neighbors(seq): iterator = iter(seq) nxt = None current = next(iterator) for previous in iterator: yield Neighbors(next=nxt, current=current, previous=...
true
true
1c138f8659916dc6cdc1b1af86da52b5340ef946
2,160
py
Python
api/tacticalrmm/tacticalrmm/urls.py
subzdev/tacticalrmm
21d8899e9a01f0939ab908e82e1205fa7b632caf
[ "MIT" ]
1
2021-12-29T07:20:57.000Z
2021-12-29T07:20:57.000Z
api/tacticalrmm/tacticalrmm/urls.py
subzdev/tacticalrmm
21d8899e9a01f0939ab908e82e1205fa7b632caf
[ "MIT" ]
null
null
null
api/tacticalrmm/tacticalrmm/urls.py
subzdev/tacticalrmm
21d8899e9a01f0939ab908e82e1205fa7b632caf
[ "MIT" ]
1
2021-12-29T05:55:53.000Z
2021-12-29T05:55:53.000Z
from django.conf import settings from django.urls import include, path, register_converter from knox import views as knox_views from accounts.views import CheckCreds, LoginView from core.consumers import DashInfo class AgentIDConverter: regex = "[^/]{20}[^/]+" def to_python(self, value): return valu...
32.727273
80
0.661574
from django.conf import settings from django.urls import include, path, register_converter from knox import views as knox_views from accounts.views import CheckCreds, LoginView from core.consumers import DashInfo class AgentIDConverter: regex = "[^/]{20}[^/]+" def to_python(self, value): return valu...
true
true
1c138fd66890170c7eb13664971c1c19c8c35bae
2,159
py
Python
backend/pyrogram/raw/types/msg_resend_ans_req.py
appheap/social-media-analyzer
0f9da098bfb0b4f9eb38e0244aa3a168cf97d51c
[ "Apache-2.0" ]
5
2021-09-11T22:01:15.000Z
2022-03-16T21:33:42.000Z
backend/pyrogram/raw/types/msg_resend_ans_req.py
iamatlasss/social-media-analyzer
429d1d2bbd8bfce80c50c5f8edda58f87ace668d
[ "Apache-2.0" ]
null
null
null
backend/pyrogram/raw/types/msg_resend_ans_req.py
iamatlasss/social-media-analyzer
429d1d2bbd8bfce80c50c5f8edda58f87ace668d
[ "Apache-2.0" ]
3
2022-01-18T11:06:22.000Z
2022-02-26T13:39:28.000Z
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2021 Dan <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free...
31.289855
103
0.63409
from io import BytesIO from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector from pyrogram.raw.core import TLObject from pyrogram import raw from typing import List, Union, Any class MsgResendAnsReq(TLObject): __slots__: List[str] = ["msg_ids"] ID = 0x86...
true
true
1c13903564e2426b9ed1e68d62faf6038c2f6c87
6,708
py
Python
exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py
s27y/opentelemetry-python
8cc92600158aba9d9de272f66a29a8422e3e5a66
[ "Apache-2.0" ]
null
null
null
exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py
s27y/opentelemetry-python
8cc92600158aba9d9de272f66a29a8422e3e5a66
[ "Apache-2.0" ]
null
null
null
exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py
s27y/opentelemetry-python
8cc92600158aba9d9de272f66a29a8422e3e5a66
[ "Apache-2.0" ]
null
null
null
# Copyright The OpenTelemetry 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.4
101
0.669648
import collections import logging import re from typing import Iterable, Optional, Sequence, Union from prometheus_client.core import ( REGISTRY, CounterMetricFamily, SummaryMetricFamily, UnknownMetricFamily, ) from opentelemetry.metrics import Counter, ValueRecorder from opentelemetry.sdk.metrics.e...
true
true
1c1390501917fb0f7c3f6ee92d670e4d9a7eb5ba
1,168
py
Python
03/03/p2p/my_protocol_message_handler.py
peaks-cc/cryptocurrency-samplecode
dba73d5f4dd60634e171f6570b791b5d626fdd45
[ "Apache-2.0" ]
44
2018-08-29T01:45:20.000Z
2022-03-08T02:59:11.000Z
03/03/p2p/my_protocol_message_handler.py
peaks-cc/cryptocurrency-samplecode
dba73d5f4dd60634e171f6570b791b5d626fdd45
[ "Apache-2.0" ]
3
2018-09-12T03:17:20.000Z
2019-03-13T06:10:00.000Z
02/03/p2p/my_protocol_message_handler.py
peaks-cc/cryptocurrency-samplecode
dba73d5f4dd60634e171f6570b791b5d626fdd45
[ "Apache-2.0" ]
10
2018-09-08T06:46:18.000Z
2020-04-14T01:18:30.000Z
import json SEND_TO_ALL_PEER = 'send_message_to_all_peer' SEND_TO_ALL_EDGE = 'send_message_to_all_edge' PASS_TO_CLIENT_APP = 'pass_message_to_client_application' class MyProtocolMessageHandler: """ 独自に拡張したENHANCEDメッセージの処理や生成を担当する """ def __init__(self): print('Initializing MyProtocolMessage...
28.487805
77
0.652397
import json SEND_TO_ALL_PEER = 'send_message_to_all_peer' SEND_TO_ALL_EDGE = 'send_message_to_all_edge' PASS_TO_CLIENT_APP = 'pass_message_to_client_application' class MyProtocolMessageHandler: def __init__(self): print('Initializing MyProtocolMessageHandler...') def handle_message(self, msg, api)...
true
true
1c139058d4cd2cd0c744496b2518b93ab5b31bcd
7,750
py
Python
cifero/translit.py
jonjau/cifero
c8855a0d1288410ab619690cdf2455a8acb7dd2f
[ "MIT" ]
1
2020-05-15T18:42:09.000Z
2020-05-15T18:42:09.000Z
cifero/translit.py
jonjau/cifero
c8855a0d1288410ab619690cdf2455a8acb7dd2f
[ "MIT" ]
null
null
null
cifero/translit.py
jonjau/cifero
c8855a0d1288410ab619690cdf2455a8acb7dd2f
[ "MIT" ]
null
null
null
# June 2018 # Overhauled October 2018 # Jonathan J ''' cifero.translit transliterate() and raw_transliterate() are the main functions here. transliterate() converts sentences from one mode to another, optionally with syllable separation and custom word separators. In the case that one of those modes are English, a ...
33.261803
87
0.644516
import re import cifero.cmudict as cmudict import cifero.sheets as sheets from cifero.syll import syllable_separated cipher_cons_bases = list( set([x[0] for x in sheets.sheetsdict['Cipher']['consonants'] if len(x)>0])) cipher_vow_bases = list( set([x[0] for x in sheets.sheetsdict['Cipher']['vowels'] if l...
true
true
1c1391c9e7ae0ce81fc6eacd6d4e3db95b575c6c
654
py
Python
resource/dashboard.py
astrid-project/context-broker-apis
870589493a7eec91bc47ef4d8616104cb13bb06c
[ "MIT" ]
1
2020-05-14T00:36:03.000Z
2020-05-14T00:36:03.000Z
resource/dashboard.py
astrid-project/cb-manager
870589493a7eec91bc47ef4d8616104cb13bb06c
[ "MIT" ]
5
2020-06-26T04:06:16.000Z
2021-04-06T09:58:12.000Z
resource/dashboard.py
astrid-project/cb-manager
870589493a7eec91bc47ef4d8616104cb13bb06c
[ "MIT" ]
null
null
null
from pathlib import Path from resource.base import Base_Minimal_Resource from falcon import HTTP_200 class Dashboard_Resource(Base_Minimal_Resource): routes = [ '/dashboard', '/dashboard/{part}/{resource}', ] def on_get(self, req, resp, resource='index.html', part=''): resp.statu...
29.727273
75
0.625382
from pathlib import Path from resource.base import Base_Minimal_Resource from falcon import HTTP_200 class Dashboard_Resource(Base_Minimal_Resource): routes = [ '/dashboard', '/dashboard/{part}/{resource}', ] def on_get(self, req, resp, resource='index.html', part=''): resp.statu...
true
true
1c13923541bf2ac8fba672bb509bdf727a9f3297
1,322
py
Python
S4/S4 Library/simulation/sims/favorites/favorites_tuning.py
NeonOcean/Environment
ca658cf66e8fd6866c22a4a0136d415705b36d26
[ "CC-BY-4.0" ]
1
2021-05-20T19:33:37.000Z
2021-05-20T19:33:37.000Z
S4/S4 Library/simulation/sims/favorites/favorites_tuning.py
NeonOcean/Environment
ca658cf66e8fd6866c22a4a0136d415705b36d26
[ "CC-BY-4.0" ]
null
null
null
S4/S4 Library/simulation/sims/favorites/favorites_tuning.py
NeonOcean/Environment
ca658cf66e8fd6866c22a4a0136d415705b36d26
[ "CC-BY-4.0" ]
null
null
null
import services from animation.tunable_animation_overrides import TunableAnimationOverrides from sims4.tuning.tunable import TunableReference, TunableList, TunableSet, TunableTuple class FavoritesTuning: FAVORITES_ANIMATION_OVERRIDES = TunableList(description='\n A list of favorite object definitions and an...
188.857143
1,116
0.699697
import services from animation.tunable_animation_overrides import TunableAnimationOverrides from sims4.tuning.tunable import TunableReference, TunableList, TunableSet, TunableTuple class FavoritesTuning: FAVORITES_ANIMATION_OVERRIDES = TunableList(description='\n A list of favorite object definitions and an...
true
true
1c139281c2a8e6e3cad6494145f11eba0790ec60
3,569
py
Python
src/detection.py
DehuiYan/tumorDetection
58258c0ee769dff3db4c3577215de6197b3463c7
[ "MIT" ]
null
null
null
src/detection.py
DehuiYan/tumorDetection
58258c0ee769dff3db4c3577215de6197b3463c7
[ "MIT" ]
null
null
null
src/detection.py
DehuiYan/tumorDetection
58258c0ee769dff3db4c3577215de6197b3463c7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 import numpy as np import os import sys import tensorflow as tf from collections import defaultdict from io import StringIO from matplotlib import pyplot as plt from PIL import Image #matplotlib inline #sys.path.append("..") from object_detection.utils import label_map_util from...
41.988235
126
0.659569
import numpy as np import os import sys import tensorflow as tf from collections import defaultdict from io import StringIO from matplotlib import pyplot as plt from PIL import Image from object_detection.utils import label_map_util from object_detection.utils import visualization_utils as vis_util def load_image_...
true
true
1c1393ad4739d1dff52734dbf6ee58893e1f2496
1,208
py
Python
pybpodapi/state_machine/state_machine_runner.py
ckarageorgkaneen/pybpod-api
ebccef800ae1abf3b6a643ff33166fab2096c780
[ "MIT" ]
1
2021-01-18T08:18:22.000Z
2021-01-18T08:18:22.000Z
pybpodapi/state_machine/state_machine_runner.py
ckarageorgkaneen/pybpod-api
ebccef800ae1abf3b6a643ff33166fab2096c780
[ "MIT" ]
1
2020-09-18T20:46:11.000Z
2020-12-29T14:55:20.000Z
pybpodapi/state_machine/state_machine_runner.py
ckarageorgkaneen/pybpod-api
ebccef800ae1abf3b6a643ff33166fab2096c780
[ "MIT" ]
3
2020-09-12T15:32:11.000Z
2022-03-11T23:08:03.000Z
# !/usr/bin/python3 # -*- coding: utf-8 -*- import logging from pybpodapi.state_machine.state_machine_builder import StateMachineBuilder logger = logging.getLogger(__name__) class StateMachineRunner(StateMachineBuilder): """ Extends state machine with running logic :ivar bool is_running: Whether this ...
24.653061
83
0.621689
import logging from pybpodapi.state_machine.state_machine_builder import StateMachineBuilder logger = logging.getLogger(__name__) class StateMachineRunner(StateMachineBuilder): def __init__(self, bpod): StateMachineBuilder.__init__(self, bpod) self.is_running = False self.current_st...
true
true
1c1393c478f359d086800bcbb166dde2333612c4
4,929
py
Python
web/CO2WEB/agents/WHR_network_optimization_trim.py
mdhillmancmcl/TheWorldAvatar-CMCL-Fork
011aee78c016b76762eaf511c78fabe3f98189f4
[ "MIT" ]
21
2021-03-08T01:58:25.000Z
2022-03-09T15:46:16.000Z
web/CO2WEB/agents/WHR_network_optimization_trim.py
mdhillmancmcl/TheWorldAvatar-CMCL-Fork
011aee78c016b76762eaf511c78fabe3f98189f4
[ "MIT" ]
63
2021-05-04T15:05:30.000Z
2022-03-23T14:32:29.000Z
web/CO2WEB/agents/WHR_network_optimization_trim.py
mdhillmancmcl/TheWorldAvatar-CMCL-Fork
011aee78c016b76762eaf511c78fabe3f98189f4
[ "MIT" ]
15
2021-03-08T07:52:03.000Z
2022-03-29T04:46:20.000Z
# coding: utf-8 # In[26]: from rdflib import Graph from rdflib import URIRef, BNode, Literal import numpy as np import scipy as sp from scipy.optimize import linprog import networkx as nx import matplotlib.pyplot as plt import json import os dir = os.path.dirname(__file__) import sys for arg in sys.argv: ...
22.404545
138
0.553865
from rdflib import Graph from rdflib import URIRef, BNode, Literal import numpy as np import scipy as sp from scipy.optimize import linprog import networkx as nx import matplotlib.pyplot as plt import json import os dir = os.path.dirname(__file__) import sys for arg in sys.argv: print (arg) print (sys.a...
true
true
1c13949855a48b811850759ef7a0bb37cace4e41
14,349
py
Python
plugins/youtube_dl_echo.py
piyushraj00/YouTube-Downloader
9928a8b1e91bdbda3dbe86f87e82fd089335e580
[ "MIT" ]
null
null
null
plugins/youtube_dl_echo.py
piyushraj00/YouTube-Downloader
9928a8b1e91bdbda3dbe86f87e82fd089335e580
[ "MIT" ]
null
null
null
plugins/youtube_dl_echo.py
piyushraj00/YouTube-Downloader
9928a8b1e91bdbda3dbe86f87e82fd089335e580
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # (C) Shrimadhav U K import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logger = logging.getLogger(__name__) logging.getLogger("pyrogram").setLevel(logging.WARNING) import os import r...
42.705357
282
0.550631
import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logger = logging.getLogger(__name__) logging.getLogger("pyrogram").setLevel(logging.WARNING) import os import re import json import math import time import shutil import random im...
false
true
1c1394da8c825a1a19e1c956609124fd28eb2106
444
py
Python
Classes/Variables.py
adeeb001/Blackjack
7ce80af4bc0155d0065c7bce93dcf39071324cbe
[ "MIT" ]
null
null
null
Classes/Variables.py
adeeb001/Blackjack
7ce80af4bc0155d0065c7bce93dcf39071324cbe
[ "MIT" ]
null
null
null
Classes/Variables.py
adeeb001/Blackjack
7ce80af4bc0155d0065c7bce93dcf39071324cbe
[ "MIT" ]
null
null
null
import random # Declaring Suits, Ranks and Values of the Ranks global playing playing = True global suits suits = ("Hearts", "Diamonds", "Spades", "Clubs") global ranks ranks = ("Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King", "Ace") global values values = {"Two":2, "Th...
31.714286
144
0.61036
import random global playing playing = True global suits suits = ("Hearts", "Diamonds", "Spades", "Clubs") global ranks ranks = ("Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King", "Ace") global values values = {"Two":2, "Three":3, "Four":4, "Five":5, "Six":6, "Seven":7, "...
true
true
1c13953075a5289b396a62b7932ca29845e47630
1,379
py
Python
src/python/pants/engine/legacy_engine.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
src/python/pants/engine/legacy_engine.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
src/python/pants/engine/legacy_engine.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals from abc import abstractmethod from pants.base.exceptions import TaskError from pants.ut...
32.069767
96
0.68963
from __future__ import absolute_import, division, print_function, unicode_literals from abc import abstractmethod from pants.base.exceptions import TaskError from pants.util.meta import AbstractClass class Engine(AbstractClass): def execute(self, context, goals): try: self.attempt(context, goals) ...
true
true
1c139a5b743d446b1d9dab1b3c3e3629fe7fc64b
22,189
py
Python
compressai/models/priors.py
kktsubota/CompressAI
158fd64b74d50b5d7373ec6fe97fab7744b959aa
[ "Apache-2.0" ]
1
2021-09-26T05:29:16.000Z
2021-09-26T05:29:16.000Z
compressai/models/priors.py
kktsubota/CompressAI
158fd64b74d50b5d7373ec6fe97fab7744b959aa
[ "Apache-2.0" ]
null
null
null
compressai/models/priors.py
kktsubota/CompressAI
158fd64b74d50b5d7373ec6fe97fab7744b959aa
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 InterDigital Communications, 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 applicable law or ...
34.295209
88
0.580017
import math import warnings import torch import torch.nn as nn import torch.nn.functional as F from compressai.ans import BufferedRansEncoder, RansDecoder from compressai.entropy_models import EntropyBottleneck, GaussianConditional from compressai.layers import GDN, MaskedConv2d from .utils import conv, deconv, upd...
true
true
1c139bc0df74508c921e488f0d9a45ccb032e0b4
2,139
py
Python
plugins/rapid7_tcell/komand_rapid7_tcell/actions/get_route_details/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/rapid7_tcell/komand_rapid7_tcell/actions/get_route_details/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/rapid7_tcell/komand_rapid7_tcell/actions/get_route_details/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json class Component: DESCRIPTION = "Fetch details for the route with the given ID" class Input: APP_ID = "app_id" ROUTE_ID = "route_id" class Output: ROUTE = "route" class GetRouteDetailsInput(komand.Input): schema = json....
21.606061
169
0.514259
import komand import json class Component: DESCRIPTION = "Fetch details for the route with the given ID" class Input: APP_ID = "app_id" ROUTE_ID = "route_id" class Output: ROUTE = "route" class GetRouteDetailsInput(komand.Input): schema = json.loads(""" { "type": "object", "ti...
true
true
1c139bef63074ecfa7b7353b6a553bbb7a8b68a3
4,120
py
Python
nn_train/nn_sq_pb2.py
tseth92/NN_grpc_kube_deployment
51bfa786dd8cbd7780140f0ef0c1eb50fcc94504
[ "MIT" ]
null
null
null
nn_train/nn_sq_pb2.py
tseth92/NN_grpc_kube_deployment
51bfa786dd8cbd7780140f0ef0c1eb50fcc94504
[ "MIT" ]
null
null
null
nn_train/nn_sq_pb2.py
tseth92/NN_grpc_kube_deployment
51bfa786dd8cbd7780140f0ef0c1eb50fcc94504
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: nn_sq.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 impor...
29.219858
328
0.744175
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 _sym_db = _s...
true
true
1c139efc27b2d600f9ab9e592159934d44228622
15,907
py
Python
datadog_checks_base/datadog_checks/base/stubs/aggregator.py
tony612/integrations-core
eb2d97909bceea8296b931974e78d467c75c7470
[ "BSD-3-Clause" ]
null
null
null
datadog_checks_base/datadog_checks/base/stubs/aggregator.py
tony612/integrations-core
eb2d97909bceea8296b931974e78d467c75c7470
[ "BSD-3-Clause" ]
null
null
null
datadog_checks_base/datadog_checks/base/stubs/aggregator.py
tony612/integrations-core
eb2d97909bceea8296b931974e78d467c75c7470
[ "BSD-3-Clause" ]
1
2019-12-23T13:35:17.000Z
2019-12-23T13:35:17.000Z
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from __future__ import division from collections import OrderedDict, defaultdict from six import binary_type, iteritems from datadog_checks.base.stubs.common import HistogramBucketStub, MetricStub, ServiceCheck...
35.826577
119
0.60508
from __future__ import division from collections import OrderedDict, defaultdict from six import binary_type, iteritems from datadog_checks.base.stubs.common import HistogramBucketStub, MetricStub, ServiceCheckStub from datadog_checks.base.stubs.similar import build_similar_elements_msg from ..utils.common import e...
true
true
1c139f98d7502d8330b0bb562a7c78cbbab243bd
455
py
Python
bts/ohShit.py
SuprPhatAnon/Burn-the-Subs
026e67bc5d2edbf62537eb843a1829ef500e6ac1
[ "MIT" ]
null
null
null
bts/ohShit.py
SuprPhatAnon/Burn-the-Subs
026e67bc5d2edbf62537eb843a1829ef500e6ac1
[ "MIT" ]
null
null
null
bts/ohShit.py
SuprPhatAnon/Burn-the-Subs
026e67bc5d2edbf62537eb843a1829ef500e6ac1
[ "MIT" ]
null
null
null
import serial import settings import time speed = settings.serialSpeed serialLoc = settings.serialAddy reset = settings.pwr_cycle homies = settings.homing pullout = settings.pulloff_pos def stopit(): print("FUCK FUCK FUCK") s = serial.Serial(serialLoc, speed) s.write(reset.encode()) ti...
20.681818
40
0.67033
import serial import settings import time speed = settings.serialSpeed serialLoc = settings.serialAddy reset = settings.pwr_cycle homies = settings.homing pullout = settings.pulloff_pos def stopit(): print("FUCK FUCK FUCK") s = serial.Serial(serialLoc, speed) s.write(reset.encode()) ti...
true
true
1c139fa5997b892d420765011f51aabd2642b785
11,289
py
Python
igata/utils.py
kiconiaworks/igata
1d8a4b82a65eb936d5d8f8ff70747ba82ddef31a
[ "BSD-2-Clause" ]
1
2021-12-31T14:29:44.000Z
2021-12-31T14:29:44.000Z
igata/utils.py
kiconiaworks/igata
1d8a4b82a65eb936d5d8f8ff70747ba82ddef31a
[ "BSD-2-Clause" ]
6
2019-11-25T04:20:26.000Z
2021-12-13T05:23:16.000Z
igata/utils.py
kiconiaworks/igata
1d8a4b82a65eb936d5d8f8ff70747ba82ddef31a
[ "BSD-2-Clause" ]
null
null
null
import csv import datetime import json import logging import os import time import urllib from collections.abc import Hashable from decimal import Decimal from gzip import GzipFile from hashlib import md5 from io import BytesIO, StringIO from pathlib import Path from typing import Generator, List, Optional, Tuple, Unio...
35.059006
137
0.645584
import csv import datetime import json import logging import os import time import urllib from collections.abc import Hashable from decimal import Decimal from gzip import GzipFile from hashlib import md5 from io import BytesIO, StringIO from pathlib import Path from typing import Generator, List, Optional, Tuple, Unio...
true
true
1c139feacd8741a33c9f33857211c0356d539689
278
py
Python
solutions/get_group.py
nguyenthlam/pycon-ds
8f176d505686490da54d27df344ab79c24dcea96
[ "MIT" ]
null
null
null
solutions/get_group.py
nguyenthlam/pycon-ds
8f176d505686490da54d27df344ab79c24dcea96
[ "MIT" ]
null
null
null
solutions/get_group.py
nguyenthlam/pycon-ds
8f176d505686490da54d27df344ab79c24dcea96
[ "MIT" ]
null
null
null
grouper = dta.groupby(dta.dba_name) mcd = grouper.get_group("MCDONALD'S") def relative_results(df): values = df.value_counts() return values['Fail'] / values['Pass'] relative_results(mcd.results) # And we see McDonald's failed 50% as many inspections as it Passed.
21.384615
68
0.723022
grouper = dta.groupby(dta.dba_name) mcd = grouper.get_group("MCDONALD'S") def relative_results(df): values = df.value_counts() return values['Fail'] / values['Pass'] relative_results(mcd.results) # And we see McDonald's failed 50% as many inspections as it Passed.
true
true
1c13a1a21a3929973d1017f7f86261e33c44d9ad
928
py
Python
combine_dicts.py
FrancoisNadeau/loadutils
c51e641b62c588eaf2716c5af2d0468311dcae24
[ "MIT" ]
null
null
null
combine_dicts.py
FrancoisNadeau/loadutils
c51e641b62c588eaf2716c5af2d0468311dcae24
[ "MIT" ]
null
null
null
combine_dicts.py
FrancoisNadeau/loadutils
c51e641b62c588eaf2716c5af2d0468311dcae24
[ "MIT" ]
null
null
null
#!usr/bin/python3 import sys from typing import Sequence from loadutils.flatten import flatten def combine_dicts(dictlist:Sequence)->dict: """ Combine dicts without duplicating or overwriting. Iterates over list of dicts to find all keys, then removes the duplicates. After, looks for existing ke...
26.514286
60
0.645474
import sys from typing import Sequence from loadutils.flatten import flatten def combine_dicts(dictlist:Sequence)->dict: allkeys = flatten(tuple(tuple(adict.keys()) for adict in dictlist)) ukeys = list(dict.fromkeys(allkeys)) return dict((akey,[adict[akey] for adict in ...
true
true
1c13a1dad22f63246c2eaea58d9ae4bb33602eab
8,724
py
Python
sdk/lusid_scheduler/models/access_controlled_resource.py
finbourne/lusid-scheduler-sdk-python-preview
ee550cd6ec2d7d32cc52507b36b30b73e16573ae
[ "MIT" ]
null
null
null
sdk/lusid_scheduler/models/access_controlled_resource.py
finbourne/lusid-scheduler-sdk-python-preview
ee550cd6ec2d7d32cc52507b36b30b73e16573ae
[ "MIT" ]
null
null
null
sdk/lusid_scheduler/models/access_controlled_resource.py
finbourne/lusid-scheduler-sdk-python-preview
ee550cd6ec2d7d32cc52507b36b30b73e16573ae
[ "MIT" ]
null
null
null
# coding: utf-8 """ FINBOURNE Scheduler API FINBOURNE Technology # noqa: E501 The version of the OpenAPI document: 0.0.529 Contact: info@finbourne.com Generated by: https://openapi-generator.tech """ try: from inspect import getfullargspec except ImportError: from inspect import getarg...
30.397213
164
0.615543
try: from inspect import getfullargspec except ImportError: from inspect import getargspec as getfullargspec import pprint import re import six from lusid_scheduler.configuration import Configuration class AccessControlledResource(object): openapi_types = { 'application': 'str', 'nam...
true
true
1c13a2089cdd791f635fa65ff4461f7b8c9ba6e9
1,150
py
Python
setup.py
cartologic/gsconfig
f25693700cfd79819b2759747fcaea972c5f83a2
[ "MIT" ]
null
null
null
setup.py
cartologic/gsconfig
f25693700cfd79819b2759747fcaea972c5f83a2
[ "MIT" ]
null
null
null
setup.py
cartologic/gsconfig
f25693700cfd79819b2759747fcaea972c5f83a2
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages try: readme_text = file('README.rst', 'rb').read() except IOError,e: readme_text = '' setup(name = "gsconfig", version = "1.0.8", description = "GeoServer REST Configuration", long_description = readme_text,...
31.081081
58
0.573043
from setuptools import setup, find_packages try: readme_text = file('README.rst', 'rb').read() except IOError,e: readme_text = '' setup(name = "gsconfig", version = "1.0.8", description = "GeoServer REST Configuration", long_description = readme_text, keywords = "GeoServer REST Configuration"...
false
true
1c13a270305987fbe2fa466af65ced6df3170a0b
9,902
py
Python
clusterlensing/tests/test_nfw.py
jesford/clusterlensing
2815c1bb07d904ca91a80dae3f52090016768072
[ "MIT" ]
20
2016-03-04T10:35:29.000Z
2021-08-24T12:11:12.000Z
clusterlensing/tests/test_nfw.py
afcarl/cluster-lensing
2815c1bb07d904ca91a80dae3f52090016768072
[ "MIT" ]
8
2016-02-25T13:19:53.000Z
2017-09-26T20:24:12.000Z
clusterlensing/tests/test_nfw.py
afcarl/cluster-lensing
2815c1bb07d904ca91a80dae3f52090016768072
[ "MIT" ]
9
2016-02-26T11:18:49.000Z
2019-07-03T20:06:37.000Z
import numpy as np from numpy.testing import assert_equal, assert_allclose, assert_raises from astropy import units from clusterlensing.nfw import SurfaceMassDensity # ---------------------------- # test units of inputs ncl = 3 r_s = np.repeat(0.1, ncl) * units.Mpc delta_c = np.repeat(10000., ncl) # dimensionless ...
39.293651
78
0.530196
import numpy as np from numpy.testing import assert_equal, assert_allclose, assert_raises from astropy import units from clusterlensing.nfw import SurfaceMassDensity ncl = 3 r_s = np.repeat(0.1, ncl) * units.Mpc delta_c = np.repeat(10000., ncl) rho_c = np.repeat(0.2, ncl) * units.Msun / units.pc**2 / units.Mpc sig...
true
true
1c13a27686c15d450ab655210648cde8e95337b3
2,149
py
Python
my_autofn.py
jlifts/social-bots
badb7f0fb0f3fc63c6298fc74950e34b346223fb
[ "Unlicense" ]
null
null
null
my_autofn.py
jlifts/social-bots
badb7f0fb0f3fc63c6298fc74950e34b346223fb
[ "Unlicense" ]
null
null
null
my_autofn.py
jlifts/social-bots
badb7f0fb0f3fc63c6298fc74950e34b346223fb
[ "Unlicense" ]
null
null
null
from multiprocessing import Process import tweepy import time import logging import json import requests from config import create_api from follow import follow_followers from justlk import TListener from rply_BTC import check_mentions #from rply_ETH import check_mention from tagged import check_mentioning logging.bas...
26.530864
113
0.668683
from multiprocessing import Process import tweepy import time import logging import json import requests from config import create_api from follow import follow_followers from justlk import TListener from rply_BTC import check_mentions from tagged import check_mentioning logging.basicConfig(level=logging.INFO) logger ...
true
true
1c13a3d898b92c691f7f990a5487b4dd6925de7b
5,392
py
Python
main.py
taiQui/instagram_requests
fd8faa1042e231222ce93a6ea99fb89f4f752e53
[ "Apache-2.0" ]
2
2020-12-10T14:43:00.000Z
2021-10-08T17:03:56.000Z
main.py
taiQui/instagram_requests
fd8faa1042e231222ce93a6ea99fb89f4f752e53
[ "Apache-2.0" ]
null
null
null
main.py
taiQui/instagram_requests
fd8faa1042e231222ce93a6ea99fb89f4f752e53
[ "Apache-2.0" ]
null
null
null
""" author: taiQui Class to interacte with Instagram with only requests Explication: After logging in we need to request to /SomeAccount/?__a=1 for json result on this json result, we pick Id of the account chosen, cursor of scrolling and number of picture in account (max) once this done, we can request graphql to ...
38.514286
223
0.543398
import requests,json,time from os import mkdir from os.path import isdir from datetime import datetime class InstaBot: def __init__(self,username,password): self.username = username self.password = password self.session = None self.login() def login(self): self.session...
true
true
1c13a3e0a1d94bc2c0cc60f42c50ba4d4c1d69cc
264
py
Python
output/models/nist_data/atomic/g_year/schema_instance/nistschema_sv_iv_atomic_g_year_min_exclusive_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/atomic/g_year/schema_instance/nistschema_sv_iv_atomic_g_year_min_exclusive_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/atomic/g_year/schema_instance/nistschema_sv_iv_atomic_g_year_min_exclusive_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.atomic.g_year.schema_instance.nistschema_sv_iv_atomic_g_year_min_exclusive_2_xsd.nistschema_sv_iv_atomic_g_year_min_exclusive_2 import NistschemaSvIvAtomicGYearMinExclusive2 __all__ = [ "NistschemaSvIvAtomicGYearMinExclusive2", ]
44
202
0.897727
from output.models.nist_data.atomic.g_year.schema_instance.nistschema_sv_iv_atomic_g_year_min_exclusive_2_xsd.nistschema_sv_iv_atomic_g_year_min_exclusive_2 import NistschemaSvIvAtomicGYearMinExclusive2 __all__ = [ "NistschemaSvIvAtomicGYearMinExclusive2", ]
true
true
1c13a5e8373f28626913a45961571133b03e8cf9
19,722
py
Python
source/lambda/helper/python/comprehendHelper.py
jfathi/document-understanding-solution
81da1cce082b8f814ee09825bff4984086f67cab
[ "Apache-2.0" ]
138
2020-04-01T02:15:14.000Z
2022-03-29T17:54:27.000Z
source/lambda/helper/python/comprehendHelper.py
jfathi/document-understanding-solution
81da1cce082b8f814ee09825bff4984086f67cab
[ "Apache-2.0" ]
59
2020-05-04T15:39:34.000Z
2022-02-22T17:54:53.000Z
source/lambda/helper/python/comprehendHelper.py
jfathi/document-understanding-solution
81da1cce082b8f814ee09825bff4984086f67cab
[ "Apache-2.0" ]
68
2020-04-02T01:42:53.000Z
2022-03-11T17:37:36.000Z
###################################################################################################################### # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # ...
40.580247
134
0.503296
import boto3 from botocore.exceptions import ClientError from botocore.config import Config import json import threading from helper import S3Helper import time MAX_COMPREHEND_UTF8_PAGE_SIZE = 5000 PAGES_PER_BATCH = 15 MAX_API_RETRIES = 6 class ComprehendHelper: def getNumOfPages(self, ...
true
true
1c13a7746499c9bd3320fd04a15c22c5dad5aab0
637
py
Python
backend/manage.py
crowdbotics-apps/super-water-29490
f6d8da7f12660a59fcf13cf78dca26894b600d73
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/manage.py
crowdbotics-apps/super-water-29490
f6d8da7f12660a59fcf13cf78dca26894b600d73
[ "FTL", "AML", "RSA-MD" ]
51
2021-08-05T01:49:43.000Z
2022-03-13T17:39:15.000Z
backend/manage.py
crowdbotics-apps/super-water-29490
f6d8da7f12660a59fcf13cf78dca26894b600d73
[ "FTL", "AML", "RSA-MD" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'super_water_29490.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: ra...
28.954545
81
0.687598
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'super_water_29490.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed an...
true
true
1c13a7ccfb1beb700de9b6f04988d4f08c7b0e5d
1,048
py
Python
scoring_engine/urls.py
ainterr/scoring_engine
d986eef08dcb819add20ed87d91239f887f62daa
[ "MIT" ]
null
null
null
scoring_engine/urls.py
ainterr/scoring_engine
d986eef08dcb819add20ed87d91239f887f62daa
[ "MIT" ]
7
2016-02-24T21:01:22.000Z
2017-01-04T03:22:44.000Z
scoring_engine/urls.py
ainterr/scoring_engine
d986eef08dcb819add20ed87d91239f887f62daa
[ "MIT" ]
2
2016-03-04T17:04:48.000Z
2020-01-30T21:03:49.000Z
"""scoring_engine 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') Cl...
40.307692
90
0.696565
from django.conf.urls import include, url from django.contrib import admin from django.contrib.auth import views as auth_views urlpatterns = [ url(r'^', include('engine.urls')), url(r'^admin/', admin.site.urls), url(r'^login/$', auth_views.login, {'template_name': 'login.html'}, name='login'), url(r'^l...
true
true
1c13a9af9631305f05434380d493745279809d0c
1,785
py
Python
pyinfra/operations/apk.py
tsnoam/pyinfra
a41c8c53e2ccac34262ff67d769d2991e7881aa7
[ "MIT" ]
1
2020-12-24T08:24:13.000Z
2020-12-24T08:24:13.000Z
pyinfra/operations/apk.py
tsnoam/pyinfra
a41c8c53e2ccac34262ff67d769d2991e7881aa7
[ "MIT" ]
null
null
null
pyinfra/operations/apk.py
tsnoam/pyinfra
a41c8c53e2ccac34262ff67d769d2991e7881aa7
[ "MIT" ]
null
null
null
''' Manage apk packages. ''' from pyinfra.api import operation from .util.packaging import ensure_packages @operation def upgrade(state=None, host=None): ''' Upgrades all apk packages. ''' yield 'apk upgrade' _upgrade = upgrade # noqa: E305 @operation def update(state=None, host=None): ''' ...
21.506024
69
0.617927
from pyinfra.api import operation from .util.packaging import ensure_packages @operation def upgrade(state=None, host=None): yield 'apk upgrade' _upgrade = upgrade @operation def update(state=None, host=None): yield 'apk update' _update = update @operation def packages( packages=None, present=...
true
true