hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c46c46c1f4c709d35888c5eb3d047bbc9d4d31c
351
py
Python
src/code-challenges/codewars/5KYU/productFib/test_productFib.py
maltewirz/code-challenges
97777b10963f19bc587ddd984f0526b221c081f8
[ "MIT" ]
1
2020-08-30T07:52:20.000Z
2020-08-30T07:52:20.000Z
src/code-challenges/codewars/5KYU/productFib/test_productFib.py
maltewirz/code-challenges
97777b10963f19bc587ddd984f0526b221c081f8
[ "MIT" ]
6
2020-08-12T07:05:04.000Z
2021-08-23T06:10:10.000Z
src/code-challenges/codewars/5KYU/productFib/test_productFib.py
maltewirz/code-challenges
97777b10963f19bc587ddd984f0526b221c081f8
[ "MIT" ]
null
null
null
from productFib import productFib import unittest class Test(unittest.TestCase): def test_1(self): result = productFib(4895) self.assertEqual(result, [55, 89, True]) # def test_2(self): # result = productFib(5895) # self.assertEqual(result, [89, 144, False]) if __name__ == "...
20.647059
52
0.641026
from productFib import productFib import unittest class Test(unittest.TestCase): def test_1(self): result = productFib(4895) self.assertEqual(result, [55, 89, True]) if __name__ == "__main__": unittest.main()
true
true
1c46c4949b4efa2afa8ed0d4db1bfe2610a1a4ad
622
py
Python
generateFileList.py
mrzhu666/USCL
8a4741046ef8f337b1e9439d1575db670a11355c
[ "MIT" ]
null
null
null
generateFileList.py
mrzhu666/USCL
8a4741046ef8f337b1e9439d1575db670a11355c
[ "MIT" ]
null
null
null
generateFileList.py
mrzhu666/USCL
8a4741046ef8f337b1e9439d1575db670a11355c
[ "MIT" ]
null
null
null
import cv2 import os import pickle from numpy.core.fromnumeric import shape import pandas as pd import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm from typing import Tuple from collections import defaultdict from sklearn.model_selection import train_test_split from IgAModel66.setting import config...
23.037037
68
0.803859
import cv2 import os import pickle from numpy.core.fromnumeric import shape import pandas as pd import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm from typing import Tuple from collections import defaultdict from sklearn.model_selection import train_test_split from IgAModel66.setting import config...
true
true
1c46c54cd215d2279abe7d5e268fcf2822b63cd3
903
py
Python
ultimatepython/data_structures/dict.py
Benczus/ultimate-python
2bcc8233af7b21388b587812d3e5124189b8cdec
[ "MIT" ]
1
2020-09-07T12:50:18.000Z
2020-09-07T12:50:18.000Z
ultimatepython/data_structures/dict.py
Benczus/ultimate-python
2bcc8233af7b21388b587812d3e5124189b8cdec
[ "MIT" ]
null
null
null
ultimatepython/data_structures/dict.py
Benczus/ultimate-python
2bcc8233af7b21388b587812d3e5124189b8cdec
[ "MIT" ]
null
null
null
def main(): # Let's create a dictionary with student keys and GPA values student_gpa = {"john": 3.5, "jane": 4.0, "bob": 2.8, "mary": 3.2} # There are four student records in this dictionary assert len(student_gpa) == 4 # Each student has a ...
28.21875
64
0.601329
def main(): student_gpa = {"john": 3.5, "jane": 4.0, "bob": 2.8, "mary": 3.2} # There are four student records in this dictionary assert len(student_gpa) == 4 # Each student has a name key and a GPA value assert len(student_gpa.keys()) ...
true
true
1c46c6c3ff147c8e547e3aaf58bce039d6e667a5
5,134
py
Python
SCons/Scanner/DirTests.py
jcassagnol-public/scons
8eaf585a893757e68c9e4a6e25d375021fa5eab7
[ "MIT" ]
null
null
null
SCons/Scanner/DirTests.py
jcassagnol-public/scons
8eaf585a893757e68c9e4a6e25d375021fa5eab7
[ "MIT" ]
null
null
null
SCons/Scanner/DirTests.py
jcassagnol-public/scons
8eaf585a893757e68c9e4a6e25d375021fa5eab7
[ "MIT" ]
null
null
null
# MIT License # # Copyright The SCons Foundation # # 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, ...
39.19084
105
0.614725
import os.path import unittest import TestCmd import SCons.Node.FS import SCons.Scanner.Dir from SCons.SConsign import current_sconsign_filename class DummyEnvironment: def __init__(self, root): self.fs = SCons.Node.FS.FS(root) def Dir(self, name): return self...
true
true
1c46c7815098b0d623f6f7a150989694f53aa6f2
877
py
Python
show/gearbox.py
sg893052/sonic-utilities
fdb79b8d65b8ca22232f4e6b140f593dd01613d5
[ "Apache-2.0" ]
91
2016-03-23T14:24:41.000Z
2022-03-18T20:25:37.000Z
show/gearbox.py
sg893052/sonic-utilities
fdb79b8d65b8ca22232f4e6b140f593dd01613d5
[ "Apache-2.0" ]
1,495
2017-02-15T10:49:10.000Z
2022-03-31T18:49:56.000Z
show/gearbox.py
sg893052/sonic-utilities
fdb79b8d65b8ca22232f4e6b140f593dd01613d5
[ "Apache-2.0" ]
466
2016-04-25T09:31:23.000Z
2022-03-31T06:54:17.000Z
import click import utilities_common.cli as clicommon @click.group(cls=clicommon.AliasedGroup) def gearbox(): """Show gearbox info""" pass # 'phys' subcommand ("show gearbox phys") @gearbox.group(cls=clicommon.AliasedGroup) def phys(): """Show external PHY information""" pass # 'status' subcommand (...
25.057143
58
0.729761
import click import utilities_common.cli as clicommon @click.group(cls=clicommon.AliasedGroup) def gearbox(): pass @gearbox.group(cls=clicommon.AliasedGroup) def phys(): pass @phys.command() @click.pass_context def status(ctx): clicommon.run_command("gearboxutil phys status") @gearbox.group(cls=clic...
true
true
1c46c7dc238b0a632c7b17c278cc27218f17eb00
6,095
py
Python
software/metax/WeightDBUtilities.py
adellanno/MetaXcan
cfc9e369bbf5630e0c9488993cd877f231c5d02e
[ "MIT" ]
83
2016-07-19T20:14:52.000Z
2022-03-28T17:02:39.000Z
software/metax/WeightDBUtilities.py
adellanno/MetaXcan
cfc9e369bbf5630e0c9488993cd877f231c5d02e
[ "MIT" ]
75
2016-02-25T16:43:17.000Z
2022-03-30T14:19:03.000Z
software/metax/WeightDBUtilities.py
adellanno/MetaXcan
cfc9e369bbf5630e0c9488993cd877f231c5d02e
[ "MIT" ]
71
2016-02-11T17:10:32.000Z
2022-03-30T20:15:19.000Z
__author__ = 'heroico' import sqlite3 import os from collections import OrderedDict from . import Exceptions class GeneEntry: def __init__(self, gene, gene_name, n_snps, R2, pval,qval): self.gene = gene self.gene_name = gene_name self.n_snps = n_snps self.pred_perf_R2 = R2 ...
35.643275
183
0.612961
__author__ = 'heroico' import sqlite3 import os from collections import OrderedDict from . import Exceptions class GeneEntry: def __init__(self, gene, gene_name, n_snps, R2, pval,qval): self.gene = gene self.gene_name = gene_name self.n_snps = n_snps self.pred_perf_R2 = R2 ...
true
true
1c46c9cfeb9efcce9902f255edbe15907ddf263e
4,994
py
Python
tests/http/test_fedclient.py
SimmyD/synapse
26f2f1ca9a8ce6c32e574f0f0e60bb24b773c4e3
[ "Apache-2.0" ]
null
null
null
tests/http/test_fedclient.py
SimmyD/synapse
26f2f1ca9a8ce6c32e574f0f0e60bb24b773c4e3
[ "Apache-2.0" ]
null
null
null
tests/http/test_fedclient.py
SimmyD/synapse
26f2f1ca9a8ce6c32e574f0f0e60bb24b773c4e3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2018 New Vector Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
31.607595
79
0.647777
from mock import Mock from twisted.internet.defer import TimeoutError from twisted.internet.error import ConnectingCancelledError, DNSLookupError from twisted.web.client import ResponseNeverReceived from synapse.http.matrixfederationclient import MatrixFederationHttpClient from tests.unittest import H...
true
true
1c46c9e13c1fa6ba1e653f1f33dbebace96b8941
1,046
py
Python
release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/RebarShapeConstraintSagittaLength.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
182
2017-06-27T02:26:15.000Z
2022-03-30T18:53:43.000Z
release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/RebarShapeConstraintSagittaLength.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
28
2017-06-27T13:38:23.000Z
2022-03-15T11:19:44.000Z
release/stubs.min/Autodesk/Revit/DB/Structure/__init___parts/RebarShapeConstraintSagittaLength.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
67
2017-06-28T09:43:59.000Z
2022-03-20T21:17:10.000Z
class RebarShapeConstraintSagittaLength(RebarShapeConstraint,IDisposable): """ A constraint that can be applied to a RebarShapeDefinitionByArc and drives the height of the arc. RebarShapeConstraintSagittaLength(paramId: ElementId) """ def Dispose(self): """ Dispose(self: RebarShapeConstraint,...
34.866667
215
0.716061
class RebarShapeConstraintSagittaLength(RebarShapeConstraint,IDisposable): def Dispose(self): pass def ReleaseUnmanagedResources(self,*args): pass def __enter__(self,*args): pass def __exit__(self,*args): pass def __init__(self,*args): pass @staticmethod def __new__(self,paramId): pass
true
true
1c46ca25cd91c0be4a40c520f78d8264149c79a3
5,959
py
Python
tests/unit/streamalert_cli/terraform/test_alert_processor.py
Meliairon/streamalert
3b774a59d260b2822cd156e837781bd34f3625f7
[ "Apache-2.0" ]
null
null
null
tests/unit/streamalert_cli/terraform/test_alert_processor.py
Meliairon/streamalert
3b774a59d260b2822cd156e837781bd34f3625f7
[ "Apache-2.0" ]
null
null
null
tests/unit/streamalert_cli/terraform/test_alert_processor.py
Meliairon/streamalert
3b774a59d260b2822cd156e837781bd34f3625f7
[ "Apache-2.0" ]
null
null
null
""" Copyright 2017-present Airbnb, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
44.470149
92
0.538345
import unittest from nose.tools import assert_equal from streamalert_cli.config import CLIConfig from streamalert_cli.terraform import alert_processor class TestAlertProcessor(unittest.TestCase): def setUp(self): self.config = dict(CLIConfig(config_path='tests/unit/conf')) self.alert_proc_confi...
true
true
1c46cac18042c8dda9c7d3d35fb6a33fff5a1530
4,385
py
Python
praisetheflesh/praisetheflesh/settings.py
robertraya/portfoliowebsite
2a27b86c8cbb63a40025ecc35bc286d2f9654adf
[ "CC0-1.0" ]
null
null
null
praisetheflesh/praisetheflesh/settings.py
robertraya/portfoliowebsite
2a27b86c8cbb63a40025ecc35bc286d2f9654adf
[ "CC0-1.0" ]
null
null
null
praisetheflesh/praisetheflesh/settings.py
robertraya/portfoliowebsite
2a27b86c8cbb63a40025ecc35bc286d2f9654adf
[ "CC0-1.0" ]
null
null
null
""" Django settings for praisetheflesh project. Generated by 'django-admin startproject' using Django 3.0.8. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ impor...
25.346821
91
0.697834
import os import django_heroku BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = os.getenv('SECRET_KEY', 'Optional default value') DEBUG = False ALLOWED_HOSTS = ['praisetheflesh.herokuapp.com', '127.0.0.1', 'praisetheflesh.com'] # Application definition INSTALLED_APPS =...
true
true
1c46cb1e70f734ca59a3951c76d89d67602e1d81
2,141
py
Python
main.py
mzas/j2v
adf63ddd62a356faf845cf7fcb01dbdc81bf163e
[ "Apache-2.0" ]
null
null
null
main.py
mzas/j2v
adf63ddd62a356faf845cf7fcb01dbdc81bf163e
[ "Apache-2.0" ]
null
null
null
main.py
mzas/j2v
adf63ddd62a356faf845cf7fcb01dbdc81bf163e
[ "Apache-2.0" ]
null
null
null
from j2v.generation.processor import MainProcessor from j2v.utils.config import generator_config import argparse import datetime import time from j2v.utils.helpers import is_truthy if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("--json_files", nargs=argparse.ONE_OR_MORE, type...
61.171429
120
0.708547
from j2v.generation.processor import MainProcessor from j2v.utils.config import generator_config import argparse import datetime import time from j2v.utils.helpers import is_truthy if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument("--json_files", nargs=argparse.ONE_OR_MORE, type...
true
true
1c46cd2745257059eee9d1a34c553a3af73b903b
799
py
Python
profiles_api/migrations/0003_profilefeeditem.py
AbdElRahman24597/profiles-rest-api
4fd19af745b015b234f9382276b1ac75aaca7a26
[ "MIT" ]
null
null
null
profiles_api/migrations/0003_profilefeeditem.py
AbdElRahman24597/profiles-rest-api
4fd19af745b015b234f9382276b1ac75aaca7a26
[ "MIT" ]
null
null
null
profiles_api/migrations/0003_profilefeeditem.py
AbdElRahman24597/profiles-rest-api
4fd19af745b015b234f9382276b1ac75aaca7a26
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2021-04-30 14:11 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('profiles_api', '0002_auto_20210428_1320'), ] operations = [ migrations.Creat...
31.96
126
0.638298
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('profiles_api', '0002_auto_20210428_1320'), ] operations = [ migrations.CreateModel( name='ProfileFeedItem', ...
true
true
1c46cdeac23e702966e16a34fc97f70d095e595d
3,325
py
Python
continue.py
shivam-kotwalia/KittiSeg
598ae9f4f797b850001eea1dbb270e128bb78d7d
[ "MIT" ]
11
2017-06-06T21:18:24.000Z
2019-11-04T14:58:10.000Z
continue.py
rgalvaomesquita/KittiSeg
ac93c2f0f83bf84f2ba0d645f819b2bbeeeaf58d
[ "MIT-0", "MIT" ]
null
null
null
continue.py
rgalvaomesquita/KittiSeg
ac93c2f0f83bf84f2ba0d645f819b2bbeeeaf58d
[ "MIT-0", "MIT" ]
5
2017-04-28T09:08:54.000Z
2020-04-10T23:58:48.000Z
""" Trains, evaluates and saves the KittiSeg model. ------------------------------------------------- The MIT License (MIT) Copyright (c) 2017 Marvin Teichmann More details: https://github.com/MarvinTeichmann/KittiSeg/blob/master/LICENSE """ from __future__ import absolute_import from __future__ import division fro...
29.954955
79
0.628872
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import commentjson import logging import os import sys import collections def dict_merge(dct, merge_dct): for k, v in merge_dct.iteritems(): if (k in dct and isinstance(d...
true
true
1c46cf40bbac327ea35c8b14b39b6f7814418ca2
52,022
py
Python
spikeinterface/sortingcomponents/template_matching.py
scratchrealm/spikeinterface
17cfcd6f0c30c9933c11e560daf750366e12a151
[ "MIT" ]
null
null
null
spikeinterface/sortingcomponents/template_matching.py
scratchrealm/spikeinterface
17cfcd6f0c30c9933c11e560daf750366e12a151
[ "MIT" ]
null
null
null
spikeinterface/sortingcomponents/template_matching.py
scratchrealm/spikeinterface
17cfcd6f0c30c9933c11e560daf750366e12a151
[ "MIT" ]
null
null
null
"""Sorting components: template matching.""" import numpy as np import scipy.spatial from tqdm import tqdm import sklearn, scipy import scipy from threadpoolctl import threadpool_limits try: import numba from numba import jit, prange HAVE_NUMBA = True except ImportError: HAVE_NUMBA = False from s...
36.532303
153
0.606647
import numpy as np import scipy.spatial from tqdm import tqdm import sklearn, scipy import scipy from threadpoolctl import threadpool_limits try: import numba from numba import jit, prange HAVE_NUMBA = True except ImportError: HAVE_NUMBA = False from spikeinterface.core import WaveformExtractor f...
true
true
1c46d1d4784a0d62c8a99280915d87553433d406
170
py
Python
recepcao/admin.py
alantinoco/recepcao-edificio-comercial
dcbfa9fd93f71b2bec15681b947371f8af3e815f
[ "MIT" ]
null
null
null
recepcao/admin.py
alantinoco/recepcao-edificio-comercial
dcbfa9fd93f71b2bec15681b947371f8af3e815f
[ "MIT" ]
null
null
null
recepcao/admin.py
alantinoco/recepcao-edificio-comercial
dcbfa9fd93f71b2bec15681b947371f8af3e815f
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import * admin.site.register(Sala) admin.site.register(Usuario) admin.site.register(Visitante) admin.site.register(Visita)
21.25
32
0.811765
from django.contrib import admin from .models import * admin.site.register(Sala) admin.site.register(Usuario) admin.site.register(Visitante) admin.site.register(Visita)
true
true
1c46d206debfc3cfd0af0e2eb1216cafaca41f24
3,325
py
Python
ucscsdk/mometa/storage/StorageSnapshotCtx.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
9
2016-12-22T08:39:25.000Z
2019-09-10T15:36:19.000Z
ucscsdk/mometa/storage/StorageSnapshotCtx.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
10
2017-01-31T06:59:56.000Z
2021-11-09T09:14:37.000Z
ucscsdk/mometa/storage/StorageSnapshotCtx.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
13
2016-11-14T07:42:58.000Z
2022-02-10T17:32:05.000Z
"""This module contains the general information for StorageSnapshotCtx ManagedObject.""" from ...ucscmo import ManagedObject from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta from ...ucscmeta import VersionMeta class StorageSnapshotCtxConsts(): LUN_CFG_ACTION_DELETE = "delete" LUN_CFG_ACTION_OF...
54.508197
249
0.657444
from ...ucscmo import ManagedObject from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta from ...ucscmeta import VersionMeta class StorageSnapshotCtxConsts(): LUN_CFG_ACTION_DELETE = "delete" LUN_CFG_ACTION_OFFLINE = "offline" LUN_CFG_ACTION_ONLINE = "online" LUN_CFG_ACTION_RESTORE_SNAPSHO...
true
true
1c46d21702697c85163d3d5adbdd640e38fb9d31
417
py
Python
tina/assimp/pfm.py
xuhao1/taichi_three
25fdf047da4c93df36a047a0be3cc47225d328c9
[ "MIT" ]
152
2020-06-17T09:08:59.000Z
2022-03-30T13:48:49.000Z
tina/assimp/pfm.py
xuhao1/taichi_three
25fdf047da4c93df36a047a0be3cc47225d328c9
[ "MIT" ]
46
2020-06-20T15:15:57.000Z
2022-03-24T20:03:18.000Z
tina/assimp/pfm.py
xuhao1/taichi_three
25fdf047da4c93df36a047a0be3cc47225d328c9
[ "MIT" ]
27
2020-06-20T14:25:55.000Z
2022-03-12T08:11:31.000Z
import numpy as np import sys def pfmwrite(path, im): im = im.swapaxes(0, 1) scale = max(1e-10, -im.min(), im.max()) h, w = im.shape[:2] with open(path, 'wb') as f: f.write(b'PF\n' if len(im.shape) >= 3 else b'Pf\n') f.write(f'{w} {h}\n'.encode()) f.write(f'{scale if sys.byteord...
32.076923
76
0.553957
import numpy as np import sys def pfmwrite(path, im): im = im.swapaxes(0, 1) scale = max(1e-10, -im.min(), im.max()) h, w = im.shape[:2] with open(path, 'wb') as f: f.write(b'PF\n' if len(im.shape) >= 3 else b'Pf\n') f.write(f'{w} {h}\n'.encode()) f.write(f'{scale if sys.byteord...
true
true
1c46d21fab526fc9bb640abb06ed75334c27fafe
677
py
Python
setup.py
tianhuil/checkpoint
842d1cff0cbe5926a36f1927fb75b5dcbaf4ec31
[ "Apache-2.0" ]
null
null
null
setup.py
tianhuil/checkpoint
842d1cff0cbe5926a36f1927fb75b5dcbaf4ec31
[ "Apache-2.0" ]
null
null
null
setup.py
tianhuil/checkpoint
842d1cff0cbe5926a36f1927fb75b5dcbaf4ec31
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from distutils.core import setup setup( name='checkpoint', version='0.1', description='Setup', author='Tianhui Michael Li', author_email='test@example.com', url='https://github.com/tianhuil/checkpoint/', packages=['checkpoint'], classifiers=[ 'Development Status :: 3 - Alpha'...
27.08
57
0.646972
from distutils.core import setup setup( name='checkpoint', version='0.1', description='Setup', author='Tianhui Michael Li', author_email='test@example.com', url='https://github.com/tianhuil/checkpoint/', packages=['checkpoint'], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment ::...
true
true
1c46d3b7b10037122d1f0238ad1b6a580936df6a
4,834
py
Python
TestTickAlpha-Iota.py
nikorasen/Project_S.U.I.T.U.P.
4f2873346bd3954d455e2e4e19a84f20c58d1ab2
[ "MIT" ]
null
null
null
TestTickAlpha-Iota.py
nikorasen/Project_S.U.I.T.U.P.
4f2873346bd3954d455e2e4e19a84f20c58d1ab2
[ "MIT" ]
null
null
null
TestTickAlpha-Iota.py
nikorasen/Project_S.U.I.T.U.P.
4f2873346bd3954d455e2e4e19a84f20c58d1ab2
[ "MIT" ]
null
null
null
import tkinter as tk import feedparser import datetime import time from tkinter import messagebox import re def Spyder(): #Crawls the links in the sources file, saves them to a txt file All_Articles='' try: with open('Sources.txt', 'r') as Srcs: for line in Srcs: Link=line ...
40.621849
163
0.522342
import tkinter as tk import feedparser import datetime import time from tkinter import messagebox import re def Spyder(): All_Articles='' try: with open('Sources.txt', 'r') as Srcs: for line in Srcs: Link=line Link=Link.strip('\n') Feed=feedp...
true
true
1c46d3bf5256bb38fc04428e212b3c747382289c
27,516
py
Python
exchangelib/autodiscover/discovery.py
denisovkv/exchangelib
fcb4cdac9f41e97f849ddab46ebf7cb9b6ca5d7f
[ "BSD-2-Clause" ]
null
null
null
exchangelib/autodiscover/discovery.py
denisovkv/exchangelib
fcb4cdac9f41e97f849ddab46ebf7cb9b6ca5d7f
[ "BSD-2-Clause" ]
null
null
null
exchangelib/autodiscover/discovery.py
denisovkv/exchangelib
fcb4cdac9f41e97f849ddab46ebf7cb9b6ca5d7f
[ "BSD-2-Clause" ]
null
null
null
import logging import time from urllib.parse import urlparse import dns.resolver from ..configuration import Configuration from ..credentials import OAuth2Credentials from ..errors import AutoDiscoverFailed, AutoDiscoverCircularRedirect, TransportError, RedirectError, UnauthorizedError from ..protocol import Protocol...
47.523316
141
0.641409
import logging import time from urllib.parse import urlparse import dns.resolver from ..configuration import Configuration from ..credentials import OAuth2Credentials from ..errors import AutoDiscoverFailed, AutoDiscoverCircularRedirect, TransportError, RedirectError, UnauthorizedError from ..protocol import Protocol...
true
true
1c46d49bbe5567ce4f5689afc64fec986b8a50d0
439
py
Python
projects/golem_integration/tests/browser/find/find_element_not_found.py
kangchenwei/keyautotest2
f980d46cabfc128b2099af3d33968f236923063f
[ "MIT" ]
null
null
null
projects/golem_integration/tests/browser/find/find_element_not_found.py
kangchenwei/keyautotest2
f980d46cabfc128b2099af3d33968f236923063f
[ "MIT" ]
null
null
null
projects/golem_integration/tests/browser/find/find_element_not_found.py
kangchenwei/keyautotest2
f980d46cabfc128b2099af3d33968f236923063f
[ "MIT" ]
null
null
null
from golem import actions from golem.core.exceptions import ElementNotFound description = 'Verify the webdriver.find method throws error when element is not found' def test(data): actions.navigate(data.env.url+'elements/') browser = actions.get_browser() selector = '.invalid-selector-value' actions.st...
27.4375
87
0.71754
from golem import actions from golem.core.exceptions import ElementNotFound description = 'Verify the webdriver.find method throws error when element is not found' def test(data): actions.navigate(data.env.url+'elements/') browser = actions.get_browser() selector = '.invalid-selector-value' actions.st...
true
true
1c46d4f59678cd4c42ab336c2ddd37684bf8a54e
580
py
Python
tests/spline.py
parmes/solfec-2.0
3329d3e1e4d58fefaf976c04bab19284aef45bc2
[ "MIT" ]
1
2020-06-21T23:52:25.000Z
2020-06-21T23:52:25.000Z
tests/spline.py
parmes/solfec-2.0
3329d3e1e4d58fefaf976c04bab19284aef45bc2
[ "MIT" ]
1
2020-05-01T14:44:01.000Z
2020-05-01T23:50:36.000Z
tests/spline.py
parmes/solfec-2.0
3329d3e1e4d58fefaf976c04bab19284aef45bc2
[ "MIT" ]
2
2020-06-21T23:59:21.000Z
2021-12-09T09:49:50.000Z
# Solfec-2.0 input command test: SPLINE import sys, os d0 = os.path.dirname(os.path.realpath(sys.argv[1])) spl0 = SPLINE (os.path.join(d0,'spline.txt')); spl1 = SPLINE (os.path.join(d0,'spline.txt'), cache = 10) lst2 = [0, 10, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16]; spl2 = SPLINE (lst2); lst3 = [[0, 10], [1, 11],...
26.363636
71
0.593103
import sys, os d0 = os.path.dirname(os.path.realpath(sys.argv[1])) spl0 = SPLINE (os.path.join(d0,'spline.txt')); spl1 = SPLINE (os.path.join(d0,'spline.txt'), cache = 10) lst2 = [0, 10, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16]; spl2 = SPLINE (lst2); lst3 = [[0, 10], [1, 11], [2, 12], [3, 13], [4, 14], [5, 15], [6...
true
true
1c46d5eee6f5de64e17b1f5566525b7d8e6e6eb6
1,597
py
Python
application/tictactoe/datastore.py
Deephan/tic-tac-toe-for-slack
d3aa7e9c2bc52d8afad6d8057ebb60373b100a78
[ "Apache-2.0" ]
null
null
null
application/tictactoe/datastore.py
Deephan/tic-tac-toe-for-slack
d3aa7e9c2bc52d8afad6d8057ebb60373b100a78
[ "Apache-2.0" ]
4
2016-07-05T16:11:31.000Z
2016-07-05T16:16:26.000Z
application/tictactoe/datastore.py
Deephan/tic-tac-toe-for-slack
d3aa7e9c2bc52d8afad6d8057ebb60373b100a78
[ "Apache-2.0" ]
null
null
null
''' datastore.py Datastore module for the game of Tic-Tac-Toe Note: This module currently does nothing. Work to be done to store the state of the game. ''' class DataStore: class State(ndb.Model): """ Stores the current state of the board """ board = ndb.StringProperty() ...
27.067797
93
0.513463
class DataStore: class State(ndb.Model): board = ndb.StringProperty() moves = ndb.IntegerProperty() date = ndb.DateTimeProperty(auto_now_add=True) def retrieveState(): query = State.query() states = query.order(-State.date).fetch(1) lastState = [] turns...
true
true
1c46d65620086f1fc1ed2ef78050ec11a4ddc8ca
670
py
Python
pythran/tests/cases/projection_simplex.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
1,647
2015-01-13T01:45:38.000Z
2022-03-28T01:23:41.000Z
pythran/tests/cases/projection_simplex.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
1,116
2015-01-01T09:52:05.000Z
2022-03-18T21:06:40.000Z
pythran/tests/cases/projection_simplex.py
davidbrochart/pythran
24b6c8650fe99791a4091cbdc2c24686e86aa67c
[ "BSD-3-Clause" ]
180
2015-02-12T02:47:28.000Z
2022-03-14T10:28:18.000Z
#from https://gist.github.com/mblondel/c99e575a5207c76a99d714e8c6e08e89 #pythran export projection_simplex(float[], int) #runas import numpy as np; np.random.seed(0); x = np.random.rand(10); projection_simplex(x, 1) import numpy as np def projection_simplex(v, z=1): """ Old implementation for test and benchmar...
33.5
94
0.653731
import numpy as np def projection_simplex(v, z=1): n_features = v.shape[0] u = np.sort(v)[::-1] cssv = np.cumsum(u) - z ind = np.arange(n_features) + 1 cond = u - cssv / ind > 0 rho = ind[cond][-1] theta = cssv[cond][-1] / float(rho) w = np.maximum(v - theta, 0) return w
true
true
1c46d68712cfe5660bca7d1c26bdad8cf4708df8
3,921
py
Python
feedler/admin.py
pcoder/public-health-ch
cebc4849653560c54238b67814074353ff7c01f3
[ "MIT" ]
2
2020-10-29T16:27:21.000Z
2021-06-07T12:47:46.000Z
feedler/admin.py
pcoder/public-health-ch
cebc4849653560c54238b67814074353ff7c01f3
[ "MIT" ]
11
2017-05-09T10:50:28.000Z
2021-12-15T17:01:23.000Z
feedler/admin.py
pcoder/public-health-ch
cebc4849653560c54238b67814074353ff7c01f3
[ "MIT" ]
4
2017-04-24T13:06:55.000Z
2021-06-04T02:18:32.000Z
# -*- coding: utf-8 -*- from django.db import models from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.conf.urls import url from django.urls import reverse from django.utils.functional import cached_property from django.utils.translation import u...
38.821782
143
0.694211
from django.db import models from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.conf.urls import url from django.urls import reverse from django.utils.functional import cached_property from django.utils.translation import ugettext as _ from djang...
true
true
1c46d82743933279d3da7a04509b37c438837201
1,295
py
Python
wazimap/tests/test_geo.py
anoited007/country-dashboard
577bbcc4992e24c484650895fabbcdf4343e1bdb
[ "MIT" ]
16
2017-10-19T03:36:41.000Z
2022-03-03T11:46:20.000Z
wazimap/tests/test_geo.py
ChrisAchinga/wazimap
a66a1524030a8b98e7ea0dfb270d1946ca75b3b2
[ "MIT" ]
66
2016-02-15T08:59:29.000Z
2017-09-21T14:00:43.000Z
wazimap/tests/test_geo.py
ChrisAchinga/wazimap
a66a1524030a8b98e7ea0dfb270d1946ca75b3b2
[ "MIT" ]
18
2017-10-06T12:26:37.000Z
2021-08-30T01:38:37.000Z
from django.test import TestCase from django.conf import settings from wazimap.geo import geo_data, GeoData class GeoTestCase(TestCase): def test_versioned_geos(self): # create two geos at different versions cpt11 = geo_data.geo_model.objects.create(geo_level='municipality', geo_code='cpt', long_...
43.166667
138
0.695753
from django.test import TestCase from django.conf import settings from wazimap.geo import geo_data, GeoData class GeoTestCase(TestCase): def test_versioned_geos(self): cpt11 = geo_data.geo_model.objects.create(geo_level='municipality', geo_code='cpt', long_name='City of Cape Town', version='2011...
true
true
1c46d8fd89313610b00380ac3e01e23cbd64aab7
11,884
py
Python
chemdataextractor/cli/pos.py
gubschk/CDEWIP
fb628593417df5f955eb1fa62176b7cb3c322ebc
[ "MIT" ]
null
null
null
chemdataextractor/cli/pos.py
gubschk/CDEWIP
fb628593417df5f955eb1fa62176b7cb3c322ebc
[ "MIT" ]
null
null
null
chemdataextractor/cli/pos.py
gubschk/CDEWIP
fb628593417df5f955eb1fa62176b7cb3c322ebc
[ "MIT" ]
1
2021-02-21T02:51:39.000Z
2021-02-21T02:51:39.000Z
# -*- coding: utf-8 -*- """ chemdataextractor.cli.pos ~~~~~~~~~~~~~~~~~~~~~~~~~ Part of speech tagging commands. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging import click from ..doc import Document, Text from ..nlp....
44.676692
133
0.588186
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging import click from ..doc import Document, Text from ..nlp.corpus import genia_training, wsj_training, wsj_evaluation, genia_evaluation from ..nlp.pos import TAGS, ChemApPosTagger, Che...
true
true
1c46da710b690df0d6804fd81ba494ce167bd99d
394
py
Python
serempre_todo/task/api/views.py
pygabo/Serempre
6b29e337abd8d1b3f71ee889d318a2d473d6c744
[ "MIT" ]
null
null
null
serempre_todo/task/api/views.py
pygabo/Serempre
6b29e337abd8d1b3f71ee889d318a2d473d6c744
[ "MIT" ]
null
null
null
serempre_todo/task/api/views.py
pygabo/Serempre
6b29e337abd8d1b3f71ee889d318a2d473d6c744
[ "MIT" ]
null
null
null
# Rest Framework from rest_framework import viewsets from rest_framework.permissions import IsAuthenticated # Serializer from serempre_todo.task.api.serializers import TaskSerializer # Model from serempre_todo.task.models import Task class TaskViewSet(viewsets.ModelViewSet): serializer_class = TaskSerializer ...
26.266667
61
0.819797
from rest_framework import viewsets from rest_framework.permissions import IsAuthenticated from serempre_todo.task.api.serializers import TaskSerializer from serempre_todo.task.models import Task class TaskViewSet(viewsets.ModelViewSet): serializer_class = TaskSerializer permission_classes = [IsAuthentica...
true
true
1c46db55722edfbae9a686a7bac404d67cd50321
3,930
py
Python
contractor_plugins/Manual/models.py
T3kton/contractor_plugins
a42c87f4d0713b2a461739f528f92fa572a7fec7
[ "MIT" ]
null
null
null
contractor_plugins/Manual/models.py
T3kton/contractor_plugins
a42c87f4d0713b2a461739f528f92fa572a7fec7
[ "MIT" ]
null
null
null
contractor_plugins/Manual/models.py
T3kton/contractor_plugins
a42c87f4d0713b2a461739f528f92fa572a7fec7
[ "MIT" ]
2
2017-05-05T03:39:11.000Z
2018-05-11T13:06:25.000Z
from django.db import models from django.core.exceptions import ValidationError from cinp.orm_django import DjangoCInP as CInP from contractor.Site.models import Site from contractor.Building.models import Foundation, Complex, FOUNDATION_SUBCLASS_LIST, COMPLEX_SUBCLASS_LIST from contractor.BluePrint.models import Fou...
28.071429
152
0.708142
from django.db import models from django.core.exceptions import ValidationError from cinp.orm_django import DjangoCInP as CInP from contractor.Site.models import Site from contractor.Building.models import Foundation, Complex, FOUNDATION_SUBCLASS_LIST, COMPLEX_SUBCLASS_LIST from contractor.BluePrint.models import Fou...
true
true
1c46dbb5413dcfd3678d4b0e6bd04adac93c69db
1,330
py
Python
src/shardBackup/copy.py
babarnescocke/shardBackup
ff62869ffd319b627edf2a2a4f5084ed19713f03
[ "BSD-3-Clause" ]
null
null
null
src/shardBackup/copy.py
babarnescocke/shardBackup
ff62869ffd319b627edf2a2a4f5084ed19713f03
[ "BSD-3-Clause" ]
null
null
null
src/shardBackup/copy.py
babarnescocke/shardBackup
ff62869ffd319b627edf2a2a4f5084ed19713f03
[ "BSD-3-Clause" ]
null
null
null
from subprocess import run from sys import exit from shutil import copy2 import os # for unclear reasons importing just os.stat and os.chown doesn't work import stat def rsync(fobject0, fobject1): # takes two file objects and transmits 0 to 1 """ a call to copying using rsync >>>rsync('./.gitkeep','/other/...
35.945946
155
0.626316
from subprocess import run from sys import exit from shutil import copy2 import os import stat def rsync(fobject0, fobject1): # takes two file objects and transmits 0 to 1 try: run(['rsync', #rsync is a major program '-avzz', #a = archive, v= verbose, zz=compress '-n', # n = simul...
true
true
1c46dc5e623025be88f670a423523abba08c29d5
1,368
py
Python
Diabetes_API/app.py
18bce1151/proj
96c0a299ccaec29a02a9486d192a7215f5a12566
[ "Unlicense" ]
86
2020-11-26T17:38:51.000Z
2022-03-10T11:35:08.000Z
Diabetes_API/app.py
18bce1151/proj
96c0a299ccaec29a02a9486d192a7215f5a12566
[ "Unlicense" ]
null
null
null
Diabetes_API/app.py
18bce1151/proj
96c0a299ccaec29a02a9486d192a7215f5a12566
[ "Unlicense" ]
62
2020-11-27T05:16:06.000Z
2022-03-27T15:23:55.000Z
from flask import Flask, render_template, url_for, flash, redirect import joblib from flask import request import numpy as np app = Flask(__name__, template_folder='templates') @app.route("/") @app.route("/Diabetes") def cancer(): return render_template("diabetes.html") def ValuePredictor(to_predic...
35.076923
134
0.679094
from flask import Flask, render_template, url_for, flash, redirect import joblib from flask import request import numpy as np app = Flask(__name__, template_folder='templates') @app.route("/") @app.route("/Diabetes") def cancer(): return render_template("diabetes.html") def ValuePredictor(to_predic...
true
true
1c46ded6115ecd16b3a79fe253d63b64f0698442
18,126
py
Python
python/cloudtik/tests/test_cloudtik.py
jerrychenhf/cloudtik
5ceab948c5c8b2e00f644d2fb801311572aaf381
[ "Apache-2.0" ]
2
2022-03-28T05:03:57.000Z
2022-03-28T09:00:48.000Z
python/cloudtik/tests/test_cloudtik.py
jerrychenhf/cloudtik
5ceab948c5c8b2e00f644d2fb801311572aaf381
[ "Apache-2.0" ]
12
2022-03-29T05:07:18.000Z
2022-03-31T13:57:57.000Z
python/cloudtik/tests/test_cloudtik.py
jerrychenhf/cloudtik
5ceab948c5c8b2e00f644d2fb801311572aaf381
[ "Apache-2.0" ]
6
2022-03-28T05:04:24.000Z
2022-03-29T01:22:22.000Z
from enum import Enum import os import re from subprocess import CalledProcessError import tempfile import threading import time import unittest import yaml import copy from jsonschema.exceptions import ValidationError from typing import Dict, Callable, List, Optional from cloudtik.core._private.utils import prepare_c...
32.138298
108
0.5667
from enum import Enum import os import re from subprocess import CalledProcessError import tempfile import threading import time import unittest import yaml import copy from jsonschema.exceptions import ValidationError from typing import Dict, Callable, List, Optional from cloudtik.core._private.utils import prepare_c...
true
true
1c46e01057545892b524898477fb51b8ed2373e5
1,140
py
Python
frida_mode/test/png/persistent/get_symbol_addr.py
hamzzi/AFLplusplus
95f47ac3a4d23b28a573a0614893d7aac5f5d4b4
[ "Apache-2.0" ]
2,104
2020-03-19T16:17:10.000Z
2022-03-31T16:22:30.000Z
frida_mode/test/png/persistent/get_symbol_addr.py
hamzzi/AFLplusplus
95f47ac3a4d23b28a573a0614893d7aac5f5d4b4
[ "Apache-2.0" ]
788
2020-03-19T14:54:09.000Z
2022-03-31T17:38:00.000Z
frida_mode/test/png/persistent/get_symbol_addr.py
hamzzi/AFLplusplus
95f47ac3a4d23b28a573a0614893d7aac5f5d4b4
[ "Apache-2.0" ]
518
2020-03-21T01:24:55.000Z
2022-03-30T21:05:53.000Z
#!/usr/bin/python3 import argparse from elftools.elf.elffile import ELFFile def process_file(file, symbol, base): with open(file, 'rb') as f: elf = ELFFile(f) symtab = elf.get_section_by_name('.symtab') mains = symtab.get_symbol_by_name(symbol) if len(mains) != 1: print ...
30.810811
74
0.598246
import argparse from elftools.elf.elffile import ELFFile def process_file(file, symbol, base): with open(file, 'rb') as f: elf = ELFFile(f) symtab = elf.get_section_by_name('.symtab') mains = symtab.get_symbol_by_name(symbol) if len(mains) != 1: print ("Failed to find m...
true
true
1c46e1353606f6ac2e8eadd47d685475e3efc0f6
946
py
Python
crypto.py
Esshahn/cryptoticker
6fb32712e380cb2a0605bafcfa64fe7fdf0367b7
[ "MIT" ]
null
null
null
crypto.py
Esshahn/cryptoticker
6fb32712e380cb2a0605bafcfa64fe7fdf0367b7
[ "MIT" ]
null
null
null
crypto.py
Esshahn/cryptoticker
6fb32712e380cb2a0605bafcfa64fe7fdf0367b7
[ "MIT" ]
null
null
null
# ------------------------------------------------- # Cryptoticker # Python Script to get the current prices of crypto currencies # and send an email with the current prices # 2021 Ingo Hinterding # https://github.com/Esshahn/cryptoticker # ------------------------------------------------- from tracker import * from d...
26.277778
62
0.620507
from tracker import * from downloader import * config = load_json("user-data.json") data = download_latest_crypto_data(config) save_file("crypto-data.json", json.dumps(data)) crypto_all = load_json("crypto-data.json") crypto = crypto_all["data"] user_all = load_json("user-data.json") symbols = user_all[...
true
true
1c46e16e22d0b4bc1b34d28281a937a613893ce7
27,393
py
Python
python/mxnet/base.py
ChrisQiqiang/mxnet-combination
015c02f8fa1b22133202e1c70488c439cd9e726d
[ "BSL-1.0", "Apache-2.0" ]
null
null
null
python/mxnet/base.py
ChrisQiqiang/mxnet-combination
015c02f8fa1b22133202e1c70488c439cd9e726d
[ "BSL-1.0", "Apache-2.0" ]
null
null
null
python/mxnet/base.py
ChrisQiqiang/mxnet-combination
015c02f8fa1b22133202e1c70488c439cd9e726d
[ "BSL-1.0", "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
32.113716
150
0.639032
from __future__ import absolute_import import re import atexit import ctypes import os import sys import inspect import platform import numpy as _np from . import libinfo __all__ = ['MXNetError'] try: basestring long except NameError: basestring = str long = int integer_type...
true
true
1c46e19fe76854e8b0b97098ce1dda2257aca5d4
4,533
py
Python
includes/NopSCAD/scripts/c14n_stl.py
codysandahl/3dprinting
98d588864e5ba5826c7ed16959aa7b1040a760b3
[ "MIT" ]
null
null
null
includes/NopSCAD/scripts/c14n_stl.py
codysandahl/3dprinting
98d588864e5ba5826c7ed16959aa7b1040a760b3
[ "MIT" ]
null
null
null
includes/NopSCAD/scripts/c14n_stl.py
codysandahl/3dprinting
98d588864e5ba5826c7ed16959aa7b1040a760b3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # NopSCADlib Copyright Chris Palmer 2018 # nop.head@gmail.com # hydraraptor.blogspot.com # # This file is part of NopSCADlib. # # NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the # GNU General Public License as published by the Free Software Foundatio...
38.415254
138
0.578425
# This scrip orders each triangle to start with the lowest vertex first (comparing x, then y, then z) # It then sorts the triangles to start with the one with the lowest vertices first (comparing first vertex, second, then third) # This has no effect on the model but makes the STL consistent. I...
true
true
1c46e1ea720a2cd127402c538d9c90de250108a5
3,717
py
Python
twisted/internet/test/test_time.py
hawkowl/twisted
c413aac3888dea2202c0dc26f978d7f88b4b837a
[ "Unlicense", "MIT" ]
9,953
2019-04-03T23:41:04.000Z
2022-03-31T11:54:44.000Z
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_time.py
W4LKURE/learn_python3_spider
98dd354a41598b31302641f9a0ea49d1ecfa0fb1
[ "MIT" ]
44
2019-05-27T10:59:29.000Z
2022-03-31T14:14:29.000Z
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_time.py
W4LKURE/learn_python3_spider
98dd354a41598b31302641f9a0ea49d1ecfa0fb1
[ "MIT" ]
2,803
2019-04-06T13:15:33.000Z
2022-03-31T07:42:01.000Z
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for implementations of L{IReactorTime}. """ __metaclass__ = type from twisted.python.log import msg from twisted.python.runtime import platform from twisted.trial.unittest import SkipTest from twisted.internet.test.reactormixins impor...
32.893805
80
0.651601
__metaclass__ = type from twisted.python.log import msg from twisted.python.runtime import platform from twisted.trial.unittest import SkipTest from twisted.internet.test.reactormixins import ReactorBuilder from twisted.internet.interfaces import IReactorTime, IReactorThreads class TimeTestsBuilder(ReactorBuild...
true
true
1c46e2c4714a5d7a0da9a84287a162ed818906e7
3,529
py
Python
backend/schedule_worker/utils/generate_graph.py
evemorgen/GdzieJestMojTramwajProject
65a090ae4222053a2a0a1b145df5196f3658065c
[ "MIT" ]
null
null
null
backend/schedule_worker/utils/generate_graph.py
evemorgen/GdzieJestMojTramwajProject
65a090ae4222053a2a0a1b145df5196f3658065c
[ "MIT" ]
null
null
null
backend/schedule_worker/utils/generate_graph.py
evemorgen/GdzieJestMojTramwajProject
65a090ae4222053a2a0a1b145df5196f3658065c
[ "MIT" ]
null
null
null
import os import logging import networkx as nx import matplotlib.pyplot as plt import json from geopy.distance import vincenty from collections import deque from db import MpkDb as DbApi from utils import Config def czy_skrzyzowanie(przystanek, skrzyzowania, wariant, punkty): for skrzyzowanie in skrzyzowania: ...
39.651685
141
0.614338
import os import logging import networkx as nx import matplotlib.pyplot as plt import json from geopy.distance import vincenty from collections import deque from db import MpkDb as DbApi from utils import Config def czy_skrzyzowanie(przystanek, skrzyzowania, wariant, punkty): for skrzyzowanie in skrzyzowania: ...
true
true
1c46e31c48f99fa5dabe9c956cd41ecd0c86bcaf
5,840
py
Python
src/retrieval_core/models/modules/da.py
RImbriaco/OML
4998cdebc3ac553ccd53b4caacf24d8c3d8fc07b
[ "MIT" ]
2
2021-09-08T12:33:05.000Z
2021-09-14T09:40:43.000Z
src/retrieval_core/models/modules/da.py
RImbriaco/OML
4998cdebc3ac553ccd53b4caacf24d8c3d8fc07b
[ "MIT" ]
null
null
null
src/retrieval_core/models/modules/da.py
RImbriaco/OML
4998cdebc3ac553ccd53b4caacf24d8c3d8fc07b
[ "MIT" ]
1
2021-09-08T12:35:10.000Z
2021-09-08T12:35:10.000Z
import torch from torch import nn """ Attention module as implemented in "Dual Attention Network for Scene Segmentation" https://arxiv.org/abs/1809.02983 """ class ActivatedBatchNorm(nn.Module): def __init__(self, num_features, activation='relu', **kwargs): """ Pre-activates tensor with activatio...
30.899471
86
0.610445
import torch from torch import nn class ActivatedBatchNorm(nn.Module): def __init__(self, num_features, activation='relu', **kwargs): super().__init__() activation_map = { 'relu': nn.ReLU, 'leaky_relu': nn.LeakyReLU, 'elu': nn.ELU, } if activati...
true
true
1c46e32070cf0c01bff98632cd40042af2562b9c
22,730
py
Python
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py
fdw/sqlfluff
e49c974e3fc886a28b358b59442d9471e6f6e89d
[ "MIT" ]
null
null
null
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py
fdw/sqlfluff
e49c974e3fc886a28b358b59442d9471e6f6e89d
[ "MIT" ]
null
null
null
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py
fdw/sqlfluff
e49c974e3fc886a28b358b59442d9471e6f6e89d
[ "MIT" ]
null
null
null
"""Defines the templaters.""" from collections import deque from contextlib import contextmanager import os import os.path import logging from typing import List, Optional, Iterator, Tuple, Any, Dict, Deque from dataclasses import dataclass from functools import partial from dbt.version import get_installed_version ...
39.054983
109
0.593797
from collections import deque from contextlib import contextmanager import os import os.path import logging from typing import List, Optional, Iterator, Tuple, Any, Dict, Deque from dataclasses import dataclass from functools import partial from dbt.version import get_installed_version from dbt.config.runtime import...
true
true
1c46e354feed5cf4980e4dc9638c9d72ef429a1d
7,419
py
Python
east/utils/image_utils.py
embracesource-cv-com/keras-east
0733a9a99c4446a30c8b8e1d62e102391f7a854a
[ "Apache-2.0" ]
12
2019-04-01T01:58:13.000Z
2019-12-10T02:54:18.000Z
east/utils/image_utils.py
embracesource-cv-com/keras-east
0733a9a99c4446a30c8b8e1d62e102391f7a854a
[ "Apache-2.0" ]
5
2019-04-22T16:00:02.000Z
2020-08-12T07:03:05.000Z
east/utils/image_utils.py
embracesource-cv-com/keras-east
0733a9a99c4446a30c8b8e1d62e102391f7a854a
[ "Apache-2.0" ]
1
2019-05-24T11:34:44.000Z
2019-05-24T11:34:44.000Z
# -*- coding: utf-8 -*- """ File Name: image Description : 图像处理工具类 Author : mick.yi date: 2019/2/18 """ import skimage from skimage import io, transform import numpy as np import matplotlib.pyplot as plt import random def load_image(image_path): """ 加载图像 :p...
28.755814
117
0.579189
import skimage from skimage import io, transform import numpy as np import matplotlib.pyplot as plt import random def load_image(image_path): image = plt.imread(image_path) if len(image.shape) == 2: image = np.expand_dims(image, axis=2) image = np.tile(image, (1, 1, 3)) e...
true
true
1c46e48e2e3f579a1cdbebb866e2f56a6b6f6241
201
py
Python
rpc/client.py
yuriscosta/tads-sistemas-distribuidos
1bdcd3ff87bb5ecc2a722ef70bb4e7fd7c8540da
[ "MIT" ]
1
2017-10-18T03:04:49.000Z
2017-10-18T03:04:49.000Z
rpc/client.py
yuriscosta/tads-sistemas-distribuidos
1bdcd3ff87bb5ecc2a722ef70bb4e7fd7c8540da
[ "MIT" ]
1
2020-06-05T17:51:11.000Z
2020-06-05T17:51:11.000Z
rpc/client.py
yuriscosta/tads-sistemas-distribuidos
1bdcd3ff87bb5ecc2a722ef70bb4e7fd7c8540da
[ "MIT" ]
null
null
null
import xmlrpc.client s = xmlrpc.client.ServerProxy('http://localhost:8000') print(s.pow(2,3)) print(s.add(2,3)) print(s.mul(5,2)) # Gerando erros print(s.pow(0,0)) print(s.add(1)) print(s.sub(1, 2))
16.75
54
0.676617
import xmlrpc.client s = xmlrpc.client.ServerProxy('http://localhost:8000') print(s.pow(2,3)) print(s.add(2,3)) print(s.mul(5,2)) print(s.pow(0,0)) print(s.add(1)) print(s.sub(1, 2))
true
true
1c46e5e885ba5b8a6ca6466a4c60eccdef77f19e
9,122
py
Python
src/rosdep2/platforms/debian.py
gavanderhoorn/rosdep
641433af01bb217b807af6adda2b9f7a0c55f727
[ "BSD-3-Clause" ]
null
null
null
src/rosdep2/platforms/debian.py
gavanderhoorn/rosdep
641433af01bb217b807af6adda2b9f7a0c55f727
[ "BSD-3-Clause" ]
null
null
null
src/rosdep2/platforms/debian.py
gavanderhoorn/rosdep
641433af01bb217b807af6adda2b9f7a0c55f727
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2009, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # not...
36.931174
116
0.676168
from __future__ import print_function import subprocess import sys from rospkg.os_detect import OS_DEBIAN, OS_LINARO, OS_UBUNTU, OS_ELEMENTARY, OsDetect from .pip import PIP_INSTALLER from .gem import GEM_INSTALLER from .source import SOURCE_INSTALLER from ..installers import PackageMana...
true
true
1c46e7371d0f642717b0dbe3ec998d628839b8d6
6,710
py
Python
novelle/views/routes.py
sahuashi/novelle
04295f4060af763a23a299219da73ba46c1ed626
[ "MIT" ]
null
null
null
novelle/views/routes.py
sahuashi/novelle
04295f4060af763a23a299219da73ba46c1ed626
[ "MIT" ]
null
null
null
novelle/views/routes.py
sahuashi/novelle
04295f4060af763a23a299219da73ba46c1ed626
[ "MIT" ]
null
null
null
import os import requests from flask import Blueprint, render_template, flash, request, redirect, url_for, current_app from flask_login import login_required, logout_user, login_user, current_user from sqlalchemy import exc from novelle.models import db, User, Book from novelle.forms import Form router = Blueprint('ro...
37.909605
124
0.628167
import os import requests from flask import Blueprint, render_template, flash, request, redirect, url_for, current_app from flask_login import login_required, logout_user, login_user, current_user from sqlalchemy import exc from novelle.models import db, User, Book from novelle.forms import Form router = Blueprint('ro...
true
true
1c46e82782628298655f1652a3e4cd46980848c8
5,161
py
Python
Synaptic-Flow/Utils/metrics.py
santosh-b/Alleviate-Robust-Overfitting
c369ab2eaf51ba02a15f45db77a8c9292c8dbbf8
[ "MIT" ]
null
null
null
Synaptic-Flow/Utils/metrics.py
santosh-b/Alleviate-Robust-Overfitting
c369ab2eaf51ba02a15f45db77a8c9292c8dbbf8
[ "MIT" ]
null
null
null
Synaptic-Flow/Utils/metrics.py
santosh-b/Alleviate-Robust-Overfitting
c369ab2eaf51ba02a15f45db77a8c9292c8dbbf8
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import numpy as np import pandas as pd from prune import * from Layers import layers def summary(model, scores, flops, prunable): r"""Summary of compression results for a model. """ rows = [] for name, module in model.named_modules(): for pname, param in modu...
43.369748
104
0.550281
import torch import torch.nn as nn import numpy as np import pandas as pd from prune import * from Layers import layers def summary(model, scores, flops, prunable): rows = [] for name, module in model.named_modules(): for pname, param in module.named_parameters(recurse=False): pruned = pru...
true
true
1c46e8c37c4ba356c3728913dc60e567bdcb344e
9,642
py
Python
server/vcr-server/vcr_server/utils/solrqueue.py
brianorwhatever/aries-vcr
96bb31a2f96406dfa2832dbd7790c46b60981e13
[ "Apache-2.0" ]
38
2019-01-07T02:49:55.000Z
2020-01-27T17:26:09.000Z
server/vcr-server/vcr_server/utils/solrqueue.py
brianorwhatever/aries-vcr
96bb31a2f96406dfa2832dbd7790c46b60981e13
[ "Apache-2.0" ]
364
2019-01-07T20:22:15.000Z
2020-03-10T21:59:23.000Z
server/vcr-server/vcr_server/utils/solrqueue.py
brianorwhatever/aries-vcr
96bb31a2f96406dfa2832dbd7790c46b60981e13
[ "Apache-2.0" ]
34
2019-01-04T19:16:04.000Z
2020-02-20T19:24:25.000Z
import logging import threading import os from queue import Empty, Full, Queue from haystack.utils import get_identifier from api.v2.search.index import TxnAwareSearchIndex LOGGER = logging.getLogger(__name__) # this will kill the vcr-api process RTI_ABORT_ON_ERRORS = os.getenv("RTI_ABORT_ON_ERRORS", "TRUE").upper...
42.663717
157
0.581
import logging import threading import os from queue import Empty, Full, Queue from haystack.utils import get_identifier from api.v2.search.index import TxnAwareSearchIndex LOGGER = logging.getLogger(__name__) RTI_ABORT_ON_ERRORS = os.getenv("RTI_ABORT_ON_ERRORS", "TRUE").upper() ABORT_ON_ERRORS = RTI_ABORT_ON_ER...
true
true
1c46e8ebc705732b535b16f3a42154c4df52a3d9
82
py
Python
tests/conftest.py
mishc9/flake_rba
eda1e80436f401871dba61a4c769204c2cbcfc65
[ "MIT" ]
null
null
null
tests/conftest.py
mishc9/flake_rba
eda1e80436f401871dba61a4c769204c2cbcfc65
[ "MIT" ]
null
null
null
tests/conftest.py
mishc9/flake_rba
eda1e80436f401871dba61a4c769204c2cbcfc65
[ "MIT" ]
null
null
null
import pytest @pytest.fixture def fixture_template(): return "Hello World!"
11.714286
25
0.731707
import pytest @pytest.fixture def fixture_template(): return "Hello World!"
true
true
1c46ea4290b2b9e013c4b3a29287456e61b6ca89
1,429
py
Python
tests/plugins/inventory/test_nsot.py
omershtivi/nornir
0bbded1dcf38245c75aadf74706ea8547b2a0e73
[ "Apache-2.0" ]
1
2019-04-10T08:14:59.000Z
2019-04-10T08:14:59.000Z
tests/plugins/inventory/test_nsot.py
omershtivi/nornir
0bbded1dcf38245c75aadf74706ea8547b2a0e73
[ "Apache-2.0" ]
null
null
null
tests/plugins/inventory/test_nsot.py
omershtivi/nornir
0bbded1dcf38245c75aadf74706ea8547b2a0e73
[ "Apache-2.0" ]
null
null
null
import json import os from nornir.plugins.inventory import nsot # We need import below to load fixtures import pytest # noqa BASE_PATH = os.path.join(os.path.dirname(__file__), "nsot") def get_inv(requests_mock, case, **kwargs): for i in ["interfaces", "sites", "devices"]: with open("{}/{}/{}.json".f...
31.755556
84
0.615815
import json import os from nornir.plugins.inventory import nsot import pytest BASE_PATH = os.path.join(os.path.dirname(__file__), "nsot") def get_inv(requests_mock, case, **kwargs): for i in ["interfaces", "sites", "devices"]: with open("{}/{}/{}.json".format(BASE_PATH, case, i), "r") as f: ...
true
true
1c46eb9b38a94e1016136f4df0089ae4ec1eaff0
1,112
py
Python
hexi/service/pipeline/inputManager.py
tunstek/hexi
ebb00e4e47ac90d96a26179a5786d768d95c4bd5
[ "MIT" ]
14
2017-10-07T23:19:09.000Z
2021-10-08T12:13:59.000Z
hexi/service/pipeline/inputManager.py
tunstek/hexi
ebb00e4e47ac90d96a26179a5786d768d95c4bd5
[ "MIT" ]
1
2018-07-16T17:03:43.000Z
2018-07-16T17:03:43.000Z
hexi/service/pipeline/inputManager.py
tunstek/hexi
ebb00e4e47ac90d96a26179a5786d768d95c4bd5
[ "MIT" ]
6
2018-05-18T14:25:26.000Z
2021-03-28T12:37:21.000Z
import asyncio import time from hexi.service import event from hexi.service.pipeline.BaseManager import BaseManager from hexi.util import deque from hexi.plugin.InputPlugin import InputPlugin EMPTY_SIGNAL = [0, 0, 0, 0, 0, 0] class InputManager(BaseManager): def __init__(self): super().__init__('input', 'inpu...
30.054054
79
0.735612
import asyncio import time from hexi.service import event from hexi.service.pipeline.BaseManager import BaseManager from hexi.util import deque from hexi.plugin.InputPlugin import InputPlugin EMPTY_SIGNAL = [0, 0, 0, 0, 0, 0] class InputManager(BaseManager): def __init__(self): super().__init__('input', 'inpu...
true
true
1c46ec3f4bcd5dfd904476a655c486582328757a
7,446
py
Python
tensorflow_io/python/experimental/numpy_dataset_ops.py
lgeiger/io
90be860451a705e2fbe8cfdec3c30030112b5c69
[ "Apache-2.0" ]
558
2018-11-09T22:45:27.000Z
2022-03-24T04:59:36.000Z
tensorflow_io/python/experimental/numpy_dataset_ops.py
lgeiger/io
90be860451a705e2fbe8cfdec3c30030112b5c69
[ "Apache-2.0" ]
1,122
2018-12-09T03:30:40.000Z
2022-03-31T16:22:15.000Z
tensorflow_io/python/experimental/numpy_dataset_ops.py
lgeiger/io
90be860451a705e2fbe8cfdec3c30030112b5c69
[ "Apache-2.0" ]
319
2018-12-09T00:18:47.000Z
2022-03-30T21:49:46.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...
36.861386
87
0.480526
import numpy as np import tensorflow as tf from tensorflow_io.python.ops import core_ops class NumpyIODataset(tf.data.Dataset): def __init__(self, a, internal=True): with tf.name_scope("NumpyIODataset"): assert internal entries = a def p(entry): ...
true
true
1c46ec4630ef2346b753d3b1c8de606804d39144
5,523
py
Python
azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/security_rule_py3.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
1
2022-03-30T22:39:15.000Z
2022-03-30T22:39:15.000Z
azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/security_rule_py3.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/security_rule_py3.py
Christina-Kang/azure-sdk-for-python
bbf982eb06aab04b8151f69f1d230b7f5fb96ebf
[ "MIT" ]
2
2017-01-20T18:25:46.000Z
2017-05-12T21:31:47.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 ...
49.756757
316
0.668296
from .sub_resource import SubResource class SecurityRule(SubResource): _validation = { 'protocol': {'required': True}, 'source_address_prefix': {'required': True}, 'destination_address_prefix': {'required': True}, 'access': {'required': True}, 'direction': {'req...
true
true
1c46ed5b7d03f873e983faa920d777e35b56c1ae
3,714
py
Python
test_tflite.py
kzm4269/keras-yolo3
06b2b522213cb901f4a7133b87aab04079e41aff
[ "MIT" ]
null
null
null
test_tflite.py
kzm4269/keras-yolo3
06b2b522213cb901f4a7133b87aab04079e41aff
[ "MIT" ]
null
null
null
test_tflite.py
kzm4269/keras-yolo3
06b2b522213cb901f4a7133b87aab04079e41aff
[ "MIT" ]
1
2019-09-17T01:28:59.000Z
2019-09-17T01:28:59.000Z
import argparse import sys from pathlib import Path import numpy as np import tensorflow as tf import keras from PIL import Image import matplotlib.pyplot as plt from yolo3.model import yolo_eval from yolo3.utils import letterbox_image def predict_keras(model_path): model = keras.models.load_model(model_path, c...
35.371429
134
0.631125
import argparse import sys from pathlib import Path import numpy as np import tensorflow as tf import keras from PIL import Image import matplotlib.pyplot as plt from yolo3.model import yolo_eval from yolo3.utils import letterbox_image def predict_keras(model_path): model = keras.models.load_model(model_path, c...
true
true
1c46edebef8140280b53e681b1f63cdbf8683804
15,791
py
Python
tests/support/unit.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
5
2018-05-01T20:51:14.000Z
2021-11-09T05:43:00.000Z
tests/support/unit.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
12
2015-04-15T22:17:42.000Z
2016-03-22T08:46:27.000Z
tests/support/unit.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
7
2017-09-29T18:49:53.000Z
2021-11-09T05:42:49.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: Pedro Algarvio (pedro@algarvio.me) ============================ Unittest Compatibility Layer ============================ Compatibility layer to use :mod:`unittest <python2:unittest>` under Python 2.7 or `unittest2`_ under Python 2.6 without having to ...
40.283163
135
0.604142
from __future__ import absolute_import, print_function, unicode_literals import os import sys import logging from unittest import ( TestLoader as _TestLoader, TextTestRunner as _TextTestRunner, TestCase as _TestCase, expectedFailure, TestSuite as _TestSuite, skip, skipIf, TestResult,...
true
true
1c46efa6f932098b01ac8f6ff7f969b913d9d383
1,307
py
Python
demo.py
foamliu/Image-Matching
3213a8a574fa7bcc476d3de1c7370c268bf817a7
[ "MIT" ]
12
2019-04-12T06:56:59.000Z
2020-05-03T00:47:33.000Z
demo.py
foamliu/Image-Matching
3213a8a574fa7bcc476d3de1c7370c268bf817a7
[ "MIT" ]
1
2019-05-15T02:05:46.000Z
2019-05-17T17:57:34.000Z
demo.py
foamliu/Image-Matching
3213a8a574fa7bcc476d3de1c7370c268bf817a7
[ "MIT" ]
2
2019-05-28T07:03:45.000Z
2020-03-20T09:49:15.000Z
import math import cv2 as cv import numpy as np import torch from PIL import Image from torchvision import transforms from models import ResNetMatchModel def get_image(file): img = cv.imread(file) img = img[..., ::-1] # RGB img = Image.fromarray(img, 'RGB') # RGB img = transformer(img) img = i...
22.929825
74
0.635042
import math import cv2 as cv import numpy as np import torch from PIL import Image from torchvision import transforms from models import ResNetMatchModel def get_image(file): img = cv.imread(file) img = img[..., ::-1] img = Image.fromarray(img, 'RGB') img = transformer(img) img = img.to(devi...
true
true
1c46efb1d180176edecbf36aaf6099e81619e829
4,855
py
Python
torchflare/metrics/fbeta_meter.py
glenn-jocher/torchflare
3c55b5a0761f2e85dd6da95767c6ec03f0f5baad
[ "Apache-2.0" ]
1
2021-06-12T12:39:04.000Z
2021-06-12T12:39:04.000Z
torchflare/metrics/fbeta_meter.py
weidao-Shi/torchflare
3c55b5a0761f2e85dd6da95767c6ec03f0f5baad
[ "Apache-2.0" ]
null
null
null
torchflare/metrics/fbeta_meter.py
weidao-Shi/torchflare
3c55b5a0761f2e85dd6da95767c6ec03f0f5baad
[ "Apache-2.0" ]
null
null
null
"""Implements FBeta and F1-score.""" import torch from torchflare.metrics.meters import MetricMeter, _BaseInputHandler class FBeta(_BaseInputHandler, MetricMeter): """Computes Fbeta Score. Supports binary,multiclass and multilabel cases. """ def __init__( self, beta: float, ...
27.429379
91
0.581462
import torch from torchflare.metrics.meters import MetricMeter, _BaseInputHandler class FBeta(_BaseInputHandler, MetricMeter): def __init__( self, beta: float, num_classes: int, threshold: float = 0.5, average: str = "macro", multilabel: bool = False, ): ...
true
true
1c46f06b69ffba498e3069692b46574d299220a8
5,492
py
Python
tests/data/embeddings_test.py
richarajpal/deep_qa
d918335a1bed71b9cfccf1d5743321cee9c61952
[ "Apache-2.0" ]
459
2017-02-08T13:40:17.000Z
2021-12-12T12:57:48.000Z
tests/data/embeddings_test.py
richarajpal/deep_qa
d918335a1bed71b9cfccf1d5743321cee9c61952
[ "Apache-2.0" ]
176
2017-01-26T01:19:41.000Z
2018-04-22T19:16:01.000Z
tests/data/embeddings_test.py
richarajpal/deep_qa
d918335a1bed71b9cfccf1d5743321cee9c61952
[ "Apache-2.0" ]
154
2017-01-26T01:00:30.000Z
2021-02-05T10:44:42.000Z
# pylint: disable=no-self-use,invalid-name import gzip import numpy import pytest from deep_qa.common.checks import ConfigurationError from deep_qa.data.data_indexer import DataIndexer from deep_qa.data.embeddings import PretrainedEmbeddings from deep_qa.models.text_classification import ClassificationModel from deep_...
51.327103
101
0.64512
import gzip import numpy import pytest from deep_qa.common.checks import ConfigurationError from deep_qa.data.data_indexer import DataIndexer from deep_qa.data.embeddings import PretrainedEmbeddings from deep_qa.models.text_classification import ClassificationModel from deep_qa.testing.test_case import DeepQaTestCase...
true
true
1c46f19ef96c73dc748b7707cea8dbf4595a8711
2,871
py
Python
worker/view.py
photonle/bot
3689d3bfb177bb4b2efe207311283e63118fa427
[ "MIT" ]
1
2020-03-18T14:50:59.000Z
2020-03-18T14:50:59.000Z
worker/view.py
photonle/bot
3689d3bfb177bb4b2efe207311283e63118fa427
[ "MIT" ]
3
2020-03-17T14:07:43.000Z
2021-02-14T13:28:22.000Z
worker/view.py
photonle/bot
3689d3bfb177bb4b2efe207311283e63118fa427
[ "MIT" ]
1
2020-05-17T15:19:31.000Z
2020-05-17T15:19:31.000Z
from shutil import copy import sqlite3 import sys sys.stdout = open("report.txt", "w", encoding="utf8") copy('photon.db', 'photon.read.db') conn = sqlite3.connect('photon.read.db') curs = conn.cursor() curs.execute("SELECT * FROM (SELECT path, COUNT(*) as count FROM files GROUP BY path) WHERE count > 1 ORDER BY coun...
58.591837
223
0.676071
from shutil import copy import sqlite3 import sys sys.stdout = open("report.txt", "w", encoding="utf8") copy('photon.db', 'photon.read.db') conn = sqlite3.connect('photon.read.db') curs = conn.cursor() curs.execute("SELECT * FROM (SELECT path, COUNT(*) as count FROM files GROUP BY path) WHERE count > 1 ORDER BY coun...
true
true
1c46f2088730032fec400cd35792bfc6b4aa4935
3,714
py
Python
Lesson 04/walkthrough.py
NoelKocheril/Python101
b0e923e1ec3e936babbd57a310ec72b13e07ac57
[ "WTFPL" ]
null
null
null
Lesson 04/walkthrough.py
NoelKocheril/Python101
b0e923e1ec3e936babbd57a310ec72b13e07ac57
[ "WTFPL" ]
null
null
null
Lesson 04/walkthrough.py
NoelKocheril/Python101
b0e923e1ec3e936babbd57a310ec72b13e07ac57
[ "WTFPL" ]
null
null
null
# Defines a function # def my_func(): # print("Hello, World!") # Calls a function # my_func() # Repeats a function # for j in range(10): # my_func() # myName = "Noel Kocheril" # def hello(fname): # print(f"Hello {fname}") # hello() # Missing an argument # hello("Noel") # hello("Vit") # hello("Sha...
13.407942
70
0.522348
# sumOfNumbers(5) # -> result = 5 + sumOfNumbers(4) # -> result = 5 + 4 + sumOfNumbers(3) -> 0 # """ def factorial(x): if x > 0: ...
true
true
1c46f24731b57cf200f9345b0298f65fdfe81f08
1,237
py
Python
ecom/urls.py
dongmokevin/ecomv1
abb3dc5a5476c379c029b8299e820c1979d5eb14
[ "MIT" ]
null
null
null
ecom/urls.py
dongmokevin/ecomv1
abb3dc5a5476c379c029b8299e820c1979d5eb14
[ "MIT" ]
null
null
null
ecom/urls.py
dongmokevin/ecomv1
abb3dc5a5476c379c029b8299e820c1979d5eb14
[ "MIT" ]
null
null
null
"""ecom URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based vi...
35.342857
80
0.704931
from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), path('', include('core.urls')), path('basket/', include('basket.urls', namespace='basket')), path('payment...
true
true
1c46f4a9f5384283addc48510e60b1443d6e5e60
898
py
Python
python/hsml/utils/tensor.py
robzor92/models-api
d83ebd775acab4fad94cd4c6a38107635e4b4880
[ "Apache-2.0" ]
null
null
null
python/hsml/utils/tensor.py
robzor92/models-api
d83ebd775acab4fad94cd4c6a38107635e4b4880
[ "Apache-2.0" ]
null
null
null
python/hsml/utils/tensor.py
robzor92/models-api
d83ebd775acab4fad94cd4c6a38107635e4b4880
[ "Apache-2.0" ]
null
null
null
# # Copyright 2021 Logical Clocks AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
32.071429
76
0.7049
class Tensor: def __init__(self, data_type: None, shape: None): self.data_type = data_type self.shape = shape def to_dict(self): return {"shape": self.shape, "dataType": self.data_type}
true
true
1c46f50f3cb0a12eb3ccbd5ce2ef644903c88627
12,415
py
Python
homeassistant/components/alarmdecoder/config_flow.py
DavidDeSloovere/core
909a20b36d4df6724c955c2ae28cb82fe6d50c2e
[ "Apache-2.0" ]
4
2020-08-10T20:02:24.000Z
2022-01-31T02:14:22.000Z
homeassistant/components/alarmdecoder/config_flow.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
78
2020-07-23T07:13:08.000Z
2022-03-31T06:02:04.000Z
homeassistant/components/alarmdecoder/config_flow.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
3
2022-01-17T20:10:54.000Z
2022-01-17T20:17:22.000Z
"""Config flow for AlarmDecoder.""" import logging from adext import AdExt from alarmdecoder.devices import SerialDevice, SocketDevice from alarmdecoder.util import NoDeviceError import voluptuous as vol from homeassistant import config_entries from homeassistant.components.binary_sensor import DEVICE_CLASSES from ho...
33.920765
105
0.560129
import logging from adext import AdExt from alarmdecoder.devices import SerialDevice, SocketDevice from alarmdecoder.util import NoDeviceError import voluptuous as vol from homeassistant import config_entries from homeassistant.components.binary_sensor import DEVICE_CLASSES from homeassistant.const import CONF_HOST, ...
true
true
1c46f51d76f2d9918be20948b378e49153ec1648
7,109
py
Python
svgpathtools/svg_io_sax.py
Vrroom/svgpathtools
b9621c9c340337cd044ae21c83e2917cd010dc8f
[ "MIT" ]
2
2018-05-08T05:31:15.000Z
2022-01-27T11:51:04.000Z
svgpathtools/svg_io_sax.py
taoari/svgpathtools
9b1b8e78e10b99d6ca3d4b28e5b6b0d1596b8dc2
[ "MIT" ]
null
null
null
svgpathtools/svg_io_sax.py
taoari/svgpathtools
9b1b8e78e10b99d6ca3d4b28e5b6b0d1596b8dc2
[ "MIT" ]
3
2018-01-15T18:08:06.000Z
2018-10-11T09:19:49.000Z
"""(Experimental) replacement for import/export functionality SAX """ # External dependencies from __future__ import division, absolute_import, print_function import os from xml.etree.ElementTree import iterparse, Element, ElementTree, SubElement # Internal dependencies from .parser import parse_path from .parser im...
35.723618
80
0.544943
from __future__ import division, absolute_import, print_function import os from xml.etree.ElementTree import iterparse, Element, ElementTree, SubElement from .parser import parse_path from .parser import parse_transform from .svg_to_paths import (path2pathd, ellipse2pathd, line2pathd, pol...
true
true
1c46f578bdd65913273fe1b4661b4a5a024c948b
301
py
Python
3. Python Advanced (September 2021)/3.2 Python OOP (October 2021)/01. First Steps In OOP/04_car.py
kzborisov/SoftUni
ccb2b8850adc79bfb2652a45124c3ff11183412e
[ "MIT" ]
1
2021-02-07T07:51:12.000Z
2021-02-07T07:51:12.000Z
3. Python Advanced (September 2021)/3.2 Python OOP (October 2021)/01. First Steps In OOP/04_car.py
kzborisov/softuni
9c5b45c74fa7d9748e9b3ea65a5ae4e15c142751
[ "MIT" ]
null
null
null
3. Python Advanced (September 2021)/3.2 Python OOP (October 2021)/01. First Steps In OOP/04_car.py
kzborisov/softuni
9c5b45c74fa7d9748e9b3ea65a5ae4e15c142751
[ "MIT" ]
null
null
null
class Car: def __init__(self, name, model, engine): self.name = name self.model = model self.engine = engine def get_info(self): return f"This is {self.name} {self.model} with engine {self.engine}" car = Car("Kia", "Rio", "1.3L B3 I4") print(car.get_info())
23.153846
76
0.598007
class Car: def __init__(self, name, model, engine): self.name = name self.model = model self.engine = engine def get_info(self): return f"This is {self.name} {self.model} with engine {self.engine}" car = Car("Kia", "Rio", "1.3L B3 I4") print(car.get_info())
true
true
1c46f59fb85d988d23d303ed82be39df0f9802c3
1,990
py
Python
contact_form/tests/views.py
nunataksoftware/django-contact-form-updated
ad3da22a6c12c78e59fe05bf4e4f9f5a1e654e03
[ "BSD-3-Clause" ]
null
null
null
contact_form/tests/views.py
nunataksoftware/django-contact-form-updated
ad3da22a6c12c78e59fe05bf4e4f9f5a1e654e03
[ "BSD-3-Clause" ]
null
null
null
contact_form/tests/views.py
nunataksoftware/django-contact-form-updated
ad3da22a6c12c78e59fe05bf4e4f9f5a1e654e03
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings from django.core import mail from django.core.urlresolvers import reverse from django.test import TestCase class ViewTests(TestCase): urls = 'contact_form.urls' def test_get(self): """ HTTP GET on the form view just shows the form. """ ...
29.701493
65
0.522613
from django.conf import settings from django.core import mail from django.core.urlresolvers import reverse from django.test import TestCase class ViewTests(TestCase): urls = 'contact_form.urls' def test_get(self): contact_url = reverse('contact_form') response = self.client.get(conta...
true
true
1c46f61d2a6ed620777848b6db1e240c81c79142
16,339
py
Python
cadnano/util.py
mctrinh/cadnano2.5
d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736
[ "BSD-3-Clause" ]
1
2022-03-27T14:37:32.000Z
2022-03-27T14:37:32.000Z
cadnano/util.py
mctrinh/cadnano2.5
d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736
[ "BSD-3-Clause" ]
null
null
null
cadnano/util.py
mctrinh/cadnano2.5
d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736
[ "BSD-3-Clause" ]
1
2021-01-22T02:29:38.000Z
2021-01-22T02:29:38.000Z
""" util.py """ import argparse import inspect import logging import logging.handlers import os import platform import string import sys from os import path from traceback import extract_stack logger = logging.getLogger(__name__) IS_PY_3 = int(sys.version_info[0] > 2) def clamp(x, min_x, max_x): if x < min_x: ...
34.253669
113
0.63988
import argparse import inspect import logging import logging.handlers import os import platform import string import sys from os import path from traceback import extract_stack logger = logging.getLogger(__name__) IS_PY_3 = int(sys.version_info[0] > 2) def clamp(x, min_x, max_x): if x < min_x: return mi...
true
true
1c46fa3e618557a23f27ae9321e98729cbf11428
37
py
Python
src/trex/error.py
cnk113/TREX
add83d8108f3602c5bbe7b37f60ff19f89b2236d
[ "MIT" ]
null
null
null
src/trex/error.py
cnk113/TREX
add83d8108f3602c5bbe7b37f60ff19f89b2236d
[ "MIT" ]
1
2022-03-18T01:56:53.000Z
2022-03-24T19:35:58.000Z
src/trex/error.py
cnk113/TREX
add83d8108f3602c5bbe7b37f60ff19f89b2236d
[ "MIT" ]
1
2022-03-23T03:07:42.000Z
2022-03-23T03:07:42.000Z
class TrexError(Exception): pass
12.333333
27
0.72973
class TrexError(Exception): pass
true
true
1c46fc394f4f2e4a1722f7dab063575db81ae159
2,360
py
Python
rematchrSite/rematchrApp/migrations/0003_auto_20150319_1243.py
ctames/rematchr
4a22c3e4b1c22b64008e4996bdde9d4657c5294b
[ "MIT" ]
null
null
null
rematchrSite/rematchrApp/migrations/0003_auto_20150319_1243.py
ctames/rematchr
4a22c3e4b1c22b64008e4996bdde9d4657c5294b
[ "MIT" ]
null
null
null
rematchrSite/rematchrApp/migrations/0003_auto_20150319_1243.py
ctames/rematchr
4a22c3e4b1c22b64008e4996bdde9d4657c5294b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('rematchrApp', '0002_auto_20150226_1336'),...
30.649351
89
0.563559
from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('rematchrApp', '0002_auto_20150226_1336'), ] operations ...
true
true
1c46fd08a6227a33592d9bcc9675ca8b875b746f
13,736
py
Python
src/part2.py
shelonsky/Spark-Project-on-Demographic-Analysis-of-Turkey
91a6d28e125bdd14b5b44a1ea426c2728b7aa9c3
[ "MIT" ]
1
2021-12-30T14:19:18.000Z
2021-12-30T14:19:18.000Z
src/part2.py
shelonsky/Spark-Project-on-Demographic-Analysis-of-Turkey
91a6d28e125bdd14b5b44a1ea426c2728b7aa9c3
[ "MIT" ]
null
null
null
src/part2.py
shelonsky/Spark-Project-on-Demographic-Analysis-of-Turkey
91a6d28e125bdd14b5b44a1ea426c2728b7aa9c3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2021/5/30 16:06 # @Author : Xiao Lulu #!/usr/bin/env python # coding: utf-8 # In[2]: import pyspark.sql.functions as F from pyspark.sql import Row from pyspark.sql.functions import * from pyspark import SparkContext, SparkConf from pyspark.sql import SparkSession import re from...
39.585014
118
0.692268
import pyspark.sql.functions as F from pyspark.sql import Row from pyspark.sql.functions import * from pyspark import SparkContext, SparkConf from pyspark.sql import SparkSession import re from pyspark.sql.types import * from pyspark.sql.window import Window from pyspark.sql.functions import rank, col from py...
true
true
1c46fdcf707a39d6008c2679f4330a4c105e612a
7,835
py
Python
coffee.py
capjamesg/hypertext-coffee-pot
2cf5987493066063908b467568a7c54c71c2ff66
[ "MIT" ]
null
null
null
coffee.py
capjamesg/hypertext-coffee-pot
2cf5987493066063908b467568a7c54c71c2ff66
[ "MIT" ]
null
null
null
coffee.py
capjamesg/hypertext-coffee-pot
2cf5987493066063908b467568a7c54c71c2ff66
[ "MIT" ]
null
null
null
from config import * import datetime import logging import socket import json import os logging.basicConfig(filename="coffeepot.log", level=logging.DEBUG) server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind((HOST, PORT)) pouring_milk = None last_request = None # rewrite the currently brewing fi...
35.292793
126
0.596171
from config import * import datetime import logging import socket import json import os logging.basicConfig(filename="coffeepot.log", level=logging.DEBUG) server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind((HOST, PORT)) pouring_milk = None last_request = None with open("currently_brewing.jso...
true
true
1c46fde441f196ee5cc51a5ec50072e5a1d3b4aa
7,281
py
Python
scripts/fig/util.py
ucbrise/snoopy
da4c98e3876c10cf52aa51ece3b62c5e8b8e335a
[ "Apache-2.0" ]
9
2021-11-10T20:34:00.000Z
2022-03-23T02:30:29.000Z
scripts/fig/util.py
ucbrise/snoopy
da4c98e3876c10cf52aa51ece3b62c5e8b8e335a
[ "Apache-2.0" ]
null
null
null
scripts/fig/util.py
ucbrise/snoopy
da4c98e3876c10cf52aa51ece3b62c5e8b8e335a
[ "Apache-2.0" ]
4
2021-09-30T05:12:06.000Z
2022-03-18T03:05:21.000Z
import json import math import random from collections import defaultdict from scipy.special import lambertw def parseData(filename): results = [] f = open(filename, "r") for line in f: elems = line.split() result = { "clients": int(elems[0]), "data_size": int(elems[...
33.708333
106
0.573136
import json import math import random from collections import defaultdict from scipy.special import lambertw def parseData(filename): results = [] f = open(filename, "r") for line in f: elems = line.split() result = { "clients": int(elems[0]), "data_size": int(elems[...
true
true
1c4702f1d0d7fa1c75b6ea73d0e090f76d63480b
2,601
py
Python
explore/viz/continuous.py
idc9/explore
ce8aa039de96b1dd9fecc19fa098c222863ac3ce
[ "MIT" ]
null
null
null
explore/viz/continuous.py
idc9/explore
ce8aa039de96b1dd9fecc19fa098c222863ac3ce
[ "MIT" ]
null
null
null
explore/viz/continuous.py
idc9/explore
ce8aa039de96b1dd9fecc19fa098c222863ac3ce
[ "MIT" ]
1
2021-02-05T20:31:51.000Z
2021-02-05T20:31:51.000Z
import matplotlib.pyplot as plt import pandas as pd from sklearn.linear_model import LinearRegression from sklearn.preprocessing import StandardScaler from scipy.stats import pearsonr from explore.utils import safe_apply from explore.viz.utils import bold, ABLine2D, fmt_pval def plot_scatter(x, y, alpha=0.05, standa...
30.964286
87
0.582468
import matplotlib.pyplot as plt import pandas as pd from sklearn.linear_model import LinearRegression from sklearn.preprocessing import StandardScaler from scipy.stats import pearsonr from explore.utils import safe_apply from explore.viz.utils import bold, ABLine2D, fmt_pval def plot_scatter(x, y, alpha=0.05, standa...
true
true
1c47041f9ee93610c39d81b27b322f0c72c5c342
1,919
py
Python
tests/metarl/torch/algos/test_maml_vpg.py
icml2020submission6857/metarl
9b66cefa2b6bcb6a38096d629ce8853b47c7171d
[ "MIT" ]
2
2020-03-15T14:35:15.000Z
2021-02-15T16:38:00.000Z
tests/metarl/torch/algos/test_maml_vpg.py
icml2020submission6857/metarl
9b66cefa2b6bcb6a38096d629ce8853b47c7171d
[ "MIT" ]
null
null
null
tests/metarl/torch/algos/test_maml_vpg.py
icml2020submission6857/metarl
9b66cefa2b6bcb6a38096d629ce8853b47c7171d
[ "MIT" ]
1
2020-02-24T03:04:23.000Z
2020-02-24T03:04:23.000Z
"""This script is a test that fails when MAML-VPG performance is too low.""" import torch from metarl.envs import HalfCheetahDirEnv, normalize from metarl.envs.base import MetaRLEnv from metarl.experiment import deterministic, LocalRunner from metarl.np.baselines import LinearFeatureBaseline from metarl.torch.algos im...
34.267857
76
0.610214
import torch from metarl.envs import HalfCheetahDirEnv, normalize from metarl.envs.base import MetaRLEnv from metarl.experiment import deterministic, LocalRunner from metarl.np.baselines import LinearFeatureBaseline from metarl.torch.algos import MAMLVPG from metarl.torch.policies import GaussianMLPPolicy from tests.f...
true
true
1c470467bb157c6b60fde6c16bf077f9e16b1e83
1,063
py
Python
python/neuroglancer/default_credentials_manager.py
ilastik/neuroglancer
c8dc0982e3e235866a6144d467022e22af1300e0
[ "Apache-2.0" ]
20
2017-03-05T19:35:02.000Z
2021-07-05T09:32:27.000Z
python/neuroglancer/default_credentials_manager.py
ilastik/neuroglancer
c8dc0982e3e235866a6144d467022e22af1300e0
[ "Apache-2.0" ]
410
2017-02-06T16:58:55.000Z
2022-03-24T08:29:56.000Z
python/neuroglancer/default_credentials_manager.py
ilastik/neuroglancer
c8dc0982e3e235866a6144d467022e22af1300e0
[ "Apache-2.0" ]
13
2017-04-13T13:36:42.000Z
2021-09-14T17:15:23.000Z
# @license # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
42.52
94
0.777046
from . import credentials_provider, google_credentials default_credentials_manager = credentials_provider.CredentialsManager() default_credentials_manager.register( u'google-brainmaps', lambda _parameters: google_credentials.GoogleCredentialsProvider( client_id=u'639403125587-ue3c18dalqid...
true
true
1c4704a0a504b68ddee07f8b85b5a5909cee1a87
1,698
py
Python
sevdesk/client/models/invoice_change_status_json_body.py
HpLightcorner/SevDesk-Python-Client
303ca8dddd78da4291e7d23692ccfb147c7ba31a
[ "MIT" ]
null
null
null
sevdesk/client/models/invoice_change_status_json_body.py
HpLightcorner/SevDesk-Python-Client
303ca8dddd78da4291e7d23692ccfb147c7ba31a
[ "MIT" ]
null
null
null
sevdesk/client/models/invoice_change_status_json_body.py
HpLightcorner/SevDesk-Python-Client
303ca8dddd78da4291e7d23692ccfb147c7ba31a
[ "MIT" ]
null
null
null
from typing import Any, Dict, List, Type, TypeVar import attr from ..models.invoice_change_status_json_body_value import ( InvoiceChangeStatusJsonBodyValue, ) T = TypeVar("T", bound="InvoiceChangeStatusJsonBody") @attr.s(auto_attribs=True) class InvoiceChangeStatusJsonBody: """ Attributes: valu...
27.387097
94
0.660188
from typing import Any, Dict, List, Type, TypeVar import attr from ..models.invoice_change_status_json_body_value import ( InvoiceChangeStatusJsonBodyValue, ) T = TypeVar("T", bound="InvoiceChangeStatusJsonBody") @attr.s(auto_attribs=True) class InvoiceChangeStatusJsonBody: value: InvoiceChangeStatusJsonB...
true
true
1c47055e964491c450560bbb9bf677126d271f38
346
py
Python
flanker/mime/message/utils.py
meta-x/flanker
1e37baa1db2ecee238ac3de1e36a2948e0a6d3ad
[ "Apache-2.0" ]
1
2015-11-08T12:57:12.000Z
2015-11-08T12:57:12.000Z
flanker/mime/message/utils.py
meta-x/flanker
1e37baa1db2ecee238ac3de1e36a2948e0a6d3ad
[ "Apache-2.0" ]
null
null
null
flanker/mime/message/utils.py
meta-x/flanker
1e37baa1db2ecee238ac3de1e36a2948e0a6d3ad
[ "Apache-2.0" ]
1
2020-12-18T08:33:56.000Z
2020-12-18T08:33:56.000Z
from cStringIO import StringIO from contextlib import closing from email.generator import Generator def python_message_to_string(msg): """Converts python message to string in a proper way""" with closing(StringIO()) as fp: g = Generator(fp, mangle_from_=False) g.flatten(msg, unixfrom=False) ...
31.454545
59
0.722543
from cStringIO import StringIO from contextlib import closing from email.generator import Generator def python_message_to_string(msg): with closing(StringIO()) as fp: g = Generator(fp, mangle_from_=False) g.flatten(msg, unixfrom=False) return fp.getvalue()
true
true
1c470582964b938e3223bcd1617f3e7be1a1716e
18,456
py
Python
excellent/_version.py
arokem/excellent-science
e25e62ba766bd7292240cf8bd8596f926d59baf9
[ "BSD-3-Clause" ]
null
null
null
excellent/_version.py
arokem/excellent-science
e25e62ba766bd7292240cf8bd8596f926d59baf9
[ "BSD-3-Clause" ]
1
2018-07-31T21:27:27.000Z
2018-07-31T21:27:27.000Z
excellent/_version.py
arokem/excellent-science
e25e62ba766bd7292240cf8bd8596f926d59baf9
[ "BSD-3-Clause" ]
null
null
null
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
35.424184
79
0.584634
import errno import os import re import subprocess import sys def get_keywords(): git_refnames = "$Format:%d$" git_full = "$Format:%H$" git_date = "$Format:%ci$" keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} return keywords class Version...
true
true
1c4705b0614ddedee8f02cb903791afebf6e7a81
72,735
py
Python
src/sage/combinat/words/word_generators.py
bopopescu/sagemath
39f452b2691c5ac86654fea22414fa5851893b48
[ "BSL-1.0" ]
3
2018-09-11T11:16:26.000Z
2019-09-10T15:26:37.000Z
src/sage/combinat/words/word_generators.py
bopopescu/sagemath
39f452b2691c5ac86654fea22414fa5851893b48
[ "BSL-1.0" ]
2
2018-10-30T13:40:20.000Z
2020-07-23T12:13:30.000Z
src/sage/combinat/words/word_generators.py
bopopescu/sagemath
39f452b2691c5ac86654fea22414fa5851893b48
[ "BSL-1.0" ]
1
2020-07-23T10:29:58.000Z
2020-07-23T10:29:58.000Z
# -*- coding: utf-8 -*- r""" Common words AUTHORS: - Franco Saliola (2008-12-17): merged into sage - Sebastien Labbe (2008-12-17): merged into sage - Arnaud Bergeron (2008-12-17): merged into sage - Amy Glen (2008-12-17): merged into sage - Sebastien Labbe (2009-12-19): Added S-adic words (:trac:`7543`) USE: To see...
35.376946
232
0.56017
from __future__ import print_function from six.moves import range from itertools import cycle, count from random import randint from sage.misc.cachefunc import cached_method from sage.rings.all import ZZ, RR from sage.rings.infinity import Infinity from sage.combinat.words.abstract_word import Word_class...
true
true
1c4705d90e26f7a3b0aec0c56259738df2567122
584
py
Python
hail/python/hailtop/hailctl/dataproc/gcloud.py
sigmarkarl/hail
11b7c22342a945c61b24c5f8babf4ab411d3d2f1
[ "MIT" ]
2
2020-12-15T21:20:24.000Z
2020-12-21T19:46:26.000Z
hail/python/hailtop/hailctl/dataproc/gcloud.py
Dania-Abuhijleh/hail
a187dc0867801ca1eee774588fe58604a133a0d9
[ "MIT" ]
2
2016-11-17T03:06:10.000Z
2017-12-05T19:00:24.000Z
hail/python/hailtop/hailctl/dataproc/gcloud.py
Dania-Abuhijleh/hail
a187dc0867801ca1eee774588fe58604a133a0d9
[ "MIT" ]
2
2020-07-28T18:55:19.000Z
2020-10-19T16:43:03.000Z
import subprocess import sys import typing def run(command: typing.List[str]): """Run a gcloud command.""" return subprocess.check_call(["gcloud"] + command) def get_config(setting: str) -> typing.Optional[str]: """Get a gcloud configuration value.""" try: return subprocess.check_output(["gc...
32.444444
126
0.690068
import subprocess import sys import typing def run(command: typing.List[str]): return subprocess.check_call(["gcloud"] + command) def get_config(setting: str) -> typing.Optional[str]: try: return subprocess.check_output(["gcloud", "config", "get-value", setting], stderr=subprocess.DEVNULL).decode()....
true
true
1c47072151d6e3a3679673ef4f334e87c2edc417
10,991
py
Python
sdk/python/pulumi_azure_nextgen/network/v20190701/virtual_hub.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20190701/virtual_hub.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20190701/virtual_hub.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "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 from ... import _utilities, _tables from...
48.20614
1,370
0.670731
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['VirtualHub'] class VirtualHub(pulumi.CustomResource): def __init__(__self__, resource_na...
true
true
1c47074abf2983d50cd994c75924c03df0a98653
2,586
py
Python
tally_ho/apps/tally/tests/views/reports/test_overall_votes.py
onaio/tally-ho
f7a81909755924370653051bfc8315588dc75356
[ "Apache-2.0" ]
12
2015-09-07T17:12:42.000Z
2021-12-29T07:51:18.000Z
tally_ho/apps/tally/tests/views/reports/test_overall_votes.py
onaio/tally-ho
f7a81909755924370653051bfc8315588dc75356
[ "Apache-2.0" ]
122
2018-09-18T04:05:39.000Z
2022-01-17T10:12:48.000Z
tally_ho/apps/tally/tests/views/reports/test_overall_votes.py
onaio/tally-ho
f7a81909755924370653051bfc8315588dc75356
[ "Apache-2.0" ]
13
2015-06-06T17:32:34.000Z
2020-09-10T12:58:07.000Z
from django.test import RequestFactory from tally_ho.libs.permissions import groups from tally_ho.apps.tally.views.reports import overall_votes from tally_ho.libs.models.enums.entry_version import EntryVersion from tally_ho.libs.tests.test_base import create_result_form, create_ballot,\ create_candidates, create_r...
40.40625
77
0.667827
from django.test import RequestFactory from tally_ho.libs.permissions import groups from tally_ho.apps.tally.views.reports import overall_votes from tally_ho.libs.models.enums.entry_version import EntryVersion from tally_ho.libs.tests.test_base import create_result_form, create_ballot,\ create_candidates, create_r...
true
true
1c4707f0fd319f5925e77eba1ff52dbd5d26aa43
23,378
py
Python
PixivImageHandler.py
YukihoAA/PixivUtil2
bd2dd3ca34b1277042ee5f3d74a80800985aa4cc
[ "BSD-2-Clause" ]
1,872
2015-01-02T06:59:58.000Z
2022-03-29T14:43:58.000Z
PixivImageHandler.py
YukihoAA/PixivUtil2
bd2dd3ca34b1277042ee5f3d74a80800985aa4cc
[ "BSD-2-Clause" ]
959
2015-01-02T05:42:57.000Z
2022-03-28T10:00:56.000Z
PixivImageHandler.py
nao20010128nao/PU2-patched
3a4dd523247727a510c0b75373ae79db754a34f7
[ "BSD-2-Clause" ]
310
2015-01-02T16:45:33.000Z
2022-03-25T19:42:39.000Z
# -*- coding: utf-8 -*- import datetime import gc import os import re import sys import traceback import urllib from colorama import Fore, Style import datetime_z import PixivBrowserFactory import PixivConstant import PixivDownloadHandler import PixivHelper from PixivException import PixivException __re_manga_page =...
53.496568
155
0.529387
import datetime import gc import os import re import sys import traceback import urllib from colorama import Fore, Style import datetime_z import PixivBrowserFactory import PixivConstant import PixivDownloadHandler import PixivHelper from PixivException import PixivException __re_manga_page = re.compile(r'(\d+(_big...
true
true
1c470806e2e0c073cf45685cb91f84d5d2ad841e
725
py
Python
jinjamator/plugins/content/timestamp/__init__.py
jinjamator/jinjamator
6c48a6eedea9b9f461c66b5dddd609fa39610f0d
[ "Apache-2.0" ]
7
2020-05-06T07:48:14.000Z
2021-12-11T15:57:26.000Z
jinjamator/plugins/content/timestamp/__init__.py
jinjamator/jinjamator
6c48a6eedea9b9f461c66b5dddd609fa39610f0d
[ "Apache-2.0" ]
1
2020-04-11T15:13:07.000Z
2020-04-27T20:01:34.000Z
jinjamator/plugins/content/timestamp/__init__.py
jinjamator/jinjamator
6c48a6eedea9b9f461c66b5dddd609fa39610f0d
[ "Apache-2.0" ]
1
2020-05-29T08:53:08.000Z
2020-05-29T08:53:08.000Z
# Copyright 2020 Wilhelm Putz # 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, s...
30.208333
74
0.742069
import time import datetime def today(): return time.mktime(datetime.date.today().timetuple())
true
true
1c4708bae8c58607204d0b5e3851cd19bbe5f2b7
532
py
Python
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/waaafaa-33427
111391747de3d04519e8c83f809e510ba5f53267
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/waaafaa-33427
111391747de3d04519e8c83f809e510ba5f53267
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/waaafaa-33427
111391747de3d04519e8c83f809e510ba5f53267
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "waaafaa-33427.botics.co" site_params = { "name": "waaafaa", } if custom_domain: site_params["domain"] = custom_domain Site.objects.update_or_create(d...
20.461538
61
0.654135
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "waaafaa-33427.botics.co" site_params = { "name": "waaafaa", } if custom_domain: site_params["domain"] = custom_domain Site.objects.update_or_create(d...
true
true
1c4709825b92854677eea70e53d6029daae416e6
157
py
Python
lib/python/logan/__init__.py
melver/logan
e90da84388b1e966cf24f778cbabfee62d324c7d
[ "BSD-3-Clause" ]
null
null
null
lib/python/logan/__init__.py
melver/logan
e90da84388b1e966cf24f778cbabfee62d324c7d
[ "BSD-3-Clause" ]
null
null
null
lib/python/logan/__init__.py
melver/logan
e90da84388b1e966cf24f778cbabfee62d324c7d
[ "BSD-3-Clause" ]
null
null
null
""" Log Analyser """ import os BASEPATH = os.path.abspath(os.path.join( __file__, os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir))
15.7
61
0.675159
import os BASEPATH = os.path.abspath(os.path.join( __file__, os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir))
true
true
1c4709bd604c2f039002201b03f0a84178da694d
7,125
py
Python
utils/py27/Lib/test/test_glob.py
xahmol/8bit-Unity
b4f3bee00e012ca1755afba550a5270dce0a1054
[ "BSD-2-Clause" ]
42
2018-12-12T01:00:59.000Z
2022-03-27T07:32:29.000Z
utils/py27/Lib/test/test_glob.py
xahmol/8bit-Unity
b4f3bee00e012ca1755afba550a5270dce0a1054
[ "BSD-2-Clause" ]
13
2020-11-06T13:50:45.000Z
2022-01-25T07:17:37.000Z
utils/py27/Lib/test/test_glob.py
xahmol/8bit-Unity
b4f3bee00e012ca1755afba550a5270dce0a1054
[ "BSD-2-Clause" ]
8
2020-11-14T04:30:26.000Z
2021-01-16T17:55:19.000Z
import glob import os import shutil import sys import unittest from test.test_support import run_unittest, TESTFN def fsdecode(s): return unicode(s, sys.getfilesystemencoding()) class GlobTests(unittest.TestCase): def norm(self, *parts): return os.path.normpath(os.path.join(self.te...
39.148352
80
0.520982
import glob import os import shutil import sys import unittest from test.test_support import run_unittest, TESTFN def fsdecode(s): return unicode(s, sys.getfilesystemencoding()) class GlobTests(unittest.TestCase): def norm(self, *parts): return os.path.normpath(os.path.join(self.te...
true
true
1c470a2db8942a6dac55dd86e4e59735900d2028
17,980
py
Python
bamnostic/bai.py
pleongpt/bamnostic
c1d0b9035c9d3c3172fc276d26999884d6c4fa38
[ "BSD-3-Clause" ]
null
null
null
bamnostic/bai.py
pleongpt/bamnostic
c1d0b9035c9d3c3172fc276d26999884d6c4fa38
[ "BSD-3-Clause" ]
null
null
null
bamnostic/bai.py
pleongpt/bamnostic
c1d0b9035c9d3c3172fc276d26999884d6c4fa38
[ "BSD-3-Clause" ]
1
2019-11-09T06:03:16.000Z
2019-11-09T06:03:16.000Z
#!/user/bin/env python # -*- coding: utf-8 -*- """BAI file parser .. include:: <isonum.txt> Copyright |copy| 2018, Marcus D. Sherman This code is part of the bamnostic distribution and governed by its license. Please see the LICENSE file that should have been included as part of this package. The Binary Alignment ...
39.172113
113
0.643826
from __future__ import print_function from __future__ import absolute_import from __future__ import division import struct import os import sys import warnings from array import array from collections import namedtuple _PY_VERSION = sys.version_info if _PY_VERSION[0] == 2: from io import open else: from f...
true
true
1c470a49de9d387d8b037e3f4380dafd7305f1b0
97
py
Python
applications/gestiune/controllers/loguri.py
Vlad-Iliescu/gest
32fbd3a859316727cd8564029d51b8d3c94cc0a0
[ "BSD-3-Clause" ]
null
null
null
applications/gestiune/controllers/loguri.py
Vlad-Iliescu/gest
32fbd3a859316727cd8564029d51b8d3c94cc0a0
[ "BSD-3-Clause" ]
null
null
null
applications/gestiune/controllers/loguri.py
Vlad-Iliescu/gest
32fbd3a859316727cd8564029d51b8d3c94cc0a0
[ "BSD-3-Clause" ]
null
null
null
# coding: utf8 # try something like def index(): return dict(message="hello from loguri.py")
19.4
47
0.701031
def index(): return dict(message="hello from loguri.py")
true
true
1c470b3dfa53ba320b1d4c3bc685983b1ace1149
2,253
py
Python
tests/test_agent/test_http_api_config.py
guidow/pyfarm-agent
bb5d464f9f6549a3db3529a93e3d9f388b365586
[ "Apache-2.0" ]
null
null
null
tests/test_agent/test_http_api_config.py
guidow/pyfarm-agent
bb5d464f9f6549a3db3529a93e3d9f388b365586
[ "Apache-2.0" ]
null
null
null
tests/test_agent/test_http_api_config.py
guidow/pyfarm-agent
bb5d464f9f6549a3db3529a93e3d9f388b365586
[ "Apache-2.0" ]
null
null
null
# No shebang line, this module is meant to be imported # # Copyright 2014 Oliver Palmer # # 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 # # Unle...
33.132353
74
0.678207
from json import loads from datetime import datetime from uuid import UUID try: from httplib import OK except ImportError: from http.client import OK from twisted.web.server import NOT_DONE_YET from pyfarm.agent.config import config from pyfarm.agent.testutil import BaseAPITestCase from pyf...
true
true
1c470c59b3b5466b5590486c24d50559f9296408
4,658
py
Python
mpi/mpi4py/simple.py
timkphd/examples
04c162ec890a1c9ba83498b275fbdc81a4704062
[ "Unlicense" ]
5
2020-11-01T00:29:22.000Z
2022-01-24T19:09:47.000Z
mpi/mpi4py/simple.py
timkphd/examples
04c162ec890a1c9ba83498b275fbdc81a4704062
[ "Unlicense" ]
1
2022-02-09T01:59:47.000Z
2022-02-09T01:59:47.000Z
mpi/mpi4py/simple.py
timkphd/examples
04c162ec890a1c9ba83498b275fbdc81a4704062
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 from mpi4py import MPI import numpy global numnodes,myid,mpi_err global mpi_root import sys mpi_root=0 # This is a bag-of-tasks program. We define a manager task # that distributes work to workers. Actually, the workers # request input data. The manager sits in a loop calling # Iprobe waiting ...
30.847682
91
0.709747
from mpi4py import MPI import numpy global numnodes,myid,mpi_err global mpi_root import sys mpi_root=0 def worker(THE_COMM_WORLD,managerid): import mkview x=0 comm=MPI.COMM_WORLD send_msg = numpy.arange(1, dtype='i') recv_msg = numpy.zeros_like(send_msg) ic=0 while(True) : send_m...
true
true
1c470e24690527959feddd87aeb9fdc0e3b2b36e
152
py
Python
rtc_app/rtc/doctype/bus_location/test_bus_location.py
VishDroid-dev/rtc
0feb16165ed06b5ea6aeec181c36253fcc5ad5aa
[ "MIT" ]
null
null
null
rtc_app/rtc/doctype/bus_location/test_bus_location.py
VishDroid-dev/rtc
0feb16165ed06b5ea6aeec181c36253fcc5ad5aa
[ "MIT" ]
null
null
null
rtc_app/rtc/doctype/bus_location/test_bus_location.py
VishDroid-dev/rtc
0feb16165ed06b5ea6aeec181c36253fcc5ad5aa
[ "MIT" ]
1
2022-01-19T15:31:21.000Z
2022-01-19T15:31:21.000Z
# Copyright (c) 2021, Foo Fighters and Contributors # See license.txt # import frappe import unittest class TestBusLocation(unittest.TestCase): pass
16.888889
51
0.782895
import unittest class TestBusLocation(unittest.TestCase): pass
true
true
1c470e3760f76e19d9ac14656848fcf3703b18d2
6,396
py
Python
flash/image/embedding/model.py
dmarx/lightning-flash
4cda031c1f9c8d8754fd36b5720d2a5a7d866765
[ "Apache-2.0" ]
null
null
null
flash/image/embedding/model.py
dmarx/lightning-flash
4cda031c1f9c8d8754fd36b5720d2a5a7d866765
[ "Apache-2.0" ]
null
null
null
flash/image/embedding/model.py
dmarx/lightning-flash
4cda031c1f9c8d8754fd36b5720d2a5a7d866765
[ "Apache-2.0" ]
1
2022-02-28T15:59:39.000Z
2022-02-28T15:59:39.000Z
# Copyright The PyTorch Lightning team. # # 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 i...
40.738854
114
0.706848
import warnings from typing import Any, Dict, List, Optional from flash.core.adapter import AdapterTask from flash.core.data.io.input import DataKeys from flash.core.data.states import ( CollateFn, PerBatchTransform, PerBatchTransformOnDevice, PerSampleTransformOnDevice, PostTensorTran...
true
true
1c470f3b148dd13ad815f7979d810003cd90888e
1,031
py
Python
tests/datastructures/test_shuffle.py
TristenSeth/campy
9e726c342d682239e1c19e6f5645c0b2167d7fab
[ "MIT" ]
5
2018-12-03T19:18:50.000Z
2021-05-31T07:17:06.000Z
tests/datastructures/test_shuffle.py
TristenSeth/campy
9e726c342d682239e1c19e6f5645c0b2167d7fab
[ "MIT" ]
1
2017-06-07T04:33:46.000Z
2017-06-07T04:33:46.000Z
tests/datastructures/test_shuffle.py
TristenSeth/campy
9e726c342d682239e1c19e6f5645c0b2167d7fab
[ "MIT" ]
1
2017-06-06T07:29:07.000Z
2017-06-06T07:29:07.000Z
"""Tests for the :mod:`campy.datastructures.shuffle` module.""" # These reference shuffled values are being generated by Python running # 3.7.2 (default, Dec 27 2018, 07:35:06) \n[Clang 10.0.0 (clang-1000.11.45.5)] # on macOS 10.14.2 from campy.datastructures.shuffle import shuffle import random def test_shuffle_li...
22.413043
84
0.681862
from campy.datastructures.shuffle import shuffle import random def test_shuffle_list(): random.seed(41) assert shuffle([3, 1, 4, 1, 5, 9]) == [5, 9, 3, 1, 4, 1] def test_shuffle_tuple(): random.seed(41) assert shuffle((3, 1, 4, 1, 5, 9)) == (5, 9, 3, 1, 4, 1) def test_shuffle_string(): ra...
true
true
1c470fa24ed63d9d3230ed00e5a2d1c9f01fe440
140
py
Python
demos/examples/python_functions.py
pyxll/pylondon-2019
c00c5ba52807c8d47ad84ffd4c64e1937fe69e98
[ "MIT" ]
8
2019-04-28T08:48:30.000Z
2020-06-30T09:32:47.000Z
demos/examples/python_functions.py
pyxll/pylondon-2019
c00c5ba52807c8d47ad84ffd4c64e1937fe69e98
[ "MIT" ]
null
null
null
demos/examples/python_functions.py
pyxll/pylondon-2019
c00c5ba52807c8d47ad84ffd4c64e1937fe69e98
[ "MIT" ]
1
2019-05-30T08:26:52.000Z
2019-05-30T08:26:52.000Z
""" Example code showing how to declare a Python function. """ from pyxll import xl_func @xl_func def simple_test(a, b): return a + b
14
54
0.7
from pyxll import xl_func @xl_func def simple_test(a, b): return a + b
true
true
1c470fc85b3e9b810c05e6e2be1bdbafde9adc7a
7,050
py
Python
qiskit/pulse/cmd_def.py
chowington/qiskit-terra
a782c64c736fedd6a541bb45dbf89737a52b7c39
[ "Apache-2.0" ]
null
null
null
qiskit/pulse/cmd_def.py
chowington/qiskit-terra
a782c64c736fedd6a541bb45dbf89737a52b7c39
[ "Apache-2.0" ]
null
null
null
qiskit/pulse/cmd_def.py
chowington/qiskit-terra
a782c64c736fedd6a541bb45dbf89737a52b7c39
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 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...
34.558824
93
0.623546
from typing import List, Tuple, Iterable, Union, Dict from qiskit.qobj import PulseQobjInstruction from qiskit.qobj.converters import QobjToInstructionConverter from .commands import SamplePulse from .exceptions import PulseError from .schedule import Schedule, ParameterizedSchedule def _to_qubit_t...
true
true
1c4710485744a43033c4782f403ded172a09f64c
5,256
py
Python
pysnmp/EPON-EOC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/EPON-EOC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/EPON-EOC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module EPON-EOC-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/EPON-EOC-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:50:46 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019,...
90.62069
867
0.737823
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint = mibBuild...
true
true
1c471079d062c1c61307f4ded527f7918ba17b40
2,309
py
Python
tools/pw_ener_vol.py
minyez/mykit
911413120c081be2cfcaef06d62dc40b2abd2747
[ "MIT" ]
4
2019-01-02T09:17:54.000Z
2019-12-26T07:15:59.000Z
tools/pw_ener_vol.py
minyez/mykit
911413120c081be2cfcaef06d62dc40b2abd2747
[ "MIT" ]
6
2019-03-06T03:16:12.000Z
2019-03-14T14:36:01.000Z
tools/pw_ener_vol.py
minyez/mykit
911413120c081be2cfcaef06d62dc40b2abd2747
[ "MIT" ]
null
null
null
#!/usr/bin/env python from argparse import ArgumentParser from pw_anal_utils import w2k_get_casename import subprocess as sp import os,sys description = ''' Read the observable-volume data from an optimize.job execution. SCF data are supposed to save in a directory named as claimed in the optimize.job script, i.e. s...
29.227848
135
0.620615
from argparse import ArgumentParser from pw_anal_utils import w2k_get_casename import subprocess as sp import os,sys description = ''' Read the observable-volume data from an optimize.job execution. SCF data are supposed to save in a directory named as claimed in the optimize.job script, i.e. save_lapw. ''' obs_li...
false
true
1c4710f85890e97c5496e0643181003b678c7b0b
1,085
py
Python
longitude/samples/config.py
Rovaro/Longitude
b17b40a7b19edb10c62238ea20d136a3a8147f13
[ "MIT" ]
1
2020-11-06T11:12:42.000Z
2020-11-06T11:12:42.000Z
longitude/samples/config.py
Rovaro/Longitude
b17b40a7b19edb10c62238ea20d136a3a8147f13
[ "MIT" ]
22
2017-11-20T21:18:55.000Z
2021-07-06T10:22:14.000Z
longitude/samples/config.py
Rovaro/Longitude
b17b40a7b19edb10c62238ea20d136a3a8147f13
[ "MIT" ]
4
2018-03-22T08:38:03.000Z
2020-06-14T04:29:15.000Z
"""It's a good practice to put all config loading in the same file. The `environs` library does a good job getting environment variables, and it's quite straight forward: @see https://pypi.org/project/environs/ However, if you ever need to change the environment vars by let's say, a .conf file, or a database-sto...
29.324324
75
0.677419
from environs import Env env = Env() config = { 'carto_user': env('CARTO_USER'), 'carto_api_key': env('CARTO_API_KEY'), 'pg_user': env('PG_USER'), 'pg_password': env('PG_PASSWORD'), 'debug': env.bool('DEBUG', False), 'oauth': { 'client_id': env('OAUTH_CLIENT_ID'), 'client_secr...
true
true
1c4711edcf7819cbbbc6c78acdca81a52af4983c
1,393
py
Python
common/xrd-ui-tests-python/tests/xroad_cs_user_logging/XroadCsUserLogging.py
nordic-institute/X-Road-tests
e030661a0ad8ceab74dd8122b751e88025a3474a
[ "MIT" ]
1
2019-02-09T00:16:54.000Z
2019-02-09T00:16:54.000Z
common/xrd-ui-tests-python/tests/xroad_cs_user_logging/XroadCsUserLogging.py
nordic-institute/X-Road-tests
e030661a0ad8ceab74dd8122b751e88025a3474a
[ "MIT" ]
1
2018-06-06T08:33:32.000Z
2018-06-06T08:33:32.000Z
common/xrd-ui-tests-python/tests/xroad_cs_user_logging/XroadCsUserLogging.py
nordic-institute/X-Road-tests
e030661a0ad8ceab74dd8122b751e88025a3474a
[ "MIT" ]
3
2018-07-09T08:51:00.000Z
2020-07-23T18:40:24.000Z
import unittest from helpers import ssh_client from main.maincontroller import MainController from tests.xroad_cs_user_logging.cs_user_logging import check_logout, check_login class XroadCsUserLogging(unittest.TestCase): """ CS_01 Log In to the Graphical User Interface CS_02 Log Out of the Graphical User...
34.825
81
0.674803
import unittest from helpers import ssh_client from main.maincontroller import MainController from tests.xroad_cs_user_logging.cs_user_logging import check_logout, check_login class XroadCsUserLogging(unittest.TestCase): def __init__(self, methodName='test_cs_user_logging'): unittest.TestCase.__init__(se...
true
true
1c47124f0e6a2497f3ddc075da4e798d843d5388
1,143
py
Python
src/wrapper/python/wolfssl/src/wolfssl/_memory.py
djp952/prebuilt-wolfssl
b3df82d34af6c71eef47bbd22931b049e13beac4
[ "AML" ]
1
2022-03-17T13:34:08.000Z
2022-03-17T13:34:08.000Z
src/wrapper/python/wolfssl/src/wolfssl/_memory.py
djp952/prebuilt-wolfssl
b3df82d34af6c71eef47bbd22931b049e13beac4
[ "AML" ]
null
null
null
src/wrapper/python/wolfssl/src/wolfssl/_memory.py
djp952/prebuilt-wolfssl
b3df82d34af6c71eef47bbd22931b049e13beac4
[ "AML" ]
null
null
null
# -*- coding: utf-8 -*- # # _memory.py # # Copyright (C) 2006-2021 wolfSSL Inc. # # This file is part of wolfSSL. # # wolfSSL is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the L...
30.891892
80
0.725284
try: from wolfssl._ffi import ffi as _ffi from wolfssl._ffi import lib as _lib except ImportError: pass _DYNAMIC_TYPE_METHOD = 11 def _native_free(native_object, dynamic_type): _lib.wolfSSL_Free(native_object, _ffi.NULL, dynamic_type)
true
true
1c47126541db2ea65702874849c90340f8a0942e
34,556
py
Python
scripts/competitiond.py
Levilian/codalab-worksheets
f01c72d1e78ef728859b57603eec59e3008a7205
[ "Apache-2.0" ]
null
null
null
scripts/competitiond.py
Levilian/codalab-worksheets
f01c72d1e78ef728859b57603eec59e3008a7205
[ "Apache-2.0" ]
null
null
null
scripts/competitiond.py
Levilian/codalab-worksheets
f01c72d1e78ef728859b57603eec59e3008a7205
[ "Apache-2.0" ]
null
null
null
#!./venv/bin/python """ Competition leaderboard evaluation daemon. 1. Find bundles tagged with {submission_tag} and filter them. 2. Run the {predict} command with the submitted bundle to generate predictions on the test set. 3. Tag the resulting test run bundle with {predict.tag}, untagging a...
40.943128
108
0.60059
import argparse import getpass import json import logging import random import re import signal import sys import time import traceback from collections import defaultdict, namedtuple from marshmallow import Schema, fields, ValidationError, missing import yaml sys.path.append('.') from codalab.bundles import RunBund...
true
true