hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c4747390ffa6d1824d43557a023d590eb857e75
22,080
py
Python
qiskit/ignis/verification/randomized_benchmarking/circuits.py
hodgestar/qiskit-ignis
0e511df442e864cd0e06efcdd1db7b03c011168b
[ "Apache-2.0" ]
null
null
null
qiskit/ignis/verification/randomized_benchmarking/circuits.py
hodgestar/qiskit-ignis
0e511df442e864cd0e06efcdd1db7b03c011168b
[ "Apache-2.0" ]
null
null
null
qiskit/ignis/verification/randomized_benchmarking/circuits.py
hodgestar/qiskit-ignis
0e511df442e864cd0e06efcdd1db7b03c011168b
[ "Apache-2.0" ]
1
2021-04-01T17:28:33.000Z
2021-04-01T17:28:33.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
42.217973
79
0.550634
import copy import numpy as np import qiskit from .Clifford import Clifford from .clifford_utils import CliffordUtils as clutils from .dihedral import CNOTDihedral from .dihedral_utils import DihedralUtils as dutils def handle_length_multiplier(length_multiplier, len_pattern, is_puri...
true
true
1c4748aa711a339da4d0853a24e1a562118a999c
1,347
py
Python
bokchoy/utils/log.py
ulule/bokchoy
58afaf325ce275edf5c4a955379afb1cc5eb5de3
[ "MIT" ]
null
null
null
bokchoy/utils/log.py
ulule/bokchoy
58afaf325ce275edf5c4a955379afb1cc5eb5de3
[ "MIT" ]
null
null
null
bokchoy/utils/log.py
ulule/bokchoy
58afaf325ce275edf5c4a955379afb1cc5eb5de3
[ "MIT" ]
null
null
null
import six import logging class NullHandler(logging.Handler): def emit(self, record): pass def logger_isa(l, p, max=1000): this, seen = l, set() for _ in range(max): if this == p: return True else: if this in seen: raise RuntimeError( ...
22.081967
70
0.603563
import six import logging class NullHandler(logging.Handler): def emit(self, record): pass def logger_isa(l, p, max=1000): this, seen = l, set() for _ in range(max): if this == p: return True else: if this in seen: raise RuntimeError( ...
true
true
1c474bb0722209c98d256697379ddc9a21064447
14,683
py
Python
salt/cloud/clouds/vultrpy.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
1
2020-03-31T22:51:16.000Z
2020-03-31T22:51:16.000Z
salt/cloud/clouds/vultrpy.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
null
null
null
salt/cloud/clouds/vultrpy.py
yuriks/salt
d2a5bd8adddb98ec1718d79384aa13b4f37e8028
[ "Apache-2.0", "MIT" ]
1
2021-09-30T07:00:01.000Z
2021-09-30T07:00:01.000Z
# -*- coding: utf-8 -*- ''' Vultr Cloud Module using python-vultr bindings ============================================== .. versionadded:: 2016.3.0 The Vultr cloud module is used to control access to the Vultr VPS system. Use of this module only requires the ``api_key`` parameter. Set up the cloud configuration at...
28.236538
105
0.60914
from __future__ import absolute_import, print_function, unicode_literals import pprint import logging import time import salt.config as config from salt.ext import six from salt.ext.six.moves.urllib.parse import urlencode as _urlencode from salt.exceptions import ( SaltCloudConfigError, SaltCloudSystemExit )...
true
true
1c474bcbae3af33fdc44d18a2aa1c4f0fe87dcdd
7,974
py
Python
scripts/process_perspective.py
dbckz/crossing-the-line
c5debb20e263e03eab9188ce7229753034939964
[ "MIT" ]
1
2022-02-14T17:11:30.000Z
2022-02-14T17:11:30.000Z
scripts/process_perspective.py
dbckz/crossing-the-line
c5debb20e263e03eab9188ce7229753034939964
[ "MIT" ]
null
null
null
scripts/process_perspective.py
dbckz/crossing-the-line
c5debb20e263e03eab9188ce7229753034939964
[ "MIT" ]
null
null
null
""" Script to evaluate tweets against the Perspective API How it's used: * Loads "tweets.csv" files according to 'root_path' and 'day_paths' vars * Sends one tweet at a time to the API * Sleeps for 1 second between requests due to API rate-limit * Appends results to perspective_processed_tweets.csv after every 50 twee...
34.37069
128
0.568096
import os import time import numpy as np import pandas as pd from googleapiclient import discovery def get_perspective_client(api_key): return discovery.build( "commentanalyzer", "v1alpha1", developerKey=api_key, discoveryServiceUrl="https://commentanalyzer.googleapis.com/$discove...
true
true
1c474c7f2acba2c62fabc8f02e4bf556a023e101
1,066
py
Python
jesse/indicators/pfe.py
leaiannotti/jesse
564c54845774891ff3b5a8d3c02cc7cea890ac54
[ "MIT" ]
5
2021-05-21T07:39:16.000Z
2021-11-17T11:08:41.000Z
jesse/indicators/pfe.py
leaiannotti/jesse
564c54845774891ff3b5a8d3c02cc7cea890ac54
[ "MIT" ]
null
null
null
jesse/indicators/pfe.py
leaiannotti/jesse
564c54845774891ff3b5a8d3c02cc7cea890ac54
[ "MIT" ]
2
2021-05-21T10:14:53.000Z
2021-05-27T04:39:51.000Z
from typing import Union import numpy as np import talib from jesse.helpers import get_candle_source, slice_candles, same_length def pfe(candles: np.ndarray, period: int = 10, smoothing: int = 5, source_type: str = "close", sequential: bool = False) -> Union[ float, np.ndarray]: """ Polarized Fractal Ef...
31.352941
130
0.67167
from typing import Union import numpy as np import talib from jesse.helpers import get_candle_source, slice_candles, same_length def pfe(candles: np.ndarray, period: int = 10, smoothing: int = 5, source_type: str = "close", sequential: bool = False) -> Union[ float, np.ndarray]: candles = slice_candles(cand...
true
true
1c474d6b5e003a2cec79900ccf7c78c070a40e62
24,545
py
Python
lib/model_eval/model_eval_ncnet_adap.py
JiwonCocoder/-Joint-Learning-of-Feature-Extraction-and-Cost-Aggregation-for-Semantic-Matching
b79e0e20fd5a1a9ddc0ffa9d7a92e0ebd21018b9
[ "MIT" ]
1
2021-07-22T05:18:10.000Z
2021-07-22T05:18:10.000Z
lib/model_eval/model_eval_ncnet_adap.py
JiwonCocoder/-Joint-Learning-of-Feature-Extraction-and-Cost-Aggregation-for-Semantic-Matching
b79e0e20fd5a1a9ddc0ffa9d7a92e0ebd21018b9
[ "MIT" ]
null
null
null
lib/model_eval/model_eval_ncnet_adap.py
JiwonCocoder/-Joint-Learning-of-Feature-Extraction-and-Cost-Aggregation-for-Semantic-Matching
b79e0e20fd5a1a9ddc0ffa9d7a92e0ebd21018b9
[ "MIT" ]
null
null
null
from __future__ import print_function, division from collections import OrderedDict import torch import torch.nn as nn from torch.autograd import Variable import torchvision.models as models import numpy as np import numpy.matlib import pickle from lib.torch_util import Softmax1D from lib.conv4d import Conv4d from lib...
48.992016
154
0.5989
from __future__ import print_function, division from collections import OrderedDict import torch import torch.nn as nn from torch.autograd import Variable import torchvision.models as models import numpy as np import numpy.matlib import pickle from lib.torch_util import Softmax1D from lib.conv4d import Conv4d from lib...
true
true
1c474eb2a7180c4b80cf9601418dd0b801e92818
1,880
py
Python
pyleecan/Methods/Slot/HoleM53/check.py
Kelos-Zhu/pyleecan
368f8379688e31a6c26d2c1cd426f21dfbceff2a
[ "Apache-2.0" ]
2
2019-06-08T15:04:39.000Z
2020-09-07T13:32:22.000Z
pyleecan/Methods/Slot/HoleM53/check.py
lyhehehe/pyleecan
421e9a843bf30d796415c77dc934546adffd1cd7
[ "Apache-2.0" ]
null
null
null
pyleecan/Methods/Slot/HoleM53/check.py
lyhehehe/pyleecan
421e9a843bf30d796415c77dc934546adffd1cd7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from numpy import pi from ....Methods.Slot.Slot.check import SlotCheckError def check(self): """Check that the HoleM53 object is correct Parameters ---------- self : HoleM53 A HoleM53 object Returns ------- None Raises ------- S53_Rbo0CheckE...
20
58
0.600532
from numpy import pi from ....Methods.Slot.Slot.check import SlotCheckError def check(self): if self.W1 is None: raise S53_NoneError("You must set W1 !") elif self.W2 is None: raise S53_NoneError("You must set W2 !") elif self.W3 is None: raise S53_NoneError("You must set W3...
true
true
1c47503a63b297ae151dad61e17a23efab7bef67
664
py
Python
bot/bot/base.py
TSPS-Team/Project
b1d83cb7957420b8348939f0a1d36f506095519c
[ "MIT" ]
null
null
null
bot/bot/base.py
TSPS-Team/Project
b1d83cb7957420b8348939f0a1d36f506095519c
[ "MIT" ]
null
null
null
bot/bot/base.py
TSPS-Team/Project
b1d83cb7957420b8348939f0a1d36f506095519c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from __future__ import annotations from server import Interface from telegram.bot import Bot class State: player: Player app_info: 'AppInfo' bot: Bot def __init__(self, player, app_info) -> None: self.player = player self.bot = app_info.bot self.app_inf...
18.971429
51
0.621988
from __future__ import annotations from server import Interface from telegram.bot import Bot class State: player: Player app_info: 'AppInfo' bot: Bot def __init__(self, player, app_info) -> None: self.player = player self.bot = app_info.bot self.app_info = app_info def c...
true
true
1c47504f9eb14b016fc1dc1c1fcbb3dea481e1a2
856
py
Python
aiofcm/client.py
cyberbudy/aiofcm
30e66b872aa2e1fc43ef4884fb84ba23b91879c5
[ "Apache-2.0" ]
30
2017-05-11T08:21:45.000Z
2021-11-20T13:52:13.000Z
aiofcm/client.py
cyberbudy/aiofcm
30e66b872aa2e1fc43ef4884fb84ba23b91879c5
[ "Apache-2.0" ]
12
2017-05-22T16:42:03.000Z
2021-08-09T11:11:47.000Z
aiofcm/client.py
cyberbudy/aiofcm
30e66b872aa2e1fc43ef4884fb84ba23b91879c5
[ "Apache-2.0" ]
16
2017-05-22T11:30:55.000Z
2021-11-11T09:48:04.000Z
import asyncio from typing import Optional, NoReturn from aiofcm.connection import FCMConnectionPool from aiofcm.common import Message, MessageResponse from aiofcm.logging import logger class FCM: def __init__(self, sender_id, api_key, max_connections=10, loop=None): # type: (int, str, int, Optional[asyn...
37.217391
80
0.679907
import asyncio from typing import Optional, NoReturn from aiofcm.connection import FCMConnectionPool from aiofcm.common import Message, MessageResponse from aiofcm.logging import logger class FCM: def __init__(self, sender_id, api_key, max_connections=10, loop=None): self.pool = FCMConnectionPool...
true
true
1c4751b7582b662927b44f9a171203401afd2ce3
36,054
py
Python
src/unity/python/turicreate/toolkits/drawing_classifier/drawing_classifier.py
LeeCenY/turicreate
fb2f3bf313e831ceb42a2e10aacda6e472ea8d93
[ "BSD-3-Clause" ]
null
null
null
src/unity/python/turicreate/toolkits/drawing_classifier/drawing_classifier.py
LeeCenY/turicreate
fb2f3bf313e831ceb42a2e10aacda6e472ea8d93
[ "BSD-3-Clause" ]
null
null
null
src/unity/python/turicreate/toolkits/drawing_classifier/drawing_classifier.py
LeeCenY/turicreate
fb2f3bf313e831ceb42a2e10aacda6e472ea8d93
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright © 2019 Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can # be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import turicreate as _tc import numpy as _np import time as _time from turicreate.t...
41.632794
123
0.608837
import turicreate as _tc import numpy as _np import time as _time from turicreate.toolkits._model import CustomModel as _CustomModel from turicreate.toolkits._model import PythonProxy as _PythonProxy from turicreate.toolkits import evaluation as _evaluation import turicreate.toolkits._internal_utils as _tkutl from tur...
true
true
1c47529775227539b203847b8de750e8bd66423a
407
py
Python
cont/contapp/models.py
Chuox/Contador_Palabras
2be98392351536416baa38c90fc62950138d84f1
[ "MIT" ]
null
null
null
cont/contapp/models.py
Chuox/Contador_Palabras
2be98392351536416baa38c90fc62950138d84f1
[ "MIT" ]
null
null
null
cont/contapp/models.py
Chuox/Contador_Palabras
2be98392351536416baa38c90fc62950138d84f1
[ "MIT" ]
null
null
null
from django.db import models from django.urls import reverse # Create your models here. class Palabras(models.Model): url = models.CharField(max_length=99999,default="https://es.wikipedia.org/") texto = models.CharField(max_length=9999999,default="") def __str__(self): return self.url def...
31.307692
80
0.702703
from django.db import models from django.urls import reverse class Palabras(models.Model): url = models.CharField(max_length=99999,default="https://es.wikipedia.org/") texto = models.CharField(max_length=9999999,default="") def __str__(self): return self.url def get_absolute_url(self): ...
true
true
1c4752b75cce49cce05e2ea439f39e239799fab9
2,740
py
Python
mvmv/mvmv.py
movermeyer/mvmv
23c1c4202b6fb0ef08d6c07975107dcec87d7208
[ "MIT" ]
1
2019-01-26T16:35:31.000Z
2019-01-26T16:35:31.000Z
mvmv/mvmv.py
movermeyer/mvmv
23c1c4202b6fb0ef08d6c07975107dcec87d7208
[ "MIT" ]
5
2015-01-22T23:24:05.000Z
2015-01-25T04:49:03.000Z
mvmv/mvmv.py
movermeyer/mvmv
23c1c4202b6fb0ef08d6c07975107dcec87d7208
[ "MIT" ]
3
2015-02-25T17:51:41.000Z
2018-03-04T20:29:59.000Z
import codecs import mimetypes import os import re import sqlite3 from fuzzywuzzy import fuzz # common words in movies that we don't want to search the database for common_words = [ "The", "Them", "A", "An", "In", ] # blacklist of common garbage ...
26.346154
80
0.55365
import codecs import mimetypes import os import re import sqlite3 from fuzzywuzzy import fuzz common_words = [ "The", "Them", "A", "An", "In", ] # blacklist of common garbage that fills up movie names blacklist = [ "BluRay", ...
true
true
1c4752ee09bf70092f224bcea3d2adc5f3dcac59
708
py
Python
Switches.py
ProgrammingNerdGit/GBLS
6fcc3acc4b2797ef7c97f6d88c42cef66f8e7b50
[ "MIT" ]
1
2020-11-04T18:50:54.000Z
2020-11-04T18:50:54.000Z
Switches.py
ProgrammingNerdGit/GBLS
6fcc3acc4b2797ef7c97f6d88c42cef66f8e7b50
[ "MIT" ]
null
null
null
Switches.py
ProgrammingNerdGit/GBLS
6fcc3acc4b2797ef7c97f6d88c42cef66f8e7b50
[ "MIT" ]
null
null
null
class switch: def __init__(self): self.cases = [] self.triggered = False def anyCase(self,func,*args): if(len(args) <= 1): args += tuple([False]) for i in args: if(args[i] and not self.triggered): self.triggered = True func() def ex...
29.5
50
0.492938
class switch: def __init__(self): self.cases = [] self.triggered = False def anyCase(self,func,*args): if(len(args) <= 1): args += tuple([False]) for i in args: if(args[i] and not self.triggered): self.triggered = True func() def ex...
true
true
1c4753ab0132900bf58f1a4ebd6b8e9c3f876049
924
bzl
Python
tools/repositories.bzl
guibou/rules_haskell
ea0e70ace2432a490d4ab4c4e54617612466e584
[ "Apache-2.0" ]
222
2017-11-06T09:01:12.000Z
2022-03-28T08:24:22.000Z
tools/repositories.bzl
guibou/rules_haskell
ea0e70ace2432a490d4ab4c4e54617612466e584
[ "Apache-2.0" ]
1,168
2017-11-19T07:43:13.000Z
2022-03-31T12:40:39.000Z
tools/repositories.bzl
guibou/rules_haskell
ea0e70ace2432a490d4ab4c4e54617612466e584
[ "Apache-2.0" ]
94
2017-11-17T22:46:37.000Z
2022-03-15T00:16:56.000Z
"""Workspace rules (tools/repositories)""" load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot") def rules_haskell_worker_dependencies(**stack_kwargs): """Provide all repositories that are necessary for `rules_haskell`'s tools to function. """ excludes = native.existing_rules().keys() if "r...
29.806452
81
0.504329
load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot") def rules_haskell_worker_dependencies(**stack_kwargs): excludes = native.existing_rules().keys() if "rules_haskell_worker_dependencies" not in excludes: stack_snapshot( name = "rules_haskell_worker_dependencies", pack...
true
true
1c4753ba6758fb3028d113543431f667163dd0f4
3,120
py
Python
newproject_1/newproject_1/settings.py
Chinmoy-Prasad-Dutta/scrapy_scraper
09f6abfc3bcf10ee28f486d83b450c89a07e066e
[ "MIT" ]
null
null
null
newproject_1/newproject_1/settings.py
Chinmoy-Prasad-Dutta/scrapy_scraper
09f6abfc3bcf10ee28f486d83b450c89a07e066e
[ "MIT" ]
null
null
null
newproject_1/newproject_1/settings.py
Chinmoy-Prasad-Dutta/scrapy_scraper
09f6abfc3bcf10ee28f486d83b450c89a07e066e
[ "MIT" ]
null
null
null
# Scrapy settings for newproject_1 project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://docs.scrapy.org/en/latest/topics/settings.html # https://docs.scrapy.org/en/latest/topics/downloader-middl...
35.05618
103
0.780769
BOT_NAME = 'newproject_1' SPIDER_MODULES = ['newproject_1.spiders'] NEWSPIDER_MODULE = 'newproject_1.spiders' ROBOTSTXT_OBEY = True
true
true
1c4753eff116b910c9c93958d56825d7720f1568
1,444
py
Python
samples/generated_samples/dialogflow_v2_generated_versions_get_version_async.py
rkdfc93/python-dialogflow
a59cff0298ef18674c0b4133ef0a6ab82e288920
[ "Apache-2.0" ]
171
2018-09-19T21:16:18.000Z
2020-12-07T17:41:10.000Z
samples/generated_samples/dialogflow_v2_generated_versions_get_version_async.py
rkdfc93/python-dialogflow
a59cff0298ef18674c0b4133ef0a6ab82e288920
[ "Apache-2.0" ]
150
2018-09-25T14:04:28.000Z
2020-12-09T21:45:43.000Z
samples/generated_samples/dialogflow_v2_generated_versions_get_version_async.py
rkdfc93/python-dialogflow
a59cff0298ef18674c0b4133ef0a6ab82e288920
[ "Apache-2.0" ]
75
2018-09-22T14:12:18.000Z
2020-12-08T07:12:12.000Z
# -*- coding: utf-8 -*- # Copyright 2022 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...
31.391304
85
0.756925
from google.cloud import dialogflow_v2 async def sample_get_version(): client = dialogflow_v2.VersionsAsyncClient() request = dialogflow_v2.GetVersionRequest( name="name_value", ) response = await client.get_version(request=request) print(response)
true
true
1c4755892a095d9eed7918634a6edef5688ce027
1,624
py
Python
sdks/python/http_client/v1/test/test_v1_list_searches_response.py
TariqAHassan/polyaxon
6fc7f6a6ec49ef02d525887b6d18a893203e5b29
[ "Apache-2.0" ]
null
null
null
sdks/python/http_client/v1/test/test_v1_list_searches_response.py
TariqAHassan/polyaxon
6fc7f6a6ec49ef02d525887b6d18a893203e5b29
[ "Apache-2.0" ]
null
null
null
sdks/python/http_client/v1/test/test_v1_list_searches_response.py
TariqAHassan/polyaxon
6fc7f6a6ec49ef02d525887b6d18a893203e5b29
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2019 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
28.491228
119
0.738916
from __future__ import absolute_import import unittest import polyaxon_sdk from polyaxon_sdk.models.v1_list_searches_response import V1ListSearchesResponse from polyaxon_sdk.rest import ApiException class TestV1ListSearchesResponse(unittest.TestCase): def setUp(self): pass def tearDown(self):...
true
true
1c475637e60225ae646c1b529f1fa216fb2c6c1a
10,082
py
Python
doc/source/conf.py
genomicsengland/gel-coverage
61a671a53ac52a0b62c8aea983ced65fd0bed6cc
[ "Apache-2.0" ]
2
2019-07-15T08:13:22.000Z
2020-09-30T18:47:59.000Z
doc/source/conf.py
genomicsengland/gel-coverage
61a671a53ac52a0b62c8aea983ced65fd0bed6cc
[ "Apache-2.0" ]
null
null
null
doc/source/conf.py
genomicsengland/gel-coverage
61a671a53ac52a0b62c8aea983ced65fd0bed6cc
[ "Apache-2.0" ]
null
null
null
import sphinx_rtd_theme # -*- coding: utf-8 -*- # # GelCoverage documentation build configuration file, created by # sphinx-quickstart on Tue Dec 13 14:37:07 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this...
29.223188
93
0.706903
import sphinx_rtd_theme extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'GelCoverage' copyright = u'2016, Pablo Riesgo, Pedro Furio, Matthew Parker, Antonio Rueda, Alona Sosinsky' author = u'Pablo Riesgo, Pedro Furio, Matthew Parker, Antonio Rueda, Alona S...
true
true
1c475707181d966447b38a87fe651934c279aaa0
1,151
py
Python
aiida/tools/importexport/__init__.py
aiace9/aiida-core
09ac91654648adb684a58d5d2d7b1c11a503dae8
[ "MIT", "BSD-3-Clause" ]
1
2020-10-01T17:11:58.000Z
2020-10-01T17:11:58.000Z
aiida/tools/importexport/__init__.py
blokhin/aiida-core
29331b558b45ba74acf1ca633a2d8bfabc1bdd05
[ "MIT", "BSD-3-Clause" ]
2
2019-03-06T11:23:42.000Z
2020-03-09T09:34:07.000Z
aiida/tools/importexport/__init__.py
blokhin/aiida-core
29331b558b45ba74acf1ca633a2d8bfabc1bdd05
[ "MIT", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
47.958333
99
0.564726
from .dbexport import * from .dbimport import * from .common import * __all__ = (dbexport.__all__ + dbimport.__all__ + common.__all__)
true
true
1c47573535fc8458d412b298db9ec2766ec449c9
645
py
Python
modules/sample/src/sample/CSV/pf.py
AsmaBRZ/rcrs-server
d67a84a17b73dd95c5553bed68b8c4c08cd5651a
[ "BSD-3-Clause" ]
null
null
null
modules/sample/src/sample/CSV/pf.py
AsmaBRZ/rcrs-server
d67a84a17b73dd95c5553bed68b8c4c08cd5651a
[ "BSD-3-Clause" ]
null
null
null
modules/sample/src/sample/CSV/pf.py
AsmaBRZ/rcrs-server
d67a84a17b73dd95c5553bed68b8c4c08cd5651a
[ "BSD-3-Clause" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np import os time=np.arange(1,301) array=np.zeros(250) a=[] fichiers=os.listdir("d") for f in fichiers: print(f) i=0 with open("d/"+f, "r") as ins: for line in ins: if i<300: print(line) l=line.split(" ") ...
18.970588
43
0.516279
import matplotlib.pyplot as plt import numpy as np import os time=np.arange(1,301) array=np.zeros(250) a=[] fichiers=os.listdir("d") for f in fichiers: print(f) i=0 with open("d/"+f, "r") as ins: for line in ins: if i<300: print(line) l=line.split(" ") ...
true
true
1c47577594847e925fd3f69b3081b42da3d8500b
49,232
py
Python
tests/test_data_tokenizers.py
sxjscience/gluon-nlp
e6c39a80f4155cdb9c5fe8145287ddd322b4952b
[ "Apache-2.0" ]
1
2020-03-20T08:01:34.000Z
2020-03-20T08:01:34.000Z
tests/test_data_tokenizers.py
sxjscience/gluon-nlp
e6c39a80f4155cdb9c5fe8145287ddd322b4952b
[ "Apache-2.0" ]
null
null
null
tests/test_data_tokenizers.py
sxjscience/gluon-nlp
e6c39a80f4155cdb9c5fe8145287ddd322b4952b
[ "Apache-2.0" ]
null
null
null
import pytest import random import collections import pickle from uuid import uuid4 import os import unicodedata import tempfile from pkg_resources import parse_version import gluonnlp from gluonnlp.data.tokenizers import WhitespaceTokenizer, MosesTokenizer, JiebaTokenizer,\ SpacyTokenizer, SubwordNMTTokenizer, YTT...
62.318987
133
0.50518
import pytest import random import collections import pickle from uuid import uuid4 import os import unicodedata import tempfile from pkg_resources import parse_version import gluonnlp from gluonnlp.data.tokenizers import WhitespaceTokenizer, MosesTokenizer, JiebaTokenizer,\ SpacyTokenizer, SubwordNMTTokenizer, YTT...
true
true
1c475796efa58d436a4aeaa031170fd8364ddc7a
256
py
Python
09/01/01/5.py
pylangstudy/201707
c1cc72667f1e0b6e8eef4ee85067d7fa4ca500b6
[ "CC0-1.0" ]
null
null
null
09/01/01/5.py
pylangstudy/201707
c1cc72667f1e0b6e8eef4ee85067d7fa4ca500b6
[ "CC0-1.0" ]
46
2017-06-30T22:19:07.000Z
2017-07-31T22:51:31.000Z
10/01/01/5.py
pylangstudy/201707
c1cc72667f1e0b6e8eef4ee85067d7fa4ca500b6
[ "CC0-1.0" ]
null
null
null
class Base1: def __init__(self): print('Base1.__init__'); class Base2: def __init__(self): print('Base2.__init__'); class Super(Base1, Base2): def __init__(self): print('Super.__init__'); Base1.__init__(self); Base2.__init__(self) c = Super()
28.444444
91
0.699219
class Base1: def __init__(self): print('Base1.__init__'); class Base2: def __init__(self): print('Base2.__init__'); class Super(Base1, Base2): def __init__(self): print('Super.__init__'); Base1.__init__(self); Base2.__init__(self) c = Super()
true
true
1c4757eb287bb3f279ee1609d1ef569abd806f07
156
py
Python
tests/models.py
rtidatascience/django-postgres-power
cf3f714ab9d8919187dc478f1d0679945017ae17
[ "BSD-3-Clause" ]
16
2015-12-10T06:37:49.000Z
2021-07-16T00:02:41.000Z
tests/models.py
rtidatascience/django-postgres-power
cf3f714ab9d8919187dc478f1d0679945017ae17
[ "BSD-3-Clause" ]
4
2016-08-23T13:31:33.000Z
2019-04-08T15:47:38.000Z
tests/models.py
rtidatascience/django-postgres-power
cf3f714ab9d8919187dc478f1d0679945017ae17
[ "BSD-3-Clause" ]
7
2016-08-23T12:57:55.000Z
2020-11-14T21:08:53.000Z
from django.db import models class Checkin(models.Model): logged_at = models.DateTimeField() class Number(models.Model): n = models.IntegerField()
22.285714
38
0.74359
from django.db import models class Checkin(models.Model): logged_at = models.DateTimeField() class Number(models.Model): n = models.IntegerField()
true
true
1c475960ea7c505c741557bae2f651bd3511c226
2,710
py
Python
cimcb_lite/utils/table_check.py
RuibingS/cimcb
382f7d8fff30d3d276f18ac8c7dc686e0e643fa9
[ "MIT" ]
3
2019-05-19T10:36:50.000Z
2020-10-12T08:13:04.000Z
cimcb_lite/utils/table_check.py
RuibingS/cimcb
382f7d8fff30d3d276f18ac8c7dc686e0e643fa9
[ "MIT" ]
1
2019-03-24T11:04:39.000Z
2019-03-26T03:54:51.000Z
cimcb_lite/utils/table_check.py
RuibingS/cimcb
382f7d8fff30d3d276f18ac8c7dc686e0e643fa9
[ "MIT" ]
3
2019-05-19T10:37:03.000Z
2020-10-12T08:13:05.000Z
import numpy as np def table_check(DataTable, PeakTable, print_statement=True): """Error checking for DataTable and PeakTable (used in load_dataXL). Parameters ---------- DataTable: DataFrame Data sheet with the required columns. PeakTable: DataFrame Peak sheet with the required ...
41.692308
154
0.700738
import numpy as np def table_check(DataTable, PeakTable, print_statement=True): data_columns = DataTable.columns.values if "Idx" not in data_columns: raise ValueError("Data Table does not contain the required 'Idx' column") if DataTable.Idx.isnull().values.any() == True: raise ValueE...
true
true
1c475968ebbd39e752c755cb7b4598bf947a6220
556
py
Python
src/log.py
ENDERZOMBI102/endc-lang
554c540111adae52c3ec23c75474d2121d339df4
[ "MIT" ]
null
null
null
src/log.py
ENDERZOMBI102/endc-lang
554c540111adae52c3ec23c75474d2121d339df4
[ "MIT" ]
null
null
null
src/log.py
ENDERZOMBI102/endc-lang
554c540111adae52c3ec23c75474d2121d339df4
[ "MIT" ]
null
null
null
import sys from typing import TextIO from cli import args def _log(level: int, msg: str, file: TextIO) -> None: if args.verboseLevel <= level: print(msg, file=file) def debug(msg: str, file: TextIO = sys.stdout) -> None: if args.debug: _log( 0, f'[DEBUG] {msg}', file ) def info(msg: str, file: TextIO = sys...
20.592593
55
0.627698
import sys from typing import TextIO from cli import args def _log(level: int, msg: str, file: TextIO) -> None: if args.verboseLevel <= level: print(msg, file=file) def debug(msg: str, file: TextIO = sys.stdout) -> None: if args.debug: _log( 0, f'[DEBUG] {msg}', file ) def info(msg: str, file: TextIO = sys...
true
true
1c47596b8a5035d0ebdff520ba15dc9448d843dc
7,887
py
Python
sphinx/builders/singlehtml.py
choldgraf/sphinx
97d2f9fbf8eab478908af981c1a36aed1d75a4ce
[ "BSD-2-Clause" ]
null
null
null
sphinx/builders/singlehtml.py
choldgraf/sphinx
97d2f9fbf8eab478908af981c1a36aed1d75a4ce
[ "BSD-2-Clause" ]
null
null
null
sphinx/builders/singlehtml.py
choldgraf/sphinx
97d2f9fbf8eab478908af981c1a36aed1d75a4ce
[ "BSD-2-Clause" ]
null
null
null
""" sphinx.builders.singlehtml ~~~~~~~~~~~~~~~~~~~~~~~~~~ Single HTML builders. :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from os import path from typing import Any, Dict, List, Tuple, Union from docutils import nodes from docuti...
37.557143
91
0.613034
from os import path from typing import Any, Dict, List, Tuple, Union from docutils import nodes from docutils.nodes import Node from sphinx.application import Sphinx from sphinx.builders.html import StandaloneHTMLBuilder from sphinx.deprecation import RemovedInSphinx40Warning, deprecated_alias from sphinx.environmen...
true
true
1c4759c0cc109175a0ac69b07dc02aafad9b54f6
26,867
py
Python
src/test/isolation2/sql_isolation_testcase.py
kalensk/gpdb
52d17ad2057c0b74360e4693f683cc537178d86a
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
src/test/isolation2/sql_isolation_testcase.py
kalensk/gpdb
52d17ad2057c0b74360e4693f683cc537178d86a
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
src/test/isolation2/sql_isolation_testcase.py
kalensk/gpdb
52d17ad2057c0b74360e4693f683cc537178d86a
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
""" Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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....
40.1
193
0.544274
import pygresql.pg import os import subprocess import re import multiprocessing import tempfile import time import sys import socket from optparse import OptionParser import traceback def is_digit(n): try: int(n) return True except ValueError: return False def load_helper_file(helper...
true
true
1c475a28b1d83edba4b3c614df0405e3f55f79f0
53,813
py
Python
lib/sqlalchemy/sql/sqltypes.py
mjpieters/sqlalchemy
a8efeb6c052330b7b8d44960132d638b08d42d18
[ "MIT" ]
null
null
null
lib/sqlalchemy/sql/sqltypes.py
mjpieters/sqlalchemy
a8efeb6c052330b7b8d44960132d638b08d42d18
[ "MIT" ]
null
null
null
lib/sqlalchemy/sql/sqltypes.py
mjpieters/sqlalchemy
a8efeb6c052330b7b8d44960132d638b08d42d18
[ "MIT" ]
null
null
null
# sql/sqltypes.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """SQL specific types. """ import datetime as dt import codecs from .type_api impor...
33.115692
93
0.607474
import datetime as dt import codecs from .type_api import TypeEngine, TypeDecorator, to_instance from .elements import quoted_name, type_coerce from .default_comparator import _DefaultColumnComparator from .. import exc, util, processors from .base import _bind_or_error, SchemaEventTarget from . import operators fro...
true
true
1c475b01d3f2a15d38e7166284a6e4891d718fa6
4,466
py
Python
tinkt/cmap_utils.py
claydodo/tinkt
dfd07fe7cad34c0d5a1ec0e03a6437a502410918
[ "Unlicense" ]
null
null
null
tinkt/cmap_utils.py
claydodo/tinkt
dfd07fe7cad34c0d5a1ec0e03a6437a502410918
[ "Unlicense" ]
null
null
null
tinkt/cmap_utils.py
claydodo/tinkt
dfd07fe7cad34c0d5a1ec0e03a6437a502410918
[ "Unlicense" ]
null
null
null
# -*- coding:utf-8 -*- # cmap utils import six import numpy as np from matplotlib import cm as mpl_cm from matplotlib import colors as mpl_colors from . import cm as tinkt_cm CM_FAMILIES = { 'mpl': mpl_cm, 'tinkt': tinkt_cm } def set_under_over_bad_colors(cmap, under=None, over=None, bad=None): if un...
36.606557
140
0.638155
import six import numpy as np from matplotlib import cm as mpl_cm from matplotlib import colors as mpl_colors from . import cm as tinkt_cm CM_FAMILIES = { 'mpl': mpl_cm, 'tinkt': tinkt_cm } def set_under_over_bad_colors(cmap, under=None, over=None, bad=None): if under is not None: cmap.set_un...
true
true
1c475e064511372aa11c413ea6aad9da5ab26d2e
10,185
py
Python
test_nfc.py
tnoumar/ST-M24SR64-NFC
6f5b2ec574fb51d3ffc458b562eb0f6df657a6a4
[ "MIT" ]
null
null
null
test_nfc.py
tnoumar/ST-M24SR64-NFC
6f5b2ec574fb51d3ffc458b562eb0f6df657a6a4
[ "MIT" ]
null
null
null
test_nfc.py
tnoumar/ST-M24SR64-NFC
6f5b2ec574fb51d3ffc458b562eb0f6df657a6a4
[ "MIT" ]
null
null
null
# Author: Taha NOUMAR tnoumar@enseirb-matmeca.fr # DATA SHEETS # https://www.st.com/resource/en/datasheet/m24sr64-y.pdf # CONFIGURATION # tag type: M24SR64Y # eeprom size: 64KBit # I2C address: 0x56 import machine import binascii import utime def byte0(b): return b & 0x00FF def byte1(b): return ...
34.880137
149
0.525282
import machine import binascii import utime def byte0(b): return b & 0x00FF def byte1(b): return (b & 0xFF00) >> 8 class NFCTag(): I2C_ADDRESS_7BIT = 0x56 SYSTEM = 0xE101 CC = 0xE103 NDEF = 0x0001 NDEF_HEADER=[0xd1, 0x01, 0x00, 0x54, 0x02, 0x65, 0x6e] verbose = True def __...
true
true
1c475e204df91f662e807804eaf4a475b120362c
18,766
py
Python
OgreVertexBuffer.py
lamogui/ogre_blender_importer
4742e27909f57598889bdfa8a956001c6776d056
[ "MIT" ]
13
2016-01-23T08:00:34.000Z
2022-02-16T10:27:08.000Z
OgreVertexBuffer.py
lamogui/ogre_blender_importer
4742e27909f57598889bdfa8a956001c6776d056
[ "MIT" ]
3
2016-09-20T15:22:28.000Z
2021-05-31T01:25:05.000Z
OgreVertexBuffer.py
lamogui/ogre_blender_importer
4742e27909f57598889bdfa8a956001c6776d056
[ "MIT" ]
9
2016-07-13T23:23:55.000Z
2022-03-24T21:22:53.000Z
from enum import IntEnum; from struct import unpack_from; try: from OgreHardwareBuffer import OgreFakeHardwareBuffer except ImportError as e: directory = os.path.dirname(os.path.realpath(__file__)); print("Import error: " + str(e) + " manual compilation" ); srcfile="OgreHardwareBuffer.py"; exec(compile...
37.013807
113
0.632154
from enum import IntEnum; from struct import unpack_from; try: from OgreHardwareBuffer import OgreFakeHardwareBuffer except ImportError as e: directory = os.path.dirname(os.path.realpath(__file__)); print("Import error: " + str(e) + " manual compilation" ); srcfile="OgreHardwareBuffer.py"; exec(compile...
true
true
1c475e3625b49e36e394562fd00fe1877c86b2a5
4,692
py
Python
env/Lib/site-packages/sqlalchemy/dialects/sqlite/pysqlcipher.py
aammjian/cotton
f72b814f795f79a4054688e465c8b0ae5560f3b7
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
env/Lib/site-packages/sqlalchemy/dialects/sqlite/pysqlcipher.py
aammjian/cotton
f72b814f795f79a4054688e465c8b0ae5560f3b7
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
env/Lib/site-packages/sqlalchemy/dialects/sqlite/pysqlcipher.py
aammjian/cotton
f72b814f795f79a4054688e465c8b0ae5560f3b7
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
# sqlite/pysqlcipher.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: sqlite+pysqlcipher :name: pysqlcipher :dbapi: pysqlci...
33.755396
96
0.702472
from __future__ import absolute_import from .pysqlite import SQLiteDialect_pysqlite from ... import pool from ...engine import url as _url class SQLiteDialect_pysqlcipher(SQLiteDialect_pysqlite): driver = "pysqlcipher" pragmas = ("kdf_iter", "cipher", "cipher_page_size", "cipher_use_hmac") @classmeth...
true
true
1c475e7b96a4c7661d55f944dc305ea0b892c612
2,727
py
Python
facerec_py/facerec/svm.py
idf/FaceReader
d649bf7ca7f9cf66ac99e81a5187cfcc2b54f49d
[ "MIT" ]
7
2015-04-17T02:12:32.000Z
2018-08-08T01:29:24.000Z
facerec_py/facerec/svm.py
idf/FaceReader
d649bf7ca7f9cf66ac99e81a5187cfcc2b54f49d
[ "MIT" ]
null
null
null
facerec_py/facerec/svm.py
idf/FaceReader
d649bf7ca7f9cf66ac99e81a5187cfcc2b54f49d
[ "MIT" ]
4
2017-08-26T11:44:20.000Z
2021-06-13T11:50:11.000Z
from facerec_py.facerec.classifier import SVM from facerec_py.facerec.validation import KFoldCrossValidation from facerec_py.facerec.model import PredictableModel from svmutil import * from itertools import product import numpy as np import logging def range_f(begin, end, step): seq = [] while True: i...
35.881579
171
0.6641
from facerec_py.facerec.classifier import SVM from facerec_py.facerec.validation import KFoldCrossValidation from facerec_py.facerec.model import PredictableModel from svmutil import * from itertools import product import numpy as np import logging def range_f(begin, end, step): seq = [] while True: i...
true
true
1c475ea363209a3a683098d4d7dce556761ceb57
7,113
py
Python
app/main.py
ri10073/tracardi-api
828bc0939b3915af4c32906c65769c5b5fd992c3
[ "MIT" ]
null
null
null
app/main.py
ri10073/tracardi-api
828bc0939b3915af4c32906c65769c5b5fd992c3
[ "MIT" ]
null
null
null
app/main.py
ri10073/tracardi-api
828bc0939b3915af4c32906c65769c5b5fd992c3
[ "MIT" ]
null
null
null
import logging import os import asyncio from time import time import elasticsearch from fastapi.middleware.cors import CORSMiddleware from fastapi import FastAPI, Request, Depends from starlette.staticfiles import StaticFiles from app.api import token_endpoint, rule_endpoint, resource_endpoint, event_endpoint, \ ...
34.529126
146
0.685505
import logging import os import asyncio from time import time import elasticsearch from fastapi.middleware.cors import CORSMiddleware from fastapi import FastAPI, Request, Depends from starlette.staticfiles import StaticFiles from app.api import token_endpoint, rule_endpoint, resource_endpoint, event_endpoint, \ ...
true
true
1c475ed89de55cb2f813d13f5130ed38d968d27a
3,572
py
Python
bindings/python/ensmallen/datasets/string/sulfurospirillumhalorespiransdsm13726.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/sulfurospirillumhalorespiransdsm13726.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/sulfurospirillumhalorespiransdsm13726.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Sulfurospirillum halorespirans DSM 13726. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11...
34.019048
223
0.68505
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def SulfurospirillumHalorespiransDsm13726( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: st...
true
true
1c475eea3e539ba4d1a9a72d6264384d25b277e3
204
py
Python
book/recursion/base_conversion.py
Web-Dev-Collaborative/algos
d280581d74ded382094283d931a202eb55fd8369
[ "CC0-1.0" ]
153
2015-12-24T00:32:23.000Z
2022-02-24T06:00:29.000Z
book/recursion/base_conversion.py
Web-Dev-Collaborative/algos
d280581d74ded382094283d931a202eb55fd8369
[ "CC0-1.0" ]
78
2015-11-17T11:46:15.000Z
2021-06-28T18:37:58.000Z
book/recursion/base_conversion.py
rhivent/algo-books-python
c4fa29616ca9a8a15ba40fa12d21fd8f35096d40
[ "CC0-1.0" ]
66
2015-11-02T03:38:02.000Z
2022-03-05T17:36:26.000Z
CHAR_FOR_INT = '0123456789abcdef' def to_string(n, base): if n < base: return CHAR_FOR_INT[n] return to_string(n // base, base) + CHAR_FOR_INT[n % base] to_string(1453, 16) # => 5Ad
17
62
0.637255
CHAR_FOR_INT = '0123456789abcdef' def to_string(n, base): if n < base: return CHAR_FOR_INT[n] return to_string(n // base, base) + CHAR_FOR_INT[n % base] to_string(1453, 16)
true
true
1c475efe695ee9d1a051a1330fe3636e05ac3b4c
579
py
Python
setup.py
tijko/shadow
8ba9a8c2de2be51fa4eb387a179dbc0ac4641575
[ "MIT" ]
null
null
null
setup.py
tijko/shadow
8ba9a8c2de2be51fa4eb387a179dbc0ac4641575
[ "MIT" ]
null
null
null
setup.py
tijko/shadow
8ba9a8c2de2be51fa4eb387a179dbc0ac4641575
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup, Extension, find_packages except ImportError: from distutils.core import setup, Extension setup( name = 'shadow', version = '0.0.1', author='Tim Konick', author_email='konick781@gmail.com', url='', descri...
26.318182
82
0.670121
try: from setuptools import setup, Extension, find_packages except ImportError: from distutils.core import setup, Extension setup( name = 'shadow', version = '0.0.1', author='Tim Konick', author_email='konick781@gmail.com', url='', description='Provides auxillary data on processes', ...
true
true
1c475f7fce5478d597fc5b92d7692cf01e58b4c5
1,559
py
Python
thenewboston_node/business_logic/models/signed_change_request/base.py
nishp77/thenewboston-node
158b1f1739b2c6c9c21c80e9da854ca141f1cf8f
[ "MIT" ]
null
null
null
thenewboston_node/business_logic/models/signed_change_request/base.py
nishp77/thenewboston-node
158b1f1739b2c6c9c21c80e9da854ca141f1cf8f
[ "MIT" ]
null
null
null
thenewboston_node/business_logic/models/signed_change_request/base.py
nishp77/thenewboston-node
158b1f1739b2c6c9c21c80e9da854ca141f1cf8f
[ "MIT" ]
null
null
null
import copy import logging from dataclasses import dataclass from typing import ClassVar, Type, TypeVar from thenewboston_node.business_logic.models.base import BaseDataclass from thenewboston_node.core.logging import validates from thenewboston_node.core.utils.cryptography import derive_public_key from thenewboston_n...
32.479167
92
0.77678
import copy import logging from dataclasses import dataclass from typing import ClassVar, Type, TypeVar from thenewboston_node.business_logic.models.base import BaseDataclass from thenewboston_node.core.logging import validates from thenewboston_node.core.utils.cryptography import derive_public_key from thenewboston_n...
true
true
1c475f9553b3a997c5e9fa81cedd6cc86997d3a6
4,621
py
Python
ProjectFiles/UMKCEntrepreneurialLegalServicesClinicDocuments/IntakeForm.py
KCLegalHackers/2016-Coding-For-Lawyers
0e7aeaf3b446defcfa60c862dfac5627cedd1560
[ "MIT" ]
1
2021-01-15T00:34:54.000Z
2021-01-15T00:34:54.000Z
ProjectFiles/UMKCEntrepreneurialLegalServicesClinicDocuments/IntakeForm.py
KCLegalHackers/2016-Coding-For-Lawyers
0e7aeaf3b446defcfa60c862dfac5627cedd1560
[ "MIT" ]
null
null
null
ProjectFiles/UMKCEntrepreneurialLegalServicesClinicDocuments/IntakeForm.py
KCLegalHackers/2016-Coding-For-Lawyers
0e7aeaf3b446defcfa60c862dfac5627cedd1560
[ "MIT" ]
null
null
null
print('Application for Services: To be considered for acceptance as a client, you must complete this form and return it to the Entrepreneurial Legal Services Clinic. Acceptance as a client of the UMKC Entrepreneurial Legal Services Clinic is not guaranteed, and is ultimately based upon available of resources and time t...
78.322034
726
0.781649
print('Application for Services: To be considered for acceptance as a client, you must complete this form and return it to the Entrepreneurial Legal Services Clinic. Acceptance as a client of the UMKC Entrepreneurial Legal Services Clinic is not guaranteed, and is ultimately based upon available of resources and time t...
true
true
1c475fd0731889687d14b2130b367eb0ec6cbbcf
1,749
py
Python
setup.py
gaussian/django-sql-explorer
844c8f59f8a3de31ef445e18356e97afded50dfc
[ "MIT" ]
null
null
null
setup.py
gaussian/django-sql-explorer
844c8f59f8a3de31ef445e18356e97afded50dfc
[ "MIT" ]
null
null
null
setup.py
gaussian/django-sql-explorer
844c8f59f8a3de31ef445e18356e97afded50dfc
[ "MIT" ]
null
null
null
import os from setuptools import setup from explorer import __version__ # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... def read(fname): ...
33.634615
79
0.612922
import os from setuptools import setup from explorer import __version__ # README file and 2) it's easier to type in the README file than to put a raw def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name="django-sql-explorer", version=__version__, author="Ch...
true
true
1c4760d27cf1f4616f2f9ae082e15fd487249b5e
3,074
py
Python
tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/keras_evaluation_test.py
andrewyguo/privacy
a33afde0c105ece6c48b17a80f13899cf3e7c1b3
[ "Apache-2.0" ]
null
null
null
tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/keras_evaluation_test.py
andrewyguo/privacy
a33afde0c105ece6c48b17a80f13899cf3e7c1b3
[ "Apache-2.0" ]
null
null
null
tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/keras_evaluation_test.py
andrewyguo/privacy
a33afde0c105ece6c48b17a80f13899cf3e7c1b3
[ "Apache-2.0" ]
null
null
null
# Copyright 2020, The TensorFlow Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
41.540541
125
0.737801
from absl.testing import absltest import numpy as np import tensorflow as tf from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack import keras_evaluation from tensorflow_privacy.privacy.privacy_tests.membership_inference_attack.data_structures import AttackResults from tensorflow_privacy.privacy.p...
true
true
1c47629a3fff6341d9f92bd348f85e77bc92bff9
282
py
Python
html_downloader.py
etworker/TinySpider
b3e3c67451d361d064d915875582341b84f0d49d
[ "MIT" ]
null
null
null
html_downloader.py
etworker/TinySpider
b3e3c67451d361d064d915875582341b84f0d49d
[ "MIT" ]
null
null
null
html_downloader.py
etworker/TinySpider
b3e3c67451d361d064d915875582341b84f0d49d
[ "MIT" ]
null
null
null
__author__ = 'worker' import urllib2 class HtmlDownloader(object): def download(self, url): if url is None: return None response = urllib2.urlopen(url) if response.getcode() != 200: return None return response.read()
20.142857
39
0.588652
__author__ = 'worker' import urllib2 class HtmlDownloader(object): def download(self, url): if url is None: return None response = urllib2.urlopen(url) if response.getcode() != 200: return None return response.read()
true
true
1c4762e3f34e2ed7a22ada6411f795fe540463d8
18,315
py
Python
pfp/native/compat_io.py
krx/pfp-construct
248c43781e15ba6eb0a9a6c0982a40c0e380d9b6
[ "MIT" ]
null
null
null
pfp/native/compat_io.py
krx/pfp-construct
248c43781e15ba6eb0a9a6c0982a40c0e380d9b6
[ "MIT" ]
null
null
null
pfp/native/compat_io.py
krx/pfp-construct
248c43781e15ba6eb0a9a6c0982a40c0e380d9b6
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ This module of native functions is implemented for compatability with 010 editor functions. Some of these functions are nops, some are fully implemented. """ from pytest import skip import six import sys from pfp.native import native import pfp.interp import pfp.errors as ...
29.82899
93
0.690527
from pytest import skip import six import sys from pfp.native import native import pfp.interp import pfp.errors as errors import pfp.bitwrap as bitwrap from .. import utils import construct as C @native(name="BigEndian", ret=None) def BigEndian(params, ctxt, scope, stream, coord): if len(params) > 0: r...
true
true
1c4763580d072403c8ca37e045aa564412f3085f
3,801
py
Python
train_utils.py
Jack407/TFCNs_source_code
f41466ad18457dd6335287112191e5daacf6d80d
[ "MIT" ]
null
null
null
train_utils.py
Jack407/TFCNs_source_code
f41466ad18457dd6335287112191e5daacf6d80d
[ "MIT" ]
null
null
null
train_utils.py
Jack407/TFCNs_source_code
f41466ad18457dd6335287112191e5daacf6d80d
[ "MIT" ]
null
null
null
import argparse import logging import random import sys import time import numpy as np import torch import torch.nn as nn import torch.optim as optim from tensorboardX import SummaryWriter from torch.nn.modules.loss import CrossEntropyLoss from torch.utils.data import DataLoader from tqdm import tqdm from utils import ...
43.689655
109
0.660353
import argparse import logging import random import sys import time import numpy as np import torch import torch.nn as nn import torch.optim as optim from tensorboardX import SummaryWriter from torch.nn.modules.loss import CrossEntropyLoss from torch.utils.data import DataLoader from tqdm import tqdm from utils import ...
true
true
1c4763d96158d165cbae23a7f534f6cbe67be1a2
78,654
py
Python
source/codegen/metadata/nifgen/functions.py
zhindes/grpc-device
616aa913963098b12d276693895b7eb946f82df4
[ "MIT" ]
null
null
null
source/codegen/metadata/nifgen/functions.py
zhindes/grpc-device
616aa913963098b12d276693895b7eb946f82df4
[ "MIT" ]
23
2021-04-16T06:22:40.000Z
2021-06-11T05:51:45.000Z
source/codegen/metadata/nifgen/functions.py
zhindes/grpc-device
616aa913963098b12d276693895b7eb946f82df4
[ "MIT" ]
1
2021-10-30T09:23:49.000Z
2021-10-30T09:23:49.000Z
functions = { 'AbortGeneration':{ 'parameters':[ { 'name':'vi', 'direction':'in', 'type':'ViSession' } ], 'returns':'ViStatus' }, 'AdjustSampleClockRelativeDelay':{ 'parameters':[ { ...
25.729146
61
0.309902
functions = { 'AbortGeneration':{ 'parameters':[ { 'name':'vi', 'direction':'in', 'type':'ViSession' } ], 'returns':'ViStatus' }, 'AdjustSampleClockRelativeDelay':{ 'parameters':[ { ...
true
true
1c476528ea9e0ab39dc368d76e84eab32c00fa45
724
py
Python
mldp/tests/transformers/test_seq_len_computer.py
prashantlv/mltoolkit
acc192bafc66b7661d541ef4f604b5e5ab7df5ca
[ "MIT" ]
1
2020-10-03T05:23:31.000Z
2020-10-03T05:23:31.000Z
mldp/tests/transformers/test_seq_len_computer.py
prashantlv/mltoolkit
acc192bafc66b7661d541ef4f604b5e5ab7df5ca
[ "MIT" ]
null
null
null
mldp/tests/transformers/test_seq_len_computer.py
prashantlv/mltoolkit
acc192bafc66b7661d541ef4f604b5e5ab7df5ca
[ "MIT" ]
null
null
null
import unittest from mldp.steps.transformers.nlp import SeqLenComputer from mldp.utils.tools import DataChunk from copy import deepcopy import numpy as np class TestSeqLenComputer(unittest.TestCase): def test_output(self): fn = "dummy" new_fn = "dummy_len" data = [[1, 2, 3], [12], ["a", "...
27.846154
64
0.618785
import unittest from mldp.steps.transformers.nlp import SeqLenComputer from mldp.utils.tools import DataChunk from copy import deepcopy import numpy as np class TestSeqLenComputer(unittest.TestCase): def test_output(self): fn = "dummy" new_fn = "dummy_len" data = [[1, 2, 3], [12], ["a", "...
true
true
1c4765731326549e159d462a7abaa90cb1582cbf
181
py
Python
apps/profile/apps.py
OpenAdaptronik/Rattler
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
2
2018-05-18T08:38:29.000Z
2018-05-22T08:26:09.000Z
apps/profile/apps.py
IT-PM-OpenAdaptronik/Webapp
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
118
2017-10-31T13:45:09.000Z
2018-02-24T20:51:42.000Z
apps/profile/apps.py
OpenAdaptronik/Rattler
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
null
null
null
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class ProfileConfig(AppConfig): name = 'apps.profile' verbose_name = _('profile')
22.625
54
0.762431
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class ProfileConfig(AppConfig): name = 'apps.profile' verbose_name = _('profile')
true
true
1c47670eaf2832f39b529a294728b4e11a136702
629
py
Python
src/create_experiment.py
G-Simeone/Learning_Accident_Occurence_on_Dutch_Highways
1f3992a529fed70fd488811d68128a1e255fac5f
[ "MIT" ]
4
2018-11-09T16:18:28.000Z
2019-04-09T11:19:23.000Z
src/create_experiment.py
G-Simeone/Learning_Accident_Occurence_on_Dutch_Highways
1f3992a529fed70fd488811d68128a1e255fac5f
[ "MIT" ]
null
null
null
src/create_experiment.py
G-Simeone/Learning_Accident_Occurence_on_Dutch_Highways
1f3992a529fed70fd488811d68128a1e255fac5f
[ "MIT" ]
1
2020-05-28T18:48:17.000Z
2020-05-28T18:48:17.000Z
import sys from utils import write_exp_utils import pandas as pd from utils import misc_utils import psycopg2 from psycopg2.extras import Json, DictCursor def main(argv): print(argv[1]) w = write_exp_utils.ExperimentConfig(argv[1], argv[2]) print("writing {} to database".format(argv[1]) ) w.write_to_db...
29.952381
105
0.732909
import sys from utils import write_exp_utils import pandas as pd from utils import misc_utils import psycopg2 from psycopg2.extras import Json, DictCursor def main(argv): print(argv[1]) w = write_exp_utils.ExperimentConfig(argv[1], argv[2]) print("writing {} to database".format(argv[1]) ) w.write_to_db...
true
true
1c4767c28a173b87d61645270342bcabb9c6929c
7,674
py
Python
setup.py
WildbookOrg/wbia-deprecate-tpl-brambox
9aa6a69f706d0653a65520c696a7cd66715b6a37
[ "MIT" ]
2
2019-03-23T03:14:11.000Z
2019-11-21T07:16:13.000Z
setup.py
WildbookOrg/wbia-deprecate-tpl-brambox
9aa6a69f706d0653a65520c696a7cd66715b6a37
[ "MIT" ]
null
null
null
setup.py
WildbookOrg/wbia-deprecate-tpl-brambox
9aa6a69f706d0653a65520c696a7cd66715b6a37
[ "MIT" ]
1
2021-12-01T03:04:53.000Z
2021-12-01T03:04:53.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import sys from os.path import exists from collections import OrderedDict from setuptools import find_packages from skbuild import setup def native_mb_python_tag(plat_impl=None, version_info=None): """ ...
31.975
125
0.572974
from __future__ import absolute_import, division, print_function import sys from os.path import exists from collections import OrderedDict from setuptools import find_packages from skbuild import setup def native_mb_python_tag(plat_impl=None, version_info=None): if plat_impl is None: import platform ...
true
true
1c476801c70edbae6a98a7915c2d93aa454b9a2d
5,022
py
Python
Analysis/SampleVisualization_AE.py
melodist/MELTNET
47548e4a027ea4e23cdcb5ba1f1d9aa1aa7bbf29
[ "MIT" ]
9
2020-03-16T04:17:05.000Z
2022-02-08T12:51:45.000Z
Analysis/SampleVisualization_AE.py
melodist/MELTNET
47548e4a027ea4e23cdcb5ba1f1d9aa1aa7bbf29
[ "MIT" ]
1
2019-11-26T08:18:16.000Z
2020-09-10T15:21:40.000Z
Analysis/SampleVisualization_AE.py
melodist/MELTNET
47548e4a027ea4e23cdcb5ba1f1d9aa1aa7bbf29
[ "MIT" ]
3
2020-03-16T04:17:30.000Z
2021-12-02T07:10:22.000Z
""" Sample Visualization Make 2-D image of sample distribution 1-1. Extract Features using initial network 1-2. Extract Features using trained network 2. Using K-means to classify the patches 3. Dimension reduction using PCA 4. Visualize results """ import tensorflow as tf import numpy as n...
35.871429
121
0.660892
import tensorflow as tf import numpy as np from Network import NetworkKeras import os import time from Extraction import PatchExtraction from sklearn.cluster import KMeans from sklearn.decomposition import PCA import matplotlib.pyplot as plt from datetime import datetime def SampleVisualization_AE(path_model, path_i...
true
true
1c4768746d5b6ffc5563045f2c062c9a11652afe
7,689
py
Python
tests/components/hue/test_init.py
sgrzys/AIS-home-assistant
7bfc4d6d90de75eea06702c36474d91bf38df3bf
[ "Apache-2.0" ]
1
2019-04-22T06:05:09.000Z
2019-04-22T06:05:09.000Z
tests/components/hue/test_init.py
sgrzys/AIS-home-assistant
7bfc4d6d90de75eea06702c36474d91bf38df3bf
[ "Apache-2.0" ]
2
2022-01-13T04:26:00.000Z
2022-03-12T01:05:37.000Z
tests/components/hue/test_init.py
sgrzys/AIS-home-assistant
7bfc4d6d90de75eea06702c36474d91bf38df3bf
[ "Apache-2.0" ]
1
2021-09-20T01:52:31.000Z
2021-09-20T01:52:31.000Z
"""Test Hue setup process.""" from unittest.mock import Mock, patch from homeassistant.setup import async_setup_component from homeassistant.components import hue from tests.common import mock_coro, MockConfigEntry async def test_setup_with_no_config(hass): """Test that we do not discover anything or try to set...
35.109589
78
0.613864
from unittest.mock import Mock, patch from homeassistant.setup import async_setup_component from homeassistant.components import hue from tests.common import mock_coro, MockConfigEntry async def test_setup_with_no_config(hass): with patch.object(hass, 'config_entries') as mock_config_entries, \ patc...
true
true
1c476b5d686fb5d71b925dc5ae700b71ab106d76
3,587
py
Python
auto_xml.py
tdwitham/AutohammerPy
1621400fd148f012bc59176ad51aa05c5c879c4f
[ "BSD-2-Clause" ]
null
null
null
auto_xml.py
tdwitham/AutohammerPy
1621400fd148f012bc59176ad51aa05c5c879c4f
[ "BSD-2-Clause" ]
null
null
null
auto_xml.py
tdwitham/AutohammerPy
1621400fd148f012bc59176ad51aa05c5c879c4f
[ "BSD-2-Clause" ]
null
null
null
# (c) 2016,2017 - Timothy D. Witham tim.wookie.witham@gmail.com # Licensed under BSD 2-Clause __author__ = 'wookie' import pprint from components.FileOps import writeLog, initialLogDir, makeLogDir from components.infrastructure import getSysInfo from components.MySQL import MySQLOps global DBOP runConfig = dict() sec...
26.182482
101
0.622805
__author__ = 'wookie' import pprint from components.FileOps import writeLog, initialLogDir, makeLogDir from components.infrastructure import getSysInfo from components.MySQL import MySQLOps global DBOP runConfig = dict() secParms = dict() def ckheader(cEvent, cTag, cText): if (cEvent == 'start'): setTo =...
true
true
1c476bd27893d69e83ccb306a1d2ce80722a4ad1
9,534
py
Python
piqa/fsim.py
francois-rozet/spiq
a2e68c38da9129c85867e77641ed29d88e84c9d7
[ "MIT" ]
19
2020-10-12T13:57:21.000Z
2020-12-05T12:23:41.000Z
piqa/fsim.py
francois-rozet/spiq
a2e68c38da9129c85867e77641ed29d88e84c9d7
[ "MIT" ]
null
null
null
piqa/fsim.py
francois-rozet/spiq
a2e68c38da9129c85867e77641ed29d88e84c9d7
[ "MIT" ]
null
null
null
r"""Feature Similarity (FSIM) This module implements the FSIM in PyTorch. Original: https://www4.comp.polyu.edu.hk/~cslzhang/IQA/FSIM/FSIM.htm References: .. [Zhang2011] FSIM: A Feature Similarity Index for Image Quality Assessment (Zhang et al., 2011) .. [Kovesi1999] Image Features From Phase Congruenc...
27.877193
101
0.560835
import math import torch import torch.fft as fft import torch.nn as nn import torch.nn.functional as F from torch import Tensor from .utils import _jit, assert_type, reduce_tensor from .utils import complex as cx from .utils.color import ColorConv from .utils.functional import ( scharr_kernel, gradient_kerne...
true
true
1c476c016e38e87c7a75eeb62acb50db4e2d2883
1,623
py
Python
tests/test_exceptions.py
dobisel/yhttp
4396c03905d71b801a92dead3504cc3ef7d98d79
[ "MIT" ]
10
2020-01-30T16:23:28.000Z
2021-12-12T23:24:37.000Z
tests/test_exceptions.py
dobisel/yhttp
4396c03905d71b801a92dead3504cc3ef7d98d79
[ "MIT" ]
1
2021-07-12T21:07:06.000Z
2021-08-08T10:42:27.000Z
tests/test_exceptions.py
dobisel/yhttp
4396c03905d71b801a92dead3504cc3ef7d98d79
[ "MIT" ]
1
2020-01-26T13:28:35.000Z
2020-01-26T13:28:35.000Z
import pytest from bddrest import status, response, when from yhttp import statuses def test_httpstatus(app, Given): @app.route() def get(req): raise statuses.badrequest() @app.route('/foo') def get(req): return statuses.badrequest() with Given(): assert status == '400 ...
21.077922
78
0.601356
import pytest from bddrest import status, response, when from yhttp import statuses def test_httpstatus(app, Given): @app.route() def get(req): raise statuses.badrequest() @app.route('/foo') def get(req): return statuses.badrequest() with Given(): assert status == '400 ...
true
true
1c476cdd7fb60214bfeb7c01ad0034abc05bd191
3,585
py
Python
plots/thresholds/vit.py
drunkcoding/model-inference
02d2240bc7052fa32223a80fa63625fe681db102
[ "MIT" ]
1
2021-11-15T19:07:13.000Z
2021-11-15T19:07:13.000Z
plots/thresholds/vit.py
drunkcoding/model-inference
02d2240bc7052fa32223a80fa63625fe681db102
[ "MIT" ]
null
null
null
plots/thresholds/vit.py
drunkcoding/model-inference
02d2240bc7052fa32223a80fa63625fe681db102
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from functools import partial import itertools import json import logging import os import time import seaborn as sns import matplotlib.pyplot as plt from sklearn.metrics import accuracy_score import torch from transformers import AutoModelForImageClassification, ViTForImageClas...
24.724138
85
0.72106
from dataclasses import dataclass, field from functools import partial import itertools import json import logging import os import time import seaborn as sns import matplotlib.pyplot as plt from sklearn.metrics import accuracy_score import torch from transformers import AutoModelForImageClassification, ViTForImageClas...
true
true
1c476e3ec222661def123f38fb26ec5839432659
1,087
py
Python
src/utils/etc.py
slowwavesleep/NeuralMorphemeSegmenter
b32f47ecc380262755bf436cf793f35901919f0f
[ "MIT" ]
null
null
null
src/utils/etc.py
slowwavesleep/NeuralMorphemeSegmenter
b32f47ecc380262755bf436cf793f35901919f0f
[ "MIT" ]
null
null
null
src/utils/etc.py
slowwavesleep/NeuralMorphemeSegmenter
b32f47ecc380262755bf436cf793f35901919f0f
[ "MIT" ]
null
null
null
import itertools import json from typing import Iterable, List, Tuple def remove_pads(sequences: Iterable[Iterable[int]], true_lengths: Iterable[int], *, pre_pad: bool = False) -> List[List[int]]: assert len(sequences) == len(true_lengths) output = [] for...
26.512195
78
0.609936
import itertools import json from typing import Iterable, List, Tuple def remove_pads(sequences: Iterable[Iterable[int]], true_lengths: Iterable[int], *, pre_pad: bool = False) -> List[List[int]]: assert len(sequences) == len(true_lengths) output = [] for...
true
true
1c476f371ca7d1b74fa727dff3dcc27f059ba338
4,943
py
Python
tiddlyweb/serializations/json.py
angeluseve/tiddlyweb
d24a45d48faa2b014e1c1598ec176c4c1c98fb07
[ "BSD-3-Clause" ]
1
2016-05-09T15:26:17.000Z
2016-05-09T15:26:17.000Z
tiddlyweb/serializations/json.py
angeluseve/tiddlyweb
d24a45d48faa2b014e1c1598ec176c4c1c98fb07
[ "BSD-3-Clause" ]
null
null
null
tiddlyweb/serializations/json.py
angeluseve/tiddlyweb
d24a45d48faa2b014e1c1598ec176c4c1c98fb07
[ "BSD-3-Clause" ]
null
null
null
""" JSON based serializer. """ import simplejson from base64 import b64encode, b64decode from tiddlyweb.serializations import SerializationInterface from tiddlyweb.model.bag import Bag from tiddlyweb.model.policy import Policy class Serialization(SerializationInterface): """ Turn various entities to and fr...
32.519737
103
0.584665
import simplejson from base64 import b64encode, b64decode from tiddlyweb.serializations import SerializationInterface from tiddlyweb.model.bag import Bag from tiddlyweb.model.policy import Policy class Serialization(SerializationInterface): def list_recipes(self, recipes): return simplejson.dumps([rec...
true
true
1c4771447baf8ca0aea72d01cd74569e19c6a862
7,917
py
Python
solo/methods/nnsiam.py
ludysama/crp
08027b67f174426ddac5eef8186349e8337481fc
[ "MIT" ]
2
2021-11-02T07:38:33.000Z
2021-11-21T12:55:28.000Z
solo/methods/nnsiam.py
ludysama/crp
08027b67f174426ddac5eef8186349e8337481fc
[ "MIT" ]
null
null
null
solo/methods/nnsiam.py
ludysama/crp
08027b67f174426ddac5eef8186349e8337481fc
[ "MIT" ]
null
null
null
# Copyright 2021 solo-learn development team. # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to use, # copy, modify, merge, publ...
35.662162
99
0.630794
import argparse from typing import Any, Dict, List, Sequence, Tuple import torch import torch.nn as nn import torch.nn.functional as F from solo.losses.simsiam import simsiam_loss_func from solo.methods.base import BaseMethod from solo.utils.misc import gather class NNSiam(BaseMethod): def __init__( ...
true
true
1c47724e4746e520c60664378824afb818843692
6,421
py
Python
src/create_embedded_tools.py
erenon/bazel
9bf885afeb01c766d84acf86ca847a7b5e7bd0d8
[ "Apache-2.0" ]
null
null
null
src/create_embedded_tools.py
erenon/bazel
9bf885afeb01c766d84acf86ca847a7b5e7bd0d8
[ "Apache-2.0" ]
null
null
null
src/create_embedded_tools.py
erenon/bazel
9bf885afeb01c766d84acf86ca847a7b5e7bd0d8
[ "Apache-2.0" ]
null
null
null
# pylint: disable=g-direct-third-party-import # pylint: disable=g-bad-file-header # Copyright 2017 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
42.523179
80
0.686653
import contextlib import fnmatch import os import os.path import re import sys import zipfile from src.create_embedded_tools_lib import copy_tar_to_zip from src.create_embedded_tools_lib import copy_zip_to_zip from src.create_embedded_tools_lib import is_executable output_paths = [ ('*tools/jdk/BUILD*', lambda x...
true
true
1c47729e783feede84d393f9c877b04a40b6c1cf
5,680
py
Python
src/morphforgeexamples/exset6_poster_ocns2012/poster1.py
mikehulluk/morphforge
2a95096f144ed4ea487decb735ce66706357d3c7
[ "BSD-2-Clause" ]
1
2021-01-21T11:31:59.000Z
2021-01-21T11:31:59.000Z
src/morphforgeexamples/exset6_poster_ocns2012/poster1.py
mikehulluk/morphforge
2a95096f144ed4ea487decb735ce66706357d3c7
[ "BSD-2-Clause" ]
null
null
null
src/morphforgeexamples/exset6_poster_ocns2012/poster1.py
mikehulluk/morphforge
2a95096f144ed4ea487decb735ce66706357d3c7
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) 2012 Michael Hull. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are ...
40.283688
124
0.660915
import matplotlib as mpl mpl.rcParams['font.size'] = 14 from morphforge.stdimports import * from morphforgecontrib.stdimports import * eqnset_txt_na = """ define_component hh_na { i = g * (v-erev) * m**3*h m_inf = m_alpha_rate / (m_alpha_rate + m_beta_rate) m_tau = 1.0 / (m_alpha_rate + m_beta...
true
true
1c4772bee94a9049c31da5ef09d5c7071e017e16
2,599
py
Python
tasrif/processing_pipeline/pandas/convert_to_datetime.py
qcri/tasrif
327bc1eccb8f8e11d8869ba65a7c72ad038aa094
[ "BSD-3-Clause" ]
20
2021-12-06T10:41:54.000Z
2022-03-13T16:25:43.000Z
tasrif/processing_pipeline/pandas/convert_to_datetime.py
qcri/tasrif
327bc1eccb8f8e11d8869ba65a7c72ad038aa094
[ "BSD-3-Clause" ]
33
2021-12-06T08:27:18.000Z
2022-03-14T05:07:53.000Z
tasrif/processing_pipeline/pandas/convert_to_datetime.py
qcri/tasrif
327bc1eccb8f8e11d8869ba65a7c72ad038aa094
[ "BSD-3-Clause" ]
2
2022-02-07T08:06:48.000Z
2022-02-14T07:13:42.000Z
""" Operator to convert a column feature from string to datetime """ import pandas as pd from tasrif.processing_pipeline import PandasOperator from tasrif.processing_pipeline.validators import InputsAreDataFramesValidatorMixin class ConvertToDatetimeOperator(InputsAreDataFramesValidatorMixin, PandasOperator): ""...
33.320513
94
0.58561
import pandas as pd from tasrif.processing_pipeline import PandasOperator from tasrif.processing_pipeline.validators import InputsAreDataFramesValidatorMixin class ConvertToDatetimeOperator(InputsAreDataFramesValidatorMixin, PandasOperator): def __init__(self, feature_names, **kwargs): self.feature_name...
true
true
1c4772d8628f28ac08f50f8f4e940c76e95bac8c
2,757
py
Python
deploy/env/local/lib/python2.7/site-packages/mercurial-3.1-py2.7-linux-x86_64.egg/mercurial/filelog.py
wangvictor2012/liuwei
0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1
[ "BSD-3-Clause" ]
3
2015-11-05T07:42:43.000Z
2017-05-29T22:59:47.000Z
vendor/lib/python2.7/site-packages/mercurial/filelog.py
ddollar/gobuild
c1b0e52ab6849a13a95a3fdae4913b925f658272
[ "MIT" ]
null
null
null
vendor/lib/python2.7/site-packages/mercurial/filelog.py
ddollar/gobuild
c1b0e52ab6849a13a95a3fdae4913b925f658272
[ "MIT" ]
null
null
null
# filelog.py - file history class for mercurial # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import revlog import re _mdre = re.compile('\1\n') def _parsemeta(text): "...
29.645161
74
0.564744
import revlog import re _mdre = re.compile('\1\n') def _parsemeta(text): if text[:2] != '\1\n': return None, None, None s = _mdre.search(text, 2).start() mtext = text[2:s] meta = {} keys = [] for l in mtext.splitlines(): k, v = l.split(": ", 1) meta[k] = v k...
true
true
1c47737253ed550c0b8f08ac8b7f413886c1457e
14,684
py
Python
train.py
solmn/parallel_wavenet
45e9eceb7a2d1982b3d45823332575eb26f333c0
[ "MIT" ]
3
2018-10-30T13:45:14.000Z
2020-03-29T06:56:10.000Z
train.py
solmn/parallel_wavenet
45e9eceb7a2d1982b3d45823332575eb26f333c0
[ "MIT" ]
null
null
null
train.py
solmn/parallel_wavenet
45e9eceb7a2d1982b3d45823332575eb26f333c0
[ "MIT" ]
null
null
null
"""Training script for the WaveNet network on the VCTK corpus. This script trains a network with the WaveNet using data from the VCTK corpus, which can be freely downloaded at the following site (~10 GB): http://homepages.inf.ed.ac.uk/jyamagis/page3/page58/page58.html """ from __future__ import print_function import ...
42.686047
117
0.611959
from __future__ import print_function import argparse from datetime import datetime import json import os import sys import time import tensorflow as tf from tensorflow.python.client import timeline from wavenet import WaveNetModel, AudioReader, optimizer_factory BATCH_SIZE = 1 DATA_DIRECTORY = './dataset/LJSpeech...
true
true
1c4773afb9dfe031efe91c301916c555e9dcc6a3
9,570
py
Python
src/HYPERPLUME/hyperplume.py
Pabsm94/Easyplume
ee54194c1c0930b2a0ef442c47f80bd4570913d2
[ "MIT" ]
null
null
null
src/HYPERPLUME/hyperplume.py
Pabsm94/Easyplume
ee54194c1c0930b2a0ef442c47f80bd4570913d2
[ "MIT" ]
null
null
null
src/HYPERPLUME/hyperplume.py
Pabsm94/Easyplume
ee54194c1c0930b2a0ef442c47f80bd4570913d2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Apr 22 14:07:39 2016 @author: pablo """ import numpy as np import abc import matplotlib.pyplot as plt class Hyperplume(): """ Parent class Hyperplume loads target plasma and defines common attributes as well as shared methods in the AEM and SSM plume classe...
34.301075
262
0.546604
import numpy as np import abc import matplotlib.pyplot as plt class Hyperplume(): __metaclass__= abc.ABCMeta @abc.abstractclassmethod def solver(self): return @abc.abstractclassmethod def query(self,z,r): re...
true
true
1c47745f1c0e2c39646a97885253608082c44006
46
py
Python
__init__.py
lucaskjaero/WiktionaryParser
c60a7cb7e50ca929e02c8e6e258c23f4d4114c21
[ "MIT" ]
1
2021-08-24T17:51:41.000Z
2021-08-24T17:51:41.000Z
__init__.py
lucaskjaero/WiktionaryParser
c60a7cb7e50ca929e02c8e6e258c23f4d4114c21
[ "MIT" ]
null
null
null
__init__.py
lucaskjaero/WiktionaryParser
c60a7cb7e50ca929e02c8e6e258c23f4d4114c21
[ "MIT" ]
1
2020-12-14T16:22:31.000Z
2020-12-14T16:22:31.000Z
from .wiktionaryparser import WiktionaryParser
46
46
0.913043
from .wiktionaryparser import WiktionaryParser
true
true
1c477468c75e4642c2f29e87bfdbf22ef08e11fd
4,043
py
Python
models/definitions/flownet/inference.py
HaydenFaulkner/VidDet
2dbc104a41bf1192a00ffde07695180eab18cea8
[ "MIT" ]
19
2019-08-05T12:20:17.000Z
2020-10-29T11:33:50.000Z
models/definitions/flownet/inference.py
HaydenFaulkner/VideoYOLO
2dbc104a41bf1192a00ffde07695180eab18cea8
[ "MIT" ]
2
2021-08-25T14:47:55.000Z
2022-02-09T23:30:49.000Z
models/definitions/flownet/inference.py
HaydenFaulkner/VideoYOLO
2dbc104a41bf1192a00ffde07695180eab18cea8
[ "MIT" ]
3
2020-03-02T14:52:18.000Z
2020-06-05T07:51:18.000Z
import cv2 import mxnet as mx import numpy as np from scipy.misc import imresize from tqdm import tqdm from flownet import get_flownet from utils import flow_to_image, crop, normalise def process_two_images(model, imgs, ctx=None): """ Process two images into one flow image Args: model: The model t...
26.083871
108
0.606728
import cv2 import mxnet as mx import numpy as np from scipy.misc import imresize from tqdm import tqdm from flownet import get_flownet from utils import flow_to_image, crop, normalise def process_two_images(model, imgs, ctx=None): if len(imgs) != 2: return None if isinstance(imgs[0], str): if ...
true
true
1c47763f1386690bf0efd66398f708660e2f5d45
5,537
py
Python
scripts/automation/trex_control_plane/astf/trex_astf_lib/trex_astf_global_info.py
alialnu/trex-core
ae4ab05a6215fd0a859adde40dac6afa8bf0f950
[ "Apache-2.0" ]
null
null
null
scripts/automation/trex_control_plane/astf/trex_astf_lib/trex_astf_global_info.py
alialnu/trex-core
ae4ab05a6215fd0a859adde40dac6afa8bf0f950
[ "Apache-2.0" ]
null
null
null
scripts/automation/trex_control_plane/astf/trex_astf_lib/trex_astf_global_info.py
alialnu/trex-core
ae4ab05a6215fd0a859adde40dac6afa8bf0f950
[ "Apache-2.0" ]
null
null
null
import socket class ASTFGlobalInfoBase(object): _g_params = {} class inner(object): def __init__(self, params, name): self._fields = {} self._params = params self._name = name def __setattr__(self, name, val): if name.startswith("_")...
37.161074
123
0.483475
import socket class ASTFGlobalInfoBase(object): _g_params = {} class inner(object): def __init__(self, params, name): self._fields = {} self._params = params self._name = name def __setattr__(self, name, val): if name.startswith("_")...
true
true
1c4777590dcdd7cd0868594deb226eb09b523f7d
16,358
py
Python
senlin/objects/fields.py
openstack/senlin
390779ca1e08f819683e79993696f945f1c0393e
[ "Apache-2.0" ]
45
2015-10-18T02:56:50.000Z
2022-03-01T15:28:02.000Z
senlin/objects/fields.py
openstack/senlin
390779ca1e08f819683e79993696f945f1c0393e
[ "Apache-2.0" ]
2
2019-04-26T10:44:47.000Z
2020-12-16T19:45:34.000Z
senlin/objects/fields.py
openstack/senlin
390779ca1e08f819683e79993696f945f1c0393e
[ "Apache-2.0" ]
45
2015-10-19T02:35:57.000Z
2021-09-28T09:01:42.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
30.575701
79
0.602152
from oslo_config import cfg from oslo_serialization import jsonutils from oslo_utils import strutils from oslo_utils import uuidutils from oslo_versionedobjects import fields import re from senlin.common import consts from senlin.common.i18n import _ CONF = cfg.CONF FlexibleBooleanField = fields.FlexibleBooleanFiel...
true
true
1c477804be4c4bf6d36610dc17cf96819da6d6fc
45,319
py
Python
nessai/nestedsampler.py
Rodrigo-Tenorio/nessai
2b4175da61b3a7250d1154a126ad93481836df0d
[ "MIT" ]
null
null
null
nessai/nestedsampler.py
Rodrigo-Tenorio/nessai
2b4175da61b3a7250d1154a126ad93481836df0d
[ "MIT" ]
null
null
null
nessai/nestedsampler.py
Rodrigo-Tenorio/nessai
2b4175da61b3a7250d1154a126ad93481836df0d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Functions and objects related to the main nested sampling algorithm. """ from collections import deque import datetime import logging import os import pickle import matplotlib.pyplot as plt from matplotlib.lines import Line2D import numpy as np import seaborn as sns import torch from tqdm i...
36.313301
79
0.583045
from collections import deque import datetime import logging import os import pickle import matplotlib.pyplot as plt from matplotlib.lines import Line2D import numpy as np import seaborn as sns import torch from tqdm import tqdm from .livepoint import get_dtype, DEFAULT_FLOAT_DTYPE from .plot import plot_indices, plo...
true
true
1c47785da9d34f0b1c8a9845b5a3002f171b51df
8,815
py
Python
src/sensor_placement.py
tolgadur/Sensor-Placement
ad33477d1fb14052e1a9e58d149d0b8e767ea318
[ "MIT" ]
3
2020-05-10T20:37:50.000Z
2022-03-31T08:25:23.000Z
src/sensor_placement.py
tolgadur/Sensor-Placement
ad33477d1fb14052e1a9e58d149d0b8e767ea318
[ "MIT" ]
null
null
null
src/sensor_placement.py
tolgadur/Sensor-Placement
ad33477d1fb14052e1a9e58d149d0b8e767ea318
[ "MIT" ]
2
2021-02-26T10:15:24.000Z
2021-06-07T11:11:08.000Z
#!/usr/bin/python import numpy as np import heapq import pandas as pd """ FILE NAME: 'sensor_placement.py' DESCRIPTION: This file is implementing the class that will be used for sensor positioning according to solution proposed by Krause, Singh and Guestrin (2008). """ class SensorPlacement: @staticmethod...
42.584541
128
0.569484
import numpy as np import heapq import pandas as pd class SensorPlacement: @staticmethod def isMonotonic(cov, k, V, S, U): A = np.array([]) for j in range(k): S_A = np.setdiff1d(S, A).astype(int) for y in S_A: AHat = np.setdiff1d(V, np.append(A, [y])) ...
true
true
1c4778cd6ee4e3e7a884ff4789b58f8fe5d8053a
1,178
py
Python
prime_numbers_test.py
mkiterian/prime-numbers
be8b3b1250ec8351964c2ef93f8d5e6463efcc7b
[ "MIT" ]
null
null
null
prime_numbers_test.py
mkiterian/prime-numbers
be8b3b1250ec8351964c2ef93f8d5e6463efcc7b
[ "MIT" ]
null
null
null
prime_numbers_test.py
mkiterian/prime-numbers
be8b3b1250ec8351964c2ef93f8d5e6463efcc7b
[ "MIT" ]
null
null
null
import unittest from prime_numbers import generate_prime_numbers class PrimeNumberTest(unittest.TestCase): def test_n_is_an_integer(self): #tests if n is an integer with self.assertRaises(TypeError, msg='n is not an integer'): generate_prime_numbers('number') def test_if_number_is_a_positive_integer(self)...
33.657143
124
0.77674
import unittest from prime_numbers import generate_prime_numbers class PrimeNumberTest(unittest.TestCase): def test_n_is_an_integer(self): with self.assertRaises(TypeError, msg='n is not an integer'): generate_prime_numbers('number') def test_if_number_is_a_positive_integer(self): self.assertEqual(gene...
true
true
1c4779a4e3f7663805d73bbf5c2232d96cc76f28
1,621
py
Python
axley/cogs/misc.py
1olipop/Axley
9ace6706be58c2a8e066a0dbcdcc337b34cc5da7
[ "Apache-2.0" ]
18
2021-05-08T10:28:34.000Z
2021-12-30T16:44:19.000Z
axley/cogs/misc.py
vedrecide/Axley
9ace6706be58c2a8e066a0dbcdcc337b34cc5da7
[ "Apache-2.0" ]
1
2021-07-05T13:07:20.000Z
2021-07-05T13:07:20.000Z
axley/cogs/misc.py
1olipop/Axley
9ace6706be58c2a8e066a0dbcdcc337b34cc5da7
[ "Apache-2.0" ]
6
2021-06-01T15:31:10.000Z
2021-07-21T17:17:36.000Z
import discord import psutil import os from discord.ext import commands class Misc(commands.Cog): def __init__(self, bot): self.bot = bot self.process = psutil.Process(os.getpid()) @commands.command(name="Ping", description="Ping of the bot") @commands.guild_only() async def ping(sel...
31.173077
130
0.623689
import discord import psutil import os from discord.ext import commands class Misc(commands.Cog): def __init__(self, bot): self.bot = bot self.process = psutil.Process(os.getpid()) @commands.command(name="Ping", description="Ping of the bot") @commands.guild_only() async def ping(sel...
true
true
1c477bb7d2693680a90d4f6220d45872d11fc4b0
1,663
py
Python
vm.py
Ccode-lang/CHex
f8138da241a8b96fae5691de7a9d789a9dbcbeb2
[ "MIT" ]
1
2022-01-31T18:36:36.000Z
2022-01-31T18:36:36.000Z
vm.py
Ccode-lang/CHex
f8138da241a8b96fae5691de7a9d789a9dbcbeb2
[ "MIT" ]
null
null
null
vm.py
Ccode-lang/CHex
f8138da241a8b96fae5691de7a9d789a9dbcbeb2
[ "MIT" ]
null
null
null
import os import sys import codecs try: file = open(sys.argv[1], "rb") except: print("File does not exist or is not given.") sys.exit() bytecode = file.read() file.close() bytecode = list(bytecode) hexcode = [] for dec in bytecode: hexcode += [hex(dec)] # print(hexcode) # magic number check if hexcode[...
27.262295
106
0.556825
import os import sys import codecs try: file = open(sys.argv[1], "rb") except: print("File does not exist or is not given.") sys.exit() bytecode = file.read() file.close() bytecode = list(bytecode) hexcode = [] for dec in bytecode: hexcode += [hex(dec)] if hexcode[0] == "0x68" and hexcode[1] == "0x69":...
true
true
1c477bc4296ae17f76dbbd9dad1779671e3a34ae
9,426
py
Python
_backend_api/migrations/0022_initial.py
Amechi101/indieapp
606c1346f65c343eb2cc8f7fba9d555b8c30a7fa
[ "MIT" ]
null
null
null
_backend_api/migrations/0022_initial.py
Amechi101/indieapp
606c1346f65c343eb2cc8f7fba9d555b8c30a7fa
[ "MIT" ]
null
null
null
_backend_api/migrations/0022_initial.py
Amechi101/indieapp
606c1346f65c343eb2cc8f7fba9d555b8c30a7fa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Brand' db.create_table(u'_backend_api_brand', ( ...
78.55
142
0.619032
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.create_table(u'_backend_api_brand', ( (u'id', self.gf('django.db.models.fields.Aut...
true
true
1c477c54727b29435a21a6019d3960076fc447e1
4,706
py
Python
nibabel/minc2.py
tobon/nibabel
ff2b5457207bb5fd6097b08f7f11123dc660fda7
[ "BSD-3-Clause" ]
null
null
null
nibabel/minc2.py
tobon/nibabel
ff2b5457207bb5fd6097b08f7f11123dc660fda7
[ "BSD-3-Clause" ]
null
null
null
nibabel/minc2.py
tobon/nibabel
ff2b5457207bb5fd6097b08f7f11123dc660fda7
[ "BSD-3-Clause" ]
null
null
null
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the NiBabel package for the # copyright and license terms. # ### ### ### #...
35.383459
132
0.632172
import numpy as np from .optpkg import optional_package h5py, have_h5py, setup_module = optional_package('h5py') from .minc1 import Minc1File, Minc1Image, MincError class Hdf5Bunch(object): def __init__(self, var): for name, value in var.attrs.items(): setattr(self, name, value) class Minc...
true
true
1c477c95b5afb69f25ef37ab384ae3c2d5026cb5
4,980
py
Python
tests/integrationtest/api/test_guards.py
RasmusGodske/eo-platform-utils
4d7c5bdc102d1eb7a5edff096f2783dbdbaa283d
[ "Apache-2.0" ]
null
null
null
tests/integrationtest/api/test_guards.py
RasmusGodske/eo-platform-utils
4d7c5bdc102d1eb7a5edff096f2783dbdbaa283d
[ "Apache-2.0" ]
null
null
null
tests/integrationtest/api/test_guards.py
RasmusGodske/eo-platform-utils
4d7c5bdc102d1eb7a5edff096f2783dbdbaa283d
[ "Apache-2.0" ]
null
null
null
from typing import List from uuid import uuid4 import pytest from flask.testing import FlaskClient from origin.api import ( Application, EndpointGuard, TokenGuard, ScopedGuard, ) from .endpoints import EmptyEndpoint class TestGuards: """ TODO """ @pytest.mark.parametrize('guard', [...
25.9375
78
0.41245
from typing import List from uuid import uuid4 import pytest from flask.testing import FlaskClient from origin.api import ( Application, EndpointGuard, TokenGuard, ScopedGuard, ) from .endpoints import EmptyEndpoint class TestGuards: @pytest.mark.parametrize('guard', [ TokenGuard(), ...
true
true
1c477d2e6f7e2a1431cc5681d3d4bbd7036d06ed
191
py
Python
alphapept/__init__.py
enryH/alphapept
a4a1155b820f3567e21a872e0883e653661efe2b
[ "Apache-2.0" ]
null
null
null
alphapept/__init__.py
enryH/alphapept
a4a1155b820f3567e21a872e0883e653661efe2b
[ "Apache-2.0" ]
null
null
null
alphapept/__init__.py
enryH/alphapept
a4a1155b820f3567e21a872e0883e653661efe2b
[ "Apache-2.0" ]
null
null
null
__version__ = "0.4.0" __requirements__ = { "": "requirements/requirements.txt", "develop": "requirements/requirements_develop.txt", "gui": "requirements/requirements_gui.txt", }
23.875
55
0.696335
__version__ = "0.4.0" __requirements__ = { "": "requirements/requirements.txt", "develop": "requirements/requirements_develop.txt", "gui": "requirements/requirements_gui.txt", }
true
true
1c477dc103178022d9d4cec538afb84e72df6950
167
py
Python
django_chatserver/chat/routing.py
zhiqiyu/Random-Web
10b89776fbcdaa012e1f42a49a050d1b397b73a2
[ "MIT" ]
null
null
null
django_chatserver/chat/routing.py
zhiqiyu/Random-Web
10b89776fbcdaa012e1f42a49a050d1b397b73a2
[ "MIT" ]
null
null
null
django_chatserver/chat/routing.py
zhiqiyu/Random-Web
10b89776fbcdaa012e1f42a49a050d1b397b73a2
[ "MIT" ]
null
null
null
from django.urls import re_path from . import consumers websocket_urlpatterns = [ re_path(r'ws/chat/(?P<room_name>\w+)/$', consumers.ChatConsumer.as_asgi()), ]
18.555556
79
0.718563
from django.urls import re_path from . import consumers websocket_urlpatterns = [ re_path(r'ws/chat/(?P<room_name>\w+)/$', consumers.ChatConsumer.as_asgi()), ]
true
true
1c477e610890926de828f933fc42e26ec8d369e3
83
py
Python
MachineLearningToolkitCore/Loss/__init__.py
showintime/MachineLearningToolkit
cb265f8b0d3ca5aa16ad92cdbe74e138b5f56023
[ "Apache-2.0" ]
null
null
null
MachineLearningToolkitCore/Loss/__init__.py
showintime/MachineLearningToolkit
cb265f8b0d3ca5aa16ad92cdbe74e138b5f56023
[ "Apache-2.0" ]
null
null
null
MachineLearningToolkitCore/Loss/__init__.py
showintime/MachineLearningToolkit
cb265f8b0d3ca5aa16ad92cdbe74e138b5f56023
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Dec 2 22:43:31 2019 @author: ZWH """
10.375
35
0.542169
true
true
1c477f84e4323ce0c780a036d579746b5abba31d
522
py
Python
dynabuffers-python/tests/usecase/Schema03Test.py
leftshiftone/dynabuffers
c3e94c56989be3df87b50b8d9e17d1ea86199ede
[ "Apache-2.0" ]
2
2019-10-28T12:28:01.000Z
2020-07-07T12:25:40.000Z
dynabuffers-python/tests/usecase/Schema03Test.py
leftshiftone/dynabuffers
c3e94c56989be3df87b50b8d9e17d1ea86199ede
[ "Apache-2.0" ]
1
2021-12-21T07:35:22.000Z
2021-12-21T07:35:22.000Z
dynabuffers-python/tests/usecase/Schema03Test.py
leftshiftone/dynabuffers
c3e94c56989be3df87b50b8d9e17d1ea86199ede
[ "Apache-2.0" ]
1
2020-03-19T09:19:43.000Z
2020-03-19T09:19:43.000Z
import os import unittest from antlr4 import FileStream from dynabuffers.Dynabuffers import Dynabuffers class Schema03Test(unittest.TestCase): root_dir = os.path.dirname(os.path.realpath(__file__)) def test_parse(self): engine = Dynabuffers.parse(FileStream(self.root_dir + "/schema03.dbs")) ...
24.857143
89
0.697318
import os import unittest from antlr4 import FileStream from dynabuffers.Dynabuffers import Dynabuffers class Schema03Test(unittest.TestCase): root_dir = os.path.dirname(os.path.realpath(__file__)) def test_parse(self): engine = Dynabuffers.parse(FileStream(self.root_dir + "/schema03.dbs")) ...
true
true
1c47802de2045227fcff56755ff71d4d4d7c6eba
150
py
Python
hubspot/cms/performance/api/__init__.py
fakepop/hubspot-api-python
f04103a09f93f5c26c99991b25fa76801074f3d3
[ "Apache-2.0" ]
1
2020-11-12T08:46:32.000Z
2020-11-12T08:46:32.000Z
hubspot/cms/performance/api/__init__.py
fakepop/hubspot-api-python
f04103a09f93f5c26c99991b25fa76801074f3d3
[ "Apache-2.0" ]
null
null
null
hubspot/cms/performance/api/__init__.py
fakepop/hubspot-api-python
f04103a09f93f5c26c99991b25fa76801074f3d3
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import # flake8: noqa # import apis into api package from hubspot.cms.performance.api.default_api import DefaultApi
21.428571
62
0.826667
from __future__ import absolute_import from hubspot.cms.performance.api.default_api import DefaultApi
true
true
1c47816a5c703047ace0c887f2f265050774570e
1,174
py
Python
dir_test/test_me.py
splbio/pytestdoc
08a8ee1a4014bb78169ee4fc41cc6b722032826e
[ "BSD-2-Clause" ]
9
2015-07-08T16:25:32.000Z
2021-04-15T10:50:12.000Z
dir_test/test_me.py
splbio/pytestdoc
08a8ee1a4014bb78169ee4fc41cc6b722032826e
[ "BSD-2-Clause" ]
1
2015-08-18T06:53:50.000Z
2015-10-11T04:55:41.000Z
dir_test/test_me.py
splbio/pytestdoc
08a8ee1a4014bb78169ee4fc41cc6b722032826e
[ "BSD-2-Clause" ]
2
2019-04-04T08:44:13.000Z
2021-02-22T08:12:03.000Z
import json import pytestdoc WHAT_IS_THIS = True def times(x, y): return x * y TEST_CATEGORY="derp" @pytestdoc.tattr_redmine_feature(7474) @pytestdoc.tattr_redmine_bug(7475, 1776) @pytestdoc.tattr_incomplete @pytestdoc.tattr_category("herp") @pytestdoc.tattr_doc(""" This is the *documentation* for my function ...
24.978723
77
0.736797
import json import pytestdoc WHAT_IS_THIS = True def times(x, y): return x * y TEST_CATEGORY="derp" @pytestdoc.tattr_redmine_feature(7474) @pytestdoc.tattr_redmine_bug(7475, 1776) @pytestdoc.tattr_incomplete @pytestdoc.tattr_category("herp") @pytestdoc.tattr_doc(""" This is the *documentation* for my function ...
true
true
1c4781b885c055266febe549972d98ad995a452c
2,740
py
Python
aiida_defect/calculations.py
unkcpz/aiida-defect
592c1d8dd8130b06d06b543d5e5d35286afa63a3
[ "MIT" ]
1
2021-02-18T07:20:02.000Z
2021-02-18T07:20:02.000Z
aiida_defect/calculations.py
unkcpz/aiida-defect
592c1d8dd8130b06d06b543d5e5d35286afa63a3
[ "MIT" ]
null
null
null
aiida_defect/calculations.py
unkcpz/aiida-defect
592c1d8dd8130b06d06b543d5e5d35286afa63a3
[ "MIT" ]
null
null
null
""" Calculations provided by aiida_defect. Register calculations via the "aiida.calculations" entry point in setup.json. """ from __future__ import absolute_import import six from aiida.common import datastructures from aiida.engine import CalcJob from aiida.orm import SinglefileData from aiida.plugins import DataFa...
40.895522
125
0.708394
from __future__ import absolute_import import six from aiida.common import datastructures from aiida.engine import CalcJob from aiida.orm import SinglefileData from aiida.plugins import DataFactory DiffParameters = DataFactory('defect') class DiffCalculation(CalcJob): @classmethod def define(cls, spec): ...
true
true
1c4782033a601ea0f3de81c2b2d2f03f95b1884b
2,006
py
Python
examples/gui/__main__.py
vcokltfre/aionasa
8cd1d496d7373c806e38eb75e0103e4377da0875
[ "MIT" ]
4
2020-11-26T10:49:53.000Z
2021-05-18T17:56:08.000Z
examples/gui/__main__.py
vcokltfre/aionasa
8cd1d496d7373c806e38eb75e0103e4377da0875
[ "MIT" ]
1
2021-01-07T01:41:27.000Z
2021-01-07T01:41:27.000Z
examples/gui/__main__.py
vcokltfre/aionasa
8cd1d496d7373c806e38eb75e0103e4377da0875
[ "MIT" ]
1
2021-08-19T18:49:53.000Z
2021-08-19T18:49:53.000Z
import argparse import asyncio import os from aionasa.epic.api import EPIC from aionasa.utils import date_strptime from gui import open_gui __doc__ = "Download some images from NASA's EPIC archive and open them in a gui browser." usage = "python -m aionasa.epic [-h] [--date DATE] [--collection COLLECTION] img_folder...
28.657143
100
0.653539
import argparse import asyncio import os from aionasa.epic.api import EPIC from aionasa.utils import date_strptime from gui import open_gui __doc__ = "Download some images from NASA's EPIC archive and open them in a gui browser." usage = "python -m aionasa.epic [-h] [--date DATE] [--collection COLLECTION] img_folder...
true
true
1c4782238324e2454e74dfd129755995c5656e98
11,993
py
Python
aesara/graph/utils.py
danhphan/aesara
5a0fb0e731358d54648823170acd911cc1534d6a
[ "BSD-3-Clause" ]
null
null
null
aesara/graph/utils.py
danhphan/aesara
5a0fb0e731358d54648823170acd911cc1534d6a
[ "BSD-3-Clause" ]
null
null
null
aesara/graph/utils.py
danhphan/aesara
5a0fb0e731358d54648823170acd911cc1534d6a
[ "BSD-3-Clause" ]
null
null
null
import linecache import sys import traceback from abc import ABCMeta from io import StringIO from typing import TYPE_CHECKING, List, Optional, Sequence, Tuple, TypeVar, Union if TYPE_CHECKING: from aesara.graph.basic import Apply, Variable T = TypeVar("T", bound=Union["Apply", "Variable"]) def simple_extract_s...
28.622912
85
0.547736
import linecache import sys import traceback from abc import ABCMeta from io import StringIO from typing import TYPE_CHECKING, List, Optional, Sequence, Tuple, TypeVar, Union if TYPE_CHECKING: from aesara.graph.basic import Apply, Variable T = TypeVar("T", bound=Union["Apply", "Variable"]) def simple_extract_s...
true
true
1c47827600948d2b87bf218f91b1371ea3cbb3eb
3,488
py
Python
fhirclient/models/coding.py
mdx-dev/client-py
f6c16c9bd386c5b05d69753b89c6519d568814ac
[ "Apache-2.0" ]
null
null
null
fhirclient/models/coding.py
mdx-dev/client-py
f6c16c9bd386c5b05d69753b89c6519d568814ac
[ "Apache-2.0" ]
null
null
null
fhirclient/models/coding.py
mdx-dev/client-py
f6c16c9bd386c5b05d69753b89c6519d568814ac
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/Coding) on 2019-01-22. # 2019, SMART Health IT. from . import element class Coding(element.Element): """ A r e f e r e n c e t o a...
12.966543
103
0.294725
from . import element class Coding(element.Element): resource_type = "Coding" def __init__(self, jsondict=None, strict=True): self.code = None self.display = None self.system = None self.userSelected = None self.ve...
true
true
1c4782c8740a735f5aa4dfddb82ffcdda14f7ceb
689
py
Python
packages/cuda/cuSolverDn.py
lijun99/pyre
004dfd4c06489b4ba5b32877338ca6440f2d523b
[ "BSD-3-Clause" ]
3
2019-08-02T21:02:47.000Z
2021-09-08T13:59:43.000Z
packages/cuda/cuSolverDn.py
lijun99/pyre
004dfd4c06489b4ba5b32877338ca6440f2d523b
[ "BSD-3-Clause" ]
null
null
null
packages/cuda/cuSolverDn.py
lijun99/pyre
004dfd4c06489b4ba5b32877338ca6440f2d523b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Lijun Zhu # california institute of technology # (c) 2016-2019 all rights reserved # # externals from . import cuda as libcuda # the extension from .Matrix import Matrix class cuSolverDn: """ Wrapper for cusolverDn lib utitilies """ def create_handle(): """ ...
20.264706
57
0.628447
from . import cuda as libcuda from .Matrix import Matrix class cuSolverDn: def create_handle(): handle = libcuda.cusolverDnCreate() return handle def get_current_handle(): from . import manager if manager.current_device is None: manager.device(0) ...
true
true
1c478487162412bd45e541a0e720bee7c90272d6
42,379
py
Python
tensorflow/python/framework/func_graph.py
fraudies/tensorflow
a42423e302b71893bbd24aa896869941013c07fb
[ "Apache-2.0" ]
3
2016-08-20T04:02:24.000Z
2019-04-21T06:18:41.000Z
tensorflow/python/framework/func_graph.py
fraudies/tensorflow
a42423e302b71893bbd24aa896869941013c07fb
[ "Apache-2.0" ]
59
2019-06-17T09:37:49.000Z
2022-01-19T01:21:34.000Z
tensorflow/python/framework/func_graph.py
fraudies/tensorflow
a42423e302b71893bbd24aa896869941013c07fb
[ "Apache-2.0" ]
1
2019-10-31T09:22:30.000Z
2019-10-31T09:22:30.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
42.720766
97
0.697704
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections as py_collections import itertools import weakref from tensorflow.core.framework import attr_value_pb2 from tensorflow.python.eager import context from tensorflow.python.eager import execut...
true
true
1c478522810cfe82e7a178b902b41a16a8504685
14,006
py
Python
sdk/python/pulumi_azure_native/azurestackhci/v20210101preview/get_cluster.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/azurestackhci/v20210101preview/get_cluster.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/azurestackhci/v20210101preview/get_cluster.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
39.677054
496
0.667214
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs __all__ = [ 'GetClusterResult', 'AwaitableGetClusterResult', 'get_cluster', ] @pulumi.output_type class GetClusterResult: def __ini...
true
true
1c478544308d1c24ccd1470dc7b2c5e5197b8d45
1,181
py
Python
src/main.py
ITAnalyst-JU/process-logger
a51d4604b2dc3047dec9adfec96334ff20a3782f
[ "MIT" ]
null
null
null
src/main.py
ITAnalyst-JU/process-logger
a51d4604b2dc3047dec9adfec96334ff20a3782f
[ "MIT" ]
null
null
null
src/main.py
ITAnalyst-JU/process-logger
a51d4604b2dc3047dec9adfec96334ff20a3782f
[ "MIT" ]
null
null
null
#!/bin/python import time import argparse from Invoker import Invoker def parse_cmd_name(parts): # TODO maybe for eg. 'make testall' this shoule return 'make testall' and not 'make'? assert len(parts) >= 1 assert len(parts[0]) >= 1 x = parts[0].split('/')[-1] assert ' ' not in x return x d...
28.804878
111
0.647756
import time import argparse from Invoker import Invoker def parse_cmd_name(parts): assert len(parts) >= 1 assert len(parts[0]) >= 1 x = parts[0].split('/')[-1] assert ' ' not in x return x def get_time_str(): t = time.localtime() return f'{t.tm_year}.{t.tm_mon}.{t.tm_mday} {t.tm_ho...
true
true
1c478548a8539ffc957d7a9e7b5a3ba080deb1de
1,052
py
Python
manabe/public/management/commands/fake_server.py
luoyedao/manabe
90c158bd23e956308263b542634adc97f6526276
[ "Apache-2.0" ]
16
2018-08-12T08:28:00.000Z
2022-03-15T02:13:42.000Z
manabe/public/management/commands/fake_server.py
luoyedao/manabe
90c158bd23e956308263b542634adc97f6526276
[ "Apache-2.0" ]
14
2020-02-11T23:27:29.000Z
2022-02-11T03:43:26.000Z
manabe/public/management/commands/fake_server.py
luoyedao/manabe
90c158bd23e956308263b542634adc97f6526276
[ "Apache-2.0" ]
25
2018-08-26T07:38:46.000Z
2022-03-15T02:13:45.000Z
from random import choice from django.contrib.auth.models import User from appinput.models import App from envx.models import Env from serverinput.models import Server def fake_server_data(): Server.objects.all().delete() print('delete all server data') user_set = User.objects.all() app_set = App.obj...
35.066667
78
0.586502
from random import choice from django.contrib.auth.models import User from appinput.models import App from envx.models import Env from serverinput.models import Server def fake_server_data(): Server.objects.all().delete() print('delete all server data') user_set = User.objects.all() app_set = App.obj...
true
true
1c47869bfa0f88eba2e94f57df3c36bcb2331ede
404
py
Python
server/src/prefect_server/utilities/__init__.py
louisditzel/prefect
b1a02fee623b965e756a38aa09059db780ab67eb
[ "ECL-2.0", "Apache-2.0" ]
1
2020-05-10T14:32:32.000Z
2020-05-10T14:32:32.000Z
server/src/prefect_server/utilities/__init__.py
louisditzel/prefect
b1a02fee623b965e756a38aa09059db780ab67eb
[ "ECL-2.0", "Apache-2.0" ]
3
2022-02-14T11:25:57.000Z
2022-02-27T16:25:14.000Z
server/src/prefect_server/utilities/__init__.py
louisditzel/prefect
b1a02fee623b965e756a38aa09059db780ab67eb
[ "ECL-2.0", "Apache-2.0" ]
1
2020-05-31T04:42:56.000Z
2020-05-31T04:42:56.000Z
# Licensed under the Prefect Community License, available at # https://www.prefect.io/legal/prefect-community-license import prefect_server.utilities.context import prefect_server.utilities.exceptions import prefect_server.utilities.graphql import prefect_server.utilities.logging import prefect_server.utilities.names...
33.666667
60
0.868812
import prefect_server.utilities.context import prefect_server.utilities.exceptions import prefect_server.utilities.graphql import prefect_server.utilities.logging import prefect_server.utilities.names import prefect_server.utilities.tests import prefect_server.utilities.asynchronous
true
true
1c47883aeba99de2cb069da42b1663aff45d1bfb
11,011
py
Python
data_kits/nf_kits.py
Jarvis73/DINs
fe967115182a47b9ad1018658cd1be745831e7aa
[ "MIT" ]
null
null
null
data_kits/nf_kits.py
Jarvis73/DINs
fe967115182a47b9ad1018658cd1be745831e7aa
[ "MIT" ]
null
null
null
data_kits/nf_kits.py
Jarvis73/DINs
fe967115182a47b9ad1018658cd1be745831e7aa
[ "MIT" ]
null
null
null
# Copyright 2019-2020 Jianwei Zhang All Right Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
38.365854
101
0.612297
import pickle import zlib from pathlib import Path import nibabel as nib import numpy as np import pandas as pd import scipy.ndimage as ndi import tqdm ROOT = Path(__file__).parent.parent.parent DATA_ROOT = ROOT / "data/NF" def read_nii(file_name, out_dtype=np.int16, special=False, only_header=False): nib_vol ...
true
true
1c4788a7fec1e92cf4988f8cd63897bc0a883269
1,288
py
Python
setup.py
AbhiProjects/TagLib
214139259157a7b3ec3f2fb7b342411a33b85839
[ "BSD-3-Clause" ]
null
null
null
setup.py
AbhiProjects/TagLib
214139259157a7b3ec3f2fb7b342411a33b85839
[ "BSD-3-Clause" ]
null
null
null
setup.py
AbhiProjects/TagLib
214139259157a7b3ec3f2fb7b342411a33b85839
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python """Setup script for taglib""" import sys if sys.hexversion < 0x02060000: print >> sys.stderr, 'Sorry, Python 2.6 is required.' sys.exit(1) from distutils.core import setup sys.dont_write_bytecode = True # don't leave turds from taglib import __version__ def main(): setup(name='t...
29.953488
78
0.585404
import sys if sys.hexversion < 0x02060000: print >> sys.stderr, 'Sorry, Python 2.6 is required.' sys.exit(1) from distutils.core import setup sys.dont_write_bytecode = True from taglib import __version__ def main(): setup(name='taglib', author='Chris Jones', author_email='cjones@g...
true
true
1c478921c64292aa5b2d3adeb81064377fca26e0
1,101
py
Python
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
4
2016-06-17T23:25:29.000Z
2022-03-30T22:37:45.000Z
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/schedule_policy.py
v-Ajnava/azure-sdk-for-python
a1f6f80eb5869c5b710e8bfb66146546697e2a6f
[ "MIT" ]
3
2016-05-03T20:49:46.000Z
2017-10-05T21:05:27.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
30.583333
132
0.608538
from msrest.serialization import Model class SchedulePolicy(Model): _validation = { 'schedule_policy_type': {'required': True}, } _attribute_map = { 'schedule_policy_type': {'key': 'schedulePolicyType', 'type': 'str'}, } _subtype_map = { 'schedule_policy_type': {'LongTe...
true
true
1c478b7837a4774911d31634003c88b12e9c37bc
3,439
py
Python
assets/winc_firmware_upgrade/firmware/handler_search.py
rashedtalukder/cryptoauth_trustplatform_designsuite
6b42c64071a9fb5dc9894bfedbbfabbcfb7961c1
[ "MIT" ]
11
2019-12-03T14:18:38.000Z
2021-08-25T16:41:27.000Z
assets/winc_firmware_upgrade/firmware/handler_search.py
rashedtalukder/cryptoauth_trustplatform_designsuite
6b42c64071a9fb5dc9894bfedbbfabbcfb7961c1
[ "MIT" ]
9
2020-02-13T09:07:42.000Z
2022-03-18T18:29:24.000Z
assets/winc_firmware_upgrade/firmware/handler_search.py
rashedtalukder/cryptoauth_trustplatform_designsuite
6b42c64071a9fb5dc9894bfedbbfabbcfb7961c1
[ "MIT" ]
10
2020-04-28T10:35:48.000Z
2021-11-03T23:03:30.000Z
''' Simple program to get a hint where simple programs might be installed by chasing thru registry, does not deal with things like word which are beyonf complicated. Pass in extention to check and a hint at what program you want. Returns 0 if found. 2 for parm error 1 for not found Eg C:\work_repos\>python handler...
27.95935
95
0.549578
import sys import os import winreg roots_hives = { "HKEY_CLASSES_ROOT": winreg.HKEY_CLASSES_ROOT, "HKEY_CURRENT_USER": winreg.HKEY_CURRENT_USER, "HKEY_LOCAL_MACHINE": winreg.HKEY_LOCAL_MACHINE, "HKEY_USERS": winreg.HKEY_USERS, "HKEY_PERFORMANCE_DATA": winreg.HKEY_PERFORMANCE_DATA, "HKEY_CURRENT...
true
true
1c478b7de55a29c23c21c47bbecf9e11a14c3e20
7,684
py
Python
test/test_grapher.py
leehyoeun96/rosprofiler
c7bee4e98d8417cd3e2a8ef246b7930c97c74dc5
[ "Apache-2.0" ]
6
2017-11-18T05:59:22.000Z
2022-01-01T11:56:00.000Z
test/test_grapher.py
leehyoeun96/rosprofiler
c7bee4e98d8417cd3e2a8ef246b7930c97c74dc5
[ "Apache-2.0" ]
3
2015-04-11T20:04:24.000Z
2018-06-19T21:55:39.000Z
test/test_grapher.py
leehyoeun96/rosprofiler
c7bee4e98d8417cd3e2a8ef246b7930c97c74dc5
[ "Apache-2.0" ]
15
2017-11-19T05:03:29.000Z
2021-03-15T15:26:37.000Z
#!/usr/bin/env python # Copyright 2014 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
49.574194
153
0.730739
import sys import unittest import time import rospy import rostest from ros_topology_msgs.msg import * PKG = 'rosprofiler' NAME = 'test_grapher' EXPECTED_NODES = dict() talker1 = Node(name="/talker1") talker1.publishes.append("/chatter") talker1.publishes.append("/rosout") talker1.connections.append(Connection(dest...
true
true
1c478bdc9499e3ce8182dc63c0c4b8edbd2abeb0
12,032
py
Python
stellapy/stellapy_old/stella_read.py
SStroteich/stella-1
104556a07b9736e7c28e6f1bf2f799384732f38b
[ "MIT" ]
4
2021-12-15T08:23:45.000Z
2022-02-18T15:14:42.000Z
stellapy/stellapy_old/stella_read.py
SStroteich/stella-1
104556a07b9736e7c28e6f1bf2f799384732f38b
[ "MIT" ]
37
2021-07-05T16:41:33.000Z
2022-03-21T15:58:05.000Z
stellapy/stellapy_old/stella_read.py
SStroteich/stella-1
104556a07b9736e7c28e6f1bf2f799384732f38b
[ "MIT" ]
7
2021-07-05T15:35:55.000Z
2022-03-09T09:23:42.000Z
import numpy as np from stella_dirs import * from scipy.io import netcdf #plt.rcParams.update({'font.size': 28}) #plt.rcParams['lines.linewidth'] = 2 import tabCompleter from tabCompleter import * from plotbox import * from aux_functions import * from os import listdir from netCDF4 import * import glob import os.path ...
31.915119
93
0.640376
import numpy as np from stella_dirs import * from scipy.io import netcdf import tabCompleter from tabCompleter import * from plotbox import * from aux_functions import * from os import listdir from netCDF4 import * import glob import os.path def format1(value): return "%.3e" % value def format2(value): return...
true
true
1c478c2f72be04820d92305cfffce27aa98c7fa4
907
py
Python
electrum/tests/__init__.py
checho1989/electrum-civx
4853bf42f0aa96bb894992c1abf7b8bdda587543
[ "MIT" ]
null
null
null
electrum/tests/__init__.py
checho1989/electrum-civx
4853bf42f0aa96bb894992c1abf7b8bdda587543
[ "MIT" ]
null
null
null
electrum/tests/__init__.py
checho1989/electrum-civx
4853bf42f0aa96bb894992c1abf7b8bdda587543
[ "MIT" ]
null
null
null
import unittest import threading from electrum_civx import constants # Set this locally to make the test suite run faster. # If set, unit tests that would normally test functions with multiple implementations, # will only be run once, using the fastest implementation. # e.g. libsecp256k1 vs python-ecdsa. pycryptodom...
23.25641
86
0.705623
import unittest import threading from electrum_civx import constants FAST_TESTS = False class SequentialTestCase(unittest.TestCase): test_lock = threading.Lock() def setUp(self): super().setUp() self.test_lock.acquire() def tearDown(self): super().tearDown() self.test...
true
true
1c478c32bd4fd3adda92f37777aa80cd495fcafb
926
py
Python
common/models/notice/UserNews.py
apanly/python_learn_master
93a214241812f77a006cc8350a7bad6c4eec6c89
[ "BSD-3-Clause" ]
5
2020-11-29T14:21:18.000Z
2021-10-07T04:11:29.000Z
common/models/notice/UserNews.py
linkgeek/python_flask_cms
ff5e794b5b11075670e5d11a8cbda0a137319876
[ "BSD-3-Clause" ]
null
null
null
common/models/notice/UserNews.py
linkgeek/python_flask_cms
ff5e794b5b11075670e5d11a8cbda0a137319876
[ "BSD-3-Clause" ]
2
2020-11-30T09:55:53.000Z
2022-03-19T12:49:40.000Z
# coding: utf-8 from application import db class UserNews(db.Model): __tablename__ = 'user_news' id = db.Column(db.Integer, primary_key=True, info='消息id') uid = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue(), info='用户id') title = db.Column(db.String(255), nullable=False, server_...
51.444444
105
0.686825
from application import db class UserNews(db.Model): __tablename__ = 'user_news' id = db.Column(db.Integer, primary_key=True, info='消息id') uid = db.Column(db.Integer, nullable=False, server_default=db.FetchedValue(), info='用户id') title = db.Column(db.String(255), nullable=False, server_default=db.Fetch...
true
true