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
f76796057d1d927c9259fc7f29074a3f3609332d
1,725
py
Python
scanner.py
DarioAcevedo/port_Scanner
65251b495071e11bcdc90a86b910c10f4646e275
[ "MIT" ]
null
null
null
scanner.py
DarioAcevedo/port_Scanner
65251b495071e11bcdc90a86b910c10f4646e275
[ "MIT" ]
null
null
null
scanner.py
DarioAcevedo/port_Scanner
65251b495071e11bcdc90a86b910c10f4646e275
[ "MIT" ]
null
null
null
# Escaneador de puertos import socket import sys #Solicitamos y validamos la IP ip = input("Introduce IP : ") validateIP = ip.split('.') validIP = True for bit in validateIP: if int(bit) > 256 or int(bit) < 0: validIP = False if validIP == False: print("Introduce una IP válida") else: ...
36.702128
107
0.509565
import socket import sys ip = input("Introduce IP : ") validateIP = ip.split('.') validIP = True for bit in validateIP: if int(bit) > 256 or int(bit) < 0: validIP = False if validIP == False: print("Introduce una IP válida") else: start = int(input("Introduce puerto de inicio : ...
true
true
f76797313bc21c07aeebe3d6d933f469917f4247
109,568
py
Python
sdk/python/pulumi_google_native/transcoder/v1beta1/_inputs.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
44
2021-04-18T23:00:48.000Z
2022-02-14T17:43:15.000Z
sdk/python/pulumi_google_native/transcoder/v1beta1/_inputs.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
354
2021-04-16T16:48:39.000Z
2022-03-31T17:16:39.000Z
sdk/python/pulumi_google_native/transcoder/v1beta1/_inputs.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
8
2021-04-24T17:46:51.000Z
2022-01-05T10:40:21.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
43.565805
533
0.652545
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from ._enums import * __all__ = [ 'AdBreakArgs', 'Aes128EncryptionArgs', 'AnimationEndArgs', 'AnimationFadeArgs', 'AnimationStaticArgs', 'Animatio...
true
true
f76797cd360cbdd1ed10cbec7033f621efa35f25
1,830
py
Python
notes/notes.py
anaslamaizi/Projet-ODOO
0bba1a4c6863a8a7e3ade6f4ae3cf84eef027384
[ "Artistic-2.0" ]
null
null
null
notes/notes.py
anaslamaizi/Projet-ODOO
0bba1a4c6863a8a7e3ade6f4ae3cf84eef027384
[ "Artistic-2.0" ]
null
null
null
notes/notes.py
anaslamaizi/Projet-ODOO
0bba1a4c6863a8a7e3ade6f4ae3cf84eef027384
[ "Artistic-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from openerp.osv import osv from openerp.osv import fields import time class notes_evaluation(osv.osv): """ Evaluation """ _name = 'notes.evaluation' _description = 'Student evaluation' _columns = { 'note': fields.float('Note', required=True), 'session': fields.selecti...
27.313433
114
0.648634
from openerp.osv import osv from openerp.osv import fields import time class notes_evaluation(osv.osv): _name = 'notes.evaluation' _description = 'Student evaluation' _columns = { 'note': fields.float('Note', required=True), 'session': fields.selection((('P', 'premiere session'), ('D', 'deuxieme ...
true
true
f76797e3723178028efde66fdb513a28aab2fd0e
4,749
py
Python
src/readpot/read_pot.py
fadykuzman/Rodeo-App
2972b371ed38fad4f93e6afcb699b51cec865510
[ "BSD-3-Clause" ]
null
null
null
src/readpot/read_pot.py
fadykuzman/Rodeo-App
2972b371ed38fad4f93e6afcb699b51cec865510
[ "BSD-3-Clause" ]
1
2018-08-07T11:41:26.000Z
2018-08-07T11:41:26.000Z
rodeo_app/read_pot.py
fadykuzman/Rodeo-App-MVC
408f4ada22c8e8f52ad37bd5e47d44d9302ebefe
[ "MIT" ]
null
null
null
from time import time import os import pandas as pd from datetime import datetime import csv from potentiostat import Potentiostat def read_pots(): devlist = os.listdir('/dev') coms = [c for c in devlist if c.startswith('ttyACM')] pots = {} for c in coms: p = Potentiostat('/dev/{}'.format(c)...
28.100592
71
0.593599
from time import time import os import pandas as pd from datetime import datetime import csv from potentiostat import Potentiostat def read_pots(): devlist = os.listdir('/dev') coms = [c for c in devlist if c.startswith('ttyACM')] pots = {} for c in coms: p = Potentiostat('/dev/{}'.format(c)...
true
true
f767987dd59d83463ff08c6ac6e6a20368465e78
971
py
Python
saleor/dashboard/group/filters.py
jdruiter/saleor
9393ac20bd3e82c8ec1f17f6e47e3d7379f20419
[ "BSD-3-Clause" ]
null
null
null
saleor/dashboard/group/filters.py
jdruiter/saleor
9393ac20bd3e82c8ec1f17f6e47e3d7379f20419
[ "BSD-3-Clause" ]
null
null
null
saleor/dashboard/group/filters.py
jdruiter/saleor
9393ac20bd3e82c8ec1f17f6e47e3d7379f20419
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals from django.contrib.auth.models import Group from django.utils.translation import pgettext_lazy from django_filters import ( CharFilter, ModelMultipleChoiceFilter, OrderingFilter) from ...core.filters import SortedFilterSet from ...core.permissions import get_permissions S...
31.322581
70
0.715757
from __future__ import unicode_literals from django.contrib.auth.models import Group from django.utils.translation import pgettext_lazy from django_filters import ( CharFilter, ModelMultipleChoiceFilter, OrderingFilter) from ...core.filters import SortedFilterSet from ...core.permissions import get_permissions S...
true
true
f7679aa267042d44df2f82752e468e8cbd3ac5af
843
py
Python
rest_builder/exceptions.py
timmartin19/browser-REST-builder
0f1999cdff1ccfc8c5b207f2c1f0cb725f2f364d
[ "MIT" ]
1
2016-07-25T23:04:15.000Z
2016-07-25T23:04:15.000Z
rest_builder/exceptions.py
timmartin19/browser-REST-builder
0f1999cdff1ccfc8c5b207f2c1f0cb725f2f364d
[ "MIT" ]
null
null
null
rest_builder/exceptions.py
timmartin19/browser-REST-builder
0f1999cdff1ccfc8c5b207f2c1f0cb725f2f364d
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from ripozo.exceptions import RestException class MissingModelException(RestException): """ Raised when a a model_name on a model class does not exist in th...
32.423077
96
0.759193
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from ripozo.exceptions import RestException class MissingModelException(RestException): class UnauthenticatedException(RestException): def __init__(self, status_c...
true
true
f7679cc4c5bac080c910d795f13f355820da8200
250
py
Python
apps/marks/urls.py
Ev1dentSnow/ArtemisAPI_django
ca7ef0ccc97114f2c5439b7b1bbc0e635facf020
[ "MIT" ]
null
null
null
apps/marks/urls.py
Ev1dentSnow/ArtemisAPI_django
ca7ef0ccc97114f2c5439b7b1bbc0e635facf020
[ "MIT" ]
null
null
null
apps/marks/urls.py
Ev1dentSnow/ArtemisAPI_django
ca7ef0ccc97114f2c5439b7b1bbc0e635facf020
[ "MIT" ]
null
null
null
from django.urls import path, include import apps.students.views urlpatterns = [ path('', apps.students.views.StudentInstanceMarksListView.as_view()), path('<int:mark_id>', apps.students.views.StudentInstanceMarksInstanceView.as_view()), ]
27.777778
90
0.764
from django.urls import path, include import apps.students.views urlpatterns = [ path('', apps.students.views.StudentInstanceMarksListView.as_view()), path('<int:mark_id>', apps.students.views.StudentInstanceMarksInstanceView.as_view()), ]
true
true
f7679d3348891e290f37c7043c03a863cb0f86d7
1,226
py
Python
chapter6-实战指南/config.py
1364354238/PYTORCH_LEARNING
d7ab877512ab41c80b37ab68bd1a42193916f31c
[ "MIT" ]
137
2018-11-13T06:35:49.000Z
2022-03-07T09:21:31.000Z
chapter6-实战指南/config.py
WQAQs/PYTORCH_LEARNING
d7ab877512ab41c80b37ab68bd1a42193916f31c
[ "MIT" ]
null
null
null
chapter6-实战指南/config.py
WQAQs/PYTORCH_LEARNING
d7ab877512ab41c80b37ab68bd1a42193916f31c
[ "MIT" ]
54
2018-11-13T09:38:37.000Z
2022-03-25T03:46:25.000Z
#coding:utf8 import warnings class DefaultConfig(object): env = 'default' # visdom 环境 model = 'ResNet34' # 使用的模型,名字必须与models/__init__.py中的名字一致 train_data_root = './data/train/' # 训练集存放路径 test_data_root = './data/test1' # 测试集存放路径 load_model_path = None # 加载预训练的模型的路径,为None代表不加载 batch_size = ...
27.863636
73
0.616639
import warnings class DefaultConfig(object): env = 'default' model = 'ResNet34' train_data_root = './data/train/' test_data_root = './data/test1' load_model_path = None batch_size = 32 use_gpu = True num_workers = 4 print_freq = 20 debug_file = '/tmp/debug' result_file...
true
true
f7679d780e7d16c68e65065c630a0a93773d3d51
35,402
py
Python
pantalaimon/daemon.py
arthurlutz/pantalaimon
3a77e107fca6a00ba6c79477eea0c40373f6c399
[ "Apache-2.0" ]
null
null
null
pantalaimon/daemon.py
arthurlutz/pantalaimon
3a77e107fca6a00ba6c79477eea0c40373f6c399
[ "Apache-2.0" ]
null
null
null
pantalaimon/daemon.py
arthurlutz/pantalaimon
3a77e107fca6a00ba6c79477eea0c40373f6c399
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Matrix.org Foundation CIC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
35.331337
89
0.566635
import asyncio import json import os import urllib.parse from json import JSONDecodeError from typing import Any, Dict import aiohttp import attr import keyring from aiohttp import ClientSession, web from aiohttp.client_exceptions import ClientConnectionError, ContentTypeError from jsonschema import ValidationError f...
true
true
f7679e238e86438e3d37adee68195d24a85afe34
5,073
py
Python
nova/filters.py
gyliu513/nova
14e974a5f77c72a9bb44c6801746abb2eda8e91d
[ "Apache-2.0" ]
1
2016-07-18T22:05:01.000Z
2016-07-18T22:05:01.000Z
nova/filters.py
gyliu513/nova
14e974a5f77c72a9bb44c6801746abb2eda8e91d
[ "Apache-2.0" ]
1
2021-03-31T19:29:01.000Z
2021-03-31T19:29:01.000Z
nova/filters.py
Mattlk13/nova
5b13eb59540aaf535a53920e783964d106de2620
[ "Apache-2.0" ]
1
2021-11-12T03:55:41.000Z
2021-11-12T03:55:41.000Z
# Copyright (c) 2011-2012 OpenStack Foundation # 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 # # Un...
40.91129
78
0.595506
from oslo_log import log as logging from nova.i18n import _LI from nova import loadables LOG = logging.getLogger(__name__) class BaseFilter(object): def _filter_one(self, obj, spec_obj): return True def filter_all(self, filter_obj_list, spec_obj): for obj in filter_obj_list: i...
true
true
f767a16657af3b0fd0f8d11f7457530423151e05
25,879
py
Python
numba/tests/test_sort.py
gdementen/numba
78486e86ff9fbd343cac3dadbc63ec3bc66c75aa
[ "BSD-2-Clause" ]
null
null
null
numba/tests/test_sort.py
gdementen/numba
78486e86ff9fbd343cac3dadbc63ec3bc66c75aa
[ "BSD-2-Clause" ]
null
null
null
numba/tests/test_sort.py
gdementen/numba
78486e86ff9fbd343cac3dadbc63ec3bc66c75aa
[ "BSD-2-Clause" ]
null
null
null
from __future__ import print_function import copy import itertools import math import random import numpy as np from numba.compiler import compile_isolated, Flags from numba import jit, types, utils import numba.unittest_support as unittest from numba import testing from .support import TestCase, MemoryLeakMixin fr...
32.227895
84
0.559025
from __future__ import print_function import copy import itertools import math import random import numpy as np from numba.compiler import compile_isolated, Flags from numba import jit, types, utils import numba.unittest_support as unittest from numba import testing from .support import TestCase, MemoryLeakMixin fr...
true
true
f767a650494af100acae8442b0758143ea89fcc5
3,963
py
Python
contrib/document_cleanup/light_weight_document_cleanup_ICDAR2021/infer.py
Shreepadahs/computer_vision
9380789c5fe47069aa58b33b59fdb15ead528e84
[ "MIT" ]
7,899
2019-12-14T20:39:16.000Z
2022-03-31T12:13:27.000Z
contrib/document_cleanup/light_weight_document_cleanup_ICDAR2021/infer.py
Shreepadahs/computer_vision
9380789c5fe47069aa58b33b59fdb15ead528e84
[ "MIT" ]
185
2019-07-30T15:33:48.000Z
2019-12-12T13:42:01.000Z
contrib/document_cleanup/light_weight_document_cleanup_ICDAR2021/infer.py
Shreepadahs/computer_vision
9380789c5fe47069aa58b33b59fdb15ead528e84
[ "MIT" ]
1,025
2019-12-18T06:30:48.000Z
2022-03-24T06:55:04.000Z
import tensorflow as tf from tensorflow.keras import datasets, layers, models from tensorflow.keras.models import Model, load_model from tensorflow.keras.models import model_from_json from tensorflow.keras.layers import Input, Add, Dense, Activation, ZeroPadding2D, BatchNormalization, Flatten, Conv2D, AveragePool...
34.163793
193
0.750442
import tensorflow as tf from tensorflow.keras import datasets, layers, models from tensorflow.keras.models import Model, load_model from tensorflow.keras.models import model_from_json from tensorflow.keras.layers import Input, Add, Dense, Activation, ZeroPadding2D, BatchNormalization, Flatten, Conv2D, AveragePool...
true
true
f767a6780f9b27ed0930d5675258e169ee8f9617
5,731
py
Python
eu_funding/utils/misc_utils.py
nestauk/funding_analytics_eu
42fad368a90af2d0530ad83ac5c443c04fda1c73
[ "MIT" ]
null
null
null
eu_funding/utils/misc_utils.py
nestauk/funding_analytics_eu
42fad368a90af2d0530ad83ac5c443c04fda1c73
[ "MIT" ]
null
null
null
eu_funding/utils/misc_utils.py
nestauk/funding_analytics_eu
42fad368a90af2d0530ad83ac5c443c04fda1c73
[ "MIT" ]
2
2020-03-02T12:56:25.000Z
2020-03-11T13:10:35.000Z
import numpy as np def print_nested_structure(j, level=0): '''print_nested_structure Prints a list of all keys in a dictionary. The order and indentation shows any nested strucutre. Args: j (dict): level (int): Defaults to 0 ''' for k, v in j.items(): print(' '*level, k...
42.139706
117
0.55226
import numpy as np def print_nested_structure(j, level=0): for k, v in j.items(): print(' '*level, k) if isinstance(v, dict): print_nested_structure(v, level=level+1) elif (v is not None) & (type(v) != str): if isinstance(v[1], dict): print_nested_str...
true
true
f767a6bc2f9a8bba9470305c6183b18da1a92965
169
py
Python
ar_circle.py
arevathi69/pythonbible
861502d8ad6b57d11a0b260fd60fe2fae8aec6bc
[ "MIT" ]
null
null
null
ar_circle.py
arevathi69/pythonbible
861502d8ad6b57d11a0b260fd60fe2fae8aec6bc
[ "MIT" ]
null
null
null
ar_circle.py
arevathi69/pythonbible
861502d8ad6b57d11a0b260fd60fe2fae8aec6bc
[ "MIT" ]
null
null
null
#program to calculate the area of a circle r=1.1 print("The radius of the circle is",r) ar=float((22/7)*r*r) print("The area of the circle with radius is ",ar)
21.125
51
0.674556
r=1.1 print("The radius of the circle is",r) ar=float((22/7)*r*r) print("The area of the circle with radius is ",ar)
true
true
f767a7913ac6b025299c72bbb05158bbf22eb6df
4,409
py
Python
CallScreen/uix/screens/baseclass/callscreen.py
LukasSliacky/Articles
4807466bca62c9baa4b64db68e588a169463650f
[ "MIT" ]
null
null
null
CallScreen/uix/screens/baseclass/callscreen.py
LukasSliacky/Articles
4807466bca62c9baa4b64db68e588a169463650f
[ "MIT" ]
null
null
null
CallScreen/uix/screens/baseclass/callscreen.py
LukasSliacky/Articles
4807466bca62c9baa4b64db68e588a169463650f
[ "MIT" ]
null
null
null
import os from kivy.animation import Animation from kivy.lang import Builder from kivy.properties import NumericProperty from kivy.utils import get_color_from_hex from kivy.core.window import Window from kivymd.material_resources import STANDARD_INCREMENT from kivymd.color_definitions import colors from kivymd.uix.scre...
33.150376
77
0.510773
import os from kivy.animation import Animation from kivy.lang import Builder from kivy.properties import NumericProperty from kivy.utils import get_color_from_hex from kivy.core.window import Window from kivymd.material_resources import STANDARD_INCREMENT from kivymd.color_definitions import colors from kivymd.uix.scre...
true
true
f767a843d91f6307a3748c5640bdd7eab889913c
17,364
py
Python
tests/test_routers.py
scratchmex/django-rest-framework
34a93e6a50365dc8901fa493b1bf6d4eb3d09bf7
[ "BSD-3-Clause" ]
17,395
2017-03-31T21:13:13.000Z
2022-03-31T21:33:13.000Z
tests/test_routers.py
scratchmex/django-rest-framework
34a93e6a50365dc8901fa493b1bf6d4eb3d09bf7
[ "BSD-3-Clause" ]
2,983
2017-03-31T14:43:26.000Z
2022-03-31T20:34:23.000Z
tests/test_routers.py
scratchmex/django-rest-framework
34a93e6a50365dc8901fa493b1bf6d4eb3d09bf7
[ "BSD-3-Clause" ]
5,159
2017-03-31T15:06:32.000Z
2022-03-31T03:25:17.000Z
from collections import namedtuple import pytest from django.core.exceptions import ImproperlyConfigured from django.db import models from django.test import TestCase, override_settings from django.urls import include, path, resolve, reverse from rest_framework import permissions, serializers, viewsets from rest_fram...
35.876033
115
0.651463
from collections import namedtuple import pytest from django.core.exceptions import ImproperlyConfigured from django.db import models from django.test import TestCase, override_settings from django.urls import include, path, resolve, reverse from rest_framework import permissions, serializers, viewsets from rest_fram...
true
true
f767aa58a0285f74151a88a7e866295f1c840a8b
3,951
py
Python
analysis/src/python/data_analysis/statistics/issues_change_statistics.py
eartser/hyperstyle-analyze
58e2d361662e73e1e047919f57ab840055783b7a
[ "Apache-2.0" ]
1
2022-03-15T09:46:06.000Z
2022-03-15T09:46:06.000Z
analysis/src/python/data_analysis/statistics/issues_change_statistics.py
eartser/hyperstyle-analyze
58e2d361662e73e1e047919f57ab840055783b7a
[ "Apache-2.0" ]
1
2022-02-14T13:53:38.000Z
2022-02-14T13:53:38.000Z
analysis/src/python/data_analysis/statistics/issues_change_statistics.py
eartser/hyperstyle-analyze
58e2d361662e73e1e047919f57ab840055783b7a
[ "Apache-2.0" ]
3
2022-02-13T16:49:53.000Z
2022-02-17T13:53:07.000Z
import argparse import logging import sys from typing import List import pandas as pd from analysis.src.python.data_analysis.model.column_name import IssuesColumns, SubmissionColumns from analysis.src.python.data_analysis.utils.df_utils import merge_dfs from analysis.src.python.data_analysis.utils.statistics_utils im...
47.035714
117
0.664642
import argparse import logging import sys from typing import List import pandas as pd from analysis.src.python.data_analysis.model.column_name import IssuesColumns, SubmissionColumns from analysis.src.python.data_analysis.utils.df_utils import merge_dfs from analysis.src.python.data_analysis.utils.statistics_utils im...
true
true
f767aaaa672a636acc1c2951b5a6f2d2cf60787f
127
py
Python
ramda/negate_test.py
Rafi993/pyramda
4fa7fe28d5eaa798b702d28bdd3948515cb88f48
[ "MIT" ]
56
2018-08-06T08:44:58.000Z
2022-03-17T09:49:03.000Z
ramda/negate_test.py
Rafi993/pyramda
4fa7fe28d5eaa798b702d28bdd3948515cb88f48
[ "MIT" ]
28
2019-06-17T11:09:52.000Z
2022-02-18T16:59:21.000Z
ramda/negate_test.py
slavaGanzin/pyramda
4fa7fe28d5eaa798b702d28bdd3948515cb88f48
[ "MIT" ]
5
2019-09-18T09:24:38.000Z
2021-07-21T08:40:23.000Z
from .negate import negate from ramda.private.asserts import assert_equal def negate_test(): assert_equal(negate(5), -5)
18.142857
46
0.76378
from .negate import negate from ramda.private.asserts import assert_equal def negate_test(): assert_equal(negate(5), -5)
true
true
f767aaca2ffc8b8d94eec9c8ae22e9b572912eee
901
py
Python
4.Conditionals/challenge18_rrodriguezt.py
Ermys-Code/Ejercicio1
295a8916b17d76f965781c6744f44e71cef6809b
[ "MIT" ]
null
null
null
4.Conditionals/challenge18_rrodriguezt.py
Ermys-Code/Ejercicio1
295a8916b17d76f965781c6744f44e71cef6809b
[ "MIT" ]
null
null
null
4.Conditionals/challenge18_rrodriguezt.py
Ermys-Code/Ejercicio1
295a8916b17d76f965781c6744f44e71cef6809b
[ "MIT" ]
null
null
null
print("Welcome to the Voter Registration App\n") name = str(input("Please enter your name: ")).title() age = int(input("Please enter your age: ")) if age < 18: print("\nYou are not old enough to register to vote.") else: print(f"\nCongratulations {name}! You are old enough to register to vote.\n") paries...
33.37037
84
0.63263
print("Welcome to the Voter Registration App\n") name = str(input("Please enter your name: ")).title() age = int(input("Please enter your age: ")) if age < 18: print("\nYou are not old enough to register to vote.") else: print(f"\nCongratulations {name}! You are old enough to register to vote.\n") paries...
true
true
f767ac50f4c043d0303cc2d677b8cabf94642ac0
2,241
py
Python
house_sigma/crawl_listing_url.py
forestyaser/HousePriceCrawler
f0cf74128f9b6794f9ae6ebccc0356bb6d2f78f6
[ "Apache-2.0" ]
null
null
null
house_sigma/crawl_listing_url.py
forestyaser/HousePriceCrawler
f0cf74128f9b6794f9ae6ebccc0356bb6d2f78f6
[ "Apache-2.0" ]
1
2021-05-25T22:38:23.000Z
2021-05-25T22:38:23.000Z
house_sigma/crawl_listing_url.py
forestyaser/House-Price-Crawler
f0cf74128f9b6794f9ae6ebccc0356bb6d2f78f6
[ "Apache-2.0" ]
null
null
null
import boto3 from time import time import sys # sys.stdout = open('log.txt', 'w') import pandas as pd from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support ...
31.125
123
0.694333
import boto3 from time import time import sys import pandas as pd from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC df...
true
true
f767ac65e9fd8bfc20c0566fb27c866937e8e0f6
886
py
Python
Chp1/1.7-Exception-Handling.py
XYM1988/Algorithm
747111dda68f7366f39152a8404b28d1b7a0fb14
[ "MIT" ]
null
null
null
Chp1/1.7-Exception-Handling.py
XYM1988/Algorithm
747111dda68f7366f39152a8404b28d1b7a0fb14
[ "MIT" ]
null
null
null
Chp1/1.7-Exception-Handling.py
XYM1988/Algorithm
747111dda68f7366f39152a8404b28d1b7a0fb14
[ "MIT" ]
null
null
null
# Exception -- Base class for most error types # AttributeError -- obj.foo, if obj has no member named foo # EOFError -- end of file reached for console or file # IOError -- failure of I/O operation # IndexError -- index to sequence is out of bounds # KeyError -- nonexistent key requested for a set of dictionary # Keyb...
31.642857
63
0.683973
age = -1 while(age < 0): try: age = int(input("Input your age please")) if age <= 0: print("Your age should be positive") except(ValueError): print("The value should be integer") except(EOFError): print("There is an error when you handle your input")
true
true
f767ad1bb61577a4621eb6d769c9e4e39986e4c0
3,806
py
Python
orig-first-mod/StopWatch.py
delphianer/CountDown-4-digit-raspberry-gpio
db78e01ef358b6f89685bcdf2d929ecc5af5995a
[ "MIT" ]
null
null
null
orig-first-mod/StopWatch.py
delphianer/CountDown-4-digit-raspberry-gpio
db78e01ef358b6f89685bcdf2d929ecc5af5995a
[ "MIT" ]
null
null
null
orig-first-mod/StopWatch.py
delphianer/CountDown-4-digit-raspberry-gpio
db78e01ef358b6f89685bcdf2d929ecc5af5995a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ############################################################################# # Filename : StopWatch.py # Description : Control 4_Digit_7_Segment_Display with 74HC595 # Author : www.freenove.com # modification: 2019/12/27 ###################################################################...
33.095652
134
0.609301
import RPi.GPIO as GPIO import time import threading LSBFIRST = 1 MSBFIRST = 2 dataPin = 18 latchPin = 16 clockPin = 12 num = (0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90) digitPin = (11,13,15,19) counter = int(input("Counter=")) t = 0 def setup(): GPIO.setmode(GPIO.B...
true
true
f767ad3874573acb38d37afd0123fb28975ae407
19,445
py
Python
yabt/builders/cpp.py
resonai/ybt
48e9f9b8bc02686c95b2afc29265b799ff9d80da
[ "Apache-2.0" ]
2
2018-10-10T09:13:47.000Z
2021-08-18T08:57:19.000Z
yabt/builders/cpp.py
resonai/ybt
48e9f9b8bc02686c95b2afc29265b799ff9d80da
[ "Apache-2.0" ]
123
2018-02-05T08:36:47.000Z
2022-03-29T07:44:24.000Z
yabt/builders/cpp.py
resonai/ybt
48e9f9b8bc02686c95b2afc29265b799ff9d80da
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2016 Resonai Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
40.342324
79
0.683466
from hashlib import md5 from os.path import basename, dirname, join, relpath, splitext from ostrich.utils.collections import listify from yabt.docker import extend_runtime_params, format_docker_run_params from ..artifact import ArtifactType as AT from .dockerapp import build_app_docker_and_bin, register_app_buil...
true
true
f767ae2dc30e30633e48beeef25547646b71f100
3,656
py
Python
docs/dalapi/doxypy/loader.py
samir-nasibli/oneDAL
a8112a7a18ce1dba13b1a5751ced8ce2bc9f7382
[ "Apache-2.0" ]
188
2016-04-16T12:11:48.000Z
2018-01-12T12:42:55.000Z
docs/dalapi/doxypy/loader.py
samir-nasibli/oneDAL
a8112a7a18ce1dba13b1a5751ced8ce2bc9f7382
[ "Apache-2.0" ]
350
2018-01-22T10:48:15.000Z
2020-03-24T10:05:45.000Z
docs/dalapi/doxypy/loader.py
samir-nasibli/oneDAL
a8112a7a18ce1dba13b1a5751ced8ce2bc9f7382
[ "Apache-2.0" ]
93
2018-01-23T01:59:23.000Z
2020-03-16T11:04:19.000Z
# file: loader.py #=============================================================================== # Copyright 2019 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # h...
35.153846
80
0.647976
from typing import List from . import model from .parser import Parser from .builder import build, ModelBuilder class TransformerPass(object): def enter(self, node): ... def transform(self, node): ... class NameTransformer(object): def transform(self, fully_qualified_name): ... class _NameTransformerPas...
true
true
f767ae544f325588028db406518572d93b2dae39
244
py
Python
nevergrad/functions/powersystems/__init__.py
kwonhur/nevergrad
7821ff2ddf46ed7ece61529449f770d32179433c
[ "MIT" ]
3,217
2018-12-20T05:41:46.000Z
2022-03-31T10:22:54.000Z
nevergrad/functions/powersystems/__init__.py
kwonhur/nevergrad
7821ff2ddf46ed7ece61529449f770d32179433c
[ "MIT" ]
590
2018-12-20T21:03:38.000Z
2022-03-31T04:38:45.000Z
nevergrad/functions/powersystems/__init__.py
kwonhur/nevergrad
7821ff2ddf46ed7ece61529449f770d32179433c
[ "MIT" ]
333
2018-12-20T08:38:03.000Z
2022-03-28T06:23:53.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from .core import PowerSystem as PowerSystem
34.857143
71
0.77459
from .core import PowerSystem as PowerSystem
true
true
f767b020ef56bf9ba82ae2c6984c075ad579c235
1,277
py
Python
tests/qctests/test_qc_tukey53H.py
jessicaaustin/CoTeDe
0ca2a1c71de980d91262fd36fd5d8ab8cc09f019
[ "BSD-3-Clause" ]
null
null
null
tests/qctests/test_qc_tukey53H.py
jessicaaustin/CoTeDe
0ca2a1c71de980d91262fd36fd5d8ab8cc09f019
[ "BSD-3-Clause" ]
null
null
null
tests/qctests/test_qc_tukey53H.py
jessicaaustin/CoTeDe
0ca2a1c71de980d91262fd36fd5d8ab8cc09f019
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ """ import numpy as np from numpy import ma from cotede.qctests import Tukey53H from data import DummyData def test(): profile = DummyData() profile.data['PRES'] = ma.masked_array([1.0, 100, 200, 300, 500, 5000]) profile.data['TEMP'] = ma.masked_array(...
27.76087
86
0.54581
import numpy as np from numpy import ma from cotede.qctests import Tukey53H from data import DummyData def test(): profile = DummyData() profile.data['PRES'] = ma.masked_array([1.0, 100, 200, 300, 500, 5000]) profile.data['TEMP'] = ma.masked_array([27.44, 14.55, 11.96, 11.02, 7.65, 2.12]) profile....
true
true
f767b0cfaab1360d5f26d60cfffa163b912b584a
2,516
py
Python
andreas/tests/andreastestcase.py
maaaks/andreas
a76b64bf63647c553d0b8401e03d1f518b51d349
[ "MIT" ]
1
2017-04-27T08:26:32.000Z
2017-04-27T08:26:32.000Z
andreas/tests/andreastestcase.py
maaaks/andreas
a76b64bf63647c553d0b8401e03d1f518b51d349
[ "MIT" ]
1
2017-04-28T08:18:12.000Z
2017-04-30T11:05:45.000Z
andreas/tests/andreastestcase.py
maaaks/andreas
a76b64bf63647c553d0b8401e03d1f518b51d349
[ "MIT" ]
null
null
null
from os.path import dirname from unittest.case import TestCase from peewee import _transaction from andreas.db.database import db from andreas.models.keypair import KeyPair from andreas.models.server import Server from andreas.models.user import User class AndreasTestCase(TestCase): """ Basic class for all ...
37
114
0.663355
from os.path import dirname from unittest.case import TestCase from peewee import _transaction from andreas.db.database import db from andreas.models.keypair import KeyPair from andreas.models.server import Server from andreas.models.user import User class AndreasTestCase(TestCase): @classmethod def __init_...
true
true
f767b3361988f1d12482421f00c341e2206e0092
748
py
Python
filer/utils/pil_exif.py
ArtistsTechGuy/django-filer
946629087943d41eff290f07bfdf240b8853dd88
[ "BSD-3-Clause" ]
2
2019-06-29T12:26:59.000Z
2019-10-04T15:04:25.000Z
filer/utils/pil_exif.py
ArtistsTechGuy/django-filer
946629087943d41eff290f07bfdf240b8853dd88
[ "BSD-3-Clause" ]
11
2019-11-02T20:57:52.000Z
2020-09-27T09:08:33.000Z
filer/utils/pil_exif.py
ArtistsTechGuy/django-filer
946629087943d41eff290f07bfdf240b8853dd88
[ "BSD-3-Clause" ]
1
2019-10-03T13:17:41.000Z
2019-10-03T13:17:41.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.core.files.storage import default_storage as storage from ..utils.compatibility import PILExifTags, PILImage def get_exif(im): try: exif_raw = im._getexif() or {} except: # noqa return {} ret = {} for tag, va...
23.375
89
0.647059
from __future__ import absolute_import from django.core.files.storage import default_storage as storage from ..utils.compatibility import PILExifTags, PILImage def get_exif(im): try: exif_raw = im._getexif() or {} except: return {} ret = {} for tag, value in list(exif_raw.items()): ...
true
true
f767b389feccb56597cbb98fa1b76bb396571d0c
599
py
Python
Worker/WebCheck/wafw00f/plugins/naxsi.py
p4sschen/Toy4Recon
e4fa6a512b238cca6d6d072ed5c66899de60bb06
[ "MIT" ]
1
2020-12-16T13:14:05.000Z
2020-12-16T13:14:05.000Z
Worker/WebCheck/wafw00f/plugins/naxsi.py
p4sschen/Toy4Recon
e4fa6a512b238cca6d6d072ed5c66899de60bb06
[ "MIT" ]
null
null
null
Worker/WebCheck/wafw00f/plugins/naxsi.py
p4sschen/Toy4Recon
e4fa6a512b238cca6d6d072ed5c66899de60bb06
[ "MIT" ]
null
null
null
#!/usr/bin/env python NAME = 'NAXSI (NBS Systems)' def is_waf(self): # Sometimes naxsi waf returns 'x-data-origin: naxsi/waf' if self.matchheader(('X-Data-Origin', r'^naxsi(.*)?')): return True # Found samples returning 'server: naxsi/2.0' if self.matchheader(('server', r'naxsi(.*)?')): ...
27.227273
95
0.592654
NAME = 'NAXSI (NBS Systems)' def is_waf(self): if self.matchheader(('X-Data-Origin', r'^naxsi(.*)?')): return True if self.matchheader(('server', r'naxsi(.*)?')): return True for attack in self.attacks: r = attack(self) if r is None: return _, ...
true
true
f767b3e5f84d0415626afb95f68624d853096e3b
3,583
py
Python
oscarapi/tests/unit/testadminapi.py
ski-family/django-oscar-api
948b85e6dd6309c5a42c3254ea46d1699cb9df6a
[ "BSD-3-Clause" ]
311
2015-01-30T14:58:01.000Z
2022-03-27T16:57:38.000Z
oscarapi/tests/unit/testadminapi.py
ski-family/django-oscar-api
948b85e6dd6309c5a42c3254ea46d1699cb9df6a
[ "BSD-3-Clause" ]
211
2015-01-26T23:03:55.000Z
2022-03-26T19:33:26.000Z
oscarapi/tests/unit/testadminapi.py
ski-family/django-oscar-api
948b85e6dd6309c5a42c3254ea46d1699cb9df6a
[ "BSD-3-Clause" ]
202
2015-01-07T09:20:08.000Z
2022-03-26T15:21:04.000Z
from unittest import skipIf, skipUnless from django.conf import settings from django.contrib.auth import get_user_model from django.test import RequestFactory from django.urls import reverse, NoReverseMatch from oscarapi import urls from oscarapi.tests.utils import APITest from oscarapi.permissions import APIAdminPe...
36.938144
94
0.678203
from unittest import skipIf, skipUnless from django.conf import settings from django.contrib.auth import get_user_model from django.test import RequestFactory from django.urls import reverse, NoReverseMatch from oscarapi import urls from oscarapi.tests.utils import APITest from oscarapi.permissions import APIAdminPe...
true
true
f767b4bb866d66626d942743a17a0e23fc0cb038
7,259
py
Python
ards_prediction.py
vribeiro1/covid19
2528ec2e67bee5ff864a513940fb0525f98740b0
[ "MIT" ]
null
null
null
ards_prediction.py
vribeiro1/covid19
2528ec2e67bee5ff864a513940fb0525f98740b0
[ "MIT" ]
null
null
null
ards_prediction.py
vribeiro1/covid19
2528ec2e67bee5ff864a513940fb0525f98740b0
[ "MIT" ]
null
null
null
import os import numpy as np import pandas as pd import shap from sklearn.model_selection import train_test_split from .utils.plot import ( plot_results_1x2, plot_results_2x2, plot_shap_values, plot_survival, plot_sensitivity_specificity_vs_threshold ) from .utils.preprocess import preprocess from...
40.553073
130
0.696652
import os import numpy as np import pandas as pd import shap from sklearn.model_selection import train_test_split from .utils.plot import ( plot_results_1x2, plot_results_2x2, plot_shap_values, plot_survival, plot_sensitivity_specificity_vs_threshold ) from .utils.preprocess import preprocess from...
true
true
f767b4c00d9a07ca016da042ab5d7b2e175d069f
11,337
py
Python
isc_dhcp_leases/test_iscDhcpLeases.py
shawnmullaney/python-isc-dhcp-leases
7d19cf8d3999df355cdab4673ecd93b22c58d0f9
[ "MIT" ]
null
null
null
isc_dhcp_leases/test_iscDhcpLeases.py
shawnmullaney/python-isc-dhcp-leases
7d19cf8d3999df355cdab4673ecd93b22c58d0f9
[ "MIT" ]
null
null
null
isc_dhcp_leases/test_iscDhcpLeases.py
shawnmullaney/python-isc-dhcp-leases
7d19cf8d3999df355cdab4673ecd93b22c58d0f9
[ "MIT" ]
null
null
null
from unittest import TestCase from isc_dhcp_leases.iscdhcpleases import IscDhcpLeases, Lease, Lease6 from freezegun import freeze_time from datetime import datetime __author__ = 'Martijn Braam <martijn@brixit.nl>' class TestIscDhcpLeases(TestCase): @freeze_time("2015-07-6 8:15:0") def test_get(self): ...
52.486111
118
0.643645
from unittest import TestCase from isc_dhcp_leases.iscdhcpleases import IscDhcpLeases, Lease, Lease6 from freezegun import freeze_time from datetime import datetime __author__ = 'Martijn Braam <martijn@brixit.nl>' class TestIscDhcpLeases(TestCase): @freeze_time("2015-07-6 8:15:0") def test_get(self): ...
true
true
f767b4e8449ed8127db7791a50f8124ac3f02303
891
py
Python
koila/interfaces/tensorlike.py
techthiyanes/koila
b665482ff99a02bfeeceaa1323589fb89495a30c
[ "MIT" ]
null
null
null
koila/interfaces/tensorlike.py
techthiyanes/koila
b665482ff99a02bfeeceaa1323589fb89495a30c
[ "MIT" ]
null
null
null
koila/interfaces/tensorlike.py
techthiyanes/koila
b665482ff99a02bfeeceaa1323589fb89495a30c
[ "MIT" ]
null
null
null
from __future__ import annotations from abc import abstractmethod from typing import Protocol, TypeVar from .components import Arithmetic, MemoryInfo Number = TypeVar("Number", int, float) Numeric = TypeVar("Numeric", int, float, bool) class TensorLike(Arithmetic, MemoryInfo, Protocol): """ TensorLike is a...
20.72093
60
0.635241
from __future__ import annotations from abc import abstractmethod from typing import Protocol, TypeVar from .components import Arithmetic, MemoryInfo Number = TypeVar("Number", int, float) Numeric = TypeVar("Numeric", int, float, bool) class TensorLike(Arithmetic, MemoryInfo, Protocol): data: TensorLike ...
true
true
f767b5363c4a424684032c6abecc07bcb569824a
6,084
py
Python
venv/lib/python3.7/site-packages/lazr/restfulclient/tests/test_atomicfilecache.py
margretmwangi/Rblog
2d606a858c3313e1d48cdd6a8ce205c8776be754
[ "Unlicense" ]
null
null
null
venv/lib/python3.7/site-packages/lazr/restfulclient/tests/test_atomicfilecache.py
margretmwangi/Rblog
2d606a858c3313e1d48cdd6a8ce205c8776be754
[ "Unlicense" ]
1
2021-02-08T20:34:54.000Z
2021-02-08T20:34:54.000Z
venv/lib/python3.7/site-packages/lazr/restfulclient/tests/test_atomicfilecache.py
margretmwangi/Rblog
2d606a858c3313e1d48cdd6a8ce205c8776be754
[ "Unlicense" ]
1
2020-11-04T06:48:34.000Z
2020-11-04T06:48:34.000Z
# Copyright 2012 Canonical Ltd. # This file is part of lazr.restfulclient. # # lazr.restfulclient 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 Software Foundation, version 3 of the # License. # # lazr.restfulclient is d...
34.765714
77
0.675707
__metaclass__ = type import shutil import tempfile import unittest import sys PY3 = sys.version_info[0] >= 3 if PY3: binary_type = bytes else: binary_type = str import httplib2 from lazr.restfulclient._browser import ( AtomicFileCache, safename) class TestFileCacheInterface(unittest.TestCase): ...
true
true
f767b594f12f96faa9b3d384ece2b7e84511baf4
489
py
Python
phononweb/tests/test_phonondb.py
ttadano/phononwebsite
8fa9f1b1ad84384c07191e3a1da2e1949bd042f2
[ "BSD-3-Clause" ]
53
2017-01-24T10:08:44.000Z
2022-03-08T16:42:05.000Z
phononweb/tests/test_phonondb.py
ttadano/phononwebsite
8fa9f1b1ad84384c07191e3a1da2e1949bd042f2
[ "BSD-3-Clause" ]
16
2016-11-03T11:12:39.000Z
2021-11-13T15:12:44.000Z
phononweb/tests/test_phonondb.py
ttadano/phononwebsite
8fa9f1b1ad84384c07191e3a1da2e1949bd042f2
[ "BSD-3-Clause" ]
21
2016-09-08T20:51:56.000Z
2021-12-15T08:50:11.000Z
# Copyright (C) 2018 Henrique Pereira Coutada Miranda # All rights reserved. # # This file is part of phononwebsite # from __future__ import print_function import unittest import os from phononweb.phonondb import PhononDB2015 class TestPhononDB2015(unittest.TestCase): def test_phonondb_2015(self): pdb = Ph...
22.227273
53
0.713701
from __future__ import print_function import unittest import os from phononweb.phonondb import PhononDB2015 class TestPhononDB2015(unittest.TestCase): def test_phonondb_2015(self): pdb = PhononDB2015() pdb = PhononDB2015() print(pdb) def tearDown(self): os.remove('phonondb.json...
true
true
f767b59b4be8a4aa724f28c51703ed6f4cdd2ae7
4,421
py
Python
tests/api/program/test_blackbird.py
antalszava/piquasso
7ebff83145cfab44929114437c250852dff5f9a5
[ "Apache-2.0" ]
12
2021-09-12T15:51:45.000Z
2022-03-05T22:25:47.000Z
tests/api/program/test_blackbird.py
antalszava/piquasso
7ebff83145cfab44929114437c250852dff5f9a5
[ "Apache-2.0" ]
36
2021-09-13T08:01:27.000Z
2022-03-21T11:53:30.000Z
tests/api/program/test_blackbird.py
antalszava/piquasso
7ebff83145cfab44929114437c250852dff5f9a5
[ "Apache-2.0" ]
null
null
null
# # Copyright 2021 Budapest Quantum Computing Group # # 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...
26.63253
80
0.685365
import numpy as np import piquasso as pq def test_loads_blackbird_parses_operations(): blackbird_code = """name StateTeleportation version 1.0 BSgate(0.7853981633974483, 0) | [1, 2] Rgate(0.7853981633974483) | 1 Vgate(0.5) | 1 """ program = pq.Program() program....
true
true
f767b5a02834bc43fda4cafc3ce2038fc3321d25
830
py
Python
lambda_function.py
Moesif/moesif-aws-lambda-python
b588bc819568e08eec2f8eb9d2bd6a1e15f945a5
[ "Apache-2.0" ]
1
2021-01-21T10:38:33.000Z
2021-01-21T10:38:33.000Z
lambda_function.py
Moesif/moesif-aws-lambda-python
b588bc819568e08eec2f8eb9d2bd6a1e15f945a5
[ "Apache-2.0" ]
2
2019-12-21T01:14:19.000Z
2020-02-20T02:03:23.000Z
lambda_function.py
Moesif/moesif-aws-lambda-python
b588bc819568e08eec2f8eb9d2bd6a1e15f945a5
[ "Apache-2.0" ]
1
2021-01-21T10:38:35.000Z
2021-01-21T10:38:35.000Z
from moesif_aws_lambda.middleware import * import os import requests import json moesif_options = { 'LOG_BODY': True, 'DEBUG': True, } @MoesifLogger(moesif_options) def lambda_handler(event, context): # Outgoing API call to third parties like Github / Stripe or to your own dependencies start_capture_...
27.666667
102
0.580723
from moesif_aws_lambda.middleware import * import os import requests import json moesif_options = { 'LOG_BODY': True, 'DEBUG': True, } @MoesifLogger(moesif_options) def lambda_handler(event, context): start_capture_outgoing(moesif_options) third_party = requests.get('https://httpbin.org/ip', json...
true
true
f767b721ee8cf99326015e82923142ae126df1eb
421
py
Python
backend/apps/events/migrations/0022_auto_20201109_2252.py
dominikbullo/SportAgenda
fa130111e08aed38d93b9ab85e14684f362b1930
[ "Apache-2.0" ]
null
null
null
backend/apps/events/migrations/0022_auto_20201109_2252.py
dominikbullo/SportAgenda
fa130111e08aed38d93b9ab85e14684f362b1930
[ "Apache-2.0" ]
null
null
null
backend/apps/events/migrations/0022_auto_20201109_2252.py
dominikbullo/SportAgenda
fa130111e08aed38d93b9ab85e14684f362b1930
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.3 on 2020-11-09 21:52 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0021_auto_20201106_2240'), ] operations = [ migrations.AlterField( model_name='event', name='accommodation...
22.157895
80
0.617577
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0021_auto_20201106_2240'), ] operations = [ migrations.AlterField( model_name='event', name='accommodation', field=models.ManyToManyField(blan...
true
true
f767b7366fdf2c2f742dc6da7890800845ed5799
471
py
Python
tests/validators/test_interface.py
funkypenguin/connaisseur
37d85332e519454a017b02ecb1cd77913f51f70a
[ "Apache-2.0" ]
281
2020-08-07T16:21:07.000Z
2022-03-31T11:08:42.000Z
tests/validators/test_interface.py
funkypenguin/connaisseur
37d85332e519454a017b02ecb1cd77913f51f70a
[ "Apache-2.0" ]
445
2020-09-02T10:41:18.000Z
2022-03-31T10:19:29.000Z
tests/validators/test_interface.py
funkypenguin/connaisseur
37d85332e519454a017b02ecb1cd77913f51f70a
[ "Apache-2.0" ]
38
2020-10-28T08:05:04.000Z
2022-03-09T02:06:40.000Z
import pytest import connaisseur.validators.interface as vi def test_init(): assert vi.ValidatorInterface("") @pytest.mark.asyncio async def test_validate(): with pytest.raises(NotImplementedError): assert await vi.ValidatorInterface("").validate(None) def test_healthy(): with pytest.raises(No...
21.409091
61
0.728238
import pytest import connaisseur.validators.interface as vi def test_init(): assert vi.ValidatorInterface("") @pytest.mark.asyncio async def test_validate(): with pytest.raises(NotImplementedError): assert await vi.ValidatorInterface("").validate(None) def test_healthy(): with pytest.raises(No...
true
true
f767b7e28258306f5b6bb017294eb5ce05750da8
95
py
Python
spikes/Docker/old/socket_example/python/runtime_err.py
CharlesDDNoble/broncode
01d35823871345a42b7c1e022466561b48d69a17
[ "MIT" ]
null
null
null
spikes/Docker/old/socket_example/python/runtime_err.py
CharlesDDNoble/broncode
01d35823871345a42b7c1e022466561b48d69a17
[ "MIT" ]
1
2020-06-06T00:42:26.000Z
2020-06-06T00:42:26.000Z
spikes/Docker/old/socket_example/python/runtime_err.py
CharlesDDNoble/broncode
01d35823871345a42b7c1e022466561b48d69a17
[ "MIT" ]
null
null
null
def main(): Im a runtime error! print("Hello World!\n") if __name__ == "__main__": main()
11.875
26
0.631579
def main(): Im a runtime error! print("Hello World!\n") if __name__ == "__main__": main()
false
true
f767b85b503e560c9c518c37a6499c5b74229c57
3,347
py
Python
tensorflow_probability/python/bijectors/tanh_test.py
ValentinMouret/probability
7ea6cc55e5b3fed04372cd188cd0764e92fd3cf4
[ "Apache-2.0" ]
1
2018-12-13T12:36:09.000Z
2018-12-13T12:36:09.000Z
tensorflow_probability/python/bijectors/tanh_test.py
ValentinMouret/probability
7ea6cc55e5b3fed04372cd188cd0764e92fd3cf4
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/bijectors/tanh_test.py
ValentinMouret/probability
7ea6cc55e5b3fed04372cd188cd0764e92fd3cf4
[ "Apache-2.0" ]
1
2020-07-04T21:37:20.000Z
2020-07-04T21:37:20.000Z
# Copyright 2018 The TensorFlow Probability 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 o...
37.606742
78
0.680908
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from tensorflow_probability.python import bijectors as tfb from tensorflow_probability.python.bijectors import bijector_test_util tfe = tf.contrib.eager @tfe.run_a...
true
true
f767b89ef65faaa9a3cd09648577869e4269a98b
13,801
py
Python
elpips/elpips.py
kcui/elpips
87a844451aec278042f33ccd98a1d230c0773b50
[ "BSD-2-Clause" ]
null
null
null
elpips/elpips.py
kcui/elpips
87a844451aec278042f33ccd98a1d230c0773b50
[ "BSD-2-Clause" ]
null
null
null
elpips/elpips.py
kcui/elpips
87a844451aec278042f33ccd98a1d230c0773b50
[ "BSD-2-Clause" ]
null
null
null
import tensorflow as tf import numpy as np import itertools import numbers from . import networks from . import pnetlin from . util import switch_case_cond, switch_case_where, for_each, as_tuple ### Configuring E-LPIPS. class Config: def __init__(self): self.metric = 'vgg_ensemble' self.enable_dropout = T...
37.099462
174
0.6985
import tensorflow as tf import numpy as np import itertools import numbers from . import networks from . import pnetlin from . util import switch_case_cond, switch_case_where, for_each, as_tuple class Config: def __init__(self): self.metric = 'vgg_ensemble' self.enable_dropout = True self.dropout_keep_p...
true
true
f767b8dc3d8b2a6a4df7014f09906f31d98b4907
71
py
Python
meteor/publisher/__init__.py
h0wang/meteor
d8d16fd22c05712ce1ab2d9568f89961f7a54194
[ "Apache-2.0" ]
3
2020-11-15T15:29:03.000Z
2021-11-01T18:21:30.000Z
meteor/publisher/__init__.py
h0wang/meteor
d8d16fd22c05712ce1ab2d9568f89961f7a54194
[ "Apache-2.0" ]
1
2020-11-13T12:48:06.000Z
2020-11-15T15:28:11.000Z
meteor/publisher/__init__.py
h0wang/meteor
d8d16fd22c05712ce1ab2d9568f89961f7a54194
[ "Apache-2.0" ]
1
2021-03-18T22:46:31.000Z
2021-03-18T22:46:31.000Z
from .console import ConsolePublisher __all__ = ["ConsolePublisher"]
14.2
37
0.788732
from .console import ConsolePublisher __all__ = ["ConsolePublisher"]
true
true
f767b902feb8bfb9c8e7df63ccf4b34901c664f9
512
py
Python
manualBackup.py
tiantianhan/maya_py_tools
0868909ffda5764fa102ed6eb7d743f7cb729e4b
[ "MIT" ]
null
null
null
manualBackup.py
tiantianhan/maya_py_tools
0868909ffda5764fa102ed6eb7d743f7cb729e4b
[ "MIT" ]
null
null
null
manualBackup.py
tiantianhan/maya_py_tools
0868909ffda5764fa102ed6eb7d743f7cb729e4b
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ manualBackup.py : manually make a backup Motivation: incremental save creates too many files with trivial changes. Where manual backup is preferred, this script makes it easier to create and save a backup copy of the current scene """ import maya.cmds as cmds saveDir = cmds.fileDialog2(ff=...
23.272727
89
0.746094
import maya.cmds as cmds saveDir = cmds.fileDialog2(ff="*.mb", dialogStyle=1)[0] thisDir = cmds.file(q=True, expandName=True) print ("Saving backup to " + saveDir) cmds.file(rn=saveDir) cmds.file(save=True) cmds.file(rn=thisDir) print ("Done.")
true
true
f767ba4ab7dc07c6411219ae23f44f59779436ee
1,035
py
Python
backend/api/migrations/0019_alter_lift_reference_id_alter_session_reference_id.py
ChristchurchCityWeightlifting/lifter-api
a82b79c75106e7f4f8ea4b4e3e12d727213445e3
[ "MIT" ]
null
null
null
backend/api/migrations/0019_alter_lift_reference_id_alter_session_reference_id.py
ChristchurchCityWeightlifting/lifter-api
a82b79c75106e7f4f8ea4b4e3e12d727213445e3
[ "MIT" ]
5
2022-03-07T08:30:47.000Z
2022-03-22T09:15:52.000Z
backend/api/migrations/0019_alter_lift_reference_id_alter_session_reference_id.py
ChristchurchCityWeightlifting/lifter-api
a82b79c75106e7f4f8ea4b4e3e12d727213445e3
[ "MIT" ]
null
null
null
# Generated by Django 4.0.3 on 2022-03-24 00:08 import hashid_field.field from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("api", "0018_remove_lift_competition"), ] operations = [ migrations.AlterField( model_name="lift", ...
27.972973
90
0.560386
import hashid_field.field from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("api", "0018_remove_lift_competition"), ] operations = [ migrations.AlterField( model_name="lift", name="reference_id", field=hashid_fi...
true
true
f767bb95a19dfc32e9ff17a041ecc5cd28e64bc2
2,382
py
Python
codility/tape_equilibrium.py
kiseonjeong/Codility
d688eb7526d4ec9b46b689e39ba87a779dc3860f
[ "MIT" ]
null
null
null
codility/tape_equilibrium.py
kiseonjeong/Codility
d688eb7526d4ec9b46b689e39ba87a779dc3860f
[ "MIT" ]
null
null
null
codility/tape_equilibrium.py
kiseonjeong/Codility
d688eb7526d4ec9b46b689e39ba87a779dc3860f
[ "MIT" ]
null
null
null
""" A non-empty array A consisting of N integers is given. Array A represents numbers on a tape. Any integer P, such that 0 < P < N, splits this tape into two non-empty parts: A[0], A[1], ..., A[P − 1] and A[P], A[P + 1], ..., A[N − 1]. The difference between the two parts is the value of: |(A[0] + A[1] + ... + A[P −...
28.023529
139
0.61461
def solution(A): count = len(A) lut = [0] * (count + 1) for i, v in enumerate(A, 1): lut[i] = v + lut[i - 1] first, second = lut[1], lut[count] - lut[1] diff_min = abs(first - second) for i in range(count - 2): P = i + 2 first, second = lut[P], lut[count] - lut[P...
true
true
f767bbb17d1607fb6f47bf34caa3a11706ed080c
167
py
Python
telegram/EzGenTG.py
icYFTL/EzGen
dfa13446bc91073be5ca5a87d229c61760d281c2
[ "Apache-2.0" ]
null
null
null
telegram/EzGenTG.py
icYFTL/EzGen
dfa13446bc91073be5ca5a87d229c61760d281c2
[ "Apache-2.0" ]
1
2020-09-27T14:05:19.000Z
2020-09-27T14:14:03.000Z
telegram/EzGenTG.py
icYFTL/EzGen
dfa13446bc91073be5ca5a87d229c61760d281c2
[ "Apache-2.0" ]
1
2020-12-30T14:16:23.000Z
2020-12-30T14:16:23.000Z
from os import path, mkdir if not path.exists('logs'): mkdir('logs') from aiogram import executor from source.telegram_api import dp executor.start_polling(dp)
16.7
34
0.760479
from os import path, mkdir if not path.exists('logs'): mkdir('logs') from aiogram import executor from source.telegram_api import dp executor.start_polling(dp)
true
true
f767bcefd751cf330c8c9213fb79618131bc6ae7
1,389
py
Python
app.py
m-thirumal/stream-log
58868b1e1f54223e596f81ed130da920b26d717b
[ "Apache-2.0" ]
null
null
null
app.py
m-thirumal/stream-log
58868b1e1f54223e596f81ed130da920b26d717b
[ "Apache-2.0" ]
null
null
null
app.py
m-thirumal/stream-log
58868b1e1f54223e596f81ed130da920b26d717b
[ "Apache-2.0" ]
null
null
null
import os import zipfile from os.path import basename from time import sleep from log_settings import logger from flask import Response, Flask, send_from_directory __author__ = ["Thirumal"] __email__ = "m.thirumal@hotmail.com" app = Flask(__name__) def read_log(): """creates logger information""" with open(...
29.553191
88
0.663067
import os import zipfile from os.path import basename from time import sleep from log_settings import logger from flask import Response, Flask, send_from_directory __author__ = ["Thirumal"] __email__ = "m.thirumal@hotmail.com" app = Flask(__name__) def read_log(): with open('logs/app.log') as f: while T...
true
true
f767bd2d77faa7578c088f3b8499e3e61b97a302
1,716
py
Python
packages/simcore-sdk/src/simcore_sdk/node_ports/config.py
GitHK/osparc-simcore-forked
5b01a28d1b8028afcf9a735e1d46a73daa13686e
[ "MIT" ]
null
null
null
packages/simcore-sdk/src/simcore_sdk/node_ports/config.py
GitHK/osparc-simcore-forked
5b01a28d1b8028afcf9a735e1d46a73daa13686e
[ "MIT" ]
17
2020-10-15T16:06:05.000Z
2022-03-21T18:48:21.000Z
packages/simcore-sdk/src/simcore_sdk/node_ports/config.py
GitHK/osparc-simcore-forked
5b01a28d1b8028afcf9a735e1d46a73daa13686e
[ "MIT" ]
null
null
null
"""Takes care of the configurations. """ import os from typing import Dict, Type # required configurations PROJECT_ID: str = os.environ.get("SIMCORE_PROJECT_ID", default="undefined") NODE_UUID: str = os.environ.get("SIMCORE_NODE_UUID", default="undefined") USER_ID: str = os.environ.get("SIMCORE_USER_ID", default="unde...
33
80
0.659091
import os from typing import Dict, Type PROJECT_ID: str = os.environ.get("SIMCORE_PROJECT_ID", default="undefined") NODE_UUID: str = os.environ.get("SIMCORE_NODE_UUID", default="undefined") USER_ID: str = os.environ.get("SIMCORE_USER_ID", default="undefined") STORAGE_ENDPOINT: str = os.environ.get("STORAGE_ENDPOINT", ...
true
true
f767bd5e4142c73f2c4c6c444db9fd439b327b7f
1,279
py
Python
torchvision/datasets/__init__.py
hongzhen1/vision
cecfa7bf1314d1656e2ae34c85a156c5393af167
[ "BSD-3-Clause" ]
1
2019-08-03T07:53:46.000Z
2019-08-03T07:53:46.000Z
torchvision/datasets/__init__.py
hongzhen1/vision
cecfa7bf1314d1656e2ae34c85a156c5393af167
[ "BSD-3-Clause" ]
null
null
null
torchvision/datasets/__init__.py
hongzhen1/vision
cecfa7bf1314d1656e2ae34c85a156c5393af167
[ "BSD-3-Clause" ]
1
2019-09-04T17:16:32.000Z
2019-09-04T17:16:32.000Z
from .lsun import LSUN, LSUNClass from .folder import ImageFolder, DatasetFolder from .coco import CocoCaptions, CocoDetection from .cifar import CIFAR10, CIFAR100 from .stl10 import STL10 from .mnist import MNIST, EMNIST, FashionMNIST, KMNIST, QMNIST from .svhn import SVHN from .phototour import PhotoTour from .fakeda...
38.757576
78
0.720876
from .lsun import LSUN, LSUNClass from .folder import ImageFolder, DatasetFolder from .coco import CocoCaptions, CocoDetection from .cifar import CIFAR10, CIFAR100 from .stl10 import STL10 from .mnist import MNIST, EMNIST, FashionMNIST, KMNIST, QMNIST from .svhn import SVHN from .phototour import PhotoTour from .fakeda...
true
true
f767bd7f7407218b933ea0f7bc01230b82507316
7,449
py
Python
Lib/site-packages/sphinx/jinja2glue.py
nemarugommula/ecommerce
60185e79655fbaf0fcad9e877a886fe9eb3c4451
[ "bzip2-1.0.6" ]
8
2019-04-27T01:19:45.000Z
2020-09-21T03:31:01.000Z
Lib/site-packages/sphinx/jinja2glue.py
nemarugommula/ecommerce
60185e79655fbaf0fcad9e877a886fe9eb3c4451
[ "bzip2-1.0.6" ]
12
2021-03-09T03:01:16.000Z
2022-03-11T23:59:36.000Z
Lib/site-packages/sphinx/jinja2glue.py
nemarugommula/ecommerce
60185e79655fbaf0fcad9e877a886fe9eb3c4451
[ "bzip2-1.0.6" ]
5
2019-04-27T01:19:47.000Z
2020-09-20T15:15:19.000Z
""" sphinx.jinja2glue ~~~~~~~~~~~~~~~~~ Glue code for the jinja2 templating engine. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from os import path from pprint import pformat from typing import Any, Callable, Iterator, Tuple # NOQA...
32.107759
105
0.607061
from os import path from pprint import pformat from typing import Any, Callable, Iterator, Tuple from jinja2 import FileSystemLoader, BaseLoader, TemplateNotFound, \ contextfunction from jinja2.sandbox import SandboxedEnvironment from jinja2.utils import open_if_exists from sphinx.application import TemplateBri...
true
true
f767bd86c74e02ea47e3785d97e17fa3b249d3b9
447
py
Python
sunpy/net/__init__.py
Octaves0911/sunpy
d3dff03fe6cc404e40f22da90200ffbb3d38c1a7
[ "BSD-2-Clause" ]
2
2020-02-05T18:39:12.000Z
2021-03-22T19:56:38.000Z
sunpy/net/__init__.py
Octaves0911/sunpy
d3dff03fe6cc404e40f22da90200ffbb3d38c1a7
[ "BSD-2-Clause" ]
10
2017-08-10T07:55:42.000Z
2020-04-19T10:56:43.000Z
sunpy/net/__init__.py
Octaves0911/sunpy
d3dff03fe6cc404e40f22da90200ffbb3d38c1a7
[ "BSD-2-Clause" ]
1
2019-02-06T11:57:56.000Z
2019-02-06T11:57:56.000Z
# Import and register the clients but we do not want them in the namespace, we import them as _ from sunpy.net import base_client as _ from sunpy.net import cdaweb as _ from sunpy.net import dataretriever as _ from sunpy.net import hek as _ from sunpy.net import helio as _ from sunpy.net import jsoc as _ from sunpy.ne...
31.928571
95
0.782998
from sunpy.net import base_client as _ from sunpy.net import cdaweb as _ from sunpy.net import dataretriever as _ from sunpy.net import hek as _ from sunpy.net import helio as _ from sunpy.net import jsoc as _ from sunpy.net import vso as _ from sunpy.net.fido_factory import Fido from sunpy.net.scraper import Scraper ...
true
true
f767bdf54ce311d0479fa67d10e1490d53365690
12,311
py
Python
certbot/plugins/webroot.py
pub-repository/letsencrypt
c4684f187a4ce4ef13425cfba607dec9d8bfa963
[ "Apache-2.0" ]
1
2019-12-29T16:34:18.000Z
2019-12-29T16:34:18.000Z
certbot/plugins/webroot.py
pub-repository/letsencrypt
c4684f187a4ce4ef13425cfba607dec9d8bfa963
[ "Apache-2.0" ]
null
null
null
certbot/plugins/webroot.py
pub-repository/letsencrypt
c4684f187a4ce4ef13425cfba607dec9d8bfa963
[ "Apache-2.0" ]
1
2019-12-29T16:34:20.000Z
2019-12-29T16:34:20.000Z
"""Webroot plugin.""" import argparse import collections import errno import json import logging import six import zope.component import zope.interface from acme import challenges # pylint: disable=unused-import # pylint: disable=unused-import, no-name-in-module from acme.magic_typing import Dict, Set, DefaultDict, ...
42.746528
98
0.610024
import argparse import collections import errno import json import logging import six import zope.component import zope.interface from acme import challenges from acme.magic_typing import Dict, Set, DefaultDict, List from certbot import achallenges from certbot import cli from certbot import errors from certbot im...
true
true
f767be824f2fa09c13f4c81847bd31b97b98c247
5,136
py
Python
ansible/venv/lib/python2.7/site-packages/ansible/modules/cloud/google/gcp_sql_database_info.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
17
2017-06-07T23:15:01.000Z
2021-08-30T14:32:36.000Z
ansible/venv/lib/python2.7/site-packages/ansible/modules/cloud/google/gcp_sql_database_info.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
9
2017-06-25T03:31:52.000Z
2021-05-17T23:43:12.000Z
ansible/venv/lib/python2.7/site-packages/ansible/modules/cloud/google/gcp_sql_database_info.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
3
2018-05-26T21:31:22.000Z
2019-09-28T17:00:45.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
33.568627
148
0.597157
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ["preview"], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: gcp_sql_database_info description: - Gather info for GCP Database - This module was called C(gcp_s...
true
true
f767bec250b290bbb245e243632755da6ce1e954
762
py
Python
api/project/apps/events/migrations/0007_auto_20150416_0015.py
buddyup/api
ae42fb99de0104d63b6a087710c31e377958eb77
[ "BSD-2-Clause" ]
null
null
null
api/project/apps/events/migrations/0007_auto_20150416_0015.py
buddyup/api
ae42fb99de0104d63b6a087710c31e377958eb77
[ "BSD-2-Clause" ]
null
null
null
api/project/apps/events/migrations/0007_auto_20150416_0015.py
buddyup/api
ae42fb99de0104d63b6a087710c31e377958eb77
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('events', '0006_auto_20150414_1838'), ] operations = [ migrations.AlterField( model_name='event',...
27.214286
117
0.607612
from __future__ import unicode_literals from django.db import models, migrations import datetime class Migration(migrations.Migration): dependencies = [ ('events', '0006_auto_20150414_1838'), ] operations = [ migrations.AlterField( model_name='event', name='creat...
true
true
f767bf3a3c259672c8e9d1dadcf67ab4a34816eb
1,009
py
Python
ex5.py
karimjamali/Class4
97cdd5f86fff5ab369010f3fec7ef3ea47a027a3
[ "Apache-2.0" ]
null
null
null
ex5.py
karimjamali/Class4
97cdd5f86fff5ab369010f3fec7ef3ea47a027a3
[ "Apache-2.0" ]
null
null
null
ex5.py
karimjamali/Class4
97cdd5f86fff5ab369010f3fec7ef3ea47a027a3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from netmiko import ConnectHandler from getpass import getpass password=getpass() pynet1={ 'device_type':'cisco_ios', 'ip':'50.76.53.27', 'username':'pyclass', 'password':password, } pynet2={ 'device_type':'cisco_ios', 'ip':'50.76.53.27', 'username':'pyclass', 'password':password, 'port': 8022,...
20.591837
59
0.72448
from netmiko import ConnectHandler from getpass import getpass password=getpass() pynet1={ 'device_type':'cisco_ios', 'ip':'50.76.53.27', 'username':'pyclass', 'password':password, } pynet2={ 'device_type':'cisco_ios', 'ip':'50.76.53.27', 'username':'pyclass', 'password':password, 'port': 8022, } juniper_srx = { ...
false
true
f767bf4856b2296fc767526c0d143e03b59216d3
6,202
py
Python
env/share/doc/dipy/examples/quick_start.py
Raniac/NEURO-LEARN
3c3acc55de8ba741e673063378e6cbaf10b64c7a
[ "Apache-2.0" ]
8
2019-05-29T09:38:30.000Z
2021-01-20T03:36:59.000Z
env/share/doc/dipy/examples/quick_start.py
Raniac/neurolearn_dev
3c3acc55de8ba741e673063378e6cbaf10b64c7a
[ "Apache-2.0" ]
12
2021-03-09T03:01:16.000Z
2022-03-11T23:59:36.000Z
env/share/doc/dipy/examples/quick_start.py
Raniac/NEURO-LEARN
3c3acc55de8ba741e673063378e6cbaf10b64c7a
[ "Apache-2.0" ]
1
2020-07-17T12:49:49.000Z
2020-07-17T12:49:49.000Z
""" ========================= Getting started with DIPY ========================= In diffusion MRI (dMRI) usually we use three types of files, a Nifti file with the diffusion weighted data, and two text files one with b-values and one with the b-vectors. In DIPY_ we provide tools to load and process these files and w...
28.449541
91
0.636246
from dipy.data import fetch_sherbrooke_3shell fetch_sherbrooke_3shell() from os.path import expanduser, join home = expanduser('~') dname = join(home, '.dipy', 'sherbrooke_3shell') fdwi = join(dname, 'HARDI193.nii.gz') print(fdwi) fbval = join(dname, 'HARDI193.bval') print(fbval) fbvec = join(dname, 'HARDI19...
true
true
f767bfb4cf33790e1424542b81db77ddc3e85173
472,863
py
Python
Lib/site-packages/tensorflow/python/ops/gen_array_ops.py
amitdev81296/tensorflow
9869739cc142a996432bef4dc91b1f1b165bc27a
[ "bzip2-1.0.6" ]
6
2022-02-04T18:12:24.000Z
2022-03-21T23:57:12.000Z
Lib/site-packages/tensorflow/python/ops/gen_array_ops.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
4
2020-09-26T00:55:50.000Z
2022-02-10T01:53:06.000Z
venv/Lib/site-packages/tensorflow/python/ops/gen_array_ops.py
surabhijain123/Handwriting-Word-Recognition
b8bbded3c633c56b876a5600c25fdf9224c0f1ad
[ "MIT" ]
1
2022-02-08T03:53:23.000Z
2022-02-08T03:53:23.000Z
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. """ import collections as _collections import six as _six from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow from tensorflow.python.eager import context as _context from tensorflow.python.eager import ...
34.980249
23,821
0.615252
import collections as _collections import six as _six from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow from tensorflow.python.eager import context as _context from tensorflow.python.eager import core as _core from tensorflow.python.eager import execute as _execute from tensorflow.python.f...
true
true
f767c011883ee3ed67a5c9ebe778257b593c99c4
4,003
py
Python
data_loader/raw_data_loader.py
bzhai/Ubi-SleepNet
27837827dec608d06659421d073872fb1f68453e
[ "MIT" ]
3
2022-01-22T15:55:31.000Z
2022-01-28T16:09:02.000Z
data_loader/raw_data_loader.py
bzhai/Ubi-SleepNet
27837827dec608d06659421d073872fb1f68453e
[ "MIT" ]
null
null
null
data_loader/raw_data_loader.py
bzhai/Ubi-SleepNet
27837827dec608d06659421d073872fb1f68453e
[ "MIT" ]
null
null
null
from utilities.utils import build_windowed_data from utilities.utils import load_h5_df_train_test_dataset, get_data, cast_sleep_stages from sleep_stage_config import * from sklearn.model_selection import train_test_split import torch from torch.utils.data import Dataset, DataLoader import pandas as pd import numpy as ...
40.03
103
0.627529
from utilities.utils import build_windowed_data from utilities.utils import load_h5_df_train_test_dataset, get_data, cast_sleep_stages from sleep_stage_config import * from sklearn.model_selection import train_test_split import torch from torch.utils.data import Dataset, DataLoader import pandas as pd import numpy as ...
true
true
f767c263935c2fa92cab5cb8c684dc374d07092b
474
py
Python
Parkeringshus/main/migrations/0011_auto_20190312_1346.py
jeppefm1/Parkering
9b9522039095cb7e17966487d2a9e4e6889fe40c
[ "Apache-2.0" ]
1
2019-03-08T15:09:41.000Z
2019-03-08T15:09:41.000Z
Parkeringshus/main/migrations/0011_auto_20190312_1346.py
jeppefm1/Parkering
9b9522039095cb7e17966487d2a9e4e6889fe40c
[ "Apache-2.0" ]
null
null
null
Parkeringshus/main/migrations/0011_auto_20190312_1346.py
jeppefm1/Parkering
9b9522039095cb7e17966487d2a9e4e6889fe40c
[ "Apache-2.0" ]
1
2019-03-08T15:08:13.000Z
2019-03-08T15:08:13.000Z
# Generated by Django 2.1.7 on 2019-03-12 12:46 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0010_auto_20190312_1329'), ] operations = [ migrations.AlterField( model_name='tutorial', na...
23.7
120
0.626582
import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0010_auto_20190312_1329'), ] operations = [ migrations.AlterField( model_name='tutorial', name='published', field=models.DateTim...
true
true
f767c349f8209d857cc2ca1a70cbe919f3948b27
1,322
py
Python
src/controller/routes/holdem/fold.py
ZhangPluto/Funny-Nation
abd38f10d5cc9c026cbab5ae2995cb17a2902b8f
[ "MIT" ]
126
2022-01-15T02:29:07.000Z
2022-03-30T09:57:40.000Z
src/controller/routes/holdem/fold.py
ZhangPluto/Funny-Nation
abd38f10d5cc9c026cbab5ae2995cb17a2902b8f
[ "MIT" ]
18
2022-01-11T22:24:35.000Z
2022-03-16T00:13:01.000Z
src/controller/routes/holdem/fold.py
ZhangPluto/Funny-Nation
abd38f10d5cc9c026cbab5ae2995cb17a2902b8f
[ "MIT" ]
25
2022-01-22T15:06:27.000Z
2022-03-01T04:34:19.000Z
from discord import Client, TextChannel, Member from pymysql import Connection from src.controller.routes.holdem.endGame import holdemEndGame from src.controller.routes.holdem.next.nextPlayer import holdemNextPlayer from src.utils.casino.Casino import Casino from src.utils.casino.table.holdem.HoldemTable import Holdem...
42.645161
155
0.779879
from discord import Client, TextChannel, Member from pymysql import Connection from src.controller.routes.holdem.endGame import holdemEndGame from src.controller.routes.holdem.next.nextPlayer import holdemNextPlayer from src.utils.casino.Casino import Casino from src.utils.casino.table.holdem.HoldemTable import Holdem...
true
true
f767c3c576295f077e2f388bd173b2ededf9cfda
544
py
Python
057_solution.py
ed-cetera/project-euler-python
59359991ba9bbd7d419e2c7e133d67a6992695b1
[ "MIT" ]
null
null
null
057_solution.py
ed-cetera/project-euler-python
59359991ba9bbd7d419e2c7e133d67a6992695b1
[ "MIT" ]
null
null
null
057_solution.py
ed-cetera/project-euler-python
59359991ba9bbd7d419e2c7e133d67a6992695b1
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import time def main(): limit = 1000 (numerator, denominator) = (1, 2) # sqrt(2) = 1 + numerator/denumerator counter = 0 for iteration in range(2, limit + 1): (numerator, denominator) = (denominator, 2*denominator + numerator) if len(str(numerator + denominator...
24.727273
76
0.601103
import time def main(): limit = 1000 (numerator, denominator) = (1, 2) counter = 0 for iteration in range(2, limit + 1): (numerator, denominator) = (denominator, 2*denominator + numerator) if len(str(numerator + denominator)) > len(str(denominator)): counter += 1 prin...
true
true
f767c470f878189fe4f927a90a7919337aaa98e0
3,651
py
Python
model/pointgroup/backbone.py
thangvubk/SphereRPN
9b154256774437bb23d81e22990d350555d39b81
[ "Apache-2.0" ]
8
2021-11-29T10:30:38.000Z
2021-12-13T09:54:25.000Z
model/pointgroup/backbone.py
thangvubk/SphereRPN
9b154256774437bb23d81e22990d350555d39b81
[ "Apache-2.0" ]
null
null
null
model/pointgroup/backbone.py
thangvubk/SphereRPN
9b154256774437bb23d81e22990d350555d39b81
[ "Apache-2.0" ]
6
2021-11-29T10:30:39.000Z
2021-12-13T08:14:46.000Z
import torch import torch.nn as nn import spconv from spconv.modules import SparseModule from collections import OrderedDict class ResidualBlock(SparseModule): def __init__(self, in_channels, out_channels, norm_fn, indice_key=None): super().__init__() if in_channels == out_channels: s...
35.794118
148
0.634073
import torch import torch.nn as nn import spconv from spconv.modules import SparseModule from collections import OrderedDict class ResidualBlock(SparseModule): def __init__(self, in_channels, out_channels, norm_fn, indice_key=None): super().__init__() if in_channels == out_channels: s...
true
true
f767c49ece79952d5ec8f0903cbc0edd87848814
531
py
Python
src/bot/keyboards.py
ekiauhce/ruthelp_bot
b7c7acdbcad60f7fa741fd46d7756ce46e27dec8
[ "Apache-2.0" ]
1
2022-03-17T07:00:49.000Z
2022-03-17T07:00:49.000Z
src/bot/keyboards.py
ekiauhce/ruthelp_bot
b7c7acdbcad60f7fa741fd46d7756ce46e27dec8
[ "Apache-2.0" ]
null
null
null
src/bot/keyboards.py
ekiauhce/ruthelp_bot
b7c7acdbcad60f7fa741fd46d7756ce46e27dec8
[ "Apache-2.0" ]
2
2021-11-06T14:26:55.000Z
2021-11-13T11:44:36.000Z
from telegram import ReplyKeyboardMarkup from database import get_categories_list # Разметки клавиатур для выбора # категории, пола и верные/неверные данные соотвественно categories = ReplyKeyboardMarkup( [[c] for c in get_categories_list()], one_time_keyboard=True ) genders = ReplyKeyboardMarkup( [["Мужс...
24.136364
56
0.745763
from telegram import ReplyKeyboardMarkup from database import get_categories_list categories = ReplyKeyboardMarkup( [[c] for c in get_categories_list()], one_time_keyboard=True ) genders = ReplyKeyboardMarkup( [["Мужской"], ["Женский"]], resize_keyboard=True, one_time_keyboard=True ) check = Repl...
true
true
f767c4ad38e5ed48c6e53730d90299ce5ce5ad20
869
py
Python
gomokuproject/gomokuproject/urls.py
Hegelim/gomoku
6a572cacc3edf1ef4fa096b99c606ac1961bdcc8
[ "BSD-3-Clause" ]
null
null
null
gomokuproject/gomokuproject/urls.py
Hegelim/gomoku
6a572cacc3edf1ef4fa096b99c606ac1961bdcc8
[ "BSD-3-Clause" ]
null
null
null
gomokuproject/gomokuproject/urls.py
Hegelim/gomoku
6a572cacc3edf1ef4fa096b99c606ac1961bdcc8
[ "BSD-3-Clause" ]
null
null
null
"""gomokuproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class...
34.76
77
0.700806
from django.contrib import admin from django.urls import include, path from game import views urlpatterns = [ path('', views.index, name='index'), path('game/', include('game.urls')), path('admin/', admin.site.urls), ]
true
true
f767c538fa10e6e161afb8c4bbeb394a391c56f1
30,935
py
Python
openstack_dashboard/dashboards/project/instances/views.py
hemantsonawane95/prozeta-horizon
1800750804502adf9ff31366daa987aeb9acba31
[ "Apache-2.0" ]
930
2015-01-04T08:06:03.000Z
2022-03-13T18:47:13.000Z
openstack_dashboard/dashboards/project/instances/views.py
hemantsonawane95/prozeta-horizon
1800750804502adf9ff31366daa987aeb9acba31
[ "Apache-2.0" ]
26
2015-02-23T16:37:31.000Z
2020-07-02T08:37:41.000Z
openstack_dashboard/dashboards/project/instances/views.py
hemantsonawane95/prozeta-horizon
1800750804502adf9ff31366daa987aeb9acba31
[ "Apache-2.0" ]
1,040
2015-01-01T18:48:28.000Z
2022-03-19T08:35:18.000Z
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
39.9677
79
0.638759
from collections import OrderedDict import logging from django.conf import settings from django import http from django import shortcuts from django.urls import reverse from django.urls import reverse_lazy from django.utils.translation import ugettext_lazy as _ from django.views import generic from horizon import ex...
true
true
f767c5845714708d94264caf9fd553184266091b
973
py
Python
TasksManager/urls.py
raiots/TasksManager
92971237f5e82de5aa0662cb8060dae60add018a
[ "MIT" ]
7
2021-08-14T03:55:04.000Z
2022-03-12T03:33:50.000Z
TasksManager/urls.py
raiots/TasksManager
92971237f5e82de5aa0662cb8060dae60add018a
[ "MIT" ]
null
null
null
TasksManager/urls.py
raiots/TasksManager
92971237f5e82de5aa0662cb8060dae60add018a
[ "MIT" ]
null
null
null
"""TasksManager URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-...
34.75
77
0.725591
from django.contrib import admin from django.urls import path, include from TasksManager.settings import SITE_NAME urlpatterns = [ path('admin/', admin.site.urls), path('', include('apps.tasks.urls', namespace='tasks')), ] admin.site.site_header = SITE_NAME admin.site.site_title = SITE_NAME admin.site.index_t...
true
true
f767c651509e2d48b8d9202152cf88e907204508
619
py
Python
index/sitemaps.py
gluwer/przepisymm
dc83fdc4068fb0102a87081bd519807fd66397c2
[ "BSD-3-Clause" ]
null
null
null
index/sitemaps.py
gluwer/przepisymm
dc83fdc4068fb0102a87081bd519807fd66397c2
[ "BSD-3-Clause" ]
null
null
null
index/sitemaps.py
gluwer/przepisymm
dc83fdc4068fb0102a87081bd519807fd66397c2
[ "BSD-3-Clause" ]
null
null
null
from kay.utils import url_for from kay_sitemap import Sitemap from przepisy import VISIBILITY from przepisy.models import Category, Recipe class StaticSitemap(Sitemap): changefreq = 'weekly' def items(self): items = [url_for('index/index', _external=True)] for cat in Category.all().fetch(20): i...
22.925926
115
0.704362
from kay.utils import url_for from kay_sitemap import Sitemap from przepisy import VISIBILITY from przepisy.models import Category, Recipe class StaticSitemap(Sitemap): changefreq = 'weekly' def items(self): items = [url_for('index/index', _external=True)] for cat in Category.all().fetch(20): i...
true
true
f767c667501ae6ee8eaa03ddd32b5b329bc54edb
3,098
py
Python
sockets.py
RichardBlazek/Communicator
bc1d13c67c7f6476e2bbe03276b5795b108d7516
[ "MIT" ]
null
null
null
sockets.py
RichardBlazek/Communicator
bc1d13c67c7f6476e2bbe03276b5795b108d7516
[ "MIT" ]
null
null
null
sockets.py
RichardBlazek/Communicator
bc1d13c67c7f6476e2bbe03276b5795b108d7516
[ "MIT" ]
null
null
null
import socket import errno import json CLOSED=-1 class sock: def __init__(self, s): self.s=s def recv(self): text=b'' try: while True: data=self.s.recv(4096) if not data: return CLOSED else: ...
23.648855
69
0.561653
import socket import errno import json CLOSED=-1 class sock: def __init__(self, s): self.s=s def recv(self): text=b'' try: while True: data=self.s.recv(4096) if not data: return CLOSED else: ...
true
true
f767c7217e62fa9fa898f9e1cdb68ff004119d4d
1,039
py
Python
extensions/common/permissions/PRESUBMIT.py
iridium-browser/iridium-browser
907e31cf5ce5ad14d832796e3a7c11e496828959
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
575
2015-06-18T23:58:20.000Z
2022-03-23T09:32:39.000Z
extensions/common/permissions/PRESUBMIT.py
iridium-browser/iridium-browser
907e31cf5ce5ad14d832796e3a7c11e496828959
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
113
2015-05-04T09:58:14.000Z
2022-01-31T19:35:03.000Z
extensions/common/permissions/PRESUBMIT.py
DamieFC/chromium
54ce2d3c77723697efd22cfdb02aea38f9dfa25c
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
52
2015-07-14T10:40:50.000Z
2022-03-15T01:11:49.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Chromium presubmit script for src/extensions/common/permissions. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more det...
34.633333
75
0.763234
import sys def _CreateAPIPermissionIDChecker(input_api, output_api): original_sys_path = sys.path try: sys.path.append(input_api.os_path.join( input_api.PresubmitLocalPath(), '..', '..', '..', 'tools', 'strict_enum_value_checker')) from strict_enum_value_checker import StrictEnumValueChec...
true
true
f767c84acc5f1bb791b63352e67e10f790e29a58
10,173
py
Python
segmentator/segmentator_main.py
ofgulban/segmentator
343a410bf7d34cad267b1a95b3b66a8020dfdc5e
[ "BSD-3-Clause" ]
62
2016-06-08T07:32:55.000Z
2022-02-28T02:03:03.000Z
segmentator/segmentator_main.py
ofgulban/segmentator
343a410bf7d34cad267b1a95b3b66a8020dfdc5e
[ "BSD-3-Clause" ]
79
2016-07-25T12:16:31.000Z
2021-02-16T06:45:34.000Z
segmentator/segmentator_main.py
ofgulban/segmentator
343a410bf7d34cad267b1a95b3b66a8020dfdc5e
[ "BSD-3-Clause" ]
16
2017-01-12T11:50:00.000Z
2022-02-07T19:17:51.000Z
#!/usr/bin/env python """Processing input and plotting.""" from __future__ import division, print_function import numpy as np import segmentator.config as cfg import matplotlib matplotlib.use(cfg.matplotlib_backend) print("Matplotlib backend: {}".format(matplotlib.rcParams['backend'])) import matplotlib.pyplot as plt ...
37.538745
79
0.676398
from __future__ import division, print_function import numpy as np import segmentator.config as cfg import matplotlib matplotlib.use(cfg.matplotlib_backend) print("Matplotlib backend: {}".format(matplotlib.rcParams['backend'])) import matplotlib.pyplot as plt from matplotlib.colors import LogNorm from matplotlib.widge...
true
true
f767c863e349e77d2d574e5691052b8f1406d5b0
4,956
py
Python
tests/helpers/test_builders.py
Cthulhu2/tornado-swagger
bb940387657c7dc4109194a0bc66768b53725d61
[ "MIT" ]
null
null
null
tests/helpers/test_builders.py
Cthulhu2/tornado-swagger
bb940387657c7dc4109194a0bc66768b53725d61
[ "MIT" ]
null
null
null
tests/helpers/test_builders.py
Cthulhu2/tornado-swagger
bb940387657c7dc4109194a0bc66768b53725d61
[ "MIT" ]
null
null
null
import functools import pytest import tornado.web from tornado_swagger._builders import ( SWAGGER_DOC_SEPARATOR, _build_doc_from_func_doc, _extract_parameters_names, _format_handler_path, _try_extract_args, _try_extract_doc, build_swagger_docs, doc_builders, generate_doc_from_endpo...
24.058252
89
0.663842
import functools import pytest import tornado.web from tornado_swagger._builders import ( SWAGGER_DOC_SEPARATOR, _build_doc_from_func_doc, _extract_parameters_names, _format_handler_path, _try_extract_args, _try_extract_doc, build_swagger_docs, doc_builders, generate_doc_from_endpo...
true
true
f767c99ee04fcb75afac001383b91622f2f82b80
1,264
py
Python
main.py
santosgv/donwloadYT
6691bb4e8867b6a765d5eb7fd7e267c87cb7f1d2
[ "MIT" ]
null
null
null
main.py
santosgv/donwloadYT
6691bb4e8867b6a765d5eb7fd7e267c87cb7f1d2
[ "MIT" ]
null
null
null
main.py
santosgv/donwloadYT
6691bb4e8867b6a765d5eb7fd7e267c87cb7f1d2
[ "MIT" ]
null
null
null
from pytube import YouTube from tkinter import * main = Tk() class Funcionalidades(): def baixar(self): yt = YouTube(self.entry.get()) self.alert['text'] = (yt.title + ' - Baixado') yt.streams.first().download() class Aplicacao(Funcionalidades): def __init__(self): self.main...
31.6
122
0.626582
from pytube import YouTube from tkinter import * main = Tk() class Funcionalidades(): def baixar(self): yt = YouTube(self.entry.get()) self.alert['text'] = (yt.title + ' - Baixado') yt.streams.first().download() class Aplicacao(Funcionalidades): def __init__(self): self.main...
true
true
f767c9a5750cce1958ccf80292da28155424313a
4,077
py
Python
bokeh/models/tests/test_formatters.py
kinghows/bokeh
aeb7abc1dbe2b67ce0f4422838a96fb8362c52c7
[ "BSD-3-Clause" ]
1
2020-12-28T20:23:28.000Z
2020-12-28T20:23:28.000Z
bokeh/models/tests/test_formatters.py
kinghows/bokeh
aeb7abc1dbe2b67ce0f4422838a96fb8362c52c7
[ "BSD-3-Clause" ]
null
null
null
bokeh/models/tests/test_formatters.py
kinghows/bokeh
aeb7abc1dbe2b67ce0f4422838a96fb8362c52c7
[ "BSD-3-Clause" ]
null
null
null
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2018, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
32.879032
94
0.484425
from __future__ import absolute_import, division, print_function, unicode_literals import pytest ; pytest from textwrap import dedent from bokeh.models import Slider from bokeh.models import FuncTickFormatter pscript = pytest.importorskip("pscript") def test_functickformatter_from_py_func_no_args(): def ...
true
true
f767cb8a8b20bb7e9fcdcb258ff9b892064f2906
594
py
Python
Task1C.py
jwll3/Flood-warning-system-group-48
4b3cb850fcbb82aade31589a78f5ec5bddd49836
[ "MIT" ]
null
null
null
Task1C.py
jwll3/Flood-warning-system-group-48
4b3cb850fcbb82aade31589a78f5ec5bddd49836
[ "MIT" ]
null
null
null
Task1C.py
jwll3/Flood-warning-system-group-48
4b3cb850fcbb82aade31589a78f5ec5bddd49836
[ "MIT" ]
null
null
null
from floodsystem.stationdata import build_station_list from floodsystem.geo import stations_within_radius def run(): """Requirements for Task 1C""" # Build list of stations stations = build_station_list() #Setting the value for centre coordinate and radius r centre = (52.2053, 0.1218) r = 10...
28.285714
81
0.723906
from floodsystem.stationdata import build_station_list from floodsystem.geo import stations_within_radius def run(): stations = build_station_list() centre = (52.2053, 0.1218) r = 10 stations_within_required_radius = stations_within_radius(stations, centre, r) sorted_list = sorted(statio...
true
true
f767cbfc57b9fd67a95a02db1ae0977f3fce3bf7
82,582
bzl
Python
apple/internal/ios_rules.bzl
distefanon/rules_apple
4246cfe864953025cdaa105d8105679fcd1fba29
[ "Apache-2.0" ]
null
null
null
apple/internal/ios_rules.bzl
distefanon/rules_apple
4246cfe864953025cdaa105d8105679fcd1fba29
[ "Apache-2.0" ]
null
null
null
apple/internal/ios_rules.bzl
distefanon/rules_apple
4246cfe864953025cdaa105d8105679fcd1fba29
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Bazel 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 applicable la...
39.268664
104
0.664806
load( "@build_bazel_rules_apple//apple/internal:apple_product_type.bzl", "apple_product_type", ) load( "@build_bazel_rules_apple//apple/internal:bundling_support.bzl", "bundling_support", ) load( "@build_bazel_rules_apple//apple/internal:codesigning_support.bzl", "codesigning_support", ) load(...
true
true
f767ccae50374d3c9d5733f212a55d8ec4e52bd5
2,450
py
Python
APIs/users/tests/test_users.py
matteyeux/MyBookingServices
ce6ec906b3a58da16e1f066b9af290fb7e8b82d3
[ "MIT" ]
null
null
null
APIs/users/tests/test_users.py
matteyeux/MyBookingServices
ce6ec906b3a58da16e1f066b9af290fb7e8b82d3
[ "MIT" ]
3
2022-02-26T16:50:12.000Z
2022-02-26T16:50:12.000Z
APIs/users/tests/test_users.py
matteyeux/MyBookingServices
ce6ec906b3a58da16e1f066b9af290fb7e8b82d3
[ "MIT" ]
null
null
null
from fastapi.testclient import TestClient from users import app client = TestClient(app.app) jwtoken = "TheToken" def test_get_all_users_OK(): """List all users (default)""" response = client.get( "/users/all/", ) assert response.status_code == 200 assert len(response.json()["users"]) ==...
23.113208
55
0.597143
from fastapi.testclient import TestClient from users import app client = TestClient(app.app) jwtoken = "TheToken" def test_get_all_users_OK(): response = client.get( "/users/all/", ) assert response.status_code == 200 assert len(response.json()["users"]) == 500 def test_get_users_by_id_OK_...
true
true
f767ccd2dac2f6382ff33dbaad8435c54773245e
156
py
Python
virtual/bin/django-admin.py
Codex-Mayrie/Gallery-app
68e2097939c7179def8d53d1cf12a57140cccb74
[ "MIT" ]
null
null
null
virtual/bin/django-admin.py
Codex-Mayrie/Gallery-app
68e2097939c7179def8d53d1cf12a57140cccb74
[ "MIT" ]
1
2021-06-10T22:24:24.000Z
2021-06-10T22:24:24.000Z
virtual/bin/django-admin.py
Codex-Mayrie/Gallery-app
68e2097939c7179def8d53d1cf12a57140cccb74
[ "MIT" ]
null
null
null
#!/home/moringa/Gallery-app/virtual/bin/python3.6 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
26
49
0.782051
from django.core import management if __name__ == "__main__": management.execute_from_command_line()
true
true
f767cd4c180cafdd6b03e67b4f5ab6e0848669cb
14,320
py
Python
vehicle/OVMS.V3/components/duktape/tools/extract_caseconv.py
goev/Open-Vehicle-Monitoring-System-3
f2efd1898ec1df19eb730c1eda9a1999a00b36b4
[ "MIT" ]
2
2017-12-12T09:53:40.000Z
2018-04-17T13:16:53.000Z
tools/extract_caseconv.py
KiraanRK/esp32-duktape
1b7fbcb8bd6bfc346d92df30ec099df7f13b03aa
[ "MIT" ]
null
null
null
tools/extract_caseconv.py
KiraanRK/esp32-duktape
1b7fbcb8bd6bfc346d92df30ec099df7f13b03aa
[ "MIT" ]
2
2018-03-26T18:19:07.000Z
2021-09-05T19:13:42.000Z
#!/usr/bin/env python2 # # Extract rules for Unicode case conversion, specifically the behavior # required by Ecmascript E5 in Sections 15.5.4.16 to 15.5.4.19. The # bitstream encoded rules are used for the slow path at run time, so # compactness is favored over speed. # # There is no support for context or local...
32.035794
152
0.592807
# import os import sys import math import optparse import dukutil class UnicodeData: "Read UnicodeData.txt into an internal representation." def __init__(self, filename): self.data = self.read_unicode_data(filename) print 'read %d unicode data entries' % len(self.data) def read_unicode_...
false
true
f767cd9f827d81c6d74f2c354bdfbf4430b63240
7,501
py
Python
pyapns_client/notification.py
rissicay/pyapns_client
3e8bc035c3319e8ba0a7d84db7ba6c7f10628ea4
[ "MIT" ]
null
null
null
pyapns_client/notification.py
rissicay/pyapns_client
3e8bc035c3319e8ba0a7d84db7ba6c7f10628ea4
[ "MIT" ]
null
null
null
pyapns_client/notification.py
rissicay/pyapns_client
3e8bc035c3319e8ba0a7d84db7ba6c7f10628ea4
[ "MIT" ]
null
null
null
import json class _PayloadAlert: def __init__(self, title=None, body=None): super().__init__() self.title = title self.body = body def to_dict(self, alert_body=None): if alert_body is None: alert_body = self.body d = {} if self.title: ...
32.755459
156
0.629783
import json class _PayloadAlert: def __init__(self, title=None, body=None): super().__init__() self.title = title self.body = body def to_dict(self, alert_body=None): if alert_body is None: alert_body = self.body d = {} if self.title: ...
true
true
f767ce583a031ce41f653a9330a61680350d65dd
658
py
Python
externals/binaryen/test/emscripten/emlink.py
caokun8008/ckeos
889093599eb59c90e4cbcff2817f4421302fada1
[ "MIT" ]
40
2018-05-14T11:05:03.000Z
2020-10-20T03:03:06.000Z
emlink.py
firasdib/emscripten
df11c6f1fd1636a355b83a1c48b3a890596e6a32
[ "MIT" ]
4
2019-08-19T13:07:10.000Z
2020-10-17T02:45:04.000Z
emlink.py
firasdib/emscripten
df11c6f1fd1636a355b83a1c48b3a890596e6a32
[ "MIT" ]
14
2018-05-28T09:45:02.000Z
2018-12-18T10:54:26.000Z
#!/usr/bin/env python2 ''' Fast static linker for emscripten outputs. Specifically this links asm.js modules. See https://github.com/kripken/emscripten/wiki/Linking ''' import sys from tools import shared from tools.asm_module import AsmModule def run(): try: me, main, side, out = sys.argv[:4] except: p...
19.352941
85
0.68997
''' Fast static linker for emscripten outputs. Specifically this links asm.js modules. See https://github.com/kripken/emscripten/wiki/Linking ''' import sys from tools import shared from tools.asm_module import AsmModule def run(): try: me, main, side, out = sys.argv[:4] except: print >> sys.stderr, 'us...
false
true
f767ce6baf77baae3bc91e10161c8672890bc9b2
5,086
py
Python
mypython/Lib/site-packages/pandas/tests/indexes/categorical/test_formats.py
lilianatang/data-modelling-with-postgresql
4b5d057d23c346cc36695dc0548f11908aeb5431
[ "Apache-2.0" ]
null
null
null
mypython/Lib/site-packages/pandas/tests/indexes/categorical/test_formats.py
lilianatang/data-modelling-with-postgresql
4b5d057d23c346cc36695dc0548f11908aeb5431
[ "Apache-2.0" ]
null
null
null
mypython/Lib/site-packages/pandas/tests/indexes/categorical/test_formats.py
lilianatang/data-modelling-with-postgresql
4b5d057d23c346cc36695dc0548f11908aeb5431
[ "Apache-2.0" ]
1
2021-04-26T22:41:56.000Z
2021-04-26T22:41:56.000Z
""" Tests for CategoricalIndex.__repr__ and related methods. """ import pandas._config.config as cf from pandas import CategoricalIndex class TestCategoricalIndexRepr: def test_string_categorical_index_repr(self): # short idx = CategoricalIndex(["a", "bb", "ccc"]) expected = "...
46.66055
138
0.43256
import pandas._config.config as cf from pandas import CategoricalIndex class TestCategoricalIndexRepr: def test_string_categorical_index_repr(self): idx = CategoricalIndex(["a", "bb", "ccc"]) expected = """CategoricalIndex(['a', 'bb', 'ccc'], categories=['a', 'bb', 'ccc'], ordered...
true
true
f767cf6350724c438180de78915ad5922911844e
5,123
py
Python
test/mod/test_osbuild.py
PaulWay/osbuild
3731a323084896dd172733ac72f6b8f4ac42c318
[ "Apache-2.0" ]
null
null
null
test/mod/test_osbuild.py
PaulWay/osbuild
3731a323084896dd172733ac72f6b8f4ac42c318
[ "Apache-2.0" ]
null
null
null
test/mod/test_osbuild.py
PaulWay/osbuild
3731a323084896dd172733ac72f6b8f4ac42c318
[ "Apache-2.0" ]
1
2021-06-30T07:56:15.000Z
2021-06-30T07:56:15.000Z
# # Basic tests for a collection of osbuild modules. # import json import os import pathlib import sys import tempfile import unittest import osbuild import osbuild.meta from osbuild.monitor import NullMonitor from osbuild.objectstore import ObjectStore from osbuild.pipeline import Manifest, detect_host_runner from ....
32.839744
79
0.580714
import json import os import pathlib import sys import tempfile import unittest import osbuild import osbuild.meta from osbuild.monitor import NullMonitor from osbuild.objectstore import ObjectStore from osbuild.pipeline import Manifest, detect_host_runner from .. import test class TestDescriptions(unittest.TestCas...
true
true
f767cfcf44df55703e486e88435fbbeca2e3638a
1,450
py
Python
bot.py
palmtrwwpy/Shark-Bot
b3c21681c2a7803b9d2bf112e417dfcf289620bc
[ "MIT" ]
null
null
null
bot.py
palmtrwwpy/Shark-Bot
b3c21681c2a7803b9d2bf112e417dfcf289620bc
[ "MIT" ]
null
null
null
bot.py
palmtrwwpy/Shark-Bot
b3c21681c2a7803b9d2bf112e417dfcf289620bc
[ "MIT" ]
null
null
null
import discord import os import json import sqlite3 import aiohttp from discord.ext import commands COGS = [path.split(os.sep)[-1][:-3] for path in glob("./cogs/*.py")] def load_config(): """ This Is to load the configs for the bot so people can customize it """ with open("creds.json", "r") as cf: ...
29
132
0.613793
import discord import os import json import sqlite3 import aiohttp from discord.ext import commands COGS = [path.split(os.sep)[-1][:-3] for path in glob("./cogs/*.py")] def load_config(): with open("creds.json", "r") as cf: return json.load(cf) creds = load_config() class SharkBot(commands.Bot): de...
true
true
f767d0acc442787f599ee7fa031a52be116f66ae
2,670
py
Python
itests/pages/base.py
aneeq009/merou
7a87b43aaf64244932fa460842132a2d9329e704
[ "Apache-2.0" ]
58
2017-05-26T06:46:24.000Z
2022-03-25T20:55:51.000Z
itests/pages/base.py
aneeq009/merou
7a87b43aaf64244932fa460842132a2d9329e704
[ "Apache-2.0" ]
74
2017-06-16T17:48:37.000Z
2022-03-28T23:09:54.000Z
itests/pages/base.py
aneeq009/merou
7a87b43aaf64244932fa460842132a2d9329e704
[ "Apache-2.0" ]
43
2017-05-20T22:11:51.000Z
2022-03-25T00:24:56.000Z
from __future__ import annotations from typing import TYPE_CHECKING from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.wait import WebDriverWait if TYPE_CHECKING: from selenium.webdriver import Chrome from selenium.webdriver.remote.webelement import WebElement ...
27.8125
79
0.665543
from __future__ import annotations from typing import TYPE_CHECKING from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.wait import WebDriverWait if TYPE_CHECKING: from selenium.webdriver import Chrome from selenium.webdriver.remote.webelement import WebElement ...
true
true
f767d18b333471cef0171c714b4a6548487fd1db
1,008
py
Python
code/tmp_rtrip/ctypes/test/test_libc.py
emilyemorehouse/ast-and-me
3f58117512e125e1ecbe3c72f2f0d26adb80b7b3
[ "MIT" ]
24
2018-01-23T05:28:40.000Z
2021-04-13T20:52:59.000Z
code/tmp_rtrip/ctypes/test/test_libc.py
emilyemorehouse/ast-and-me
3f58117512e125e1ecbe3c72f2f0d26adb80b7b3
[ "MIT" ]
17
2017-12-21T18:32:31.000Z
2018-12-18T17:09:50.000Z
code/tmp_rtrip/ctypes/test/test_libc.py
emilyemorehouse/ast-and-me
3f58117512e125e1ecbe3c72f2f0d26adb80b7b3
[ "MIT" ]
null
null
null
import unittest from ctypes import * import _ctypes_test lib = CDLL(_ctypes_test.__file__) def three_way_cmp(x, y): """Return -1 if x < y, 0 if x == y and 1 if x > y""" return (x > y) - (x < y) class LibTest(unittest.TestCase): def test_sqrt(self): lib.my_sqrt.argtypes = c_double, lib.m...
28.8
78
0.633929
import unittest from ctypes import * import _ctypes_test lib = CDLL(_ctypes_test.__file__) def three_way_cmp(x, y): return (x > y) - (x < y) class LibTest(unittest.TestCase): def test_sqrt(self): lib.my_sqrt.argtypes = c_double, lib.my_sqrt.restype = c_double self.assertEqual(lib.my...
true
true
f767d1951500ba91c2bf1c8c551dc0f31dd6c94d
3,853
py
Python
applications/ShallowWaterApplication/python_scripts/stabilized_shallow_water_solver.py
jsoditt/Kratos
c4a6e0ffb155f5aefa4c564eb1bf4d191aacfb3d
[ "BSD-4-Clause" ]
null
null
null
applications/ShallowWaterApplication/python_scripts/stabilized_shallow_water_solver.py
jsoditt/Kratos
c4a6e0ffb155f5aefa4c564eb1bf4d191aacfb3d
[ "BSD-4-Clause" ]
null
null
null
applications/ShallowWaterApplication/python_scripts/stabilized_shallow_water_solver.py
jsoditt/Kratos
c4a6e0ffb155f5aefa4c564eb1bf4d191aacfb3d
[ "BSD-4-Clause" ]
null
null
null
# importing the Kratos Library import KratosMultiphysics as KM import KratosMultiphysics.ShallowWaterApplication as SW ## Import base class file from KratosMultiphysics.ShallowWaterApplication.shallow_water_base_solver import ShallowWaterBaseSolver def CreateSolver(model, custom_settings): return StabilizedShallo...
47.567901
173
0.734752
import KratosMultiphysics as KM import KratosMultiphysics.ShallowWaterApplication as SW from KratosMultiphysics.ShallowWaterApplication.shallow_water_base_solver import ShallowWaterBaseSolver def CreateSolver(model, custom_settings): return StabilizedShallowWaterSolver(model, custom_settings) class StabilizedSha...
true
true
f767d19613ef9a2ecea2e69c1e0194e515e228de
20,308
py
Python
neuroner/dataset.py
matt-thomas/NeuroNER
976274cd678c7c16babbc8fd697d69577c3cf7bf
[ "MIT" ]
1,707
2017-03-07T09:53:21.000Z
2022-03-29T20:48:54.000Z
neuroner/dataset.py
matt-thomas/NeuroNER
976274cd678c7c16babbc8fd697d69577c3cf7bf
[ "MIT" ]
173
2017-04-22T13:31:29.000Z
2022-02-10T00:08:22.000Z
neuroner/dataset.py
trinh-hoang-hiep/Vietnamese_NeuroNer
a5d5780dcdd0141f0ee0c6b14560786e214148dc
[ "MIT" ]
542
2017-03-07T09:53:42.000Z
2022-03-29T21:24:51.000Z
import sklearn.preprocessing import collections import codecs import os import pickle import random import re import time import token from neuroner import utils from neuroner import utils_nlp class Dataset(object): """A class for handling data sets.""" def __init__(self, name='', verbose=False, debug=Fals...
49.77451
197
0.627388
import sklearn.preprocessing import collections import codecs import os import pickle import random import re import time import token from neuroner import utils from neuroner import utils_nlp class Dataset(object): def __init__(self, name='', verbose=False, debug=False): self.name = name self....
true
true
f767d288f662a9685d90cab8eb188d7b0ae920ce
1,204
py
Python
utils/saver.py
dumpmemory/Transformer-Explainability
1dd5a47caded2613b74058777bf7758597fa92cf
[ "MIT" ]
894
2020-12-17T21:03:31.000Z
2022-03-31T11:58:31.000Z
utils/saver.py
jeonggunlee/Transformer-Explainability
951e112d24c1a642ceefeb0dd03a607040305383
[ "MIT" ]
33
2020-12-18T13:23:57.000Z
2022-03-31T20:51:45.000Z
utils/saver.py
jeonggunlee/Transformer-Explainability
951e112d24c1a642ceefeb0dd03a607040305383
[ "MIT" ]
109
2020-12-19T01:39:28.000Z
2022-03-31T09:52:39.000Z
import os import torch from collections import OrderedDict import glob class Saver(object): def __init__(self, args): self.args = args self.directory = os.path.join('run', args.train_dataset, args.checkname) self.runs = sorted(glob.glob(os.path.join(self.directory, 'experiment_*'))) ...
34.4
95
0.630399
import os import torch from collections import OrderedDict import glob class Saver(object): def __init__(self, args): self.args = args self.directory = os.path.join('run', args.train_dataset, args.checkname) self.runs = sorted(glob.glob(os.path.join(self.directory, 'experiment_*'))) ...
true
true
f767d2b795dce55028b193fcca6b7ade635b9e60
2,249
py
Python
Course4/10-content_stats/contents_stats_simple.py
KaramSahoo/it-cert-automation
f0b808ced0876699a116c9364baf3693d199bc36
[ "Apache-2.0" ]
11
2020-05-11T21:00:34.000Z
2021-10-21T01:15:50.000Z
Course4/10-content_stats/contents_stats_simple.py
KaramSahoo/it-cert-automation
f0b808ced0876699a116c9364baf3693d199bc36
[ "Apache-2.0" ]
1
2020-10-01T10:04:37.000Z
2020-10-01T10:04:37.000Z
Course4/10-content_stats/contents_stats_simple.py
KaramSahoo/it-cert-automation
f0b808ced0876699a116c9364baf3693d199bc36
[ "Apache-2.0" ]
10
2020-04-20T13:43:53.000Z
2021-10-21T01:15:31.000Z
#!/usr/bin/env python3 # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
25.269663
78
0.624722
import heapq import zimply import zimply.zimply from bs4 import BeautifulSoup from tqdm import tqdm from memory_profiler import profile def html_text(content): soup = BeautifulSoup(content, features="html.parser") for script in soup(["script", "style"]): script.extract() text = ...
true
true
f767d2ccc6c26dd9b4dd6295c0a872913a20400a
3,523
py
Python
tests/test_filters.py
kujaku11/mth5
b7681335871f3cd1b652276fd93c08554c7538ff
[ "MIT" ]
5
2021-01-08T23:38:47.000Z
2022-03-31T14:13:47.000Z
tests/test_filters.py
kujaku11/mth5
b7681335871f3cd1b652276fd93c08554c7538ff
[ "MIT" ]
76
2020-09-04T02:35:19.000Z
2022-03-31T22:18:09.000Z
tests/test_filters.py
kujaku11/mth5
b7681335871f3cd1b652276fd93c08554c7538ff
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue May 11 10:35:30 2021 :copyright: Jared Peacock (jpeacock@usgs.gov) :license: MIT """ # ============================================================================= # Imports # ============================================================================= import unittes...
30.903509
85
0.610275
import unittest from pathlib import Path import numpy as np from mth5 import mth5 from mt_metadata.timeseries.filters import PoleZeroFilter, CoefficientFilter fn_path = Path(__file__).parent mth5.helpers.close_open_files() class TestFilters(unittest.TestCase): def setUp(self): self.fn = fn_path.joinpat...
true
true
f767d3779dbb7f700dacdc86a7138fe11cce6a85
3,616
py
Python
tensorflow_compression/python/ops/math_ops_test.py
ghgh3269/compression
3e920bc49fa32d79c1c2917583ffb663c6ebac85
[ "Apache-2.0" ]
46
2019-06-17T21:13:57.000Z
2022-03-29T07:52:11.000Z
tensorflow_compression/python/ops/math_ops_test.py
ghgh3269/compression
3e920bc49fa32d79c1c2917583ffb663c6ebac85
[ "Apache-2.0" ]
11
2019-07-05T09:51:08.000Z
2022-02-06T14:00:03.000Z
tensorflow_compression/python/ops/math_ops_test.py
ghgh3269/compression
3e920bc49fa32d79c1c2917583ffb663c6ebac85
[ "Apache-2.0" ]
14
2019-04-10T01:09:36.000Z
2022-03-30T01:24:57.000Z
# -*- coding: utf-8 -*- # Copyright 2018 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
33.174312
80
0.689712
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import tensorflow_compression as tfc class MathTest(tf.test.TestCase): def _test_upper_bound(self, gradient): inputs = tf.placeholder(dtype=tf.float32) outputs = tfc.upper...
true
true
f767d3e5e04efd4ad18c9991c5a6b885bfdebb2e
3,642
py
Python
change_env_file/change_env_file.py
satyaholla/deepreach
807064649f463b51ffb7502678ecaeaacb7fd787
[ "MIT" ]
null
null
null
change_env_file/change_env_file.py
satyaholla/deepreach
807064649f463b51ffb7502678ecaeaacb7fd787
[ "MIT" ]
null
null
null
change_env_file/change_env_file.py
satyaholla/deepreach
807064649f463b51ffb7502678ecaeaacb7fd787
[ "MIT" ]
null
null
null
DEEPREACH_DIR = '/'.join(__file__.split('/')[:-2]) environment = f'{DEEPREACH_DIR}/environment.yml' not_installed = f'{DEEPREACH_DIR}/change_env_file/packages_not_found.txt' not_in_osx = f'{DEEPREACH_DIR}/change_env_file/not_in_osx.txt' desired_env = f'{DEEPREACH_DIR}/new_environment.yml' def remove_build(s: str) -> ...
35.705882
125
0.628226
DEEPREACH_DIR = '/'.join(__file__.split('/')[:-2]) environment = f'{DEEPREACH_DIR}/environment.yml' not_installed = f'{DEEPREACH_DIR}/change_env_file/packages_not_found.txt' not_in_osx = f'{DEEPREACH_DIR}/change_env_file/not_in_osx.txt' desired_env = f'{DEEPREACH_DIR}/new_environment.yml' def remove_build(s: str) -> ...
true
true
f767d3f84c64ee6dbde6d1ccda0dd309c795f565
492
py
Python
jekyll_relative_url_check/cli.py
klieret/jekyll-relative-url
44848e4c669a59a3b94928f2aa2e018ea4539896
[ "MIT" ]
1
2022-01-15T17:23:49.000Z
2022-01-15T17:23:49.000Z
jekyll_relative_url_check/cli.py
klieret/jekyll-relative-url
44848e4c669a59a3b94928f2aa2e018ea4539896
[ "MIT" ]
4
2021-08-31T12:00:54.000Z
2021-09-01T07:51:01.000Z
jekyll_relative_url_check/cli.py
klieret/jekyll-relative-url
44848e4c669a59a3b94928f2aa2e018ea4539896
[ "MIT" ]
null
null
null
from typing import List from pathlib import Path import sys # ours from jekyll_relative_url_check.html import HTMLRelativeURLHook from jekyll_relative_url_check.markdown import MarkdownRelativeURLHook def html_pre_commit(files: List[str]): ret = HTMLRelativeURLHook().check_files(map(Path, files)) if not ret:...
24.6
70
0.756098
from typing import List from pathlib import Path import sys from jekyll_relative_url_check.html import HTMLRelativeURLHook from jekyll_relative_url_check.markdown import MarkdownRelativeURLHook def html_pre_commit(files: List[str]): ret = HTMLRelativeURLHook().check_files(map(Path, files)) if not ret: ...
true
true
f767d5312898f936aacfe0aa5665ac73603e00b9
1,158
py
Python
tests/step_defs/test_addRemoveElementsPage_steps.py
DanielBel20/BDD-Heroku
a46fa3d7f8c450d626c690abd5af1eedeb0712cd
[ "MIT" ]
null
null
null
tests/step_defs/test_addRemoveElementsPage_steps.py
DanielBel20/BDD-Heroku
a46fa3d7f8c450d626c690abd5af1eedeb0712cd
[ "MIT" ]
null
null
null
tests/step_defs/test_addRemoveElementsPage_steps.py
DanielBel20/BDD-Heroku
a46fa3d7f8c450d626c690abd5af1eedeb0712cd
[ "MIT" ]
null
null
null
from pytest_bdd import scenarios, when, then, given, parsers from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By # Constants ADDREMOVEELEMENTSPAGE = 'https://the-internet.herokuapp.com/add_remove_elements/' TITLE = (By.CSS_SELECTOR, "div h3") ADD_ELEMENT_BUTTON = (By.CSS_SELEC...
34.058824
94
0.780656
from pytest_bdd import scenarios, when, then, given, parsers from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By ADDREMOVEELEMENTSPAGE = 'https://the-internet.herokuapp.com/add_remove_elements/' TITLE = (By.CSS_SELECTOR, "div h3") ADD_ELEMENT_BUTTON = (By.CSS_SELECTOR, 'button...
true
true
f767d5332f355479a0656200357eba773a7d3227
2,553
py
Python
tests/test_engine/test_projection/test_projection_slice.py
gitter-badger/MontyDB
849d03dc2cfed35739481e9acb1ff0bd8095c91b
[ "BSD-3-Clause" ]
null
null
null
tests/test_engine/test_projection/test_projection_slice.py
gitter-badger/MontyDB
849d03dc2cfed35739481e9acb1ff0bd8095c91b
[ "BSD-3-Clause" ]
null
null
null
tests/test_engine/test_projection/test_projection_slice.py
gitter-badger/MontyDB
849d03dc2cfed35739481e9acb1ff0bd8095c91b
[ "BSD-3-Clause" ]
null
null
null
def test_projection_slice_1(monty_proj, mongo_proj): docs = [ {"a": [{"b": 1}, {"b": 3}, {"b": 0}, {"b": 8}]} ] spec = {"a.b": {"$gt": 2}} proj = {"a.b": {"$slice": 2}} monty_c = monty_proj(docs, spec, proj) mongo_c = mongo_proj(docs, spec, proj) assert mongo_c.count() == 1 a...
24.786408
55
0.527223
def test_projection_slice_1(monty_proj, mongo_proj): docs = [ {"a": [{"b": 1}, {"b": 3}, {"b": 0}, {"b": 8}]} ] spec = {"a.b": {"$gt": 2}} proj = {"a.b": {"$slice": 2}} monty_c = monty_proj(docs, spec, proj) mongo_c = mongo_proj(docs, spec, proj) assert mongo_c.count() == 1 a...
true
true
f767d54b9c9a6ac9b2b1fd0e68d8bbab445a3d84
9,395
py
Python
libvirt/pileus-libvirt-1.2.12/src/hyperv/hyperv_wmi_generator.py
SIIS-cloud/pileus
de7546845cf03862cdd2b9884fefb2033d8b11ab
[ "Apache-2.0" ]
3
2017-09-22T15:10:01.000Z
2018-03-30T02:11:54.000Z
libvirt/pileus-libvirt-1.2.12/src/hyperv/hyperv_wmi_generator.py
SIIS-cloud/Pileus
de7546845cf03862cdd2b9884fefb2033d8b11ab
[ "Apache-2.0" ]
null
null
null
libvirt/pileus-libvirt-1.2.12/src/hyperv/hyperv_wmi_generator.py
SIIS-cloud/Pileus
de7546845cf03862cdd2b9884fefb2033d8b11ab
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # hyperv_wmi_generator.py: generates most of the WMI type mapping code # # Copyright (C) 2011 Matthias Bolte <matthias.bolte@googlemail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by t...
30.112179
114
0.557637
import sys import os import os.path separator = "/* " + ("* " * 37) + "*\n" class Class: def __init__(self, name, properties): self.name = name self.properties = properties def generate_header(self): name_upper = self.name.upper() header = separator header += "...
false
true
f767d596705fcf59efd8ef8b5ad5afcf4ba60436
985
py
Python
tests/integration/cloud/clouds/test_gogrid.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
5
2017-02-07T05:39:29.000Z
2020-06-13T02:07:33.000Z
tests/integration/cloud/clouds/test_gogrid.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
86
2017-01-27T11:54:46.000Z
2020-05-20T06:25:26.000Z
tests/integration/cloud/clouds/test_gogrid.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
11
2017-01-26T19:36:29.000Z
2021-12-11T07:54:16.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: Nicole Thomas <nicole@saltstack.com> ''' # Import Python Libs from __future__ import absolute_import, print_function, unicode_literals # Import Salt Testing Libs from tests.support.unit import skipIf # Create the cloud instance name to be used throughout the tests from te...
29.848485
98
0.71066
from __future__ import absolute_import, print_function, unicode_literals from tests.support.unit import skipIf from tests.integration.cloud.helpers.cloud_test_base import CloudTest, TIMEOUT @skipIf(True, 'waiting on bug report fixes from #13365') class GoGridTest(CloudTest): PROVIDER = 'gogrid' REQUIRED_PR...
true
true
f767d5e7b00c1a5a981b69a0f51b28eab3ca1317
395
py
Python
core/wsgi.py
StarsHu/DjChannelsDemo
38275c15e3a911db2ca925b3b2b0503106b4d245
[ "MIT" ]
null
null
null
core/wsgi.py
StarsHu/DjChannelsDemo
38275c15e3a911db2ca925b3b2b0503106b4d245
[ "MIT" ]
null
null
null
core/wsgi.py
StarsHu/DjChannelsDemo
38275c15e3a911db2ca925b3b2b0503106b4d245
[ "MIT" ]
null
null
null
""" WSGI config for DjChannelsDemo project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANG...
23.235294
78
0.787342
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') application = get_wsgi_application()
true
true
f767d66edd5187591f1faadb51004424b5441c10
3,272
py
Python
code/models/ere.py
btaille/sincere
dd1c34916ddcdc5ceb2799d64b17e80cdf1a5b31
[ "Apache-2.0" ]
12
2020-10-22T13:04:36.000Z
2021-12-30T10:34:28.000Z
code/models/ere.py
btaille/sincere
dd1c34916ddcdc5ceb2799d64b17e80cdf1a5b31
[ "Apache-2.0" ]
null
null
null
code/models/ere.py
btaille/sincere
dd1c34916ddcdc5ceb2799d64b17e80cdf1a5b31
[ "Apache-2.0" ]
2
2020-11-27T12:23:22.000Z
2021-11-16T09:17:06.000Z
import torch from models.model import EmbedderEncoderDecoder from modules.decoders.joint import JointDecoder from modules.decoders.ner import IobesNERDecoder, SpanNERDecoder from modules.decoders.re import REDecoder from modules.embedders.embedder import Embedder, StackedEmbedder from modules.encoders.encoders import ...
39.902439
118
0.621027
import torch from models.model import EmbedderEncoderDecoder from modules.decoders.joint import JointDecoder from modules.decoders.ner import IobesNERDecoder, SpanNERDecoder from modules.decoders.re import REDecoder from modules.embedders.embedder import Embedder, StackedEmbedder from modules.encoders.encoders import ...
true
true