hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7f95f9615b05c360f3b746d960b369e9ed3a45d
1,570
py
Python
hddm/models/hddm_truncated.py
hddm-devs/hddm
fe119ec9834d56c78f8ee3cb59a616c8a5d082bf
[ "BSD-2-Clause-FreeBSD" ]
155
2015-01-10T22:44:55.000Z
2022-03-27T00:39:33.000Z
hddm/models/hddm_truncated.py
hddm-devs/hddm
fe119ec9834d56c78f8ee3cb59a616c8a5d082bf
[ "BSD-2-Clause-FreeBSD" ]
38
2015-09-26T11:48:56.000Z
2022-02-18T04:53:51.000Z
hddm/models/hddm_truncated.py
hddm-devs/hddm
fe119ec9834d56c78f8ee3cb59a616c8a5d082bf
[ "BSD-2-Clause-FreeBSD" ]
97
2015-01-21T09:03:41.000Z
2022-03-26T13:12:15.000Z
from collections import OrderedDict from hddm.models import HDDMBase class HDDMTruncated(HDDMBase): def _create_stochastic_knodes(self, include): knodes = OrderedDict() if "a" in include: knodes.update( self._create_family_trunc_normal("a", lower=1e-3, upper=1e3, value...
34.888889
88
0.543949
from collections import OrderedDict from hddm.models import HDDMBase class HDDMTruncated(HDDMBase): def _create_stochastic_knodes(self, include): knodes = OrderedDict() if "a" in include: knodes.update( self._create_family_trunc_normal("a", lower=1e-3, upper=1e3, value...
true
true
f7f9600f84f07b15d9cbc2fb0ec3ee0ce608c06f
922
py
Python
bots/iam_group_delete_inline_policy.py
chkp-stuartgreen/cloud-bots
9ee36270675cb4efc1022bfec2013a7dce7ae8ca
[ "BSD-3-Clause" ]
68
2019-09-26T10:25:35.000Z
2022-03-27T01:32:46.000Z
bots/iam_group_delete_inline_policy.py
chkp-stuartgreen/cloud-bots
9ee36270675cb4efc1022bfec2013a7dce7ae8ca
[ "BSD-3-Clause" ]
18
2020-02-17T16:30:47.000Z
2021-09-26T14:14:54.000Z
bots/iam_group_delete_inline_policy.py
chkp-stuartgreen/cloud-bots
9ee36270675cb4efc1022bfec2013a7dce7ae8ca
[ "BSD-3-Clause" ]
42
2019-10-03T19:31:42.000Z
2022-03-21T19:29:12.000Z
""" ## iam_group_delete_inline_group What it does: Deletes a inline policy attached to iam group Usage: AUTO: iam_group_delete_inline_group Limitations: none """ import boto3 from botocore.exceptions import ClientError def run_action(session, rule, entity, params): iam_resource = session.resource('iam') iam_g...
31.793103
77
0.67679
import boto3 from botocore.exceptions import ClientError def run_action(session, rule, entity, params): iam_resource = session.resource('iam') iam_group = iam_resource.Group(entity['name']) inline_policies = [policy['name'] for policy in entity['inlinePolicies']] try: text_output = "" ...
true
true
f7f96074843d793b73779707a2acd560569b5b85
775
py
Python
conftest.py
DataFinnovation/Arelle
d4bf45f56fc9249f75ab22e6217dbe55f0510841
[ "Apache-2.0" ]
292
2015-01-27T03:31:51.000Z
2022-03-26T07:00:05.000Z
conftest.py
DataFinnovation/Arelle
d4bf45f56fc9249f75ab22e6217dbe55f0510841
[ "Apache-2.0" ]
94
2015-04-18T23:03:00.000Z
2022-03-28T17:24:55.000Z
conftest.py
DataFinnovation/Arelle
d4bf45f56fc9249f75ab22e6217dbe55f0510841
[ "Apache-2.0" ]
200
2015-01-13T03:55:47.000Z
2022-03-29T12:38:56.000Z
''' Created on May 14,2012 Use this module to start Arelle in py.test modes @author: Mark V Systems Limited (c) Copyright 2012 Mark V Systems Limited, All rights reserved. This module supports the conformance tests to validate that Arelle is working properly. See arelle_test.py. ''' import os def pytest_addoptio...
32.291667
105
0.597419
import os def pytest_addoption(parser): tests_default = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.path.join('arelle', os.path.join('config', 'arelle_test.ini'...
true
true
f7f96088b00b62928af84ce163584586cc34a11e
5,026
py
Python
mordl/feat_tagger_model.py
fostroll/mordl
992d724f43709483901dd55d1f9aa80791dbccb2
[ "BSD-3-Clause" ]
5
2020-07-27T05:38:17.000Z
2021-12-30T09:44:07.000Z
mordl/feat_tagger_model.py
fostroll/mordl
992d724f43709483901dd55d1f9aa80791dbccb2
[ "BSD-3-Clause" ]
null
null
null
mordl/feat_tagger_model.py
fostroll/mordl
992d724f43709483901dd55d1f9aa80791dbccb2
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # MorDL project: NE tagger model # # Copyright (C) 2020-present by Sergei Ternovykh, Anastasiya Nikiforova # License: BSD, see LICENSE for details """ Provides FEAT tagger model inherited from `mordl.BaseTaggerModel`. """ from collections.abc import Iterable from junky import get_func_params fro...
43.327586
79
0.672503
from collections.abc import Iterable from junky import get_func_params from mordl.base_tagger_model import BaseTaggerModel from mordl.defaults import CONFIG_ATTR class FeatTaggerModel(BaseTaggerModel): def __init__(self, num_labels, labels_pad_idx=-100, vec_emb_dim=None, alphabet_size=0, cha...
true
true
f7f960c892da708be89832a6e7d3ee2cfb58ff29
5,775
py
Python
docs/source/conf.py
5amessi/camel_tools
4349f8ccda2cc5d017d3bd5683847cf92bbb1229
[ "MIT" ]
211
2019-03-26T02:56:16.000Z
2022-03-26T10:39:47.000Z
docs/source/conf.py
5amessi/camel_tools
4349f8ccda2cc5d017d3bd5683847cf92bbb1229
[ "MIT" ]
51
2019-09-11T09:41:02.000Z
2022-03-30T06:15:28.000Z
docs/source/conf.py
5amessi/camel_tools
4349f8ccda2cc5d017d3bd5683847cf92bbb1229
[ "MIT" ]
49
2018-12-27T06:58:05.000Z
2022-03-12T18:21:50.000Z
# -*- 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 ------------------------------------------------------------...
29.020101
79
0.645714
from recommonmark.parser import CommonMarkParser project = 'camel_tools' copyright = '2018-2021, New York University Abu Dhabi' author = 'Ossama W. Obeid' version = '1.2' release = '1.2.0' extensions = [ 'sphinx.ext.napoleon', 'sphinx.ext.autodoc', 'sphinx.ext.githubpage...
true
true
f7f961931e4e2947a74e29289b0e354d789d7bdc
5,338
py
Python
generate.py
BookML/stylegan2-ada-pytorch
d4b2afe9c27e3c305b721bc886d2cb5229458eba
[ "BSD-Source-Code" ]
1,054
2020-06-19T01:32:35.000Z
2022-03-28T20:01:49.000Z
generate.py
BookML/stylegan2-ada-pytorch
d4b2afe9c27e3c305b721bc886d2cb5229458eba
[ "BSD-Source-Code" ]
88
2020-06-20T01:57:42.000Z
2022-03-31T23:45:04.000Z
generate.py
BookML/stylegan2-ada-pytorch
d4b2afe9c27e3c305b721bc886d2cb5229458eba
[ "BSD-Source-Code" ]
155
2020-06-19T02:45:43.000Z
2022-03-29T19:53:44.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 rel...
41.061538
132
0.630948
import os import re from typing import List, Optional import click import dnnlib import numpy as np import PIL.Image import torch import legacy def num_range(s: str) -> List[int]: range_re = re.compile(r'^(\d+)-(\d+)$') m = range_re.match(s) if m: return list(range(int(m.group(1)), in...
true
true
f7f962fa41091aafdd1ac460ba5ee9435454c33e
7,832
py
Python
contrib/bitrpc/bitrpc.py
bitfawkes/eGold
2190beebd747a8ba4e34d39a7e945c72899f7666
[ "MIT" ]
null
null
null
contrib/bitrpc/bitrpc.py
bitfawkes/eGold
2190beebd747a8ba4e34d39a7e945c72899f7666
[ "MIT" ]
null
null
null
contrib/bitrpc/bitrpc.py
bitfawkes/eGold
2190beebd747a8ba4e34d39a7e945c72899f7666
[ "MIT" ]
null
null
null
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9332") else: access = Ser...
24.098462
79
0.668029
from jsonrpc import ServiceProxy import sys import string rpcuser = "" rpcpass = "" if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9332") else: access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:9332") cmd = sys.argv[1].lower() if cmd == "backupwallet": try: path = raw_input("Enter d...
false
true
f7f9630dcfbb72ebf97d11826e56c1f315b8b6ab
16,981
py
Python
src/dispatch/plugins/dispatch_slack/events.py
KATO-Hiro/dispatch
d41f42c0ecf47c5c9012fc6d22046a8124bb7596
[ "Apache-2.0" ]
null
null
null
src/dispatch/plugins/dispatch_slack/events.py
KATO-Hiro/dispatch
d41f42c0ecf47c5c9012fc6d22046a8124bb7596
[ "Apache-2.0" ]
null
null
null
src/dispatch/plugins/dispatch_slack/events.py
KATO-Hiro/dispatch
d41f42c0ecf47c5c9012fc6d22046a8124bb7596
[ "Apache-2.0" ]
null
null
null
import pytz import logging import datetime from typing import List from pydantic import BaseModel from sqlalchemy import func from sqlalchemy.sql.functions import user from dispatch.nlp import build_phrase_matcher, build_term_vocab, extract_terms_from_text from dispatch.conversation import service as conversation_ser...
35.599581
210
0.611271
import pytz import logging import datetime from typing import List from pydantic import BaseModel from sqlalchemy import func from sqlalchemy.sql.functions import user from dispatch.nlp import build_phrase_matcher, build_term_vocab, extract_terms_from_text from dispatch.conversation import service as conversation_ser...
true
true
f7f96352842d13a838c3183d27862860ba1a89c1
568
py
Python
bdc_collection_builder/blueprint.py
rodolfolotte/bdc-collection-builder
62583f6c25bca79e7e1b5503bc6308298838c877
[ "MIT" ]
null
null
null
bdc_collection_builder/blueprint.py
rodolfolotte/bdc-collection-builder
62583f6c25bca79e7e1b5503bc6308298838c877
[ "MIT" ]
null
null
null
bdc_collection_builder/blueprint.py
rodolfolotte/bdc-collection-builder
62583f6c25bca79e7e1b5503bc6308298838c877
[ "MIT" ]
null
null
null
# # This file is part of Brazil Data Cube Collection Builder. # Copyright (C) 2019-2020 INPE. # # Brazil Data Cube Collection Builder is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. # """Define Brazil Data Cube Scripts Blueprint strate...
27.047619
96
0.771127
from flask import Blueprint from flask_restplus import Api from .collections.controller import api as radcor_ns bp = Blueprint('bdc_collection_builder', __name__, url_prefix='/api') api = Api(bp, doc=False) api.add_namespace(radcor_ns)
true
true
f7f968fe5bc66e4b54b01da42710d70c4059ce43
522
py
Python
things/urls.py
kylehoac/DjangoX_Lab
ec4f5c3e595c7d91aeeddfdcb8cad40243d91758
[ "MIT" ]
null
null
null
things/urls.py
kylehoac/DjangoX_Lab
ec4f5c3e595c7d91aeeddfdcb8cad40243d91758
[ "MIT" ]
null
null
null
things/urls.py
kylehoac/DjangoX_Lab
ec4f5c3e595c7d91aeeddfdcb8cad40243d91758
[ "MIT" ]
null
null
null
from django.urls import path from .views import ( ThingListView, ThingDetailView, ThingCreateView, ThingUpdateView, ThingDeleteView ) urlpatterns = [ path('', ThingListView.as_view(), name='thing_list'), path('<int:pk>/',ThingDetailView.as_view(), name='thing_detail'), path('create/',Th...
32.625
76
0.693487
from django.urls import path from .views import ( ThingListView, ThingDetailView, ThingCreateView, ThingUpdateView, ThingDeleteView ) urlpatterns = [ path('', ThingListView.as_view(), name='thing_list'), path('<int:pk>/',ThingDetailView.as_view(), name='thing_detail'), path('create/',Th...
true
true
f7f969c00bb76b4b3919c34f0a9081ad3cbee407
5,080
py
Python
tests/resources/serializers/test_csl_serializer.py
utnapischtim/invenio-rdm-records
436bd2f4f6a75713db87ebf19d9cb962176d3899
[ "MIT" ]
10
2020-01-17T10:13:09.000Z
2022-03-17T10:14:41.000Z
tests/resources/serializers/test_csl_serializer.py
utnapischtim/invenio-rdm-records
436bd2f4f6a75713db87ebf19d9cb962176d3899
[ "MIT" ]
570
2019-08-15T16:35:25.000Z
2022-03-31T13:46:17.000Z
tests/resources/serializers/test_csl_serializer.py
utnapischtim/invenio-rdm-records
436bd2f4f6a75713db87ebf19d9cb962176d3899
[ "MIT" ]
57
2019-09-04T09:25:29.000Z
2022-03-30T19:32:55.000Z
# -*- coding: utf-8 -*- # # Copyright (C) 2021 CERN. # # Invenio-RDM-Records is free software; you can redistribute it and/or modify # it under the terms of the MIT License; see LICENSE file for more details. """Resources serializers tests.""" from copy import deepcopy from citeproc_styles import get_style_filepath ...
33.421053
78
0.658465
from copy import deepcopy from citeproc_styles import get_style_filepath from invenio_rdm_records.proxies import current_rdm_records from invenio_rdm_records.records.api import RDMRecord from invenio_rdm_records.resources.serializers import CSLJSONSerializer, \ StringCitationSerializer from invenio_rdm_re...
true
true
f7f969c1a6ac200c2d56dd055a94745f011c80dd
1,479
py
Python
andrew/generategenomes.py
ajclaros/rl_legged_walker
26d0e124ef38045943449c2772b966571117683b
[ "MIT" ]
null
null
null
andrew/generategenomes.py
ajclaros/rl_legged_walker
26d0e124ef38045943449c2772b966571117683b
[ "MIT" ]
null
null
null
andrew/generategenomes.py
ajclaros/rl_legged_walker
26d0e124ef38045943449c2772b966571117683b
[ "MIT" ]
null
null
null
import numpy as np import os from fitnessFunction import fitnessFunction import pandas as pd #filename = "two_neuron-step1.npy" genome_arr = np.load(filename) best = genome_arr[3] #index = 0 select_genome = 7 #lower_fitness = np.load("./genomes/scalinggenome-{select_genome}.npy") # uncomment to generate new scaling g...
32.866667
92
0.617309
import numpy as np import os from fitnessFunction import fitnessFunction import pandas as pd genome_arr = np.load(filename) best = genome_arr[3] select_genome = 7 for j in range(1): print(j) points = [0.6, 0.5, 0.4, 0.3, 0.2, 0.1] for i in range(10000): save_fitn...
true
true
f7f969d3f63f785ff953f69cad230024a7cf5eae
243
py
Python
PyEvolv/assets/font.py
peerlator/PyEvolv
7f5644e2ea22257f34547c9b050bc4cdd4f3bdec
[ "MIT" ]
1
2018-08-02T19:42:35.000Z
2018-08-02T19:42:35.000Z
PyEvolv/assets/font.py
peerlator/PyEvolv
7f5644e2ea22257f34547c9b050bc4cdd4f3bdec
[ "MIT" ]
1
2018-08-02T19:41:58.000Z
2018-08-05T17:53:17.000Z
PyEvolv/assets/font.py
peerlator/PyEvolv
7f5644e2ea22257f34547c9b050bc4cdd4f3bdec
[ "MIT" ]
null
null
null
import pygame import PyEvolv import os pygame.font.init() path = os.path.join(PyEvolv.__path__[0], 'assets', 'Arial.ttf') FONT = pygame.font.Font(path, 20) def get_font(size:int) -> pygame.font.Font: return pygame.font.Font(path, size)
20.25
63
0.720165
import pygame import PyEvolv import os pygame.font.init() path = os.path.join(PyEvolv.__path__[0], 'assets', 'Arial.ttf') FONT = pygame.font.Font(path, 20) def get_font(size:int) -> pygame.font.Font: return pygame.font.Font(path, size)
true
true
f7f96bd1f2cdb6be9177a9e421651ecb01b38e5c
1,529
py
Python
engine/config_storage.py
hive-engine/distribution-engine-smt
9ed4fddbae17342700a4ba0f24c667c8b853c793
[ "MIT" ]
null
null
null
engine/config_storage.py
hive-engine/distribution-engine-smt
9ed4fddbae17342700a4ba0f24c667c8b853c793
[ "MIT" ]
null
null
null
engine/config_storage.py
hive-engine/distribution-engine-smt
9ed4fddbae17342700a4ba0f24c667c8b853c793
[ "MIT" ]
null
null
null
# This Python file uses the following encoding: utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import bytes from builtins import object from beemgraphenebase.py23 import py23_bytes, bytes_types from...
25.915254
62
0.734467
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import bytes from builtins import object from beemgraphenebase.py23 import py23_bytes, bytes_types from sqlalchemy.dialects.postgresql import insert as pg_i...
true
true
f7f96c62879766d126c79a1e1f6e5517705c2a98
1,628
py
Python
backend/main.py
le-kag/Fast-API-backend
1693c293ddf4a7060a9a1604f7d189c6a81ff48d
[ "MIT" ]
null
null
null
backend/main.py
le-kag/Fast-API-backend
1693c293ddf4a7060a9a1604f7d189c6a81ff48d
[ "MIT" ]
null
null
null
backend/main.py
le-kag/Fast-API-backend
1693c293ddf4a7060a9a1604f7d189c6a81ff48d
[ "MIT" ]
null
null
null
from fastapi import FastAPI, HTTPException from fastapi.middleware.cors import CORSMiddleware from model import Todo app = FastAPI() from database import ( fetch_one_todo, fetch_all_todos, create_todo, update_todo, remove_todo ) origins = ['https://localhost:3000'] app.add_midd...
26.688525
73
0.670147
from fastapi import FastAPI, HTTPException from fastapi.middleware.cors import CORSMiddleware from model import Todo app = FastAPI() from database import ( fetch_one_todo, fetch_all_todos, create_todo, update_todo, remove_todo ) origins = ['https://localhost:3000'] app.add_midd...
true
true
f7f96c7d03d0113e3a094765f6a9a9e0330e097d
14,456
py
Python
openpype/hosts/standalonepublisher/plugins/publish/extract_harmony_zip.py
dangerstudios/OpenPype
10ddcc4699137888616eec57cd7fac9648189714
[ "MIT" ]
null
null
null
openpype/hosts/standalonepublisher/plugins/publish/extract_harmony_zip.py
dangerstudios/OpenPype
10ddcc4699137888616eec57cd7fac9648189714
[ "MIT" ]
null
null
null
openpype/hosts/standalonepublisher/plugins/publish/extract_harmony_zip.py
dangerstudios/OpenPype
10ddcc4699137888616eec57cd7fac9648189714
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Extract Harmony scene from zip file.""" import glob import os import shutil import six import sys import tempfile import zipfile import pyblish.api from avalon import api, io import openpype.api class ExtractHarmonyZip(openpype.api.Extractor): """Extract Harmony zip.""" # Pyblish ...
35.693827
78
0.571251
import glob import os import shutil import six import sys import tempfile import zipfile import pyblish.api from avalon import api, io import openpype.api class ExtractHarmonyZip(openpype.api.Extractor): label = "Extract Harmony zip" order = pyblish.api.ExtractorOrder + 0.02 hosts = ["standalonepu...
true
true
f7f96c9ff5efcfd0c01cd37a8ca34ec81c088922
10,447
py
Python
Lib/robofab/test/testSupport.py
Vectro-Type-Foundry/robofab
cd65d78292d24358c98dce53d283314cdc85878e
[ "BSD-3-Clause" ]
61
2015-01-17T10:15:45.000Z
2018-12-02T13:53:02.000Z
Lib/robofab/test/testSupport.py
Vectro-Type-Foundry/robofab
cd65d78292d24358c98dce53d283314cdc85878e
[ "BSD-3-Clause" ]
37
2015-01-05T23:44:56.000Z
2018-03-16T19:05:28.000Z
Lib/robofab/test/testSupport.py
Vectro-Type-Foundry/robofab
cd65d78292d24358c98dce53d283314cdc85878e
[ "BSD-3-Clause" ]
25
2015-01-08T19:49:36.000Z
2018-10-29T00:36:46.000Z
"""Miscellaneous helpers for our test suite.""" import sys import os import types import unittest def getDemoFontPath(): """Return the path to Data/DemoFont.ufo/.""" import robofab root = os.path.dirname(os.path.dirname(os.path.dirname(robofab.__file__))) return os.path.join(root, "Data", "DemoFont.ufo") def ...
37.444444
80
0.667273
import sys import os import types import unittest def getDemoFontPath(): import robofab root = os.path.dirname(os.path.dirname(os.path.dirname(robofab.__file__))) return os.path.join(root, "Data", "DemoFont.ufo") def getDemoFontGlyphSetPath(): return os.path.join(getDemoFontPath(), "glyphs") def _gatherTest...
true
true
f7f96cad2bd048ed76edc8ed9412ff9b6f5b5f7a
618
py
Python
train_restore_use_models/preprocess_data.py
MECLabTUDA/QA_med_data
72897cb2d8e520dde6b88318c23bca32eb9210d7
[ "MIT" ]
null
null
null
train_restore_use_models/preprocess_data.py
MECLabTUDA/QA_med_data
72897cb2d8e520dde6b88318c23bca32eb9210d7
[ "MIT" ]
null
null
null
train_restore_use_models/preprocess_data.py
MECLabTUDA/QA_med_data
72897cb2d8e520dde6b88318c23bca32eb9210d7
[ "MIT" ]
null
null
null
# Import needed libraries from mp.data.datasets.dataset_JIP_cnn import JIPDataset def preprocess_data(config): r"""This function is used to load the original data from the workflow and preprocesses it by saving it in the preprocessed workflow.""" JIP = JIPDataset(img_size=config['input_shape'], num...
56.181818
127
0.703883
from mp.data.datasets.dataset_JIP_cnn import JIPDataset def preprocess_data(config): JIP = JIPDataset(img_size=config['input_shape'], num_intensities=config['num_intensities'], data_type=config['data_type'],\ augmentation=config['augmentation'], gpu=True, cuda=config['device'], msg_bot=co...
true
true
f7f96ce53153034f0c909c1981ee2b1921cf1720
733
py
Python
netforce_hr/netforce_hr/migrations/improve_payroll.py
nfco/netforce
35252eecd0a6633ab9d82162e9e3ff57d4da029a
[ "MIT" ]
27
2015-09-30T23:53:30.000Z
2021-06-07T04:56:25.000Z
netforce_hr/netforce_hr/migrations/improve_payroll.py
nfco/netforce
35252eecd0a6633ab9d82162e9e3ff57d4da029a
[ "MIT" ]
191
2015-10-08T11:46:30.000Z
2019-11-14T02:24:36.000Z
netforce_hr/netforce_hr/migrations/improve_payroll.py
nfco/netforce
35252eecd0a6633ab9d82162e9e3ff57d4da029a
[ "MIT" ]
32
2015-10-01T03:59:43.000Z
2022-01-13T07:31:05.000Z
from netforce.model import get_model from netforce import migration from netforce.access import set_active_user, get_active_user class Migration(migration.Migration): _name="improve.payroll" _version="2.10.0" def migrate(self): user_id=get_active_user() set_active_user(1) for paysl...
28.192308
65
0.582538
from netforce.model import get_model from netforce import migration from netforce.access import set_active_user, get_active_user class Migration(migration.Migration): _name="improve.payroll" _version="2.10.0" def migrate(self): user_id=get_active_user() set_active_user(1) for paysl...
true
true
f7f96edf1cbfedce8446f049553d598fd1d6ecfa
951
py
Python
examples/advanced/ray_example/ray_compose_example.py
packerliu/hydra
3e1debd53eb15229950d170086e563d27cb54a04
[ "MIT" ]
1
2020-07-13T09:06:16.000Z
2020-07-13T09:06:16.000Z
examples/advanced/ray_example/ray_compose_example.py
packerliu/hydra
3e1debd53eb15229950d170086e563d27cb54a04
[ "MIT" ]
6
2021-03-01T21:23:23.000Z
2022-02-27T09:15:03.000Z
examples/advanced/ray_example/ray_compose_example.py
packerliu/hydra
3e1debd53eb15229950d170086e563d27cb54a04
[ "MIT" ]
1
2021-04-22T08:47:44.000Z
2021-04-22T08:47:44.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import time from typing import List, Tuple import ray from omegaconf import DictConfig import hydra from hydra.experimental import compose @ray.remote # type: ignore def train(overrides: List[str], cfg: DictConfig) -> Tuple[List[str], float]: ...
25.702703
76
0.654048
import time from typing import List, Tuple import ray from omegaconf import DictConfig import hydra from hydra.experimental import compose @ray.remote def train(overrides: List[str], cfg: DictConfig) -> Tuple[List[str], float]: print(cfg.pretty()) time.sleep(5) return overrides, 0.9 @hydra.main(con...
true
true
f7f96f6a4891149c611ba417bcbaabbc514043af
2,644
py
Python
packages/syft/src/syft/core/node/common/action/greenlets_switch.py
jackbandy/PySyft
0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b
[ "Apache-2.0" ]
null
null
null
packages/syft/src/syft/core/node/common/action/greenlets_switch.py
jackbandy/PySyft
0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b
[ "Apache-2.0" ]
null
null
null
packages/syft/src/syft/core/node/common/action/greenlets_switch.py
jackbandy/PySyft
0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b
[ "Apache-2.0" ]
null
null
null
# stdlib from typing import Tuple # third party import gevent # relative from .....logger import critical from ....common.uid import UID from ....store.storeable_object import StorableObject from ...abstract.node import AbstractNode def retrieve_object( node: AbstractNode, id_at_location: UID, path: str, proxy_...
31.47619
109
0.607035
from typing import Tuple import gevent from .....logger import critical from ....common.uid import UID from ....store.storeable_object import StorableObject from ...abstract.node import AbstractNode def retrieve_object( node: AbstractNode, id_at_location: UID, path: str, proxy_only: bool = False ) -> Storabl...
true
true
f7f96f874be80cf5419958b278dd1ee46fd52ba6
13,181
py
Python
dogechia/rpc/rpc_server.py
hagbardcelene/doge-chia
72bdf0a7b20a579fe4645f0cb132955e181e1c44
[ "Apache-2.0" ]
27
2021-07-06T16:33:50.000Z
2022-02-19T21:11:25.000Z
dogechia/rpc/rpc_server.py
hagbardcelene/doge-chia
72bdf0a7b20a579fe4645f0cb132955e181e1c44
[ "Apache-2.0" ]
15
2021-07-07T02:32:59.000Z
2021-10-15T21:19:51.000Z
dogechia/rpc/rpc_server.py
hagbardcelene/doge-chia
72bdf0a7b20a579fe4645f0cb132955e181e1c44
[ "Apache-2.0" ]
12
2021-07-08T15:36:20.000Z
2022-03-15T08:34:01.000Z
import asyncio import json import logging import traceback from pathlib import Path from typing import Any, Callable, Dict, List, Optional import aiohttp from dogechia.server.outbound_message import NodeType from dogechia.server.server import ssl_context_for_server from dogechia.types.peer_info import PeerInfo from d...
39.11276
118
0.578257
import asyncio import json import logging import traceback from pathlib import Path from typing import Any, Callable, Dict, List, Optional import aiohttp from dogechia.server.outbound_message import NodeType from dogechia.server.server import ssl_context_for_server from dogechia.types.peer_info import PeerInfo from d...
true
true
f7f96f983bda46c5b75f7d737b58070da9dd7d64
1,469
py
Python
app/config.py
chrislaskey/kingdom
be82551824adadfc0c70e08b188eb45adae974c1
[ "MIT" ]
6
2015-02-17T23:40:42.000Z
2021-11-04T17:22:57.000Z
app/config.py
chrislaskey/tree-tracker
23597af0fe3c58cd57622cb01b303ed7743dc0e1
[ "MIT" ]
null
null
null
app/config.py
chrislaskey/tree-tracker
23597af0fe3c58cd57622cb01b303ed7743dc0e1
[ "MIT" ]
1
2020-04-20T05:50:02.000Z
2020-04-20T05:50:02.000Z
from os import path basedir = path.abspath(path.dirname(__file__)) # Flask # See: http://flask.pocoo.org/docs/config/ DEBUG = True TESTING = False SECRET_KEY = 'Academicam omnem quaestionem duabus formis a Cicerone esse expositam olim cognitum est' # Flask-SQLAlchemy # See: http://pythonhosted.org/Flask-SQLAlchemy...
28.25
101
0.79646
from os import path basedir = path.abspath(path.dirname(__file__)) DEBUG = True TESTING = False SECRET_KEY = 'Academicam omnem quaestionem duabus formis a Cicerone esse expositam olim cognitum est' SQLALCHEMY_DATABASE_URI = 'sqlite:///' + path.join(basedir, '../app.db') MAIL_SERVER = 'localhost' MAIL_PORT =...
true
true
f7f96fad38a39cdc2329b349296bcc7034330c2b
14,272
py
Python
libcloud/test/dns/test_liquidweb.py
atsaki/libcloud
ae85479e835494e196e2f6e79aae9a475603d8ac
[ "Apache-2.0" ]
3
2016-06-03T03:40:18.000Z
2018-09-24T05:28:47.000Z
libcloud/test/dns/test_liquidweb.py
atsaki/libcloud
ae85479e835494e196e2f6e79aae9a475603d8ac
[ "Apache-2.0" ]
1
2015-10-26T21:29:56.000Z
2015-10-27T17:29:20.000Z
libcloud/test/dns/test_liquidweb.py
atsaki/libcloud
ae85479e835494e196e2f6e79aae9a475603d8ac
[ "Apache-2.0" ]
2
2018-09-24T05:28:42.000Z
2020-12-31T05:11:04.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 use ...
42.350148
79
0.639364
import sys import unittest from libcloud.utils.py3 import httplib from libcloud.dns.drivers.liquidweb import LiquidWebDNSDriver from libcloud.test import MockHttp from libcloud.test.file_fixtures import DNSFileFixtures from libcloud.test.secrets import DNS_PARAMS_LIQUIDWEB from libcloud.dns.types import...
true
true
f7f96fbf03212b6ead2f3ae676c9fb9b8ef0fcbe
1,059
py
Python
platform/ext/target/nxp/lpcxpresso55s69/scripts/flash_bl2.py
urutva/trusted-firmware-m
e7f1c4c42b3322c8d4077060b433c87b508283b9
[ "BSD-3-Clause" ]
null
null
null
platform/ext/target/nxp/lpcxpresso55s69/scripts/flash_bl2.py
urutva/trusted-firmware-m
e7f1c4c42b3322c8d4077060b433c87b508283b9
[ "BSD-3-Clause" ]
null
null
null
platform/ext/target/nxp/lpcxpresso55s69/scripts/flash_bl2.py
urutva/trusted-firmware-m
e7f1c4c42b3322c8d4077060b433c87b508283b9
[ "BSD-3-Clause" ]
1
2021-04-21T20:53:02.000Z
2021-04-21T20:53:02.000Z
# Copyright (c) 2020, Linaro. All rights reserved. # Copyright (c) 2020, Arm Limited. All rights reserved. # Copyright (c) 2021, NXP Semiconductors. All rights reserved. # SPDX-License-Identifier: BSD-3-Clause import os import platform os.chdir('../../../../../../build') # Flash with JLinkExe FILE = "flash.jlink" i...
31.147059
101
0.658168
import os import platform os.chdir('../../../../../../build') FILE = "flash.jlink" if os.path.isfile(FILE): if platform.system() == 'Windows': os.system('del /f FILE') else: os.system('rm -rf FILE') os.system('echo r >> ' + FILE) os.system('echo erase >> ' + FILE) os.system('echo ...
true
true
f7f970bd9d2b7f847e30117422df856dca92f41f
5,861
py
Python
causal_bald/application/workflows/active_learning.py
anndvision/causal-bald
4e58ef0afa4ba7c4e12342e6052b39a93c95c680
[ "Apache-2.0" ]
8
2021-10-30T17:25:28.000Z
2022-03-25T16:02:07.000Z
causal_bald/application/workflows/active_learning.py
anndvision/causal-bald
4e58ef0afa4ba7c4e12342e6052b39a93c95c680
[ "Apache-2.0" ]
3
2021-12-03T12:00:07.000Z
2021-12-11T11:36:23.000Z
causal_bald/application/workflows/active_learning.py
anndvision/causal-bald
4e58ef0afa4ba7c4e12342e6052b39a93c95c680
[ "Apache-2.0" ]
5
2021-10-30T13:19:09.000Z
2022-02-06T18:31:05.000Z
import json import numpy as np import scipy.stats from copy import deepcopy from causal_bald.library import models from causal_bald.library import datasets from causal_bald.library import acquisitions from causal_bald.application.workflows import utils def active_learner(model_name, config, experiment_dir, trial):...
39.870748
88
0.586077
import json import numpy as np import scipy.stats from copy import deepcopy from causal_bald.library import models from causal_bald.library import datasets from causal_bald.library import acquisitions from causal_bald.application.workflows import utils def active_learner(model_name, config, experiment_dir, trial):...
true
true
f7f97112714120a52a4be60858c4a6a2b38f22c3
2,901
py
Python
models/resnext_block.py
khiemledev/Basic_CNNs_TensorFlow2
be2c90f2a63ae13b7586a1e4114c2bc42a825c83
[ "MIT" ]
497
2019-10-14T03:57:31.000Z
2022-03-30T08:49:51.000Z
models/resnext_block.py
khiemledev/Basic_CNNs_TensorFlow2
be2c90f2a63ae13b7586a1e4114c2bc42a825c83
[ "MIT" ]
33
2019-10-23T02:42:27.000Z
2022-03-07T01:56:13.000Z
models/resnext_block.py
khiemledev/Basic_CNNs_TensorFlow2
be2c90f2a63ae13b7586a1e4114c2bc42a825c83
[ "MIT" ]
190
2019-10-31T14:38:28.000Z
2022-03-30T07:42:36.000Z
import tensorflow as tf from models.group_convolution import get_group_conv class ResNeXt_BottleNeck(tf.keras.layers.Layer): def __init__(self, filters, strides, groups): super(ResNeXt_BottleNeck, self).__init__() self.conv1 = tf.keras.layers.Conv2D(filters=filters, ...
45.328125
72
0.45605
import tensorflow as tf from models.group_convolution import get_group_conv class ResNeXt_BottleNeck(tf.keras.layers.Layer): def __init__(self, filters, strides, groups): super(ResNeXt_BottleNeck, self).__init__() self.conv1 = tf.keras.layers.Conv2D(filters=filters, ...
true
true
f7f97151ef25bf25f7f3247b2596badf1e172fa4
4,147
py
Python
activitysim/abm/models/util/trip.py
SEMCOG/SEMCOG_ActSim
cc18cce84b2e4b5f380f58c7919953d2cd03ee73
[ "BSD-3-Clause" ]
null
null
null
activitysim/abm/models/util/trip.py
SEMCOG/SEMCOG_ActSim
cc18cce84b2e4b5f380f58c7919953d2cd03ee73
[ "BSD-3-Clause" ]
1
2021-06-30T23:39:37.000Z
2021-06-30T23:39:37.000Z
activitysim/abm/models/util/trip.py
SEMCOG/SEMCOG_ActSim
cc18cce84b2e4b5f380f58c7919953d2cd03ee73
[ "BSD-3-Clause" ]
null
null
null
# ActivitySim # See full license in LICENSE.txt. import logging import numpy as np from activitysim.core.util import assign_in_place logger = logging.getLogger(__name__) def failed_trip_cohorts(trips, failed): # outbound trips in a tour with a failed outbound trip bad_outbound_trips = \ trips.out...
33.176
98
0.667712
import logging import numpy as np from activitysim.core.util import assign_in_place logger = logging.getLogger(__name__) def failed_trip_cohorts(trips, failed): bad_outbound_trips = \ trips.outbound & (trips.tour_id.isin(trips.tour_id[failed & trips.outbound])) bad_inbound_trips = \ ...
true
true
f7f97213cbe2905bf394290f9e0800fa04ba6522
15,701
py
Python
sphinx/ext/graphviz.py
eqvinox/sphinx
cf5afec11753b73faecdc6670e2c28d16e410034
[ "BSD-2-Clause" ]
null
null
null
sphinx/ext/graphviz.py
eqvinox/sphinx
cf5afec11753b73faecdc6670e2c28d16e410034
[ "BSD-2-Clause" ]
null
null
null
sphinx/ext/graphviz.py
eqvinox/sphinx
cf5afec11753b73faecdc6670e2c28d16e410034
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ sphinx.ext.graphviz ~~~~~~~~~~~~~~~~~~~ Allow graphviz-formatted graphs to be included in Sphinx-generated documents inline. :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import posixpath import re from...
36.094253
118
0.593274
import posixpath import re from hashlib import sha1 from os import path from subprocess import Popen, PIPE from docutils import nodes from docutils.parsers.rst import directives from docutils.statemachine import ViewList from six import text_type import sphinx from sphinx.errors import SphinxError from sphinx.local...
true
true
f7f9732e25e8eb7f546f3c8c9cb822a0610bd658
706
py
Python
MDRSREID/Trainer/evaluation_creation/PGFA_Evaluation/extract_part_label.py
nickhuang1996/HJL-re-id
107b25f31c961f360f69560cfddd78dfc0da3291
[ "MIT" ]
43
2020-09-20T09:40:04.000Z
2022-03-29T11:25:22.000Z
MDRSREID/Trainer/evaluation_creation/PGFA_Evaluation/extract_part_label.py
nickhuang1996/HJL-re-id
107b25f31c961f360f69560cfddd78dfc0da3291
[ "MIT" ]
19
2020-10-05T05:35:38.000Z
2021-12-10T03:17:31.000Z
MDRSREID/Trainer/evaluation_creation/PGFA_Evaluation/extract_part_label.py
nickhuang1996/HJL-re-id
107b25f31c961f360f69560cfddd78dfc0da3291
[ "MIT" ]
18
2020-10-01T14:41:53.000Z
2021-09-02T06:57:57.000Z
from MDRSREID.utils.data_utils.evaluations.PGFA.part_label import part_label_generate import torch def extract_part_label(item, cfg): imgnames, imgheights = item['test_pose_path'], item['height'] N = len(imgnames) # part_label_batch = torch.FloatTensor(N, 1, cfg.model.num_parts).zero_() part_label_bat...
39.222222
85
0.715297
from MDRSREID.utils.data_utils.evaluations.PGFA.part_label import part_label_generate import torch def extract_part_label(item, cfg): imgnames, imgheights = item['test_pose_path'], item['height'] N = len(imgnames) part_label_batch = torch.FloatTensor(N, cfg.model.num_parts).zero_() i = 0 for ...
true
true
f7f97410d7a2f375c897d4fee26504933d2350d8
2,028
py
Python
src/leetcode_2009_minimum_number_of_operations_to_make_array_continuous.py
sungho-joo/leetcode2github
ce7730ef40f6051df23681dd3c0e1e657abba620
[ "MIT" ]
null
null
null
src/leetcode_2009_minimum_number_of_operations_to_make_array_continuous.py
sungho-joo/leetcode2github
ce7730ef40f6051df23681dd3c0e1e657abba620
[ "MIT" ]
null
null
null
src/leetcode_2009_minimum_number_of_operations_to_make_array_continuous.py
sungho-joo/leetcode2github
ce7730ef40f6051df23681dd3c0e1e657abba620
[ "MIT" ]
null
null
null
# @l2g 2009 python3 # [2009] Minimum Number of Operations to Make Array Continuous # Difficulty: Hard # https://leetcode.com/problems/minimum-number-of-operations-to-make-array-continuous # # You are given an integer array nums.In one operation, # you can replace any element in nums with any integer. # nums is consider...
27.780822
100
0.65286
import bisect from typing import List class Solution: def minOperations(self, nums: List[int]) -> int: num_set = set(nums) sorted_key = sorted(num_set) + [float("inf")] max_occupied = -1 for i in range(len(num_set)): range_e...
true
true
f7f9742f0a387bb74dbdfff0fc48a7450a5e8809
2,228
py
Python
clinicaml/pipelines/t1_freesurfer_longitudinal/t1_freesurfer_longitudinal_correction_cli.py
HorlavaNastassya/clinica
65424423e319f981f0b20ebd6bb82060aab271c2
[ "MIT" ]
null
null
null
clinicaml/pipelines/t1_freesurfer_longitudinal/t1_freesurfer_longitudinal_correction_cli.py
HorlavaNastassya/clinica
65424423e319f981f0b20ebd6bb82060aab271c2
[ "MIT" ]
null
null
null
clinicaml/pipelines/t1_freesurfer_longitudinal/t1_freesurfer_longitudinal_correction_cli.py
HorlavaNastassya/clinica
65424423e319f981f0b20ebd6bb82060aab271c2
[ "MIT" ]
null
null
null
# coding: utf8 import clinicaml.engine as ce class T1FreeSurferLongitudinalCorrectionCLI(ce.CmdParser): def define_name(self): """Define the sub-command name to run this pipeline.""" self._name = "t1-freesurfer-longitudinal-correction" def define_description(self): """Define a descri...
36.52459
87
0.667415
import clinicaml.engine as ce class T1FreeSurferLongitudinalCorrectionCLI(ce.CmdParser): def define_name(self): self._name = "t1-freesurfer-longitudinal-correction" def define_description(self): self._description = ( "Longitudinal pre-processing correction of T1w images with Fre...
true
true
f7f974932af9192b7b0309274e49c97198fbcc6c
5,138
py
Python
recipes/Python/580696_DBF_reader_writer__selective_fields/recipe-580696.py
tdiprima/code
61a74f5f93da087d27c70b2efe779ac6bd2a3b4f
[ "MIT" ]
2,023
2017-07-29T09:34:46.000Z
2022-03-24T08:00:45.000Z
recipes/Python/580696_DBF_reader_writer__selective_fields/recipe-580696.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
32
2017-09-02T17:20:08.000Z
2022-02-11T17:49:37.000Z
recipes/Python/580696_DBF_reader_writer__selective_fields/recipe-580696.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
780
2017-07-28T19:23:28.000Z
2022-03-25T20:39:41.000Z
import struct, datetime, decimal, itertools from collections import namedtuple FI = namedtuple('FieldInfo', ('name', 'typ', 'size', 'deci', 'fmt', 'fmtsiz', 'keep', 'seekme')) def dbfreader(f, names, nullreplace=None): """Returns an iterator over records in a Xbase DBF file. The...
36.964029
85
0.557999
import struct, datetime, decimal, itertools from collections import namedtuple FI = namedtuple('FieldInfo', ('name', 'typ', 'size', 'deci', 'fmt', 'fmtsiz', 'keep', 'seekme')) def dbfreader(f, names, nullreplace=None): c, lenheader = struct.unpack('<xxxxLH22x', f.read(32)) n...
true
true
f7f975abfa2c6f8e6d00282620a5619b2ea07ce0
1,100
py
Python
Fenetres_Infinies/app.py
Origin4/PythonChallenges
49f88c9e7341b9cd9ae4432ddd5117ed7d217b7e
[ "MIT" ]
6
2019-11-13T17:49:26.000Z
2021-11-15T09:44:44.000Z
Fenetres_Infinies/app.py
Origin4/PythonChallenges
49f88c9e7341b9cd9ae4432ddd5117ed7d217b7e
[ "MIT" ]
null
null
null
Fenetres_Infinies/app.py
Origin4/PythonChallenges
49f88c9e7341b9cd9ae4432ddd5117ed7d217b7e
[ "MIT" ]
7
2019-11-22T16:08:14.000Z
2021-08-24T15:02:19.000Z
from PySide2 import QtWidgets # pip install PySide2 fenetres = [] # liste qui contient toutes les fenêtres ouvertes def mettreAJourNombreFenetre(): nombreDeFenetres = len(fenetres) for fenetre in fenetres: fenetre.resultatNombreFenetre.setText(f'Nombre de fenêtres : {nombreDeFenetres}') def creerFen...
31.428571
89
0.699091
from PySide2 import QtWidgets fenetres = [] def mettreAJourNombreFenetre(): nombreDeFenetres = len(fenetres) for fenetre in fenetres: fenetre.resultatNombreFenetre.setText(f'Nombre de fenêtres : {nombreDeFenetres}') def creerFenetre(): fenetres.append(Fenetre()) mettreAJourNombreFenetre() ...
true
true
f7f9771f579cf993bef9434348f065621ffd4f7e
2,747
py
Python
pages/process.py
rsmecking/Predicting_women_shoe_prices
41190d37c264664cbec46c64ff2df5e488c6018b
[ "MIT" ]
null
null
null
pages/process.py
rsmecking/Predicting_women_shoe_prices
41190d37c264664cbec46c64ff2df5e488c6018b
[ "MIT" ]
null
null
null
pages/process.py
rsmecking/Predicting_women_shoe_prices
41190d37c264664cbec46c64ff2df5e488c6018b
[ "MIT" ]
null
null
null
# Imports from 3rd party libraries import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output # Imports from this application from app import app # 1 column layout # https://dash-bootstrap-components.opensource...
49.053571
132
0.67601
import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output from app import app column1 = dbc.Col( [ dcc.Markdown( """ #### Process Much of the [data...
true
true
f7f97739bd2ab8edd48d60f1478b7773aadd9be1
9,349
py
Python
opgc/core/repository_service.py
DirtyBoyz/opgc_backend
3fc7160d9d637378a358d4fc161fae495a18f0bd
[ "MIT" ]
9
2020-08-19T02:49:03.000Z
2022-03-04T10:50:18.000Z
opgc/core/repository_service.py
DirtyBoyz/opgc_backend
3fc7160d9d637378a358d4fc161fae495a18f0bd
[ "MIT" ]
7
2021-07-20T15:13:07.000Z
2022-03-08T13:14:43.000Z
opgc/core/repository_service.py
DirtyBoyz/opgc_backend
3fc7160d9d637378a358d4fc161fae495a18f0bd
[ "MIT" ]
2
2021-08-13T08:05:34.000Z
2022-02-28T05:51:06.000Z
import asyncio import json from typing import Optional import aiohttp import requests from django.conf import settings from apps.githubs.models import GithubUser, Repository, Language, UserLanguage from core.github_dto import RepositoryDto from utils.exceptions import manage_api_call_fail, REASON_FORBIDDEN PER_PAGE ...
38.473251
119
0.6083
import asyncio import json from typing import Optional import aiohttp import requests from django.conf import settings from apps.githubs.models import GithubUser, Repository, Language, UserLanguage from core.github_dto import RepositoryDto from utils.exceptions import manage_api_call_fail, REASON_FORBIDDEN PER_PAGE ...
true
true
f7f9795116bbb7e1b5db590159da85ef14de3507
11,880
py
Python
mapping.py
adamkoziol/mixedReferenceMapping
5c3d04172a85246f237d59cec498b51ca11f196a
[ "MIT" ]
null
null
null
mapping.py
adamkoziol/mixedReferenceMapping
5c3d04172a85246f237d59cec498b51ca11f196a
[ "MIT" ]
null
null
null
mapping.py
adamkoziol/mixedReferenceMapping
5c3d04172a85246f237d59cec498b51ca11f196a
[ "MIT" ]
null
null
null
#!/usr/bin/env python from threading import Thread from Bio.Sequencing.Applications import * import SPAdesPipeline.OLCspades.metadataprinter as metadataprinter from SPAdesPipeline.OLCspades.bowtie import * from geneSipprV2.objectOriented.createObject import * try: from cStringIO import StringIO except ImportError:...
55.255814
120
0.599074
from threading import Thread from Bio.Sequencing.Applications import * import SPAdesPipeline.OLCspades.metadataprinter as metadataprinter from SPAdesPipeline.OLCspades.bowtie import * from geneSipprV2.objectOriented.createObject import * try: from cStringIO import StringIO except ImportError: from StringIO im...
false
true
f7f979a5902f70cdcbf2377197c39d30c8952c5d
3,968
py
Python
src/lib/detectors/ddd.py
tanaydw/CenterNet
91c2ccd2c8a063db8c8ec101adfd4c6830cd47eb
[ "MIT" ]
null
null
null
src/lib/detectors/ddd.py
tanaydw/CenterNet
91c2ccd2c8a063db8c8ec101adfd4c6830cd47eb
[ "MIT" ]
null
null
null
src/lib/detectors/ddd.py
tanaydw/CenterNet
91c2ccd2c8a063db8c8ec101adfd4c6830cd47eb
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import cv2 import numpy as np from progress.bar import Bar import time import torch from models.decode import ddd_decode from models.utils import flip_tensor from utils.image import get_affine_transform from ...
37.790476
73
0.657258
from __future__ import absolute_import from __future__ import division from __future__ import print_function import cv2 import numpy as np from progress.bar import Bar import time import torch from models.decode import ddd_decode from models.utils import flip_tensor from utils.image import get_affine_transform from ...
true
true
f7f979bd9ca137771d56153f1cf48fdee6e1509e
622
py
Python
tests/models.py
ThibaultVigier/django-auth-ldap
5c3fbdc9058bdaffb40127dd77d0bf692ecec379
[ "BSD-2-Clause" ]
1
2020-10-20T03:35:08.000Z
2020-10-20T03:35:08.000Z
tests/models.py
ThibaultVigier/django-auth-ldap
5c3fbdc9058bdaffb40127dd77d0bf692ecec379
[ "BSD-2-Clause" ]
null
null
null
tests/models.py
ThibaultVigier/django-auth-ldap
5c3fbdc9058bdaffb40127dd77d0bf692ecec379
[ "BSD-2-Clause" ]
null
null
null
from __future__ import unicode_literals from django.contrib.auth.models import AbstractBaseUser from django.db import models class TestUser(AbstractBaseUser): identifier = models.CharField(max_length=40, unique=True, db_index=True) uid_number = models.IntegerField() USERNAME_FIELD = 'identifier' de...
23.923077
76
0.726688
from __future__ import unicode_literals from django.contrib.auth.models import AbstractBaseUser from django.db import models class TestUser(AbstractBaseUser): identifier = models.CharField(max_length=40, unique=True, db_index=True) uid_number = models.IntegerField() USERNAME_FIELD = 'identifier' de...
true
true
f7f97c9ed4943d03be2e548c11e3a04ace6831f2
52
py
Python
app/__init__.py
jiazifa/blog
4165d69af9ee9adf573e7e4ed6c913e53254901b
[ "MIT" ]
null
null
null
app/__init__.py
jiazifa/blog
4165d69af9ee9adf573e7e4ed6c913e53254901b
[ "MIT" ]
null
null
null
app/__init__.py
jiazifa/blog
4165d69af9ee9adf573e7e4ed6c913e53254901b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .app import create_app
17.333333
27
0.634615
from .app import create_app
true
true
f7f97cc08531b78399b4a00dbd96d42936b9dfd3
4,545
py
Python
app.py
shanur00029/Faster-R-CNN-model-dockerization
ace64a39c040df93deaf2f61de73a2561498a9eb
[ "Unlicense" ]
2
2020-02-10T13:11:01.000Z
2020-02-14T16:42:03.000Z
app.py
shanur00029/Faster-R-CNN-model-dockerization
ace64a39c040df93deaf2f61de73a2561498a9eb
[ "Unlicense" ]
null
null
null
app.py
shanur00029/Faster-R-CNN-model-dockerization
ace64a39c040df93deaf2f61de73a2561498a9eb
[ "Unlicense" ]
3
2020-02-10T13:10:55.000Z
2020-02-26T04:42:37.000Z
from __future__ import division from __future__ import print_function from __future__ import absolute_import from flask import Flask, url_for, send_from_directory, request import logging, os from werkzeug import secure_filename from test_deploy import testfunction, mainf import random import pprint import sys impor...
30.099338
121
0.660286
from __future__ import division from __future__ import print_function from __future__ import absolute_import from flask import Flask, url_for, send_from_directory, request import logging, os from werkzeug import secure_filename from test_deploy import testfunction, mainf import random import pprint import sys impor...
true
true
f7f97dd50702066aff03feda3fafdac8e6f30661
4,127
py
Python
benchmark/test_loads.py
heroku/pghstore
31de76a7431ca280b1d9138bd6baf1ac767ea0ea
[ "MIT" ]
2
2021-03-29T06:39:04.000Z
2021-08-04T06:40:17.000Z
benchmark/test_loads.py
heroku/pghstore
31de76a7431ca280b1d9138bd6baf1ac767ea0ea
[ "MIT" ]
12
2017-08-22T15:43:09.000Z
2020-05-06T17:12:49.000Z
benchmark/test_loads.py
heroku/pghstore
31de76a7431ca280b1d9138bd6baf1ac767ea0ea
[ "MIT" ]
2
2017-08-19T12:24:52.000Z
2019-10-06T18:53:49.000Z
# -*- coding: utf-8 -*- from __future__ import print_function import unittest import timeit from functools import partial from math import floor try: from pghstore import _speedups as cpghstore except ImportError: cpghstore = None from pghstore import _native as pypghstore names = [ "", '"name"=>"Nor...
89.717391
2,856
0.64914
from __future__ import print_function import unittest import timeit from functools import partial from math import floor try: from pghstore import _speedups as cpghstore except ImportError: cpghstore = None from pghstore import _native as pypghstore names = [ "", '"name"=>"Norge/Noreg"', '"name"...
true
true
f7f97eea171aeafdaed314fe22447d5c68e6b9fd
2,221
py
Python
applications/shop/models/paymentmethod/iban.py
dev-easyshares/mighty
a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b
[ "MIT" ]
null
null
null
applications/shop/models/paymentmethod/iban.py
dev-easyshares/mighty
a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b
[ "MIT" ]
1
2022-03-12T00:57:37.000Z
2022-03-12T00:57:37.000Z
applications/shop/models/paymentmethod/iban.py
dev-easyshares/mighty
a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b
[ "MIT" ]
null
null
null
from django.conf import settings from django.core.exceptions import ValidationError from mighty.applications.shop.apps import sepas_test, ShopConfig from schwifty import IBAN, BIC from dateutil.relativedelta import relativedelta import re class IbanModel: @property def readable_iban(self): return ' '.j...
34.703125
114
0.620891
from django.conf import settings from django.core.exceptions import ValidationError from mighty.applications.shop.apps import sepas_test, ShopConfig from schwifty import IBAN, BIC from dateutil.relativedelta import relativedelta import re class IbanModel: @property def readable_iban(self): return ' '.j...
true
true
f7f97f1e083b2da4fa3985b5f7f8c3ebce4b3a87
3,091
py
Python
benchmark/startCirq2377.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startCirq2377.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startCirq2377.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=40 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode from cirq.contrib.svg import SVGCircuit # Symbols for...
36.364706
77
0.681333
import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np from cirq.contrib.svg import SVGCircuit def make_circuit(n: int, input_qubit): c = cirq.Circuit() c.append(cirq.H.on(input_qubit[0])) c.append(cirq.H.on(input_qubit[1])) ...
true
true
f7f97f56258036a48aa42fcf4d54582e19df6e67
3,117
py
Python
Django/DjangoT1.11_LTS/55_Pengenalan User Permission Checks/mywebsite/settings.py
Akhadafi/WEB-Framework
4547a682ac1f007aa6f97512baf76b92ef1c9b9a
[ "MIT" ]
null
null
null
Django/DjangoT1.11_LTS/55_Pengenalan User Permission Checks/mywebsite/settings.py
Akhadafi/WEB-Framework
4547a682ac1f007aa6f97512baf76b92ef1c9b9a
[ "MIT" ]
null
null
null
Django/DjangoT1.11_LTS/55_Pengenalan User Permission Checks/mywebsite/settings.py
Akhadafi/WEB-Framework
4547a682ac1f007aa6f97512baf76b92ef1c9b9a
[ "MIT" ]
null
null
null
""" Django settings for mywebsite project. Generated by 'django-admin startproject' using Django 1.11.20. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import...
25.760331
91
0.69907
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '0l3t_qz$+ocv=^ss6vux!#+ep831tg2jh2p2@wmntbm+dbm2sy' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
f7f97fbddca8345981dcfbe6d3e65b14bef4616e
8,544
py
Python
sunpy/map/tests/test_map_factory.py
TomAugspurger/sunpy
cad2d473f6aff05df5fe787c781cb7d004959b94
[ "BSD-2-Clause" ]
null
null
null
sunpy/map/tests/test_map_factory.py
TomAugspurger/sunpy
cad2d473f6aff05df5fe787c781cb7d004959b94
[ "BSD-2-Clause" ]
null
null
null
sunpy/map/tests/test_map_factory.py
TomAugspurger/sunpy
cad2d473f6aff05df5fe787c781cb7d004959b94
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Jun 21 15:05:09 2013 @author: stuart """ import os import tempfile import pathlib import pytest import numpy as np from astropy.io import fits from astropy.wcs import WCS import sunpy import sunpy.map import sunpy.data.test filepath = sunpy.data.test.rootdir a_list_of_man...
38.660633
94
0.628394
import os import tempfile import pathlib import pytest import numpy as np from astropy.io import fits from astropy.wcs import WCS import sunpy import sunpy.map import sunpy.data.test filepath = sunpy.data.test.rootdir a_list_of_many = [os.fspath(f) for f in pathlib.Path(filepath, "EIT").glob("*")] a_fname = a_list...
true
true
f7f98051be59a9ce5dfd5c781777950cb599deef
492
py
Python
conv_serial.py
gpu0/nnet
0fd5c718c2d03cab91d4a4fd4963b12df241a9de
[ "MIT" ]
null
null
null
conv_serial.py
gpu0/nnet
0fd5c718c2d03cab91d4a4fd4963b12df241a9de
[ "MIT" ]
null
null
null
conv_serial.py
gpu0/nnet
0fd5c718c2d03cab91d4a4fd4963b12df241a9de
[ "MIT" ]
null
null
null
import multiprocessing import numpy as np numThreads = 8 numRows = 32000 numCols = 3 numOut = 2 stride = numRows / numThreads X = np.ones((numRows, numCols)) W = np.ones((numCols, numOut)) B = np.ones((numRows, numOut)) def conv(idx): for i in range(100000): X[idx*stride:idx*stride+stride].dot(W) + B[idx*stri...
21.391304
81
0.697154
import multiprocessing import numpy as np numThreads = 8 numRows = 32000 numCols = 3 numOut = 2 stride = numRows / numThreads X = np.ones((numRows, numCols)) W = np.ones((numCols, numOut)) B = np.ones((numRows, numOut)) def conv(idx): for i in range(100000): X[idx*stride:idx*stride+stride].dot(W) + B[idx*stri...
true
true
f7f980870d9219f3d403b290299070d59e3a0261
6,279
py
Python
tests/contrib/operators/test_mssql_to_gcs_operator.py
is2co/airflow
48f400541d19601d1571d07cf65f55c649884b87
[ "Apache-2.0" ]
2
2020-10-12T05:21:27.000Z
2021-07-07T09:23:47.000Z
tests/contrib/operators/test_mssql_to_gcs_operator.py
is2co/airflow
48f400541d19601d1571d07cf65f55c649884b87
[ "Apache-2.0" ]
3
2021-03-11T06:46:16.000Z
2021-09-29T17:48:20.000Z
tests/contrib/operators/test_mssql_to_gcs_operator.py
is2co/airflow
48f400541d19601d1571d07cf65f55c649884b87
[ "Apache-2.0" ]
1
2019-08-21T10:13:08.000Z
2019-08-21T10:13:08.000Z
# -*- coding: utf-8 -*- # # 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 #...
40.509677
106
0.691352
import unittest from airflow.contrib.operators.mssql_to_gcs import \ MsSqlToGoogleCloudStorageOperator from tests.compat import mock TASK_ID = 'test-mssql-to-gcs' MSSQL_CONN_ID = 'mssql_conn_test' SQL = 'select 1' BUCKET = 'gs://test' JSON_FILENAME = 'test_{}.ndjson' GZIP = False ROWS = [ ...
true
true
f7f9812cea08e9a63697df520d7b14ad0213b115
238
py
Python
examples/whitenoise.py
ianling/wavebender
df66a466a73f609a5b71700836f7f344bda409de
[ "MIT" ]
null
null
null
examples/whitenoise.py
ianling/wavebender
df66a466a73f609a5b71700836f7f344bda409de
[ "MIT" ]
null
null
null
examples/whitenoise.py
ianling/wavebender
df66a466a73f609a5b71700836f7f344bda409de
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from sys import stdout from wavebender import * channels = ((white_noise(amplitude=0.1),),) samples = compute_samples(channels, 44100 * 60 * 1) write_wavefile(stdout.buffer, samples, 44100 * 60 * 1, nchannels=1)
23.8
67
0.731092
from sys import stdout from wavebender import * channels = ((white_noise(amplitude=0.1),),) samples = compute_samples(channels, 44100 * 60 * 1) write_wavefile(stdout.buffer, samples, 44100 * 60 * 1, nchannels=1)
true
true
f7f981d8ac7649d2cb17c4e71307cebdafe2372d
430
py
Python
day030/key-error-handling/main.py
rainleander/100daysofcode
0391170af80b251e7fb3a78a60b55c3145e4551a
[ "Apache-2.0" ]
8
2021-01-25T09:14:41.000Z
2021-11-24T12:29:26.000Z
day030/key-error-handling/main.py
rainleander/100daysofcode
0391170af80b251e7fb3a78a60b55c3145e4551a
[ "Apache-2.0" ]
null
null
null
day030/key-error-handling/main.py
rainleander/100daysofcode
0391170af80b251e7fb3a78a60b55c3145e4551a
[ "Apache-2.0" ]
null
null
null
facebook_posts = [ {'Likes': 21, 'Comments': 2}, {'Likes': 13, 'Comments': 2, 'Shares': 1}, {'Likes': 33, 'Comments': 8, 'Shares': 3}, {'Comments': 4, 'Shares': 2}, {'Comments': 1, 'Shares': 1}, {'Likes': 19, 'Comments': 3} ] total_likes = 0 for post in facebook_posts: try: total_l...
22.631579
49
0.569767
facebook_posts = [ {'Likes': 21, 'Comments': 2}, {'Likes': 13, 'Comments': 2, 'Shares': 1}, {'Likes': 33, 'Comments': 8, 'Shares': 3}, {'Comments': 4, 'Shares': 2}, {'Comments': 1, 'Shares': 1}, {'Likes': 19, 'Comments': 3} ] total_likes = 0 for post in facebook_posts: try: total_l...
true
true
f7f9821a027108b6432d49abb278aa65fe04225e
1,604
py
Python
pylibssh/event.py
arisada/pylibssh
7110499e1463f4edc24e8f2736b2d71f5c34a0ae
[ "BSD-3-Clause" ]
1
2017-03-28T12:23:11.000Z
2017-03-28T12:23:11.000Z
pylibssh/event.py
arisada/pylibssh
7110499e1463f4edc24e8f2736b2d71f5c34a0ae
[ "BSD-3-Clause" ]
null
null
null
pylibssh/event.py
arisada/pylibssh
7110499e1463f4edc24e8f2736b2d71f5c34a0ae
[ "BSD-3-Clause" ]
null
null
null
from . import api from api import lib class EventFdCallbacks(object): fd = None def __init__ (self, fd): self.fd = fd def pollEvent(self, fd, revent): if(self.fd.fileno() != fd): raise RuntimeException("Different fd in callbacks") if (revent & select.POLLIN): ...
30.846154
102
0.63404
from . import api from api import lib class EventFdCallbacks(object): fd = None def __init__ (self, fd): self.fd = fd def pollEvent(self, fd, revent): if(self.fd.fileno() != fd): raise RuntimeException("Different fd in callbacks") if (revent & select.POLLIN): ...
true
true
f7f98225c32f97b3bf539de83c54ea5542da77c6
862
py
Python
switch_model/wecc/get_inputs/post_process_steps/reserve_technologies.py
REAM-lab/switch
00af4508e34bdc460925950808dc7f87a0a064ff
[ "ECL-2.0", "Apache-2.0" ]
4
2021-06-03T00:23:57.000Z
2022-02-05T13:51:00.000Z
switch_model/wecc/get_inputs/post_process_steps/reserve_technologies.py
REAM-lab/switch
00af4508e34bdc460925950808dc7f87a0a064ff
[ "ECL-2.0", "Apache-2.0" ]
61
2021-05-07T23:46:20.000Z
2022-02-17T01:19:17.000Z
switch_model/wecc/get_inputs/post_process_steps/reserve_technologies.py
RAEL-Berkeley/switch
00af4508e34bdc460925950808dc7f87a0a064ff
[ "ECL-2.0", "Apache-2.0" ]
4
2018-02-05T02:01:01.000Z
2020-11-17T22:14:26.000Z
""" This post-process selects which technologies can provide reserves""" # Standard packages import os import shutil # Third-party packages import pandas as pd from switch_model.wecc.get_inputs.register_post_process import post_process_step @post_process_step( msg="Removing fossil fuels from reserves.", ) def p...
26.9375
85
0.733179
import os import shutil import pandas as pd from switch_model.wecc.get_inputs.register_post_process import post_process_step @post_process_step( msg="Removing fossil fuels from reserves.", ) def post_process(_): fname = "generation_projects_info.csv" df = pd.read_csv(fname) filter_techs = [...
true
true
f7f982fdde0a534d0ccd114800ec898f43ca4ea5
365
py
Python
mmpose/utils/collect_env.py
jlgzb/mmpose
0ecf06e3580f141f6ab44645768a0d6d8ba48383
[ "Apache-2.0" ]
367
2022-01-14T03:32:25.000Z
2022-03-31T04:48:20.000Z
mmpose/utils/collect_env.py
jlgzb/mmpose
0ecf06e3580f141f6ab44645768a0d6d8ba48383
[ "Apache-2.0" ]
27
2022-01-27T07:12:49.000Z
2022-03-31T04:31:13.000Z
mmpose/utils/collect_env.py
jlgzb/mmpose
0ecf06e3580f141f6ab44645768a0d6d8ba48383
[ "Apache-2.0" ]
53
2022-01-18T11:21:43.000Z
2022-03-31T06:42:41.000Z
from mmcv.utils import collect_env as collect_basic_env from mmcv.utils import get_git_hash import mmpose def collect_env(): env_info = collect_basic_env() env_info['MMPose'] = (mmpose.__version__ + '+' + get_git_hash(digits=7)) return env_info if __name__ == '__main__': for name, val in collect_en...
22.8125
76
0.69589
from mmcv.utils import collect_env as collect_basic_env from mmcv.utils import get_git_hash import mmpose def collect_env(): env_info = collect_basic_env() env_info['MMPose'] = (mmpose.__version__ + '+' + get_git_hash(digits=7)) return env_info if __name__ == '__main__': for name, val in collect_en...
true
true
f7f983c8808f2a82989a8ce0a5fa7c82b51eb0e7
27,077
py
Python
Python Simulator/Frontier Exploration/backup/1 (initial backup)/Faigl.py
yiorgosk/Path-Planning-Simulator
84847d0068a3fd6fa30098b99a75dff237768a73
[ "MIT" ]
50
2018-11-15T08:42:49.000Z
2022-03-20T10:51:58.000Z
Python Simulator/Frontier Exploration/backup/1 (initial backup)/Faigl.py
yiorgosk/Path-Planning-Simulator
84847d0068a3fd6fa30098b99a75dff237768a73
[ "MIT" ]
null
null
null
Python Simulator/Frontier Exploration/backup/1 (initial backup)/Faigl.py
yiorgosk/Path-Planning-Simulator
84847d0068a3fd6fa30098b99a75dff237768a73
[ "MIT" ]
24
2019-02-03T06:11:58.000Z
2022-03-15T06:18:39.000Z
# The MIT License (MIT) # Copyright (c) 2015 INSPIRE Lab, BITS Pilani # 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 # t...
34.449109
184
0.664069
""" Provides an implementation of the Frontier Clustering algorithm. """ import math import random import sys import time import AStar import Cluster import GridWorld import Hungarian import kmeans import Robot from collections import defaultdict from tsp_solver.greedy...
false
true
f7f984532f4d4eee71e4b32e9e717f0c2370479a
7,476
py
Python
code/main_vehicule.py
fokoa/byzantine_kmeans-msc_thesis
b116cb2222cd0e1334db7df493ec453dd299b985
[ "MIT" ]
null
null
null
code/main_vehicule.py
fokoa/byzantine_kmeans-msc_thesis
b116cb2222cd0e1334db7df493ec453dd299b985
[ "MIT" ]
null
null
null
code/main_vehicule.py
fokoa/byzantine_kmeans-msc_thesis
b116cb2222cd0e1334db7df493ec453dd299b985
[ "MIT" ]
null
null
null
#!usr/bin/python3 # -*- coding : utf8 -*- import sys; import getopt; import warnings; from mpi4py import MPI; import numpy as np; import pandas as pd; import matplotlib.pyplot as plt; from mpl_toolkits.mplot3d import Axes3D; from sklearn import decomposition; from sklearn.cluster import KMeans; from kmeans_resilie...
27.688889
75
0.563938
import sys; import getopt; import warnings; from mpi4py import MPI; import numpy as np; import pandas as pd; import matplotlib.pyplot as plt; from mpl_toolkits.mplot3d import Axes3D; from sklearn import decomposition; from sklearn.cluster import KMeans; from kmeans_resilient import KMeansResilient as KMR; from f...
true
true
f7f984e969f29607cfa83a0f9c6f5d92fbf7a72d
264
py
Python
.vscode/extensions/ms-python.python-2020.3.69010/pythonFiles/lib/python/old_ptvsd/ptvsd/reraise2.py
anish-sk/dotfiles
144508dd9afdc141f8f4e6bec3ddb408f92a9827
[ "MIT" ]
5
2019-04-30T02:46:37.000Z
2021-08-22T08:39:11.000Z
.vscode/extensions/ms-python.python-2020.3.69010/pythonFiles/lib/python/old_ptvsd/ptvsd/reraise2.py
anish-sk/dotfiles
144508dd9afdc141f8f4e6bec3ddb408f92a9827
[ "MIT" ]
12
2015-10-30T19:20:28.000Z
2021-04-23T15:59:58.000Z
vscode/extensions/ms-python.python-2020.3.69010/pythonFiles/lib/python/old_ptvsd/ptvsd/reraise2.py
Adespinoza/dotfiles
e2509402a7fd2623a3ea401b6f9fcbf6a372fc60
[ "CC0-1.0" ]
5
2015-09-16T07:50:06.000Z
2019-09-09T14:33:46.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE in the project root # for license information. def reraise(exc_info): # TODO: docstring raise exc_info[0], exc_info[1], exc_info[2] # noqa
29.333333
66
0.708333
def reraise(exc_info): raise exc_info[0], exc_info[1], exc_info[2]
false
true
f7f986315190de3e8b8b526ed7e77f3ffb4e7979
2,130
py
Python
app/models/UserModel.py
sanif/Simple-Blog-Flask
3f84a1acf418e8c72cb6c2f3194371a635df0628
[ "MIT" ]
null
null
null
app/models/UserModel.py
sanif/Simple-Blog-Flask
3f84a1acf418e8c72cb6c2f3194371a635df0628
[ "MIT" ]
null
null
null
app/models/UserModel.py
sanif/Simple-Blog-Flask
3f84a1acf418e8c72cb6c2f3194371a635df0628
[ "MIT" ]
null
null
null
# src/models/UserModel.py import datetime from flask_restful import Resource from safrs.base import SAFRSBase import app.models.PostModel from . import BaseModel, bcrypt, db, ma class UserModel(BaseModel): """ User Model """ # table name __tablename__ = 'users' id = db.Column(db.Integer, ...
25.97561
69
0.640376
import datetime from flask_restful import Resource from safrs.base import SAFRSBase import app.models.PostModel from . import BaseModel, bcrypt, db, ma class UserModel(BaseModel): __tablename__ = 'users' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(128), nullable=Fals...
true
true
f7f9869adde2802b8a5d98e792e95d6a617f55e6
628
py
Python
test/test_binary_heap.py
paolodelia99/Python-C-Algorithms
9113ad566e4e659c1f16135c2d3abd3a4c57a46e
[ "MIT" ]
2
2021-02-13T10:58:58.000Z
2021-03-16T09:56:01.000Z
test/test_binary_heap.py
paolodelia99/Python-C-Algorithms
9113ad566e4e659c1f16135c2d3abd3a4c57a46e
[ "MIT" ]
null
null
null
test/test_binary_heap.py
paolodelia99/Python-C-Algorithms
9113ad566e4e659c1f16135c2d3abd3a4c57a46e
[ "MIT" ]
null
null
null
import nose import binary_heap BinaryHeap = binary_heap.BinaryHeap def test_binary_heap_101(): b = BinaryHeap() nose.tools.assert_is_instance(b, BinaryHeap) def test_binary_heap_num_entries(): b = BinaryHeap() nose.tools.assert_equal(b.num_entries(), 0) def test_binary_heap_insert(): b = Bina...
19.625
48
0.687898
import nose import binary_heap BinaryHeap = binary_heap.BinaryHeap def test_binary_heap_101(): b = BinaryHeap() nose.tools.assert_is_instance(b, BinaryHeap) def test_binary_heap_num_entries(): b = BinaryHeap() nose.tools.assert_equal(b.num_entries(), 0) def test_binary_heap_insert(): b = Bina...
true
true
f7f9885c0793993b3a37de767e80561374f8c7b4
13,021
py
Python
dataset/leadbang.py
liqile1/OCNet.pytorch
5fb733adbf178ccc8040197057e3277896b3dc12
[ "MIT" ]
null
null
null
dataset/leadbang.py
liqile1/OCNet.pytorch
5fb733adbf178ccc8040197057e3277896b3dc12
[ "MIT" ]
null
null
null
dataset/leadbang.py
liqile1/OCNet.pytorch
5fb733adbf178ccc8040197057e3277896b3dc12
[ "MIT" ]
null
null
null
##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ## Created by: speedinghzl02 ## Modified by: RainbowSecret ## Microsoft Research ## yuyua@microsoft.com ## Copyright (c) 2018 ## ## This source code is licensed under the MIT-style license found in the ## LICENSE file in the root directory of t...
36.069252
136
0.558098
e=True, mirror=True, ignore_label=255, use_aug=False, network="resnet101"): self.root = root self.crop_h = 480 self.crop_w = 480 self.img_width = 512 self.img_height = 512 self.scale = scale self.ignore_label = ignore_label self.is_mirror = m...
true
true
f7f988e26776eaa47c64078a1aae3b28165ff015
24,376
py
Python
electrum/plugins/coldcard/coldcard.py
c4pt000/electrum-radiocoin
7cb5f618a9aa8cd03d60191624a0e57cc24646d2
[ "MIT" ]
null
null
null
electrum/plugins/coldcard/coldcard.py
c4pt000/electrum-radiocoin
7cb5f618a9aa8cd03d60191624a0e57cc24646d2
[ "MIT" ]
null
null
null
electrum/plugins/coldcard/coldcard.py
c4pt000/electrum-radiocoin
7cb5f618a9aa8cd03d60191624a0e57cc24646d2
[ "MIT" ]
null
null
null
# # Coldcard Electrum plugin main code. # # import os, time, io import traceback from typing import TYPE_CHECKING, Optional import struct from electrum import bip32 from electrum.bip32 import BIP32Node, InvalidMasterKeyVersionBytes from electrum.i18n import _ from electrum.plugin import Device, hook, runs_in_hwd_threa...
38.147105
133
0.623154
import os, time, io import traceback from typing import TYPE_CHECKING, Optional import struct from electrum import bip32 from electrum.bip32 import BIP32Node, InvalidMasterKeyVersionBytes from electrum.i18n import _ from electrum.plugin import Device, hook, runs_in_hwd_thread from electrum.keystore import Hardware...
true
true
f7f9891821484758d545693da5d745fe3cada3a3
794
py
Python
tests/containers/analyzer_result.py
nflexfo/plaso
5da7aa51c39b593773687fdf20a93ba35fc492b4
[ "Apache-2.0" ]
27
2019-04-05T12:01:49.000Z
2022-02-08T02:26:25.000Z
tests/containers/analyzer_result.py
nflexfo/plaso
5da7aa51c39b593773687fdf20a93ba35fc492b4
[ "Apache-2.0" ]
null
null
null
tests/containers/analyzer_result.py
nflexfo/plaso
5da7aa51c39b593773687fdf20a93ba35fc492b4
[ "Apache-2.0" ]
8
2019-11-28T08:06:34.000Z
2020-08-29T13:53:30.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the analyzer result attribute container.""" from __future__ import unicode_literals import unittest from plaso.containers import analyzer_result from tests import test_lib as shared_test_lib class AnalyzerResultTest(shared_test_lib.BaseTestCase): """Te...
25.612903
69
0.765743
from __future__ import unicode_literals import unittest from plaso.containers import analyzer_result from tests import test_lib as shared_test_lib class AnalyzerResultTest(shared_test_lib.BaseTestCase): def testGetAttributeNames(self): attribute_container = analyzer_result.AnalyzerResult() expected_...
true
true
f7f98a57a27938c31d74bb67d3e4bbd2181b089c
4,305
py
Python
sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/_event_hub_management_client.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
null
null
null
sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/_event_hub_management_client.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/_event_hub_management_client.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
50.05814
124
0.75122
from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from ._configuration import EventHubManagementClientConfiguration from .operations import ClustersOperations from .operations import NamespacesOperations from .operations import ConfigurationOperations from .operations i...
true
true
f7f98aa681c10e3fb1cd5f5a827238e8b3aab7bf
2,961
py
Python
sequence_server_wrapper/examples/example_device.py
vstadnytskyi/sequence-server-wrapper
1ee23638752a969f51b11a65a3b7652874efe8c5
[ "BSD-3-Clause" ]
null
null
null
sequence_server_wrapper/examples/example_device.py
vstadnytskyi/sequence-server-wrapper
1ee23638752a969f51b11a65a3b7652874efe8c5
[ "BSD-3-Clause" ]
null
null
null
sequence_server_wrapper/examples/example_device.py
vstadnytskyi/sequence-server-wrapper
1ee23638752a969f51b11a65a3b7652874efe8c5
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 from logging import debug, info, warning, error from time import sleep import traceback class DeviceExample(): def __init__(self): self.io = None self.trajectory = None self.idle_value = 0.0 def init(self): from time import sleep """ orde...
30.214286
88
0.524147
from logging import debug, info, warning, error from time import sleep import traceback class DeviceExample(): def __init__(self): self.io = None self.trajectory = None self.idle_value = 0.0 def init(self): from time import sleep debug('Conducting orderly initializati...
true
true
f7f98b2c930d177bb959c308103dda015dce3fc8
18,784
py
Python
vnpy/trader/app/optionMaster/omEngine.py
jacksama/vnpy
0fed1d01ad527b4c083ce39dc722f5a809074b78
[ "MIT" ]
1
2021-12-28T02:46:09.000Z
2021-12-28T02:46:09.000Z
vnpy/trader/app/optionMaster/omEngine.py
gaoyangtom/vnpy
0fed1d01ad527b4c083ce39dc722f5a809074b78
[ "MIT" ]
null
null
null
vnpy/trader/app/optionMaster/omEngine.py
gaoyangtom/vnpy
0fed1d01ad527b4c083ce39dc722f5a809074b78
[ "MIT" ]
1
2021-12-28T02:46:16.000Z
2021-12-28T02:46:16.000Z
# encoding: UTF-8 from __future__ import division import json import shelve import os import traceback from collections import OrderedDict from vnpy.event import Event from vnpy.trader.vtEvent import (EVENT_TICK, EVENT_TRADE, EVENT_CONTRACT, EVENT_ORDER, EVENT_TIMER) from vnpy.trader....
35.847328
96
0.458635
from __future__ import division import json import shelve import os import traceback from collections import OrderedDict from vnpy.event import Event from vnpy.trader.vtEvent import (EVENT_TICK, EVENT_TRADE, EVENT_CONTRACT, EVENT_ORDER, EVENT_TIMER) from vnpy.trader.vtFunction import...
true
true
f7f98b579ef645df2a2c86f5bb7bbb28bf196c34
653
py
Python
wagtail/wagtailcore/migrations/0034_page_live_revision.py
patphongs/wagtail
32555f7a1c599c139e0f26c22907c9612af2e015
[ "BSD-3-Clause" ]
1
2019-11-06T10:51:42.000Z
2019-11-06T10:51:42.000Z
wagtail/wagtailcore/migrations/0034_page_live_revision.py
patphongs/wagtail
32555f7a1c599c139e0f26c22907c9612af2e015
[ "BSD-3-Clause" ]
null
null
null
wagtail/wagtailcore/migrations/0034_page_live_revision.py
patphongs/wagtail
32555f7a1c599c139e0f26c22907c9612af2e015
[ "BSD-3-Clause" ]
2
2017-08-08T01:39:02.000Z
2018-05-06T06:16:10.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-26 21:32 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0033_remove_golive_expiry_help_text'), ]...
29.681818
200
0.679939
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0033_remove_golive_expiry_help_text'), ] operations = [ migrations.AddField( model_nam...
true
true
f7f98c856f56ffb55ddba793a6f969bdabb8eaef
18,273
py
Python
packages/galapagos_embedded/libs/lib_frontcam.py
100kimch/ros_galapagos
8f92cb93246c263b61199aef113e43cefc5f3939
[ "MIT" ]
2
2020-10-26T05:01:35.000Z
2022-02-14T10:37:17.000Z
packages/galapagos_embedded/libs/lib_frontcam.py
100kimch/ros_galapagos
8f92cb93246c263b61199aef113e43cefc5f3939
[ "MIT" ]
null
null
null
packages/galapagos_embedded/libs/lib_frontcam.py
100kimch/ros_galapagos
8f92cb93246c263b61199aef113e43cefc5f3939
[ "MIT" ]
null
null
null
import cv2 import numpy as np import rospy import matplotlib.pyplot as plt import sys from scheduler import SCHEDULER from constants import * import os import sys # * Variables # variables for matching # Initiate SIFT description detector Orb = cv2.ORB_create() # create BFMatcher object Bf = cv2.BFMatcher(cv2.NORM_H...
34.347744
136
0.626224
import cv2 import numpy as np import rospy import matplotlib.pyplot as plt import sys from scheduler import SCHEDULER from constants import * import os import sys Orb = cv2.ORB_create() Bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=True) ref_images = {} lower_blue = np.array([90, 110, 100]) upper_blue = np...
true
true
f7f98cbe22eec65b0b2524e768926b30f7b6bbdf
552
py
Python
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/wandering-firefly-29609
bb3c8714937583d9784224e9d08f5590482595f7
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/wandering-firefly-29609
bb3c8714937583d9784224e9d08f5590482595f7
[ "FTL", "AML", "RSA-MD" ]
56
2021-08-07T14:53:57.000Z
2022-03-06T17:22:36.000Z
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/wandering-firefly-29609
bb3c8714937583d9784224e9d08f5590482595f7
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "wandering-firefly-29609.botics.co" site_params = { "name": "Wandering Firefly", } if custom_domain: site_params["domain"] = custom_domain Site.object...
21.230769
61
0.663043
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "wandering-firefly-29609.botics.co" site_params = { "name": "Wandering Firefly", } if custom_domain: site_params["domain"] = custom_domain Site.object...
true
true
f7f98d85a31cd0e1cf877af91144cb1b4e04fd97
17,108
py
Python
tests/base_test_class.py
valentijnscholten/django-DefectDojo
5d0b9551ee9574d01b9912399919e3eefe1e1d65
[ "BSD-3-Clause" ]
null
null
null
tests/base_test_class.py
valentijnscholten/django-DefectDojo
5d0b9551ee9574d01b9912399919e3eefe1e1d65
[ "BSD-3-Clause" ]
206
2020-04-20T16:03:18.000Z
2022-01-15T23:07:48.000Z
tests/base_test_class.py
valentijnscholten/django-DefectDojo
5d0b9551ee9574d01b9912399919e3eefe1e1d65
[ "BSD-3-Clause" ]
1
2020-12-06T15:44:44.000Z
2020-12-06T15:44:44.000Z
from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from selenium.common.exceptions import NoAlertPresentException, NoSuch...
41.026379
234
0.656886
from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from selenium.common.exceptions import NoAlertPresentException, NoSuch...
true
true
f7f98e00acf11fa9788ce06d21ba4ee8e4f2a9aa
4,393
py
Python
modin/data_management/partitioning/remote_partition/pandas_on_python.py
zeevikal/modin
2128f80280092902c61d738d9d2ef551bc4ffaf4
[ "Apache-2.0" ]
null
null
null
modin/data_management/partitioning/remote_partition/pandas_on_python.py
zeevikal/modin
2128f80280092902c61d738d9d2ef551bc4ffaf4
[ "Apache-2.0" ]
null
null
null
modin/data_management/partitioning/remote_partition/pandas_on_python.py
zeevikal/modin
2128f80280092902c61d738d9d2ef551bc4ffaf4
[ "Apache-2.0" ]
null
null
null
import pandas from .utils import length_fn_pandas, width_fn_pandas class PandasOnPythonRemotePartition(object): """This abstract class holds the data and metadata for a single partition. The methods required for implementing this abstract class are listed in the section immediately follow...
30.506944
83
0.59094
import pandas from .utils import length_fn_pandas, width_fn_pandas class PandasOnPythonRemotePartition(object): def __init__(self, data): self.data = data self.call_queue = [] def get(self): return self.data.copy() def apply(self, func, **kwargs): self.ca...
true
true
f7f98e0c702db3580e71be2e696ca6c7d904a52c
1,700
py
Python
mammoth/docx/numbering_xml.py
cockcrow/python-mammoth
f05ae0c7ec6e4faee6267d3b05e3aabce3a2cbb2
[ "BSD-2-Clause" ]
1
2021-03-20T01:50:18.000Z
2021-03-20T01:50:18.000Z
mammoth/docx/numbering_xml.py
cockcrow/python-mammoth
f05ae0c7ec6e4faee6267d3b05e3aabce3a2cbb2
[ "BSD-2-Clause" ]
null
null
null
mammoth/docx/numbering_xml.py
cockcrow/python-mammoth
f05ae0c7ec6e4faee6267d3b05e3aabce3a2cbb2
[ "BSD-2-Clause" ]
null
null
null
from ..documents import numbering_level def read_numbering_xml_element(element): abstract_nums = _read_abstract_nums(element) nums = _read_nums(element, abstract_nums) return Numbering(nums) def _read_abstract_nums(element): abstract_num_elements = element.find_children("w:abstractNum") return d...
28.333333
87
0.717647
from ..documents import numbering_level def read_numbering_xml_element(element): abstract_nums = _read_abstract_nums(element) nums = _read_nums(element, abstract_nums) return Numbering(nums) def _read_abstract_nums(element): abstract_num_elements = element.find_children("w:abstractNum") return d...
true
true
f7f98e0f9144d9c194c8264c39056b4374ebb641
2,470
py
Python
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/tools/summary.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
883
2020-11-12T11:46:46.000Z
2022-03-31T18:27:10.000Z
tools/summary.py
arkofgalaxy/PaddleVideo
64251233c83b7eb681061b454da198a9082309a6
[ "Apache-2.0" ]
233
2020-12-09T06:04:59.000Z
2022-03-28T08:16:51.000Z
tools/summary.py
arkofgalaxy/PaddleVideo
64251233c83b7eb681061b454da198a9082309a6
[ "Apache-2.0" ]
225
2020-11-13T06:21:55.000Z
2022-03-31T05:36:11.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
30.121951
110
0.675304
import argparse import os import sys import os.path as osp import paddle import paddle.nn.functional as F from paddle.jit import to_static import paddleslim __dir__ = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.abspath(os.path.join(__dir__, '../'))) from paddlevideo.modeling.buil...
true
true
f7f98e7de1216bce575d7173df886b1c0b423252
2,053
py
Python
build/lib/tnetwork/test/test_convert.py
Yquetzal/tnetwork
43fb2f19aeed57a8a9d9af032ee80f1c9f58516d
[ "BSD-2-Clause" ]
4
2019-02-19T07:49:06.000Z
2020-09-01T16:17:54.000Z
tnetwork/test/test_convert.py
Yquetzal/tnetwork
43fb2f19aeed57a8a9d9af032ee80f1c9f58516d
[ "BSD-2-Clause" ]
1
2019-07-13T16:16:28.000Z
2019-07-15T09:34:33.000Z
build/lib/tnetwork/test/test_convert.py
Yquetzal/tnetwork
43fb2f19aeed57a8a9d9af032ee80f1c9f58516d
[ "BSD-2-Clause" ]
3
2019-07-13T16:09:20.000Z
2022-02-08T02:23:46.000Z
import unittest import tnetwork as tn class FunctionTestCase(unittest.TestCase): def test_SN2IG2SN(self): sn = tn.graph_socioPatterns2012(format=tn.DynGraphSN) ig = sn.to_DynGraphIG() sn2 = ig.to_DynGraphSN(slices=20) self.assertEqual(sn.snapshots_timesteps(),sn2.snapshots_times...
36.660714
88
0.67511
import unittest import tnetwork as tn class FunctionTestCase(unittest.TestCase): def test_SN2IG2SN(self): sn = tn.graph_socioPatterns2012(format=tn.DynGraphSN) ig = sn.to_DynGraphIG() sn2 = ig.to_DynGraphSN(slices=20) self.assertEqual(sn.snapshots_timesteps(),sn2.snapshots_times...
true
true
f7f98eb70fc18671c3d0b8b711ceebc9123ebc31
598
py
Python
home/migrations/0003_blogmodel_user.py
suyogojha/Blog-Django
d75d2e021f3b66cece462dfbdf3a3405a433a254
[ "MIT" ]
null
null
null
home/migrations/0003_blogmodel_user.py
suyogojha/Blog-Django
d75d2e021f3b66cece462dfbdf3a3405a433a254
[ "MIT" ]
null
null
null
home/migrations/0003_blogmodel_user.py
suyogojha/Blog-Django
d75d2e021f3b66cece462dfbdf3a3405a433a254
[ "MIT" ]
null
null
null
# Generated by Django 3.2 on 2021-04-18 14:00 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('home', '0002_alter_blogmod...
27.181818
133
0.67893
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('home', '0002_alter_blogmodel_slug'), ] operations = [ ...
true
true
f7f98f259ed1d8115b399156659e50ec8ececc60
268
py
Python
npbench/benchmarks/polybench/covariance/covariance.py
frahlg/npbench
1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26
[ "BSD-3-Clause" ]
27
2021-05-10T11:49:13.000Z
2022-03-22T18:07:19.000Z
npbench/benchmarks/polybench/covariance/covariance.py
frahlg/npbench
1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26
[ "BSD-3-Clause" ]
3
2021-12-01T13:03:17.000Z
2022-03-17T10:53:00.000Z
npbench/benchmarks/polybench/covariance/covariance.py
frahlg/npbench
1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26
[ "BSD-3-Clause" ]
7
2021-06-24T03:40:25.000Z
2022-01-26T09:04:33.000Z
# Copyright 2021 ETH Zurich and the NPBench authors. All rights reserved. import numpy as np def initialize(M, N, datatype=np.float64): float_n = datatype(N) data = np.fromfunction(lambda i, j: (i * j) / M, (N, M), dtype=datatype) return float_n, data
24.363636
76
0.682836
import numpy as np def initialize(M, N, datatype=np.float64): float_n = datatype(N) data = np.fromfunction(lambda i, j: (i * j) / M, (N, M), dtype=datatype) return float_n, data
true
true
f7f9902f153f6b92527da0bf1853d1044d33cd33
10,695
py
Python
estimators/neural_dual_dice.py
isabella232/dice_rl
1af2cda70e7e90302520c4576da8e5fdbdc9f261
[ "Apache-2.0" ]
85
2020-08-05T18:20:15.000Z
2022-03-23T08:44:16.000Z
estimators/neural_dual_dice.py
google-research/dice_rl
3d9f74fe43c49dfd5d0ce7405a59226a9c139381
[ "Apache-2.0" ]
7
2020-08-16T09:31:11.000Z
2021-07-15T00:41:53.000Z
estimators/neural_dual_dice.py
rajatvd/dice_rl
0e9e1a0963cb99ae3d995aa302fa19094c580d35
[ "Apache-2.0" ]
10
2020-08-16T04:24:43.000Z
2022-03-11T23:27:20.000Z
# Copyright 2020 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
40.820611
80
0.692006
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 tf_agents.specs import tensor_spec from tf_agents.policies import tf_policy from tf_agents.utils import common as tfagents_common from typ...
true
true
f7f9913f6080ce29d5c4c2558a99aa468982316a
5,113
py
Python
botnet/modules/baseresponder.py
admdev8/botnet-2
2fd43237e628869eb34d8e7a6747da6d71c1192c
[ "MIT" ]
69
2015-02-24T19:24:23.000Z
2022-02-23T08:04:53.000Z
botnet/modules/baseresponder.py
admdev8/botnet-2
2fd43237e628869eb34d8e7a6747da6d71c1192c
[ "MIT" ]
10
2017-06-28T21:08:29.000Z
2022-01-26T07:46:02.000Z
botnet/modules/baseresponder.py
admdev8/botnet-2
2fd43237e628869eb34d8e7a6747da6d71c1192c
[ "MIT" ]
39
2015-11-19T10:07:21.000Z
2022-03-30T10:56:24.000Z
import re from ..helpers import is_channel_name from ..message import Message from ..signals import message_out from .base import BaseModule from .mixins import ConfigMixin, MessageDispatcherMixin from .lib import parse_command class BaseResponder(ConfigMixin, MessageDispatcherMixin, BaseModule): """Inherit from ...
36.784173
80
0.621357
import re from ..helpers import is_channel_name from ..message import Message from ..signals import message_out from .base import BaseModule from .mixins import ConfigMixin, MessageDispatcherMixin from .lib import parse_command class BaseResponder(ConfigMixin, MessageDispatcherMixin, BaseModule): # is based...
true
true
f7f991602b439168bface83da9407a895bf5d90d
1,014
py
Python
model.py
eric-sentient/MIDI-reAE-chords
ac16210bbeb822cb4babb95974a4a05d527763cc
[ "MIT" ]
null
null
null
model.py
eric-sentient/MIDI-reAE-chords
ac16210bbeb822cb4babb95974a4a05d527763cc
[ "MIT" ]
null
null
null
model.py
eric-sentient/MIDI-reAE-chords
ac16210bbeb822cb4babb95974a4a05d527763cc
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import load_train from keras.models import Sequential, Model from keras.layers import Flatten, Dropout, RepeatVector, LSTM, Dense, Dropout, Embedding, Masking, Bidirectional, Layer from keras.callbacks import EarlyStopping, ModelCheckpoint def make_model(): model = Sequenti...
26
119
0.657791
import pandas as pd import numpy as np import load_train from keras.models import Sequential, Model from keras.layers import Flatten, Dropout, RepeatVector, LSTM, Dense, Dropout, Embedding, Masking, Bidirectional, Layer from keras.callbacks import EarlyStopping, ModelCheckpoint def make_model(): model = Sequenti...
true
true
f7f991f11a49bed2aef71fe3917e5d676de18124
2,242
py
Python
visualize.py
Toroi0610/visualize_interactive
8ddc8c248902ff59f1800d2418c697ffe1e5b472
[ "MIT" ]
null
null
null
visualize.py
Toroi0610/visualize_interactive
8ddc8c248902ff59f1800d2418c697ffe1e5b472
[ "MIT" ]
null
null
null
visualize.py
Toroi0610/visualize_interactive
8ddc8c248902ff59f1800d2418c697ffe1e5b472
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[5]: import joblib import numpy as np import matplotlib.pyplot as plt import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button, RadioButtons # In[6]: with open("model.pkl", "rb") as f: model = joblib.load(f) # In[7]: def p...
18.080645
68
0.609277
import joblib import numpy as np import matplotlib.pyplot as plt import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button, RadioButtons with open("model.pkl", "rb") as f: model = joblib.load(f) def pred(model, a, b, c, d): res = [] for x in np.arange(...
true
true
f7f992fcea49f9bec747311a0772f563c14ccfeb
66,995
py
Python
Lib/test/test_asyncio/test_unix_events.py
NihalAgarwal/cpython
e1179a5096fb12297ececd7a1c79969aa5747e28
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Lib/test/test_asyncio/test_unix_events.py
NihalAgarwal/cpython
e1179a5096fb12297ececd7a1c79969aa5747e28
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Lib/test/test_asyncio/test_unix_events.py
NihalAgarwal/cpython
e1179a5096fb12297ececd7a1c79969aa5747e28
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
"""Tests for unix_events.py.""" import collections import contextlib import errno import io import os import pathlib import signal import socket import stat import sys import tempfile import threading import unittest from unittest import mock from test import support if sys.platform == 'win32': raise unittest.Ski...
34.515714
80
0.624345
import collections import contextlib import errno import io import os import pathlib import signal import socket import stat import sys import tempfile import threading import unittest from unittest import mock from test import support if sys.platform == 'win32': raise unittest.SkipTest('UNIX only') import asyn...
true
true
f7f994ba76665067e1ccbdba2cef4940b951dc04
2,370
py
Python
BurpExtensions/modules/webcommon.py
afollett/mywebappscripts
83dc8984cd4d4216578aee506278a2e6e9473ce9
[ "MIT" ]
129
2015-02-05T04:45:54.000Z
2021-11-27T06:54:17.000Z
BurpExtensions/modules/webcommon.py
YarboJanks/mywebappscripts
83dc8984cd4d4216578aee506278a2e6e9473ce9
[ "MIT" ]
1
2016-03-21T09:22:34.000Z
2016-03-21T10:57:36.000Z
BurpExtensions/modules/webcommon.py
YarboJanks/mywebappscripts
83dc8984cd4d4216578aee506278a2e6e9473ce9
[ "MIT" ]
60
2015-02-20T15:49:46.000Z
2021-03-01T01:44:04.000Z
import re def get_host_header_from_request(self,requestInfo): t1 = requestInfo.getHeaders() header_name='Host:' regex=re.compile('^.*%s.*'%header_name,re.IGNORECASE) for i in t1: #Search for the Host header m1=regex.match(i) #Extract and store the Host header if m1: t2=i.split(': ') ...
23.009709
130
0.666245
import re def get_host_header_from_request(self,requestInfo): t1 = requestInfo.getHeaders() header_name='Host:' regex=re.compile('^.*%s.*'%header_name,re.IGNORECASE) for i in t1: m1=regex.match(i) if m1: t2=i.split(': ') return t2 def extract_directory(self,callbacks,url): t...
true
true
f7f9951a302081ac98159ad5fbfd7f3467802a8a
3,222
py
Python
phigaro/misc/vis.py
bobeobibo/phigaro
342a3454bb5324426b25feb4a4d1f640b58bf8f8
[ "MIT" ]
31
2019-03-06T14:33:37.000Z
2022-03-08T07:16:07.000Z
phigaro/misc/vis.py
bobeobibo/phigaro
342a3454bb5324426b25feb4a4d1f640b58bf8f8
[ "MIT" ]
27
2019-05-17T05:06:58.000Z
2022-03-27T00:38:56.000Z
phigaro/misc/vis.py
bobeobibo/phigaro
342a3454bb5324426b25feb4a4d1f640b58bf8f8
[ "MIT" ]
12
2017-08-23T12:48:38.000Z
2021-06-24T00:57:22.000Z
import numpy as np from plotly import tools from plotly.graph_objs import Bar import plotly.offline as py from phigaro.finder.v2 import calc_scores def _make_coords_colors(data_len, real_phage_coords): colors = np.zeros(data_len) for begin, end in real_phage_coords: for i in range(begin, end + 1): ...
27.305085
79
0.606145
import numpy as np from plotly import tools from plotly.graph_objs import Bar import plotly.offline as py from phigaro.finder.v2 import calc_scores def _make_coords_colors(data_len, real_phage_coords): colors = np.zeros(data_len) for begin, end in real_phage_coords: for i in range(begin, end + 1): ...
true
true
f7f9953808294f5b02d2ec4faf583a807d423e7a
4,693
py
Python
grr/lib/flows/cron/filestore_stats.py
theGreenJedi/grr
d9e11e304dc299d49c76b7fdf6fdbfcd4b8eec39
[ "Apache-2.0" ]
null
null
null
grr/lib/flows/cron/filestore_stats.py
theGreenJedi/grr
d9e11e304dc299d49c76b7fdf6fdbfcd4b8eec39
[ "Apache-2.0" ]
null
null
null
grr/lib/flows/cron/filestore_stats.py
theGreenJedi/grr
d9e11e304dc299d49c76b7fdf6fdbfcd4b8eec39
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Filestore stats crons.""" from grr.lib import aff4 from grr.lib import flow from grr.lib import rdfvalue from grr.lib import stats as stats_lib from grr.lib import utils from grr.lib.aff4_objects import cronjobs from grr.lib.aff4_objects import stats as aff4_stats # pylint: enable=unused-imp...
32.365517
80
0.622843
from grr.lib import aff4 from grr.lib import flow from grr.lib import rdfvalue from grr.lib import stats as stats_lib from grr.lib import utils from grr.lib.aff4_objects import cronjobs from grr.lib.aff4_objects import stats as aff4_stats class ClassCounter(object): def __init__(self, attribute, title): s...
true
true
f7f9967e6e3514f8f4b1ce4db5f80834c49af67c
2,806
py
Python
SimpleGP/tests/test_egp.py
mgraffg/simplegp
7e4639e3ac76571a4e67669cad6e8e775b3fc345
[ "Apache-2.0" ]
2
2015-03-18T17:26:20.000Z
2019-03-18T17:28:16.000Z
SimpleGP/tests/test_egp.py
mgraffg/simplegp
7e4639e3ac76571a4e67669cad6e8e775b3fc345
[ "Apache-2.0" ]
1
2015-04-19T17:02:49.000Z
2015-07-21T18:48:34.000Z
SimpleGP/tests/test_egp.py
mgraffg/simplegp
7e4639e3ac76571a4e67669cad6e8e775b3fc345
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Mario Graff Guerrero # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in wri...
41.264706
75
0.561654
import numpy as np from SimpleGP import EGPS, SparseArray class TestSGPS(object): def __init__(self): x = np.linspace(-10, 10, 100) pol = np.array([0.2, -0.3, 0.2]) self._pol = pol X = np.vstack((x**2, x, np.ones(x.shape[0]))) self._y = (X.T * pol).sum(axis=1)...
false
true
f7f996ca97a20b576548371acc14f3991fd12df0
1,763
py
Python
users/rest_apis/forms.py
sharif-42/Personal_Website
7c385bec272ec7b5c816eab92e3b5bfb8cd80016
[ "MIT" ]
null
null
null
users/rest_apis/forms.py
sharif-42/Personal_Website
7c385bec272ec7b5c816eab92e3b5bfb8cd80016
[ "MIT" ]
null
null
null
users/rest_apis/forms.py
sharif-42/Personal_Website
7c385bec272ec7b5c816eab92e3b5bfb8cd80016
[ "MIT" ]
null
null
null
from django import forms from django.contrib.auth.forms import ReadOnlyPasswordHashField from django.core.exceptions import ValidationError from users.models import User class UserCreationForm(forms.ModelForm): """A form for creating new users. Includes all the required fields, plus a repeated password.""" ...
34.568627
90
0.684061
from django import forms from django.contrib.auth.forms import ReadOnlyPasswordHashField from django.core.exceptions import ValidationError from users.models import User class UserCreationForm(forms.ModelForm): password1 = forms.CharField(label='Password', widget=forms.PasswordInput) password2 = forms.CharFi...
true
true
f7f996d5c1950581964dcb5d43d27508f902e39c
15,810
py
Python
test/core/end2end/gen_build_yaml.py
BusyJay/grpc
6bf5f833efe2cb9e2ecc14358dd9699cd5d05263
[ "Apache-2.0" ]
null
null
null
test/core/end2end/gen_build_yaml.py
BusyJay/grpc
6bf5f833efe2cb9e2ecc14358dd9699cd5d05263
[ "Apache-2.0" ]
null
null
null
test/core/end2end/gen_build_yaml.py
BusyJay/grpc
6bf5f833efe2cb9e2ecc14358dd9699cd5d05263
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2.7 # Copyright 2015 gRPC 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 la...
47.477477
241
0.658065
"""Generates the appropriate build.json data for all the end2end tests.""" import yaml import collections import hashlib FixtureOptions = collections.namedtuple( 'FixtureOptions', 'fullstack includes_proxy dns_resolver name_resolution secure platforms ci_mac tracing exclude_configs exclude_i...
false
true
f7f9973b62bbdac27ac66682c0069d222c248ccf
664
py
Python
deepnog/utils/tests/conftest.py
alepfu/deepnog
5cd3dbf15364c88240d7b71793a4e532439b3811
[ "BSD-3-Clause" ]
15
2020-03-02T10:56:28.000Z
2022-02-22T14:03:36.000Z
deepnog/utils/tests/conftest.py
alepfu/deepnog
5cd3dbf15364c88240d7b71793a4e532439b3811
[ "BSD-3-Clause" ]
47
2020-03-02T11:01:25.000Z
2021-03-26T11:54:58.000Z
deepnog/utils/tests/conftest.py
alepfu/deepnog
5cd3dbf15364c88240d7b71793a4e532439b3811
[ "BSD-3-Clause" ]
6
2020-03-14T12:36:37.000Z
2021-08-05T12:59:50.000Z
import pytest def pytest_addoption(parser): parser.addoption( "--hide-torch", action='store_true', default=False, help="Run tests hiding torch." ) def pytest_configure(config): config.addinivalue_line("markers", "hide_torch: mark test as hiding torch") def pytest_collec...
26.56
79
0.661145
import pytest def pytest_addoption(parser): parser.addoption( "--hide-torch", action='store_true', default=False, help="Run tests hiding torch." ) def pytest_configure(config): config.addinivalue_line("markers", "hide_torch: mark test as hiding torch") def pytest_collec...
true
true
f7f9976062337e95cf838b5119df4c3b38efef76
4,528
py
Python
web/Shitty_Imgur/app/application.py
abs0lut3pwn4g3/dc91120-CTF
5582b250f672747dde985e1e39499af10774cee3
[ "MIT" ]
3
2019-04-20T16:00:33.000Z
2022-02-13T09:04:04.000Z
web/Shitty_Imgur/app/application.py
abs0lut3pwn4g3/dc91120-CTF
5582b250f672747dde985e1e39499af10774cee3
[ "MIT" ]
null
null
null
web/Shitty_Imgur/app/application.py
abs0lut3pwn4g3/dc91120-CTF
5582b250f672747dde985e1e39499af10774cee3
[ "MIT" ]
null
null
null
import os from flask import Flask, render_template, request, flash, redirect, url_for, session, send_from_directory from flask_sqlalchemy import SQLAlchemy from flask_bcrypt import Bcrypt app = Flask(__name__, static_folder='static') app.secret_key = "a3d5c6cd65752b6fab43ec3f32705a58" project_dir = os.path.dirname(os...
29.986755
105
0.702076
import os from flask import Flask, render_template, request, flash, redirect, url_for, session, send_from_directory from flask_sqlalchemy import SQLAlchemy from flask_bcrypt import Bcrypt app = Flask(__name__, static_folder='static') app.secret_key = "a3d5c6cd65752b6fab43ec3f32705a58" project_dir = os.path.dirname(os...
true
true
f7f997711a07128f9f56f5ac02c9883830d9e8df
341
py
Python
main.py
Heroadn/HighVoltagePy
d5f7edbfff707a053498fce070673b9bc5aa726c
[ "MIT" ]
2
2019-10-07T18:57:37.000Z
2019-10-09T02:05:36.000Z
main.py
Heroadn/HighVoltagePy
d5f7edbfff707a053498fce070673b9bc5aa726c
[ "MIT" ]
7
2020-02-12T03:15:28.000Z
2022-02-11T03:44:26.000Z
main.py
Heroadn/HighVoltagePy
d5f7edbfff707a053498fce070673b9bc5aa726c
[ "MIT" ]
null
null
null
import VoltagePy import helper #setup VoltagePy.setup('webdrivers/Chrome/76/linux_76',["--disable-gpu"]) browser = VoltagePy.open("http://localhost:8082/usuario/registrar")#https://www.duckduckgo.com #usuario form data = helper.fileToJson('usuario.json') VoltagePy.fillForm(data,"form") #form.submit() #inputElement.se...
24.357143
94
0.771261
import VoltagePy import helper VoltagePy.setup('webdrivers/Chrome/76/linux_76',["--disable-gpu"]) browser = VoltagePy.open("http://localhost:8082/usuario/registrar") data = helper.fileToJson('usuario.json') VoltagePy.fillForm(data,"form")
true
true
f7f997cac8ed855c59b7d339d3a705745f9c02d5
3,396
py
Python
lib/config/default.py
haotianliu001/HRNet-Lesion
9dae108879456e084b2200e39d7e58c1c08c2b16
[ "MIT" ]
null
null
null
lib/config/default.py
haotianliu001/HRNet-Lesion
9dae108879456e084b2200e39d7e58c1c08c2b16
[ "MIT" ]
null
null
null
lib/config/default.py
haotianliu001/HRNet-Lesion
9dae108879456e084b2200e39d7e58c1c08c2b16
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Ke Sun (sunk@mail.ustc.edu.cn) # ------------------------------------------------------------------------------ from __future__ import absolute_import from __future_...
21.909677
80
0.693463
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from yacs.config import CfgNode as CN _C = CN() _C.OUTPUT_DIR = '' _C.LOG_DIR = '' _C.GPUS = (0,) _C.WORKERS = 4 _C.PRINT_FREQ = 20 _C.AUTO_RESUME = False _C.PIN_MEMORY = True _C.RANK = 0 _...
true
true
f7f999a04e00037fbe5d680f907bc536e2224643
808
py
Python
halotools/mock_observables/counts_in_cells/engines/setup_package.py
pllim/halotools
6499cff09e7e0f169e4f425ee265403f6be816e8
[ "BSD-3-Clause" ]
83
2015-01-15T14:54:16.000Z
2021-12-09T11:28:02.000Z
halotools/mock_observables/counts_in_cells/engines/setup_package.py
pllim/halotools
6499cff09e7e0f169e4f425ee265403f6be816e8
[ "BSD-3-Clause" ]
579
2015-01-14T15:57:37.000Z
2022-01-13T18:58:44.000Z
halotools/mock_observables/counts_in_cells/engines/setup_package.py
pllim/halotools
6499cff09e7e0f169e4f425ee265403f6be816e8
[ "BSD-3-Clause" ]
70
2015-01-14T15:15:58.000Z
2021-12-22T18:18:31.000Z
from distutils.extension import Extension import os PATH_TO_PKG = os.path.relpath(os.path.dirname(__file__)) SOURCES = ("counts_in_cylinders_engine.pyx", ) THIS_PKG_NAME = '.'.join(__name__.split('.')[:-1]) def get_extensions(): names = [THIS_PKG_NAME + "." + src.replace('.pyx', '') for src in SOURCES] sour...
28.857143
78
0.648515
from distutils.extension import Extension import os PATH_TO_PKG = os.path.relpath(os.path.dirname(__file__)) SOURCES = ("counts_in_cylinders_engine.pyx", ) THIS_PKG_NAME = '.'.join(__name__.split('.')[:-1]) def get_extensions(): names = [THIS_PKG_NAME + "." + src.replace('.pyx', '') for src in SOURCES] sour...
true
true
f7f99b1d745e8b5a1dc661b26642a0ef4948f065
669
py
Python
sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/__init__.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/__init__.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/__init__.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
33.45
76
0.608371
from ._configuration import FaceClientConfiguration from ._face_client import FaceClient __all__ = ['FaceClient', 'FaceClientConfiguration'] from .version import VERSION __version__ = VERSION
true
true
f7f99c541ae09f6b48dbeed514425ef8a4f55eb3
2,941
py
Python
src/split_image/split.py
whiplashoo/split-image
9dde800135d6d7cba19087ac8a1ffbb2e25809cc
[ "MIT" ]
6
2021-11-06T07:55:56.000Z
2022-03-30T09:26:12.000Z
src/split_image/split.py
whiplashoo/split-image
9dde800135d6d7cba19087ac8a1ffbb2e25809cc
[ "MIT" ]
null
null
null
src/split_image/split.py
whiplashoo/split-image
9dde800135d6d7cba19087ac8a1ffbb2e25809cc
[ "MIT" ]
null
null
null
#!usr/bin/env python import argparse from collections import Counter from PIL import Image def split(im, rows, cols, image_path): im_width, im_height = im.size row_width = int(im_width / rows) row_height = int(im_height / cols) n = 0 for i in range(0, cols): for j in range(0, rows): ...
35.865854
94
0.581095
import argparse from collections import Counter from PIL import Image def split(im, rows, cols, image_path): im_width, im_height = im.size row_width = int(im_width / rows) row_height = int(im_height / cols) n = 0 for i in range(0, cols): for j in range(0, rows): box = (j * r...
true
true
f7f99d9512683e4a04ae1998805f8f4aa8c5d913
3,769
py
Python
ludwig/datasets/flickr8k/__init__.py
carlogrisetti/ludwig
5c0887f14867e1577e0ddc3806c5cf7a781fb665
[ "Apache-2.0" ]
null
null
null
ludwig/datasets/flickr8k/__init__.py
carlogrisetti/ludwig
5c0887f14867e1577e0ddc3806c5cf7a781fb665
[ "Apache-2.0" ]
null
null
null
ludwig/datasets/flickr8k/__init__.py
carlogrisetti/ludwig
5c0887f14867e1577e0ddc3806c5cf7a781fb665
[ "Apache-2.0" ]
1
2019-09-05T09:19:39.000Z
2019-09-05T09:19:39.000Z
#! /usr/bin/env python # coding=utf-8 # Copyright (c) 2019 Uber Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
43.321839
97
0.597241
import os import re from collections import defaultdict from ludwig.datasets.base_dataset import DEFAULT_CACHE_LOCATION, BaseDataset from ludwig.datasets.mixins.download import ZipDownloadMixin from ludwig.datasets.mixins.load import CSVLoadMixin from ludwig.utils.fs_utils import makedirs, rename def...
true
true
f7f99e7d47f0196f9f61d42e699a57a7aa5e4ba3
3,675
py
Python
relation_rcnn/test.py
super-wcg/Relation-Network-for-Object-Detection
f91ef685b8d713b2a88fb5300222b1932e7ddd64
[ "MIT" ]
null
null
null
relation_rcnn/test.py
super-wcg/Relation-Network-for-Object-Detection
f91ef685b8d713b2a88fb5300222b1932e7ddd64
[ "MIT" ]
null
null
null
relation_rcnn/test.py
super-wcg/Relation-Network-for-Object-Detection
f91ef685b8d713b2a88fb5300222b1932e7ddd64
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Relation Networks for Object Detection # Copyright (c) 2017 Microsoft # Licensed under The MIT License [see LICENSE for details] # Modified by Jiayuan Gu, Dazhi Cheng, Yuwen Xiong # -------------------------------------------------------- # Based on: # MX-RCN...
44.277108
174
0.698776
import _init_paths import argparse import os import sys import time import logging from config.config import config, update_config def parse_args(): parser = argparse.ArgumentParser(description='Test a Faster R-CNN network') parser.add_argument('--cfg', help='experiment configure file name',...
false
true
f7f99f15967abee3be0eb8f1392685b53540e401
3,984
py
Python
configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_256x192.py
jlgzb/mmpose
0ecf06e3580f141f6ab44645768a0d6d8ba48383
[ "Apache-2.0" ]
4
2021-10-02T08:21:43.000Z
2021-11-01T07:25:24.000Z
configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_256x192.py
jlgzb/mmpose
0ecf06e3580f141f6ab44645768a0d6d8ba48383
[ "Apache-2.0" ]
null
null
null
configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_256x192.py
jlgzb/mmpose
0ecf06e3580f141f6ab44645768a0d6d8ba48383
[ "Apache-2.0" ]
1
2021-06-22T06:41:45.000Z
2021-06-22T06:41:45.000Z
log_level = 'INFO' load_from = None resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=10) evaluation = dict(interval=10, metric='mAP', save_best='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None) # learning pol...
28.056338
79
0.632028
log_level = 'INFO' load_from = None resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=10) evaluation = dict(interval=10, metric='mAP', save_best='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None) lr_config = d...
true
true
f7f9a1a87e35653efaa2f39e5ea3d37157bf7df7
968
py
Python
code/deep/adarnn/base/loss/mutual_info.py
jiaruonan/transferlearning
0360ba0b09df6c1033d466ddc65f0c870187331e
[ "MIT" ]
9,657
2017-05-01T03:29:35.000Z
2022-03-31T21:25:30.000Z
code/deep/adarnn/base/loss/mutual_info.py
xiaohuihui-com/transferlearning
17583db86db19709ff483a24590f0d5b88e25fe5
[ "MIT" ]
262
2017-09-16T09:33:02.000Z
2022-03-30T05:08:45.000Z
code/deep/adarnn/base/loss/mutual_info.py
xiaohuihui-com/transferlearning
17583db86db19709ff483a24590f0d5b88e25fe5
[ "MIT" ]
3,273
2017-05-01T06:28:31.000Z
2022-03-31T09:57:48.000Z
import torch import torch.nn as nn import torch.nn.functional as F class Mine_estimator(nn.Module): def __init__(self, input_dim=2048, hidden_dim=512): super(Mine_estimator, self).__init__() self.mine_model = Mine(input_dim, hidden_dim) def forward(self, X, Y): Y_shffle = Y[torch.randp...
32.266667
59
0.636364
import torch import torch.nn as nn import torch.nn.functional as F class Mine_estimator(nn.Module): def __init__(self, input_dim=2048, hidden_dim=512): super(Mine_estimator, self).__init__() self.mine_model = Mine(input_dim, hidden_dim) def forward(self, X, Y): Y_shffle = Y[torch.randp...
true
true
f7f9a2c7ab062c209125ef4e457b4996dc74124d
1,519
py
Python
AdnReport/test/test_Adn_Report_dialog.py
METIS-GEO/plugins
1673f22dec90aafd7eef61842f01e6b8e0de833e
[ "MIT" ]
null
null
null
AdnReport/test/test_Adn_Report_dialog.py
METIS-GEO/plugins
1673f22dec90aafd7eef61842f01e6b8e0de833e
[ "MIT" ]
null
null
null
AdnReport/test/test_Adn_Report_dialog.py
METIS-GEO/plugins
1673f22dec90aafd7eef61842f01e6b8e0de833e
[ "MIT" ]
null
null
null
# coding=utf-8 """Dialog test. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ __author__ = 'g.b...
27.125
78
0.687294
__author__ = 'g.bruel@metis-reseaux.fr' __date__ = '2018-01-08' __copyright__ = 'Copyright 2018, gbruel/metis' import unittest from PyQt4.QtGui import QDialogButtonBox, QDialog from Adn_Report_dialog import AdnReportDialog from utilities import get_qgis_app QGIS_APP = get_qgis_app() class AdnReportDialogTest(un...
true
true
f7f9a2d690b276c094aee2a450d85ba36d107780
3,409
py
Python
test/strandtest.py
edbgon/rpipin
99f3023288dbb08b5f8530ba5f23bdc5802ac427
[ "MIT" ]
null
null
null
test/strandtest.py
edbgon/rpipin
99f3023288dbb08b5f8530ba5f23bdc5802ac427
[ "MIT" ]
null
null
null
test/strandtest.py
edbgon/rpipin
99f3023288dbb08b5f8530ba5f23bdc5802ac427
[ "MIT" ]
null
null
null
# NeoPixel library strandtest example # Author: Tony DiCola (tony@tonydicola.com) # # Direct port of the Arduino NeoPixel library strandtest example. Showcases # various animations on a strip of NeoPixels. import time from neopixel import * # LED strip configuration: LED_COUNT = 10 # Number of LED pixels...
34.09
96
0.692285
import time from neopixel import * LED_COUNT = 10 LED_PIN = 18 LED_FREQ_HZ = 800000 LED_DMA = 5 LED_BRIGHTNESS = 128 LED_INVERT = False def colorWipe(strip, color, wait_ms=50): for i in range(strip.numPixels()): strip.setPixelColor(i, color) strip...
true
true
f7f9a373d9eccad91b95aeb1cb2578c3cbbdf211
6,516
py
Python
euca2ools/commands/euimage/installpackedimage.py
vasiliykochergin/euca2ools
23781599a9da28dcc582cffd1df7a7e3f8ce8ba0
[ "BSD-2-Clause" ]
null
null
null
euca2ools/commands/euimage/installpackedimage.py
vasiliykochergin/euca2ools
23781599a9da28dcc582cffd1df7a7e3f8ce8ba0
[ "BSD-2-Clause" ]
null
null
null
euca2ools/commands/euimage/installpackedimage.py
vasiliykochergin/euca2ools
23781599a9da28dcc582cffd1df7a7e3f8ce8ba0
[ "BSD-2-Clause" ]
null
null
null
# Copyright 2014-2015 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions ...
50.123077
79
0.610344
import argparse import hashlib import tempfile from requestbuilder import Arg from requestbuilder.auth.aws import QueryHmacV2Auth from requestbuilder.mixins import FileTransferProgressBarMixin, TabifyingMixin import euca2ools from euca2ools.commands.ec2 import EC2 from euca2ools.commands.euim...
false
true
f7f9a38e0cf2bdd2a6ecda9998ccb93f100e3316
3,799
py
Python
gluon/tests/test_languages.py
himelpdas/biddrive
786e0fc58d8c0afeef0bcad9125b0d98eaabc709
[ "BSD-3-Clause" ]
97
2015-01-17T09:41:57.000Z
2022-03-15T11:39:03.000Z
webui/gluon/tests/test_languages.py
pouyana/teireader
ac0a92d8b2e570eae1c0a03fd35a7b281eccd250
[ "MIT" ]
26
2015-01-02T13:35:48.000Z
2015-06-10T14:39:07.000Z
webui/gluon/tests/test_languages.py
pouyana/teireader
ac0a92d8b2e570eae1c0a03fd35a7b281eccd250
[ "MIT" ]
35
2015-01-25T04:48:37.000Z
2021-01-29T20:32:26.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Unit tests for gluon.languages """ import sys import os import unittest import tempfile import threading import logging def fix_sys_path(): """ logic to have always the correct sys.path '', web2py/gluon, web2py/site-packages, web2py/ ... """ ...
30.637097
79
0.515662
import sys import os import unittest import tempfile import threading import logging def fix_sys_path(): def add_path_first(path): sys.path = [path] + [p for p in sys.path if ( not p == path and not p == (path + '/'))] path = os.path.dirname(os.path.abspath(__file__)) if not os....
true
true