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
1c130cdecc4714d6dc1b792b5b189d3f8dc5ab38
212
py
Python
Python/13 - 050 - soma dos pares.py
matheusguerreiro/python
f39a1b92409f11cbe7fef5d9261f863f9e0fac0d
[ "MIT" ]
null
null
null
Python/13 - 050 - soma dos pares.py
matheusguerreiro/python
f39a1b92409f11cbe7fef5d9261f863f9e0fac0d
[ "MIT" ]
null
null
null
Python/13 - 050 - soma dos pares.py
matheusguerreiro/python
f39a1b92409f11cbe7fef5d9261f863f9e0fac0d
[ "MIT" ]
null
null
null
# Aula 13 (Estrutura de Repetição for) somaP = 0 for c in range(0, 6): numero = int(input('Digite um Número: ')) if numero % 2 == 0: somaP += numero print('A Soma dos Pares é: {}'.format(somaP))
23.555556
45
0.599057
somaP = 0 for c in range(0, 6): numero = int(input('Digite um Número: ')) if numero % 2 == 0: somaP += numero print('A Soma dos Pares é: {}'.format(somaP))
true
true
1c130e5267337ec3d75ac3556b1afd410e60ee25
2,494
py
Python
podracer/robot-socket.py
badescuga/NodeJsDemo
49aaac5a82edd318e5f5050188ccc243e505986d
[ "MIT" ]
null
null
null
podracer/robot-socket.py
badescuga/NodeJsDemo
49aaac5a82edd318e5f5050188ccc243e505986d
[ "MIT" ]
null
null
null
podracer/robot-socket.py
badescuga/NodeJsDemo
49aaac5a82edd318e5f5050188ccc243e505986d
[ "MIT" ]
null
null
null
#https://pypi.python.org/pypi/socketIO-client #if script called without args, it goes to production #if it's called with 'dev' arg, it defaults to localhost # Import servo logic from sebulba.py from sebulba import * import logging import sys import requests import time from threading import Thread import requests imp...
26.817204
101
0.678829
# Import servo logic from sebulba.py from sebulba import * import logging import sys import requests import time from threading import Thread import requests import base64 reload(sys) sys.setdefaultencoding('cp437') #logging.getLogger('requests').setLevel(logging.WARNING) #logging.basicConfig(level=logging.DEBUG) ...
false
true
1c130e5bae289f4fdc0093615e3881bd30579165
23,551
py
Python
probing/models/contextual_embedding_classifier.py
dorinapetra/probing
41a31f343b6cb8122bc19cba7651f967f48de021
[ "MIT" ]
2
2021-04-14T21:15:58.000Z
2021-06-09T14:16:30.000Z
probing/models/contextual_embedding_classifier.py
dorinapetra/probing
41a31f343b6cb8122bc19cba7651f967f48de021
[ "MIT" ]
null
null
null
probing/models/contextual_embedding_classifier.py
dorinapetra/probing
41a31f343b6cb8122bc19cba7651f967f48de021
[ "MIT" ]
1
2021-09-25T09:39:14.000Z
2021-09-25T09:39:14.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2019 Judit Acs <judit@sch.bme.hu> # # Distributed under terms of the MIT license. import torch import torch.nn as nn import numpy as np import logging from transformers import AutoModel, AutoConfig from probing.models.base import BaseModel...
40.396226
79
0.584646
import torch import torch.nn as nn import numpy as np import logging from transformers import AutoModel, AutoConfig from probing.models.base import BaseModel from probing.models.mlp import MLP use_cuda = torch.cuda.is_available() def to_cuda(var): if use_cuda: return var.cuda() return var class Em...
true
true
1c130e7eff54d4993cc2f3ef16e862dc0dc4b695
1,232
py
Python
scripts/latency_with_crash.py
asonnino/fastpay
d5e07a7ff1bd25174071f454872927bf58865fff
[ "Apache-2.0", "CC-BY-4.0" ]
41
2020-06-29T06:52:43.000Z
2022-02-20T12:44:39.000Z
scripts/latency_with_crash.py
asonnino/fastpay
d5e07a7ff1bd25174071f454872927bf58865fff
[ "Apache-2.0", "CC-BY-4.0" ]
10
2021-05-21T20:41:00.000Z
2021-12-17T10:17:48.000Z
scripts/latency_with_crash.py
asonnino/fastpay
d5e07a7ff1bd25174071f454872927bf58865fff
[ "Apache-2.0", "CC-BY-4.0" ]
9
2020-08-26T20:55:50.000Z
2022-01-26T08:09:07.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # SPDX-License-Identifier: Apache-2.0 import numpy as np import re import sys import os.path import os, fnmatch def parse(row_log_file, parsed_log_file): fname = os.path.abspath(row_log_file) data = open(fname).read() latency = ''.join(re.findall(r'Received cert...
27.377778
85
0.6875
import numpy as np import re import sys import os.path import os, fnmatch def parse(row_log_file, parsed_log_file): fname = os.path.abspath(row_log_file) data = open(fname).read() latency = ''.join(re.findall(r'Received certificate after [0-9]* us', data)) latency = re.findall(r'\d+',latency) latency = [int(v)...
true
true
1c1310975807d2b4dd1cd7a4df91d52ca2a10334
1,385
py
Python
OpenCV/Histogramas/h3.py
matewszz/Python
18b7fc96d3ed294d2002ed484941a0ee8cf18108
[ "MIT" ]
null
null
null
OpenCV/Histogramas/h3.py
matewszz/Python
18b7fc96d3ed294d2002ed484941a0ee8cf18108
[ "MIT" ]
null
null
null
OpenCV/Histogramas/h3.py
matewszz/Python
18b7fc96d3ed294d2002ed484941a0ee8cf18108
[ "MIT" ]
null
null
null
import cv2 as cv import numpy as np img = cv.imread(cv.samples.findFile("everest.jpg")) bgr_planes = cv.split(img) histSize = 256 histRange = (0, 256) accumulate = False b_hist = cv.calcHist(bgr_planes, [0], None, [histSize], histRange, accumulate=accumulate) g_hist = cv.calcHist(bgr_planes, [1], None, [histSize], his...
40.735294
89
0.684477
import cv2 as cv import numpy as np img = cv.imread(cv.samples.findFile("everest.jpg")) bgr_planes = cv.split(img) histSize = 256 histRange = (0, 256) accumulate = False b_hist = cv.calcHist(bgr_planes, [0], None, [histSize], histRange, accumulate=accumulate) g_hist = cv.calcHist(bgr_planes, [1], None, [histSize], his...
true
true
1c1311ae1ab59e4d96f7254bcd6f71ecb38a462f
682
py
Python
app/core/migrations/0002_tag.py
igndukwe/recipe-app-api
8b0554e7d15fdab8c0aa99e7b3dcb56187998ceb
[ "MIT" ]
null
null
null
app/core/migrations/0002_tag.py
igndukwe/recipe-app-api
8b0554e7d15fdab8c0aa99e7b3dcb56187998ceb
[ "MIT" ]
null
null
null
app/core/migrations/0002_tag.py
igndukwe/recipe-app-api
8b0554e7d15fdab8c0aa99e7b3dcb56187998ceb
[ "MIT" ]
null
null
null
# Generated by Django 3.0.8 on 2020-08-04 15:36 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.CreateModel( ...
28.416667
118
0.615836
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.CreateModel( name='Tag', fields=[ ...
true
true
1c131201b9f63ac1f91e88ad3998a2c8a53ed990
2,690
py
Python
creacion_de_aplicaciones/fastapi_rest_api/routers/iris_router.py
soytupadrrre/Master_Python_Eip
c4774209d7dd15584233fe5d4cc01b1434c9316b
[ "MIT" ]
null
null
null
creacion_de_aplicaciones/fastapi_rest_api/routers/iris_router.py
soytupadrrre/Master_Python_Eip
c4774209d7dd15584233fe5d4cc01b1434c9316b
[ "MIT" ]
null
null
null
creacion_de_aplicaciones/fastapi_rest_api/routers/iris_router.py
soytupadrrre/Master_Python_Eip
c4774209d7dd15584233fe5d4cc01b1434c9316b
[ "MIT" ]
null
null
null
from fastapi import APIRouter from controllers.rest_iris import RestIris from models.iris import Iris, IrisDelete # Creación del objeto RestIris rest_iris = RestIris("data/iris.csv") # Creación de Router para la aplicación iris (mayor escalabilidad) iris_router = APIRouter() # Metodo GET para la página principal de ...
29.56044
76
0.705576
from fastapi import APIRouter from controllers.rest_iris import RestIris from models.iris import Iris, IrisDelete rest_iris = RestIris("data/iris.csv") iris_router = APIRouter() @iris_router.get("", status_code=200) async def get_iris_data(): payload = rest_iris.get_data() return payload @iris_router.get("/...
true
true
1c131301c1f03993d74cd2c30162abc90d65581e
204
py
Python
mish_cuda/__init__.py
swenkel/mish-cuda-dummy
4b621fb90ff75e77adc185ddba74687f5dcd4794
[ "BSD-3-Clause" ]
null
null
null
mish_cuda/__init__.py
swenkel/mish-cuda-dummy
4b621fb90ff75e77adc185ddba74687f5dcd4794
[ "BSD-3-Clause" ]
null
null
null
mish_cuda/__init__.py
swenkel/mish-cuda-dummy
4b621fb90ff75e77adc185ddba74687f5dcd4794
[ "BSD-3-Clause" ]
2
2022-03-09T23:37:34.000Z
2022-03-09T23:44:17.000Z
import torch import torch.nn.functional as F class MishCuda(torch.nn.Module): def __init__(self): super().__init__() def foward(self,x): return x * torch.tanh(F.softplus(x))
20.4
44
0.642157
import torch import torch.nn.functional as F class MishCuda(torch.nn.Module): def __init__(self): super().__init__() def foward(self,x): return x * torch.tanh(F.softplus(x))
true
true
1c1313a06b86cef1b15e47165e73a6ca8ce064d0
19
py
Python
openproblems/tasks/spatial_decomposition/metrics/__init__.py
giovp/SingleCellOpenProblems
8b4243a71f9e4553558b019a08eb46090cd8445e
[ "MIT" ]
1
2021-03-29T18:43:20.000Z
2021-03-29T18:43:20.000Z
openproblems/tasks/spatial_decomposition/metrics/__init__.py
giovp/SingleCellOpenProblems
8b4243a71f9e4553558b019a08eb46090cd8445e
[ "MIT" ]
5
2021-03-30T11:22:32.000Z
2021-03-31T16:09:42.000Z
openproblems/tasks/spatial_decomposition/metrics/__init__.py
giovp/SingleCellOpenProblems
8b4243a71f9e4553558b019a08eb46090cd8445e
[ "MIT" ]
1
2021-03-29T19:05:51.000Z
2021-03-29T19:05:51.000Z
from .R2 import R2
9.5
18
0.736842
from .R2 import R2
true
true
1c1313d1ee8fb47b58032824204ab15999449e43
8,683
py
Python
wavefront_api_client/models/search_query.py
httpsgithu/python-client
f85a530367cdabe458a11919ad35609b9bc0606b
[ "Apache-2.0" ]
null
null
null
wavefront_api_client/models/search_query.py
httpsgithu/python-client
f85a530367cdabe458a11919ad35609b9bc0606b
[ "Apache-2.0" ]
null
null
null
wavefront_api_client/models/search_query.py
httpsgithu/python-client
f85a530367cdabe458a11919ad35609b9bc0606b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Wavefront REST API Documentation <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the W...
35.296748
450
0.613382
import pprint import re import six from wavefront_api_client.configuration import Configuration class SearchQuery(object): swagger_types = { 'key': 'str', 'matching_method': 'str', 'negated': 'bool', 'value': 'str', 'values': 'list[str]' } attribute_map = { ...
true
true
1c13142cda647f94f66e6e8f5192ad36ed5c45fb
683
py
Python
week9a/package-test.py
dprzybyla/python-ansible
a4f241a01d4d33de3ef80b24e065efff5ebd9242
[ "Apache-2.0" ]
1
2021-07-28T19:11:10.000Z
2021-07-28T19:11:10.000Z
week9a/package-test.py
dprzybyla/python-ansible
a4f241a01d4d33de3ef80b24e065efff5ebd9242
[ "Apache-2.0" ]
null
null
null
week9a/package-test.py
dprzybyla/python-ansible
a4f241a01d4d33de3ef80b24e065efff5ebd9242
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ''' Write a Python script in a different directory (not the one containing mytest). a. Verify that you can import mytest and call the three functions func1(), func2(), and func3(). b. Create an object that uses MyClass. Verify that you call the hello() and not_hello() methods. ''' from myte...
22.766667
79
0.639824
''' Write a Python script in a different directory (not the one containing mytest). a. Verify that you can import mytest and call the three functions func1(), func2(), and func3(). b. Create an object that uses MyClass. Verify that you call the hello() and not_hello() methods. ''' from mytest import func1, func2...
false
true
1c1315e67542fce366a7d416c0089f6a1a97610f
21,576
py
Python
fixrepository/repository.py
GaryHughes/fixorchestra
bbc020614d1545a17fde648ebdfa4bc35f2bf1bf
[ "MIT" ]
3
2020-10-12T06:44:08.000Z
2021-11-08T13:07:16.000Z
fixrepository/repository.py
GaryHughes/fixorchestra
bbc020614d1545a17fde648ebdfa4bc35f2bf1bf
[ "MIT" ]
1
2020-08-15T06:39:16.000Z
2020-08-15T23:48:24.000Z
fixrepository/repository.py
GaryHughes/fixorchestra
bbc020614d1545a17fde648ebdfa4bc35f2bf1bf
[ "MIT" ]
2
2020-10-13T13:29:02.000Z
2021-05-16T08:54:24.000Z
#!/usr/bin/env python3 import argparse import xml.etree.ElementTree as ET import os import sys class Pedigree: def __init__(self, added, addedEP, updated, updatedEP, deprecated, deprecatedEP): self.added = added self.addedEP = addedEP self.updated = updated self.updatedEP = updat...
40.863636
242
0.607944
import argparse import xml.etree.ElementTree as ET import os import sys class Pedigree: def __init__(self, added, addedEP, updated, updatedEP, deprecated, deprecatedEP): self.added = added self.addedEP = addedEP self.updated = updated self.updatedEP = updatedEP self.depre...
true
true
1c1315f382c6621c213fdbe72097e4a3038387fd
2,752
py
Python
get-image-location.py
deromka/exif-date
251d828eec8c952d2fda4b2177af9463b16f0d1a
[ "Apache-2.0" ]
null
null
null
get-image-location.py
deromka/exif-date
251d828eec8c952d2fda4b2177af9463b16f0d1a
[ "Apache-2.0" ]
null
null
null
get-image-location.py
deromka/exif-date
251d828eec8c952d2fda4b2177af9463b16f0d1a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import logging import exifread import os import shutil import hashlib import sys import time import datetime import ntpath import glob from geopy import Point from geopy.geocoders import Bing #logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.WARNING) # create logger logger...
28.081633
120
0.681323
import logging import exifread import os import shutil import hashlib import sys import time import datetime import ntpath import glob from geopy import Point from geopy.geocoders import Bing logger = logging.getLogger('getcity') logger.setLevel(logging.INFO) logFormatter = logging.Formatter("%(asctime)s [%(levelna...
true
true
1c131617a63c0ba521aec499adf7ecc1025afc6e
445
py
Python
main/migrations/0021_permission.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
84
2017-10-22T11:01:39.000Z
2022-02-27T03:43:48.000Z
main/migrations/0021_permission.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
22
2017-12-11T07:21:56.000Z
2021-09-23T02:53:50.000Z
main/migrations/0021_permission.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
23
2017-12-06T06:59:52.000Z
2022-02-24T00:02:25.000Z
# ---------------------------------------------------------------------- # permission # ---------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------- # NOC modules from ...
31.785714
72
0.379775
from noc.core.migration.base import BaseMigration class Migration(BaseMigration): depends_on = [("aaa", "0003_permission")]
true
true
1c13165b28c233189d8d5a4a34787c1118f02476
15,486
py
Python
nls/websocket/_app.py
aliyun/alibabacloud-nls-python-sdk
27622b18173ce0070604d01fbc02dc7d6ca279f3
[ "Apache-2.0" ]
15
2019-05-28T06:25:49.000Z
2022-03-01T07:23:57.000Z
nls/websocket/_app.py
aliyun/alibabacloud-nls-python-sdk
27622b18173ce0070604d01fbc02dc7d6ca279f3
[ "Apache-2.0" ]
2
2020-11-11T09:30:03.000Z
2021-11-29T03:49:27.000Z
nls/websocket/_app.py
aliyun/alibabacloud-nls-python-sdk
27622b18173ce0070604d01fbc02dc7d6ca279f3
[ "Apache-2.0" ]
6
2019-05-28T08:32:13.000Z
2021-08-11T03:34:13.000Z
""" """ """ _app.py websocket - WebSocket client library for Python Copyright 2021 engn33r Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless ...
36.523585
100
0.584528
import selectors import sys import threading import time import traceback from ._abnf import ABNF from ._core import WebSocket, getdefaulttimeout from ._exceptions import * from . import _logging __all__ = ["WebSocketApp"] class Dispatcher: def __init__(self, app, ping_timeout): self.app = app ...
true
true
1c13175dc23a5c6fe7951611796a64090bce2841
3,497
py
Python
ucsmsdk/mometa/adaptor/AdaptorHostIscsiIfProfile.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/adaptor/AdaptorHostIscsiIfProfile.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/adaptor/AdaptorHostIscsiIfProfile.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for AdaptorHostIscsiIfProfile ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class AdaptorHostIscsiIfProfileConsts: INT_ID_NONE = "none" POLICY_OWNER_LOCAL = "local" ...
57.327869
292
0.647126
from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class AdaptorHostIscsiIfProfileConsts: INT_ID_NONE = "none" POLICY_OWNER_LOCAL = "local" POLICY_OWNER_PENDING_POLICY = "pending-policy" POLICY_OWNER_POLICY = "policy" class Adapto...
true
true
1c1317ad714d96a7e39c4d925071348d55f9d723
6,708
py
Python
bindings/python/ensmallen_graph/datasets/string/alkalilimnicolaehrlichii.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/alkalilimnicolaehrlichii.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/alkalilimnicolaehrlichii.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Alkalilimnicola ehrlichii. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 2...
35.492063
223
0.704681
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen_graph import EnsmallenGraph def AlkalilimnicolaEhrlichii( directed: bool = False, verbose: int = 2, cache_path: str = "graphs/string", **additional_graph_kwargs: Dict ) -> EnsmallenGraph: ...
true
true
1c1318f316b8d7b665aa055658c38b148f024764
10,819
py
Python
app/scripts/gen.py
develersrl/lilt
929a1053c78f3a366e560407c8ee77934cc32c9a
[ "BSD-3-Clause" ]
2
2017-02-14T17:47:07.000Z
2017-02-22T18:13:19.000Z
app/scripts/gen.py
develersrl/lilt
929a1053c78f3a366e560407c8ee77934cc32c9a
[ "BSD-3-Clause" ]
null
null
null
app/scripts/gen.py
develersrl/lilt
929a1053c78f3a366e560407c8ee77934cc32c9a
[ "BSD-3-Clause" ]
1
2019-11-07T16:07:42.000Z
2019-11-07T16:07:42.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import json import shutil from jinja2 import Environment, FileSystemLoader import common from editor_data_importer import * # jinja2 environment j2_env = Environment(loader=FileSystemLoader(common.templates_dir)) pages_array = [] def __get_page_co...
33.085627
79
0.656992
import sys import os import json import shutil from jinja2 import Environment, FileSystemLoader import common from editor_data_importer import * j2_env = Environment(loader=FileSystemLoader(common.templates_dir)) pages_array = [] def __get_page_component_filename_from_page_data(page_data): """Return a generat...
false
true
1c1319c4582d0c204d4474ee2be7f71d27c879c1
21,064
py
Python
coddeC/data_analyze.py
nocdoggo/Random-Data-Visualization
6b67419e50411c65d1e70ce2c6d0b7c1cf8a13d4
[ "MIT" ]
null
null
null
coddeC/data_analyze.py
nocdoggo/Random-Data-Visualization
6b67419e50411c65d1e70ce2c6d0b7c1cf8a13d4
[ "MIT" ]
null
null
null
coddeC/data_analyze.py
nocdoggo/Random-Data-Visualization
6b67419e50411c65d1e70ce2c6d0b7c1cf8a13d4
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # ___ # # <a href='http://www.pieriandata.com'> <img src='../Pierian_Data_Logo.png' /></a> # ___ # # Logistic Regression with Python # # For this lecture we will be working with the [Titanic Data Set from Kaggle](https://www.kaggle.com/c/titanic). This is a very famous data set an...
37.953153
270
0.616312
# # We'll be trying to predict a classification- survival or deceased. # # We'll use a "semi-cleaned" version of the titanic data set, if you use the data set hosted directly on Kaggle, you may need to do some additional cleaning not shown in this lecture notebook. # In[1]: import pandas as pd import numpy as np im...
true
true
1c131a4503739b1911e398565348c5ba6cd43808
8,792
py
Python
old_files/pdf_parameters.py
ZhouHUB/xpd_workflow
be3d5dee1f8021b45f7e810c96a3dfefa8942bb5
[ "BSD-3-Clause" ]
null
null
null
old_files/pdf_parameters.py
ZhouHUB/xpd_workflow
be3d5dee1f8021b45f7e810c96a3dfefa8942bb5
[ "BSD-3-Clause" ]
4
2016-08-25T02:59:05.000Z
2016-09-28T22:32:34.000Z
old_files/pdf_parameters.py
ZhouHUB/xpd_workflow
be3d5dee1f8021b45f7e810c96a3dfefa8942bb5
[ "BSD-3-Clause" ]
null
null
null
""" Copyright (c) 2014 Brookhaven National Laboratory All rights reserved. Use is subject to license terms and conditions. @author: Christopher J. Wright""" __author__ = 'Christopher J. Wright' import IO import Calculate import numpy as np import scipy.signal as signal import os import matplotlib.pyplot as plt plt.i...
35.309237
91
0.599295
""" Copyright (c) 2014 Brookhaven National Laboratory All rights reserved. Use is subject to license terms and conditions. @author: Christopher J. Wright""" __author__ = 'Christopher J. Wright' import IO import Calculate import numpy as np import scipy.signal as signal import os import matplotlib.pyplot as plt plt.i...
false
true
1c131ca2086f6132ef86703375eedb584af63568
1,007
py
Python
plugins/feeds/public/blocklistde_strongips.py
0xRet/yeti
5cda0880aae462c5ed6aff4d1037f1034fd5b1d3
[ "Apache-2.0" ]
null
null
null
plugins/feeds/public/blocklistde_strongips.py
0xRet/yeti
5cda0880aae462c5ed6aff4d1037f1034fd5b1d3
[ "Apache-2.0" ]
null
null
null
plugins/feeds/public/blocklistde_strongips.py
0xRet/yeti
5cda0880aae462c5ed6aff4d1037f1034fd5b1d3
[ "Apache-2.0" ]
null
null
null
import logging from datetime import timedelta, datetime from core.errors import ObservableValidationError from core.feed import Feed from core.observables import Ip class BlocklistdeStrongIPs(Feed): default_values = { "frequency": timedelta(hours=1), "name": "BlocklistdeStrongIPs", "sourc...
29.617647
96
0.634558
import logging from datetime import timedelta, datetime from core.errors import ObservableValidationError from core.feed import Feed from core.observables import Ip class BlocklistdeStrongIPs(Feed): default_values = { "frequency": timedelta(hours=1), "name": "BlocklistdeStrongIPs", "sourc...
true
true
1c131d4b0b1fba9637a1dbb5b3dc122c6cda4f46
11,872
py
Python
src/oci/database_management/models/child_database.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/database_management/models/child_database.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/database_management/models/child_database.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
35.228487
245
0.660293
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class ChildDatabase(object): DEPLOYMENT_TYPE_ONPREMISE = "ONPREMISE" DEPLOYMENT_TYPE_BM = "BM" DE...
true
true
1c131e908152809ea2cdc0eaf0c6b4afbcf4d14f
4,797
py
Python
termplot/backend/matplotlib_plot.py
soraxas/tensorboard-termplot
e5c9632c5935d0cef438339bdef6845b91929ee9
[ "MIT" ]
3
2021-07-21T15:34:14.000Z
2021-09-06T15:36:38.000Z
termplot/backend/matplotlib_plot.py
soraxas/tensorboard-termplot
e5c9632c5935d0cef438339bdef6845b91929ee9
[ "MIT" ]
null
null
null
termplot/backend/matplotlib_plot.py
soraxas/tensorboard-termplot
e5c9632c5935d0cef438339bdef6845b91929ee9
[ "MIT" ]
null
null
null
import io import os import sys from functools import lru_cache from shutil import which from subprocess import Popen, PIPE, STDOUT import matplotlib.colors as mcolors import matplotlib.pyplot as plt from .base_plotter import Plotter class MatplotlibPlot(Plotter): @property def unsupported_options(self): ...
29.072727
85
0.609965
import io import os import sys from functools import lru_cache from shutil import which from subprocess import Popen, PIPE, STDOUT import matplotlib.colors as mcolors import matplotlib.pyplot as plt from .base_plotter import Plotter class MatplotlibPlot(Plotter): @property def unsupported_options(self): ...
true
true
1c131fceed75ecf6185f2d89632d6666e76046b7
9,093
py
Python
wbb/modules/misc.py
roseempire/WilliamButcherBot
17579d99cb2b480b9e34038ba3ae546511cb6ae0
[ "MIT" ]
null
null
null
wbb/modules/misc.py
roseempire/WilliamButcherBot
17579d99cb2b480b9e34038ba3ae546511cb6ae0
[ "MIT" ]
null
null
null
wbb/modules/misc.py
roseempire/WilliamButcherBot
17579d99cb2b480b9e34038ba3ae546511cb6ae0
[ "MIT" ]
null
null
null
""" MIT License Copyright (c) 2021 TheHamkerCat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
33.307692
99
0.658089
import secrets import string import aiohttp from cryptography.fernet import Fernet from pyrogram import filters from wbb import FERNET_ENCRYPTION_KEY, app, arq from wbb.core.decorators.errors import capture_err from wbb.utils import random_line from wbb.utils.http import get from wbb.utils.json_prettify import json_p...
true
true
1c131fde8cf50395dd1d05595d29f368c4017204
4,729
py
Python
predict.py
verages/YOLOv4_light
b8f707a7ab5c2f3b2fd58d34e287e6b28a625641
[ "MIT" ]
null
null
null
predict.py
verages/YOLOv4_light
b8f707a7ab5c2f3b2fd58d34e287e6b28a625641
[ "MIT" ]
1
2022-02-10T00:11:51.000Z
2022-02-10T00:11:51.000Z
predict.py
verages/YOLOv4_light
b8f707a7ab5c2f3b2fd58d34e287e6b28a625641
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Brief: import config.config as cfg import numpy as np import colorsys import os from PIL import Image, ImageFont, ImageDraw from timeit import default_timer as timer from nets.yolo import yolo_body from core.transform import parse_yolo_output class Yolov4Predict: def __init__(self,...
30.908497
116
0.572003
import config.config as cfg import numpy as np import colorsys import os from PIL import Image, ImageFont, ImageDraw from timeit import default_timer as timer from nets.yolo import yolo_body from core.transform import parse_yolo_output class Yolov4Predict: def __init__(self, model_path): self.class_n...
true
true
1c1321acbf1aa46d23b60990a4f58b7a2b011e0e
2,956
py
Python
tests/pending/test_layers_importer.py
Windaway/tensorlayer
7afd8f0a39a4f1864a82e508f7a326fc998dc033
[ "Apache-2.0" ]
1
2019-03-26T13:16:11.000Z
2019-03-26T13:16:11.000Z
tests/pending/test_layers_importer.py
Mesica/tensorlayer
c5def14c4d66d150863f975d9001a5e1891d003f
[ "Apache-2.0" ]
null
null
null
tests/pending/test_layers_importer.py
Mesica/tensorlayer
c5def14c4d66d150863f975d9001a5e1891d003f
[ "Apache-2.0" ]
1
2021-04-13T06:34:48.000Z
2021-04-13T06:34:48.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import unittest os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorflow as tf from tensorflow.contrib.slim.python.slim.nets.inception_v3 import inception_v3 from tensorflow.contrib.slim.python.slim.nets.inception_v3 import inception_v3_arg_scope slim = tf....
32.483516
97
0.529093
import os import unittest os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorflow as tf from tensorflow.contrib.slim.python.slim.nets.inception_v3 import inception_v3 from tensorflow.contrib.slim.python.slim.nets.inception_v3 import inception_v3_arg_scope slim = tf.contrib.slim keras = tf.keras import tensorla...
true
true
1c13221b3dadfe03380091ffb86c237d59ce3fe7
1,210
py
Python
gw_crawler/malicious_file_crawler/src/utils/minio_client.py
baker371/k8-test-data
998becbcf924bd1acd4f2fa99af0bbe90b18de51
[ "Apache-2.0" ]
null
null
null
gw_crawler/malicious_file_crawler/src/utils/minio_client.py
baker371/k8-test-data
998becbcf924bd1acd4f2fa99af0bbe90b18de51
[ "Apache-2.0" ]
null
null
null
gw_crawler/malicious_file_crawler/src/utils/minio_client.py
baker371/k8-test-data
998becbcf924bd1acd4f2fa99af0bbe90b18de51
[ "Apache-2.0" ]
null
null
null
import json as j import logging import os import sys import requests sys.path.append(os.path.dirname( os.path.dirname( os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) )) ) logger = logging.getLogger("GW:minio") class MinioClient: """ It calls storage ada...
29.512195
92
0.639669
import json as j import logging import os import sys import requests sys.path.append(os.path.dirname( os.path.dirname( os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) )) ) logger = logging.getLogger("GW:minio") class MinioClient: server_base_url = os.environ["storag...
true
true
1c13226a1bb149a12258ac5bc979b77e815a2aff
6,112
py
Python
src/gluonts/nursery/spliced_binned_pareto/distr_tcn.py
unibeck/gluon-ts
73d0e9de689ab4bb014cdb4423642dff030e7678
[ "Apache-2.0" ]
1
2019-10-15T01:47:40.000Z
2019-10-15T01:47:40.000Z
src/gluonts/nursery/spliced_binned_pareto/distr_tcn.py
unibeck/gluon-ts
73d0e9de689ab4bb014cdb4423642dff030e7678
[ "Apache-2.0" ]
null
null
null
src/gluonts/nursery/spliced_binned_pareto/distr_tcn.py
unibeck/gluon-ts
73d0e9de689ab4bb014cdb4423642dff030e7678
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
38.440252
116
0.690609
import pandas as pd import numpy as np from tqdm import tqdm import torch from torch import optim import torch.nn.functional as F from torch.autograd import Variable import torch.nn as nn from .tcn import TCNBlock from torch.distributions.normal import Normal class DistributionalTCN(torch.nn.Module): ...
true
true
1c1322fe62c40e35d4c7df3e975614e4589e6396
1,039
py
Python
step/eval_sem_seg.py
robust-dl-ai/irn
b266bc98be152895935a346d01c82fc96f167faa
[ "MIT" ]
null
null
null
step/eval_sem_seg.py
robust-dl-ai/irn
b266bc98be152895935a346d01c82fc96f167faa
[ "MIT" ]
null
null
null
step/eval_sem_seg.py
robust-dl-ai/irn
b266bc98be152895935a346d01c82fc96f167faa
[ "MIT" ]
null
null
null
import os import imageio import numpy as np from chainercv.datasets import VOCSemanticSegmentationDataset from chainercv.evaluations import calc_semantic_segmentation_confusion def run(args): dataset = VOCSemanticSegmentationDataset(split=args.chainer_eval_set, data_dir=args.voc12_root) labels = [dataset.get...
31.484848
101
0.688162
import os import imageio import numpy as np from chainercv.datasets import VOCSemanticSegmentationDataset from chainercv.evaluations import calc_semantic_segmentation_confusion def run(args): dataset = VOCSemanticSegmentationDataset(split=args.chainer_eval_set, data_dir=args.voc12_root) labels = [dataset.get...
true
true
1c1323e024269a94d8f47c1ff76c6c93edbe3b87
7,506
py
Python
cirq-core/cirq/transformers/measurement_transformers.py
augustehirth/Cirq
e616710a0fa243524a9f6d7bc0d35e6b952fe3d0
[ "Apache-2.0" ]
null
null
null
cirq-core/cirq/transformers/measurement_transformers.py
augustehirth/Cirq
e616710a0fa243524a9f6d7bc0d35e6b952fe3d0
[ "Apache-2.0" ]
null
null
null
cirq-core/cirq/transformers/measurement_transformers.py
augustehirth/Cirq
e616710a0fa243524a9f6d7bc0d35e6b952fe3d0
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
42.168539
95
0.675859
from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from cirq import ops, protocols, value from cirq.transformers import ( transformer_api, transformer_primitives, ) from cirq.transformers.synchronize_terminal_measurements import find_terminal_measurements if TYPE_CHECKING: import cirq c...
true
true
1c13252f3dc368cfc47646d3cf323704c741ab91
8,724
py
Python
source/complice_menu.py
giovannicoppola/alfred-complice
3ccb21547cab633e8782cee3ada8e7a049a4cc66
[ "BSD-3-Clause-Attribution" ]
1
2021-11-10T03:07:56.000Z
2021-11-10T03:07:56.000Z
source/complice_menu.py
giovannicoppola/alfred-complice
3ccb21547cab633e8782cee3ada8e7a049a4cc66
[ "BSD-3-Clause-Attribution" ]
2
2022-02-10T09:32:03.000Z
2022-02-18T10:19:59.000Z
source/complice_menu.py
giovannicoppola/alfred-complice
3ccb21547cab633e8782cee3ada8e7a049a4cc66
[ "BSD-3-Clause-Attribution" ]
null
null
null
#!/usr/bin/python3 ### python script to interact with Complice ### initial menu ### giovanni, Saturday, April 10, 2021, 8:23 PM ## updated to Python3, February 2022 import time import datetime import random import os from config import POMOLENGTH, TIMERLENGTH, TOKEN from complice_get import get_intentions import u...
31.157143
118
0.47845
import time import datetime import random import os from config import POMOLENGTH, TIMERLENGTH, TOKEN from complice_get import get_intentions import urllib.request import json from urllib.parse import urlencode def log(s, *args): if args: s = s % args print(s, file=sys.stderr) seed = float(os....
true
true
1c132590140082b5ecc1b9a141dd783e0842322f
439
py
Python
Algorithms/Strings/hackerrank-in-a-string.py
Owngithub10101/Hackerrank-Problem-Solving
4e35b609c9f5b94c5bda292b9991baa054a944b6
[ "MIT" ]
23
2020-02-28T16:18:48.000Z
2021-12-21T11:51:07.000Z
Algorithms/Strings/hackerrank-in-a-string.py
ramanagali/Hackerrank-Problem-Solving
98f654f984013140d52b9a344146e9e38e46fb81
[ "MIT" ]
null
null
null
Algorithms/Strings/hackerrank-in-a-string.py
ramanagali/Hackerrank-Problem-Solving
98f654f984013140d52b9a344146e9e38e46fb81
[ "MIT" ]
16
2020-04-08T10:46:39.000Z
2021-11-15T03:46:56.000Z
# HackerRank in a String! # Developer: Murillo Grubler # Link: https://www.hackerrank.com/challenges/hackerrank-in-a-string/problem q = int(input().strip()) for a0 in range(q): word = ['h', 'a', 'c', 'k', 'e', 'r', 'r', 'a', 'n', 'k'] s = input().strip() for i in range(len(s)): if len(word) == 0: ...
31.357143
76
0.523918
q = int(input().strip()) for a0 in range(q): word = ['h', 'a', 'c', 'k', 'e', 'r', 'r', 'a', 'n', 'k'] s = input().strip() for i in range(len(s)): if len(word) == 0: break if s[i] == word[0]: word.remove(s[i]) print ("NO" if len(word) > 0 else "YES")
true
true
1c1326c3884ffc3f7a34410bd319d8b65978bfe9
149
py
Python
backend/home/models.py
crowdbotics-apps/test-30426
71c22bc329537e27c151112986b019950ed580db
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/models.py
crowdbotics-apps/test-30426
71c22bc329537e27c151112986b019950ed580db
[ "FTL", "AML", "RSA-MD" ]
5
2021-09-19T17:16:37.000Z
2021-10-17T14:13:20.000Z
backend/home/models.py
crowdbotics-apps/test-30426
71c22bc329537e27c151112986b019950ed580db
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.conf import settings from django.db import models class Title(models.Model): "Generated Model" body = models.BigIntegerField()
18.625
35
0.751678
from django.conf import settings from django.db import models class Title(models.Model): body = models.BigIntegerField()
true
true
1c1326e569ee67eaaa1a468c2d3074677b1a212c
7,595
py
Python
force_bdss/data_sources/base_data_source_model.py
scottwedge/force-bdss
c3fdf6a190fa448dbaecedcb81aaba504563dee3
[ "BSD-2-Clause" ]
2
2019-08-19T16:02:40.000Z
2020-10-01T11:38:00.000Z
force_bdss/data_sources/base_data_source_model.py
scottwedge/force-bdss
c3fdf6a190fa448dbaecedcb81aaba504563dee3
[ "BSD-2-Clause" ]
339
2017-07-06T14:35:40.000Z
2021-05-04T14:18:11.000Z
force_bdss/data_sources/base_data_source_model.py
scottwedge/force-bdss
c3fdf6a190fa448dbaecedcb81aaba504563dee3
[ "BSD-2-Clause" ]
2
2019-03-05T14:17:25.000Z
2020-06-26T01:48:07.000Z
# (C) Copyright 2010-2020 Enthought, Inc., Austin, TX # All rights reserved. from copy import deepcopy from logging import getLogger from traits.api import ( Instance, List, Event, on_trait_change, Type ) from force_bdss.core.base_model import BaseModel from force_bdss.core.input_slot_info import InputSlotInfo...
36.166667
78
0.595523
from copy import deepcopy from logging import getLogger from traits.api import ( Instance, List, Event, on_trait_change, Type ) from force_bdss.core.base_model import BaseModel from force_bdss.core.input_slot_info import InputSlotInfo from force_bdss.core.output_slot_info import OutputSlotInfo from force_bdss.co...
true
true
1c132884e9a7318b99e3b21395690255f3f2a251
148
py
Python
TSIS5/15.py
ayazhan112/python-
fba09ecc25e11dbfb116f273838b13174f66126d
[ "MIT" ]
null
null
null
TSIS5/15.py
ayazhan112/python-
fba09ecc25e11dbfb116f273838b13174f66126d
[ "MIT" ]
null
null
null
TSIS5/15.py
ayazhan112/python-
fba09ecc25e11dbfb116f273838b13174f66126d
[ "MIT" ]
null
null
null
import random def random_line(fname): lines = open(fname).read().splitlines() return random.choice(lines) print(random_line('test.txt'))
29.6
44
0.709459
import random def random_line(fname): lines = open(fname).read().splitlines() return random.choice(lines) print(random_line('test.txt'))
true
true
1c132946ab62a1fbc5a3e2e5b95dd860fad5a09a
4,612
py
Python
examples/remarketing/upload_offline_conversion.py
Insutanto/google-ads-python
f63e318ca39f2ecc6546fba69994456815727578
[ "Apache-2.0" ]
null
null
null
examples/remarketing/upload_offline_conversion.py
Insutanto/google-ads-python
f63e318ca39f2ecc6546fba69994456815727578
[ "Apache-2.0" ]
null
null
null
examples/remarketing/upload_offline_conversion.py
Insutanto/google-ads-python
f63e318ca39f2ecc6546fba69994456815727578
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
48.041667
79
0.670208
import argparse import sys from google.ads.google_ads.client import GoogleAdsClient from google.ads.google_ads.errors import GoogleAdsException def main(client, customer_id, conversion_action_id, gclid, conversion_date_time, conversion_value): click_conversion = client.get_type('ClickConversion', ve...
true
true
1c1329bae2b29dafd606179d2414fed225320fea
693
py
Python
boto3_type_annotations/boto3_type_annotations/directconnect/paginator.py
cowboygneox/boto3_type_annotations
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
[ "MIT" ]
119
2018-12-01T18:20:57.000Z
2022-02-02T10:31:29.000Z
boto3_type_annotations/boto3_type_annotations/directconnect/paginator.py
cowboygneox/boto3_type_annotations
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
[ "MIT" ]
15
2018-11-16T00:16:44.000Z
2021-11-13T03:44:18.000Z
boto3_type_annotations/boto3_type_annotations/directconnect/paginator.py
cowboygneox/boto3_type_annotations
450dce1de4e066b939de7eac2ec560ed1a7ddaa2
[ "MIT" ]
11
2019-05-06T05:26:51.000Z
2021-09-28T15:27:59.000Z
from typing import Dict from botocore.paginate import Paginator class DescribeDirectConnectGatewayAssociations(Paginator): def paginate(self, associationId: str = None, associatedGatewayId: str = None, directConnectGatewayId: str = None, virtualGatewayId: str = None, PaginationConfig: Dict = None) -> Dict: ...
38.5
188
0.760462
from typing import Dict from botocore.paginate import Paginator class DescribeDirectConnectGatewayAssociations(Paginator): def paginate(self, associationId: str = None, associatedGatewayId: str = None, directConnectGatewayId: str = None, virtualGatewayId: str = None, PaginationConfig: Dict = None) -> Dict: ...
true
true
1c1329cff29ae930bdd17642e787e7fff18f7442
494
py
Python
dist/py/distance.py
microsoft/jacdac
2c6548b7e55ac34141e5152c664ca268e873cf09
[ "CC-BY-4.0", "MIT" ]
31
2020-07-24T14:49:32.000Z
2022-03-20T12:20:56.000Z
dist/py/distance.py
QPC-database/jacdac
74e9f7cebdb1db4c24f211aceb657b5125d0fd40
[ "CC-BY-4.0", "MIT" ]
747
2020-07-31T22:05:45.000Z
2022-03-31T23:27:35.000Z
dist/py/distance.py
QPC-database/jacdac
74e9f7cebdb1db4c24f211aceb657b5125d0fd40
[ "CC-BY-4.0", "MIT" ]
17
2020-07-31T10:49:01.000Z
2022-03-15T03:21:43.000Z
# Autogenerated file for Distance # Add missing from ... import const _JD_SERVICE_CLASS_DISTANCE = const(0x141a6b8a) _JD_DISTANCE_VARIANT_ULTRASONIC = const(0x1) _JD_DISTANCE_VARIANT_INFRARED = const(0x2) _JD_DISTANCE_VARIANT_LI_DAR = const(0x3) _JD_DISTANCE_VARIANT_LASER = const(0x4) _JD_DISTANCE_REG_DISTANCE = const(...
44.909091
54
0.8583
_JD_SERVICE_CLASS_DISTANCE = const(0x141a6b8a) _JD_DISTANCE_VARIANT_ULTRASONIC = const(0x1) _JD_DISTANCE_VARIANT_INFRARED = const(0x2) _JD_DISTANCE_VARIANT_LI_DAR = const(0x3) _JD_DISTANCE_VARIANT_LASER = const(0x4) _JD_DISTANCE_REG_DISTANCE = const(JD_REG_READING) _JD_DISTANCE_REG_MIN_RANGE = const(JD_REG_MIN_READING)...
true
true
1c132a2213c48d02d3ae39eb1613908be73b8975
6,412
py
Python
kubernetes/client/models/v1beta1_stateful_set_list.py
itholic/python
dffe577a062e17057270ae80fa677ffd83e9d183
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1beta1_stateful_set_list.py
itholic/python
dffe577a062e17057270ae80fa677ffd83e9d183
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1beta1_stateful_set_list.py
itholic/python
dffe577a062e17057270ae80fa677ffd83e9d183
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.15.7 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class V1beta1Sta...
32.714286
295
0.619931
import pprint import re import six class V1beta1StatefulSetList(object): openapi_types = { 'api_version': 'str', 'items': 'list[V1beta1StatefulSet]', 'kind': 'str', 'metadata': 'V1ListMeta' } attribute_map = { 'api_version': 'apiVersion', 'items': 'it...
true
true
1c132a4a58e7921f7b5969ed1e055e76e59135bc
3,283
py
Python
src/BaseSpacePy/api/BaseSpaceException.py
ktmeaton/basespace-python3-sdk
7209517f213e626bf9b227a781de1bf8eee9f88e
[ "Apache-2.0" ]
null
null
null
src/BaseSpacePy/api/BaseSpaceException.py
ktmeaton/basespace-python3-sdk
7209517f213e626bf9b227a781de1bf8eee9f88e
[ "Apache-2.0" ]
null
null
null
src/BaseSpacePy/api/BaseSpaceException.py
ktmeaton/basespace-python3-sdk
7209517f213e626bf9b227a781de1bf8eee9f88e
[ "Apache-2.0" ]
null
null
null
class UndefinedParameterException(Exception): def __init__(self, value): self.parameter = 'The following required parameter must be defined: ' + str(value) def __str__(self): return repr(self.parameter) class UnknownParameterException(Exception): def __init__(self, value): self.par...
33.845361
103
0.689004
class UndefinedParameterException(Exception): def __init__(self, value): self.parameter = 'The following required parameter must be defined: ' + str(value) def __str__(self): return repr(self.parameter) class UnknownParameterException(Exception): def __init__(self, value): self.par...
true
true
1c132b647fb4131b4a0c03313f86c5c0da0fa797
1,613
py
Python
poem_spider/spiders/poetSpider.py
huan670119408/poem_spider
7af18116e9fd12a3ae69a769a82da32097188d0b
[ "MIT" ]
1
2020-03-01T22:58:28.000Z
2020-03-01T22:58:28.000Z
poem_spider/spiders/poetSpider.py
huan670119408/poem_spider
7af18116e9fd12a3ae69a769a82da32097188d0b
[ "MIT" ]
null
null
null
poem_spider/spiders/poetSpider.py
huan670119408/poem_spider
7af18116e9fd12a3ae69a769a82da32097188d0b
[ "MIT" ]
null
null
null
import scrapy from poem_spider.items import PoemItem, PoetItem import re import uuid class PoetSpider(scrapy.Spider): name = "poet" # allowed_domains = ["www.gushiwen.org"] poet_count = 1 def start_requests(self): start_url = 'https://so.gushiwen.org/authors/Default.aspx?p=1&c=先秦' yie...
40.325
110
0.591445
import scrapy from poem_spider.items import PoemItem, PoetItem import re import uuid class PoetSpider(scrapy.Spider): name = "poet" poet_count = 1 def start_requests(self): start_url = 'https://so.gushiwen.org/authors/Default.aspx?p=1&c=先秦' yield scrapy.Request(url=start_url, callback...
true
true
1c132c1b861c8dd0cbc3674cadc26f879ba0e185
4,725
py
Python
dpnp/dpnp_iface_sorting.py
1e-to/dpnp
4a347d2d93a890a5435629c971ef6f05ae0c1d30
[ "BSD-2-Clause" ]
null
null
null
dpnp/dpnp_iface_sorting.py
1e-to/dpnp
4a347d2d93a890a5435629c971ef6f05ae0c1d30
[ "BSD-2-Clause" ]
null
null
null
dpnp/dpnp_iface_sorting.py
1e-to/dpnp
4a347d2d93a890a5435629c971ef6f05ae0c1d30
[ "BSD-2-Clause" ]
null
null
null
# cython: language_level=3 # distutils: language = c++ # -*- coding: utf-8 -*- # ***************************************************************************** # Copyright (c) 2016-2020, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are pe...
33.041958
79
0.649947
import numpy from dpnp.dpnp_algo import * from dpnp.dparray import dparray from dpnp.dpnp_utils import * __all__ = [ 'argsort', 'sort' ] def argsort(in_array1, axis=-1, kind=None, order=None): is_dparray1 = isinstance(in_array1, dparray) if (not use_origin_backend(in_array1) and is_dparray1): ...
true
true
1c132d42a5bbda8b37049abf001f4ffca94caaa3
7,202
py
Python
tests/conftest.py
FutureTense/KeyMaster
efd499554c46da139c63135f58e9e04bacf86854
[ "MIT" ]
null
null
null
tests/conftest.py
FutureTense/KeyMaster
efd499554c46da139c63135f58e9e04bacf86854
[ "MIT" ]
null
null
null
tests/conftest.py
FutureTense/KeyMaster
efd499554c46da139c63135f58e9e04bacf86854
[ "MIT" ]
null
null
null
""" Fixtures for keymaster tests. """ import asyncio import copy import json from unittest.mock import AsyncMock, patch import pytest from pytest_homeassistant_custom_component.common import MockConfigEntry from zwave_js_server.model.driver import Driver from zwave_js_server.model.node import Node from zwave_js_server...
29.63786
88
0.698556
import asyncio import copy import json from unittest.mock import AsyncMock, patch import pytest from pytest_homeassistant_custom_component.common import MockConfigEntry from zwave_js_server.model.driver import Driver from zwave_js_server.model.node import Node from zwave_js_server.version import VersionInfo from .com...
true
true
1c132e0a38bc613864f4ba2593671aacceea7896
616
py
Python
setup.py
Open511/open511-server
f78301bff6aae582baae71022bc84e97c44e7650
[ "MIT" ]
1
2021-01-11T03:22:39.000Z
2021-01-11T03:22:39.000Z
setup.py
Open511/open511-server
f78301bff6aae582baae71022bc84e97c44e7650
[ "MIT" ]
2
2015-11-27T20:16:43.000Z
2015-11-27T20:27:46.000Z
setup.py
Open511/open511-server
f78301bff6aae582baae71022bc84e97c44e7650
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name = "open511-server", version = "0.1", url='', license = "", packages = find_packages(), install_requires = [ 'open511==0.5', 'lxml>=3.0,<=4.0', 'WebOb==1.5.1', 'python-dateutil==2.4.2', 'requests==2.8...
22.814815
74
0.501623
from setuptools import setup, find_packages setup( name = "open511-server", version = "0.1", url='', license = "", packages = find_packages(), install_requires = [ 'open511==0.5', 'lxml>=3.0,<=4.0', 'WebOb==1.5.1', 'python-dateutil==2.4.2', 'requests==2.8...
true
true
1c132e9bd0b4310b378113750591c5426c11b2fe
926
py
Python
test/test_nquads_w3c.py
gromgull/rdflib
7c90f646e3734ee6d3081b5d3f699f0f501f6a39
[ "BSD-3-Clause" ]
4
2019-01-07T06:55:58.000Z
2021-07-16T13:34:58.000Z
test/test_nquads_w3c.py
gromgull/rdflib
7c90f646e3734ee6d3081b5d3f699f0f501f6a39
[ "BSD-3-Clause" ]
null
null
null
test/test_nquads_w3c.py
gromgull/rdflib
7c90f646e3734ee6d3081b5d3f699f0f501f6a39
[ "BSD-3-Clause" ]
2
2018-05-01T13:18:13.000Z
2018-11-15T04:58:05.000Z
"""This runs the nquads tests for the W3C RDF Working Group's N-Quads test suite.""" from rdflib import ConjunctiveGraph from .manifest import nose_tests, RDFT from .testutils import nose_tst_earl_report verbose = False def nquads(test): g = ConjunctiveGraph() try: g.parse(test.action, format='nqua...
22.047619
69
0.640389
from rdflib import ConjunctiveGraph from .manifest import nose_tests, RDFT from .testutils import nose_tst_earl_report verbose = False def nquads(test): g = ConjunctiveGraph() try: g.parse(test.action, format='nquads') if not test.syntax: raise AssertionError("Input shouldn't ha...
true
true
1c132f1cdc0acdc4bb569b5bab91ca0cc1890d3a
7,635
py
Python
tests/unit/models/gpflow/test_utils.py
vishalbelsare/trieste
d25b66becd0cac47574b0f8e80bc28301aa0bf98
[ "Apache-2.0" ]
null
null
null
tests/unit/models/gpflow/test_utils.py
vishalbelsare/trieste
d25b66becd0cac47574b0f8e80bc28301aa0bf98
[ "Apache-2.0" ]
2
2022-03-11T18:42:45.000Z
2022-03-19T17:00:12.000Z
tests/unit/models/gpflow/test_utils.py
vishalbelsare/trieste
d25b66becd0cac47574b0f8e80bc28301aa0bf98
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The Trieste Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
38.756345
100
0.750491
from __future__ import annotations import copy import operator from typing import cast import gpflow import numpy as np import numpy.testing as npt import pytest import tensorflow as tf import tensorflow_probability as tfp from tests.util.misc import random_seed from tests.util.models.gpflow.models import ModelFact...
true
true
1c132f31afc4e81eced9112929194c2366cf19e4
139
py
Python
python/homeflux/__init__.py
david2777/homeflux
4f7c4b855bd69b0b132d480cac133582445cacf5
[ "MIT" ]
null
null
null
python/homeflux/__init__.py
david2777/homeflux
4f7c4b855bd69b0b132d480cac133582445cacf5
[ "MIT" ]
null
null
null
python/homeflux/__init__.py
david2777/homeflux
4f7c4b855bd69b0b132d480cac133582445cacf5
[ "MIT" ]
null
null
null
import os import logzero _level = 10 if os.getenv('HOMEFLUX_DEBUG', False) else 20 log = logzero.setup_logger('homeflux', level=_level)
17.375
57
0.755396
import os import logzero _level = 10 if os.getenv('HOMEFLUX_DEBUG', False) else 20 log = logzero.setup_logger('homeflux', level=_level)
true
true
1c1330acfad4e94aff22102d5383235f61ea6c96
958
py
Python
ee/clickhouse/models/util.py
ld-rale/posthog
0fa5b18b2e940cf5cdbe8afc733eb7e3cd4ae810
[ "MIT" ]
null
null
null
ee/clickhouse/models/util.py
ld-rale/posthog
0fa5b18b2e940cf5cdbe8afc733eb7e3cd4ae810
[ "MIT" ]
null
null
null
ee/clickhouse/models/util.py
ld-rale/posthog
0fa5b18b2e940cf5cdbe8afc733eb7e3cd4ae810
[ "MIT" ]
null
null
null
import json from enum import Enum, auto from typing import Optional, Union import pytz from dateutil.parser import isoparse from django.utils import timezone class PersonPropertiesMode(Enum): USING_SUBQUERY = auto() USING_PERSON_PROPERTIES_COLUMN = auto() # Used for generating query on Person table D...
21.772727
85
0.668058
import json from enum import Enum, auto from typing import Optional, Union import pytz from dateutil.parser import isoparse from django.utils import timezone class PersonPropertiesMode(Enum): USING_SUBQUERY = auto() USING_PERSON_PROPERTIES_COLUMN = auto() DIRECT = auto() def is_json(val): if is...
true
true
1c13310fe0561ba7d30cda516876e30760a57900
2,323
py
Python
homeassistant/components/qnap_qsw/button.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/qnap_qsw/button.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
homeassistant/components/qnap_qsw/button.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Support for the QNAP QSW buttons.""" from __future__ import annotations from collections.abc import Awaitable, Callable from dataclasses import dataclass from typing import Final from aioqsw.localapi import QnapQswApi from homeassistant.components.button import ( ButtonDeviceClass, ButtonEntity, Butto...
29.782051
84
0.739991
from __future__ import annotations from collections.abc import Awaitable, Callable from dataclasses import dataclass from typing import Final from aioqsw.localapi import QnapQswApi from homeassistant.components.button import ( ButtonDeviceClass, ButtonEntity, ButtonEntityDescription, ) from homeassistant...
true
true
1c13315ffad37c278b7429df6d28b397061a7a60
7,824
py
Python
docs/conf.py
sugam0301/mlops
e76a25dda29036c854bcb316cbb2ed9e03ba67b8
[ "MIT" ]
null
null
null
docs/conf.py
sugam0301/mlops
e76a25dda29036c854bcb316cbb2ed9e03ba67b8
[ "MIT" ]
null
null
null
docs/conf.py
sugam0301/mlops
e76a25dda29036c854bcb316cbb2ed9e03ba67b8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # mlops documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a d...
31.934694
153
0.706288
import os import sys extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'mlops' # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '0.1' # The full version, including alpha/bet...
true
true
1c1331d8fc3115cd8f7cb6fbaae11ababb9c2bbb
584
py
Python
tests/test_django_unpoly.py
jwaschkau/django-unpoly
31b4afcb4607a41d25ccbfe45681bc6ed1769175
[ "MIT" ]
7
2021-06-07T12:31:26.000Z
2022-01-02T05:53:13.000Z
tests/test_django_unpoly.py
jwaschkau/django-unpoly
31b4afcb4607a41d25ccbfe45681bc6ed1769175
[ "MIT" ]
13
2021-06-23T11:32:54.000Z
2021-10-07T15:12:07.000Z
tests/test_django_unpoly.py
jwaschkau/django-unpoly
31b4afcb4607a41d25ccbfe45681bc6ed1769175
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Tests for `django-unpoly` package.""" # pylint: disable=redefined-outer-name import pytest @pytest.fixture def response(): """Sample pytest fixture. See more at: http://doc.pytest.org/en/latest/fixture.html """ # import requests # return requests.get('https://github.com/...
25.391304
78
0.708904
import pytest @pytest.fixture def response(): def test_content(response): del response
true
true
1c13327c9f5283a9b6b65cf0e2744b74cbcf526f
1,152
py
Python
openstack/tests/unit/anti_ddos/test_anti_ddos_service.py
wangrui1121/huaweicloud-sdk-python
240abe00288760115d1791012d4e3c4592d77ad1
[ "Apache-2.0" ]
43
2018-12-19T08:39:15.000Z
2021-07-21T02:45:43.000Z
openstack/tests/unit/anti_ddos/test_anti_ddos_service.py
wangrui1121/huaweicloud-sdk-python
240abe00288760115d1791012d4e3c4592d77ad1
[ "Apache-2.0" ]
11
2019-03-17T13:28:56.000Z
2020-09-23T23:57:50.000Z
openstack/tests/unit/anti_ddos/test_anti_ddos_service.py
wangrui1121/huaweicloud-sdk-python
240abe00288760115d1791012d4e3c4592d77ad1
[ "Apache-2.0" ]
47
2018-12-19T05:14:25.000Z
2022-03-19T15:28:30.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
38.4
75
0.737847
import testtools from openstack.anti_ddos import anti_ddos_service class TestAntiDDosService(testtools.TestCase): def test_service(self): sot = anti_ddos_service.AntiDDosService() self.assertEqual('anti-ddos', sot.service_type) self.assertEqual('public', sot.interface) self.asse...
true
true
1c1332aa534bd27b1ab925ed9fa00e29f719c695
263
py
Python
Anachebe_Ikechukwu/Phase 1/Python Basic 1/Day 5/Qtn-6.py
dreamchild7/python-challenge-solutions
29e2ca780e86fc8a3e9d4def897c26bfa6d6493d
[ "MIT" ]
null
null
null
Anachebe_Ikechukwu/Phase 1/Python Basic 1/Day 5/Qtn-6.py
dreamchild7/python-challenge-solutions
29e2ca780e86fc8a3e9d4def897c26bfa6d6493d
[ "MIT" ]
null
null
null
Anachebe_Ikechukwu/Phase 1/Python Basic 1/Day 5/Qtn-6.py
dreamchild7/python-challenge-solutions
29e2ca780e86fc8a3e9d4def897c26bfa6d6493d
[ "MIT" ]
null
null
null
#6. Write a Python program to add two objects if both objects are an integer type. def add_obj(a, b): if (isinstance(a, int) and isinstance(b, int)): return a + b else: return TypeError("Must be integer numbers") print(add_obj(30, 30))
23.909091
82
0.653992
def add_obj(a, b): if (isinstance(a, int) and isinstance(b, int)): return a + b else: return TypeError("Must be integer numbers") print(add_obj(30, 30))
true
true
1c1333c09e70fa74032c05dff07f97dfc637c256
431
py
Python
python-binance/unit12/01.py
sharebook-kr/learningspoons-bootcamp-finance
0288f3f3b39f54420e4e9987f1de12892dc680ea
[ "MIT" ]
9
2020-10-25T15:13:32.000Z
2022-03-26T11:27:21.000Z
python-binance/unit12/01.py
sharebook-kr/learningspoons-bootcamp-finance
0288f3f3b39f54420e4e9987f1de12892dc680ea
[ "MIT" ]
null
null
null
python-binance/unit12/01.py
sharebook-kr/learningspoons-bootcamp-finance
0288f3f3b39f54420e4e9987f1de12892dc680ea
[ "MIT" ]
7
2021-03-01T11:06:45.000Z
2022-03-14T07:06:04.000Z
import ccxt import time with open("../api.txt") as f: lines = f.readlines() api_key = lines[0].strip() secret = lines[1].strip() binance = ccxt.binance(config={ 'apiKey': api_key, 'secret': secret, 'enableRateLimit': True, 'options': { 'defaultType': 'future' } }) symbol = ...
16.576923
38
0.582367
import ccxt import time with open("../api.txt") as f: lines = f.readlines() api_key = lines[0].strip() secret = lines[1].strip() binance = ccxt.binance(config={ 'apiKey': api_key, 'secret': secret, 'enableRateLimit': True, 'options': { 'defaultType': 'future' } }) symbol = ...
true
true
1c1334c96f9307a2df392b4e21c4772129310444
935
py
Python
snippets/preprocessing.py
steffen-jung/movie-mining
d49a6d6b9a6c632ea748fc582c2576b71fab9074
[ "MIT" ]
13
2017-12-02T11:09:35.000Z
2021-12-19T10:23:20.000Z
snippets/preprocessing.py
steffen-jung/movie-mining
d49a6d6b9a6c632ea748fc582c2576b71fab9074
[ "MIT" ]
9
2017-11-09T09:12:48.000Z
2017-11-26T15:34:42.000Z
snippets/preprocessing.py
yOoMarvin/movie-mining
d49a6d6b9a6c632ea748fc582c2576b71fab9074
[ "MIT" ]
4
2017-11-30T18:34:40.000Z
2020-10-15T07:30:11.000Z
# ENCODING from category_encoders.ordinal import OrdinalEncoder# choose one encoder encoder = OrdinalEncoder() #from category_encoders.one_hot import OneHotEncoder #encoder = OneHotEncoder() golf_encoded = encoder.fit_transform(golf[['Outlook', 'Temperature', 'Humidity', 'Wind']]) print(golf_encoded.head()) # BINN...
25.972222
90
0.720856
from category_encoders.ordinal import OrdinalEncoderencoder = OrdinalEncoder() golf_encoded = encoder.fit_transform(golf[['Outlook', 'Temperature', 'Humidity', 'Wind']]) print(golf_encoded.head()) import pandas as pd items = [0,4,12,16,16,18,24,26,28] pd.cut(items, bins=3) pd.qcut(items, q=3) iris = pd.read_csv(...
true
true
1c1335ba6f152bc4ddc2bfcdc06b154f4b486af6
5,981
py
Python
zcls/model/recognizers/resnet/official_resnest.py
YinAoXiong/ZCls
8aeea3640f8456937db35d043e37cf2c03ac9017
[ "Apache-2.0" ]
110
2021-02-04T14:32:57.000Z
2022-03-30T01:51:56.000Z
zcls/model/recognizers/resnet/official_resnest.py
YinAoXiong/ZCls
8aeea3640f8456937db35d043e37cf2c03ac9017
[ "Apache-2.0" ]
8
2021-04-11T02:46:57.000Z
2021-12-14T19:30:58.000Z
zcls/model/recognizers/resnet/official_resnest.py
YinAoXiong/ZCls
8aeea3640f8456937db35d043e37cf2c03ac9017
[ "Apache-2.0" ]
20
2021-02-07T14:17:07.000Z
2022-03-22T05:20:40.000Z
# -*- coding: utf-8 -*- """ @date: 2021/1/7 下午7:51 @file: official_resnest.py @author: zj @description: """ from abc import ABC import torch import torch.nn as nn from torch.nn.modules.module import T from resnest.torch.resnest import resnest50, resnest101, resnest200, resnest269 from resnest.torch.resnet import Res...
36.469512
79
0.479184
from abc import ABC import torch import torch.nn as nn from torch.nn.modules.module import T from resnest.torch.resnest import resnest50, resnest101, resnest200, resnest269 from resnest.torch.resnet import ResNet, Bottleneck from zcls.config.key_word import KEY_OUTPUT from zcls.model import registry from zcls.model....
true
true
1c13364d52a8fa0390732fc86a9e4d1398aac0ae
345
py
Python
segway_pipeline/__init__.py
ENCODE-DCC/segway
0ecd434e54a6d8fe599b125c39be751dfdbcc386
[ "MIT" ]
null
null
null
segway_pipeline/__init__.py
ENCODE-DCC/segway
0ecd434e54a6d8fe599b125c39be751dfdbcc386
[ "MIT" ]
null
null
null
segway_pipeline/__init__.py
ENCODE-DCC/segway
0ecd434e54a6d8fe599b125c39be751dfdbcc386
[ "MIT" ]
null
null
null
__title__ = "segway-pipeline" __version__ = "1.2.0" __description__ = "Python scripts required for running ENCODE Segway pipeline." __url__ = "https://github.com/ENCODE-DCC/segway-pipeline" __uri__ = __url__ __author__ = "Paul Sud" __email__ = "encode-help@lists.stanford.edu" __license__ = "MIT" __copyright__ = "Copyri...
34.5
79
0.762319
__title__ = "segway-pipeline" __version__ = "1.2.0" __description__ = "Python scripts required for running ENCODE Segway pipeline." __url__ = "https://github.com/ENCODE-DCC/segway-pipeline" __uri__ = __url__ __author__ = "Paul Sud" __email__ = "encode-help@lists.stanford.edu" __license__ = "MIT" __copyright__ = "Copyri...
true
true
1c1337d4baf7c1fd8d3df812b8de26a2d150572a
4,219
py
Python
tableSim.py
JanisM91/Quasim
cb7404f56babe6cb5b583a0a0d58944b9f902b1f
[ "Apache-2.0" ]
null
null
null
tableSim.py
JanisM91/Quasim
cb7404f56babe6cb5b583a0a0d58944b9f902b1f
[ "Apache-2.0" ]
null
null
null
tableSim.py
JanisM91/Quasim
cb7404f56babe6cb5b583a0a0d58944b9f902b1f
[ "Apache-2.0" ]
null
null
null
## # @file tableSim.py # # @author Janis Mohr # # @date 2018 # # @brief Simulation of a singel lane based on truth tables. # ## import math ## # @class TableSim # @briefSimulation based on truth tables. ## class TableSim(object): ## Method to simulate a Pauli-X-Gate representing its truth table. # @param qubitSt...
28.70068
85
0.680967
import math class TableSim(object): def GateX(self, qubitState): if qubitState == [1, 0]: qubitState = [0, 1] elif qubitState == [0, 1]: qubitState = [1, 0] else: helpVariable = qubitState[0] qubitState[0] = qubitState[1] qubitState[1] = helpVariable return qubitState def GateY(s...
true
true
1c133872428e0c14df651d8399002686b281bd89
844
py
Python
Chapter06/paramiko/ssh_download_sftp.py
yangwawa0323/Learning-Python-Networking-Second-Edition
5460fe4fb6acc5d0df19bf36e52ac09e9a11eb8b
[ "MIT" ]
52
2018-12-17T19:33:06.000Z
2022-03-25T18:14:02.000Z
Chapter06/paramiko/ssh_download_sftp.py
barretthugh/Learning-Python-Networking-Second-Edition
0f00b8b20c1c85e76754e47113dff8ca9e99d5ca
[ "MIT" ]
null
null
null
Chapter06/paramiko/ssh_download_sftp.py
barretthugh/Learning-Python-Networking-Second-Edition
0f00b8b20c1c85e76754e47113dff8ca9e99d5ca
[ "MIT" ]
38
2018-12-18T09:08:43.000Z
2022-02-06T02:53:05.000Z
#!/usr/bin/env python3 import getpass import paramiko HOSTNAME = 'ssh_server' PORT = 22 FILE_PATH = '/tmp/test.txt' def sftp_download(username, password, hostname=HOSTNAME,port=PORT): ssh_transport = paramiko.Transport(hostname, port) ssh_transport.connect(username=username, password=password) sftp_session = para...
33.76
67
0.759479
import getpass import paramiko HOSTNAME = 'ssh_server' PORT = 22 FILE_PATH = '/tmp/test.txt' def sftp_download(username, password, hostname=HOSTNAME,port=PORT): ssh_transport = paramiko.Transport(hostname, port) ssh_transport.connect(username=username, password=password) sftp_session = paramiko.SFTPClient.from_tr...
true
true
1c13390096c36e3c70c8781b352fed3e784fd62b
39,990
py
Python
python/pyspark/sql/streaming.py
wangyixiaohuihui/spark2-annotation
25fe53ac7167275114a1ef0be802db92a7010ec8
[ "BSD-3-Clause-Open-MPI", "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "MIT-0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause-Clear", "PostgreSQL", "BSD-3-Clause" ]
9
2018-08-08T05:40:20.000Z
2020-07-25T12:21:41.000Z
python/pyspark/sql/streaming.py
rongyousu/spark-2.2
421979234f03e698d61b2d14010deb0c6d34d890
[ "0BSD", "BSD-3-Clause-Open-MPI", "PSF-2.0", "BSD-2-Clause", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "BSD-3-Clause-Clear", "PostgreSQL", "BSD-3-Clause" ]
2
2020-05-15T21:40:43.000Z
2021-01-21T00:17:29.000Z
python/pyspark/sql/streaming.py
rongyousu/spark-2.2
421979234f03e698d61b2d14010deb0c6d34d890
[ "0BSD", "BSD-3-Clause-Open-MPI", "PSF-2.0", "BSD-2-Clause", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "BSD-3-Clause-Clear", "PostgreSQL", "BSD-3-Clause" ]
14
2019-01-14T07:01:36.000Z
2021-01-06T01:45:08.000Z
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may n...
45.288788
101
0.606602
import sys import json if sys.version >= '3': intlike = int basestring = unicode = str else: intlike = (int, long) from abc import ABCMeta, abstractmethod from pyspark import since, keyword_only from pyspark.rdd import ignore_unicode_prefix from pyspark.sql.column import _to_seq from pysp...
true
true
1c1339015ca8bb2b3fd7e0b1ed238aeb18c6c856
381
py
Python
selectionsort/main.py
MateuszGawrysiak/mcg
1c87adb83e12047337e2b3b297a988bf0eea144b
[ "Unlicense" ]
null
null
null
selectionsort/main.py
MateuszGawrysiak/mcg
1c87adb83e12047337e2b3b297a988bf0eea144b
[ "Unlicense" ]
null
null
null
selectionsort/main.py
MateuszGawrysiak/mcg
1c87adb83e12047337e2b3b297a988bf0eea144b
[ "Unlicense" ]
null
null
null
#selection sort tablica=[] n=5 for x in range(n): tablica.append(int(input())); print(tablica) indeks=0 for x in range(n): mini = tablica[x] indeks=x for y in range(x+1,n): if tablica[y]<mini: mini=tablica[y] indeks=y tablica[indeks]=tablica[x] ...
15.24
34
0.548556
tablica=[] n=5 for x in range(n): tablica.append(int(input())); print(tablica) indeks=0 for x in range(n): mini = tablica[x] indeks=x for y in range(x+1,n): if tablica[y]<mini: mini=tablica[y] indeks=y tablica[indeks]=tablica[x] tablica[x]=mi...
true
true
1c133a6ac796fdb8fd85faaf497e551f3a08b009
33,727
py
Python
pwnlib/tubes/process.py
clubby789/pwntools-1
5b93a8f238ad6c814b60d676c122f1eac8d0e2ce
[ "MIT" ]
1
2022-01-09T03:10:12.000Z
2022-01-09T03:10:12.000Z
pwnlib/tubes/process.py
clubby789/pwntools-1
5b93a8f238ad6c814b60d676c122f1eac8d0e2ce
[ "MIT" ]
null
null
null
pwnlib/tubes/process.py
clubby789/pwntools-1
5b93a8f238ad6c814b60d676c122f1eac8d0e2ce
[ "MIT" ]
2
2015-05-28T09:13:23.000Z
2016-08-31T06:43:30.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division import ctypes import errno import logging import os import platform import select import signal import six import stat import subprocess import sys import time if sys.platform != 'win32': import fcntl import pty ...
33.065686
107
0.533934
from __future__ import absolute_import from __future__ import division import ctypes import errno import logging import os import platform import select import signal import six import stat import subprocess import sys import time if sys.platform != 'win32': import fcntl import pty import resource imp...
true
true
1c133bba43831fac1407046052c23760fa0875fb
1,535
py
Python
tests/t10_basic/plugins/plugin6b_alias.py
oscdev-io/ezplugins
370bb53b7d965f012a1c80fb8c11d49fc60e3660
[ "MIT" ]
null
null
null
tests/t10_basic/plugins/plugin6b_alias.py
oscdev-io/ezplugins
370bb53b7d965f012a1c80fb8c11d49fc60e3660
[ "MIT" ]
null
null
null
tests/t10_basic/plugins/plugin6b_alias.py
oscdev-io/ezplugins
370bb53b7d965f012a1c80fb8c11d49fc60e3660
[ "MIT" ]
null
null
null
# # SPDX-License-Identifier: MIT # # Copyright (C) 2019-2021, AllWorldIT. # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # u...
37.439024
81
0.74658
import ezplugins __all__ = [ "Plugin6b", ] @ezplugins.ezplugin_metadata(alias="plugin6") class Plugin6b: @ezplugins.ezplugin_method() def test_func1(self) -> str: return f"{self.__module__}.{__name__}#{self.__class__.__name__}"
true
true
1c133bf4b7d0bef6f6a40b8b8fd2713b9ba1afc3
395
py
Python
backend/api/admin.py
forgeno/CMPUT404-group-project
fa1085919995d1965613db511102569019ffe8e6
[ "Apache-2.0" ]
null
null
null
backend/api/admin.py
forgeno/CMPUT404-group-project
fa1085919995d1965613db511102569019ffe8e6
[ "Apache-2.0" ]
117
2019-02-08T16:44:55.000Z
2019-04-08T04:44:55.000Z
backend/api/admin.py
forgeno/CMPUT404-project-socialdistribution
fa1085919995d1965613db511102569019ffe8e6
[ "Apache-2.0" ]
1
2019-01-30T20:33:35.000Z
2019-01-30T20:33:35.000Z
from django.contrib import admin from .models import * # Register your models here. class AuthorProfileAdmin(admin.ModelAdmin): readonly_fields = ('id',) admin.site.register(AuthorProfile, AuthorProfileAdmin) admin.site.register(Category) admin.site.register(AllowToView) admin.site.register(Post) admin.site.reg...
23.235294
54
0.802532
from django.contrib import admin from .models import * class AuthorProfileAdmin(admin.ModelAdmin): readonly_fields = ('id',) admin.site.register(AuthorProfile, AuthorProfileAdmin) admin.site.register(Category) admin.site.register(AllowToView) admin.site.register(Post) admin.site.register(Comment) admin.site.reg...
true
true
1c133cdfafe73dfc1f89cd173be84bba81ed4401
1,829
py
Python
sandpit_app/app_factory/web/java.py
mr-tim/sandpit
25ee43927b87b27936db191232aefc57026309d4
[ "MIT" ]
2
2017-02-16T10:24:55.000Z
2018-08-14T09:58:17.000Z
sandpit_app/app_factory/web/java.py
mr-tim/sandpit
25ee43927b87b27936db191232aefc57026309d4
[ "MIT" ]
null
null
null
sandpit_app/app_factory/web/java.py
mr-tim/sandpit
25ee43927b87b27936db191232aefc57026309d4
[ "MIT" ]
null
null
null
import os.path import shutil import tempfile from app_factory.web import WebAppBuilder import docker DOCKERFILE = """FROM ubuntu:12.04 RUN echo "deb http://gb.archive.ubuntu.com/ubuntu precise main restricted" > /etc/apt/sources.list RUN echo "deb http://gb.archive.ubuntu.com/ubuntu precise-updates main restricted" >...
43.547619
107
0.697649
import os.path import shutil import tempfile from app_factory.web import WebAppBuilder import docker DOCKERFILE = """FROM ubuntu:12.04 RUN echo "deb http://gb.archive.ubuntu.com/ubuntu precise main restricted" > /etc/apt/sources.list RUN echo "deb http://gb.archive.ubuntu.com/ubuntu precise-updates main restricted" >...
true
true
1c134093b3f5c5530bcae73f9aa7ef50319454bd
6,916
py
Python
tests/test_device_control_policies.py
kra-ts/falconpy
c7c4ed93cb3b56cdfd86757f573fde57e4ccf857
[ "Unlicense" ]
null
null
null
tests/test_device_control_policies.py
kra-ts/falconpy
c7c4ed93cb3b56cdfd86757f573fde57e4ccf857
[ "Unlicense" ]
null
null
null
tests/test_device_control_policies.py
kra-ts/falconpy
c7c4ed93cb3b56cdfd86757f573fde57e4ccf857
[ "Unlicense" ]
null
null
null
""" test_device_control_poligies.py - This class tests the device_control_policies service class """ import os import sys import pytest # Authentication via the test_authorization.py from tests import test_authorization as Authorization # Import our sibling src folder into the path sys.path.append(os.path.abspath('src...
51.22963
144
0.539907
import os import sys import pytest from tests import test_authorization as Authorization sys.path.append(os.path.abspath('src')) from falconpy import DeviceControlPolicies auth = Authorization.TestAuthorization() config = auth.getConfigObject() falcon = DeviceControlPolicies(auth_object=config) AllowedResponses = [20...
true
true
1c1340a4aa2dfb68d5bd280e10c0739cc998703c
21,561
py
Python
core/models/stylegan/training_loop.py
tadangkhoa1999/HairstyleGAN
f202709f4f47a52391c53ef1ce86b9564a856d76
[ "MIT" ]
10
2021-05-10T14:20:44.000Z
2022-03-24T00:08:58.000Z
core/models/stylegan/training_loop.py
tadangkhoa1999/HairstyleGAN
f202709f4f47a52391c53ef1ce86b9564a856d76
[ "MIT" ]
2
2021-08-19T15:48:30.000Z
2022-01-18T15:31:44.000Z
core/models/stylegan/training_loop.py
tadangkhoa1999/HairstyleGAN
f202709f4f47a52391c53ef1ce86b9564a856d76
[ "MIT" ]
3
2021-09-19T10:47:54.000Z
2022-01-29T09:47:43.000Z
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this software and re...
51.092417
168
0.622374
 import os import time import copy import json import pickle import psutil import PIL.Image import numpy as np import torch import utils from utils.torch_utils import misc from utils.torch_utils import training_stats from utils.torch_utils.ops import conv2d_gradfix from utils.torch_utils.ops import grid_sample_gradfix...
false
true
1c13416a4d40043bbfa6a68f43cb8c7ae6337eeb
338
py
Python
OpenGLCffi/GL/EXT/AMD/name_gen_delete.py
cydenix/OpenGLCffi
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
[ "MIT" ]
null
null
null
OpenGLCffi/GL/EXT/AMD/name_gen_delete.py
cydenix/OpenGLCffi
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
[ "MIT" ]
null
null
null
OpenGLCffi/GL/EXT/AMD/name_gen_delete.py
cydenix/OpenGLCffi
c78f51ae5e6b655eb2ea98f072771cf69e2197f3
[ "MIT" ]
null
null
null
from OpenGLCffi.GL import params @params(api='gl', prms=['identifier', 'num', 'names']) def glGenNamesAMD(identifier, num, names): pass @params(api='gl', prms=['identifier', 'num', 'names']) def glDeleteNamesAMD(identifier, num, names): pass @params(api='gl', prms=['identifier', 'name']) def glIsNameAMD(identifie...
19.882353
54
0.692308
from OpenGLCffi.GL import params @params(api='gl', prms=['identifier', 'num', 'names']) def glGenNamesAMD(identifier, num, names): pass @params(api='gl', prms=['identifier', 'num', 'names']) def glDeleteNamesAMD(identifier, num, names): pass @params(api='gl', prms=['identifier', 'name']) def glIsNameAMD(identifie...
true
true
1c1341d1db2912acea9fa5ea30270a2f73ce7fc8
903
py
Python
benchmarking/frameworks/frameworks.py
jteller/FAI-PEP
73b8a08815675135e9da7d68375d1218cbd04eaa
[ "Apache-2.0" ]
1
2022-03-21T06:39:38.000Z
2022-03-21T06:39:38.000Z
benchmarking/frameworks/frameworks.py
EdenShin/FAI-PEP
54cf6a06c2116400f67fd7a994947ca892d22f8a
[ "Apache-2.0" ]
null
null
null
benchmarking/frameworks/frameworks.py
EdenShin/FAI-PEP
54cf6a06c2116400f67fd7a994947ca892d22f8a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ############################################################################## # Copyright 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. ################################...
28.21875
78
0.647841
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from .caffe2.caffe2 import Caffe2Framework from .generic.generic import GenericFramework from .oculus.oculus import OculusFramework from .tflite.tflite import TFLiteFra...
true
true
1c1342ebefb4e33250b2313ac5493458e5f42e37
1,563
py
Python
deepxde/losses.py
tangqi/deepxde
86fae8f971154557c775899d8389f514b6f09aa6
[ "Apache-2.0" ]
null
null
null
deepxde/losses.py
tangqi/deepxde
86fae8f971154557c775899d8389f514b6f09aa6
[ "Apache-2.0" ]
null
null
null
deepxde/losses.py
tangqi/deepxde
86fae8f971154557c775899d8389f514b6f09aa6
[ "Apache-2.0" ]
1
2021-02-12T21:58:34.000Z
2021-02-12T21:58:34.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf def mean_squared_error(y_true, y_pred): # Warning: # - Do not use ``tf.losses.mean_squared_error``, which casts `y_true` and `y_pred` to ``float32``. # - Do not use ``tf.ke...
36.348837
102
0.715931
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf def mean_squared_error(y_true, y_pred): return tf.reduce_mean(tf.math.square(y_true - y_pred)) def mean_absolute_percentage_error(y_true, y_pred): ret...
true
true
1c13446181cf78b15f5ab7889982c0ecd6549ce1
11,543
py
Python
muver/depth_distribution.py
david-a-parry/muver
db7ffcc873ed8d7cb6f9abdd898576eed8c3cb08
[ "MIT" ]
1
2019-09-19T23:37:03.000Z
2019-09-19T23:37:03.000Z
muver/depth_distribution.py
david-a-parry/muver
db7ffcc873ed8d7cb6f9abdd898576eed8c3cb08
[ "MIT" ]
5
2019-02-13T18:41:58.000Z
2020-05-22T16:28:41.000Z
muver/depth_distribution.py
david-a-parry/muver
db7ffcc873ed8d7cb6f9abdd898576eed8c3cb08
[ "MIT" ]
5
2017-09-07T18:50:24.000Z
2021-04-21T10:39:14.000Z
import numpy from scipy.stats import norm from scipy.optimize import curve_fit from utils import read_cnv_bedgraph from fitting import gaussian def calculate_depth_distribution(depths, output): ''' For a list of depths, create a histogram of depth values. Then fit those values using a normal ...
35.407975
86
0.498137
import numpy from scipy.stats import norm from scipy.optimize import curve_fit from utils import read_cnv_bedgraph from fitting import gaussian def calculate_depth_distribution(depths, output): depth_max = max(depths) hist = numpy.histogram(depths, bins=range(1, depth_max + 2), density=True) ...
true
true
1c134488074f153931eadab82e47437230dbf29d
9,296
py
Python
Src/CAN_Tests_Setup4.py
gliubenoff/DSOX2000_DSOX3000_automation-
95cfec2b8479e47a2fda98d1597a8f917fcbc087
[ "Unlicense" ]
null
null
null
Src/CAN_Tests_Setup4.py
gliubenoff/DSOX2000_DSOX3000_automation-
95cfec2b8479e47a2fda98d1597a8f917fcbc087
[ "Unlicense" ]
null
null
null
Src/CAN_Tests_Setup4.py
gliubenoff/DSOX2000_DSOX3000_automation-
95cfec2b8479e47a2fda98d1597a8f917fcbc087
[ "Unlicense" ]
null
null
null
""" CAN test Setup-4: CAN_28: Transceiver Delay Time at 500Kbps @ 23± 5°C (4.7nF) CAN_34: Bit Time Measurement at 500Kbps @ 23± 5°C / CAN_35: @ -40± 5°C / CAN_36: @ 85± 5°C (4.7nF) """ import keysight_DSOX2000A_3000A import os # address can be obtained from the device itmeasure_can pressing Utility -> IO. VISA address...
43.439252
117
0.736661
import keysight_DSOX2000A_3000A import os address = 'USB0::0x0957::0x1798::MY59124127::0::INSTR' results_path = f'C:\\Users\\glyubeno\\Desktop\\Volvo-Trucks\\Test_plan\\CAN\\VTNA-TestPlan\\2021-Nov\\CAN_BB2\\23C\\' if os.path.exists(results_path): pass else: os.makedirs(results_path) measure_can = keysight_D...
true
true
1c1344d787b88027ffaf4ac7d7efee6703dba2d7
3,843
bzl
Python
internal/go_repository_tools.bzl
Xjs/bazel-gazelle
72ba271916ca02aaaff72949dc0c0a63ab37d395
[ "Apache-2.0" ]
null
null
null
internal/go_repository_tools.bzl
Xjs/bazel-gazelle
72ba271916ca02aaaff72949dc0c0a63ab37d395
[ "Apache-2.0" ]
null
null
null
internal/go_repository_tools.bzl
Xjs/bazel-gazelle
72ba271916ca02aaaff72949dc0c0a63ab37d395
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 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...
31.5
96
0.644288
load("@io_bazel_rules_go//go/private:common.bzl", "env_execute", "executable_extension") load("@bazel_gazelle//internal:go_repository_cache.bzl", "read_cache_env") _GO_REPOSITORY_TOOLS_BUILD_FILE = """ package(default_visibility = ["//visibility:public"]) filegroup( name = "fetch_repo", srcs = ["bin/fetch_re...
true
true
1c13458986548ed30c6f2b91c7934faef5dbbe8d
39,254
py
Python
proxy/http/proxy/server.py
JerryKwan/proxy.py
57aa628920a34a7c67925911c333c0b744ed0303
[ "BSD-3-Clause" ]
null
null
null
proxy/http/proxy/server.py
JerryKwan/proxy.py
57aa628920a34a7c67925911c333c0b744ed0303
[ "BSD-3-Clause" ]
9
2021-12-10T01:22:33.000Z
2022-03-31T18:21:07.000Z
proxy/http/proxy/server.py
JerryKwan/proxy.py
57aa628920a34a7c67925911c333c0b744ed0303
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE...
40.096016
112
0.571916
import os import ssl import time import errno import socket import logging import threading import subprocess from typing import Optional, List, Union, Dict, cast, Any, Tuple from .plugin import HttpProxyBasePlugin from ..methods import httpMethods from ..codes import httpStatusCodes from ..plugin import HttpProtoco...
true
true
1c134780477ea8f5e68ee043397ae97c91c4b188
20,252
py
Python
shadowsocks/asyncdns.py
ohyeah521/shadowsocks_analysis
d9a3ea617a259833cb65cb515af96e30771e6f68
[ "MIT" ]
6
2020-02-12T17:01:11.000Z
2020-12-08T06:36:53.000Z
shadowsocks/asyncdns.py
ashtonhong/shadowsocks_analysis
d9a3ea617a259833cb65cb515af96e30771e6f68
[ "MIT" ]
null
null
null
shadowsocks/asyncdns.py
ashtonhong/shadowsocks_analysis
d9a3ea617a259833cb65cb515af96e30771e6f68
[ "MIT" ]
3
2020-01-23T13:19:27.000Z
2020-09-14T08:16:28.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014 clowwindy # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # ...
36.49009
79
0.493383
from __future__ import absolute_import, division, print_function, \ with_statement import time import os import socket import struct import re import logging import common, lru_cache, eventloop CACHE_SWEEP_INTERVAL = 30 VALID_HOSTNAME = re.compile(br"(?!-)[A-Z\d-]{1,63}(?<!-)$", re.IGNORECASE) common.patch_...
true
true
1c1348099b5c42eb434712aab006ed291d50efb6
2,100
py
Python
imagr_images/models.py
cewing/cfpydev-imagr
423ec9d9b38be990ab7dca027877e1c12f3d07fe
[ "MIT" ]
null
null
null
imagr_images/models.py
cewing/cfpydev-imagr
423ec9d9b38be990ab7dca027877e1c12f3d07fe
[ "MIT" ]
null
null
null
imagr_images/models.py
cewing/cfpydev-imagr
423ec9d9b38be990ab7dca027877e1c12f3d07fe
[ "MIT" ]
null
null
null
import datetime from django.conf import settings from django.db import models import os.path PRIVACY_LEVELS = ( (0, 'Private'), (1, 'Public'), ) def get_file_owner_username(instance, filename): "Calculate a storage path for this file instance" parts = [instance.owner.username] today = datetime.d...
29.577465
72
0.693333
import datetime from django.conf import settings from django.db import models import os.path PRIVACY_LEVELS = ( (0, 'Private'), (1, 'Public'), ) def get_file_owner_username(instance, filename): parts = [instance.owner.username] today = datetime.datetime.utcnow() parts.extend(map(unicode, [today....
true
true
1c1348212a09fb9b69fad1996838603cc34213e6
1,589
py
Python
app/core/tests/test_models.py
tp00012x/recipe-app
71f65f3aa2fe1b384ce1a30e4aa52c2d9f64d7a8
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
tp00012x/recipe-app
71f65f3aa2fe1b384ce1a30e4aa52c2d9f64d7a8
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
tp00012x/recipe-app
71f65f3aa2fe1b384ce1a30e4aa52c2d9f64d7a8
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model from core import models def sample_user(email='test@email.com', password='testpass'): """Create a sample user""" return get_user_model().objects.create_user(email, password) class ModelTests(TestCase): def test_create_user_...
30.557692
70
0.66331
from django.test import TestCase from django.contrib.auth import get_user_model from core import models def sample_user(email='test@email.com', password='testpass'): return get_user_model().objects.create_user(email, password) class ModelTests(TestCase): def test_create_user_with_email_successful(self): ...
true
true
1c1348d85836281cbe8f52feae6ee3aac71935eb
3,554
py
Python
tests/providers/pagerduty/hooks/test_pagerduty.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
7
2018-11-19T12:05:13.000Z
2020-01-17T08:30:38.000Z
tests/providers/pagerduty/hooks/test_pagerduty.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
210
2021-07-17T00:25:52.000Z
2021-12-29T00:44:48.000Z
tests/providers/pagerduty/hooks/test_pagerduty.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
3
2020-06-30T02:38:17.000Z
2022-01-19T06:14:08.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
36.639175
97
0.658132
import unittest import requests_mock from airflow.models import Connection from airflow.providers.pagerduty.hooks.pagerduty import PagerdutyHook from airflow.utils.session import provide_session DEFAULT_CONN_ID = "pagerduty_default" class TestPagerdutyHook(unittest.TestCase): @classmethod @provide_session ...
true
true
1c134a3fce87486d0876f885d846def1d6bfb4d8
20,680
py
Python
tensorflow_probability/python/distributions/mixture.py
renatoviolin/probability
557351a2b79e4bd5a9025e791c81b612ab17bf38
[ "Apache-2.0" ]
1
2020-11-08T17:03:46.000Z
2020-11-08T17:03:46.000Z
tensorflow_probability/python/distributions/mixture.py
etarakci-hvl/probability
7a0ce5e5beff91051028258dfbc7bc6cf0c4998d
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/mixture.py
etarakci-hvl/probability
7a0ce5e5beff91051028258dfbc7bc6cf0c4998d
[ "Apache-2.0" ]
1
2020-05-27T19:42:06.000Z
2020-05-27T19:42:06.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...
40.869565
116
0.677273
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow.compat.v2 as tf from tensorflow_probability.python.distributions import categorical from tensorflow_probability.python.distributions import distribution from tensorflow_pr...
true
true
1c134abf494b3581d1ffecc89bca2a1f377adc62
5,508
py
Python
docs/source/conf.py
JackLonergan97/fgspectra
ae450914bb12cbaa8d4b626e1a0842a6d8fa916d
[ "BSD-3-Clause" ]
null
null
null
docs/source/conf.py
JackLonergan97/fgspectra
ae450914bb12cbaa8d4b626e1a0842a6d8fa916d
[ "BSD-3-Clause" ]
null
null
null
docs/source/conf.py
JackLonergan97/fgspectra
ae450914bb12cbaa8d4b626e1a0842a6d8fa916d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
31.118644
79
0.645243
project = 'fgspectra' copyright = '2019, Davide Poletti, Max Abitbol, Zack Li' author = 'Davide Poletti, Max Abitbol, Zack Li' version = '0.1' release = '' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sp...
true
true
1c134bd87fb3a2c1d0e4e01f25982446176581b3
400
py
Python
tests/pyre/records/sanity.py
lijun99/pyre
004dfd4c06489b4ba5b32877338ca6440f2d523b
[ "BSD-3-Clause" ]
3
2019-08-02T21:02:47.000Z
2021-09-08T13:59:43.000Z
tests/pyre/records/sanity.py
lijun99/pyre
004dfd4c06489b4ba5b32877338ca6440f2d523b
[ "BSD-3-Clause" ]
null
null
null
tests/pyre/records/sanity.py
lijun99/pyre
004dfd4c06489b4ba5b32877338ca6440f2d523b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2019 all rights reserved # """ Sanity check: verify that the package is accessible """ def test(): import pyre.records return # main if __name__ == "__main__": # skip pyre initialization since we don't rely...
13.793103
67
0.635
def test(): import pyre.records return if __name__ == "__main__": pyre_noboot = True # do... test() # end of file
true
true
1c134ed78888192fe76f2b97bec9dba285823ded
510
py
Python
output/models/nist_data/list_pkg/unsigned_int/schema_instance/nistschema_sv_iv_list_unsigned_int_white_space_1_xsd/nistschema_sv_iv_list_unsigned_int_white_space_1.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/list_pkg/unsigned_int/schema_instance/nistschema_sv_iv_list_unsigned_int_white_space_1_xsd/nistschema_sv_iv_list_unsigned_int_white_space_1.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/list_pkg/unsigned_int/schema_instance/nistschema_sv_iv_list_unsigned_int_white_space_1_xsd/nistschema_sv_iv_list_unsigned_int_white_space_1.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from typing import List __NAMESPACE__ = "NISTSchema-SV-IV-list-unsignedInt-whiteSpace-1-NS" @dataclass class NistschemaSvIvListUnsignedIntWhiteSpace1: class Meta: name = "NISTSchema-SV-IV-list-unsignedInt-whiteSpace-1" namespace = "NISTSchema-SV-IV-list-un...
25.5
71
0.668627
from dataclasses import dataclass, field from typing import List __NAMESPACE__ = "NISTSchema-SV-IV-list-unsignedInt-whiteSpace-1-NS" @dataclass class NistschemaSvIvListUnsignedIntWhiteSpace1: class Meta: name = "NISTSchema-SV-IV-list-unsignedInt-whiteSpace-1" namespace = "NISTSchema-SV-IV-list-un...
true
true
1c134eed3b5c1133f18887309a6b9deafcfd8786
552
py
Python
examples/bitmap_font_label_simpletest.py
slootsky/Adafruit_CircuitPython_Bitmap_Font
51e9a1fa2ee2fb1d409c00ac5c514628c5e33532
[ "MIT" ]
null
null
null
examples/bitmap_font_label_simpletest.py
slootsky/Adafruit_CircuitPython_Bitmap_Font
51e9a1fa2ee2fb1d409c00ac5c514628c5e33532
[ "MIT" ]
null
null
null
examples/bitmap_font_label_simpletest.py
slootsky/Adafruit_CircuitPython_Bitmap_Font
51e9a1fa2ee2fb1d409c00ac5c514628c5e33532
[ "MIT" ]
null
null
null
""" This example uses addfruit_display_text.label to display text using a custom font loaded by adafruit_bitmap_font """ import board from adafruit_display_text import label from adafruit_bitmap_font import bitmap_font display = board.DISPLAY # Set text, font, and color text = "HELLO WORLD" font = bitmap_font.load_f...
19.034483
81
0.769928
import board from adafruit_display_text import label from adafruit_bitmap_font import bitmap_font display = board.DISPLAY text = "HELLO WORLD" font = bitmap_font.load_font("fonts/Arial-16.bdf") color = 0xFF00FF text_area = label.Label(font, text=text, color=color) text_area.x = 20 text_area.y = 20 display.show(te...
true
true
1c134f640bc3e5848409b495b42f7db8d425ae81
1,763
py
Python
Password Generator/passwordgenerator.py
kampy15/python-basic-project
a583eb553244babcb3c0ee2ea8a092fc7f94df7d
[ "Apache-2.0" ]
null
null
null
Password Generator/passwordgenerator.py
kampy15/python-basic-project
a583eb553244babcb3c0ee2ea8a092fc7f94df7d
[ "Apache-2.0" ]
null
null
null
Password Generator/passwordgenerator.py
kampy15/python-basic-project
a583eb553244babcb3c0ee2ea8a092fc7f94df7d
[ "Apache-2.0" ]
null
null
null
#importing Libraries from tkinter import * import random, string import pyperclip #initialize window root =Tk() root.geometry("400x250") root.resizable(0, 0) root.title("PASSWORD GENERATOR") root.configure(bg="#FFE873") root.iconbitmap("password.ico") #heading heading = Label(root, text = 'PASSWORD ...
28.901639
102
0.601815
from tkinter import * import random, string import pyperclip root =Tk() root.geometry("400x250") root.resizable(0, 0) root.title("PASSWORD GENERATOR") root.configure(bg="#FFE873") root.iconbitmap("password.ico") heading = Label(root, text = 'PASSWORD GENERATOR', font ='arial 15 bold', bg="#FFE873").pac...
true
true
1c13519447f39a4ad7681c89f32509c6526f8dd7
1,621
py
Python
runner/action/get/file/template.py
PC-Trip/runner
e13291e25a2bc2962523a1de2d13725609497cb5
[ "MIT" ]
null
null
null
runner/action/get/file/template.py
PC-Trip/runner
e13291e25a2bc2962523a1de2d13725609497cb5
[ "MIT" ]
null
null
null
runner/action/get/file/template.py
PC-Trip/runner
e13291e25a2bc2962523a1de2d13725609497cb5
[ "MIT" ]
null
null
null
import re from pathlib import Path from runner.action.get.file.file import File class Template(File): """Write to file with template Args: template (str): template or path to template file pattern (str): regex expression for wildcards output_path (str): path to output file re...
33.081633
79
0.554596
import re from pathlib import Path from runner.action.get.file.file import File class Template(File): def __init__(self, template, pattern='\$[^\s$]*\$', output_path=None, remove_template=False, **kwargs): super().__init__(**kwargs) self.template = template self.pattern =...
true
true
1c13521b10687c3de7ec3b81de77b8b56389234e
2,247
py
Python
src/insalata/model/Layer3Network.py
tumi8/INSALATA
e4c552023334f709b9586f664b7e049036133d33
[ "Apache-2.0" ]
6
2016-11-25T17:31:57.000Z
2018-02-15T16:39:38.000Z
src/insalata/model/Layer3Network.py
tumi8/INSALATA
e4c552023334f709b9586f664b7e049036133d33
[ "Apache-2.0" ]
null
null
null
src/insalata/model/Layer3Network.py
tumi8/INSALATA
e4c552023334f709b9586f664b7e049036133d33
[ "Apache-2.0" ]
null
null
null
from xml.etree.ElementTree import SubElement from insalata.model.Node import Node from insalata.helper import ipAddressHelper class Layer3Network(Node): def __init__(self, id, address, netmask, collectorName=None, timeout=None): Node.__init__(self, collectorName=collectorName, timeout=timeout) self...
35.666667
111
0.653761
from xml.etree.ElementTree import SubElement from insalata.model.Node import Node from insalata.helper import ipAddressHelper class Layer3Network(Node): def __init__(self, id, address, netmask, collectorName=None, timeout=None): Node.__init__(self, collectorName=collectorName, timeout=timeout) self...
true
true
1c13525ff2f7352724ed59b248b15542d9b7f030
1,682
py
Python
stencil_benchmarks/benchmarks_collection/__init__.py
gronerl/stencil_benchmarks
876725124f8ac253c009abad5ec71661d3e169d7
[ "BSD-3-Clause" ]
null
null
null
stencil_benchmarks/benchmarks_collection/__init__.py
gronerl/stencil_benchmarks
876725124f8ac253c009abad5ec71661d3e169d7
[ "BSD-3-Clause" ]
null
null
null
stencil_benchmarks/benchmarks_collection/__init__.py
gronerl/stencil_benchmarks
876725124f8ac253c009abad5ec71661d3e169d7
[ "BSD-3-Clause" ]
null
null
null
# Stencil Benchmarks # # Copyright (c) 2017-2020, ETH Zurich and MeteoSwiss # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright no...
46.722222
79
0.78478
from . import stencils, stream __all__ = ['stencils', 'stream']
true
true
1c135326ccd3aed565cd4652812dfada55945d76
502
py
Python
ArrayProblems/SubArrayHavingZeroSum.py
pritsheth/Algorithms-Python
b8af30cbf95a772c9b9b997a30ff2c8b56a040e0
[ "MIT" ]
null
null
null
ArrayProblems/SubArrayHavingZeroSum.py
pritsheth/Algorithms-Python
b8af30cbf95a772c9b9b997a30ff2c8b56a040e0
[ "MIT" ]
null
null
null
ArrayProblems/SubArrayHavingZeroSum.py
pritsheth/Algorithms-Python
b8af30cbf95a772c9b9b997a30ff2c8b56a040e0
[ "MIT" ]
null
null
null
# Print all subarray having sum 0 from collections import defaultdict # Hint: If we get the sum in hashmap again and we found our subarray. def printSubArray(nums): dict = defaultdict(list) sum = 0 dict[sum].append(-1) for index, n in enumerate(nums): sum += n if sum in dict: ...
23.904762
69
0.585657
from collections import defaultdict def printSubArray(nums): dict = defaultdict(list) sum = 0 dict[sum].append(-1) for index, n in enumerate(nums): sum += n if sum in dict: start_index = dict[sum] for i in start_index: print(i + 1, index) ...
true
true
1c1353ceaded396c51ba8da36e77a6c71b1e553b
15,800
py
Python
lib/vConTACT/vConTACT_utils/vConTACTUtils.py
qzzhang/vcontact
ae21b0d59d7189e34da9b57843c24622310f4a2a
[ "MIT" ]
null
null
null
lib/vConTACT/vConTACT_utils/vConTACTUtils.py
qzzhang/vcontact
ae21b0d59d7189e34da9b57843c24622310f4a2a
[ "MIT" ]
null
null
null
lib/vConTACT/vConTACT_utils/vConTACTUtils.py
qzzhang/vcontact
ae21b0d59d7189e34da9b57843c24622310f4a2a
[ "MIT" ]
null
null
null
import time import os import subprocess import csv import uuid from collections import OrderedDict from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from string import Template from pyparsing import Literal, SkipTo import pandas as pd from KBaseReport.KBaseReportClient import KBaseRepor...
39.5
128
0.584494
import time import os import subprocess import csv import uuid from collections import OrderedDict from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from string import Template from pyparsing import Literal, SkipTo import pandas as pd from KBaseReport.KBaseReportClient import KBaseRepor...
true
true
1c135425ef4a4bb033489d93666fb768b4715b5e
884
py
Python
migrations/versions/cf0a66204a5b_ajout_codes_postaux.py
betagouv/indice_pollution
112f262397686110475ed360101b311e76d5d914
[ "MIT" ]
2
2020-09-02T20:17:22.000Z
2022-03-04T21:06:28.000Z
migrations/versions/cf0a66204a5b_ajout_codes_postaux.py
betagouv/indice_pollution
112f262397686110475ed360101b311e76d5d914
[ "MIT" ]
34
2020-08-13T11:47:13.000Z
2022-03-31T08:05:37.000Z
migrations/versions/cf0a66204a5b_ajout_codes_postaux.py
betagouv/indice_pollution
112f262397686110475ed360101b311e76d5d914
[ "MIT" ]
2
2020-03-26T17:15:03.000Z
2020-08-10T08:23:20.000Z
"""Ajout codes postaux Revision ID: cf0a66204a5b Revises: 86740594ef44 Create Date: 2021-09-15 17:02:53.780143 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql import requests # revision identifiers, used by Alembic. revision = 'cf0a66204a5b' down_revision = '86740594ef44...
27.625
126
0.714932
from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql import requests revision = 'cf0a66204a5b' down_revision = '86740594ef44' branch_labels = None depends_on = None def upgrade(): op.add_column('commune', sa.Column('codes_postaux', postgresql.ARRAY(sa.String()), nullable=True...
true
true
1c13546b1c6c4e2e9ab759e47d51e63931aee19f
1,688
py
Python
page_objects/PageFactory.py
RajkumarQxf2/DunzoTest
b905baaad68982230f8f5f6bfbd41043e6cade26
[ "MIT" ]
1
2020-04-16T11:18:21.000Z
2020-04-16T11:18:21.000Z
page_objects/PageFactory.py
RajkumarQxf2/DunzoTest
b905baaad68982230f8f5f6bfbd41043e6cade26
[ "MIT" ]
null
null
null
page_objects/PageFactory.py
RajkumarQxf2/DunzoTest
b905baaad68982230f8f5f6bfbd41043e6cade26
[ "MIT" ]
null
null
null
""" PageFactory uses the factory design pattern. get_page_object() returns the appropriate page object. Add elif clauses as and when you implement new pages. Pages implemented so far: 1. Tutorial main page 2. Tutorial redirect page 3. Contact Page 4. Bitcoin main page 5. Bitcoin price page """ from page_objects.zero_...
39.255814
76
0.742891
from page_objects.zero_mobile_page import Zero_Mobile_Page from page_objects.zero_page import Zero_Page from page_objects.dunzo_main_page import Dunzo_Main_Page from page_objects.dunzo_category_order_page import Dunzo_Category_Order_Page from page_objects.dunzo_partner_page import Dunzo_Partner_Page from page_objects....
true
true
1c135491dee836b7dbc74ce9e37c650d46806c64
8,020
py
Python
docs/source/conf.py
MarcosFernandez/gemtools
b17c4b973e57bbceafe72b6f81b2d4395eaa3b4a
[ "CNRI-Python" ]
14
2015-01-06T20:25:01.000Z
2021-06-17T20:35:34.000Z
docs/source/conf.py
MarcosFernandez/gemtools
b17c4b973e57bbceafe72b6f81b2d4395eaa3b4a
[ "CNRI-Python" ]
20
2015-01-23T15:02:35.000Z
2020-05-17T03:25:35.000Z
docs/source/conf.py
MarcosFernandez/gemtools
b17c4b973e57bbceafe72b6f81b2d4395eaa3b4a
[ "CNRI-Python" ]
7
2015-11-09T18:30:14.000Z
2020-04-08T13:53:30.000Z
# -*- coding: utf-8 -*- # # GEMTools documentation build configuration file, created by # sphinx-quickstart on Tue Feb 19 21:09:00 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
31.825397
90
0.715711
import sys, os sys.path.insert(0, os.path.abspath('../python')) extensions = ['sphinxtogithub', 'sphinx.ext.autodoc', 'sphinx.ext.coverage', 'breathe'] breathe_projects = { "gt": "doxygen/xml" } breathe_default_project = "gt" templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' pro...
true
true
1c135506456f9ac22d94ec3144b249aa76e2b5a7
4,107
py
Python
trace.py
green-s/ESRGAN
fe9d5a8b613325f7b318d8f036123e3e2cc713c5
[ "Apache-2.0" ]
null
null
null
trace.py
green-s/ESRGAN
fe9d5a8b613325f7b318d8f036123e3e2cc713c5
[ "Apache-2.0" ]
null
null
null
trace.py
green-s/ESRGAN
fe9d5a8b613325f7b318d8f036123e3e2cc713c5
[ "Apache-2.0" ]
null
null
null
import os import cv2 import numpy as np import torch import architecture as arch import argparse from pathlib import Path def parse_args(): parser = argparse.ArgumentParser(description="Convert models to TorchScript") parser.add_argument( "models", nargs="*", type=Path, help="T...
29.335714
93
0.550767
import os import cv2 import numpy as np import torch import architecture as arch import argparse from pathlib import Path def parse_args(): parser = argparse.ArgumentParser(description="Convert models to TorchScript") parser.add_argument( "models", nargs="*", type=Path, help="T...
true
true
1c1355178427ea88379838eae30f9eb250c401f8
119
py
Python
rmgpy/test_data/testing_database/kinetics/families/Baeyer-Villiger_step1_cat/rules.py
pw0908/RMG-Py
3846fcce701f2a5fd12dbfa429687e9fcd647298
[ "MIT" ]
1
2022-01-24T05:08:32.000Z
2022-01-24T05:08:32.000Z
rmgpy/test_data/testing_database/kinetics/families/Baeyer-Villiger_step1_cat/rules.py
pw0908/RMG-Py
3846fcce701f2a5fd12dbfa429687e9fcd647298
[ "MIT" ]
72
2016-06-06T18:18:49.000Z
2019-11-17T03:21:10.000Z
rmgpy/test_data/testing_database/kinetics/families/Baeyer-Villiger_step1_cat/rules.py
pw0908/RMG-Py
3846fcce701f2a5fd12dbfa429687e9fcd647298
[ "MIT" ]
3
2017-09-22T15:47:37.000Z
2021-12-30T23:51:47.000Z
#!/usr/bin/env python # encoding: utf-8 name = "Baeyer-Villiger_step1_cat/rules" shortDesc = u"" longDesc = u""" """
13.222222
40
0.663866
name = "Baeyer-Villiger_step1_cat/rules" shortDesc = u"" longDesc = u""" """
true
true
1c135572215afdd68ada781d6da17a50cb7461a3
8,785
py
Python
google-cloud-sdk/lib/googlecloudsdk/third_party/apis/compute/beta/resources.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/lib/googlecloudsdk/third_party/apis/compute/beta/resources.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/lib/googlecloudsdk/third_party/apis/compute/beta/resources.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
3
2017-07-27T18:44:13.000Z
2020-07-25T17:48:53.000Z
# Copyright 2015 Google Inc. 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 law or ag...
27.282609
77
0.602049
import enum BASE_URL = 'https://www.googleapis.com/compute/beta/' class Collections(enum.Enum): ACCELERATORTYPES = ( 'acceleratorTypes', 'projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}', {}, [u'project', u'zone', u'acceleratorType'] ) ADDRESSES = ( 'addresse...
true
true
1c1355f55b54fd84fe2f541d586e85233821a617
791
py
Python
resize.py
miroslaw-bitcart/python-image-processing
3cf3ea3af139ea18ccc74856968ce1a2db38af5c
[ "MIT" ]
1
2020-08-07T08:55:48.000Z
2020-08-07T08:55:48.000Z
resize.py
txcommit20/python-image-processing
3cf3ea3af139ea18ccc74856968ce1a2db38af5c
[ "MIT" ]
null
null
null
resize.py
txcommit20/python-image-processing
3cf3ea3af139ea18ccc74856968ce1a2db38af5c
[ "MIT" ]
1
2017-12-19T18:24:53.000Z
2017-12-19T18:24:53.000Z
# -*- coding: utf-8 -*- import cv2 import sys import numpy as np def resize(src, w_ratio, h_ratio): height = src.shape[0] width = src.shape[1] dst = cv2.resize(src,(width/100*w_ratio,height/100*h_ratio)) return dst if __name__ == '__main__': param = sys.argv if (len(param) != 4): print...
23.264706
85
0.587863
import cv2 import sys import numpy as np def resize(src, w_ratio, h_ratio): height = src.shape[0] width = src.shape[1] dst = cv2.resize(src,(width/100*w_ratio,height/100*h_ratio)) return dst if __name__ == '__main__': param = sys.argv if (len(param) != 4): print ("Usage: $ python " + p...
true
true
1c1356013dde3f9930e1bec595603066bfd82cc9
365
py
Python
nahamconctf/2021/ngrocket/client.py
kza42/ctf
f7c5c935effa1c43d268f25ffc6722425736b031
[ "MIT" ]
null
null
null
nahamconctf/2021/ngrocket/client.py
kza42/ctf
f7c5c935effa1c43d268f25ffc6722425736b031
[ "MIT" ]
null
null
null
nahamconctf/2021/ngrocket/client.py
kza42/ctf
f7c5c935effa1c43d268f25ffc6722425736b031
[ "MIT" ]
1
2021-04-13T09:20:19.000Z
2021-04-13T09:20:19.000Z
#!/usr/bin/env python3 import time from pwn import * target = b'HOST:PORT' while True: conn = remote('challenge.nahamcon.com', 0) conn.recv() conn.recv() conn.send(target) data = conn.recvuntil(b'ngrocket') print(data) conn.close() time.sleep(0.1) local = remote('localhost', 4...
14.6
46
0.619178
import time from pwn import * target = b'HOST:PORT' while True: conn = remote('challenge.nahamcon.com', 0) conn.recv() conn.recv() conn.send(target) data = conn.recvuntil(b'ngrocket') print(data) conn.close() time.sleep(0.1) local = remote('localhost', 4444) local.send(da...
true
true
1c13563394d7e58e887ea43d7409939c2b92a3a3
1,555
py
Python
setup.py
EdisonLeeeee/graphadv
bff372768b4082af95de9e576c7083ba42773666
[ "MIT" ]
5
2020-08-01T15:54:58.000Z
2021-12-15T10:47:45.000Z
setup.py
EdisonLeeeee/graphadv
bff372768b4082af95de9e576c7083ba42773666
[ "MIT" ]
5
2020-11-13T19:01:52.000Z
2022-02-10T02:02:34.000Z
setup.py
EdisonLeeeee/graphadv
bff372768b4082af95de9e576c7083ba42773666
[ "MIT" ]
2
2020-10-12T08:31:06.000Z
2020-12-14T08:24:57.000Z
#!/usr/bin/env python # coding: utf-8 try: import graphgallery except ImportError: raise ImportError("No module named 'graphgallery'. Please install it first! Using 'pip install graphgallery -U'.") from setuptools import setup, find_packages from graphadv import __version__ VERSION = __version__ url = 'ht...
27.767857
118
0.654019
try: import graphgallery except ImportError: raise ImportError("No module named 'graphgallery'. Please install it first! Using 'pip install graphgallery -U'.") from setuptools import setup, find_packages from graphadv import __version__ VERSION = __version__ url = 'https://github.com/EdisonLeeeee/GraphgAd...
true
true
1c13563fe968740382bb424fac0152cf37d32db6
3,048
py
Python
checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py
tmpick/checkov
014028555714564edbaa28229381627bc94ade5c
[ "Apache-2.0" ]
null
null
null
checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py
tmpick/checkov
014028555714564edbaa28229381627bc94ade5c
[ "Apache-2.0" ]
null
null
null
checkov/terraform/checks/resource/aws/AbsNACLUnrestrictedIngress.py
tmpick/checkov
014028555714564edbaa28229381627bc94ade5c
[ "Apache-2.0" ]
null
null
null
from checkov.common.models.enums import CheckResult, CheckCategories from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck from checkov.common.util.type_forcers import force_list from checkov.common.util.type_forcers import force_int class AbsNACLUnrestrictedIngress(BaseResourceCheck): ...
42.929577
112
0.576772
from checkov.common.models.enums import CheckResult, CheckCategories from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck from checkov.common.util.type_forcers import force_list from checkov.common.util.type_forcers import force_int class AbsNACLUnrestrictedIngress(BaseResourceCheck): ...
true
true
1c135787f9a71457cec015f0a58184ff08ed87bf
737
py
Python
tools/syntax-parser/tikz_picture/__init__.py
thoth-tech/programming-arcana
bb5c0d45355bf710eff01947e67b666122901b07
[ "CC-BY-4.0" ]
1
2021-08-10T04:50:54.000Z
2021-08-10T04:50:54.000Z
tools/syntax-parser/tikz_picture/__init__.py
thoth-tech/programming-arcana
bb5c0d45355bf710eff01947e67b666122901b07
[ "CC-BY-4.0" ]
1
2021-12-29T19:45:10.000Z
2021-12-29T19:45:10.000Z
tools/syntax-parser/tikz_picture/__init__.py
macite/programming-arcana
8f3040983d420129f90bcc4bd69a96d8743c412c
[ "CC-BY-4.0" ]
6
2020-06-02T03:18:37.000Z
2022-03-24T07:42:53.000Z
#!/usr/bin/env python # encoding: utf-8 """ __init__.py Created by Andrew Cain on 2011-04-06. Copyright (c) 2009 Swinburne. All rights reserved. """ import sys import os #------------------ def main(): '''Load all of the files in this directory into attributes of this module.''' (path, script_file) = os.pat...
22.333333
81
0.56038
import sys import os def main(): (path, script_file) = os.path.split(sys.modules[__name__].__file__) dirList=os.listdir(path) for f in dirList: if '.py' in f or f[0] == '.' : continue (dirName, fileName) = os.path.split(f) key = fileName.replace('.', '_') ...
true
true