hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f71b39d53d82554ce904392600c340709e0534bb
2,018
py
Python
pandas/tests/indexing/multiindex/test_chaining_and_caching.py
oricou/pandas
9405e58d9268041f5416711c051cf5429a19bf49
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
2
2021-05-07T04:58:36.000Z
2021-05-07T04:58:59.000Z
pandas/tests/indexing/multiindex/test_chaining_and_caching.py
oricou/pandas
9405e58d9268041f5416711c051cf5429a19bf49
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/indexing/multiindex/test_chaining_and_caching.py
oricou/pandas
9405e58d9268041f5416711c051cf5429a19bf49
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
2
2021-06-16T07:19:12.000Z
2021-12-16T10:24:44.000Z
import numpy as np import pytest from pandas import ( DataFrame, MultiIndex, Series, ) import pandas._testing as tm import pandas.core.common as com def test_detect_chained_assignment(): # Inplace ops, originally from: # https://stackoverflow.com/questions/20508968/series-fillna-in-a-multiindex-d...
28.422535
118
0.606541
import numpy as np import pytest from pandas import ( DataFrame, MultiIndex, Series, ) import pandas._testing as tm import pandas.core.common as com def test_detect_chained_assignment(): a = [12, 23] b = [123, None] c = [1234, 2345] d = [12345, 23456] tuples = [("eyes", "lef...
true
true
f71b3ac0d45395a6a7e2ff0955877634c8665bca
3,872
py
Python
gym-kinova-gripper/plotting_code/other_plots.py
OSUrobotics/KinovaGrasping
f22af60d3683fdc4ffecf49ccff179fbc6750748
[ "Linux-OpenIB" ]
16
2020-05-16T00:40:31.000Z
2022-02-22T11:59:03.000Z
gym-kinova-gripper/plotting_code/other_plots.py
OSUrobotics/KinovaGrasping
f22af60d3683fdc4ffecf49ccff179fbc6750748
[ "Linux-OpenIB" ]
9
2020-08-10T08:33:55.000Z
2021-08-17T02:10:50.000Z
gym-kinova-gripper/plotting_code/other_plots.py
OSUrobotics/KinovaGrasping
f22af60d3683fdc4ffecf49ccff179fbc6750748
[ "Linux-OpenIB" ]
7
2020-07-27T09:45:05.000Z
2021-06-21T21:42:50.000Z
import matplotlib.pyplot as plt import numpy as np ## Extra plotting functions that can be called for quick analysis def plot_timestep_distribution(success_timesteps=None, fail_timesteps=None, all_timesteps=None, expert_saving_dir=None): """ Plot the distribution of time steps over successful and failed episodes ...
46.650602
143
0.698089
import matplotlib.pyplot as plt import numpy as np mesteps=None, all_timesteps=None, expert_saving_dir=None): if all_timesteps is None: success_timesteps = np.load(expert_saving_dir + "/success_timesteps.npy") fail_timesteps = np.load(expert_saving_dir + "/fail_timesteps.npy") all_timesteps...
true
true
f71b3b475439ea9ed08d69fbc7b9ab409bb33d5a
2,223
py
Python
src/utils.py
wenyuC94/LogConcComp
b17d6ba6a102ba83a8415774b0e6da27a362bd5d
[ "MIT" ]
null
null
null
src/utils.py
wenyuC94/LogConcComp
b17d6ba6a102ba83a8415774b0e6da27a362bd5d
[ "MIT" ]
null
null
null
src/utils.py
wenyuC94/LogConcComp
b17d6ba6a102ba83a8415774b0e6da27a362bd5d
[ "MIT" ]
null
null
null
import os import numpy as np import numba as nb def create_folder(storage_path): if not os.path.isdir(storage_path): os.makedirs(storage_path,exist_ok=True) lsdir = os.listdir(storage_path) for item in ["info","hist","soln","figs"]: if item not in lsdir: os.makedirs(storage_pat...
28.5
78
0.559154
import os import numpy as np import numba as nb def create_folder(storage_path): if not os.path.isdir(storage_path): os.makedirs(storage_path,exist_ok=True) lsdir = os.listdir(storage_path) for item in ["info","hist","soln","figs"]: if item not in lsdir: os.makedirs(storage_pat...
true
true
f71b3b5ffd9a0d39ef3e2a5f01e2965d34e8b74e
1,448
py
Python
make_string_alphabetic.py
Maffey/FunPythonScripts
7682ab1f8dc7924eb4b3fb19d58ebbabe3901a22
[ "Apache-2.0" ]
1
2022-01-29T21:07:38.000Z
2022-01-29T21:07:38.000Z
make_string_alphabetic.py
Maffey/fun-python-scripts
7682ab1f8dc7924eb4b3fb19d58ebbabe3901a22
[ "Apache-2.0" ]
2
2019-05-15T13:48:58.000Z
2019-05-29T18:33:34.000Z
make_string_alphabetic.py
Maffey/FunPythonScripts
7682ab1f8dc7924eb4b3fb19d58ebbabe3901a22
[ "Apache-2.0" ]
1
2020-08-04T11:09:17.000Z
2020-08-04T11:09:17.000Z
#! python # Removes letter from word to make characters go alphabetically. # It doesn't work all the time, but is efficient. import unittest class TestRemoveLettersAlphabet(unittest.TestCase): def test_object1(self): self.assertEqual(letters_to_remove('mateusz'), 3) def test_object2(self): s...
27.320755
64
0.685083
import unittest class TestRemoveLettersAlphabet(unittest.TestCase): def test_object1(self): self.assertEqual(letters_to_remove('mateusz'), 3) def test_object2(self): self.assertEqual(letters_to_remove('cba'), 2) def test_object3(self): self.assertEqual(letters_to_remove('dirt...
true
true
f71b3ba93636d762ed00bb7c81089b7edadd08c2
1,407
py
Python
verifiers/statusCode.py
CalConnect/caldavtester
a17683554df8a9b80fceab91085de99945fefe48
[ "Apache-2.0" ]
2
2019-04-23T04:06:08.000Z
2020-08-26T17:30:45.000Z
verifiers/statusCode.py
CalConnect/caldavtester
a17683554df8a9b80fceab91085de99945fefe48
[ "Apache-2.0" ]
3
2017-09-28T13:23:39.000Z
2017-10-03T15:59:36.000Z
verifiers/statusCode.py
CalConnect/caldavtester
a17683554df8a9b80fceab91085de99945fefe48
[ "Apache-2.0" ]
2
2017-02-08T04:47:31.000Z
2021-08-05T20:09:10.000Z
## # Copyright (c) 2006-2016 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
34.317073
120
0.628998
class Verifier(object): def verify(self, manager, uri, response, respdata, args): teststatus = args.get("status", ["2xx"]) for test in teststatus: if test[1:3] == "xx": test = int(test[0]) else: test = int(test) ...
true
true
f71b3d10ad093122f20e0962b3f6645057d8279b
613
py
Python
classifier_stgcn_real_only/utils/temp.py
1suancaiyu/STEP
54195112990feaee137f5137775c736d07c2d26f
[ "MIT" ]
32
2020-02-21T16:12:13.000Z
2022-03-11T09:00:47.000Z
classifier_stgcn_real_only/utils/temp.py
1suancaiyu/STEP
54195112990feaee137f5137775c736d07c2d26f
[ "MIT" ]
12
2020-06-23T08:11:25.000Z
2022-03-26T11:34:42.000Z
classifier_stgcn_real_only/utils/temp.py
1suancaiyu/STEP
54195112990feaee137f5137775c736d07c2d26f
[ "MIT" ]
13
2020-04-01T16:51:50.000Z
2022-03-03T10:15:10.000Z
import h5py import os import numpy as np base_path = os.path.dirname(os.path.realpath(__file__)) feature_file = '/media/uttaran/FCE1-7BF3/Gamma/Gait/classifier_stgcn/model_classifier_stgcn/featuresCombineddeep_features.txt' f = np.loadtxt(feature_file) fCombined = h5py.File('/media/uttaran/FCE1-7BF3/Gamma/Gait/data/fe...
38.3125
126
0.76509
import h5py import os import numpy as np base_path = os.path.dirname(os.path.realpath(__file__)) feature_file = '/media/uttaran/FCE1-7BF3/Gamma/Gait/classifier_stgcn/model_classifier_stgcn/featuresCombineddeep_features.txt' f = np.loadtxt(feature_file) fCombined = h5py.File('/media/uttaran/FCE1-7BF3/Gamma/Gait/data/fe...
true
true
f71b3da82b76452958e6ff8037b2e5c369373cfd
2,253
py
Python
python/hostconfig/machines/alexf.py
stu-l/Chaste
8efa8b440660553af66804067639f237c855f557
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
python/hostconfig/machines/alexf.py
stu-l/Chaste
8efa8b440660553af66804067639f237c855f557
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
python/hostconfig/machines/alexf.py
stu-l/Chaste
8efa8b440660553af66804067639f237c855f557
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# Configuration for Finarfin """Copyright (c) 2005-2022, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and u...
44.176471
79
0.782956
petsc_2_2_path = None petsc_2_3_path = '/home/alex/petsc-2.3.2-p4/' petsc_build_name = 'linux-gnu' petsc_build_name_optimized = 'linux-gnu-opt' dealii_path = None metis_path = None intel_path = None other_includepaths = [] other_libpaths = ['/home/alex/hdf5/lib'] blas_lapack = ['lapack', 'blas'] other_libraries =...
true
true
f71b400d9193c88784e05204664ee4a910ee628d
1,831
py
Python
awss3upload-capi/s3upload.py
krlex/aws-python-examples
1310e82c748e3d0898809bbe909870fe4c7cb37b
[ "MIT" ]
21
2021-02-13T04:11:01.000Z
2022-03-28T09:13:53.000Z
awss3upload-capi/s3upload.py
krlex/aws-python-examples
1310e82c748e3d0898809bbe909870fe4c7cb37b
[ "MIT" ]
null
null
null
awss3upload-capi/s3upload.py
krlex/aws-python-examples
1310e82c748e3d0898809bbe909870fe4c7cb37b
[ "MIT" ]
17
2019-07-26T06:02:27.000Z
2022-03-23T00:06:12.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # s3upload.py # It is an example that handles S3 buckets on AWS. # It uses Client API (low-level) of Boto3. # Upload a local file to a S3 bucket. # You must provide 1 parameter: # BUCKET_NAME = Name of the bucket # OBJECT_NAME = Object file name in the bucket # LOCAL_FI...
28.609375
69
0.621518
import sys import os import boto3 import botocore def main(): args = sys.argv[1:] if len(args) < 3: print('Not enough parameters.\n'\ 'Proper Usage is: python s3upload.py '\ '<BUCKET_NAME> <OBJECT_NAME> <LOCAL_FILE_NAME>') sys.exit(1) bucke...
true
true
f71b4058fcf0bfe5202371ab731ffe619ab85852
827
py
Python
src/lambda/face-detector-function/main/image_ops/resizer.py
gai6948/video-analytics-for-ppe-compliance
bb41ac010f5917bd7e85adfed689489f24830617
[ "Apache-2.0" ]
null
null
null
src/lambda/face-detector-function/main/image_ops/resizer.py
gai6948/video-analytics-for-ppe-compliance
bb41ac010f5917bd7e85adfed689489f24830617
[ "Apache-2.0" ]
null
null
null
src/lambda/face-detector-function/main/image_ops/resizer.py
gai6948/video-analytics-for-ppe-compliance
bb41ac010f5917bd7e85adfed689489f24830617
[ "Apache-2.0" ]
null
null
null
import numpy as np import timeit import cv2 from PIL import Image from aws_lambda_powertools.logging import Logger from aws_lambda_powertools.tracing import Tracer logger = Logger(service='face-detector', child=True) tracer = Tracer(service='face-detector') @tracer.capture_method(capture_response=False) def resize_...
33.08
101
0.759371
import numpy as np import timeit import cv2 from PIL import Image from aws_lambda_powertools.logging import Logger from aws_lambda_powertools.tracing import Tracer logger = Logger(service='face-detector', child=True) tracer = Tracer(service='face-detector') @tracer.capture_method(capture_response=False) def resize_...
true
true
f71b4158a84075698aa6f4b4d391c6b10747b9c5
2,190
py
Python
config/settings/local.py
suyash143/Base_todo
3284f24f8b5c611088af6189a2f264a280fbbbd6
[ "MIT" ]
1
2022-03-16T10:22:34.000Z
2022-03-16T10:22:34.000Z
config/settings/local.py
suyash143/Base_todo
3284f24f8b5c611088af6189a2f264a280fbbbd6
[ "MIT" ]
1
2022-03-30T21:29:43.000Z
2022-03-30T21:29:43.000Z
config/settings/local.py
suyash143/Base_todo
3284f24f8b5c611088af6189a2f264a280fbbbd6
[ "MIT" ]
null
null
null
from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = True # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env( "DJANGO_SECRET_KEY...
39.818182
97
0.583105
from .base import * from .base import env = True = env( "DJANGO_SECRET_KEY", default="00nep4XZom6FM9dVyJO6Y7kqt5JV8TN5GTNmcDnDhH0jTq3cDYEGLsyOsUYnOAsM", ) = ["localhost", "0.0.0.0", "127.0.0.1"] = { "default": { "BACKEND": "django.core.cache.backends.locmem.LocMemCache", "LOCATIO...
true
true
f71b41b1f6968010d18f796949243c59c3f77265
2,847
py
Python
wagtail/hooks.py
stevedya/wagtail
52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c
[ "BSD-3-Clause" ]
1
2022-02-09T05:25:30.000Z
2022-02-09T05:25:30.000Z
wagtail/hooks.py
stevedya/wagtail
52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c
[ "BSD-3-Clause" ]
null
null
null
wagtail/hooks.py
stevedya/wagtail
52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c
[ "BSD-3-Clause" ]
null
null
null
from contextlib import ContextDecorator from operator import itemgetter from wagtail.utils.apps import get_app_submodules _hooks = {} def register(hook_name, fn=None, order=0): """ Register hook for ``hook_name``. Can be used as a decorator:: @register('hook_name') def my_hook(...): ...
24.543103
82
0.60555
from contextlib import ContextDecorator from operator import itemgetter from wagtail.utils.apps import get_app_submodules _hooks = {} def register(hook_name, fn=None, order=0): if fn is None: def decorator(fn): register(hook_name, fn, order=order) return fn return...
true
true
f71b41c7e4894d5f578583e52382342d197a0a53
373
py
Python
tests/schema/mutation/snapshots/snap_test_maps_delete.py
TaiSakuma/acondbs
990ab44ce4081cc0e04148a8375f7ce7081c2dee
[ "MIT" ]
null
null
null
tests/schema/mutation/snapshots/snap_test_maps_delete.py
TaiSakuma/acondbs
990ab44ce4081cc0e04148a8375f7ce7081c2dee
[ "MIT" ]
null
null
null
tests/schema/mutation/snapshots/snap_test_maps_delete.py
TaiSakuma/acondbs
990ab44ce4081cc0e04148a8375f7ce7081c2dee
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # snapshottest: v1 - https://goo.gl/zC4yUc from __future__ import unicode_literals from snapshottest import Snapshot snapshots = Snapshot() snapshots['test_schema[deleteMap] 1'] = { 'data': { 'deleteMap': { 'ok': True } } } snapshots['test_schema[deleteMa...
16.217391
42
0.571046
from __future__ import unicode_literals from snapshottest import Snapshot snapshots = Snapshot() snapshots['test_schema[deleteMap] 1'] = { 'data': { 'deleteMap': { 'ok': True } } } snapshots['test_schema[deleteMap] 2'] = { 'data': { 'map': None } }
true
true
f71b4212c0a7a5b644b48292c8eaeacc6cbdda01
1,035
py
Python
src/products/mixins.py
bopopescu/django-estore
c092ffa965b8ef68e71d27d34a17fde1beacd90e
[ "MIT" ]
null
null
null
src/products/mixins.py
bopopescu/django-estore
c092ffa965b8ef68e71d27d34a17fde1beacd90e
[ "MIT" ]
null
null
null
src/products/mixins.py
bopopescu/django-estore
c092ffa965b8ef68e71d27d34a17fde1beacd90e
[ "MIT" ]
2
2019-04-29T14:16:10.000Z
2020-07-23T12:04:17.000Z
from django.contrib.admin.views.decorators import staff_member_required from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.http import Http404 class StaffRequiredMixin(object): @classmethod def as_view(self, *args, **kwargs): view ...
36.964286
85
0.713043
from django.contrib.admin.views.decorators import staff_member_required from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.http import Http404 class StaffRequiredMixin(object): @classmethod def as_view(self, *args, **kwargs): view ...
true
true
f71b4286b66f22ca7786f177364f1945a65ac3fc
3,123
py
Python
app/app/settings.py
M0narc/recipe-api
3b6c204ca76d98310d26fcbeaa4537646a93e023
[ "MIT" ]
1
2022-03-11T20:38:42.000Z
2022-03-11T20:38:42.000Z
app/app/settings.py
M0narc/recipe-api
3b6c204ca76d98310d26fcbeaa4537646a93e023
[ "MIT" ]
null
null
null
app/app/settings.py
M0narc/recipe-api
3b6c204ca76d98310d26fcbeaa4537646a93e023
[ "MIT" ]
null
null
null
""" Django settings for app project. Generated by 'django-admin startproject' using Django 2.1.15. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os # Bu...
25.185484
91
0.693244
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'p2-y-!@#t0dny#e+nx-txbsphwp(yt(9t939=o_*sf%&3z2_p%' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
f71b43813e699367c1eaeee665cc3b3fd3d5c5d0
4,573
py
Python
hgext/fsmonitor/state.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
hgext/fsmonitor/state.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
hgext/fsmonitor/state.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# state.py - fsmonitor persistent state # # Copyright 2013-2016 Facebook, Inc. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import import errno import os import socket import struct from mercur...
33.625
80
0.557839
from __future__ import absolute_import import errno import os import socket import struct from mercurial.i18n import _ from mercurial import ( pathutil, util, ) _version = 4 _versionformat = ">I" class state(object): def __init__(self, repo): self._vfs = repo.vfs self._ui = repo.u...
true
true
f71b440f7ca22eaf9b320a66190d76f7e190c156
39,690
py
Python
galaxy_milkyway_files/tools/wohl-proteomics/ssl_converter/bak_ssl_converter.py
wohllab/milkyway_proteomics
622969f7f4a5955ae2bff299ae7b08572d422814
[ "MIT" ]
null
null
null
galaxy_milkyway_files/tools/wohl-proteomics/ssl_converter/bak_ssl_converter.py
wohllab/milkyway_proteomics
622969f7f4a5955ae2bff299ae7b08572d422814
[ "MIT" ]
null
null
null
galaxy_milkyway_files/tools/wohl-proteomics/ssl_converter/bak_ssl_converter.py
wohllab/milkyway_proteomics
622969f7f4a5955ae2bff299ae7b08572d422814
[ "MIT" ]
null
null
null
import os, sys, re import shutil import optparse import shutil import pandas import numpy import subprocess import fnmatch from joblib import Parallel, delayed import multiprocessing from Bio import SeqIO import glob ##################################### #This is the script to produce SSL file outputs for skyline spec...
57.772926
265
0.657798
import os, sys, re import shutil import optparse import shutil import pandas import numpy import subprocess import fnmatch from joblib import Parallel, delayed import multiprocessing from Bio import SeqIO import glob pend(each_tuple[1]) new_prot_ids.append(each_tuple[0]) new_indicies.ap...
false
true
f71b45087b55f236efe7a8b8b2c2a962a1bf0ef8
25,938
py
Python
Src/StdLib/Lib/modulefinder.py
cwensley/ironpython2
f854444e1e08afc8850cb7c1a739a7dd2d10d32a
[ "Apache-2.0" ]
1,078
2016-07-19T02:48:30.000Z
2022-03-30T21:22:34.000Z
Src/StdLib/Lib/modulefinder.py
cwensley/ironpython2
f854444e1e08afc8850cb7c1a739a7dd2d10d32a
[ "Apache-2.0" ]
576
2017-05-21T12:36:48.000Z
2022-03-30T13:47:03.000Z
Src/StdLib/Lib/modulefinder.py
cwensley/ironpython2
f854444e1e08afc8850cb7c1a739a7dd2d10d32a
[ "Apache-2.0" ]
269
2017-05-21T04:44:47.000Z
2022-03-31T16:18:13.000Z
"""Find modules used by a script, using introspection.""" from __future__ import generators import dis import imp import marshal import os import sys import types import struct if hasattr(sys.__stdout__, "newlines"): READ_MODE = "U" # universal line endings else: # Python < 2.3 compatibility, no longer stric...
36.175732
110
0.523441
"""Find modules used by a script, using introspection.""" from __future__ import generators import dis import imp import marshal import os import sys import types import struct if hasattr(sys.__stdout__, "newlines"): READ_MODE = "U" else: READ_MODE = "r" LOAD_CONST = dis.opmap['LOAD_CONST'] IMPORT_NAM...
false
true
f71b45acabf22bbb1840898ea73829472d8e7060
731
py
Python
tests/test_python3_dbb.py
bopopescu/NovalIDE
590c2adb69d54fa4a6c9dad5459198be057b1329
[ "MulanPSL-1.0" ]
null
null
null
tests/test_python3_dbb.py
bopopescu/NovalIDE
590c2adb69d54fa4a6c9dad5459198be057b1329
[ "MulanPSL-1.0" ]
null
null
null
tests/test_python3_dbb.py
bopopescu/NovalIDE
590c2adb69d54fa4a6c9dad5459198be057b1329
[ "MulanPSL-1.0" ]
null
null
null
import inspect class _D: def _m(self): pass class _C: def _m(self): pass _x = _C() _x2 = _D() a=121111 r = input('hahah') print(r) raise AttributeError('Provider test already registered') print (type(_C),_x.__class__,dir(_x),"------------") import types ###print (dir(types)) print (type(inspect)) ...
17.404762
60
0.642955
import inspect class _D: def _m(self): pass class _C: def _m(self): pass _x = _C() _x2 = _D() a=121111 r = input('hahah') print(r) raise AttributeError('Provider test already registered') print (type(_C),_x.__class__,dir(_x),"------------") import types lass(_C)) print (inspect.ismodule(_C)) print...
true
true
f71b45baa1e78f59775296f091528acf3ccf2008
718
py
Python
meus_projetos/projetos_python/lista_de_tarefas/minhas_funcoes.py
SabinoEduardo/Python
f46e47f166150afdf0f4c4358b5848d52667a764
[ "MIT" ]
null
null
null
meus_projetos/projetos_python/lista_de_tarefas/minhas_funcoes.py
SabinoEduardo/Python
f46e47f166150afdf0f4c4358b5848d52667a764
[ "MIT" ]
null
null
null
meus_projetos/projetos_python/lista_de_tarefas/minhas_funcoes.py
SabinoEduardo/Python
f46e47f166150afdf0f4c4358b5848d52667a764
[ "MIT" ]
null
null
null
def adicionar_tarefa(lista_tarefas, tarefas): lista_tarefas.append(tarefas) def deletar_tarefa(lista_tarefas, tarefas_deletadas): """ Esta função serve para deletar a ultima tarefa da lista e guarda esta tarefa em outra lista. """ if not lista_tarefas: print("Nada a deletar") r...
27.615385
100
0.682451
def adicionar_tarefa(lista_tarefas, tarefas): lista_tarefas.append(tarefas) def deletar_tarefa(lista_tarefas, tarefas_deletadas): if not lista_tarefas: print("Nada a deletar") return tarefas_deletadas.append(lista_tarefas[-1]) lista_tarefas.pop() def repor_tarefa(lista_tarefas, taref...
true
true
f71b47bfd1af85c0318ff27db55a1a089a9d0ee9
4,549
py
Python
pyuvm/s09_phasing.py
ktbarrett/pyuvm
725e6e4b8088aa085a5ce16861b46db49ce46672
[ "Apache-2.0" ]
4
2021-11-07T13:22:27.000Z
2022-02-17T08:51:24.000Z
pyuvm/s09_phasing.py
ktbarrett/pyuvm
725e6e4b8088aa085a5ce16861b46db49ce46672
[ "Apache-2.0" ]
null
null
null
pyuvm/s09_phasing.py
ktbarrett/pyuvm
725e6e4b8088aa085a5ce16861b46db49ce46672
[ "Apache-2.0" ]
null
null
null
from pyuvm.s05_base_classes import uvm_object import pyuvm.error_classes as error_classes import cocotb # 9.1 # # This is a dramatically simplified version of UVM phasing. We don't have # to deal with simulation time and we are not going to deal with a generalized # phasing system. # # So this system simply traverses ...
27.737805
78
0.667619
from pyuvm.s05_base_classes import uvm_object import pyuvm.error_classes as error_classes import cocotb # to deal with simulation time and we are not going to deal with a generalized # phasing system. # # So this system simply traverses the common phases, calling the appropriate # method in each component. # # Much...
true
true
f71b486fd1687af447da51c84625b2c67f3d5401
3,199
py
Python
homeassistant/components/harmony/subscriber.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
3
2020-11-27T06:26:27.000Z
2020-12-09T14:55:16.000Z
homeassistant/components/harmony/subscriber.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
277
2021-10-04T06:39:33.000Z
2021-12-28T22:04:17.000Z
homeassistant/components/harmony/subscriber.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
3
2022-01-02T18:49:54.000Z
2022-01-25T02:03:54.000Z
"""Mixin class for handling harmony callback subscriptions.""" import asyncio import logging # pylint: disable-next=deprecated-typing-alias # Issue with Python 3.9.0 and 3.9.1 with collections.abc.Callable # https://bugs.python.org/issue42965 from typing import Any, Callable, NamedTuple, Optional from homeassistant....
32.979381
79
0.689278
import asyncio import logging from typing import Any, Callable, NamedTuple, Optional from homeassistant.core import callback _LOGGER = logging.getLogger(__name__) NoParamCallback = Optional[Callable[[object], Any]] ActivityCallback = Optional[Callable[[object, tuple], Any]] class HarmonyCallback(NamedTuple): ...
true
true
f71b492ed7fe05c2dd8f787b6d743c15e42b6651
23,428
py
Python
test/test_framework/util.py
vpubchain/Phore
7819f046e629ccb5a00fa4f89a7399a7732b4113
[ "MIT" ]
null
null
null
test/test_framework/util.py
vpubchain/Phore
7819f046e629ccb5a00fa4f89a7399a7732b4113
[ "MIT" ]
null
null
null
test/test_framework/util.py
vpubchain/Phore
7819f046e629ccb5a00fa4f89a7399a7732b4113
[ "MIT" ]
1
2019-08-10T08:20:56.000Z
2019-08-10T08:20:56.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Helpful routines for regression testing # import os import sys from binascii import hexlify, unhex...
35.713415
201
0.651742
import os import sys from binascii import hexlify, unhexlify from base64 import b64encode from decimal import Decimal, ROUND_DOWN import json import http.client import random import shutil import subprocess import time import re import errno from . import coverage from .authproxy import AuthServiceProxy, JS...
true
true
f71b49b3ed0e3ba6b9a8f90ca5e35100450fb249
13,385
py
Python
skimage/segmentation/tests/test_random_walker.py
thewtex/scikit-image
22bb6b94698b8889cbdf26b25d9e4fdb8b968d97
[ "BSD-3-Clause" ]
1
2019-01-12T13:17:32.000Z
2019-01-12T13:17:32.000Z
skimage/segmentation/tests/test_random_walker.py
thewtex/scikit-image
22bb6b94698b8889cbdf26b25d9e4fdb8b968d97
[ "BSD-3-Clause" ]
null
null
null
skimage/segmentation/tests/test_random_walker.py
thewtex/scikit-image
22bb6b94698b8889cbdf26b25d9e4fdb8b968d97
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from skimage.segmentation import random_walker from skimage.transform import resize from skimage._shared._warnings import expected_warnings from skimage._shared import testing # older versions of scipy raise a warning with new NumPy because they use # numpy.rank() instead of arr.ndim or numpy.linal...
36.175676
80
0.582219
import numpy as np from skimage.segmentation import random_walker from skimage.transform import resize from skimage._shared._warnings import expected_warnings from skimage._shared import testing SCIPY_EXPECTED = 'numpy.linalg.matrix_rank|\A\Z' PYAMG_EXPECTED_WARNING = 'pyamg|\A\Z' PYAMG_SCIPY_EXPECTED = SCIPY_EXPEC...
true
true
f71b4a1187468b74d940dc87ca1f6757b192c07f
412
py
Python
docs/core/howto/listings/pb/pb3server.py
ioggstream/twisted
34f9b1e3f097685839000c656332c66ee85be5d8
[ "Unlicense", "MIT" ]
3
2020-04-02T06:23:44.000Z
2020-08-13T20:32:31.000Z
docs/core/howto/listings/pb/pb3server.py
ioggstream/twisted
34f9b1e3f097685839000c656332c66ee85be5d8
[ "Unlicense", "MIT" ]
1
2022-03-04T17:40:22.000Z
2022-03-04T17:40:22.000Z
docs/core/howto/listings/pb/pb3server.py
ioggstream/twisted
34f9b1e3f097685839000c656332c66ee85be5d8
[ "Unlicense", "MIT" ]
1
2020-04-02T06:26:10.000Z
2020-04-02T06:26:10.000Z
#!/usr/bin/env python # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.spread import pb from twisted.internet import reactor class One(pb.Root): def remote_takeTwo(self, two): print "received a Two called", two print "telling it to print(12)" tw...
24.235294
50
0.68932
from twisted.spread import pb from twisted.internet import reactor class One(pb.Root): def remote_takeTwo(self, two): print "received a Two called", two print "telling it to print(12)" two.callRemote("print", 12) reactor.listenTCP(8800, pb.PBServerFactory(One())) reactor.run()...
false
true
f71b4ba03c952835c47e87d25a7a9beba942d977
8,309
py
Python
mmdet/models/necks/mscatfpn.py
JHuang-CV/OD
290bf90a5f210199b6a3750c88152f7dd2fbc276
[ "Apache-2.0" ]
null
null
null
mmdet/models/necks/mscatfpn.py
JHuang-CV/OD
290bf90a5f210199b6a3750c88152f7dd2fbc276
[ "Apache-2.0" ]
null
null
null
mmdet/models/necks/mscatfpn.py
JHuang-CV/OD
290bf90a5f210199b6a3750c88152f7dd2fbc276
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import xavier_init from mmdet.core import auto_fp16 from ..registry import NECKS from ..utils import ConvModule from mmdet.ops.context_block import ContextBlock from mmdet.models.plugins.squeeze_excitation import ChannelSELayer @NECKS....
37.768182
94
0.564087
import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import xavier_init from mmdet.core import auto_fp16 from ..registry import NECKS from ..utils import ConvModule from mmdet.ops.context_block import ContextBlock from mmdet.models.plugins.squeeze_excitation import ChannelSELayer @NECKS....
true
true
f71b4bb600bb418ed1ef7e86a5615b6ad8bfabf3
2,753
py
Python
python/dgl/nn/mxnet/conv/agnnconv.py
jinghuix/dgl
fae26dd15caac92458a08ad34889086e1e333ddd
[ "Apache-2.0" ]
2
2020-07-24T19:26:51.000Z
2021-08-21T21:04:11.000Z
python/dgl/nn/mxnet/conv/agnnconv.py
jinghuix/dgl
fae26dd15caac92458a08ad34889086e1e333ddd
[ "Apache-2.0" ]
null
null
null
python/dgl/nn/mxnet/conv/agnnconv.py
jinghuix/dgl
fae26dd15caac92458a08ad34889086e1e333ddd
[ "Apache-2.0" ]
1
2021-03-09T12:42:46.000Z
2021-03-09T12:42:46.000Z
"""MXNet Module for Attention-based Graph Neural Network layer""" # pylint: disable= no-member, arguments-differ, invalid-name import mxnet as mx from mxnet.gluon import nn from .... import function as fn from ..softmax import edge_softmax from ..utils import normalize from ....utils import expand_as_pair class AGNN...
36.706667
91
0.553578
import mxnet as mx from mxnet.gluon import nn from .... import function as fn from ..softmax import edge_softmax from ..utils import normalize from ....utils import expand_as_pair class AGNNConv(nn.Block): def __init__(self, init_beta=1., learn_beta=True): super(AGNNCon...
true
true
f71b4c870143ba858ce8cb1244e06a703ac0343d
2,539
py
Python
Algorithms/MotorModule/MotorModule.py
TechMatt1337/Bastion
1e89143905babc06ace4f0ae7ab59750427b0f03
[ "BSD-3-Clause" ]
1
2018-12-06T03:57:21.000Z
2018-12-06T03:57:21.000Z
Algorithms/MotorModule/MotorModule.py
TechMatt1337/Bastion
1e89143905babc06ace4f0ae7ab59750427b0f03
[ "BSD-3-Clause" ]
null
null
null
Algorithms/MotorModule/MotorModule.py
TechMatt1337/Bastion
1e89143905babc06ace4f0ae7ab59750427b0f03
[ "BSD-3-Clause" ]
null
null
null
from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor, Adafruit_StepperMotor import time import atexit MH = Adafruit_MotorHAT(0x60) STEPRES = 1.8 # Step resulition in units of degree/step DIRECTIONS = { "ccw":Adafruit_MotorHAT.FORWARD, "cw":Adafruit_MotorHAT.BACKWARD} STEPTYPES = { "single":Ad...
38.469697
89
0.569909
from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor, Adafruit_StepperMotor import time import atexit MH = Adafruit_MotorHAT(0x60) STEPRES = 1.8 DIRECTIONS = { "ccw":Adafruit_MotorHAT.FORWARD, "cw":Adafruit_MotorHAT.BACKWARD} STEPTYPES = { "single":Adafruit_MotorHAT.SINGLE, "double":Adafru...
false
true
f71b4d5f7826768bee64b7feec106bd5368db512
1,099
py
Python
test/test_arrow_result.py
mariusvniekerk/snowflake-connector-python
4c6b728f9ca7ac9c8a318741924a963a5574e216
[ "Apache-2.0" ]
null
null
null
test/test_arrow_result.py
mariusvniekerk/snowflake-connector-python
4c6b728f9ca7ac9c8a318741924a963a5574e216
[ "Apache-2.0" ]
null
null
null
test/test_arrow_result.py
mariusvniekerk/snowflake-connector-python
4c6b728f9ca7ac9c8a318741924a963a5574e216
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2012-2019 Snowflake Computing Inc. All right reserved. # import pytest @pytest.mark.skip( reason="Cython is not enabled in build env") def test_select_with_num(conn_cnx): with conn_cnx() as json_cnx: with conn_cnx() as arrow_cnx: ...
36.633333
87
0.610555
import pytest @pytest.mark.skip( reason="Cython is not enabled in build env") def test_select_with_num(conn_cnx): with conn_cnx() as json_cnx: with conn_cnx() as arrow_cnx: row_count = 50000 sql_text = ("select seq4() as c1, uniform(1, 10, random(12)) as c2 from " + ...
true
true
f71b4eb0cc83cbb94a84bbec221dd9f3a3147026
25,712
py
Python
draco/core/io.py
sjforeman/draco
b0ab40b6984637642b28a5485af1c09c9cf183f2
[ "MIT" ]
null
null
null
draco/core/io.py
sjforeman/draco
b0ab40b6984637642b28a5485af1c09c9cf183f2
[ "MIT" ]
null
null
null
draco/core/io.py
sjforeman/draco
b0ab40b6984637642b28a5485af1c09c9cf183f2
[ "MIT" ]
null
null
null
"""Tasks for reading and writing data. Tasks ===== .. autosummary:: :toctree: LoadFiles LoadMaps LoadFilesFromParams Save Print LoadBeamTransfer File Groups =========== Several tasks accept groups of files as arguments. These are specified in the YAML file as a dictionary like below. ....
30.285041
115
0.592253
import os.path import h5py import numpy as np from yaml import dump as yamldump from caput import pipeline from caput import config from cora.util import units from . import task from ..util.truncate import bit_truncate_weights, bit_truncate_fixed from .containers import SiderealStream, TimeStream, TrackBeam TRU...
true
true
f71b4f651dc252f16edc83bd218126c89ab19ffc
2,507
py
Python
scripts/remove_orphans.py
dbaio/portsfallout
2512036a9983b833f4ece2a0801541dca4d8d58c
[ "BSD-2-Clause" ]
6
2020-10-11T07:54:50.000Z
2022-01-25T22:03:18.000Z
scripts/remove_orphans.py
dbaio/portsfallout
2512036a9983b833f4ece2a0801541dca4d8d58c
[ "BSD-2-Clause" ]
null
null
null
scripts/remove_orphans.py
dbaio/portsfallout
2512036a9983b833f4ece2a0801541dca4d8d58c
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2020-2021 Danilo G. Baio <dbaio@bsd.com.br> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and the...
32.986842
81
0.723574
import os import sys import requests import bz2 sys.path.insert(1, r'../') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'portsfallout.settings') import django django.setup() from ports.models import Port def fetch_index(): url = "https://www.FreeBSD.org/ports/INDEX-13.bz2" r = requ...
true
true
f71b510ba2e775050928e7d131af51fdd10e9af6
4,481
py
Python
scripts/mergemessages.py
burakozdemir32/django-internationalflavor
4c5d29519050c929a608d2054c14faa44ee273c9
[ "BSD-3-Clause" ]
null
null
null
scripts/mergemessages.py
burakozdemir32/django-internationalflavor
4c5d29519050c929a608d2054c14faa44ee273c9
[ "BSD-3-Clause" ]
null
null
null
scripts/mergemessages.py
burakozdemir32/django-internationalflavor
4c5d29519050c929a608d2054c14faa44ee273c9
[ "BSD-3-Clause" ]
null
null
null
import os import sys import polib import django from django.conf import settings from django.core.management.base import BaseCommand from django.utils import translation # This is almost a management command, but we do not want it to be added to the django-admin namespace for the simple # reason that it is not expec...
41.110092
117
0.567061
import os import sys import polib import django from django.conf import settings from django.core.management.base import BaseCommand from django.utils import translation MODULE_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'internationalflavor') LOCALE_PATH = os.path.join(MODULE_PATH, 'l...
true
true
f71b518086dd6b504569820b3ca2a1c860242389
213
py
Python
wadeem/wadeem/doctype/coordinators/test_coordinators.py
siddhantsinha-oodles/Wadeem-app
eee05dead7ccee8878cf3630d3cdf32adb155c7f
[ "MIT" ]
null
null
null
wadeem/wadeem/doctype/coordinators/test_coordinators.py
siddhantsinha-oodles/Wadeem-app
eee05dead7ccee8878cf3630d3cdf32adb155c7f
[ "MIT" ]
null
null
null
wadeem/wadeem/doctype/coordinators/test_coordinators.py
siddhantsinha-oodles/Wadeem-app
eee05dead7ccee8878cf3630d3cdf32adb155c7f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2020, Siddhant and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestCoordinators(unittest.TestCase): pass
19.363636
47
0.765258
from __future__ import unicode_literals import unittest class TestCoordinators(unittest.TestCase): pass
true
true
f71b52d065d31336559f6dfb1eeccf44823e1409
2,392
py
Python
auto_nag/tests/test_agents.py
Mozilla-GitHub-Standards/f9c78643f5862cda82001d4471255ac29ef0c6b2c6171e2c1cbecab3d2fef4dd
28d999fcba9ad47d1dd0b2222880b71726ddd47c
[ "BSD-3-Clause" ]
null
null
null
auto_nag/tests/test_agents.py
Mozilla-GitHub-Standards/f9c78643f5862cda82001d4471255ac29ef0c6b2c6171e2c1cbecab3d2fef4dd
28d999fcba9ad47d1dd0b2222880b71726ddd47c
[ "BSD-3-Clause" ]
null
null
null
auto_nag/tests/test_agents.py
Mozilla-GitHub-Standards/f9c78643f5862cda82001d4471255ac29ef0c6b2c6171e2c1cbecab3d2fef4dd
28d999fcba9ad47d1dd0b2222880b71726ddd47c
[ "BSD-3-Clause" ]
null
null
null
try: # If relman-auto-nag is installed from bugzilla.agents import BMOAgent from bugzilla.utils import os from bugzilla.utils import get_config_path except: # If relman-auto-nag not installed, add project root directory into # PYTHONPATH import os import sys import inspect curre...
30.278481
74
0.581522
try: from bugzilla.agents import BMOAgent from bugzilla.utils import os from bugzilla.utils import get_config_path except: import os import sys import inspect currentdir = os.path.dirname(os.path.abspath( inspect.getfile(inspect.currentframe()...
false
true
f71b5347247e075de1cdb3afefef4dff57d2b7aa
802
py
Python
multiqc_npm/modules/npm_calculate_callability.py
c-BIG/MultiQC_NPM
c8dbf15c2b2ce03f2932db0bb50d49dcab865d75
[ "MIT" ]
null
null
null
multiqc_npm/modules/npm_calculate_callability.py
c-BIG/MultiQC_NPM
c8dbf15c2b2ce03f2932db0bb50d49dcab865d75
[ "MIT" ]
null
null
null
multiqc_npm/modules/npm_calculate_callability.py
c-BIG/MultiQC_NPM
c8dbf15c2b2ce03f2932db0bb50d49dcab865d75
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Parser for calculate_callability.py """ import logging import json from multiqc.utils import report log = logging.getLogger(__name__) def parse_reports(self): # Set up vars self.calculate_callability = dict() # Collect metrics for f in self.find_log_files('multiqc_npm/...
22.914286
93
0.706983
import logging import json from multiqc.utils import report log = logging.getLogger(__name__) def parse_reports(self): self.calculate_callability = dict() for f in self.find_log_files('multiqc_npm/calculate_callability'): parsed_data = json.loads(f["f"]) s_name = f["s...
true
true
f71b54183262fd12198dc0255f4b1059568df90a
14,252
py
Python
airflow/models/connection.py
dorranh/airflow
1a9a2cadcf8606cfcb729d1323dd33dfacc64633
[ "Apache-2.0" ]
null
null
null
airflow/models/connection.py
dorranh/airflow
1a9a2cadcf8606cfcb729d1323dd33dfacc64633
[ "Apache-2.0" ]
1
2019-05-14T14:32:40.000Z
2019-05-14T14:32:40.000Z
airflow/models/connection.py
dorranh/airflow
1a9a2cadcf8606cfcb729d1323dd33dfacc64633
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
40.72
97
0.613388
import json from urllib.parse import parse_qsl, quote, unquote, urlencode, urlparse from sqlalchemy import Boolean, Column, Integer, String from sqlalchemy.ext.declarative import declared_attr from sqlalchemy.orm import synonym from airflow.exceptions import AirflowException from airflow.models.bas...
true
true
f71b5426abe6a21a2aafe3e9e5c4721319783d05
5,751
py
Python
original_author_notes/yolo_video.py
adam-blinzler/simple-lane-detection
8814e0aaf7ac56b7e5be59634e363ca17839effb
[ "MIT" ]
null
null
null
original_author_notes/yolo_video.py
adam-blinzler/simple-lane-detection
8814e0aaf7ac56b7e5be59634e363ca17839effb
[ "MIT" ]
null
null
null
original_author_notes/yolo_video.py
adam-blinzler/simple-lane-detection
8814e0aaf7ac56b7e5be59634e363ca17839effb
[ "MIT" ]
null
null
null
# USAGE # python yolo_video.py --input videos/airport.mp4 --output output/airport_output.avi --object_detection object_detection-coco # import the necessary packages import numpy as np import argparse import imutils import time import cv2 import os # construct the argument parse and parse the arguments ap = argparse....
34.029586
125
0.704051
import numpy as np import argparse import imutils import time import cv2 import os ap = argparse.ArgumentParser() ap.add_argument("-i", "--input", required=True, help="path to input video") ap.add_argument("-o", "--output", required=True, help="path to output video") ap.add_argument("-y", "--object_detection", ...
true
true
f71b5468bb09f935a4b8dd8609a936248498eb63
7,498
py
Python
tessia/server/api/views/auth.py
tessia-project/tessia
b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540
[ "Apache-2.0" ]
5
2020-06-04T10:20:33.000Z
2020-10-26T15:09:19.000Z
tessia/server/api/views/auth.py
tessia-project/tessia
b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540
[ "Apache-2.0" ]
null
null
null
tessia/server/api/views/auth.py
tessia-project/tessia
b9ded8dc7f0b9a7a0ea00d95b5ccc4af4d2e7540
[ "Apache-2.0" ]
null
null
null
# Copyright 2016, 2017 IBM Corp. # # 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 writin...
31.771186
83
0.634169
from base64 import b64decode from flask import g as flask_global from flask import request as flask_request from sqlalchemy.sql import func from tessia.server import auth from tessia.server.api.db import API_DB from tessia.server.api.exceptions import UnauthorizedError from tessia.server.config import...
true
true
f71b54b467c00b5f3318a9985c87b77ec8bf71f6
853
py
Python
med2img/tests/test_med2img.py
mohitchandarana/pl-med2img
c8c9df64a5e244d57e2fdb9ffadeea3c455eab23
[ "MIT" ]
4
2017-07-06T20:32:08.000Z
2021-09-18T02:46:55.000Z
med2img/tests/test_med2img.py
mohitchandarana/pl-med2img
c8c9df64a5e244d57e2fdb9ffadeea3c455eab23
[ "MIT" ]
1
2021-11-07T20:17:16.000Z
2021-11-08T20:11:48.000Z
med2img/tests/test_med2img.py
mohitchandarana/pl-med2img
c8c9df64a5e244d57e2fdb9ffadeea3c455eab23
[ "MIT" ]
3
2020-09-01T07:13:19.000Z
2021-03-25T16:06:39.000Z
from unittest import TestCase from unittest import mock from med2img.med2img import Med2img class Med2imgTests(TestCase): """ Test Med2img. """ def setUp(self): self.app = Med2img() def test_run(self): """ Test the run code. """ args = [] if self.a...
25.088235
84
0.594373
from unittest import TestCase from unittest import mock from med2img.med2img import Med2img class Med2imgTests(TestCase): def setUp(self): self.app = Med2img() def test_run(self): args = [] if self.app.TYPE == 'ds': args.append('inputdir') args.append('outputdir'...
true
true
f71b555a4703e5eb655f1c62d6c59060c0f772cf
6,488
py
Python
MPL/MPL_envs/reach/reach_v0.py
vikashplus/MPL
4a784fd94dc7a5988a1eca85851ee546ca1992f9
[ "Apache-2.0" ]
null
null
null
MPL/MPL_envs/reach/reach_v0.py
vikashplus/MPL
4a784fd94dc7a5988a1eca85851ee546ca1992f9
[ "Apache-2.0" ]
null
null
null
MPL/MPL_envs/reach/reach_v0.py
vikashplus/MPL
4a784fd94dc7a5988a1eca85851ee546ca1992f9
[ "Apache-2.0" ]
null
null
null
import numpy as np from gym import utils from mjrl.envs import mujoco_env from mujoco_py import MjViewer from MPL.MPL_robot.robot import Robot import os # TODO: Action normalization is missing class sallyReachEnv(mujoco_env.MujocoEnv, utils.EzPickle): def __init__(self, noise_scale=0.0): # prep u...
33.968586
130
0.594945
import numpy as np from gym import utils from mjrl.envs import mujoco_env from mujoco_py import MjViewer from MPL.MPL_robot.robot import Robot import os class sallyReachEnv(mujoco_env.MujocoEnv, utils.EzPickle): def __init__(self, noise_scale=0.0): utils.EzPickle.__init__(self) self._no...
true
true
f71b560fdbc2811c07e38208065e693e4befa940
40,786
py
Python
metaflow/plugins/aws/step_functions/step_functions.py
cclauss/metaflow
5186c6c5bba36d9e77077413ee2495dc79da3dca
[ "Apache-2.0" ]
1
2021-11-29T22:37:54.000Z
2021-11-29T22:37:54.000Z
metaflow/plugins/aws/step_functions/step_functions.py
sappier/metaflow
dfe1a216e342555d5fb127607b35491a4ef11627
[ "Apache-2.0" ]
null
null
null
metaflow/plugins/aws/step_functions/step_functions.py
sappier/metaflow
dfe1a216e342555d5fb127607b35491a4ef11627
[ "Apache-2.0" ]
1
2021-11-29T22:37:50.000Z
2021-11-29T22:37:50.000Z
import os from collections import defaultdict import sys import hashlib import json import time import string import random import uuid from metaflow.exception import MetaflowException, MetaflowInternalError from metaflow.plugins import ResourcesDecorator, BatchDecorator, RetryDecorator from metaflow.parameters import...
43.205508
88
0.558721
import os from collections import defaultdict import sys import hashlib import json import time import string import random import uuid from metaflow.exception import MetaflowException, MetaflowInternalError from metaflow.plugins import ResourcesDecorator, BatchDecorator, RetryDecorator from metaflow.parameters import...
true
true
f71b5640c381e4a1a513cc6857ecd00c92aa7029
279
py
Python
circle_core/writer/base.py
glucoseinc/CircleCore
577f814ce2944efb6e5997f3d7838c71ce9aea6a
[ "MIT" ]
3
2019-01-11T04:30:18.000Z
2019-01-11T04:31:18.000Z
circle_core/writer/base.py
glucoseinc/CircleCore
577f814ce2944efb6e5997f3d7838c71ce9aea6a
[ "MIT" ]
16
2018-11-21T11:47:18.000Z
2021-09-01T03:52:35.000Z
circle_core/writer/base.py
glucoseinc/CircleCore
577f814ce2944efb6e5997f3d7838c71ce9aea6a
[ "MIT" ]
null
null
null
import abc class DBWriter(metaclass=abc.ABCMeta): @abc.abstractmethod async def store(self, message_box, message) -> bool: raise NotImplementedError @abc.abstractmethod async def flush(self, flush_all=False) -> None: raise NotImplementedError
21.461538
56
0.706093
import abc class DBWriter(metaclass=abc.ABCMeta): @abc.abstractmethod async def store(self, message_box, message) -> bool: raise NotImplementedError @abc.abstractmethod async def flush(self, flush_all=False) -> None: raise NotImplementedError
true
true
f71b56535865b78456cbc8ac2192f63ee5287cfd
588
py
Python
src/UI_Code_Q2/Test_code_smaller_parts/PythonWriteUSB.py
KevinEwoudLee/HU3-UI
16d63e0be8c515540daf4f9cfcff2d0a85c1cbab
[ "MIT" ]
1
2019-12-11T15:27:53.000Z
2019-12-11T15:27:53.000Z
src/UI_Code_Q2/Test_code_smaller_parts/PythonWriteUSB.py
KevinEwoudLee/HU3-UI
16d63e0be8c515540daf4f9cfcff2d0a85c1cbab
[ "MIT" ]
null
null
null
src/UI_Code_Q2/Test_code_smaller_parts/PythonWriteUSB.py
KevinEwoudLee/HU3-UI
16d63e0be8c515540daf4f9cfcff2d0a85c1cbab
[ "MIT" ]
1
2019-12-11T15:23:56.000Z
2019-12-11T15:23:56.000Z
# -*- coding: utf-8 -*- """ Created on Tue Nov 26 09:36:21 2019 @author: kevin """ import os import time from time import sleep from datetime import datetime file = open("E:/test2.csv", "a") i=0 if os.stat("E:/test2.csv").st_size == 0: file.write("Time,Sensor1,Sensor2,Sensor3,Sensor4,Sensor5\...
22.615385
97
0.52551
import os import time from time import sleep from datetime import datetime file = open("E:/test2.csv", "a") i=0 if os.stat("E:/test2.csv").st_size == 0: file.write("Time,Sensor1,Sensor2,Sensor3,Sensor4,Sensor5\n") while True: i=i+1 now = datetime.now() file.write(str(now...
true
true
f71b56ae1d0e79e35e8bd9e7c4c05e6ff33f45bf
3,286
py
Python
src/util/pos_util.py
tiefenauer/ip7-python
512105ba39110ec77d2ea0961dd7c2a42d4ec26d
[ "MIT" ]
null
null
null
src/util/pos_util.py
tiefenauer/ip7-python
512105ba39110ec77d2ea0961dd7c2a42d4ec26d
[ "MIT" ]
null
null
null
src/util/pos_util.py
tiefenauer/ip7-python
512105ba39110ec77d2ea0961dd7c2a42d4ec26d
[ "MIT" ]
null
null
null
import collections from src.importer.known_jobs import KnownJobs from src.preprocessing import preproc from src.util import loe_util, jobtitle_util mw_tokens = ['m/w', 'w/m', 'm/f', 'f/m', 'M/W', 'W/M', 'M/F', 'F/M'] def find_jobs(sentence): jobs = [] # find known jobs for hit in find_job_b...
30.71028
101
0.676811
import collections from src.importer.known_jobs import KnownJobs from src.preprocessing import preproc from src.util import loe_util, jobtitle_util mw_tokens = ['m/w', 'w/m', 'm/f', 'f/m', 'M/W', 'W/M', 'M/F', 'F/M'] def find_jobs(sentence): jobs = [] for hit in find_job_by_keyword(sentenc...
true
true
f71b56c4085612ca2aacc209126330286fb3b4f9
2,980
py
Python
webvep/main/settings.py
IanVermes/vep_api
9d9d31eddd969aad1c462278ea1f1fb09153e054
[ "MIT" ]
null
null
null
webvep/main/settings.py
IanVermes/vep_api
9d9d31eddd969aad1c462278ea1f1fb09153e054
[ "MIT" ]
1
2020-03-30T10:52:58.000Z
2020-03-30T16:46:31.000Z
webvep/main/settings.py
IanVermes/vep_api
9d9d31eddd969aad1c462278ea1f1fb09153e054
[ "MIT" ]
null
null
null
""" Django settings for webvep project. Generated by 'django-admin startproject' using Django 3.0.4. 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/ """ import os # ...
26.607143
91
0.711409
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = "ec)mzu6ls4qaj!8)txrke(uxxtb1gmz^2a_^1$lqe9&ys17^!$" DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ "django.contrib.admin", "django.contrib.auth", "django.contrib.content...
true
true
f71b57614025c4aecf90a7ea7cf4fe3d2b9c8499
77
py
Python
zmon_aws_agent/__main__.py
jrake-revelant/zmon-aws-agent
67ed3d0230f3bec9b3a3950c3eefa48404ee9d6b
[ "Apache-2.0" ]
9
2016-07-28T09:28:20.000Z
2022-02-27T23:40:09.000Z
zmon_aws_agent/__main__.py
jrake-revelant/zmon-aws-agent
67ed3d0230f3bec9b3a3950c3eefa48404ee9d6b
[ "Apache-2.0" ]
146
2016-05-23T13:43:42.000Z
2020-03-10T09:47:07.000Z
zmon_aws_agent/__main__.py
jrake-revelant/zmon-aws-agent
67ed3d0230f3bec9b3a3950c3eefa48404ee9d6b
[ "Apache-2.0" ]
11
2017-02-18T12:46:27.000Z
2020-01-22T13:13:36.000Z
from zmon_aws_agent.main import main if __name__ == '__main__': main()
12.833333
36
0.701299
from zmon_aws_agent.main import main if __name__ == '__main__': main()
true
true
f71b584d40b3c272f7646b95950ee740aeb0fc1c
5,834
py
Python
tests/model_connectors/test_spawn_ets.py
macintoshpie/geojson-modelica-translator
5ed02d53f06961b8d0f3705343368e4c920e7d7d
[ "BSD-3-Clause" ]
null
null
null
tests/model_connectors/test_spawn_ets.py
macintoshpie/geojson-modelica-translator
5ed02d53f06961b8d0f3705343368e4c920e7d7d
[ "BSD-3-Clause" ]
null
null
null
tests/model_connectors/test_spawn_ets.py
macintoshpie/geojson-modelica-translator
5ed02d53f06961b8d0f3705343368e4c920e7d7d
[ "BSD-3-Clause" ]
null
null
null
""" **************************************************************************************************** :copyright (c) 2019-2020 URBANopt, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted ...
44.876923
114
0.711176
import os import shutil import unittest from pathlib import Path from geojson_modelica_translator.geojson_modelica_translator import ( GeoJsonModelicaTranslator ) from geojson_modelica_translator.model_connectors.spawnBui_ETS_Coupling import ( SpawnConnectorETS ) from geojson_modelica_translator.modelica.mode...
true
true
f71b58bc6969e1f4e15e0b32876c55ba66d9757e
18,715
py
Python
OLD/losses.py
ivankreso/semseg
fcd2889a1e9e03c3d1a71d19d68d15ce25a5dc79
[ "MIT" ]
2
2017-11-17T06:55:44.000Z
2019-06-11T13:07:05.000Z
OLD/losses.py
ivankreso/semseg
fcd2889a1e9e03c3d1a71d19d68d15ce25a5dc79
[ "MIT" ]
null
null
null
OLD/losses.py
ivankreso/semseg
fcd2889a1e9e03c3d1a71d19d68d15ce25a5dc79
[ "MIT" ]
null
null
null
import tensorflow as tf import slim FLAGS = tf.app.flags.FLAGS def add_loss_summaries(total_loss): """Add summaries for losses in model. Generates moving average for all losses and associated summaries for visualizing the performance of the network. Args: total_loss: Total loss from loss(). Returns: ...
42.924312
107
0.704996
import tensorflow as tf import slim FLAGS = tf.app.flags.FLAGS def add_loss_summaries(total_loss): loss_averages = tf.train.ExponentialMovingAverage(0.9, name='avg') losses = tf.get_collection('losses') loss_averages_op = loss_averages.apply(losses + [total_loss]) for l in losses + [total_loss]: ...
true
true
f71b599c49ef3382050c2d01eff0c192906c1d7b
1,580
py
Python
aiLogic/tankAI.py
JoelEager/pyTanks.Player
a35a653e9df2416c63204aba87a95f33e6815b63
[ "MIT" ]
2
2017-03-09T15:32:55.000Z
2017-09-04T11:25:41.000Z
aiLogic/tankAI.py
JoelEager/pyTanks.Player
a35a653e9df2416c63204aba87a95f33e6815b63
[ "MIT" ]
null
null
null
aiLogic/tankAI.py
JoelEager/pyTanks.Player
a35a653e9df2416c63204aba87a95f33e6815b63
[ "MIT" ]
4
2017-05-16T15:10:09.000Z
2017-07-06T15:24:50.000Z
""" The player's AI code Functions here are called by clock.py to run the AI code """ import random import math from clientLogic.logging import logPrint from clientLogic import clientData, commands def onConnect(): """ Called when the player initially connects to the server but before the tank first spaw...
27.719298
92
0.588608
import random import math from clientLogic.logging import logPrint from clientLogic import clientData, commands def onConnect(): commands.setInfo("Python player instance running the example AI.\n" + "Fork me at https://github.com/JoelEager/pyTanks.Player") def onSpawn(): pass def onTic...
true
true
f71b5a856153c3564ce7371764011afc06ba93ae
12,294
py
Python
tests/unit/common_utils.py
dannielarriola/uai-coursebuilder
fbd440a8bfe1a928ac52985aea2949d5e91ad203
[ "Apache-2.0" ]
null
null
null
tests/unit/common_utils.py
dannielarriola/uai-coursebuilder
fbd440a8bfe1a928ac52985aea2949d5e91ad203
[ "Apache-2.0" ]
27
2016-08-31T19:04:46.000Z
2016-09-29T00:22:32.000Z
tests/unit/common_utils.py
dannielarriola/uai-coursebuilder
fbd440a8bfe1a928ac52985aea2949d5e91ad203
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
38.299065
80
0.577843
__author__ = 'Mike Gainer (mgainer@google.com)' import datetime import os import unittest import appengine_config from common import utils class CommonUnitTests(unittest.TestCase): def test_list_parsing(self): self.assertListEqual(['foo'], utils.text_to_list('foo')) self.ass...
true
true
f71b5b1995d1ecc2a1ba880156e9343a02f0c212
578
py
Python
bark_ml/commons/tracer.py
bark-simulator/rl
84f9c74b60becbc4bc758e19b201d85a21880717
[ "MIT" ]
null
null
null
bark_ml/commons/tracer.py
bark-simulator/rl
84f9c74b60becbc4bc758e19b201d85a21880717
[ "MIT" ]
null
null
null
bark_ml/commons/tracer.py
bark-simulator/rl
84f9c74b60becbc4bc758e19b201d85a21880717
[ "MIT" ]
null
null
null
# Copyright (c) 2020 fortiss GmbH # # Authors: Patrick Hart # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. import pickle class Tracer: """The tracer can be used to log certain values during episodes.""" def __init__(self, states=None, trace_...
25.130435
69
0.698962
import pickle class Tracer: def __init__(self, states=None, trace_history=True): self._trace_history = trace_history self._states = [] def Trace(self, eval_dict): if self._trace_history: self._states.append(eval_dict) def Reset(self): self._trace_history = []
true
true
f71b5b6b59934a264b9a46047b70741641a2db51
10,504
py
Python
tests/test_clone.py
mohammadroghani/django-clone
603037194ae43f5e2eb96bd0aa159c1fbcf8c51c
[ "MIT" ]
null
null
null
tests/test_clone.py
mohammadroghani/django-clone
603037194ae43f5e2eb96bd0aa159c1fbcf8c51c
[ "MIT" ]
null
null
null
tests/test_clone.py
mohammadroghani/django-clone
603037194ae43f5e2eb96bd0aa159c1fbcf8c51c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Django Clone - https://github.com/mohammadroghani/django-clone # Copyright © 2016 Mohammad Roghani <mohammadroghani43@gmail.com> # Copyright © 2016 Amir Keivan Mohtashami <akmohtashami97@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this soft...
47.315315
236
0.680217
from django.test import TestCase from django.utils import timezone from django_clone.clone import Cloner from tests.models import * def get_information_list(object_list): information_list = [] for object in object_list: information_list.append((object.pk, object.__module__ + "...
true
true
f71b5cd7fa3f30ff2ff0a5a2c5acbd05b042c711
497
py
Python
examples/example_proj/dependency_app_o2o/migrations/0001_initial.py
philsupertramp/dj-migration-test
97ec4513b9848d96436907de7940841866895e3c
[ "MIT" ]
4
2019-07-05T19:32:07.000Z
2020-02-07T00:47:15.000Z
examples/example_proj/dependency_app_o2o/migrations/0001_initial.py
philsupertramp/dj-migration-test
97ec4513b9848d96436907de7940841866895e3c
[ "MIT" ]
17
2019-08-23T07:21:23.000Z
2021-09-22T18:44:26.000Z
examples/example_proj/dependency_app_o2o/migrations/0001_initial.py
philsupertramp/dj-migration-test
97ec4513b9848d96436907de7940841866895e3c
[ "MIT" ]
null
null
null
# Generated by Django 2.2.3 on 2019-07-27 12:22 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='DepModO2O', fields=[ ('id', models.AutoFiel...
22.590909
114
0.583501
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='DepModO2O', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serializ...
true
true
f71b5d0be6cfd82d1e2beb6b6ec45e9a21282a6a
1,163
py
Python
src/bot.py
Shignum/ShiggyBot
292d99300dea55848d1aa458c8b8893a8dd78fc2
[ "MIT" ]
null
null
null
src/bot.py
Shignum/ShiggyBot
292d99300dea55848d1aa458c8b8893a8dd78fc2
[ "MIT" ]
null
null
null
src/bot.py
Shignum/ShiggyBot
292d99300dea55848d1aa458c8b8893a8dd78fc2
[ "MIT" ]
null
null
null
import os from discord import Embed from discord import Intents from discord.ext import commands from dotenv import load_dotenv load_dotenv() intents = Intents.default() bot = commands.Bot(command_prefix=os.getenv('PREFIX')) TOKEN = os.getenv('BOT_TOKEN') @bot.event async def on_ready(): print(f'{bot.user} has ...
29.075
95
0.715391
import os from discord import Embed from discord import Intents from discord.ext import commands from dotenv import load_dotenv load_dotenv() intents = Intents.default() bot = commands.Bot(command_prefix=os.getenv('PREFIX')) TOKEN = os.getenv('BOT_TOKEN') @bot.event async def on_ready(): print(f'{bot.user} has ...
true
true
f71b5d97598ff53100bfb2598cdb30dd30469fd8
10,221
py
Python
client-py/iotdb/utils/IoTDBRpcDataSet.py
slawr/iotdb
96b5269f0fc6e02927563d4481da3bfb310fc7b1
[ "Apache-2.0" ]
null
null
null
client-py/iotdb/utils/IoTDBRpcDataSet.py
slawr/iotdb
96b5269f0fc6e02927563d4481da3bfb310fc7b1
[ "Apache-2.0" ]
27
2021-10-19T09:41:40.000Z
2022-03-30T16:22:17.000Z
client-py/iotdb/utils/IoTDBRpcDataSet.py
slawr/iotdb
96b5269f0fc6e02927563d4481da3bfb310fc7b1
[ "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...
37.577206
103
0.604246
import logging from thrift.transport import TTransport from iotdb.thrift.rpc.TSIService import TSFetchResultsReq, TSCloseOperationReq from iotdb.utils.IoTDBConstants import TSDataType logger = logging.getLogger("IoTDB") class IoTDBRpcDataSet(object): TIMESTAMP_STR = "Time" START_INDE...
true
true
f71b5dbf84e94f967043c63798744db773956c70
2,822
py
Python
awesome-bot.py
ksmirenko/awesome-irc-bot
2d39da7efc3621d737bcec458fc0f50ee7189e05
[ "MIT" ]
null
null
null
awesome-bot.py
ksmirenko/awesome-irc-bot
2d39da7efc3621d737bcec458fc0f50ee7189e05
[ "MIT" ]
null
null
null
awesome-bot.py
ksmirenko/awesome-irc-bot
2d39da7efc3621d737bcec458fc0f50ee7189e05
[ "MIT" ]
null
null
null
import re import socket import sys import threading from random import randint host = 'irc.freenode.org' port = 6667 nick = 'gabe_the_dog' real_name = 'Gabe the dog' channel = '#spbnet' size = 2048 youtube_prefix = 'https://www.youtube.com/watch?v=' gabe_the_dog_sources = [ 'i1H0leZhXcY', 'i11RMG_U3R4', '...
22.576
84
0.592488
import re import socket import sys import threading from random import randint host = 'irc.freenode.org' port = 6667 nick = 'gabe_the_dog' real_name = 'Gabe the dog' channel = '#spbnet' size = 2048 youtube_prefix = 'https://www.youtube.com/watch?v=' gabe_the_dog_sources = [ 'i1H0leZhXcY', 'i11RMG_U3R4', '...
true
true
f71b5dcfe6e6dcab397ded91c0b2aed0f4eaaa39
3,380
py
Python
drawSS.py
banroku/analySS
15ba9e9216f86a1bf74062eae479a3ce1c9c5a11
[ "MIT" ]
null
null
null
drawSS.py
banroku/analySS
15ba9e9216f86a1bf74062eae479a3ce1c9c5a11
[ "MIT" ]
null
null
null
drawSS.py
banroku/analySS
15ba9e9216f86a1bf74062eae479a3ce1c9c5a11
[ "MIT" ]
null
null
null
# coding=utf-8 def thinningSS(file, max_strain=10, interval=0.1): '''a function to conduct data thinning of SS curve at range (0, MAX_STRAIN), with INTERVAL This returns np.series of stress with strain in the index. FILE should be passed as dictionary containing following: 'name': name of sample l...
47.605634
126
0.628107
def thinningSS(file, max_strain=10, interval=0.1): import pandas as pd import numpy as np data = pd.read_csv(file['crv'], sep=',', encoding='shift_jis', skiprows=1, index_col=0) data_rlt = pd.read_csv(file['rlt'], sep=',', encoding='shift_jis') L = 64 b = float(data_rlt.iloc[2, 3]) ...
true
true
f71b5dd3b2f1f6ba21eafc9f59670a50d9efc222
207
py
Python
sciencer/expanders/__init__.py
SciencerIO/sciencer-toolkit
f17c4a5dfb6cc5dbabefe03b13eb1e5345f7b1b9
[ "MIT" ]
2
2022-03-28T17:27:21.000Z
2022-03-29T22:27:15.000Z
sciencer/expanders/__init__.py
SciencerIO/sciencer-toolkit
f17c4a5dfb6cc5dbabefe03b13eb1e5345f7b1b9
[ "MIT" ]
null
null
null
sciencer/expanders/__init__.py
SciencerIO/sciencer-toolkit
f17c4a5dfb6cc5dbabefe03b13eb1e5345f7b1b9
[ "MIT" ]
1
2022-03-28T14:47:53.000Z
2022-03-28T14:47:53.000Z
"""Sciencer Expanders""" from .expander import Expander from .expand_by_authors import ExpandByAuthors from .expand_by_references import ExpandByReferences from .expand_by_citations import ExpandByCitations
34.5
52
0.864734
from .expander import Expander from .expand_by_authors import ExpandByAuthors from .expand_by_references import ExpandByReferences from .expand_by_citations import ExpandByCitations
true
true
f71b5e233cb62b6fa8ba747a25edcddd0d4c142f
1,068
py
Python
get-git-lfs.py
rcmurphy/pre-commit-hooks
17fcaab5769b7628e872601d852d3dcf13c0930e
[ "MIT" ]
null
null
null
get-git-lfs.py
rcmurphy/pre-commit-hooks
17fcaab5769b7628e872601d852d3dcf13c0930e
[ "MIT" ]
null
null
null
get-git-lfs.py
rcmurphy/pre-commit-hooks
17fcaab5769b7628e872601d852d3dcf13c0930e
[ "MIT" ]
1
2016-05-06T15:27:07.000Z
2016-05-06T15:27:07.000Z
#!/usr/bin/env python3.4 """This is a script to install git-lfs to a tempdir for use in tests""" import io import os.path import shutil import tarfile from urllib.request import urlopen DOWNLOAD_PATH = ( 'https://github.com/github/git-lfs/releases/download/' 'v1.1.0/git-lfs-linux-amd64-1.1.0.tar.gz' ) PATH_IN_...
27.384615
71
0.661985
import io import os.path import shutil import tarfile from urllib.request import urlopen DOWNLOAD_PATH = ( 'https://github.com/github/git-lfs/releases/download/' 'v1.1.0/git-lfs-linux-amd64-1.1.0.tar.gz' ) PATH_IN_TAR = 'git-lfs-1.1.0/git-lfs' DEST_PATH = '/tmp/git-lfs/git-lfs' DEST_DIR = os.path.dirname(DEST...
true
true
f71b5e5ba3ad4fa2190d7a089a3fbcdfd842d9d6
4,150
py
Python
ptvs_virtualenv_proxy.py
SpaceTheArcher/test
469ba40a6e3a5719e90f521d851252b1d5499dab
[ "Apache-2.0" ]
null
null
null
ptvs_virtualenv_proxy.py
SpaceTheArcher/test
469ba40a6e3a5719e90f521d851252b1d5499dab
[ "Apache-2.0" ]
2
2020-06-05T18:25:57.000Z
2021-06-01T22:22:13.000Z
ptvs_virtualenv_proxy.py
bruno-zaccariello/test
469ba40a6e3a5719e90f521d851252b1d5499dab
[ "Apache-2.0" ]
null
null
null
# ############################################################################ # # Copyright (c) Microsoft Corporation. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of this distribution. I...
34.87395
98
0.608675
true
true
f71b5f38bc0959d120c19af81b07d70402e40457
2,779
py
Python
bifurcation-diagram/run.py
ExplosiveJam/fickettmodel-reproducibility
e47af1d3e2513d35dad65c16d4fd68c23e505f87
[ "MIT" ]
1
2019-06-08T20:06:33.000Z
2019-06-08T20:06:33.000Z
bifurcation-diagram/run.py
ExplosiveJam/fickettmodel-reproducibility
e47af1d3e2513d35dad65c16d4fd68c23e505f87
[ "MIT" ]
null
null
null
bifurcation-diagram/run.py
ExplosiveJam/fickettmodel-reproducibility
e47af1d3e2513d35dad65c16d4fd68c23e505f87
[ "MIT" ]
1
2019-06-24T13:00:02.000Z
2019-06-24T13:00:02.000Z
#!/usr/bin/env python r""" Run many simulations with varying :math:`\theta`. The simulations are run. Separate script should plot bifurcation diagram. """ import argparse import os import sys import shutil import numpy as np from mpi4py import MPI from saf.fm.nonlinear import Config from saf.action import solve fr...
23.956897
78
0.640158
import argparse import os import sys import shutil import numpy as np from mpi4py import MPI from saf.fm.nonlinear import Config from saf.action import solve from saf.util import reset_logging TOTAL_THETAS = 251 FINAL_TIME = 1000 Q = 4 IO_FORMAT = 'numpy' FMT = '.3f' def _worker(tasks, rank): for t in task...
true
true
f71b5f65fde60a4fce5bcdd06e514fa54d419c62
2,762
py
Python
mwparserfromhell/nodes/wikilink.py
hperala/kontuwikibot
f409e6fb45adf4e553dc326d9fb3c0d29eda6373
[ "MIT" ]
null
null
null
mwparserfromhell/nodes/wikilink.py
hperala/kontuwikibot
f409e6fb45adf4e553dc326d9fb3c0d29eda6373
[ "MIT" ]
null
null
null
mwparserfromhell/nodes/wikilink.py
hperala/kontuwikibot
f409e6fb45adf4e553dc326d9fb3c0d29eda6373
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2016 Ben Kurtovic <ben.kurtovic@gmail.com> # # 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 ...
33.277108
79
0.654598
from __future__ import unicode_literals from . import Node from ..compat import str from ..utils import parse_anything __all__ = ["Wikilink"] class Wikilink(Node): def __init__(self, title, text=None): super(Wikilink, self).__init__() self._title = title self._text ...
true
true
f71b5f8ccdadb4be20d3cb2813522c3537586cb1
2,254
py
Python
bcs-ui/backend/tests/container_service/observability/log_stream/test_log_stream.py
laodiu/bk-bcs
2a956a42101ff6487ff521fb3ef429805bfa7e26
[ "Apache-2.0" ]
599
2019-06-25T03:20:46.000Z
2022-03-31T12:14:33.000Z
bcs-ui/backend/tests/container_service/observability/log_stream/test_log_stream.py
laodiu/bk-bcs
2a956a42101ff6487ff521fb3ef429805bfa7e26
[ "Apache-2.0" ]
537
2019-06-27T06:03:44.000Z
2022-03-31T12:10:01.000Z
bcs-ui/backend/tests/container_service/observability/log_stream/test_log_stream.py
laodiu/bk-bcs
2a956a42101ff6487ff521fb3ef429805bfa7e26
[ "Apache-2.0" ]
214
2019-06-25T03:26:05.000Z
2022-03-31T07:52:03.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
35.777778
151
0.733807
import pytest from channels.testing import WebsocketCommunicator from backend.accounts.middlewares import BCSChannelAuthMiddlewareStack from backend.container_service.observability.log_stream.views import LogStreamHandler @pytest.fixture def session_id(api_client, project_id, cluster_id, namespace, pod_name, contai...
true
true
f71b5fa3d07b50277b17d00725bcbd1f7fff771e
6,977
py
Python
tensorflow/contrib/cmake/tools/create_def_file.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
6
2022-02-04T18:12:24.000Z
2022-03-21T23:57:12.000Z
Lib/site-packages/tensorflow/contrib/cmake/tools/create_def_file.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/tensorflow/contrib/cmake/tools/create_def_file.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
1
2022-02-08T03:53:23.000Z
2022-02-08T03:53:23.000Z
# Copyright 2017 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...
38.546961
81
0.611151
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import codecs import os import re import subprocess import sys import tempfile UNDNAME = "undname.exe" DUMPBIN = "dumpbin.exe" EXCLUDE_RE = re.compile(r"RTTI|...
true
true
f71b5fa9abf8cdc0cf3fabe615159d23770b9aaa
4,790
py
Python
flanker/mime/message/headers/encodedword.py
skshetry/flanker
63d1cdf927777f49f97e8d7f01e105a3b0d25cd2
[ "Apache-2.0" ]
929
2015-01-01T11:14:21.000Z
2022-03-28T23:47:40.000Z
flanker/mime/message/headers/encodedword.py
skshetry/flanker
63d1cdf927777f49f97e8d7f01e105a3b0d25cd2
[ "Apache-2.0" ]
141
2015-01-10T19:02:03.000Z
2021-07-26T18:04:14.000Z
flanker/mime/message/headers/encodedword.py
skshetry/flanker
63d1cdf927777f49f97e8d7f01e105a3b0d25cd2
[ "Apache-2.0" ]
179
2015-01-01T18:42:46.000Z
2022-02-16T21:57:14.000Z
# coding:utf-8 import logging from base64 import b64encode import regex as re import six from flanker import _email from flanker.mime.message import charsets, errors _log = logging.getLogger(__name__) _RE_FOLDING_WHITE_SPACES = re.compile(r"(?:\n\r?|\r\n?)") # This spec refers to http://tools.ietf.org/html/rfc2047...
30.125786
80
0.56618
import logging from base64 import b64encode import regex as re import six from flanker import _email from flanker.mime.message import charsets, errors _log = logging.getLogger(__name__) _RE_FOLDING_WHITE_SPACES = re.compile(r"(?:\n\r?|\r\n?)") _RE_ENCODED_WORD = re.compile(r'''(?P<encodedWord> =\? ...
true
true
f71b5fdd3e686df0976041498cd2acf2ea0dd77c
352
py
Python
Exercicios/PythonExercicios/ex001 - 010/ex005.py
sggrilo/Curso-em-Video-Python
a0e6f3d80d89eb8709345a38e207d81a77891192
[ "MIT" ]
null
null
null
Exercicios/PythonExercicios/ex001 - 010/ex005.py
sggrilo/Curso-em-Video-Python
a0e6f3d80d89eb8709345a38e207d81a77891192
[ "MIT" ]
null
null
null
Exercicios/PythonExercicios/ex001 - 010/ex005.py
sggrilo/Curso-em-Video-Python
a0e6f3d80d89eb8709345a38e207d81a77891192
[ "MIT" ]
null
null
null
# ANTECESSOR E SUCESSOR — Faça um programa que leia um número # inteiro e mostre na tela o seu antecessor e o seu sucessor. n = int(input('Digite um número inteiro: ')) a = n - 1 s = n + 1 print('O antecessor de \033[4;33m{}\033[m equivale a \033[4;31m{}\033[m. '.format(n, a), end='') print('Seu sucessor equivale a ...
32
96
0.664773
n = int(input('Digite um número inteiro: ')) a = n - 1 s = n + 1 print('O antecessor de \033[4;33m{}\033[m equivale a \033[4;31m{}\033[m. '.format(n, a), end='') print('Seu sucessor equivale a \033[4;32m{}\033[m.'.format(s))
true
true
f71b5fe3a6cd69858a329449b4f2842d872d3cb0
27,953
py
Python
canvasapi/user.py
onomou/canvasapi
94d269e8e771bcf03fd57e235190aced3b5af87a
[ "MIT" ]
null
null
null
canvasapi/user.py
onomou/canvasapi
94d269e8e771bcf03fd57e235190aced3b5af87a
[ "MIT" ]
null
null
null
canvasapi/user.py
onomou/canvasapi
94d269e8e771bcf03fd57e235190aced3b5af87a
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function, unicode_literals from six import python_2_unicode_compatible, string_types import warnings from canvasapi.calendar_event import CalendarEvent from canvasapi.canvas_object import CanvasObject from canvasapi.communication_channel import CommunicationChan...
34.595297
120
0.615676
from __future__ import absolute_import, division, print_function, unicode_literals from six import python_2_unicode_compatible, string_types import warnings from canvasapi.calendar_event import CalendarEvent from canvasapi.canvas_object import CanvasObject from canvasapi.communication_channel import CommunicationChan...
true
true
f71b604290c4284cdb29c7ba708ed37267f359af
3,054
py
Python
copyright_updater/logger_factory.py
swasun/copyright-updater
750ced32ee9738e4d65189bc0e917e0581a59668
[ "MIT" ]
null
null
null
copyright_updater/logger_factory.py
swasun/copyright-updater
750ced32ee9738e4d65189bc0e917e0581a59668
[ "MIT" ]
null
null
null
copyright_updater/logger_factory.py
swasun/copyright-updater
750ced32ee9738e4d65189bc0e917e0581a59668
[ "MIT" ]
null
null
null
##################################################################################### # MIT License # # # # Copyright (C) 2018 Charly Lamothe ...
51.762712
119
0.47053
true
true
f71b60c66400900beffb67846939db70bfb9249f
4,381
py
Python
avax/webdav/tests/benchmarks.py
eavatar/avax.webdav
e4d4915fd5af8878ba88e3641e624e64033ece96
[ "MIT" ]
null
null
null
avax/webdav/tests/benchmarks.py
eavatar/avax.webdav
e4d4915fd5af8878ba88e3641e624e64033ece96
[ "MIT" ]
null
null
null
avax/webdav/tests/benchmarks.py
eavatar/avax.webdav
e4d4915fd5af8878ba88e3641e624e64033ece96
[ "MIT" ]
null
null
null
# -*- coding: iso-8859-1 -*- # (c) 2009-2014 Martin Wendt and contributors; see WsgiDAV https://github.com/mar10/wsgidav # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Benchmark suite for WsgiDAV. This test suite uses davclient to generate WebDAV requests. ...
31.070922
99
0.625428
import logging _benchmarks = [ "test_scripted", ] def _real_run_bench(bench, opts): if bench == "*": for bench in _benchmarks: run_bench(bench, opts) return assert bench in _benchmarks if bench ==...
true
true
f71b6170ec1ea5471b4314a0e09ef42e3e38daff
1,001
py
Python
project/urls.py
tgavankar/PlaydohSlideSync
5718d661e78d361a0dcda908b63c736bab886bb4
[ "BSD-3-Clause" ]
null
null
null
project/urls.py
tgavankar/PlaydohSlideSync
5718d661e78d361a0dcda908b63c736bab886bb4
[ "BSD-3-Clause" ]
null
null
null
project/urls.py
tgavankar/PlaydohSlideSync
5718d661e78d361a0dcda908b63c736bab886bb4
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings from django.conf.urls.defaults import patterns, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns from .examples import urls from funfactory.monkeypatches import patch patch() # Uncomment the next two lines to enable the admin: # from django.contrib import a...
27.805556
88
0.685315
from django.conf import settings from django.conf.urls.defaults import patterns, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns from .examples import urls from funfactory.monkeypatches import patch patch() urlpatterns = patterns('', (r'', include(urls)), (r'^ro...
true
true
f71b63178ebdc11ae83bec5b2f2f47ff8b336dd6
1,011
py
Python
src/sellers/migrations/0004_alter_seller_logo_url.py
evis-market/web-interface-backend
f8930ff1c009ad18e522ab29680b4bcd50a6020e
[ "MIT" ]
2
2021-08-30T22:58:32.000Z
2021-12-12T10:47:52.000Z
src/sellers/migrations/0004_alter_seller_logo_url.py
evis-market/web-interface-backend
f8930ff1c009ad18e522ab29680b4bcd50a6020e
[ "MIT" ]
null
null
null
src/sellers/migrations/0004_alter_seller_logo_url.py
evis-market/web-interface-backend
f8930ff1c009ad18e522ab29680b4bcd50a6020e
[ "MIT" ]
1
2021-08-22T19:12:44.000Z
2021-08-22T19:12:44.000Z
# Generated by Django 3.2.7 on 2021-10-27 07:05 import django.core.validators from django.db import migrations, models from django.db.transaction import atomic from sellers.models import Seller """ Note: Migrations includes data migration that set to null logo_url field for currently existing records. Logo_url fi...
26.605263
128
0.68546
import django.core.validators from django.db import migrations, models from django.db.transaction import atomic from sellers.models import Seller def clear_seller_logo_url(apps, schema_editor): with atomic(): for seller in Seller.objects.all(): seller.logo_url = None seller.sa...
true
true
f71b632bb314545ed7732ce47684f88d027b19e7
78
py
Python
xpring/proto/__init__.py
mvadari/xpring-py
b837420127d1c1e5051ed305ed4f19fe9910a4f6
[ "0BSD" ]
6
2019-12-11T00:54:56.000Z
2021-03-11T19:44:44.000Z
xpring/proto/__init__.py
mvadari/xpring-py
b837420127d1c1e5051ed305ed4f19fe9910a4f6
[ "0BSD" ]
null
null
null
xpring/proto/__init__.py
mvadari/xpring-py
b837420127d1c1e5051ed305ed4f19fe9910a4f6
[ "0BSD" ]
9
2020-02-28T18:40:46.000Z
2022-02-28T23:01:09.000Z
# The rest of this package, but not this __init__.py, is generated by protoc.
39
77
0.75641
true
true
f71b6354cd7ddb3ba58cc906feac3f6233ca894c
537
py
Python
ImgVidProcessing/Exercise1/solution1.py
SystemNinja/MyPythonPrograms
6bdebb5017994c3431aea769319f702075fff9b9
[ "MIT" ]
null
null
null
ImgVidProcessing/Exercise1/solution1.py
SystemNinja/MyPythonPrograms
6bdebb5017994c3431aea769319f702075fff9b9
[ "MIT" ]
null
null
null
ImgVidProcessing/Exercise1/solution1.py
SystemNinja/MyPythonPrograms
6bdebb5017994c3431aea769319f702075fff9b9
[ "MIT" ]
null
null
null
""" This solution implements glob library in order to 'automatize' task. Instead of manually processing each image Reference: https://pymotw.com/2/glob/ """ import cv2 import glob2 images=glob2.glob("*.jpg") #images=glob2.glob("Exercise1\*.jpg") for image in images: img=cv2.imread(image, 0) ...
25.571429
69
0.670391
import cv2 import glob2 images=glob2.glob("*.jpg") for image in images: img=cv2.imread(image, 0) re=cv2.resize(img,(100,100)) cv2.imshow("Resized image", re) cv2.waitKey(500) cv2.destroyAllWindows() cv2.imwrite(image+"_resized.jpg", re)
true
true
f71b63892ebbad403e4916b665b53156a244c0fa
87
py
Python
Python/100Excersises/.history/51 to 75/69/69_20201119121845.py
magusikrak/NAMI-TERM-I-GroupWork
f0a9a5f219ccbec024eb5316361db3fca46e171c
[ "MIT" ]
null
null
null
Python/100Excersises/.history/51 to 75/69/69_20201119121845.py
magusikrak/NAMI-TERM-I-GroupWork
f0a9a5f219ccbec024eb5316361db3fca46e171c
[ "MIT" ]
1
2021-07-24T03:18:30.000Z
2021-07-24T12:45:07.000Z
Python/100Excersises/.history/51 to 75/69/69_20201119121845.py
magusikrak/NAMI-TERM-I-GroupWork
f0a9a5f219ccbec024eb5316361db3fca46e171c
[ "MIT" ]
null
null
null
import requests sugam = requests.get("http://www.pythonhow.com") print(rp.text[:100])
17.4
48
0.724138
import requests sugam = requests.get("http://www.pythonhow.com") print(rp.text[:100])
true
true
f71b64529d9237153dd6f12a58b0280dfcb69bfe
454
py
Python
.history/ClassFiles/WorkingWithExternalFiles/FileHandling_20210107190119.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/WorkingWithExternalFiles/FileHandling_20210107190119.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/WorkingWithExternalFiles/FileHandling_20210107190119.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
""" Opening and Reading Files Syntax to open file. f = open("Myfile.txt) # assigned to the variable f. f = open("Myfile.txt","rt") # if in the same directory. f = open("c:\\MyFolders\Myfile.txt") # if hot in the same directory. """ f = open("Quotes.txt") # print(f.readable()) # print(...
15.655172
69
0.594714
f = open("Quotes.txt") print(f.read(11)) print(f.readlines()) for quote in f: print(quote) print("HI")
true
true
f71b64ca7afadced29875edb91d99ac16e7d6ba0
11,148
py
Python
src/main/app-resources/notebook/libexec/helpers.py
ec-better/ewf-ethz-03-01-01
5ca616e5c25bbba29013a7de248af4b69757921b
[ "Apache-2.0" ]
1
2021-09-23T02:20:11.000Z
2021-09-23T02:20:11.000Z
src/main/app-resources/notebook/libexec/helpers.py
ec-better/ewf-ethz-03-01-01
5ca616e5c25bbba29013a7de248af4b69757921b
[ "Apache-2.0" ]
null
null
null
src/main/app-resources/notebook/libexec/helpers.py
ec-better/ewf-ethz-03-01-01
5ca616e5c25bbba29013a7de248af4b69757921b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import os import numpy as np import cv2 import re from shapely import wkt from shapely.geometry import box, Polygon import pandas as pd import geopandas as gpd from osgeo import gdal, gdalnumeric, osr, ogr def ensure_dir(file_path): directory = os.path.dirname(file_path) if not os.pat...
33.884498
157
0.591137
import os import numpy as np import cv2 import re from shapely import wkt from shapely.geometry import box, Polygon import pandas as pd import geopandas as gpd from osgeo import gdal, gdalnumeric, osr, ogr def ensure_dir(file_path): directory = os.path.dirname(file_path) if not os.path.exists(directory): ...
true
true
f71b651c18866a5ae438540b4c87f225edab7b8a
21,388
py
Python
gym_let_mpc/let_mpc.py
eivindeb/gym-letMPC
7041aa56a25aa9a1c749088f2b370c910d21fe75
[ "MIT" ]
6
2020-12-04T18:15:29.000Z
2022-02-26T11:01:31.000Z
gym_let_mpc/let_mpc.py
eivindeb/gym-letMPC
7041aa56a25aa9a1c749088f2b370c910d21fe75
[ "MIT" ]
null
null
null
gym_let_mpc/let_mpc.py
eivindeb/gym-letMPC
7041aa56a25aa9a1c749088f2b370c910d21fe75
[ "MIT" ]
5
2021-03-08T06:00:27.000Z
2021-11-22T08:14:12.000Z
import gym from gym.utils import seeding import numpy as np import json from gym_let_mpc.simulator import ControlSystem from gym_let_mpc.controllers import ETMPC, AHMPC import collections.abc import matplotlib.pyplot as plt from gym_let_mpc.utils import str_replace_whole_words import copy class LetMPCEnv(gym.Env): ...
47.423503
164
0.565738
import gym from gym.utils import seeding import numpy as np import json from gym_let_mpc.simulator import ControlSystem from gym_let_mpc.controllers import ETMPC, AHMPC import collections.abc import matplotlib.pyplot as plt from gym_let_mpc.utils import str_replace_whole_words import copy class LetMPCEnv(gym.Env): ...
true
true
f71b65b3b003148f57d2ed310d5f76f0d067c474
933
py
Python
violas_client/canoser/bool_t.py
violas-core/violas-client
e8798f7d081ac218b78b81fd7eb2f8da92631a16
[ "MIT" ]
null
null
null
violas_client/canoser/bool_t.py
violas-core/violas-client
e8798f7d081ac218b78b81fd7eb2f8da92631a16
[ "MIT" ]
null
null
null
violas_client/canoser/bool_t.py
violas-core/violas-client
e8798f7d081ac218b78b81fd7eb2f8da92631a16
[ "MIT" ]
1
2022-01-05T06:49:42.000Z
2022-01-05T06:49:42.000Z
from violas_client.canoser.base import Base class BoolT(Base): @classmethod def encode(self, value): if value: return b'\1' else: return b'\0' @classmethod def decode_bytes(self, value): if value == b'\0': return False e...
23.923077
66
0.543408
from violas_client.canoser.base import Base class BoolT(Base): @classmethod def encode(self, value): if value: return b'\1' else: return b'\0' @classmethod def decode_bytes(self, value): if value == b'\0': return False e...
true
true
f71b6618acab7a74ff8f4e811e451717d08dc511
1,097
py
Python
4.conditionals/challenge3_rouillonh.py
rouillonh/ChallengePython
7e7d9b69f60394fd1f00a6a4aa32f97de95b1b92
[ "MIT" ]
null
null
null
4.conditionals/challenge3_rouillonh.py
rouillonh/ChallengePython
7e7d9b69f60394fd1f00a6a4aa32f97de95b1b92
[ "MIT" ]
null
null
null
4.conditionals/challenge3_rouillonh.py
rouillonh/ChallengePython
7e7d9b69f60394fd1f00a6a4aa32f97de95b1b92
[ "MIT" ]
null
null
null
print("\tWelcome to the Voter Registration App") #Pedimos nombre y edad para asi registrar su voto name = input("\nPlease enter your name: ").title() age = int(input("Please enter your age: ")) partidos = ['Republican','Democratic','Independent','Libertarian','Green'] #Si es mayor de edad, podrá votar if age >= 18: ...
43.88
80
0.65907
print("\tWelcome to the Voter Registration App") name = input("\nPlease enter your name: ").title() age = int(input("Please enter your age: ")) partidos = ['Republican','Democratic','Independent','Libertarian','Green'] if age >= 18: print("\nCongratulations ",name,"! You are old enough to register to vote.")...
true
true
f71b6745cb39d3ccd6a45e1c0ecd693cdffb6acf
2,559
py
Python
etc/mtrace/parse_mtrace.py
diamantopoulos/memluv
f3a283d65f07b19d48589e02ac484563e12e22e8
[ "Apache-2.0" ]
9
2015-12-16T08:05:06.000Z
2022-02-25T08:29:30.000Z
etc/mtrace/parse_mtrace.py
diamantopoulos/memluv
f3a283d65f07b19d48589e02ac484563e12e22e8
[ "Apache-2.0" ]
1
2022-02-26T07:40:23.000Z
2022-03-15T03:27:59.000Z
etc/mtrace/parse_mtrace.py
diamantopoulos/memluv
f3a283d65f07b19d48589e02ac484563e12e22e8
[ "Apache-2.0" ]
null
null
null
""" Parsing a mtrace log file and append to timeline-footprint format """ from numpy import * import numpy as np import glob import os import linecache import csv # 1038 bytes is the size of a heap log file with no heap activity (only heap info) def ValidHeapFile(fpath): header_lines=1 with open(fpath) as f: line...
34.581081
126
0.569754
from numpy import * import numpy as np import glob import os import linecache import csv def ValidHeapFile(fpath): header_lines=1 with open(fpath) as f: lines = len(list(f)) return True if os.path.isfile(fpath) and lines > header_lines else False print ("INFO: --------------------- \nINFO: Parsing mtrace logs ...
true
true
f71b675d58f0489d8b6561c581bfe700396f87fb
965
py
Python
python/day12-2.py
Aerdan/adventcode-2020
83120aa8c7fc9d1f2d34780610401e3c6d4f583b
[ "BSD-1-Clause" ]
null
null
null
python/day12-2.py
Aerdan/adventcode-2020
83120aa8c7fc9d1f2d34780610401e3c6d4f583b
[ "BSD-1-Clause" ]
null
null
null
python/day12-2.py
Aerdan/adventcode-2020
83120aa8c7fc9d1f2d34780610401e3c6d4f583b
[ "BSD-1-Clause" ]
null
null
null
#!/usr/bin/env python3 from math import sin, cos, radians data = [] with open('input12.txt') as f: for line in f: data.append(line.strip()) x, y = 10, 1 sx, sy = 0, 0 d = 'E' c = 'NESW' for line in data: insn = line[0] dist = int(line[1:]) if insn == 'F': # move to waypoint dist t...
19.693878
42
0.449741
from math import sin, cos, radians data = [] with open('input12.txt') as f: for line in f: data.append(line.strip()) x, y = 10, 1 sx, sy = 0, 0 d = 'E' c = 'NESW' for line in data: insn = line[0] dist = int(line[1:]) if insn == 'F': for i in range(dist): sx +...
true
true
f71b693c8f73a9ec5102fb39ced2b8f6a4ea8b4b
511
py
Python
tcfcli/cmds/local/libs/local/debug_context.py
tencentyun/scfcli
ef15508ad34a851cf0d2750dfaa5202f6a600887
[ "Apache-2.0" ]
103
2019-06-11T06:09:56.000Z
2021-12-18T22:48:59.000Z
tcfcli/cmds/local/libs/local/debug_context.py
TencentCloud/Serverless-cli
57f98b24cfd10712770a4806212cfb69d981a11a
[ "Apache-2.0" ]
8
2019-07-12T12:08:40.000Z
2020-10-20T07:18:17.000Z
tcfcli/cmds/local/libs/local/debug_context.py
TencentCloud/Serverless-cli
57f98b24cfd10712770a4806212cfb69d981a11a
[ "Apache-2.0" ]
49
2019-06-11T06:26:05.000Z
2020-02-19T08:13:36.000Z
# -*- coding: utf-8 -*- import os class DebugContext(object): def __init__(self, debug_port=None, debugger_path=None, debug_args=None): self.debug_port = debug_port self.debugger_path = debugger_path self.debug_args = debug_args ...
21.291667
48
0.579256
import os class DebugContext(object): def __init__(self, debug_port=None, debugger_path=None, debug_args=None): self.debug_port = debug_port self.debugger_path = debugger_path self.debug_args = debug_args if self.debug_port: ...
true
true
f71b6aed9afed4cf56533fb2127e350f2b0dc11b
289
py
Python
tests/integration/test_notes.py
mhk001/python-alerta-client
6e02f8a2245cef223df3048d445921e1ba90ad1c
[ "Apache-2.0" ]
20
2017-04-14T08:05:48.000Z
2022-01-11T06:26:17.000Z
tests/integration/test_notes.py
mhk001/python-alerta-client
6e02f8a2245cef223df3048d445921e1ba90ad1c
[ "Apache-2.0" ]
99
2016-09-30T20:53:05.000Z
2022-03-14T10:00:59.000Z
tests/integration/test_notes.py
mhk001/python-alerta-client
6e02f8a2245cef223df3048d445921e1ba90ad1c
[ "Apache-2.0" ]
33
2016-10-04T20:44:58.000Z
2022-03-04T21:35:49.000Z
import unittest from alertaclient.api import Client class AlertTestCase(unittest.TestCase): def setUp(self): self.client = Client(endpoint='http://api:8080', key='demo-key') def test_notes(self): # add tests here when /notes endpoints are created pass
20.642857
72
0.681661
import unittest from alertaclient.api import Client class AlertTestCase(unittest.TestCase): def setUp(self): self.client = Client(endpoint='http://api:8080', key='demo-key') def test_notes(self): pass
true
true
f71b6b5b67e80a03f5062113889382389fc8dc72
29,281
py
Python
resource/pypi/cryptography-1.7.1/tests/hazmat/primitives/fixtures_rsa.py
hipnusleo/Laserjet
f53e0b740f48f2feb0c0bb285ec6728b313b4ccc
[ "Apache-2.0" ]
null
null
null
resource/pypi/cryptography-1.7.1/tests/hazmat/primitives/fixtures_rsa.py
hipnusleo/Laserjet
f53e0b740f48f2feb0c0bb285ec6728b313b4ccc
[ "Apache-2.0" ]
null
null
null
resource/pypi/cryptography-1.7.1/tests/hazmat/primitives/fixtures_rsa.py
hipnusleo/Laserjet
f53e0b740f48f2feb0c0bb285ec6728b313b4ccc
[ "Apache-2.0" ]
null
null
null
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from cryptography.hazmat.primitives.asymmetric.rsa import ( RS...
48.478477
80
0.765787
from __future__ import absolute_import, division, print_function from cryptography.hazmat.primitives.asymmetric.rsa import ( RSAPrivateNumbers, RSAPublicNumbers ) RSA_KEY_512 = RSAPrivateNumbers( p=int( "d57846898d5c0de249c08467586cb458fa9bc417cdf297f73cfc52281b787cd9", 16 ), ...
true
true
f71b6b65aa6aa47c57fda3ac6483ee6b1a2be140
239
py
Python
more-python-for-beginners/03 - Classes/basic_class.py
CloudBreadPaPa/c9-python-getting-started
c49580be5e7e88a480d05596a7a53c89d0be7dd3
[ "MIT" ]
null
null
null
more-python-for-beginners/03 - Classes/basic_class.py
CloudBreadPaPa/c9-python-getting-started
c49580be5e7e88a480d05596a7a53c89d0be7dd3
[ "MIT" ]
null
null
null
more-python-for-beginners/03 - Classes/basic_class.py
CloudBreadPaPa/c9-python-getting-started
c49580be5e7e88a480d05596a7a53c89d0be7dd3
[ "MIT" ]
1
2021-09-12T15:34:13.000Z
2021-09-12T15:34:13.000Z
class Presenter(): def __init__(self, name): # 생성자(Constructor) self.name = name def say_hello(self): # 메서드(method) print('Hello, ' + self.name) presenter = Presenter('Chris') presenter.name = 'Christopher' presenter.say_hello()
21.727273
30
0.698745
class Presenter(): def __init__(self, name): self.name = name def say_hello(self): print('Hello, ' + self.name) presenter = Presenter('Chris') presenter.name = 'Christopher' presenter.say_hello()
true
true
f71b6c3e8f25504c53f9b02239b585cd06f3f509
1,080
py
Python
posts/views.py
hamzabell/hackernews_mvp
54beff25f6d23f42b39a13dfe0c289768faa4c3d
[ "MIT" ]
null
null
null
posts/views.py
hamzabell/hackernews_mvp
54beff25f6d23f42b39a13dfe0c289768faa4c3d
[ "MIT" ]
null
null
null
posts/views.py
hamzabell/hackernews_mvp
54beff25f6d23f42b39a13dfe0c289768faa4c3d
[ "MIT" ]
null
null
null
from django.core.checks import messages from rest_framework import generics from rest_framework.response import Response from posts.models import Post from .serializers import PostSerializer, UpVoteSerializer class PostList(generics.ListCreateAPIView): queryset = Post.objects.all() serializer_class = PostSer...
26.341463
62
0.682407
from django.core.checks import messages from rest_framework import generics from rest_framework.response import Response from posts.models import Post from .serializers import PostSerializer, UpVoteSerializer class PostList(generics.ListCreateAPIView): queryset = Post.objects.all() serializer_class = PostSer...
true
true
f71b6d9c04fe09d52e0af50a82d2a1e90ad0f9f1
8,352
py
Python
estimagic/tests/differentiation/test_derivatives.py
vishalbelsare/estimagic
afae1be3a1566056d11962c495b67e64bc4a0822
[ "BSD-3-Clause" ]
null
null
null
estimagic/tests/differentiation/test_derivatives.py
vishalbelsare/estimagic
afae1be3a1566056d11962c495b67e64bc4a0822
[ "BSD-3-Clause" ]
null
null
null
estimagic/tests/differentiation/test_derivatives.py
vishalbelsare/estimagic
afae1be3a1566056d11962c495b67e64bc4a0822
[ "BSD-3-Clause" ]
null
null
null
from functools import partial from pathlib import Path import numpy as np import pandas as pd import pytest from numpy.testing import assert_array_almost_equal as aaae from pandas.testing import assert_frame_equal from scipy.optimize._numdiff import approx_derivative from estimagic.differentiation.derivatives import ...
32.498054
88
0.639727
from functools import partial from pathlib import Path import numpy as np import pandas as pd import pytest from numpy.testing import assert_array_almost_equal as aaae from pandas.testing import assert_frame_equal from scipy.optimize._numdiff import approx_derivative from estimagic.differentiation.derivatives import ...
true
true
f71b6dab14627d4699e80c6acbce3ef420b0a543
35
py
Python
ciphey/basemods/Searchers/__init__.py
paramint/ciphey
26195dfe1f216c3d43d07b50279b64eb026f0c13
[ "MIT" ]
1
2021-05-30T19:55:00.000Z
2021-05-30T19:55:00.000Z
ciphey/basemods/Searchers/__init__.py
usama7628674/Ciphey
e18801c506e93e7e9377d0bbc6870ecd84ae2f61
[ "MIT" ]
4
2020-11-13T19:01:56.000Z
2022-02-10T02:14:00.000Z
ciphey/basemods/Searchers/__init__.py
usama7628674/Ciphey
e18801c506e93e7e9377d0bbc6870ecd84ae2f61
[ "MIT" ]
null
null
null
from . import ausearch, perfection
17.5
34
0.8
from . import ausearch, perfection
true
true
f71b6e4295ed13a2ac4d43cdf95ee46cabd50a60
18,334
py
Python
python/helpers/pycharm/teamcity/pytest_plugin.py
janchochol/intellij-community
fce543ac6018b411e519fe01ddc71a8c1bbd138b
[ "Apache-2.0" ]
null
null
null
python/helpers/pycharm/teamcity/pytest_plugin.py
janchochol/intellij-community
fce543ac6018b411e519fe01ddc71a8c1bbd138b
[ "Apache-2.0" ]
null
null
null
python/helpers/pycharm/teamcity/pytest_plugin.py
janchochol/intellij-community
fce543ac6018b411e519fe01ddc71a8c1bbd138b
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 """ Aaron Buchanan Nov. 2012 Plug-in for py.test for reporting to TeamCity server Report results to TeamCity during test execution for immediate reporting when using TeamCity. This should be installed as a py.test plugin and will be automatically enabled by running tests under TeamCity build. """ ...
38.761099
128
0.608432
import os import pprint import sys import re import traceback from datetime import timedelta from teamcity.messages import TeamcityServiceMessages from teamcity.common import convert_error_to_string, dump_test_stderr, dump_test_stdout from teamcity import is_running_under_teamcity from teamcity import diff_tools di...
true
true
f71b6ec1ac6a3e138fec3e28c7e2f2eda3b7aa07
2,948
py
Python
mayan/apps/mayan_statistics/views.py
sophiawa/Mayan-EDMS
42f20576d0c690b645a60bf53c5169cda4264231
[ "Apache-2.0" ]
null
null
null
mayan/apps/mayan_statistics/views.py
sophiawa/Mayan-EDMS
42f20576d0c690b645a60bf53c5169cda4264231
[ "Apache-2.0" ]
10
2021-03-19T23:48:12.000Z
2022-03-12T00:41:49.000Z
mayan/apps/mayan_statistics/views.py
sophiawa/Mayan-EDMS
42f20576d0c690b645a60bf53c5169cda4264231
[ "Apache-2.0" ]
1
2020-12-17T02:35:09.000Z
2020-12-17T02:35:09.000Z
from django.contrib import messages from django.http import Http404 from django.utils.translation import ugettext_lazy as _ from mayan.apps.common.generics import ConfirmView, SimpleView, SingleObjectListView from .classes import Statistic, StatisticNamespace from .permissions import permission_statistics_view from ....
31.031579
84
0.636364
from django.contrib import messages from django.http import Http404 from django.utils.translation import ugettext_lazy as _ from mayan.apps.common.generics import ConfirmView, SimpleView, SingleObjectListView from .classes import Statistic, StatisticNamespace from .permissions import permission_statistics_view from ....
true
true
f71b6ef7a59d7d39b2bcee735e05d0bb4fe7d665
2,447
py
Python
display_recognized_faces.py
theTechie/face-recognition
4236405914971fa971eb8dab7f31022f154ac10b
[ "MIT" ]
null
null
null
display_recognized_faces.py
theTechie/face-recognition
4236405914971fa971eb8dab7f31022f154ac10b
[ "MIT" ]
null
null
null
display_recognized_faces.py
theTechie/face-recognition
4236405914971fa971eb8dab7f31022f154ac10b
[ "MIT" ]
null
null
null
import face_recognition from PIL import Image, ImageDraw from pathlib import Path import recognize_face known_path = Path("data/sample-2/jpeg/picked/known") known_images = list(known_path.glob('*.jpeg')) known_face_encodings = [] known_face_names = [] known_faces = [recognize_face.image_to_known_face(str(image_path)...
38.84127
115
0.707805
import face_recognition from PIL import Image, ImageDraw from pathlib import Path import recognize_face known_path = Path("data/sample-2/jpeg/picked/known") known_images = list(known_path.glob('*.jpeg')) known_face_encodings = [] known_face_names = [] known_faces = [recognize_face.image_to_known_face(str(image_path)...
true
true
f71b6fb24f25ebf3dab99241ef1f473abaf2eb72
4,448
py
Python
releaseNewVersion.py
r-owen/TUI
8f130368254161a2748167b7c8260cc24170c28c
[ "BSD-3-Clause" ]
1
2015-04-29T20:28:20.000Z
2015-04-29T20:28:20.000Z
releaseNewVersion.py
ApachePointObservatory/TUI
8f130368254161a2748167b7c8260cc24170c28c
[ "BSD-3-Clause" ]
1
2017-06-05T22:53:58.000Z
2017-06-05T22:53:58.000Z
releaseNewVersion.py
r-owen/TUI
8f130368254161a2748167b7c8260cc24170c28c
[ "BSD-3-Clause" ]
1
2020-01-28T06:28:02.000Z
2020-01-28T06:28:02.000Z
#!/usr/bin/env python """A script to release a new version of TUI from a git working copy If run on a unix box it exports the current version of TUI and then zips that. If run on MacOS X it also tries to build the Mac binary. Not intended for use on Windows. To use: ./releaseNewVersion.py """ from __future__ impo...
35.870968
108
0.665243
"""A script to release a new version of TUI from a git working copy If run on a unix box it exports the current version of TUI and then zips that. If run on MacOS X it also tries to build the Mac binary. Not intended for use on Windows. To use: ./releaseNewVersion.py """ from __future__ import with_statement imp...
false
true
f71b6fe68084b084c7f741b11c1012ffaf12dd0a
3,230
py
Python
srv/fluffi/data/fluffiweb/app/utils/ftp.py
sears-s/fluffi
5f2f6d019041a6268199b69bf2f34487b18b84fe
[ "MIT" ]
96
2019-09-19T10:28:05.000Z
2022-02-28T11:53:06.000Z
srv/fluffi/data/fluffiweb/app/utils/ftp.py
sears-s/fluffi
5f2f6d019041a6268199b69bf2f34487b18b84fe
[ "MIT" ]
123
2019-11-19T09:47:14.000Z
2021-10-19T03:10:51.000Z
srv/fluffi/data/fluffiweb/app/utils/ftp.py
sears-s/fluffi
5f2f6d019041a6268199b69bf2f34487b18b84fe
[ "MIT" ]
23
2019-11-11T06:04:56.000Z
2022-02-11T15:35:26.000Z
# Copyright 2017-2020 Siemens AG # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including without # limitation the rights to use, copy, modify, merge, publish, distri...
35.108696
107
0.653251
from ftplib import FTP class FTPConnector: def __init__(self, ftpURL): self.ftpURL = ftpURL self.ftpClient = FTP() def getListOfFilesOnFTPServer(self, path): self.ftpClient.connect(self.ftpURL) self.ftpClient.login() self.ftpClient.cwd(path) ...
true
true
f71b701cb0a9f7edf9be18a1b9115d0dbedac0c4
17,383
py
Python
examples/language_model/bert/run_glue.py
weiwei1115/PaddleNLP
dd98f7f8b25b41d39228ba8a958b11a6212709a3
[ "Apache-2.0" ]
1
2021-02-24T14:03:55.000Z
2021-02-24T14:03:55.000Z
examples/language_model/bert/run_glue.py
weiwei1115/PaddleNLP
dd98f7f8b25b41d39228ba8a958b11a6212709a3
[ "Apache-2.0" ]
null
null
null
examples/language_model/bert/run_glue.py
weiwei1115/PaddleNLP
dd98f7f8b25b41d39228ba8a958b11a6212709a3
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
38.037199
115
0.611805
import argparse import logging import os import sys import random import time import math import distutils.util from functools import partial import numpy as np import paddle from paddle.io import DataLoader from paddle.metric import Metric, Accuracy, Precision, Recall from paddlenlp.datasets import Glu...
true
true
f71b70742d77f2a612297f4412d6829e00b6cebd
21,406
py
Python
pypureclient/flasharray/FA_2_13/api/file_systems_api.py
ashahid-ps/py-pure-client
2e3565d37b2a41db69308769f6f485d08a7c46c3
[ "BSD-2-Clause" ]
null
null
null
pypureclient/flasharray/FA_2_13/api/file_systems_api.py
ashahid-ps/py-pure-client
2e3565d37b2a41db69308769f6f485d08a7c46c3
[ "BSD-2-Clause" ]
null
null
null
pypureclient/flasharray/FA_2_13/api/file_systems_api.py
ashahid-ps/py-pure-client
2e3565d37b2a41db69308769f6f485d08a7c46c3
[ "BSD-2-Clause" ]
null
null
null
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.13 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # pyt...
47.568889
671
0.640989
from __future__ import absolute_import import re import six from typing import List, Optional from .. import models class FileSystemsApi(object): def __init__(self, api_client): self.api_client = api_client def api213_file_systems_delete_with_http_info( self, authorization=Non...
true
true
f71b714d70924c77c72ecc7b8ec3e29d445e7a15
1,829
py
Python
tests/test_servicer.py
yangtt0509/sea
f62bcdff00ef71e8c5b92bd5fc5f63d41b753ce2
[ "MIT" ]
null
null
null
tests/test_servicer.py
yangtt0509/sea
f62bcdff00ef71e8c5b92bd5fc5f63d41b753ce2
[ "MIT" ]
null
null
null
tests/test_servicer.py
yangtt0509/sea
f62bcdff00ef71e8c5b92bd5fc5f63d41b753ce2
[ "MIT" ]
null
null
null
import grpc from sea.servicer import ServicerMeta, msg2dict, stream2dict from sea import exceptions from sea.pb2 import default_pb2 from tests.wd.protos import helloworld_pb2 def test_meta_servicer(app, logstream): class HelloContext(): def __init__(self): self.code = None self....
25.760563
75
0.645708
import grpc from sea.servicer import ServicerMeta, msg2dict, stream2dict from sea import exceptions from sea.pb2 import default_pb2 from tests.wd.protos import helloworld_pb2 def test_meta_servicer(app, logstream): class HelloContext(): def __init__(self): self.code = None self....
true
true
f71b721716046fe128e3f99bbf0b9f20f56d1f2c
22,880
py
Python
venv/Lib/site-packages/sklearn/linear_model/_base.py
star10919/drf
77c005794087484d72ffc0d76612a6ac9845821e
[ "BSD-3-Clause" ]
7
2021-01-30T17:42:00.000Z
2022-01-09T08:08:48.000Z
venv/Lib/site-packages/sklearn/linear_model/_base.py
star10919/drf
77c005794087484d72ffc0d76612a6ac9845821e
[ "BSD-3-Clause" ]
25
2020-11-16T15:36:41.000Z
2021-06-01T05:15:31.000Z
venv/Lib/site-packages/sklearn/linear_model/_base.py
star10919/drf
77c005794087484d72ffc0d76612a6ac9845821e
[ "BSD-3-Clause" ]
2
2021-09-13T17:20:56.000Z
2021-11-21T16:05:16.000Z
""" Generalized Linear Models. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Vincent Michel <vincent.michel@inria.fr> # Peter Prettenhofer <peter.prettenhofer@gmail.com> # Mathieu Blond...
35.583204
79
0.612981
from abc import ABCMeta, abstractmethod import numbers import warnings import numpy as np import scipy.sparse as sp from scipy import linalg from scipy import optimize from scipy import sparse from scipy.special import expit from joblib import Parallel from ..base import (BaseEstimator, ClassifierMixin, R...
true
true
f71b728f6b7ee0bb3e520d6e3e1bb4a53edb161c
595
py
Python
website/system.py
timlyo/timlyo.github.io
fb3e3b65822351e49e3ba4ee17ba4ed5151c969a
[ "Apache-2.0" ]
1
2016-01-14T13:52:25.000Z
2016-01-14T13:52:25.000Z
website/system.py
timlyo/personalWebsite
fb3e3b65822351e49e3ba4ee17ba4ed5151c969a
[ "Apache-2.0" ]
null
null
null
website/system.py
timlyo/personalWebsite
fb3e3b65822351e49e3ba4ee17ba4ed5151c969a
[ "Apache-2.0" ]
null
null
null
import os import psutil COEFFICIENT = 2 ** 20 def get_other_ram() -> int: """Ram used by other processes""" return get_ram_used() - get_process_ram() def get_total_ram() -> int: mem = psutil.virtual_memory() return mem[0] / COEFFICIENT def get_process_ram() -> int: process = psutil.Process(os.getpid()) re...
18.030303
46
0.697479
import os import psutil COEFFICIENT = 2 ** 20 def get_other_ram() -> int: return get_ram_used() - get_process_ram() def get_total_ram() -> int: mem = psutil.virtual_memory() return mem[0] / COEFFICIENT def get_process_ram() -> int: process = psutil.Process(os.getpid()) return process.memory_info()[0] / COE...
true
true
f71b72b888e77e3334994d29892f03d292b9f189
1,820
py
Python
libweasyl/libweasyl/configuration.py
hyena/weasyl
a43ad885eb07ae89d6639f289a5b95f3a177439c
[ "Apache-2.0" ]
1
2019-02-15T04:21:48.000Z
2019-02-15T04:21:48.000Z
libweasyl/libweasyl/configuration.py
hyena/weasyl
a43ad885eb07ae89d6639f289a5b95f3a177439c
[ "Apache-2.0" ]
254
2017-12-23T19:36:43.000Z
2020-04-14T21:46:13.000Z
libweasyl/libweasyl/configuration.py
hyena/weasyl
a43ad885eb07ae89d6639f289a5b95f3a177439c
[ "Apache-2.0" ]
1
2017-12-23T18:42:16.000Z
2017-12-23T18:42:16.000Z
""" Configuration of libweasyl. libweasyl depends on some global state to be set up in order for e.g. database access to work correctly. This might be nicer if python had a way of parameterizing modules, but we can't, so this is what we have. It does mean that only one libweasyl configuration can exist in a running py...
44.390244
90
0.752198
from libweasyl.models.media import DiskMediaItem, MediaItem from libweasyl.models.meta import BaseQuery, _configure_dbsession from libweasyl.staff import _init_staff def configure_libweasyl( dbsession, not_found_exception, base_file_path, staff_config_dict, media_link_formatter_callback): _config...
true
true
f71b731df78a211a9b978d951f533de530a3905f
3,840
py
Python
tensorforce/core/memories/latest.py
zysilence/tensorforce
7539e5dde66f3a93b881006f9b7f38c926ced21b
[ "Apache-2.0" ]
2
2021-11-14T12:28:24.000Z
2022-02-14T19:23:51.000Z
tensorforce/core/memories/latest.py
zysilence/tensorforce
7539e5dde66f3a93b881006f9b7f38c926ced21b
[ "Apache-2.0" ]
null
null
null
tensorforce/core/memories/latest.py
zysilence/tensorforce
7539e5dde66f3a93b881006f9b7f38c926ced21b
[ "Apache-2.0" ]
3
2021-03-04T17:26:43.000Z
2021-03-04T17:27:10.000Z
# Copyright 2017 reinforce.io. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
45.176471
163
0.663542
from __future__ import absolute_import from __future__ import print_function from __future__ import division import tensorflow as tf from tensorforce.core.memories import Queue class Latest(Queue): def __init__(self, states, internals, actions, include_next_states, capacity, scope='latest', summ...
true
true
f71b73477d2f539f36cc389b2a439621a3f79453
18,562
py
Python
osa/scripts/provprocess.py
gae-ucm/LSTOSA
d44df4dc1daa87f57d95272014f05908d2c9a211
[ "BSD-3-Clause" ]
2
2022-02-21T17:45:38.000Z
2022-03-25T11:48:52.000Z
osa/scripts/provprocess.py
gae-ucm/LSTOSA
d44df4dc1daa87f57d95272014f05908d2c9a211
[ "BSD-3-Clause" ]
79
2021-12-02T10:37:42.000Z
2022-03-29T23:56:44.000Z
osa/scripts/provprocess.py
cta-observatory/lstosa
dd7a3a4967f265217929a1271c3f9be559a122ac
[ "BSD-3-Clause" ]
1
2021-11-25T09:56:12.000Z
2021-11-25T09:56:12.000Z
#!/usr/bin/env python """Provenance post processing script for OSA pipeline.""" import copy import logging import shutil import sys from pathlib import Path, PurePath import yaml from osa.configs import options from osa.configs.config import cfg from osa.provenance.capture import get_activity_id, get_file_hash from...
36.396078
89
0.619815
import copy import logging import shutil import sys from pathlib import Path, PurePath import yaml from osa.configs import options from osa.configs.config import cfg from osa.provenance.capture import get_activity_id, get_file_hash from osa.provenance.io import provdoc2graph, provdoc2json, provlist2provdoc, read_p...
true
true